@ai-matrx/desktop-protocol 0.21.74 → 0.21.76

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/client.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { BackoffOptions } from '@ai-matrx/data/realtime';
2
2
  export { RECONNECT_ALARM_ATTEMPTS } from '@ai-matrx/data/realtime';
3
3
  import { z } from 'zod';
4
- import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-BRm_O6a-.cjs';
5
- export { i as isDesktopProtocolError } from './models-BRm_O6a-.cjs';
4
+ import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-Bz88NHi0.cjs';
5
+ export { i as isDesktopProtocolError } from './models-Bz88NHi0.cjs';
6
6
  import { FrameHeader } from './frame.cjs';
7
7
 
8
8
  /** The subset of the WHATWG WebSocket the client uses — browser, React Native, `ws` and Workers all fit. */
package/dist/client.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { BackoffOptions } from '@ai-matrx/data/realtime';
2
2
  export { RECONNECT_ALARM_ATTEMPTS } from '@ai-matrx/data/realtime';
3
3
  import { z } from 'zod';
4
- import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-BRm_O6a-.js';
5
- export { i as isDesktopProtocolError } from './models-BRm_O6a-.js';
4
+ import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-Bz88NHi0.js';
5
+ export { i as isDesktopProtocolError } from './models-Bz88NHi0.js';
6
6
  import { FrameHeader } from './frame.js';
7
7
 
8
8
  /** The subset of the WHATWG WebSocket the client uses — browser, React Native, `ws` and Workers all fit. */
package/dist/client.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  Welcome,
13
13
  closeRule,
14
14
  knows
