@ai-matrx/desktop-protocol 0.21.47 → 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 +28 -2
- package/dist/client.cjs +18 -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 +18 -4
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +33 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -5
- package/dist/index.d.ts +28 -5
- package/dist/index.js +33 -5
- package/dist/index.js.map +1 -1
- package/dist/{models-Di-SL_jw.d.cts → models-B_TX5A-H.d.cts} +18 -0
- package/dist/{models-Di-SL_jw.d.ts → models-B_TX5A-H.d.ts} +18 -0
- package/dist/react.d.cts +6 -0
- package/dist/react.d.ts +6 -0
- package/generated/desktop-protocol.schema.json +34 -2
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -886,7 +886,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
886
886
|
var import_zod = require("zod");
|
|
887
887
|
var import_uuid = require("@ai-matrx/kit/uuid");
|
|
888
888
|
var PROTOCOL_MAJOR = 1;
|
|
889
|
-
var PROTOCOL_MINOR =
|
|
889
|
+
var PROTOCOL_MINOR = 54;
|
|
890
890
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
891
891
|
var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
892
892
|
var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -4250,9 +4250,22 @@ var CodingProviderStatus = import_zod34.z.strictObject({
|
|
|
4250
4250
|
quota: import_zod34.z.array(CodingQuotaWindow).max(20),
|
|
4251
4251
|
models: import_zod34.z.array(import_zod34.z.strictObject({ id: import_zod34.z.string().max(200), label: import_zod34.z.string().max(200) })).max(200),
|
|
4252
4252
|
efforts: import_zod34.z.array(import_zod34.z.string().max(40)).max(20),
|
|
4253
|
-
|
|
4253
|
+
/**
|
|
4254
|
+
* Where the default model came from: the app's own settings file, the account (1.54: the signed-in
|
|
4255
|
+
* account's default, e.g. Codex's), or the driver's built-in pick. A peer older than 1.54 is sent
|
|
4256
|
+
* "driver" for "account" (its enum does not know the value).
|
|
4257
|
+
*/
|
|
4258
|
+
defaultModel: import_zod34.z.strictObject({ id: import_zod34.z.string().max(200), source: import_zod34.z.enum(["settings", "driver", "account"]) }).nullable(),
|
|
4254
4259
|
defaultEffort: import_zod34.z.string().max(40).nullable(),
|
|
4255
|
-
binary: CodingProviderBinary.nullable()
|
|
4260
|
+
binary: CodingProviderBinary.nullable(),
|
|
4261
|
+
/**
|
|
4262
|
+
* (1.53) The person's other accounts for this app on the computer (Matrx 2's Accounts) that a run
|
|
4263
|
+
* can use, as the computer's engine lists them; New session offers them beside the default sign-in.
|
|
4264
|
+
* Absent: only the default sign-in (or a computer older than 1.53).
|
|
4265
|
+
*/
|
|
4266
|
+
accounts: import_zod34.z.array(import_zod34.z.strictObject({ id: import_zod34.z.string().min(1).max(64), label: import_zod34.z.string().max(200) })).max(100).optional(),
|
|
4267
|
+
/** (1.53) The computer tried to list `accounts` and could not: a short sentence the form shows with a retry. */
|
|
4268
|
+
accountsProblem: ShortText.optional()
|
|
4256
4269
|
});
|
|
4257
4270
|
var CodingChatPreference = import_zod34.z.strictObject({
|
|
4258
4271
|
title: import_zod34.z.string().max(500).nullable(),
|
|
@@ -6366,6 +6379,7 @@ var FIELDS_SINCE = {
|
|
|
6366
6379
|
WindowInfo: { app: "1.7", pid: "1.7" },
|
|
6367
6380
|
AppWindowInfo: { remote_control: "1.50" },
|
|
6368
6381
|
WindowRemoteControl: { problem: "1.52" },
|
|
6382
|
+
CodingProviderStatus: { accounts: "1.53", accountsProblem: "1.53" },
|
|
6369
6383
|
AppsInstancesListParams: { fresh: "1.51" },
|
|
6370
6384
|
AppsInstancesListResult: { as_of_ms: "1.51", refreshing: "1.51" },
|
|
6371
6385
|
AppsAccountsListParams: { fresh: "1.51" },
|
|
@@ -6501,7 +6515,8 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
|
|
|
6501
6515
|
["models.downloads.list", [["downloads", "DownloadRow"]]],
|
|
6502
6516
|
["apps.projects.to_window", [["group", "ProjectMoveGroup"]]],
|
|
6503
6517
|
["apps.windows.list", [["windows", "AppWindowInfo"]]],
|
|
6504
|
-
["apps.windows.set_remote_control", [["remote_control", "WindowRemoteControl"]]]
|
|
6518
|
+
["apps.windows.set_remote_control", [["remote_control", "WindowRemoteControl"]]],
|
|
6519
|
+
["coding.providers", [["providers", "CodingProviderStatus"]]]
|
|
6505
6520
|
]);
|
|
6506
6521
|
function stripNested(value, nested, version) {
|
|
6507
6522
|
if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
|
|
@@ -6537,6 +6552,18 @@ function windowListRemoteControlForPeer(value, version) {
|
|
|
6537
6552
|
});
|
|
6538
6553
|
return next.some((w, i) => w !== windows[i]) ? { ...body, windows: next } : value;
|
|
6539
6554
|
}
|
|
6555
|
+
function providersDefaultSourceForPeer(value, version) {
|
|
6556
|
+
if (knows(version, "1.54") || value === null || typeof value !== "object") return value;
|
|
6557
|
+
const body = value;
|
|
6558
|
+
if (!Array.isArray(body.providers)) return value;
|
|
6559
|
+
const providers = body.providers;
|
|
6560
|
+
const next = providers.map((p) => {
|
|
6561
|
+
const dm = p?.defaultModel;
|
|
6562
|
+
if (dm === null || typeof dm !== "object" || dm.source !== "account") return p;
|
|
6563
|
+
return { ...p, defaultModel: { ...dm, source: "driver" } };
|
|
6564
|
+
});
|
|
6565
|
+
return next.some((p, i) => p !== providers[i]) ? { ...body, providers: next } : value;
|
|
6566
|
+
}
|
|
6540
6567
|
var WINDOW_RESULTS = /* @__PURE__ */ new Map([
|
|
6541
6568
|
["window.list", "windows"],
|
|
6542
6569
|
["window.focus", "window"],
|
|
@@ -6564,6 +6591,7 @@ function forPeer(op, part, value, version) {
|
|
|
6564
6591
|
const top = path ? strip(known, FIELDS_SINCE[path], version) : known;
|
|
6565
6592
|
const nested = op ? NESTED_RESULTS.get(op) : void 0;
|
|
6566
6593
|
const stripped = nested ? stripNested(top, nested, version) : top;
|
|
6594
|
+
if (op === "coding.providers") return providersDefaultSourceForPeer(stripped, version);
|
|
6567
6595
|
return op === "apps.windows.list" ? windowListRemoteControlForPeer(stripped, version) : stripped;
|
|
6568
6596
|
}
|
|
6569
6597
|
if (value === null || typeof value !== "object") return value;
|
|
@@ -6581,7 +6609,7 @@ function forPeer(op, part, value, version) {
|
|
|
6581
6609
|
var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
|
|
6582
6610
|
|
|
6583
6611
|
// src/contract.ts
|
|
6584
|
-
var CONTRACT_SHA256 = "
|
|
6612
|
+
var CONTRACT_SHA256 = "5408ddb0e04daf99badca47b8f47b4b9bc6f30227dd488356854d85b17b3a9d4";
|
|
6585
6613
|
|
|
6586
6614
|
// src/close-policy.ts
|
|
6587
6615
|
var CLOSE_RULES = {
|