/** * Runtime "plugin reuse nudge" — the reactive half of the plugin-productivity * guidance. * * The static `promptGuidelines` on the plugin tools are injected into the system * prompt once at session build and never re-surface when the work actually shows * a reusable-facing cue. This extension closes that gap: it watches tool output * and turn text for the cues in {@link REUSE_NUDGES}, and when one appears it * attaches a matching, plugin-facing note to the *next* turn's context — an * ephemeral message merged into the outgoing request via the `context` hook, so * nothing is written into persisted history. * * Policy (see ./policy.ts for the cue table — the single source of truth): * - Cues are read from `before_agent_start` (user prompt), `tool_execution_start` * (tool args, e.g. content being written) and `tool_execution_end` (tool * output, e.g. content being read). * - First-hit arming: a matching cue arms its nudge immediately. * - One note per turn, and at most once per category per session — so a cue * that keeps appearing never turns into a nag. * - The whole thing is gated on the autonomous-plugin-system flag * (`enablePluginTools`, default off) and never blocks normal flow. * * Wired once from hoo-core (the single default composition root); the guard below * makes double-registration a no-op for downstreams that compose extensions * differently, and the static import keeps it bundled in the compiled binary. */ import type { ExtensionAPI } from "../../../core/extensions/types.js"; export interface PromptReactiveNudgesOptions { /** * Enablement gate. Defaults to the shared autonomous-plugin-system flag so the * reactive nudge and the plugin tool surface flip together. Injectable for tests. */ isEnabled?: (cwd: string) => boolean; } /** * Install the runtime reuse-nudge extension. Idempotent — a second call on the * same `hoo` is a no-op, so composing default extensions twice is harmless. */ export declare function setupPromptReactiveNudges(hoo: ExtensionAPI, options?: PromptReactiveNudgesOptions): void; //# sourceMappingURL=nudges.d.ts.map