Skip to main content

Module pipeline

Module pipeline 

Source
Expand description

Dispatch pipeline — the request processing chain.

Pipeline order:

  1. Effect check — brain-wave compatibility (zero-cost, inline)
  2. Dharma gate — ethical governance verdict
  3. Resource rules — write/spawn/network budgets, novelty, human review
  4. Rate limit — sliding window per-tool + global
  5. Circuit breaker — fault tolerance, fast-fail on repeated errors
  6. Tool call — execute the tool (optionally bounded by a dispatch timeout). Secret-scan sampling (6b) runs right after a successful call: warn-only credential-shape scan, deterministic 1-in-N, content never logged (P-PROV-5/B(c)).
  7. Karma record + write-audit journal — declared vs actual effects (confirm-gated dispatches record the confirm — the delete-confirm audit)
  8. Stats — success/failure and latency tracking

Between 4 and 5 sits the firebreak (fix-queue P1.4+P1.6): the explicit confirm: true gate for destructive tools, the promoted Jan-11 forbidden-command veto, the bulk-scope law, and advisory disclosure.

Structs§

AuthorityDispatch
Evidence passed to the authority-seam hook after a destructive dispatch.
DispatchPipeline
The dispatch pipeline processes tool calls through governance, rate limiting, circuit breaking, and karma tracking before and after the actual tool execution.
PassBudget
Optional spend budget carried by a pass.
PassEvidence
Verified gate-lite pass evidence handed to the authority-seam hook.
PassQuotas
Verified gate-lite pass evidence (S2) — plain data, no verifier dependency.

Enums§

PassMode
Pass enforcement mode (WM_MANDALA_PASS).

Constants§

DEFAULT_DISPATCH_TIMEOUT
Default dispatch timeout (300s) applied by [DispatchPipeline::from_env] when WM_DISPATCH_TIMEOUT_MS is unset.

Traits§

PassGate
Offline pass verifier injected by the deployment (wm-receipts in wm-mcp).
ReceiptDispatchHook
Optional post-dispatch receipt hook (S1 receipts core).