/** * Gated harness-state projection: keeps exactly one compact overview in the * model's context as a durable user message, republished only when it is * actually needed (see {@link registerHarnessProjection}). The overview is * model-visible and logged as a `plugin:dsh-continual-harness`-source user * message, so it satisfies the model-visible ⟺ logged rule and stays readable * across Session format migrations. * * Replacement, not accumulation: on a republish the previously injected block * is shadowed in place through a session surface `replace`, so the transcript * never holds a stale harness-state snapshot. The first injection lands at the * tail of the step's messages (after the assembled system-prompt context), so * the current-state reminder is the most recent system-level content before the * model call; subsequent updates keep that stable position. The block's * sequence is tracked as it commits (see session-state.ts), so locating the * block never scans the event log. * @module dsh-continual-harness */ import type { Context } from '@deepseek-ai/cordis'; import type { HarnessStore } from './store.ts'; /** Digest length of the overview content hash. */ export declare const DIGEST_LENGTH = 16; /** * Register the pre-step projection. The overview is republished when it is * needed and only then — a plain digest change is not enough: * * - the first injection lands once the store has content; * - a refinement landing (or the store emptying) always republishes, so the * block never shows stale versions or a retired entry; * - a query change republishes only when it surfaces an evidence-backed entry * that the current block does not already carry. Follow-up messages that * match nothing ("1", or an acknowledgement phrase) merely reorder the * selection toward recency, and replacing relevant experience with the newest * entries is worse than leaving the block alone. * * An existing block is replaced in place; otherwise the block is appended at * the tail of the step's messages, after the assembled system-prompt context. */ export declare function registerHarnessProjection(ctx: Context, store: HarnessStore): void; //# sourceMappingURL=projection.d.ts.map