Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
7 changes: 4 additions & 3 deletions registry/coder/modules/cursor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Uses the [Coder Remote VS Code Extension](https://github.com/coder/vscode-coder)
module "cursor" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/cursor/coder"
version = "1.3.3"
version = "1.4.0"
agent_id = coder_agent.main.id
}
```
Expand All @@ -29,7 +29,7 @@ module "cursor" {
module "cursor" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/cursor/coder"
version = "1.3.3"
version = "1.4.0"
agent_id = coder_agent.main.id
folder = "/home/coder/project"
}
Expand All @@ -45,7 +45,7 @@ The following example configures Cursor to use the GitHub MCP server with authen
module "cursor" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/cursor/coder"
version = "1.3.3"
version = "1.4.0"
agent_id = coder_agent.main.id
folder = "/home/coder/project"
mcp = jsonencode({
Expand All @@ -58,6 +58,7 @@ module "cursor" {
"type" : "http"
}
}
})
}
Expand Down
20 changes: 4 additions & 16 deletions registry/coder/modules/cursor/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ describe("cursor", async () => {
);

const coder_app = state.resources.find(
(res) => res.type === "coder_app" && res.name === "cursor",
(res) =>
res.type === "coder_app" &&
res.module === "module.vscode-desktop-core" &&
res.name === "vscode-desktop",
);

expect(coder_app).not.toBeNull();
Expand Down Expand Up @@ -76,21 +79,6 @@ describe("cursor", async () => {
);
});

it("expect order to be set", async () => {
const state = await runTerraformApply(import.meta.dir, {
agent_id: "foo",
order: "22",
});

const coder_app = state.resources.find(
(res) => res.type === "coder_app" && res.name === "cursor",
);

expect(coder_app).not.toBeNull();
expect(coder_app?.instances.length).toBe(1);
expect(coder_app?.instances[0].attributes.order).toBe(22);
});

it("writes ~/.cursor/mcp.json when mcp provided", async () => {
const id = await runContainer("alpine");
try {
Expand Down
39 changes: 17 additions & 22 deletions registry/coder/modules/cursor/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,21 @@ locals {
mcp_b64 = var.mcp != "" ? base64encode(var.mcp) : ""
}

resource "coder_app" "cursor" {
agent_id = var.agent_id
external = true
icon = "/icon/cursor.svg"
slug = var.slug
display_name = var.display_name
order = var.order
group = var.group
url = join("", [
"cursor://coder.coder-remote/open",
"?owner=",
data.coder_workspace_owner.me.name,
"&workspace=",
data.coder_workspace.me.name,
var.folder != "" ? join("", ["&folder=", var.folder]) : "",
var.open_recent ? "&openRecent" : "",
"&url=",
data.coder_workspace.me.access_url,
"&token=$SESSION_TOKEN",
])
module "vscode-desktop-core" {
source = "registry.coder.com/coder/vscode-desktop-core/coder"
version = "1.0.0"

agent_id = var.agent_id

coder_app_icon = "/icon/cursor.svg"
coder_app_slug = var.slug
coder_app_display_name = var.display_name
coder_app_order = var.order
coder_app_group = var.group

folder = var.folder
open_recent = var.open_recent
protocol = "cursor"
}

resource "coder_script" "cursor_mcp" {
Expand All @@ -103,6 +98,6 @@ resource "coder_script" "cursor_mcp" {
}

output "cursor_url" {
value = coder_app.cursor.url
value = module.vscode-desktop-core.ide_uri
description = "Cursor IDE Desktop URL."
}
}
7 changes: 4 additions & 3 deletions registry/coder/modules/kiro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Uses the [Coder Remote VS Code Extension](https://github.com/coder/vscode-coder)
module "kiro" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/kiro/coder"
version = "1.1.1"
version = "1.2.0"
agent_id = coder_agent.main.id
}
```
Expand All @@ -31,7 +31,7 @@ module "kiro" {
module "kiro" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/kiro/coder"
version = "1.1.1"
version = "1.2.0"
agent_id = coder_agent.main.id
folder = "/home/coder/project"
}
Expand All @@ -47,7 +47,7 @@ The following example configures Kiro to use the GitHub MCP server with authenti
module "kiro" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/kiro/coder"
version = "1.1.1"
version = "1.2.0"
agent_id = coder_agent.main.id
folder = "/home/coder/project"
mcp = jsonencode({
Expand All @@ -60,6 +60,7 @@ module "kiro" {
"type" : "http"
}


}
})
}
Expand Down
53 changes: 0 additions & 53 deletions registry/coder/modules/kiro/kiro.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ run "default_output" {
condition = output.kiro_url == "kiro://coder.coder-remote/open?owner=default&workspace=default&url=https://mydeployment.coder.com&token=$SESSION_TOKEN"
error_message = "Default kiro_url must match expected value"
}

assert {
condition = coder_app.kiro.order == null
error_message = "coder_app order must be null by default"
}
}

run "adds_folder" {
Expand Down Expand Up @@ -53,54 +48,6 @@ run "folder_and_open_recent" {
}
}

run "custom_slug_display_name" {
command = plan

variables {
agent_id = "foo"
slug = "kiro-ai"
display_name = "Kiro AI IDE"
}

assert {
condition = coder_app.kiro.slug == "kiro-ai"
error_message = "coder_app slug must be set to kiro-ai"
}

assert {
condition = coder_app.kiro.display_name == "Kiro AI IDE"
error_message = "coder_app display_name must be set to Kiro AI IDE"
}
}

run "sets_order" {
command = plan

variables {
agent_id = "foo"
order = 5
}

assert {
condition = coder_app.kiro.order == 5
error_message = "coder_app order must be set to 5"
}
}

