@ai-matrx/desktop-protocol 0.21.77 → 0.21.79
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/CHANGELOG.md +25 -1
- package/dist/{chunk-server-HOQE4M4I.js → chunk-server-XQQUJENM.js} +31 -5
- package/dist/chunk-server-XQQUJENM.js.map +1 -0
- package/dist/client.cjs +23 -3
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +1 -1
- package/dist/index.cjs +31 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -5
- package/dist/index.d.ts +21 -5
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/{models-Bz88NHi0.d.cts → models-C2VdtixP.d.cts} +76 -3
- package/dist/{models-Bz88NHi0.d.ts → models-C2VdtixP.d.ts} +76 -3
- package/dist/react.d.cts +16 -1
- package/dist/react.d.ts +16 -1
- package/generated/desktop-protocol.schema.json +70 -2
- package/package.json +2 -2
- package/dist/chunk-server-HOQE4M4I.js.map +0 -1
|
@@ -6,7 +6,7 @@ import { z } from 'zod';
|
|
|
6
6
|
* never drift (see the `_assert*` lines there).
|
|
7
7
|
*/
|
|
8
8
|
type ErrorCodeName = "AUTH_REQUIRED" | "AUTH_INVALID" | "AUTH_EXPIRED" | "AUTH_FORBIDDEN" | "AUTH_DEVICE_REVOKED" | "PERMISSION_DENIED_OS" | "NOT_FOUND" | "CONFLICT" | "INVALID_PARAMS" | "RESOURCE_BUSY" | "RESOURCE_GONE" | "CANCELLED" | "TIMEOUT" | "PLATFORM_UNSUPPORTED" | "RATE_LIMITED" | "INTERNAL" | "PROTOCOL_VERSION_UNSUPPORTED" | "PROTOCOL_ERROR" | "UNKNOWN_OPERATION" | "DEVICE_OFFLINE" | "PAYLOAD_TOO_LARGE";
|
|
9
|
-
type ErrorReasonName = "not_a_directory" | "is_a_directory" | "directory_not_empty" | "already_exists" | "stale_write" | "binary_content" | "not_utf8_boundary" | "patch_no_match" | "patch_ambiguous" | "resource_exited" | "resource_expired" | "control_taken" | "window_exhausted" | "runtime_not_installed" | "model_not_installed" | "unsupported_media" | "download_failed" | "service_starting" | "service_restarted" | "service_failed" | "browser_not_connected" | "browser_ambiguous" | "browser_account_mismatch" | "browser_connection_off" | "awaiting_confirmation" | "tool_disabled_on_device";
|
|
9
|
+
type ErrorReasonName = "not_a_directory" | "is_a_directory" | "directory_not_empty" | "already_exists" | "stale_write" | "binary_content" | "not_utf8_boundary" | "patch_no_match" | "patch_ambiguous" | "resource_exited" | "resource_expired" | "control_taken" | "window_exhausted" | "runtime_not_installed" | "model_not_installed" | "unsupported_media" | "download_failed" | "service_starting" | "service_restarted" | "service_failed" | "browser_not_connected" | "browser_ambiguous" | "browser_account_mismatch" | "browser_connection_off" | "awaiting_confirmation" | "tool_disabled_on_device" | "model_not_running" | "model_server_unreachable";
|
|
10
10
|
interface ErrorData {
|
|
11
11
|
reason?: ErrorReasonName | undefined;
|
|
12
12
|
cap?: string | undefined;
|
|
@@ -314,6 +314,8 @@ declare const ErrorMsg: z.ZodObject<{
|
|
|
314
314
|
browser_connection_off: "browser_connection_off";
|
|
315
315
|
awaiting_confirmation: "awaiting_confirmation";
|
|
316
316
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
317
|
+
model_not_running: "model_not_running";
|
|
318
|
+
model_server_unreachable: "model_server_unreachable";
|
|
317
319
|
}>>;
|
|
318
320
|
cap: z.ZodOptional<z.ZodString>;
|
|
319
321
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -505,6 +507,8 @@ declare const CoreToClientMsg: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
505
507
|
browser_connection_off: "browser_connection_off";
|
|
506
508
|
awaiting_confirmation: "awaiting_confirmation";
|
|
507
509
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
510
|
+
model_not_running: "model_not_running";
|
|
511
|
+
model_server_unreachable: "model_server_unreachable";
|
|
508
512
|
}>>;
|
|
509
513
|
cap: z.ZodOptional<z.ZodString>;
|
|
510
514
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -619,6 +623,8 @@ declare const ErrorReason: z.ZodEnum<{
|
|
|
619
623
|
browser_connection_off: "browser_connection_off";
|
|
620
624
|
awaiting_confirmation: "awaiting_confirmation";
|
|
621
625
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
626
|
+
model_not_running: "model_not_running";
|
|
627
|
+
model_server_unreachable: "model_server_unreachable";
|
|
622
628
|
}>;
|
|
623
629
|
type ErrorReason = z.output<typeof ErrorReason>;
|
|
624
630
|
declare const ProtocolErrorBody: z.ZodObject<{
|
|
@@ -675,6 +681,8 @@ declare const ProtocolErrorBody: z.ZodObject<{
|
|
|
675
681
|
browser_connection_off: "browser_connection_off";
|
|
676
682
|
awaiting_confirmation: "awaiting_confirmation";
|
|
677
683
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
684
|
+
model_not_running: "model_not_running";
|
|
685
|
+
model_server_unreachable: "model_server_unreachable";
|
|
678
686
|
}>>;
|
|
679
687
|
cap: z.ZodOptional<z.ZodString>;
|
|
680
688
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -711,7 +719,7 @@ type OpSpec = {
|
|
|
711
719
|
readonly params: z.ZodType;
|
|
712
720
|
readonly result: z.ZodType;
|
|
713
721
|
readonly kind: "unary" | "stream" | "resource";
|
|
714
|
-
readonly since: "1.0" | "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.8" | "1.9" | "1.10" | "1.11" | "1.16" | "1.17" | "1.19" | "1.20" | "1.21" | "1.22" | "1.23" | "1.24" | "1.26" | "1.28" | "1.29" | "1.30" | "1.31" | "1.37" | "1.38" | "1.39" | "1.40" | "1.43" | "1.44" | "1.45" | "1.47" | "1.50" | "1.55" | "1.56" | "1.64" | "1.70" | "1.72" | "1.73" | "1.74";
|
|
722
|
+
readonly since: "1.0" | "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.8" | "1.9" | "1.10" | "1.11" | "1.16" | "1.17" | "1.19" | "1.20" | "1.21" | "1.22" | "1.23" | "1.24" | "1.26" | "1.28" | "1.29" | "1.30" | "1.31" | "1.37" | "1.38" | "1.39" | "1.40" | "1.43" | "1.44" | "1.45" | "1.47" | "1.50" | "1.55" | "1.56" | "1.64" | "1.70" | "1.72" | "1.73" | "1.74" | "1.76";
|
|
715
723
|
readonly errors: readonly z.infer<typeof ErrorCode>[];
|
|
716
724
|
};
|
|
717
725
|
declare const OPS: {
|
|
@@ -1640,6 +1648,21 @@ declare const OPS: {
|
|
|
1640
1648
|
readonly since: "1.31";
|
|
1641
1649
|
readonly errors: readonly ["INTERNAL"];
|
|
1642
1650
|
};
|
|
1651
|
+
readonly "models.llm.chat": {
|
|
1652
|
+
readonly params: z.ZodObject<{
|
|
1653
|
+
model: z.ZodString;
|
|
1654
|
+
body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1655
|
+
start_if_stopped: z.ZodOptional<z.ZodBoolean>;
|
|
1656
|
+
window_bytes: z.ZodOptional<z.ZodInt>;
|
|
1657
|
+
}, z.core.$strict>;
|
|
1658
|
+
readonly result: z.ZodObject<{
|
|
1659
|
+
model: z.ZodString;
|
|
1660
|
+
content_type: z.ZodString;
|
|
1661
|
+
}, z.core.$strict>;
|
|
1662
|
+
readonly kind: "stream";
|
|
1663
|
+
readonly since: "1.76";
|
|
1664
|
+
readonly errors: readonly ["NOT_FOUND", "RESOURCE_BUSY", "RESOURCE_GONE", "INVALID_PARAMS", "TIMEOUT", "CANCELLED", "RATE_LIMITED", "INTERNAL"];
|
|
1665
|
+
};
|
|
1643
1666
|
readonly "models.downloads.list": {
|
|
1644
1667
|
readonly params: z.ZodObject<{}, z.core.$strict>;
|
|
1645
1668
|
readonly result: z.ZodObject<{
|
|
@@ -9422,6 +9445,7 @@ declare const SERVICES: {
|
|
|
9422
9445
|
access_token: z.ZodString;
|
|
9423
9446
|
user_id: z.ZodString;
|
|
9424
9447
|
server_url: z.ZodString;
|
|
9448
|
+
organization_id: z.ZodOptional<z.ZodString>;
|
|
9425
9449
|
}, z.core.$strict>>;
|
|
9426
9450
|
}, z.core.$strict>;
|
|
9427
9451
|
readonly result: z.ZodObject<{
|
|
@@ -9460,6 +9484,7 @@ declare const SERVICES: {
|
|
|
9460
9484
|
access_token: z.ZodString;
|
|
9461
9485
|
user_id: z.ZodString;
|
|
9462
9486
|
server_url: z.ZodString;
|
|
9487
|
+
organization_id: z.ZodOptional<z.ZodString>;
|
|
9463
9488
|
}, z.core.$strict>>;
|
|
9464
9489
|
}, z.core.$strict>;
|
|
9465
9490
|
readonly result: z.ZodObject<{
|
|
@@ -10211,6 +10236,8 @@ declare const NAMED_SCHEMAS: {
|
|
|
10211
10236
|
browser_connection_off: "browser_connection_off";
|
|
10212
10237
|
awaiting_confirmation: "awaiting_confirmation";
|
|
10213
10238
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
10239
|
+
model_not_running: "model_not_running";
|
|
10240
|
+
model_server_unreachable: "model_server_unreachable";
|
|
10214
10241
|
}>;
|
|
10215
10242
|
readonly FsPatchEditFailure: z.ZodObject<{
|
|
10216
10243
|
edit_index: z.ZodInt;
|
|
@@ -10270,6 +10297,8 @@ declare const NAMED_SCHEMAS: {
|
|
|
10270
10297
|
browser_connection_off: "browser_connection_off";
|
|
10271
10298
|
awaiting_confirmation: "awaiting_confirmation";
|
|
10272
10299
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
10300
|
+
model_not_running: "model_not_running";
|
|
10301
|
+
model_server_unreachable: "model_server_unreachable";
|
|
10273
10302
|
}>>;
|
|
10274
10303
|
cap: z.ZodOptional<z.ZodString>;
|
|
10275
10304
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -10423,6 +10452,8 @@ declare const NAMED_SCHEMAS: {
|
|
|
10423
10452
|
browser_connection_off: "browser_connection_off";
|
|
10424
10453
|
awaiting_confirmation: "awaiting_confirmation";
|
|
10425
10454
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
10455
|
+
model_not_running: "model_not_running";
|
|
10456
|
+
model_server_unreachable: "model_server_unreachable";
|
|
10426
10457
|
}>>;
|
|
10427
10458
|
cap: z.ZodOptional<z.ZodString>;
|
|
10428
10459
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -10602,6 +10633,8 @@ declare const NAMED_SCHEMAS: {
|
|
|
10602
10633
|
browser_connection_off: "browser_connection_off";
|
|
10603
10634
|
awaiting_confirmation: "awaiting_confirmation";
|
|
10604
10635
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
10636
|
+
model_not_running: "model_not_running";
|
|
10637
|
+
model_server_unreachable: "model_server_unreachable";
|
|
10605
10638
|
}>>;
|
|
10606
10639
|
cap: z.ZodOptional<z.ZodString>;
|
|
10607
10640
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -11774,6 +11807,16 @@ declare const NAMED_SCHEMAS: {
|
|
|
11774
11807
|
readonly ModelsLlmStopResult: z.ZodObject<{
|
|
11775
11808
|
stopped: z.ZodBoolean;
|
|
11776
11809
|
}, z.core.$strict>;
|
|
11810
|
+
readonly ModelsLlmChatParams: z.ZodObject<{
|
|
11811
|
+
model: z.ZodString;
|
|
11812
|
+
body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
11813
|
+
start_if_stopped: z.ZodOptional<z.ZodBoolean>;
|
|
11814
|
+
window_bytes: z.ZodOptional<z.ZodInt>;
|
|
11815
|
+
}, z.core.$strict>;
|
|
11816
|
+
readonly ModelsLlmChatResult: z.ZodObject<{
|
|
11817
|
+
model: z.ZodString;
|
|
11818
|
+
content_type: z.ZodString;
|
|
11819
|
+
}, z.core.$strict>;
|
|
11777
11820
|
readonly DownloadKind: z.ZodEnum<{
|
|
11778
11821
|
runtime: "runtime";
|
|
11779
11822
|
speech_model: "speech_model";
|
|
@@ -11882,6 +11925,7 @@ declare const NAMED_SCHEMAS: {
|
|
|
11882
11925
|
access_token: z.ZodString;
|
|
11883
11926
|
user_id: z.ZodString;
|
|
11884
11927
|
server_url: z.ZodString;
|
|
11928
|
+
organization_id: z.ZodOptional<z.ZodString>;
|
|
11885
11929
|
}, z.core.$strict>;
|
|
11886
11930
|
readonly CodingHistoryBlocked: z.ZodEnum<{
|
|
11887
11931
|
signed_out: "signed_out";
|
|
@@ -11944,6 +11988,7 @@ declare const NAMED_SCHEMAS: {
|
|
|
11944
11988
|
access_token: z.ZodString;
|
|
11945
11989
|
user_id: z.ZodString;
|
|
11946
11990
|
server_url: z.ZodString;
|
|
11991
|
+
organization_id: z.ZodOptional<z.ZodString>;
|
|
11947
11992
|
}, z.core.$strict>>;
|
|
11948
11993
|
}, z.core.$strict>;
|
|
11949
11994
|
readonly CodingImportNextParams: z.ZodObject<{
|
|
@@ -11952,6 +11997,7 @@ declare const NAMED_SCHEMAS: {
|
|
|
11952
11997
|
access_token: z.ZodString;
|
|
11953
11998
|
user_id: z.ZodString;
|
|
11954
11999
|
server_url: z.ZodString;
|
|
12000
|
+
organization_id: z.ZodOptional<z.ZodString>;
|
|
11955
12001
|
}, z.core.$strict>>;
|
|
11956
12002
|
}, z.core.$strict>;
|
|
11957
12003
|
readonly CodingServiceProgress: z.ZodObject<{
|
|
@@ -14182,6 +14228,8 @@ declare const NAMED_SCHEMAS: {
|
|
|
14182
14228
|
browser_connection_off: "browser_connection_off";
|
|
14183
14229
|
awaiting_confirmation: "awaiting_confirmation";
|
|
14184
14230
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
14231
|
+
model_not_running: "model_not_running";
|
|
14232
|
+
model_server_unreachable: "model_server_unreachable";
|
|
14185
14233
|
}>>;
|
|
14186
14234
|
cap: z.ZodOptional<z.ZodString>;
|
|
14187
14235
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -14312,6 +14360,8 @@ declare const NAMED_SCHEMAS: {
|
|
|
14312
14360
|
browser_connection_off: "browser_connection_off";
|
|
14313
14361
|
awaiting_confirmation: "awaiting_confirmation";
|
|
14314
14362
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
14363
|
+
model_not_running: "model_not_running";
|
|
14364
|
+
model_server_unreachable: "model_server_unreachable";
|
|
14315
14365
|
}>>;
|
|
14316
14366
|
cap: z.ZodOptional<z.ZodString>;
|
|
14317
14367
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -14414,6 +14464,8 @@ declare const NAMED_SCHEMAS: {
|
|
|
14414
14464
|
browser_connection_off: "browser_connection_off";
|
|
14415
14465
|
awaiting_confirmation: "awaiting_confirmation";
|
|
14416
14466
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
14467
|
+
model_not_running: "model_not_running";
|
|
14468
|
+
model_server_unreachable: "model_server_unreachable";
|
|
14417
14469
|
}>>;
|
|
14418
14470
|
cap: z.ZodOptional<z.ZodString>;
|
|
14419
14471
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -21350,6 +21402,27 @@ declare const ModelsLlmStopResult: z.ZodObject<{
|
|
|
21350
21402
|
stopped: z.ZodBoolean;
|
|
21351
21403
|
}, z.core.$strict>;
|
|
21352
21404
|
type ModelsLlmStopResult = z.output<typeof ModelsLlmStopResult>;
|
|
21405
|
+
/**
|
|
21406
|
+
* (1.76) models.llm.chat (stream): one chat completion from the language model running on this
|
|
21407
|
+
* computer, through llama-server's OpenAI-compatible endpoint. `body` is an OpenAI chat-completions
|
|
21408
|
+
* body (messages, tools, tool_choice, sampling...); the core forwards it as sent with `stream: true`
|
|
21409
|
+
* and its `model` set to the local model. The unary result arrives first, then the stream's DATA
|
|
21410
|
+
* frames carry llama-server's server-sent events byte for byte (`data: {...}` chunks, tool-call
|
|
21411
|
+
* deltas included, `data: [DONE]` last). Cancel stops the generation.
|
|
21412
|
+
*/
|
|
21413
|
+
declare const ModelsLlmChatParams: z.ZodObject<{
|
|
21414
|
+
model: z.ZodString;
|
|
21415
|
+
body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
21416
|
+
start_if_stopped: z.ZodOptional<z.ZodBoolean>;
|
|
21417
|
+
window_bytes: z.ZodOptional<z.ZodInt>;
|
|
21418
|
+
}, z.core.$strict>;
|
|
21419
|
+
type ModelsLlmChatParams = z.output<typeof ModelsLlmChatParams>;
|
|
21420
|
+
/** What answers: the model, and llama-server's content type (text/event-stream). */
|
|
21421
|
+
declare const ModelsLlmChatResult: z.ZodObject<{
|
|
21422
|
+
model: z.ZodString;
|
|
21423
|
+
content_type: z.ZodString;
|
|
21424
|
+
}, z.core.$strict>;
|
|
21425
|
+
type ModelsLlmChatResult = z.output<typeof ModelsLlmChatResult>;
|
|
21353
21426
|
declare const Sha256Hex: z.ZodString;
|
|
21354
21427
|
type Sha256Hex = z.output<typeof Sha256Hex>;
|
|
21355
21428
|
declare const MlCatalogSetResult: z.ZodObject<{
|
|
@@ -21464,4 +21537,4 @@ type MlServiceStatus = z.output<typeof MlServiceStatus>;
|
|
|
21464
21537
|
declare const ModelsStatusParams: z.ZodObject<{}, z.core.$strict>;
|
|
21465
21538
|
type ModelsStatusParams = z.output<typeof ModelsStatusParams>;
|
|
21466
21539
|
|
|
21467
|
-
export { MlStatusParams as $, type ErrorReasonName as A, BEARER_PREFIX as B, type CloseOutcome as C, DesktopProtocolError as D, EndReason as E, EventMsg as F, type EventName as G, FsPatchEditFailure as H, HelloMsg as I, LlamaServerBuild as J, LlmRunning as K, Limits as L, ModelsTranscribeResult as M, LlmServerState as N, type OpName as O, LocalModelKind as P, LocalModelRow as Q, MlCatalogSetParams as R, StreamMeta as S, TranscriptionModelId as T, MlCatalogSetResult as U, MlInstallPhase as V, Welcome as W, MlInstallProgress as X, MlRuntimeState as Y, MlServiceState as Z, MlServiceStatus as _, type OpParams as a, MlStatusResult as a0, ModelKey as a1, ModelsDownloadsCancelParams as a2, ModelsDownloadsCancelResult as a3, ModelsDownloadsListParams as a4, ModelsDownloadsListResult as a5, ModelsInstallParams as a6, ModelsInstallResult as a7,
|
|
21540
|
+
export { MlStatusParams as $, type ErrorReasonName as A, BEARER_PREFIX as B, type CloseOutcome as C, DesktopProtocolError as D, EndReason as E, EventMsg as F, type EventName as G, FsPatchEditFailure as H, HelloMsg as I, LlamaServerBuild as J, LlmRunning as K, Limits as L, ModelsTranscribeResult as M, LlmServerState as N, type OpName as O, LocalModelKind as P, LocalModelRow as Q, MlCatalogSetParams as R, StreamMeta as S, TranscriptionModelId as T, MlCatalogSetResult as U, MlInstallPhase as V, Welcome as W, MlInstallProgress as X, MlRuntimeState as Y, MlServiceState as Z, MlServiceStatus as _, type OpParams as a, MlStatusResult as a0, ModelKey as a1, ModelsDownloadsCancelParams as a2, ModelsDownloadsCancelResult as a3, ModelsDownloadsListParams as a4, ModelsDownloadsListResult as a5, ModelsInstallParams as a6, ModelsInstallResult as a7, ModelsLlmChatParams as a8, ModelsLlmChatResult as a9, SERVICES as aA, SUBPROTOCOL as aB, type ServiceId as aC, type ServiceOpName as aD, type ServiceOpSpec as aE, type ServiceSpec as aF, Sha256Hex as aG, StreamMsg as aH, TextModelId as aI, TextModelInfo as aJ, TranscriptSegment as aK, TranscriptionModelInfo as aL, UnusableTextModel as aM, closeRule as aN, isTerminalClose as aO, ModelsLlmInstallParams as aa, ModelsLlmInstallResult as ab, ModelsLlmStartParams as ac, ModelsLlmStartResult as ad, ModelsLlmStatusParams as ae, ModelsLlmStatusResult as af, ModelsLlmStopParams as ag, ModelsLlmStopResult as ah, ModelsLocalListParams as ai, ModelsLocalListResult as aj, ModelsLocalRemoveParams as ak, ModelsLocalRemoveResult as al, ModelsProgressEvent as am, ModelsStatusParams as an, ModelsStatusResult as ao, ModelsTranscribeParams as ap, NAMED_SCHEMAS as aq, type NamedSchemaId as ar, OpDescriptor as as, type OpSpec as at, PING_TEXT as au, PONG_TEXT as av, ProtocolErrorBody as aw, RelayMsg as ax, RequestMsg as ay, ResponseMsg as az, type OpResult as b, OPS as c, EVENTS as d, ClientType as e, MlProgress as f, CLOSE_RULES as g, CancelMsg as h, isDesktopProtocolError as i, CatalogFile as j, CatalogModelEntry as k, ClientToCoreMsg as l, type CloseAction as m, CloseCode as n, CloseCodeValue as o, type CloseRule as p, CoreToClientMsg as q, CreditMsg as r, DownloadKind as s, DownloadRow as t, EndMsg as u, ErrorCode as v, type ErrorCodeName as w, type ErrorData as x, ErrorMsg as y, ErrorReason as z };
|
|
@@ -6,7 +6,7 @@ import { z } from 'zod';
|
|
|
6
6
|
* never drift (see the `_assert*` lines there).
|
|
7
7
|
*/
|
|
8
8
|
type ErrorCodeName = "AUTH_REQUIRED" | "AUTH_INVALID" | "AUTH_EXPIRED" | "AUTH_FORBIDDEN" | "AUTH_DEVICE_REVOKED" | "PERMISSION_DENIED_OS" | "NOT_FOUND" | "CONFLICT" | "INVALID_PARAMS" | "RESOURCE_BUSY" | "RESOURCE_GONE" | "CANCELLED" | "TIMEOUT" | "PLATFORM_UNSUPPORTED" | "RATE_LIMITED" | "INTERNAL" | "PROTOCOL_VERSION_UNSUPPORTED" | "PROTOCOL_ERROR" | "UNKNOWN_OPERATION" | "DEVICE_OFFLINE" | "PAYLOAD_TOO_LARGE";
|
|
9
|
-
type ErrorReasonName = "not_a_directory" | "is_a_directory" | "directory_not_empty" | "already_exists" | "stale_write" | "binary_content" | "not_utf8_boundary" | "patch_no_match" | "patch_ambiguous" | "resource_exited" | "resource_expired" | "control_taken" | "window_exhausted" | "runtime_not_installed" | "model_not_installed" | "unsupported_media" | "download_failed" | "service_starting" | "service_restarted" | "service_failed" | "browser_not_connected" | "browser_ambiguous" | "browser_account_mismatch" | "browser_connection_off" | "awaiting_confirmation" | "tool_disabled_on_device";
|
|
9
|
+
type ErrorReasonName = "not_a_directory" | "is_a_directory" | "directory_not_empty" | "already_exists" | "stale_write" | "binary_content" | "not_utf8_boundary" | "patch_no_match" | "patch_ambiguous" | "resource_exited" | "resource_expired" | "control_taken" | "window_exhausted" | "runtime_not_installed" | "model_not_installed" | "unsupported_media" | "download_failed" | "service_starting" | "service_restarted" | "service_failed" | "browser_not_connected" | "browser_ambiguous" | "browser_account_mismatch" | "browser_connection_off" | "awaiting_confirmation" | "tool_disabled_on_device" | "model_not_running" | "model_server_unreachable";
|
|
10
10
|
interface ErrorData {
|
|
11
11
|
reason?: ErrorReasonName | undefined;
|
|
12
12
|
cap?: string | undefined;
|
|
@@ -314,6 +314,8 @@ declare const ErrorMsg: z.ZodObject<{
|
|
|
314
314
|
browser_connection_off: "browser_connection_off";
|
|
315
315
|
awaiting_confirmation: "awaiting_confirmation";
|
|
316
316
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
317
|
+
model_not_running: "model_not_running";
|
|
318
|
+
model_server_unreachable: "model_server_unreachable";
|
|
317
319
|
}>>;
|
|
318
320
|
cap: z.ZodOptional<z.ZodString>;
|
|
319
321
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -505,6 +507,8 @@ declare const CoreToClientMsg: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
505
507
|
browser_connection_off: "browser_connection_off";
|
|
506
508
|
awaiting_confirmation: "awaiting_confirmation";
|
|
507
509
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
510
|
+
model_not_running: "model_not_running";
|
|
511
|
+
model_server_unreachable: "model_server_unreachable";
|
|
508
512
|
}>>;
|
|
509
513
|
cap: z.ZodOptional<z.ZodString>;
|
|
510
514
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -619,6 +623,8 @@ declare const ErrorReason: z.ZodEnum<{
|
|
|
619
623
|
browser_connection_off: "browser_connection_off";
|
|
620
624
|
awaiting_confirmation: "awaiting_confirmation";
|
|
621
625
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
626
|
+
model_not_running: "model_not_running";
|
|
627
|
+
model_server_unreachable: "model_server_unreachable";
|
|
622
628
|
}>;
|
|
623
629
|
type ErrorReason = z.output<typeof ErrorReason>;
|
|
624
630
|
declare const ProtocolErrorBody: z.ZodObject<{
|
|
@@ -675,6 +681,8 @@ declare const ProtocolErrorBody: z.ZodObject<{
|
|
|
675
681
|
browser_connection_off: "browser_connection_off";
|
|
676
682
|
awaiting_confirmation: "awaiting_confirmation";
|
|
677
683
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
684
|
+
model_not_running: "model_not_running";
|
|
685
|
+
model_server_unreachable: "model_server_unreachable";
|
|
678
686
|
}>>;
|
|
679
687
|
cap: z.ZodOptional<z.ZodString>;
|
|
680
688
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -711,7 +719,7 @@ type OpSpec = {
|
|
|
711
719
|
readonly params: z.ZodType;
|
|
712
720
|
readonly result: z.ZodType;
|
|
713
721
|
readonly kind: "unary" | "stream" | "resource";
|
|
714
|
-
readonly since: "1.0" | "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.8" | "1.9" | "1.10" | "1.11" | "1.16" | "1.17" | "1.19" | "1.20" | "1.21" | "1.22" | "1.23" | "1.24" | "1.26" | "1.28" | "1.29" | "1.30" | "1.31" | "1.37" | "1.38" | "1.39" | "1.40" | "1.43" | "1.44" | "1.45" | "1.47" | "1.50" | "1.55" | "1.56" | "1.64" | "1.70" | "1.72" | "1.73" | "1.74";
|
|
722
|
+
readonly since: "1.0" | "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.8" | "1.9" | "1.10" | "1.11" | "1.16" | "1.17" | "1.19" | "1.20" | "1.21" | "1.22" | "1.23" | "1.24" | "1.26" | "1.28" | "1.29" | "1.30" | "1.31" | "1.37" | "1.38" | "1.39" | "1.40" | "1.43" | "1.44" | "1.45" | "1.47" | "1.50" | "1.55" | "1.56" | "1.64" | "1.70" | "1.72" | "1.73" | "1.74" | "1.76";
|
|
715
723
|
readonly errors: readonly z.infer<typeof ErrorCode>[];
|
|
716
724
|
};
|
|
717
725
|
declare const OPS: {
|
|
@@ -1640,6 +1648,21 @@ declare const OPS: {
|
|
|
1640
1648
|
readonly since: "1.31";
|
|
1641
1649
|
readonly errors: readonly ["INTERNAL"];
|
|
1642
1650
|
};
|
|
1651
|
+
readonly "models.llm.chat": {
|
|
1652
|
+
readonly params: z.ZodObject<{
|
|
1653
|
+
model: z.ZodString;
|
|
1654
|
+
body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1655
|
+
start_if_stopped: z.ZodOptional<z.ZodBoolean>;
|
|
1656
|
+
window_bytes: z.ZodOptional<z.ZodInt>;
|
|
1657
|
+
}, z.core.$strict>;
|
|
1658
|
+
readonly result: z.ZodObject<{
|
|
1659
|
+
model: z.ZodString;
|
|
1660
|
+
content_type: z.ZodString;
|
|
1661
|
+
}, z.core.$strict>;
|
|
1662
|
+
readonly kind: "stream";
|
|
1663
|
+
readonly since: "1.76";
|
|
1664
|
+
readonly errors: readonly ["NOT_FOUND", "RESOURCE_BUSY", "RESOURCE_GONE", "INVALID_PARAMS", "TIMEOUT", "CANCELLED", "RATE_LIMITED", "INTERNAL"];
|
|
1665
|
+
};
|
|
1643
1666
|
readonly "models.downloads.list": {
|
|
1644
1667
|
readonly params: z.ZodObject<{}, z.core.$strict>;
|
|
1645
1668
|
readonly result: z.ZodObject<{
|
|
@@ -9422,6 +9445,7 @@ declare const SERVICES: {
|
|
|
9422
9445
|
access_token: z.ZodString;
|
|
9423
9446
|
user_id: z.ZodString;
|
|
9424
9447
|
server_url: z.ZodString;
|
|
9448
|
+
organization_id: z.ZodOptional<z.ZodString>;
|
|
9425
9449
|
}, z.core.$strict>>;
|
|
9426
9450
|
}, z.core.$strict>;
|
|
9427
9451
|
readonly result: z.ZodObject<{
|
|
@@ -9460,6 +9484,7 @@ declare const SERVICES: {
|
|
|
9460
9484
|
access_token: z.ZodString;
|
|
9461
9485
|
user_id: z.ZodString;
|
|
9462
9486
|
server_url: z.ZodString;
|
|
9487
|
+
organization_id: z.ZodOptional<z.ZodString>;
|
|
9463
9488
|
}, z.core.$strict>>;
|
|
9464
9489
|
}, z.core.$strict>;
|
|
9465
9490
|
readonly result: z.ZodObject<{
|
|
@@ -10211,6 +10236,8 @@ declare const NAMED_SCHEMAS: {
|
|
|
10211
10236
|
browser_connection_off: "browser_connection_off";
|
|
10212
10237
|
awaiting_confirmation: "awaiting_confirmation";
|
|
10213
10238
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
10239
|
+
model_not_running: "model_not_running";
|
|
10240
|
+
model_server_unreachable: "model_server_unreachable";
|
|
10214
10241
|
}>;
|
|
10215
10242
|
readonly FsPatchEditFailure: z.ZodObject<{
|
|
10216
10243
|
edit_index: z.ZodInt;
|
|
@@ -10270,6 +10297,8 @@ declare const NAMED_SCHEMAS: {
|
|
|
10270
10297
|
browser_connection_off: "browser_connection_off";
|
|
10271
10298
|
awaiting_confirmation: "awaiting_confirmation";
|
|
10272
10299
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
10300
|
+
model_not_running: "model_not_running";
|
|
10301
|
+
model_server_unreachable: "model_server_unreachable";
|
|
10273
10302
|
}>>;
|
|
10274
10303
|
cap: z.ZodOptional<z.ZodString>;
|
|
10275
10304
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -10423,6 +10452,8 @@ declare const NAMED_SCHEMAS: {
|
|
|
10423
10452
|
browser_connection_off: "browser_connection_off";
|
|
10424
10453
|
awaiting_confirmation: "awaiting_confirmation";
|
|
10425
10454
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
10455
|
+
model_not_running: "model_not_running";
|
|
10456
|
+
model_server_unreachable: "model_server_unreachable";
|
|
10426
10457
|
}>>;
|
|
10427
10458
|
cap: z.ZodOptional<z.ZodString>;
|
|
10428
10459
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -10602,6 +10633,8 @@ declare const NAMED_SCHEMAS: {
|
|
|
10602
10633
|
browser_connection_off: "browser_connection_off";
|
|
10603
10634
|
awaiting_confirmation: "awaiting_confirmation";
|
|
10604
10635
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
10636
|
+
model_not_running: "model_not_running";
|
|
10637
|
+
model_server_unreachable: "model_server_unreachable";
|
|
10605
10638
|
}>>;
|
|
10606
10639
|
cap: z.ZodOptional<z.ZodString>;
|
|
10607
10640
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -11774,6 +11807,16 @@ declare const NAMED_SCHEMAS: {
|
|
|
11774
11807
|
readonly ModelsLlmStopResult: z.ZodObject<{
|
|
11775
11808
|
stopped: z.ZodBoolean;
|
|
11776
11809
|
}, z.core.$strict>;
|
|
11810
|
+
readonly ModelsLlmChatParams: z.ZodObject<{
|
|
11811
|
+
model: z.ZodString;
|
|
11812
|
+
body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
11813
|
+
start_if_stopped: z.ZodOptional<z.ZodBoolean>;
|
|
11814
|
+
window_bytes: z.ZodOptional<z.ZodInt>;
|
|
11815
|
+
}, z.core.$strict>;
|
|
11816
|
+
readonly ModelsLlmChatResult: z.ZodObject<{
|
|
11817
|
+
model: z.ZodString;
|
|
11818
|
+
content_type: z.ZodString;
|
|
11819
|
+
}, z.core.$strict>;
|
|
11777
11820
|
readonly DownloadKind: z.ZodEnum<{
|
|
11778
11821
|
runtime: "runtime";
|
|
11779
11822
|
speech_model: "speech_model";
|
|
@@ -11882,6 +11925,7 @@ declare const NAMED_SCHEMAS: {
|
|
|
11882
11925
|
access_token: z.ZodString;
|
|
11883
11926
|
user_id: z.ZodString;
|
|
11884
11927
|
server_url: z.ZodString;
|
|
11928
|
+
organization_id: z.ZodOptional<z.ZodString>;
|
|
11885
11929
|
}, z.core.$strict>;
|
|
11886
11930
|
readonly CodingHistoryBlocked: z.ZodEnum<{
|
|
11887
11931
|
signed_out: "signed_out";
|
|
@@ -11944,6 +11988,7 @@ declare const NAMED_SCHEMAS: {
|
|
|
11944
11988
|
access_token: z.ZodString;
|
|
11945
11989
|
user_id: z.ZodString;
|
|
11946
11990
|
server_url: z.ZodString;
|
|
11991
|
+
organization_id: z.ZodOptional<z.ZodString>;
|
|
11947
11992
|
}, z.core.$strict>>;
|
|
11948
11993
|
}, z.core.$strict>;
|
|
11949
11994
|
readonly CodingImportNextParams: z.ZodObject<{
|
|
@@ -11952,6 +11997,7 @@ declare const NAMED_SCHEMAS: {
|
|
|
11952
11997
|
access_token: z.ZodString;
|
|
11953
11998
|
user_id: z.ZodString;
|
|
11954
11999
|
server_url: z.ZodString;
|
|
12000
|
+
organization_id: z.ZodOptional<z.ZodString>;
|
|
11955
12001
|
}, z.core.$strict>>;
|
|
11956
12002
|
}, z.core.$strict>;
|
|
11957
12003
|
readonly CodingServiceProgress: z.ZodObject<{
|
|
@@ -14182,6 +14228,8 @@ declare const NAMED_SCHEMAS: {
|
|
|
14182
14228
|
browser_connection_off: "browser_connection_off";
|
|
14183
14229
|
awaiting_confirmation: "awaiting_confirmation";
|
|
14184
14230
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
14231
|
+
model_not_running: "model_not_running";
|
|
14232
|
+
model_server_unreachable: "model_server_unreachable";
|
|
14185
14233
|
}>>;
|
|
14186
14234
|
cap: z.ZodOptional<z.ZodString>;
|
|
14187
14235
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -14312,6 +14360,8 @@ declare const NAMED_SCHEMAS: {
|
|
|
14312
14360
|
browser_connection_off: "browser_connection_off";
|
|
14313
14361
|
awaiting_confirmation: "awaiting_confirmation";
|
|
14314
14362
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
14363
|
+
model_not_running: "model_not_running";
|
|
14364
|
+
model_server_unreachable: "model_server_unreachable";
|
|
14315
14365
|
}>>;
|
|
14316
14366
|
cap: z.ZodOptional<z.ZodString>;
|
|
14317
14367
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -14414,6 +14464,8 @@ declare const NAMED_SCHEMAS: {
|
|
|
14414
14464
|
browser_connection_off: "browser_connection_off";
|
|
14415
14465
|
awaiting_confirmation: "awaiting_confirmation";
|
|
14416
14466
|
tool_disabled_on_device: "tool_disabled_on_device";
|
|
14467
|
+
model_not_running: "model_not_running";
|
|
14468
|
+
model_server_unreachable: "model_server_unreachable";
|
|
14417
14469
|
}>>;
|
|
14418
14470
|
cap: z.ZodOptional<z.ZodString>;
|
|
14419
14471
|
op: z.ZodOptional<z.ZodString>;
|
|
@@ -21350,6 +21402,27 @@ declare const ModelsLlmStopResult: z.ZodObject<{
|
|
|
21350
21402
|
stopped: z.ZodBoolean;
|
|
21351
21403
|
}, z.core.$strict>;
|
|
21352
21404
|
type ModelsLlmStopResult = z.output<typeof ModelsLlmStopResult>;
|
|
21405
|
+
/**
|
|
21406
|
+
* (1.76) models.llm.chat (stream): one chat completion from the language model running on this
|
|
21407
|
+
* computer, through llama-server's OpenAI-compatible endpoint. `body` is an OpenAI chat-completions
|
|
21408
|
+
* body (messages, tools, tool_choice, sampling...); the core forwards it as sent with `stream: true`
|
|
21409
|
+
* and its `model` set to the local model. The unary result arrives first, then the stream's DATA
|
|
21410
|
+
* frames carry llama-server's server-sent events byte for byte (`data: {...}` chunks, tool-call
|
|
21411
|
+
* deltas included, `data: [DONE]` last). Cancel stops the generation.
|
|
21412
|
+
*/
|
|
21413
|
+
declare const ModelsLlmChatParams: z.ZodObject<{
|
|
21414
|
+
model: z.ZodString;
|
|
21415
|
+
body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
21416
|
+
start_if_stopped: z.ZodOptional<z.ZodBoolean>;
|
|
21417
|
+
window_bytes: z.ZodOptional<z.ZodInt>;
|
|
21418
|
+
}, z.core.$strict>;
|
|
21419
|
+
type ModelsLlmChatParams = z.output<typeof ModelsLlmChatParams>;
|
|
21420
|
+
/** What answers: the model, and llama-server's content type (text/event-stream). */
|
|
21421
|
+
declare const ModelsLlmChatResult: z.ZodObject<{
|
|
21422
|
+
model: z.ZodString;
|
|
21423
|
+
content_type: z.ZodString;
|
|
21424
|
+
}, z.core.$strict>;
|
|
21425
|
+
type ModelsLlmChatResult = z.output<typeof ModelsLlmChatResult>;
|
|
21353
21426
|
declare const Sha256Hex: z.ZodString;
|
|
21354
21427
|
type Sha256Hex = z.output<typeof Sha256Hex>;
|
|
21355
21428
|
declare const MlCatalogSetResult: z.ZodObject<{
|
|
@@ -21464,4 +21537,4 @@ type MlServiceStatus = z.output<typeof MlServiceStatus>;
|
|
|
21464
21537
|
declare const ModelsStatusParams: z.ZodObject<{}, z.core.$strict>;
|
|
21465
21538
|
type ModelsStatusParams = z.output<typeof ModelsStatusParams>;
|
|
21466
21539
|
|
|
21467
|
-
export { MlStatusParams as $, type ErrorReasonName as A, BEARER_PREFIX as B, type CloseOutcome as C, DesktopProtocolError as D, EndReason as E, EventMsg as F, type EventName as G, FsPatchEditFailure as H, HelloMsg as I, LlamaServerBuild as J, LlmRunning as K, Limits as L, ModelsTranscribeResult as M, LlmServerState as N, type OpName as O, LocalModelKind as P, LocalModelRow as Q, MlCatalogSetParams as R, StreamMeta as S, TranscriptionModelId as T, MlCatalogSetResult as U, MlInstallPhase as V, Welcome as W, MlInstallProgress as X, MlRuntimeState as Y, MlServiceState as Z, MlServiceStatus as _, type OpParams as a, MlStatusResult as a0, ModelKey as a1, ModelsDownloadsCancelParams as a2, ModelsDownloadsCancelResult as a3, ModelsDownloadsListParams as a4, ModelsDownloadsListResult as a5, ModelsInstallParams as a6, ModelsInstallResult as a7,
|
|
21540
|
+
export { MlStatusParams as $, type ErrorReasonName as A, BEARER_PREFIX as B, type CloseOutcome as C, DesktopProtocolError as D, EndReason as E, EventMsg as F, type EventName as G, FsPatchEditFailure as H, HelloMsg as I, LlamaServerBuild as J, LlmRunning as K, Limits as L, ModelsTranscribeResult as M, LlmServerState as N, type OpName as O, LocalModelKind as P, LocalModelRow as Q, MlCatalogSetParams as R, StreamMeta as S, TranscriptionModelId as T, MlCatalogSetResult as U, MlInstallPhase as V, Welcome as W, MlInstallProgress as X, MlRuntimeState as Y, MlServiceState as Z, MlServiceStatus as _, type OpParams as a, MlStatusResult as a0, ModelKey as a1, ModelsDownloadsCancelParams as a2, ModelsDownloadsCancelResult as a3, ModelsDownloadsListParams as a4, ModelsDownloadsListResult as a5, ModelsInstallParams as a6, ModelsInstallResult as a7, ModelsLlmChatParams as a8, ModelsLlmChatResult as a9, SERVICES as aA, SUBPROTOCOL as aB, type ServiceId as aC, type ServiceOpName as aD, type ServiceOpSpec as aE, type ServiceSpec as aF, Sha256Hex as aG, StreamMsg as aH, TextModelId as aI, TextModelInfo as aJ, TranscriptSegment as aK, TranscriptionModelInfo as aL, UnusableTextModel as aM, closeRule as aN, isTerminalClose as aO, ModelsLlmInstallParams as aa, ModelsLlmInstallResult as ab, ModelsLlmStartParams as ac, ModelsLlmStartResult as ad, ModelsLlmStatusParams as ae, ModelsLlmStatusResult as af, ModelsLlmStopParams as ag, ModelsLlmStopResult as ah, ModelsLocalListParams as ai, ModelsLocalListResult as aj, ModelsLocalRemoveParams as ak, ModelsLocalRemoveResult as al, ModelsProgressEvent as am, ModelsStatusParams as an, ModelsStatusResult as ao, ModelsTranscribeParams as ap, NAMED_SCHEMAS as aq, type NamedSchemaId as ar, OpDescriptor as as, type OpSpec as at, PING_TEXT as au, PONG_TEXT as av, ProtocolErrorBody as aw, RelayMsg as ax, RequestMsg as ay, ResponseMsg as az, type OpResult as b, OPS as c, EVENTS as d, ClientType as e, MlProgress as f, CLOSE_RULES as g, CancelMsg as h, isDesktopProtocolError as i, CatalogFile as j, CatalogModelEntry as k, ClientToCoreMsg as l, type CloseAction as m, CloseCode as n, CloseCodeValue as o, type CloseRule as p, CoreToClientMsg as q, CreditMsg as r, DownloadKind as s, DownloadRow as t, EndMsg as u, ErrorCode as v, type ErrorCodeName as w, type ErrorData as x, ErrorMsg as y, ErrorReason as z };
|
package/dist/react.d.cts
CHANGED
|
@@ -7,7 +7,7 @@ import { z } from 'zod';
|
|
|
7
7
|
* never drift (see the `_assert*` lines there).
|
|
8
8
|
*/
|
|
9
9
|
type ErrorCodeName = "AUTH_REQUIRED" | "AUTH_INVALID" | "AUTH_EXPIRED" | "AUTH_FORBIDDEN" | "AUTH_DEVICE_REVOKED" | "PERMISSION_DENIED_OS" | "NOT_FOUND" | "CONFLICT" | "INVALID_PARAMS" | "RESOURCE_BUSY" | "RESOURCE_GONE" | "CANCELLED" | "TIMEOUT" | "PLATFORM_UNSUPPORTED" | "RATE_LIMITED" | "INTERNAL" | "PROTOCOL_VERSION_UNSUPPORTED" | "PROTOCOL_ERROR" | "UNKNOWN_OPERATION" | "DEVICE_OFFLINE" | "PAYLOAD_TOO_LARGE";
|
|
10
|
-
type ErrorReasonName = "not_a_directory" | "is_a_directory" | "directory_not_empty" | "already_exists" | "stale_write" | "binary_content" | "not_utf8_boundary" | "patch_no_match" | "patch_ambiguous" | "resource_exited" | "resource_expired" | "control_taken" | "window_exhausted" | "runtime_not_installed" | "model_not_installed" | "unsupported_media" | "download_failed" | "service_starting" | "service_restarted" | "service_failed" | "browser_not_connected" | "browser_ambiguous" | "browser_account_mismatch" | "browser_connection_off" | "awaiting_confirmation" | "tool_disabled_on_device";
|
|
10
|
+
type ErrorReasonName = "not_a_directory" | "is_a_directory" | "directory_not_empty" | "already_exists" | "stale_write" | "binary_content" | "not_utf8_boundary" | "patch_no_match" | "patch_ambiguous" | "resource_exited" | "resource_expired" | "control_taken" | "window_exhausted" | "runtime_not_installed" | "model_not_installed" | "unsupported_media" | "download_failed" | "service_starting" | "service_restarted" | "service_failed" | "browser_not_connected" | "browser_ambiguous" | "browser_account_mismatch" | "browser_connection_off" | "awaiting_confirmation" | "tool_disabled_on_device" | "model_not_running" | "model_server_unreachable";
|
|
11
11
|
interface ErrorData {
|
|
12
12
|
reason?: ErrorReasonName | undefined;
|
|
13
13
|
cap?: string | undefined;
|
|
@@ -1076,6 +1076,21 @@ declare const OPS: {
|
|
|
1076
1076
|
readonly since: "1.31";
|
|
1077
1077
|
readonly errors: readonly ["INTERNAL"];
|
|
1078
1078
|
};
|
|
1079
|
+
readonly "models.llm.chat": {
|
|
1080
|
+
readonly params: z.ZodObject<{
|
|
1081
|
+
model: z.ZodString;
|
|
1082
|
+
body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1083
|
+
start_if_stopped: z.ZodOptional<z.ZodBoolean>;
|
|
1084
|
+
window_bytes: z.ZodOptional<z.ZodInt>;
|
|
1085
|
+
}, z.core.$strict>;
|
|
1086
|
+
readonly result: z.ZodObject<{
|
|
1087
|
+
model: z.ZodString;
|
|
1088
|
+
content_type: z.ZodString;
|
|
1089
|
+
}, z.core.$strict>;
|
|
1090
|
+
readonly kind: "stream";
|
|
1091
|
+
readonly since: "1.76";
|
|
1092
|
+
readonly errors: readonly ["NOT_FOUND", "RESOURCE_BUSY", "RESOURCE_GONE", "INVALID_PARAMS", "TIMEOUT", "CANCELLED", "RATE_LIMITED", "INTERNAL"];
|
|
1093
|
+
};
|
|
1079
1094
|
readonly "models.downloads.list": {
|
|
1080
1095
|
readonly params: z.ZodObject<{}, z.core.$strict>;
|
|
1081
1096
|
readonly result: z.ZodObject<{
|
package/dist/react.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { z } from 'zod';
|
|
|
7
7
|
* never drift (see the `_assert*` lines there).
|
|
8
8
|
*/
|
|
9
9
|
type ErrorCodeName = "AUTH_REQUIRED" | "AUTH_INVALID" | "AUTH_EXPIRED" | "AUTH_FORBIDDEN" | "AUTH_DEVICE_REVOKED" | "PERMISSION_DENIED_OS" | "NOT_FOUND" | "CONFLICT" | "INVALID_PARAMS" | "RESOURCE_BUSY" | "RESOURCE_GONE" | "CANCELLED" | "TIMEOUT" | "PLATFORM_UNSUPPORTED" | "RATE_LIMITED" | "INTERNAL" | "PROTOCOL_VERSION_UNSUPPORTED" | "PROTOCOL_ERROR" | "UNKNOWN_OPERATION" | "DEVICE_OFFLINE" | "PAYLOAD_TOO_LARGE";
|
|
10
|
-
type ErrorReasonName = "not_a_directory" | "is_a_directory" | "directory_not_empty" | "already_exists" | "stale_write" | "binary_content" | "not_utf8_boundary" | "patch_no_match" | "patch_ambiguous" | "resource_exited" | "resource_expired" | "control_taken" | "window_exhausted" | "runtime_not_installed" | "model_not_installed" | "unsupported_media" | "download_failed" | "service_starting" | "service_restarted" | "service_failed" | "browser_not_connected" | "browser_ambiguous" | "browser_account_mismatch" | "browser_connection_off" | "awaiting_confirmation" | "tool_disabled_on_device";
|
|
10
|
+
type ErrorReasonName = "not_a_directory" | "is_a_directory" | "directory_not_empty" | "already_exists" | "stale_write" | "binary_content" | "not_utf8_boundary" | "patch_no_match" | "patch_ambiguous" | "resource_exited" | "resource_expired" | "control_taken" | "window_exhausted" | "runtime_not_installed" | "model_not_installed" | "unsupported_media" | "download_failed" | "service_starting" | "service_restarted" | "service_failed" | "browser_not_connected" | "browser_ambiguous" | "browser_account_mismatch" | "browser_connection_off" | "awaiting_confirmation" | "tool_disabled_on_device" | "model_not_running" | "model_server_unreachable";
|
|
11
11
|
interface ErrorData {
|
|
12
12
|
reason?: ErrorReasonName | undefined;
|
|
13
13
|
cap?: string | undefined;
|
|
@@ -1076,6 +1076,21 @@ declare const OPS: {
|
|
|
1076
1076
|
readonly since: "1.31";
|
|
1077
1077
|
readonly errors: readonly ["INTERNAL"];
|
|
1078
1078
|
};
|
|
1079
|
+
readonly "models.llm.chat": {
|
|
1080
|
+
readonly params: z.ZodObject<{
|
|
1081
|
+
model: z.ZodString;
|
|
1082
|
+
body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1083
|
+
start_if_stopped: z.ZodOptional<z.ZodBoolean>;
|
|
1084
|
+
window_bytes: z.ZodOptional<z.ZodInt>;
|
|
1085
|
+
}, z.core.$strict>;
|
|
1086
|
+
readonly result: z.ZodObject<{
|
|
1087
|
+
model: z.ZodString;
|
|
1088
|
+
content_type: z.ZodString;
|
|
1089
|
+
}, z.core.$strict>;
|
|
1090
|
+
readonly kind: "stream";
|
|
1091
|
+
readonly since: "1.76";
|
|
1092
|
+
readonly errors: readonly ["NOT_FOUND", "RESOURCE_BUSY", "RESOURCE_GONE", "INVALID_PARAMS", "TIMEOUT", "CANCELLED", "RATE_LIMITED", "INTERNAL"];
|
|
1093
|
+
};
|
|
1079
1094
|
readonly "models.downloads.list": {
|
|
1080
1095
|
readonly params: z.ZodObject<{}, z.core.$strict>;
|
|
1081
1096
|
readonly result: z.ZodObject<{
|
|
@@ -1320,7 +1320,9 @@
|
|
|
1320
1320
|
"browser_account_mismatch",
|
|
1321
1321
|
"browser_connection_off",
|
|
1322
1322
|
"awaiting_confirmation",
|
|
1323
|
-
"tool_disabled_on_device"
|
|
1323
|
+
"tool_disabled_on_device",
|
|
1324
|
+
"model_not_running",
|
|
1325
|
+
"model_server_unreachable"
|
|
1324
1326
|
]
|
|
1325
1327
|
},
|
|
1326
1328
|
"FsPatchEditFailure": {
|
|
@@ -5159,6 +5161,52 @@
|
|
|
5159
5161
|
],
|
|
5160
5162
|
"additionalProperties": false
|
|
5161
5163
|
},
|
|
5164
|
+
"ModelsLlmChatParams": {
|
|
5165
|
+
"type": "object",
|
|
5166
|
+
"properties": {
|
|
5167
|
+
"model": {
|
|
5168
|
+
"$ref": "#/$defs/ModelKey"
|
|
5169
|
+
},
|
|
5170
|
+
"body": {
|
|
5171
|
+
"type": "object",
|
|
5172
|
+
"propertyNames": {
|
|
5173
|
+
"type": "string",
|
|
5174
|
+
"maxLength": 200
|
|
5175
|
+
},
|
|
5176
|
+
"additionalProperties": {}
|
|
5177
|
+
},
|
|
5178
|
+
"start_if_stopped": {
|
|
5179
|
+
"type": "boolean"
|
|
5180
|
+
},
|
|
5181
|
+
"window_bytes": {
|
|
5182
|
+
"type": "integer",
|
|
5183
|
+
"minimum": 4096,
|
|
5184
|
+
"maximum": 16777216
|
|
5185
|
+
}
|
|
5186
|
+
},
|
|
5187
|
+
"required": [
|
|
5188
|
+
"model",
|
|
5189
|
+
"body"
|
|
5190
|
+
],
|
|
5191
|
+
"additionalProperties": false
|
|
5192
|
+
},
|
|
5193
|
+
"ModelsLlmChatResult": {
|
|
5194
|
+
"type": "object",
|
|
5195
|
+
"properties": {
|
|
5196
|
+
"model": {
|
|
5197
|
+
"$ref": "#/$defs/ModelKey"
|
|
5198
|
+
},
|
|
5199
|
+
"content_type": {
|
|
5200
|
+
"type": "string",
|
|
5201
|
+
"maxLength": 128
|
|
5202
|
+
}
|
|
5203
|
+
},
|
|
5204
|
+
"required": [
|
|
5205
|
+
"model",
|
|
5206
|
+
"content_type"
|
|
5207
|
+
],
|
|
5208
|
+
"additionalProperties": false
|
|
5209
|
+
},
|
|
5162
5210
|
"DownloadKind": {
|
|
5163
5211
|
"type": "string",
|
|
5164
5212
|
"enum": [
|
|
@@ -5473,6 +5521,10 @@
|
|
|
5473
5521
|
"minLength": 1,
|
|
5474
5522
|
"maxLength": 2048,
|
|
5475
5523
|
"pattern": "^https?:\\/\\/[^\\s/?#]+(\\/[^\\s?#]*)?$"
|
|
5524
|
+
},
|
|
5525
|
+
"organization_id": {
|
|
5526
|
+
"type": "string",
|
|
5527
|
+
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
|
|
5476
5528
|
}
|
|
5477
5529
|
},
|
|
5478
5530
|
"required": [
|
|
@@ -25294,6 +25346,22 @@
|
|
|
25294
25346
|
"INTERNAL"
|
|
25295
25347
|
]
|
|
25296
25348
|
},
|
|
25349
|
+
"models.llm.chat": {
|
|
25350
|
+
"params": "ModelsLlmChatParams",
|
|
25351
|
+
"result": "ModelsLlmChatResult",
|
|
25352
|
+
"kind": "stream",
|
|
25353
|
+
"since": "1.76",
|
|
25354
|
+
"errors": [
|
|
25355
|
+
"NOT_FOUND",
|
|
25356
|
+
"RESOURCE_BUSY",
|
|
25357
|
+
"RESOURCE_GONE",
|
|
25358
|
+
"INVALID_PARAMS",
|
|
25359
|
+
"TIMEOUT",
|
|
25360
|
+
"CANCELLED",
|
|
25361
|
+
"RATE_LIMITED",
|
|
25362
|
+
"INTERNAL"
|
|
25363
|
+
]
|
|
25364
|
+
},
|
|
25297
25365
|
"models.downloads.list": {
|
|
25298
25366
|
"params": "ModelsDownloadsListParams",
|
|
25299
25367
|
"result": "ModelsDownloadsListResult",
|
|
@@ -28341,5 +28409,5 @@
|
|
|
28341
28409
|
"olderPeersGet": 0
|
|
28342
28410
|
}
|
|
28343
28411
|
},
|
|
28344
|
-
"x-protocol-version": "1.
|
|
28412
|
+
"x-protocol-version": "1.77"
|
|
28345
28413
|
}
|