/** * Neutral completion-body resolution shared by host-side completion targets. * * A teammate completion is delivered back to the dispatcher as turn text. When * the result is short it is inlined verbatim; when it overflows the inline * budget the full result is spilled to an owner-only 0600 file under the * host-supplied spill directory and only the path is inlined, so a large result * never floods the dispatcher's context window. * * The spill directory is supplied by the host-side caller, so this module owns * no Dreamux layout contract — only the safe filename shape inside that * directory. */ /** * Inline character budget, mirroring claude-code's native task-output budget * (`getMaxTaskOutputLength`): default 32000 chars, `TASK_MAX_OUTPUT_LENGTH` * override, clamped to 160000. Counted in characters, not bytes. */ export declare const COMPLETION_INLINE_BUDGET_DEFAULT = 32000; export declare const COMPLETION_INLINE_BUDGET_MAX = 160000; export type ResolvedCompletionBody = { kind: 'inline'; text: string; } | { kind: 'spilled'; path: string; }; export interface CompletionBodyInput { result: string | null; } /** * Resolve the effective inline budget from the environment, in the spirit of * native `validateBoundedIntEnvVar`: unset/blank or non-positive falls back to * the default; values above the upper bound are clamped (not rejected). Stricter * than native's lenient `parseInt`, a value that is not a plain decimal integer * (e.g. `32k` or `123abc`) falls back to the default rather than being partially * parsed. */ export declare function completionInlineBudget(env?: NodeJS.ProcessEnv): number; /** * Decide whether a completion result is inlined or spilled. Spilling writes the * FULL result to a 0600 file (async fs only — no sync IO, repo rule #85) under * the caller-supplied `spillDir` and returns the path; the caller inlines only * that path. `spillDir` is supplied by the caller, so this module stays * runtime-neutral and never names a dispatcher id. */ export declare function resolveCompletionBody(completion: CompletionBodyInput, spillDir: string): Promise; //# sourceMappingURL=completion-body.d.ts.map