Skip to content

feat: goose: add support for subdomain=false #299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Aug 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
59ad4b5
feat: agentapi: automatically set --chat-base-path if var.subdomain =…
johnstcn Aug 4, 2025
5ce1cec
chore: agentapi: allow setting DEBUG=1 to skip container removal for …
johnstcn Aug 4, 2025
204aa7c
feat: agentapi: validate var.subdomain based on agentapi_version
johnstcn Aug 4, 2025
8429e04
feat: agentapi: set default version to v0.3.2
johnstcn Aug 4, 2025
f744906
fixup! feat: agentapi: validate var.subdomain based on agentapi_version
johnstcn Aug 4, 2025
1a31181
fixup! chore: agentapi: allow setting DEBUG=1 to skip container remov…
johnstcn Aug 4, 2025
ada586f
fixup! feat: agentapi: validate var.subdomain based on agentapi_version
johnstcn Aug 4, 2025
2defdcf
fix: agentapi: fix subpath version off-by-one error
johnstcn Aug 4, 2025
6f1fa34
chore: agentapi: bump module version (minor)
johnstcn Aug 5, 2025
bab4557
set AGENTAPI_CHAT_BASE_PATH using env instead
johnstcn Aug 5, 2025
f54bd0a
fixup! set AGENTAPI_CHAT_BASE_PATH using env instead
johnstcn Aug 5, 2025
307dea7
Merge branch 'main' into cj/agentapi/subpath
johnstcn Aug 5, 2025
772f299
bump min agentapi_version to v0.3.3 assuming this is when support for…
johnstcn Aug 5, 2025
4145d9c
chore: agentapi: fix cleanup async func
johnstcn Aug 6, 2025
85d238e
chore: agentapi: improve agentapi_subdomain_false_min_version_expr
johnstcn Aug 6, 2025
ef3a7e6
Merge branch 'main' into cj/agentapi/subpath
johnstcn Aug 6, 2025
ea35534
feat: goose: add support for subdomain=false
johnstcn Aug 5, 2025
d94b356
chore: goose: bump module version (minor)
johnstcn Aug 6, 2025
f0a675e
chore: goose: we can just use AGENTAPI_CHAT_BASE_PATH exported from a…
johnstcn Aug 6, 2025
59e1b1b
Merge branch 'main' into cj/goose/subpath
johnstcn Aug 6, 2025
1e147d5
Merge branch 'main' into cj/goose/subpath
johnstcn Aug 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions registry/coder/modules/goose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions registry/coder/modules/goose/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
});
});
11 changes: 9 additions & 2 deletions registry/coder/modules/goose/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down