@ai-matrx/desktop-protocol 0.21.48 → 0.21.49
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 +9 -0
- package/dist/client.cjs +7 -2
- 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 +7 -2
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +21 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -5
- package/dist/index.d.ts +10 -5
- package/dist/index.js +21 -3
- package/dist/index.js.map +1 -1
- package/dist/{models-78R7DKfg.d.cts → models-B_TX5A-H.d.cts} +3 -0
- package/dist/{models-78R7DKfg.d.ts → models-B_TX5A-H.d.ts} +3 -0
- package/dist/react.d.cts +1 -0
- package/dist/react.d.ts +1 -0
- package/generated/desktop-protocol.schema.json +3 -2
- 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 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-
|
|
2
|
+
import { O as OpName } from './models-B_TX5A-H.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-B_TX5A-H.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. */
|
|
@@ -140,10 +140,13 @@ declare const PROTOCOL_MAJOR: 1;
|
|
|
140
140
|
* use, from the computer's engine) and `accountsProblem` (why they could not be listed).
|
|
141
141
|
* A 1.52 peer is never sent either; a 1.52 core omits them (its screen offers the
|
|
142
142
|
* default sign-in alone).
|
|
143
|
+
* 1.54 — CodingProviderStatus `defaultModel.source` "account" (the signed-in account's default
|
|
144
|
+
* model, e.g. Codex's). A 1.53 peer is sent "driver" instead (its strict enum would refuse
|
|
145
|
+
* the whole coding.providers answer).
|
|
143
146
|
*/
|
|
144
|
-
declare const PROTOCOL_MINOR:
|
|
147
|
+
declare const PROTOCOL_MINOR: 54;
|
|
145
148
|
/** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
|
|
146
|
-
declare const PROTOCOL_VERSION: "1.
|
|
149
|
+
declare const PROTOCOL_VERSION: "1.54";
|
|
147
150
|
/** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
|
|
148
151
|
declare const u32: z.ZodInt;
|
|
149
152
|
declare const nonNegInt: z.ZodInt;
|
|
@@ -7542,6 +7545,7 @@ declare const CodingProviderStatus: z.ZodObject<{
|
|
|
7542
7545
|
defaultModel: z.ZodNullable<z.ZodObject<{
|
|
7543
7546
|
id: z.ZodString;
|
|
7544
7547
|
source: z.ZodEnum<{
|
|
7548
|
+
account: "account";
|
|
7545
7549
|
settings: "settings";
|
|
7546
7550
|
driver: "driver";
|
|
7547
7551
|
}>;
|
|
@@ -8267,6 +8271,7 @@ declare const CodingProvidersResult: z.ZodObject<{
|
|
|
8267
8271
|
defaultModel: z.ZodNullable<z.ZodObject<{
|
|
8268
8272
|
id: z.ZodString;
|
|
8269
8273
|
source: z.ZodEnum<{
|
|
8274
|
+
account: "account";
|
|
8270
8275
|
settings: "settings";
|
|
8271
8276
|
driver: "driver";
|
|
8272
8277
|
}>;
|
|
@@ -10776,7 +10781,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
|
|
|
10776
10781
|
declare const VERSIONED_RESULT_OPS: readonly OpName[];
|
|
10777
10782
|
|
|
10778
10783
|
/** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
|
|
10779
|
-
declare const CONTRACT_SHA256: "
|
|
10784
|
+
declare const CONTRACT_SHA256: "5408ddb0e04daf99badca47b8f47b4b9bc6f30227dd488356854d85b17b3a9d4";
|
|
10780
10785
|
|
|
10781
10786
|
/**
|
|
10782
10787
|
* 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 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-
|
|
2
|
+
import { O as OpName } from './models-B_TX5A-H.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-B_TX5A-H.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. */
|
|
@@ -140,10 +140,13 @@ declare const PROTOCOL_MAJOR: 1;
|
|
|
140
140
|
* use, from the computer's engine) and `accountsProblem` (why they could not be listed).
|
|
141
141
|
* A 1.52 peer is never sent either; a 1.52 core omits them (its screen offers the
|
|
142
142
|
* default sign-in alone).
|
|
143
|
+
* 1.54 — CodingProviderStatus `defaultModel.source` "account" (the signed-in account's default
|
|
144
|
+
* model, e.g. Codex's). A 1.53 peer is sent "driver" instead (its strict enum would refuse
|
|
145
|
+
* the whole coding.providers answer).
|
|
143
146
|
*/
|
|
144
|
-
declare const PROTOCOL_MINOR:
|
|
147
|
+
declare const PROTOCOL_MINOR: 54;
|
|
145
148
|
/** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
|
|
146
|
-
declare const PROTOCOL_VERSION: "1.
|
|
149
|
+
declare const PROTOCOL_VERSION: "1.54";
|
|
147
150
|
/** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
|
|
148
151
|
declare const u32: z.ZodInt;
|
|
149
152
|
declare const nonNegInt: z.ZodInt;
|
|
@@ -7542,6 +7545,7 @@ declare const CodingProviderStatus: z.ZodObject<{
|
|
|
7542
7545
|
defaultModel: z.ZodNullable<z.ZodObject<{
|
|
7543
7546
|
id: z.ZodString;
|
|
7544
7547
|
source: z.ZodEnum<{
|
|
7548
|
+
account: "account";
|
|
7545
7549
|
settings: "settings";
|
|
7546
7550
|
driver: "driver";
|
|
7547
7551
|
}>;
|
|
@@ -8267,6 +8271,7 @@ declare const CodingProvidersResult: z.ZodObject<{
|
|
|
8267
8271
|
defaultModel: z.ZodNullable<z.ZodObject<{
|
|
8268
8272
|
id: z.ZodString;
|
|
8269
8273
|
source: z.ZodEnum<{
|
|
8274
|
+
account: "account";
|
|
8270
8275
|
settings: "settings";
|
|
8271
8276
|
driver: "driver";
|
|
8272
8277
|
}>;
|
|
@@ -10776,7 +10781,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
|
|
|
10776
10781
|
declare const VERSIONED_RESULT_OPS: readonly OpName[];
|
|
10777
10782
|
|
|
10778
10783
|
/** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
|
|
10779
|
-
declare const CONTRACT_SHA256: "
|
|
10784
|
+
declare const CONTRACT_SHA256: "5408ddb0e04daf99badca47b8f47b4b9bc6f30227dd488356854d85b17b3a9d4";
|
|
10780
10785
|
|
|
10781
10786
|
/**
|
|
10782
10787
|
* 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 = 54;
|
|
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_-]+$/);
|
|
@@ -3366,7 +3366,12 @@ var CodingProviderStatus = z34.strictObject({
|
|
|
3366
3366
|
quota: z34.array(CodingQuotaWindow).max(20),
|
|
3367
3367
|
models: z34.array(z34.strictObject({ id: z34.string().max(200), label: z34.string().max(200) })).max(200),
|
|
3368
3368
|
efforts: z34.array(z34.string().max(40)).max(20),
|
|
3369
|
-
|
|
3369
|
+
/**
|
|
3370
|
+
* Where the default model came from: the app's own settings file, the account (1.54: the signed-in
|
|
3371
|
+
* account's default, e.g. Codex's), or the driver's built-in pick. A peer older than 1.54 is sent
|
|
3372
|
+
* "driver" for "account" (its enum does not know the value).
|
|
3373
|
+
*/
|
|
3374
|
+
defaultModel: z34.strictObject({ id: z34.string().max(200), source: z34.enum(["settings", "driver", "account"]) }).nullable(),
|
|
3370
3375
|
defaultEffort: z34.string().max(40).nullable(),
|
|
3371
3376
|
binary: CodingProviderBinary.nullable(),
|
|
3372
3377
|
/**
|
|
@@ -5663,6 +5668,18 @@ function windowListRemoteControlForPeer(value, version) {
|
|
|
5663
5668
|
});
|
|
5664
5669
|
return next.some((w, i) => w !== windows[i]) ? { ...body, windows: next } : value;
|
|
5665
5670
|
}
|
|
5671
|
+
function providersDefaultSourceForPeer(value, version) {
|
|
5672
|
+
if (knows(version, "1.54") || value === null || typeof value !== "object") return value;
|
|
5673
|
+
const body = value;
|
|
5674
|
+
if (!Array.isArray(body.providers)) return value;
|
|
5675
|
+
const providers = body.providers;
|
|
5676
|
+
const next = providers.map((p) => {
|
|
5677
|
+
const dm = p?.defaultModel;
|
|
5678
|
+
if (dm === null || typeof dm !== "object" || dm.source !== "account") return p;
|
|
5679
|
+
return { ...p, defaultModel: { ...dm, source: "driver" } };
|
|
5680
|
+
});
|
|
5681
|
+
return next.some((p, i) => p !== providers[i]) ? { ...body, providers: next } : value;
|
|
5682
|
+
}
|
|
5666
5683
|
var WINDOW_RESULTS = /* @__PURE__ */ new Map([
|
|
5667
5684
|
["window.list", "windows"],
|
|
5668
5685
|
["window.focus", "window"],
|
|
@@ -5690,6 +5707,7 @@ function forPeer(op, part, value, version) {
|
|
|
5690
5707
|
const top = path ? strip(known, FIELDS_SINCE[path], version) : known;
|
|
5691
5708
|
const nested = op ? NESTED_RESULTS.get(op) : void 0;
|
|
5692
5709
|
const stripped = nested ? stripNested(top, nested, version) : top;
|
|
5710
|
+
if (op === "coding.providers") return providersDefaultSourceForPeer(stripped, version);
|
|
5693
5711
|
return op === "apps.windows.list" ? windowListRemoteControlForPeer(stripped, version) : stripped;
|
|
5694
5712
|
}
|
|
5695
5713
|
if (value === null || typeof value !== "object") return value;
|
|
@@ -5707,7 +5725,7 @@ function forPeer(op, part, value, version) {
|
|
|
5707
5725
|
var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
|
|
5708
5726
|
|
|
5709
5727
|
// src/contract.ts
|
|
5710
|
-
var CONTRACT_SHA256 = "
|
|
5728
|
+
var CONTRACT_SHA256 = "5408ddb0e04daf99badca47b8f47b4b9bc6f30227dd488356854d85b17b3a9d4";
|
|
5711
5729
|
|
|
5712
5730
|
// src/close-policy.ts
|
|
5713
5731
|
var CLOSE_RULES = {
|