import type { ResolvedWatchdog } from './config.js'; import type { BriefingVocab } from '../harness/types.js'; /** One entry in `watch.json`'s `roles` array — where to find a watched role's state. */ export interface WatchManifestRole { name: string; stateDir: string; } /** * The fixed run manifest a watchdog run reads at `manifestPath`. It carries everything the * run and digest reader need to identify the run in * report.json (`watchdog`, `run_id`, `started_at`) plus the suppression digest that makes * alerting idempotent across runs. */ export interface WatchManifest { watchdog: string; run_id: string; coordinator: string; started_at: string; roles: WatchManifestRole[]; digest: { cooldown_ms: number; open: Array<{ role: string; status: string; since: string; realert_after: string | null; }>; }; } export interface WatchdogBriefingOpts { wd: ResolvedWatchdog; manifestPath: string; reportPath: string; vocabulary: BriefingVocab; /** What spawn actually established about the watchdog's ours identity (7.3, decision 3). */ identityGuarantee: 'verified' | 'created' | 'unverified'; /** Raw prompt_file content, appended as extra focus — never a replacement. */ promptFocus?: string; } /** * Render a watchdog run's fixed contract (briefing.md-equivalent for a one-shot clean-context * run): bind, observe-only rules, procedure, status vocabulary, evidence rules, alert rules, * report schema, and — if the watchdog configures one — an appended prompt_file focus. * * The contract is fixed for every watchdog, including ones with a prompt_file; the override * adds focus, never fields. Therefore every section * below is unconditional except the identity-guarantee wording and the trailing focus append. */ export declare function generateWatchdogBriefing(opts: WatchdogBriefingOpts): string; export interface NotifierBriefingOpts { wd: ResolvedWatchdog; vocabulary: BriefingVocab; /** What spawn actually established about the watchdog's ours identity (7.3, decision 3). */ identityGuarantee: 'verified' | 'created' | 'unverified'; /** The exact message to relay — the scheduler composed this, the notifier only delivers it. */ text: string; } /** * Render a scheduler-alert notifier run's entire contract: a minimal one-shot agent whose sole * job is to bind its identity, send one exact message to the coordinator, and write `sent.json` * as its completion sentinel. Used only for scheduler-level alerts (e.g. held-down) — the fleet * process itself cannot send ours messages (deviation 4), so this is how it delegates the send. * Unlike `generateWatchdogBriefing`, there is no report.json, no manifest, and no inspection. */ export declare function generateNotifierBriefing(opts: NotifierBriefingOpts): string;