From 9f1ac46c0440de331fc1c326304ec6102446cdcc Mon Sep 17 00:00:00 2001 From: Danielle Maywood Date: Mon, 20 Oct 2025 11:52:42 +0000 Subject: [PATCH 1/4] refactor(coder-labs/cursor-cli): support terraform provider coder v2.12.0 --- registry/coder-labs/modules/cursor-cli/README.md | 8 ++++---- registry/coder-labs/modules/cursor-cli/main.tf | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/registry/coder-labs/modules/cursor-cli/README.md b/registry/coder-labs/modules/cursor-cli/README.md index 6aa5ada35..a7325f9de 100644 --- a/registry/coder-labs/modules/cursor-cli/README.md +++ b/registry/coder-labs/modules/cursor-cli/README.md @@ -13,8 +13,8 @@ Run the Cursor Agent CLI in your workspace for interactive coding assistance and ```tf module "cursor_cli" { source = "registry.coder.com/coder-labs/cursor-cli/coder" - version = "0.2.2" - agent_id = coder_agent.main.id + version = "0.3.0" + agent_id = coder_agent.example.id folder = "/home/coder/project" } ``` @@ -42,8 +42,8 @@ module "coder-login" { module "cursor_cli" { source = "registry.coder.com/coder-labs/cursor-cli/coder" - version = "0.2.2" - agent_id = coder_agent.main.id + version = "0.3.0" + agent_id = coder_agent.example.id folder = "/home/coder/project" # Optional diff --git a/registry/coder-labs/modules/cursor-cli/main.tf b/registry/coder-labs/modules/cursor-cli/main.tf index a57ad65c6..4363f3585 100644 --- a/registry/coder-labs/modules/cursor-cli/main.tf +++ b/registry/coder-labs/modules/cursor-cli/main.tf @@ -4,7 +4,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = ">= 2.7" + version = ">= 2.12" } } } @@ -132,7 +132,7 @@ resource "coder_env" "cursor_api_key" { module "agentapi" { source = "registry.coder.com/coder/agentapi/coder" - version = "1.2.0" + version = "2.0.0" agent_id = var.agent_id folder = local.folder @@ -179,3 +179,7 @@ module "agentapi" { /tmp/install.sh EOT } + +output "task_app_id" { + value = module.agentapi.task_app_id +} From 5d5a10093dda85aca59858ca87fd6c74e2be18c6 Mon Sep 17 00:00:00 2001 From: Danielle Maywood Date: Tue, 16 Dec 2025 19:01:38 +0000 Subject: [PATCH 2/4] fix: `coder_agent.example.id` to `coder_agent.main.id` --- registry/coder-labs/modules/cursor-cli/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/coder-labs/modules/cursor-cli/README.md b/registry/coder-labs/modules/cursor-cli/README.md index a7325f9de..7eeac44a5 100644 --- a/registry/coder-labs/modules/cursor-cli/README.md +++ b/registry/coder-labs/modules/cursor-cli/README.md @@ -14,7 +14,7 @@ Run the Cursor Agent CLI in your workspace for interactive coding assistance and module "cursor_cli" { source = "registry.coder.com/coder-labs/cursor-cli/coder" version = "0.3.0" - agent_id = coder_agent.example.id + agent_id = coder_agent.main.id folder = "/home/coder/project" } ``` From 87006eab38db54000fcfbe9baca76a201c687002 Mon Sep 17 00:00:00 2001 From: Danielle Maywood Date: Tue, 16 Dec 2025 19:05:38 +0000 Subject: [PATCH 3/4] fix: fix model cli --- registry/coder-labs/modules/cursor-cli/scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/coder-labs/modules/cursor-cli/scripts/start.sh b/registry/coder-labs/modules/cursor-cli/scripts/start.sh index 8a200a2f7..1e9ab59d3 100644 --- a/registry/coder-labs/modules/cursor-cli/scripts/start.sh +++ b/registry/coder-labs/modules/cursor-cli/scripts/start.sh @@ -50,7 +50,7 @@ ARGS=() # global flags if [ -n "$ARG_MODEL" ]; then - ARGS+=("-m" "$ARG_MODEL") + ARGS+=("--model" "$ARG_MODEL") fi if [ "$ARG_FORCE" = "true" ]; then ARGS+=("-f") From 4d99ca811849cff8912109844b77eead679392a2 Mon Sep 17 00:00:00 2001 From: Danielle Maywood Date: Tue, 16 Dec 2025 19:07:54 +0000 Subject: [PATCH 4/4] test: fix assertion --- registry/coder-labs/modules/cursor-cli/main.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/coder-labs/modules/cursor-cli/main.test.ts b/registry/coder-labs/modules/cursor-cli/main.test.ts index 4b37b71c2..b7f9947cd 100644 --- a/registry/coder-labs/modules/cursor-cli/main.test.ts +++ b/registry/coder-labs/modules/cursor-cli/main.test.ts @@ -159,7 +159,7 @@ describe("cursor-cli", async () => { "-c", "cat /home/coder/.cursor-cli-module/agentapi-start.log || cat /home/coder/.cursor-cli-module/start.log || true", ]); - expect(startLog.stdout).toContain(`-m ${model}`); + expect(startLog.stdout).toContain(`--model ${model}`); expect(startLog.stdout).toContain("-f"); expect(startLog.stdout).toContain("test prompt"); });