Interface: ToolContext
Defined in: src/server/ai/assistant/tool.ts:19
Built server-side from the verified session by the route. Never derived from model input.
Properties
actor
readonlyactor:object
Defined in: src/server/ai/assistant/tool.ts:25
Always the REAL human (the owner even when "viewing as"), for audit attribution.
email
readonlyemail:string
id
readonlyid:string
companyId
readonlycompanyId:string
Defined in: src/server/ai/assistant/tool.ts:22
contractorId?
readonlyoptionalcontractorId?:string
Defined in: src/server/ai/assistant/tool.ts:29
Contractor surface only — the self-scope identity, injected from the session.
permittedDomains
readonlypermittedDomains:ReadonlySet<"billing"|"overview"|"business_dev"|"recruiting"|"onboarding"|"team"|"time"|"payroll"|"insights"|"settings">
Defined in: src/server/ai/assistant/tool.ts:27
Admin lens: the domains this caller may access (impersonation-aware). Empty for the contractor surface.
surface
readonlysurface:AssistantSurface
Defined in: src/server/ai/assistant/tool.ts:23
svc
readonlysvc:SupabaseClient<Database>
Defined in: src/server/ai/assistant/tool.ts:21
Service-role client for tools whose underlying query takes one (others scope by companyId alone).
viewingAs
readonlyviewingAs:boolean
Defined in: src/server/ai/assistant/tool.ts:30