Skip to main content

Interface: IToolApprovalEnvelope

Defined in: internal/human-gate/types.ts:228

A tool call awaits a human before it runs.

Extends​

  • IPauseEnvelopeBase

Properties​

allowed​

allowed: EResumeAction[]

Defined in: internal/human-gate/types.ts:213

Decisions the UI may offer.

Inherited from​

IPauseEnvelopeBase.allowed


callId​

callId: string

Defined in: internal/human-gate/types.ts:232

The call this card is about, toolCall.callId repeated: the key a decision names (IResumeDecision.callId).


expiresAt​

expiresAt: Date

Defined in: internal/human-gate/types.ts:215

After this the pause expires.

Inherited from​

IPauseEnvelopeBase.expiresAt


kind​

kind: TOOL_APPROVAL

Defined in: internal/human-gate/types.ts:230

The discriminator: a tool call waits.


pauseId​

pauseId: string

Defined in: internal/human-gate/types.ts:211

Names this pause of the run: resume must pass it, and a decision for an earlier pause of the same run is refused.

A run can pause again under the same runId (a tool, then its answer's review): the same request body must not decide both.

Inherited from​

IPauseEnvelopeBase.pauseId


reasonCode?​

optional reasonCode?: string

Defined in: internal/human-gate/types.ts:251

Why the call waits for a human, from the tool's policy for this call (reasonCode of its NEEDS_APPROVAL result).

For the card: a key of the app's translations, next to toolCall.input.

Omitted when the policy gave none: the card says only what the call does.


rejectionText?​

optional rejectionText?: string

Defined in: internal/human-gate/types.ts:243

What the model reads if the human rejects the call, from the tool's policy for this call (D87).

For the model, not for the card: the UI renders the pause from toolCall; this text is kept with the pause so a REJECT after a restart still sends it.

Omitted = the default rejection text.


runId​

runId: string

Defined in: internal/human-gate/types.ts:205

The run that paused; what resume, cancelRun and getPausedRun take.

Inherited from​

IPauseEnvelopeBase.runId


toolCall​

toolCall: IToolCallPart

Defined in: internal/human-gate/types.ts:234

The call as the model asked for it: the tool's name and its input; what the card shows and what EDIT replaces.