import type { GraphQLClient } from '../client.js'; import type { CrowdyAgentApprovalV1, CrowdyAgentBudgetV1, CrowdyAgentHeartbeatV1, CrowdyAgentLeaseV1, CrowdyAgentMode, CrowdyAgentPreemptionReason, CrowdyAgentRegisteredToolV1, CrowdyAgentRunV1, CrowdyAgentSessionV1, CrowdyAgentToolCallAckV1, CrowdyAgentToolResultV1 } from './types.js'; import type { CrowdyAgentConnectionV1, CrowdyAgentCreateSessionInputV1, CrowdyAgentEventSubscriptionHandlersV1, CrowdyAgentEventSubscriptionV1, CrowdyAgentHistoryPageV1, CrowdyStudioAgentTransportV1 } from './transport.js'; export interface CrowdyAgentGraphQLSubscriptionClient { subscribe(payload: { query: string; variables: Readonly>; }, sink: { next(value: { data?: unknown; errors?: readonly unknown[]; }): void; error(error: unknown): void; complete(): void; }): () => void; dispose(): void | Promise; } export interface CrowdyAgentGraphQLTransportOptions { /** graphql-transport-ws endpoint used only for durable agent events. */ readonly wsUrl?: string; readonly getToken: () => string | null; readonly webSocketImpl?: unknown; /** Deterministic injection seam for generated-document integration tests. */ readonly subscriptionClientFactory?: () => CrowdyAgentGraphQLSubscriptionClient; } /** * Production generated-GraphQL adapter for `CrowdyStudioAgentTransportV1`. * Every HTTP and subscription shape is selected by committed typed documents. */ export declare class CrowdyAgentGraphQLTransport implements CrowdyStudioAgentTransportV1 { private readonly graphql; private readonly options; private readonly activeSubscriptions; constructor(graphql: GraphQLClient, options: CrowdyAgentGraphQLTransportOptions); getSession(sessionId: string): Promise; listSessions(input: { readonly appId: string; readonly after?: string; readonly first: number; }): Promise>; history(input: { readonly sessionId: string; readonly afterSeq: string; readonly first: number; }): Promise; toolDescriptors(sessionId: string): Promise<{ readonly registryDigest: string; readonly tools: readonly CrowdyAgentRegisteredToolV1[]; }>; budget(sessionId: string): Promise; createSession(input: CrowdyAgentCreateSessionInputV1): Promise; attachClient(input: { readonly sessionId: string; readonly clientInstanceId?: string; readonly idempotencyKey: string; }): Promise<{ readonly session: CrowdyAgentSessionV1; readonly clientEpoch: string; readonly replayAfterSeq: string; }>; setMode(input: { readonly sessionId: string; readonly clientEpoch: string; readonly idempotencyKey: string; readonly mode: CrowdyAgentMode; }): Promise; acknowledgeEvents(input: { readonly sessionId: string; readonly clientEpoch: string; readonly idempotencyKey: string; readonly throughSeq: string; }): Promise<{ readonly throughSeq: string; }>; heartbeat(input: { readonly sessionId: string; readonly clientEpoch: string; readonly idempotencyKey: string; }): Promise; sendMessage(input: { readonly sessionId: string; readonly clientEpoch: string; readonly idempotencyKey: string; readonly message: string; }): Promise; approveTool(input: { readonly sessionId: string; readonly clientEpoch: string; readonly idempotencyKey: string; readonly toolCallId: string; readonly argumentHash: string; }): Promise; rejectTool(input: { readonly sessionId: string; readonly clientEpoch: string; readonly idempotencyKey: string; readonly toolCallId: string; readonly argumentHash: string; readonly reason?: string; }): Promise; toolResult(input: { readonly sessionId: string; readonly clientEpoch: string; readonly idempotencyKey: string; readonly result: CrowdyAgentToolResultV1; }): Promise; grantLease(input: { readonly sessionId: string; readonly clientEpoch: string; readonly idempotencyKey: string; readonly scopes: readonly string[]; readonly durationSeconds: number; readonly controlledEntityId: string; readonly hostCapabilityRevision: string; }): Promise; revokeLease(input: { readonly sessionId: string; readonly clientEpoch: string; readonly idempotencyKey: string; readonly leaseId: string; readonly reason: CrowdyAgentPreemptionReason; }): Promise; pause(input: { readonly sessionId: string; readonly clientEpoch: string; readonly idempotencyKey: string; }): Promise; resume(input: { readonly sessionId: string; readonly clientEpoch: string; readonly idempotencyKey: string; }): Promise; cancelRun(input: { readonly sessionId: string; readonly clientEpoch: string; readonly idempotencyKey: string; readonly runId: string; }): Promise; closeSession(input: { readonly sessionId: string; readonly clientEpoch: string; readonly idempotencyKey: string; }): Promise; subscribeEvents(input: { readonly sessionId: string; readonly afterSeq: string; readonly clientEpoch: string; }, handlers: CrowdyAgentEventSubscriptionHandlersV1): CrowdyAgentEventSubscriptionV1; /** Close all agent event sockets owned by this adapter. */ close(): void; private createSubscriptionClient; private request; } //# sourceMappingURL=graphql-transport.d.ts.map