export interface GovernanceContext { /** Bearer token identifying the end user (JWT, Firebase ID token, or gsk_ key). */ userToken: string; /** Groups related tool calls in the audit log. Auto-generated if not provided. */ sessionId: string; /** Optional: tier override (interactive, subagent, background, api). */ agentTier?: "interactive" | "subagent" | "background" | "api"; /** Optional: agent name shown in the dashboard's Detected Agents view. */ agentName?: string; } /** * Run `fn` with a governance context bound. All `preToolUse` / `postToolOutput` * calls inside this async scope use the bound context's token. * * Typical usage: wrap the per-request handler body with this so the user's * JWT is in scope for every tool call their agent run makes. */ export declare function withContext(ctx: { userToken: string; sessionId?: string; agentTier?: GovernanceContext["agentTier"]; agentName?: string; }, fn: () => Promise): Promise; /** Read the current context. Returns undefined if not inside `withContext`. */ export declare function getContext(): GovernanceContext | undefined; //# sourceMappingURL=context.d.ts.map