Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .github/file-line-cap-baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
6697 src/kiro_crew/agent.py
2579 src/kiro_crew/builtin_skills/kirocrew-dev/kirocrew-prepare-pr/scripts/pr_status.py
2232 src/kiro_crew/builtin_skills/kirocrew-dev/kirocrew-prepare-pr/scripts/push_guard.py
2058 src/kiro_crew/change_card_catalog.py
3161 src/kiro_crew/cron_script.py
18473 src/kiro_crew/dashboard/chat_runner.py
2284 src/kiro_crew/sandbox_launcher_program.py
Expand Down
10 changes: 10 additions & 0 deletions docs/architecture/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -2229,6 +2229,16 @@ names only (`history.md`, "Card rows"). Every owner
mutation through the hooked routes, card or manual, appends one names-only line
to Global memory history.

`kiro_crew/change_card_catalog.py` keeps the evidence, undo and result code
(`extract_evidence`, `build_undo`, `result_summary`) and the manual-change memory
lines (`describe_manual_change`, `HOOKED_ROUTES`, `MEMORY_ROUTES`), and is a mirror
facade (`kiro_crew._facade_mirror`) over two sibling owners, so every other name
still reads and patches as `change_card_catalog.<name>`. New work goes to the owner
of its responsibility: `change_card_catalog_kinds.py` (the kind ids, the `KINDS`
table, the risk and limit constants and the parameter validation) and
`change_card_catalog_plans.py` (the plan steps and fills, the stores and dashboard
setting tables, the display helpers and `build_preview`).

