@arcships/aimux 0.5.0 → 0.6.1

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.
Files changed (305) hide show
  1. package/README.md +92 -0
  2. package/dist/error.d.ts +28 -137
  3. package/dist/error.js +71 -100
  4. package/dist/generated/ops.d.ts +75 -0
  5. package/dist/generated/ops.js +80 -0
  6. package/dist/generated/types.d.ts +5613 -0
  7. package/dist/{types/CallOptions.js → generated/types.js} +1 -0
  8. package/dist/index.d.ts +144 -211
  9. package/dist/index.js +314 -344
  10. package/dist/native.d.ts +29 -1
  11. package/dist/native.js +99 -29
  12. package/dist/types.d.ts +1 -144
  13. package/dist/types.js +0 -3
  14. package/index.d.ts +21 -545
  15. package/index.js +57 -112
  16. package/package.json +16 -13
  17. package/dist/types/AiMuxError.d.ts +0 -66
  18. package/dist/types/AiMuxError.js +0 -2
  19. package/dist/types/ApiCallError.d.ts +0 -75
  20. package/dist/types/ApiCallError.js +0 -2
  21. package/dist/types/AspectRatio.d.ts +0 -11
  22. package/dist/types/AspectRatio.js +0 -3
  23. package/dist/types/AudioChunk.d.ts +0 -8
  24. package/dist/types/AudioChunk.js +0 -3
  25. package/dist/types/AudioData.d.ts +0 -11
  26. package/dist/types/AudioData.js +0 -3
  27. package/dist/types/AudioInput.d.ts +0 -8
  28. package/dist/types/AudioInput.js +0 -3
  29. package/dist/types/BreakKind.d.ts +0 -1
  30. package/dist/types/BreakKind.js +0 -3
  31. package/dist/types/CallOptions.d.ts +0 -117
  32. package/dist/types/CatalogueSource.d.ts +0 -4
  33. package/dist/types/CatalogueSource.js +0 -3
  34. package/dist/types/ChatCompletion.d.ts +0 -16
  35. package/dist/types/ChatCompletion.js +0 -2
  36. package/dist/types/ChatCompletionChoice.d.ts +0 -8
  37. package/dist/types/ChatCompletionChoice.js +0 -2
  38. package/dist/types/ChatCompletionChunk.d.ts +0 -15
  39. package/dist/types/ChatCompletionChunk.js +0 -2
  40. package/dist/types/ChatCompletionChunkChoice.d.ts +0 -8
  41. package/dist/types/ChatCompletionChunkChoice.js +0 -2
  42. package/dist/types/ChatCompletionChunkFunction.d.ts +0 -4
  43. package/dist/types/ChatCompletionChunkFunction.js +0 -3
  44. package/dist/types/ChatCompletionChunkToolCall.d.ts +0 -7
  45. package/dist/types/ChatCompletionChunkToolCall.js +0 -2
  46. package/dist/types/ChatCompletionDelta.d.ts +0 -7
  47. package/dist/types/ChatCompletionDelta.js +0 -2
  48. package/dist/types/ChatCompletionFunction.d.ts +0 -4
  49. package/dist/types/ChatCompletionFunction.js +0 -3
  50. package/dist/types/ChatCompletionMessage.d.ts +0 -9
  51. package/dist/types/ChatCompletionMessage.js +0 -2
  52. package/dist/types/ChatCompletionToolCall.d.ts +0 -6
  53. package/dist/types/ChatCompletionToolCall.js +0 -2
  54. package/dist/types/ChatCompletionUsage.d.ts +0 -9
  55. package/dist/types/ChatCompletionUsage.js +0 -2
  56. package/dist/types/CompletionTokensDetails.d.ts +0 -3
  57. package/dist/types/CompletionTokensDetails.js +0 -3
  58. package/dist/types/ContentPart.d.ts +0 -112
  59. package/dist/types/ContentPart.js +0 -2
  60. package/dist/types/EmbeddingCallOptions.d.ts +0 -33
  61. package/dist/types/EmbeddingCallOptions.js +0 -2
  62. package/dist/types/EmbeddingResponse.d.ts +0 -16
  63. package/dist/types/EmbeddingResponse.js +0 -2
  64. package/dist/types/EmbeddingResult.d.ts +0 -33
  65. package/dist/types/EmbeddingResult.js +0 -2
  66. package/dist/types/EmbeddingUsage.d.ts +0 -9
  67. package/dist/types/EmbeddingUsage.js +0 -3
  68. package/dist/types/FileBytes.d.ts +0 -12
  69. package/dist/types/FileBytes.js +0 -3
  70. package/dist/types/FileData.d.ts +0 -25
  71. package/dist/types/FileData.js +0 -2
  72. package/dist/types/FilePart.d.ts +0 -8
  73. package/dist/types/FilePart.js +0 -2
  74. package/dist/types/Fingerprint.d.ts +0 -21
  75. package/dist/types/Fingerprint.js +0 -3
  76. package/dist/types/FinishReason.d.ts +0 -14
  77. package/dist/types/FinishReason.js +0 -2
  78. package/dist/types/FinishReasonUnified.d.ts +0 -4
  79. package/dist/types/FinishReasonUnified.js +0 -3
  80. package/dist/types/FunctionTool.d.ts +0 -35
  81. package/dist/types/FunctionTool.js +0 -2
  82. package/dist/types/GenerateContent.d.ts +0 -88
  83. package/dist/types/GenerateContent.js +0 -2
  84. package/dist/types/GenerateObjectResult.d.ts +0 -48
  85. package/dist/types/GenerateObjectResult.js +0 -2
  86. package/dist/types/GenerateResult.d.ts +0 -45
  87. package/dist/types/GenerateResult.js +0 -2
  88. package/dist/types/GenerateTextOptions.d.ts +0 -62
  89. package/dist/types/GenerateTextOptions.js +0 -2
  90. package/dist/types/GenerateTextResult.d.ts +0 -81
  91. package/dist/types/GenerateTextResult.js +0 -2
  92. package/dist/types/HttpExchange.d.ts +0 -34
  93. package/dist/types/HttpExchange.js +0 -2
  94. package/dist/types/HttpRecord.d.ts +0 -12
  95. package/dist/types/HttpRecord.js +0 -3
  96. package/dist/types/ImageCallOptions.d.ts +0 -63
  97. package/dist/types/ImageCallOptions.js +0 -2
  98. package/dist/types/ImageFile.d.ts +0 -25
  99. package/dist/types/ImageFile.js +0 -2
  100. package/dist/types/ImageFileData.d.ts +0 -8
  101. package/dist/types/ImageFileData.js +0 -3
  102. package/dist/types/ImageOutputs.d.ts +0 -14
  103. package/dist/types/ImageOutputs.js +0 -3
  104. package/dist/types/ImageResponse.d.ts +0 -19
  105. package/dist/types/ImageResponse.js +0 -3
  106. package/dist/types/ImageResult.d.ts +0 -34
  107. package/dist/types/ImageResult.js +0 -2
  108. package/dist/types/ImageUsage.d.ts +0 -19
  109. package/dist/types/ImageUsage.js +0 -3
  110. package/dist/types/InputAudioFormat.d.ts +0 -13
  111. package/dist/types/InputAudioFormat.js +0 -3
  112. package/dist/types/InputRecord.d.ts +0 -16
  113. package/dist/types/InputRecord.js +0 -2
  114. package/dist/types/LanguageModelPromptMessage.d.ts +0 -20
  115. package/dist/types/LanguageModelPromptMessage.js +0 -2
  116. package/dist/types/MessageContent.d.ts +0 -5
  117. package/dist/types/MessageContent.js +0 -2
  118. package/dist/types/Modality.d.ts +0 -4
  119. package/dist/types/Modality.js +0 -3
  120. package/dist/types/ModelCapabilities.d.ts +0 -21
  121. package/dist/types/ModelCapabilities.js +0 -3
  122. package/dist/types/ModelCost.d.ts +0 -10
  123. package/dist/types/ModelCost.js +0 -3
  124. package/dist/types/ModelId.d.ts +0 -7
  125. package/dist/types/ModelId.js +0 -3
  126. package/dist/types/ModelLimits.d.ts +0 -17
  127. package/dist/types/ModelLimits.js +0 -3
  128. package/dist/types/ModelMessage.d.ts +0 -9
  129. package/dist/types/ModelMessage.js +0 -2
  130. package/dist/types/ModelModalities.d.ts +0 -8
  131. package/dist/types/ModelModalities.js +0 -2
  132. package/dist/types/ModelPrompt.d.ts +0 -7
  133. package/dist/types/ModelPrompt.js +0 -2
  134. package/dist/types/ModelSpec.d.ts +0 -33
  135. package/dist/types/ModelSpec.js +0 -2
  136. package/dist/types/ModelType.d.ts +0 -4
  137. package/dist/types/ModelType.js +0 -3
  138. package/dist/types/OutcomeRecord.d.ts +0 -19
  139. package/dist/types/OutcomeRecord.js +0 -2
  140. package/dist/types/OutcomeStatus.d.ts +0 -4
  141. package/dist/types/OutcomeStatus.js +0 -3
  142. package/dist/types/PrefixBreak.d.ts +0 -11
  143. package/dist/types/PrefixBreak.js +0 -2
  144. package/dist/types/PromptTokensDetails.d.ts +0 -4
  145. package/dist/types/PromptTokensDetails.js +0 -3
  146. package/dist/types/ProviderAuditSpec.d.ts +0 -33
  147. package/dist/types/ProviderAuditSpec.js +0 -2
  148. package/dist/types/ProviderFamily.d.ts +0 -5
  149. package/dist/types/ProviderFamily.js +0 -3
  150. package/dist/types/ProviderName.d.ts +0 -258
  151. package/dist/types/ProviderName.js +0 -262
  152. package/dist/types/ProviderRecord.d.ts +0 -30
  153. package/dist/types/ProviderRecord.js +0 -2
  154. package/dist/types/ProviderTool.d.ts +0 -24
  155. package/dist/types/ProviderTool.js +0 -2
  156. package/dist/types/RawToolCall.d.ts +0 -16
  157. package/dist/types/RawToolCall.js +0 -2
  158. package/dist/types/ReasoningEffort.d.ts +0 -7
  159. package/dist/types/ReasoningEffort.js +0 -3
  160. package/dist/types/ReasoningMode.d.ts +0 -4
  161. package/dist/types/ReasoningMode.js +0 -3
  162. package/dist/types/ReasoningPart.d.ts +0 -9
  163. package/dist/types/ReasoningPart.js +0 -3
  164. package/dist/types/ReasoningSpec.d.ts +0 -39
  165. package/dist/types/ReasoningSpec.js +0 -2
  166. package/dist/types/ReasoningVisibility.d.ts +0 -4
  167. package/dist/types/ReasoningVisibility.js +0 -3
  168. package/dist/types/Recording.d.ts +0 -56
  169. package/dist/types/Recording.js +0 -2
  170. package/dist/types/RequestCacheHints.d.ts +0 -9
  171. package/dist/types/RequestCacheHints.js +0 -3
  172. package/dist/types/RequestInfo.d.ts +0 -12
  173. package/dist/types/RequestInfo.js +0 -2
  174. package/dist/types/RerankingCallOptions.d.ts +0 -42
  175. package/dist/types/RerankingCallOptions.js +0 -2
  176. package/dist/types/RerankingDocuments.d.ts +0 -15
  177. package/dist/types/RerankingDocuments.js +0 -2
  178. package/dist/types/RerankingRank.d.ts +0 -13
  179. package/dist/types/RerankingRank.js +0 -3
  180. package/dist/types/RerankingResponse.d.ts +0 -28
  181. package/dist/types/RerankingResponse.js +0 -2
  182. package/dist/types/RerankingResult.d.ts +0 -31
  183. package/dist/types/RerankingResult.js +0 -2
  184. package/dist/types/ResponseFormat.d.ts +0 -11
  185. package/dist/types/ResponseFormat.js +0 -2
  186. package/dist/types/ResponseInfo.d.ts +0 -30
  187. package/dist/types/ResponseInfo.js +0 -2
  188. package/dist/types/ResponseMetadata.d.ts +0 -8
  189. package/dist/types/ResponseMetadata.js +0 -3
  190. package/dist/types/ResponseRecord.d.ts +0 -13
  191. package/dist/types/ResponseRecord.js +0 -3
  192. package/dist/types/RetryError.d.ts +0 -9
  193. package/dist/types/RetryError.js +0 -2
  194. package/dist/types/RetryErrorReason.d.ts +0 -4
  195. package/dist/types/RetryErrorReason.js +0 -3
  196. package/dist/types/Role.d.ts +0 -4
  197. package/dist/types/Role.js +0 -3
  198. package/dist/types/RuntimeModel.d.ts +0 -22
  199. package/dist/types/RuntimeModel.js +0 -3
  200. package/dist/types/SearchCallOptions.d.ts +0 -55
  201. package/dist/types/SearchCallOptions.js +0 -2
  202. package/dist/types/SearchResponse.d.ts +0 -16
  203. package/dist/types/SearchResponse.js +0 -2
  204. package/dist/types/SearchResult.d.ts +0 -32
  205. package/dist/types/SearchResult.js +0 -2
  206. package/dist/types/SearchResultItem.d.ts +0 -33
  207. package/dist/types/SearchResultItem.js +0 -2
  208. package/dist/types/SessionCall.d.ts +0 -20
  209. package/dist/types/SessionCall.js +0 -3
  210. package/dist/types/SessionChainView.d.ts +0 -10
  211. package/dist/types/SessionChainView.js +0 -2
  212. package/dist/types/SessionSource.d.ts +0 -4
  213. package/dist/types/SessionSource.js +0 -3
  214. package/dist/types/SessionStepStat.d.ts +0 -27
  215. package/dist/types/SessionStepStat.js +0 -2
  216. package/dist/types/SessionView.d.ts +0 -16
  217. package/dist/types/SessionView.js +0 -2
  218. package/dist/types/Size.d.ts +0 -11
  219. package/dist/types/Size.js +0 -3
  220. package/dist/types/SourcePart.d.ts +0 -9
  221. package/dist/types/SourcePart.js +0 -3
  222. package/dist/types/SpeechCallOptions.d.ts +0 -56
  223. package/dist/types/SpeechCallOptions.js +0 -2
  224. package/dist/types/SpeechRequest.d.ts +0 -10
  225. package/dist/types/SpeechRequest.js +0 -2
  226. package/dist/types/SpeechResponse.d.ts +0 -24
  227. package/dist/types/SpeechResponse.js +0 -2
  228. package/dist/types/SpeechResult.d.ts +0 -34
  229. package/dist/types/SpeechResult.js +0 -2
  230. package/dist/types/StreamPart.d.ts +0 -173
  231. package/dist/types/StreamPart.js +0 -2
  232. package/dist/types/StreamTextResultAggregated.d.ts +0 -74
  233. package/dist/types/StreamTextResultAggregated.js +0 -2
  234. package/dist/types/TimeoutConfiguration.d.ts +0 -32
  235. package/dist/types/TimeoutConfiguration.js +0 -3
  236. package/dist/types/TimingRecord.d.ts +0 -7
  237. package/dist/types/TimingRecord.js +0 -3
  238. package/dist/types/TokenUsage.d.ts +0 -29
  239. package/dist/types/TokenUsage.js +0 -3
  240. package/dist/types/Tool.d.ts +0 -12
  241. package/dist/types/Tool.js +0 -2
  242. package/dist/types/ToolCall.d.ts +0 -48
  243. package/dist/types/ToolCall.js +0 -2
  244. package/dist/types/ToolCallRepairReply.d.ts +0 -19
  245. package/dist/types/ToolCallRepairReply.js +0 -2
  246. package/dist/types/ToolChoice.d.ts +0 -12
  247. package/dist/types/ToolChoice.js +0 -3
  248. package/dist/types/ToolResult.d.ts +0 -22
  249. package/dist/types/ToolResult.js +0 -2
  250. package/dist/types/TraceFilter.d.ts +0 -9
  251. package/dist/types/TraceFilter.js +0 -3
  252. package/dist/types/TraceRecord.d.ts +0 -54
  253. package/dist/types/TraceRecord.js +0 -2
  254. package/dist/types/TraceStats.d.ts +0 -20
  255. package/dist/types/TraceStats.js +0 -3
  256. package/dist/types/TranscriptionCallOptions.d.ts +0 -38
  257. package/dist/types/TranscriptionCallOptions.js +0 -2
  258. package/dist/types/TranscriptionRequest.d.ts +0 -9
  259. package/dist/types/TranscriptionRequest.js +0 -3
  260. package/dist/types/TranscriptionResponse.d.ts +0 -24
  261. package/dist/types/TranscriptionResponse.js +0 -2
  262. package/dist/types/TranscriptionResult.d.ts +0 -46
  263. package/dist/types/TranscriptionResult.js +0 -2
  264. package/dist/types/TranscriptionSegment.d.ts +0 -17
  265. package/dist/types/TranscriptionSegment.js +0 -3
  266. package/dist/types/TranscriptionStreamPart.d.ts +0 -70
  267. package/dist/types/TranscriptionStreamPart.js +0 -2
  268. package/dist/types/UploadFileCallOptions.d.ts +0 -27
  269. package/dist/types/UploadFileCallOptions.js +0 -2
  270. package/dist/types/UploadFileData.d.ts +0 -17
  271. package/dist/types/UploadFileData.js +0 -2
  272. package/dist/types/UploadFileResult.d.ts +0 -35
  273. package/dist/types/UploadFileResult.js +0 -2
  274. package/dist/types/Usage.d.ts +0 -13
  275. package/dist/types/Usage.js +0 -2
  276. package/dist/types/UsageSnapshot.d.ts +0 -18
  277. package/dist/types/UsageSnapshot.js +0 -2
  278. package/dist/types/Verdict.d.ts +0 -23
  279. package/dist/types/Verdict.js +0 -2
  280. package/dist/types/VerdictConfidence.d.ts +0 -4
  281. package/dist/types/VerdictConfidence.js +0 -3
  282. package/dist/types/VerdictKind.d.ts +0 -4
  283. package/dist/types/VerdictKind.js +0 -3
  284. package/dist/types/VideoCallOptions.d.ts +0 -84
  285. package/dist/types/VideoCallOptions.js +0 -2
  286. package/dist/types/VideoData.d.ts +0 -22
  287. package/dist/types/VideoData.js +0 -3
  288. package/dist/types/VideoFile.d.ts +0 -29
  289. package/dist/types/VideoFile.js +0 -2
  290. package/dist/types/VideoFileData.d.ts +0 -8
  291. package/dist/types/VideoFileData.js +0 -3
  292. package/dist/types/VideoFrameImage.d.ts +0 -17
  293. package/dist/types/VideoFrameImage.js +0 -2
  294. package/dist/types/VideoFrameType.d.ts +0 -6
  295. package/dist/types/VideoFrameType.js +0 -3
  296. package/dist/types/VideoPollOptions.d.ts +0 -13
  297. package/dist/types/VideoPollOptions.js +0 -3
  298. package/dist/types/VideoResponse.d.ts +0 -19
  299. package/dist/types/VideoResponse.js +0 -3
  300. package/dist/types/VideoResult.d.ts +0 -29
  301. package/dist/types/VideoResult.js +0 -2
  302. package/dist/types/Warning.d.ts +0 -23
  303. package/dist/types/Warning.js +0 -3
  304. package/dist/types/serde_json/JsonValue.d.ts +0 -3
  305. package/dist/types/serde_json/JsonValue.js +0 -3
