/** * VoiceIDVault SDK — Agents namespace. * M-of-N human voice authorization for AI agent actions. * * @example * ```ts * const client = new VoiceIDVaultClient({ apiKey: '...' }); * * // 1. Register an agent (org admin, one-time) * const agent = await client.agents.register({ * display_name: 'Treasury Agent', * approval_policy: { m: 3, n: 5 }, * authorized_approvers: [userId1, userId2, userId3, userId4, userId5], * risk_level: 'high', * }); * * // 2. Agent requests authorization before a high-stakes action * const req = await client.agents.requestApproval({ * agent_identity_id: agent.agent_identity_id, * action_description: 'Wire transfer $2,150,000 to JPMorgan acct ending 4521', * expires_in_seconds: 600, * }); * * // 3. Each human approver — after completing ARIA voice auth — casts their vote * const vote = await client.agents.confirmApproval(req.request_id, ariaSessionToken, 'approve'); * if (vote.quorum_reached) { // proceed } * * // 4. Poll status at any time * const status = await client.agents.approvalStatus(req.request_id); * * // 5. Emergency containment (M-of-N kill switch) * const contain = await client.agents.emergencyContain( * agent.agent_identity_id, ariaSessionToken, 'Unauthorized transfers detected' * ); * ``` */ import type { RequestFn } from './http.js'; import type { AgentIdentity, AgentIdentityConfig, ApprovalRequestConfig, ApprovalRequestStatus, ApprovalVoteResult, ContainmentResult, PendingApprovalRequest, VoteChoice, ActionClassificationInput, ActionClassificationResult, BreakGlassInput, BreakGlassResult } from './types.js'; export declare class AgentsNamespace { private readonly doRequest; constructor(doRequest: RequestFn); /** * Register an AI agent with an M-of-N human voice authorization policy. * * POST /api/v1/agents/register * * @param config - Agent configuration including M-of-N policy and authorized voter pool. * @returns The created agent identity record. */ register(config: AgentIdentityConfig): Promise; /** * Submit a request for M-of-N human voice authorization before a high-stakes action. * The agent (or its orchestrator) calls this and then waits for approvals. * * POST /api/v1/agents/request-approval * * @param config - Action description, agent identity ID, and optional TTL. * @returns A pending approval request with request_id and expiry. */ requestApproval(config: ApprovalRequestConfig): Promise; /** * Cast a voice-authenticated approval vote. * * The caller must have completed ARIA voice authentication and hold a valid * session token. The token is passed in the request body as proof of biometric * identity — it is not used as a header credential. * * POST /api/v1/agents/confirm-approval * * @param requestId - The approval request to vote on. * @param sessionToken - ARIA session token from completed voice authentication. * @param vote - 'approve' or 'reject'. * @returns Current vote tally and whether quorum has been reached. */ confirmApproval(requestId: string, sessionToken: string, vote: VoteChoice): Promise; /** * Poll the current vote tally and status of an approval request. * * GET /api/v1/agents/{requestId}/status * * @param requestId - The approval request ID returned by requestApproval. * @returns Status, vote counts, quorum state, and expiry. */ approvalStatus(requestId: string): Promise; /** * Cast an emergency containment vote (M-of-N kill switch). * * Each authorized person submits their voice session token independently. * When M distinct authorized voters have called this endpoint, the agent * is suspended immediately and all active sessions are revoked. * * POST /api/v1/agents/emergency-contain * * @param agentIdentityId - The agent to contain. * @param sessionToken - ARIA session token proving biometric identity. * @param reason - Reason for containment (minimum 10 characters). * @returns Containment state and current vote count vs required M. */ emergencyContain(agentIdentityId: string, sessionToken: string, reason: string): Promise; /** * Classify an agent action into an AACS autonomy level before requesting approval. * * POST /api/v1/agents/classify * * Returns the AACS level (1–5), whether approval is required, minimum approvers, * and EU AI Act Article 14 applicability. */ classifyAction(input: ActionClassificationInput): Promise; /** * Activate the break-glass emergency override when voice auth is blocked by audio quality. * * POST /api/v1/agents/break-glass * * Break-glass is NOT available when explicit rejection votes exist. * Returns a time-limited override_token valid for 5 minutes. * Security team is notified immediately. */ breakGlass(input: BreakGlassInput): Promise; } //# sourceMappingURL=agents.d.ts.map