/** * What shadok itself adds to an agent's context, as labelled sections. * * Everything here is passed to `claude` at spawn — appended system prompts, * guardrails, the permission mode — and until now it was invisible: the agent * knew its role, the person reading the chat did not, and a surprising answer * had no explanation on screen. * * IT TAKES SECRET NAMES, NEVER VALUES. Values live in the child's environment * and never in its arguments; keeping them out of this function's signature * means they cannot leak through the panel by mistake, which is stronger than * a test that says they currently don't. * * This is shadok's half only. Claude Code adds its own context — CLAUDE.md, * skills, its built-in instructions — which shadok never sees, and the panel * says so rather than implying it shows everything. */ export interface PrepromptPart { /** Heading for the section. */ label: string; /** Where it comes from, so a reader knows where to go and change it. */ source: string; text: string; } export interface PrepromptInput { profileName?: string | null; /** The profile's role prompt, as resolved at spawn. */ role?: string; model?: string; deny?: string[]; allow?: string[]; permissionMode?: string; /** NAMES of the variables injected — never their values. */ secretNames?: string[]; /** The cockpit's own prompt (context/pilot-prompt.md). */ pilotPrompt?: string; /** The opt-in ledger reflex, when the instance has it on. */ ledgerReflex?: string | null; /** The skills shadok installs, as read from disk at spawn. */ capabilities?: { name: string; description: string; }[]; } /** Pure: the sections to show, in reading order, skipping what is absent. */ export declare function prepromptParts(input: PrepromptInput): PrepromptPart[]; /** * Pure: a skill's name and one-line description, from its SKILL.md frontmatter. * * Tolerant on purpose — a skill whose header we cannot read is still installed, * and listing it without its description beats omitting a capability the agent * actually has. */ export declare function parseSkillMeta(md: string): { name?: string; description?: string; };