Skip to content

Epic: Deliver AI-Agent MCP Server and CLI for SpatialAnalyzer Automation #440

Todo

Description

@davidalucas

Outcome

Deliver a supported, exact-target mechanism (Briosa.Cli.exe) that allows end users' AI agents to inspect and—when explicitly authorized—operate SpatialAnalyzer directly through Briosa without writing a custom client program or using brittle desktop UI automation.

One shared target-scoped .NET 10 binary packaged inside each Windows x64 server distribution provides:

  • a progressive-discovery, local stdio MCP server for desktop and IDE AI hosts (Claude Desktop, Cursor, VS Code, etc.); and
  • a composable, JSON-first CLI for terminal/coding agents and shell scripting.

Delivery starts with an attach-only, observe-only-lifecycle, read-only inspection MVP for SpatialAnalyzer 2026.1.0529.7, then expands to controlled mutations with replay interlocks and 2024.1.0508.5 parity.

Remote Streamable HTTP MCP is intentionally outside this Epic and remains gated on #156 and #251.

Architecture Record

Recorded in Architecture Discussion #9.

Key design commitments:

  • distinct raw-protocol agent adapter layer above the typed gRPC boundary (preserving exact snake_case protobuf field names and binding to Briosa's compatibility, disposition, replay, and fake-worker conformance guarantees);
  • single-authority enforcement of agent safety tiers via a narrowing-only caller restriction header evaluated in OperationPolicy.EvaluateRequest (covering conditional request_options and a pinned exhaustiveness test across all registered operations);
  • value-free field-level validation detail in OperationError, additive mp_step in DiscoveryService/ListCapabilities, and bundled descriptor/briosa.protoset;
  • attach-only, observe-only lifecycle in MVP (leaving server launch, SA/SDK attestation, and connection management with Briosa.ControlCenter.exe);
  • completion safety for PartialSuccess (MP code 4), decoupled MCP host cancellation + async handle/await for long_running ops, and post-unknown-outcome replay interlocks;
  • prompt-injection delimiting for untrusted SA strings, bounded inline JSON + explicit local-only/spill-to-file data-egress mode, and excluding physical_motion, device_*, code_execution, and external_io from initial MCP releases; and
  • preserving briosa-installer ADR 0007 for MVP (copyable exact-path config to Briosa.Cli.exe).

Coordinated Scope

Phase 0 — Packaging & Descriptor Spike

Phase 1 — Server & Protocol Enablers (Both Targets, Compatibility Revision Bump)

Phase 2 — Attach-Only Inspection MVP (targets/2026.1.0529.7)

Phase 3 — Controlled Mutation & Long-Running Safety (targets/2026.1.0529.7)

Phase 4 — Cross-Target Parity, Docs & Ecosystem Follow-Up

Explicitly Deferred / Out of Scope

Exit Criteria

  • Briosa.Cli.exe is signed by ReleasePackageSigning.psm1, passes deterministic double-build ZIP verification, and accounts for all third-party notices in eng/licenses/reviewed-windows-evidence.json.
  • A pinned test verifies every registered operation maps to exactly one bridge safety tier and cannot bypass OperationPolicy.EvaluateRequest via conditional request_options.
  • Packaged fake-worker conformance tests verify stdio MCP and CLI behavior across OK, PartialSuccess, field-level validation errors, policy denials, cancelled/timed-out unknown outcomes (dispatch count = 1), replay interlocks, hostile SA strings, and oversized results.
  • Explicitly authorized scripted licensed SA validation confirms real inspection and controlled mutation behavior on 2026.1.0529.7 without model-driven test execution.
  • End-user documentation honestly states local-only scope, data-egress implications, validation coverage, and when to prefer MCP vs. CLI vs. briosa-py/briosa-js/briosa-dotnet.

Activity

  1. added
    enhancement
    area: protocol
    area: security
    on Nov 26, 2026
  2. moved this from Todo to In Progress in Briosa Roadmap & Deliveryon Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: protocolarea: securityenhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions