From b35f38421964c687086d04eb4e3606c2f4183ab6 Mon Sep 17 00:00:00 2001 From: "blink-so[bot]" <211532188+blink-so[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:38:27 +0000 Subject: [PATCH 1/6] Add Kiro IDE module Adds a new module for Kiro IDE, AWS's AI-powered IDE that helps developers build from concept to production with spec-driven development. Features: - One-click button to launch Kiro IDE - Support for opening specific folders - Support for opening recent workspaces - Customizable display name, slug, order, and group - Full test coverage Co-authored-by: matifali <10648092+matifali@users.noreply.github.com> --- registry/coder/modules/kiro/README.md | 52 +++++++++++++ registry/coder/modules/kiro/main.test.ts | 93 ++++++++++++++++++++++++ registry/coder/modules/kiro/main.tf | 81 +++++++++++++++++++++ 3 files changed, 226 insertions(+) create mode 100644 registry/coder/modules/kiro/README.md create mode 100644 registry/coder/modules/kiro/main.test.ts create mode 100644 registry/coder/modules/kiro/main.tf diff --git a/registry/coder/modules/kiro/README.md b/registry/coder/modules/kiro/README.md new file mode 100644 index 000000000..fa41732eb --- /dev/null +++ b/registry/coder/modules/kiro/README.md @@ -0,0 +1,52 @@ +--- +display_name: Kiro IDE +description: Add a one-click button to launch Kiro IDE +icon: ../../../../.icons/code.svg +maintainer_github: coder +verified: true +tags: [ide, kiro, ai, aws] +--- + +# Kiro IDE + +Add a button to open any workspace with a single click in Kiro IDE. + +Kiro is an AI-powered IDE from AWS that helps developers build from concept to production with spec-driven development, featuring AI agents, hooks, and steering files. + +Uses the [Coder Remote VS Code Extension](https://github.com/coder/vscode-coder). + +```tf +module "kiro" { + count = data.coder_workspace.me.start_count + source = "registry.coder.com/coder/kiro/coder" + version = "1.0.0" + agent_id = coder_agent.example.id +} +``` + +## Examples + +### Open in a specific directory + +```tf +module "kiro" { + count = data.coder_workspace.me.start_count + source = "registry.coder.com/coder/kiro/coder" + version = "1.0.0" + agent_id = coder_agent.example.id + folder = "/home/coder/project" +} +``` + +### Open with custom display name and order + +```tf +module "kiro" { + count = data.coder_workspace.me.start_count + source = "registry.coder.com/coder/kiro/coder" + version = "1.0.0" + agent_id = coder_agent.example.id + display_name = "Kiro AI IDE" + order = 1 +} +``` diff --git a/registry/coder/modules/kiro/main.test.ts b/registry/coder/modules/kiro/main.test.ts new file mode 100644 index 000000000..89ea9cc78 --- /dev/null +++ b/registry/coder/modules/kiro/main.test.ts @@ -0,0 +1,93 @@ +import { describe, expect, it } from "bun:test"; +import { + runTerraformApply, + runTerraformInit, + testRequiredVariables, +} from "~test"; + +describe("kiro", async () => { + await runTerraformInit(import.meta.dir); + + testRequiredVariables(import.meta.dir, { + agent_id: "foo", + }); + + it("default output", async () => { + const state = await runTerraformApply(import.meta.dir, { + agent_id: "foo", + }); + expect(state.outputs.kiro_url.value).toBe( + "kiro://coder.coder-remote/open?owner=default&workspace=default&url=https://mydeployment.coder.com&token=$SESSION_TOKEN", + ); + + const coder_app = state.resources.find( + (res) => res.type === "coder_app" && res.name === "kiro", + ); + + expect(coder_app).not.toBeNull(); + expect(coder_app?.instances.length).toBe(1); + expect(coder_app?.instances[0].attributes.order).toBeNull(); + }); + + it("adds folder", async () => { + const state = await runTerraformApply(import.meta.dir, { + agent_id: "foo", + folder: "/foo/bar", + }); + expect(state.outputs.kiro_url.value).toBe( + "kiro://coder.coder-remote/open?owner=default&workspace=default&folder=/foo/bar&url=https://mydeployment.coder.com&token=$SESSION_TOKEN", + ); + }); + + it("adds folder and open_recent", async () => { + const state = await runTerraformApply(import.meta.dir, { + agent_id: "foo", + folder: "/foo/bar", + open_recent: "true", + }); + expect(state.outputs.kiro_url.value).toBe( + "kiro://coder.coder-remote/open?owner=default&workspace=default&folder=/foo/bar&openRecent&url=https://mydeployment.coder.com&token=$SESSION_TOKEN", + ); + }); + + 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"); + }); +}); diff --git a/registry/coder/modules/kiro/main.tf b/registry/coder/modules/kiro/main.tf new file mode 100644 index 000000000..79eb24b02 --- /dev/null +++ b/registry/coder/modules/kiro/main.tf @@ -0,0 +1,81 @@ +terraform { + required_version = ">= 1.0" + + required_providers { + coder = { + source = "coder/coder" + version = ">= 2.5" + } + } +} + +variable "agent_id" { + type = string + description = "The ID of a Coder agent." +} + +variable "folder" { + type = string + description = "The folder to open in Kiro IDE." + default = "" +} + +variable "open_recent" { + type = bool + description = "Open the most recent workspace or folder. Falls back to the folder if there is no recent workspace or folder to open." + default = false +} + +variable "order" { + type = number + description = "The order determines the position of app in the UI presentation. The lowest order is shown first and apps with equal order are sorted by name (ascending order)." + default = null +} + +variable "group" { + type = string + description = "The name of a group that this app belongs to." + 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" +} + +data "coder_workspace" "me" {} +data "coder_workspace_owner" "me" {} + +resource "coder_app" "kiro" { + agent_id = var.agent_id + external = true + icon = "/icon/code.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", + ]) +} + +output "kiro_url" { + value = coder_app.kiro.url + description = "Kiro IDE URL." +} From 3ba9ec6b62b766eff8a3819a56833af68ce7b64b Mon Sep 17 00:00:00 2001 From: "blink-so[bot]" <211532188+blink-so[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:44:22 +0000 Subject: [PATCH 2/6] Add official Kiro SVG icon and update module to use it Adds the official Kiro SVG icon to .icons/kiro.svg and updates the Kiro module to use the proper icon instead of the generic code.svg. The icon features Kiro's distinctive ghost-like mascot design. Co-authored-by: matifali <10648092+matifali@users.noreply.github.com> --- .icons/kiro.svg | 1 + registry/coder/modules/kiro/README.md | 2 +- registry/coder/modules/kiro/main.tf | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .icons/kiro.svg diff --git a/.icons/kiro.svg b/.icons/kiro.svg new file mode 100644 index 000000000..e132ead12 --- /dev/null +++ b/.icons/kiro.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/registry/coder/modules/kiro/README.md b/registry/coder/modules/kiro/README.md index fa41732eb..85e99e7d1 100644 --- a/registry/coder/modules/kiro/README.md +++ b/registry/coder/modules/kiro/README.md @@ -1,7 +1,7 @@ --- display_name: Kiro IDE description: Add a one-click button to launch Kiro IDE -icon: ../../../../.icons/code.svg +icon: ../../../../.icons/kiro.svg maintainer_github: coder verified: true tags: [ide, kiro, ai, aws] diff --git a/registry/coder/modules/kiro/main.tf b/registry/coder/modules/kiro/main.tf index 79eb24b02..a6a49948d 100644 --- a/registry/coder/modules/kiro/main.tf +++ b/registry/coder/modules/kiro/main.tf @@ -56,7 +56,7 @@ data "coder_workspace_owner" "me" {} resource "coder_app" "kiro" { agent_id = var.agent_id external = true - icon = "/icon/code.svg" + icon = "/icon/kiro.svg" slug = var.slug display_name = var.display_name order = var.order From b028aa68a7c2ffc62639786dfde94865f62a5b19 Mon Sep 17 00:00:00 2001 From: "blink-so[bot]" <211532188+blink-so[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 18:04:06 +0000 Subject: [PATCH 3/6] Update README: Add kiro.dev link and improve formatting Adds a link to https://kiro.dev in the description as requested in the PR review. Co-authored-by: matifali <10648092+matifali@users.noreply.github.com> --- registry/coder/modules/kiro/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/coder/modules/kiro/README.md b/registry/coder/modules/kiro/README.md index 85e99e7d1..292017f91 100644 --- a/registry/coder/modules/kiro/README.md +++ b/registry/coder/modules/kiro/README.md @@ -9,7 +9,7 @@ tags: [ide, kiro, ai, aws] # Kiro IDE -Add a button to open any workspace with a single click in Kiro IDE. +Add a button to open any workspace with a single click in [Kiro IDE](https://kiro.dev). Kiro is an AI-powered IDE from AWS that helps developers build from concept to production with spec-driven development, featuring AI agents, hooks, and steering files. From d0f561a5c1c8aa54fbe471b8ab86d6636aba7b83 Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Tue, 15 Jul 2025 23:12:50 +0500 Subject: [PATCH 4/6] Apply suggestion from @matifali --- registry/coder/modules/kiro/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/registry/coder/modules/kiro/README.md b/registry/coder/modules/kiro/README.md index 292017f91..20eb8bf12 100644 --- a/registry/coder/modules/kiro/README.md +++ b/registry/coder/modules/kiro/README.md @@ -2,7 +2,6 @@ display_name: Kiro IDE description: Add a one-click button to launch Kiro IDE icon: ../../../../.icons/kiro.svg -maintainer_github: coder verified: true tags: [ide, kiro, ai, aws] --- From d386058c0a0fd6b29e52db1b2f2adcf3f67880fa Mon Sep 17 00:00:00 2001 From: "blink-so[bot]" <211532188+blink-so[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 19:16:48 +0000 Subject: [PATCH 5/6] Update README: Use open-remote-ssh extension instead of Coder Remote VS Code Extension Updates the documentation to reference the correct extension used by Kiro for establishing connections to Coder workspaces. Co-authored-by: matifali <10648092+matifali@users.noreply.github.com> --- registry/coder/modules/kiro/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/coder/modules/kiro/README.md b/registry/coder/modules/kiro/README.md index 20eb8bf12..90b31d697 100644 --- a/registry/coder/modules/kiro/README.md +++ b/registry/coder/modules/kiro/README.md @@ -12,7 +12,7 @@ Add a button to open any workspace with a single click in [Kiro IDE](https://kir Kiro is an AI-powered IDE from AWS that helps developers build from concept to production with spec-driven development, featuring AI agents, hooks, and steering files. -Uses the [Coder Remote VS Code Extension](https://github.com/coder/vscode-coder). +Uses the [open-remote-ssh extension](https://open-vsx.org/extension/jeanp413/open-remote-ssh) for establishing connections to Coder workspaces. ```tf module "kiro" { From d6f6a7c3de183c49ad53f63870d4d502af8f5a14 Mon Sep 17 00:00:00 2001 From: "blink-so[bot]" <211532188+blink-so[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 19:20:49 +0000 Subject: [PATCH 6/6] Update README: Mention both Coder Remote VS Code Extension and open-remote-ssh extension As clarified in the PR review, Kiro uses both extensions for establishing connections to Coder workspaces. Co-authored-by: matifali <10648092+matifali@users.noreply.github.com> --- registry/coder/modules/kiro/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/coder/modules/kiro/README.md b/registry/coder/modules/kiro/README.md index 90b31d697..732472cb4 100644 --- a/registry/coder/modules/kiro/README.md +++ b/registry/coder/modules/kiro/README.md @@ -12,7 +12,7 @@ Add a button to open any workspace with a single click in [Kiro IDE](https://kir Kiro is an AI-powered IDE from AWS that helps developers build from concept to production with spec-driven development, featuring AI agents, hooks, and steering files. -Uses the [open-remote-ssh extension](https://open-vsx.org/extension/jeanp413/open-remote-ssh) for establishing connections to Coder workspaces. +Uses the [Coder Remote VS Code Extension](https://github.com/coder/vscode-coder) and [open-remote-ssh extension](https://open-vsx.org/extension/jeanp413/open-remote-ssh) for establishing connections to Coder workspaces. ```tf module "kiro" {