export declare const DEFAULT_TOOL_TOKEN_TTL_MS: number;
export declare const CHAT_TOOL_ENDPOINTS: readonly ["/api/tools/live-artifacts/create", "/api/tools/live-artifacts/list", "/api/tools/live-artifacts/refresh", "/api/tools/live-artifacts/update", "/api/tools/connectors/list", "/api/tools/connectors/execute"];
export declare const CHAT_TOOL_OPERATIONS: readonly ["live-artifacts:create", "live-artifacts:list", "live-artifacts:refresh", "live-artifacts:update", "connectors:list", "connectors:execute"];
export type ToolEndpoint = (typeof CHAT_TOOL_ENDPOINTS)[number] | (string & {});
export type ToolOperation = (typeof CHAT_TOOL_OPERATIONS)[number] | (string & {});
export type ToolTokenRevocationReason = 'child_exit' | 'sse_end' | 'ttl_expired' | 'manual';
export type ToolTokenErrorCode = 'TOOL_TOKEN_MISSING' | 'TOOL_TOKEN_INVALID' | 'TOOL_TOKEN_EXPIRED' | 'TOOL_ENDPOINT_DENIED' | 'TOOL_OPERATION_DENIED';
export interface ToolTokenGrant {
    token: string;
    runId: string;
    projectId: string;
    allowedEndpoints: readonly ToolEndpoint[];
    allowedOperations: readonly ToolOperation[];
    issuedAt: string;
    expiresAt: string;
}
export interface MintToolTokenOptions {
    runId: string;
    projectId: string;
    allowedEndpoints?: readonly ToolEndpoint[];
    allowedOperations?: readonly ToolOperation[];
    ttlMs?: number;
    nowMs?: number;
}
export type ToolTokenValidationResult = {
    ok: true;
    grant: ToolTokenGrant;
} | {
    ok: false;
    code: ToolTokenErrorCode;
    message: string;
};
export declare class ToolTokenRegistry {
    #private;
    mint(options: MintToolTokenOptions): ToolTokenGrant;
    validate(token: string | null | undefined, options?: {
        endpoint?: string;
        operation?: string;
        nowMs?: number;
    }): ToolTokenValidationResult;
    revokeToken(token: string | null | undefined, _reason?: ToolTokenRevocationReason): boolean;
    revokeRun(runId: string, reason?: ToolTokenRevocationReason): number;
    activeTokenCount(): number;
    activeRunTokenCount(runId: string): number;
    clear(): void;
}
export declare const toolTokenRegistry: ToolTokenRegistry;
