Envelope Compiler
Path:
loom-sprint-scaffold/loom/src/dispatcher/core/envelope-compiler.tsRelative: loom/src/dispatcher/core/envelope-compiler.tsSubproject: loom-sprint-scaffoldCategory: otherLines: 130Bytes: 4,998Imports: 7Exports: 1
Content Preview
- /**
- * H2.2 + H2.3 — Envelope Compiler.
- *
- * compile(stage, mode, opts): DispatchEnvelope
- * - Tool allowlist: only the tools appropriate for the stage's variety_class,
- * each stamped with a reversibility class from TOOL_REVERSIBILITY_MAP.
- * - Budget stamping (H2.3): B_tokens / B_calls / B_wallclock =
- * stage.budget_defaults × mode cost_multiplier × deficit widening.
- * - dispatch_id = hash(goal_id, stage_id, attempt) via src/lib/ids.ts.
- * - Output validates against dispatch-envelope.sc