package/README.md ADDED
@@ -0,0 +1,92 @@
1
+ # Node ops binding
2
+
3
+ > **0.6.0.** This binding uses ABI 1 / ops 1.0. The 0.5 top-level
4
+ > `openai`/`generateText` helpers are removed. See
5
+ > [Upgrading to 0.6](../../docs/upgrading-to-0.6.md).
6
+
7
+ The napi adapter awaits `aimux_ops::dispatch` on napi-rs's Tokio runtime. It does
8
+ not use the C ABI, create a blocking runtime, retry calls, or accept JavaScript
9
+ fetch/model/token/telemetry implementations.
10
+
11
+ ```ts
12
+ import { Client, LanguageModel } from '@arcships/aimux'
13
+
14
+ const client = new Client()
15
+ const provider = await client.provider({ package: 'openai', settings: { apiKey: '...' } })
16
+ const model = await provider.model('gpt-4o-mini', 'languageModel')
17
+ try {
18
+ if (!(model instanceof LanguageModel)) throw new Error('Expected Language')
19
+ console.log((await model.generate('Hello')).text)
20
+ const controller = new AbortController()
21
+ for await (const frame of await model.stream('Hello', {}, { signal: controller.signal })) {
22
+ // Data errors remain data. Only the explicit end frame describes termination.
23
+ if (frame.type === 'event') console.log(frame.event)
24
+ else console.log(frame.outcome, frame.error)
25
+ }
26
+ } finally {
27
+ await model.close()
28
+ await provider.close()
29
+ }
30
+ ```
31
+
32
+ The raw entrypoint `@arcships/aimux/raw` exposes the `Runtime` class with
33
+ `runtime.call(handle, op, paramsJson, abort?)` and
34
+ `runtime.stream(...)`. It transports the same DTOs and
35
+ frames as the typed facade. `runtime.abort(signal?)` creates a native Abort.
36
+ `runtime.operationPush(handle, bytes)` admits bytes before returning a Promise.
37
+ A full input queue rejects immediately with ResourceLimit (305); it never waits
38
+ for capacity. Accepted bytes are copied before the caller can mutate the buffer.
39
+ Handle IDs and sequence numbers are decimal strings, including beyond 2^53.
40
+ Resources belong to their Node Env; they cannot be transferred to workers.
41
+
42
+ Streams have a 64-item / 8 MiB data bridge and a 1 MiB serialized frame limit.
43
+ They stop pulling upstream when full. The terminal has a separate slot, so
44
+ cancellation cannot lose its outcome behind a full queue. `return()`, `throw()`,
45
+ `readable(iterator).getReader().cancel()`, object collection, and Env teardown
46
+ cancel the underlying work. Explicit cancellation can interrupt pending reads
47
+ and capacity waits. A forgotten live iterator can retain its bounded queue;
48
+ close it explicitly when it is no longer needed.
49
+
50
+ Errors expose the shared `kind`, numeric `code`, `message` and `error` payload.
51
+ The AI SDK payload retains `name`, `isRetryable`, `responseHeaders` (read
52
+ `retry-after` there, as with the AI SDK) and other variant fields. Data error events and end-frame error envelopes stay
53
+ plain DTOs. Raw and typed call/next rejections use `AimuxError`.
54
+ The payload's `cause` is also the standard `error.cause`: an
55
+ `AimuxCauseError` for a nested AI SDK error (`name` and the whole `error`
56
+ payload) or an `AimuxSourceError` for an underlying OS, TLS or parser error,
57
+ each with its own `cause` down the chain. A retry error's `cause` is its last
58
+ attempt, the AI SDK `lastError`.
59
+
60
+ `close()` is idempotent. Recorder persistence is explicit: await `flush()` and
61
+ inspect its result before closing; finalization does not flush. Dropping a
62
+ provider does not revoke a model's strong reference. Dropping an Operation
63
+ cancels it; dropping an Abort releases the handle without signalling shared work.
64
+
65
+ The binding requires the exact generated ABI version, ops version and manifest
66
+ `digest` at load, and exposes the verified manifest and digest.
67
+
68
+ Run `npm run test:facade` for the JSON-transport facade tests (Node with TypeScript stripping,
69
+ 22.18+). These tests use a transport double. Run `npm run test:native` after
70
+ building a real napi binary for owner/error/Env integration checks. `npm run test:lifecycle` runs local HTTP timer, slow-consumer, cancellation and
71
+ shutdown scenarios; it requires permission to listen on loopback sockets. `npm test`
72
+ also replays all 11 JSON scenarios from `AIMUX_CONTRACT_VECTORS/scenarios`
73
+ (default: `contract-tests/ops/scenarios` in the repository) through the native call
74
+ boundary, real Dispatcher, framing and bounded queue. It builds an isolated addon
75
+ with the `contract-tests` feature for the scripted source; release builds do not
76
+ expose test operations. Set `AIMUX_BUILD_COMMAND` to a Cargo build wrapper if
77
+ needed. The scenario driver does not read expected output. `npm test` requires
78
+ the production binary for the other native suites. Rust bridge
79
+ unit tests exercise real channel/byte limits and cancellation with synthetic
80
+ streams. Build the addon with `npm run build:debug` and the typed facade with
81
+ `npm run build:typed`. Run Rust unit tests with
82
+ `cargo test --manifest-path bindings/node/Cargo.toml --lib`.
83
+
84
+ For C ABI parity, build `aimux-ffi`, set `AIMUX_FFI_LIBRARY` to its absolute library
85
+ path, and run `npm run test:c-parity` (Python 3 is required). This compares the
86
+ same provider, registry, trace, recorder, session, replay and error vectors.
87
+
88
+ Recorder, session storage and inference state are process-wide. Trace middleware
89
+ wraps language models using a TraceStore. Credential resolver creation and replay
90
+ transport capabilities report UnsupportedFunctionality. Recording schemas
91
+ are unchanged; business type schema generation and per-platform installation
92
+ verification are separate release work.
package/dist/error.d.ts CHANGED
@@ -1,139 +1,30 @@
1
+ import type { ErrorDomain, ErrorEnvelope } from './generated/types.ts';
2
+ export type { ErrorDomain, ErrorEnvelope } from './generated/types.ts';
1
3
  /**
2
- * Aimux error hierarchy (aligned with Vercel AI SDK style).
3
- *
4
- * ```ts
5
- * try {
6
- * await generateText(model, '...')
7
- * } catch (e) {
8
- * if (e instanceof APICallError) {
9
- * // e.status === 429 → rate limited (e.retryMs), 401 → auth, 404 → model
10
- * } else if (e instanceof RetryError) {
11
- * // every retry attempt failed — e.errors is the per-attempt history
12
- * } else if (e instanceof AimuxError) {
13
- * // any AiMuxError
14
- * } else if (e instanceof Error && (e as { code?: string }).code === 'InvalidArg') {
15
- * // the binding rejected an argument (plain Error, napi code)
16
- * }
17
- * }
18
- * ```
19
- *
20
- * Distinct from the ts-rs wire type `AiMuxError` used inside `StreamPart`.
4
+ * The exact shared ErrorEnvelope, including the AI SDK payload in `error`.
5
+ * The payload's `cause` is also the standard `Error.cause`, restored as an
6
+ * `AimuxCauseError` (a nested AI SDK error) or an `AimuxSourceError` (an
7
+ * underlying OS, TLS or parser error), each with its own `cause` down the
8
+ * chain. A retry error's `cause` is its last attempt, the AI SDK `lastError`.
21
9
  */
