import type { Skill } from "./skills.js"; import type { WebhookEvent } from "./payload.js"; import type { JobAnswer, JobQuestion } from "./progress.js"; export interface PromptInput { skill: Skill; event: WebhookEvent; jobId: string; jobDir: string; payloadPath: string; eventPath: string; /** Where the agent may (or, per `response.mode`, must) write its `{outcome, summary, links, data}`. */ responsePath: string; /** Larger payloads are truncated inline (the file on disk is complete). */ inlineMaxBytes: number; /** How the agent reaches the job API: the `job_*` MCP tools, the `skillhook job` CLI, or neither. Default `mcp`. */ agentApi?: "mcp" | "cli" | "none"; /** The `skillhook` command the agent can run (`$SKILLHOOK_BIN`), for the `cli` wording. */ bin?: string; /** How long `ask` waits by default, for the wording. */ humanWaitSeconds?: number; /** This run continues a job whose question a person answered. `fresh` when no session could be resumed. */ resume?: { originalJob: string; question?: JobQuestion; answer: JobAnswer; fresh: boolean; }; } export declare function payloadJson(payload: unknown): string; /** Values available as `{{name}}` in a SKILL.md body. */ export declare function templateVars(input: PromptInput): Record; /** Mustache-lite: `{{name}}`, `{{payload.a.b}}`, `{{headers.x-github-event}}`, `{{query.foo}}`. */ export declare function renderTemplate(text: string, vars: Record, payload: unknown, headers?: Record): { text: string; used: string[]; }; /** Appended to the system prompt (Claude) or prepended to the prompt (Codex): unattended-run rules and prompt-injection guardrails. */ export declare function buildGuardrails(input: PromptInput): string; export interface BuiltPrompt { prompt: string; guardrails: string; /** Placeholders the SKILL.md body referenced. */ used: string[]; /** True when the event block was appended automatically. */ appendedEvent: boolean; } export declare function buildPrompt(input: PromptInput): BuiltPrompt;