Skip to content

Wire consumer-supplied HTTP MCP into kiro.acp session/new (g06.037) - #376

Merged
betterthanclay merged 1 commit into
mainfrom
ns-6cff1089-2996-44bc-adea-34614fd947d2
Sep 25, 2026
Merged

betterthanclay merged 1 commit into
mainfrom
ns-6cff1089-2996-44bc-adea-34614fd947d2

Conversation

@betterthanclay

Copy link
Copy Markdown
Contributor

Implements g06.037.

What changed

  • kiro.acp production session/new now carries a validated consumer-supplied streamable-HTTP MCP entry (type: "http" with headers) under the route-owned name swallowtail-kiro-acp. Omission still sends mcpServers: [] byte-identically.
  • New adapter-local mcp module: structural validation only (non-empty name, absolute http/https URL, well-formed header names), values verbatim, redacting Debug, crate-private wire JSON.
  • Prepared facade: KiroSessionProfileInput::with_http_mcp_placement, carried through KiroPreparedSession and KiroPreparedSession::prepare_working_state_restoration.
  • Contract 061 projection names consumer-supplied-http when an entry is bound.
  • Typed outcome is never an acceptance claim: KiroAcpEncodedMcpServers::is_honoured() is always false and gates() lists the Research 351 gates (initialize advertisement unproven, governance-disabled drop, agent-config override). KiroAcpHttpAdvertisement::from_initialize classifies the advertisement.
  • Guide, route matrix, feature matrix, CHANGELOG, and the working v0.5.1 public-API baseline updated.

No matrix MCP cell becomes Yes: emission is proven, live honouring of a remote tool call is not.

Validation

  • cargo fmt -p swallowtail-adapter-kiro -- --check
  • effigy validate:focused swallowtail-adapter-kiro
  • effigy package:verify-affected swallowtail-adapter-kiro
  • effigy package:api
  • effigy qa:routes
  • effigy qa:docs
  • git diff --check

Provider-free only. No contract, core vocabulary, live session, release, or tag change.

Contract 063 admits the URL-plus-header placement. Emit the ACP http form
verbatim on production session/new under route-owned name
swallowtail-kiro-acp, carry it through the prepared facade and restoration,
and name the placement through the Contract 061 projection.

Emission stays distinct from honouring: KiroAcpEncodedMcpServers redacts
URL and header values in Debug, keeps the wire JSON crate-private, reports
is_honoured() == false, and lists the Research 351 gates
(initialize-advertisement-unproven, governance-disabled drop, agent-config
override). KiroAcpHttpAdvertisement::from_initialize classifies the
initialize advertisement without blocking emission. Omission keeps
mcpServers byte-identical. No feature-matrix MCP cell becomes Yes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@betterthanclay

Copy link
Copy Markdown
Contributor Author

Verdict

Ready to merge at 7da75f8e9c194e77a23c2f9cc9ebb61b3bdfa604 (PR 376, g06.037).

Independent exact-head review of the committed diff against canonical g06.037, Research 351, Contract 063's consumer-supplied HTTP MCP placement, and the g06.019 encoder. No blocking findings.

Scope

Owned surfaces only: crates/swallowtail-adapter-kiro/**, the Kiro prepared guide, the kiro.acp route and feature-matrix rows, the working v0.5.1 public-API baseline for this crate, and CHANGELOG.md [Unreleased]. Cargo.lock records the url crate on this adapter; that is the lockfile consequence of the owned Cargo.toml change. No contract, core vocabulary, other-route, live-session, release, or task-card prose edits.

Oracle

Invariant Result
Values verbatim Encoder and session/new tests compare the consumer URL and header values to the wire JSON.
Secrets private Debug of placement, encoded payload, failures, prepared session, plan, evidence, and Contract 061 contribution redacts URL and header values. Failures do not echo the refused URL.
Omission unchanged Unbound sessions still send mcpServers: [].
Emission is not honouring client_mcp_servers stays No / producer_gap. Notes name the live gate. No MCP cell is Yes.
Provider gates surfaced KiroAcpEncodedMcpServers::gates() names initialize-advertisement-unproven, governance-disabled drop, and agent-config override. is_honoured() is always false. Unadvertised initialize still emits and does not claim acceptance.

Facade and typed outcome

  • Bind with KiroSessionProfileInput::with_http_mcp_placement / KiroAcpDriver::with_http_mcp_placement using route-owned name swallowtail-kiro-acp.
  • Production session/new emits { type: "http", name, url, headers: [{name,value}] } after structural validation only.
  • Restoration carries the same declaration through prepare_working_state_restoration.
  • Contract 061 names consumer-supplied-http when an entry is bound.
  • Public encoder to_production_mcp_servers() returns KiroAcpEncodedMcpServers with crate-private wire JSON. KiroAcpHttpAdvertisement::from_initialize classifies the advertisement without blocking emission.

Guide records ACP-entry precedence over agent-configured servers.

Validation

Reviewed head 7da75f8e9c194e77a23c2f9cc9ebb61b3bdfa604 on ns-6cff1089-2996-44bc-adea-34614fd947d2; index and worktree clean before and after.

  • cargo fmt -p swallowtail-adapter-kiro -- --check
  • effigy validate:focused swallowtail-adapter-kiro (63 passed)
  • effigy package:verify-affected swallowtail-adapter-kiro
  • effigy qa:routes
  • effigy qa:docs
  • git diff --check vs merge-base 6686ac866557c249108a9be2f2b2b4cd432f904e

All passed. Head left clean at the reviewed SHA.

@betterthanclay
betterthanclay merged commit d4ba94e into main Sep 25, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant