Repository navigation
feat(coder-labs/kiro-crew): add kiro-crew module - #1196
Conversation
Port the Kiro Crew prototype into a coder-labs module that installs Kiro CLI and Kiro Crew through coder-utils, starts the gateway and a token-minting redirector, and exposes a self-authenticating dashboard app. Add a Kubernetes template that uses the module. Generated with Coder Agents.
Module Scorecard Check
|
| Presentation & Onboarding | Agent Integration | Credential Hygiene | Restricted-Environment Readiness | Engineering Quality | Overall |
|---|---|---|---|---|---|
| 12 / 17 | 15 / 25 | 20 / 20 | 20 / 20 | 10 / 10 | 84 / 100 |
Drilldown
Presentation & Onboarding — 12 / 17
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Configuration-mode examples | 12 | 12 | README has distinct, well-documented examples for each major configuration mode: pre_install_script for system prerequisites, extra_mcp_json for MCP merging, workspace_proxy_hostnames for proxy setups, dashboard_origin override, headless vs interactive auth, and AWS Builder ID via external auth. |
| Visual preview | 5 | 0 | No image, GIF, or video embedded in the README; only text and icon reference. |
Agent Integration — 15 / 25
| Criterion | Max | Score | Notes |
|---|---|---|---|
| AI governance | 10 | 0 | No mention of Coder AI Gateway or Agent Firewall anywhere in the README. |
| Dashboard entry point | 5 | 5 | coder_app resources kiro_crew (visible) and kiro_crew_dashboard (hidden) are documented, with described launch/redirect behavior. |
| Session continuity | 5 | 5 | Dedicated "Session continuity" section documents reconnection, surviving restarts via persistent $HOME, and the gateway reattaching to running sessions. |
| Managed configuration | 5 | 5 | extra_mcp_json documented with example for deep-merging MCP server config into ~/.kiro/settings/mcp.json. |
Credential Hygiene — 20 / 20
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Secrets marked sensitive | 16 | 16 | aws_builder_id_token variable is sensitive = true. README examples use data.coder_external_auth and coder secret create rather than inline literal/placeholder secrets. |
| Non-hardcoded auth path | 4 | 4 | Documents AWS Builder ID via external auth (coder_external_auth), Coder user secrets for KIRO_API_KEY, and device-code sign-in via kiro-cli login. |
Restricted-Environment Readiness — 20 / 20
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Mirrorable artifact source | 5 | 5 | kiro_cli_install_url and kirocrew_install_url variables override the installer download URLs, documented in a dedicated "Use an internal mirror" section with example. |
| Bring-your-own binary | 10 | 10 | use_cached (default true) documented in "Bring your own binaries (skip all downloads)" with Dockerfile example to bake in binaries and skip installers entirely. |
| Egress transparency | 3 | 3 | Dedicated "Network access" section with a table enumerating install/runtime endpoints (cli.kiro.dev, download.crew.kiro.dev, Astral/uv, PyPI, Kiro model backend) and how to avoid each. |
| Runs without sudo | 2 | 2 | install.sh.tftpl and start.sh.tftpl never invoke sudo; only the user-supplied pre_install_script example uses sudo apt-get, which is optional and outside core module scripts. |
Engineering Quality — 10 / 10
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Input quality | 6 | 6 | Variables have clear descriptions, sensible defaults, and validation blocks for port, redirect_port, slug, share, open_in, dashboard_origin, workspace_proxy_hostnames, and extra_mcp_json. |
| Test coverage | 4 | 4 | .tftest.hcl covers business logic (origin derivation, script args, outputs, validation failures); main.test.ts covers end-to-end behavior (install/start scripts, redirector routing, gateway health, MCP merging). |
Overall — 84 / 100
Raw 77 / 92 → round(77 / 92 × 100) = 84
Tip
You can run this locally by telling your agent: "review this module against .github/scorecard/SCORECARD.md".
Scored against SCORECARD.md with solstice-1. Language-model scores are advisory.
…s, egress + session continuity docs
|
CI/Validate is failing as the template requires the included module, which doesn't exist yet. I re-tested successfully locally in my https://partner.coderdemo.io/ environment with the module source copied in directly, and had coder agents update the doco to increase the scorecard check score. |
…aged Python via uv The Kiro Crew installer provisions its own managed Python with uv, so the module no longer needs system Python or pipx. Remove prepare_pipx and the python packages from the template pre-req script, and resolve the Python used by the install MCP merge and the start redirector from the installer-managed interpreter (managed venv, uv crew-python, or kirocrew pipx venv), falling back to system python3 only if none is found. Docs updated accordingly. Addresses review feedback from @35C4n0r on #1196.
|
@greg-the-coder the Screen.Recording.2026-10-22.at.19.29.34.mov |
…name and support workspace proxies The redirector sent the browser to <slug>-dashboard--<ws>--<owner>.<access-host>, which only matches deployments whose wildcard is *.<access-host>. Deployments with another wildcard (for example *--apps.example.com) or with workspace proxies got a broken redirect or "Host header not allowed." from the gateway. The start script now derives the primary dashboard origin from the agent's VSCODE_PROXY_URI and expands each workspace_proxy_hostnames entry into exact origins. One snapshot feeds both the gateway allowlist and the redirector's host-to-origin routes, so the redirector keeps the browser on the proxy it came through and falls back to the primary origin for unknown hosts. Generated with Coder Agents.
…e scripts directory The gateway launcher, redirector, and origins helper are module artifacts, so they now live in $HOME/.coder-modules/coder-labs/kiro-crew/scripts/ next to the coder-utils scripts, and the origins snapshot in the module directory, instead of Kiro Crew's own ~/.kiro/crew data directory. Copies left there by earlier versions are removed. Generated with Coder Agents.
…aller test aa2eec3 removed the module's dedicated pipx, but the test still expected it. Generated with Coder Agents.
…nstall and start Prints the non-sensitive Terraform inputs after decoding, matching the claude-code module, plus the agent's CODER_WORKSPACE_AGENT_NAME and VSCODE_PROXY_URI that the dashboard origins derive from. extra_mcp_json is shown only as "(set)". Generated with Coder Agents.
|
I was able to sort out the kiro crew dashboard URL and workspace proxy issues by testing the module in the dogfood environment, and implemented/tested the other requested changes across both the dogfood and my AWS partner demo environments. |
…parate PR The template validates only after the module is published, so it moves to the superblink/coder-labs-kiro-crew-template branch and lands after this module PR. Generated with Coder Agents.
… a separate PR Generated with Coder Agents.
Generated with Coder Agents.
35C4n0r
left a comment
There was a problem hiding this comment.
LGTM, gateway spins and the dashboard opens on both dogfood and coderdemo deployments.
Description
Adds a
coder-labs/kiro-crewmodule. The module installs Kiro CLI and Kiro Crew, starts thekirocrew gatewayand a loopback token-minting redirector, and exposes two subdomain apps: a visible tile that points at the redirector, and a hidden dashboard app. Opening the tile mints a short-lived gateway token and redirects to the dashboard, so it opens already authenticated. At startup the module derives the dashboard origin from the agent'sVSCODE_PROXY_URIand from anyworkspace_proxy_hostnames. The gateway trusts those origins (plus optional extra origins) throughKIROCREW_CORS_ORIGINS, anddashboard.urlis set to the primary origin. The redirector keeps the browser on the primary deployment or workspace proxy it came through.This is a port of a Kiro Crew prototype tested by @greg-the-coder, adapted to registry conventions:
coder-utilsinstall/start scripts as.tftplfiles,$HOME/.coder-modules/coder-labs/kiro-crewdata layout, base64 for free-form inputs, the Builder ID token passed throughcoder_envinstead of being rendered into scripts, and Terraform plus Bun tests with mocked installers.Decision log / deviations from the prototype
coder_scriptreplaced bycoder-utils0.0.2 (install + start). Logs moved from/tmpto$HOME/.coder-modules/coder-labs/kiro-crew/logs/(install.log,start.log,gateway.log,redirector.log)./healthzreturns 200 without minting a token;/returns 302 to<dashboard>/?token=…, or 503 while the gateway starts), healthchecks, detachedsetsid nohuplaunch, port-based stale-process cleanup, the userns sandbox fallback,PYTHONPATHunset, the pipx guard, and theextra_mcp_jsondeep merge are preserved.aws_builder_id_tokenis exported asKIRO_AWS_BUILDER_ID_TOKENthroughcoder_env(as in refactor(registry/harleylrn/modules/kiro-cli)!: remove agentapi, tasks and start logic #1161) instead of being rendered into the script and staged in a file.curl | sh.subdomain,install_prefixandlog_pathinputs. Addeddashboard_origin(an override for the primary dashboard origin),workspace_proxy_hostnames,pre_install_script,post_install_script,icon, and thescriptsoutput.start-gateway.sh,redirect-gateway.py,coder-origins.py) are written to$HOME/.coder-modules/coder-labs/kiro-crew/scripts/next to the coder-utils scripts, not to Kiro Crew's~/.kiro/crewdata directory.Decision log: dashboard origins and workspace proxies
Problem (reproduced on dogfood). The module derived
https://<slug>-dashboard--<ws>--<owner>.<access-host>in Terraform. Dogfood's wildcard is*--apps.dogfood.cdr.dev, and each workspace proxy has its own (*--apps.us-east-2.dogfood.cdr.dev, ...). The redirector sent every browser, on primary or on a proxy, to a host that is not a valid app URL. The real dashboard hosts returnedHost header not allowed., because the gateway allowlist is exact-match and fixed at launch.Evidence.
VSCODE_PROXY_URIis<scheme>://+ the primary wildcard with*replaced by{{port}}--<agent>--<ws>--<owner>(coderd/agentapi/manifest.go), with no auth needed.<slug>--<ws>--<owner>without the agent (db2sdk.AppSubdomain). Coder also routes the form that names the agent.Host(httputil.NewSingleHostReverseProxydoes not rewritereq.Host), so the redirector can tell which hostname the browser used./api/v2/regions, which needs a user token. The agent token gets 401.Decisions.
VSCODE_PROXY_URI, plus each entry in the newworkspace_proxy_hostnames. Both slug forms are trusted. The old Terraform-derived origin is only a last resort, and it logs a warning.~/.kiro/crew/coder-origins.json) feeds both the gateway allowlist and the redirector's exactapp host -> dashboard originroutes. The redirector only looks up the requestHostand never buildsLocationfrom it, so a token never goes to an origin outside the allowlist. Unknown hosts, including unlisted proxies, go to the primary origin.data.coder_workspace_owner.me.session_tokeninside the workspace. coder-utils writes the start script to the persistent home volume, andcoder_envwould expose the token to every process. Explicit configuration was the safer tradeoff.dashboard_originstill overrides the primary origin. When it is set,VSCODE_PROXY_URIis ignored.Cache-Control: no-storeandReferrer-Policy: no-referrer.Type of Change
Module Information
Path:
registry/coder-labs/modules/kiro-crewNew version:
v0.0.1Breaking change: [ ] Yes [x] No
Testing & Validation
Tests pass (
bun test)Code formatted (
bun fmt)Changes tested locally
terraform test: 16 passed (plan for input-derived values; apply for healthchecks,coder_env, and thescriptsoutput).bun test main.test.ts: 13 passed. Covers cached and fresh installs,use_cached = false, download failure, MCP write and merge, gateway and redirector launch (302 with token, CORS origins,dashboard.url, token env), 503 before the gateway is ready, replacing a stale listener, and a missing binary, proxy-preserving redirects (including the agent-named form, an explicit scheme and port, and unlisted or unrelated hosts falling back to primary, with every redirect origin checked against the gateway allowlist), thedashboard_originoverride, and the fallback withoutVSCODE_PROXY_URI. Installers and the gateway are mocked.terraform_validate.sh,readmevalidation,shellcheck(including the rendered.tftplscripts), andvalidate_set_u_order.shpass.Live on dogfood (workspace on
j-kiro-crew-pr-1196, running the rendered start script): opening the tile via primary, us-east-2, eu-central-1, and ap-southeast-2 redirected to the dashboard on the same hostname and served the Kiro Crew page (HTTP 200). With noworkspace_proxy_hostnames, us-east-2 fell back to the primary dashboard, which loaded.Not tested: Kiro login.
Related Issues
The companion Kubernetes template is on branch
superblink/coder-labs-kiro-crew-templateand will be opened as a separate PR after this module is published, because it referencesregistry.coder.com/coder-labs/kiro-crew/coder0.0.1.Generated with Coder Agents using Claude
Created on behalf of @greg-the-coder