import type { WorkItemCaller } from "./work-item-arming.js"; import type { Session } from "../shared/types.js"; import type { WorkItem, WorkItemStatus } from "../work-items/store.js"; /** * Who may act on a Todo when the caller is not the operator. * * The route file asks these three questions on the way into assign, archive, * dispatch, delegate, request-approval, and status, and each answer is a rule * rather than plumbing — so they read together here instead of a page apart * among the handlers. Approval DECISIONS are a separate authority and live in * `approval-authority.ts`. */ export declare function ownsWorkItem(session: Session, item: WorkItem, linked: Session[]): boolean; export declare function authorizeWorkItemOwnerManagerOrRoot(caller: WorkItemCaller, item: WorkItem, action: string): { ok: true; } | { ok: false; status: 403; error: string; }; /** * Status is the one Todo write open to every authenticated session. * * Gating it on a relationship to the Todo bought nothing and cost honesty: a * participant that could do the work could not say where it had got to, and had * to ask someone with standing to perform the write for it. Status is low-stakes * and every participant needs it, so it is open — and each new caller arrives * without needing its own relation and its own 403. * * `done` stays bounded to `in_review` and is withheld from a linked execution * attempt because "never close your own work" is the basis of the review model. * Workflow phase sessions are linked for spend attribution, not because every * phase produced the Todo, so they are reviewers rather than execution attempts. * `cancelled` has no agent lane at all and the route refuses it before this * point, where cancellation's separate archive path is chosen. */ export declare function authorizeAgentWorkItemStatus(caller: WorkItemCaller, item: WorkItem, target: WorkItemStatus): { ok: true; } | { ok: false; status: 403; error: string; }; //# sourceMappingURL=work-item-authority.d.ts.map