Skip to content

Interface: AgentApprovalEngine

@roomful/core


@roomful/core / AgentApprovalEngine

Defined in: packages/core/src/types.ts:2012

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.

approve(id): void

Defined in: packages/core/src/types.ts:2026

Approves a pending proposal (if permitted) and broadcasts the decision.

string

The proposal id.

void


getPending(): AgentProposal[]

Defined in: packages/core/src/types.ts:2047

Returns the proposals still awaiting a decision, newest first.

AgentProposal[]

The pending proposals.


getProposals(): AgentProposal[]

Defined in: packages/core/src/types.ts:2040

Returns every proposal, newest first.

AgentProposal[]

The proposals.


propose(input): AgentProposal

Defined in: packages/core/src/types.ts:2019

Proposes an action for approval and broadcasts it to peers as pending.

The action type and optional payload.

unknown

string

AgentProposal

The created proposal.


reject(id): void

Defined in: packages/core/src/types.ts:2033

Rejects a pending proposal (if permitted) and broadcasts the decision.

string

The proposal id.

void


subscribe(callback): Unsubscribe

Defined in: packages/core/src/types.ts:2055

Subscribes to proposal changes; fires immediately with the current list, then on every change.

(proposals) => void

The callback invoked with the latest proposals.

Unsubscribe

A function that removes the listener.