diff --git a/registry/coder/modules/goose/README.md b/registry/coder/modules/goose/README.md index 7d957d2fc..b3ce49b89 100644 --- a/registry/coder/modules/goose/README.md +++ b/registry/coder/modules/goose/README.md @@ -13,7 +13,7 @@ Run the [Goose](https://block.github.io/goose/) agent in your workspace to gener ```tf module "goose" { source = "registry.coder.com/coder/goose/coder" - version = "2.0.1" + version = "2.1.0" agent_id = coder_agent.example.id folder = "/home/coder" install_goose = true @@ -79,7 +79,7 @@ resource "coder_agent" "main" { module "goose" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/goose/coder" - version = "2.0.1" + version = "2.1.0" agent_id = coder_agent.example.id folder = "/home/coder" install_goose = true diff --git a/registry/coder/modules/goose/main.test.ts b/registry/coder/modules/goose/main.test.ts index bbf8b262e..779767fbd 100644 --- a/registry/coder/modules/goose/main.test.ts +++ b/registry/coder/modules/goose/main.test.ts @@ -251,4 +251,21 @@ describe("goose", async () => { expect(prompt.exitCode).not.toBe(0); expect(prompt.stderr).toContain("No such file or directory"); }); + + test("subdomain-false", async () => { + const { id } = await setup({ + agentapiMockScript: await loadTestFile( + import.meta.dir, + "agentapi-mock-print-args.js", + ), + moduleVariables: { + subdomain: "false", + }, + }); + + await execModuleScript(id); + + const agentapiMockOutput = await readFileContainer(id, agentapiStartLog); + expect(agentapiMockOutput).toContain("AGENTAPI_CHAT_BASE_PATH=/@default/default.foo/apps/goose/chat"); + }); }); diff --git a/registry/coder/modules/goose/main.tf b/registry/coder/modules/goose/main.tf index 93c2e15bc..47a49522c 100644 --- a/registry/coder/modules/goose/main.tf +++ b/registry/coder/modules/goose/main.tf @@ -63,7 +63,13 @@ variable "install_agentapi" { variable "agentapi_version" { type = string description = "The version of AgentAPI to install." - default = "v0.2.3" + default = "v0.3.3" +} + +variable "subdomain" { + type = bool + description = "Whether to use a subdomain for AgentAPI." + default = true } variable "goose_provider" { @@ -133,7 +139,7 @@ EOT module "agentapi" { source = "registry.coder.com/coder/agentapi/coder" - version = "1.0.0" + version = "1.1.0" agent_id = var.agent_id web_app_slug = local.app_slug @@ -146,6 +152,7 @@ module "agentapi" { module_dir_name = local.module_dir_name install_agentapi = var.install_agentapi agentapi_version = var.agentapi_version + agentapi_subdomain = var.subdomain pre_install_script = var.pre_install_script post_install_script = var.post_install_script start_script = local.start_script diff --git a/registry/coder/modules/goose/testdata/agentapi-mock-print-args.js b/registry/coder/modules/goose/testdata/agentapi-mock-print-args.js index fd859c819..0205331b2 100644 --- a/registry/coder/modules/goose/testdata/agentapi-mock-print-args.js +++ b/registry/coder/modules/goose/testdata/agentapi-mock-print-args.js @@ -3,6 +3,7 @@ const http = require("http"); const args = process.argv.slice(2); console.log(args); +console.log(`AGENTAPI_CHAT_BASE_PATH=${process.env["AGENTAPI_CHAT_BASE_PATH"]}`); const port = 3284; console.log(`starting server on port ${port}`);