Repository navigation
Conversation
This was referenced Nov 18, 2026
…an identity that refreshes `calls` implements icp-project's `CanisterCalls` over an ic-agent `Agent`: updates and queries as the caller, and the certified reads a deploy makes (module hash, controllers, metadata sections, the subnet a canister is on). `identity` is the signer a long deploy holds: it re-derives the session's delegation while the deploy runs, keeps signing as the account the first derivation resolved to, and stops signing once Internet Identity says the session is over. imcp2-core returns the account a delegation resolved to (`delegated_identity_resolved`) and makes `RECONNECT_MSG` and `agent_as` public for it. Co-Authored-By: Claude Fable 5.2 <[email protected]>
raymondk
force-pushed
the
deploy-1b-signing
branch
from
November 18, 2026 03:17
3c10af7 to
f9386a0
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The two pieces a deploy signs with. Neither depends on the bundle host in #230 beyond the crate existing, so this can be read on its own.
calls.rs:AgentCalls, the library'sCanisterCallsover anic-agentAgent, modelled on icp-app's own implementation without proxy routing. Updates and queries as the caller, and the certified reads a deploy makes throughread_state: module hash, controllers, metadata sections, the subnet a canister is on. Acandid:servicesection read off a canister is held to core'sguard_candid_textbefore it is handed back. The caller principal is read once at construction, becauseCanisterCalls::calleris infallible whileAgent::get_principalis not.identity.rs:RefreshingIdentity, the signer a long deploy holds. A per-app delegation lives five minutes and a deploy can run longer, so it swaps in a fresh delegation from the session store every ten seconds. It keeps signing as the account the first derivation resolved to, so a user changing their default account mid-deploy does not change the principal, and it stops signing for good once Internet Identity says the session is over.imcp2-core(identities.rs):delegated_identity_resolvedreturns the account a delegation was resolved to next to the identity;delegated_identityis now a wrapper over it.AppDelegationcarries that account.RECONNECT_MSGis public, so a holder of a long-lived signer can tell "the session is over" from a transient failure.Identities::agent_asis public.Where this came from
calls.rswas in #231 andidentity.rsin #232; both files are unchanged from the top of the old stack.Changes
crates/imcp2-deploy/src/calls.rs(268 lines of code, 97 of tests),src/identity.rs(182 and 48).crates/imcp2-core/src/identities.rs.crates/imcp2-deploy/Cargo.tomladdsic-agent,candidandtracing.Testing
cargo build --locked --workspace --all-targetscargo test --locked --workspace --all-targetscargo fmt --all -- --checkTested here: the certified-read paths and their absent-versus-failed distinction, the identity's swap, its same-principal check, and that a revoked identity refuses to sign with the reconnect message.
Not covered:
AgentCallsagainst a network. Nothing in the stack makes an on-chain call in a test (see #231).The stack
Six stacked PRs that bring
icp deployto the MCP servers through the icp CLI's own project library. Re-cut on 2026-11-18 so that each file arrives once, in the form it has at the top; the tree at the top is unchanged from before the re-cut, rebased onto currentmain.icp-projecthost for an untrusted bundleic-agent, an identity that refreshes#242 (streamed phases, interruption) and #245 (one bundle source per server, crates.io) are closed: their changes are folded into the PRs above.
Checklist
🤖 Generated with Claude Code