@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
27 lines • 1.44 kB
TypeScript
import { type TodoOpEntry, type TodoPhase } from "./todo-types.ts";
export type TodoNormalization = {
entry?: TodoOpEntry;
corrections: string[];
error?: string;
};
/**
* The todo tool's `prepareArguments`: rewrites near-canonical shapes (senpi#5148 wrappers,
* senpi#5332 list/op corrections) to the canonical one before schema validation. Any call a
* rule does not correct is returned as the SAME reference, and a correction that would leave
* `list` empty is abandoned entirely so the malformed call still fails validation instead of
* clearing the todo list. A caller-sent `TODO_PREPARED_CORRECTIONS_KEY` is never trusted
* (senpi#5332): it is dropped on a copy before any rule runs, and when that removal is the
* only change the stripped copy is returned instead of the same reference.
*/
export declare function prepareTodoArguments(input: unknown): unknown;
/**
* Splits the prepare-time correction notices off prepared arguments (see
* `TODO_PREPARED_CORRECTIONS_KEY`): the arguments without the reserved key, plus the notices
* to prepend to `normalizeTodoParams`'s own corrections.
*/
export declare function splitPreparedCorrections(args: Record<string, unknown>): {
args: Record<string, unknown>;
corrections: string[];
};
export declare function normalizeTodoParams(raw: Record<string, unknown>, currentPhases: readonly TodoPhase[]): TodoNormalization;
//# sourceMappingURL=normalize.d.ts.map