Skip to content

feat(mcp): resolve approved route presets without widening policy #359

Closed

Description

@abruption

Problem

The CLI has route-only presets and an address book, but MCP clients must repeatedly supply destination IDs and target selection inputs. Reusing presets could improve usability, but a stored route must never widen MCP policy authority.

Proposed scope

Design read-only preset lookup and explicit selection within operator-approved MCP destinations. Preset creation/replacement/removal is excluded from this issue. This is an MCP adapter follow-up to completed CLI work #324, not a second preset implementation.

Acceptance criteria

  • Enumerate/show only presets explicitly approved for the MCP process; do not expose arbitrary preset file paths, raw homes, SSH identities or private route data by default.
  • Intersect every resolved preset route with destination/agent/home/capability policy. Reject mismatches before any discovery, probe or native submission; never treat possession of a preset or revision as authorization.
  • Preserve the distinction between saved route inspection and current session discovery. Lookup does not select an arbitrary discovered target or create a session.
  • When later used in an explicitly permitted send, require an explicit target and the applicable current preset-revision precondition; resolve the route once and recheck policy before effects.
  • Preserve existing revision semantics: name+route deterministic token, restored identical values may reuse a token, and later mutation cannot retroactively cancel an already expanded invocation.
  • Revisions are not authenticated caller/recipient identities, target generations, storage attestations or ACKs.
  • No management writes, silent fallback, alias-based policy bypass or automatic resend. Unsupported platform/transport combinations remain explicit.
  • Preserve current POSIX secure-storage limits and owner/ACL/symlink/mount checks (64 KiB, 128 entries). Missing/unsafe storage must not trigger initialization or permission repair. Metadata lookup performs no native/SSH/version probes or background refresh.
  • Read a validated snapshot and preserve its dp1: revision. Do not combine --preset with MCP's existing explicit routing flags, which the CLI rejects; resolve, authorize and expand a single execution plan under a reviewed adapter contract.
  • Add real stdio/policy fixtures for mismatched routes, stale revision, changes during resolution, output bounds and no secret reflection.

Dependencies and limits

Depends on the MCP destination contract and preflight model. Keep published CLI preset platform/transport and filesystem/ownership restrictions. Do not broaden Windows, paired-device, handoff or trusted-SSH-config support as a side effect.

Source: v1.3.3 CLI reference and MCP policy.

Planning

Updated 2026-11-02: v1.4.0 candidate, priority P2. The owner authorized sequential implementation and PR preparation with independent CLI review. This supersedes the original Long-term/P3 plan. No release date, merge, publication or operational approval is implied.

Tracking dependencies

Depends on the reviewed destination/policy model in #356 and the preflight execution-plan contract in #357. Included as the separate fourth v1.4.0 candidate slice after the dependency contracts, following the owner's 2026-11-02 instruction.

Activity

  1. added this to the Long-term milestone on Nov 2, 2026
  2. self-assigned this
    on Nov 2, 2026
  3. added
    enhancementNew feature or request
    priority:P3Deferred convenience or long-term work.
    priority:P2Planned reliability, acceptance or feature work; priority does not authorize implementation.
    and removed
    priority:P3Deferred convenience or long-term work.
    on Nov 2, 2026
  4. modified the milestones: Long-term, v1.4.0 on Nov 2, 2026
  5. abruption commented on Nov 2, 2026

    @abruption
    OwnerAuthor

    2026-11-02: the owner authorized sequential implementation and PR preparation of the recommended four-issue scope (#356–#359), with independent-cli-review before each PR. Moved to the v1.4.0 candidate milestone/P2. This supersedes the original Long-term/deferred planning paragraphs, while preserving all policy/storage/revision limits and excluding preset management writes. No merge or publication authorization is implied.

  6. abruption commented on Nov 2, 2026

    @abruption
    OwnerAuthor

    Implementation prepared in PR #364, stacked after #363. The independent reviews drove a simpler contract: presets are only constrained route selectors for already-authorized legacy list/send operations, preserving their existing CLI JSON; list_presets is the separate safe metadata projection. Added explicit selector refusal codes, unknown decoding/IO outcomes, preservation of primary native submission evidence, and route authorization before caller-revision comparison to avoid an off-policy digest oracle. Local real-store positive is an honest guard-based skip, while supported GitHub Actions cells must execute it; negative and actual stdio resolution-race fixtures are included. No merge, release or live/native/SSH acceptance is implied.

  7. abruption commented on Nov 2, 2026

    @abruption
    OwnerAuthor

    Verified on 2026-11-03 against published v1.4.0, source 476c67e636ef02cb93797dd2f42252dfe577625f. The exact main CI passed all 37 jobs (including the 12 Mac/Linux MCP SDK/version cells), and publication/PyPI verification passed all 6 jobs. This completion audit is a source/test/contract review, not a new native/SSH/model/ACK experiment.

    Implementation: PR #364, merge f290973962c63548f24153eeee12a8e3666fd043.

    Approved preset lookup/selection is shipped with action and exact-route intersection, explicit send target/revision, secure one-snapshot reads and effect-boundary policy rechecks. Existing list/send native JSON and known submission evidence are preserved. Revisions are repeatable route-value tokens, not identities/generations/ACKs; later changes do not cancel expanded invocations. No preset-management, repair, fallback or broader platform/transport support is claimed. Supported CI exercises real-store positives; local external-volume guard skips were not promoted to native evidence.

    Closing as completed for the shipped scoped contract; Long-term native identity/storage, handoff and integration research remain separate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestpriority:P2Planned reliability, acceptance or feature work; priority does not authorize implementation.

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions