Interface: AgentApprovalEngine
@roomful/svelte / AgentApprovalEngine
Interface: AgentApprovalEngine
Section titled “Interface: AgentApprovalEngine”Defined in: packages/core/dist/types.d.ts:1723
A room’s agent-approval workflow: agents propose actions, humans approve/reject them, and
every peer sees the synced proposal list. The proposer watches for the decision and applies (or
rolls back) the action, so nothing an agent proposes commits without a human in the loop.
Methods
Section titled “Methods”approve()
Section titled “approve()”approve(
id):void
Defined in: packages/core/dist/types.d.ts:1739
Approves a pending proposal (if permitted) and broadcasts the decision.
Parameters
Section titled “Parameters”string
The proposal id.
Returns
Section titled “Returns”void
getPending()
Section titled “getPending()”getPending():
AgentProposal[]
Defined in: packages/core/dist/types.d.ts:1757
Returns the proposals still awaiting a decision, newest first.
Returns
Section titled “Returns”The pending proposals.
getProposals()
Section titled “getProposals()”getProposals():
AgentProposal[]
Defined in: packages/core/dist/types.d.ts:1751
Returns every proposal, newest first.
Returns
Section titled “Returns”The proposals.
propose()
Section titled “propose()”propose(
input):AgentProposal
Defined in: packages/core/dist/types.d.ts:1730
Proposes an action for approval and broadcasts it to peers as pending.
Parameters
Section titled “Parameters”The action type and optional payload.
payload?
Section titled “payload?”unknown
string
Returns
Section titled “Returns”The created proposal.
reject()
Section titled “reject()”reject(
id):void
Defined in: packages/core/dist/types.d.ts:1745
Rejects a pending proposal (if permitted) and broadcasts the decision.
Parameters
Section titled “Parameters”string
The proposal id.
Returns
Section titled “Returns”void
subscribe()
Section titled “subscribe()”subscribe(
callback):Unsubscribe
Defined in: packages/core/dist/types.d.ts:1764
Subscribes to proposal changes; fires immediately with the current list, then on every change.
Parameters
Section titled “Parameters”callback
Section titled “callback”(proposals) => void
The callback invoked with the latest proposals.
Returns
Section titled “Returns”Unsubscribe
A function that removes the listener.