/** * Host half of the auto-continue plugin. * * - Registers the `auto-continue` settings namespace (the browser half's * settings card edits it; the host engine reads it). * - Runs the single-instance auto-continue engine: listens to the session * event firehose, sends via `agent.followup`, cancels via `agent.cancel`. * - Serves a status bridge the browser half subscribes to: notifications and * runtime state (stats / pauses), plus an action endpoint for notification * buttons. */ import type { Context } from '@deepseek-ai/cordis'; import z from '@deepseek-ai/schemastery'; /** Settings namespace of the auto-continue plugin (lowercase kebab-case). */ export declare const AUTO_CONTINUE_NS = "auto-continue"; /** Wire schema; blank localized text fields tell resolveConfig() to select the active locale's defaults. */ export declare const AutoContinueSchema: z; /** Text automatically sent after an interruption. */ continueText: z; /** Text sent when the output token ceiling is reached (same placeholders as `continueText`). */ continueTextMaxTokens: z; /** Idempotency guard: inspect the last tool call before resuming and steer the model. */ guardTools: z; /** Guard text appended when the last tool call has no confirmed result (it may have partially executed). */ guardPendingText: z; /** Guard text appended when the last tool call completed successfully (don't rerun it). */ guardDoneText: z; /** Grace period after an interruption before auto-sending (ms). */ graceMs: z; /** Minimum interval between two auto-continues per session (ms). */ cooldownMs: z; /** Max consecutive auto-continues per session before stopping. */ maxConsecutive: z; /** Scan recently interrupted sessions on page load / reconnect. */ scanOnBoot: z; /** Max sessions the scan checks (most recently updated). */ scanLimit: z; /** Scan only considers interruptions inside this window (ms). */ freshMs: z; /** Log `[auto-continue]` lines to the browser console. */ verbose: z; /** Classify failures: auto-continue transient errors only; permanent ones are skipped and notified. */ classify: z; /** Provider-specific message/code/status fragments that explicitly count as retryable, one literal per line. */ retryableErrorPatterns: z; /** Cooldown multiplier per consecutive failure (adaptive backoff). */ backoffFactor: z; /** Cap on the effective backoff interval (ms). */ backoffMaxMs: z; /** Show browser notifications for auto-continue events. */ notify: z; /** Globally pause auto-continue: no live or scan send. */ paused: z; /** Loop guard: detect a running turn spinning in place and restart it. */ loopGuard: z; /** A model message shorter than this many chars counts as a short sentence (loop signal). */ loopShortChars: z; /** Consecutive short sentences within this window (ms) with no tool call in between trip the loop guard. */ loopWindowMs: z; /** Consecutive short sentences trip the loop guard. */ loopShortCount: z; /** Consecutive identical assistant messages trip the loop guard (strongest signal; also used for streamed intra-message repetition). */ loopRepeatText: z; /** Consecutive identical tool calls with identical arguments AND results trip the loop guard. */ loopToolRepeat: z; /** Text sent after the loop guard cancels and restarts a turn (supports {tool}). */ loopText: z; }>, Schemastery.ObjectT<{ /** Active browser/UI locale mirrored by the client. */ locale: z; /** Text automatically sent after an interruption. */ continueText: z; /** Text sent when the output token ceiling is reached (same placeholders as `continueText`). */ continueTextMaxTokens: z; /** Idempotency guard: inspect the last tool call before resuming and steer the model. */ guardTools: z; /** Guard text appended when the last tool call has no confirmed result (it may have partially executed). */ guardPendingText: z; /** Guard text appended when the last tool call completed successfully (don't rerun it). */ guardDoneText: z; /** Grace period after an interruption before auto-sending (ms). */ graceMs: z; /** Minimum interval between two auto-continues per session (ms). */ cooldownMs: z; /** Max consecutive auto-continues per session before stopping. */ maxConsecutive: z; /** Scan recently interrupted sessions on page load / reconnect. */ scanOnBoot: z; /** Max sessions the scan checks (most recently updated). */ scanLimit: z; /** Scan only considers interruptions inside this window (ms). */ freshMs: z; /** Log `[auto-continue]` lines to the browser console. */ verbose: z; /** Classify failures: auto-continue transient errors only; permanent ones are skipped and notified. */ classify: z; /** Provider-specific message/code/status fragments that explicitly count as retryable, one literal per line. */ retryableErrorPatterns: z; /** Cooldown multiplier per consecutive failure (adaptive backoff). */ backoffFactor: z; /** Cap on the effective backoff interval (ms). */ backoffMaxMs: z; /** Show browser notifications for auto-continue events. */ notify: z; /** Globally pause auto-continue: no live or scan send. */ paused: z; /** Loop guard: detect a running turn spinning in place and restart it. */ loopGuard: z; /** A model message shorter than this many chars counts as a short sentence (loop signal). */ loopShortChars: z; /** Consecutive short sentences within this window (ms) with no tool call in between trip the loop guard. */ loopWindowMs: z; /** Consecutive short sentences trip the loop guard. */ loopShortCount: z; /** Consecutive identical assistant messages trip the loop guard (strongest signal; also used for streamed intra-message repetition). */ loopRepeatText: z; /** Consecutive identical tool calls with identical arguments AND results trip the loop guard. */ loopToolRepeat: z; /** Text sent after the loop guard cancels and restarts a turn (supports {tool}). */ loopText: z; }>>; /** * Plugin body: register the settings namespace, start the single-instance * engine, and serve the status bridge. * @param ctx - host plugin context. */ export declare function apply(ctx: Context): void;