Skip to main content

Module mcp_cooperation

Module mcp_cooperation 

Source
Expand description

MCP agent cooperation (Track M — task #17/#16/#18).

The cooperation gate that has long been missing: every MCP call should carry a verified, typed calling-agent identity + standpoint (who is asking, in what role), and the request should be evaluated against the rights ontology before execution.

This is load-bearing for the whole thesis — agents verify each other’s conduct; trust is behaviourally derived, not self-asserted ([[feedback-trust-is-behaviourally-derived]]); and there is no platform-provider deciding for everyone. The gate composes three existing pieces rather than inventing a fourth:

  1. Verified, not asserted — the caller’s identity must be cryptographically verified (a signed VC via crate::verifiable_credential), not merely claimed.
  2. Grounded — an artificial agent with no human Principal is refused (crate::agent::is_ungrounded_agency, agency.n3 G1’).
  3. Governed — the request is run through the deontic policy gate (crate::modalities::interaction_governance::map_policy, Phase 6).

Mandatory per-call enforcement in the dispatch is a deliberate MCP-contract change (it fails closed on unverified callers) and is gated on Timothy’s sign-off — see DEONTIC_LOGIC_PLAN Track M. This module is the mechanism + an opt-in tool; it does not silently change every existing caller’s behaviour.

Structs§

CallerStandpoint
Who is calling, in what typed role, and whether their identity was verified (vs merely asserted). agent and role are identifier hashes (one identity space, #14).

Enums§

CooperationVerdict
The outcome of the cooperation gate.

Functions§

authorize
The cooperation gate, with grounding supplied explicitly (index-free; used by the tool and by callers that already know the caller’s grounding). Order: verified → grounded → governed.
authorize_call
The cooperation gate over the live graph: resolves the caller’s grounding from index (agency.n3 G1’), then applies authorize.
caller_grounded
Is a caller grounded — i.e. NOT an ungrounded artificial agent? (A human, a legal person, or an AI with a declared values:operatedBy Principal all pass.)
cooperation_label
Stable label for logs / MCP responses.
enforcement_enabled
Is mandatory per-call MCP enforcement turned ON? Default OFF (opt-in via the env flag QUALIA_MCP_ENFORCE=1), so today’s callers are unaffected; flip it per-deployment when callers can supply a verified, grounded standpoint. When ON, every dispatched MCP call must pass authorize or it is refused. (Track M — the breaking-change switch, held by the operator.)