Class: ClaudeCliDistillerRunner
Defined in: claude-cli-distiller-runner.ts:19
Built-in MemoryDistillerRunner implementation that spawns the claude CLI in non-interactive print mode (claude -p) with --output-format json and --json-schema enforcement (§6.4 Step 4).
Unwraps all three supported Claude CLI stdout shapes ({ structured_output }, { result: '<json>' }, and bare DistillerStructuredOutput JSON) and validates the result against DistillerStructuredOutputSchema.
Implements
Constructors
Constructor
new ClaudeCliDistillerRunner(): ClaudeCliDistillerRunner;Returns
ClaudeCliDistillerRunner
Methods
runDistillerProposal()
runDistillerProposal(request): Promise<{
choices: (
| {
alsoRemoveIds?: string[];
op: "update";
proposedContext?: string[] | null;
proposedRepos?: string[] | null;
proposedRole: string;
proposedText: string;
targetId: string;
whyMatched: string;
}
| {
capMerge?: {
keepId: string;
mergedText: string;
removeId: string;
whyMerged: string;
};
op: "add";
proposedContext?: string[];
proposedRepos?: string[];
proposedRole: string;
proposedText: string;
})[];
matchStatus: | "NO_MATCH"
| "LIKELY_MATCH"
| "EXACT_DUPLICATE"
| "REJECTED_TIER_1_OR_2";
recommendedChoiceIndex: number;
tierRejectionReason?: string;
}>;Defined in: claude-cli-distiller-runner.ts:29
Executes the Distiller prompt via claude -p and returns a validated DistillerStructuredOutput.
Parameters
| Parameter | Type | Description |
|---|---|---|
request | DistillerProposalRequest | Distiller prompt, JSON schema, timeout, and model parameters. |
Returns
Promise<{ choices: ( | { alsoRemoveIds?: string[]; op: "update"; proposedContext?: string[] | null; proposedRepos?: string[] | null; proposedRole: string; proposedText: string; targetId: string; whyMatched: string; } | { capMerge?: { keepId: string; mergedText: string; removeId: string; whyMerged: string; }; op: "add"; proposedContext?: string[]; proposedRepos?: string[]; proposedRole: string; proposedText: string; })[]; matchStatus: | "NO_MATCH" | "LIKELY_MATCH" | "EXACT_DUPLICATE" | "REJECTED_TIER_1_OR_2"; recommendedChoiceIndex: number; tierRejectionReason?: string; }>
Validated structured Distiller match and choice analysis.
Throws
With code 'DISTILLER_EXECUTION_FAILED' on timeout, non-zero exit, malformed JSON, or schema validation failure.