Skip to main content

Interface: IUserContext

Defined in: contracts/types.ts:10

Who is asking: the tenant, the user, the permissions, the locale, the time zone and the clock of one call.

Supplied by the host application on every gateway call and never stored by the gateway. AIGateway hands it to every child: the ToolPolicy filters tools by permissions, the ContextAssembler renders locale, timezone and now into the system prompt, a tool's execute and policy receive it, every store scopes its reads by tenantId.

Properties​

locale​

locale: string

Defined in: contracts/types.ts:18

BCP-47, e.g. "de-AT"; injected into the system prompt.


now​

now: Date

Defined in: contracts/types.ts:22

"Now" as the app sees it; injected as today's date.


permissions​

permissions: string[]

Defined in: contracts/types.ts:16

Permission keys of the user; ToolPolicy filters tools against them.


tenantId​

tenantId: string

Defined in: contracts/types.ts:12

Tenant scope of this call.


timezone​

timezone: string

Defined in: contracts/types.ts:20

IANA zone, e.g. "Europe/Vienna".


userId​

userId: string

Defined in: contracts/types.ts:14

Acting user.