Skip to content

Commit c551c4d

Browse files
refactor(coder-labs/cursor-cli): support terraform provider coder v2.12.0 (#491)
## Description Updates the module to use the new version of the agentapi module for Coder 2.28 ## Type of Change - [ ] New module - [ ] New template - [ ] Bug fix - [x] Feature/enhancement - [ ] Documentation - [ ] Other ## Module Information **Path:** `registry/coder-labs/modules/cursor-cli` **New version:** `v0.3.0` **Breaking change:** [x] Yes [ ] No ## Testing & Validation - [x] Tests pass (`bun test`) - [x] Code formatted (`bun fmt`) - [ ] Changes tested locally ## Related Issues - coder/internal#1065 ## Related PRs - #485 --------- Co-authored-by: DevCats <christofer@coder.com>
1 parent 4b9da40 commit c551c4d

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

registry/coder-labs/modules/cursor-cli/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Run the Cursor Agent CLI in your workspace for interactive coding assistance and
1313
```tf
1414
module "cursor_cli" {
1515
source = "registry.coder.com/coder-labs/cursor-cli/coder"
16-
version = "0.2.2"
16+
version = "0.3.0"
1717
agent_id = coder_agent.main.id
1818
folder = "/home/coder/project"
1919
}
@@ -42,7 +42,7 @@ module "coder-login" {
4242
4343
module "cursor_cli" {
4444
source = "registry.coder.com/coder-labs/cursor-cli/coder"
45-
version = "0.2.2"
45+
version = "0.3.0"
4646
agent_id = coder_agent.main.id
4747
folder = "/home/coder/project"
4848

registry/coder-labs/modules/cursor-cli/main.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ describe("cursor-cli", async () => {
159159
"-c",
160160
"cat /home/coder/.cursor-cli-module/agentapi-start.log || cat /home/coder/.cursor-cli-module/start.log || true",
161161
]);
162-
expect(startLog.stdout).toContain(`-m ${model}`);
162+
expect(startLog.stdout).toContain(`--model ${model}`);
163163
expect(startLog.stdout).toContain("-f");
164164
expect(startLog.stdout).toContain("test prompt");
165165
});

registry/coder-labs/modules/cursor-cli/main.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
coder = {
66
source = "coder/coder"
7-
version = ">= 2.7"
7+
version = ">= 2.12"
88
}
99
}
1010
}
@@ -132,7 +132,7 @@ resource "coder_env" "cursor_api_key" {
132132

133133
module "agentapi" {
134134
source = "registry.coder.com/coder/agentapi/coder"
135-
version = "1.2.0"
135+
version = "2.0.0"
136136

137137
agent_id = var.agent_id
138138
folder = local.folder
@@ -179,3 +179,7 @@ module "agentapi" {
179179
/tmp/install.sh
180180
EOT
181181
}
182+
183+
output "task_app_id" {
184+
value = module.agentapi.task_app_id
185+
}

registry/coder-labs/modules/cursor-cli/scripts/start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ ARGS=()
5050

5151
# global flags
5252
if [ -n "$ARG_MODEL" ]; then
53-
ARGS+=("-m" "$ARG_MODEL")
53+
ARGS+=("--model" "$ARG_MODEL")
5454
fi
5555
if [ "$ARG_FORCE" = "true" ]; then
5656
ARGS+=("-f")

0 commit comments

Comments
 (0)