@ai-matrx/desktop-protocol 0.21.42 → 0.21.44
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 +23 -2
- package/dist/client.cjs +59 -17
- 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 +59 -17
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +78 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -8
- package/dist/index.d.ts +23 -8
- package/dist/index.js +78 -19
- package/dist/index.js.map +1 -1
- package/dist/{models-Ut2nuRzV.d.cts → models-CCRnwbz8.d.cts} +305 -606
- package/dist/{models-Ut2nuRzV.d.ts → models-CCRnwbz8.d.ts} +305 -606
- package/dist/react.d.cts +22 -120
- package/dist/react.d.ts +22 -120
- package/generated/desktop-protocol.schema.json +239 -31
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { O as OpName } from './models-
|
|
3
|
-
export { B as BEARER_PREFIX, g as CLOSE_RULES, h as CancelMsg, j as ClientToCoreMsg, e as ClientType,
|
|
2
|
+
import { O as OpName } from './models-CCRnwbz8.cjs';
|
|
3
|
+
export { B as BEARER_PREFIX, g as CLOSE_RULES, h as CancelMsg, j as CatalogFile, k as CatalogModelEntry, l as ClientToCoreMsg, e as ClientType, m as CloseAction, n as CloseCode, o as CloseCodeValue, C as CloseOutcome, p as CloseRule, q as CoreToClientMsg, r as CreditMsg, D as DesktopProtocolError, s as DownloadKind, t as DownloadRow, d as EVENTS, u as EndMsg, E as EndReason, v as ErrorCode, w as ErrorCodeName, x as ErrorData, y as ErrorMsg, z as ErrorReason, A as ErrorReasonName, F as EventMsg, G as EventName, H as FsPatchEditFailure, I as HelloMsg, L as Limits, J as LlamaServerBuild, K as LlmRunning, N as LlmServerState, P as MlCatalogSetParams, Q as MlCatalogSetResult, R as MlInstallPhase, U as MlInstallProgress, f as MlProgress, V as MlRuntimeState, X as MlServiceState, Y as MlServiceStatus, Z as MlStatusParams, _ as MlStatusResult, $ as ModelKey, a0 as ModelsDownloadsCancelParams, a1 as ModelsDownloadsCancelResult, a2 as ModelsDownloadsListParams, a3 as ModelsDownloadsListResult, a4 as ModelsInstallParams, a5 as ModelsInstallResult, a6 as ModelsLlmInstallParams, a7 as ModelsLlmInstallResult, a8 as ModelsLlmStartParams, a9 as ModelsLlmStartResult, aa as ModelsLlmStatusParams, ab as ModelsLlmStatusResult, ac as ModelsLlmStopParams, ad as ModelsLlmStopResult, ae as ModelsProgressEvent, af as ModelsStatusParams, ag as ModelsStatusResult, ah as ModelsTranscribeParams, M as ModelsTranscribeResult, ai as NAMED_SCHEMAS, aj as NamedSchemaId, c as OPS, ak as OpDescriptor, a as OpParams, b as OpResult, al as OpSpec, am as PING_TEXT, an as PONG_TEXT, ao as ProtocolErrorBody, ap as RelayMsg, aq as RequestMsg, ar as ResponseMsg, as as SERVICES, at as SUBPROTOCOL, au as ServiceId, av as ServiceOpName, aw as ServiceOpSpec, ax as ServiceSpec, ay as Sha256Hex, S as StreamMeta, az as StreamMsg, aA as TextModelId, aB as TextModelInfo, aC as TranscriptSegment, T as TranscriptionModelId, aD as TranscriptionModelInfo, W as Welcome, aE as closeRule, i as isDesktopProtocolError, aF as isTerminalClose } from './models-CCRnwbz8.cjs';
|
|
4
4
|
export { BROADCAST_CID, DecodedFrame, FRAME_HEADER_BYTES, FRAME_STRUCT_FORMAT, FRAME_VERSION, FrameChannel, FrameChannelValue, FrameFlag, assertFrameHeader, connectionEndFrame, decodeFrame, encodeFrame, hasFlag, isConnectionEnd, readCid, stampCid } from './frame.cjs';
|
|
5
5
|
|
|
6
6
|
/** @ai-matrx/desktop-protocol — version and primitive schemas. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */
|
|
@@ -123,10 +123,15 @@ declare const PROTOCOL_MAJOR: 1;
|
|
|
123
123
|
* models.downloads.list (every running model download and every half-done one) and
|
|
124
124
|
* models.downloads.cancel. A 1.44 core omits graphics and answers UNKNOWN_OPERATION.
|
|
125
125
|
* 1.46 — a failed download stays listed with why: DownloadRow `error`. A 1.45 core omits it.
|
|
126
|
+
* 1.49 — local models come from the platform catalog: TextModelId and TranscriptionModelId are
|
|
127
|
+
* string keys (`ModelKey`; every 1.48 id stays valid), and the service op ml.catalog_set
|
|
128
|
+
* hands the ml service the selected files to fetch (URL + SHA-256 each) and the
|
|
129
|
+
* llama-server build. A 1.48 peer still refuses keys outside its enum; the catalog's
|
|
130
|
+
* min_app_version keeps new keys away from it.
|
|
126
131
|
*/
|
|
127
|
-
declare const PROTOCOL_MINOR:
|
|
132
|
+
declare const PROTOCOL_MINOR: 49;
|
|
128
133
|
/** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
|
|
129
|
-
declare const PROTOCOL_VERSION: "1.
|
|
134
|
+
declare const PROTOCOL_VERSION: "1.49";
|
|
130
135
|
/** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
|
|
131
136
|
declare const u32: z.ZodInt;
|
|
132
137
|
declare const nonNegInt: z.ZodInt;
|
|
@@ -4006,9 +4011,9 @@ type ServiceWelcome = z.output<typeof ServiceWelcome>;
|
|
|
4006
4011
|
/** Tool names are the platform registry's (`tool.definition.name`): `fs_read`, `shell_execute`… */
|
|
4007
4012
|
declare const ToolName: z.ZodString;
|
|
4008
4013
|
declare const ToolLevel: z.ZodEnum<{
|
|
4014
|
+
protocol: "protocol";
|
|
4009
4015
|
chat: "chat";
|
|
4010
4016
|
programmatic: "programmatic";
|
|
4011
|
-
protocol: "protocol";
|
|
4012
4017
|
}>;
|
|
4013
4018
|
type ToolLevel = z.output<typeof ToolLevel>;
|
|
4014
4019
|
declare const ToolOutcome: z.ZodEnum<{
|
|
@@ -4038,9 +4043,9 @@ type ToolTransport = z.output<typeof ToolTransport>;
|
|
|
4038
4043
|
declare const ToolLevelResult: z.ZodObject<{
|
|
4039
4044
|
tool: z.ZodString;
|
|
4040
4045
|
level: z.ZodEnum<{
|
|
4046
|
+
protocol: "protocol";
|
|
4041
4047
|
chat: "chat";
|
|
4042
4048
|
programmatic: "programmatic";
|
|
4043
|
-
protocol: "protocol";
|
|
4044
4049
|
}>;
|
|
4045
4050
|
platform: z.ZodEnum<{
|
|
4046
4051
|
darwin: "darwin";
|
|
@@ -4072,9 +4077,9 @@ declare const ToolResultsFile: z.ZodObject<{
|
|
|
4072
4077
|
results: z.ZodArray<z.ZodObject<{
|
|
4073
4078
|
tool: z.ZodString;
|
|
4074
4079
|
level: z.ZodEnum<{
|
|
4080
|
+
protocol: "protocol";
|
|
4075
4081
|
chat: "chat";
|
|
4076
4082
|
programmatic: "programmatic";
|
|
4077
|
-
protocol: "protocol";
|
|
4078
4083
|
}>;
|
|
4079
4084
|
platform: z.ZodEnum<{
|
|
4080
4085
|
darwin: "darwin";
|
|
@@ -10314,6 +10319,16 @@ type EntitiesPiiResult = z.output<typeof EntitiesPiiResult>;
|
|
|
10314
10319
|
* inside one (`ProtocolErrorBody.data`), or a union branch (`RelayCallResponse|0`).
|
|
10315
10320
|
*/
|
|
10316
10321
|
declare const FIELDS_SINCE: {
|
|
10322
|
+
readonly LlmRunning: {
|
|
10323
|
+
readonly context_length: "1.48";
|
|
10324
|
+
readonly gpu_layers: "1.48";
|
|
10325
|
+
readonly threads: "1.48";
|
|
10326
|
+
};
|
|
10327
|
+
readonly ModelsLlmStartParams: {
|
|
10328
|
+
readonly gpu_layers: "1.48";
|
|
10329
|
+
readonly threads: "1.48";
|
|
10330
|
+
readonly load_timeout_s: "1.48";
|
|
10331
|
+
};
|
|
10317
10332
|
readonly FsPatchResult: {
|
|
10318
10333
|
readonly edits_applied: "1.1";
|
|
10319
10334
|
readonly edits_failed: "1.1";
|
|
@@ -10506,7 +10521,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
|
|
|
10506
10521
|
declare const VERSIONED_RESULT_OPS: readonly OpName[];
|
|
10507
10522
|
|
|
10508
10523
|
/** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
|
|
10509
|
-
declare const CONTRACT_SHA256: "
|
|
10524
|
+
declare const CONTRACT_SHA256: "783487638685c921a761d27c5c6dca3103d1d6d5ae0ec38ffd59086b68a2207a";
|
|
10510
10525
|
|
|
10511
10526
|
/**
|
|
10512
10527
|
* The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { O as OpName } from './models-
|
|
3
|
-
export { B as BEARER_PREFIX, g as CLOSE_RULES, h as CancelMsg, j as ClientToCoreMsg, e as ClientType,
|
|
2
|
+
import { O as OpName } from './models-CCRnwbz8.js';
|
|
3
|
+
export { B as BEARER_PREFIX, g as CLOSE_RULES, h as CancelMsg, j as CatalogFile, k as CatalogModelEntry, l as ClientToCoreMsg, e as ClientType, m as CloseAction, n as CloseCode, o as CloseCodeValue, C as CloseOutcome, p as CloseRule, q as CoreToClientMsg, r as CreditMsg, D as DesktopProtocolError, s as DownloadKind, t as DownloadRow, d as EVENTS, u as EndMsg, E as EndReason, v as ErrorCode, w as ErrorCodeName, x as ErrorData, y as ErrorMsg, z as ErrorReason, A as ErrorReasonName, F as EventMsg, G as EventName, H as FsPatchEditFailure, I as HelloMsg, L as Limits, J as LlamaServerBuild, K as LlmRunning, N as LlmServerState, P as MlCatalogSetParams, Q as MlCatalogSetResult, R as MlInstallPhase, U as MlInstallProgress, f as MlProgress, V as MlRuntimeState, X as MlServiceState, Y as MlServiceStatus, Z as MlStatusParams, _ as MlStatusResult, $ as ModelKey, a0 as ModelsDownloadsCancelParams, a1 as ModelsDownloadsCancelResult, a2 as ModelsDownloadsListParams, a3 as ModelsDownloadsListResult, a4 as ModelsInstallParams, a5 as ModelsInstallResult, a6 as ModelsLlmInstallParams, a7 as ModelsLlmInstallResult, a8 as ModelsLlmStartParams, a9 as ModelsLlmStartResult, aa as ModelsLlmStatusParams, ab as ModelsLlmStatusResult, ac as ModelsLlmStopParams, ad as ModelsLlmStopResult, ae as ModelsProgressEvent, af as ModelsStatusParams, ag as ModelsStatusResult, ah as ModelsTranscribeParams, M as ModelsTranscribeResult, ai as NAMED_SCHEMAS, aj as NamedSchemaId, c as OPS, ak as OpDescriptor, a as OpParams, b as OpResult, al as OpSpec, am as PING_TEXT, an as PONG_TEXT, ao as ProtocolErrorBody, ap as RelayMsg, aq as RequestMsg, ar as ResponseMsg, as as SERVICES, at as SUBPROTOCOL, au as ServiceId, av as ServiceOpName, aw as ServiceOpSpec, ax as ServiceSpec, ay as Sha256Hex, S as StreamMeta, az as StreamMsg, aA as TextModelId, aB as TextModelInfo, aC as TranscriptSegment, T as TranscriptionModelId, aD as TranscriptionModelInfo, W as Welcome, aE as closeRule, i as isDesktopProtocolError, aF as isTerminalClose } from './models-CCRnwbz8.js';
|
|
4
4
|
export { BROADCAST_CID, DecodedFrame, FRAME_HEADER_BYTES, FRAME_STRUCT_FORMAT, FRAME_VERSION, FrameChannel, FrameChannelValue, FrameFlag, assertFrameHeader, connectionEndFrame, decodeFrame, encodeFrame, hasFlag, isConnectionEnd, readCid, stampCid } from './frame.js';
|
|
5
5
|
|
|
6
6
|
/** @ai-matrx/desktop-protocol — version and primitive schemas. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */
|
|
@@ -123,10 +123,15 @@ declare const PROTOCOL_MAJOR: 1;
|
|
|
123
123
|
* models.downloads.list (every running model download and every half-done one) and
|
|
124
124
|
* models.downloads.cancel. A 1.44 core omits graphics and answers UNKNOWN_OPERATION.
|
|
125
125
|
* 1.46 — a failed download stays listed with why: DownloadRow `error`. A 1.45 core omits it.
|
|
126
|
+
* 1.49 — local models come from the platform catalog: TextModelId and TranscriptionModelId are
|
|
127
|
+
* string keys (`ModelKey`; every 1.48 id stays valid), and the service op ml.catalog_set
|
|
128
|
+
* hands the ml service the selected files to fetch (URL + SHA-256 each) and the
|
|
129
|
+
* llama-server build. A 1.48 peer still refuses keys outside its enum; the catalog's
|
|
130
|
+
* min_app_version keeps new keys away from it.
|
|
126
131
|
*/
|
|
127
|
-
declare const PROTOCOL_MINOR:
|
|
132
|
+
declare const PROTOCOL_MINOR: 49;
|
|
128
133
|
/** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
|
|
129
|
-
declare const PROTOCOL_VERSION: "1.
|
|
134
|
+
declare const PROTOCOL_VERSION: "1.49";
|
|
130
135
|
/** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
|
|
131
136
|
declare const u32: z.ZodInt;
|
|
132
137
|
declare const nonNegInt: z.ZodInt;
|
|
@@ -4006,9 +4011,9 @@ type ServiceWelcome = z.output<typeof ServiceWelcome>;
|
|
|
4006
4011
|
/** Tool names are the platform registry's (`tool.definition.name`): `fs_read`, `shell_execute`… */
|
|
4007
4012
|
declare const ToolName: z.ZodString;
|
|
4008
4013
|
declare const ToolLevel: z.ZodEnum<{
|
|
4014
|
+
protocol: "protocol";
|
|
4009
4015
|
chat: "chat";
|
|
4010
4016
|
programmatic: "programmatic";
|
|
4011
|
-
protocol: "protocol";
|
|
4012
4017
|
}>;
|
|
4013
4018
|
type ToolLevel = z.output<typeof ToolLevel>;
|
|
4014
4019
|
declare const ToolOutcome: z.ZodEnum<{
|
|
@@ -4038,9 +4043,9 @@ type ToolTransport = z.output<typeof ToolTransport>;
|
|
|
4038
4043
|
declare const ToolLevelResult: z.ZodObject<{
|
|
4039
4044
|
tool: z.ZodString;
|
|
4040
4045
|
level: z.ZodEnum<{
|
|
4046
|
+
protocol: "protocol";
|
|
4041
4047
|
chat: "chat";
|
|
4042
4048
|
programmatic: "programmatic";
|
|
4043
|
-
protocol: "protocol";
|
|
4044
4049
|
}>;
|
|
4045
4050
|
platform: z.ZodEnum<{
|
|
4046
4051
|
darwin: "darwin";
|
|
@@ -4072,9 +4077,9 @@ declare const ToolResultsFile: z.ZodObject<{
|
|
|
4072
4077
|
results: z.ZodArray<z.ZodObject<{
|
|
4073
4078
|
tool: z.ZodString;
|
|
4074
4079
|
level: z.ZodEnum<{
|
|
4080
|
+
protocol: "protocol";
|
|
4075
4081
|
chat: "chat";
|
|
4076
4082
|
programmatic: "programmatic";
|
|
4077
|
-
protocol: "protocol";
|
|
4078
4083
|
}>;
|
|
4079
4084
|
platform: z.ZodEnum<{
|
|
4080
4085
|
darwin: "darwin";
|
|
@@ -10314,6 +10319,16 @@ type EntitiesPiiResult = z.output<typeof EntitiesPiiResult>;
|
|
|
10314
10319
|
* inside one (`ProtocolErrorBody.data`), or a union branch (`RelayCallResponse|0`).
|
|
10315
10320
|
*/
|
|
10316
10321
|
declare const FIELDS_SINCE: {
|
|
10322
|
+
readonly LlmRunning: {
|
|
10323
|
+
readonly context_length: "1.48";
|
|
10324
|
+
readonly gpu_layers: "1.48";
|
|
10325
|
+
readonly threads: "1.48";
|
|
10326
|
+
};
|
|
10327
|
+
readonly ModelsLlmStartParams: {
|
|
10328
|
+
readonly gpu_layers: "1.48";
|
|
10329
|
+
readonly threads: "1.48";
|
|
10330
|
+
readonly load_timeout_s: "1.48";
|
|
10331
|
+
};
|
|
10317
10332
|
readonly FsPatchResult: {
|
|
10318
10333
|
readonly edits_applied: "1.1";
|
|
10319
10334
|
readonly edits_failed: "1.1";
|
|
@@ -10506,7 +10521,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
|
|
|
10506
10521
|
declare const VERSIONED_RESULT_OPS: readonly OpName[];
|
|
10507
10522
|
|
|
10508
10523
|
/** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
|
|
10509
|
-
declare const CONTRACT_SHA256: "
|
|
10524
|
+
declare const CONTRACT_SHA256: "783487638685c921a761d27c5c6dca3103d1d6d5ae0ec38ffd59086b68a2207a";
|
|
10510
10525
|
|
|
10511
10526
|
/**
|
|
10512
10527
|
* The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { UUID_SHAPE_PATTERN } from "@ai-matrx/kit/uuid";
|
|
4
4
|
var PROTOCOL_MAJOR = 1;
|
|
5
|
-
var PROTOCOL_MINOR =
|
|
5
|
+
var PROTOCOL_MINOR = 49;
|
|
6
6
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
7
7
|
var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
8
8
|
var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -815,7 +815,8 @@ var RelayStatusResponse = RelayDeviceStatusEvent;
|
|
|
815
815
|
|
|
816
816
|
// src/schema/models.ts
|
|
817
817
|
import { z as z10 } from "zod";
|
|
818
|
-
var
|
|
818
|
+
var ModelKey = z10.string().min(1).max(128).regex(/^[a-z0-9][a-z0-9._-]*(\/[a-z0-9][a-z0-9._-]*)?$/);
|
|
819
|
+
var TranscriptionModelId = ModelKey;
|
|
819
820
|
var MlRuntimeState = z10.enum(["not_installed", "installing", "installed", "failed"]);
|
|
820
821
|
var MlInstallPhase = z10.enum(["packages", "model", "verifying"]);
|
|
821
822
|
var MlInstallProgress = z10.strictObject({
|
|
@@ -875,18 +876,7 @@ var MlProgress = z10.strictObject({
|
|
|
875
876
|
/** The segment just transcribed (transcribe only): text appears as it is recognised. */
|
|
876
877
|
segment: TranscriptSegment.nullable()
|
|
877
878
|
});
|
|
878
|
-
var TextModelId =
|
|
879
|
-
"smollm2-135m",
|
|
880
|
-
"llama-3.2-3b",
|
|
881
|
-
"phi-4-mini",
|
|
882
|
-
"gemma-3-4b",
|
|
883
|
-
"llama-3.1-8b",
|
|
884
|
-
"qwen-2.5-7b",
|
|
885
|
-
"mistral-small-3.1",
|
|
886
|
-
"gpt-oss-20b",
|
|
887
|
-
"qwen-2.5-coder-7b",
|
|
888
|
-
"qwen-2.5-coder-14b"
|
|
889
|
-
]);
|
|
879
|
+
var TextModelId = ModelKey;
|
|
890
880
|
var TextModelInfo = z10.strictObject({
|
|
891
881
|
id: TextModelId,
|
|
892
882
|
/** Download size of the weights. */
|
|
@@ -894,7 +884,14 @@ var TextModelInfo = z10.strictObject({
|
|
|
894
884
|
installed: z10.boolean()
|
|
895
885
|
});
|
|
896
886
|
var LlmServerState = z10.enum(["stopped", "starting", "running", "failed"]);
|
|
897
|
-
var LlmRunning = z10.strictObject({
|
|
887
|
+
var LlmRunning = z10.strictObject({
|
|
888
|
+
id: TextModelId,
|
|
889
|
+
port: z10.int().min(1024).max(65535),
|
|
890
|
+
/** (1.48) What the service actually applied, echoed so the app can attest "read and applied". Optional until the service sends them. */
|
|
891
|
+
context_length: z10.int().min(512).max(131072).optional(),
|
|
892
|
+
gpu_layers: z10.int().min(-1).max(999).optional(),
|
|
893
|
+
threads: z10.int().min(1).max(512).optional()
|
|
894
|
+
});
|
|
898
895
|
var ModelsLlmStatusParams = z10.strictObject({});
|
|
899
896
|
var ModelsLlmStatusResult = z10.strictObject({
|
|
900
897
|
state: LlmServerState,
|
|
@@ -912,12 +909,57 @@ var ModelsLlmInstallParams = z10.strictObject({ model: TextModelId });
|
|
|
912
909
|
var ModelsLlmInstallResult = z10.strictObject({ model: TextModelId, elapsed_ms: nonNegInt });
|
|
913
910
|
var ModelsLlmStartParams = z10.strictObject({
|
|
914
911
|
model: TextModelId,
|
|
915
|
-
/** Tokens of context
|
|
916
|
-
context_length: z10.int().min(512).max(131072).optional()
|
|
912
|
+
/** Tokens of context, from the knob desktop.models/context_length. Omitted today means the service's fixed 4096 (optional until callers send it). */
|
|
913
|
+
context_length: z10.int().min(512).max(131072).optional(),
|
|
914
|
+
/** (1.48) Layers offloaded to the GPU; -1 = all. From the knob desktop.models/gpu_layers. */
|
|
915
|
+
gpu_layers: z10.int().min(-1).max(999).optional(),
|
|
916
|
+
/** (1.48) CPU threads, computed by the app from the knobs. */
|
|
917
|
+
threads: z10.int().min(1).max(512).optional(),
|
|
918
|
+
/** (1.48) Seconds to wait for the model to load, computed by the app from the knobs. */
|
|
919
|
+
load_timeout_s: z10.int().min(10).max(3600).optional()
|
|
917
920
|
});
|
|
918
921
|
var ModelsLlmStartResult = z10.strictObject({ running: LlmRunning, elapsed_ms: nonNegInt });
|
|
919
922
|
var ModelsLlmStopParams = z10.strictObject({});
|
|
920
923
|
var ModelsLlmStopResult = z10.strictObject({ stopped: z10.boolean() });
|
|
924
|
+
var Sha256Hex = z10.string().regex(/^[0-9a-f]{64}$/);
|
|
925
|
+
var CatalogFile = z10.strictObject({
|
|
926
|
+
/** Path inside the model's folder (the artifact's path_in_repo). */
|
|
927
|
+
path: z10.string().min(1).max(512),
|
|
928
|
+
/** The pinned https URL it is downloaded from. */
|
|
929
|
+
url: z10.string().url().max(2048),
|
|
930
|
+
size_bytes: nonNegInt,
|
|
931
|
+
sha256: Sha256Hex,
|
|
932
|
+
/** weights, weights_shard, mmproj, config, tokenizer, … (ai.model_artifact.role). */
|
|
933
|
+
role: z10.string().max(32)
|
|
934
|
+
});
|
|
935
|
+
var CatalogModelEntry = z10.strictObject({
|
|
936
|
+
/** The key callers name this model by (the 1.48 id for a seeded model). */
|
|
937
|
+
key: ModelKey,
|
|
938
|
+
/** The selected variant's key (`q4_k_m`, `ct2`). */
|
|
939
|
+
variant: z10.string().min(1).max(64),
|
|
940
|
+
/** The upstream revision (or the variant id when there is none): a change re-downloads. */
|
|
941
|
+
revision: z10.string().min(1).max(64),
|
|
942
|
+
multilingual: z10.boolean(),
|
|
943
|
+
/** Exactly the files this computer fetches for this model: never more, never fewer. */
|
|
944
|
+
files: z10.array(CatalogFile).min(1).max(256)
|
|
945
|
+
});
|
|
946
|
+
var LlamaServerBuild = z10.strictObject({
|
|
947
|
+
version: z10.string().min(1).max(32),
|
|
948
|
+
url: z10.string().url().max(2048),
|
|
949
|
+
size_bytes: nonNegInt,
|
|
950
|
+
sha256: Sha256Hex
|
|
951
|
+
});
|
|
952
|
+
var MlCatalogSetParams = z10.strictObject({
|
|
953
|
+
text: z10.array(CatalogModelEntry).max(512),
|
|
954
|
+
transcription: z10.array(CatalogModelEntry).max(64),
|
|
955
|
+
/** Null where the catalog has no build for this os/arch (installs then say so). */
|
|
956
|
+
llama_server: LlamaServerBuild.nullable(),
|
|
957
|
+
/** The knob desktop.models/default_transcription_model. */
|
|
958
|
+
default_transcription: TranscriptionModelId,
|
|
959
|
+
/** When the catalog was last changed (catalog_updated_at), for the service's log. */
|
|
960
|
+
catalog_updated_at: z10.string().max(40)
|
|
961
|
+
});
|
|
962
|
+
var MlCatalogSetResult = z10.strictObject({ text: nonNegInt, transcription: nonNegInt });
|
|
921
963
|
var DownloadKind = z10.enum(["speech_model", "text_model", "runtime"]);
|
|
922
964
|
var DownloadRow = z10.strictObject({
|
|
923
965
|
/** The job's key in the service: "model:base", "llm:smollm2-135m", "llm-server", "runtime". */
|
|
@@ -4589,7 +4631,8 @@ var SERVICES = {
|
|
|
4589
4631
|
"ml.llm_start": { params: ModelsLlmStartParams, result: ModelsLlmStartResult },
|
|
4590
4632
|
"ml.llm_stop": { params: ModelsLlmStopParams, result: ModelsLlmStopResult },
|
|
4591
4633
|
"ml.downloads": { params: ModelsDownloadsListParams, result: ModelsDownloadsListResult },
|
|
4592
|
-
"ml.download_cancel": { params: ModelsDownloadsCancelParams, result: ModelsDownloadsCancelResult }
|
|
4634
|
+
"ml.download_cancel": { params: ModelsDownloadsCancelParams, result: ModelsDownloadsCancelResult },
|
|
4635
|
+
"ml.catalog_set": { params: MlCatalogSetParams, result: MlCatalogSetResult }
|
|
4593
4636
|
}
|
|
4594
4637
|
},
|
|
4595
4638
|
coding: {
|
|
@@ -4741,6 +4784,13 @@ var NAMED_SCHEMAS = {
|
|
|
4741
4784
|
ModelsProgressEvent,
|
|
4742
4785
|
TextModelId,
|
|
4743
4786
|
TextModelInfo,
|
|
4787
|
+
ModelKey,
|
|
4788
|
+
Sha256Hex,
|
|
4789
|
+
CatalogFile,
|
|
4790
|
+
CatalogModelEntry,
|
|
4791
|
+
LlamaServerBuild,
|
|
4792
|
+
MlCatalogSetParams,
|
|
4793
|
+
MlCatalogSetResult,
|
|
4744
4794
|
LlmServerState,
|
|
4745
4795
|
LlmRunning,
|
|
4746
4796
|
ModelsLlmStatusParams,
|
|
@@ -5388,6 +5438,8 @@ var NAMED_SCHEMAS = {
|
|
|
5388
5438
|
|
|
5389
5439
|
// src/versioning.ts
|
|
5390
5440
|
var FIELDS_SINCE = {
|
|
5441
|
+
LlmRunning: { context_length: "1.48", gpu_layers: "1.48", threads: "1.48" },
|
|
5442
|
+
ModelsLlmStartParams: { gpu_layers: "1.48", threads: "1.48", load_timeout_s: "1.48" },
|
|
5391
5443
|
FsPatchResult: { edits_applied: "1.1", edits_failed: "1.1" },
|
|
5392
5444
|
"ProtocolErrorBody.data": { edits_failed: "1.1" },
|
|
5393
5445
|
"RelayCallResponse|0": { protocol_version: "1.1" },
|
|
@@ -5584,7 +5636,7 @@ function forPeer(op, part, value, version) {
|
|
|
5584
5636
|
var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
|
|
5585
5637
|
|
|
5586
5638
|
// src/contract.ts
|
|
5587
|
-
var CONTRACT_SHA256 = "
|
|
5639
|
+
var CONTRACT_SHA256 = "783487638685c921a761d27c5c6dca3103d1d6d5ae0ec38ffd59086b68a2207a";
|
|
5588
5640
|
|
|
5589
5641
|
// src/close-policy.ts
|
|
5590
5642
|
var CLOSE_RULES = {
|
|
@@ -6154,6 +6206,8 @@ export {
|
|
|
6154
6206
|
CalendarListParams,
|
|
6155
6207
|
CalendarListResult,
|
|
6156
6208
|
CancelMsg,
|
|
6209
|
+
CatalogFile,
|
|
6210
|
+
CatalogModelEntry,
|
|
6157
6211
|
ChatAppProject,
|
|
6158
6212
|
ChatFamily,
|
|
6159
6213
|
ChatHidden,
|
|
@@ -6439,6 +6493,7 @@ export {
|
|
|
6439
6493
|
LEGACY_ACTIONS,
|
|
6440
6494
|
LEGACY_DISPATCHERS,
|
|
6441
6495
|
Limits,
|
|
6496
|
+
LlamaServerBuild,
|
|
6442
6497
|
LlmRunning,
|
|
6443
6498
|
LlmServerState,
|
|
6444
6499
|
LocationGetParams,
|
|
@@ -6460,6 +6515,8 @@ export {
|
|
|
6460
6515
|
MessagesMessage,
|
|
6461
6516
|
MessagesSendParams,
|
|
6462
6517
|
MessagesSendResult,
|
|
6518
|
+
MlCatalogSetParams,
|
|
6519
|
+
MlCatalogSetResult,
|
|
6463
6520
|
MlInstallPhase,
|
|
6464
6521
|
MlInstallProgress,
|
|
6465
6522
|
MlProgress,
|
|
@@ -6468,6 +6525,7 @@ export {
|
|
|
6468
6525
|
MlServiceStatus,
|
|
6469
6526
|
MlStatusParams,
|
|
6470
6527
|
MlStatusResult,
|
|
6528
|
+
ModelKey,
|
|
6471
6529
|
ModelsDownloadsCancelParams,
|
|
6472
6530
|
ModelsDownloadsCancelResult,
|
|
6473
6531
|
ModelsDownloadsListParams,
|
|
@@ -6657,6 +6715,7 @@ export {
|
|
|
6657
6715
|
SessionListResult,
|
|
6658
6716
|
SessionReleaseParams,
|
|
6659
6717
|
SessionReleaseResult,
|
|
6718
|
+
Sha256Hex,
|
|
6660
6719
|
ShownSection,
|
|
6661
6720
|
Signal,
|
|
6662
6721
|
SpendAccount,
|