Files
paperclip-adapter-claude-k8s/dist/ui-parser.d.ts
T
Chris Farhood 9dbb5f337e Initial commit: Paperclip adapter for Claude Code on Kubernetes
Adapter plugin that runs Claude Code agents as Kubernetes Jobs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 23:16:31 -04:00

60 lines
1.2 KiB
TypeScript

/**
* Self-contained stdout parser for Claude stream-json output.
* Zero external imports — required by the Paperclip adapter plugin UI parser contract.
*/
type TranscriptEntry = {
kind: "assistant";
ts: string;
text: string;
} | {
kind: "thinking";
ts: string;
text: string;
} | {
kind: "user";
ts: string;
text: string;
} | {
kind: "tool_call";
ts: string;
name: string;
input: unknown;
toolUseId?: string;
} | {
kind: "tool_result";
ts: string;
toolUseId: string;
content: string;
isError: boolean;
} | {
kind: "init";
ts: string;
model: string;
sessionId: string;
} | {
kind: "result";
ts: string;
text: string;
inputTokens: number;
outputTokens: number;
cachedTokens: number;
costUsd: number;
subtype: string;
isError: boolean;
errors: string[];
} | {
kind: "stderr";
ts: string;
text: string;
} | {
kind: "system";
ts: string;
text: string;
} | {
kind: "stdout";
ts: string;
text: string;
};
export declare function parseStdoutLine(line: string, ts: string): TranscriptEntry[];
export {};
//# sourceMappingURL=ui-parser.d.ts.map