omk-adaptorch-wpl
v0.95.1
Published
AdaptOrch-native Work Packet Loop (WPL) — state machine, verification layer, and integration bridge for OMK orchestration.
Maintainers
Readme
omk-adaptorch-wpl
Status: Stable (v0.91.0). Wired into
open-multi-agent-kitas a runtime dependency. This package implements the AdaptOrch-native Work Packet Loop (WPL) design, an original execution loop whose only work-producing action is AdaptOrch'sadaptorch_runtool. See AdaptOrch for the backend product this integrates with; AdaptOrch is still under active development and this integration currently targets its free Start tier.
Design documents
The full design (state machine, verification layer, integration mapping, and the adversarial
review that shaped the safety gates below) lives outside this package at
.omk/runs/adaptorch-native-loop-algorithm-20260701/:
final-part1-core-algorithm.md— Work Packet state machine, termination conditions, cancellation policyfinal-part2-verification-layer.md— the Outcome Adjudicator (5-state verification)final-part3-integration.md— the projection/bridge between the two
Modules
src/types.ts— Work Packet, Dispatch Record, state enums (as string literal unions), on-disk schema typessrc/state-machine.ts— the packet lifecycle state machine and transition guardssrc/adaptorch-client.ts— thin typed wrapper around AdaptOrch's 10 MCP toolssrc/adjudicator.ts+src/adjudicator-registry.ts— the Outcome Adjudicator and its per-kindregistrysrc/loop.ts— the integration layer wiring the state machine, AdaptOrch client, and adjudicator togethersrc/b2c-mapper.ts— B2C (Bridge-to-Code) mapping for patch-apply safetysrc/b2c-verdict.ts— Verdict card schema for correctness wall decisionssrc/deep-wall.ts— Deep verification wall for multi-runner evidence gatingsrc/receipt-signature.ts— Cryptographic receipt signing for verification evidence
Integration
The coding-agent consumes this package via:
packages/coding-agent/src/core/adaptorch-bridge.ts— advisory-only bridge (default-off, circuit-breaker protected, TTL-cached). ProvidesgetFreshHint(sync, cache-read-only) andrequestRefresh(fire-and-forget) for the reasoning router's turn-start path.packages/coding-agent/docs/adaptorch-preview.md— read-first planning pipeline spec.
Safety notes (do not remove without updating the design docs)
ESCALATEDpackets never resume automatically; only an explicit external unblock signal moves them on.- The first Dispatch Record of any payload that differs from the last human-approved baseline
(an
augmented_payloadwas applied, or aREROUTEchanged topology) requires human approval (AWAITING_APPROVAL), unless the loop is explicitly launched in pre-approved-batch mode. - Loop-level budgets (
max_dispatch_attempts,max_loop_duration, dispatch-call budget) are immutable for a loop instance's lifetime; raising them requires a new instance under the same review.
Preview spec: ../coding-agent/docs/adaptorch-preview.md