run "sets_group" {
command = plan

variables {
agent_id = "foo"
group = "AI IDEs"
}

assert {
condition = coder_app.kiro.group == "AI IDEs"
error_message = "coder_app group must be set to AI IDEs"
}
}

run "writes_mcp_json" {
command = plan

Expand Down
46 changes: 4 additions & 42 deletions registry/coder/modules/kiro/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ describe("kiro", async () => {
);

const coder_app = state.resources.find(
(res) => res.type === "coder_app" && res.name === "kiro",
(res) =>
res.type === "coder_app" &&
res.module === "module.vscode-desktop-core" &&
res.name === "vscode-desktop",
);

expect(coder_app).not.toBeNull();
Expand Down Expand Up @@ -55,47 +58,6 @@ describe("kiro", async () => {
);
});

it("custom slug and display_name", async () => {
const state = await runTerraformApply(import.meta.dir, {
agent_id: "foo",
slug: "kiro-ai",
display_name: "Kiro AI IDE",
});

const coder_app = state.resources.find(
(res) => res.type === "coder_app" && res.name === "kiro",
);

expect(coder_app?.instances[0].attributes.slug).toBe("kiro-ai");
expect(coder_app?.instances[0].attributes.display_name).toBe("Kiro AI IDE");
});

it("sets order", async () => {
const state = await runTerraformApply(import.meta.dir, {
agent_id: "foo",
order: "5",
});

const coder_app = state.resources.find(
(res) => res.type === "coder_app" && res.name === "kiro",
);

expect(coder_app?.instances[0].attributes.order).toBe(5);
});

it("sets group", async () => {
const state = await runTerraformApply(import.meta.dir, {
agent_id: "foo",
group: "AI IDEs",
});

const coder_app = state.resources.find(
(res) => res.type === "coder_app" && res.name === "kiro",
);

expect(coder_app?.instances[0].attributes.group).toBe("AI IDEs");
});

it("writes ~/.kiro/settings/mcp.json when mcp provided", async () => {
const id = await runContainer("alpine");
try {
Expand Down
51 changes: 17 additions & 34 deletions registry/coder/modules/kiro/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,6 @@ variable "group" {
default = null
}

variable "slug" {
type = string
description = "The slug of the app."
default = "kiro"
}

variable "display_name" {
type = string
description = "The display name of the app."
default = "Kiro IDE"
}

variable "mcp" {
type = string
description = "JSON-encoded string to configure MCP servers for Kiro. When set, writes ~/.kiro/settings/mcp.json."
Expand All @@ -63,26 +51,21 @@ locals {
mcp_b64 = var.mcp != "" ? base64encode(var.mcp) : ""
}

resource "coder_app" "kiro" {
agent_id = var.agent_id
external = true
icon = "/icon/kiro.svg"
slug = var.slug
display_name = var.display_name
order = var.order
group = var.group
url = join("", [
"kiro://coder.coder-remote/open",
"?owner=",
data.coder_workspace_owner.me.name,
"&workspace=",
data.coder_workspace.me.name,
var.folder != "" ? join("", ["&folder=", var.folder]) : "",
var.open_recent ? "&openRecent" : "",
"&url=",
data.coder_workspace.me.access_url,
"&token=$SESSION_TOKEN",
])
module "vscode-desktop-core" {
source = "registry.coder.com/coder/vscode-desktop-core/coder"
version = "1.0.0"

agent_id = var.agent_id

coder_app_icon = "/icon/kiro.svg"
coder_app_slug = "kiro-ai"
coder_app_display_name = "Kiro AI IDE"
coder_app_order = var.order
coder_app_group = var.group

folder = var.folder
open_recent = var.open_recent
protocol = "kiro"
}

resource "coder_script" "kiro_mcp" {
Expand All @@ -102,6 +85,6 @@ resource "coder_script" "kiro_mcp" {
}

output "kiro_url" {
value = coder_app.kiro.url
value = module.vscode-desktop-core.ide_uri
description = "Kiro IDE URL."
}
}
16 changes: 8 additions & 8 deletions registry/coder/modules/vscode-desktop-core/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
display_name: VSCode Desktop Core
display_name: Coder VSCode Desktop Core
description: Building block for modules that need to link to an external VSCode-based IDE
icon: ../../../../.icons/coder.svg
verified: true
Expand All @@ -11,20 +11,20 @@ tags: [internal, library]
> [!CAUTION]
> We do not recommend using this module directly. Instead, please consider using one of our [Desktop IDE modules](https://registry.coder.com/modules?search=tag%3Aide).

The VSCode Desktop Core module is a building block for modules that need to expose access to VSCode-based IDEs. It is intended primarily to be used as a library to create modules for VSCode-based IDEs.
The VSCode Desktop Core module is a building block for modules that need to expose access to VSCode-based IDEs. It is intended primarily for internal use by Coder to create modules for VSCode-based IDEs.

```tf
module "vscode-desktop-core" {
source = "registry.coder.com/coder/vscode-desktop-core/coder"
version = "1.0.0"
version = "1.0.1"

agent_id = var.agent_id

coder_app_icon = "/icon/code.svg"
coder_app_slug = "vscode"
coder_app_display_name = "VS Code Desktop"
coder_app_order = var.order
coder_app_group = var.group
web_app_icon = "/icon/code.svg"
web_app_slug = "vscode"
web_app_display_name = "VS Code Desktop"
web_app_order = var.order
web_app_group = var.group

folder = var.folder
open_recent = var.open_recent
Expand Down
Loading