15
- } from "./chunk-server-3L5JNEHY.js";
15
+ } from "./chunk-server-HOQE4M4I.js";
16
16
  import {
17
17
  DesktopProtocolError,
18
18
  FRAME_VERSION,
package/dist/index.cjs CHANGED
@@ -525,6 +525,8 @@ __export(src_exports, {
525
525
  LlamaServerBuild: () => LlamaServerBuild,
526
526
  LlmRunning: () => LlmRunning,
527
527
  LlmServerState: () => LlmServerState,
528
+ LocalModelKind: () => LocalModelKind,
529
+ LocalModelRow: () => LocalModelRow,
528
530
  LocationGetParams: () => LocationGetParams,
529
531
  LocationGetResult: () => LocationGetResult,
530
532
  MATRX_EXTENSION_IDS: () => MATRX_EXTENSION_IDS,
@@ -571,6 +573,10 @@ __export(src_exports, {
571
573
  ModelsLlmStatusResult: () => ModelsLlmStatusResult,
572
574
  ModelsLlmStopParams: () => ModelsLlmStopParams,
573
575
  ModelsLlmStopResult: () => ModelsLlmStopResult,
576
+ ModelsLocalListParams: () => ModelsLocalListParams,
577
+ ModelsLocalListResult: () => ModelsLocalListResult,
578
+ ModelsLocalRemoveParams: () => ModelsLocalRemoveParams,
579
+ ModelsLocalRemoveResult: () => ModelsLocalRemoveResult,
574
580
  ModelsProgressEvent: () => ModelsProgressEvent,
575
581
  ModelsStatusParams: () => ModelsStatusParams,
576
582
  ModelsStatusResult: () => ModelsStatusResult,
@@ -935,7 +941,7 @@ module.exports = __toCommonJS(src_exports);
935
941
  var import_zod = require("zod");
936
942
  var import_uuid = require("@ai-matrx/kit/uuid");
937
943
  var PROTOCOL_MAJOR = 1;
938
- var PROTOCOL_MINOR = 73;
944
+ var PROTOCOL_MINOR = 75;
939
945
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
940
946
  var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
941
947
  var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -1781,7 +1787,8 @@ var MlStatusResult = import_zod10.z.strictObject({
1781
1787
  error: import_zod10.z.string().max(300).nullable(),
1782
1788
  /** Where inference runs once the runtime is installed: `cuda` only when a usable GPU is present. */
1783
1789
  accelerator: import_zod10.z.enum(["cpu", "cuda"]),
1784
- models: import_zod10.z.array(TranscriptionModelInfo).max(16),
1790
+ /** Every transcription model in the catalog (1.74: unbounded; a bound here silently dropped models past 16). */
1791
+ models: import_zod10.z.array(TranscriptionModelInfo),
1785
1792
  default_model: TranscriptionModelId
1786
1793
  });
1787
1794
  var ModelsInstallParams = import_zod10.z.strictObject({ model: TranscriptionModelId.optional() });
@@ -1844,9 +1851,10 @@ var ModelsLlmStatusResult = import_zod10.z.strictObject({
1844
1851
  state: LlmServerState,
1845
1852
  /**
1846
1853
  * Every language model: (1.69) the ones on this computer first (installed, then those that cannot run
1847
- * here, each with its `problem`), then the rest of the catalog. Bounded at 1024 (64 until 1.69).
1854
+ * here, each with its `problem`), then the rest of the catalog. Every one: unbounded since 1.74
1855
+ * (64 until 1.69, 1024 until 1.74; a bound silently cut off models).
1848
1856
  */
1849
- models: import_zod10.z.array(TextModelInfo).max(1024),
1857
+ models: import_zod10.z.array(TextModelInfo),
1850
1858
  running: LlmRunning.nullable(),
1851
1859
  /** The model being loaded while `state` is "starting". */
1852
1860
  starting: TextModelId.nullable(),
@@ -1913,8 +1921,9 @@ var LlamaServerBuild = import_zod10.z.strictObject({
1913
1921
  sha256: Sha256Hex
1914
1922
  });
1915
1923
  var MlCatalogSetParams = import_zod10.z.strictObject({
1916
- text: import_zod10.z.array(CatalogModelEntry).max(512),
1917
- transcription: import_zod10.z.array(CatalogModelEntry).max(64),
1924
+ /** (1.74) Unbounded, like every models list: a catalog or a person's own models are never cut off. */
1925
+ text: import_zod10.z.array(CatalogModelEntry),
1926
+ transcription: import_zod10.z.array(CatalogModelEntry),
1918
1927
  /** Null where the catalog has no build for this os/arch (installs then say so). */
1919
1928
  llama_server: LlamaServerBuild.nullable(),
1920
1929
  /** The knob desktop.models/default_transcription_model; null when the knob could not be read (a transcribe naming no model then says so). */
@@ -1922,7 +1931,7 @@ var MlCatalogSetParams = import_zod10.z.strictObject({
1922
1931
  /** When the catalog was last changed (catalog_updated_at), for the service's log. */
1923
1932
  catalog_updated_at: import_zod10.z.string().max(40),
1924
1933
  /** (1.69) Language models on this computer that cannot run here, each with its one-line reason: models.llm.status lists them. */
1925
- unusable: import_zod10.z.array(UnusableTextModel).max(512).optional()
1934
+ unusable: import_zod10.z.array(UnusableTextModel).optional()
1926
1935
  });
1927
1936
  var MlCatalogSetResult = import_zod10.z.strictObject({ text: nonNegInt, transcription: nonNegInt });
1928
1937
  var DownloadKind = import_zod10.z.enum(["speech_model", "text_model", "runtime"]);
@@ -1947,9 +1956,39 @@ var DownloadRow = import_zod10.z.strictObject({
1947
1956
  error: import_zod10.z.string().max(300).optional()
1948
1957
  });
1949
1958
  var ModelsDownloadsListParams = import_zod10.z.strictObject({});
1950
- var ModelsDownloadsListResult = import_zod10.z.strictObject({ downloads: import_zod10.z.array(DownloadRow).max(64) });
1959
+ var ModelsDownloadsListResult = import_zod10.z.strictObject({ downloads: import_zod10.z.array(DownloadRow) });
1951
1960
  var ModelsDownloadsCancelParams = import_zod10.z.strictObject({ key: import_zod10.z.string().max(64) });
1952
1961
  var ModelsDownloadsCancelResult = import_zod10.z.strictObject({ cancelled: import_zod10.z.boolean() });
1962
+ var LocalModelKind = import_zod10.z.enum(["text", "speech"]);
1963
+ var LocalModelRow = import_zod10.z.strictObject({
1964
+ kind: LocalModelKind,
1965
+ model: ModelKey,
1966
+ /** Its folder in the service's store. */
1967
+ path: import_zod10.z.string().max(1024),
1968
+ /** Every file of the model, as installed. */
1969
+ size_bytes: nonNegInt,
1970
+ /** What Remove frees: the files only Matrx 2 holds. A file linked from the person's own folder frees nothing. */
1971
+ freed_bytes: nonNegInt,
1972
+ /** True when any file is a link to a file elsewhere (used in place): Remove then never deletes that file. */
1973
+ in_place: import_zod10.z.boolean(),
1974
+ /** The folder the person's files stay in (in place), when the service can tell; null otherwise. */
1975
+ source: import_zod10.z.string().max(1024).nullable(),
1976
+ /** The language model the server runs now (Remove stops it first). */
1977
+ running: import_zod10.z.boolean()
1978
+ });
1979
+ var ModelsLocalListParams = import_zod10.z.strictObject({});
1980
+ var ModelsLocalListResult = import_zod10.z.strictObject({ models: import_zod10.z.array(LocalModelRow) });
1981
+ var ModelsLocalRemoveParams = import_zod10.z.strictObject({ kind: LocalModelKind, model: ModelKey });
1982
+ var ModelsLocalRemoveResult = import_zod10.z.strictObject({
1983
+ kind: LocalModelKind,
1984
+ model: ModelKey,
1985
+ /** Bytes of disk the removal gave back (0 for a model used in place). */
1986
+ freed_bytes: nonNegInt,
1987
+ /** True when it was the running model and the server was stopped first. */
1988
+ stopped: import_zod10.z.boolean(),
1989
+ /** Where the person's files stay (a model used in place); null when nothing was kept. */
1990
+ kept: import_zod10.z.string().max(1024).nullable()
1991
+ });
1953
1992
  var MlServiceState = import_zod10.z.enum(["starting", "ready", "restarting", "failed", "stopped"]);
1954
1993
  var MlServiceStatus = import_zod10.z.strictObject({
1955
1994
  state: MlServiceState,
@@ -5768,6 +5807,8 @@ var OPS = {
5768
5807
  "models.llm.stop": { params: ModelsLlmStopParams, result: ModelsLlmStopResult, kind: "unary", since: "1.31", errors: ["INTERNAL"] },
5769
5808
  "models.downloads.list": { params: ModelsDownloadsListParams, result: ModelsDownloadsListResult, kind: "unary", since: "1.45", errors: ["INTERNAL"] },
5770
5809
  "models.downloads.cancel": { params: ModelsDownloadsCancelParams, result: ModelsDownloadsCancelResult, kind: "unary", since: "1.45", errors: ["NOT_FOUND", "INTERNAL"] },
5810
+ "models.local.list": { params: ModelsLocalListParams, result: ModelsLocalListResult, kind: "unary", since: "1.74", errors: ["INTERNAL"] },
5811
+ "models.local.remove": { params: ModelsLocalRemoveParams, result: ModelsLocalRemoveResult, kind: "unary", since: "1.74", errors: ["NOT_FOUND", "INVALID_PARAMS", "RESOURCE_BUSY", "INTERNAL"] },
5771
5812
  // Desktop apps and their profiles (SPEC §6 apps); profiles are rows in users.desktop_app_profile.
5772
5813
  "apps.list": { params: AppsListParams, result: AppsListResult, kind: "unary", since: "1.2", errors: ["INTERNAL"] },
5773
5814
  "apps.profiles.list": { params: AppsProfilesListParams, result: AppsProfilesListResult, kind: "unary", since: "1.2", errors: ["NOT_FOUND", "INVALID_PARAMS", "INTERNAL"] },
@@ -6048,6 +6089,8 @@ var SERVICES = {
6048
6089
  "ml.llm_stop": { params: ModelsLlmStopParams, result: ModelsLlmStopResult },
6049
6090
  "ml.downloads": { params: ModelsDownloadsListParams, result: ModelsDownloadsListResult },
6050
6091
  "ml.download_cancel": { params: ModelsDownloadsCancelParams, result: ModelsDownloadsCancelResult },
6092
+ "ml.local_list": { params: ModelsLocalListParams, result: ModelsLocalListResult },
6093
+ "ml.local_remove": { params: ModelsLocalRemoveParams, result: ModelsLocalRemoveResult },
6051
6094
  "ml.catalog_set": { params: MlCatalogSetParams, result: MlCatalogSetResult }
6052
6095
  }
6053
6096
  },
@@ -6246,6 +6289,12 @@ var NAMED_SCHEMAS = {
6246
6289
  ModelsDownloadsListResult,
6247
6290
  ModelsDownloadsCancelParams,
6248
6291
  ModelsDownloadsCancelResult,
6292
+ LocalModelKind,
6293
+ LocalModelRow,
6294
+ ModelsLocalListParams,
6295
+ ModelsLocalListResult,
6296
+ ModelsLocalRemoveParams,
6297
+ ModelsLocalRemoveResult,
6249
6298
  CodingServiceCredentials,
6250
6299
  CodingHistoryBlocked,
6251
6300
  CodingHistoryFailure,
@@ -7226,7 +7275,7 @@ function forPeer(op, part, value, version) {
7226
7275
  var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
7227
7276
 
7228
7277
  // src/contract.ts
7229
- var CONTRACT_SHA256 = "04ac1530a836288982a2d3bf35d5b7c6b0413cdf51fa1fb5bfd4de7cbe32adf8";
7278
+ var CONTRACT_SHA256 = "2896ee158ca6330cf3cbca88431d15776fb40f53deb0b132bea12ad8d7986757";
7230
7279
 
7231
7280
  // src/close-policy.ts
7232
7281
  var CLOSE_RULES = {