@ai-matrx/desktop-protocol 0.21.52 → 0.21.55

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/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { O as OpName } from './models--9189VUC.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--9189VUC.cjs';
2
+ import { O as OpName } from './models-qM7u4hzm.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-qM7u4hzm.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. */
@@ -158,10 +158,15 @@ declare const PROTOCOL_MAJOR: 1;
158
158
  * "Continue on <account>" in coding.providers (`usage`, `continueOn` on a provider and on
159
159
  * each of its `accounts`, with the account's own `ready`/`lastProblem`/`problem`/`fix`).
160
160
  * Optional and stripped for an older peer by forPeer.
161
+ * 1.58 — a person's own model downloaded from a link (Matrx 2 › Models › Find models):
162
+ * `models.llm.install` takes the person's Hugging Face token for that one download
163
+ * (`hf_token`, sent only to Hugging Face hosts); a catalog file's `sha256` may be null (its
164
+ * source publishes none) and the first download hashes it (`hashed` in the result). The app
165
+ * and its ml service ship together, so no peer stripping is needed.
161
166
  */
162
- declare const PROTOCOL_MINOR: 57;
167
+ declare const PROTOCOL_MINOR: 58;
163
168
  /** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
164
- declare const PROTOCOL_VERSION: "1.57";
169
+ declare const PROTOCOL_VERSION: "1.58";
165
170
  /** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
166
171
  declare const u32: z.ZodInt;
167
172
  declare const nonNegInt: z.ZodInt;
@@ -11288,7 +11293,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
11288
11293
  declare const VERSIONED_RESULT_OPS: readonly OpName[];
11289
11294
 
11290
11295
  /** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
11291
- declare const CONTRACT_SHA256: "ee1d6d3d83bb18a2ed020dbaf3c611b982699f9a9db8d728c38f2c6b8fbf0815";
11296
+ declare const CONTRACT_SHA256: "7ae1c4d73fc6e9e7bc5b579551dde61d0aa8a786b30247b852beb7c1065e828d";
11292
11297
 
11293
11298
  /**
11294
11299
  * 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--9189VUC.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--9189VUC.js';
2
+ import { O as OpName } from './models-qM7u4hzm.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-qM7u4hzm.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. */
@@ -158,10 +158,15 @@ declare const PROTOCOL_MAJOR: 1;
158
158
  * "Continue on <account>" in coding.providers (`usage`, `continueOn` on a provider and on
159
159
  * each of its `accounts`, with the account's own `ready`/`lastProblem`/`problem`/`fix`).
160
160
  * Optional and stripped for an older peer by forPeer.
161
+ * 1.58 — a person's own model downloaded from a link (Matrx 2 › Models › Find models):
162
+ * `models.llm.install` takes the person's Hugging Face token for that one download
163
+ * (`hf_token`, sent only to Hugging Face hosts); a catalog file's `sha256` may be null (its
164
+ * source publishes none) and the first download hashes it (`hashed` in the result). The app
165
+ * and its ml service ship together, so no peer stripping is needed.
161
166
  */
162
- declare const PROTOCOL_MINOR: 57;
167
+ declare const PROTOCOL_MINOR: 58;
163
168
  /** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
164
- declare const PROTOCOL_VERSION: "1.57";
169
+ declare const PROTOCOL_VERSION: "1.58";
165
170
  /** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
166
171
  declare const u32: z.ZodInt;
167
172
  declare const nonNegInt: z.ZodInt;
@@ -11288,7 +11293,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
11288
11293
  declare const VERSIONED_RESULT_OPS: readonly OpName[];
11289
11294
 
11290
11295
  /** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
11291
- declare const CONTRACT_SHA256: "ee1d6d3d83bb18a2ed020dbaf3c611b982699f9a9db8d728c38f2c6b8fbf0815";
11296
+ declare const CONTRACT_SHA256: "7ae1c4d73fc6e9e7bc5b579551dde61d0aa8a786b30247b852beb7c1065e828d";
11292
11297
 
11293
11298
  /**
11294
11299
  * 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 = 57;
5
+ var PROTOCOL_MINOR = 58;
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_-]+$/);
@@ -905,8 +905,17 @@ var ModelsLlmStatusResult = z10.strictObject({
905
905
  /** Why the last start or download failed, one human line; null otherwise. */
906
906
  error: z10.string().max(300).nullable()
907
907
  });
908
- var ModelsLlmInstallParams = z10.strictObject({ model: TextModelId });
909
- var ModelsLlmInstallResult = z10.strictObject({ model: TextModelId, elapsed_ms: nonNegInt });
908
+ var ModelsLlmInstallParams = z10.strictObject({
909
+ model: TextModelId,
910
+ /** (1.58) The person's own Hugging Face token for this download (gated/private files): sent only to Hugging Face hosts, never stored or logged. */
911
+ hf_token: z10.string().min(8).max(512).optional()
912
+ });
913
+ var ModelsLlmInstallResult = z10.strictObject({
914
+ model: TextModelId,
915
+ elapsed_ms: nonNegInt,
916
+ /** (1.58) path -> SHA-256 of every file whose catalog sha256 was null, hashed on this first download. */
917
+ hashed: z10.record(z10.string().max(512), z10.string().regex(/^[0-9a-f]{64}$/)).optional()
918
+ });
910
919
  var ModelsLlmStartParams = z10.strictObject({
911
920
  model: TextModelId,
912
921
  /** Tokens of context, from the knob desktop.models/context_length. Omitted today means the service's fixed 4096 (optional until callers send it). */
@@ -928,7 +937,11 @@ var CatalogFile = z10.strictObject({
928
937
  /** The pinned https URL it is downloaded from. */
929
938
  url: z10.string().url().max(2048),
930
939
  size_bytes: nonNegInt,
931
- sha256: Sha256Hex,
940
+ /**
941
+ * The file's SHA-256; (1.58) null when its source publishes none (a small non-LFS file on Hugging
942
+ * Face): the first download hashes it and reports it in `models.llm.install`'s `hashed`.
943
+ */
944
+ sha256: Sha256Hex.nullable(),
932
945
  /** weights, weights_shard, mmproj, config, tokenizer, … (ai.model_artifact.role). */
933
946
  role: z10.string().max(32)
934
947
  });
@@ -5881,7 +5894,7 @@ function forPeer(op, part, value, version) {
5881
5894
  var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
5882
5895
 
5883
5896
  // src/contract.ts
5884
- var CONTRACT_SHA256 = "ee1d6d3d83bb18a2ed020dbaf3c611b982699f9a9db8d728c38f2c6b8fbf0815";
5897
+ var CONTRACT_SHA256 = "7ae1c4d73fc6e9e7bc5b579551dde61d0aa8a786b30247b852beb7c1065e828d";
5885
5898
 
5886
5899
  // src/close-policy.ts
5887
5900
  var CLOSE_RULES = {