`kirocrew-panel` is opt-in and reaches a crew member's DM session the way
`kirocrew-dashboard` does: as a session-level `mcpServers` entry carrying that
session's identity (`members.member_panel_session_server`), plus
Expand Down
2 changes: 1 addition & 1 deletion docs/feature-map/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ old `?tab=` links redirect there.
| Crash report notice | Desktop-only banner on the launch after a crash: a count of new own-app crash artifacts, **Show diagnostics** (reveals the crash ledger in the OS file manager), **Report issue** (opens the shared Report a Problem dialog with the crash count in its note) and dismiss | Appears automatically on the next launch after a desktop crash — no navigation | `components/CrashReportNotice.tsx` (mounted app-wide in `App.tsx`), `components/ReportProblemModal.tsx` | `website/electron/crash-collector.js`, `website/electron/ipc-registrar.js`, `website/electron/preload.js` (`crashReportsAPI`); `diagnostics.py` for the report | IPC for the banner: `crash-reports:get`, `crash-reports:reveal`; HTTP for the report: `POST /api/diagnostics/collect` |
| Startup feature video | One short clip introducing a new feature, shown once on the launch after it ships and retired permanently by a `seen` or `dismissed` verdict; yields the whole launch to release notes, an update popup or first-run onboarding, and is skipped in incognito/temporary sessions. A clip is always played from disk -- the release folder for a downloaded one, the shipped assets for a built-in one -- and never streamed from the CDN: the browser only plays bytes the gateway downloaded and sha256-checked first, so an uncached hosted clip waits for the next launch. Every offer's files were proved on disk by the request that offered it, so the dialog opens on the `/next` answer alone | Appears by itself at startup, with no navigation, on the first launch where nothing else claimed the screen and the catalog still has an entry this install has not used | `components/StartupVideoModal.tsx`, `components/startupVideoGate.ts` (sequencing policy), mounted app-wide through `shell/boot/startupVideo.tsx` | `feature_videos.py`, `feature_videos_manifest.py` (signed hosted catalog), `feature_videos_cache.py` (local clip cache + serving) | `GET /api/feature-videos/next`, `POST /api/feature-videos/feedback`, `GET /feature-videos/<release>/<file>` |
| UI guides | An agent offers the owner a pointer through a REGISTERED dashboard action (`settings.show`, `crewmate.create`, `mcp.open_add`, `ui.show` — point at one indexed UI location by its id and walk its stored plan, including the reveal and list-`pick` steps that open a panel or wait for the owner to choose a session/artifact/app/job/crewmate — and `ui.find` — point at a control by its on-screen name on one page); the tab highlights the target and the owner makes the change with the page's own controls. A `crewmate.create` step completes only from the success response of the owner's own `POST /api/agents`, never from a client claim. Served by the `kirocrew-guide` MCP server, a platform capability every mate and dashboard session mounts | No page of its own: the offer (title, Dismiss, Start) is a row of the offering slot's conversation, at the point the agent offered it (a `card` transcript row the gateway writes), waiting there when another slot is viewed and collapsing in place to a result line once the guide ends (a completed show-me guide's line offers Show again, which replays it from the first step; a guide that saved a change does not); the walk-through is a floating pill and arrow over the page the action names | `guide/GuideOfferCard.tsx` (drawn by `cards/ConversationCard.tsx` from `pages/chat/transcriptRenderers.tsx`), `guide/GuideLayer.tsx`, `guide/GuideContext.tsx` (mounted in `App.tsx`), `guide/guideActions.ts`, `guide/useGuideStepTracker.ts`, `guide/liveRegistry.ts`, `guide/GuideRevealScope.tsx`, `guide/liveObservation.ts`, `api/guide.ts`, `hooks/useSettingHighlight.ts`, `hooks/useWebSocket.ts` (`guide_update` frame) | `handlers/guide.py`, `dashboard/guide_runs.py`, `dashboard/guide_observe.py`, `dashboard/chat_cards.py` (the conversation row and the `guide/*` crew-log entries), `guide_catalog.py`, `mcp_guide.py`, `handlers/agents.py` (`run_guided_crewmate_create` around `POST /api/agents`) | agent half (MCP-only, strict-internal): `GET /api/guide/agent/actions`, `POST /api/guide/agent/start`, `GET /api/guide/agent/status`, `POST /api/guide/agent/cancel`, `POST /api/guide/agent/observe`, `GET /api/guide/agent/language`; browser half (owner-only): `GET /api/guide/pending`, `POST /api/guide/claim`, `POST /api/guide/progress`, `POST /api/guide/heartbeat`, `POST /api/guide/cancel`, `POST /api/guide/dismiss`, `POST /api/guide/replay`, `POST /api/guide/refuse`, `POST /api/guide/replan`, `POST /api/guide/observe`; the `guide_update` and `guide_observe` WS frames |
| Change cards | An agent proposes ONE registered change (setting, schedule, mate, capabilities, template, MCP server, connection, secret, app trust, denied-command rule) and the chat shows a fixed card: what changes (gateway-written), the proposer's reason under its own name (the mate's display name, or Kiro Crew outside a mate chat), the computed risk (a widening needs a checkbox), editable fields that re-preview. The owner's click sends the exact plan to the existing settings route; the card collapses to a result line with Details / Undo. Secrets are typed into the card and sent only to the vault route. Nothing automated can confirm a card; owner changes through those routes, card or manual, become names-only Global memory events | The proposing chat, as a row of the conversation at the point the agent proposed it (a `card` transcript row the gateway writes); it updates in place and, once finished, stays there as its one-line result, after a reload too | `cards/` (`ConversationCard.tsx`, `ChangeCard.tsx`, `CardResultLine.tsx`, `cardRegistry.ts`), `api/cards.ts`, `pages/chat/transcriptRenderers.tsx`, `hooks/useWebSocket.ts` (`card_update` frame) | `handlers/change_cards.py` (routes + the card hook on the existing settings routes), `dashboard/change_cards.py` (store), `dashboard/change_cards_readers.py` (state readers), `dashboard/change_cards_settings.py` (setting lookup and diagnosis), `dashboard/chat_cards.py` (the conversation row and the `card/*` crew-log entries), `change_card_catalog.py`, `mcp_guide.py` (`list_change_kinds`, `find_setting`, `get_member_capabilities`, `diagnose_settings`, `propose_change`, `get_change_status`), `context_blocks.py` (`[CHANGE CARD RESULTS]`) | agent half (MCP-only, strict-internal): `GET /api/cards/agent/kinds`, `GET /api/cards/agent/settings`, `GET /api/cards/agent/capabilities`, `GET /api/cards/agent/diagnose`, `POST /api/cards/agent/propose`, `GET /api/cards/agent/status`; browser half (owner-only): `GET /api/cards/pending`, `POST /api/cards/{id}/preview`, `POST /api/cards/{id}/cancel`, `POST /api/cards/{id}/dismiss`; apply/undo ride the existing routes with `X-Card-Id`/`-Revision`/`-Op`/`-Step`; the `card_update` WS frame |
| Change cards | An agent proposes ONE registered change (setting, schedule, mate, capabilities, template, MCP server, connection, secret, app trust, denied-command rule) and the chat shows a fixed card: what changes (gateway-written), the proposer's reason under its own name (the mate's display name, or Kiro Crew outside a mate chat), the computed risk (a widening needs a checkbox), editable fields that re-preview. The owner's click sends the exact plan to the existing settings route; the card collapses to a result line with Details / Undo. Secrets are typed into the card and sent only to the vault route. Nothing automated can confirm a card; owner changes through those routes, card or manual, become names-only Global memory events | The proposing chat, as a row of the conversation at the point the agent proposed it (a `card` transcript row the gateway writes); it updates in place and, once finished, stays there as its one-line result, after a reload too | `cards/` (`ConversationCard.tsx`, `ChangeCard.tsx`, `CardResultLine.tsx`, `cardRegistry.ts`), `api/cards.ts`, `pages/chat/transcriptRenderers.tsx`, `hooks/useWebSocket.ts` (`card_update` frame) | `handlers/change_cards.py` (routes + the card hook on the existing settings routes), `dashboard/change_cards.py` (store), `dashboard/change_cards_readers.py` (state readers), `dashboard/change_cards_settings.py` (setting lookup and diagnosis), `dashboard/chat_cards.py` (the conversation row and the `card/*` crew-log entries), `change_card_catalog.py` (evidence, undo, results), `change_card_catalog_kinds.py` (kinds and parameter validation), `change_card_catalog_plans.py` (plans and previews), `mcp_guide.py` (`list_change_kinds`, `find_setting`, `get_member_capabilities`, `diagnose_settings`, `propose_change`, `get_change_status`), `context_blocks.py` (`[CHANGE CARD RESULTS]`) | agent half (MCP-only, strict-internal): `GET /api/cards/agent/kinds`, `GET /api/cards/agent/settings`, `GET /api/cards/agent/capabilities`, `GET /api/cards/agent/diagnose`, `POST /api/cards/agent/propose`, `GET /api/cards/agent/status`; browser half (owner-only): `GET /api/cards/pending`, `POST /api/cards/{id}/preview`, `POST /api/cards/{id}/cancel`, `POST /api/cards/{id}/dismiss`; apply/undo ride the existing routes with `X-Card-Id`/`-Revision`/`-Op`/`-Step`; the `card_update` WS frame |
| Feature-video cache readout | How much of the current release's clips is on disk, which one is downloading, and one control to fetch them all now. Read-only apart from that control; the control is absent when policy forbids downloads, and the whole row is absent on a gateway whose `status` predates the cache fields | `/settings/chat/discovery`, beside Feature Tips | `pages/settings/ChatPanel.tsx`, `pages/settings/useChatPanelDashboard.ts` | `feature_videos.py`, `feature_videos_cache.py` | `GET /api/feature-videos/status`, `POST /api/feature-videos/fetch-all` |
| OpenAI-compatible API | Chat-completions shim for external clients | External clients only | — | `openai_compat.py` | `POST /v1/chat/completions` |

