import type { CreateWorkstreamInput } from './engine.js'; import type { WorkItemSpec } from './types.js'; /** Success carries the rewritten spec; failure carries an honest, user-facing reason. */ export type DraftEditResult = { readonly spec: CreateWorkstreamInput; } | { readonly error: string; }; /** * Resolve a user-typed item reference to a 0-based index. A reference is * either the 1-based ordinal shown in the proposal (the primary handle) or an * item id / unique id-prefix (the stable handle that survives reordering). An * ambiguous or unmatched reference resolves to undefined so the caller can * refuse honestly rather than editing the wrong item. */ export declare function resolveItemIndex(items: readonly WorkItemSpec[], ref: string): number | undefined; /** Rewrite one item's brief (its `task`). Empty/whitespace briefs are refused. */ export declare function editItemBrief(spec: CreateWorkstreamInput, ref: string, brief: string): DraftEditResult; /** Drop one item and strip its id from every sibling's dependsOn. Refuses to empty the plan. */ export declare function removeItemFromSpec(spec: CreateWorkstreamInput, ref: string): DraftEditResult; /** Reorder one item to a new 1-based authoring position. Never touches dependencies. */ export declare function moveItemInSpec(spec: CreateWorkstreamInput, ref: string, toPosition: number): DraftEditResult; //# sourceMappingURL=workstream-draft-edits.d.ts.map