@ai-matrx/desktop-protocol 0.21.42 → 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/CHANGELOG.md +16 -2
- package/dist/client.cjs +17 -4
- 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 +17 -4
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +20 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -5
- package/dist/index.d.ts +15 -5
- package/dist/index.js +20 -5
- package/dist/index.js.map +1 -1
- package/dist/{models-Ut2nuRzV.d.cts → models-HrUx_KP2.d.cts} +42 -0
- package/dist/{models-Ut2nuRzV.d.ts → models-HrUx_KP2.d.ts} +42 -0
- package/dist/react.d.cts +9 -0
- package/dist/react.d.ts +9 -0
- package/generated/desktop-protocol.schema.json +41 -1
- 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, k as CloseAction, l as CloseCode, m as CloseCodeValue, C as CloseOutcome, n as CloseRule, o as CoreToClientMsg, p as CreditMsg, D as DesktopProtocolError, q as DownloadKind, r as DownloadRow, d as EVENTS, s as EndMsg, E as EndReason, t as ErrorCode, u as ErrorCodeName, v as ErrorData, w as ErrorMsg, x as ErrorReason, y as ErrorReasonName, z as EventMsg, A as EventName, F as FsPatchEditFailure, H as HelloMsg, L as Limits, G as LlmRunning, I as LlmServerState, J as MlInstallPhase, K as MlInstallProgress, f as MlProgress, N as MlRuntimeState, P as MlServiceState, Q as MlServiceStatus, R as MlStatusParams, U as MlStatusResult, V as ModelsDownloadsCancelParams, X as ModelsDownloadsCancelResult, Y as ModelsDownloadsListParams, Z as ModelsDownloadsListResult, _ as ModelsInstallParams, $ as ModelsInstallResult, a0 as ModelsLlmInstallParams, a1 as ModelsLlmInstallResult, a2 as ModelsLlmStartParams, a3 as ModelsLlmStartResult, a4 as ModelsLlmStatusParams, a5 as ModelsLlmStatusResult, a6 as ModelsLlmStopParams, a7 as ModelsLlmStopResult, a8 as ModelsProgressEvent, a9 as ModelsStatusParams, aa as ModelsStatusResult, ab as ModelsTranscribeParams, M as ModelsTranscribeResult, ac as NAMED_SCHEMAS, ad as NamedSchemaId, c as OPS, ae as OpDescriptor, a as OpParams, b as OpResult, af as OpSpec, ag as PING_TEXT, ah as PONG_TEXT, ai as ProtocolErrorBody, aj as RelayMsg, ak as RequestMsg, al as ResponseMsg, am as SERVICES, an as SUBPROTOCOL, ao as ServiceId, ap as ServiceOpName, aq as ServiceOpSpec, ar as ServiceSpec, S as StreamMeta, as as StreamMsg, at as TextModelId, au as TextModelInfo, av as TranscriptSegment, T as TranscriptionModelId, aw as TranscriptionModelInfo, W as Welcome, ax as closeRule, i as isDesktopProtocolError, ay as isTerminalClose } from './models-
|
|
2
|
+
import { O as OpName } from './models-HrUx_KP2.cjs';
|
|
3
|
+
export { B as BEARER_PREFIX, g as CLOSE_RULES, h as CancelMsg, j as ClientToCoreMsg, e as ClientType, k as CloseAction, l as CloseCode, m as CloseCodeValue, C as CloseOutcome, n as CloseRule, o as CoreToClientMsg, p as CreditMsg, D as DesktopProtocolError, q as DownloadKind, r as DownloadRow, d as EVENTS, s as EndMsg, E as EndReason, t as ErrorCode, u as ErrorCodeName, v as ErrorData, w as ErrorMsg, x as ErrorReason, y as ErrorReasonName, z as EventMsg, A as EventName, F as FsPatchEditFailure, H as HelloMsg, L as Limits, G as LlmRunning, I as LlmServerState, J as MlInstallPhase, K as MlInstallProgress, f as MlProgress, N as MlRuntimeState, P as MlServiceState, Q as MlServiceStatus, R as MlStatusParams, U as MlStatusResult, V as ModelsDownloadsCancelParams, X as ModelsDownloadsCancelResult, Y as ModelsDownloadsListParams, Z as ModelsDownloadsListResult, _ as ModelsInstallParams, $ as ModelsInstallResult, a0 as ModelsLlmInstallParams, a1 as ModelsLlmInstallResult, a2 as ModelsLlmStartParams, a3 as ModelsLlmStartResult, a4 as ModelsLlmStatusParams, a5 as ModelsLlmStatusResult, a6 as ModelsLlmStopParams, a7 as ModelsLlmStopResult, a8 as ModelsProgressEvent, a9 as ModelsStatusParams, aa as ModelsStatusResult, ab as ModelsTranscribeParams, M as ModelsTranscribeResult, ac as NAMED_SCHEMAS, ad as NamedSchemaId, c as OPS, ae as OpDescriptor, a as OpParams, b as OpResult, af as OpSpec, ag as PING_TEXT, ah as PONG_TEXT, ai as ProtocolErrorBody, aj as RelayMsg, ak as RequestMsg, al as ResponseMsg, am as SERVICES, an as SUBPROTOCOL, ao as ServiceId, ap as ServiceOpName, aq as ServiceOpSpec, ar as ServiceSpec, S as StreamMeta, as as StreamMsg, at as TextModelId, au as TextModelInfo, av as TranscriptSegment, T as TranscriptionModelId, aw as TranscriptionModelInfo, W as Welcome, ax as closeRule, i as isDesktopProtocolError, ay as isTerminalClose } from './models-HrUx_KP2.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. */
|
|
@@ -124,9 +124,9 @@ declare const PROTOCOL_MAJOR: 1;
|
|
|
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
126
|
*/
|
|
127
|
-
declare const PROTOCOL_MINOR:
|
|
127
|
+
declare const PROTOCOL_MINOR: 48;
|
|
128
128
|
/** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
|
|
129
|
-
declare const PROTOCOL_VERSION: "1.
|
|
129
|
+
declare const PROTOCOL_VERSION: "1.48";
|
|
130
130
|
/** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
|
|
131
131
|
declare const u32: z.ZodInt;
|
|
132
132
|
declare const nonNegInt: z.ZodInt;
|
|
@@ -10314,6 +10314,16 @@ type EntitiesPiiResult = z.output<typeof EntitiesPiiResult>;
|
|
|
10314
10314
|
* inside one (`ProtocolErrorBody.data`), or a union branch (`RelayCallResponse|0`).
|
|
10315
10315
|
*/
|
|
10316
10316
|
declare const FIELDS_SINCE: {
|
|
10317
|
+
readonly LlmRunning: {
|
|
10318
|
+
readonly context_length: "1.48";
|
|
10319
|
+
readonly gpu_layers: "1.48";
|
|
10320
|
+
readonly threads: "1.48";
|
|
10321
|
+
};
|
|
10322
|
+
readonly ModelsLlmStartParams: {
|
|
10323
|
+
readonly gpu_layers: "1.48";
|
|
10324
|
+
readonly threads: "1.48";
|
|
10325
|
+
readonly load_timeout_s: "1.48";
|
|
10326
|
+
};
|
|
10317
10327
|
readonly FsPatchResult: {
|
|
10318
10328
|
readonly edits_applied: "1.1";
|
|
10319
10329
|
readonly edits_failed: "1.1";
|
|
@@ -10506,7 +10516,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
|
|
|
10506
10516
|
declare const VERSIONED_RESULT_OPS: readonly OpName[];
|
|
10507
10517
|
|
|
10508
10518
|
/** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
|
|
10509
|
-
declare const CONTRACT_SHA256: "
|
|
10519
|
+
declare const CONTRACT_SHA256: "d3cef917711b4168097ee38e3949a0cfc65b65a8adb532104161e2f55fb30082";
|
|
10510
10520
|
|
|
10511
10521
|
/**
|
|
10512
10522
|
* 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, k as CloseAction, l as CloseCode, m as CloseCodeValue, C as CloseOutcome, n as CloseRule, o as CoreToClientMsg, p as CreditMsg, D as DesktopProtocolError, q as DownloadKind, r as DownloadRow, d as EVENTS, s as EndMsg, E as EndReason, t as ErrorCode, u as ErrorCodeName, v as ErrorData, w as ErrorMsg, x as ErrorReason, y as ErrorReasonName, z as EventMsg, A as EventName, F as FsPatchEditFailure, H as HelloMsg, L as Limits, G as LlmRunning, I as LlmServerState, J as MlInstallPhase, K as MlInstallProgress, f as MlProgress, N as MlRuntimeState, P as MlServiceState, Q as MlServiceStatus, R as MlStatusParams, U as MlStatusResult, V as ModelsDownloadsCancelParams, X as ModelsDownloadsCancelResult, Y as ModelsDownloadsListParams, Z as ModelsDownloadsListResult, _ as ModelsInstallParams, $ as ModelsInstallResult, a0 as ModelsLlmInstallParams, a1 as ModelsLlmInstallResult, a2 as ModelsLlmStartParams, a3 as ModelsLlmStartResult, a4 as ModelsLlmStatusParams, a5 as ModelsLlmStatusResult, a6 as ModelsLlmStopParams, a7 as ModelsLlmStopResult, a8 as ModelsProgressEvent, a9 as ModelsStatusParams, aa as ModelsStatusResult, ab as ModelsTranscribeParams, M as ModelsTranscribeResult, ac as NAMED_SCHEMAS, ad as NamedSchemaId, c as OPS, ae as OpDescriptor, a as OpParams, b as OpResult, af as OpSpec, ag as PING_TEXT, ah as PONG_TEXT, ai as ProtocolErrorBody, aj as RelayMsg, ak as RequestMsg, al as ResponseMsg, am as SERVICES, an as SUBPROTOCOL, ao as ServiceId, ap as ServiceOpName, aq as ServiceOpSpec, ar as ServiceSpec, S as StreamMeta, as as StreamMsg, at as TextModelId, au as TextModelInfo, av as TranscriptSegment, T as TranscriptionModelId, aw as TranscriptionModelInfo, W as Welcome, ax as closeRule, i as isDesktopProtocolError, ay as isTerminalClose } from './models-
|
|
2
|
+
import { O as OpName } from './models-HrUx_KP2.js';
|
|
3
|
+
export { B as BEARER_PREFIX, g as CLOSE_RULES, h as CancelMsg, j as ClientToCoreMsg, e as ClientType, k as CloseAction, l as CloseCode, m as CloseCodeValue, C as CloseOutcome, n as CloseRule, o as CoreToClientMsg, p as CreditMsg, D as DesktopProtocolError, q as DownloadKind, r as DownloadRow, d as EVENTS, s as EndMsg, E as EndReason, t as ErrorCode, u as ErrorCodeName, v as ErrorData, w as ErrorMsg, x as ErrorReason, y as ErrorReasonName, z as EventMsg, A as EventName, F as FsPatchEditFailure, H as HelloMsg, L as Limits, G as LlmRunning, I as LlmServerState, J as MlInstallPhase, K as MlInstallProgress, f as MlProgress, N as MlRuntimeState, P as MlServiceState, Q as MlServiceStatus, R as MlStatusParams, U as MlStatusResult, V as ModelsDownloadsCancelParams, X as ModelsDownloadsCancelResult, Y as ModelsDownloadsListParams, Z as ModelsDownloadsListResult, _ as ModelsInstallParams, $ as ModelsInstallResult, a0 as ModelsLlmInstallParams, a1 as ModelsLlmInstallResult, a2 as ModelsLlmStartParams, a3 as ModelsLlmStartResult, a4 as ModelsLlmStatusParams, a5 as ModelsLlmStatusResult, a6 as ModelsLlmStopParams, a7 as ModelsLlmStopResult, a8 as ModelsProgressEvent, a9 as ModelsStatusParams, aa as ModelsStatusResult, ab as ModelsTranscribeParams, M as ModelsTranscribeResult, ac as NAMED_SCHEMAS, ad as NamedSchemaId, c as OPS, ae as OpDescriptor, a as OpParams, b as OpResult, af as OpSpec, ag as PING_TEXT, ah as PONG_TEXT, ai as ProtocolErrorBody, aj as RelayMsg, ak as RequestMsg, al as ResponseMsg, am as SERVICES, an as SUBPROTOCOL, ao as ServiceId, ap as ServiceOpName, aq as ServiceOpSpec, ar as ServiceSpec, S as StreamMeta, as as StreamMsg, at as TextModelId, au as TextModelInfo, av as TranscriptSegment, T as TranscriptionModelId, aw as TranscriptionModelInfo, W as Welcome, ax as closeRule, i as isDesktopProtocolError, ay as isTerminalClose } from './models-HrUx_KP2.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. */
|
|
@@ -124,9 +124,9 @@ declare const PROTOCOL_MAJOR: 1;
|
|
|
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
126
|
*/
|
|
127
|
-
declare const PROTOCOL_MINOR:
|
|
127
|
+
declare const PROTOCOL_MINOR: 48;
|
|
128
128
|
/** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
|
|
129
|
-
declare const PROTOCOL_VERSION: "1.
|
|
129
|
+
declare const PROTOCOL_VERSION: "1.48";
|
|
130
130
|
/** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
|
|
131
131
|
declare const u32: z.ZodInt;
|
|
132
132
|
declare const nonNegInt: z.ZodInt;
|
|
@@ -10314,6 +10314,16 @@ type EntitiesPiiResult = z.output<typeof EntitiesPiiResult>;
|
|
|
10314
10314
|
* inside one (`ProtocolErrorBody.data`), or a union branch (`RelayCallResponse|0`).
|
|
10315
10315
|
*/
|
|
10316
10316
|
declare const FIELDS_SINCE: {
|
|
10317
|
+
readonly LlmRunning: {
|
|
10318
|
+
readonly context_length: "1.48";
|
|
10319
|
+
readonly gpu_layers: "1.48";
|
|
10320
|
+
readonly threads: "1.48";
|
|
10321
|
+
};
|
|
10322
|
+
readonly ModelsLlmStartParams: {
|
|
10323
|
+
readonly gpu_layers: "1.48";
|
|
10324
|
+
readonly threads: "1.48";
|
|
10325
|
+
readonly load_timeout_s: "1.48";
|
|
10326
|
+
};
|
|
10317
10327
|
readonly FsPatchResult: {
|
|
10318
10328
|
readonly edits_applied: "1.1";
|
|
10319
10329
|
readonly edits_failed: "1.1";
|
|
@@ -10506,7 +10516,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
|
|
|
10506
10516
|
declare const VERSIONED_RESULT_OPS: readonly OpName[];
|
|
10507
10517
|
|
|
10508
10518
|
/** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
|
|
10509
|
-
declare const CONTRACT_SHA256: "
|
|
10519
|
+
declare const CONTRACT_SHA256: "d3cef917711b4168097ee38e3949a0cfc65b65a8adb532104161e2f55fb30082";
|
|
10510
10520
|
|
|
10511
10521
|
/**
|
|
10512
10522
|
* 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 = 48;
|
|
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_-]+$/);
|
|
@@ -894,7 +894,14 @@ var TextModelInfo = z10.strictObject({
|
|
|
894
894
|
installed: z10.boolean()
|
|
895
895
|
});
|
|
896
896
|
var LlmServerState = z10.enum(["stopped", "starting", "running", "failed"]);
|
|
897
|
-
var LlmRunning = z10.strictObject({
|
|
897
|
+
var LlmRunning = z10.strictObject({
|
|
898
|
+
id: TextModelId,
|
|
899
|
+
port: z10.int().min(1024).max(65535),
|
|
900
|
+
/** (1.48) What the service actually applied, echoed so the app can attest "read and applied". Optional until the service sends them. */
|
|
901
|
+
context_length: z10.int().min(512).max(131072).optional(),
|
|
902
|
+
gpu_layers: z10.int().min(-1).max(999).optional(),
|
|
903
|
+
threads: z10.int().min(1).max(512).optional()
|
|
904
|
+
});
|
|
898
905
|
var ModelsLlmStatusParams = z10.strictObject({});
|
|
899
906
|
var ModelsLlmStatusResult = z10.strictObject({
|
|
900
907
|
state: LlmServerState,
|
|
@@ -912,8 +919,14 @@ var ModelsLlmInstallParams = z10.strictObject({ model: TextModelId });
|
|
|
912
919
|
var ModelsLlmInstallResult = z10.strictObject({ model: TextModelId, elapsed_ms: nonNegInt });
|
|
913
920
|
var ModelsLlmStartParams = z10.strictObject({
|
|
914
921
|
model: TextModelId,
|
|
915
|
-
/** Tokens of context
|
|
916
|
-
context_length: z10.int().min(512).max(131072).optional()
|
|
922
|
+
/** Tokens of context, from the knob desktop.models/context_length. Omitted today means the service's fixed 4096 (optional until callers send it). */
|
|
923
|
+
context_length: z10.int().min(512).max(131072).optional(),
|
|
924
|
+
/** (1.48) Layers offloaded to the GPU; -1 = all. From the knob desktop.models/gpu_layers. */
|
|
925
|
+
gpu_layers: z10.int().min(-1).max(999).optional(),
|
|
926
|
+
/** (1.48) CPU threads, computed by the app from the knobs. */
|
|
927
|
+
threads: z10.int().min(1).max(512).optional(),
|
|
928
|
+
/** (1.48) Seconds to wait for the model to load, computed by the app from the knobs. */
|
|
929
|
+
load_timeout_s: z10.int().min(10).max(3600).optional()
|
|
917
930
|
});
|
|
918
931
|
var ModelsLlmStartResult = z10.strictObject({ running: LlmRunning, elapsed_ms: nonNegInt });
|
|
919
932
|
var ModelsLlmStopParams = z10.strictObject({});
|
|
@@ -5388,6 +5401,8 @@ var NAMED_SCHEMAS = {
|
|
|
5388
5401
|
|
|
5389
5402
|
// src/versioning.ts
|
|
5390
5403
|
var FIELDS_SINCE = {
|
|
5404
|
+
LlmRunning: { context_length: "1.48", gpu_layers: "1.48", threads: "1.48" },
|
|
5405
|
+
ModelsLlmStartParams: { gpu_layers: "1.48", threads: "1.48", load_timeout_s: "1.48" },
|
|
5391
5406
|
FsPatchResult: { edits_applied: "1.1", edits_failed: "1.1" },
|
|
5392
5407
|
"ProtocolErrorBody.data": { edits_failed: "1.1" },
|
|
5393
5408
|
"RelayCallResponse|0": { protocol_version: "1.1" },
|
|
@@ -5584,7 +5599,7 @@ function forPeer(op, part, value, version) {
|
|
|
5584
5599
|
var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
|
|
5585
5600
|
|
|
5586
5601
|
// src/contract.ts
|
|
5587
|
-
var CONTRACT_SHA256 = "
|
|
5602
|
+
var CONTRACT_SHA256 = "d3cef917711b4168097ee38e3949a0cfc65b65a8adb532104161e2f55fb30082";
|
|
5588
5603
|
|
|
5589
5604
|
// src/close-policy.ts
|
|
5590
5605
|
var CLOSE_RULES = {
|