Skip to main content
Dotset CLI API Documentation / tollgate / SessionGrant

Interface: SessionGrant

Defined in: src/tollgate/session/types.ts:76 A session grant represents a time-bounded approval for future tool calls. When a user approves a tool call, they can optionally grant a session that allows similar future calls without re-prompting.

Properties

createdAt

readonly createdAt: Date;
Defined in: src/tollgate/session/types.ts:81 When the grant was created

expiresAt

readonly expiresAt: Date | null;
Defined in: src/tollgate/session/types.ts:84 When the grant expires (null = session lifetime)

grantedBy

readonly grantedBy: "api" | "webhook" | "terminal";
Defined in: src/tollgate/session/types.ts:105 How this grant was created

id

readonly id: string;
Defined in: src/tollgate/session/types.ts:78 Unique identifier for this grant

originalRequestId?

readonly optional originalRequestId: string;
Defined in: src/tollgate/session/types.ts:111 Original request that triggered this grant (for audit)

scope

readonly scope: SessionScope;
Defined in: src/tollgate/session/types.ts:90 Scope of the grant

scopeValue?

readonly optional scopeValue: string;
Defined in: src/tollgate/session/types.ts:99 Scope-specific value:
  • ‘exact’: JSON-stringified args
  • ‘tool’: tool name
  • ‘server’: undefined
  • ‘pattern’: glob pattern

server

readonly server: string;
Defined in: src/tollgate/session/types.ts:87 Server this grant applies to

tool?

readonly optional tool: string;
Defined in: src/tollgate/session/types.ts:102 Tool name (for ‘exact’ and ‘tool’ scopes)

usageCount

usageCount: number;
Defined in: src/tollgate/session/types.ts:108 Number of times this grant has been used