Do

_archivesourcetypescript
Path: _archive/loom-stale-pre-sprint-snapshot/src/orchestrator/do.tsRelative: loom-stale-pre-sprint-snapshot/src/orchestrator/do.tsSubproject: _archiveCategory: archived
Lines: 118Bytes: 4,599Imports: 7Exports: 1

Content Preview

  1. import { drizzle } from "drizzle-orm/d1";
  2. import { goals } from "../db/schema";
  3. import { parseContract } from "../lib/validate";
  4. import { newGoalId, sha256Hex } from "../lib/ids";
  5. import { createLogger } from "../lib/logger";
  6. import { ImmutableSpecError, NotFoundError, isLoomError, errorDetail } from "../types/errors";
  7. import type { Env, GoalState, GoalTunables } from "../types";
  8. /**
  9. * OrchestratorDO — Loop 1 substrate. One instance per goal.
  10. *
  11. * Sprint 0 functional surface (real, end-to-end