Repository navigation
refactor: serve ops_mission_control_api from the app's agentTools seam - #33542
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: this follows the Notes
[DESIGN-REVIEWED] a83c5d3 Description read[DESCRIPTION-READ] d24d923077b40315de5730757b981a1f42c68f6c6d33c633676d462cc7bbc33a That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS This moves the tool out of core to satisfy the documented no-built-in-apps rule, and agent behaviour stays the same. One allowlist is now written down twice inside the app. Notes
What this change shipsInventory (7 items) — 6 justifiedIntent: let Ops Mission Control serve its own agent tool so that no core table names the app (campaign #26967). This is a refactor: the item moves and nothing new is added.
[FIRST-PRINCIPLES-REVIEWED] a83c5d3 Description read[DESCRIPTION-READ] e880f42d81fb0d5be28f3b13e853f14a87225ca9e525ece224c56304e564fd4b That sha256 names the PR description this verdict read. Recompute it with |
Sensitive Change ReviewSensitive files changed:
|
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
5703c3b to
e317fa3
Compare
Sensitive change review
|
Ops Mission Control's ops_mission_control_api tool ran in the core: a descriptor, handler and TOOL_APPS row in mcp_tools/apps.py, a schema and allowlist in validation_parts/app_schemas.py, exact internal-secret admission of the routes it reached, and a per-operation channel deny of POST /rotation/arm in channel.py and mcp_core_parts/governance.py. The app now declares the tool in its app.json agentTools block, with the same name, arguments, enums, bounds and result cap, and serves it at POST /agent-tools, registered with the route registry through backend.hooks.routes. That route holds the (method, path) allowlist, the query and body rules, the inbound scrub and the channel-agent hold of POST /rotation/arm, and answers an allowed call with the handler the app's own route serves. The core rows are deleted; it was the last tool of the hand-written apps MCP domain, so mcp_tools/apps.py and validation_parts/app_schemas.py go with it, as does mcp_core_parts/gateway.py's _redact_json_strings, whose only product caller was the deleted handler. The hold reads the forwarded X-Session-Key, which the kirocrew-core client sets from its lenient resolver; a new identity-topology test pins that it names every key the strict resolver names, so every call the core deny refused is still refused. Part of #26967.
e317fa3 to
a83c5d3
Compare
Sensitive change review
|
* test(dashboard): hold the refused taker's read until the close answers (#33511)
The taker's settle-wait clears as soon as the close's refused archive
retires its claim, so its read, refusal and retraction can all run
during the close's hand-over drain. When the retraction lands first the
close finds nobody standing and writes the closed marker itself, and
the test's check that the close left the marker owed fails. Park the
taker's prefetch on an event released after the close answers.
Co-authored-by: CrysisDeu <crysisdeu@users.noreply.github.com>
* fix: say the policy-floor pip upgrade runs from your own terminal (#33003)
When a plain pip install is below the policy minimum version, the
gateway's version-compliance log line gives the in-place upgrade and
the restart after it. An agent can read that log line, and both steps
are the user's to run: the upgrade replaces the package the running
gateway is loaded from, and the restart is refused to agents. Both
branches of the line (the signed-wheel command and the
verification-failure note) say to run them from your own
terminal, and a decision entry records the wording.
Closes #25156
* fix(kas): installer reads the effective route for the bundle hint (#33435)
The install report decided its closing advice from agent.kas_bundle alone, so
on a host with no kiro-cli (the flag off but the route resolving to the bundle
automatically) it told the user the bundle route was off and to turn it on,
while kirocrew doctor reported the bundle in use. Read the same predicate doctor
reads (kas_bundle.kas_route): print the turn-it-on hint only when the route is
genuinely the relay, and otherwise say Crew will use the engine.
Co-authored-by: kirocrew-agent <agent@kirocrew.local>
* feat: let an app read and clear its own bell notifications (#30911)
The sidebar badge counts an app's unacknowledged bell notes, but the
app could not list or acknowledge them, so its page could not explain
or clear the number. Add GET /api/notifications/own and POST
.../own/ack, scoped to the notes the host stamped with the caller's
app name: an app token is always its own app, and the owner's
dashboard names the app its page is showing. An ack goes through the
bell's own ack. An app reaches the routes through a permissions.api
grant. The app SDK gets useAppNotifications() returning items,
unread, ack and ackAll; ackAll acks each unread note it holds.
Closes #26412
* docs: shorten long comments in constants (#31540)
* docs: shorten long comments and docstrings in constants
Cut wordy comments and docstrings in constants.py to the lines that carry
the reason, restate a few history-worded notes as the current rule, and
drop two banner rule lines. Every unit, limit and protocol reason is
kept, and the sandbox, secret and redaction notes are untouched.
Comments and docstrings only: astcheck reports code-changed 0.
Refs #25195
* docs: say the channel prefix copy is pinned by a test
---------
Co-authored-by: zejiangg <zejiangg@amazon.com>
Co-authored-by: TestOptimizer <testoptimizer@users.noreply.github.com>
* fix(meetings): keep a quiet meeting on one transcription socket (#33516)
A meeting's stall watchdog treated 20 s without a server frame as a
wedged socket, but after `ready` the server sends a frame only on
speech or an error. A quiet room closed the socket, released the
microphone and opened both again every 20 to 25 s while the header
kept saying Live.
After `ready`, audio the socket keeps taking now counts as a sign of
life. Audio that backs up, or stops coming because the microphone went
away, still reconnects.
Part of #33304
* docs: record why unattended auto-approve skips the yolo deny (#33525)
The governance spec said config agent.approval_mode was "not reached"
by approval_modes, which read as an open gap. A maintainer decided it is
deliberate: cron auto, the spawn API's approval_mode field, subagent
spawn and config agent.approval_mode have no person to ask, so gating
them on a person's yolo switch would only refuse shipped defaults.
The spec now records that decision, what each entry point asks instead,
and that approval_modes is the single precedence point with the reserved
approval_mode ordinal subordinate to it.
Closes #8013
* feat(work-ledger): let a waiting worker say when it resumes (#33477)
A worker that stops until a known time had only a bare progress
report to say so, and fifteen minutes later its item read as stale,
so the Ultra Mode sidebar showed it as Stalled for as long as it
waited. A progress work_report now takes an optional wake_at (an
ISO-8601 time with a zone, at most a day ahead, per
rfc-work-report-wake-at). The quiet window is measured from it, so
the item is not stale before that time; it rides the work/recorded
entry and the work fold, which is what the sidebar and a rebuild
read. Every report replaces it, and a bad value is refused with its
own code before anything is written.
Closes #33302
* fix(diag): refuse nan and inf written as text in a snapshot window (#31529)
Recorder.query checked since, until, around and radius for nan and infinity only when they arrived as numbers. The debug snapshots route passes the raw query-string text, so since=nan or radius=inf parsed through float() unchecked. The query then returned an empty or whole-retention window, and the 200 reply held a bare NaN that is not valid JSON.
_parse_duration and _parse_instant now pass the value parsed from text through _finite as well. A non-finite value is refused with a ValueError that names the field, which the route answers as a 400.
Closes #31526
* feat(dashboard): word relay Crew rows from presence and show last seen (#33458)
A relay Crew row that can't be opened (its relay connection isn't
CONNECTED) read "offline" whatever the control plane said about it. A
Crew that still renews its lease but has its tunnel down, or one whose
heartbeat is late, looked the same as one that is switched off.
Such a row now takes its words from presence: "reconnecting" while the
host still renews its lease (CONNECTED or HEARTBEAT_LATE), "offline"
otherwise. When the control plane gives the Crew's last lease renewal,
the row adds "last seen" with a relative time, as Kiro Mobile does. A
connected row reads "online" as before.
The control plane client parses lastSeenAt where the answer is read. A
value that isn't a time between 2020 and five minutes ahead of this
clock is dropped, and only the last seen words are lost. The crews route
returns it as whole epoch seconds or null. The route's owner-only auth
is unchanged.
The comment on the list-before-mint call now gives only the reason that
holds: the list is the only source of the Crew's URL. The control plane
checks the grant itself.
Both new strings reuse each locale's existing wording for
"Reconnecting" and "Last seen". The list stays off by default behind
tunnel.relay_viewer_enabled.
* fix(a11y): keep focus on artifact sync buttons while they run (#33455)
The Snapshot to publish, Pull latest and Overwrite remote buttons on the
artifact detail page took a native disabled while their action ran. A
disabled button leaves the tab order, so pressing one from the keyboard
dropped focus to the page body until the action finished.
Each busy button now goes aria-disabled (and aria-busy) with a press guard
instead of native disabled, matching the remote artifacts Load more button.
It stays focusable, keeps the focus it held, ignores a second press while
busy, and keeps the same visual disabled styling.
Co-authored-by: kirocrew-agent <agent@kirocrew.local>
* fix(eventlog): skip an activity ts with no finite time instead of raising (#33508)
The member activity and roster projections read a record's `ts` with
`float(ts)` for any number. An int past float range raised
OverflowError, and `inf` or `nan` passed through as a time.
A legacy `activity.jsonl` row is folded into the member's event log on
`ensure`, so one such row made the fold raise after the row was
appended. Every later `ensure` for that member then raised too. An
`inf` row was served as a `ts` that strict JSON cannot encode.
A number with no finite float value is now an unreadable timestamp,
the same as a bad string: the activity view skips the row and the
roster leaves recency unchanged.
* fix(doctor): report an unreadable project_dir file instead of stopping the report (#33509)
* test: fold five same-body test groups into one parametrized test each (#33532)
Each pair checked one call with different data. One test now runs every case, and named_cases keeps each case id traceable to the test it came from. Seven change-card rows that were listed twice now run once.
Co-authored-by: zejiangg <zejiangg@amazon.com>
* fix(teams): keep a replayed message as text when the lease frees (#33534)
A message queued mid-turn is replayed with command reading off, so a
queued "/new" reaches the model as text. When the replay found the
session busy and the turn then ended before it could be queued or
steered, the busy path re-ran the message through handle_message
with its defaults, so command reading came back on and the "/new"
started a new conversation instead. Pass the replay's own flags to
that fallback.
* feat(meetings): export all outputs as one HTML bundle (#33505)
Add an "Export all outputs" item to the meeting More menu that saves every
enabled agent's output together as one self-contained HTML file, named after
the meeting title and date (<title>-<YYYY-MM-DD>.html). Same snapshot and
availability rules as the single exports; disabled only while no agent has
output. The existing single exports are unchanged.
Notes go in as their Markdown text, HTML-escaped in a <pre> (never raw HTML).
Each sketch rides in a sandboxed null-origin iframe srcdoc holding its own
single-export document (buildSketchExport: inlined Mermaid, frame CSP, model
scripts scrubbed), so a sketch is at least as isolated in the bundle as in its
own export and its scripts are never inlined onto the bundle page. An enabled
agent with no output is kept and marked.
One HTML file rather than a zip: the frontend ships no zip library, and the
save path hands a file to the gateway only on an Android in-app WebView, which
accepts text/html but not application/zip.
Adds the exportAll / exportAllNoOutput keys to every locale (en-XA regenerated)
and tests covering the bundle contents, note escaping, sketch isolation, and
the empty-agent marker.
Closes #32982
Co-authored-by: kirocrew-agent <agent@kirocrew.local>
* docs(model): shorten long comments and docstrings in model_registry (#33533)
Cut wordy comment blocks and docstrings to the rule and its reason, and drop history wording (a replaced temp-write helper, parity with an old scan). Comments and docstrings only; no code change.
Co-authored-by: zejiangg <zejiangg@amazon.com>
* fix: walk a shell command once per deny decision, not per floor (#32115)
One is_denied call asked for the same shell payload walk once per
floor, about ten times on a heredoc-fed script, and each walk read
every $( span twice to find its close. The walk now keeps its frames in
the per-call cache sharing_views already opens, so each distinct text
is walked once per decision, and the paren walk skips its second
${...}-aware pass when the span holds no "{", where both passes take
the same steps. Verdicts are unchanged; on the issue's reproducer an
8 KB heredoc goes from about 15 s to 1.7 s.
Builds on #14993 by @yiyabo.
Part of #13980
* fix(apps): reload an open app ui after install, update or sync (#33502)
An install, update or Sync replaced an app's files but told no open
dashboard, so a tab kept running the old UI module until a manual
reload, and reopening the app in the same tab returned the module the
page already held.
Every route that replaces an app's files now sends the app_reload
frame the dev-mode watcher sends, once, on success: the local install,
both branches of the update route, and both registry install routes.
A mounted AppHost already answers it with a window reload. A document
that imported the app's bundle and hears the frame while no host shows
the app records it, and the next host that mounts the app reloads the
window instead of importing the old module again. In its place the host shows a notice with a Reload page button, so a
reload that a page's unsaved-changes prompt cancels can be retried
instead of leaving an empty host. The host reads that record once
per bundle it loads, so an app already on screen stays there when its
reload is cancelled.
The boot-time adoption swap sends nothing: it runs before any route or
dashboard socket exists.
* fix(dashboard): reload the shell when a boot module fails to load (#33573)
One aborted request for the entry module or one of its static imports
kills the dashboard's whole module graph, and Chromium aborts in-flight
loads with ERR_NETWORK_CHANGED whenever a host network interface comes
or goes. On a first load nothing retried it: the service worker's retry
runs only for a page it already controls, and it registers after the
entry was requested. The page sat blank for about 4 s and then showed a
panel that did not say what failed to load.
Chromium keeps a failed fetch in the document's module map, so the same
URL inserted again, an entry under a fresh URL whose static import
failed, and a dynamic import all fail without a request. Only a new
document recovers, so the shell now reloads the page after a short
jittered delay, up to three times, when a boot module fails to load
before DOMContentLoaded on a top-level page. Each reload is counted in
sessionStorage before it is scheduled and nothing reloads when the
count cannot be kept; a load whose boot modules arrived clears it, and
so does the panel's own button.
Embedded panes keep posting mc-embedded-boot and never reload
themselves.
The panel stays the end state and now says "Kiro Crew did not load"
(the product name comes from the shell title, which an edition
rebrands) and offers "Clear cache and reload".
* test: check sent frames and kept records in new weak tests (#33588)
Seven tests added since a47c2d4eff only checked a mock's calls or
nothing at all. The live-context tests now read the frames a plain
recorder kept and the reading the turn stored; the retention tests
check which record ids are left on disk and what the long-key run
recorded.
Co-authored-by: zejiangg <zejiangg@amazon.com>
* test: fold six more same-body test groups and drop three exact copies (#33539)
Two Slack sender tables run as one test, the two refused-directory snapshot checks take each deny mode as a fixture parameter, and three tests that repeated another test's call and assertion word for word are removed. Every distinct case still runs.
Co-authored-by: zejiangg <zejiangg@amazon.com>
* test: drop restating comments in five test files (#33528)
Co-authored-by: zejiangg <zejiangg@amazon.com>
* fix(taskrunner): fail a step on its own failure report and tell its chat (#33459)
- Declared step status: a Task Runner step passed once its turn ended,
so a step that wrote "status": "failed" let the run go on. A YAML
agent may now declare status_file; "failed", missing, malformed or
refused by the guarded reader fails the step and its run with no
replan. The declaration round-trips through runs.json, plan_to_yaml
and plan edits, where it stays on its step, never its position.
- Run notices in their chat: runtime death and restart notices reached
only the bell, and the run's origin conversation was kept in memory
only. runs.json now carries it, the adoption sweep reports a resumed
run, and the notices also land in that dashboard tab and its
governed channel when the key still resolves.
Fixes #33412
* test: check listed rows in registry failure-window tests (#33552)
Four failure-window tests only counted fetch calls on a mock. Each now
also checks the rows the listing returns and the failed-fetch marker
state, so a wrong answer, not just a wrong call count, fails them.
Co-authored-by: zejiangg <zejiangg@amazon.com>
* fix(autonudge): let a re-arm replace a loop stopped on its cycle claim (#33473) (#33536)
interrupted_cycle and claim_unsaved are system-recorded stops but were missing
from _TERMINAL_BOUND_REASONS, so replace_stopped refused them as evidence and a
later reasonless pause relabelled them manual. Add both, name interrupted_cycle
as a constant, and stamp it at load only on a row the load stops itself so a
manual pause saved mid-delivery stays manual.
Co-authored-by: Zezhen Xu <zezhexu@amazon.com>
* refactor(chat): move crew steer out of chat_send.py under the line cap (#33545)
chat_send.py was 2,030 lines, over the 2,000-line cap, so the line-cap
gate failed every change that touched it (#32956). The Crew Mode person
steer -- whether a send is one, the queue-entry marker, and the hold on
a steer written into a running turn until the turn reads, requeues or
drops it -- moves verbatim into a new chat_api owner, crew_steer.py.
chat_handlers composes it like every other owner, so its functions
still run on the facade's globals and every caller is unchanged.
chat_send.py ends at 1,920 lines. Almost all of the rest is the one
send handler, which the path-keyed guards read in that file, so it
stays whole.
Two crew-steer test files read the moved names off the chat_send
owner. They now read them off the chat_handlers facade, where the
functions read them, so their _HELD_CREW_STEERS patch reaches the code
it isolates. The composition contract lists the new owner, and keeps an
owner with no coroutine out of the sync-io reach check, with a test
that it defines none.
* fix(chat): hold script crons to the creator fence and session-control switch on reset-conversation (#33571)
Co-authored-by: Zejiang Guo <zejiangg@amazon.com>
* fix(windows): skip fixed POSIX root bin dirs when building PATH on Windows (#33562)
Co-authored-by: Zejiang Guo <zejiangg@amazon.com>
* fix(windows): accept backslash separators in skill script sensitive-path scan (#33566)
Co-authored-by: Zejiang Guo <zejiangg@amazon.com>
* fix(windows): resolve deps-check tools from absolute PATH entries only (#33556)
On Windows shutil.which tries the current directory before PATH, even with path=. The demo-recording doctor and the auto-improvement deps check now ask only PATH's absolute entries (and which_any's fallback dirs) by full path there. POSIX behaviour is unchanged.
Co-authored-by: Zejiang Guo <zejiangg@amazon.com>
* fix(windows): refuse a directory junction while pinning git attributes (#33565)
Co-authored-by: Zejiang Guo <zejiangg@amazon.com>
* fix(windows): fold extended-length prefix in provider CLI workspace containment (#33564)
Co-authored-by: Zejiang Guo <zejiangg@amazon.com>
* fix(mcp-gateway): fold case when matching credential env names (#33555)
Windows env names are case-insensitive, so a declared ssh_auth_sock reaches a pooled backend as SSH_AUTH_SOCK. Match the scrub prefixes on the upper-cased name so the declared-env forwarder drops it like the upper-case form.
Co-authored-by: Zejiang Guo <zejiangg@amazon.com>
* feat(approval): conductor sends to and closes its own children without a prompt (#33373)
Implements rfc-conductor-own-child-verbs.md (#33043).
- session_send and session_close from kirocrew-conductor and
kirocrew-team-lead are auto-approved only when the verified target is
a live session the caller created by vouched lineage. Any other target,
verb or agent still prompts. Deny rules and PreToolUse hooks run first;
the claude backend is excluded. Audit reason: conductor_own_child.
- New agent.conductor_own_child_verbs (default true, fails closed).
- Section 5.5: work_report joins _LEDGER_CONDUCTOR_WORK_GRANTS so a
nested conductor or team lead reports without a prompt.
- Skill and docs text updated.
Co-authored-by: Joe Guo <zejiangg@amazon.com>
* docs(agent_materialization): shorten long comments and docstrings (#33543)
* docs: trim wordy and history comments in agent_materialization/mcp_sources.py
Comment and docstring changes only; goal_scan.py astcheck reports code-changed 0.
* docs: trim wordy and stale comments in agent_materialization/mcp_aliases.py
---------
Co-authored-by: zejiangg <zejiangg@amazon.com>
* fix(subagent): price a start by its mcp roster and stagger boot wakes (#33484)
Each KAS session starts its own copy of every unpooled stdio MCP server
in the agent spec, but spawn admission priced a start at the default
roster's 1.0 GiB (2.0 GiB once learned), so a heavy roster was admitted
until the host ran out of memory. The start price now also counts the
spec's unpooled stdio servers (0.35 GiB + 0.13 GiB each), raising the
unlearned price and the learned-figure cap when that is larger. A
default roster projects under 1.0 GiB and prices as before. The roster
is re-read at most once a minute, in a worker thread on the event loop.
After a restart, every overdue loop woke at once and cold-started its
session together. Loops overdue at boot are now held 30 s apart by a
nap ahead of their own countdown, so those sessions start one at a
time. A work-ledger loop's boot replay is not held.
Co-authored-by: Zezhen Xu <zezhexu@amazon.com>
* fix: rescan agents once before refusing a template written after boot (#33524)
Writing an agent file by hand or with kiro-cli and then asking for it as a
template right away was refused: chat create and agent switch answered
409 agent_choice_unavailable and session_create answered
agent_unresolved, until something else rescanned the agents.
Chat create, agent switch and session_create now refresh the agent
snapshot once off the loop when a template or name-first pick misses,
and resolve again. A member pick never rescans. The refresh is memoized
on the agents directories, so a miss with nothing new on disk costs a
listing and a stat per spec. A name with no file is still refused.
Builds on #30047 by @mbriones98.
Closes #29800
Closes #30642
* fix(mcp): name a launch added beside an approved one as a new launch (#33551)
A changed_needs_reapproval refusal covered two cases under one label:
an approved launch that changed, and a second agent declaring the same
server its own way while the approved launch still runs. Both read
"Paused · command changed", and doctor said "command changed since it
was approved", although in the second case nothing approved changed.
The refusal already carries its live commands/envs and the approved
ones. When it is complete and every approved command/env display pair
is still live beside at least one that is not, the MCP Management chip
reads "Paused · new launch to approve", its Details line says the
approved launch did not change, and doctor names it "new launch not
approved yet". A real change, a partial refusal, one missing either
side, or one whose approved launch shows a redaction tag (two values
read as the same tag) keeps "command changed". The rule lives in
mcpManagementModel.ts and doctor_checks/mcp.py over the same
refused_servers() record; no reason code, store field or status field
is added. Approve update and the Details diff are unchanged.
refused_share_records() returns the record per configured share name
(alias-aware) so doctor can read it; refused_shares() keeps its shape.
* fix(dashboard): goal-board nests a child conductor's board under its task (#33541)
A worker that is itself a conductor records its workers on its own ledger,
so the parent's goal-board (which reads only the work fold) never showed
them. The page now also binds the workstreams fold and draws each
sub-board inside the card of the task it hangs under, nested again for a
deeper board. Manifest version 2 so adopted copies pick it up.
Fixes #33420
Co-authored-by: Zezhen Xu <zezhexu@amazon.com>
* docs: trim wordy comments in artifact_store rules, dashboard_package and folders (#33547)
Co-authored-by: zejiangg <zejiangg@amazon.com>
* feat(dashboard): add a List all tabs menu to three more tab strips (#25736)
The session, terminal and embedded-chat tab strips hide their
scrollbars and have no list of their tabs. The terminal and
embedded-chat strips also leave a tab off screen when it becomes
active, such as a new terminal or a tab the host switches to.
Add the side panel's List all tabs menu to each strip. Add
useRevealActiveTab, which scrolls the active tab into view, to the
terminal and embedded-chat strips. The session strip already did this.
While the gateway is offline, the session menu refuses a switch and
says why, as its tabs do.
The File Explorer strip is left out. It is an adopted app, so its change
belongs in the app's own repository.
* docs: shorten long comments in the context modules (#33587)
Co-authored-by: TestOptimizer <testoptimizer@users.noreply.github.com>
* fix(platform): five browser harness, apparmor and scratch sweep fixes (#33386)
- Browser Install copies the lock's distributions from a runtime that
already ships browser-harness, cdp-use and fetch-use at the lock's
pins into a fresh venv in the sealed prefix (checked by the venv's
own interpreter), so a host with no reachable index or an expired
index login can still enable the browser, and a later edit or prune
of the runtime tree cannot change the driver. Other runtimes keep
the hash-pinned pip install.
- The harness installer sets PIP_CONFIG_FILE to the null device, so an
index-url in the owner's pip.conf (such as a private index whose
login expired) no longer answers 401 for every locked wheel; the
lock's hashes still pin every file.
- A finished harness venv whose base Python was pruned (as a runtime
manager does with old versions) is re-pointed at the gateway's
interpreter with venv --upgrade instead of cleared, so the repair
needs no index. A venv filled from a runtime copy is still rebuilt.
- service install attaches the kirocrew-userns AppArmor profile to
<parent>/crew-venv-*/bin/kirocrew for a managed-venv launcher, so the
profile stays attached after every update and the sandbox no longer
fails closed until service install is re-run.
- The hourly scratch sweep keeps a tree a live process still uses
through a scratch export, its cwd or an open descriptor, so a runtime
swap no longer deletes a surviving tool's TMPDIR under it.
Fixes #33342
* docs: shorten long comments in the probes package (#33591)
Co-authored-by: TestOptimizer <testoptimizer@users.noreply.github.com>
* fix(settings): name the desktop alert rows by when each one fires (#31744)
Settings > Notifications > Desktop alerts showed "System notifications",
"Show a banner for new notifications" and "Push notifications" side by
side, and a reader could not tell from the names which one fires when.
The OS-permission row now reads "System notifications when this window
is in the background", with a description that spells out what the
background means, and the banner switch reads "Show a banner while this
window is open". The push switch already says "Notify me even when Kiro
Crew is closed" and is unchanged.
The translations, the pseudolocale, the translator context, both
settings registries, the UI index and the notifications spec follow.
The banner switch's old deep-link id maps to its new one, so a saved
?highlight= link still lands on it.
Closes #25031
* feat(auto-improvement): ask an opt-in evidence checker before a keep (#32301)
An operator can name a project evidence checker in
candidateAdmissionCommand. Both keep paths ask it before the provisional
commit, and only a fresh, matching "admitted" answer lets the candidate
be kept; any other outcome records failed_verify. The checker runs in
the same sandbox as the target repository's tests, so it never has more
access than the code it judges. Unset, both tracks behave as before.
Builds on #28020 by @brentlee-personal.
Closes #28012
* fix(security): five hook, approval, floor and sandbox fixes (#33299)
Five independent fixes, grouped for one review:
- Reads mode stops asking to approve kiro-cli's built-in file read: a
trusted, kindless read of absolute, non-sensitive paths is approved.
- Refusing an unreadable MCP identity now steers a notice naming the
failed check, so the agent no longer reads it as a user rejection.
- The ssh-self floor no longer reads two adjacent glob words, such as
a cron schedule quoted in an MCP argument, as ssh to this host.
- The sandbox janitor removes a dead launcher's empty stage dir on a
hidepid host, so /run/user no longer runs out of inodes.
- max_memory_mb no longer sets RLIMIT_AS, which kept Node and GraalVM
tools in crons from starting; opt-in max_address_space_mb sets it.
* fix: list a folder project's own agents in its default agent picker (#32008)
The folder settings modal built its Default agent options from the
active chat's roster, and the agent catalog scoped project agents only
by the requesting chat. A folder's project directory is no chat's yet,
so the agents in its .kiro/agents were never offered.
The catalog now takes ?project_path= from the owner when the request
names no chat. The path goes through the shared file-path screen first,
so an untrusted UNC share is refused before anything resolves it, then
through the check a folder's project_dir gets on save; a path that
fails lists the global templates only. The modal reads the roster for
its typed or inherited directory once the path stops changing.
Closes #10106
* fix(cron): three cron workspace, member template and snapshot fixes (#33380)
- Cron tab workspace: a cron's dashboard tab was always made in the
default workspace, so a run whose agent is bound to another workspace
had every session_create refused with agent_workspace_mismatch. The
tab now follows its agent's workspace, before the run's turn starts.
- Member-named template schedules: a schedule whose create recorded a
crew member's name as a provider template kept running as a bare
template on the Global store, without the member's identity or
memory. The gateway now moves such owner schedules, and their session
record, onto the member once at start.
- Snapshot cron pruning: `kirocrew snapshot --keep N` run from a
command cron never pruned on macOS and dropped the team list on
Linux, because the sandbox masks crew-teams. A sandboxed run now
records the team list as masked, --keep prunes only bundles known to
lack the omitted paths, and a permission error ends as a refusal.
* test(boot): clear the recall settings memo between harness boots (#33628)
* fix(telemetry): date-filter metrics shards before the path gate (#33443)
Co-authored-by: kirocrew-agent <agent@kirocrew.local>
* fix(website): keep syntax colors when editing a code block (#33616)
A code block's scratch editor named its buffer after the fence tag
(`snippet.python`), and a language name is not a file extension, so
Pierre showed a ```python block as plain text once the pencil was
clicked. The editor now takes the fence tag as a highlight hint and
resolves it through fenceLanguage, the same table the read view uses.
The Files app shows a code file through this block, so its Edit view
loses the colors the same way. The Files app's height cap is fixed in
its own repository, KiroCrewCaptain/kirocrew-app-file-explorer.
Part of #30739
* fix(papyrus): retry a held clone publish instead of a false conflict (#33610)
Papyrus clones into a hidden staging folder and renames it into
place. On Windows that rename fails with "Access is denied" while any
process holds a file open in the fresh checkout, and clone() reported
every OSError from it as "a project with that name already exists",
deleting the finished clone.
The publish now goes through atomic_write.rename_with_retry, which
waits out a brief hold and never retries an occupied destination. An
occupied destination (EEXIST, ENOTEMPTY) keeps the conflict message;
any other failure says the clone could not be moved into place.
Closes #32682
* fix(test): set the store width before feeding narrow fake vectors (#33607)
Two tests give a 1024-wide store an 8-wide embed_fn without calling set_embedding_dim, which that method's docstring requires for a width change: test_v1_base_visible_matrix and test_healthy_embedder_embeds_every_row. Where faiss is installed, the write path adds an 8-wide vector to a 1024-wide index and faiss asserts. Without faiss the index step is skipped, so the main CI shards never see it.
Co-authored-by: zejiangg <zejiangg@amazon.com>
* fix(test): give the recycle-refusal test its own trust-root key (#33598)
test_a_proven_recycle_is_not_unverifiable needs a signed mapping, but only a SecurityEventLog creates the real key. It passed only when an earlier test on the same xdist worker had started the SEL, and read 'absent' otherwise. The test now writes its own key, as test_session_pid_sig.py's cfg fixture does.
Co-authored-by: zejiangg <zejiangg@amazon.com>
* fix(i18n): translate 324 English passthrough values in pt and es for Ops Mission Control (#26064)
* fix(i18n): translate 324 English passthrough values in pt and es for Ops Mission Control
The untranslated-passthrough report counts 192 values in pt and 193 in
es that are identical to English. The first batch (#25761) covers 26
of them outside apps.*. Ops Mission Control holds 158 in pt and 159 in
es, in the api, handoverPanel, incidentChat, opsMissionControlPage,
settingsPanel and signalsPanel groups: the verification outcomes, the
handover digest, the rotation and strict gating notes, the ledger
sharing settings, the notification channel help and the signals
explanations.
The plural-form keys that end in _many are translated as well, where
the detector does not list them: polled_summary_many in both languages
and one signals key in pt. That makes 162 values changed per language.
Two neighbouring values that the detector skips for being short are
translated too, because they are the tail of a sentence built from
several keys: "it last saw." and "Pushes stay refused until". Left in
English, those sentences would end in a different language.
Only values change. No key is added, removed or reordered, and the
placeholders ({{verb}}, {{count}}, {{sources}} and the like) and the
plural forms are kept. Fragments of one sentence keep their word order
so the pieces still join. Heartbeat, ledger file names, gh, git and
the mode names Observe, Propose and Act stay in English. Signal is
"sinal" in pt and "señal" in es, on call is "de plantão" and "de
guardia", poll is "consulta". The pt and es style guides apply: você
in pt, tuteo and neutral Latin American Spanish in es.
On this branch alone pt and es fall to 34 each in the report. With the
first batch they fall to 8 each, all under apps.designCritique.
Part of #25624
* fix(i18n): keep the noun before the who chip in the es/pt lenient roster warning
The settings panel renders <fragment> <who chip> <tail>, so the noun
'lista' belongs at the end of the first fragment, as in the strict pair.
Also write 'who:' in not_on_roster_lenient to match the strict text.
Raised by the Opus review on 1f93c5437.
---------
Co-authored-by: EC2 Default User <ec2-user@ip-172-31-10-71.ec2.internal>
* fix(apps): pin five adopted apps at their fix releases (#33620)
Move the adoption pins of personal-shopper, papyrus, file-explorer,
design-critique and pptx-maker to the app-repository main commits that
carry the fixes ported for #26967, so a host that adopts one runs the
fixed app. Each row is the output of scripts/adoption_pin.py compute and
the wheel built-in versions move with them, because a first-adoption pin
must equal the wheel version.
* fix: tighten a session id check (#33635)
A session id that the sub-agent result routes accept must name a folder
inside the sessions folder. One id shape passed the check yet named a
folder outside it on Windows; it is now refused on every platform, so
the routes answer 400 for it. Ids in use today keep working.
Closes #33291
* docs: bring the stated residuals of the command-text checks up to date (#33623)
The security spec's list of issues closed as stated residuals under the
#21682 decision was missing #18464 and #19291, which were closed under
it too. The cli spec's paragraph on the cron-trigger sender still
pointed at closed #23270 as an open question; it now points at the
maintainer decision on #23502 (Refs #26301). A test docstring still
said its known gaps were deferred to shell-parser work that #21682
declined, and named an internal ticket; both are corrected.
* refactor: serve ops_mission_control_api from the app's agentTools seam (#33542)
Ops Mission Control's ops_mission_control_api tool ran in the core: a
descriptor, handler and TOOL_APPS row in mcp_tools/apps.py, a schema
and allowlist in validation_parts/app_schemas.py, exact internal-secret
admission of the routes it reached, and a per-operation channel deny of
POST /rotation/arm in channel.py and mcp_core_parts/governance.py.
The app now declares the tool in its app.json agentTools block, with
the same name, arguments, enums, bounds and result cap, and serves it at
POST /agent-tools, registered with the route registry through
backend.hooks.routes. That route holds the (method, path) allowlist,
the query and body rules, the inbound scrub and the channel-agent hold
of POST /rotation/arm, and answers an allowed call with the handler the
app's own route serves. The core rows are deleted; it was the last tool
of the hand-written apps MCP domain, so mcp_tools/apps.py and
validation_parts/app_schemas.py go with it, as does
mcp_core_parts/gateway.py's _redact_json_strings, whose only product
caller was the deleted handler.
The hold reads the forwarded X-Session-Key, which the kirocrew-core
client sets from its lenient resolver; a new identity-topology test pins
that it names every key the strict resolver names, so every call the
core deny refused is still refused. Part of #26967.
* feat(bots): name the exact entries that keep a Bot on KAS (#33540)
When a Bot follows the Settings harness but its file sets something only
KAS carries, the bell now names each entry to change (switched-off tools,
excludedTools entries, hook events, permissions keys, toolsSettings tools,
Capabilities switched-off tools), capped at five with +N more, as escaped
inline code. The entries come from the same off-loop read that decides
the fallback. The Inherited hint points to the notifications.
Co-authored-by: Joe Guo <zejiangg@amazon.com>
* fix(dashboard): show the boot failure panel inside an embedded page (#33594)
An embedded page whose boot module failed only posted mc-embedded-boot
and painted nothing, so a host that ignores that message showed a blank
frame. It still posts the message, then reveals the shell's reload panel
after an 8s wait. The Kiro Crew host reloads the frame first and covers
it with an opaque overlay until ready, so it never sees the panel.
Co-authored-by: Joe Guo <zejiangg@amazon.com>
* fix(kas): send an allowedTools tool glob to KAS only when both read it alike (#33544)
Co-authored-by: zejiangg <zejiangg@amazon.com>
* fix(session-background): kill oversized and long-parked _bg runtimes (#32376)
A displaced _bg runtime that still reported a session was parked to drain
with no time limit and no cap, so a busy probe that never cleared kept a
multi-GB kiro-cli alive until the gateway restarted, and each replacement
grew and was parked in turn.
- A keyless runtime or client now starts in config_dir()/bg-runtime, an
empty folder, instead of the shared workspace folder, so the engine does
not index a large tree it never needed.
- A runtime stale by the new "handles" reason (Windows only: the root's
kernel HANDLE count past 50,000) is killed at once instead of parked.
"age" and "rss" still park a busy runtime: a healthy kiro-cli is above
the 500 MiB RSS threshold, so an RSS kill would end live turns.
- The drain reap kills a parked runtime once it has been parked 15 minutes,
even if it still reports busy, and keeps at most 2 parked: beyond that
it kills the oldest runtimes that are out of their spawn-identity grace.
A failed kill stays parked and is retried. Both kills end any turn
still running there and log the session count.
Related: #25770, kirodotdev/Kiro#12304
Fixes #30716
Co-authored-by: LuisBrel <193017400+LuisBrel@users.noreply.github.com>
* fix: wake a conductor only on a changed worker status; longer floor for a PR waiting on review (#33602)
Co-authored-by: Joe Guo <zejiangg@amazon.com>
* fix(dashboard): no false close-failed notice while a slow close is still saving (#33445)
* perf(dashboard): build the Older Sessions listing index in the background after bind (#29465)
The first GET /api/sessions after boot built the SessionListingIndex inside the
request, so it read every transcript's head (about 7.7 s at 33,000 transcripts).
At the same time the boot's search warm-up ran log.list_sessions(), a second full
head-read pass over the same directory.
The search supervisor that both entrypoints kick after the listener serves now
makes one pass on its worker thread: it builds the listing index first, through
getattr(log, "warm_listing_index", None), and warm_search then takes its search
scan window from list_sessions_indexed(). No new kick is added, so the dashboard
and API boot orders are unchanged. shutdown_event stops the build at its next
check, every 256 transcripts, and skips the search warm-up. The build is not
paced.
SessionListingIndex.warm() takes the index lock without waiting and returns False
when a listing holds it. A listing that arrives during the build waits on the lock
and then reads no transcript; the handler still awaits asyncio.to_thread(lister).
A build that stops or raises commits nothing: the rows, the build state and the
journal replay position stay as they were, and the next listing builds the index.
The replay position now moves only when a build commits. warm() logs one line with
its outcome, the transcripts it indexed and its wall time.
listing_row opened an untitled transcript twice on a cold read: once for the
metadata line, then again for the 21-line head scan. It now reads the head from
the handle it read the metadata line from, through _scan_head_lines, which
_scan_head_title also uses. The boot build over 1,500 transcripts drops from
2,500 opens to 1,500, and the direct scan gets the same saving. test/scale_budget's
scale-F10 budget now holds, so delete its strict xfail marker and MARKERS.md row.
* fix(crew-pause): keep resume-all hand-backs in the pause file across a restart (#33537)
Resume all dropped the pause record in one write and kept the stopped
members it still had to hand back only in memory, so a gateway restart
before the hand-backs finished lost them. Store them as 'resuming' in the
same write, hold them again on load, forget each member right after its
own hand-back, and hold the ones not handed back in the same write that
ends the Resume.
Fixes #33467
Co-authored-by: Zezhen Xu <zezhexu@amazon.com>
* fix(shared-crew): let a relay teammate read People, sessions and mode (#32953)
Co-authored-by: sim <a@b.c>
* fix(kas): run agent spec hooks on cron turns and name uncarried spec keys (#33189)
kiro-cli runs an agent spec's own hooks on every session. On KAS Crew
runs them in its place in dashboard chats, sub-agents, the task runner
and (since #33016) channel turns, but not on cron turns, so a spec
preToolUse guard never saw a cron job's tool calls.
A cron turn, single-agent and sequence, now reads its agent's spec hooks
through the channel seam (cron_service/turn_hooks.CronTurnHooks over
messaging/tool_hooks.ChannelTurnHooks):
- agentSpawn on a new session and userPromptSubmit on the job's prompt
go into the prompt's hook context; stop gets the redacted reply once
the turn lands. The Hooks page's hooks on those events stay off cron.
- on a gated turn each permission request asks the spec's own
PreToolUse hooks first (stream_and_collect(spec_hooks=...)), through
an empty store: a Hooks-page PreToolUse hook keeps its informational
fire and never refuses a cron call. Exit 2 or a policy refusal blocks;
a crashed hook lets the call run; an unreadable spec blocks. The
refusal does not count toward auto-pause.
- a cron turn does not re-project its KAS session. When the batch is
stale for the agent it runs, the turn runs none of the spec's hooks,
as before, and its result says so.
turn_spec_hooks now returns the spec keys nothing carries
(TurnSpecHooks.lost), read as the dashboard chat reads them. A cron
run's result (outside its dedup key) and a task step's notification
carry the dashboard's notice (spec_hooks.spec_keys_notice, moved from
the dashboard); a sub-agent's gateway log counts the keys.
Closes #33179
Co-authored-by: Joe Guo <zejiangg@amazon.com>
* docs: RFC for turning the batch write guard on by default (#33570)
Records the owner's decision that hooks.batch_write_guard defaults to true, with false as the opt-out. Lists the gaps from #32861 as known limits and the KAS sub-agent prompt cost.
Co-authored-by: Joe Guo <zejiangg@amazon.com>
* feat(lts): follow only the edition's own lts update channel (RFC D11) (#32882)
An LTS build followed stable, the oss channel, so a release pipeline that
ships the edition next to oss could not give it its own update files.
RFC D11 (owner, 2026-11-07): the edition follows only lts, on the desktop,
the wheel/CLI path and the dashboard switch; a policy updates.channel pin
no longer moves it; oss cannot pick or pin lts. Until the release legs
publish lts, no surface reads its feed or offers an installer command
cli.sh would refuse, and About says the channel has no builds yet.
Co-authored-by: Joe Guo <zejiangg@amazon.com>
* fix(website): re-measure the App chunk's bundle-size ceiling (#33665)
Pristine main fails its own Bundle Size Gate: the App chunk builds at
2,253,662 B, 862 B over the 2200 KB ceiling (main @ aab3c57e1c, CI run
actions/runs/42555400948; reproduced on f08ae0d08d). The growth since the
last re-measure is spread across ~750 commits, so restore the ~5%
convention: App: 2311 * KB.
Co-authored-by: Raymond Chen <raymondchen625@gmail.com>
* test: gate the slot-sweep invariants the folder and tag deletes rely on (#33643)
The folder and tag delete fix in #5933 rests on rules that only review
enforced. Add repo-wide AST gates over src/kiro_crew, each with a planted
violation that proves it fires: no await inside a loop over a live
_slots view (also a semgrep rule, so the SAST job flags it on the diff
that adds it), folder and tag store writes only through their commit
choke points, a census that stops force=True full saves from growing
until the merge-aware save lands, and no delete sweep drain outside its
cancellation capture. Every gate passes on main as it is.
Closes #26164
* test: probe codex's bubblewrap before its inner-sandbox steps (#33606)
Fork pull requests run Real Adapter Contract Tests on
kirocrew-linux-4-core. Crew's userns probe passes there, but codex's
bubblewrap is refused a step inside the namespace (RTM_NEWADDR on
loopback, or the uid map write), so the git and net-allow steps fail
the "sandbox ran" assertion on every such run while the fleet runner
passes.
_unprivileged_userns now also runs codex's own bubblewrap preflight
(bwrap --unshare-user --unshare-net --ro-bind / / /bin/true, with the
system bwrap or the one codex bundles) before any step. A host that
refuses loopback or uid-map setup takes the existing branch that
requires codex's fail-closed bwrap refusal. Any other preflight
outcome leaves Crew's probe standing, so a runner that can build the
sandbox still has to run each step. The decision never reads the
step's output, and no test skips. ci.yml is unchanged.
Fixes #33512
* fix(subagent): build result paths off the event loop (#33663)
Every subagent run start and every restart orphan notice built the
result.txt path a parent is told to read with agent_dir_for_display,
which resolves the run directory with two realpath calls. Both ran on
the gateway's event loop. On Windows realpath opens every path part, so
a busy disk can stall the loop until the watchdog ends the gateway, the
failure #31774 fixed for the task-queue settle.
Both sites now build the path with asyncio.to_thread. The path itself
is unchanged.
Closes #32069
* fix(gateway): print the dashboard login link only to a terminal (#33579)
A gateway under systemd, launchd, Docker or a detached spawn wrote its
startup dashboard link, ?token= included, to a kept log on every boot,
and again from the slow-browser auto-open fallback and from kirocrew
restart. Anyone reading that log inside the link's five minute window
could redeem it for a 20 hour dashboard session.
dashboard.urls.login_link_may_print() is true only when stdout is a
terminal, and all three prints ask it. Off a terminal the gateway
prints each URL without its query string plus a kirocrew token hint,
and restart mints no link. A terminal's output is unchanged, and
browser auto-open still receives the link.
* feat(workflows): remove a saved workflow from the library (#27528)
* feat(workflows): remove a saved workflow from the library
A saved workflow could only be removed by moving its JSON file out of the
library folder from a terminal, which also broke every draft and run
adapted from it ("workflow lineage does not resolve to a saved revision").
Removal is now a tombstone written under the library's cross-process lock,
onto every file that holds a live copy of the record, without re-running
the save-time source gate. A removed definition leaves list, search, slug
and id lookup, /workflow, workflow_library_list, saved runs and the
authoring examples, and still resolves by id for lineage, so adapted
drafts and runs keep saving. A revision is written to the file its
record was read from, so a save never replaces a tombstone of the same
id.
The id and the slug a record holds when it is removed are reserved for
good, whether a later ref matches as an id or as a slug; a slug given up
by an earlier rename is not covered (#23680). Every read by ref refuses
the id and the slug of a removed record before matching, and slug
allocation never hands out an id or slug on disk. One index per library
read decides which record each ref reaches, and every list offers a
record only under a ref that reaches it: a slug or id that a removed
record holds, or that another record answers to first, is not offered.
With neither reaching it, the library lists it as having no slash
command and every other list leaves it out.
One owner-only DELETE /api/workflows/definitions/{ref} route backs a
Remove action with a confirmation in Customize > Workflows. No agent, MCP
or CLI path can remove a saved workflow. Save and Remove send the id the
editor shows as expected_id; a ref that now resolves to a different
workflow answers 409, and nothing is written or removed.
Fixes #18998
* fix(workflows): reconcile a removal whose response was lost
A DELETE that committed but whose response never arrived (a transport
failure, or a 2xx whose body read was cut) rejected with no HTTP status,
and the tab rethrew it without reading the library again. The row then
left on the settle refresh while the tab still said the workflow was in
the library. A rejection with no status is now reconciled through the
same fresh read as a 404.
* fix(memory): skip an undecodable episodic vector instead of failing (#33645)
The FAISS rebuild and the promotion pass both read every stored
episodic vector. The rebuild decoded a blob before checking its width,
so a blob that is not a whole number of float32s raised and stopped the
whole rebuild, leaving the rows after it out of vector search. Promotion
clustering raised the same way on such a blob, and on two vectors of
different widths, so one odd row ended every promotion pass.
Check the rebuild's width on the bytes, as the episodic scoring set
already does, and have clustering leave a vector it cannot compare out
of every cluster. Every input that worked before gives the same result.
* fix(dashboard): keep a refused Shared Crew read quiet while it refetches (#33617)
Co-authored-by: sim <a@b.c>
* fix(subagent): keep a kept run whose state stamp is not a finite number (#33641)
After a restart the conversation registry is rebuilt from each kept
run's state.json, reading its age from `float(updated_at)`. A string
or an int past float range raised, so the run was skipped and its
conversation was never re-registered for the TTL sweep. `-inf` was
read as a time and aged the conversation past its TTL, so the first
sweep released it.
The stamp is now read through `_finite_time`, the reader the tombstone
code already uses, with `started` as the fallback; a stamp that is
not a finite number reads as age 0. `_finite_time` itself returns 0.0
for an int past float range instead of raising.
* fix(whatsapp): say why an image was not sent when its upload fails (#33646)
* fix(instances): accept only ASCII digits in an AWS region name (#33642)
* test: check sends, sessions and stderr in owner and lts weak tests (#33655)
Seven tests added since a47c2d4eff checked only a mock's await record
or nothing at all. The WeCom owner-notice tests now read the messages
a recorder kept; the LTS tests check the provider the factory built,
the cleared refusal record, and an empty stderr on the return path.
Co-authored-by: zejiangg <zejiangg@amazon.com>
* fix(session-storage): read a non-UTF-8 trash manifest as unreadable (#33647)
The trash manifest readers decode strictly, so a manifest holding bytes
that are not UTF-8 raised UnicodeDecodeError, which the OSError guard
does not cover. One such batch then failed the whole trash listing,
and a restore or an empty of it ended in an exception.
Both readers now return None for it, the "no readable manifest" answer
every caller already handles by withholding the batch and keeping its
files protected. The one call site that caught the error itself drops
its now-dead handler.
* chore(conductor): remove the unused patrol_budget tool and script (#33599)
A work-ledger patrol has no cycle cap since #33385 (rfc-permanent-patrol.md),
so nothing calls the patrol_budget check any more. Remove the kirocrew-work
tool, its schema, grants, batch-guard entry, channel block entry and the
goal-conductor script, and drop the mentions from the conductor prompt and
the goal-conductor / team-lead skills. The grant stays in the shipped-grant
history so an existing install drops it. The [patrol budget: ...] header
line stays: capped loops still show it.
Co-authored-by: Joe Guo <zejiangg@amazon.com>
* fix(telegram): keep a nul byte in a reply from breaking the render (#33649)
The Telegram renderer holds code spans and fences behind NUL<index>NUL
placeholders while it converts Markdown and strips horizontal rules.
Reply text that already carried that shape, such as tool output with
raw NUL bytes the agent echoed, was read back as a placeholder. An
index past the stash raised IndexError, which aborted the streamed
chunk or the final seal, and an index inside it copied a code span
into the wrong place.
Drop NUL from the text before stashing. Telegram shows no NUL, so the
reply looks the same. md_to_telegram_html_safe drops it before the
credential scan too, so a key a NUL cuts in two is rejoined before
the scan reads it, not after.
* feat(dev-fleet): create a worktree at the newest stable release (#33391)
Add an owner-only gateway action that creates release-channel-stable
as a sibling worktree detached at the newest published vX.Y.Z, so an
operator can pod it or make it live without finding the tag by hand.
The gateway asks the configured remote for the newest stable tag and
the commit it advertises, fetches only that tag's objects (it writes
no ref and no FETCH_HEAD), and runs git worktree add --detach at the
strict sandbox tier through handlers/worktree.py's runner, with hooks
turned off and a declared content filter refused. The local steps run
with ~/.aws, ~/.ssh and the vault bind-masked wherever an OS sandbox
backend runs them. The network steps run at the stricter of standard
and the install's agent.sandbox tier. The action adds no background
tag fetch, no pinned row and no prune-rule change: the tree is an
ordinary detached fleet row. The commit verify, the checkout and the
HEAD readback pass --no-replace-objects, so a refs/replace graft cannot
swap the checked-out tree for another while HEAD reads the advertised
oid. A release is a whole vX.Y.Z of ASCII digits with no leading zero;
every other v* name the remote lists is ignored, so none of them can
refuse the action or outrank the newest release. A partial clone is
refused before the fetch, because its checkout would fetch the
release's files itself, outside the action's one bounded fetch.
Every filesystem check the action makes runs off the event loop. A
request that a gateway restart cancels mid-checkout still writes its
SEL record, with outcome cancelled, because the checkout settles
first.
The toolbar keeps Prune merged as its one button beside a labelled
More actions menu; Refresh moves into that menu next to the new
"Create worktree from latest stable" item, so the row holds two
controls.
* fix(acp): read only a failed tool result as a gateway refusal (#33640)
The recovery ladder's first rung reads every tool result for the
gateway's capacity refusal and its recoverable markers, and a turn
whose last result matches is retried with a "lack of gateway
capacity" notice. A short result from a call that succeeded, such as
a search that prints "BackendGone" or "-32001", matched too, so a
normal turn was retried up to three times. The stub and the gateway
send a refusal as a JSON-RPC error, which the harness reports as a
failed call, so skip results that completed or are still streaming.
* fix(dashboard): portal the context-usage popover so the subagent bar cannot cover it (#31305)
* docs(rfc): drop the advisory goal item cap and its notice (#33584)
The goal's item_cap has refused nothing since #19338; it only sets
cap_exceeded and makes the conductor give a one-time notice tracked by
an item_cap_notice session-ledger artifact. The owner reports nobody
acts on it. Record the decision to remove item_cap, cap_exceeded and the
notice rule, keeping goal_items_used, created_total, concurrency_cap and
MAX_ITEMS_PER_CONDUCTOR. Supersedes rfc-conductor-item-total-notice and
amends rfc-work-ledger-concurrency-cap.
Co-authored-by: Joe Guo <zejiangg@amazon.com>
* docs: trim wordy and history comments in dashboard_templates (#33676)
Co-authored-by: zejiangg <zejiangg@amazon.com>
* docs(metrics): shorten long comments in sessions and turns (#33683)
Comment and docstring changes only; goal_scan.py astcheck reports code-changed 0.
Co-authored-by: zejiangg <zejiangg@amazon.com>
* fix(pptx-maker): repair an engine whose uv.lock was rewritten (#33679)
An install that hit #29225 keeps a marker that matches the pin and a
venv, so provisioning skipped both the fetch and the venv build and the
banner never offered it. `uv run --frozen` then installs the rewritten
lock exactly and the sdpm server still fails to start.
The engine now also counts as installed only while its mcp-local/uv.lock
hashes to the lock inside the pinned archive (ENGINE_LOCK_SHA256). A
drifted tree reads as not installed, so the banner offers provisioning
again and that run re-fetches the tree and rebuilds the venv with
`uv sync --frozen`.
Closes #31183
* feat(telemetry): tell users usage data is on in the Privacy chapter, with Keep on and Turn off (#22394)
* feat(telemetry): tell users usage data is on in the Privacy chapter, with Keep on and Turn off
The first-run Privacy chapter now says what is on (local recording, or
only the daily heartbeat), what is and is never collected and where it
goes, in every shipped locale, and offers Keep on and Turn off. Keep on
records the ack; Turn off writes telemetry.enabled and
telemetry.beacon_enabled false first, re-reads both effective states, and
only then records the ack; an env var or config.local.json that keeps
either on, or a failed write, keeps the chapter open with an error notice.
When usage data is already off it says so, with the reason and one
Continue.
dashboard.privacy_ack_version (int, server-seeded only) records that the
user was shown the text saying recording is on. An existing user with an
older version sees the chapter once at dashboard load while recording is
on, never mid-session. DO_NOT_TRACK turns off local recording and the
heartbeat. kirocrew telemetry enable/disable write both switches and the
notice version; status shows both. The recording default is unchanged.
* fix(telemetry): name the overlay on Turn off and keep the Privacy text true
Turn off sends both writes even when config.local.json owns a key: a 409
config_overlay_owned no longer ends in the generic save error, so the
read-back names the overlay, and the heartbeat write config.json accepts
still lands.
"Where it goes" now follows two separate facts while recording is on:
whether metrics also go to a configured export destination
(otlp_configured), and whether the heartbeat is sent. The unknown-status
text no longer promises local-only. kirocrew telemetry status says the
same, failing closed when the export posture cannot be resolved.
The "change this in Settings" line is hidden when DO_NOT_TRACK, an env
var or a policy keeps usage data off, since Settings cannot change it.
The off note no longer says nothing below is recorded: it names what
stopped (performance metrics, the heartbeat, install receipts) and says
the local usage and context records stay on the device, in every locale.
The chapter notices hand an error to the agent by hiding the chapter
without recording a choice, so the chat it opens is not covered; the
chapter returns at the next load. A failed Turn off says it could not be
finished or confirmed, claiming neither "off" nor "nothing changed".
---------
Co-authored-by: Raymond Chen <chenmingwei23@users.noreply.github.com>
* docs(rfc): design interactive actions for the notification bridge (B4) (#32917)
Design Phase B4 of the accepted Notification Bridge RFC: a return path so
the verified owner DM can approve/deny a bridged tool approval, answer an
ask_question card, and mute the source channel from the chat transport.
Build on the shipped seams rather than new ones. Identity: Slack binds its
owner through is_owner (it is deliberately absent from
CHANNEL_OWNER_DM_NAMESPACES, which derives from CHANNEL_SEND_NAMESPACES with
slack and unified removed), and every other transport must be in that tuple;
the read-only rule applies only to inference-based transports (WeCom,
weixin). Single-use and cross-transport idempotency rest on the underlying
decision future that turn_approvals.py cross-resolves. The Slack token is
the shipped slack/approval_tokens.py nonce token. ask_question resolves the
agent-ask card by ask_id (mcp_tools/control.py). The deny-rule override
stays dashboard-only.
Expiry has no single module constant: the Slack race waits on
DashboardState._APPROVAL_TIMEOUT / _BACKGROUND_APPROVAL_TIMEOUT_SECS and the
reply path on TEXT_APPROVAL_TIMEOUT_S, so B4a adds one clock seam that every
bridged-expiry path reads and the tests drive it, no sleeps.
A bridged affordance offers Approve and Deny only. TextReplyApprovalDecider
also maps trust/always/3 to a session-wide TRUST verdict; a bridged trust
reply is refused, pinned by a test. Trust from chat, if wanted, is its own
action for the maintainer.
B4p (producer before B4c): when the approval card opens,
permission_prompt.py publishes a bridge-only system.approval note behind the
default-off flag. Per the maintainer's Q7 answer the note does not ring the
dashboard bell (the bell keeps ringing only on expiry), pinned by a test
that the flag adds no bell entry.
Record the maintainer direction sign-off and the Q7 answer in Status and
decision; move status to accepted (direction) per the #33133 precedent.
Each phase still needs its normal review and the preview flag stays off
until B4h.
Tracking issue: #32902.
* fix(md-notebook): keep keyboard focus on busy Sync and Save buttons (#33451)
The MD Notebook Sync button and the Settings access-token Save button set
native disabled while their own request runs. A disabled button leaves the
tab order, so a keyboard user who presses one loses focus to the page body
until the request settles.
Use aria-disabled (plus aria-busy) and a busy guard in the click handler
instead of native disabled, matching the pattern the clone/attach button
already uses. Focus stays on the pressed button and a second press is
ignored while the first request is in flight. The muted look and cursor
stay in the existing inline styles; the Save button keeps its native
empty-field disable.
The two confirm-row buttons (remove-vault confirm, clear-token) unmount
when their request finishes, so they are left for a separate change.
Co-authored-by: kirocrew-agent <agent@kirocrew.local>
* test: count the ninth owner-marked pid reader in src (#33695)
The runtime liveness check reads its own root pid for the handle-count
probe and marks the site pid-owner-ok, like the RSS probe beside it.
The pinned owner-marked count still said 8, so the Static Ratchet Gate
fails on main. Pin it at 9.
* docs: record app children'…
Problem / Motivation
Goal: Ops Mission Control's
ops_mission_control_apiagent tool is declared and served by the app itself through the manifestagentToolsseam, under the same name, arguments and behaviour, so no core tool table namesops-mission-control.mcp_tools/apps.pydeclared, ran and mapped (TOOL_APPS)ops_mission_control_apiin thekirocrew-coreMCP server, with its allowlist and schema invalidation_parts/app_schemas.py, exact internal-secret admission of the ten routes it reached indashboard/server_internal_paths.py, and a per-operation channel deny ofPOST /rotation/arminchannel.pyandmcp_core_parts/governance.py. Ruling 2 of #26967 refuses app code in that server, and adoption's E10 (builtin_adoption_checks.core_named_apps) refuses an app while a core table keys a capability on it. It was the last tool in that domain: Issue Radar (#33156) and Dev Fleet (#33159) already moved theirs.Why it matters
Campaign #26967 moves every built-in out of core with no behaviour change for current users. This removes one of the two core tables that still name
ops-mission-control, so the app's agent surface lives in the app and is carried by the app repository's copy.Not a goal
ops-mission-controladoption pin. E10 still refuses it becausewebhook_sources.SOURCE_OPS_MISSION_CONTROLis a core governance id: whether an app may own its webhook source id is an open owner question, so this PR on its own does not unblock the pin.data/mcp_tool_titles.json. The chat's tool label and a remote session's whole-server grant read it by name.POST /rotation/armchannel hold are carried over as they were.What changed (motivation → approach → change)
Goal → serve the tool from the app, unchanged for an agent → declare it in
app.json, give the built-in one route-registry route that holds every rule the declaration cannot express, then delete the core rows.App (wheel copy,
src/kiro_crew/apps/builtins/ops_mission_control/):app.jsondeclares the tool inagentTools: the core descriptor's name, description, arguments and enums, plusmaxLength512 / 32,768 onquery/body_json(the bounds the core schema held) andmaxResultChars60,000 (the core cap).backend.hooks.routesnamesbackend/agent_tool_hook.py.agent_tool_hook.pyregistersPOST /agent-toolsalone with the route registry, behind_require_enabled. The built-in's other routes stay on the gateway router, which/api/app-tools/callnever dispatches to.http_routes/agent_tool.pyholds what the declaration cannot express: the exact(method, path)allowlist, a query only on GET with value-position characters only, a body only on POST and only a JSON object, the inbound scrub (routes._scrub_inbound: sanitizer, then redaction of every string), and the channel-agent hold. An allowed call is answered by the same handler the app's own route serves (routes._served_callover_AGENT_TOOL_HANDLERS), through anAgentCallview of the forwarded request.The channel hold reads the forwarded
X-Session-Key. For a tool not declaredstrictSession,kirocrew-coresets that header from its lenient resolver. Before relying on that, I compared it with the strict resolver the core deny used. Both try caller context, then the signed token, thenKIROCREW_SESSION_KEYbehind the samehost_pid_is_sharedguard. Then the strict one reads the MAC-verifiedsession_pid_<KIROCREW_HOST_PID>and the lenient one reads the same file first. So whenever the strict resolver names a channel agent, the header names the same key. A new test pins that across every strict source.Core removals: the descriptor, handler and
TOOL_APPSrow. That was the last tool of the hand-writtenappsdomain, somcp_tools/apps.pyis deleted together with itsDOMAIN_MODULESentry, itssecurity_posture.pyredactor-allowlist row andcore_named_apps's read ofTOOL_APPS. Also removed:validation_parts/app_schemas.py(it held nothing else) and its facade rows; the ten exact OMC paths in_MIXED_INTERNAL_API_PATHS;CHANNEL_AGENT_BLOCKED_DISPATCH_OPERATIONand the argument-aware branch of_deny_channel_agent_dispatch(itsmcp_core.pycaller now passes the name only);mcp_core_parts/gateway.py:_redact_json_strings, whose only product caller was the deleted handler (the app keeps its own copy behindroutes._scrub_inbound). Two comments that pointed at the deleted module (crew_log/entry_types_ledgers.py, Issue Radar'screw_ledger_spec.md) now point at Issue Radar's declaration.Adoption: the
ops-mission-controlpin stays blocked on its webhook source id, and the campaign driver's decision 2 on #26967 (comment 6729725443) keeps the app a wheel built-in for now, so it runs for every user exactly as today.Specs:
app-kit-platform.md§30.1,ops-mission-control.md(repository boundary, "The agent tool", layout),persistent-agent-channels.md,docs/architecture/mcp.md(themcp_core_partsowner table),security.md(thevalidation_partstable),mcp_tools/__init__.pyandapp_tools.pydocstrings.App repo: KiroCrewCaptain/kirocrew-app-ops-mission-control@fb85433
That commit carries the same declaration, allowlist, scrub and hold, ported onto the app repository's
hooks.routeshost. Its CI run 42478280591 is green on that SHA.Backwards compatibility
Compatible: the tool keeps its name, title, description, arguments, enums, bounds and result cap. Every call the core accepted is answered by the same route handler, and every call it refused is refused,
POST /rotation/armfrom a channel agent included. What differs is text and audit shape, and only for calls that fail anyway. A refusal comes back as the route's JSON body ({"ok": false, "code": ..., "error": ...}) instead of the core'sError:line. A cut answer ends… truncated (N chars total).without the core's narrowing hint. The channel hold writes the app'slog_api_accessrow (agent_tool,denied) instead of arejected_blocked_tooltool-invocation row.Reader: src/kiro_crew/apps/builtin_adoption_checks.py:core_named_apps (read mcp_tools.apps.TOOL_APPS) -- release -- now reads the webhook source ids and builtin service apps only; test_a_name_a_core_table_keys_on_is_refused keys on webhook_sources
Reader: src/kiro_crew/mcp_tools/init.py:DOMAIN_MODULES ("apps") -- chat|cron|subagent -- entry removed; test_mcp_tool_registry
Reader: src/kiro_crew/security_posture.py redactor allowlist ("mcp_tools/apps.py") -- release -- row removed; test_security_posture test_allowlist_has_no_stale_entries
Reader: tests that held apps.app_enabled_state open (test_mcp_tool_titles, test_mcp_discovery_agent_config, test_codex_session_mcp_tool_refusal) or read apps.TOOL_APPS (test_dev_fleet_pod_agent_api, issue_radar test_core_parity) -- release -- now check app_tools._core_tool_names() or drop the patch
Reader: src/kiro_crew/mcp_tools/apps.py:schemas/HANDLERS (ops_mission_control_api) -- chat|cron|subagent -- the name is listed and answered by the app_tools domain from the shipped manifest; test_agent_api_tool.py
Reader: src/kiro_crew/validation_parts/server_registries.py:MCP_CORE_SCHEMAS -- chat|cron|subagent -- mcp_core._validate_args falls through to app_tools.tool_schema; test_agent_api_tool.py
Reader: src/kiro_crew/validation.py:OPS_MISSION_CONTROL_ALLOWED_CALLS/_API_SCHEMA/OMC* -- release -- no reader outside tests; facade inventory and test_validation_parts_facade updated
Reader: src/kiro_crew/dashboard/server_internal_paths.py:_MIXED_INTERNAL_API_PATHS (/api/apps/ops-mission-control/*) -- app|cron -- the tool reaches the app through /api/app-tools/call and the route registry; the dashboard UI uses cookie auth; test_agent_api_tool.py pins that no route of this app is admitted to internal-secret callers
Reader: src/kiro_crew/channel.py:CHANNEL_AGENT_BLOCKED_DISPATCH_OPERATION, mcp_core_parts/governance.py:_deny_channel_agent_dispatch -- chat (channel agent) -- the hold is at the app route; test_agent_api_tool.py channel-hold tests and test_the_lenient_resolver_names_every_key_the_strict_one_names
Reader: src/kiro_crew/validation_parts/app_schemas.py (module) -- release -- deleted; validation facade _OWNERS updated, no other importer
Reader: src/kiro_crew/mcp_core_parts/gateway.py:_redact_json_strings (and its
mcp_coretype-only re-export) -- chat|cron|subagent -- no product caller after the handler's removal; the app's inbound scrub isroutes._scrub_inbound, pinned by test_agent_api_tool.pyReader: builtin skill ops-mission-control SOPs (call ops_mission_control_api) -- cron|chat -- name and arguments unchanged; test_sop_facts.py
Tests
src/kiro_crew/apps/builtins/ops_mission_control/tests/test_agent_api_tool.py: the declaration (validated, read as first party from the shippedapp.json, no core tool of that name, the title row, path enum equal to the allowlist, the bounds); every refusal lands before a handler runs; the inbound scrub reaches a ledger write; the channel hold refusesPOST /rotation/armand leaves the reads; every allowed call answers through the tool as its direct route does; the gateway's own path (field engine,/api/app-tools/call, a route registry loadingbackend.hooks.routesfrom the shipped root); no route of this app admitted to internal-secret callers.test_routes_composition_contract.py,test_sop_facts.py: the new seams and handler onroutes.test/test_identity_topology.py::test_the_lenient_resolver_names_every_key_the_strict_one_names: achannel:key from the token, the env var (sole tenant and unpublished) and the signed host-pid sidecar resolves to the same key under both resolvers.test/test_mcp_apps_tool_gate.py: deleted with the domain it tested; the same listing gate for manifest-declared tools stays pinned intest_app_agent_tools.py.test_dev_fleet_pod_agent_api.py, Issue Radar'stest_core_parity.py,test_mcp_tool_titles.py,test_mcp_discovery_agent_config.py,test_codex_session_mcp_tool_refusal.py: no longer import the deleted module.test/test_builtin_adoption_release.py: the core-table refusal is exercised on the webhook source table.test/test_core_ops_mission_control_decoupling.py,test_channel_blocked_tools.py,test_mcp_core_more_coverage.py,test_mcp_call_site_auth_coverage.py,test_remote_session_local_only_tools.py,test_validation_parts_facade.py: the removed core rows;test_mcp_core_more_coverage.pydrops the deleted gateway helper's test.Determinism:
test_agent_api_tool.pywith the new identity-topology test passes 5 serial repeats, 3 repeats at-n 4beside the wholetest_identity_topology.py, and a shuffled serial order (seed 33500);test/test_flake_pattern_ratchet.pyis green.Proof: not provable -- other: a move onto an existing seam, not a defect fix; reverting the production hunks deletes the route modules and fails the moved tests at import
Manual verification
N/A — the call is pinned through the real
/api/app-tools/callhandler and a real route registry loaded from the shipped hook; the route handlers themselves are unchanged and keep their own tests. Local gates on this head: black gate, subprocess-encoding, isort, flake8, mypy, comment-history, brand, line-cap, harness-parity, docs-lint and the flake-pattern ratchet all clean; every changed test file plus the Ops Mission Control and Issue Radar app suites, the App Kit, crew-log and docs tests, and themcp_corefacade, agent IPC client, security-posture and app-agent-tool tests pass (7,341 tests, 0 failures).Related Issues
Part of #26967
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)