Harness

loom-sprint-scaffoldsourcetypescript
Path: loom-sprint-scaffold/loom/src/execution/harness.tsRelative: loom/src/execution/harness.tsSubproject: loom-sprint-scaffoldCategory: other
Lines: 357Bytes: 13,236Imports: 11Exports: 1

Content Preview

  1. /**
  2. * H3 — Harness: runStage(envelope, modelCaller, deps): Promise<StageResult>
  3. * composing all monitors around the tool loop.
  4. *
  5. * Every monitor emits an ExecutionTrace event with monitor name from the
  6. * closed union type. No silent termination paths — every exit is one of the
  7. * StageTermination kinds, asserted in tests.
  8. */
  9. import { newEventId, actionHash, canonicalJSON } from "../lib/ids";
  10. import { createLogger } from "../lib/logger";
  11. import { errorDetail } from "../types/errors";
  12. impor