Skip to content

Commit 5f84207

Browse files
Merge branch 'main' into mm/community-registry-submission
2 parents 8c58f23 + 673caf2 commit 5f84207

File tree

6 files changed

+32
-7
lines changed

6 files changed

+32
-7
lines changed

cmd/readmevalidation/coderresources.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,12 +336,12 @@ func validateAllCoderResourceFilesOfType(resourceType string) error {
336336
return err
337337
}
338338

339-
logger.Info(context.Background(), "rocessing README files", "num_files", len(allReadmeFiles))
339+
logger.Info(context.Background(), "processing README files", "num_files", len(allReadmeFiles))
340340
resources, err := parseCoderResourceReadmeFiles(resourceType, allReadmeFiles)
341341
if err != nil {
342342
return err
343343
}
344-
logger.Info(context.Background(), "rocessed README files as valid Coder resources", "num_files", len(resources), "type", resourceType)
344+
logger.Info(context.Background(), "processed README files as valid Coder resources", "num_files", len(resources), "type", resourceType)
345345

346346
if err := validateCoderResourceRelativeURLs(resources); err != nil {
347347
return err

registry/coder/modules/goose/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Run the [Goose](https://block.github.io/goose/) agent in your workspace to gener
1313
```tf
1414
module "goose" {
1515
source = "registry.coder.com/coder/goose/coder"
16-
version = "2.0.1"
16+
version = "2.1.0"
1717
agent_id = coder_agent.example.id
1818
folder = "/home/coder"
1919
install_goose = true
@@ -79,7 +79,7 @@ resource "coder_agent" "main" {
7979
module "goose" {
8080
count = data.coder_workspace.me.start_count
8181
source = "registry.coder.com/coder/goose/coder"
82-
version = "2.0.1"
82+
version = "2.1.0"
8383
agent_id = coder_agent.example.id
8484
folder = "/home/coder"
8585
install_goose = true

registry/coder/modules/goose/main.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,21 @@ describe("goose", async () => {
251251
expect(prompt.exitCode).not.toBe(0);
252252
expect(prompt.stderr).toContain("No such file or directory");
253253
});
254+
255+
test("subdomain-false", async () => {
256+
const { id } = await setup({
257+
agentapiMockScript: await loadTestFile(
258+
import.meta.dir,
259+
"agentapi-mock-print-args.js",
260+
),
261+
moduleVariables: {
262+
subdomain: "false",
263+
},
264+
});
265+
266+
await execModuleScript(id);
267+
268+
const agentapiMockOutput = await readFileContainer(id, agentapiStartLog);
269+
expect(agentapiMockOutput).toContain("AGENTAPI_CHAT_BASE_PATH=/@default/default.foo/apps/goose/chat");
270+
});
254271
});

registry/coder/modules/goose/main.tf

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@ variable "install_agentapi" {
6363
variable "agentapi_version" {
6464
type = string
6565
description = "The version of AgentAPI to install."
66-
default = "v0.2.3"
66+
default = "v0.3.3"
67+
}
68+
69+
variable "subdomain" {
70+
type = bool
71+
description = "Whether to use a subdomain for AgentAPI."
72+
default = true
6773
}
6874

6975
variable "goose_provider" {
@@ -133,7 +139,7 @@ EOT
133139

134140
module "agentapi" {
135141
source = "registry.coder.com/coder/agentapi/coder"
136-
version = "1.0.0"
142+
version = "1.1.0"
137143

138144
agent_id = var.agent_id
139145
web_app_slug = local.app_slug
@@ -146,6 +152,7 @@ module "agentapi" {
146152
module_dir_name = local.module_dir_name
147153
install_agentapi = var.install_agentapi
148154
agentapi_version = var.agentapi_version
155+
agentapi_subdomain = var.subdomain
149156
pre_install_script = var.pre_install_script
150157
post_install_script = var.post_install_script
151158
start_script = local.start_script

registry/coder/modules/goose/testdata/agentapi-mock-print-args.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const http = require("http");
44
const args = process.argv.slice(2);
55
console.log(args);
6+
console.log(`AGENTAPI_CHAT_BASE_PATH=${process.env["AGENTAPI_CHAT_BASE_PATH"]}`);
67
const port = 3284;
78

89
console.log(`starting server on port ${port}`);

test/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ export const runTerraformApply = async <TVars extends TerraformVariables>(
247247
"-compact-warnings",
248248
"-input=false",
249249
"-auto-approve",
250-
"-state",
251250
"-no-color",
251+
"-state",
252252
stateFile,
253253
],
254254
{

0 commit comments

Comments
 (0)