@arcships/aimux 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/ops.d.ts +5 -1
- package/dist/generated/ops.js +8 -4
- package/dist/generated/types.d.ts +217 -5
- package/dist/index.js +6 -5
- package/dist/native.d.ts +2 -1
- package/dist/native.js +68 -25
- package/index.d.ts +4 -1
- package/index.js +54 -54
- package/package.json +9 -8
package/dist/generated/ops.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const ABI_VERSION: 65536;
|
|
2
2
|
export declare const OPS_VERSION: "1.0";
|
|
3
|
-
export declare const MANIFEST_DIGEST: "
|
|
3
|
+
export declare const MANIFEST_DIGEST: "9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae";
|
|
4
4
|
export declare const OP_ABORT_CREATE: "abort.create";
|
|
5
5
|
export declare const OP_ABORT_SIGNAL: "abort.signal";
|
|
6
6
|
export declare const OP_AUTH_CODEX_REFRESH: "auth.codexRefresh";
|
|
@@ -28,6 +28,7 @@ export declare const OP_OUTPUT_TO_OPEN_AI: "output.toOpenAI";
|
|
|
28
28
|
export declare const OP_PROVIDER_CREATE: "provider.create";
|
|
29
29
|
export declare const OP_PROVIDER_CUSTOM: "provider.custom";
|
|
30
30
|
export declare const OP_PROVIDER_DEFAULT: "provider.default";
|
|
31
|
+
export declare const OP_PROVIDER_DESCRIPTORS: "provider.descriptors";
|
|
31
32
|
export declare const OP_PROVIDER_FILES: "provider.files";
|
|
32
33
|
export declare const OP_PROVIDER_INVOKE: "provider.invoke";
|
|
33
34
|
export declare const OP_PROVIDER_MODEL: "provider.model";
|
|
@@ -39,7 +40,10 @@ export declare const OP_RECORDER_FLUSH: "recorder.flush";
|
|
|
39
40
|
export declare const OP_RECORDER_STATS: "recorder.stats";
|
|
40
41
|
export declare const OP_RECORDER_STOP: "recorder.stop";
|
|
41
42
|
export declare const OP_REGISTRY_CREATE: "registry.create";
|
|
43
|
+
export declare const OP_REGISTRY_FROM_CONFIG: "registry.fromConfig";
|
|
44
|
+
export declare const OP_REGISTRY_LIST: "registry.list";
|
|
42
45
|
export declare const OP_REGISTRY_PROVIDER: "registry.provider";
|
|
46
|
+
export declare const OP_REGISTRY_UPDATE: "registry.update";
|
|
43
47
|
export declare const OP_REPLAY_CAPABILITIES: "replay.capabilities";
|
|
44
48
|
export declare const OP_REPLAY_CREATE: "replay.create";
|
|
45
49
|
export declare const OP_REPLAY_DRY_RUN: "replay.dryRun";
|
package/dist/generated/ops.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
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:
|
|
3
|
+
exports.OP_REPLAY_INSPECT = exports.OP_REPLAY_DRY_RUN = exports.OP_REPLAY_CREATE = exports.OP_REPLAY_CAPABILITIES = exports.OP_REGISTRY_UPDATE = exports.OP_REGISTRY_PROVIDER = exports.OP_REGISTRY_LIST = exports.OP_REGISTRY_FROM_CONFIG = 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_DESCRIPTORS = 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 = exports.OP_RUNTIME_DESCRIBE = exports.OP_RUNTIME_CONFIGURE = exports.OP_RERANKING_RERANK = exports.OP_REPLAY_LIVE = void 0;
|
|
5
|
+
// Generated by aimux-codegen. Do not edit. Manifest SHA-256: 9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae
|
|
6
6
|
exports.ABI_VERSION = 65536;
|
|
7
7
|
exports.OPS_VERSION = "1.0";
|
|
8
|
-
exports.MANIFEST_DIGEST = "
|
|
8
|
+
exports.MANIFEST_DIGEST = "9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae";
|
|
9
9
|
exports.OP_ABORT_CREATE = "abort.create";
|
|
10
10
|
exports.OP_ABORT_SIGNAL = "abort.signal";
|
|
11
11
|
exports.OP_AUTH_CODEX_REFRESH = "auth.codexRefresh";
|
|
@@ -33,6 +33,7 @@ exports.OP_OUTPUT_TO_OPEN_AI = "output.toOpenAI";
|
|
|
33
33
|
exports.OP_PROVIDER_CREATE = "provider.create";
|
|
34
34
|
exports.OP_PROVIDER_CUSTOM = "provider.custom";
|
|
35
35
|
exports.OP_PROVIDER_DEFAULT = "provider.default";
|
|
36
|
+
exports.OP_PROVIDER_DESCRIPTORS = "provider.descriptors";
|
|
36
37
|
exports.OP_PROVIDER_FILES = "provider.files";
|
|
37
38
|
exports.OP_PROVIDER_INVOKE = "provider.invoke";
|
|
38
39
|
exports.OP_PROVIDER_MODEL = "provider.model";
|
|
@@ -44,7 +45,10 @@ exports.OP_RECORDER_FLUSH = "recorder.flush";
|
|
|
44
45
|
exports.OP_RECORDER_STATS = "recorder.stats";
|
|
45
46
|
exports.OP_RECORDER_STOP = "recorder.stop";
|
|
46
47
|
exports.OP_REGISTRY_CREATE = "registry.create";
|
|
48
|
+
exports.OP_REGISTRY_FROM_CONFIG = "registry.fromConfig";
|
|
49
|
+
exports.OP_REGISTRY_LIST = "registry.list";
|
|
47
50
|
exports.OP_REGISTRY_PROVIDER = "registry.provider";
|
|
51
|
+
exports.OP_REGISTRY_UPDATE = "registry.update";
|
|
48
52
|
exports.OP_REPLAY_CAPABILITIES = "replay.capabilities";
|
|
49
53
|
exports.OP_REPLAY_CREATE = "replay.create";
|
|
50
54
|
exports.OP_REPLAY_DRY_RUN = "replay.dryRun";
|
|
@@ -832,6 +832,17 @@ export interface ChatCompletionUsage {
|
|
|
832
832
|
prompt_tokens_details?: PromptTokensDetails | null;
|
|
833
833
|
total_tokens: number;
|
|
834
834
|
}
|
|
835
|
+
/**
|
|
836
|
+
* Access mode for the `codex` package in declarative configuration.
|
|
837
|
+
*/
|
|
838
|
+
export type CodexModeSpec = {
|
|
839
|
+
type: "apiKey";
|
|
840
|
+
apiKey?: StringOrEnv | null;
|
|
841
|
+
} | {
|
|
842
|
+
type: "chatGptAccount";
|
|
843
|
+
accountId?: string | null;
|
|
844
|
+
token: StringOrEnv;
|
|
845
|
+
};
|
|
835
846
|
export interface CodexRefreshRequest {
|
|
836
847
|
clientId: string;
|
|
837
848
|
refreshToken: string;
|
|
@@ -1360,6 +1371,12 @@ export interface EmbeddingUsage {
|
|
|
1360
1371
|
}
|
|
1361
1372
|
export interface EmptyParams {
|
|
1362
1373
|
}
|
|
1374
|
+
/**
|
|
1375
|
+
* Reference to an environment variable carrying a credential or secret.
|
|
1376
|
+
*/
|
|
1377
|
+
export interface EnvVarRef {
|
|
1378
|
+
env: string;
|
|
1379
|
+
}
|
|
1363
1380
|
/**
|
|
1364
1381
|
* The error another error was built from: the AI SDK's `cause`.
|
|
1365
1382
|
*
|
|
@@ -2089,6 +2106,11 @@ export interface InputTokenDetails {
|
|
|
2089
2106
|
*/
|
|
2090
2107
|
noCacheTokens?: number | null;
|
|
2091
2108
|
}
|
|
2109
|
+
/**
|
|
2110
|
+
* Language-model API variant exposed on a [`Provider`] alongside the default
|
|
2111
|
+
* [`Provider::language_model`] constructor.
|
|
2112
|
+
*/
|
|
2113
|
+
export type LanguageApi = "chat" | "responses" | "completion" | "messages";
|
|
2092
2114
|
/**
|
|
2093
2115
|
* A file in a provider's output: `LanguageModelV4File` /
|
|
2094
2116
|
* `LanguageModelV4ReasoningFile` (`provider`
|
|
@@ -2156,6 +2178,12 @@ export type LanguageModelToolResultOutput = {
|
|
|
2156
2178
|
value: unknown;
|
|
2157
2179
|
} | {
|
|
2158
2180
|
type: "content";
|
|
2181
|
+
/**
|
|
2182
|
+
* Whether the tool call failed. Beyond the AI SDK's `content` output,
|
|
2183
|
+
* so a result that carries an image or a file can still be an
|
|
2184
|
+
* error (#470).
|
|
2185
|
+
*/
|
|
2186
|
+
isError?: boolean | null;
|
|
2159
2187
|
value: Array<ToolResultContent>;
|
|
2160
2188
|
};
|
|
2161
2189
|
/**
|
|
@@ -2314,6 +2342,10 @@ export interface MoaParams {
|
|
|
2314
2342
|
* A single input or output modality.
|
|
2315
2343
|
*/
|
|
2316
2344
|
export type Modality = "Text" | "Image" | "Audio" | "Video" | "Pdf" | "Other" | "Embedding" | "Score";
|
|
2345
|
+
/**
|
|
2346
|
+
* Model modality supported by a provider package or registry resolution call.
|
|
2347
|
+
*/
|
|
2348
|
+
export type ModalityKind = "languageModel" | "embeddingModel" | "imageModel" | "speechModel" | "transcriptionModel" | "rerankingModel" | "videoModel" | "searchModel" | "decision";
|
|
2317
2349
|
/**
|
|
2318
2350
|
* Model-level capability flags (more precise than provider-level `supports_*`).
|
|
2319
2351
|
*/
|
|
@@ -2391,7 +2423,7 @@ export type ModelMessage = {
|
|
|
2391
2423
|
content: Array<ToolContentPart>;
|
|
2392
2424
|
providerOptions?: Record<string, Record<string, unknown>> | null;
|
|
2393
2425
|
};
|
|
2394
|
-
export type ModelMethod = "languageModel" | "embeddingModel" | "imageModel" | "speechModel" | "transcriptionModel" | "rerankingModel" | "videoModel" | "searchModel" | "decision";
|
|
2426
|
+
export type ModelMethod = "languageModel" | "chat" | "responses" | "completion" | "messages" | "embeddingModel" | "imageModel" | "speechModel" | "transcriptionModel" | "rerankingModel" | "videoModel" | "searchModel" | "decision";
|
|
2395
2427
|
/**
|
|
2396
2428
|
* Input/output modality sets.
|
|
2397
2429
|
*/
|
|
@@ -2655,6 +2687,34 @@ export interface OutputTokenDetails {
|
|
|
2655
2687
|
*/
|
|
2656
2688
|
textTokens?: number | null;
|
|
2657
2689
|
}
|
|
2690
|
+
/**
|
|
2691
|
+
* Authentication mechanism implemented by a provider package.
|
|
2692
|
+
*/
|
|
2693
|
+
export type PackageAuthKind = "bearer" | "header" | "queryParam" | "basic" | "awsSigV4" | "awsBearerOrSigV4" | "anthropicAws" | "googleVertex" | "azureApiKeyOrToken" | "codexChannel" | "optionalBearer" | "none";
|
|
2694
|
+
/**
|
|
2695
|
+
* Secret-free static metadata describing a provider package.
|
|
2696
|
+
*/
|
|
2697
|
+
export interface PackageDescriptor {
|
|
2698
|
+
apiKeyEnv?: string | null;
|
|
2699
|
+
authKind: PackageAuthKind;
|
|
2700
|
+
baseUrlEnv?: string | null;
|
|
2701
|
+
defaultBaseUrl?: string | null;
|
|
2702
|
+
defaultMethod?: ModalityKind | null;
|
|
2703
|
+
id: string;
|
|
2704
|
+
kind: PackageKind;
|
|
2705
|
+
languageApis: Array<LanguageApi>;
|
|
2706
|
+
modalities: Array<ModalityKind>;
|
|
2707
|
+
settings: Array<SettingFieldSpec>;
|
|
2708
|
+
supportsDefaultInstance: boolean;
|
|
2709
|
+
supportsDiscovery: boolean;
|
|
2710
|
+
supportsFiles: boolean;
|
|
2711
|
+
supportsSkills: boolean;
|
|
2712
|
+
templateParams: Array<TemplateParamDescriptor>;
|
|
2713
|
+
}
|
|
2714
|
+
/**
|
|
2715
|
+
* Architectural category of a provider package.
|
|
2716
|
+
*/
|
|
2717
|
+
export type PackageKind = "native" | "protocol" | "preset" | "specialized";
|
|
2658
2718
|
/**
|
|
2659
2719
|
* A prefix break between two consecutive records of a session.
|
|
2660
2720
|
*/
|
|
@@ -2669,11 +2729,66 @@ export interface PromptTokensDetails {
|
|
|
2669
2729
|
cache_write_tokens?: number | null;
|
|
2670
2730
|
cached_tokens: number;
|
|
2671
2731
|
}
|
|
2732
|
+
/**
|
|
2733
|
+
* Declarative provider registry configuration document.
|
|
2734
|
+
*/
|
|
2735
|
+
export interface ProviderConfigDocument {
|
|
2736
|
+
providers: Record<string, ProviderEntrySpec>;
|
|
2737
|
+
}
|
|
2738
|
+
/**
|
|
2739
|
+
* Secret-safe declarative settings shared across provider packages.
|
|
2740
|
+
*/
|
|
2741
|
+
export interface ProviderConfigSettings {
|
|
2742
|
+
accessKeyId?: StringOrEnv | null;
|
|
2743
|
+
accessToken?: StringOrEnv | null;
|
|
2744
|
+
apiKey?: StringOrEnv | null;
|
|
2745
|
+
apiVersion?: string | null;
|
|
2746
|
+
authToken?: StringOrEnv | null;
|
|
2747
|
+
baseUrl?: string | null;
|
|
2748
|
+
codexMode?: CodexModeSpec | null;
|
|
2749
|
+
cx?: string | null;
|
|
2750
|
+
endpoint?: string | null;
|
|
2751
|
+
headers?: Record<string, string | null>;
|
|
2752
|
+
includeUsage?: boolean | null;
|
|
2753
|
+
location?: string | null;
|
|
2754
|
+
login?: StringOrEnv | null;
|
|
2755
|
+
name?: string | null;
|
|
2756
|
+
organization?: string | null;
|
|
2757
|
+
originator?: string | null;
|
|
2758
|
+
params?: Record<string, string>;
|
|
2759
|
+
password?: StringOrEnv | null;
|
|
2760
|
+
probabilitySource?: string | null;
|
|
2761
|
+
project?: string | null;
|
|
2762
|
+
queryParams?: Record<string, string>;
|
|
2763
|
+
region?: string | null;
|
|
2764
|
+
resourceName?: string | null;
|
|
2765
|
+
secretAccessKey?: StringOrEnv | null;
|
|
2766
|
+
sessionToken?: StringOrEnv | null;
|
|
2767
|
+
speechBaseUrl?: string | null;
|
|
2768
|
+
supportsMultiPartToolContent?: boolean | null;
|
|
2769
|
+
supportsStructuredOutputs?: boolean | null;
|
|
2770
|
+
useDeploymentBasedUrls?: boolean | null;
|
|
2771
|
+
workspaceId?: string | null;
|
|
2772
|
+
}
|
|
2773
|
+
/**
|
|
2774
|
+
* Trusted-caller operation: constructs a provider handle from package settings
|
|
2775
|
+
* and optional `{ "env": ... }` references. Untrusted callers must not be
|
|
2776
|
+
* permitted to supply arbitrary `baseUrl` values with omitted credentials.
|
|
2777
|
+
*/
|
|
2672
2778
|
export interface ProviderCreateParams {
|
|
2779
|
+
/**
|
|
2780
|
+
* Optional allowlist gating explicit `{ "env": "VAR" }` (`StringOrEnv`)
|
|
2781
|
+
* interpolation in `settings`. Does not restrict implicit per-provider
|
|
2782
|
+
* default environment variable fallbacks when credential or `baseUrl`
|
|
2783
|
+
* settings are omitted.
|
|
2784
|
+
*/
|
|
2785
|
+
envAllowlist?: Array<string> | null;
|
|
2673
2786
|
package: string;
|
|
2674
2787
|
settings?: ProviderSettings;
|
|
2675
2788
|
}
|
|
2676
2789
|
export interface ProviderCustomParams {
|
|
2790
|
+
chatModels?: Record<string, HandleIdInput>;
|
|
2791
|
+
completionModels?: Record<string, HandleIdInput>;
|
|
2677
2792
|
decisionModels?: Record<string, HandleIdInput>;
|
|
2678
2793
|
defaultMethod?: string | null;
|
|
2679
2794
|
embeddingModels?: Record<string, HandleIdInput>;
|
|
@@ -2683,7 +2798,9 @@ export interface ProviderCustomParams {
|
|
|
2683
2798
|
imageModels?: Record<string, HandleIdInput>;
|
|
2684
2799
|
languageModelMiddleware?: Array<HandleIdInput>;
|
|
2685
2800
|
languageModels?: Record<string, HandleIdInput>;
|
|
2801
|
+
messagesModels?: Record<string, HandleIdInput>;
|
|
2686
2802
|
rerankingModels?: Record<string, HandleIdInput>;
|
|
2803
|
+
responsesModels?: Record<string, HandleIdInput>;
|
|
2687
2804
|
searchModels?: Record<string, HandleIdInput>;
|
|
2688
2805
|
speechModels?: Record<string, HandleIdInput>;
|
|
2689
2806
|
transcriptionModels?: Record<string, HandleIdInput>;
|
|
@@ -2692,6 +2809,16 @@ export interface ProviderCustomParams {
|
|
|
2692
2809
|
export interface ProviderDefaultParams {
|
|
2693
2810
|
package: string;
|
|
2694
2811
|
}
|
|
2812
|
+
export interface ProviderDescriptorsParams {
|
|
2813
|
+
package?: string | null;
|
|
2814
|
+
}
|
|
2815
|
+
/**
|
|
2816
|
+
* Configuration for a single provider entry (`package` + typed `settings`).
|
|
2817
|
+
*/
|
|
2818
|
+
export interface ProviderEntrySpec {
|
|
2819
|
+
package: string;
|
|
2820
|
+
settings?: ProviderConfigSettings;
|
|
2821
|
+
}
|
|
2695
2822
|
export interface ProviderInvokeParams {
|
|
2696
2823
|
abort?: HandleIdInput | null;
|
|
2697
2824
|
method: string;
|
|
@@ -2723,17 +2850,39 @@ export interface ProviderRecord {
|
|
|
2723
2850
|
providerId: string;
|
|
2724
2851
|
}
|
|
2725
2852
|
export interface ProviderSettings {
|
|
2726
|
-
|
|
2853
|
+
accessKeyId?: StringOrEnv | null;
|
|
2854
|
+
accessToken?: StringOrEnv | null;
|
|
2855
|
+
apiKey?: StringOrEnv | null;
|
|
2856
|
+
apiVersion?: string | null;
|
|
2857
|
+
authToken?: StringOrEnv | null;
|
|
2727
2858
|
baseUrl?: string | null;
|
|
2859
|
+
codexMode?: CodexModeSpec | null;
|
|
2728
2860
|
credentialResolver?: HandleIdInput | null;
|
|
2861
|
+
cx?: string | null;
|
|
2729
2862
|
endpoint?: string | null;
|
|
2730
2863
|
fetch?: HandleIdInput | null;
|
|
2731
2864
|
headers?: Record<string, string | null>;
|
|
2865
|
+
includeUsage?: boolean | null;
|
|
2866
|
+
location?: string | null;
|
|
2867
|
+
login?: StringOrEnv | null;
|
|
2868
|
+
name?: string | null;
|
|
2732
2869
|
organization?: string | null;
|
|
2870
|
+
originator?: string | null;
|
|
2733
2871
|
params?: Record<string, string>;
|
|
2872
|
+
password?: StringOrEnv | null;
|
|
2734
2873
|
probabilitySource?: string | null;
|
|
2735
2874
|
project?: string | null;
|
|
2875
|
+
queryParams?: Record<string, string>;
|
|
2876
|
+
region?: string | null;
|
|
2877
|
+
resourceName?: string | null;
|
|
2878
|
+
secretAccessKey?: StringOrEnv | null;
|
|
2879
|
+
sessionToken?: StringOrEnv | null;
|
|
2880
|
+
speechBaseUrl?: string | null;
|
|
2881
|
+
supportsMultiPartToolContent?: boolean | null;
|
|
2882
|
+
supportsStructuredOutputs?: boolean | null;
|
|
2883
|
+
useDeploymentBasedUrls?: boolean | null;
|
|
2736
2884
|
webSocket?: HandleIdInput | null;
|
|
2885
|
+
workspaceId?: string | null;
|
|
2737
2886
|
}
|
|
2738
2887
|
/**
|
|
2739
2888
|
* A provider-defined tool (e.g. `anthropic.web_search_20250305`,
|
|
@@ -2969,14 +3118,51 @@ export type RecordingOperation = "language-model" | "decision";
|
|
|
2969
3118
|
export interface RegistryCreateParams {
|
|
2970
3119
|
entries: Array<RegistryEntry>;
|
|
2971
3120
|
namespace?: string;
|
|
3121
|
+
separator?: string | null;
|
|
2972
3122
|
}
|
|
2973
3123
|
export interface RegistryEntry {
|
|
2974
3124
|
key: string;
|
|
2975
3125
|
provider: string;
|
|
2976
3126
|
}
|
|
3127
|
+
/**
|
|
3128
|
+
* Trusted-caller operation: constructs a provider registry from a declarative
|
|
3129
|
+
* configuration document and optional `{ "env": ... }` references. Untrusted
|
|
3130
|
+
* callers must not be permitted to supply arbitrary `baseUrl` values with
|
|
3131
|
+
* omitted credentials.
|
|
3132
|
+
*/
|
|
3133
|
+
export interface RegistryFromConfigParams {
|
|
3134
|
+
config: ProviderConfigDocument;
|
|
3135
|
+
/**
|
|
3136
|
+
* Optional allowlist gating explicit `{ "env": "VAR" }` (`StringOrEnv`)
|
|
3137
|
+
* interpolation inside `config`. Does not restrict implicit per-provider
|
|
3138
|
+
* default environment variable fallbacks when credential or `baseUrl`
|
|
3139
|
+
* settings are omitted.
|
|
3140
|
+
*/
|
|
3141
|
+
envAllowlist?: Array<string> | null;
|
|
3142
|
+
namespace?: string;
|
|
3143
|
+
separator?: string | null;
|
|
3144
|
+
}
|
|
3145
|
+
export interface RegistryListParams {
|
|
3146
|
+
}
|
|
3147
|
+
export interface RegistryListResult {
|
|
3148
|
+
keys: Array<string>;
|
|
3149
|
+
namespace: string;
|
|
3150
|
+
separator: string;
|
|
3151
|
+
}
|
|
2977
3152
|
export interface RegistryProviderParams {
|
|
2978
3153
|
key: string;
|
|
2979
3154
|
}
|
|
3155
|
+
export interface RegistryUpdateParams {
|
|
3156
|
+
derive?: boolean;
|
|
3157
|
+
remove?: Array<string>;
|
|
3158
|
+
replace?: boolean;
|
|
3159
|
+
set?: Array<RegistryEntry>;
|
|
3160
|
+
}
|
|
3161
|
+
export interface RegistryUpdateResult {
|
|
3162
|
+
handle?: HandleId | null;
|
|
3163
|
+
keys: Array<string>;
|
|
3164
|
+
kind?: HandleKind | null;
|
|
3165
|
+
}
|
|
2980
3166
|
/**
|
|
2981
3167
|
* A replacement raw call whose tag is optional on input.
|
|
2982
3168
|
*/
|
|
@@ -3235,9 +3421,10 @@ export interface RuntimeDescribeParams {
|
|
|
3235
3421
|
* A model entry returned by a provider's `/models` endpoint (the sparse,
|
|
3236
3422
|
* account-level truth of "what this key can call").
|
|
3237
3423
|
*
|
|
3238
|
-
* Carries only what the provider
|
|
3239
|
-
*
|
|
3240
|
-
*
|
|
3424
|
+
* Carries only what the provider's list response declares: always `id`, and
|
|
3425
|
+
* `owned_by`, `created` and the token `limits` when the provider sends them.
|
|
3426
|
+
* Configuration comes from [`ModelSpec`] (community knowledge); the host
|
|
3427
|
+
* merges the two as needed (RFC-0027). aimux itself does not combine them.
|
|
3241
3428
|
*/
|
|
3242
3429
|
export interface RuntimeModel {
|
|
3243
3430
|
/**
|
|
@@ -3462,6 +3649,20 @@ export interface SessionView {
|
|
|
3462
3649
|
*/
|
|
3463
3650
|
source: SessionSource;
|
|
3464
3651
|
}
|
|
3652
|
+
/**
|
|
3653
|
+
* Wire shape of a setting field accepted by a provider package.
|
|
3654
|
+
*/
|
|
3655
|
+
export type SettingFieldKind = "string" | "credential" | "boolean" | "headerMap" | "stringMap" | "codexMode";
|
|
3656
|
+
/**
|
|
3657
|
+
* Static description of one setting accepted when constructing a provider package.
|
|
3658
|
+
*/
|
|
3659
|
+
export interface SettingFieldSpec {
|
|
3660
|
+
credential: boolean;
|
|
3661
|
+
envVar?: string | null;
|
|
3662
|
+
kind: SettingFieldKind;
|
|
3663
|
+
name: string;
|
|
3664
|
+
required: boolean;
|
|
3665
|
+
}
|
|
3465
3666
|
/**
|
|
3466
3667
|
* Image/video size in `{width}x{height}` format (e.g. `"1024x1024"`).
|
|
3467
3668
|
*
|
|
@@ -3914,6 +4115,10 @@ export interface StreamOptions {
|
|
|
3914
4115
|
includeReasoning?: boolean;
|
|
3915
4116
|
includeUsage?: boolean;
|
|
3916
4117
|
}
|
|
4118
|
+
/**
|
|
4119
|
+
* Configuration string accepting either a literal secret/value or an `{ "env": "VAR" }` reference.
|
|
4120
|
+
*/
|
|
4121
|
+
export type StringOrEnv = string | EnvVarRef;
|
|
3917
4122
|
/**
|
|
3918
4123
|
* A raw provider call with its required wire tag.
|
|
3919
4124
|
*/
|
|
@@ -3954,6 +4159,13 @@ export interface TaggedToolResult {
|
|
|
3954
4159
|
*/
|
|
3955
4160
|
type: "tool-result";
|
|
3956
4161
|
}
|
|
4162
|
+
/**
|
|
4163
|
+
* Static description of one URL template parameter required by a preset provider.
|
|
4164
|
+
*/
|
|
4165
|
+
export interface TemplateParamDescriptor {
|
|
4166
|
+
envVar: string;
|
|
4167
|
+
name: string;
|
|
4168
|
+
}
|
|
3957
4169
|
export interface TerminalSummary {
|
|
3958
4170
|
error?: ErrorEnvelope | null;
|
|
3959
4171
|
outcome: OperationOutcome;
|
package/dist/index.js
CHANGED
|
@@ -54,13 +54,14 @@ const ops = __importStar(require("./generated/ops.js"));
|
|
|
54
54
|
const native_ts_1 = require("./native.js");
|
|
55
55
|
const error_ts_1 = require("./error.js");
|
|
56
56
|
__exportStar(require("./error.js"), exports);
|
|
57
|
+
function jsonData(_key, item) {
|
|
58
|
+
if (typeof item === 'function' || typeof item === 'symbol')
|
|
59
|
+
throw new TypeError('Ops parameters must contain JSON data only');
|
|
60
|
+
return item;
|
|
61
|
+
}
|
|
57
62
|
function json(value) {
|
|
58
63
|
try {
|
|
59
|
-
const serialized = JSON.stringify(value,
|
|
60
|
-
if (typeof item === 'function' || typeof item === 'symbol')
|
|
61
|
-
throw new TypeError('Ops parameters must contain JSON data only');
|
|
62
|
-
return item;
|
|
63
|
-
});
|
|
64
|
+
const serialized = JSON.stringify(value, jsonData);
|
|
64
65
|
if (serialized === undefined)
|
|
65
66
|
throw new TypeError('Parameters must be JSON data');
|
|
66
67
|
return serialized;
|
package/dist/native.d.ts
CHANGED
|
@@ -16,12 +16,13 @@ export interface Manifest {
|
|
|
16
16
|
errorCodes: ReadonlyArray<unknown>;
|
|
17
17
|
[key: string]: unknown;
|
|
18
18
|
}
|
|
19
|
-
export declare function verifyManifest(manifest: Manifest): void;
|
|
19
|
+
export declare function verifyManifest(manifest: Pick<Manifest, 'abiVersion' | 'opsVersion' | 'digest'>): void;
|
|
20
20
|
export declare class Runtime {
|
|
21
21
|
#private;
|
|
22
22
|
readonly manifest: Manifest;
|
|
23
23
|
readonly manifestDigest: string;
|
|
24
24
|
constructor();
|
|
25
|
+
private readManifest;
|
|
25
26
|
abort(signal?: AbortSignal): NativeAbort;
|
|
26
27
|
drop(handle: string): void;
|
|
27
28
|
call(handle: string, op: string, paramsJson: string, abort?: NativeAbort): Promise<string>;
|
package/dist/native.js
CHANGED
|
@@ -24,7 +24,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
24
24
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
25
25
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
26
26
|
};
|
|
27
|
-
var _Runtime_inner;
|
|
27
|
+
var _Runtime_inner, _Runtime_manifest;
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.Runtime = void 0;
|
|
30
30
|
exports.verifyManifest = verifyManifest;
|
|
@@ -34,19 +34,33 @@ const ops_ts_1 = require("./generated/ops.js");
|
|
|
34
34
|
const error_ts_1 = require("./error.js");
|
|
35
35
|
__exportStar(require("./error.js"), exports);
|
|
36
36
|
function verifyManifest(manifest) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
const expected = { abiVersion: ops_ts_1.ABI_VERSION, opsVersion: ops_ts_1.OPS_VERSION, digest: ops_ts_1.MANIFEST_DIGEST };
|
|
38
|
+
for (const field of ['abiVersion', 'opsVersion', 'digest']) {
|
|
39
|
+
if (manifest[field] !== expected[field]) {
|
|
40
|
+
throw (0, error_ts_1.protocolError)(302, 'UnsupportedOpsVersion', `Incompatible manifest ${field}: expected ${expected[field]}, received ${String(manifest[field])}`);
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
class Runtime {
|
|
44
45
|
constructor() {
|
|
45
46
|
_Runtime_inner.set(this, void 0);
|
|
47
|
+
_Runtime_manifest.set(this, void 0);
|
|
46
48
|
__classPrivateFieldSet(this, _Runtime_inner, new index_js_1.Runtime(), "f");
|
|
47
|
-
|
|
48
|
-
verifyManifest(this.manifest);
|
|
49
|
+
Object.defineProperty(this, 'manifest', { enumerable: true, get: () => this.readManifest() });
|
|
49
50
|
this.manifestDigest = __classPrivateFieldGet(this, _Runtime_inner, "f").manifestDigest();
|
|
51
|
+
verifyManifest({
|
|
52
|
+
abiVersion: __classPrivateFieldGet(this, _Runtime_inner, "f").abiVersion(),
|
|
53
|
+
opsVersion: __classPrivateFieldGet(this, _Runtime_inner, "f").opsVersion(),
|
|
54
|
+
digest: this.manifestDigest,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
readManifest() {
|
|
58
|
+
if (__classPrivateFieldGet(this, _Runtime_manifest, "f") === undefined) {
|
|
59
|
+
const manifest = JSON.parse(__classPrivateFieldGet(this, _Runtime_inner, "f").manifestJson());
|
|
60
|
+
verifyManifest(manifest);
|
|
61
|
+
__classPrivateFieldSet(this, _Runtime_manifest, manifest, "f");
|
|
62
|
+
}
|
|
63
|
+
return __classPrivateFieldGet(this, _Runtime_manifest, "f");
|
|
50
64
|
}
|
|
51
65
|
abort(signal) { return new index_js_1.Abort(__classPrivateFieldGet(this, _Runtime_inner, "f"), signal); }
|
|
52
66
|
drop(handle) {
|
|
@@ -66,33 +80,62 @@ class Runtime {
|
|
|
66
80
|
}
|
|
67
81
|
}
|
|
68
82
|
async stream(handle, op, paramsJson, abort) {
|
|
69
|
-
let
|
|
83
|
+
let native;
|
|
70
84
|
try {
|
|
71
|
-
|
|
85
|
+
native = await __classPrivateFieldGet(this, _Runtime_inner, "f").stream(handle, op, paramsJson, abort);
|
|
72
86
|
}
|
|
73
87
|
catch (error) {
|
|
74
88
|
(0, error_ts_1.rethrow)(error);
|
|
75
89
|
}
|
|
90
|
+
const inner = native[Symbol.asyncIterator]();
|
|
91
|
+
let batch = [];
|
|
92
|
+
let cursor = 0;
|
|
93
|
+
let reading = false;
|
|
94
|
+
let closed = false;
|
|
95
|
+
const close = () => { closed = true; batch = []; };
|
|
76
96
|
// This is deliberately an explicit iterator: return() must cancel while next() is pending.
|
|
77
97
|
const iterator = {
|
|
78
|
-
async next() {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
98
|
+
async next() {
|
|
99
|
+
if (closed)
|
|
100
|
+
return { done: true, value: undefined };
|
|
101
|
+
if (reading)
|
|
102
|
+
throw (0, error_ts_1.protocolError)(303, 'ConcurrentConsumer', 'stream already has a pending consumer');
|
|
103
|
+
if (cursor === batch.length) {
|
|
104
|
+
reading = true;
|
|
105
|
+
try {
|
|
106
|
+
const frames = await native.nextBatch();
|
|
107
|
+
if (closed || frames.length === 0) {
|
|
108
|
+
close();
|
|
109
|
+
return { done: true, value: undefined };
|
|
110
|
+
}
|
|
111
|
+
batch = frames;
|
|
112
|
+
cursor = 0;
|
|
113
|
+
}
|
|
114
|
+
catch (error) {
|
|
115
|
+
(0, error_ts_1.rethrow)(error);
|
|
116
|
+
}
|
|
117
|
+
finally {
|
|
118
|
+
reading = false;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
const value = batch[cursor];
|
|
122
|
+
batch[cursor++] = undefined;
|
|
123
|
+
return { done: false, value };
|
|
124
|
+
},
|
|
125
|
+
async return() {
|
|
126
|
+
close();
|
|
127
|
+
try {
|
|
128
|
+
await inner.return();
|
|
129
|
+
return { done: true, value: undefined };
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
(0, error_ts_1.rethrow)(error);
|
|
133
|
+
}
|
|
134
|
+
},
|
|
90
135
|
async throw(error) {
|
|
136
|
+
close();
|
|
91
137
|
try {
|
|
92
|
-
|
|
93
|
-
return await inner.throw(error);
|
|
94
|
-
if (inner.return)
|
|
95
|
-
await inner.return();
|
|
138
|
+
await inner.throw(error);
|
|
96
139
|
throw error;
|
|
97
140
|
}
|
|
98
141
|
catch (error) {
|
|
@@ -113,4 +156,4 @@ class Runtime {
|
|
|
113
156
|
}
|
|
114
157
|
}
|
|
115
158
|
exports.Runtime = Runtime;
|
|
116
|
-
_Runtime_inner = new WeakMap();
|
|
159
|
+
_Runtime_inner = new WeakMap(), _Runtime_manifest = new WeakMap();
|
package/index.d.ts
CHANGED
|
@@ -26,7 +26,8 @@ export declare class Abort {
|
|
|
26
26
|
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols
|
|
27
27
|
*/
|
|
28
28
|
export declare class FrameIterator {
|
|
29
|
-
|
|
29
|
+
/** Drain ready data after waiting for at most the first frame. */
|
|
30
|
+
nextBatch(): Promise<string[]>
|
|
30
31
|
[globalThis.Symbol.asyncIterator](): globalThis.__NapiRsAsyncGenerator<FrameIterator, WireResult<string>, void, undefined>
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -35,6 +36,8 @@ export declare class Runtime {
|
|
|
35
36
|
constructor()
|
|
36
37
|
/** Nonblocking release for explicit disposal and JS finalization. */
|
|
37
38
|
dropHandle(id: string): WireResult<undefined>
|
|
39
|
+
abiVersion(): number
|
|
40
|
+
opsVersion(): string
|
|
38
41
|
manifestJson(): WireResult<string>
|
|
39
42
|
manifestDigest(): string
|
|
40
43
|
call(id: string, op: string, paramsJson: string, abort?: Abort | undefined | null): Promise<string>
|
package/index.js
CHANGED
|
@@ -77,8 +77,8 @@ function requireNative() {
|
|
|
77
77
|
try {
|
|
78
78
|
const binding = require('@arcships/aimux-android-arm64')
|
|
79
79
|
const bindingPackageVersion = require('@arcships/aimux-android-arm64/package.json').version
|
|
80
|
-
if (bindingPackageVersion !== '0.
|
|
81
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
80
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
82
82
|
}
|
|
83
83
|
return binding
|
|
84
84
|
} catch (e) {
|
|
@@ -93,8 +93,8 @@ function requireNative() {
|
|
|
93
93
|
try {
|
|
94
94
|
const binding = require('@arcships/aimux-android-arm-eabi')
|
|
95
95
|
const bindingPackageVersion = require('@arcships/aimux-android-arm-eabi/package.json').version
|
|
96
|
-
if (bindingPackageVersion !== '0.
|
|
97
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
96
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
98
98
|
}
|
|
99
99
|
return binding
|
|
100
100
|
} catch (e) {
|
|
@@ -114,8 +114,8 @@ function requireNative() {
|
|
|
114
114
|
try {
|
|
115
115
|
const binding = require('@arcships/aimux-win32-x64-gnu')
|
|
116
116
|
const bindingPackageVersion = require('@arcships/aimux-win32-x64-gnu/package.json').version
|
|
117
|
-
if (bindingPackageVersion !== '0.
|
|
118
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
117
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
119
119
|
}
|
|
120
120
|
return binding
|
|
121
121
|
} catch (e) {
|
|
@@ -130,8 +130,8 @@ function requireNative() {
|
|
|
130
130
|
try {
|
|
131
131
|
const binding = require('@arcships/aimux-win32-x64-msvc')
|
|
132
132
|
const bindingPackageVersion = require('@arcships/aimux-win32-x64-msvc/package.json').version
|
|
133
|
-
if (bindingPackageVersion !== '0.
|
|
134
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
133
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
135
135
|
}
|
|
136
136
|
return binding
|
|
137
137
|
} catch (e) {
|
|
@@ -147,8 +147,8 @@ function requireNative() {
|
|
|
147
147
|
try {
|
|
148
148
|
const binding = require('@arcships/aimux-win32-ia32-msvc')
|
|
149
149
|
const bindingPackageVersion = require('@arcships/aimux-win32-ia32-msvc/package.json').version
|
|
150
|
-
if (bindingPackageVersion !== '0.
|
|
151
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
150
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
152
152
|
}
|
|
153
153
|
return binding
|
|
154
154
|
} catch (e) {
|
|
@@ -163,8 +163,8 @@ function requireNative() {
|
|
|
163
163
|
try {
|
|
164
164
|
const binding = require('@arcships/aimux-win32-arm64-msvc')
|
|
165
165
|
const bindingPackageVersion = require('@arcships/aimux-win32-arm64-msvc/package.json').version
|
|
166
|
-
if (bindingPackageVersion !== '0.
|
|
167
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
166
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
168
168
|
}
|
|
169
169
|
return binding
|
|
170
170
|
} catch (e) {
|
|
@@ -182,8 +182,8 @@ function requireNative() {
|
|
|
182
182
|
try {
|
|
183
183
|
const binding = require('@arcships/aimux-darwin-universal')
|
|
184
184
|
const bindingPackageVersion = require('@arcships/aimux-darwin-universal/package.json').version
|
|
185
|
-
if (bindingPackageVersion !== '0.
|
|
186
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
185
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
187
187
|
}
|
|
188
188
|
return binding
|
|
189
189
|
} catch (e) {
|
|
@@ -198,8 +198,8 @@ function requireNative() {
|
|
|
198
198
|
try {
|
|
199
199
|
const binding = require('@arcships/aimux-darwin-x64')
|
|
200
200
|
const bindingPackageVersion = require('@arcships/aimux-darwin-x64/package.json').version
|
|
201
|
-
if (bindingPackageVersion !== '0.
|
|
202
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
201
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
203
203
|
}
|
|
204
204
|
return binding
|
|
205
205
|
} catch (e) {
|
|
@@ -214,8 +214,8 @@ function requireNative() {
|
|
|
214
214
|
try {
|
|
215
215
|
const binding = require('@arcships/aimux-darwin-arm64')
|
|
216
216
|
const bindingPackageVersion = require('@arcships/aimux-darwin-arm64/package.json').version
|
|
217
|
-
if (bindingPackageVersion !== '0.
|
|
218
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
217
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
219
219
|
}
|
|
220
220
|
return binding
|
|
221
221
|
} catch (e) {
|
|
@@ -234,8 +234,8 @@ function requireNative() {
|
|
|
234
234
|
try {
|
|
235
235
|
const binding = require('@arcships/aimux-freebsd-x64')
|
|
236
236
|
const bindingPackageVersion = require('@arcships/aimux-freebsd-x64/package.json').version
|
|
237
|
-
if (bindingPackageVersion !== '0.
|
|
238
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
237
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
239
239
|
}
|
|
240
240
|
return binding
|
|
241
241
|
} catch (e) {
|
|
@@ -250,8 +250,8 @@ function requireNative() {
|
|
|
250
250
|
try {
|
|
251
251
|
const binding = require('@arcships/aimux-freebsd-arm64')
|
|
252
252
|
const bindingPackageVersion = require('@arcships/aimux-freebsd-arm64/package.json').version
|
|
253
|
-
if (bindingPackageVersion !== '0.
|
|
254
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
253
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
255
255
|
}
|
|
256
256
|
return binding
|
|
257
257
|
} catch (e) {
|
|
@@ -271,8 +271,8 @@ function requireNative() {
|
|
|
271
271
|
try {
|
|
272
272
|
const binding = require('@arcships/aimux-linux-x64-musl')
|
|
273
273
|
const bindingPackageVersion = require('@arcships/aimux-linux-x64-musl/package.json').version
|
|
274
|
-
if (bindingPackageVersion !== '0.
|
|
275
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
274
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
276
276
|
}
|
|
277
277
|
return binding
|
|
278
278
|
} catch (e) {
|
|
@@ -287,8 +287,8 @@ function requireNative() {
|
|
|
287
287
|
try {
|
|
288
288
|
const binding = require('@arcships/aimux-linux-x64-gnu')
|
|
289
289
|
const bindingPackageVersion = require('@arcships/aimux-linux-x64-gnu/package.json').version
|
|
290
|
-
if (bindingPackageVersion !== '0.
|
|
291
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
290
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
292
292
|
}
|
|
293
293
|
return binding
|
|
294
294
|
} catch (e) {
|
|
@@ -305,8 +305,8 @@ function requireNative() {
|
|
|
305
305
|
try {
|
|
306
306
|
const binding = require('@arcships/aimux-linux-arm64-musl')
|
|
307
307
|
const bindingPackageVersion = require('@arcships/aimux-linux-arm64-musl/package.json').version
|
|
308
|
-
if (bindingPackageVersion !== '0.
|
|
309
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
308
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
310
310
|
}
|
|
311
311
|
return binding
|
|
312
312
|
} catch (e) {
|
|
@@ -321,8 +321,8 @@ function requireNative() {
|
|
|
321
321
|
try {
|
|
322
322
|
const binding = require('@arcships/aimux-linux-arm64-gnu')
|
|
323
323
|
const bindingPackageVersion = require('@arcships/aimux-linux-arm64-gnu/package.json').version
|
|
324
|
-
if (bindingPackageVersion !== '0.
|
|
325
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
324
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
326
326
|
}
|
|
327
327
|
return binding
|
|
328
328
|
} catch (e) {
|
|
@@ -339,8 +339,8 @@ function requireNative() {
|
|
|
339
339
|
try {
|
|
340
340
|
const binding = require('@arcships/aimux-linux-arm-musleabihf')
|
|
341
341
|
const bindingPackageVersion = require('@arcships/aimux-linux-arm-musleabihf/package.json').version
|
|
342
|
-
if (bindingPackageVersion !== '0.
|
|
343
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
342
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
344
344
|
}
|
|
345
345
|
return binding
|
|
346
346
|
} catch (e) {
|
|
@@ -355,8 +355,8 @@ function requireNative() {
|
|
|
355
355
|
try {
|
|
356
356
|
const binding = require('@arcships/aimux-linux-arm-gnueabihf')
|
|
357
357
|
const bindingPackageVersion = require('@arcships/aimux-linux-arm-gnueabihf/package.json').version
|
|
358
|
-
if (bindingPackageVersion !== '0.
|
|
359
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
358
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
360
360
|
}
|
|
361
361
|
return binding
|
|
362
362
|
} catch (e) {
|
|
@@ -373,8 +373,8 @@ function requireNative() {
|
|
|
373
373
|
try {
|
|
374
374
|
const binding = require('@arcships/aimux-linux-loong64-musl')
|
|
375
375
|
const bindingPackageVersion = require('@arcships/aimux-linux-loong64-musl/package.json').version
|
|
376
|
-
if (bindingPackageVersion !== '0.
|
|
377
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
376
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
378
378
|
}
|
|
379
379
|
return binding
|
|
380
380
|
} catch (e) {
|
|
@@ -389,8 +389,8 @@ function requireNative() {
|
|
|
389
389
|
try {
|
|
390
390
|
const binding = require('@arcships/aimux-linux-loong64-gnu')
|
|
391
391
|
const bindingPackageVersion = require('@arcships/aimux-linux-loong64-gnu/package.json').version
|
|
392
|
-
if (bindingPackageVersion !== '0.
|
|
393
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
392
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
394
394
|
}
|
|
395
395
|
return binding
|
|
396
396
|
} catch (e) {
|
|
@@ -407,8 +407,8 @@ function requireNative() {
|
|
|
407
407
|
try {
|
|
408
408
|
const binding = require('@arcships/aimux-linux-riscv64-musl')
|
|
409
409
|
const bindingPackageVersion = require('@arcships/aimux-linux-riscv64-musl/package.json').version
|
|
410
|
-
if (bindingPackageVersion !== '0.
|
|
411
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
410
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
412
412
|
}
|
|
413
413
|
return binding
|
|
414
414
|
} catch (e) {
|
|
@@ -423,8 +423,8 @@ function requireNative() {
|
|
|
423
423
|
try {
|
|
424
424
|
const binding = require('@arcships/aimux-linux-riscv64-gnu')
|
|
425
425
|
const bindingPackageVersion = require('@arcships/aimux-linux-riscv64-gnu/package.json').version
|
|
426
|
-
if (bindingPackageVersion !== '0.
|
|
427
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
426
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
428
428
|
}
|
|
429
429
|
return binding
|
|
430
430
|
} catch (e) {
|
|
@@ -440,8 +440,8 @@ function requireNative() {
|
|
|
440
440
|
try {
|
|
441
441
|
const binding = require('@arcships/aimux-linux-ppc64-gnu')
|
|
442
442
|
const bindingPackageVersion = require('@arcships/aimux-linux-ppc64-gnu/package.json').version
|
|
443
|
-
if (bindingPackageVersion !== '0.
|
|
444
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
443
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
445
445
|
}
|
|
446
446
|
return binding
|
|
447
447
|
} catch (e) {
|
|
@@ -456,8 +456,8 @@ function requireNative() {
|
|
|
456
456
|
try {
|
|
457
457
|
const binding = require('@arcships/aimux-linux-s390x-gnu')
|
|
458
458
|
const bindingPackageVersion = require('@arcships/aimux-linux-s390x-gnu/package.json').version
|
|
459
|
-
if (bindingPackageVersion !== '0.
|
|
460
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
459
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
461
461
|
}
|
|
462
462
|
return binding
|
|
463
463
|
} catch (e) {
|
|
@@ -476,8 +476,8 @@ function requireNative() {
|
|
|
476
476
|
try {
|
|
477
477
|
const binding = require('@arcships/aimux-openharmony-arm64')
|
|
478
478
|
const bindingPackageVersion = require('@arcships/aimux-openharmony-arm64/package.json').version
|
|
479
|
-
if (bindingPackageVersion !== '0.
|
|
480
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
479
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
481
481
|
}
|
|
482
482
|
return binding
|
|
483
483
|
} catch (e) {
|
|
@@ -492,8 +492,8 @@ function requireNative() {
|
|
|
492
492
|
try {
|
|
493
493
|
const binding = require('@arcships/aimux-openharmony-x64')
|
|
494
494
|
const bindingPackageVersion = require('@arcships/aimux-openharmony-x64/package.json').version
|
|
495
|
-
if (bindingPackageVersion !== '0.
|
|
496
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
495
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
497
497
|
}
|
|
498
498
|
return binding
|
|
499
499
|
} catch (e) {
|
|
@@ -508,8 +508,8 @@ function requireNative() {
|
|
|
508
508
|
try {
|
|
509
509
|
const binding = require('@arcships/aimux-openharmony-arm')
|
|
510
510
|
const bindingPackageVersion = require('@arcships/aimux-openharmony-arm/package.json').version
|
|
511
|
-
if (bindingPackageVersion !== '0.
|
|
512
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
511
|
+
if (bindingPackageVersion !== '0.7.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.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
513
513
|
}
|
|
514
514
|
return binding
|
|
515
515
|
} catch (e) {
|
|
@@ -648,8 +648,8 @@ if (!nativeBinding || forceWasi) {
|
|
|
648
648
|
if (!candidateFailed) {
|
|
649
649
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
650
650
|
const bindingPackageVersion = require('@arcships/aimux-wasm32-wasi/package.json').version
|
|
651
|
-
if (bindingPackageVersion !== '0.
|
|
652
|
-
throw new Error(`WASI binding package version mismatch, expected 0.
|
|
651
|
+
if (bindingPackageVersion !== '0.7.0') {
|
|
652
|
+
throw new Error(`WASI binding package version mismatch, expected 0.7.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
655
|
wasiBinding = require('@arcships/aimux-wasm32-wasi')
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcships/aimux",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Unified LLM service layer — one API for
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"description": "Unified LLM service layer — one API for 329 AI providers (Rust core, Node.js binding)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@napi-rs/cli": "3.8.2",
|
|
53
|
+
"@types/node": "^18.19.130",
|
|
53
54
|
"typescript": "^5.7.0"
|
|
54
55
|
},
|
|
55
56
|
"engines": {
|
|
@@ -57,11 +58,11 @@
|
|
|
57
58
|
},
|
|
58
59
|
"license": "MIT",
|
|
59
60
|
"optionalDependencies": {
|
|
60
|
-
"@arcships/aimux-win32-x64-msvc": "0.
|
|
61
|
-
"@arcships/aimux-win32-arm64-msvc": "0.
|
|
62
|
-
"@arcships/aimux-darwin-x64": "0.
|
|
63
|
-
"@arcships/aimux-darwin-arm64": "0.
|
|
64
|
-
"@arcships/aimux-linux-x64-gnu": "0.
|
|
65
|
-
"@arcships/aimux-linux-arm64-gnu": "0.
|
|
61
|
+
"@arcships/aimux-win32-x64-msvc": "0.7.0",
|
|
62
|
+
"@arcships/aimux-win32-arm64-msvc": "0.7.0",
|
|
63
|
+
"@arcships/aimux-darwin-x64": "0.7.0",
|
|
64
|
+
"@arcships/aimux-darwin-arm64": "0.7.0",
|
|
65
|
+
"@arcships/aimux-linux-x64-gnu": "0.7.0",
|
|
66
|
+
"@arcships/aimux-linux-arm64-gnu": "0.7.0"
|
|
66
67
|
}
|
|
67
68
|
}
|