FR-001checkpassingThe contracts of delegate, revokeDelegation, recordToolCall, decideApproval and killAgent MUST pass the lint of operations against the identity domain, and each MUST run as the service and name the audit action it records.
0042-identity-agent-operations · owner if · domain data
FR-001checkpassingThe contracts of delegate, revokeDelegation, recordToolCall, decideApproval and killAgent MUST pass the lint of operations against the identity domain, and each MUST run as the service and name the audit action it records.
FR-002checkpassingdelegate MUST refuse, as a status and not an error, a delegation to oneself, one that is already over, one by a delegator or to a delegate that is not active, one for more than the delegator can do (for the first of a chain), and, for a sub-delegation, one by someone who is not the delegate of the delegation above it, from a delegation that cannot be passed on, with a depth that is not less, that outlives its parent, that is for a wider resource, or that passes on a permission the parent does not; and revokeDelegation MUST end the delegation and every delegation below it, saying how many, and say that it is already ended where it is.
FR-003checkpassingrecordToolCall MUST refuse a call by an agent that has not been granted the tool, whose run is not running, whose version is not approved or active, or that the decision engine refuses under the run's delegation, and MUST record every call, allowed or not, once for an index of a run, with a hash of its arguments.
FR-004checkpassingA call to a tool that is risky (its risk at or above the agent's threshold, or a grant that always asks, or an obligation) MUST wait for an approval request; an approval MUST be usable once, for exactly the arguments and the action it was asked for and before it runs out, by one conditional update; and the budget of a run MUST be taken from by one conditional update, so that it is never exceeded and what is refused is not counted; and a call that is refused MUST use nothing up: the budgets are looked at before an approval is used, an approval is given back if a budget cannot be taken, and the budgets already taken are given back if another has no room.
FR-005checkpassingdecideApproval MUST refuse a decider that is not an active person (an agent never decides), one that is not the one who answers for the agent (its owner, or the person at the root of its delegation, or a holder of a named role) and one that cannot do the thing themselves, MUST decide a pending request once, and MUST say so where it is not pending or has run out.
FR-006checkpassingkillAgent MUST, in one transaction, disable the agent, stop its running runs, end its delegations and those below them, revoke its credentials and cancel what waits for approval, say how many of each, say that it is already off where nothing changed, and refuse a principal that is not an agent.
FR-007checkpassingThe operations of delegation and agents MUST take the identity of the one acting from the caller the project authenticated and never from an input: delegate, revokeDelegation, decideApproval and killAgent MUST refuse as a status a caller that is not the principal an input names as acting (caller-mismatch) and a call with no caller (unauthenticated); revokeDelegation MUST be allowed only to the one who delegated or to one who may delegation:revoke in the tenant; and killAgent MUST be allowed only to the one who answers for the agent or to one who may agent:kill in its tenant.
OQ-1open questionWhether an approval by two people (four eyes) is wanted for a critical action; the model supports one.
OQ-2open questionWhether the decision engine should be given bound parameters instead of literals, since agents supply free text.
SC-001success criterionAn agent can be given exactly the authority of a person for exactly one task, can be stopped at once, and leaves a trail in which a change shows.
Data, models/identity-agent/operations, sql/extensions/operations/identity/agent