Expand Down
4 changes: 2 additions & 2 deletions docs/request-for-change/rfc-crewmate-share.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ A bundle carries the crewmate's shape: name, description, avatar, rules, skill r
- **There is no one-crewmate export.** `GET /api/portability/export` (`create_export_zip` in `portability_stream.py`, route in `dashboard/routes/taskrunner.py`) writes the whole install. Its Merge import installs `config.json` only when absent (`_merge_settings` in `portability.py`), so it cannot add one crewmate to a running install.
- **Template bundling exists inside that zip and is the closest reusable piece.** `placeholder_mcp_values` (`portability_templates.py`) replaces every MCP `env`, `headers` and `oauth.clientSecret` value with a placeholder and keeps the keys. `_install_agent_templates` (`portability_templates.py`) writes each template with `O_EXCL` and runs `sanitize_agent_config_governance` (`portability_templates.py`) so `allowedTools` and `autoApprove` are cut to this host's ceiling.
- **Apps cannot create a crewmate.** `POST /api/agents` runs `_require_owner(request, "agent.create")` (`_api_kirocrew_agents_create` in `dashboard/agent_admin/crew_records.py`). The template read `GET /api/agents/detail/{name}` is also owner-only (`api_agent_detail` in `dashboard/agent_admin/agent_detail.py`). An App Kit manifest can register namespaced agent templates, skills and crons (`docs/app-kit/manifest-reference.md`, `_register_agents` in `apps/bridges_agents.py`), never a crew record.
- **An owner-press path for creating a crewmate already exists for agents.** The change-card kind `crewmate.create` (`KIND_CREWMATE_CREATE` in `change_card_catalog.py`) builds a plan against the owner routes `POST /api/agents` and `PUT /api/members/{slug}/goals/long-term` (`build_preview` in `change_card_catalog.py`). `change_card_middleware` refuses an app token, an internal-secret caller or an agent on those routes (`dashboard/handlers/change_cards.py` module docstring; route set `HOOKED_ROUTES`, `change_card_catalog.py`). The guide action `crewmate.create` (`guide_catalog.py`) follows the same rule: "The crewmate is created only by the human's own click on the existing owner-only `POST /api/agents`."
- **An owner-press path for creating a crewmate already exists for agents.** The change-card kind `crewmate.create` (`KIND_CREWMATE_CREATE` in `change_card_catalog_kinds.py`) builds a plan against the owner routes `POST /api/agents` and `PUT /api/members/{slug}/goals/long-term` (`build_preview` in `change_card_catalog_plans.py`). `change_card_middleware` refuses an app token, an internal-secret caller or an agent on those routes (`dashboard/handlers/change_cards.py` module docstring; route set `HOOKED_ROUTES`, `change_card_catalog.py`). The guide action `crewmate.create` (`guide_catalog.py`) follows the same rule: "The crewmate is created only by the human's own click on the existing owner-only `POST /api/agents`."
- **No MCP tool or App SDK call exports or imports a crewmate.**

