@ai-matrx/desktop-protocol 0.21.46 → 0.21.47
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 +11 -0
- package/dist/client.cjs +16 -5
- 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 +16 -5
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +37 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -5
- package/dist/index.d.ts +20 -5
- package/dist/index.js +37 -7
- package/dist/index.js.map +1 -1
- package/dist/{models-DIsQe_Ef.d.cts → models-Di-SL_jw.d.cts} +12 -0
- package/dist/{models-DIsQe_Ef.d.ts → models-Di-SL_jw.d.ts} +12 -0
- package/dist/react.d.cts +4 -0
- package/dist/react.d.ts +4 -0
- package/generated/desktop-protocol.schema.json +10 -2
- package/package.json +2 -2
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 = 52;
|
|
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_-]+$/);
|
|
@@ -2306,12 +2306,21 @@ var AppsChatsStarResult = import_zod13.z.strictObject({ chat: ChatRow });
|
|
|
2306
2306
|
// src/schema/apps-accounts.ts
|
|
2307
2307
|
var import_zod14 = require("zod");
|
|
2308
2308
|
var WindowRemoteControl = import_zod14.z.strictObject({
|
|
2309
|
-
/**
|
|
2310
|
-
|
|
2309
|
+
/**
|
|
2310
|
+
* As the window's settings file holds it: on, off, or never set (the app's default). 1.52:
|
|
2311
|
+
* "unreadable" = the file is there but damaged, so the setting is not known (`problem` says why).
|
|
2312
|
+
*/
|
|
2313
|
+
setting: import_zod14.z.enum(["on", "off", "default", "unreadable"]),
|
|
2311
2314
|
/** The window serves Remote Control now (its live state says "on"); null: not known (closed, or no state file). */
|
|
2312
2315
|
serving: import_zod14.z.boolean().nullable(),
|
|
2313
2316
|
/** A change queued until the window next closes (or restarts); null: none. */
|
|
2314
|
-
pending: import_zod14.z.enum(["on", "off"]).nullable()
|
|
2317
|
+
pending: import_zod14.z.enum(["on", "off"]).nullable(),
|
|
2318
|
+
/**
|
|
2319
|
+
* 1.52: why the setting cannot be trusted, as a plain sentence for the person: the settings file is
|
|
2320
|
+
* damaged ("unreadable"), or a queued change failed to land (it stays queued; asking again retries).
|
|
2321
|
+
* Absent: nothing wrong. An older core omits it.
|
|
2322
|
+
*/
|
|
2323
|
+
problem: import_zod14.z.string().max(300).optional()
|
|
2315
2324
|
});
|
|
2316
2325
|
var AppWindowInfo = import_zod14.z.strictObject({
|
|
2317
2326
|
key: ChatPlace,
|
|
@@ -6356,6 +6365,7 @@ var FIELDS_SINCE = {
|
|
|
6356
6365
|
"RelayCallResponse|1": { protocol_version: "1.1" },
|
|
6357
6366
|
WindowInfo: { app: "1.7", pid: "1.7" },
|
|
6358
6367
|
AppWindowInfo: { remote_control: "1.50" },
|
|
6368
|
+
WindowRemoteControl: { problem: "1.52" },
|
|
6359
6369
|
AppsInstancesListParams: { fresh: "1.51" },
|
|
6360
6370
|
AppsInstancesListResult: { as_of_ms: "1.51", refreshing: "1.51" },
|
|
6361
6371
|
AppsAccountsListParams: { fresh: "1.51" },
|
|
@@ -6489,7 +6499,9 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
|
|
|
6489
6499
|
["web.scrape", [["pages", "WebScrapePage"]]],
|
|
6490
6500
|
["sysinfo.get", [["permissions", "SysinfoGetResult.permissions[]"]]],
|
|
6491
6501
|
["models.downloads.list", [["downloads", "DownloadRow"]]],
|
|
6492
|
-
["apps.projects.to_window", [["group", "ProjectMoveGroup"]]]
|
|
6502
|
+
["apps.projects.to_window", [["group", "ProjectMoveGroup"]]],
|
|
6503
|
+
["apps.windows.list", [["windows", "AppWindowInfo"]]],
|
|
6504
|
+
["apps.windows.set_remote_control", [["remote_control", "WindowRemoteControl"]]]
|
|
6493
6505
|
]);
|
|
6494
6506
|
function stripNested(value, nested, version) {
|
|
6495
6507
|
if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
|
|
@@ -6508,6 +6520,23 @@ function stripNested(value, nested, version) {
|
|
|
6508
6520
|
}
|
|
6509
6521
|
return body;
|
|
6510
6522
|
}
|
|
6523
|
+
function windowListRemoteControlForPeer(value, version) {
|
|
6524
|
+
if (knows(version, "1.52") || value === null || typeof value !== "object") return value;
|
|
6525
|
+
const body = value;
|
|
6526
|
+
if (!Array.isArray(body.windows)) return value;
|
|
6527
|
+
const windows = body.windows;
|
|
6528
|
+
const next = windows.map((w) => {
|
|
6529
|
+
const rc = w?.remote_control;
|
|
6530
|
+
if (rc === null || typeof rc !== "object") return w;
|
|
6531
|
+
if (rc.setting === "unreadable") {
|
|
6532
|
+
const { remote_control: _dropped, ...rest } = w;
|
|
6533
|
+
return rest;
|
|
6534
|
+
}
|
|
6535
|
+
const kept = strip(rc, FIELDS_SINCE.WindowRemoteControl, version);
|
|
6536
|
+
return kept === rc ? w : { ...w, remote_control: kept };
|
|
6537
|
+
});
|
|
6538
|
+
return next.some((w, i) => w !== windows[i]) ? { ...body, windows: next } : value;
|
|
6539
|
+
}
|
|
6511
6540
|
var WINDOW_RESULTS = /* @__PURE__ */ new Map([
|
|
6512
6541
|
["window.list", "windows"],
|
|
6513
6542
|
["window.focus", "window"],
|
|
@@ -6534,7 +6563,8 @@ function forPeer(op, part, value, version) {
|
|
|
6534
6563
|
const known = op === "sysinfo.get" ? permissionsForPeer(value, version) : value;
|
|
6535
6564
|
const top = path ? strip(known, FIELDS_SINCE[path], version) : known;
|
|
6536
6565
|
const nested = op ? NESTED_RESULTS.get(op) : void 0;
|
|
6537
|
-
|
|
6566
|
+
const stripped = nested ? stripNested(top, nested, version) : top;
|
|
6567
|
+
return op === "apps.windows.list" ? windowListRemoteControlForPeer(stripped, version) : stripped;
|
|
6538
6568
|
}
|
|
6539
6569
|
if (value === null || typeof value !== "object") return value;
|
|
6540
6570
|
const body = value;
|
|
@@ -6551,7 +6581,7 @@ function forPeer(op, part, value, version) {
|
|
|
6551
6581
|
var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
|
|
6552
6582
|
|
|
6553
6583
|
// src/contract.ts
|
|
6554
|
-
var CONTRACT_SHA256 = "
|
|
6584
|
+
var CONTRACT_SHA256 = "e9eba8289b9f07b90d920f5a44b038473fae8597e5b43c1f37a2bbda391edcbd";
|
|
6555
6585
|
|
|
6556
6586
|
// src/close-policy.ts
|
|
6557
6587
|
var CLOSE_RULES = {
|