@ai-matrx/desktop-protocol 0.17.2 → 0.17.4
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 +23 -0
- package/dist/client.cjs +124 -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 +124 -2
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +447 -262
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +361 -9
- package/dist/index.d.ts +361 -9
- package/dist/index.js +447 -262
- package/dist/index.js.map +1 -1
- package/dist/{models-QWCUcQuU.d.cts → models-9j0ncAJj.d.cts} +562 -4
- package/dist/{models-QWCUcQuU.d.ts → models-9j0ncAJj.d.ts} +562 -4
- package/dist/react.d.cts +252 -0
- package/dist/react.d.ts +252 -0
- package/generated/desktop-protocol.schema.json +648 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.17.4
|
|
4
|
+
### (protocol 1.8)
|
|
5
|
+
|
|
6
|
+
- **A coding app's chats, live.** New ops `apps.chats.list` (windows, projects, chat rows with
|
|
7
|
+
places, pins, hidden-in reasons, running, last use and cache warmth; all or only `ids`),
|
|
8
|
+
`apps.chats.watch` (resource; event `apps.chats.changed {app_key, version, ids, all}`),
|
|
9
|
+
`apps.chats.star`, `apps.projects.file` (a project or a new one by name) and
|
|
10
|
+
`apps.projects.unfile`. Generic per `app_key`; Claude is the first adapter. New ops only, so
|
|
11
|
+
older peers are unaffected.
|
|
12
|
+
|
|
13
|
+
Consumer action: none (Matrx 2 core serves the ops; its Code › Chats and Projects screens read them).
|
|
14
|
+
|
|
15
|
+
## 0.17.3
|
|
16
|
+
### (protocol 1.7)
|
|
17
|
+
|
|
18
|
+
- **A window names the application that owns it.** `WindowInfo` gains `app` (the owning
|
|
19
|
+
application's display name, absent when the OS does not say) and `pid` (absent when unknown), on
|
|
20
|
+
`window.list`, `window.focus` and `window.move`. Both are optional on read (an older app omits
|
|
21
|
+
them) and `forPeer` strips them for a peer that negotiated below 1.7. Guard:
|
|
22
|
+
`src/versioning.test.ts` ("a window names its app from 1.7 …").
|
|
23
|
+
|
|
24
|
+
Consumer action: none (new optional fields; Matrx 2 core and its Windows screen read them).
|
|
25
|
+
|
|
3
26
|
## 0.17.2
|
|
4
27
|
|
|
5
28
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
package/dist/client.cjs
CHANGED
|
@@ -143,7 +143,7 @@ var import_zod2 = require("zod");
|
|
|
143
143
|
// src/schema/primitives.ts
|
|
144
144
|
var import_zod = require("zod");
|
|
145
145
|
var PROTOCOL_MAJOR = 1;
|
|
146
|
-
var PROTOCOL_MINOR =
|
|
146
|
+
var PROTOCOL_MINOR = 8;
|
|
147
147
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
148
148
|
var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
149
149
|
var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -961,7 +961,15 @@ var WindowInfo = import_zod15.z.strictObject({
|
|
|
961
961
|
x: import_zod15.z.int(),
|
|
962
962
|
y: import_zod15.z.int(),
|
|
963
963
|
width: import_zod15.z.int().min(0),
|
|
964
|
-
height: import_zod15.z.int().min(0)
|
|
964
|
+
height: import_zod15.z.int().min(0),
|
|
965
|
+
/**
|
|
966
|
+
* The application that owns the window, by the name the OS shows people; absent when the OS does
|
|
967
|
+
* not say. Optional (never null, the schema rule) because it was added in protocol 1.7: an older
|
|
968
|
+
* app's answer has no such field (FIELDS_SINCE).
|
|
969
|
+
*/
|
|
970
|
+
app: import_zod15.z.string().max(256).optional(),
|
|
971
|
+
/** The owning process id; absent when the OS does not say. Added in protocol 1.7. */
|
|
972
|
+
pid: import_zod15.z.int().min(0).optional()
|
|
965
973
|
});
|
|
966
974
|
var WindowListParams = import_zod15.z.strictObject({
|
|
967
975
|
/** Case-insensitive substring of the window title. */
|
|
@@ -1425,6 +1433,114 @@ var AppsOpenResult = import_zod23.z.strictObject({
|
|
|
1425
1433
|
folder: AbsPath.nullable()
|
|
1426
1434
|
});
|
|
1427
1435
|
|
|
1436
|
+
// src/schema/apps-chats.ts
|
|
1437
|
+
var import_zod24 = require("zod");
|
|
1438
|
+
var ChatId = import_zod24.z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/);
|
|
1439
|
+
var ChatPlace = import_zod24.z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/);
|
|
1440
|
+
var ChatProjectId = import_zod24.z.string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/);
|
|
1441
|
+
var ChatWindow = import_zod24.z.strictObject({
|
|
1442
|
+
key: ChatPlace,
|
|
1443
|
+
/** The app's default profile (Claude: the main window, which lists every account's chats). */
|
|
1444
|
+
main: import_zod24.z.boolean(),
|
|
1445
|
+
/** The account the window is signed into, when known. */
|
|
1446
|
+
account: import_zod24.z.string().max(320).nullable()
|
|
1447
|
+
});
|
|
1448
|
+
var ChatProject = import_zod24.z.strictObject({
|
|
1449
|
+
id: ChatProjectId,
|
|
1450
|
+
name: import_zod24.z.string().min(1).max(200),
|
|
1451
|
+
archived: import_zod24.z.boolean(),
|
|
1452
|
+
/** Chats in it. */
|
|
1453
|
+
count: nonNegInt
|
|
1454
|
+
});
|
|
1455
|
+
var ChatPin = import_zod24.z.strictObject({
|
|
1456
|
+
/** The window whose account pins it; an account with no window of its own is named by its email. */
|
|
1457
|
+
window: import_zod24.z.string().min(1).max(320),
|
|
1458
|
+
/** When that account's pin list was last read; null when the reading has no time. */
|
|
1459
|
+
observed_at_ms: epochMs.nullable()
|
|
1460
|
+
});
|
|
1461
|
+
var ChatRunning = import_zod24.z.strictObject({
|
|
1462
|
+
window: ChatPlace,
|
|
1463
|
+
/** process: a live process resumed this chat there (exact); activity: that window's own record moved in the last 3 minutes. */
|
|
1464
|
+
how: import_zod24.z.enum(["process", "activity"])
|
|
1465
|
+
});
|
|
1466
|
+
var ChatHidden = import_zod24.z.strictObject({
|
|
1467
|
+
window: ChatPlace,
|
|
1468
|
+
reason: import_zod24.z.string().max(200)
|
|
1469
|
+
});
|
|
1470
|
+
var ChatLastUse = import_zod24.z.strictObject({
|
|
1471
|
+
/** The conversation's last reply. */
|
|
1472
|
+
at_ms: epochMs,
|
|
1473
|
+
window: ChatPlace.nullable(),
|
|
1474
|
+
account: import_zod24.z.string().max(320).nullable(),
|
|
1475
|
+
/** How the window was decided (one short line). */
|
|
1476
|
+
how: import_zod24.z.string().max(120).nullable(),
|
|
1477
|
+
/** The account's 1-hour prompt cache is still warm. */
|
|
1478
|
+
cache_warm: import_zod24.z.boolean(),
|
|
1479
|
+
cache_minutes_left: nonNegInt
|
|
1480
|
+
});
|
|
1481
|
+
var ChatRow = import_zod24.z.strictObject({
|
|
1482
|
+
id: ChatId,
|
|
1483
|
+
/** The short id people see (the listing's first 8 characters). */
|
|
1484
|
+
short_id: import_zod24.z.string().max(16),
|
|
1485
|
+
/** The listing's own name (Claude: local_<id>), null for a chat only in the holder. */
|
|
1486
|
+
record: import_zod24.z.string().max(160).nullable(),
|
|
1487
|
+
title: import_zod24.z.string().max(1e3),
|
|
1488
|
+
last_active_ms: epochMs.nullable(),
|
|
1489
|
+
created_ms: epochMs.nullable(),
|
|
1490
|
+
projects: import_zod24.z.array(ChatProjectId).max(500),
|
|
1491
|
+
starred: import_zod24.z.boolean(),
|
|
1492
|
+
pinned_in: import_zod24.z.array(ChatPin).max(200),
|
|
1493
|
+
/** Every place it is listed now: window keys, plus "holder". */
|
|
1494
|
+
places: import_zod24.z.array(ChatPlace).max(200),
|
|
1495
|
+
held: import_zod24.z.boolean(),
|
|
1496
|
+
running: import_zod24.z.array(ChatRunning).max(200),
|
|
1497
|
+
hidden_in: import_zod24.z.array(ChatHidden).max(200),
|
|
1498
|
+
/** Kept out of the main window on purpose. */
|
|
1499
|
+
hidden_from_main: import_zod24.z.boolean(),
|
|
1500
|
+
/** Listed in a side window and not yet copied into main. */
|
|
1501
|
+
main_pending: import_zod24.z.boolean(),
|
|
1502
|
+
/** A scheduled routine's run (its task id). */
|
|
1503
|
+
scheduled: import_zod24.z.string().max(200).nullable(),
|
|
1504
|
+
/** Created recently and in no project: offered for filing. */
|
|
1505
|
+
new_unfiled: import_zod24.z.boolean(),
|
|
1506
|
+
warnings: import_zod24.z.array(import_zod24.z.string().max(400)).max(20),
|
|
1507
|
+
last_use: ChatLastUse.nullable()
|
|
1508
|
+
});
|
|
1509
|
+
var AppsChatsListParams = import_zod24.z.strictObject({
|
|
1510
|
+
app_key: AppKey,
|
|
1511
|
+
/** Only these chats (a live update re-reads just what changed). */
|
|
1512
|
+
ids: import_zod24.z.array(ChatId).max(500).optional()
|
|
1513
|
+
});
|
|
1514
|
+
var AppsChatsListResult = import_zod24.z.strictObject({
|
|
1515
|
+
app_key: AppKey,
|
|
1516
|
+
/** Bumps on every change the index sees; `apps.chats.changed` carries the same number. */
|
|
1517
|
+
version: nonNegInt,
|
|
1518
|
+
windows: import_zod24.z.array(ChatWindow).max(200),
|
|
1519
|
+
projects: import_zod24.z.array(ChatProject).max(5e3),
|
|
1520
|
+
chats: import_zod24.z.array(ChatRow).max(2e4),
|
|
1521
|
+
/** How long a chat in no project counts as new. */
|
|
1522
|
+
new_window_ms: nonNegInt
|
|
1523
|
+
});
|
|
1524
|
+
var AppsChatsWatchParams = import_zod24.z.strictObject({ app_key: AppKey });
|
|
1525
|
+
var AppsChatsWatchResult = import_zod24.z.strictObject({ resource_id: ResourceId, version: nonNegInt });
|
|
1526
|
+
var AppsChatsChangedEvent = import_zod24.z.strictObject({
|
|
1527
|
+
app_key: AppKey,
|
|
1528
|
+
version: nonNegInt,
|
|
1529
|
+
ids: import_zod24.z.array(ChatId).max(1e3),
|
|
1530
|
+
all: import_zod24.z.boolean()
|
|
1531
|
+
});
|
|
1532
|
+
var AppsProjectsFileParams = import_zod24.z.strictObject({
|
|
1533
|
+
app_key: AppKey,
|
|
1534
|
+
chat_id: ChatId,
|
|
1535
|
+
project_id: ChatProjectId.optional(),
|
|
1536
|
+
new_project_name: import_zod24.z.string().min(1).max(200).optional()
|
|
1537
|
+
});
|
|
1538
|
+
var AppsProjectsFileResult = import_zod24.z.strictObject({ chat: ChatRow, project: ChatProject });
|
|
1539
|
+
var AppsProjectsUnfileParams = import_zod24.z.strictObject({ app_key: AppKey, chat_id: ChatId, project_id: ChatProjectId });
|
|
1540
|
+
var AppsProjectsUnfileResult = import_zod24.z.strictObject({ chat: ChatRow });
|
|
1541
|
+
var AppsChatsStarParams = import_zod24.z.strictObject({ app_key: AppKey, chat_id: ChatId, starred: import_zod24.z.boolean() });
|
|
1542
|
+
var AppsChatsStarResult = import_zod24.z.strictObject({ chat: ChatRow });
|
|
1543
|
+
|
|
1428
1544
|
// src/schema/registry.ts
|
|
1429
1545
|
var FS_ERR = ["NOT_FOUND", "PERMISSION_DENIED_OS", "INVALID_PARAMS", "RESOURCE_BUSY", "INTERNAL"];
|
|
1430
1546
|
var OPS = {
|
|
@@ -1462,6 +1578,11 @@ var OPS = {
|
|
|
1462
1578
|
"apps.profiles.save": { params: AppsProfilesSaveParams, result: AppsProfilesSaveResult, kind: "unary", since: "1.2", errors: ["AUTH_REQUIRED", "AUTH_FORBIDDEN", "NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "DEVICE_OFFLINE", "INTERNAL"] },
|
|
1463
1579
|
"apps.profiles.remove": { params: AppsProfilesRemoveParams, result: AppsProfilesRemoveResult, kind: "unary", since: "1.2", errors: ["AUTH_REQUIRED", "AUTH_FORBIDDEN", "NOT_FOUND", "DEVICE_OFFLINE", "INTERNAL"] },
|
|
1464
1580
|
"apps.open": { params: AppsOpenParams, result: AppsOpenResult, kind: "unary", since: "1.2", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "AUTH_REQUIRED", "DEVICE_OFFLINE", "INTERNAL"] },
|
|
1581
|
+
"apps.chats.list": { params: AppsChatsListParams, result: AppsChatsListResult, kind: "unary", since: "1.8", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1582
|
+
"apps.chats.watch": { params: AppsChatsWatchParams, result: AppsChatsWatchResult, kind: "resource", since: "1.8", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "RESOURCE_BUSY", "INTERNAL"] },
|
|
1583
|
+
"apps.chats.star": { params: AppsChatsStarParams, result: AppsChatsStarResult, kind: "unary", since: "1.8", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1584
|
+
"apps.projects.file": { params: AppsProjectsFileParams, result: AppsProjectsFileResult, kind: "unary", since: "1.8", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1585
|
+
"apps.projects.unfile": { params: AppsProjectsUnfileParams, result: AppsProjectsUnfileResult, kind: "unary", since: "1.8", errors: ["NOT_FOUND", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1465
1586
|
"proc.list": { params: ProcListParams, result: ProcListResult, kind: "unary", since: "1.3", errors: ["INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1466
1587
|
"proc.ports": { params: ProcPortsParams, result: ProcPortsResult, kind: "unary", since: "1.3", errors: ["INVALID_PARAMS", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1467
1588
|
"proc.kill": { params: ProcKillParams, result: ProcKillResult, kind: "unary", since: "1.3", errors: ["NOT_FOUND", "AUTH_FORBIDDEN", "PERMISSION_DENIED_OS", "INVALID_PARAMS", "INTERNAL"] },
|
|
@@ -1498,6 +1619,7 @@ var OPS = {
|
|
|
1498
1619
|
};
|
|
1499
1620
|
var EVENTS = {
|
|
1500
1621
|
"fs.changed": FsChangedEvent,
|
|
1622
|
+
"apps.chats.changed": AppsChatsChangedEvent,
|
|
1501
1623
|
"exec.exited": ExecExitedEvent,
|
|
1502
1624
|
"exec.title": ExecTitleEvent,
|
|
1503
1625
|
"exec.cwd": ExecCwdEvent,
|