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§

DispatchPipeline
The dispatch pipeline processes tool calls through governance, rate limiting, circuit breaking, and karma tracking before and after the actual tool execution.

Constants§

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