import { type AgentArtifactInput, type AgentArtifactReceipt } from './agent-artifacts.js'; export { describeAgentFailure, type AgentFailureFeedback, type AgentFailureContext } from './agent-feedback.js'; import type { AgentAccessTokenProvider } from './agent-auth.js'; import { type AgentTaskBinding, type AgentTaskControlCapabilities, type AgentTaskSnapshot } from './task-control.js'; export type { AgentTaskBinding, AgentTaskControlCapabilities, AgentTaskMember, AgentTaskSnapshot } from './task-control.js'; import { type AgentToolCatalogEntry, type AgentToolInvocation } from './client.js'; import { type AgentKnowledgeCapabilities, type AgentKnowledgeDelivery, type AgentKnowledgeSearch, type AgentKnowledgeRead, type SearchAgentKnowledgeInput, type ReadAgentKnowledgeInput } from './agent-knowledge.js'; export type { AgentKnowledgeCapabilities, AgentKnowledgeDelivery, AgentKnowledgeSearch, AgentKnowledgeRead, SearchAgentKnowledgeInput, ReadAgentKnowledgeInput } from './agent-knowledge.js'; import { type AgentSystemInfo } from './system-info.js'; export type { AgentSystemInfo } from './system-info.js'; import { type ConversationAudit, type ConversationAuditAck, type ConversationAuditEvent, type CreateConversationAuditInput, type ConversationAuditCapabilities } from './conversation-audit.js'; export declare const AGENT_CLIENT_V1_PATHS: { readonly workspaces: "/agent-api/v1/workspaces"; readonly bootstrap: (route: string) => string; readonly systemInfo: (route: string) => string; readonly turns: (route: string) => string; readonly capabilitySearch: (route: string) => string; readonly knowledgeCapabilities: (route: string) => string; readonly knowledgeSearch: (route: string) => string; readonly knowledgeRead: (route: string) => string; readonly toolDetail: (name: string) => string; readonly invocations: "/agent-api/v1/tool-invocations"; readonly invocationInspectionCapabilities: "/agent-api/v1/tool-invocations/inspection-capabilities"; readonly taskControlCapabilities: "/agent-api/v1/task-control/capabilities"; readonly task: (taskId: string) => string; readonly invocationReceipt: (invocationId: string) => string; readonly resumeInvocation: (invocationId: string) => string; readonly completeRun: (runId: string) => string; readonly conversationAudits: "/agent-api/v1/conversation-audits"; readonly conversationAuditCapabilities: "/agent-api/v1/conversation-audits/capabilities"; readonly confirmConversationAudit: (id: string) => string; readonly conversationAuditEvents: (id: string) => string; }; export type AgentClientConnection = { baseUrl: string; clientAppId: string; workspace: string; sessionId: string; accessTokenProvider: AgentAccessTokenProvider; }; export type AgentInvocationInspectionCapabilities = { schema_version: 'bailing.agent-invocation-inspection-capabilities.v1'; receipt_schema: 'bailing.agent-invocation-receipt.v1'; read_only: true; }; /** An observation of the original operation; never a request to resume or repeat it. */ export type AgentInvocationReceipt = { schema_version: 'bailing.agent-invocation-receipt.v1'; read_only: true; business_operation_performed: false; invocation_id: string; agent_run_id: string; route: string; tool: string; observed_at: string; result: AgentToolInvocation | null; result_source: 'job' | 'journal' | 'none'; dispatch_state: 'not_dispatched' | 'attempted' | 'unknown'; approval: { status: 'none' | 'pending' | 'approved' | 'denied'; approval_id?: number; }; journal_state: 'absent' | 'dispatching' | 'response_recorded' | 'completed' | 'uncertain' | 'evidence_degraded' | 'unknown'; }; export type AgentWorkspace = { route: string; name: string; description?: string; }; /** Authorized, revision-bound reference guidance; never a dispatch permission. */ export type AgentToolDetail = { schema_version: 'bailing.agent-tool-detail.v1'; route: string; capability_revision: string; tool: AgentToolCatalogEntry; usage_guidance: { text: string; truncated: boolean; source_chars: number; max_chars: number; source_bytes: number; max_bytes: number; }; }; export type GetAgentToolDetailInput = { name: string; capabilityRevision: string; }; export type AgentWorkspaceList = { schema: 'bailing.agent-workspaces.v1'; workspaces: AgentWorkspace[]; etag?: string; not_modified?: boolean; }; export type AgentRuntimeProfile = { schema: 'bailing.agent-runtime-profile.v1'; workspace: AgentWorkspace; profile: { revision: string; instructions: string; knowledge?: unknown; memory?: unknown; memory_refs?: unknown[]; knowledge_refs?: unknown[]; governance?: Record; renderers?: string[]; }; capabilities: { revision: string; active_tools?: AgentToolCatalogEntry[]; authorized_total?: number; active_limit?: number; readonly?: number; writes?: number; approval_required?: number; }; etag?: string; not_modified?: boolean; }; export type StartAgentTurnInput = { clientConversationId: string; clientTurnId: string; userMessageId: string; userInput: string; pageContext?: Record; renderers?: string[]; }; /** Trusted host state, deliberately separate from model-visible turn input. */ export type StartAgentTurnOptions = { taskBinding?: AgentTaskBinding; knowledgeDelivery?: 'on_demand'; }; export type AgentTurnContext = { schema: 'bailing.agent-turn-context.v1'; run_id: string; profile_revision: string; capability_revision: string; context: { instructions: string; page_context: Record; renderers: string[]; memory: unknown; memory_refs: unknown[]; knowledge: unknown[]; knowledge_refs: unknown[]; governance: Record; knowledge_delivery?: AgentKnowledgeDelivery; }; active_tools: AgentToolCatalogEntry[]; discovery?: AgentCapabilityDiscovery; task_binding?: AgentTaskBinding; }; export type SearchAgentCapabilitiesInput = { query?: string; limit?: number; runId?: string; }; export type AgentCapabilityDiscovery = { mode: 'ranked_candidates'; scope: 'current_authorization'; returned_count: number; authorized_total: number; matched_total: null; matched_total_exact: false; limit: number; truncated: boolean; has_more: boolean; truncation_scope: 'authorized_catalog'; pagination: 'unsupported'; }; export type AgentCapabilitySearchResult = { schema: 'bailing.agent-capability-search.v1'; capability_revision: string; tools: AgentToolCatalogEntry[]; /** Absent on older Core versions; absence means unknown, never zero. */ discovery?: AgentCapabilityDiscovery; }; export type InvokeAgentCapabilityInput = { invocationId: string; capabilityRevision: string; agentRunId: string; tool: string; arguments: Record; }; export type CompleteAgentRunInput = { assistantMessageId: string; content: string; status: 'completed' | 'failed' | 'cancelled'; model?: string; runtime?: string; usage?: Record; }; export type AgentRunCompletion = { schema: 'bailing.agent-run-completion.v1'; run_id: string; status: 'completed' | 'failed' | 'cancelled'; }; type AgentTransportResponse = { status: number; body?: unknown; etag?: string; }; type AgentRequestOptions = { binary?: { body: Buffer; contentType: string; metadata: string; }; expectedStatus?: number; ifNoneMatch?: string; acceptedUnknownOnFailure?: boolean; publicErrorCodes?: readonly string[]; }; /** Host-neutral HTTP boundary for Agent Client API v1. */ export declare class AgentClientTransport { private readonly accessTokenProvider; private readonly fetchImpl; private readonly timeoutMilliseconds; private readonly callerSignal?; readonly baseUrl: string; constructor(baseUrl: string, accessTokenProvider: AgentAccessTokenProvider, fetchImpl?: typeof fetch, timeoutMilliseconds?: number, allowInsecureHttp?: boolean, callerSignal?: AbortSignal | undefined); request(method: 'GET' | 'POST', path: string, body?: Record, options?: AgentRequestOptions): Promise; private send; } /** Framework-neutral Agent Client SDK. It contains no DSH-specific APIs. */ export declare class BailingHubAgentClient { readonly connection: Omit; readonly transport: AgentClientTransport; constructor(connection: AgentClientConnection, options?: { fetchImpl?: typeof fetch; timeoutMilliseconds?: number; allowInsecureHttp?: boolean; signal?: AbortSignal; }); private withFailure; private protocolSupport; private requireTaskProtocol; private requireInspectionProtocol; uploadArtifact(input: AgentArtifactInput): Promise; getArtifact(uploadId: string): Promise; /** Read protocol support with the original Agent bearer. No task or run is created. */ getTaskControlCapabilities(): Promise; /** Observe one original task member. The host must also verify every other selected member. */ getTask(taskIdValue: string, options: { clientConversationId: string; }): Promise; getInvocationInspectionCapabilities(): Promise; /** Read the original receipt using GET only; this never invokes or resumes a business operation. */ inspectInvocation(invocationIdValue: string): Promise; listWorkspaces(options?: { ifNoneMatch?: string; }): Promise; /** Read this exact authorization's product description without creating a run or loading tools. */ getSystemInfo(): Promise; bootstrapWorkspace(options?: { ifNoneMatch?: string; }): Promise; private bootstrapWorkspaceResult; startTurn(input: StartAgentTurnInput, options?: StartAgentTurnOptions): Promise; private startTurnResult; searchCapabilities(input: SearchAgentCapabilitiesInput): Promise; /** Read-only protocol negotiation. Unsupported old endpoints retain inline context delivery. */ getKnowledgeCapabilities(): Promise; searchKnowledge(input: SearchAgentKnowledgeInput): Promise; readKnowledge(input: ReadAgentKnowledgeInput): Promise; /** Fetch only the selected tool's guidance. This never prepares, invokes or resumes a write. */ getToolDetail(input: GetAgentToolDetailInput): Promise; private searchCapabilitiesResult; invoke(input: InvokeAgentCapabilityInput): Promise; private invokeResult; resume(invocationIdValue: unknown): Promise; private resumeResult; getConversationArchiveCapabilities(): Promise; createConversationAudit(input: CreateConversationAuditInput): Promise; confirmConversationAudit(conversationId: string): Promise; appendConversationAuditEvents(conversationId: string, events: ConversationAuditEvent[]): Promise; completeRun(runIdValue: unknown, input: CompleteAgentRunInput): Promise; } //# sourceMappingURL=agent-client.d.ts.map