Reinjector

_archivesourcetypescript
Path: _archive/loom-stale-pre-sprint-snapshot/src/execution/reinjector.tsRelative: loom-stale-pre-sprint-snapshot/src/execution/reinjector.tsSubproject: _archiveCategory: archived
Lines: 57Bytes: 2,135Imports: 2Exports: 5

Content Preview

  1. import { sha256Hex } from "../lib/ids";
  2. import type { BlobStore, ToolOutcome } from "./ports";
  3. /**
  4. * H3.4 — Structured re-injection (P1, P6).
  5. * Observations are hashed over the FULL payload, truncated to the tool's
  6. * obs_cap_tokens for the context channel, with overflow persisted to R2.
  7. * The wrapped form carries hash + status so the ack gate has ground truth.
  8. */
  9. export interface PreparedObservation {
  10. obsHash: string;
  11. status: "ok" | "error";
  12. summary: string; // truncated, chan