22
- export declare class AimuxError extends Error {
23
- protected constructor(message: string);
24
- }
25
- /**
26
- * A call that reached (or tried to reach) the provider. Classification is
27
- * `status`; everything below is what that exchange produced, and lives on this
28
- * class alone — the core fills these for no other variant (AI SDK likewise
29
- * keeps `isRetryable` / `responseBody` / `data` on `APICallError`).
30
- */
31
- export declare class APICallError extends AimuxError {
32
- /** Whether retrying this provider call may help. */
33
- readonly retryable: boolean;
34
- /** HTTP status observed from the provider; absent for transport failures. */
35
- readonly status?: number;
36
- /** Rate-limit hint in ms; absent if none; `0` means retry immediately. */
37
- readonly retryMs?: number;
38
- /** Sanitized request URL; absent when unknown. */
39
- readonly url?: string;
40
- /** Sanitized request body values sent to the provider. */
41
- readonly requestBodyValues?: unknown;
42
- /** Provider's machine-readable error code (e.g. `'rate_limit_exceeded'`). */
43
- readonly providerCode?: string;
44
- /** Provider's failure text without Aimux's composed prefix. */
45
- readonly providerMessage?: string;
46
- /** Raw error response body, verbatim. */
47
- readonly responseBody?: string;
48
- /** Sanitized response headers. */
49
- readonly responseHeaders?: Record<string, string>;
50
- /** Parsed provider error data (AI SDK `APICallError.data`). */
51
- readonly data?: unknown;
52
- }
53
- /** Why a {@link RetryError} stopped retrying (core serde wire names). */
54
- export type RetryErrorReason = 'maxRetriesExceeded' | 'errorNotRetryable';
55
- /**
56
- * A retried model operation gave up. `errors` is the complete per-attempt
57
- * history, oldest first; each entry is itself a full member of this hierarchy
58
- * (typically {@link APICallError} with its provider detail).
59
- */
60
- export declare class RetryError extends AimuxError {
61
- /** Why retrying stopped. */
62
- readonly reason: RetryErrorReason;
63
- /** Per-attempt errors, oldest first. */
64
- readonly errors: AimuxError[];
65
- /** The final attempt's error (`undefined` only for a deserialized empty history). */
66
- get lastError(): AimuxError | undefined;
67
- }
68
- export declare class JSONParseError extends AimuxError {
69
- }
70
- export declare class InvalidResponseDataError extends AimuxError {
71
- }
72
- /** The model called a tool that was not provided (AI SDK `NoSuchToolError`). */
73
- export declare class NoSuchToolError extends AimuxError {
74
- /** The tool name the model tried to call. */
75
- readonly toolName: string;
76
- /** Tools that were available; absent if none were. */
77
- readonly availableTools?: string[];
78
- /** Original argument text, when available. */
79
- readonly toolInput?: string;
80
- }
81
- /** A tool call's input failed to parse or violated the tool's schema (AI SDK `InvalidToolInputError`). */
82
- export declare class InvalidToolInputError extends AimuxError {
83
- /** The tool whose input was invalid. */
84
- readonly toolName: string;
85
- /** The raw input text the model produced. */
86
- readonly toolInput: string;
87
- }
88
- /** The repair callback failed or returned a call that was still invalid. */
89
- export declare class ToolCallRepairError extends AimuxError {
90
- /** The failure that triggered repair (a {@link NoSuchToolError} or {@link InvalidToolInputError}). */
91
- readonly originalError: NoSuchToolError | InvalidToolInputError;
92
- }
93
- export declare class InvalidArgumentError extends AimuxError {
94
- }
95
- export declare class InvalidPromptError extends AimuxError {
96
- }
97
- export declare class TokenExpiredError extends AimuxError {
98
- /** Token expiry is produced only from an observed 401 response. */
99
- readonly status: 401;
100
- }
101
- export declare class UnsupportedFunctionalityError extends AimuxError {
102
- }
103
- /** Registry lookup failed for a model id (AI SDK `NoSuchModelError`). */
104
- export declare class NoSuchModelError extends AimuxError {
105
- /** The model id that did not resolve. */
106
- readonly modelId: string;
107
- /** Model category requested (`'languageModel'`, `'imageModel'`, …). */
108
- readonly modelType?: string;
109
- }
110
- /** Registry lookup failed for a provider name (AI SDK `NoSuchProviderError`). */
111
- export declare class NoSuchProviderError extends AimuxError {
112
- /** The provider name that did not resolve. */
113
- readonly providerId: string;
114
- }
115
- export declare class TimeoutError extends AimuxError {
116
- }
117
- /** Request aborted (not DOM `AbortError`); `message` is the abort payload. */
118
- export declare class RequestAbortedError extends AimuxError {
119
- }
120
- export declare class OtherError extends AimuxError {
121
- }
122
- /**
123
- * Which recording failure a {@link RecordingError} reports — the core's
124
- * `recording::RecordingError` variant name. Only `WriterGone`, `FlushTimeout`
125
- * and `Write` can come out of a flush today.
126
- */
127
- export type RecordingErrorCode = 'Init' | 'OpenFile' | 'Spawn' | 'WriterGone' | 'FlushTimeout' | 'Write';
128
- /**
129
- * The recorder could not confirm data on disk (`recordingTryFlush`).
130
- *
131
- * The core has two unrelated error types — `AiMuxError` and
132
- * `recording::RecordingError` — and so does this binding: this class extends
133
- * `Error` directly, not {@link AimuxError}. Catch it separately.
134
- */
135
- export declare class RecordingError extends Error {
136
- /** Which recording failure. */
137
- readonly code: RecordingErrorCode;
138
- private constructor();
139
- }
10
+ export declare class AimuxError extends Error implements ErrorEnvelope {
11
+ readonly kind: ErrorDomain;
12
+ readonly code: number;
13
+ readonly error: ErrorEnvelope['error'];
14
+ readonly cause?: unknown;
15
+ constructor(envelope: ErrorEnvelope);
16
+ }
17
+ /** A nested AI SDK error: `name` is its AI SDK name and `error` its whole payload. */
18
+ export declare class AimuxCauseError extends Error {
19
+ readonly error: Record<string, unknown>;
20
+ readonly cause?: unknown;
21
+ constructor(payload: Record<string, unknown>);
22
+ }
23
+ /** An underlying OS, TLS or parser error, from `{ message, cause? }`. */
24
+ export declare class AimuxSourceError extends Error {
25
+ readonly cause?: unknown;
26
+ constructor(payload: Record<string, unknown>);
27
+ }
28
+ export declare function rethrow(error: unknown): never;
29
+ export declare function isEnvelope(value: unknown): value is ErrorEnvelope;
30
+ export declare function protocolError(code: number, name: string, message: string): AimuxError;
package/dist/error.js CHANGED
@@ -1,114 +1,85 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AimuxSourceError = exports.AimuxCauseError = exports.AimuxError = void 0;
4
+ exports.rethrow = rethrow;
5
+ exports.isEnvelope = isEnvelope;
6
+ exports.protocolError = protocolError;
2
7
  /**
3
- * Aimux error hierarchy (aligned with Vercel AI SDK style).
4
- *
5
- * ```ts
6
- * try {
7
- * await generateText(model, '...')
8
- * } catch (e) {
9
- * if (e instanceof APICallError) {
10
- * // e.status === 429 → rate limited (e.retryMs), 401 → auth, 404 → model
11
- * } else if (e instanceof RetryError) {
12
- * // every retry attempt failed — e.errors is the per-attempt history
13
- * } else if (e instanceof AimuxError) {
14
- * // any AiMuxError
15
- * } else if (e instanceof Error && (e as { code?: string }).code === 'InvalidArg') {
16
- * // the binding rejected an argument (plain Error, napi code)
17
- * }
18
- * }
19
- * ```
20
- *
21
- * Distinct from the ts-rs wire type `AiMuxError` used inside `StreamPart`.
8
+ * The exact shared ErrorEnvelope, including the AI SDK payload in `error`.
9
+ * The payload's `cause` is also the standard `Error.cause`, restored as an
10
+ * `AimuxCauseError` (a nested AI SDK error) or an `AimuxSourceError` (an
11
+ * underlying OS, TLS or parser error), each with its own `cause` down the
12
+ * chain. A retry error's `cause` is its last attempt, the AI SDK `lastError`.
22
13
  */
