quantum-ai-sdk 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,174 @@
1
+ # @quantum-encoding/quantum-sdk
2
+
3
+ TypeScript client SDK for the [Quantum AI API](https://api.quantumencoding.ai).
4
+
5
+ ```bash
6
+ npm install @quantum-encoding/quantum-sdk
7
+ ```
8
+
9
+ ## Quick Start
10
+
11
+ ```typescript
12
+ import { QuantumClient } from "@quantum-encoding/quantum-sdk";
13
+
14
+ const client = new QuantumClient("qai_k_your_key_here");
15
+ const response = await client.chat("gemini-2.5-flash", "Hello! What is quantum computing?");
16
+ console.log(response.text);
17
+ ```
18
+
19
+ ## Features
20
+
21
+ - 110+ endpoints across 10 AI providers and 45+ models
22
+ - TypeScript-first with full type definitions
23
+ - ESM + CommonJS dual package
24
+ - Streaming via async iterators
25
+ - Agent orchestration with SSE event streams
26
+ - GPU/CPU compute rental
27
+ - Batch processing (50% discount)
28
+ - Tree-shakeable exports
29
+
30
+ ## Examples
31
+
32
+ ### Chat Completion
33
+
34
+ ```typescript
35
+ import { QuantumClient } from "@quantum-encoding/quantum-sdk";
36
+
37
+ const client = new QuantumClient("qai_k_your_key_here");
38
+
39
+ const response = await client.chat({
40
+ model: "claude-sonnet-4-6",
41
+ messages: [
42
+ { role: "system", content: "You are a helpful assistant." },
43
+ { role: "user", content: "Explain closures in JavaScript" },
44
+ ],
45
+ temperature: 0.7,
46
+ maxTokens: 1000,
47
+ });
48
+
49
+ console.log(response.text);
50
+ ```
51
+
52
+ ### Streaming
53
+
54
+ ```typescript
55
+ const stream = client.chatStream({
56
+ model: "claude-sonnet-4-6",
57
+ messages: [{ role: "user", content: "Write a haiku about TypeScript" }],
58
+ });
59
+
60
+ for await (const event of stream) {
61
+ if (event.deltaText) {
62
+ process.stdout.write(event.deltaText);
63
+ }
64
+ }
65
+ ```
66
+
67
+ ### Image Generation
68
+
69
+ ```typescript
70
+ const images = await client.generateImage("grok-imagine-image", "A cosmic duck in space");
71
+ for (const image of images.images) {
72
+ console.log(image.url ?? "base64");
73
+ }
74
+ ```
75
+
76
+ ### Text-to-Speech
77
+
78
+ ```typescript
79
+ const audio = await client.speak("Welcome to Quantum AI!", "alloy", "mp3");
80
+ console.log(audio.audioUrl);
81
+ ```
82
+
83
+ ### Web Search
84
+
85
+ ```typescript
86
+ const results = await client.webSearch("latest TypeScript releases 2026");
87
+ for (const result of results.results) {
88
+ console.log(`${result.title}: ${result.url}`);
89
+ }
90
+ ```
91
+
92
+ ### Agent Orchestration
93
+
94
+ ```typescript
95
+ const stream = client.agentRun("Research quantum computing breakthroughs");
96
+ for await (const event of stream) {
97
+ switch (event.type) {
98
+ case "content_delta":
99
+ process.stdout.write(event.content ?? "");
100
+ break;
101
+ case "done":
102
+ console.log("\n--- Done ---");
103
+ break;
104
+ }
105
+ }
106
+ ```
107
+
108
+ ## All Endpoints
109
+
110
+ | Category | Endpoints | Description |
111
+ |----------|-----------|-------------|
112
+ | Chat | 2 | Text generation + session chat |
113
+ | Agent | 2 | Multi-step orchestration + missions |
114
+ | Images | 2 | Generation + editing |
115
+ | Video | 7 | Generation, studio, translation, avatars |
116
+ | Audio | 13 | TTS, STT, music, dialogue, dubbing, voice design |
117
+ | Voices | 5 | Clone, list, delete, library, design |
118
+ | Embeddings | 1 | Text embeddings |
119
+ | RAG | 4 | Vertex AI + SurrealDB search |
120
+ | Documents | 3 | Extract, chunk, process |
121
+ | Search | 3 | Web search, context, answers |
122
+ | Scanner | 11 | Code scanning, type queries, diffs |
123
+ | Scraper | 2 | Doc scraping + screenshots |
124
+ | Jobs | 3 | Async job management |
125
+ | Compute | 7 | GPU/CPU rental |
126
+ | Keys | 3 | API key management |
127
+ | Account | 3 | Balance, usage, summary |
128
+ | Credits | 6 | Packs, tiers, lifetime, purchase |
129
+ | Batch | 4 | 50% discount batch processing |
130
+ | Realtime | 3 | Voice sessions |
131
+ | Models | 2 | Model list + pricing |
132
+
133
+ ## Authentication
134
+
135
+ Pass your API key when creating the client:
136
+
137
+ ```typescript
138
+ const client = new QuantumClient("qai_k_your_key_here");
139
+ ```
140
+
141
+ The SDK sends it as the `X-API-Key` header. Both `qai_...` (primary) and `qai_k_...` (scoped) keys are supported. You can also use `Authorization: Bearer <key>`.
142
+
143
+ Get your API key at [cosmicduck.dev](https://cosmicduck.dev).
144
+
145
+ ## Pricing
146
+
147
+ See [api.quantumencoding.ai/pricing](https://api.quantumencoding.ai/pricing) for current rates.
148
+
149
+ The **Lifetime tier** offers 0% margin at-cost pricing via a one-time payment.
150
+
151
+ ## Other SDKs
152
+
153
+ All SDKs are at v0.4.0 with type parity verified by scanner.
154
+
155
+ | Language | Package | Install |
156
+ |----------|---------|---------|
157
+ | Rust | quantum-sdk | `cargo add quantum-sdk` |
158
+ | Go | quantum-sdk | `go get github.com/quantum-encoding/quantum-sdk` |
159
+ | **TypeScript** | @quantum-encoding/quantum-sdk | `npm i @quantum-encoding/quantum-sdk` |
160
+ | Python | quantum-sdk | `pip install quantum-sdk` |
161
+ | Swift | QuantumSDK | Swift Package Manager |
162
+ | Kotlin | quantum-sdk | Gradle dependency |
163
+
164
+ MCP server: `npx @quantum-encoding/ai-conductor-mcp`
165
+
166
+ ## API Reference
167
+
168
+ - Interactive docs: [api.quantumencoding.ai/docs](https://api.quantumencoding.ai/docs)
169
+ - OpenAPI spec: [api.quantumencoding.ai/openapi.yaml](https://api.quantumencoding.ai/openapi.yaml)
170
+ - LLM context: [api.quantumencoding.ai/llms.txt](https://api.quantumencoding.ai/llms.txt)
171
+
172
+ ## License
173
+
174
+ MIT
package/dist/chat.js CHANGED
@@ -92,12 +92,33 @@ export async function* chatStream(client, req, signal) {
92
92
  event.delta = raw.delta;
93
93
  break;
94
94
  case "tool_use":
95
+ // Legacy atomic event — kept for back-compat with backends
96
+ // that haven't yet shipped the triplet (v0.6+).
95
97
  event.tool_use = {
96
98
  id: String(raw.id ?? ""),
97
99
  name: String(raw.name ?? ""),
98
100
  input: raw.input ?? {},
99
101
  };
100
102
  break;
103
+ case "tool_use_start":
104
+ event.tool_use_start = {
105
+ id: String(raw.id ?? ""),
106
+ name: String(raw.name ?? ""),
107
+ };
108
+ break;
109
+ case "tool_use_input_delta":
110
+ event.tool_use_input_delta = {
111
+ id: String(raw.id ?? ""),
112
+ partial_json: String(raw.partial_json ?? ""),
113
+ };
114
+ break;
115
+ case "tool_use_complete":
116
+ event.tool_use_complete = {
117
+ id: String(raw.id ?? ""),
118
+ name: String(raw.name ?? ""),
119
+ input: raw.input ?? {},
120
+ };
121
+ break;
101
122
  case "usage":
102
123
  event.usage = {
103
124
  input_tokens: raw.input_tokens ?? 0,
package/dist/index.d.ts CHANGED
@@ -5,7 +5,10 @@ export { realtimeConnect, realtimeConnectDirect, realtimeSession, realtimeEnd, r
5
5
  export type { RealtimeConfig, RealtimeEvent, RealtimeSession } from "./realtime.js";
6
6
  export { contact } from "./contact.js";
7
7
  export type { BillingRequest, BillingEntry, BillingResponse } from "./compute-billing.js";
8
- export type { ClientOptions, ResponseMeta, ChatRequest, ChatMessage, ChatTool, ContentBlock, ChatUsage, ChatResponse, StreamEvent, StreamDelta, StreamToolUse, SessionChatRequest, SessionChatResponse, SessionToolResult, ContextConfig, ContextMetadata, AgentRequest, AgentWorkerConfig, AgentEvent, MissionRequest, MissionWorkerConfig, MissionEvent, ImageRequest, ImageResponse, GeneratedImage, ImageEditRequest, ImageEditResponse, TTSRequest, TTSResponse, STTRequest, STTResponse, MusicRequest, MusicClip, MusicResponse, SoundEffectRequest, SoundEffectResponse, DialogueRequest, DialogueResponse, DialogueVoice, SpeechToSpeechRequest, SpeechToSpeechResponse, IsolateVoiceRequest, IsolateVoiceResponse, RemixVoiceRequest, RemixVoiceResponse, DubRequest, DubResponse, AlignRequest, AlignResponse, AlignedWord, VoiceDesignRequest, VoiceDesignResponse, VoicePreview, StarfishTTSRequest, StarfishTTSResponse, VideoRequest, VideoResponse, GeneratedVideo, VideoStudioRequest, VideoTranslateRequest, PhotoAvatarRequest, DigitalTwinRequest, AsyncJobResponse, AvatarsResponse, HeyGenAvatar, HeyGenTemplatesResponse, HeyGenTemplate, HeyGenVoicesResponse, HeyGenVoice, EmbedRequest, EmbedResponse, DocumentRequest, DocumentResponse, ChunkDocumentRequest, ChunkDocumentResponse, DocumentChunk, ProcessDocumentRequest, ProcessDocumentResponse, RAGSearchRequest, RAGSearchResponse, RAGResult, RAGCorpus, SurrealRAGSearchRequest, SurrealRAGSearchResponse, SurrealRAGResult, SurrealRAGProvidersResponse, SurrealRAGProviderInfo, ModelInfo, PricingInfo, BalanceResponse, UsageEntry, UsageResponse, UsageQuery, UsageSummaryMonth, UsageSummaryResponse, PricingEntry, AccountPricingResponse, JobCreateRequest, JobCreateResponse, JobStatusResponse, JobListResponse, JobStreamEvent, JobListItem, CreateKeyRequest, CreateKeyResponse, KeyDetails, ListKeysResponse, ComputeTemplate, TemplatesResponse, ProvisionRequest, ProvisionResponse, ComputeInstanceInfo, InstancesResponse, InstanceDetailInfo, InstanceResponse, SSHKeyRequest, DeleteResponse, VoiceInfo, VoicesResponse, CloneVoiceRequest, CloneVoiceResponse, ContactRequest, BatchJobInput, BatchSubmitRequest, BatchSubmitResponse, BatchJsonlResponse, BatchJobInfo, BatchJobsResponse, CreditPack, CreditPacksResponse, CreditPurchaseRequest, CreditPurchaseResponse, CreditBalanceResponse, CreditTier, CreditTiersResponse, DevProgramApplyRequest, DevProgramApplyResponse, AuthUser, AuthResponse, AuthAppleRequest, WebSearchRequest, WebSearchResponse, WebSearchResult, NewsResult, VideoSearchResult, LLMContextRequest, LLMContextResponse, ContentChunk, ContextSource, SearchAnswerRequest, SearchAnswerResponse, SearchAnswerChoice, SearchCitation, StatusResponse, Citation, CollectionsListResponse, CollectionDocumentsResponse, CollectionSearchResponse, CreateCollectionRequest, DeleteCollectionResponse, ModelsResponse, RagCorporaResponse, Infobox, Discussion, TextToSpeechRequest, TextToSpeechResponse, SpeechToTextRequest, SpeechToTextResponse, ContactResponse, ContextChunk, ContextOptions, HeyGenAvatarsResponse, JobAcceptedResponse, JobListEntry, PostProcess, RealtimeSessionResponse, SearchMessage, SearchOptions, } from "./types.js";
8
+ export type { ClientOptions, ResponseMeta, ChatRequest, ChatMessage, ChatTool, ContentBlock, ChatUsage, ChatResponse, StreamEvent, StreamDelta, StreamToolUse, SessionChatRequest, SessionChatResponse, SessionToolResult, ContextConfig, ContextMetadata, AgentRequest, AgentWorkerConfig, AgentEvent, MissionRequest, MissionWorkerConfig, MissionEvent, ImageRequest, ImageResponse, GeneratedImage, ImageEditRequest, ImageEditResponse, TTSRequest, TTSResponse, STTRequest, STTResponse, MusicRequest, MusicClip, MusicResponse, SoundEffectRequest, SoundEffectResponse, DialogueRequest, DialogueResponse, DialogueVoice, SpeechToSpeechRequest, SpeechToSpeechResponse, IsolateVoiceRequest, IsolateVoiceResponse, RemixVoiceRequest, RemixVoiceResponse, DubRequest, DubResponse, AlignRequest, AlignResponse, AlignedWord, VoiceDesignRequest, VoiceDesignResponse, VoicePreview, StarfishTTSRequest, StarfishTTSResponse, VideoRequest, VideoResponse, GeneratedVideo, VideoStudioRequest, VideoTranslateRequest, PhotoAvatarRequest, DigitalTwinRequest, AsyncJobResponse, AvatarsResponse, HeyGenAvatar, HeyGenTemplatesResponse, HeyGenTemplate, HeyGenVoicesResponse, HeyGenVoice, EmbedRequest, EmbedResponse, DocumentRequest, DocumentResponse, ChunkDocumentRequest, ChunkDocumentResponse, DocumentChunk, ProcessDocumentRequest, ProcessDocumentResponse, RAGSearchRequest, RAGSearchResponse, RAGResult, RAGCorpus, SurrealRAGSearchRequest, SurrealRAGSearchResponse, SurrealRAGResult, SurrealRAGProvidersResponse, SurrealRAGProviderInfo, ModelInfo, PricingInfo, BalanceResponse, UsageEntry, UsageResponse, UsageQuery, UsageSummaryMonth, UsageSummaryResponse, PricingEntry, AccountPricingResponse, JobCreateRequest, JobCreateResponse, JobStatusResponse, JobListResponse, JobStreamEvent, JobListItem, CreateKeyRequest, CreateKeyResponse, KeyDetails, ListKeysResponse, ComputeTemplate, TemplatesResponse, ProvisionRequest, ProvisionResponse, ComputeInstanceInfo, InstancesResponse, InstanceDetailInfo, InstanceResponse, SSHKeyRequest, DeleteResponse, VoiceInfo, VoicesResponse, CloneVoiceRequest, CloneVoiceResponse, ContactRequest, BatchJobInput, BatchSubmitRequest, BatchSubmitResponse, BatchJsonlResponse, BatchJobInfo, BatchJobsResponse, CreditPack, CreditPacksResponse, CreditPurchaseRequest, CreditPurchaseResponse, CreditBalanceResponse, CreditTier, CreditTiersResponse, DevProgramApplyRequest, DevProgramApplyResponse, AuthUser, AuthResponse, AuthAppleRequest, WebSearchRequest, WebSearchResponse, WebSearchResult, NewsResult, VideoSearchResult, LLMContextRequest, LLMContextResponse, ContentChunk, ContextSource, SearchAnswerRequest, SearchAnswerResponse, SearchAnswerChoice, SearchCitation, StatusResponse, Citation, CollectionsListResponse, CollectionDocumentsResponse, CollectionSearchResponse, CreateCollectionRequest, DeleteCollectionResponse, ModelsResponse, RagCorporaResponse, Infobox, Discussion, TextToSpeechRequest, TextToSpeechResponse, SpeechToTextRequest, SpeechToTextResponse, ContactResponse, ContextChunk, ContextOptions, HeyGenAvatarsResponse, JobAcceptedResponse, JobListEntry, PostProcess, RealtimeSessionResponse, SearchMessage, SearchOptions, ScrapeTarget, ScrapeRequest, ScrapeResponse, ScreenshotURL, ScreenshotRequest, ScreenshotResult, ScreenshotResponse, } from "./types.js";
9
+ export type { VisionRequest, VisionContext, VisionResponse, DetectedObject, QualityAssessment, RelevanceCheck, OcrResult, TextOverlay, } from "./vision.js";
10
+ export type { MissionCreateRequest, MissionChatRequest, MissionPlanUpdate, MissionConfirmStructure, MissionApproveRequest, MissionImportRequest, MissionCreateResponse, MissionDetail, MissionTask, MissionListResponse, MissionChatResponse, MissionChatUsage, MissionCheckpoint, MissionCheckpointsResponse, MissionStatusResponse, } from "./missions.js";
11
+ export type { SecurityScanUrlRequest, SecurityScanHtmlRequest, SecurityReportRequest, SecurityScanResponse, SecurityAssessment, SecurityFinding, SecurityCheckResponse, SecurityBlocklistResponse, SecurityBlocklistEntry, SecurityReportResponse, } from "./security.js";
9
12
  export { DEFAULT_BASE_URL, TICKS_PER_USD } from "./types.js";
10
13
  import type { ChatMessage } from "./types.js";
11
14
  /** Create a user message. */
@@ -0,0 +1,280 @@
1
+ import type { QuantumClient } from "./client.js";
2
+ /** Worker configuration within a mission. */
3
+ export interface MissionWorkerConfig {
4
+ /** Model to use for this worker. */
5
+ model: string;
6
+ /** Cost tier: "cheap", "mid", "expensive". */
7
+ tier: string;
8
+ /** Worker description / capabilities. */
9
+ description?: string;
10
+ }
11
+ /** Request body for creating a mission. */
12
+ export interface MissionCreateRequest {
13
+ /** High-level task description. */
14
+ goal: string;
15
+ /** Strategy: "wave" (default), "dag", "mapreduce", "refinement", "branch". */
16
+ strategy?: string;
17
+ /** Conductor model (default: claude-sonnet-4-6). */
18
+ conductorModel?: string;
19
+ /** Worker team configuration (keyed by worker name). */
20
+ workers?: Record<string, MissionWorkerConfig>;
21
+ /** Maximum orchestration steps (default: 25). */
22
+ maxSteps?: number;
23
+ /** Custom system prompt for the conductor. */
24
+ systemPrompt?: string;
25
+ /** Existing session ID for context continuity. */
26
+ sessionId?: string;
27
+ }
28
+ /** Request body for chatting with a mission's architect. */
29
+ export interface MissionChatRequest {
30
+ /** Message to send to the architect. */
31
+ message: string;
32
+ /** Enable streaming (not yet supported). */
33
+ stream?: boolean;
34
+ }
35
+ /** Request body for updating a mission plan. */
36
+ export interface MissionPlanUpdate {
37
+ /** Updated task list. */
38
+ tasks?: Record<string, unknown>[];
39
+ /** Updated worker configuration. */
40
+ workers?: Record<string, MissionWorkerConfig>;
41
+ /** Additional system prompt. */
42
+ systemPrompt?: string;
43
+ /** Updated max steps. */
44
+ maxSteps?: number;
45
+ /** Additional context to inject. */
46
+ context?: string;
47
+ }
48
+ /** Request body for confirming/rejecting a mission structure. */
49
+ export interface MissionConfirmStructure {
50
+ /** Whether the structure is approved. */
51
+ confirmed: boolean;
52
+ /** Rejection reason or modification notes. */
53
+ feedback?: string;
54
+ }
55
+ /** Request body for approving a completed mission. */
56
+ export interface MissionApproveRequest {
57
+ /** Git commit SHA associated with the mission output. */
58
+ commitSha?: string;
59
+ /** Approval comment. */
60
+ comment?: string;
61
+ }
62
+ /** Request body for importing a plan as a new mission. */
63
+ export interface MissionImportRequest {
64
+ /** Mission goal. */
65
+ goal: string;
66
+ /** Strategy. */
67
+ strategy?: string;
68
+ /** Conductor model. */
69
+ conductorModel?: string;
70
+ /** Worker configuration. */
71
+ workers?: Record<string, MissionWorkerConfig>;
72
+ /** Pre-defined tasks. */
73
+ tasks: Record<string, unknown>[];
74
+ /** System prompt. */
75
+ systemPrompt?: string;
76
+ /** Maximum steps. */
77
+ maxSteps?: number;
78
+ /** Auto-execute after import. */
79
+ autoExecute?: boolean;
80
+ }
81
+ /** Response from mission creation. */
82
+ export interface MissionCreateResponse {
83
+ /** Mission identifier. */
84
+ missionId: string;
85
+ /** Initial status. */
86
+ status: string;
87
+ /** Session ID for conversation context. */
88
+ sessionId?: string;
89
+ /** Conductor model used. */
90
+ conductorModel?: string;
91
+ /** Strategy used. */
92
+ strategy?: string;
93
+ /** Worker configuration. */
94
+ workers?: Record<string, MissionWorkerConfig>;
95
+ /** Creation timestamp. */
96
+ createdAt?: string;
97
+ /** Request identifier. */
98
+ requestId?: string;
99
+ }
100
+ /** A task within a mission. */
101
+ export interface MissionTask {
102
+ /** Task identifier. */
103
+ id?: string;
104
+ /** Task name. */
105
+ name?: string;
106
+ /** Task description. */
107
+ description?: string;
108
+ /** Assigned worker name. */
109
+ worker?: string;
110
+ /** Model used. */
111
+ model?: string;
112
+ /** Task status. */
113
+ status?: string;
114
+ /** Task result. */
115
+ result?: string;
116
+ /** Error message if failed. */
117
+ error?: string;
118
+ /** Step number. */
119
+ step: number;
120
+ /** Input tokens used. */
121
+ tokensIn: number;
122
+ /** Output tokens used. */
123
+ tokensOut: number;
124
+ }
125
+ /** Mission detail (from GET /missions/{id}). */
126
+ export interface MissionDetail {
127
+ /** Mission identifier. */
128
+ id?: string;
129
+ /** User who created the mission. */
130
+ userId?: string;
131
+ /** Mission goal. */
132
+ goal?: string;
133
+ /** Strategy. */
134
+ strategy?: string;
135
+ /** Conductor model. */
136
+ conductorModel?: string;
137
+ /** Current status. */
138
+ status?: string;
139
+ /** Creation timestamp. */
140
+ createdAt?: string;
141
+ /** Start timestamp. */
142
+ startedAt?: string;
143
+ /** Completion timestamp. */
144
+ completedAt?: string;
145
+ /** Error message if failed. */
146
+ error?: string;
147
+ /** Total cost in ticks. */
148
+ costTicks: number;
149
+ /** Number of steps executed. */
150
+ totalSteps: number;
151
+ /** Session ID. */
152
+ sessionId?: string;
153
+ /** Final result text. */
154
+ result?: string;
155
+ /** Tasks within the mission. */
156
+ tasks: MissionTask[];
157
+ /** Whether the mission was approved. */
158
+ approved: boolean;
159
+ /** Commit SHA (if approved). */
160
+ commitSha?: string;
161
+ }
162
+ /** Response from listing missions. */
163
+ export interface MissionListResponse {
164
+ /** List of missions. */
165
+ missions: MissionDetail[];
166
+ }
167
+ /** Token usage for a mission chat response. */
168
+ export interface MissionChatUsage {
169
+ inputTokens: number;
170
+ outputTokens: number;
171
+ }
172
+ /** Response from chatting with the architect. */
173
+ export interface MissionChatResponse {
174
+ /** Mission identifier. */
175
+ missionId?: string;
176
+ /** Architect's response content. */
177
+ content?: string;
178
+ /** Model used. */
179
+ model?: string;
180
+ /** Cost in ticks. */
181
+ costTicks: number;
182
+ /** Token usage. */
183
+ usage?: MissionChatUsage;
184
+ }
185
+ /** A git checkpoint within a mission. */
186
+ export interface MissionCheckpoint {
187
+ /** Checkpoint identifier. */
188
+ id?: string;
189
+ /** Commit SHA. */
190
+ commitSha?: string;
191
+ /** Checkpoint message. */
192
+ message?: string;
193
+ /** Creation timestamp. */
194
+ createdAt?: string;
195
+ }
196
+ /** Response from listing checkpoints. */
197
+ export interface MissionCheckpointsResponse {
198
+ missionId?: string;
199
+ checkpoints: MissionCheckpoint[];
200
+ }
201
+ /** Generic status response for mission operations. */
202
+ export interface MissionStatusResponse {
203
+ missionId?: string;
204
+ status?: string;
205
+ confirmed?: boolean;
206
+ approved?: boolean;
207
+ deleted?: boolean;
208
+ updated?: boolean;
209
+ commitSha?: string;
210
+ }
211
+ /**
212
+ * Create and execute a mission asynchronously.
213
+ * @internal
214
+ */
215
+ export declare function missionCreate(client: QuantumClient, req: MissionCreateRequest): Promise<MissionCreateResponse>;
216
+ /**
217
+ * List missions for the authenticated user.
218
+ * @internal
219
+ */
220
+ export declare function missionList(client: QuantumClient, status?: string): Promise<MissionListResponse>;
221
+ /**
222
+ * Get mission details including tasks.
223
+ * @internal
224
+ */
225
+ export declare function missionGet(client: QuantumClient, missionId: string): Promise<MissionDetail>;
226
+ /**
227
+ * Delete a mission.
228
+ * @internal
229
+ */
230
+ export declare function missionDelete(client: QuantumClient, missionId: string): Promise<MissionStatusResponse>;
231
+ /**
232
+ * Cancel a running mission.
233
+ * @internal
234
+ */
235
+ export declare function missionCancel(client: QuantumClient, missionId: string): Promise<MissionStatusResponse>;
236
+ /**
237
+ * Pause a running mission.
238
+ * @internal
239
+ */
240
+ export declare function missionPause(client: QuantumClient, missionId: string): Promise<MissionStatusResponse>;
241
+ /**
242
+ * Resume a paused mission.
243
+ * @internal
244
+ */
245
+ export declare function missionResume(client: QuantumClient, missionId: string): Promise<MissionStatusResponse>;
246
+ /**
247
+ * Chat with the mission's architect.
248
+ * @internal
249
+ */
250
+ export declare function missionChat(client: QuantumClient, missionId: string, req: MissionChatRequest): Promise<MissionChatResponse>;
251
+ /**
252
+ * Retry a failed task.
253
+ * @internal
254
+ */
255
+ export declare function missionRetryTask(client: QuantumClient, missionId: string, taskId: string): Promise<MissionStatusResponse>;
256
+ /**
257
+ * Approve a completed mission.
258
+ * @internal
259
+ */
260
+ export declare function missionApprove(client: QuantumClient, missionId: string, req: MissionApproveRequest): Promise<MissionStatusResponse>;
261
+ /**
262
+ * Update the mission plan.
263
+ * @internal
264
+ */
265
+ export declare function missionUpdatePlan(client: QuantumClient, missionId: string, req: MissionPlanUpdate): Promise<MissionStatusResponse>;
266
+ /**
267
+ * Confirm or reject the proposed execution structure.
268
+ * @internal
269
+ */
270
+ export declare function missionConfirmStructure(client: QuantumClient, missionId: string, req: MissionConfirmStructure): Promise<MissionStatusResponse>;
271
+ /**
272
+ * List git checkpoints for a mission.
273
+ * @internal
274
+ */
275
+ export declare function missionCheckpoints(client: QuantumClient, missionId: string): Promise<MissionCheckpointsResponse>;
276
+ /**
277
+ * Import an existing plan as a new mission.
278
+ * @internal
279
+ */
280
+ export declare function missionImport(client: QuantumClient, req: MissionImportRequest): Promise<MissionCreateResponse>;