/** * ADR-406 M1 / §11 — the bounded mission observation file a workbench reads. * * `.claude-flow/missions/observation.json` is rewritten atomically after each * committed mission event. It carries the source time (`observedAt`, the time * of the newest committed event); readers stamp their own fetch time and derive * freshness from `observedAt`, never from a redraw. Strings are stripped of * control and bidi characters and truncated here, at write time, so a reader * never sees unbounded or instruction-shaped text from a mission. * * It is observation only. Task status is recorded state; only * `evidence.verified` counts as verified, and an executor marked disconnected * is not a failed mission. */ import type { MissionView } from './transitions.js'; export declare const OBSERVATION_CONTRACT: "ruflo.mission-observation/1"; export declare const OBSERVATION_FILE = "observation.json"; export declare const OBSERVATION_LIMITS: Readonly<{ missions: 50; tasks: 50; string: 200; objective: 400; }>; export interface MissionObservation { readonly schemaVersion: 1; readonly contract: typeof OBSERVATION_CONTRACT; readonly source: 'ruflo-cli/missions'; readonly workspaceId: string; readonly observedAt: string | null; readonly truncated: boolean; readonly missions: readonly ObservedMission[]; } export interface ObservedMission { readonly missionId: string; readonly objective: string; readonly state: string; readonly revision: number; readonly executionMode: string; readonly plan: { readonly revision: number; readonly digest: string; readonly taskCount: number; readonly tasks: readonly { readonly id: string; readonly title: string; readonly dependsOn: readonly string[]; readonly status: string; }[]; }; readonly budget: MissionView['budget']; readonly evidence: { readonly count: number; readonly verified: number; }; readonly executor: { readonly connection: string; readonly observedAt: string; readonly lastAckExecutionId: string | null; } | null; readonly unresolvedOperations: number; readonly blockedReason: string | null; readonly lastEventSequence: number; readonly updatedAt: string; } /** Strip C0/C1 controls and bidi overrides, then bound the length. */ export declare function sanitize(value: string, max?: number): string; export declare function observeMission(view: MissionView): ObservedMission; /** Newest-updated first, capped; `observedAt` is the newest committed event time. */ export declare function buildObservation(workspaceId: string, views: readonly MissionView[]): MissionObservation; //# sourceMappingURL=observation.d.ts.map