import type { Command } from "commander"; import { type IntegrationAgent } from "../../lib/agent-integration.js"; /** * Characters one managed hook's additionalContext carries at most (owner * request 2026-10-30: one prompt received 10-60 KB of skill bodies). The cap * covers the whole injected text: skill bodies get the cap less a fixed * reserve for the loading policy, notices and `skills load` offers, and the * assembled text is clamped to the cap. A body that does not fit is offered as * its `skills load` command instead of being injected. Operators may lower it * with SKILLS_HOOK_CONTEXT_MAX_CHARS in the agent's environment, never raise it: * a larger value keeps the default. The native hook command line that * `skills hook install` writes is unchanged. */ export declare const MANAGED_HOOK_CONTEXT_MAX_CHARS = 12000; /** Skill bodies one managed hook injects at most; SKILLS_HOOK_CONTEXT_MAX_SKILLS can only lower it. */ export declare const MANAGED_HOOK_CONTEXT_MAX_SKILLS = 2; /** Part of the cap kept for the policy, notices and up to ten load offers. */ export declare const MANAGED_HOOK_CONTEXT_RESERVE_CHARS = 2500; /** * A managed hook injects an unnamed prompt match only for a phrase of at least * this many words. A one-word trigger says little about a turn's subject, more * so in long text ("effect", "rollback", "handoff"), and several of them don't * add up to a phrase, so such a match is offered as a load command instead * (FAO-00144). SKILLS_HOOK_PROMPT_MIN_PHRASE_WORDS can only raise it. */ export declare const MANAGED_HOOK_PROMPT_MIN_PHRASE_WORDS = 2; /** A subagent's start carries no prompt to match against, so its parent's skills are offered, not injected. */ export declare const MANAGED_HOOK_INHERITED_BODIES = 0; /** The effective hook limits: the defaults above, or a valid lower environment override. */ export declare function managedHookContextLimits(): { maxChars: number; maxSkills: number; bodyChars: number; }; /** The effective phrase length: the default above, or a valid higher environment override. */ export declare function managedHookPromptMinPhraseWords(): number; /** * The selection flags one agent's managed hook passes to its context child. * Sumi's plugin and Cursor's prompt hook both discard the output of a prompt * call and only deliver what a later call restores, so a pointer could never * reach their models: it would turn a delivered body into nothing. They keep the * plain selection until they can carry pointers. */ export declare function managedHookSelectionArgs(agent: IntegrationAgent): string[]; /** Clamp assembled hook context to the cap at a line boundary, with a fixed note. */ export declare function capManagedHookContext(context: string, maxChars?: number): string; /** * Prepend a pending session pin migration notice to context the agent will * read, then mark it delivered. Cursor shows hook context only at session * start, and Sumi discards its prompt-admission output (its context call sends * an empty prompt), so those calls leave the notice pending. OpenCode uses * an explicit delivery phase, including for empty attachment-only admissions. */ export declare function withSessionPinMigrationNotice(agent: IntegrationAgent, event: string, input: unknown, result: { context: string; }): void; export declare function registerAgentIntegration(parent: Command): void;