@ai-matrx/desktop-protocol 0.21.55 → 0.21.57
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 +24 -1
- package/dist/client.cjs +26 -9
- 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 +25 -8
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +39 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +193 -22
- package/dist/index.d.ts +193 -22
- package/dist/index.js +37 -12
- package/dist/index.js.map +1 -1
- package/dist/{models-qM7u4hzm.d.cts → models-DbIm7Isi.d.cts} +286 -0
- package/dist/{models-qM7u4hzm.d.ts → models-DbIm7Isi.d.ts} +286 -0
- package/dist/react.d.cts +117 -0
- package/dist/react.d.ts +117 -0
- package/generated/desktop-protocol.schema.json +165 -44
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -204,11 +204,13 @@ __export(src_exports, {
|
|
|
204
204
|
CancelMsg: () => CancelMsg,
|
|
205
205
|
CatalogFile: () => CatalogFile,
|
|
206
206
|
CatalogModelEntry: () => CatalogModelEntry,
|
|
207
|
+
ChatAppGroup: () => ChatAppGroup,
|
|
207
208
|
ChatAppProject: () => ChatAppProject,
|
|
208
209
|
ChatFamily: () => ChatFamily,
|
|
209
210
|
ChatHidden: () => ChatHidden,
|
|
210
211
|
ChatId: () => ChatId,
|
|
211
212
|
ChatLastUse: () => ChatLastUse,
|
|
213
|
+
ChatParent: () => ChatParent,
|
|
212
214
|
ChatPin: () => ChatPin,
|
|
213
215
|
ChatPlace: () => ChatPlace,
|
|
214
216
|
ChatProject: () => ChatProject,
|
|
@@ -334,6 +336,8 @@ __export(src_exports, {
|
|
|
334
336
|
ContactsSearchResult: () => ContactsSearchResult,
|
|
335
337
|
ContractHash: () => ContractHash,
|
|
336
338
|
CopiedChat: () => CopiedChat,
|
|
339
|
+
CopyReopened: () => CopyReopened,
|
|
340
|
+
CopyRestart: () => CopyRestart,
|
|
337
341
|
CoreToClientMsg: () => CoreToClientMsg,
|
|
338
342
|
CoreToServiceMsg: () => CoreToServiceMsg,
|
|
339
343
|
CreditMsg: () => CreditMsg,
|
|
@@ -871,7 +875,6 @@ __export(src_exports, {
|
|
|
871
875
|
buildToolStatus: () => buildToolStatus,
|
|
872
876
|
builtOps: () => builtOps,
|
|
873
877
|
closeRule: () => closeRule,
|
|
874
|
-
compareVersions: () => compareVersions,
|
|
875
878
|
connectionEndFrame: () => connectionEndFrame,
|
|
876
879
|
decodeFrame: () => decodeFrame,
|
|
877
880
|
encodeFrame: () => encodeFrame,
|
|
@@ -901,7 +904,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
901
904
|
var import_zod = require("zod");
|
|
902
905
|
var import_uuid = require("@ai-matrx/kit/uuid");
|
|
903
906
|
var PROTOCOL_MAJOR = 1;
|
|
904
|
-
var PROTOCOL_MINOR =
|
|
907
|
+
var PROTOCOL_MINOR = 60;
|
|
905
908
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
906
909
|
var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
907
910
|
var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -2210,6 +2213,8 @@ var ChatAppProject = import_zod13.z.strictObject({
|
|
|
2210
2213
|
name: import_zod13.z.string().max(200)
|
|
2211
2214
|
});
|
|
2212
2215
|
var ChatTitleSource = import_zod13.z.enum(["app", "app-remembered", "custom-title", "ai-title", "agent-name", "summary", "first-prompt", "last-prompt"]);
|
|
2216
|
+
var ChatAppGroup = import_zod13.z.strictObject({ window: ChatPlace, group_id: import_zod13.z.string().max(120), name: import_zod13.z.string().max(200) });
|
|
2217
|
+
var ChatParent = import_zod13.z.strictObject({ id: ChatId, how: import_zod13.z.enum(["spawned", "dispatched", "forked"]), title: import_zod13.z.string().max(1e3).nullable() });
|
|
2213
2218
|
var ChatRow = import_zod13.z.strictObject({
|
|
2214
2219
|
id: ChatId,
|
|
2215
2220
|
/** The short id people see (the listing's first 8 characters). */
|
|
@@ -2251,7 +2256,15 @@ var ChatRow = import_zod13.z.strictObject({
|
|
|
2251
2256
|
/** 1.14: the person's rename inside Matrx (Coding Sessions), applied once by the row builder; absent = none. */
|
|
2252
2257
|
title_override: import_zod13.z.string().min(1).max(300).optional(),
|
|
2253
2258
|
/** 1.15: the app itself archived it (hidden_in says where and why, in words for people; this is the typed fact). */
|
|
2254
|
-
archived: import_zod13.z.boolean().optional()
|
|
2259
|
+
archived: import_zod13.z.boolean().optional(),
|
|
2260
|
+
/** 1.59: the coding session Matrx itself drives this chat in (the one chat, whether it runs in the app or in Matrx); absent = none. */
|
|
2261
|
+
session_id: import_zod13.z.string().max(80).optional(),
|
|
2262
|
+
/** 1.59: the app's own groups it is filed in, per instance, as the app keeps them (never merged into the person's projects). */
|
|
2263
|
+
app_groups: import_zod13.z.array(ChatAppGroup).max(200).optional(),
|
|
2264
|
+
/** 1.59: the chat it came from (nesting): an agent's chat that spawned it, dispatched it, or that it was forked from. */
|
|
2265
|
+
parent: ChatParent.optional(),
|
|
2266
|
+
/** 1.59: earlier sessions of this same chat (the app continued it under new session ids). */
|
|
2267
|
+
prior_sessions: import_zod13.z.array(ChatId).max(50).optional()
|
|
2255
2268
|
});
|
|
2256
2269
|
var ChatFamily = import_zod13.z.strictObject({
|
|
2257
2270
|
id: ChatId,
|
|
@@ -2757,6 +2770,15 @@ var CopiedChat = import_zod14.z.strictObject({
|
|
|
2757
2770
|
state: import_zod14.z.enum(["verified", "queued", "failed"]),
|
|
2758
2771
|
reason: import_zod14.z.string().max(400).nullable()
|
|
2759
2772
|
});
|
|
2773
|
+
var CopyReopened = import_zod14.z.strictObject({ window: ChatPlace, ok: import_zod14.z.boolean(), reason: import_zod14.z.string().max(400).nullable() });
|
|
2774
|
+
var CopyRestart = import_zod14.z.strictObject({
|
|
2775
|
+
asked: import_zod14.z.enum(["queued", "restart_verify"]),
|
|
2776
|
+
done: import_zod14.z.enum(["queued", "restart_verify"]),
|
|
2777
|
+
windows: import_zod14.z.array(ChatPlace).max(2),
|
|
2778
|
+
reason: import_zod14.z.string().max(400).nullable(),
|
|
2779
|
+
/** 1.60: each closed window's reopen outcome (absent from a 1.59 core, and when no window was closed): `ok: false` is a window that did not come back. */
|
|
2780
|
+
reopened: import_zod14.z.array(CopyReopened).max(2).optional()
|
|
2781
|
+
});
|
|
2760
2782
|
var AppsChatsCopyToAccountResult = import_zod14.z.strictObject({
|
|
2761
2783
|
message: import_zod14.z.string().max(400),
|
|
2762
2784
|
origin: ChatPlace,
|
|
@@ -2772,7 +2794,7 @@ var AppsChatsCopyToAccountResult = import_zod14.z.strictObject({
|
|
|
2772
2794
|
queued: import_zod14.z.number().int().nonnegative(),
|
|
2773
2795
|
failed: import_zod14.z.number().int().nonnegative(),
|
|
2774
2796
|
/** What the restart choice did: "restart_verify" closed and reopened `windows`; a fall back to "queued" says why. */
|
|
2775
|
-
restart:
|
|
2797
|
+
restart: CopyRestart
|
|
2776
2798
|
});
|
|
2777
2799
|
|
|
2778
2800
|
// src/schema/apps-instances.ts
|
|
@@ -5729,6 +5751,8 @@ var SERVICES = {
|
|
|
5729
5751
|
}
|
|
5730
5752
|
};
|
|
5731
5753
|
var NAMED_SCHEMAS = {
|
|
5754
|
+
ChatAppGroup,
|
|
5755
|
+
ChatParent,
|
|
5732
5756
|
AppsWindowsSetAccountParams,
|
|
5733
5757
|
AppsWindowsForgetParams,
|
|
5734
5758
|
ProbeFact,
|
|
@@ -6199,6 +6223,8 @@ var NAMED_SCHEMAS = {
|
|
|
6199
6223
|
AppsWindowsSetRemoteControlResult,
|
|
6200
6224
|
AppsChatsCopyToAccountParams,
|
|
6201
6225
|
CopiedChat,
|
|
6226
|
+
CopyReopened,
|
|
6227
|
+
CopyRestart,
|
|
6202
6228
|
AppsChatsCopyToAccountResult,
|
|
6203
6229
|
AccountUsage,
|
|
6204
6230
|
AccountReset,
|
|
@@ -6528,6 +6554,7 @@ var NAMED_SCHEMAS = {
|
|
|
6528
6554
|
};
|
|
6529
6555
|
|
|
6530
6556
|
// src/versioning.ts
|
|
6557
|
+
var import_versions = require("@ai-matrx/kit/versions");
|
|
6531
6558
|
var FIELDS_SINCE = {
|
|
6532
6559
|
LlmRunning: { context_length: "1.48", gpu_layers: "1.48", threads: "1.48" },
|
|
6533
6560
|
ModelsLlmStartParams: { gpu_layers: "1.48", threads: "1.48", load_timeout_s: "1.48" },
|
|
@@ -6551,7 +6578,7 @@ var FIELDS_SINCE = {
|
|
|
6551
6578
|
AppsChatsListResult: { updating: "1.9", live: "1.9", families: "1.10" },
|
|
6552
6579
|
AppsAccountsUsageResult: { problem: "1.12" },
|
|
6553
6580
|
AppsAccountsResetsResult: { problem: "1.12" },
|
|
6554
|
-
ChatRow: { app_project: "1.13", tokens: "1.13", original_title: "1.14", title_source: "1.14", title_override: "1.14", archived: "1.15" },
|
|
6581
|
+
ChatRow: { app_project: "1.13", tokens: "1.13", original_title: "1.14", title_source: "1.14", title_override: "1.14", archived: "1.15", session_id: "1.59", app_groups: "1.59", parent: "1.59", prior_sessions: "1.59" },
|
|
6555
6582
|
AccountUsage: { plan: "1.13", credits: "1.13", five_hour_resets_by_ms: "1.25" },
|
|
6556
6583
|
ResourcesDisk: { name: "1.17" },
|
|
6557
6584
|
StackServer: { cpu_percent: "1.18", memory_bytes: "1.18" },
|
|
@@ -6573,7 +6600,8 @@ var FIELDS_SINCE = {
|
|
|
6573
6600
|
"SysinfoGetResult.permissions[]": { detail: "1.41" },
|
|
6574
6601
|
MessagesSendParams: { service: "1.42" },
|
|
6575
6602
|
SysinfoHardwareResult: { graphics: "1.45" },
|
|
6576
|
-
DownloadRow: { error: "1.46" }
|
|
6603
|
+
DownloadRow: { error: "1.46" },
|
|
6604
|
+
CopyRestart: { reopened: "1.60" }
|
|
6577
6605
|
};
|
|
6578
6606
|
var NULL_SINCE = {
|
|
6579
6607
|
"RelayDeviceStatusEvent.since_ms": { since: "1.1", olderPeersGet: 0 }
|
|
@@ -6623,17 +6651,12 @@ function announcedVersion(offered) {
|
|
|
6623
6651
|
let best = `${PROTOCOL_MAJOR}.0`;
|
|
6624
6652
|
for (const p of offered) {
|
|
6625
6653
|
const m = /^matrx\.v(\d+\.\d+)$/.exec(p.trim());
|
|
6626
|
-
if (m?.[1] && compareVersions(m[1], best) > 0 && m[1].startsWith(`${PROTOCOL_MAJOR}.`)) best = m[1];
|
|
6654
|
+
if (m?.[1] && (0, import_versions.compareVersions)(m[1], best) > 0 && m[1].startsWith(`${PROTOCOL_MAJOR}.`)) best = m[1];
|
|
6627
6655
|
}
|
|
6628
6656
|
return best;
|
|
6629
6657
|
}
|
|
6630
|
-
function compareVersions(a, b) {
|
|
6631
|
-
const [am = 0, an = 0] = a.split(".").map(Number);
|
|
6632
|
-
const [bm = 0, bn = 0] = b.split(".").map(Number);
|
|
6633
|
-
return am - bm || an - bn;
|
|
6634
|
-
}
|
|
6635
6658
|
function knows(version, since) {
|
|
6636
|
-
return compareVersions(version, since) >= 0;
|
|
6659
|
+
return (0, import_versions.compareVersions)(version, since) >= 0;
|
|
6637
6660
|
}
|
|
6638
6661
|
function negotiate(peerVersion) {
|
|
6639
6662
|
const [major = 0, minor = 0] = peerVersion.split(".").map(Number);
|
|
@@ -6678,6 +6701,8 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
|
|
|
6678
6701
|
["sysinfo.get", [["permissions", "SysinfoGetResult.permissions[]"]]],
|
|
6679
6702
|
["models.downloads.list", [["downloads", "DownloadRow"]]],
|
|
6680
6703
|
["apps.projects.to_window", [["group", "ProjectMoveGroup"]]],
|
|
6704
|
+
// 1.60: each closed window's reopen outcome in a restart_verify copy.
|
|
6705
|
+
["apps.chats.copy_to_account", [["restart", "CopyRestart"]]],
|
|
6681
6706
|
["apps.windows.list", [["windows", "AppWindowInfo"]]],
|
|
6682
6707
|
["apps.windows.set_remote_control", [["remote_control", "WindowRemoteControl"]]],
|
|
6683
6708
|
["coding.providers", [["providers", "CodingProviderStatus"]]],
|
|
@@ -6793,7 +6818,7 @@ function forPeer(op, part, value, version) {
|
|
|
6793
6818
|
var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
|
|
6794
6819
|
|
|
6795
6820
|
// src/contract.ts
|
|
6796
|
-
var CONTRACT_SHA256 = "
|
|
6821
|
+
var CONTRACT_SHA256 = "36fbca871e9773bc8f5310fb3d258c4b04d73c4fd17f3af8e9555ce3b4e67871";
|
|
6797
6822
|
|
|
6798
6823
|
// src/close-policy.ts
|
|
6799
6824
|
var CLOSE_RULES = {
|