@ai-matrx/desktop-protocol 0.21.43 → 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/dist/index.cjs CHANGED
@@ -194,6 +194,8 @@ __export(src_exports, {
194
194
  CalendarListParams: () => CalendarListParams,
195
195
  CalendarListResult: () => CalendarListResult,
196
196
  CancelMsg: () => CancelMsg,
197
+ CatalogFile: () => CatalogFile,
198
+ CatalogModelEntry: () => CatalogModelEntry,
197
199
  ChatAppProject: () => ChatAppProject,
198
200
  ChatFamily: () => ChatFamily,
199
201
  ChatHidden: () => ChatHidden,
@@ -479,6 +481,7 @@ __export(src_exports, {
479
481
  LEGACY_ACTIONS: () => LEGACY_ACTIONS,
480
482
  LEGACY_DISPATCHERS: () => LEGACY_DISPATCHERS,
481
483
  Limits: () => Limits,
484
+ LlamaServerBuild: () => LlamaServerBuild,
482
485
  LlmRunning: () => LlmRunning,
483
486
  LlmServerState: () => LlmServerState,
484
487
  LocationGetParams: () => LocationGetParams,
@@ -500,6 +503,8 @@ __export(src_exports, {
500
503
  MessagesMessage: () => MessagesMessage,
501
504
  MessagesSendParams: () => MessagesSendParams,
502
505
  MessagesSendResult: () => MessagesSendResult,
506
+ MlCatalogSetParams: () => MlCatalogSetParams,
507
+ MlCatalogSetResult: () => MlCatalogSetResult,
503
508
  MlInstallPhase: () => MlInstallPhase,
504
509
  MlInstallProgress: () => MlInstallProgress,
505
510
  MlProgress: () => MlProgress,
@@ -508,6 +513,7 @@ __export(src_exports, {
508
513
  MlServiceStatus: () => MlServiceStatus,
509
514
  MlStatusParams: () => MlStatusParams,
510
515
  MlStatusResult: () => MlStatusResult,
516
+ ModelKey: () => ModelKey,
511
517
  ModelsDownloadsCancelParams: () => ModelsDownloadsCancelParams,
512
518
  ModelsDownloadsCancelResult: () => ModelsDownloadsCancelResult,
513
519
  ModelsDownloadsListParams: () => ModelsDownloadsListParams,
@@ -697,6 +703,7 @@ __export(src_exports, {
697
703
  SessionListResult: () => SessionListResult,
698
704
  SessionReleaseParams: () => SessionReleaseParams,
699
705
  SessionReleaseResult: () => SessionReleaseResult,
706
+ Sha256Hex: () => Sha256Hex,
700
707
  ShownSection: () => ShownSection,
701
708
  Signal: () => Signal,
702
709
  SpendAccount: () => SpendAccount,
@@ -876,7 +883,7 @@ module.exports = __toCommonJS(src_exports);
876
883
  var import_zod = require("zod");
877
884
  var import_uuid = require("@ai-matrx/kit/uuid");
878
885
  var PROTOCOL_MAJOR = 1;
879
- var PROTOCOL_MINOR = 48;
886
+ var PROTOCOL_MINOR = 49;
880
887
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
881
888
  var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
882
889
  var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -1689,7 +1696,8 @@ var RelayStatusResponse = RelayDeviceStatusEvent;
1689
1696
 
1690
1697
  // src/schema/models.ts
1691
1698
  var import_zod10 = require("zod");
1692
- var TranscriptionModelId = import_zod10.z.enum(["tiny", "base", "small", "large-v3-turbo"]);
1699
+ var ModelKey = import_zod10.z.string().min(1).max(128).regex(/^[a-z0-9][a-z0-9._-]*(\/[a-z0-9][a-z0-9._-]*)?$/);
1700
+ var TranscriptionModelId = ModelKey;
1693
1701
  var MlRuntimeState = import_zod10.z.enum(["not_installed", "installing", "installed", "failed"]);
1694
1702
  var MlInstallPhase = import_zod10.z.enum(["packages", "model", "verifying"]);
1695
1703
  var MlInstallProgress = import_zod10.z.strictObject({
@@ -1749,18 +1757,7 @@ var MlProgress = import_zod10.z.strictObject({
1749
1757
  /** The segment just transcribed (transcribe only): text appears as it is recognised. */
1750
1758
  segment: TranscriptSegment.nullable()
1751
1759
  });
1752
- var TextModelId = import_zod10.z.enum([
1753
- "smollm2-135m",
1754
- "llama-3.2-3b",
1755
- "phi-4-mini",
1756
- "gemma-3-4b",
1757
- "llama-3.1-8b",
1758
- "qwen-2.5-7b",
1759
- "mistral-small-3.1",
1760
- "gpt-oss-20b",
1761
- "qwen-2.5-coder-7b",
1762
- "qwen-2.5-coder-14b"
1763
- ]);
1760
+ var TextModelId = ModelKey;
1764
1761
  var TextModelInfo = import_zod10.z.strictObject({
1765
1762
  id: TextModelId,
1766
1763
  /** Download size of the weights. */
@@ -1805,6 +1802,45 @@ var ModelsLlmStartParams = import_zod10.z.strictObject({
1805
1802
  var ModelsLlmStartResult = import_zod10.z.strictObject({ running: LlmRunning, elapsed_ms: nonNegInt });
1806
1803
  var ModelsLlmStopParams = import_zod10.z.strictObject({});
1807
1804
  var ModelsLlmStopResult = import_zod10.z.strictObject({ stopped: import_zod10.z.boolean() });
1805
+ var Sha256Hex = import_zod10.z.string().regex(/^[0-9a-f]{64}$/);
1806
+ var CatalogFile = import_zod10.z.strictObject({
1807
+ /** Path inside the model's folder (the artifact's path_in_repo). */
1808
+ path: import_zod10.z.string().min(1).max(512),
1809
+ /** The pinned https URL it is downloaded from. */
1810
+ url: import_zod10.z.string().url().max(2048),
1811
+ size_bytes: nonNegInt,
1812
+ sha256: Sha256Hex,
1813
+ /** weights, weights_shard, mmproj, config, tokenizer, … (ai.model_artifact.role). */
1814
+ role: import_zod10.z.string().max(32)
1815
+ });
1816
+ var CatalogModelEntry = import_zod10.z.strictObject({
1817
+ /** The key callers name this model by (the 1.48 id for a seeded model). */
1818
+ key: ModelKey,
1819
+ /** The selected variant's key (`q4_k_m`, `ct2`). */
1820
+ variant: import_zod10.z.string().min(1).max(64),
1821
+ /** The upstream revision (or the variant id when there is none): a change re-downloads. */
1822
+ revision: import_zod10.z.string().min(1).max(64),
1823
+ multilingual: import_zod10.z.boolean(),
1824
+ /** Exactly the files this computer fetches for this model: never more, never fewer. */
1825
+ files: import_zod10.z.array(CatalogFile).min(1).max(256)
1826
+ });
1827
+ var LlamaServerBuild = import_zod10.z.strictObject({
1828
+ version: import_zod10.z.string().min(1).max(32),
1829
+ url: import_zod10.z.string().url().max(2048),
1830
+ size_bytes: nonNegInt,
1831
+ sha256: Sha256Hex
1832
+ });
1833
+ var MlCatalogSetParams = import_zod10.z.strictObject({
1834
+ text: import_zod10.z.array(CatalogModelEntry).max(512),
1835
+ transcription: import_zod10.z.array(CatalogModelEntry).max(64),
1836
+ /** Null where the catalog has no build for this os/arch (installs then say so). */
1837
+ llama_server: LlamaServerBuild.nullable(),
1838
+ /** The knob desktop.models/default_transcription_model. */
1839
+ default_transcription: TranscriptionModelId,
1840
+ /** When the catalog was last changed (catalog_updated_at), for the service's log. */
1841
+ catalog_updated_at: import_zod10.z.string().max(40)
1842
+ });
1843
+ var MlCatalogSetResult = import_zod10.z.strictObject({ text: nonNegInt, transcription: nonNegInt });
1808
1844
  var DownloadKind = import_zod10.z.enum(["speech_model", "text_model", "runtime"]);
1809
1845
  var DownloadRow = import_zod10.z.strictObject({
1810
1846
  /** The job's key in the service: "model:base", "llm:smollm2-135m", "llm-server", "runtime". */
@@ -5476,7 +5512,8 @@ var SERVICES = {
5476
5512
  "ml.llm_start": { params: ModelsLlmStartParams, result: ModelsLlmStartResult },
5477
5513
  "ml.llm_stop": { params: ModelsLlmStopParams, result: ModelsLlmStopResult },
5478
5514
  "ml.downloads": { params: ModelsDownloadsListParams, result: ModelsDownloadsListResult },
5479
- "ml.download_cancel": { params: ModelsDownloadsCancelParams, result: ModelsDownloadsCancelResult }
5515
+ "ml.download_cancel": { params: ModelsDownloadsCancelParams, result: ModelsDownloadsCancelResult },
5516
+ "ml.catalog_set": { params: MlCatalogSetParams, result: MlCatalogSetResult }
5480
5517
  }
5481
5518
  },
5482
5519
  coding: {
@@ -5628,6 +5665,13 @@ var NAMED_SCHEMAS = {
5628
5665
  ModelsProgressEvent,
5629
5666
  TextModelId,
5630
5667
  TextModelInfo,
5668
+ ModelKey,
5669
+ Sha256Hex,
5670
+ CatalogFile,
5671
+ CatalogModelEntry,
5672
+ LlamaServerBuild,
5673
+ MlCatalogSetParams,
5674
+ MlCatalogSetResult,
5631
5675
  LlmServerState,
5632
5676
  LlmRunning,
5633
5677
  ModelsLlmStatusParams,
@@ -6473,7 +6517,7 @@ function forPeer(op, part, value, version) {
6473
6517
  var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
6474
6518
 
6475
6519
  // src/contract.ts
6476
- var CONTRACT_SHA256 = "d3cef917711b4168097ee38e3949a0cfc65b65a8adb532104161e2f55fb30082";
6520
+ var CONTRACT_SHA256 = "783487638685c921a761d27c5c6dca3103d1d6d5ae0ec38ffd59086b68a2207a";
6477
6521
 
6478
6522
  // src/close-policy.ts
6479
6523
  var CLOSE_RULES = {