@ai-matrx/desktop-protocol 0.17.5 → 0.17.7
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 +29 -0
- package/dist/client.cjs +209 -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 +209 -2
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +559 -264
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +588 -6
- package/dist/index.d.ts +588 -6
- package/dist/index.js +559 -264
- package/dist/index.js.map +1 -1
- package/dist/{models-Bb87iuvw.d.cts → models-Os6toG3X.d.cts} +945 -1
- package/dist/{models-Bb87iuvw.d.ts → models-Os6toG3X.d.ts} +945 -1
- package/dist/react.d.cts +440 -0
- package/dist/react.d.ts +440 -0
- package/generated/desktop-protocol.schema.json +1645 -69
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -21,6 +21,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
23
|
AbsPath: () => AbsPath,
|
|
24
|
+
AccountReset: () => AccountReset,
|
|
25
|
+
AccountUsage: () => AccountUsage,
|
|
24
26
|
AppFeatureStatus: () => AppFeatureStatus,
|
|
25
27
|
AppInfo: () => AppInfo,
|
|
26
28
|
AppKey: () => AppKey,
|
|
@@ -29,9 +31,17 @@ __export(src_exports, {
|
|
|
29
31
|
AppProfileLocator: () => AppProfileLocator,
|
|
30
32
|
AppSupport: () => AppSupport,
|
|
31
33
|
AppUsageReading: () => AppUsageReading,
|
|
34
|
+
AppWindowInfo: () => AppWindowInfo,
|
|
35
|
+
AppsAccountsResetsParams: () => AppsAccountsResetsParams,
|
|
36
|
+
AppsAccountsResetsResult: () => AppsAccountsResetsResult,
|
|
37
|
+
AppsAccountsUsageParams: () => AppsAccountsUsageParams,
|
|
38
|
+
AppsAccountsUsageResult: () => AppsAccountsUsageResult,
|
|
32
39
|
AppsChatsChangedEvent: () => AppsChatsChangedEvent,
|
|
40
|
+
AppsChatsColdParams: () => AppsChatsColdParams,
|
|
41
|
+
AppsChatsColdResult: () => AppsChatsColdResult,
|
|
33
42
|
AppsChatsListParams: () => AppsChatsListParams,
|
|
34
43
|
AppsChatsListResult: () => AppsChatsListResult,
|
|
44
|
+
AppsChatsOpenParams: () => AppsChatsOpenParams,
|
|
35
45
|
AppsChatsPlaceParams: () => AppsChatsPlaceParams,
|
|
36
46
|
AppsChatsPlaceResult: () => AppsChatsPlaceResult,
|
|
37
47
|
AppsChatsStarParams: () => AppsChatsStarParams,
|
|
@@ -51,14 +61,36 @@ __export(src_exports, {
|
|
|
51
61
|
AppsProfilesSaveResult: () => AppsProfilesSaveResult,
|
|
52
62
|
AppsProjectsCopyParams: () => AppsProjectsCopyParams,
|
|
53
63
|
AppsProjectsCopyResult: () => AppsProjectsCopyResult,
|
|
64
|
+
AppsProjectsCreateParams: () => AppsProjectsCreateParams,
|
|
65
|
+
AppsProjectsCreateResult: () => AppsProjectsCreateResult,
|
|
54
66
|
AppsProjectsFileManyParams: () => AppsProjectsFileManyParams,
|
|
55
67
|
AppsProjectsFileManyResult: () => AppsProjectsFileManyResult,
|
|
56
68
|
AppsProjectsFileParams: () => AppsProjectsFileParams,
|
|
57
69
|
AppsProjectsFileResult: () => AppsProjectsFileResult,
|
|
70
|
+
AppsProjectsImportPinsParams: () => AppsProjectsImportPinsParams,
|
|
71
|
+
AppsProjectsImportPinsResult: () => AppsProjectsImportPinsResult,
|
|
72
|
+
AppsProjectsMoveParams: () => AppsProjectsMoveParams,
|
|
73
|
+
AppsProjectsMoveResult: () => AppsProjectsMoveResult,
|
|
58
74
|
AppsProjectsUnfileParams: () => AppsProjectsUnfileParams,
|
|
59
75
|
AppsProjectsUnfileResult: () => AppsProjectsUnfileResult,
|
|
60
76
|
AppsProjectsUpdateParams: () => AppsProjectsUpdateParams,
|
|
61
77
|
AppsProjectsUpdateResult: () => AppsProjectsUpdateResult,
|
|
78
|
+
AppsSpendParams: () => AppsSpendParams,
|
|
79
|
+
AppsSpendResult: () => AppsSpendResult,
|
|
80
|
+
AppsSyncRunParams: () => AppsSyncRunParams,
|
|
81
|
+
AppsSyncStatusParams: () => AppsSyncStatusParams,
|
|
82
|
+
AppsSyncStatusResult: () => AppsSyncStatusResult,
|
|
83
|
+
AppsWindowActionResult: () => AppsWindowActionResult,
|
|
84
|
+
AppsWindowsAddParams: () => AppsWindowsAddParams,
|
|
85
|
+
AppsWindowsListParams: () => AppsWindowsListParams,
|
|
86
|
+
AppsWindowsListResult: () => AppsWindowsListResult,
|
|
87
|
+
AppsWindowsOpenParams: () => AppsWindowsOpenParams,
|
|
88
|
+
AppsWindowsProcessesParams: () => AppsWindowsProcessesParams,
|
|
89
|
+
AppsWindowsProcessesResult: () => AppsWindowsProcessesResult,
|
|
90
|
+
AppsWindowsRefreshUsageParams: () => AppsWindowsRefreshUsageParams,
|
|
91
|
+
AppsWindowsReloadParams: () => AppsWindowsReloadParams,
|
|
92
|
+
AppsWindowsRestartParams: () => AppsWindowsRestartParams,
|
|
93
|
+
AppsWindowsSaveNamesParams: () => AppsWindowsSaveNamesParams,
|
|
62
94
|
AudioDevice: () => AudioDevice,
|
|
63
95
|
AudioDevicesParams: () => AudioDevicesParams,
|
|
64
96
|
AudioDevicesResult: () => AudioDevicesResult,
|
|
@@ -71,6 +103,7 @@ __export(src_exports, {
|
|
|
71
103
|
CLOSE_RULES: () => CLOSE_RULES,
|
|
72
104
|
CONTRACT_SHA256: () => CONTRACT_SHA256,
|
|
73
105
|
CancelMsg: () => CancelMsg,
|
|
106
|
+
ChatFamily: () => ChatFamily,
|
|
74
107
|
ChatHidden: () => ChatHidden,
|
|
75
108
|
ChatId: () => ChatId,
|
|
76
109
|
ChatLastUse: () => ChatLastUse,
|
|
@@ -100,6 +133,7 @@ __export(src_exports, {
|
|
|
100
133
|
CodingPlanMissingParams: () => CodingPlanMissingParams,
|
|
101
134
|
CodingServiceCredentials: () => CodingServiceCredentials,
|
|
102
135
|
CodingServiceProgress: () => CodingServiceProgress,
|
|
136
|
+
ColdChat: () => ColdChat,
|
|
103
137
|
ContractHash: () => ContractHash,
|
|
104
138
|
CoreToClientMsg: () => CoreToClientMsg,
|
|
105
139
|
CoreToServiceMsg: () => CoreToServiceMsg,
|
|
@@ -297,6 +331,16 @@ __export(src_exports, {
|
|
|
297
331
|
SessionReleaseParams: () => SessionReleaseParams,
|
|
298
332
|
SessionReleaseResult: () => SessionReleaseResult,
|
|
299
333
|
Signal: () => Signal,
|
|
334
|
+
SpendAccount: () => SpendAccount,
|
|
335
|
+
SpendChat: () => SpendChat,
|
|
336
|
+
SpendHelper: () => SpendHelper,
|
|
337
|
+
SpendIdle: () => SpendIdle,
|
|
338
|
+
SpendIdleScope: () => SpendIdleScope,
|
|
339
|
+
SpendLive: () => SpendLive,
|
|
340
|
+
SpendModel: () => SpendModel,
|
|
341
|
+
SpendScopes: () => SpendScopes,
|
|
342
|
+
SpendSplit: () => SpendSplit,
|
|
343
|
+
SpendStart: () => SpendStart,
|
|
300
344
|
StreamMeta: () => StreamMeta,
|
|
301
345
|
StreamMsg: () => StreamMsg,
|
|
302
346
|
SysinfoGetParams: () => SysinfoGetParams,
|
|
@@ -362,7 +406,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
362
406
|
// src/schema/primitives.ts
|
|
363
407
|
var import_zod = require("zod");
|
|
364
408
|
var PROTOCOL_MAJOR = 1;
|
|
365
|
-
var PROTOCOL_MINOR =
|
|
409
|
+
var PROTOCOL_MINOR = 11;
|
|
366
410
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
367
411
|
var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
368
412
|
var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -1325,6 +1369,11 @@ var ChatRow = import_zod12.z.strictObject({
|
|
|
1325
1369
|
warnings: import_zod12.z.array(import_zod12.z.string().max(400)).max(20),
|
|
1326
1370
|
last_use: ChatLastUse.nullable()
|
|
1327
1371
|
});
|
|
1372
|
+
var ChatFamily = import_zod12.z.strictObject({
|
|
1373
|
+
id: ChatId,
|
|
1374
|
+
fork_of: ChatId.nullable(),
|
|
1375
|
+
copy_of: ChatId.nullable()
|
|
1376
|
+
});
|
|
1328
1377
|
var AppsChatsListParams = import_zod12.z.strictObject({
|
|
1329
1378
|
app_key: AppKey,
|
|
1330
1379
|
/** Only these chats (a live update re-reads just what changed). */
|
|
@@ -1342,7 +1391,9 @@ var AppsChatsListResult = import_zod12.z.strictObject({
|
|
|
1342
1391
|
/** 1.9: this is the copy saved at the last read, shown while everything is read again. */
|
|
1343
1392
|
updating: import_zod12.z.boolean().optional(),
|
|
1344
1393
|
/** 1.9: false while the folder watches are down (changes are not arriving); `apps.chats.watch_state` says when it changes. */
|
|
1345
|
-
live: import_zod12.z.boolean().optional()
|
|
1394
|
+
live: import_zod12.z.boolean().optional(),
|
|
1395
|
+
/** 1.10: every listed chat that is a fork or a copy of another (read from the conversations' first lines). */
|
|
1396
|
+
families: import_zod12.z.array(ChatFamily).max(2e4).optional()
|
|
1346
1397
|
});
|
|
1347
1398
|
var AppsChatsWatchParams = import_zod12.z.strictObject({ app_key: AppKey });
|
|
1348
1399
|
var AppsChatsWatchResult = import_zod12.z.strictObject({ resource_id: ResourceId, version: nonNegInt });
|
|
@@ -1396,250 +1447,430 @@ var AppsProjectsUnfileResult = import_zod12.z.strictObject({ chat: ChatRow });
|
|
|
1396
1447
|
var AppsChatsStarParams = import_zod12.z.strictObject({ app_key: AppKey, chat_id: ChatId, starred: import_zod12.z.boolean() });
|
|
1397
1448
|
var AppsChatsStarResult = import_zod12.z.strictObject({ chat: ChatRow });
|
|
1398
1449
|
|
|
1399
|
-
// src/schema/
|
|
1450
|
+
// src/schema/apps-accounts.ts
|
|
1400
1451
|
var import_zod13 = require("zod");
|
|
1452
|
+
var AppWindowInfo = import_zod13.z.strictObject({
|
|
1453
|
+
key: ChatPlace,
|
|
1454
|
+
/** The app's default profile (Claude: main, which may sign into any account). */
|
|
1455
|
+
main: import_zod13.z.boolean(),
|
|
1456
|
+
/** The account the window is meant for (null for main). */
|
|
1457
|
+
account: import_zod13.z.string().max(320).nullable(),
|
|
1458
|
+
/** The account signed in there now: an email, or the account id while it has no saved name. */
|
|
1459
|
+
signed_in: import_zod13.z.string().max(320).nullable(),
|
|
1460
|
+
signed_in_is_email: import_zod13.z.boolean(),
|
|
1461
|
+
/** Signed into another account than the one it is meant for. */
|
|
1462
|
+
mismatch: import_zod13.z.boolean(),
|
|
1463
|
+
/** Its folder exists. */
|
|
1464
|
+
created: import_zod13.z.boolean(),
|
|
1465
|
+
/** Open now. */
|
|
1466
|
+
running: import_zod13.z.boolean(),
|
|
1467
|
+
/** Chats open in it now (a process resuming each one). */
|
|
1468
|
+
open_chats: nonNegInt
|
|
1469
|
+
});
|
|
1470
|
+
var AccountUsage = import_zod13.z.strictObject({
|
|
1471
|
+
/** The account's email, or "org <8 chars>" when no window has ever sampled that org. */
|
|
1472
|
+
account: import_zod13.z.string().max(320),
|
|
1473
|
+
org: import_zod13.z.string().max(80).nullable(),
|
|
1474
|
+
/** False when the org was sampled in several accounts' windows and the vote is not clear (≥ 75 %). */
|
|
1475
|
+
account_certain: import_zod13.z.boolean(),
|
|
1476
|
+
/** 5-hour use in percent (0 once the reading is over 5 hours old). */
|
|
1477
|
+
five_hour: import_zod13.z.number().nullable(),
|
|
1478
|
+
five_hour_reset_since: import_zod13.z.boolean(),
|
|
1479
|
+
/** Weekly use in percent (0 once the week reset after the reading). */
|
|
1480
|
+
weekly: import_zod13.z.number().nullable(),
|
|
1481
|
+
weekly_reset_since: import_zod13.z.boolean(),
|
|
1482
|
+
/** Extra-usage spend in percent of its cap, when on. */
|
|
1483
|
+
extra_usage: import_zod13.z.number().nullable(),
|
|
1484
|
+
extra_usage_as_of_ms: epochMs.nullable(),
|
|
1485
|
+
as_of_ms: epochMs,
|
|
1486
|
+
/** The windows meant for this account (and main when main took the reading). */
|
|
1487
|
+
windows: import_zod13.z.array(ChatPlace).max(200),
|
|
1488
|
+
/** The window that took the reading is open now and the reading is under 30 minutes old. */
|
|
1489
|
+
live: import_zod13.z.boolean(),
|
|
1490
|
+
/** The next weekly reset, when known. */
|
|
1491
|
+
weekly_resets_at_ms: epochMs.nullable(),
|
|
1492
|
+
/** That reset time is Claude's own (its reading, or a reset seen in its usage history). */
|
|
1493
|
+
weekly_reset_official: import_zod13.z.boolean().nullable()
|
|
1494
|
+
});
|
|
1495
|
+
var AccountReset = import_zod13.z.strictObject({
|
|
1496
|
+
window: ChatPlace,
|
|
1497
|
+
account: import_zod13.z.string().max(320).nullable(),
|
|
1498
|
+
next_reset_ms: epochMs.nullable(),
|
|
1499
|
+
/** claude: the app's own reading; usage_history: a weekly drop seen in its usage record; your_list: the person's own entry. */
|
|
1500
|
+
source: import_zod13.z.enum(["claude", "usage_history", "your_list"]).nullable(),
|
|
1501
|
+
/** claude or usage_history. */
|
|
1502
|
+
official: import_zod13.z.boolean(),
|
|
1503
|
+
/** Set when the person's list disagrees with the official time. */
|
|
1504
|
+
note: import_zod13.z.string().max(200).nullable()
|
|
1505
|
+
});
|
|
1506
|
+
var AppsWindowsListParams = import_zod13.z.strictObject({ app_key: AppKey });
|
|
1507
|
+
var AppsWindowsListResult = import_zod13.z.strictObject({ app_key: AppKey, windows: import_zod13.z.array(AppWindowInfo).max(200) });
|
|
1508
|
+
var AppsAccountsUsageParams = import_zod13.z.strictObject({ app_key: AppKey });
|
|
1509
|
+
var AppsAccountsUsageResult = import_zod13.z.strictObject({ app_key: AppKey, accounts: import_zod13.z.array(AccountUsage).max(500) });
|
|
1510
|
+
var AppsAccountsResetsParams = import_zod13.z.strictObject({ app_key: AppKey });
|
|
1511
|
+
var AppsAccountsResetsResult = import_zod13.z.strictObject({ app_key: AppKey, resets: import_zod13.z.array(AccountReset).max(200) });
|
|
1512
|
+
var AppsWindowActionResult = import_zod13.z.strictObject({ message: import_zod13.z.string().max(400) });
|
|
1513
|
+
var AppsWindowsOpenParams = import_zod13.z.strictObject({ app_key: AppKey, window: ChatPlace });
|
|
1514
|
+
var AppsWindowsReloadParams = import_zod13.z.strictObject({ app_key: AppKey, window: ChatPlace });
|
|
1515
|
+
var AppsWindowsRestartParams = import_zod13.z.strictObject({ app_key: AppKey, window: ChatPlace, force: import_zod13.z.boolean().default(false) });
|
|
1516
|
+
var AppsWindowsRefreshUsageParams = import_zod13.z.strictObject({ app_key: AppKey, window: ChatPlace });
|
|
1517
|
+
var AppsProjectsMoveParams = import_zod13.z.strictObject({
|
|
1518
|
+
app_key: AppKey,
|
|
1519
|
+
chat_id: ChatId,
|
|
1520
|
+
from_project_id: ChatProjectId,
|
|
1521
|
+
to_project_id: ChatProjectId.optional(),
|
|
1522
|
+
new_project_name: import_zod13.z.string().min(1).max(200).optional()
|
|
1523
|
+
});
|
|
1524
|
+
var AppsProjectsMoveResult = import_zod13.z.strictObject({ chat: ChatRow, project: ChatProject });
|
|
1525
|
+
var AppsProjectsCreateParams = import_zod13.z.strictObject({ app_key: AppKey, name: import_zod13.z.string().min(1).max(200) });
|
|
1526
|
+
var AppsProjectsCreateResult = import_zod13.z.strictObject({ project: ChatProject });
|
|
1527
|
+
var AppsProjectsImportPinsParams = import_zod13.z.strictObject({ app_key: AppKey });
|
|
1528
|
+
var AppsProjectsImportPinsResult = import_zod13.z.strictObject({ message: import_zod13.z.string().max(400) });
|
|
1529
|
+
var ColdChat = import_zod13.z.strictObject({
|
|
1530
|
+
id: ChatId,
|
|
1531
|
+
title: import_zod13.z.string().max(1e3),
|
|
1532
|
+
repo: import_zod13.z.string().max(200).nullable(),
|
|
1533
|
+
window: import_zod13.z.string().max(64).nullable(),
|
|
1534
|
+
account: import_zod13.z.string().max(320).nullable(),
|
|
1535
|
+
model_name: import_zod13.z.string().max(120).nullable(),
|
|
1536
|
+
context_tokens: nonNegInt,
|
|
1537
|
+
cold_at_ms: epochMs,
|
|
1538
|
+
/** Waking it once the cache is cold. */
|
|
1539
|
+
cold_cost: import_zod13.z.number().nullable(),
|
|
1540
|
+
/** Waking it while the cache is warm. */
|
|
1541
|
+
warm_cost: import_zod13.z.number().nullable(),
|
|
1542
|
+
/** Its account is on extra usage (a 5-minute cache, and real money). */
|
|
1543
|
+
extra_usage: import_zod13.z.boolean(),
|
|
1544
|
+
/** A scheduled routine's run. */
|
|
1545
|
+
scheduled: import_zod13.z.boolean(),
|
|
1546
|
+
/** It can be shown in its window (started in the desktop app). */
|
|
1547
|
+
openable: import_zod13.z.boolean(),
|
|
1548
|
+
/** How its window was decided, or why it can't be opened. */
|
|
1549
|
+
how: import_zod13.z.string().max(200).nullable()
|
|
1550
|
+
});
|
|
1551
|
+
var AppsChatsColdParams = import_zod13.z.strictObject({ app_key: AppKey });
|
|
1552
|
+
var AppsChatsColdResult = import_zod13.z.strictObject({
|
|
1553
|
+
app_key: AppKey,
|
|
1554
|
+
/** Waiting for the person with a warm cache, most urgent first. */
|
|
1555
|
+
waiting: import_zod13.z.array(ColdChat).max(2e3),
|
|
1556
|
+
/** Went cold in the last while. */
|
|
1557
|
+
recently_cold: import_zod13.z.array(ColdChat).max(2e3),
|
|
1558
|
+
/** Chats working right now (not waiting). */
|
|
1559
|
+
working: nonNegInt
|
|
1560
|
+
});
|
|
1561
|
+
var AppsChatsOpenParams = import_zod13.z.strictObject({ app_key: AppKey, chat_id: ChatId, window: ChatPlace.optional() });
|
|
1562
|
+
var SpendSplit = import_zod13.z.strictObject({ main: import_zod13.z.number(), helpers: import_zod13.z.number() });
|
|
1563
|
+
var SpendScopes = import_zod13.z.strictObject({ today: SpendSplit, week: SpendSplit });
|
|
1564
|
+
var SpendAccount = import_zod13.z.strictObject({
|
|
1565
|
+
account: import_zod13.z.string().max(320),
|
|
1566
|
+
spend: SpendScopes,
|
|
1567
|
+
last_hour: import_zod13.z.number().nullable(),
|
|
1568
|
+
last_5h: import_zod13.z.number().nullable(),
|
|
1569
|
+
five_hour: import_zod13.z.number().nullable(),
|
|
1570
|
+
weekly: import_zod13.z.number().nullable(),
|
|
1571
|
+
as_of_ms: epochMs.nullable(),
|
|
1572
|
+
weekly_resets_at_ms: epochMs.nullable(),
|
|
1573
|
+
/** When the 5-hour or weekly limit is projected to be reached at the current burn. */
|
|
1574
|
+
five_hour_full_at_ms: epochMs.nullable(),
|
|
1575
|
+
weekly_full_at_ms: epochMs.nullable(),
|
|
1576
|
+
/** The reading is too old to project. */
|
|
1577
|
+
stale: import_zod13.z.boolean()
|
|
1578
|
+
});
|
|
1579
|
+
var SpendModel = import_zod13.z.strictObject({ model: import_zod13.z.string().max(120), name: import_zod13.z.string().max(120), spend: SpendScopes });
|
|
1580
|
+
var SpendChat = import_zod13.z.strictObject({
|
|
1581
|
+
id: ChatId,
|
|
1582
|
+
title: import_zod13.z.string().max(1e3),
|
|
1583
|
+
repo: import_zod13.z.string().max(200).nullable(),
|
|
1584
|
+
window: import_zod13.z.string().max(64).nullable(),
|
|
1585
|
+
spend: SpendScopes,
|
|
1586
|
+
helpers: nonNegInt
|
|
1587
|
+
});
|
|
1588
|
+
var SpendHelper = import_zod13.z.strictObject({ model: import_zod13.z.string().max(120), steps: nonNegInt, over_steps: import_zod13.z.boolean(), description: import_zod13.z.string().max(400) });
|
|
1589
|
+
var SpendLive = import_zod13.z.strictObject({ id: ChatId, title: import_zod13.z.string().max(1e3), window: import_zod13.z.string().max(64).nullable(), helpers: import_zod13.z.array(SpendHelper).max(200) });
|
|
1590
|
+
var SpendIdleScope = import_zod13.z.strictObject({ count: nonNegInt, tokens: nonNegInt, cost: import_zod13.z.number(), avoidable: import_zod13.z.number() });
|
|
1591
|
+
var SpendIdle = import_zod13.z.strictObject({ id: ChatId, chat: import_zod13.z.string().max(1e3), who: import_zod13.z.string().max(400), today: SpendIdleScope, week: SpendIdleScope, last_ms: epochMs });
|
|
1592
|
+
var SpendStart = import_zod13.z.strictObject({ repo: import_zod13.z.string().max(200), count: nonNegInt, median: nonNegInt, latest: import_zod13.z.array(nonNegInt).max(20), alarm: import_zod13.z.string().max(400).nullable() });
|
|
1593
|
+
var AppsSpendParams = import_zod13.z.strictObject({ app_key: AppKey });
|
|
1594
|
+
var AppsSpendResult = import_zod13.z.strictObject({
|
|
1595
|
+
app_key: AppKey,
|
|
1596
|
+
/** False while older chats are still being read. */
|
|
1597
|
+
complete: import_zod13.z.boolean(),
|
|
1598
|
+
today_total: import_zod13.z.number(),
|
|
1599
|
+
week_total: import_zod13.z.number(),
|
|
1600
|
+
idle_today: import_zod13.z.number(),
|
|
1601
|
+
idle_week: import_zod13.z.number(),
|
|
1602
|
+
/** Models with no known list price. */
|
|
1603
|
+
unpriced: import_zod13.z.array(import_zod13.z.string().max(120)).max(100),
|
|
1604
|
+
/** Helpers past their step budget, unusual starting sizes. */
|
|
1605
|
+
alarms: import_zod13.z.array(import_zod13.z.string().max(400)).max(200),
|
|
1606
|
+
live: import_zod13.z.array(SpendLive).max(200),
|
|
1607
|
+
accounts: import_zod13.z.array(SpendAccount).max(200),
|
|
1608
|
+
models: import_zod13.z.array(SpendModel).max(100),
|
|
1609
|
+
chats: import_zod13.z.array(SpendChat).max(500),
|
|
1610
|
+
idle: import_zod13.z.array(SpendIdle).max(500),
|
|
1611
|
+
starts: import_zod13.z.array(SpendStart).max(200)
|
|
1612
|
+
});
|
|
1613
|
+
var AppsSyncStatusParams = import_zod13.z.strictObject({ app_key: AppKey });
|
|
1614
|
+
var AppsSyncStatusResult = import_zod13.z.strictObject({
|
|
1615
|
+
healthy: import_zod13.z.boolean(),
|
|
1616
|
+
summary: import_zod13.z.string().max(400),
|
|
1617
|
+
problems: import_zod13.z.array(import_zod13.z.string().max(400)).max(200),
|
|
1618
|
+
warnings: import_zod13.z.array(import_zod13.z.string().max(400)).max(200),
|
|
1619
|
+
/** Accounts seen with no saved name yet (Save account names fixes them). */
|
|
1620
|
+
unnamed_accounts: import_zod13.z.array(import_zod13.z.string().max(80)).max(200),
|
|
1621
|
+
/** The full report. */
|
|
1622
|
+
output: import_zod13.z.string().max(2e5)
|
|
1623
|
+
});
|
|
1624
|
+
var AppsSyncRunParams = import_zod13.z.strictObject({ app_key: AppKey });
|
|
1625
|
+
var AppsWindowsProcessesParams = import_zod13.z.strictObject({ app_key: AppKey });
|
|
1626
|
+
var AppsWindowsProcessesResult = import_zod13.z.strictObject({ processes: import_zod13.z.array(import_zod13.z.string().max(2e3)).max(2e3) });
|
|
1627
|
+
var AppsWindowsAddParams = import_zod13.z.strictObject({ app_key: AppKey, window: ChatPlace, email: import_zod13.z.string().min(3).max(320) });
|
|
1628
|
+
var AppsWindowsSaveNamesParams = import_zod13.z.strictObject({ app_key: AppKey });
|
|
1629
|
+
|
|
1630
|
+
// src/schema/service.ts
|
|
1631
|
+
var import_zod14 = require("zod");
|
|
1401
1632
|
var SERVICE_MAX_FRAME_BYTES = 16777216;
|
|
1402
|
-
var ServiceName =
|
|
1403
|
-
var ContractHash =
|
|
1404
|
-
var ServiceToken =
|
|
1633
|
+
var ServiceName = import_zod14.z.enum(["ml", "coding"]);
|
|
1634
|
+
var ContractHash = import_zod14.z.string().regex(/^[0-9a-f]{64}$/);
|
|
1635
|
+
var ServiceToken = import_zod14.z.string().regex(/^[A-Za-z0-9_-]{43}$/);
|
|
1405
1636
|
var ServiceRequestId = u32;
|
|
1406
|
-
var ServiceHello =
|
|
1407
|
-
var ServiceWelcome =
|
|
1408
|
-
type:
|
|
1637
|
+
var ServiceHello = import_zod14.z.strictObject({ type: import_zod14.z.literal("hello"), token: ServiceToken, contract: ContractHash });
|
|
1638
|
+
var ServiceWelcome = import_zod14.z.strictObject({
|
|
1639
|
+
type: import_zod14.z.literal("welcome"),
|
|
1409
1640
|
service: ServiceName,
|
|
1410
1641
|
contract: ContractHash,
|
|
1411
1642
|
pid: nonNegInt,
|
|
1412
1643
|
/** The interpreter's version, e.g. "3.13.15". */
|
|
1413
|
-
python:
|
|
1644
|
+
python: import_zod14.z.string().max(32),
|
|
1414
1645
|
/** Every op this service serves; must equal SERVICES[service] exactly. */
|
|
1415
|
-
ops:
|
|
1646
|
+
ops: import_zod14.z.array(import_zod14.z.string().min(1).max(64)).max(64)
|
|
1416
1647
|
});
|
|
1417
|
-
var ServiceRequest =
|
|
1418
|
-
type:
|
|
1648
|
+
var ServiceRequest = import_zod14.z.strictObject({
|
|
1649
|
+
type: import_zod14.z.literal("request"),
|
|
1419
1650
|
id: ServiceRequestId,
|
|
1420
|
-
op:
|
|
1421
|
-
params:
|
|
1651
|
+
op: import_zod14.z.string().min(1).max(64),
|
|
1652
|
+
params: import_zod14.z.unknown()
|
|
1422
1653
|
// validated by the service against SERVICES[service][op].params
|
|
1423
1654
|
});
|
|
1424
|
-
var ServiceResponse =
|
|
1425
|
-
type:
|
|
1655
|
+
var ServiceResponse = import_zod14.z.strictObject({
|
|
1656
|
+
type: import_zod14.z.literal("response"),
|
|
1426
1657
|
id: ServiceRequestId,
|
|
1427
|
-
result:
|
|
1658
|
+
result: import_zod14.z.unknown()
|
|
1428
1659
|
// validated by the core against SERVICES[service][op].result
|
|
1429
1660
|
});
|
|
1430
|
-
var ServiceErrorMsg =
|
|
1431
|
-
var ServiceProgressMsg =
|
|
1432
|
-
var ServiceCancel =
|
|
1433
|
-
var ServicePing =
|
|
1434
|
-
var ServicePong =
|
|
1435
|
-
type:
|
|
1661
|
+
var ServiceErrorMsg = import_zod14.z.strictObject({ type: import_zod14.z.literal("error"), id: ServiceRequestId, error: ProtocolErrorBody });
|
|
1662
|
+
var ServiceProgressMsg = import_zod14.z.strictObject({ type: import_zod14.z.literal("progress"), id: ServiceRequestId, progress: import_zod14.z.unknown() });
|
|
1663
|
+
var ServiceCancel = import_zod14.z.strictObject({ type: import_zod14.z.literal("cancel"), id: ServiceRequestId });
|
|
1664
|
+
var ServicePing = import_zod14.z.strictObject({ type: import_zod14.z.literal("ping"), id: ServiceRequestId });
|
|
1665
|
+
var ServicePong = import_zod14.z.strictObject({
|
|
1666
|
+
type: import_zod14.z.literal("pong"),
|
|
1436
1667
|
id: ServiceRequestId,
|
|
1437
1668
|
/** Requests running now. */
|
|
1438
1669
|
busy: nonNegInt
|
|
1439
1670
|
});
|
|
1440
|
-
var ServiceShutdown =
|
|
1441
|
-
var CoreToServiceMsg =
|
|
1442
|
-
var ServiceToCoreMsg =
|
|
1671
|
+
var ServiceShutdown = import_zod14.z.strictObject({ type: import_zod14.z.literal("shutdown") });
|
|
1672
|
+
var CoreToServiceMsg = import_zod14.z.discriminatedUnion("type", [ServiceHello, ServiceRequest, ServiceCancel, ServicePing, ServiceShutdown]);
|
|
1673
|
+
var ServiceToCoreMsg = import_zod14.z.discriminatedUnion("type", [ServiceWelcome, ServiceResponse, ServiceErrorMsg, ServiceProgressMsg, ServicePong]);
|
|
1443
1674
|
|
|
1444
1675
|
// src/schema/tools.ts
|
|
1445
|
-
var
|
|
1446
|
-
var ToolLevel =
|
|
1447
|
-
var ToolOutcome =
|
|
1448
|
-
var ToolPlatform =
|
|
1449
|
-
var ToolTransport =
|
|
1450
|
-
var ToolName =
|
|
1451
|
-
var ToolLevelResult =
|
|
1676
|
+
var import_zod15 = require("zod");
|
|
1677
|
+
var ToolLevel = import_zod15.z.enum(["programmatic", "protocol", "chat"]);
|
|
1678
|
+
var ToolOutcome = import_zod15.z.enum(["pass", "fail", "skip"]);
|
|
1679
|
+
var ToolPlatform = import_zod15.z.enum(["darwin", "win32", "linux"]);
|
|
1680
|
+
var ToolTransport = import_zod15.z.enum(["in_process", "localhost", "relay", "agent"]);
|
|
1681
|
+
var ToolName = import_zod15.z.string().min(1).max(64).regex(/^[a-z][a-z0-9_]*$/);
|
|
1682
|
+
var ToolLevelResult = import_zod15.z.strictObject({
|
|
1452
1683
|
tool: ToolName,
|
|
1453
1684
|
level: ToolLevel,
|
|
1454
1685
|
platform: ToolPlatform,
|
|
1455
1686
|
transport: ToolTransport,
|
|
1456
1687
|
outcome: ToolOutcome,
|
|
1457
1688
|
/** True when the caller sat on a different network from the device (a phone on cellular, CI). */
|
|
1458
|
-
remote_network:
|
|
1689
|
+
remote_network: import_zod15.z.boolean(),
|
|
1459
1690
|
/** One line: what was asserted, or why it failed. Never a token, a file's contents or a path under a real home. */
|
|
1460
|
-
detail:
|
|
1691
|
+
detail: import_zod15.z.string().max(500),
|
|
1461
1692
|
/** The harness that produced it, e.g. `matrx-desktop test/tools/programmatic.test.ts`. */
|
|
1462
|
-
suite:
|
|
1693
|
+
suite: import_zod15.z.string().min(1).max(200),
|
|
1463
1694
|
/** The test case inside the suite. */
|
|
1464
|
-
test:
|
|
1465
|
-
run_at_ms:
|
|
1695
|
+
test: import_zod15.z.string().min(1).max(300),
|
|
1696
|
+
run_at_ms: import_zod15.z.int().min(0)
|
|
1466
1697
|
});
|
|
1467
|
-
var ToolResultsFile =
|
|
1468
|
-
schema:
|
|
1698
|
+
var ToolResultsFile = import_zod15.z.strictObject({
|
|
1699
|
+
schema: import_zod15.z.literal("matrx.tool-results.v1"),
|
|
1469
1700
|
/** The producing repo's commit (short or full SHA). */
|
|
1470
|
-
commit:
|
|
1471
|
-
results:
|
|
1701
|
+
commit: import_zod15.z.string().min(4).max(64),
|
|
1702
|
+
results: import_zod15.z.array(ToolLevelResult).max(1e4)
|
|
1472
1703
|
});
|
|
1473
1704
|
|
|
1474
1705
|
// src/schema/proc.ts
|
|
1475
|
-
var
|
|
1476
|
-
var ProcSort =
|
|
1477
|
-
var ProcListParams =
|
|
1706
|
+
var import_zod16 = require("zod");
|
|
1707
|
+
var ProcSort = import_zod16.z.enum(["cpu", "memory", "pid", "name"]);
|
|
1708
|
+
var ProcListParams = import_zod16.z.strictObject({
|
|
1478
1709
|
/** Case-insensitive substring of the process name or its command line. */
|
|
1479
|
-
name:
|
|
1710
|
+
name: import_zod16.z.string().min(1).max(128).optional(),
|
|
1480
1711
|
sort: ProcSort.default("cpu"),
|
|
1481
|
-
limit:
|
|
1712
|
+
limit: import_zod16.z.int().min(1).max(500).default(50)
|
|
1482
1713
|
});
|
|
1483
|
-
var ProcInfo =
|
|
1484
|
-
pid:
|
|
1714
|
+
var ProcInfo = import_zod16.z.strictObject({
|
|
1715
|
+
pid: import_zod16.z.int().min(0),
|
|
1485
1716
|
/** Parent process id; null where the OS does not report it. */
|
|
1486
|
-
ppid:
|
|
1487
|
-
name:
|
|
1717
|
+
ppid: import_zod16.z.int().min(0).nullable(),
|
|
1718
|
+
name: import_zod16.z.string().max(256),
|
|
1488
1719
|
/** The command line, cut to 1024 characters. */
|
|
1489
|
-
command:
|
|
1720
|
+
command: import_zod16.z.string().max(1024),
|
|
1490
1721
|
/** Share of one core, as `ps` and Task Manager report it; null where the OS does not say. */
|
|
1491
|
-
cpu_percent:
|
|
1722
|
+
cpu_percent: import_zod16.z.number().min(0).nullable(),
|
|
1492
1723
|
memory_bytes: nonNegInt.nullable(),
|
|
1493
|
-
user:
|
|
1724
|
+
user: import_zod16.z.string().max(128).nullable()
|
|
1494
1725
|
});
|
|
1495
|
-
var ProcListResult =
|
|
1496
|
-
processes:
|
|
1726
|
+
var ProcListResult = import_zod16.z.strictObject({
|
|
1727
|
+
processes: import_zod16.z.array(ProcInfo).max(500),
|
|
1497
1728
|
/** Processes that matched before `limit`. */
|
|
1498
1729
|
total: nonNegInt,
|
|
1499
|
-
truncated:
|
|
1730
|
+
truncated: import_zod16.z.boolean()
|
|
1500
1731
|
});
|
|
1501
|
-
var ProcPortsParams =
|
|
1732
|
+
var ProcPortsParams = import_zod16.z.strictObject({
|
|
1502
1733
|
/** Only this port. */
|
|
1503
|
-
port:
|
|
1734
|
+
port: import_zod16.z.int().min(1).max(65535).optional()
|
|
1504
1735
|
});
|
|
1505
|
-
var ProcPort =
|
|
1506
|
-
port:
|
|
1507
|
-
protocol:
|
|
1736
|
+
var ProcPort = import_zod16.z.strictObject({
|
|
1737
|
+
port: import_zod16.z.int().min(1).max(65535),
|
|
1738
|
+
protocol: import_zod16.z.enum(["tcp", "udp"]),
|
|
1508
1739
|
/** The local address it listens on ("127.0.0.1", "*", "::"). */
|
|
1509
|
-
address:
|
|
1510
|
-
pid:
|
|
1511
|
-
process:
|
|
1740
|
+
address: import_zod16.z.string().max(64),
|
|
1741
|
+
pid: import_zod16.z.int().min(0).nullable(),
|
|
1742
|
+
process: import_zod16.z.string().max(256).nullable()
|
|
1512
1743
|
});
|
|
1513
|
-
var ProcPortsResult =
|
|
1514
|
-
var ProcKillParams =
|
|
1515
|
-
pid:
|
|
1744
|
+
var ProcPortsResult = import_zod16.z.strictObject({ ports: import_zod16.z.array(ProcPort).max(4e3) });
|
|
1745
|
+
var ProcKillParams = import_zod16.z.strictObject({
|
|
1746
|
+
pid: import_zod16.z.int().min(1),
|
|
1516
1747
|
/** Kill outright (SIGKILL; on Windows the same /F) instead of asking it to quit. */
|
|
1517
|
-
force:
|
|
1748
|
+
force: import_zod16.z.boolean().default(false)
|
|
1518
1749
|
});
|
|
1519
|
-
var ProcKillResult =
|
|
1520
|
-
pid:
|
|
1521
|
-
signal:
|
|
1750
|
+
var ProcKillResult = import_zod16.z.strictObject({
|
|
1751
|
+
pid: import_zod16.z.int().min(1),
|
|
1752
|
+
signal: import_zod16.z.enum(["SIGTERM", "SIGKILL"]),
|
|
1522
1753
|
/** True when the process was gone within 3 s. */
|
|
1523
|
-
exited:
|
|
1754
|
+
exited: import_zod16.z.boolean()
|
|
1524
1755
|
});
|
|
1525
1756
|
|
|
1526
1757
|
// src/schema/clipboard.ts
|
|
1527
|
-
var
|
|
1528
|
-
var ClipboardReadParams =
|
|
1529
|
-
var ClipboardReadResult =
|
|
1758
|
+
var import_zod17 = require("zod");
|
|
1759
|
+
var ClipboardReadParams = import_zod17.z.strictObject({});
|
|
1760
|
+
var ClipboardReadResult = import_zod17.z.strictObject({
|
|
1530
1761
|
/** The clipboard's text ("" when it holds none), cut to 1 MiB. */
|
|
1531
|
-
text:
|
|
1532
|
-
truncated:
|
|
1762
|
+
text: import_zod17.z.string().max(1048576),
|
|
1763
|
+
truncated: import_zod17.z.boolean()
|
|
1533
1764
|
});
|
|
1534
|
-
var ClipboardWriteParams =
|
|
1535
|
-
var ClipboardWriteResult =
|
|
1765
|
+
var ClipboardWriteParams = import_zod17.z.strictObject({ text: import_zod17.z.string().max(1048576) });
|
|
1766
|
+
var ClipboardWriteResult = import_zod17.z.strictObject({ bytes: nonNegInt });
|
|
1536
1767
|
|
|
1537
1768
|
// src/schema/system.ts
|
|
1538
|
-
var
|
|
1539
|
-
var SystemOpenUrlParams =
|
|
1769
|
+
var import_zod18 = require("zod");
|
|
1770
|
+
var SystemOpenUrlParams = import_zod18.z.strictObject({
|
|
1540
1771
|
/** http, https or mailto; opened in the person's default app for it. */
|
|
1541
|
-
url:
|
|
1772
|
+
url: import_zod18.z.string().min(1).max(4096)
|
|
1542
1773
|
});
|
|
1543
|
-
var SystemOpenUrlResult =
|
|
1544
|
-
var SystemOpenPathParams =
|
|
1774
|
+
var SystemOpenUrlResult = import_zod18.z.strictObject({ url: import_zod18.z.string().max(4096) });
|
|
1775
|
+
var SystemOpenPathParams = import_zod18.z.strictObject({
|
|
1545
1776
|
path: AbsPath,
|
|
1546
1777
|
/** Show it in the file manager (Finder, Explorer) instead of opening it. */
|
|
1547
|
-
reveal:
|
|
1778
|
+
reveal: import_zod18.z.boolean().default(false)
|
|
1548
1779
|
});
|
|
1549
|
-
var SystemOpenPathResult =
|
|
1550
|
-
var SystemNotifyParams =
|
|
1551
|
-
title:
|
|
1552
|
-
body:
|
|
1780
|
+
var SystemOpenPathResult = import_zod18.z.strictObject({ path: AbsPath, revealed: import_zod18.z.boolean() });
|
|
1781
|
+
var SystemNotifyParams = import_zod18.z.strictObject({
|
|
1782
|
+
title: import_zod18.z.string().min(1).max(128),
|
|
1783
|
+
body: import_zod18.z.string().max(1024).default("")
|
|
1553
1784
|
});
|
|
1554
|
-
var SystemNotifyResult =
|
|
1785
|
+
var SystemNotifyResult = import_zod18.z.strictObject({
|
|
1555
1786
|
/** False when this computer has no notification service to show it (a bare Linux box). */
|
|
1556
|
-
shown:
|
|
1787
|
+
shown: import_zod18.z.boolean()
|
|
1557
1788
|
});
|
|
1558
1789
|
|
|
1559
1790
|
// src/schema/screen.ts
|
|
1560
|
-
var
|
|
1561
|
-
var ScreenDisplay =
|
|
1791
|
+
var import_zod19 = require("zod");
|
|
1792
|
+
var ScreenDisplay = import_zod19.z.strictObject({
|
|
1562
1793
|
/** The OS's display id; pass it to screen.capture. */
|
|
1563
1794
|
id: nonNegInt,
|
|
1564
|
-
name:
|
|
1795
|
+
name: import_zod19.z.string().max(128),
|
|
1565
1796
|
/** Position and size in the OS's logical points (x and y may be negative left of or above the main display). */
|
|
1566
|
-
x:
|
|
1567
|
-
y:
|
|
1568
|
-
width:
|
|
1569
|
-
height:
|
|
1797
|
+
x: import_zod19.z.int(),
|
|
1798
|
+
y: import_zod19.z.int(),
|
|
1799
|
+
width: import_zod19.z.int().min(1),
|
|
1800
|
+
height: import_zod19.z.int().min(1),
|
|
1570
1801
|
/** Pixels per point (2 on a Retina display). */
|
|
1571
|
-
scale:
|
|
1572
|
-
primary:
|
|
1802
|
+
scale: import_zod19.z.number().min(0.1).max(8),
|
|
1803
|
+
primary: import_zod19.z.boolean()
|
|
1573
1804
|
});
|
|
1574
|
-
var ScreenListParams =
|
|
1575
|
-
var ScreenListResult =
|
|
1576
|
-
var ScreenCaptureParams =
|
|
1805
|
+
var ScreenListParams = import_zod19.z.strictObject({});
|
|
1806
|
+
var ScreenListResult = import_zod19.z.strictObject({ displays: import_zod19.z.array(ScreenDisplay).max(32) });
|
|
1807
|
+
var ScreenCaptureParams = import_zod19.z.strictObject({
|
|
1577
1808
|
/** The display (from screen.list); the primary display when absent. */
|
|
1578
1809
|
display_id: nonNegInt.optional(),
|
|
1579
|
-
format:
|
|
1810
|
+
format: import_zod19.z.enum(["jpeg", "png"]).default("jpeg"),
|
|
1580
1811
|
/** Scale the picture down to at most this width in pixels (kept when already smaller). */
|
|
1581
|
-
max_width:
|
|
1812
|
+
max_width: import_zod19.z.int().min(160).max(7680).default(1600)
|
|
1582
1813
|
});
|
|
1583
|
-
var ScreenCaptureResult =
|
|
1814
|
+
var ScreenCaptureResult = import_zod19.z.strictObject({
|
|
1584
1815
|
display_id: nonNegInt,
|
|
1585
|
-
mime_type:
|
|
1586
|
-
width:
|
|
1587
|
-
height:
|
|
1816
|
+
mime_type: import_zod19.z.enum(["image/jpeg", "image/png"]),
|
|
1817
|
+
width: import_zod19.z.int().min(1),
|
|
1818
|
+
height: import_zod19.z.int().min(1),
|
|
1588
1819
|
/** The display's full resolution in pixels, before scaling. */
|
|
1589
|
-
source_width:
|
|
1590
|
-
source_height:
|
|
1820
|
+
source_width: import_zod19.z.int().min(1),
|
|
1821
|
+
source_height: import_zod19.z.int().min(1),
|
|
1591
1822
|
/** The image, base64 (at most 6 MiB of text). */
|
|
1592
|
-
data_base64:
|
|
1823
|
+
data_base64: import_zod19.z.string().max(6291456)
|
|
1593
1824
|
});
|
|
1594
1825
|
|
|
1595
1826
|
// src/schema/window.ts
|
|
1596
|
-
var
|
|
1597
|
-
var WindowInfo =
|
|
1827
|
+
var import_zod20 = require("zod");
|
|
1828
|
+
var WindowInfo = import_zod20.z.strictObject({
|
|
1598
1829
|
/** The OS's window handle (macOS window number, Windows HWND, X11 window id). */
|
|
1599
1830
|
id: nonNegInt,
|
|
1600
|
-
title:
|
|
1831
|
+
title: import_zod20.z.string().max(512),
|
|
1601
1832
|
/** Position and size in logical points. */
|
|
1602
|
-
x:
|
|
1603
|
-
y:
|
|
1604
|
-
width:
|
|
1605
|
-
height:
|
|
1833
|
+
x: import_zod20.z.int(),
|
|
1834
|
+
y: import_zod20.z.int(),
|
|
1835
|
+
width: import_zod20.z.int().min(0),
|
|
1836
|
+
height: import_zod20.z.int().min(0),
|
|
1606
1837
|
/**
|
|
1607
1838
|
* The application that owns the window, by the name the OS shows people; absent when the OS does
|
|
1608
1839
|
* not say. Optional (never null, the schema rule) because it was added in protocol 1.7: an older
|
|
1609
1840
|
* app's answer has no such field (FIELDS_SINCE).
|
|
1610
1841
|
*/
|
|
1611
|
-
app:
|
|
1842
|
+
app: import_zod20.z.string().max(256).optional(),
|
|
1612
1843
|
/** The owning process id; absent when the OS does not say. Added in protocol 1.7. */
|
|
1613
|
-
pid:
|
|
1844
|
+
pid: import_zod20.z.int().min(0).optional()
|
|
1614
1845
|
});
|
|
1615
|
-
var WindowListParams =
|
|
1846
|
+
var WindowListParams = import_zod20.z.strictObject({
|
|
1616
1847
|
/** Case-insensitive substring of the window title. */
|
|
1617
|
-
title:
|
|
1618
|
-
limit:
|
|
1848
|
+
title: import_zod20.z.string().min(1).max(256).optional(),
|
|
1849
|
+
limit: import_zod20.z.int().min(1).max(500).default(100)
|
|
1619
1850
|
});
|
|
1620
|
-
var WindowListResult =
|
|
1621
|
-
windows:
|
|
1851
|
+
var WindowListResult = import_zod20.z.strictObject({
|
|
1852
|
+
windows: import_zod20.z.array(WindowInfo).max(500),
|
|
1622
1853
|
total: nonNegInt,
|
|
1623
|
-
truncated:
|
|
1854
|
+
truncated: import_zod20.z.boolean()
|
|
1624
1855
|
});
|
|
1625
|
-
var WindowFocusParams =
|
|
1626
|
-
var WindowFocusResult =
|
|
1627
|
-
var WindowMoveParams =
|
|
1856
|
+
var WindowFocusParams = import_zod20.z.strictObject({ id: nonNegInt });
|
|
1857
|
+
var WindowFocusResult = import_zod20.z.strictObject({ window: WindowInfo });
|
|
1858
|
+
var WindowMoveParams = import_zod20.z.strictObject({
|
|
1628
1859
|
id: nonNegInt,
|
|
1629
1860
|
/** New top-left corner; unchanged when absent. */
|
|
1630
|
-
x:
|
|
1631
|
-
y:
|
|
1861
|
+
x: import_zod20.z.int().optional(),
|
|
1862
|
+
y: import_zod20.z.int().optional(),
|
|
1632
1863
|
/** New size; unchanged when absent. */
|
|
1633
|
-
width:
|
|
1634
|
-
height:
|
|
1864
|
+
width: import_zod20.z.int().min(50).max(16384).optional(),
|
|
1865
|
+
height: import_zod20.z.int().min(50).max(16384).optional()
|
|
1635
1866
|
});
|
|
1636
|
-
var WindowMoveResult =
|
|
1637
|
-
var WindowMinimizeParams =
|
|
1638
|
-
var WindowMinimizeResult =
|
|
1867
|
+
var WindowMoveResult = import_zod20.z.strictObject({ window: WindowInfo });
|
|
1868
|
+
var WindowMinimizeParams = import_zod20.z.strictObject({ id: nonNegInt });
|
|
1869
|
+
var WindowMinimizeResult = import_zod20.z.strictObject({ id: nonNegInt });
|
|
1639
1870
|
|
|
1640
1871
|
// src/schema/input.ts
|
|
1641
|
-
var
|
|
1642
|
-
var InputKey =
|
|
1872
|
+
var import_zod21 = require("zod");
|
|
1873
|
+
var InputKey = import_zod21.z.enum([
|
|
1643
1874
|
"cmd",
|
|
1644
1875
|
"ctrl",
|
|
1645
1876
|
"alt",
|
|
@@ -1719,203 +1950,203 @@ var InputKey = import_zod20.z.enum([
|
|
|
1719
1950
|
"backslash",
|
|
1720
1951
|
"grave"
|
|
1721
1952
|
]);
|
|
1722
|
-
var InputTypeTextParams =
|
|
1723
|
-
var InputTypeTextResult =
|
|
1724
|
-
var InputHotkeyParams =
|
|
1953
|
+
var InputTypeTextParams = import_zod21.z.strictObject({ text: import_zod21.z.string().min(1).max(1e4) });
|
|
1954
|
+
var InputTypeTextResult = import_zod21.z.strictObject({ characters: import_zod21.z.int().min(1) });
|
|
1955
|
+
var InputHotkeyParams = import_zod21.z.strictObject({
|
|
1725
1956
|
/** Pressed together in order and released in reverse: ["cmd", "shift", "t"]. */
|
|
1726
|
-
keys:
|
|
1957
|
+
keys: import_zod21.z.array(InputKey).min(1).max(6)
|
|
1727
1958
|
});
|
|
1728
|
-
var InputHotkeyResult =
|
|
1729
|
-
var InputPoint =
|
|
1730
|
-
var InputMouseMoveParams =
|
|
1959
|
+
var InputHotkeyResult = import_zod21.z.strictObject({ keys: import_zod21.z.array(InputKey) });
|
|
1960
|
+
var InputPoint = import_zod21.z.strictObject({ x: import_zod21.z.int(), y: import_zod21.z.int() });
|
|
1961
|
+
var InputMouseMoveParams = import_zod21.z.strictObject({
|
|
1731
1962
|
/** Screen position in logical points (the coordinates screen.list and window.list report). */
|
|
1732
|
-
x:
|
|
1733
|
-
y:
|
|
1963
|
+
x: import_zod21.z.int(),
|
|
1964
|
+
y: import_zod21.z.int()
|
|
1734
1965
|
});
|
|
1735
|
-
var InputMouseMoveResult =
|
|
1966
|
+
var InputMouseMoveResult = import_zod21.z.strictObject({
|
|
1736
1967
|
/** Where the pointer is now, read back from the OS. */
|
|
1737
1968
|
position: InputPoint
|
|
1738
1969
|
});
|
|
1739
|
-
var InputMouseClickParams =
|
|
1970
|
+
var InputMouseClickParams = import_zod21.z.strictObject({
|
|
1740
1971
|
/** Move here first; clicks where the pointer is when absent. */
|
|
1741
|
-
x:
|
|
1742
|
-
y:
|
|
1743
|
-
button:
|
|
1744
|
-
double:
|
|
1972
|
+
x: import_zod21.z.int().optional(),
|
|
1973
|
+
y: import_zod21.z.int().optional(),
|
|
1974
|
+
button: import_zod21.z.enum(["left", "right", "middle"]).default("left"),
|
|
1975
|
+
double: import_zod21.z.boolean().default(false)
|
|
1745
1976
|
});
|
|
1746
|
-
var InputMouseClickResult =
|
|
1977
|
+
var InputMouseClickResult = import_zod21.z.strictObject({
|
|
1747
1978
|
position: InputPoint,
|
|
1748
|
-
button:
|
|
1749
|
-
double:
|
|
1979
|
+
button: import_zod21.z.enum(["left", "right", "middle"]),
|
|
1980
|
+
double: import_zod21.z.boolean()
|
|
1750
1981
|
});
|
|
1751
1982
|
|
|
1752
1983
|
// src/schema/power.ts
|
|
1753
|
-
var
|
|
1754
|
-
var PowerStatusParams =
|
|
1755
|
-
var PowerStatusResult =
|
|
1756
|
-
has_battery:
|
|
1984
|
+
var import_zod22 = require("zod");
|
|
1985
|
+
var PowerStatusParams = import_zod22.z.strictObject({});
|
|
1986
|
+
var PowerStatusResult = import_zod22.z.strictObject({
|
|
1987
|
+
has_battery: import_zod22.z.boolean(),
|
|
1757
1988
|
/** 0–100; null without a battery. */
|
|
1758
|
-
percent:
|
|
1759
|
-
charging:
|
|
1989
|
+
percent: import_zod22.z.number().min(0).max(100).nullable(),
|
|
1990
|
+
charging: import_zod22.z.boolean().nullable(),
|
|
1760
1991
|
/** On wall power; null where the OS does not say. */
|
|
1761
|
-
plugged_in:
|
|
1992
|
+
plugged_in: import_zod22.z.boolean().nullable(),
|
|
1762
1993
|
/** Minutes of battery left; null when charging, unknown or without a battery. */
|
|
1763
1994
|
minutes_left: nonNegInt.nullable(),
|
|
1764
1995
|
/** Matrx 2 is keeping the computer awake (power.prevent_sleep) until this time; null when it is not. */
|
|
1765
1996
|
awake_until_ms: epochMs.nullable()
|
|
1766
1997
|
});
|
|
1767
|
-
var PowerPreventSleepParams =
|
|
1998
|
+
var PowerPreventSleepParams = import_zod22.z.strictObject({
|
|
1768
1999
|
/** Keep the computer awake this long; 0 lets it sleep again now. */
|
|
1769
|
-
seconds:
|
|
2000
|
+
seconds: import_zod22.z.int().min(0).max(86400),
|
|
1770
2001
|
/** Shown where the OS lists what keeps it awake. */
|
|
1771
|
-
reason:
|
|
2002
|
+
reason: import_zod22.z.string().min(1).max(128).default("Matrx 2 is working")
|
|
1772
2003
|
});
|
|
1773
|
-
var PowerPreventSleepResult =
|
|
2004
|
+
var PowerPreventSleepResult = import_zod22.z.strictObject({
|
|
1774
2005
|
/** When it may sleep again; null after seconds 0. */
|
|
1775
2006
|
awake_until_ms: epochMs.nullable()
|
|
1776
2007
|
});
|
|
1777
2008
|
|
|
1778
2009
|
// src/schema/resources.ts
|
|
1779
|
-
var
|
|
1780
|
-
var ResourcesDisk =
|
|
2010
|
+
var import_zod23 = require("zod");
|
|
2011
|
+
var ResourcesDisk = import_zod23.z.strictObject({
|
|
1781
2012
|
/** Where it is mounted ("/", "C:"). */
|
|
1782
|
-
mount:
|
|
2013
|
+
mount: import_zod23.z.string().max(512),
|
|
1783
2014
|
/** The file system ("apfs", "NTFS", "ext4"). */
|
|
1784
|
-
fs:
|
|
2015
|
+
fs: import_zod23.z.string().max(64),
|
|
1785
2016
|
size_bytes: nonNegInt,
|
|
1786
2017
|
used_bytes: nonNegInt,
|
|
1787
2018
|
available_bytes: nonNegInt
|
|
1788
2019
|
});
|
|
1789
|
-
var ResourcesSnapshotParams =
|
|
1790
|
-
var ResourcesSnapshotResult =
|
|
1791
|
-
cpu:
|
|
2020
|
+
var ResourcesSnapshotParams = import_zod23.z.strictObject({});
|
|
2021
|
+
var ResourcesSnapshotResult = import_zod23.z.strictObject({
|
|
2022
|
+
cpu: import_zod23.z.strictObject({
|
|
1792
2023
|
/** Busy share of all cores, 0–100, measured now. */
|
|
1793
|
-
percent:
|
|
1794
|
-
cores:
|
|
2024
|
+
percent: import_zod23.z.number().min(0).max(100),
|
|
2025
|
+
cores: import_zod23.z.int().min(1),
|
|
1795
2026
|
/** 1, 5 and 15 minute load averages; null on Windows. */
|
|
1796
|
-
load:
|
|
2027
|
+
load: import_zod23.z.array(import_zod23.z.number().min(0)).length(3).nullable()
|
|
1797
2028
|
}),
|
|
1798
|
-
memory:
|
|
1799
|
-
swap:
|
|
1800
|
-
disks:
|
|
2029
|
+
memory: import_zod23.z.strictObject({ total_bytes: nonNegInt, used_bytes: nonNegInt, available_bytes: nonNegInt }),
|
|
2030
|
+
swap: import_zod23.z.strictObject({ total_bytes: nonNegInt, used_bytes: nonNegInt }),
|
|
2031
|
+
disks: import_zod23.z.array(ResourcesDisk).max(64),
|
|
1801
2032
|
uptime_seconds: nonNegInt
|
|
1802
2033
|
});
|
|
1803
2034
|
|
|
1804
2035
|
// src/schema/audio.ts
|
|
1805
|
-
var
|
|
1806
|
-
var AudioDevice =
|
|
2036
|
+
var import_zod24 = require("zod");
|
|
2037
|
+
var AudioDevice = import_zod24.z.strictObject({
|
|
1807
2038
|
/** The OS's name for it, as audio.record takes it. */
|
|
1808
|
-
id:
|
|
1809
|
-
name:
|
|
1810
|
-
default:
|
|
2039
|
+
id: import_zod24.z.string().min(1).max(256),
|
|
2040
|
+
name: import_zod24.z.string().max(256),
|
|
2041
|
+
default: import_zod24.z.boolean()
|
|
1811
2042
|
});
|
|
1812
|
-
var AudioDevicesParams =
|
|
1813
|
-
var AudioDevicesResult =
|
|
1814
|
-
inputs:
|
|
1815
|
-
outputs:
|
|
2043
|
+
var AudioDevicesParams = import_zod24.z.strictObject({});
|
|
2044
|
+
var AudioDevicesResult = import_zod24.z.strictObject({
|
|
2045
|
+
inputs: import_zod24.z.array(AudioDevice).max(64),
|
|
2046
|
+
outputs: import_zod24.z.array(AudioDevice).max(64)
|
|
1816
2047
|
});
|
|
1817
|
-
var AudioRecordParams =
|
|
1818
|
-
seconds:
|
|
2048
|
+
var AudioRecordParams = import_zod24.z.strictObject({
|
|
2049
|
+
seconds: import_zod24.z.number().min(0.5).max(600),
|
|
1819
2050
|
/** The microphone (from audio.devices); the default input when absent. */
|
|
1820
|
-
device_id:
|
|
2051
|
+
device_id: import_zod24.z.string().min(1).max(256).optional(),
|
|
1821
2052
|
/** Where the WAV file goes; a new file in the temp folder when absent. */
|
|
1822
2053
|
path: AbsPath.optional()
|
|
1823
2054
|
});
|
|
1824
|
-
var AudioRecordResult =
|
|
2055
|
+
var AudioRecordResult = import_zod24.z.strictObject({
|
|
1825
2056
|
path: AbsPath,
|
|
1826
|
-
seconds:
|
|
2057
|
+
seconds: import_zod24.z.number().min(0),
|
|
1827
2058
|
bytes: nonNegInt,
|
|
1828
2059
|
/** Loudest sample, 0–1: 0 means the device gave silence. */
|
|
1829
|
-
peak:
|
|
2060
|
+
peak: import_zod24.z.number().min(0).max(1)
|
|
1830
2061
|
});
|
|
1831
|
-
var AudioPlayParams =
|
|
1832
|
-
var AudioPlayResult =
|
|
2062
|
+
var AudioPlayParams = import_zod24.z.strictObject({ path: AbsPath });
|
|
2063
|
+
var AudioPlayResult = import_zod24.z.strictObject({ path: AbsPath, seconds: import_zod24.z.number().min(0) });
|
|
1833
2064
|
|
|
1834
2065
|
// src/schema/fs-watch.ts
|
|
1835
|
-
var
|
|
1836
|
-
var FsWatchId =
|
|
1837
|
-
var FsWatchStartParams =
|
|
2066
|
+
var import_zod25 = require("zod");
|
|
2067
|
+
var FsWatchId = import_zod25.z.string().regex(/^fw_[A-Za-z0-9]{12,40}$/);
|
|
2068
|
+
var FsWatchStartParams = import_zod25.z.strictObject({
|
|
1838
2069
|
path: AbsPath,
|
|
1839
|
-
recursive:
|
|
2070
|
+
recursive: import_zod25.z.boolean().default(true),
|
|
1840
2071
|
/** Globs relative to `path` whose changes are not reported (".git/**", "node_modules/**"). */
|
|
1841
|
-
ignore:
|
|
2072
|
+
ignore: import_zod25.z.array(import_zod25.z.string().max(256)).max(64).default([])
|
|
1842
2073
|
});
|
|
1843
|
-
var FsWatchStartResult =
|
|
2074
|
+
var FsWatchStartResult = import_zod25.z.strictObject({
|
|
1844
2075
|
watch_id: FsWatchId,
|
|
1845
2076
|
path: AbsPath,
|
|
1846
2077
|
/** The watch ends by itself if nobody reads it for 30 minutes. */
|
|
1847
2078
|
expires_at_ms: epochMs
|
|
1848
2079
|
});
|
|
1849
|
-
var FsWatchEventsParams =
|
|
2080
|
+
var FsWatchEventsParams = import_zod25.z.strictObject({
|
|
1850
2081
|
watch_id: FsWatchId,
|
|
1851
2082
|
/** Wait up to this long for a first change when none is waiting (0 answers at once). */
|
|
1852
|
-
wait_ms:
|
|
2083
|
+
wait_ms: import_zod25.z.int().min(0).max(25e3).default(0)
|
|
1853
2084
|
});
|
|
1854
|
-
var FsWatchEventsResult =
|
|
2085
|
+
var FsWatchEventsResult = import_zod25.z.strictObject({
|
|
1855
2086
|
/** What changed since the last read, oldest first; re-checked against the disk when read. */
|
|
1856
|
-
changes:
|
|
2087
|
+
changes: import_zod25.z.array(FsChange).max(1e3),
|
|
1857
2088
|
/** Changes were dropped (more than 1000 waited): list the folder again. */
|
|
1858
|
-
overflow:
|
|
2089
|
+
overflow: import_zod25.z.boolean(),
|
|
1859
2090
|
expires_at_ms: epochMs
|
|
1860
2091
|
});
|
|
1861
|
-
var FsWatchStopParams =
|
|
1862
|
-
var FsWatchStopResult =
|
|
2092
|
+
var FsWatchStopParams = import_zod25.z.strictObject({ watch_id: FsWatchId });
|
|
2093
|
+
var FsWatchStopResult = import_zod25.z.strictObject({ watch_id: FsWatchId });
|
|
1863
2094
|
|
|
1864
2095
|
// src/schema/exec-job.ts
|
|
1865
|
-
var
|
|
1866
|
-
var ExecJobId =
|
|
1867
|
-
var ExecJobStartParams =
|
|
1868
|
-
command:
|
|
2096
|
+
var import_zod26 = require("zod");
|
|
2097
|
+
var ExecJobId = import_zod26.z.string().regex(/^job_[A-Za-z0-9]{12,40}$/);
|
|
2098
|
+
var ExecJobStartParams = import_zod26.z.strictObject({
|
|
2099
|
+
command: import_zod26.z.string().min(1).max(131072),
|
|
1869
2100
|
/** The folder it runs in; the home folder when absent. */
|
|
1870
2101
|
cwd: AbsPath.optional(),
|
|
1871
|
-
env:
|
|
2102
|
+
env: import_zod26.z.record(import_zod26.z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(128), import_zod26.z.string().max(32768)).optional()
|
|
1872
2103
|
});
|
|
1873
|
-
var ExecJobStartResult =
|
|
1874
|
-
var ExecJobOutputParams =
|
|
2104
|
+
var ExecJobStartResult = import_zod26.z.strictObject({ job_id: ExecJobId, pid: import_zod26.z.int().min(1), cwd: AbsPath });
|
|
2105
|
+
var ExecJobOutputParams = import_zod26.z.strictObject({
|
|
1875
2106
|
job_id: ExecJobId,
|
|
1876
2107
|
/** Byte offset into the job's output to read from (next_offset of the last read; 0 = the start). */
|
|
1877
2108
|
offset: nonNegInt.default(0),
|
|
1878
2109
|
/** Wait up to this long for new output or the exit when none is waiting (0 answers at once). */
|
|
1879
|
-
wait_ms:
|
|
1880
|
-
max_bytes:
|
|
2110
|
+
wait_ms: import_zod26.z.int().min(0).max(25e3).default(0),
|
|
2111
|
+
max_bytes: import_zod26.z.int().min(1024).max(1048576).default(65536)
|
|
1881
2112
|
});
|
|
1882
|
-
var ExecJobOutputResult =
|
|
2113
|
+
var ExecJobOutputResult = import_zod26.z.strictObject({
|
|
1883
2114
|
/** stdout and stderr interleaved as they arrived (UTF-8). */
|
|
1884
|
-
output:
|
|
2115
|
+
output: import_zod26.z.string(),
|
|
1885
2116
|
next_offset: nonNegInt,
|
|
1886
2117
|
/** Bytes before `offset` that are gone (the job keeps its last 4 MiB). */
|
|
1887
2118
|
dropped_bytes: nonNegInt,
|
|
1888
|
-
running:
|
|
1889
|
-
exit_code:
|
|
2119
|
+
running: import_zod26.z.boolean(),
|
|
2120
|
+
exit_code: import_zod26.z.int().nullable()
|
|
1890
2121
|
});
|
|
1891
|
-
var ExecJobStopParams =
|
|
2122
|
+
var ExecJobStopParams = import_zod26.z.strictObject({
|
|
1892
2123
|
job_id: ExecJobId,
|
|
1893
2124
|
/** End it at once (SIGKILL; on Windows the whole tree with /F) instead of asking it to quit. */
|
|
1894
|
-
force:
|
|
2125
|
+
force: import_zod26.z.boolean().default(false)
|
|
1895
2126
|
});
|
|
1896
|
-
var ExecJobStopResult =
|
|
1897
|
-
var ExecJobInfo =
|
|
2127
|
+
var ExecJobStopResult = import_zod26.z.strictObject({ job_id: ExecJobId, exited: import_zod26.z.boolean(), exit_code: import_zod26.z.int().nullable() });
|
|
2128
|
+
var ExecJobInfo = import_zod26.z.strictObject({
|
|
1898
2129
|
job_id: ExecJobId,
|
|
1899
|
-
command:
|
|
1900
|
-
pid:
|
|
2130
|
+
command: import_zod26.z.string().max(1024),
|
|
2131
|
+
pid: import_zod26.z.int().min(1),
|
|
1901
2132
|
cwd: AbsPath,
|
|
1902
|
-
running:
|
|
1903
|
-
exit_code:
|
|
2133
|
+
running: import_zod26.z.boolean(),
|
|
2134
|
+
exit_code: import_zod26.z.int().nullable(),
|
|
1904
2135
|
started_at_ms: epochMs,
|
|
1905
2136
|
output_bytes: nonNegInt
|
|
1906
2137
|
});
|
|
1907
|
-
var ExecJobListParams =
|
|
1908
|
-
var ExecJobListResult =
|
|
2138
|
+
var ExecJobListParams = import_zod26.z.strictObject({});
|
|
2139
|
+
var ExecJobListResult = import_zod26.z.strictObject({ jobs: import_zod26.z.array(ExecJobInfo).max(64) });
|
|
1909
2140
|
|
|
1910
2141
|
// src/schema/coding.ts
|
|
1911
|
-
var
|
|
1912
|
-
var CodingServiceCredentials =
|
|
1913
|
-
access_token:
|
|
1914
|
-
user_id:
|
|
2142
|
+
var import_zod27 = require("zod");
|
|
2143
|
+
var CodingServiceCredentials = import_zod27.z.strictObject({
|
|
2144
|
+
access_token: import_zod27.z.string().min(16).max(16384),
|
|
2145
|
+
user_id: import_zod27.z.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/),
|
|
1915
2146
|
/** The AI Matrx server this app talks to (production, or a local server on the nightly copy). */
|
|
1916
|
-
server_url:
|
|
2147
|
+
server_url: import_zod27.z.string().min(1).max(2048).regex(/^https?:\/\/[^\s/?#]+(\/[^\s?#]*)?$/)
|
|
1917
2148
|
});
|
|
1918
|
-
var CodingHistoryBlocked =
|
|
2149
|
+
var CodingHistoryBlocked = import_zod27.z.enum([
|
|
1919
2150
|
"signed_out",
|
|
1920
2151
|
"offline",
|
|
1921
2152
|
"organization_required",
|
|
@@ -1923,11 +2154,11 @@ var CodingHistoryBlocked = import_zod26.z.enum([
|
|
|
1923
2154
|
"cloud_list_unavailable",
|
|
1924
2155
|
"history_too_large"
|
|
1925
2156
|
]);
|
|
1926
|
-
var CodingHistoryFailure =
|
|
1927
|
-
session_id:
|
|
1928
|
-
reason:
|
|
2157
|
+
var CodingHistoryFailure = import_zod27.z.strictObject({
|
|
2158
|
+
session_id: import_zod27.z.string().max(64),
|
|
2159
|
+
reason: import_zod27.z.string().max(300)
|
|
1929
2160
|
});
|
|
1930
|
-
var CodingHistoryRun =
|
|
2161
|
+
var CodingHistoryRun = import_zod27.z.strictObject({
|
|
1931
2162
|
/** Claude Code sessions found on this computer. */
|
|
1932
2163
|
local_sessions: nonNegInt,
|
|
1933
2164
|
/** Of those, already complete in AI Matrx. */
|
|
@@ -1942,39 +2173,39 @@ var CodingHistoryRun = import_zod26.z.strictObject({
|
|
|
1942
2173
|
/** Changed while being read; a later run takes them. */
|
|
1943
2174
|
changed: nonNegInt,
|
|
1944
2175
|
failed: nonNegInt,
|
|
1945
|
-
failures:
|
|
2176
|
+
failures: import_zod27.z.array(CodingHistoryFailure).max(20),
|
|
1946
2177
|
/** Candidates not reached yet. */
|
|
1947
2178
|
remaining: nonNegInt,
|
|
1948
2179
|
/** The one line a person reads, e.g. "Imported 12 of 14 sessions. 140 already in AI Matrx." */
|
|
1949
|
-
summary:
|
|
2180
|
+
summary: import_zod27.z.string().max(400)
|
|
1950
2181
|
});
|
|
1951
|
-
var CodingHistoryStep =
|
|
2182
|
+
var CodingHistoryStep = import_zod27.z.strictObject({
|
|
1952
2183
|
/** Null when the run could not start (blocked before a plan existed). */
|
|
1953
|
-
plan_id:
|
|
1954
|
-
finished:
|
|
2184
|
+
plan_id: import_zod27.z.string().regex(/^[0-9a-f]{32}$/).nullable(),
|
|
2185
|
+
finished: import_zod27.z.boolean(),
|
|
1955
2186
|
blocked: CodingHistoryBlocked.nullable(),
|
|
1956
2187
|
run: CodingHistoryRun
|
|
1957
2188
|
});
|
|
1958
|
-
var CodingPlanMissingParams =
|
|
1959
|
-
var CodingImportNextParams =
|
|
1960
|
-
plan_id:
|
|
2189
|
+
var CodingPlanMissingParams = import_zod27.z.strictObject({ credentials: CodingServiceCredentials.nullable() });
|
|
2190
|
+
var CodingImportNextParams = import_zod27.z.strictObject({
|
|
2191
|
+
plan_id: import_zod27.z.string().regex(/^[0-9a-f]{32}$/),
|
|
1961
2192
|
credentials: CodingServiceCredentials.nullable()
|
|
1962
2193
|
});
|
|
1963
|
-
var CodingServiceProgress =
|
|
1964
|
-
phase:
|
|
2194
|
+
var CodingServiceProgress = import_zod27.z.strictObject({
|
|
2195
|
+
phase: import_zod27.z.enum(["checking", "importing"]),
|
|
1965
2196
|
done: nonNegInt,
|
|
1966
2197
|
total: nonNegInt
|
|
1967
2198
|
});
|
|
1968
|
-
var CodingHistoryImportMissingParams =
|
|
1969
|
-
var CodingHistoryImportMissingResult =
|
|
1970
|
-
state:
|
|
2199
|
+
var CodingHistoryImportMissingParams = import_zod27.z.strictObject({});
|
|
2200
|
+
var CodingHistoryImportMissingResult = import_zod27.z.strictObject({
|
|
2201
|
+
state: import_zod27.z.enum(["done", "blocked", "cancelled"]),
|
|
1971
2202
|
blocked: CodingHistoryBlocked.nullable(),
|
|
1972
2203
|
run: CodingHistoryRun,
|
|
1973
2204
|
elapsed_ms: nonNegInt
|
|
1974
2205
|
});
|
|
1975
|
-
var CodingHistoryProgressEvent =
|
|
2206
|
+
var CodingHistoryProgressEvent = import_zod27.z.strictObject({
|
|
1976
2207
|
request_id: RequestId,
|
|
1977
|
-
phase:
|
|
2208
|
+
phase: import_zod27.z.enum(["checking", "importing"]),
|
|
1978
2209
|
/** Sessions settled so far, of `total` candidates (0 of 0 while checking). */
|
|
1979
2210
|
done: nonNegInt,
|
|
1980
2211
|
total: nonNegInt,
|
|
@@ -2028,6 +2259,26 @@ var OPS = {
|
|
|
2028
2259
|
"apps.projects.update": { params: AppsProjectsUpdateParams, result: AppsProjectsUpdateResult, kind: "unary", since: "1.9", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2029
2260
|
"apps.projects.copy": { params: AppsProjectsCopyParams, result: AppsProjectsCopyResult, kind: "unary", since: "1.9", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2030
2261
|
"apps.projects.unfile": { params: AppsProjectsUnfileParams, result: AppsProjectsUnfileResult, kind: "unary", since: "1.8", errors: ["NOT_FOUND", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2262
|
+
// 1.10: the app's windows and accounts (usage by vote, weekly resets, window actions), project move/create, Refresh pins.
|
|
2263
|
+
"apps.windows.list": { params: AppsWindowsListParams, result: AppsWindowsListResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2264
|
+
"apps.windows.open": { params: AppsWindowsOpenParams, result: AppsWindowActionResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2265
|
+
"apps.windows.reload": { params: AppsWindowsReloadParams, result: AppsWindowActionResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "CONFLICT", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2266
|
+
"apps.windows.restart": { params: AppsWindowsRestartParams, result: AppsWindowActionResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "CONFLICT", "TIMEOUT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2267
|
+
"apps.windows.refresh_usage": { params: AppsWindowsRefreshUsageParams, result: AppsWindowActionResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "TIMEOUT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2268
|
+
"apps.accounts.usage": { params: AppsAccountsUsageParams, result: AppsAccountsUsageResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2269
|
+
"apps.accounts.resets": { params: AppsAccountsResetsParams, result: AppsAccountsResetsResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2270
|
+
"apps.projects.move": { params: AppsProjectsMoveParams, result: AppsProjectsMoveResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2271
|
+
"apps.projects.create": { params: AppsProjectsCreateParams, result: AppsProjectsCreateResult, kind: "unary", since: "1.10", errors: ["INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2272
|
+
"apps.projects.import_pins": { params: AppsProjectsImportPinsParams, result: AppsProjectsImportPinsResult, kind: "unary", since: "1.10", errors: ["CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2273
|
+
// 1.11: Going cold, Spend, sync health, windows upkeep.
|
|
2274
|
+
"apps.chats.cold": { params: AppsChatsColdParams, result: AppsChatsColdResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2275
|
+
"apps.chats.open": { params: AppsChatsOpenParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "CONFLICT", "TIMEOUT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2276
|
+
"apps.spend": { params: AppsSpendParams, result: AppsSpendResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2277
|
+
"apps.sync.status": { params: AppsSyncStatusParams, result: AppsSyncStatusResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2278
|
+
"apps.sync.run": { params: AppsSyncRunParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2279
|
+
"apps.windows.processes": { params: AppsWindowsProcessesParams, result: AppsWindowsProcessesResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2280
|
+
"apps.windows.add": { params: AppsWindowsAddParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2281
|
+
"apps.windows.save_names": { params: AppsWindowsSaveNamesParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2031
2282
|
"proc.list": { params: ProcListParams, result: ProcListResult, kind: "unary", since: "1.3", errors: ["INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2032
2283
|
"proc.ports": { params: ProcPortsParams, result: ProcPortsResult, kind: "unary", since: "1.3", errors: ["INVALID_PARAMS", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
2033
2284
|
"proc.kill": { params: ProcKillParams, result: ProcKillResult, kind: "unary", since: "1.3", errors: ["NOT_FOUND", "AUTH_FORBIDDEN", "PERMISSION_DENIED_OS", "INVALID_PARAMS", "INTERNAL"] },
|
|
@@ -2360,7 +2611,51 @@ var NAMED_SCHEMAS = {
|
|
|
2360
2611
|
AppsProjectsUpdateParams,
|
|
2361
2612
|
AppsProjectsUpdateResult,
|
|
2362
2613
|
AppsProjectsCopyParams,
|
|
2363
|
-
AppsProjectsCopyResult
|
|
2614
|
+
AppsProjectsCopyResult,
|
|
2615
|
+
ChatFamily,
|
|
2616
|
+
AppWindowInfo,
|
|
2617
|
+
AccountUsage,
|
|
2618
|
+
AccountReset,
|
|
2619
|
+
AppsWindowsListParams,
|
|
2620
|
+
AppsWindowsListResult,
|
|
2621
|
+
AppsAccountsUsageParams,
|
|
2622
|
+
AppsAccountsUsageResult,
|
|
2623
|
+
AppsAccountsResetsParams,
|
|
2624
|
+
AppsAccountsResetsResult,
|
|
2625
|
+
AppsWindowActionResult,
|
|
2626
|
+
AppsWindowsOpenParams,
|
|
2627
|
+
AppsWindowsReloadParams,
|
|
2628
|
+
AppsWindowsRestartParams,
|
|
2629
|
+
AppsWindowsRefreshUsageParams,
|
|
2630
|
+
AppsProjectsMoveParams,
|
|
2631
|
+
AppsProjectsMoveResult,
|
|
2632
|
+
AppsProjectsCreateParams,
|
|
2633
|
+
AppsProjectsCreateResult,
|
|
2634
|
+
AppsProjectsImportPinsParams,
|
|
2635
|
+
AppsProjectsImportPinsResult,
|
|
2636
|
+
ColdChat,
|
|
2637
|
+
AppsChatsColdParams,
|
|
2638
|
+
AppsChatsColdResult,
|
|
2639
|
+
AppsChatsOpenParams,
|
|
2640
|
+
SpendSplit,
|
|
2641
|
+
SpendScopes,
|
|
2642
|
+
SpendAccount,
|
|
2643
|
+
SpendModel,
|
|
2644
|
+
SpendChat,
|
|
2645
|
+
SpendHelper,
|
|
2646
|
+
SpendLive,
|
|
2647
|
+
SpendIdleScope,
|
|
2648
|
+
SpendIdle,
|
|
2649
|
+
SpendStart,
|
|
2650
|
+
AppsSpendParams,
|
|
2651
|
+
AppsSpendResult,
|
|
2652
|
+
AppsSyncStatusParams,
|
|
2653
|
+
AppsSyncStatusResult,
|
|
2654
|
+
AppsSyncRunParams,
|
|
2655
|
+
AppsWindowsProcessesParams,
|
|
2656
|
+
AppsWindowsProcessesResult,
|
|
2657
|
+
AppsWindowsAddParams,
|
|
2658
|
+
AppsWindowsSaveNamesParams
|
|
2364
2659
|
};
|
|
2365
2660
|
|
|
2366
2661
|
// src/versioning.ts
|
|
@@ -2370,7 +2665,7 @@ var FIELDS_SINCE = {
|
|
|
2370
2665
|
"RelayCallResponse|0": { protocol_version: "1.1" },
|
|
2371
2666
|
"RelayCallResponse|1": { protocol_version: "1.1" },
|
|
2372
2667
|
WindowInfo: { app: "1.7", pid: "1.7" },
|
|
2373
|
-
AppsChatsListResult: { updating: "1.9", live: "1.9" }
|
|
2668
|
+
AppsChatsListResult: { updating: "1.9", live: "1.9", families: "1.10" }
|
|
2374
2669
|
};
|
|
2375
2670
|
var NULL_SINCE = {
|
|
2376
2671
|
"RelayDeviceStatusEvent.since_ms": { since: "1.1", olderPeersGet: 0 }
|
|
@@ -2467,7 +2762,7 @@ function forPeer(op, part, value, version) {
|
|
|
2467
2762
|
var VERSIONED_RESULT_OPS = [...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys()];
|
|
2468
2763
|
|
|
2469
2764
|
// src/contract.ts
|
|
2470
|
-
var CONTRACT_SHA256 = "
|
|
2765
|
+
var CONTRACT_SHA256 = "de809e319141925b0d86c5acbfe2493f3a85cad7c668c3e20b082e9319f5199b";
|
|
2471
2766
|
|
|
2472
2767
|
// src/close-policy.ts
|
|
2473
2768
|
var CLOSE_RULES = {
|