@arcships/aimux 0.1.1 → 0.1.3

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.
Binary file
Binary file
@@ -77,4 +77,15 @@ export type CallOptions = {
77
77
  * Anthropic `thinking` config.
78
78
  */
79
79
  reasoning: ReasoningEffort | null;
80
+ /**
81
+ * Per-call request body overrides. Deep-merged into the provider-built
82
+ * request body (after any built-in vendor override) before sending.
83
+ * `null` values delete the corresponding key. See RFC-0017.
84
+ */
85
+ body_overrides: JsonValue | null;
86
+ /**
87
+ * Per-call retry count override. `None` uses the provider's configured
88
+ * `RetryConfig.max_retries`. `Some(0)` disables retries.
89
+ */
90
+ max_retries: number | null;
80
91
  };
@@ -67,8 +67,31 @@ export type ContentPart = {
67
67
  tool_call_id: string;
68
68
  /**
69
69
  * The tool's output (usually a JSON value or plain text).
70
+ *
71
+ * Accepts the legacy `output` field name (used by the Vercel AI SDK
72
+ * and the 0.1.0 TypeScript bindings) as an alias during deserialization,
73
+ * so multi-part tool messages constructed either way round-trip
74
+ * correctly. Serialization always emits `result`.
70
75
  */
71
- output: JsonValue;
76
+ result: JsonValue;
77
+ /**
78
+ * The name of the tool that produced this result (optional on the
79
+ * user-input side; providers that need it can look it up from the
80
+ * preceding tool call).
81
+ */
82
+ tool_name?: string | null;
83
+ /**
84
+ * Whether the result is an error or error message.
85
+ */
86
+ is_error?: boolean | null;
87
+ /**
88
+ * Whether the result is preliminary (replaces prior, e.g. image previews).
89
+ */
90
+ preliminary?: boolean | null;
91
+ /**
92
+ * Whether the tool is dynamic (defined at runtime, e.g. MCP tools).
93
+ */
94
+ dynamic?: boolean | null;
72
95
  /**
73
96
  * Provider-specific options for this part (e.g.
74
97
  * `anthropic.cacheControl`).
@@ -1,3 +1,4 @@
1
+ import type { FileData } from "./FileData";
1
2
  import type { JsonValue } from "./serde_json/JsonValue";
2
3
  /**
3
4
  * A content item in the generation result.
@@ -5,12 +6,26 @@ import type { JsonValue } from "./serde_json/JsonValue";
5
6
  export type GenerateContent = {
6
7
  "Text": {
7
8
  text: string;
9
+ provider_metadata?: JsonValue | null;
8
10
  };
9
11
  } | {
10
12
  "ToolCall": {
11
13
  tool_call_id: string;
12
14
  tool_name: string;
13
15
  input: JsonValue;
16
+ /**
17
+ * Whether the tool call will be executed by the provider.
18
+ * If false/unset, the tool call is executed by the client.
19
+ */
20
+ provider_executed?: boolean | null;
21
+ /**
22
+ * Whether the tool is dynamic (defined at runtime, e.g. MCP tools).
23
+ */
24
+ dynamic?: boolean | null;
25
+ /**
26
+ * Additional provider-specific metadata for the tool call.
27
+ */
28
+ provider_metadata?: JsonValue | null;
14
29
  };