### Problems
Expand Down Expand Up @@ -175,7 +175,7 @@ The card shows:

Risk is computed from the diff, as for every card. An MCP server with a local `command` is `code_exec`, because it runs on the receiver's machine.

The press applies an ordered plan through existing owner routes, the same way `crewmate.create` does (`build_preview` in `change_card_catalog.py`):
The press applies an ordered plan through existing owner routes, the same way `crewmate.create` does (`build_preview` in `change_card_catalog_plans.py`):

1. `POST /api/agents` creates the record with `approval_mode: "normal"` in the same write. The create path mints a fresh `member_id` (`memory_stores._allocate_member_id`), an empty memory store and its own workspace. The mode rides on the create because an unset mode resolves to `trust` (`MEMBER_APPROVAL_MODE_UNSET_EFFECTIVE` in `config/sections_agent_fields.py`), and `_api_kirocrew_agents_create` takes no `approval_mode`. Phase 1 adds that one optional create field, validated against `MEMBER_APPROVAL_MODES`. No imported crewmate exists for any moment in `trust`.
2. The mate-owned file `~/.kiro/mates/agents/<id>.json` receives the bundle's `mcpServers` and `skills` through the in-place edit path of the mate-owned config RFC (§5.4 there). `sanitize_agent_config_governance` runs on the way to disk.
Expand Down
Loading
Loading