Skip to main content

Interface: GovernedToolPolicy<TInput>

Defined in: packages/agentos/src/safety/runtime/GovernedTool.ts:87

What one governed tool does, about whom, within which limits.

Type Parameters​

TInput​

TInput

Properties​

action​

action: string

Defined in: packages/agentos/src/safety/runtime/GovernedTool.ts:89

The action kind the audit names: hold_message, mute_in_room. A word of at most 19 characters, for the reason a rule id is.


evidence?​

optional evidence: EvidenceRule

Defined in: packages/agentos/src/safety/runtime/GovernedTool.ts:93


limits​

limits: readonly ActionLimitRule[]

Defined in: packages/agentos/src/safety/runtime/GovernedTool.ts:92

Methods​

dryRunOutput()?​

optional dryRunOutput(args): unknown

Defined in: packages/agentos/src/safety/runtime/GovernedTool.ts:104

What the model receives in a dry run in place of the tool's output. Default { dryRun: true }. Never recorded. When the tool has an outputSchema, the answer must meet it, or the call ends refused_arguments with POLICY_ERROR before anything is reserved.

Parameters​

args​

TInput

Returns​

unknown


expiresAt()?​

optional expiresAt(args): string | undefined

Defined in: packages/agentos/src/safety/runtime/GovernedTool.ts:98

When the action lifts by itself, for the audit record: an instant in the form YYYY-MM-DDTHH:mm:ss.sssZ. The record holds the library's own toISOString() of it, never the string returned.

Parameters​

args​

TInput

Returns​

string | undefined


idempotencyKey()?​

optional idempotencyKey(args): string

Defined in: packages/agentos/src/safety/runtime/GovernedTool.ts:109

Default: the actor, action, account, room, unique sorted evidence ids and optional target message. The limiter and the record hold the SHA-256 of the string, never the string.

Parameters​

args​

TInput

Returns​

string


target()​

target(args): object

Defined in: packages/agentos/src/safety/runtime/GovernedTool.ts:91

What the tool will act on, read from its own arguments. It must match the evidence.

Parameters​

args​

TInput

Returns​

object

accountId​

accountId: string

messageId?​

optional messageId: string

roomId?​

optional roomId: string