@ai-matrx/desktop-protocol 0.21.39 → 0.21.43

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
@@ -876,7 +876,7 @@ module.exports = __toCommonJS(src_exports);
876
876
  var import_zod = require("zod");
877
877
  var import_uuid = require("@ai-matrx/kit/uuid");
878
878
  var PROTOCOL_MAJOR = 1;
879
- var PROTOCOL_MINOR = 47;
879
+ var PROTOCOL_MINOR = 48;
880
880
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
881
881
  var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
882
882
  var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -1768,7 +1768,14 @@ var TextModelInfo = import_zod10.z.strictObject({
1768
1768
  installed: import_zod10.z.boolean()
1769
1769
  });
1770
1770
  var LlmServerState = import_zod10.z.enum(["stopped", "starting", "running", "failed"]);
1771
- var LlmRunning = import_zod10.z.strictObject({ id: TextModelId, port: import_zod10.z.int().min(1024).max(65535) });
1771
+ var LlmRunning = import_zod10.z.strictObject({
1772
+ id: TextModelId,
1773
+ port: import_zod10.z.int().min(1024).max(65535),
1774
+ /** (1.48) What the service actually applied, echoed so the app can attest "read and applied". Optional until the service sends them. */
1775
+ context_length: import_zod10.z.int().min(512).max(131072).optional(),
1776
+ gpu_layers: import_zod10.z.int().min(-1).max(999).optional(),
1777
+ threads: import_zod10.z.int().min(1).max(512).optional()
1778
+ });
1772
1779
  var ModelsLlmStatusParams = import_zod10.z.strictObject({});
1773
1780
  var ModelsLlmStatusResult = import_zod10.z.strictObject({
1774
1781
  state: LlmServerState,
@@ -1786,8 +1793,14 @@ var ModelsLlmInstallParams = import_zod10.z.strictObject({ model: TextModelId })
1786
1793
  var ModelsLlmInstallResult = import_zod10.z.strictObject({ model: TextModelId, elapsed_ms: nonNegInt });
1787
1794
  var ModelsLlmStartParams = import_zod10.z.strictObject({
1788
1795
  model: TextModelId,
1789
- /** Tokens of context; the service picks a size that fits this computer when omitted. */
1790
- context_length: import_zod10.z.int().min(512).max(131072).optional()
1796
+ /** Tokens of context, from the knob desktop.models/context_length. Omitted today means the service's fixed 4096 (optional until callers send it). */
1797
+ context_length: import_zod10.z.int().min(512).max(131072).optional(),
1798
+ /** (1.48) Layers offloaded to the GPU; -1 = all. From the knob desktop.models/gpu_layers. */
1799
+ gpu_layers: import_zod10.z.int().min(-1).max(999).optional(),
1800
+ /** (1.48) CPU threads, computed by the app from the knobs. */
1801
+ threads: import_zod10.z.int().min(1).max(512).optional(),
1802
+ /** (1.48) Seconds to wait for the model to load, computed by the app from the knobs. */
1803
+ load_timeout_s: import_zod10.z.int().min(10).max(3600).optional()
1791
1804
  });
1792
1805
  var ModelsLlmStartResult = import_zod10.z.strictObject({ running: LlmRunning, elapsed_ms: nonNegInt });
1793
1806
  var ModelsLlmStopParams = import_zod10.z.strictObject({});
@@ -6262,6 +6275,8 @@ var NAMED_SCHEMAS = {
6262
6275
 
6263
6276
  // src/versioning.ts
6264
6277
  var FIELDS_SINCE = {
6278
+ LlmRunning: { context_length: "1.48", gpu_layers: "1.48", threads: "1.48" },
6279
+ ModelsLlmStartParams: { gpu_layers: "1.48", threads: "1.48", load_timeout_s: "1.48" },
6265
6280
  FsPatchResult: { edits_applied: "1.1", edits_failed: "1.1" },
6266
6281
  "ProtocolErrorBody.data": { edits_failed: "1.1" },
6267
6282
  "RelayCallResponse|0": { protocol_version: "1.1" },
@@ -6458,7 +6473,7 @@ function forPeer(op, part, value, version) {
6458
6473
  var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
6459
6474
 
6460
6475
  // src/contract.ts
6461
- var CONTRACT_SHA256 = "502c8718b1d2fd0fde43daed047da5a7b158f81ffa3846c7d73cda879777fe37";
6476
+ var CONTRACT_SHA256 = "d3cef917711b4168097ee38e3949a0cfc65b65a8adb532104161e2f55fb30082";
6462
6477
 
6463
6478
  // src/close-policy.ts
6464
6479
  var CLOSE_RULES = {