Repository navigation
fix(kas): carry session identity to builtin app MCP servers - #28732
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS This fixes a reported KAS defect at the mechanism level. The one weak spot is a second element-builder that copies an existing one. Notes
What this change shipsInventory (5 items) — 3 justifiedIntent: make builtin app MCP tools (Mochi) work on the default KAS backend instead of refusing as
[FIRST-PRINCIPLES-REVIEWED] 860ea6b Description read[DESCRIPTION-READ] ff14094b6d72934603da06677ca9308d0beeb1486851c4b353f84078f34f7ece That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the fix reuses the token path the KAS backend already runs for the managed Notes
[DESIGN-REVIEWED] 860ea6b Description read[DESCRIPTION-READ] 13c2ebe0a38b6ccfaadebc07fc667fa22b75f643f6f2c7106a77e6d9ca8083bf 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 |
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: |
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: |
On the KAS backend every mochi:mochi tool refused as identity_unattestable. The kiro-cli path re-declares a builtin app server that runs Kiro Crew's own code with the signed session token (#19801), but KAS never reaches it, and the KAS hoist tokened only the managed kirocrew-* names, so the app server launched with no token. The KAS harness now resolves those app servers off the loop with the payload, and the hoist moves them to the session-level array, relaunched from the shipped manifest launch and stamped with the token. A server a settings file restricts, or every one when settings are unreadable, keeps its native declaration, the same verdict the kiro-cli mount reaches. The manifest's no-op disabled: false no longer keeps the entry out of the hoist. Fixes the KAS half of #19798.
309b1cd to
860ea6b
Compare
|
Dispositions for the review round on GPT 6.1 F1 (blocking): fixed. Mochi's shipped manifest declares First Principles item 5 (duplicate port check): fixed. First Principles item 6 (duplicate env-key tuple): fixed. One tuple, Design note 1 (two selection paths may drift): deferred. Both paths already call the same predicates ( Design note 2 (no live KAS check): acknowledged. Not run against a live KAS engine; the reporter will be asked to confirm Mochi tools stop refusing after merge. Affected suites: 1125 passed locally. |
|
Dispositions for the advisory notes on First Principles item 2 ( Design note 1 (live KAS verification): acknowledged. The reporter will be asked to confirm Mochi tools stop refusing after merge, before the KAS half of #19798 is called closed. Design note 2 (three inline token branches in the hoist): deferred. Two kinds exist today; extracting the name-to-builder choice is worth doing when a third appears. |
bolichen97
left a comment
There was a problem hiding this comment.
Approving at 860ea6b.
Read every hunk: the new kas_app_identity.py, the hoist changes in kas_agents.py, the SessionExtras field, both runtime call sites, the docs, and the new test file.
Token path check:
- The command, args and env of a tokened app element come from the shipped manifest launch alone (
tokened_app_element), so a spec entry that renames another program to the app server name never gets the token.test_a_hand_edited_launch_never_reaches_the_tokencovers it. - Only the gateway port and session key are kept from the projection, then the pinned
PYTHONPATHandKIROCREW_HOME. - A server a settings file restricts, or every server when a settings file cannot be read, keeps its native declaration with no token. A real restriction on the entry (
disabledTools: ["x"]) still keeps it out of the hoist; only the exact no-op values are dropped. - The port check now reuses
launch._well_formed_port, the same 1 to 65535 rule as before. - The resolver runs in the existing
session_extrasthread, so the hoist does no I/O on the loop.
Gates at this head: 0 checks failing, 0 pending, Design, First Principles, Opus and GPT lanes pass, readiness passed, mergeable, no open change requests. Auto-merge was already set by the author and is left as is.
Each main PR below was cherry-picked with -x in merge order, oldest first, then squashed (PR Hygiene allows two commits). - fix(hooks): give KAS-run agent spec hooks KIRO_SESSION_ID (#24952) (cherry picked from commit 3a46e60) adapted: 0.11.0's extra-hook branch keeps its from_spec line; the facade shape digest is re-measured. - fix(acp): send a KAS session the kiro-cli spelling of a stored model id (#25671) (cherry picked from commit 7df9837) adapted: three assertions on a pin-refusal field 0.11.0's handle lacks are left out of the test. - fix(kas): start Crew's own MCP servers first so session start does not wait behind slow user servers (#26148) (cherry picked from commit 429b4f7) adapted: 0.11.0 names the hoist hoist_managed_servers. - fix(acp): offer a KAS MCP sign-in only when the user names the server (#26481) (cherry picked from commit 2718088) adapted: the regenerate and chat-runner hunks keep 0.11.0's call shapes and add only this PR's lines. - fix(kas): start env-bearing MCP servers through a local launcher (#26785) (cherry picked from commit d6bb74f) adapted: hoist_managed_servers name; only this PR's handle field and agent_specs helper; the security line budget and the leaf-only population pin are re-measured for the kas-mcp-launch leaf. - fix(kas): refuse a blank kas remove --version instead of deleting every engine (#26623) (cherry picked from commit 2183c96) - fix(kas): read allowedCommands classes, groups and quoted parens like kiro-cli (#28437) (cherry picked from commit 3fc4217) adapted: agent-spec-fields.md keeps 0.11.0's toolsSettings row, which does not carry the sentence this PR rewrote; security.md moves. - fix(kas): split an authored rule's long match instead of refusing the block (#28510) (cherry picked from commit 60595c7) adapted: its agent-spec-fields.md sentence lands on 0.11.0's permissions row. - fix(kas): carry session identity to builtin app MCP servers (#28732) (ported by hand from commit 8e9701f) adapted: 0.11.0 has no managed-entry resolution or vault identity on SessionExtras, so the harness returns only the app launches beside the payload; hoist_managed_servers takes app_launches beside resume=; acp-client.md drops the managed-entry sentence 0.11.0 lacks. - fix(kas): relay a remote MCP server's headers through a local bridge (#28615) (cherry picked from commit 755c71b) adapted: its test calls 0.11.0's hoist_managed_servers.
Each main PR below was cherry-picked with -x in merge order, oldest first, then squashed (PR Hygiene allows two commits). - fix(hooks): give KAS-run agent spec hooks KIRO_SESSION_ID (#24952) (cherry picked from commit 3a46e60) adapted: 0.11.0's extra-hook branch keeps its from_spec line; the facade shape digest is re-measured. - fix(acp): send a KAS session the kiro-cli spelling of a stored model id (#25671) (cherry picked from commit 7df9837) adapted: three assertions on a pin-refusal field 0.11.0's handle lacks are left out of the test. - fix(kas): start Crew's own MCP servers first so session start does not wait behind slow user servers (#26148) (cherry picked from commit 429b4f7) adapted: 0.11.0 names the hoist hoist_managed_servers. - fix(acp): offer a KAS MCP sign-in only when the user names the server (#26481) (cherry picked from commit 2718088) adapted: the regenerate and chat-runner hunks keep 0.11.0's call shapes and add only this PR's lines. - fix(kas): start env-bearing MCP servers through a local launcher (#26785) (cherry picked from commit d6bb74f) adapted: hoist_managed_servers name; only this PR's handle field and agent_specs helper; the security line budget and the leaf-only population pin are re-measured for the kas-mcp-launch leaf. - fix(kas): refuse a blank kas remove --version instead of deleting every engine (#26623) (cherry picked from commit 2183c96) - fix(kas): read allowedCommands classes, groups and quoted parens like kiro-cli (#28437) (cherry picked from commit 3fc4217) adapted: agent-spec-fields.md keeps 0.11.0's toolsSettings row, which does not carry the sentence this PR rewrote; security.md moves. - fix(kas): split an authored rule's long match instead of refusing the block (#28510) (cherry picked from commit 60595c7) adapted: its agent-spec-fields.md sentence lands on 0.11.0's permissions row. - fix(kas): carry session identity to builtin app MCP servers (#28732) (ported by hand from commit 8e9701f) adapted: 0.11.0 has no managed-entry resolution or vault identity on SessionExtras, so the harness returns only the app launches beside the payload; hoist_managed_servers takes app_launches beside resume=; acp-client.md drops the managed-entry sentence 0.11.0 lacks. - fix(kas): relay a remote MCP server's headers through a local bridge (#28615) (cherry picked from commit 755c71b) adapted: its test calls 0.11.0's hoist_managed_servers. - feat(kas): keep remote MCP sign-ins across sessions by default (#28630) (cherry picked from commit 00dc406) adapted: cli_config.py takes only the ack helper and its call sites; configuration.md and the decisions index take only this PR's rows; the decision record names the shared-crew spec, absent on 0.11, without a backticked path so docs-lint passes.
Each main PR below was cherry-picked with -x in merge order, oldest first, then squashed (PR Hygiene allows two commits). - fix(hooks): give KAS-run agent spec hooks KIRO_SESSION_ID (#24952) (cherry picked from commit 3a46e60) adapted: 0.11.0's extra-hook branch keeps its from_spec line; the facade shape digest is re-measured. - fix(acp): send a KAS session the kiro-cli spelling of a stored model id (#25671) (cherry picked from commit 7df9837) adapted: three assertions on a pin-refusal field 0.11.0's handle lacks are left out of the test. - fix(kas): start Crew's own MCP servers first so session start does not wait behind slow user servers (#26148) (cherry picked from commit 429b4f7) adapted: 0.11.0 names the hoist hoist_managed_servers. - fix(acp): offer a KAS MCP sign-in only when the user names the server (#26481) (cherry picked from commit 2718088) adapted: the regenerate and chat-runner hunks keep 0.11.0's call shapes and add only this PR's lines. - fix(kas): start env-bearing MCP servers through a local launcher (#26785) (cherry picked from commit d6bb74f) adapted: hoist_managed_servers name; only this PR's handle field and agent_specs helper; the security line budget and the leaf-only population pin are re-measured for the kas-mcp-launch leaf. - fix(kas): refuse a blank kas remove --version instead of deleting every engine (#26623) (cherry picked from commit 2183c96) - fix(kas): read allowedCommands classes, groups and quoted parens like kiro-cli (#28437) (cherry picked from commit 3fc4217) adapted: agent-spec-fields.md keeps 0.11.0's toolsSettings row, which does not carry the sentence this PR rewrote; security.md moves. - fix(kas): split an authored rule's long match instead of refusing the block (#28510) (cherry picked from commit 60595c7) adapted: its agent-spec-fields.md sentence lands on 0.11.0's permissions row. - fix(kas): carry session identity to builtin app MCP servers (#28732) (ported by hand from commit 8e9701f) adapted: 0.11.0 has no managed-entry resolution or vault identity on SessionExtras, so the harness returns only the app launches beside the payload; hoist_managed_servers takes app_launches beside resume=; acp-client.md drops the managed-entry sentence 0.11.0 lacks. - fix(kas): relay a remote MCP server's headers through a local bridge (#28615) (cherry picked from commit 755c71b) adapted: its test calls 0.11.0's hoist_managed_servers. - fix(kas): mount use_subagent as the engine's invoke_sub_agent (#28852) (cherry picked from commit 83a76fc) - feat(kas): keep remote MCP sign-ins across sessions by default (#28630) (cherry picked from commit 00dc406) adapted: cli_config.py takes only the ack helper and its call sites; configuration.md and the decisions index take only this PR's rows; the decision record names the shared-crew spec, absent on 0.11, without a backticked path so docs-lint passes.
Each main PR below was cherry-picked with -x in merge order, oldest first, then squashed (PR Hygiene allows two commits). - fix(hooks): give KAS-run agent spec hooks KIRO_SESSION_ID (#24952) (cherry picked from commit 3a46e60) adapted: 0.11.0's extra-hook branch keeps its from_spec line; the facade shape digest is re-measured. - fix(acp): send a KAS session the kiro-cli spelling of a stored model id (#25671) (cherry picked from commit 7df9837) adapted: three assertions on a pin-refusal field 0.11.0's handle lacks are left out of the test. - fix(kas): start Crew's own MCP servers first so session start does not wait behind slow user servers (#26148) (cherry picked from commit 429b4f7) adapted: 0.11.0 names the hoist hoist_managed_servers. - fix(acp): offer a KAS MCP sign-in only when the user names the server (#26481) (cherry picked from commit 2718088) adapted: the regenerate and chat-runner hunks keep 0.11.0's call shapes and add only this PR's lines. - fix(kas): start env-bearing MCP servers through a local launcher (#26785) (cherry picked from commit d6bb74f) adapted: hoist_managed_servers name; only this PR's handle field and agent_specs helper; the security line budget and the leaf-only population pin are re-measured for the kas-mcp-launch leaf. - fix(kas): refuse a blank kas remove --version instead of deleting every engine (#26623) (cherry picked from commit 2183c96) - fix(kas): read allowedCommands classes, groups and quoted parens like kiro-cli (#28437) (cherry picked from commit 3fc4217) adapted: agent-spec-fields.md keeps 0.11.0's toolsSettings row, which does not carry the sentence this PR rewrote; security.md moves. - fix(kas): split an authored rule's long match instead of refusing the block (#28510) (cherry picked from commit 60595c7) adapted: its agent-spec-fields.md sentence lands on 0.11.0's permissions row. - fix(kas): carry session identity to builtin app MCP servers (#28732) (ported by hand from commit 8e9701f) adapted: 0.11.0 has no managed-entry resolution or vault identity on SessionExtras, so the harness returns only the app launches beside the payload; hoist_managed_servers takes app_launches beside resume=; acp-client.md drops the managed-entry sentence 0.11.0 lacks. - fix(kas): relay a remote MCP server's headers through a local bridge (#28615) (cherry picked from commit 755c71b) adapted: its test calls 0.11.0's hoist_managed_servers. - fix(kas): mount use_subagent as the engine's invoke_sub_agent (#28852) (cherry picked from commit 83a76fc) - feat(kas): keep remote MCP sign-ins across sessions by default (#28630) (cherry picked from commit 00dc406) adapted: cli_config.py takes only the ack helper and its call sites; configuration.md and the decisions index take only this PR's rows; the decision record names the shared-crew spec, absent on 0.11, without a backticked path so docs-lint passes. - fix(mcp): heal a saved absolute Windows command's PATHEXT extension (#25945) (cherry picked from commit a96eb1f) - fix(mcp): skip a non-UTF-8 mcp.json in discovery like bad JSON (#28795) (cherry picked from commit 2af230d) - fix(project-dir): treat an EPERM marker probe as absent so MCP start-up survives a masked mount (#28595) (cherry picked from commit 742ae56)
Each main PR below was cherry-picked with -x in merge order, oldest first, then squashed (PR Hygiene allows two commits). - fix(hooks): give KAS-run agent spec hooks KIRO_SESSION_ID (#24952) (cherry picked from commit 3a46e60) adapted: 0.11.0's extra-hook branch keeps its from_spec line; the facade shape digest is re-measured. - fix(acp): send a KAS session the kiro-cli spelling of a stored model id (#25671) (cherry picked from commit 7df9837) adapted: three assertions on a pin-refusal field 0.11.0's handle lacks are left out of the test. - fix(kas): start Crew's own MCP servers first so session start does not wait behind slow user servers (#26148) (cherry picked from commit 429b4f7) adapted: 0.11.0 names the hoist hoist_managed_servers. - fix(acp): offer a KAS MCP sign-in only when the user names the server (#26481) (cherry picked from commit 2718088) adapted: the regenerate and chat-runner hunks keep 0.11.0's call shapes and add only this PR's lines. - fix(kas): start env-bearing MCP servers through a local launcher (#26785) (cherry picked from commit d6bb74f) adapted: hoist_managed_servers name; only this PR's handle field and agent_specs helper; the security line budget and the leaf-only population pin are re-measured for the kas-mcp-launch leaf. - fix(kas): refuse a blank kas remove --version instead of deleting every engine (#26623) (cherry picked from commit 2183c96) - fix(kas): read allowedCommands classes, groups and quoted parens like kiro-cli (#28437) (cherry picked from commit 3fc4217) adapted: agent-spec-fields.md keeps 0.11.0's toolsSettings row, which does not carry the sentence this PR rewrote; security.md moves. - fix(kas): split an authored rule's long match instead of refusing the block (#28510) (cherry picked from commit 60595c7) adapted: its agent-spec-fields.md sentence lands on 0.11.0's permissions row. - fix(kas): carry session identity to builtin app MCP servers (#28732) (ported by hand from commit 8e9701f) adapted: 0.11.0 has no managed-entry resolution or vault identity on SessionExtras, so the harness returns only the app launches beside the payload; hoist_managed_servers takes app_launches beside resume=; acp-client.md drops the managed-entry sentence 0.11.0 lacks. - fix(kas): relay a remote MCP server's headers through a local bridge (#28615) (cherry picked from commit 755c71b) adapted: its test calls 0.11.0's hoist_managed_servers. - fix(kas): mount use_subagent as the engine's invoke_sub_agent (#28852) (cherry picked from commit 83a76fc) - feat(kas): keep remote MCP sign-ins across sessions by default (#28630) (cherry picked from commit 00dc406) adapted: cli_config.py takes only the ack helper and its call sites; configuration.md and the decisions index take only this PR's rows; the decision record names the shared-crew spec, absent on 0.11, without a backticked path so docs-lint passes. - fix(mcp): heal a saved absolute Windows command's PATHEXT extension (#25945) (cherry picked from commit a96eb1f) - fix(mcp): skip a non-UTF-8 mcp.json in discovery like bad JSON (#28795) (cherry picked from commit 2af230d) - fix(project-dir): treat an EPERM marker probe as absent so MCP start-up survives a masked mount (#28595) (cherry picked from commit 742ae56) - fix(kas): judge a remote-wrapper web search as its built-in (#28704) (cherry picked from commit 54f4e14) adapted: security.md gets this PR's one inserted clause on 0.11.0's wording of the same bullet.
Each main PR below was cherry-picked with -x in merge order, oldest first, then squashed (PR Hygiene allows two commits). - fix(hooks): give KAS-run agent spec hooks KIRO_SESSION_ID (#24952) (cherry picked from commit 3a46e60) adapted: 0.11.0's extra-hook branch keeps its from_spec line; the facade shape digest is re-measured. - fix(acp): send a KAS session the kiro-cli spelling of a stored model id (#25671) (cherry picked from commit 7df9837) adapted: three assertions on a pin-refusal field 0.11.0's handle lacks are left out of the test. - fix(kas): start Crew's own MCP servers first so session start does not wait behind slow user servers (#26148) (cherry picked from commit 429b4f7) adapted: 0.11.0 names the hoist hoist_managed_servers. - fix(acp): offer a KAS MCP sign-in only when the user names the server (#26481) (cherry picked from commit 2718088) adapted: the regenerate and chat-runner hunks keep 0.11.0's call shapes and add only this PR's lines. - fix(kas): start env-bearing MCP servers through a local launcher (#26785) (cherry picked from commit d6bb74f) adapted: hoist_managed_servers name; only this PR's handle field and agent_specs helper; the security line budget and the leaf-only population pin are re-measured for the kas-mcp-launch leaf. - fix(kas): refuse a blank kas remove --version instead of deleting every engine (#26623) (cherry picked from commit 2183c96) - fix(kas): read allowedCommands classes, groups and quoted parens like kiro-cli (#28437) (cherry picked from commit 3fc4217) adapted: agent-spec-fields.md keeps 0.11.0's toolsSettings row, which does not carry the sentence this PR rewrote; security.md moves. - fix(kas): split an authored rule's long match instead of refusing the block (#28510) (cherry picked from commit 60595c7) adapted: its agent-spec-fields.md sentence lands on 0.11.0's permissions row. - fix(kas): carry session identity to builtin app MCP servers (#28732) (ported by hand from commit 8e9701f) adapted: 0.11.0 has no managed-entry resolution or vault identity on SessionExtras, so the harness returns only the app launches beside the payload; hoist_managed_servers takes app_launches beside resume=; acp-client.md drops the managed-entry sentence 0.11.0 lacks. - fix(kas): relay a remote MCP server's headers through a local bridge (#28615) (cherry picked from commit 755c71b) adapted: its test calls 0.11.0's hoist_managed_servers. - fix(kas): mount use_subagent as the engine's invoke_sub_agent (#28852) (cherry picked from commit 83a76fc) - feat(kas): keep remote MCP sign-ins across sessions by default (#28630) (cherry picked from commit 00dc406) adapted: cli_config.py takes only the ack helper and its call sites; configuration.md and the decisions index take only this PR's rows; the decision record names the shared-crew spec, absent on 0.11, without a backticked path so docs-lint passes. - fix(mcp): heal a saved absolute Windows command's PATHEXT extension (#25945) (cherry picked from commit a96eb1f) - fix(mcp): skip a non-UTF-8 mcp.json in discovery like bad JSON (#28795) (cherry picked from commit 2af230d) - fix(project-dir): treat an EPERM marker probe as absent so MCP start-up survives a masked mount (#28595) (cherry picked from commit 742ae56) - fix(kas): judge a remote-wrapper web search as its built-in (#28704) (cherry picked from commit 54f4e14) adapted: security.md gets this PR's one inserted clause on 0.11.0's wording of the same bullet. - fix(dashboard): give every MCP handler error a stable code (#26661) (cherry picked from commit 14bd1a5) adapted: error-code-baseline.json regenerated with its generator on 0.11.0's tree (the same mcp.py entry drops as on main). - fix(mcp): refuse to replace an unparseable global mcp.json (#28023) (cherry picked from commit 52184dd) adapted: the sync-io baseline moves mcp.py 8 -> 6 as on main; learn-cron-dashboard.md gets this PR's inserted sentence on 0.11.0's wording; test_lenient_read_rewrite_ratchet.py, absent on 0.11.0, stays absent.
Each main PR below was cherry-picked with -x in merge order, oldest first, then squashed (PR Hygiene allows two commits). - fix(hooks): give KAS-run agent spec hooks KIRO_SESSION_ID (#24952) (cherry picked from commit 3a46e60) adapted: 0.11.0's extra-hook branch keeps its from_spec line; the facade shape digest is re-measured. - fix(acp): send a KAS session the kiro-cli spelling of a stored model id (#25671) (cherry picked from commit 7df9837) adapted: three assertions on a pin-refusal field 0.11.0's handle lacks are left out of the test. - fix(kas): start Crew's own MCP servers first so session start does not wait behind slow user servers (#26148) (cherry picked from commit 429b4f7) adapted: 0.11.0 names the hoist hoist_managed_servers. - fix(acp): offer a KAS MCP sign-in only when the user names the server (#26481) (cherry picked from commit 2718088) adapted: the regenerate and chat-runner hunks keep 0.11.0's call shapes and add only this PR's lines. - fix(kas): start env-bearing MCP servers through a local launcher (#26785) (cherry picked from commit d6bb74f) adapted: hoist_managed_servers name; only this PR's handle field and agent_specs helper; the security line budget and the leaf-only population pin are re-measured for the kas-mcp-launch leaf. - fix(kas): refuse a blank kas remove --version instead of deleting every engine (#26623) (cherry picked from commit 2183c96) - fix(kas): read allowedCommands classes, groups and quoted parens like kiro-cli (#28437) (cherry picked from commit 3fc4217) adapted: agent-spec-fields.md keeps 0.11.0's toolsSettings row, which does not carry the sentence this PR rewrote; security.md moves. - fix(kas): split an authored rule's long match instead of refusing the block (#28510) (cherry picked from commit 60595c7) adapted: its agent-spec-fields.md sentence lands on 0.11.0's permissions row. - fix(kas): carry session identity to builtin app MCP servers (#28732) (ported by hand from commit 8e9701f) adapted: 0.11.0 has no managed-entry resolution or vault identity on SessionExtras, so the harness returns only the app launches beside the payload; hoist_managed_servers takes app_launches beside resume=; acp-client.md drops the managed-entry sentence 0.11.0 lacks. - fix(kas): relay a remote MCP server's headers through a local bridge (#28615) (cherry picked from commit 755c71b) adapted: its test calls 0.11.0's hoist_managed_servers. - fix(kas): mount use_subagent as the engine's invoke_sub_agent (#28852) (cherry picked from commit 83a76fc) - feat(kas): keep remote MCP sign-ins across sessions by default (#28630) (cherry picked from commit 00dc406) adapted: cli_config.py takes only the ack helper and its call sites; configuration.md and the decisions index take only this PR's rows; the decision record names the shared-crew spec, absent on 0.11, without a backticked path so docs-lint passes. - fix(mcp): heal a saved absolute Windows command's PATHEXT extension (#25945) (cherry picked from commit a96eb1f) - fix(mcp): skip a non-UTF-8 mcp.json in discovery like bad JSON (#28795) (cherry picked from commit 2af230d) - fix(project-dir): treat an EPERM marker probe as absent so MCP start-up survives a masked mount (#28595) (cherry picked from commit 742ae56) - fix(kas): judge a remote-wrapper web search as its built-in (#28704) (cherry picked from commit 54f4e14) adapted: security.md gets this PR's one inserted clause on 0.11.0's wording of the same bullet. - fix(dashboard): give every MCP handler error a stable code (#26661) (cherry picked from commit 14bd1a5) adapted: error-code-baseline.json regenerated with its generator on 0.11.0's tree (the same mcp.py entry drops as on main). - fix(mcp): refuse to replace an unparseable global mcp.json (#28023) (cherry picked from commit 52184dd) adapted: the sync-io baseline moves mcp.py 8 -> 6 as on main; learn-cron-dashboard.md gets this PR's inserted sentence on 0.11.0's wording; test_lenient_read_rewrite_ratchet.py, absent on 0.11.0, stays absent. - fix(acp): remove a new KAS session's app launch snapshots at shutdown (#28954) (cherry picked from commit 1217a85) adapted: only this PR's launch_snapshots lines (request_identity is another PR's); 0.11.0's hoist_managed_servers name; the two test_runtime_bindings signature digests re-measured.
…28835) Each main PR below was cherry-picked with -x in merge order, oldest first, then squashed (PR Hygiene allows two commits). - fix(hooks): give KAS-run agent spec hooks KIRO_SESSION_ID (#24952) (cherry picked from commit 3a46e60) adapted: 0.11.0's extra-hook branch keeps its from_spec line; the facade shape digest is re-measured. - fix(acp): send a KAS session the kiro-cli spelling of a stored model id (#25671) (cherry picked from commit 7df9837) adapted: three assertions on a pin-refusal field 0.11.0's handle lacks are left out of the test. - fix(kas): start Crew's own MCP servers first so session start does not wait behind slow user servers (#26148) (cherry picked from commit 429b4f7) adapted: 0.11.0 names the hoist hoist_managed_servers. - fix(acp): offer a KAS MCP sign-in only when the user names the server (#26481) (cherry picked from commit 2718088) adapted: the regenerate and chat-runner hunks keep 0.11.0's call shapes and add only this PR's lines. - fix(kas): start env-bearing MCP servers through a local launcher (#26785) (cherry picked from commit d6bb74f) adapted: hoist_managed_servers name; only this PR's handle field and agent_specs helper; the security line budget and the leaf-only population pin are re-measured for the kas-mcp-launch leaf. - fix(kas): refuse a blank kas remove --version instead of deleting every engine (#26623) (cherry picked from commit 2183c96) - fix(kas): read allowedCommands classes, groups and quoted parens like kiro-cli (#28437) (cherry picked from commit 3fc4217) adapted: agent-spec-fields.md keeps 0.11.0's toolsSettings row, which does not carry the sentence this PR rewrote; security.md moves. - fix(kas): split an authored rule's long match instead of refusing the block (#28510) (cherry picked from commit 60595c7) adapted: its agent-spec-fields.md sentence lands on 0.11.0's permissions row. - fix(kas): carry session identity to builtin app MCP servers (#28732) (ported by hand from commit 8e9701f) adapted: 0.11.0 has no managed-entry resolution or vault identity on SessionExtras, so the harness returns only the app launches beside the payload; hoist_managed_servers takes app_launches beside resume=; acp-client.md drops the managed-entry sentence 0.11.0 lacks. - fix(kas): relay a remote MCP server's headers through a local bridge (#28615) (cherry picked from commit 755c71b) adapted: its test calls 0.11.0's hoist_managed_servers. - fix(kas): mount use_subagent as the engine's invoke_sub_agent (#28852) (cherry picked from commit 83a76fc) - feat(kas): keep remote MCP sign-ins across sessions by default (#28630) (cherry picked from commit 00dc406) adapted: cli_config.py takes only the ack helper and its call sites; configuration.md and the decisions index take only this PR's rows; the decision record names the shared-crew spec, absent on 0.11, without a backticked path so docs-lint passes. - fix(mcp): heal a saved absolute Windows command's PATHEXT extension (#25945) (cherry picked from commit a96eb1f) - fix(mcp): skip a non-UTF-8 mcp.json in discovery like bad JSON (#28795) (cherry picked from commit 2af230d) - fix(project-dir): treat an EPERM marker probe as absent so MCP start-up survives a masked mount (#28595) (cherry picked from commit 742ae56) - fix(kas): judge a remote-wrapper web search as its built-in (#28704) (cherry picked from commit 54f4e14) adapted: security.md gets this PR's one inserted clause on 0.11.0's wording of the same bullet. - fix(dashboard): give every MCP handler error a stable code (#26661) (cherry picked from commit 14bd1a5) adapted: error-code-baseline.json regenerated with its generator on 0.11.0's tree (the same mcp.py entry drops as on main). - fix(mcp): refuse to replace an unparseable global mcp.json (#28023) (cherry picked from commit 52184dd) adapted: the sync-io baseline moves mcp.py 8 -> 6 as on main; learn-cron-dashboard.md gets this PR's inserted sentence on 0.11.0's wording; test_lenient_read_rewrite_ratchet.py, absent on 0.11.0, stays absent. - fix(acp): remove a new KAS session's app launch snapshots at shutdown (#28954) (cherry picked from commit 1217a85) adapted: only this PR's launch_snapshots lines (request_identity is another PR's); 0.11.0's hoist_managed_servers name; the two test_runtime_bindings signature digests re-measured.
Every main PR the 0.11.2 backport carried that release/0.12.0 still lacks, plus #28925, cherry-picked with -x in main merge order, oldest first, then squashed (PR Hygiene allows two commits). Each pick's added and removed lines match its main commit except where noted. - fix(mcp): refuse to replace an unparseable global mcp.json (#28023) (cherry picked from commit 52184dd) conflict in surrounding lines only; the changed lines are main's. - fix(kas): read allowedCommands classes, groups and quoted parens like kiro-cli (#28437) (cherry picked from commit 3fc4217) conflict in surrounding lines only; the changed lines are main's. - feat(dashboard): answer /context, /usage, /help and /agent locally on KAS (#26681) (cherry picked from commit 84ea89d) - fix(mcp): skip a non-UTF-8 mcp.json in discovery like bad JSON (#28795) (cherry picked from commit 2af230d) - fix(kas): split an authored rule's long match instead of refusing the block (#28510) (cherry picked from commit 60595c7) - fix(kas): carry session identity to builtin app MCP servers (#28732) (cherry picked from commit 8e9701f) - fix(kas): relay a remote MCP server's headers through a local bridge (#28615) (cherry picked from commit 755c71b) - fix(kas): mount use_subagent as the engine's invoke_sub_agent (#28852) (cherry picked from commit 83a76fc) - feat(kas): keep remote MCP sign-ins across sessions by default (#28630) (cherry picked from commit 00dc406) conflict in surrounding lines only: docs/decisions/README.md and configuration.md lack neighbouring rows 0.12.0 does not carry. - fix(project-dir): treat an EPERM marker probe as absent so MCP start-up survives a masked mount (#28595) (cherry picked from commit 742ae56) - fix(kas): judge a remote-wrapper web search as its built-in (#28704) (cherry picked from commit 54f4e14) - fix(acp): remove a new KAS session's app launch snapshots at shutdown (#28954) (cherry picked from commit 1217a85) - fix: run spec hook commands longer than 4096 characters on kas (#28925) (cherry picked from commit 0fe72d6) adapted: agent-host-contract.md gets main's inserted sentence in 0.12.0's paragraph, which lacks main's later user-hook-files text.
Problem / Motivation
Goal: Builtin app MCP tools (Mochi's
mochi:mochi) work on the KAS backend instead of refusing every call asidentity_unattestable.A user on Windows (Toolbox 0.11.1.5, default KAS backend) reported in Slack (2026-11-02) that every Mochi tool fails with
identity_unattestable, and thatmochi:mochilaunches without the session token. #19798 reported the same symptom on kiro-cli; #19801 fixed it there only.Why it matters
KAS is the default backend, so every user of a builtin app MCP server is hit: every Mochi tool call fails, the pet never acts, and the background planner stalls on
get_watchlist.Not a goal
~/.kiro/crewwith another desktop shell pinning the app server to that build's interpreter: a separate launch-path question, not this token gap.release/0.11.0(it does not cherry-pick cleanly; see below).What changed (motivation → approach → change)
Symptom: on KAS,
mochi:mochirefuses every call asidentity_unattestable(mcp_shared_policy.py: no session token, no gateway-injected key).Root cause: #19801 re-declares a builtin app server that runs Kiro Crew's own code with the session token in
session_mcp.kiro_control_plane_servers, butruntime_session_setup._unpooled_control_planescalls it only whenacp_backend == kiro. On KAS the per-session carriage iskas_agents.hoist_servers_for_session, which tokens onlyMANAGED_MCP_SERVER_NAMES(kirocrew-*). So on KAS the app server stayed in the agent block (onsession/new) or was hoisted untokened (onsession/load).Change, following the same pattern the managed hoist uses:
acp/kas_app_identity.py(kas_agents.pyis near the line cap):resolve_app_identity_launchesruns in the KAS harness's off-loopsession_extrasthread, next toresolve_managed_entries. It takes the launch from the shipped manifest (session_mcp.builtin_app_identity_launches, the source fix(identity): carry session identity to builtin app MCP servers #19801 uses), never from the spec. A server a settings file restricts (native_mount_withholding, the predicate the kiro-cli mount uses) is left out, and every one is left out when a settings file is unreadable. A left-out server keeps its native declaration, as today.tokened_app_elementbuilds the session-level element: shipped command/args, env = projectedKIROCREW_PORT/KIROCREW_SESSION_KEY, the gateway's bound port, then the pinnedPYTHONPATH/KIROCREW_HOME, then the token.SessionExtras.app_launchescarries the result;hoist_servers_for_session(app_launches=...)hoists those names like managed ones and stamps them. A settings-file name does not reserve them on load, since the resolver already judged the settings.gateway_bound_port()factors out the existing bound-port check so the projection and the app element share it.Backwards compatibility
Compatible: kiro-cli path untouched; KAS sessions without a builtin host-CLI app server get an empty
app_launchesand the same array as before.Removes nothing: the change only adds a hoisted, tokened element for servers that were already declared.
Tests
test/test_kas_app_mcp_session_identity.py:Proof: not provable -- other: reverting the production hunks removes the new module, so the tests fail at collection. Manual mutations on head 309b1cd each turn the new tests red: ignoring
app_launches(3 fail), not tokening apps (3 fail), keeping the spec's command (2 fail), reserving app names on load (1 fail), ignoring the settings restriction (1 fail).Affected suites run locally:
test_kas_agents*,test_app_mcp_session_identity,test_acp_backend_kas,test_acp_runtime,test_acp_runtime_load_session,test_kas_env_launch*,test_runtime_bindings: 1058 passed.Manual verification
Not run against a live KAS engine. The token path is the same one the managed
kirocrew-*hoist already uses on KAS, so a reporter-side check is still worth doing after merge: Mochi tools should stop refusing on KAS.Related Issues
Refs #19798 (same symptom on kiro-cli, fixed by #19801). Slack report from a KAS user, 2026-11-02.
Backport:
release/0.11.0already has #19801 and the same KAS hoist gap, but this commit does not apply cleanly there (nomanaged_entriesplumbing on that branch). It needs a hand port.Sibling sweep
Swept:
git grep -n "MANAGED_MCP_SERVER_NAMES" -- src/kiro_crew/acp/andgit grep -n "ACP_BACKEND_KIRO" -- src/kiro_crew/acp/runtime_session_setup.pySibling: src/kiro_crew/acp/kas_agents.py -- changed here
Sibling: src/kiro_crew/acp/runtime_session_setup.py -- not affected -- kiro-only branch is #19801's fixed path; KAS is covered by the hoist instead
Pattern harvest
Rule candidate: review-prompt
Pattern: an identity or credential fix applied on one ACP backend's seam must name the matching seam on every other selectable backend.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.