import type { JinnConfig } from '../shared/types.js'; /** * How a Todo is RUN (ICI-733): the skills its working session preloads and the * engine/model its NEXT attempt uses. * * Both are set-time validated and re-resolved at dispatch, because the two * moments are far apart: a skill can be deleted and an engine can be * reconfigured between the agent setting the field and the Todo being picked * up. Set-time validation is what makes the error actionable; dispatch-time * resolution is what keeps it honest. * * The override is deliberately read at dispatch and never pushed into a live * session — that is what makes it settable on an `executing` Todo without * disturbing the attempt already in flight. */ export declare const TODO_SKILLS_MAX = 10; export interface TodoDispatchConfig { /** Empty when nothing has been requested. */ skills: string[]; engine: string | null; model: string | null; updatedAt: string; } export interface TodoDispatchConfigInput { /** Unknown because it arrives from an HTTP body or a tool call; `validateSkills` * is the one place it becomes a list of installed skill names. */ skills?: unknown; engine?: string | null; model?: string | null; } export type TodoDispatchConfigResult = { ok: true; config: TodoDispatchConfig; } | { ok: false; error: string; }; /** The Todo's dispatch preferences, or undefined when it has none. */ export declare function getTodoDispatchConfig(workItemId: string): TodoDispatchConfig | undefined; export declare function setTodoDispatchConfig(workItemId: string, input: TodoDispatchConfigInput, config: JinnConfig): TodoDispatchConfigResult; export interface TodoDispatchPreamble { /** Prepended to the prompt; empty when the Todo requested no skills. */ prefix: string; engine: string | null; model: string | null; } /** * What a dispatch needs from the Todo's preferences, resolved against the * workspace as it is NOW. * * Skills are re-checked because the set can shrink between set time and * dispatch. A partial loss still runs — losing one playbook is not a reason to * refuse the work — but it is warned about, since a silently thinner prompt is * how an attempt fails for reasons nobody can see. Losing ALL of them is * different: the Todo asked to be worked with skills and none survived, so the * attempt would be something other than what was requested. */ export declare function resolveTodoDispatch(workItemId: string): { ok: true; preamble: TodoDispatchPreamble; } | { ok: false; error: string; }; //# sourceMappingURL=dispatch-config.d.ts.map