23
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.RecordingError = exports.OtherError = exports.RequestAbortedError = exports.TimeoutError = exports.NoSuchProviderError = exports.NoSuchModelError = exports.UnsupportedFunctionalityError = exports.TokenExpiredError = exports.InvalidPromptError = exports.InvalidArgumentError = exports.ToolCallRepairError = exports.InvalidToolInputError = exports.NoSuchToolError = exports.InvalidResponseDataError = exports.JSONParseError = exports.RetryError = exports.APICallError = exports.AimuxError = void 0;
25
14
  class AimuxError extends Error {
26
- constructor(message) {
27
- super(message);
28
- this.name = new.target.name;
15
+ constructor(envelope) {
16
+ super(envelope.message);
17
+ this.name = 'AimuxError';
18
+ this.kind = envelope.kind;
19
+ this.code = envelope.code;
20
+ this.error = envelope.error;
21
+ attachCause(this, this.error);
29
22
  }
30
23
  }
31
24
  exports.AimuxError = AimuxError;
32
- /**
33
- * A call that reached (or tried to reach) the provider. Classification is
34
- * `status`; everything below is what that exchange produced, and lives on this
35
- * class alone — the core fills these for no other variant (AI SDK likewise
36
- * keeps `isRetryable` / `responseBody` / `data` on `APICallError`).
37
- */
38
- class APICallError extends AimuxError {
39
- }
40
- exports.APICallError = APICallError;
41
- /**
42
- * A retried model operation gave up. `errors` is the complete per-attempt
43
- * history, oldest first; each entry is itself a full member of this hierarchy
44
- * (typically {@link APICallError} with its provider detail).
45
- */
46
- class RetryError extends AimuxError {
47
- /** The final attempt's error (`undefined` only for a deserialized empty history). */
48
- get lastError() {
49
- return this.errors[this.errors.length - 1];
25
+ /** A nested AI SDK error: `name` is its AI SDK name and `error` its whole payload. */
26
+ class AimuxCauseError extends Error {
27
+ constructor(payload) {
28
+ super(typeof payload.message === 'string' ? payload.message : String(payload.name));
29
+ this.name = String(payload.name);
30
+ this.error = payload;
31
+ attachCause(this, payload);
50
32
  }
51
33
  }
52
- exports.RetryError = RetryError;
53
- class JSONParseError extends AimuxError {
54
- }
55
- exports.JSONParseError = JSONParseError;
56
- class InvalidResponseDataError extends AimuxError {
57
- }
58
- exports.InvalidResponseDataError = InvalidResponseDataError;
59
- /** The model called a tool that was not provided (AI SDK `NoSuchToolError`). */
60
- class NoSuchToolError extends AimuxError {
61
- }
62
- exports.NoSuchToolError = NoSuchToolError;
63
- /** A tool call's input failed to parse or violated the tool's schema (AI SDK `InvalidToolInputError`). */
64
- class InvalidToolInputError extends AimuxError {
65
- }
66
- exports.InvalidToolInputError = InvalidToolInputError;
67
- /** The repair callback failed or returned a call that was still invalid. */
68
- class ToolCallRepairError extends AimuxError {
69
- }
70
- exports.ToolCallRepairError = ToolCallRepairError;
71
- class InvalidArgumentError extends AimuxError {
72
- }
73
- exports.InvalidArgumentError = InvalidArgumentError;
74
- class InvalidPromptError extends AimuxError {
75
- }
76
- exports.InvalidPromptError = InvalidPromptError;
77
- class TokenExpiredError extends AimuxError {
78
- }
79
- exports.TokenExpiredError = TokenExpiredError;
80
- class UnsupportedFunctionalityError extends AimuxError {
81
- }
82
- exports.UnsupportedFunctionalityError = UnsupportedFunctionalityError;
83
- /** Registry lookup failed for a model id (AI SDK `NoSuchModelError`). */
84
- class NoSuchModelError extends AimuxError {
85
- }
86
- exports.NoSuchModelError = NoSuchModelError;
87
- /** Registry lookup failed for a provider name (AI SDK `NoSuchProviderError`). */
88
- class NoSuchProviderError extends AimuxError {
34
+ exports.AimuxCauseError = AimuxCauseError;
35
+ /** An underlying OS, TLS or parser error, from `{ message, cause? }`. */
36
+ class AimuxSourceError extends Error {
37
+ constructor(payload) {
38
+ super(typeof payload.message === 'string' ? payload.message : '');
39
+ this.name = 'AimuxSourceError';
40
+ attachCause(this, payload);
41
+ }
89
42
  }
90
- exports.NoSuchProviderError = NoSuchProviderError;
91
- class TimeoutError extends AimuxError {
43
+ exports.AimuxSourceError = AimuxSourceError;
44
+ function causeOf(payload) {
45
+ if ('cause' in payload)
46
+ return payload.cause;
47
+ // The AI SDK's `lastError`, as Rust's `source()` of a retry error.
48
+ if (payload.name === 'AI_RetryError' && Array.isArray(payload.errors))
49
+ return payload.errors[payload.errors.length - 1];
50
+ return undefined;
51
+ }
52
+ function restore(cause) {
53
+ if (cause === null || typeof cause !== 'object')
54
+ return cause;
55
+ const payload = cause;
56
+ return typeof payload.name === 'string' ? new AimuxCauseError(payload) : new AimuxSourceError(payload);
57
+ }
58
+ // Like `new Error(message, { cause })`: an own, non-enumerable property.
59
+ function attachCause(error, payload) {
60
+ if (payload === null || typeof payload !== 'object')
61
+ return;
62
+ const cause = causeOf(payload);
63
+ if (cause !== undefined) {
64
+ Object.defineProperty(error, 'cause', { value: restore(cause), writable: true, configurable: true });
65
+ }
92
66
  }
93
- exports.TimeoutError = TimeoutError;
94
- /** Request aborted (not DOM `AbortError`); `message` is the abort payload. */
95
- class RequestAbortedError extends AimuxError {
67
+ function rethrow(error) {
68
+ if (isEnvelope(error)) {
69
+ // Preserve the original native error's stack and all payload fields.
70
+ Object.setPrototypeOf(error, AimuxError.prototype);
71
+ attachCause(error, error.error);
72
+ }
73
+ throw error;
96
74
  }
97
- exports.RequestAbortedError = RequestAbortedError;
98
- class OtherError extends AimuxError {
75
+ function isEnvelope(value) {
76
+ if (value === null || typeof value !== 'object')
77
+ return false;
78
+ const e = value;
79
+ return ['aimux', 'recording', 'binding', 'protocol'].includes(e.kind)
80
+ && typeof e.code === 'number' && typeof e.message === 'string'
81
+ && e.error !== null && typeof e.error === 'object' && 'name' in e.error && typeof e.error.name === 'string';
99
82
  }
100
- exports.OtherError = OtherError;
101
- /**
102
- * The recorder could not confirm data on disk (`recordingTryFlush`).
103
- *
104
- * The core has two unrelated error types — `AiMuxError` and
105
- * `recording::RecordingError` — and so does this binding: this class extends
106
- * `Error` directly, not {@link AimuxError}. Catch it separately.
107
- */
108
- class RecordingError extends Error {
109
- constructor(message) {
110
- super(message);
111
- this.name = new.target.name;
112
- }
83
+ function protocolError(code, name, message) {
84
+ return new AimuxError({ kind: 'protocol', code, message, error: { name, message } });
113
85
  }
114
- exports.RecordingError = RecordingError;
@@ -0,0 +1,75 @@
1
+ export declare const ABI_VERSION: 65536;
2
+ export declare const OPS_VERSION: "1.0";
3
+ export declare const MANIFEST_DIGEST: "4c00eaa56426a846294445cad23e19090b44a0f9a7b330b236418f6e18fe52ae";
4
+ export declare const OP_ABORT_CREATE: "abort.create";
5
+ export declare const OP_ABORT_SIGNAL: "abort.signal";
6
+ export declare const OP_AUTH_CODEX_REFRESH: "auth.codexRefresh";
7
+ export declare const OP_CATALOGUE_FETCH: "catalogue.fetch";
8
+ export declare const OP_COMPOSITE_MOA: "composite.moa";
9
+ export declare const OP_COMPOSITE_ROUTER: "composite.router";
10
+ export declare const OP_CREDENTIAL_CREATE: "credential.create";
11
+ export declare const OP_DECISION_CAPABILITIES: "decision.capabilities";
12
+ export declare const OP_DECISION_DECIDE: "decision.decide";
13
+ export declare const OP_EMBEDDING_EMBED: "embedding.embed";
14
+ export declare const OP_EMBEDDING_EMBED_MANY: "embedding.embedMany";
15
+ export declare const OP_FILES_UPLOAD: "files.upload";
16
+ export declare const OP_HANDLE_DROP: "handle.drop";
17
+ export declare const OP_IMAGE_GENERATE: "image.generate";
18
+ export declare const OP_MIDDLEWARE_CREATE: "middleware.create";
19
+ export declare const OP_MODEL_INFO: "model.info";
20
+ export declare const OP_MODEL_RESOLVE: "model.resolve";
21
+ export declare const OP_MODEL_WRAP: "model.wrap";
22
+ export declare const OP_OPERATION_CANCEL: "operation.cancel";
23
+ export declare const OP_OPERATION_INPUT_DONE: "operation.inputDone";
24
+ export declare const OP_OPERATION_NEXT: "operation.next";
25
+ export declare const OP_OPERATION_PUSH: "operation.push";
26
+ export declare const OP_OPERATION_STATUS: "operation.status";
27
+ export declare const OP_OUTPUT_TO_OPEN_AI: "output.toOpenAI";
28
+ export declare const OP_PROVIDER_CREATE: "provider.create";
29
+ export declare const OP_PROVIDER_CUSTOM: "provider.custom";
30
+ export declare const OP_PROVIDER_DEFAULT: "provider.default";
31
+ export declare const OP_PROVIDER_FILES: "provider.files";
32
+ export declare const OP_PROVIDER_INVOKE: "provider.invoke";
33
+ export declare const OP_PROVIDER_MODEL: "provider.model";
34
+ export declare const OP_PROVIDER_WRAP: "provider.wrap";
35
+ export declare const OP_RECORDER_ATTACH: "recorder.attach";
36
+ export declare const OP_RECORDER_CREATE: "recorder.create";
37
+ export declare const OP_RECORDER_EXPORT: "recorder.export";
38
+ export declare const OP_RECORDER_FLUSH: "recorder.flush";
39
+ export declare const OP_RECORDER_STATS: "recorder.stats";
40
+ export declare const OP_RECORDER_STOP: "recorder.stop";
41
+ export declare const OP_REGISTRY_CREATE: "registry.create";
42
+ export declare const OP_REGISTRY_PROVIDER: "registry.provider";
43
+ export declare const OP_REPLAY_CAPABILITIES: "replay.capabilities";
44
+ export declare const OP_REPLAY_CREATE: "replay.create";
45
+ export declare const OP_REPLAY_DRY_RUN: "replay.dryRun";
46
+ export declare const OP_REPLAY_INSPECT: "replay.inspect";
47
+ export declare const OP_REPLAY_LIVE: "replay.live";
48
+ export declare const OP_RERANKING_RERANK: "reranking.rerank";
49
+ export declare const OP_RUNTIME_CONFIGURE: "runtime.configure";
50
+ export declare const OP_RUNTIME_DESCRIBE: "runtime.describe";
51
+ export declare const OP_SEARCH_SEARCH: "search.search";
52
+ export declare const OP_SESSION_STORE_ATTACH: "sessionStore.attach";
53
+ export declare const OP_SESSION_STORE_CALLS: "sessionStore.calls";
54
+ export declare const OP_SESSION_STORE_CREATE: "sessionStore.create";
55
+ export declare const OP_SESSION_STORE_LIST: "sessionStore.list";
56
+ export declare const OP_SPEECH_GENERATE: "speech.generate";
57
+ export declare const OP_TEXT_CONSUME: "text.consume";
58
+ export declare const OP_TEXT_GENERATE: "text.generate";
59
+ export declare const OP_TEXT_GENERATE_OBJECT: "text.generateObject";
60
+ export declare const OP_TEXT_GENERATE_OPEN_AI: "text.generateOpenAI";
61
+ export declare const OP_TEXT_STREAM: "text.stream";
62
+ export declare const OP_TEXT_STREAM_OPEN_AI: "text.streamOpenAI";
63
+ export declare const OP_TOOL_REPAIR_APPLY: "toolRepair.apply";
64
+ export declare const OP_TOOL_REPAIR_APPLY_RESULT: "toolRepair.applyResult";
65
+ export declare const OP_TOOL_REPAIR_CONTEXT: "toolRepair.context";
66
+ export declare const OP_TRACE_AGGREGATE: "trace.aggregate";
67
+ export declare const OP_TRACE_CLEAR: "trace.clear";
68
+ export declare const OP_TRACE_CREATE: "trace.create";
69
+ export declare const OP_TRACE_EXPORT: "trace.export";
70
+ export declare const OP_TRACE_SESSION_CHAIN: "trace.sessionChain";
71
+ export declare const OP_TRACE_SESSION_TRAJECTORY: "trace.sessionTrajectory";
72
+ export declare const OP_TRANSCRIPTION_GENERATE: "transcription.generate";
73
+ export declare const OP_TRANSCRIPTION_START: "transcription.start";
74
+ export declare const OP_TRANSPORT_CREATE: "transport.create";
75
+ export declare const OP_VIDEO_GENERATE: "video.generate";
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OP_RUNTIME_DESCRIBE = exports.OP_RUNTIME_CONFIGURE = exports.OP_RERANKING_RERANK = exports.OP_REPLAY_LIVE = exports.OP_REPLAY_INSPECT = exports.OP_REPLAY_DRY_RUN = exports.OP_REPLAY_CREATE = exports.OP_REPLAY_CAPABILITIES = exports.OP_REGISTRY_PROVIDER = exports.OP_REGISTRY_CREATE = exports.OP_RECORDER_STOP = exports.OP_RECORDER_STATS = exports.OP_RECORDER_FLUSH = exports.OP_RECORDER_EXPORT = exports.OP_RECORDER_CREATE = exports.OP_RECORDER_ATTACH = exports.OP_PROVIDER_WRAP = exports.OP_PROVIDER_MODEL = exports.OP_PROVIDER_INVOKE = exports.OP_PROVIDER_FILES = exports.OP_PROVIDER_DEFAULT = exports.OP_PROVIDER_CUSTOM = exports.OP_PROVIDER_CREATE = exports.OP_OUTPUT_TO_OPEN_AI = exports.OP_OPERATION_STATUS = exports.OP_OPERATION_PUSH = exports.OP_OPERATION_NEXT = exports.OP_OPERATION_INPUT_DONE = exports.OP_OPERATION_CANCEL = exports.OP_MODEL_WRAP = exports.OP_MODEL_RESOLVE = exports.OP_MODEL_INFO = exports.OP_MIDDLEWARE_CREATE = exports.OP_IMAGE_GENERATE = exports.OP_HANDLE_DROP = exports.OP_FILES_UPLOAD = exports.OP_EMBEDDING_EMBED_MANY = exports.OP_EMBEDDING_EMBED = exports.OP_DECISION_DECIDE = exports.OP_DECISION_CAPABILITIES = exports.OP_CREDENTIAL_CREATE = exports.OP_COMPOSITE_ROUTER = exports.OP_COMPOSITE_MOA = exports.OP_CATALOGUE_FETCH = exports.OP_AUTH_CODEX_REFRESH = exports.OP_ABORT_SIGNAL = exports.OP_ABORT_CREATE = exports.MANIFEST_DIGEST = exports.OPS_VERSION = exports.ABI_VERSION = void 0;
4
+ exports.OP_VIDEO_GENERATE = exports.OP_TRANSPORT_CREATE = exports.OP_TRANSCRIPTION_START = exports.OP_TRANSCRIPTION_GENERATE = exports.OP_TRACE_SESSION_TRAJECTORY = exports.OP_TRACE_SESSION_CHAIN = exports.OP_TRACE_EXPORT = exports.OP_TRACE_CREATE = exports.OP_TRACE_CLEAR = exports.OP_TRACE_AGGREGATE = exports.OP_TOOL_REPAIR_CONTEXT = exports.OP_TOOL_REPAIR_APPLY_RESULT = exports.OP_TOOL_REPAIR_APPLY = exports.OP_TEXT_STREAM_OPEN_AI = exports.OP_TEXT_STREAM = exports.OP_TEXT_GENERATE_OPEN_AI = exports.OP_TEXT_GENERATE_OBJECT = exports.OP_TEXT_GENERATE = exports.OP_TEXT_CONSUME = exports.OP_SPEECH_GENERATE = exports.OP_SESSION_STORE_LIST = exports.OP_SESSION_STORE_CREATE = exports.OP_SESSION_STORE_CALLS = exports.OP_SESSION_STORE_ATTACH = exports.OP_SEARCH_SEARCH = void 0;
5
+ // Generated by aimux-codegen. Do not edit. Manifest SHA-256: 4c00eaa56426a846294445cad23e19090b44a0f9a7b330b236418f6e18fe52ae
6
+ exports.ABI_VERSION = 65536;
7
+ exports.OPS_VERSION = "1.0";
8
+ exports.MANIFEST_DIGEST = "4c00eaa56426a846294445cad23e19090b44a0f9a7b330b236418f6e18fe52ae";
9
+ exports.OP_ABORT_CREATE = "abort.create";
10
+ exports.OP_ABORT_SIGNAL = "abort.signal";
11
+ exports.OP_AUTH_CODEX_REFRESH = "auth.codexRefresh";
12
+ exports.OP_CATALOGUE_FETCH = "catalogue.fetch";
13
+ exports.OP_COMPOSITE_MOA = "composite.moa";
14
+ exports.OP_COMPOSITE_ROUTER = "composite.router";
15
+ exports.OP_CREDENTIAL_CREATE = "credential.create";
16
+ exports.OP_DECISION_CAPABILITIES = "decision.capabilities";
17
+ exports.OP_DECISION_DECIDE = "decision.decide";
18
+ exports.OP_EMBEDDING_EMBED = "embedding.embed";
19
+ exports.OP_EMBEDDING_EMBED_MANY = "embedding.embedMany";
20
+ exports.OP_FILES_UPLOAD = "files.upload";
21
+ exports.OP_HANDLE_DROP = "handle.drop";
22
+ exports.OP_IMAGE_GENERATE = "image.generate";
23
+ exports.OP_MIDDLEWARE_CREATE = "middleware.create";
24
+ exports.OP_MODEL_INFO = "model.info";
25
+ exports.OP_MODEL_RESOLVE = "model.resolve";
26
+ exports.OP_MODEL_WRAP = "model.wrap";
27
+ exports.OP_OPERATION_CANCEL = "operation.cancel";
28
+ exports.OP_OPERATION_INPUT_DONE = "operation.inputDone";
29
+ exports.OP_OPERATION_NEXT = "operation.next";
30
+ exports.OP_OPERATION_PUSH = "operation.push";
31
+ exports.OP_OPERATION_STATUS = "operation.status";
32
+ exports.OP_OUTPUT_TO_OPEN_AI = "output.toOpenAI";
33
+ exports.OP_PROVIDER_CREATE = "provider.create";
34
+ exports.OP_PROVIDER_CUSTOM = "provider.custom";
35
+ exports.OP_PROVIDER_DEFAULT = "provider.default";
36
+ exports.OP_PROVIDER_FILES = "provider.files";
37
+ exports.OP_PROVIDER_INVOKE = "provider.invoke";
38
+ exports.OP_PROVIDER_MODEL = "provider.model";
39
+ exports.OP_PROVIDER_WRAP = "provider.wrap";
40
+ exports.OP_RECORDER_ATTACH = "recorder.attach";
41
+ exports.OP_RECORDER_CREATE = "recorder.create";
42
+ exports.OP_RECORDER_EXPORT = "recorder.export";
43
+ exports.OP_RECORDER_FLUSH = "recorder.flush";
44
+ exports.OP_RECORDER_STATS = "recorder.stats";
45
+ exports.OP_RECORDER_STOP = "recorder.stop";
46
+ exports.OP_REGISTRY_CREATE = "registry.create";
47
+ exports.OP_REGISTRY_PROVIDER = "registry.provider";
48
+ exports.OP_REPLAY_CAPABILITIES = "replay.capabilities";
49
+ exports.OP_REPLAY_CREATE = "replay.create";
50
+ exports.OP_REPLAY_DRY_RUN = "replay.dryRun";
51
+ exports.OP_REPLAY_INSPECT = "replay.inspect";
52
+ exports.OP_REPLAY_LIVE = "replay.live";
53
+ exports.OP_RERANKING_RERANK = "reranking.rerank";
54
+ exports.OP_RUNTIME_CONFIGURE = "runtime.configure";
55
+ exports.OP_RUNTIME_DESCRIBE = "runtime.describe";
56
+ exports.OP_SEARCH_SEARCH = "search.search";
57
+ exports.OP_SESSION_STORE_ATTACH = "sessionStore.attach";
58
+ exports.OP_SESSION_STORE_CALLS = "sessionStore.calls";
59
+ exports.OP_SESSION_STORE_CREATE = "sessionStore.create";
60
+ exports.OP_SESSION_STORE_LIST = "sessionStore.list";
61
+ exports.OP_SPEECH_GENERATE = "speech.generate";
62
+ exports.OP_TEXT_CONSUME = "text.consume";
63
+ exports.OP_TEXT_GENERATE = "text.generate";
64
+ exports.OP_TEXT_GENERATE_OBJECT = "text.generateObject";
65
+ exports.OP_TEXT_GENERATE_OPEN_AI = "text.generateOpenAI";
66
+ exports.OP_TEXT_STREAM = "text.stream";
67
+ exports.OP_TEXT_STREAM_OPEN_AI = "text.streamOpenAI";
68
+ exports.OP_TOOL_REPAIR_APPLY = "toolRepair.apply";
69
+ exports.OP_TOOL_REPAIR_APPLY_RESULT = "toolRepair.applyResult";
70
+ exports.OP_TOOL_REPAIR_CONTEXT = "toolRepair.context";
71
+ exports.OP_TRACE_AGGREGATE = "trace.aggregate";
72
+ exports.OP_TRACE_CLEAR = "trace.clear";
73
+ exports.OP_TRACE_CREATE = "trace.create";
74
+ exports.OP_TRACE_EXPORT = "trace.export";
75
+ exports.OP_TRACE_SESSION_CHAIN = "trace.sessionChain";
76
+ exports.OP_TRACE_SESSION_TRAJECTORY = "trace.sessionTrajectory";
77
+ exports.OP_TRANSCRIPTION_GENERATE = "transcription.generate";
78
+ exports.OP_TRANSCRIPTION_START = "transcription.start";
79
+ exports.OP_TRANSPORT_CREATE = "transport.create";
80
+ exports.OP_VIDEO_GENERATE = "video.generate";