15
30
  } | {
16
31
  "Source": {
@@ -18,16 +33,39 @@ export type GenerateContent = {
18
33
  source_type: string;
19
34
  url: string | null;
20
35
  title: string | null;
36
+ provider_metadata?: JsonValue | null;
21
37
  };
22
38
  } | {
23
39
  "Reasoning": {
24
40
  text: string;
25
41
  provider_metadata: JsonValue | null;
26
42
  };
43
+ } | {
44
+ "File": {
45
+ data: FileData;
46
+ media_type: string;
47
+ provider_metadata?: JsonValue | null;
48
+ };
27
49
  } | {
28
50
  "ToolResult": {
29
51
  tool_call_id: string;
30
52
  tool_name: string;
31
53
  result: JsonValue;
54
+ /**
55
+ * Whether the result is an error or error message.
56
+ */
57
+ is_error?: boolean | null;
58
+ /**
59
+ * Whether the result is preliminary (replaces prior, e.g. image previews).
60
+ */
61
+ preliminary?: boolean | null;
62
+ /**
63
+ * Whether the tool is dynamic (defined at runtime, e.g. MCP tools).
64
+ */
65
+ dynamic?: boolean | null;
66
+ /**
67
+ * Additional provider-specific metadata for the tool result.
68
+ */
69
+ provider_metadata?: JsonValue | null;
32
70
  };
33
71
  };
@@ -35,4 +35,12 @@ export type GenerateTextOptions = {
35
35
  * System instructions prepended to the prompt.
36
36
  */
37
37
  instructions: string | null;
38
+ /**
39
+ * Per-call request body overrides (deep-merged). See RFC-0017.
40
+ */
41
+ body_overrides: JsonValue | null;
42
+ /**
43
+ * Per-call retry count override. `None` = provider default, `Some(0)` = disable.
44
+ */
45
+ max_retries: number | null;
38
46
  };
@@ -1,4 +1,5 @@
1
1
  import type { AiMuxError } from "./AiMuxError";
2
+ import type { FileData } from "./FileData";
2
3
  import type { FinishReason } from "./FinishReason";
3
4
  import type { Usage } from "./Usage";
4
5
  import type { Warning } from "./Warning";
@@ -9,15 +10,18 @@ import type { JsonValue } from "./serde_json/JsonValue";
9
10
  export type StreamPart = {
10
11
  "TextStart": {
11
12
  id: string;
13
+ provider_metadata?: JsonValue | null;
12
14
  };
13
15
  } | {
14
16
  "TextDelta": {
15
17
  id: string;
16
18
  delta: string;
19
+ provider_metadata?: JsonValue | null;
17
20
  };
18
21
  } | {
19
22
  "TextEnd": {
20
23
  id: string;
24
+ provider_metadata?: JsonValue | null;
21
25
  };
22
26
  } | {
23
27
  "StreamStart": {
@@ -37,27 +41,73 @@ export type StreamPart = {
37
41
  "ToolInputStart": {
38
42
  id: string;
39
43
  tool_name: string;
44
+ /**
45
+ * Whether the tool call will be executed by the provider.
46
+ */
47
+ provider_executed?: boolean | null;
48
+ /**
49
+ * Whether the tool is dynamic (defined at runtime, e.g. MCP tools).
50
+ */
51
+ dynamic?: boolean | null;
52
+ /**
53
+ * Optional title for the tool call.
54
+ */
55
+ title?: string | null;
56
+ provider_metadata?: JsonValue | null;
40
57
  };
41
58
  } | {
42
59
  "ToolInputDelta": {
43
60
  id: string;
44
61
  delta: string;
62
+ provider_metadata?: JsonValue | null;
45
63
  };
46
64
  } | {
47
65
  "ToolInputEnd": {
48
66
  id: string;
67
+ provider_metadata?: JsonValue | null;
49
68
  };
50
69
  } | {
51
70
  "ToolCall": {
52
71
  tool_call_id: string;
53
72
  tool_name: string;
54
73
  input: JsonValue;
74
+ /**
75
+ * Whether the tool call will be executed by the provider.
76
+ */
77
+ provider_executed?: boolean | null;
78
+ /**
79
+ * Whether the tool is dynamic (defined at runtime, e.g. MCP tools).
80
+ */
81
+ dynamic?: boolean | null;
82
+ provider_metadata?: JsonValue | null;
55
83
  };
56
84
  } | {
57
85
  "ToolResult": {
58
86
  tool_call_id: string;
59
87
  tool_name: string;
60
- output: JsonValue;
88
+ result: JsonValue;
89
+ /**
90
+ * Whether the result is an error or error message.
91
+ */
92
+ is_error?: boolean | null;
93
+ /**
94
+ * Whether the result is preliminary (replaces prior, e.g. image previews).
95
+ */
96
+ preliminary?: boolean | null;
97
+ /**
98
+ * Whether the tool is dynamic (defined at runtime, e.g. MCP tools).
99
+ */
100
+ dynamic?: boolean | null;
101
+ /**
102
+ * Additional provider-specific metadata for the tool result.
103
+ */
104
+ provider_metadata?: JsonValue | null;
105
+ };
106
+ } | {
107
+ "File": {
108
+ data: FileData;
109
+ media_type: string;
110
+ provider_metadata?: JsonValue | null;
61
111
  };
62
112
  } | {
63
113
  "ReasoningStart": {
@@ -96,6 +146,7 @@ export type StreamPart = {
96
146
  source_type: string;
97
147
  url: string | null;
98
148
  title: string | null;
149
+ provider_metadata?: JsonValue | null;
99
150
  };
100
151
  } | {
101
152
  "Raw": {
@@ -15,4 +15,12 @@ export type ToolCall = {
15
15
  * Arguments as a JSON value (usually an object).
16
16
  */
17
17
  input: JsonValue;
18
+ /**
19
+ * Whether the tool call will be executed by the provider.
20
+ */
21
+ provider_executed?: boolean | null;
22
+ /**
23
+ * Whether the tool is dynamic (defined at runtime, e.g. MCP tools).
24
+ */
25
+ dynamic?: boolean | null;
18
26
  };
@@ -10,5 +10,13 @@ export type ToolResult = {
10
10
  /**
11
11
  * The tool's output (usually a JSON-serializable value or plain text).
12
12
  */
13
- output: JsonValue;
13
+ result: JsonValue;
14
+ /**
15
+ * Whether the result is an error or error message.
16
+ */
17
+ is_error?: boolean | null;
18
+ /**
19
+ * Whether the result is preliminary (replaces prior, e.g. image previews).
20
+ */
21
+ preliminary?: boolean | null;
14
22
  };
@@ -1,8 +1,13 @@
1
1
  import type { TokenUsage } from "./TokenUsage";
2
+ import type { JsonValue } from "./serde_json/JsonValue";
2
3
  /**
3
4
  * Token usage statistics.
4
5
  */
5
6
  export type Usage = {
6
7
  input_tokens: TokenUsage;
7
8
  output_tokens: TokenUsage;
9
+ /**
10
+ * Raw usage information from the provider (opaque, provider-specific).
11
+ */
12
+ raw?: JsonValue | null;
8
13
  };
package/index.d.ts CHANGED
@@ -113,7 +113,7 @@ export declare class VideoModel {
113
113
  }
114
114
 
115
115
  /** Create an Anthropic model instance. */
116
- export declare function anthropic(apiKey: string, modelId: string, baseUrl?: string | undefined | null): Promise<Model>
116
+ export declare function anthropic(apiKey: string, modelId: string, config?: string | ProviderConfig | undefined | null): Promise<Model>
117
117
 
118
118
  /** Create a Cohere embedding model instance. */
119
119
  export declare function cohereEmbedding(apiKey: string, modelId: string, baseUrl?: string | undefined | null): Promise<EmbeddingModel>
@@ -122,7 +122,7 @@ export declare function cohereEmbedding(apiKey: string, modelId: string, baseUrl
122
122
  export declare function cohereReranking(apiKey: string, modelId: string, baseUrl?: string | undefined | null): Promise<RerankingModel>
123
123
 
124
124
  /** Create a DeepSeek model instance. */
125
- export declare function deepseek(apiKey: string, modelId: string, baseUrl?: string | undefined | null): Promise<Model>
125
+ export declare function deepseek(apiKey: string, modelId: string, config?: string | ProviderConfig | undefined | null): Promise<Model>
126
126
 
127
127
  /** Create a Google embedding model instance. */
128
128
  export declare function googleEmbedding(apiKey: string, modelId: string, baseUrl?: string | undefined | null): Promise<EmbeddingModel>
@@ -134,7 +134,7 @@ export declare function googleImage(apiKey: string, modelId: string, baseUrl?: s
134
134
  export declare function googleVideo(apiKey: string, modelId: string, baseUrl?: string | undefined | null): Promise<VideoModel>
135
135
 
136
136
  /** Create an OpenAI model instance. */
137
- export declare function openai(apiKey: string, modelId: string, baseUrl?: string | undefined | null): Promise<Model>
137
+ export declare function openai(apiKey: string, modelId: string, config?: string | ProviderConfig | undefined | null): Promise<Model>
138
138
 
139
139
  /** Create an OpenAI embedding model instance. */
140
140
  export declare function openaiEmbedding(apiKey: string, modelId: string, baseUrl?: string | undefined | null): Promise<EmbeddingModel>
@@ -151,5 +151,35 @@ export declare function openaiSpeech(apiKey: string, modelId: string, baseUrl?:
151
151
  /** Create an OpenAI transcription model instance. */
152
152
  export declare function openaiTranscription(apiKey: string, modelId: string, baseUrl?: string | undefined | null): Promise<TranscriptionModel>
153
153
 
154
+ /**
155
+ * Optional provider configuration accepted by factory functions.
156
+ *
157
+ * Passed as the 3rd argument to `openai()` / `anthropic()` / `deepseek()`.
158
+ * For backward compatibility a bare string is still accepted (treated as
159
+ * `baseUrl`). See RFC-0017.
160
+ */
161
+ export interface ProviderConfig {
162
+ /** Base URL for API calls (e.g. a relay/proxy endpoint). */
163
+ baseUrl?: string
164
+ /**
165
+ * Extra HTTP headers merged into every request, as a JSON object string
166
+ * (e.g. `'{"X-Custom":"value"}'`).
167
+ */
168
+ headers?: string
169
+ /** OpenAI organization ID (sent via `OpenAI-Organization` header). */
170
+ organization?: string
171
+ /** OpenAI project ID (sent via `OpenAI-Project` header). */
172
+ project?: string
173
+ /** Override the provider's retry count. `0` disables retries. */
174
+ maxRetries?: number
175
+ /**
176
+ * Provider-level request body overrides as a JSON string (deep-merged
177
+ * into every request). Per-call `bodyOverrides` in GenerateTextOptions
178
+ * takes precedence. Pass a JSON object string, e.g.
179
+ * `'{"enable_thinking": false}'`.
180
+ */
181
+ bodyOverrides?: string
182
+ }
183
+
154
184
  /** Create a Tavily search model instance. */
155
185
  export declare function tavilySearch(apiKey: string, baseUrl?: string | undefined | null): Promise<SearchModel>
package/index.js CHANGED
@@ -75,10 +75,10 @@ function requireNative() {
75
75
  loadErrors.push(e)
76
76
  }
77
77
  try {
78
- const binding = require('aimux-android-arm64')
79
- const bindingPackageVersion = require('aimux-android-arm64/package.json').version
80
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
81
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
78
+ const binding = require('@arcships/aimux-android-arm64')
79
+ const bindingPackageVersion = require('@arcships/aimux-android-arm64/package.json').version
80
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
81
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
82
82
  }
83
83
  return binding
84
84
  } catch (e) {
@@ -91,10 +91,10 @@ function requireNative() {
91
91
  loadErrors.push(e)
92
92
  }
93
93
  try {
94
- const binding = require('aimux-android-arm-eabi')
95
- const bindingPackageVersion = require('aimux-android-arm-eabi/package.json').version
96
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
97
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
94
+ const binding = require('@arcships/aimux-android-arm-eabi')
95
+ const bindingPackageVersion = require('@arcships/aimux-android-arm-eabi/package.json').version
96
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
97
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
98
98
  }
99
99
  return binding
100
100
  } catch (e) {
@@ -112,10 +112,10 @@ function requireNative() {
112
112
  loadErrors.push(e)
113
113
  }
114
114
  try {
115
- const binding = require('aimux-win32-x64-gnu')
116
- const bindingPackageVersion = require('aimux-win32-x64-gnu/package.json').version
117
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
118
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
115
+ const binding = require('@arcships/aimux-win32-x64-gnu')
116
+ const bindingPackageVersion = require('@arcships/aimux-win32-x64-gnu/package.json').version
117
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
118
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
119
119
  }
120
120
  return binding
121
121
  } catch (e) {
@@ -128,10 +128,10 @@ function requireNative() {
128
128
  loadErrors.push(e)
129
129
  }
130
130
  try {
131
- const binding = require('aimux-win32-x64-msvc')
132
- const bindingPackageVersion = require('aimux-win32-x64-msvc/package.json').version
133
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
134
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
131
+ const binding = require('@arcships/aimux-win32-x64-msvc')
132
+ const bindingPackageVersion = require('@arcships/aimux-win32-x64-msvc/package.json').version
133
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
134
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
135
135
  }
136
136
  return binding
137
137
  } catch (e) {
@@ -145,10 +145,10 @@ function requireNative() {
145
145
  loadErrors.push(e)
146
146
  }
147
147
  try {
148
- const binding = require('aimux-win32-ia32-msvc')
149
- const bindingPackageVersion = require('aimux-win32-ia32-msvc/package.json').version
150
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
148
+ const binding = require('@arcships/aimux-win32-ia32-msvc')
149
+ const bindingPackageVersion = require('@arcships/aimux-win32-ia32-msvc/package.json').version
150
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
152
152
  }
153
153
  return binding
154
154
  } catch (e) {
@@ -161,10 +161,10 @@ function requireNative() {
161
161
  loadErrors.push(e)
162
162
  }
163
163
  try {
164
- const binding = require('aimux-win32-arm64-msvc')
165
- const bindingPackageVersion = require('aimux-win32-arm64-msvc/package.json').version
166
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
167
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
164
+ const binding = require('@arcships/aimux-win32-arm64-msvc')
165
+ const bindingPackageVersion = require('@arcships/aimux-win32-arm64-msvc/package.json').version
166
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
167
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
168
168
  }
169
169
  return binding
170
170
  } catch (e) {
@@ -180,10 +180,10 @@ function requireNative() {
180
180
  loadErrors.push(e)
181
181
  }
182
182
  try {
183
- const binding = require('aimux-darwin-universal')
184
- const bindingPackageVersion = require('aimux-darwin-universal/package.json').version
185
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
186
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
183
+ const binding = require('@arcships/aimux-darwin-universal')
184
+ const bindingPackageVersion = require('@arcships/aimux-darwin-universal/package.json').version
185
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
186
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
187
187
  }
188
188
  return binding
189
189
  } catch (e) {
@@ -196,10 +196,10 @@ function requireNative() {
196
196
  loadErrors.push(e)
197
197
  }
198
198
  try {
199
- const binding = require('aimux-darwin-x64')
200
- const bindingPackageVersion = require('aimux-darwin-x64/package.json').version
201
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
202
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
199
+ const binding = require('@arcships/aimux-darwin-x64')
200
+ const bindingPackageVersion = require('@arcships/aimux-darwin-x64/package.json').version
201
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
202
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
203
203
  }
204
204
  return binding
205
205
  } catch (e) {
@@ -212,10 +212,10 @@ function requireNative() {
212
212
  loadErrors.push(e)
213
213
  }
214
214
  try {
215
- const binding = require('aimux-darwin-arm64')
216
- const bindingPackageVersion = require('aimux-darwin-arm64/package.json').version
217
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
218
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
215
+ const binding = require('@arcships/aimux-darwin-arm64')
216
+ const bindingPackageVersion = require('@arcships/aimux-darwin-arm64/package.json').version
217
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
218
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
219
219
  }
220
220
  return binding
221
221
  } catch (e) {
@@ -232,10 +232,10 @@ function requireNative() {
232
232
  loadErrors.push(e)
233
233
  }
234
234
  try {
235
- const binding = require('aimux-freebsd-x64')
236
- const bindingPackageVersion = require('aimux-freebsd-x64/package.json').version
237
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
238
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
235
+ const binding = require('@arcships/aimux-freebsd-x64')
236
+ const bindingPackageVersion = require('@arcships/aimux-freebsd-x64/package.json').version
237
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
238
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
239
239
  }
240
240
  return binding
241
241
  } catch (e) {
@@ -248,10 +248,10 @@ function requireNative() {
248
248
  loadErrors.push(e)
249
249
  }
250
250
  try {
251
- const binding = require('aimux-freebsd-arm64')
252
- const bindingPackageVersion = require('aimux-freebsd-arm64/package.json').version
253
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
254
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
251
+ const binding = require('@arcships/aimux-freebsd-arm64')
252
+ const bindingPackageVersion = require('@arcships/aimux-freebsd-arm64/package.json').version
253
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
254
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
255
255
  }
256
256
  return binding
257
257
  } catch (e) {
@@ -269,10 +269,10 @@ function requireNative() {
269
269
  loadErrors.push(e)
270
270
  }
271
271
  try {
272
- const binding = require('aimux-linux-x64-musl')
273
- const bindingPackageVersion = require('aimux-linux-x64-musl/package.json').version
274
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
275
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
272
+ const binding = require('@arcships/aimux-linux-x64-musl')
273
+ const bindingPackageVersion = require('@arcships/aimux-linux-x64-musl/package.json').version
274
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
275
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
276
276
  }
277
277
  return binding
278
278
  } catch (e) {
@@ -285,10 +285,10 @@ function requireNative() {
285
285
  loadErrors.push(e)
286
286
  }
287
287
  try {
288
- const binding = require('aimux-linux-x64-gnu')
289
- const bindingPackageVersion = require('aimux-linux-x64-gnu/package.json').version
290
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
291
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
288
+ const binding = require('@arcships/aimux-linux-x64-gnu')
289
+ const bindingPackageVersion = require('@arcships/aimux-linux-x64-gnu/package.json').version
290
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
291
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
292
292
  }
293
293
  return binding
294
294
  } catch (e) {
@@ -303,10 +303,10 @@ function requireNative() {
303
303
  loadErrors.push(e)
304
304
  }
305
305
  try {
306
- const binding = require('aimux-linux-arm64-musl')
307
- const bindingPackageVersion = require('aimux-linux-arm64-musl/package.json').version
308
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
309
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
306
+ const binding = require('@arcships/aimux-linux-arm64-musl')
307
+ const bindingPackageVersion = require('@arcships/aimux-linux-arm64-musl/package.json').version
308
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
309
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
310
310
  }
311
311
  return binding
312
312
  } catch (e) {
@@ -319,10 +319,10 @@ function requireNative() {
319
319
  loadErrors.push(e)
320
320
  }
321
321
  try {
322
- const binding = require('aimux-linux-arm64-gnu')
323
- const bindingPackageVersion = require('aimux-linux-arm64-gnu/package.json').version
324
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
325
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
322
+ const binding = require('@arcships/aimux-linux-arm64-gnu')
323
+ const bindingPackageVersion = require('@arcships/aimux-linux-arm64-gnu/package.json').version
324
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
325
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
326
326
  }
327
327
  return binding
328
328
  } catch (e) {
@@ -337,10 +337,10 @@ function requireNative() {
337
337
  loadErrors.push(e)
338
338
  }
339
339
  try {
340
- const binding = require('aimux-linux-arm-musleabihf')
341
- const bindingPackageVersion = require('aimux-linux-arm-musleabihf/package.json').version
342
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
343
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
340
+ const binding = require('@arcships/aimux-linux-arm-musleabihf')
341
+ const bindingPackageVersion = require('@arcships/aimux-linux-arm-musleabihf/package.json').version
342
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
343
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
344
344
  }
345
345
  return binding
346
346
  } catch (e) {
@@ -353,10 +353,10 @@ function requireNative() {
353
353
  loadErrors.push(e)
354
354
  }
355
355
  try {
356
- const binding = require('aimux-linux-arm-gnueabihf')
357
- const bindingPackageVersion = require('aimux-linux-arm-gnueabihf/package.json').version
358
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
359
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
356
+ const binding = require('@arcships/aimux-linux-arm-gnueabihf')
357
+ const bindingPackageVersion = require('@arcships/aimux-linux-arm-gnueabihf/package.json').version
358
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
359
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
360
360
  }
361
361
  return binding
362
362
  } catch (e) {
@@ -371,10 +371,10 @@ function requireNative() {
371
371
  loadErrors.push(e)
372
372
  }
373
373
  try {
374
- const binding = require('aimux-linux-loong64-musl')
375
- const bindingPackageVersion = require('aimux-linux-loong64-musl/package.json').version
376
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
377
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
374
+ const binding = require('@arcships/aimux-linux-loong64-musl')
375
+ const bindingPackageVersion = require('@arcships/aimux-linux-loong64-musl/package.json').version
376
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
377
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
378
378
  }
379
379
  return binding
380
380
  } catch (e) {
@@ -387,10 +387,10 @@ function requireNative() {
387
387
  loadErrors.push(e)
388
388
  }
389
389
  try {
390
- const binding = require('aimux-linux-loong64-gnu')
391
- const bindingPackageVersion = require('aimux-linux-loong64-gnu/package.json').version
392
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
393
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
390
+ const binding = require('@arcships/aimux-linux-loong64-gnu')
391
+ const bindingPackageVersion = require('@arcships/aimux-linux-loong64-gnu/package.json').version
392
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
393
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
394
394
  }
395
395
  return binding
396
396
  } catch (e) {
@@ -405,10 +405,10 @@ function requireNative() {
405
405
  loadErrors.push(e)
406
406
  }
407
407
  try {
408
- const binding = require('aimux-linux-riscv64-musl')
409
- const bindingPackageVersion = require('aimux-linux-riscv64-musl/package.json').version
410
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
408
+ const binding = require('@arcships/aimux-linux-riscv64-musl')
409
+ const bindingPackageVersion = require('@arcships/aimux-linux-riscv64-musl/package.json').version
410
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
412
412
  }
413
413
  return binding
414
414
  } catch (e) {
@@ -421,10 +421,10 @@ function requireNative() {
421
421
  loadErrors.push(e)
422
422
  }
423
423
  try {
424
- const binding = require('aimux-linux-riscv64-gnu')
425
- const bindingPackageVersion = require('aimux-linux-riscv64-gnu/package.json').version
426
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
427
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
424
+ const binding = require('@arcships/aimux-linux-riscv64-gnu')
425
+ const bindingPackageVersion = require('@arcships/aimux-linux-riscv64-gnu/package.json').version
426
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
427
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
428
428
  }
429
429
  return binding
430
430
  } catch (e) {
@@ -438,10 +438,10 @@ function requireNative() {
438
438
  loadErrors.push(e)
439
439
  }
440
440
  try {
441
- const binding = require('aimux-linux-ppc64-gnu')
442
- const bindingPackageVersion = require('aimux-linux-ppc64-gnu/package.json').version
443
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
441
+ const binding = require('@arcships/aimux-linux-ppc64-gnu')
442
+ const bindingPackageVersion = require('@arcships/aimux-linux-ppc64-gnu/package.json').version
443
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
445
445
  }
446
446
  return binding
447
447
  } catch (e) {
@@ -454,10 +454,10 @@ function requireNative() {
454
454
  loadErrors.push(e)
455
455
  }
456
456
  try {
457
- const binding = require('aimux-linux-s390x-gnu')
458
- const bindingPackageVersion = require('aimux-linux-s390x-gnu/package.json').version
459
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
457
+ const binding = require('@arcships/aimux-linux-s390x-gnu')
458
+ const bindingPackageVersion = require('@arcships/aimux-linux-s390x-gnu/package.json').version
459
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
461
461
  }
462
462
  return binding
463
463
  } catch (e) {
@@ -474,10 +474,10 @@ function requireNative() {
474
474
  loadErrors.push(e)
475
475
  }
476
476
  try {
477
- const binding = require('aimux-openharmony-arm64')
478
- const bindingPackageVersion = require('aimux-openharmony-arm64/package.json').version
479
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
480
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
477
+ const binding = require('@arcships/aimux-openharmony-arm64')
478
+ const bindingPackageVersion = require('@arcships/aimux-openharmony-arm64/package.json').version
479
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
480
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
481
481
  }
482
482
  return binding
483
483
  } catch (e) {
@@ -490,10 +490,10 @@ function requireNative() {
490
490
  loadErrors.push(e)
491
491
  }
492
492
  try {
493
- const binding = require('aimux-openharmony-x64')
494
- const bindingPackageVersion = require('aimux-openharmony-x64/package.json').version
495
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
496
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
493
+ const binding = require('@arcships/aimux-openharmony-x64')
494
+ const bindingPackageVersion = require('@arcships/aimux-openharmony-x64/package.json').version
495
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
496
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
497
497
  }
498
498
  return binding
499
499
  } catch (e) {
@@ -506,10 +506,10 @@ function requireNative() {
506
506
  loadErrors.push(e)
507
507
  }
508
508
  try {
509
- const binding = require('aimux-openharmony-arm')
510
- const bindingPackageVersion = require('aimux-openharmony-arm/package.json').version
511
- if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
512
- throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
509
+ const binding = require('@arcships/aimux-openharmony-arm')
510
+ const bindingPackageVersion = require('@arcships/aimux-openharmony-arm/package.json').version
511
+ if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
512
+ throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
513
513
  }
514
514
  return binding
515
515
  } catch (e) {
@@ -643,16 +643,16 @@ if (!nativeBinding || forceWasi) {
643
643
  let candidateError = null
644
644
  let candidateFailed = false
645
645
  try {
646
- candidateError = __napiWasiResolveCandidate('aimux-wasm32-wasi', true, undefined)
646
+ candidateError = __napiWasiResolveCandidate('@arcships/aimux-wasm32-wasi', true, undefined)
647
647
  candidateFailed = candidateError !== null
648
648
  if (!candidateFailed) {
649
649
  if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
650
- const bindingPackageVersion = require('aimux-wasm32-wasi/package.json').version
651
- if (bindingPackageVersion !== '0.1.0') {
652
- throw new Error(`WASI binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
650
+ const bindingPackageVersion = require('@arcships/aimux-wasm32-wasi/package.json').version
651
+ if (bindingPackageVersion !== '0.1.2') {
652
+ throw new Error(`WASI binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
653
653
  }
654
654
  }
655
- wasiBinding = require('aimux-wasm32-wasi')
655
+ wasiBinding = require('@arcships/aimux-wasm32-wasi')
656
656
  nativeBinding = wasiBinding
657
657
  wasiBindingLoaded = true
658
658
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcships/aimux",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Unified LLM service layer — one API for 172+ AI providers (Rust core, Node.js binding)",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",