mirror of
https://github.com/zernie/vigiles.git
synced 2026-09-14 20:53:57 +08:00
7c97e4ed7d
The prefix answers "is this name stable?" and cannot answer "is the name my stable symbol depends on stable?". That gap shipped: railway(), delegate() and result() carried stable names while being meaningless without the experimental builder, and the lint rule cannot see it — it compares tag and name within one declaration, not the dependency between two. So the subagent vocabulary now hangs off one marked root: result, railway, delegate, pipe, pipeStep, needs, start and andThen become members of the builder. Eight names leave the top level. Two further gains the prefix alone could not reach: collision-prone words stop owning package-level names, and the warning survives destructuring, since the binding site still names the root — unlike a namespace object or an import subpath, which mark the import line. Object.assign rather than a TypeScript namespace: namespaces are an error in this repo's lint config, and one merges only with function declarations while the skill builder is a const. Types stay top-level, for the same reason the prefix rule excludes them. No deprecation window: nothing outside this repository imports these, and a window subtracts nothing. The container-rollback argument for a window does not reach them — they take no part in loading hooks. Found along the way, and worth more than the refactor: two example specs had not compiled since the previous rename, because the examples directory was in no tsconfig at all. Both fixed, and the class is closed — examples now type-check. Gates run, in order: vitest (3281 passed), lint (0 errors), prettier --check, api:check, build, exports:check, internal:check, docs:check, and tsc over the types project now that it includes examples. Claude-Session: https://claude.ai/code/session_017aUJEoaEQ3DxtvoSVWAWqe Co-authored-by: Claude <noreply@anthropic.com>
9.7 KiB
9.7 KiB
API Report File for "vigiles-claude-code"
Do not edit this file. It is a report generated by API Extractor.
// @public
export function assertNoCollision(report: SelectionReport, opts?: {
maxOffDiagonal?: number;
maxPluginCollision?: number;
}): void;
// @public
export function buildClaudeArgs(spec: HarnessTestSpec, hasSettings: boolean): string[];
// @public
export function claudeAvailable(): boolean;
// @public (undocumented)
export const claudeCodeAdapter: HarnessAdapter;
// @public
export type ClaudeCodeBoundedTool = ClaudeCodeReadOnlyTool | "Write" | "Edit" | "NotebookEdit" | "Bash" | "PowerShell";
// @public
export const claudeCodeBuiltinAgentTools: readonly ["Read", "Grep", "Glob", "Bash", "PowerShell", "Edit", "Write", "NotebookEdit", "WebFetch", "WebSearch", "TodoWrite", "Skill", "ToolSearch", "EnterWorktree", "ExitWorktree", "Monitor", "TaskStop", "SendMessage", "Artifact", "Agent", "Task", "ExitPlanMode", "ListAgents", "LSP", "ShareOnboardingGuide", "CronCreate", "CronDelete", "CronList", "TaskCreate", "TaskGet", "TaskList", "TaskUpdate"];
// @public
export type ClaudeCodeBuiltinTool = (typeof claudeCodeBuiltinAgentTools)[number];
// @public (undocumented)
export const claudeCodeDialect: HarnessDialect;
// @public
export const claudeCodeDriver: HarnessTestDriver;
// @public (undocumented)
export const claudeCodeHookProtocol: HookProtocol;
// @public (undocumented)
export const claudeCodeLayout: PluginLayout;
// @public (undocumented)
export const claudeCodeModelMock: ModelMock;
// @public
export type ClaudeCodeReadOnlyTool = Exclude<ClaudeCodeBuiltinTool, ClaudeCodeSideEffectingTool>;
// @public (undocumented)
export const claudeCodeRuntime: HarnessRuntime;
// @public
export type ClaudeCodeSideEffectingTool = (typeof claudeCodeSideEffectingTools)[number];
// @public
export const claudeCodeSideEffectingTools: readonly ["Bash", "PowerShell", "Edit", "Write", "NotebookEdit", "WebFetch", "WebSearch", "Skill", "TodoWrite", "Monitor", "SendMessage", "Artifact", "EnterWorktree", "ExitWorktree", "TaskStop", "Agent", "Task", "TaskCreate", "TaskUpdate", "CronCreate", "CronDelete", "ShareOnboardingGuide"];
// @public
export interface ClaudeCodeToolVocabulary extends ToolVocabulary {
// (undocumented)
readonly bounded: ClaudeCodeBoundedTool;
// (undocumented)
readonly readOnly: ClaudeCodeReadOnlyTool;
}
// @public
const experimental_agent: typeof agentSpec & {
result: <const Ok extends Shape, const Err extends Shape>(ok: Ok, err: Err) => OutputContract<Ok, Err>;
delegate: (agent: string, task?: string, needsContract?: Shape) => RailwayStep;
railway: (spec: Omit<Railway, "_specType">) => Railway;
needs: <const N extends Shape>(shape: N) => NeedsContract<N>;
pipeStep: <Needs extends Shape, Ok extends Shape, Err extends Shape>(a: TypedAgentSpec<Ok, Err>, needsContract?: Needs) => PipeStep<Needs, Ok, Err>;
start: <Ok extends Shape, Err extends Shape>(first: PipeStep<Record<string, never>, Ok, Err> | TypedAgentSpec<Ok, Err>) => Pipeline<Ok, Err>;
andThen: <PriorOk extends Shape, PriorErr extends Shape, Needs extends Shape, Ok extends Shape, Err extends Shape>(prior: Pipeline<PriorOk, PriorErr>, next: Supplies<PriorOk, Needs> extends true ? PipeStep<Needs, Ok, Err> : {
readonly __HANDOFF_ERROR: Supplies<PriorOk, Needs>;
}) => Pipeline<Ok, PriorErr | Err>;
pipe: {
<A extends Shape, AE extends Shape>(a: TypedAgentSpec<A, AE>): Pipeline<A, AE>;
<A extends Shape, AE extends Shape, BN extends Shape, B extends Shape, BE extends Shape>(a: TypedAgentSpec<A, AE>, b: Supplies<A, BN> extends true ? PipeStep<BN, B, BE> : {
readonly __HANDOFF_ERROR: Supplies<A, BN>;
}): Pipeline<B, AE | BE>;
<A extends Shape, AE extends Shape, BN extends Shape, B extends Shape, BE extends Shape, CN extends Shape, C extends Shape, CE extends Shape>(a: TypedAgentSpec<A, AE>, b: Supplies<A, BN> extends true ? PipeStep<BN, B, BE> : {
readonly __HANDOFF_ERROR: Supplies<A, BN>;
}, c: Supplies<B, CN> extends true ? PipeStep<CN, C, CE> : {
readonly __HANDOFF_ERROR: Supplies<B, CN>;
}): Pipeline<C, AE | BE | CE>;
<A extends Shape, AE extends Shape, BN extends Shape, B extends Shape, BE extends Shape, CN extends Shape, C extends Shape, CE extends Shape, DN extends Shape, D extends Shape, DE extends Shape>(a: TypedAgentSpec<A, AE>, b: Supplies<A, BN> extends true ? PipeStep<BN, B, BE> : {
readonly __HANDOFF_ERROR: Supplies<A, BN>;
}, c: Supplies<B, CN> extends true ? PipeStep<CN, C, CE> : {
readonly __HANDOFF_ERROR: Supplies<B, CN>;
}, d: Supplies<C, DN> extends true ? PipeStep<DN, D, DE> : {
readonly __HANDOFF_ERROR: Supplies<C, DN>;
}): Pipeline<D, AE | BE | CE | DE>;
};
};
export { experimental_agent as agent }
export { experimental_agent }
// @public (undocumented)
export const experimental_skill: typeof skillSpec & {
input: (name: string, hint: string, opts?: {
required?: boolean;
}) => SkillInput;
step: (instr: string | InstructionFragment[], opts?: {
gate?: Gate;
retry?: number;
}) => SkillStep;
};
// @public
export function extractRequest(body: {
system?: unknown;
messages?: unknown;
}): ModelRequest;
// @public
export function formatSelectionReport(r: SelectionReport): string;
// @public (undocumented)
export interface HarnessDialect {
readonly builtinAgentTools: readonly string[];
readonly hookEvents: readonly string[];
readonly hookEventVocabulary?: HarnessVocabulary;
readonly instructionTargets: readonly string[];
readonly knownMcpServers?: readonly string[];
readonly mcpToolPattern: RegExp;
readonly name: string;
readonly neverAvailableTools: readonly string[];
readonly noEffectHookEvents?: readonly string[];
readonly permissionDecisionHookEvents?: readonly string[];
readonly pluginRootToken: string;
readonly sideEffectingTools?: readonly string[];
readonly skillFrontmatter: SkillFrontmatterProfile;
readonly subagentToolVocabulary?: HarnessVocabulary;
}
// @public
export function isMainLoopRequest(body: {
tools?: unknown;
}): boolean;
// @public (undocumented)
export interface LoadedPlugin {
readonly files: Record<string, string>;
readonly settings: {
hooks?: unknown;
};
readonly sources: Record<string, string>;
readonly warnings: readonly string[];
}
// @public
export function loadPlugin(pluginPath: string, layout?: PluginLayout): ReturnType<typeof loadPlugin_2>;
// @public
export function measureSelectionMatrix(dir: string, opts?: SelectionMatrixOptions): Promise<SelectionReport>;
// @public (undocumented)
export interface MockHandle {
// (undocumented)
close(): void;
readonly count: number;
readonly requests: readonly ModelRequest[];
readonly sideChannelCount: number;
// (undocumented)
readonly url: string;
}
// @public
export function mockModelEnv(runtime: HarnessRuntime, baseUrl: string, base?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
// @public
export interface ModelRequest {
readonly messages: readonly {
readonly role: string;
readonly text: string;
}[];
readonly sideChannel?: boolean;
readonly system: string;
}
// @public
export interface ModelTurn {
readonly input?: Record<string, unknown>;
readonly text?: string;
readonly tool?: string;
}
// @public
export function parseClaudeRun(stdout: string): ParsedRun;
// @public
export function resolveHarness(opts: {
plugin?: string;
settings?: unknown;
files?: Record<string, string>;
}, layout?: PluginLayout): ReturnType<typeof resolveHarness_2>;
// @public
export function scriptModel(turns: readonly ModelTurn[]): ModelTurn[];
// @public
export function scriptUnconsumedWarning(count: number, sideChannelCount: number): string | undefined;
// @public
export interface SelectionMatrixOptions extends SelectionOptions {
readonly prompts?: TriggerPromptSet;
}
// @public
export interface SelectionOptions {
readonly concurrency?: number;
readonly harness?: ProbeHarness;
readonly model?: string;
readonly trials?: number;
}
// @public (undocumented)
export interface SelectionReport {
readonly available: boolean;
readonly collisionRate: number;
readonly matrix: readonly (readonly number[])[];
// (undocumented)
readonly n: number;
// (undocumented)
readonly note?: string;
// (undocumented)
readonly perSkill: readonly SkillSelectionStat[];
readonly skills: readonly string[];
}
// @public (undocumented)
export interface SkillSelectionStat {
readonly collidesWith: readonly {
readonly skill: string;
readonly rate: number;
}[];
readonly collisionRate: number;
readonly n: number;
readonly recall: number;
// (undocumented)
readonly skill: string;
}
// @public
export function splitRequestCounts(requests: readonly ModelRequest[]): {
count: number;
sideChannelCount: number;
};
// @public
export function startMock(script: readonly ModelTurn[], opts?: {
onTurn?: (info: TurnInfo) => void;
onRequest?: (req: ModelRequest) => void;
}): Promise<MockHandle>;
// @public (undocumented)
export interface TurnInfo {
// (undocumented)
readonly hasToolResult: boolean;
// (undocumented)
readonly n: number;
// (undocumented)
readonly stream: boolean;
}
// (No @packageDocumentation comment for this package)