Contract-gated verification
Hosted MCP verification is task-scoped. Each footprint trace locks to one published contract version. Every proxy tool call (reads and mutates) requires that published contract; include all tools in the sequence in tool_manifest. Hosted preman_* control tools stay ungated. Completion is explicit with preman_complete_task (plus terminal fallback and timeout safety). After completion, PreMan runs deterministic Tier 2 read-back checks from the contract read plan.
The runtime hot path does not call an LLM. It only evaluates contract policy rules and sequence transitions, then proxies upstream. LLM review runs on the cold path only when an agent is already blocked and requests a contract amendment.
End-to-end flow
First proxy call locks the footprint trace to one published contract version (reads included).
Out-of-scope tools block; G0 and G1 policy checks run.
preman_complete_task schedules deterministic read-back after consistency window.
Policy failures return a structured 428 result with tool_out_of_scope, policy_violation_argument, or policy_violation_sequence, plus amendment guidance in _meta.amendment.
Policy fields on contracts
Published contract versions carry three policy fields:
- task_summary: the intended scope the reviewer agent must preserve.
- argument_guards: per-tool field rules such as
max,allowlist,pattern, andrequired. - sequence_graph: allowed next-tool transitions per trace.
You can inspect all three on the hosted MCP Contracts tab.
Task-scoped lock behavior
- Each
footprint_trace_idlocks to one contract version. Switching contracts mid-trace returnstrace_contract_conflict. - Any proxy tool outside the locked manifest (including reads) returns
tool_out_of_scope. - Scope changes should go through
request_contract_amendment, not a new contract proposal in the same trace.
Amendment flow
On a policy block, an agent can call request_contract_amendment with an explanation and proposed guard or sequence changes. The reviewer agent returns one of:
- approve: PreMan publishes a new contract version immediately with actor
reviewer_agent. - reject: the call stays blocked and the rationale is returned.
- error: the reviewer failed or timed out, and the call stays blocked (fail closed).
When human approval is configured for the contract binding, reviewer publishes are flagged for operator follow-up and can be reverted from the Contracts tab.
- Before proxy tools/call, propose and publish a contract via
preman_propose_verification_contract/preman_publish_verification_contract(include reads intool_manifest). - Read policy block details from the tool-call
_meta.violations. - Submit
request_contract_amendmentwithfootprint_trace_id, an explanation, and proposed changes. - Poll
get_amendment_status; on approval, retry the original tool call. - When the task is done, call
preman_complete_taskwith optionalexpected_outcomesto trigger Tier 2 verification.
Footprints
Each tool call can carry a trace id (_footprint_trace_id in arguments). PreMan correlates invocations, action events, and verification runs into an ordered timeline at GET /verification/traces/{trace_id}/footprints. Use it to debug retries, see which contract version ran, and review failed checks across iterations.
Verification results on tool calls include _meta.verification with tier, trust level, verdict, iteration counters, and retry hints when checks fail.
Read plans are trialed at publish time in shape-only mode: PreMan checks tool existence, template resolution, response parseability, and locator validity. Missing objects are warnings, not hard failures.
Open My MCPs in the PreMan app, select a hosted MCP, and open the Contracts tab for policy toggles, per-tool bindings, and publish controls.