@ai-matrx/desktop-protocol 0.21.90 → 0.21.92
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 -1
- package/dist/{chunk-server-6SXF6ZJA.js → chunk-server-AANZ3QIC.js} +2483 -2001
- package/dist/chunk-server-AANZ3QIC.js.map +1 -0
- package/dist/{chunk-server-Z5DQFRML.js → chunk-server-FPYXJ5IT.js} +3 -3
- package/dist/{chunk-server-YNRFJNST.js → chunk-server-WSXKBBEB.js} +2 -2
- package/dist/chunk-server-WSXKBBEB.js.map +1 -0
- package/dist/{chunk-server-WAAD7CFE.js → chunk-server-YUJXCEFI.js} +2 -2
- package/dist/client.cjs +2484 -2029
- 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 +3 -3
- package/dist/index.cjs +1799 -1316
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1393 -26
- package/dist/index.d.ts +1393 -26
- package/dist/index.js +108 -5
- package/dist/index.js.map +1 -1
- package/dist/{models-ABh3Fmsa.d.cts → models-D7pVOe7f.d.cts} +2251 -52
- package/dist/{models-ABh3Fmsa.d.ts → models-D7pVOe7f.d.ts} +2251 -52
- package/dist/react.d.cts +900 -5
- package/dist/react.d.ts +900 -5
- package/generated/desktop-protocol.schema.json +3490 -1859
- package/package.json +2 -15
- package/dist/chunk-server-6SXF6ZJA.js.map +0 -1
- package/dist/chunk-server-YNRFJNST.js.map +0 -1
- /package/dist/{chunk-server-Z5DQFRML.js.map → chunk-server-FPYXJ5IT.js.map} +0 -0
- /package/dist/{chunk-server-WAAD7CFE.js.map → chunk-server-YUJXCEFI.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -55,6 +55,48 @@ __export(src_exports, {
|
|
|
55
55
|
AccountVaultCopyResult: () => AccountVaultCopyResult,
|
|
56
56
|
AccountVaultListParams: () => AccountVaultListParams,
|
|
57
57
|
AccountVaultListResult: () => AccountVaultListResult,
|
|
58
|
+
ActionNeededAnswer: () => ActionNeededAnswer,
|
|
59
|
+
ActionNeededAnswerEntry: () => ActionNeededAnswerEntry,
|
|
60
|
+
ActionNeededAnswerOutcome: () => ActionNeededAnswerOutcome,
|
|
61
|
+
ActionNeededAnswerParams: () => ActionNeededAnswerParams,
|
|
62
|
+
ActionNeededAnswerResult: () => ActionNeededAnswerResult,
|
|
63
|
+
ActionNeededCancelParams: () => ActionNeededCancelParams,
|
|
64
|
+
ActionNeededCancelResult: () => ActionNeededCancelResult,
|
|
65
|
+
ActionNeededChangedEvent: () => ActionNeededChangedEvent,
|
|
66
|
+
ActionNeededChoice: () => ActionNeededChoice,
|
|
67
|
+
ActionNeededDismissParams: () => ActionNeededDismissParams,
|
|
68
|
+
ActionNeededDismissResult: () => ActionNeededDismissResult,
|
|
69
|
+
ActionNeededGetParams: () => ActionNeededGetParams,
|
|
70
|
+
ActionNeededGetResult: () => ActionNeededGetResult,
|
|
71
|
+
ActionNeededItem: () => ActionNeededItem,
|
|
72
|
+
ActionNeededKind: () => ActionNeededKind,
|
|
73
|
+
ActionNeededListParams: () => ActionNeededListParams,
|
|
74
|
+
ActionNeededListResult: () => ActionNeededListResult,
|
|
75
|
+
ActionNeededRaiseParams: () => ActionNeededRaiseParams,
|
|
76
|
+
ActionNeededRaiseResult: () => ActionNeededRaiseResult,
|
|
77
|
+
ActionNeededRemedy: () => ActionNeededRemedy,
|
|
78
|
+
ActionNeededStatus: () => ActionNeededStatus,
|
|
79
|
+
ActionNeededWaitParams: () => ActionNeededWaitParams,
|
|
80
|
+
ActionNeededWaitResult: () => ActionNeededWaitResult,
|
|
81
|
+
ActivityDropped: () => ActivityDropped,
|
|
82
|
+
ActivityHttp: () => ActivityHttp,
|
|
83
|
+
ActivityLevel: () => ActivityLevel,
|
|
84
|
+
ActivityLine: () => ActivityLine,
|
|
85
|
+
ActivitySource: () => ActivitySource,
|
|
86
|
+
ActivityTool: () => ActivityTool,
|
|
87
|
+
AgentAssetCount: () => AgentAssetCount,
|
|
88
|
+
AgentAssetFact: () => AgentAssetFact,
|
|
89
|
+
AgentAssetKind: () => AgentAssetKind,
|
|
90
|
+
AgentAssetLink: () => AgentAssetLink,
|
|
91
|
+
AgentAssetOrigin: () => AgentAssetOrigin,
|
|
92
|
+
AgentAssetRow: () => AgentAssetRow,
|
|
93
|
+
AgentAssetTool: () => AgentAssetTool,
|
|
94
|
+
AgentInstallParams: () => AgentInstallParams,
|
|
95
|
+
AgentServiceProgress: () => AgentServiceProgress,
|
|
96
|
+
AgentServiceState: () => AgentServiceState,
|
|
97
|
+
AgentServiceStateName: () => AgentServiceStateName,
|
|
98
|
+
AgentStartParams: () => AgentStartParams,
|
|
99
|
+
AgentStatusParams: () => AgentStatusParams,
|
|
58
100
|
AppAccount: () => AppAccount,
|
|
59
101
|
AppFeatureStatus: () => AppFeatureStatus,
|
|
60
102
|
AppInfo: () => AppInfo,
|
|
@@ -260,6 +302,10 @@ __export(src_exports, {
|
|
|
260
302
|
CodingAgentSetResult: () => CodingAgentSetResult,
|
|
261
303
|
CodingAgentsAccessParams: () => CodingAgentsAccessParams,
|
|
262
304
|
CodingAgentsAccessResult: () => CodingAgentsAccessResult,
|
|
305
|
+
CodingAssetsGetParams: () => CodingAssetsGetParams,
|
|
306
|
+
CodingAssetsGetResult: () => CodingAssetsGetResult,
|
|
307
|
+
CodingAssetsListParams: () => CodingAssetsListParams,
|
|
308
|
+
CodingAssetsListResult: () => CodingAssetsListResult,
|
|
263
309
|
CodingChangedEvent: () => CodingChangedEvent,
|
|
264
310
|
CodingChatPreference: () => CodingChatPreference,
|
|
265
311
|
CodingClientRequestId: () => CodingClientRequestId,
|
|
@@ -372,6 +418,11 @@ __export(src_exports, {
|
|
|
372
418
|
DesktopHealth: () => DesktopHealth,
|
|
373
419
|
DesktopProtocolError: () => DesktopProtocolError,
|
|
374
420
|
DeviceId: () => DeviceId,
|
|
421
|
+
DiagActivityClearParams: () => DiagActivityClearParams,
|
|
422
|
+
DiagActivityClearResult: () => DiagActivityClearResult,
|
|
423
|
+
DiagActivityLinesEvent: () => DiagActivityLinesEvent,
|
|
424
|
+
DiagActivityListParams: () => DiagActivityListParams,
|
|
425
|
+
DiagActivityListResult: () => DiagActivityListResult,
|
|
375
426
|
DiagErrorEntry: () => DiagErrorEntry,
|
|
376
427
|
DiagErrorKind: () => DiagErrorKind,
|
|
377
428
|
DiagErrorStatus: () => DiagErrorStatus,
|
|
@@ -970,7 +1021,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
970
1021
|
var import_zod = require("zod");
|
|
971
1022
|
var import_uuid = require("@ai-matrx/kit/uuid");
|
|
972
1023
|
var PROTOCOL_MAJOR = 1;
|
|
973
|
-
var PROTOCOL_MINOR =
|
|
1024
|
+
var PROTOCOL_MINOR = 86;
|
|
974
1025
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
975
1026
|
var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
976
1027
|
var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -3371,7 +3422,7 @@ var AppsSetupListResult = import_zod15.z.strictObject({
|
|
|
3371
3422
|
// src/schema/service.ts
|
|
3372
3423
|
var import_zod16 = require("zod");
|
|
3373
3424
|
var SERVICE_MAX_FRAME_BYTES = 16777216;
|
|
3374
|
-
var ServiceName = import_zod16.z.enum(["ml", "coding", "tools"]);
|
|
3425
|
+
var ServiceName = import_zod16.z.enum(["ml", "coding", "tools", "agent"]);
|
|
3375
3426
|
var ContractHash = import_zod16.z.string().regex(/^[0-9a-f]{64}$/);
|
|
3376
3427
|
var ServiceToken = import_zod16.z.string().regex(/^[A-Za-z0-9_-]{43}$/);
|
|
3377
3428
|
var ServiceRequestId = u32;
|
|
@@ -3512,105 +3563,259 @@ var ClipboardReadResult = import_zod19.z.strictObject({
|
|
|
3512
3563
|
var ClipboardWriteParams = import_zod19.z.strictObject({ text: import_zod19.z.string().max(1048576) });
|
|
3513
3564
|
var ClipboardWriteResult = import_zod19.z.strictObject({ bytes: nonNegInt });
|
|
3514
3565
|
|
|
3515
|
-
// src/schema/
|
|
3566
|
+
// src/schema/action-needed.ts
|
|
3516
3567
|
var import_zod20 = require("zod");
|
|
3568
|
+
var ActionNeededKind = import_zod20.z.enum([
|
|
3569
|
+
"question",
|
|
3570
|
+
"choice",
|
|
3571
|
+
"approval",
|
|
3572
|
+
"sign_in",
|
|
3573
|
+
"file",
|
|
3574
|
+
"permission",
|
|
3575
|
+
"filesystem_access",
|
|
3576
|
+
"api_key",
|
|
3577
|
+
"capability_install",
|
|
3578
|
+
"organization",
|
|
3579
|
+
"external_approval"
|
|
3580
|
+
]);
|
|
3581
|
+
var ActionNeededStatus = import_zod20.z.enum(["open", "answered", "cancelled", "expired", "dismissed"]);
|
|
3582
|
+
var ActionNeededChoice = import_zod20.z.strictObject({
|
|
3583
|
+
id: import_zod20.z.string().min(1).max(128),
|
|
3584
|
+
label: import_zod20.z.string().min(1).max(200),
|
|
3585
|
+
description: import_zod20.z.string().max(500).optional()
|
|
3586
|
+
});
|
|
3587
|
+
var ActionNeededRemedy = import_zod20.z.strictObject({
|
|
3588
|
+
kind: import_zod20.z.enum(["open_url", "open_route", "open_os_settings"]),
|
|
3589
|
+
label: import_zod20.z.string().min(1).max(120),
|
|
3590
|
+
/** open_url: an http(s) URL. */
|
|
3591
|
+
url: import_zod20.z.string().max(4096).optional(),
|
|
3592
|
+
/** open_route: a Matrx 2 place ("computer/permissions"). */
|
|
3593
|
+
route: import_zod20.z.string().max(512).optional(),
|
|
3594
|
+
/** open_os_settings: the permission's key ("screen_recording", "accessibility", …). */
|
|
3595
|
+
permission_key: import_zod20.z.string().max(64).optional()
|
|
3596
|
+
});
|
|
3597
|
+
var ActionNeededAnswer = import_zod20.z.strictObject({
|
|
3598
|
+
/** The picked choice's id (choice, approval). */
|
|
3599
|
+
choice: import_zod20.z.string().max(128).optional(),
|
|
3600
|
+
/** Their words, verbatim (question, or a note beside a pick). */
|
|
3601
|
+
text: import_zod20.z.string().max(2e4).optional(),
|
|
3602
|
+
/** A file they gave (file): an absolute native path on this computer. */
|
|
3603
|
+
file_path: import_zod20.z.string().max(4096).optional(),
|
|
3604
|
+
at_ms: epochMs
|
|
3605
|
+
});
|
|
3606
|
+
var ActionNeededItem = import_zod20.z.strictObject({
|
|
3607
|
+
/** The core's id for this request. */
|
|
3608
|
+
id: import_zod20.z.string().min(1).max(64),
|
|
3609
|
+
/** The source's dedupe key: the same need raised again is the same request. */
|
|
3610
|
+
fingerprint: import_zod20.z.string().min(3).max(512),
|
|
3611
|
+
/** Who raised it (an agent, a coding session, a feature of the app). */
|
|
3612
|
+
source: import_zod20.z.string().min(1).max(200),
|
|
3613
|
+
/** The feature or session the person recognises ("Claude · aidream", "Web › Scraping"). */
|
|
3614
|
+
feature: import_zod20.z.string().min(1).max(200),
|
|
3615
|
+
kind: ActionNeededKind,
|
|
3616
|
+
title: import_zod20.z.string().min(1).max(200),
|
|
3617
|
+
message: import_zod20.z.string().max(4e3),
|
|
3618
|
+
choices: import_zod20.z.array(ActionNeededChoice).max(20),
|
|
3619
|
+
/** The person may answer in their own words (always true for kind question). */
|
|
3620
|
+
allow_text: import_zod20.z.boolean(),
|
|
3621
|
+
remedy: ActionNeededRemedy.optional(),
|
|
3622
|
+
status: ActionNeededStatus,
|
|
3623
|
+
raised_at_ms: epochMs,
|
|
3624
|
+
/** Last time the source raised it again (a re-raise refreshes the request). */
|
|
3625
|
+
updated_at_ms: epochMs,
|
|
3626
|
+
/** When it stops waiting on its own. Absent = until answered or withdrawn. */
|
|
3627
|
+
expires_at_ms: epochMs.optional(),
|
|
3628
|
+
/** When it closed (answered, cancelled, expired, dismissed). */
|
|
3629
|
+
closed_at_ms: epochMs.optional(),
|
|
3630
|
+
/** Why it closed when nobody answered: the source's own words, or "expired". */
|
|
3631
|
+
closed_reason: import_zod20.z.string().max(500).optional(),
|
|
3632
|
+
answer: ActionNeededAnswer.optional(),
|
|
3633
|
+
/** Free details the source keeps with it (shown nowhere; returned to the source). */
|
|
3634
|
+
details: import_zod20.z.record(import_zod20.z.string(), import_zod20.z.string().max(2e3)).optional()
|
|
3635
|
+
});
|
|
3636
|
+
var ActionNeededListParams = import_zod20.z.strictObject({
|
|
3637
|
+
/** Include closed requests (newest first) after the open ones. Default false. */
|
|
3638
|
+
include_closed: import_zod20.z.boolean().optional(),
|
|
3639
|
+
/** Only one source's requests. */
|
|
3640
|
+
source: import_zod20.z.string().min(1).max(200).optional(),
|
|
3641
|
+
limit: import_zod20.z.int().min(1).max(500).optional()
|
|
3642
|
+
});
|
|
3643
|
+
var ActionNeededListResult = import_zod20.z.strictObject({
|
|
3644
|
+
items: import_zod20.z.array(ActionNeededItem).max(500),
|
|
3645
|
+
/** Every open request on this computer (the badge). */
|
|
3646
|
+
open_count: nonNegInt,
|
|
3647
|
+
as_of_ms: epochMs
|
|
3648
|
+
});
|
|
3649
|
+
var ActionNeededRaiseParams = import_zod20.z.strictObject({
|
|
3650
|
+
fingerprint: import_zod20.z.string().min(3).max(512),
|
|
3651
|
+
source: import_zod20.z.string().min(1).max(200),
|
|
3652
|
+
feature: import_zod20.z.string().min(1).max(200),
|
|
3653
|
+
kind: ActionNeededKind,
|
|
3654
|
+
title: import_zod20.z.string().min(1).max(200),
|
|
3655
|
+
message: import_zod20.z.string().max(4e3).optional(),
|
|
3656
|
+
choices: import_zod20.z.array(ActionNeededChoice).max(20).optional(),
|
|
3657
|
+
allow_text: import_zod20.z.boolean().optional(),
|
|
3658
|
+
remedy: ActionNeededRemedy.optional(),
|
|
3659
|
+
/** Stop waiting after this long (closes as expired). */
|
|
3660
|
+
expires_in_s: import_zod20.z.int().min(1).max(30 * 24 * 3600).optional(),
|
|
3661
|
+
details: import_zod20.z.record(import_zod20.z.string(), import_zod20.z.string().max(2e3)).optional()
|
|
3662
|
+
});
|
|
3663
|
+
var ActionNeededRaiseResult = import_zod20.z.strictObject({
|
|
3664
|
+
item: ActionNeededItem,
|
|
3665
|
+
/** True when an open request with this fingerprint already existed and was refreshed. */
|
|
3666
|
+
existing: import_zod20.z.boolean()
|
|
3667
|
+
});
|
|
3668
|
+
var ActionNeededGetParams = import_zod20.z.strictObject({ id: import_zod20.z.string().min(1).max(64) });
|
|
3669
|
+
var ActionNeededGetResult = import_zod20.z.strictObject({ item: ActionNeededItem });
|
|
3670
|
+
var ActionNeededWaitParams = import_zod20.z.strictObject({
|
|
3671
|
+
id: import_zod20.z.string().min(1).max(64),
|
|
3672
|
+
/** How long to wait for it to close; capped at 45 s (poll again after). Default 30. */
|
|
3673
|
+
timeout_s: import_zod20.z.int().min(0).max(45).optional()
|
|
3674
|
+
});
|
|
3675
|
+
var ActionNeededWaitResult = import_zod20.z.strictObject({
|
|
3676
|
+
item: ActionNeededItem,
|
|
3677
|
+
/** Still open when the wait ended. */
|
|
3678
|
+
timed_out: import_zod20.z.boolean()
|
|
3679
|
+
});
|
|
3680
|
+
var ActionNeededAnswerEntry = import_zod20.z.strictObject({
|
|
3681
|
+
id: import_zod20.z.string().min(1).max(64),
|
|
3682
|
+
choice: import_zod20.z.string().max(128).optional(),
|
|
3683
|
+
text: import_zod20.z.string().max(2e4).optional(),
|
|
3684
|
+
file_path: import_zod20.z.string().max(4096).optional()
|
|
3685
|
+
});
|
|
3686
|
+
var ActionNeededAnswerParams = import_zod20.z.strictObject({
|
|
3687
|
+
answers: import_zod20.z.array(ActionNeededAnswerEntry).min(1).max(100)
|
|
3688
|
+
});
|
|
3689
|
+
var ActionNeededAnswerOutcome = import_zod20.z.strictObject({
|
|
3690
|
+
id: import_zod20.z.string().min(1).max(64),
|
|
3691
|
+
ok: import_zod20.z.boolean(),
|
|
3692
|
+
item: ActionNeededItem.optional(),
|
|
3693
|
+
/** Why it was not taken, in plain words (already closed, not one of the choices, …). */
|
|
3694
|
+
refusal: import_zod20.z.string().max(500).optional()
|
|
3695
|
+
});
|
|
3696
|
+
var ActionNeededAnswerResult = import_zod20.z.strictObject({
|
|
3697
|
+
results: import_zod20.z.array(ActionNeededAnswerOutcome).max(100),
|
|
3698
|
+
open_count: nonNegInt
|
|
3699
|
+
});
|
|
3700
|
+
var ActionNeededCancelParams = import_zod20.z.strictObject({
|
|
3701
|
+
id: import_zod20.z.string().min(1).max(64).optional(),
|
|
3702
|
+
fingerprint: import_zod20.z.string().min(3).max(512).optional(),
|
|
3703
|
+
reason: import_zod20.z.string().max(500).optional()
|
|
3704
|
+
});
|
|
3705
|
+
var ActionNeededCancelResult = import_zod20.z.strictObject({
|
|
3706
|
+
/** The request it closed; absent when nothing open matched. */
|
|
3707
|
+
item: ActionNeededItem.optional(),
|
|
3708
|
+
open_count: nonNegInt
|
|
3709
|
+
});
|
|
3710
|
+
var ActionNeededDismissParams = import_zod20.z.strictObject({ ids: import_zod20.z.array(import_zod20.z.string().min(1).max(64)).min(1).max(100) });
|
|
3711
|
+
var ActionNeededDismissResult = import_zod20.z.strictObject({
|
|
3712
|
+
items: import_zod20.z.array(ActionNeededItem).max(100),
|
|
3713
|
+
open_count: nonNegInt
|
|
3714
|
+
});
|
|
3715
|
+
var ActionNeededChangedEvent = import_zod20.z.strictObject({
|
|
3716
|
+
item: ActionNeededItem,
|
|
3717
|
+
open_count: nonNegInt
|
|
3718
|
+
});
|
|
3719
|
+
|
|
3720
|
+
// src/schema/git.ts
|
|
3721
|
+
var import_zod21 = require("zod");
|
|
3517
3722
|
var GIT_MAX_OUTPUT_CHARS = 262144;
|
|
3518
|
-
var GitText =
|
|
3519
|
-
var GitName =
|
|
3520
|
-
var GitOutputResult =
|
|
3521
|
-
var GitStatusParams =
|
|
3522
|
-
var GitStatusFile =
|
|
3523
|
-
path:
|
|
3723
|
+
var GitText = import_zod21.z.string().max(GIT_MAX_OUTPUT_CHARS);
|
|
3724
|
+
var GitName = import_zod21.z.string().min(1).max(255).regex(/^[^-\s][^\s]*$/);
|
|
3725
|
+
var GitOutputResult = import_zod21.z.strictObject({ output: GitText, truncated: import_zod21.z.boolean() });
|
|
3726
|
+
var GitStatusParams = import_zod21.z.strictObject({ cwd: AbsPath });
|
|
3727
|
+
var GitStatusFile = import_zod21.z.strictObject({
|
|
3728
|
+
path: import_zod21.z.string(),
|
|
3524
3729
|
/** Porcelain v1 status letters: index (staged) and worktree; "?" for untracked. */
|
|
3525
|
-
index:
|
|
3526
|
-
worktree:
|
|
3730
|
+
index: import_zod21.z.string().length(1),
|
|
3731
|
+
worktree: import_zod21.z.string().length(1)
|
|
3527
3732
|
});
|
|
3528
|
-
var GitStatusResult =
|
|
3733
|
+
var GitStatusResult = import_zod21.z.strictObject({
|
|
3529
3734
|
/** The checked-out branch; null when HEAD is detached. */
|
|
3530
|
-
branch:
|
|
3531
|
-
upstream:
|
|
3735
|
+
branch: import_zod21.z.string().nullable(),
|
|
3736
|
+
upstream: import_zod21.z.string().nullable(),
|
|
3532
3737
|
ahead: nonNegInt,
|
|
3533
3738
|
behind: nonNegInt,
|
|
3534
|
-
files:
|
|
3535
|
-
clean:
|
|
3739
|
+
files: import_zod21.z.array(GitStatusFile).max(5e3),
|
|
3740
|
+
clean: import_zod21.z.boolean(),
|
|
3536
3741
|
/** More than 5000 changed files: the list is cut. */
|
|
3537
|
-
truncated:
|
|
3538
|
-
});
|
|
3539
|
-
var GitDiffParams =
|
|
3540
|
-
var GitDiffResult =
|
|
3541
|
-
var GitLogParams =
|
|
3542
|
-
var GitLogCommit =
|
|
3543
|
-
var GitLogResult =
|
|
3544
|
-
var GitAddParams =
|
|
3545
|
-
var GitCommitParams =
|
|
3742
|
+
truncated: import_zod21.z.boolean()
|
|
3743
|
+
});
|
|
3744
|
+
var GitDiffParams = import_zod21.z.strictObject({ cwd: AbsPath, path: import_zod21.z.string().max(4096).optional(), staged: import_zod21.z.boolean().default(false) });
|
|
3745
|
+
var GitDiffResult = import_zod21.z.strictObject({ diff: GitText, truncated: import_zod21.z.boolean() });
|
|
3746
|
+
var GitLogParams = import_zod21.z.strictObject({ cwd: AbsPath, limit: import_zod21.z.int().min(1).max(500).default(50) });
|
|
3747
|
+
var GitLogCommit = import_zod21.z.strictObject({ sha: import_zod21.z.string(), short: import_zod21.z.string(), author: import_zod21.z.string(), date: import_zod21.z.string(), subject: import_zod21.z.string() });
|
|
3748
|
+
var GitLogResult = import_zod21.z.strictObject({ commits: import_zod21.z.array(GitLogCommit).max(500) });
|
|
3749
|
+
var GitAddParams = import_zod21.z.strictObject({ cwd: AbsPath, paths: import_zod21.z.array(import_zod21.z.string().min(1).max(4096)).min(1).max(1e3) });
|
|
3750
|
+
var GitCommitParams = import_zod21.z.strictObject({
|
|
3546
3751
|
cwd: AbsPath,
|
|
3547
|
-
message:
|
|
3548
|
-
amend:
|
|
3752
|
+
message: import_zod21.z.string().min(1).max(65536),
|
|
3753
|
+
amend: import_zod21.z.boolean().default(false),
|
|
3549
3754
|
/** "Name <email>"; absent = the computer's own git identity. */
|
|
3550
|
-
author:
|
|
3755
|
+
author: import_zod21.z.string().max(512).optional()
|
|
3551
3756
|
});
|
|
3552
|
-
var GitCommitResult =
|
|
3553
|
-
var GitPushParams =
|
|
3554
|
-
var GitPullParams =
|
|
3555
|
-
var GitBranchParams =
|
|
3556
|
-
var GitBranchResult =
|
|
3757
|
+
var GitCommitResult = import_zod21.z.strictObject({ sha: import_zod21.z.string(), output: GitText, truncated: import_zod21.z.boolean() });
|
|
3758
|
+
var GitPushParams = import_zod21.z.strictObject({ cwd: AbsPath, remote: GitName.default("origin"), branch: GitName.optional(), force_with_lease: import_zod21.z.boolean().default(false) });
|
|
3759
|
+
var GitPullParams = import_zod21.z.strictObject({ cwd: AbsPath, remote: GitName.default("origin"), branch: GitName.optional(), rebase: import_zod21.z.boolean().default(false) });
|
|
3760
|
+
var GitBranchParams = import_zod21.z.strictObject({ cwd: AbsPath, action: import_zod21.z.enum(["list", "create", "delete", "switch"]), name: GitName.optional() });
|
|
3761
|
+
var GitBranchResult = import_zod21.z.strictObject({
|
|
3557
3762
|
/** The branch checked out after the action; null when detached. */
|
|
3558
|
-
current:
|
|
3763
|
+
current: import_zod21.z.string().nullable(),
|
|
3559
3764
|
/** Local branches (filled by `list`; empty otherwise). */
|
|
3560
|
-
branches:
|
|
3765
|
+
branches: import_zod21.z.array(import_zod21.z.string()).max(5e3),
|
|
3561
3766
|
output: GitText,
|
|
3562
|
-
truncated:
|
|
3767
|
+
truncated: import_zod21.z.boolean()
|
|
3563
3768
|
});
|
|
3564
|
-
var GitStashParams =
|
|
3565
|
-
var GitCloneParams =
|
|
3566
|
-
url:
|
|
3769
|
+
var GitStashParams = import_zod21.z.strictObject({ cwd: AbsPath, action: import_zod21.z.enum(["push", "pop", "list", "drop"]), message: import_zod21.z.string().max(4096).optional() });
|
|
3770
|
+
var GitCloneParams = import_zod21.z.strictObject({
|
|
3771
|
+
url: import_zod21.z.string().min(1).max(4096).regex(/^[^-]/),
|
|
3567
3772
|
/** The folder to create; must not exist yet (or be empty). */
|
|
3568
3773
|
dest: AbsPath,
|
|
3569
3774
|
branch: GitName.optional(),
|
|
3570
|
-
depth:
|
|
3775
|
+
depth: import_zod21.z.int().min(1).max(1e6).optional()
|
|
3571
3776
|
});
|
|
3572
3777
|
|
|
3573
3778
|
// src/schema/web.ts
|
|
3574
3779
|
var import_uuid4 = require("@ai-matrx/kit/uuid");
|
|
3575
|
-
var
|
|
3780
|
+
var import_zod22 = require("zod");
|
|
3576
3781
|
var WEB_MAX_TEXT_CHARS = 524288;
|
|
3577
|
-
var WebUrl =
|
|
3578
|
-
var WebText =
|
|
3579
|
-
var OrgId =
|
|
3580
|
-
var WebHeader =
|
|
3581
|
-
var WebFetchParams =
|
|
3782
|
+
var WebUrl = import_zod22.z.string().min(1).max(8192).regex(/^https?:\/\//);
|
|
3783
|
+
var WebText = import_zod22.z.string().max(WEB_MAX_TEXT_CHARS);
|
|
3784
|
+
var OrgId = import_zod22.z.string().regex(import_uuid4.UUID_SHAPE_PATTERN);
|
|
3785
|
+
var WebHeader = import_zod22.z.strictObject({ name: import_zod22.z.string().min(1).max(256), value: import_zod22.z.string().max(8192) });
|
|
3786
|
+
var WebFetchParams = import_zod22.z.strictObject({
|
|
3582
3787
|
url: WebUrl,
|
|
3583
|
-
method:
|
|
3584
|
-
headers:
|
|
3585
|
-
body:
|
|
3586
|
-
follow_redirects:
|
|
3587
|
-
timeout_s:
|
|
3588
|
-
});
|
|
3589
|
-
var WebFetchResult =
|
|
3590
|
-
status:
|
|
3591
|
-
reason:
|
|
3788
|
+
method: import_zod22.z.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]).default("GET"),
|
|
3789
|
+
headers: import_zod22.z.array(WebHeader).max(64).default([]),
|
|
3790
|
+
body: import_zod22.z.string().max(1048576).optional(),
|
|
3791
|
+
follow_redirects: import_zod22.z.boolean().default(true),
|
|
3792
|
+
timeout_s: import_zod22.z.int().min(1).max(300).default(30)
|
|
3793
|
+
});
|
|
3794
|
+
var WebFetchResult = import_zod22.z.strictObject({
|
|
3795
|
+
status: import_zod22.z.int().min(100).max(999),
|
|
3796
|
+
reason: import_zod22.z.string(),
|
|
3592
3797
|
/** The final URL after redirects. */
|
|
3593
|
-
url:
|
|
3594
|
-
content_type:
|
|
3595
|
-
headers:
|
|
3798
|
+
url: import_zod22.z.string(),
|
|
3799
|
+
content_type: import_zod22.z.string().nullable(),
|
|
3800
|
+
headers: import_zod22.z.array(WebHeader),
|
|
3596
3801
|
body: WebText,
|
|
3597
|
-
truncated:
|
|
3802
|
+
truncated: import_zod22.z.boolean(),
|
|
3598
3803
|
bytes: nonNegInt,
|
|
3599
3804
|
elapsed_ms: nonNegInt
|
|
3600
3805
|
});
|
|
3601
|
-
var WebAttachTarget =
|
|
3602
|
-
entity_type:
|
|
3603
|
-
entity_id:
|
|
3604
|
-
label:
|
|
3806
|
+
var WebAttachTarget = import_zod22.z.strictObject({
|
|
3807
|
+
entity_type: import_zod22.z.string().min(1).max(64),
|
|
3808
|
+
entity_id: import_zod22.z.string().min(1).max(128),
|
|
3809
|
+
label: import_zod22.z.string().max(200).optional()
|
|
3605
3810
|
});
|
|
3606
|
-
var WebLand =
|
|
3811
|
+
var WebLand = import_zod22.z.strictObject({
|
|
3607
3812
|
/** The organization the page is saved in; absent: this computer's active organization. */
|
|
3608
3813
|
organization_id: OrgId.optional(),
|
|
3609
3814
|
/** Keep it: AI processing starts (chunks, search). Unkept pages are saved and wait. */
|
|
3610
|
-
keep:
|
|
3611
|
-
attach_to:
|
|
3815
|
+
keep: import_zod22.z.boolean().default(false),
|
|
3816
|
+
attach_to: import_zod22.z.array(WebAttachTarget).max(8).default([])
|
|
3612
3817
|
});
|
|
3613
|
-
var WebNotSavedReason =
|
|
3818
|
+
var WebNotSavedReason = import_zod22.z.enum([
|
|
3614
3819
|
/** Nobody is signed in on this computer. Saved on sign-in. */
|
|
3615
3820
|
"signed_out",
|
|
3616
3821
|
/** AI Matrx could not be reached. Retried on its own. */
|
|
@@ -3620,249 +3825,249 @@ var WebNotSavedReason = import_zod21.z.enum([
|
|
|
3620
3825
|
/** Waiting its turn behind other pages (retried on its own). */
|
|
3621
3826
|
"queued"
|
|
3622
3827
|
]);
|
|
3623
|
-
var WebSourceNotice =
|
|
3624
|
-
var WebSourceState =
|
|
3625
|
-
|
|
3626
|
-
state:
|
|
3627
|
-
processed_document_id:
|
|
3628
|
-
source_id:
|
|
3828
|
+
var WebSourceNotice = import_zod22.z.strictObject({ code: import_zod22.z.string().max(120), message: import_zod22.z.string().max(2e3), remedy: import_zod22.z.string().max(120) });
|
|
3829
|
+
var WebSourceState = import_zod22.z.discriminatedUnion("state", [
|
|
3830
|
+
import_zod22.z.strictObject({
|
|
3831
|
+
state: import_zod22.z.literal("saved"),
|
|
3832
|
+
processed_document_id: import_zod22.z.string().min(1).max(64),
|
|
3833
|
+
source_id: import_zod22.z.string().min(1).max(128),
|
|
3629
3834
|
/** The page was already saved and nothing changed ("Already saved, no change"). */
|
|
3630
|
-
reused_existing:
|
|
3835
|
+
reused_existing: import_zod22.z.boolean(),
|
|
3631
3836
|
/** The page changed: this is a new version of that Source. */
|
|
3632
|
-
new_version_of:
|
|
3633
|
-
kept:
|
|
3634
|
-
intelligence:
|
|
3837
|
+
new_version_of: import_zod22.z.string().max(64).nullable(),
|
|
3838
|
+
kept: import_zod22.z.boolean(),
|
|
3839
|
+
intelligence: import_zod22.z.enum(["queued", "deferred", "never"]),
|
|
3635
3840
|
/** The original page as captured, kept by AI Matrx (null: the organization keeps none). */
|
|
3636
|
-
original_file_id:
|
|
3841
|
+
original_file_id: import_zod22.z.string().max(128).nullable(),
|
|
3637
3842
|
/** The organization it was saved in. */
|
|
3638
3843
|
organization_id: OrgId,
|
|
3639
|
-
notices:
|
|
3844
|
+
notices: import_zod22.z.array(WebSourceNotice).max(20)
|
|
3640
3845
|
}),
|
|
3641
|
-
|
|
3642
|
-
state:
|
|
3643
|
-
outbox_id:
|
|
3846
|
+
import_zod22.z.strictObject({
|
|
3847
|
+
state: import_zod22.z.literal("not_saved"),
|
|
3848
|
+
outbox_id: import_zod22.z.string().min(1).max(64),
|
|
3644
3849
|
reason: WebNotSavedReason,
|
|
3645
|
-
message:
|
|
3850
|
+
message: import_zod22.z.string().max(2e3)
|
|
3646
3851
|
})
|
|
3647
3852
|
]);
|
|
3648
|
-
var WebScrapeParams =
|
|
3649
|
-
urls:
|
|
3650
|
-
use_cache:
|
|
3651
|
-
get_links:
|
|
3853
|
+
var WebScrapeParams = import_zod22.z.strictObject({
|
|
3854
|
+
urls: import_zod22.z.array(WebUrl).min(1).max(20),
|
|
3855
|
+
use_cache: import_zod22.z.boolean().default(true),
|
|
3856
|
+
get_links: import_zod22.z.boolean().default(false),
|
|
3652
3857
|
/**
|
|
3653
3858
|
* Since 1.38. `auto` (absent): this computer's scraper (HTTP, its browser only when a page needs
|
|
3654
3859
|
* it). `browser`: this computer's own browser renders every page. `server`: AI Matrx's servers
|
|
3655
3860
|
* read it (their connection, not this computer's; saved there as a web capture).
|
|
3656
3861
|
*/
|
|
3657
|
-
engine:
|
|
3862
|
+
engine: import_zod22.z.enum(["auto", "browser", "server"]).optional(),
|
|
3658
3863
|
/** Since 1.38: where the pages are saved (see WebLand). */
|
|
3659
3864
|
land: WebLand.optional()
|
|
3660
3865
|
});
|
|
3661
|
-
var WebScrapePage =
|
|
3662
|
-
url:
|
|
3663
|
-
ok:
|
|
3664
|
-
status:
|
|
3665
|
-
title:
|
|
3866
|
+
var WebScrapePage = import_zod22.z.strictObject({
|
|
3867
|
+
url: import_zod22.z.string(),
|
|
3868
|
+
ok: import_zod22.z.boolean(),
|
|
3869
|
+
status: import_zod22.z.int().min(0).max(999).nullable(),
|
|
3870
|
+
title: import_zod22.z.string().nullable(),
|
|
3666
3871
|
/** The page's readable content (markdown-like text from the scraper's parse). */
|
|
3667
3872
|
text: WebText,
|
|
3668
|
-
truncated:
|
|
3873
|
+
truncated: import_zod22.z.boolean(),
|
|
3669
3874
|
/** Links found on the page (only with get_links). */
|
|
3670
|
-
links:
|
|
3875
|
+
links: import_zod22.z.array(import_zod22.z.string()).max(2e3),
|
|
3671
3876
|
/** Why the page failed (blocked, timeout, not found…), in the scraper's words; null when ok. */
|
|
3672
|
-
error:
|
|
3877
|
+
error: import_zod22.z.string().nullable(),
|
|
3673
3878
|
/** How the page was fetched (http, browser, cache). */
|
|
3674
|
-
via:
|
|
3879
|
+
via: import_zod22.z.string().nullable(),
|
|
3675
3880
|
/** Since 1.38: the page's Source (absent from a 1.37 core, and for a page that failed). */
|
|
3676
3881
|
source: WebSourceState.optional()
|
|
3677
3882
|
});
|
|
3678
|
-
var WebScrapeResult =
|
|
3679
|
-
var WebSearchParams =
|
|
3680
|
-
keywords:
|
|
3681
|
-
country:
|
|
3682
|
-
count:
|
|
3683
|
-
freshness:
|
|
3684
|
-
});
|
|
3685
|
-
var WebSearchHit =
|
|
3686
|
-
var WebSearchQueryResult =
|
|
3687
|
-
var WebSearchResult =
|
|
3688
|
-
var ToolsWebSearchParams =
|
|
3689
|
-
keywords:
|
|
3690
|
-
country:
|
|
3691
|
-
count:
|
|
3692
|
-
freshness:
|
|
3693
|
-
});
|
|
3694
|
-
var WebBrowserFetchParams =
|
|
3883
|
+
var WebScrapeResult = import_zod22.z.strictObject({ pages: import_zod22.z.array(WebScrapePage), elapsed_ms: nonNegInt });
|
|
3884
|
+
var WebSearchParams = import_zod22.z.strictObject({
|
|
3885
|
+
keywords: import_zod22.z.array(import_zod22.z.string().min(1).max(400)).min(1).max(5),
|
|
3886
|
+
country: import_zod22.z.string().min(2).max(2).default("us"),
|
|
3887
|
+
count: import_zod22.z.int().min(1).max(20).default(10),
|
|
3888
|
+
freshness: import_zod22.z.enum(["pd", "pw", "pm", "py"]).optional()
|
|
3889
|
+
});
|
|
3890
|
+
var WebSearchHit = import_zod22.z.strictObject({ title: import_zod22.z.string(), url: import_zod22.z.string(), description: import_zod22.z.string() });
|
|
3891
|
+
var WebSearchQueryResult = import_zod22.z.strictObject({ keyword: import_zod22.z.string(), hits: import_zod22.z.array(WebSearchHit), error: import_zod22.z.string().nullable() });
|
|
3892
|
+
var WebSearchResult = import_zod22.z.strictObject({ queries: import_zod22.z.array(WebSearchQueryResult), elapsed_ms: nonNegInt });
|
|
3893
|
+
var ToolsWebSearchParams = import_zod22.z.strictObject({
|
|
3894
|
+
keywords: import_zod22.z.array(import_zod22.z.string().min(1).max(400)).min(1).max(5),
|
|
3895
|
+
country: import_zod22.z.string().min(2).max(2).default("us"),
|
|
3896
|
+
count: import_zod22.z.int().min(1).max(20).default(10),
|
|
3897
|
+
freshness: import_zod22.z.enum(["pd", "pw", "pm", "py"]).optional()
|
|
3898
|
+
});
|
|
3899
|
+
var WebBrowserFetchParams = import_zod22.z.strictObject({
|
|
3695
3900
|
url: WebUrl,
|
|
3696
3901
|
/** A CSS selector to wait for before reading the page. */
|
|
3697
|
-
wait_for:
|
|
3698
|
-
wait_timeout_ms:
|
|
3902
|
+
wait_for: import_zod22.z.string().max(1024).optional(),
|
|
3903
|
+
wait_timeout_ms: import_zod22.z.int().min(100).max(12e4).default(3e4),
|
|
3699
3904
|
/** true: readable text; false: the rendered HTML. */
|
|
3700
|
-
extract_text:
|
|
3905
|
+
extract_text: import_zod22.z.boolean().default(true),
|
|
3701
3906
|
/** Since 1.38: where the rendered page is saved (see WebLand). */
|
|
3702
3907
|
land: WebLand.optional()
|
|
3703
3908
|
});
|
|
3704
|
-
var WebBrowserFetchResult =
|
|
3705
|
-
url:
|
|
3706
|
-
status:
|
|
3707
|
-
title:
|
|
3909
|
+
var WebBrowserFetchResult = import_zod22.z.strictObject({
|
|
3910
|
+
url: import_zod22.z.string(),
|
|
3911
|
+
status: import_zod22.z.int().min(0).max(999).nullable(),
|
|
3912
|
+
title: import_zod22.z.string().nullable(),
|
|
3708
3913
|
content: WebText,
|
|
3709
|
-
truncated:
|
|
3914
|
+
truncated: import_zod22.z.boolean(),
|
|
3710
3915
|
elapsed_ms: nonNegInt,
|
|
3711
3916
|
/** Since 1.38: the rendered page's Source (absent from a 1.37 core). */
|
|
3712
3917
|
source: WebSourceState.optional()
|
|
3713
3918
|
});
|
|
3714
|
-
var ToolsParseFile =
|
|
3919
|
+
var ToolsParseFile = import_zod22.z.strictObject({
|
|
3715
3920
|
/** Absolute path of the gzipped JSON the core reads, saves and then removes. */
|
|
3716
|
-
path:
|
|
3921
|
+
path: import_zod22.z.string().min(1).max(4096),
|
|
3717
3922
|
bytes: nonNegInt
|
|
3718
3923
|
});
|
|
3719
|
-
var ToolsWebScrapeParams =
|
|
3720
|
-
urls:
|
|
3721
|
-
use_cache:
|
|
3722
|
-
get_links:
|
|
3924
|
+
var ToolsWebScrapeParams = import_zod22.z.strictObject({
|
|
3925
|
+
urls: import_zod22.z.array(WebUrl).min(1).max(20),
|
|
3926
|
+
use_cache: import_zod22.z.boolean().default(true),
|
|
3927
|
+
get_links: import_zod22.z.boolean().default(false),
|
|
3723
3928
|
/** `browser`: render every page in this computer's browser, then parse it. */
|
|
3724
|
-
engine:
|
|
3929
|
+
engine: import_zod22.z.enum(["auto", "browser"]).default("auto"),
|
|
3725
3930
|
/** Pages read at once (desktop.web/scrape_concurrency). */
|
|
3726
|
-
concurrency:
|
|
3931
|
+
concurrency: import_zod22.z.int().min(1).max(20).default(5),
|
|
3727
3932
|
/** The wait between pages from the same site (desktop.web/request_delay_ms). */
|
|
3728
|
-
delay_ms:
|
|
3933
|
+
delay_ms: import_zod22.z.int().min(0).max(3e4).default(0),
|
|
3729
3934
|
/** Where the parse files go (the core's spool folder). */
|
|
3730
|
-
spool_dir:
|
|
3935
|
+
spool_dir: import_zod22.z.string().min(1).max(4096)
|
|
3731
3936
|
});
|
|
3732
|
-
var ToolsWebScrapePage =
|
|
3937
|
+
var ToolsWebScrapePage = import_zod22.z.strictObject({
|
|
3733
3938
|
page: WebScrapePage,
|
|
3734
3939
|
/** The page's whole parse, for the door; null when the page failed or had no words. */
|
|
3735
3940
|
parse: ToolsParseFile.nullable(),
|
|
3736
3941
|
/** The page as fetched, for research (rendered HTML or the HTTP body); null when not kept. */
|
|
3737
3942
|
html: ToolsParseFile.nullable()
|
|
3738
3943
|
});
|
|
3739
|
-
var ToolsWebScrapeResult =
|
|
3740
|
-
var ToolsWebBrowserFetchParams =
|
|
3944
|
+
var ToolsWebScrapeResult = import_zod22.z.strictObject({ pages: import_zod22.z.array(ToolsWebScrapePage), elapsed_ms: nonNegInt });
|
|
3945
|
+
var ToolsWebBrowserFetchParams = import_zod22.z.strictObject({
|
|
3741
3946
|
url: WebUrl,
|
|
3742
|
-
wait_for:
|
|
3743
|
-
wait_timeout_ms:
|
|
3744
|
-
extract_text:
|
|
3745
|
-
spool_dir:
|
|
3746
|
-
});
|
|
3747
|
-
var ToolsWebBrowserFetchResult =
|
|
3748
|
-
var WebRuntimeStateName =
|
|
3749
|
-
var WebRuntimeParams =
|
|
3750
|
-
var WebRuntimeState =
|
|
3947
|
+
wait_for: import_zod22.z.string().max(1024).optional(),
|
|
3948
|
+
wait_timeout_ms: import_zod22.z.int().min(100).max(12e4).default(3e4),
|
|
3949
|
+
extract_text: import_zod22.z.boolean().default(true),
|
|
3950
|
+
spool_dir: import_zod22.z.string().min(1).max(4096)
|
|
3951
|
+
});
|
|
3952
|
+
var ToolsWebBrowserFetchResult = import_zod22.z.strictObject({ result: WebBrowserFetchResult, parse: ToolsParseFile.nullable() });
|
|
3953
|
+
var WebRuntimeStateName = import_zod22.z.enum(["not_installed", "installing", "installed", "failed"]);
|
|
3954
|
+
var WebRuntimeParams = import_zod22.z.strictObject({});
|
|
3955
|
+
var WebRuntimeState = import_zod22.z.strictObject({
|
|
3751
3956
|
state: WebRuntimeStateName,
|
|
3752
3957
|
/** Why it failed, in the installer's words; null otherwise. */
|
|
3753
|
-
error:
|
|
3958
|
+
error: import_zod22.z.string().max(2e3).nullable(),
|
|
3754
3959
|
/** Bytes the browser takes on this computer (its packages and Chromium); null when unknown. */
|
|
3755
3960
|
size_bytes: nonNegInt.nullable(),
|
|
3756
3961
|
/** Whether it can show a window while it works (false: only the headless shell is installed). */
|
|
3757
|
-
can_show_window:
|
|
3962
|
+
can_show_window: import_zod22.z.boolean()
|
|
3758
3963
|
});
|
|
3759
|
-
var WebOutboxItem =
|
|
3760
|
-
outbox_id:
|
|
3761
|
-
url:
|
|
3762
|
-
title:
|
|
3964
|
+
var WebOutboxItem = import_zod22.z.strictObject({
|
|
3965
|
+
outbox_id: import_zod22.z.string().min(1).max(64),
|
|
3966
|
+
url: import_zod22.z.string().max(8192),
|
|
3967
|
+
title: import_zod22.z.string().max(500).nullable(),
|
|
3763
3968
|
organization_id: OrgId.nullable(),
|
|
3764
3969
|
reason: WebNotSavedReason,
|
|
3765
|
-
message:
|
|
3970
|
+
message: import_zod22.z.string().max(2e3),
|
|
3766
3971
|
attempts: nonNegInt,
|
|
3767
3972
|
created_at_ms: nonNegInt,
|
|
3768
3973
|
last_attempt_at_ms: nonNegInt.nullable(),
|
|
3769
3974
|
bytes: nonNegInt
|
|
3770
3975
|
});
|
|
3771
|
-
var WebOutboxListParams =
|
|
3772
|
-
var WebOutboxListResult =
|
|
3773
|
-
items:
|
|
3976
|
+
var WebOutboxListParams = import_zod22.z.strictObject({});
|
|
3977
|
+
var WebOutboxListResult = import_zod22.z.strictObject({
|
|
3978
|
+
items: import_zod22.z.array(WebOutboxItem),
|
|
3774
3979
|
bytes: nonNegInt,
|
|
3775
3980
|
/** The most the outbox holds; past it the oldest pages are dropped (and the log says so). */
|
|
3776
3981
|
cap_bytes: nonNegInt
|
|
3777
3982
|
});
|
|
3778
|
-
var WebOutboxRetryParams =
|
|
3779
|
-
var WebOutboxRetryResult =
|
|
3780
|
-
var WebOutboxDiscardParams =
|
|
3781
|
-
var WebOutboxDiscardResult =
|
|
3782
|
-
var WebLogVia =
|
|
3783
|
-
var WebLogCaller =
|
|
3784
|
-
var WebLogResult =
|
|
3785
|
-
var WebLogEntry =
|
|
3786
|
-
id:
|
|
3983
|
+
var WebOutboxRetryParams = import_zod22.z.strictObject({ outbox_id: import_zod22.z.string().min(1).max(64).optional() });
|
|
3984
|
+
var WebOutboxRetryResult = import_zod22.z.strictObject({ saved: nonNegInt, waiting: nonNegInt });
|
|
3985
|
+
var WebOutboxDiscardParams = import_zod22.z.strictObject({ outbox_id: import_zod22.z.string().min(1).max(64) });
|
|
3986
|
+
var WebOutboxDiscardResult = import_zod22.z.strictObject({ discarded: import_zod22.z.boolean() });
|
|
3987
|
+
var WebLogVia = import_zod22.z.enum(["this_computer", "browser", "server"]);
|
|
3988
|
+
var WebLogCaller = import_zod22.z.enum(["person", "agent", "research", "phone", "other"]);
|
|
3989
|
+
var WebLogResult = import_zod22.z.enum(["saved", "not_saved", "failed", "blocked", "read"]);
|
|
3990
|
+
var WebLogEntry = import_zod22.z.strictObject({
|
|
3991
|
+
id: import_zod22.z.string().min(1).max(64),
|
|
3787
3992
|
at_ms: nonNegInt,
|
|
3788
3993
|
caller: WebLogCaller,
|
|
3789
|
-
url:
|
|
3790
|
-
title:
|
|
3994
|
+
url: import_zod22.z.string().max(8192),
|
|
3995
|
+
title: import_zod22.z.string().max(500).nullable(),
|
|
3791
3996
|
result: WebLogResult,
|
|
3792
3997
|
/** One sentence: why it failed or was blocked, or the save's notice. Never page text. */
|
|
3793
|
-
detail:
|
|
3998
|
+
detail: import_zod22.z.string().max(1e3).nullable(),
|
|
3794
3999
|
via: WebLogVia,
|
|
3795
4000
|
duration_ms: nonNegInt,
|
|
3796
|
-
processed_document_id:
|
|
4001
|
+
processed_document_id: import_zod22.z.string().max(64).nullable()
|
|
3797
4002
|
});
|
|
3798
|
-
var WebLogListParams =
|
|
3799
|
-
var WebLogListResult =
|
|
3800
|
-
var WebLogClearParams =
|
|
3801
|
-
var WebLogClearResult =
|
|
3802
|
-
var WebProgressEvent =
|
|
4003
|
+
var WebLogListParams = import_zod22.z.strictObject({ since_ms: nonNegInt.optional(), limit: import_zod22.z.int().min(1).max(1e3).default(200) });
|
|
4004
|
+
var WebLogListResult = import_zod22.z.strictObject({ entries: import_zod22.z.array(WebLogEntry) });
|
|
4005
|
+
var WebLogClearParams = import_zod22.z.strictObject({});
|
|
4006
|
+
var WebLogClearResult = import_zod22.z.strictObject({ cleared: nonNegInt });
|
|
4007
|
+
var WebProgressEvent = import_zod22.z.strictObject({
|
|
3803
4008
|
request_id: RequestId,
|
|
3804
|
-
phase:
|
|
4009
|
+
phase: import_zod22.z.enum(["installing", "fetching", "saving"]),
|
|
3805
4010
|
done: nonNegInt,
|
|
3806
4011
|
total: nonNegInt
|
|
3807
4012
|
});
|
|
3808
|
-
var WebResearchItemState =
|
|
3809
|
-
var WebResearchItem =
|
|
3810
|
-
topic_id:
|
|
3811
|
-
topic_name:
|
|
3812
|
-
source_id:
|
|
3813
|
-
url:
|
|
3814
|
-
title:
|
|
4013
|
+
var WebResearchItemState = import_zod22.z.enum(["waiting", "fetching", "saved", "thin", "failed", "cannot_edit", "blocked"]);
|
|
4014
|
+
var WebResearchItem = import_zod22.z.strictObject({
|
|
4015
|
+
topic_id: import_zod22.z.string().min(1).max(64),
|
|
4016
|
+
topic_name: import_zod22.z.string().max(500),
|
|
4017
|
+
source_id: import_zod22.z.string().min(1).max(64),
|
|
4018
|
+
url: import_zod22.z.string().max(8192),
|
|
4019
|
+
title: import_zod22.z.string().max(500).nullable(),
|
|
3815
4020
|
/** The capture level this computer would try (1 quick, 2 scroll); 3+ is the extension's. */
|
|
3816
|
-
level:
|
|
3817
|
-
last_failure:
|
|
4021
|
+
level: import_zod22.z.int().min(1).max(4),
|
|
4022
|
+
last_failure: import_zod22.z.string().max(1e3).nullable(),
|
|
3818
4023
|
state: WebResearchItemState,
|
|
3819
4024
|
/** One sentence after a fetch: what happened. */
|
|
3820
|
-
message:
|
|
4025
|
+
message: import_zod22.z.string().max(1e3).nullable()
|
|
3821
4026
|
});
|
|
3822
|
-
var WebResearchQueueParams =
|
|
3823
|
-
var WebResearchQueueResult =
|
|
3824
|
-
state:
|
|
3825
|
-
problem:
|
|
4027
|
+
var WebResearchQueueParams = import_zod22.z.strictObject({ topic_id: import_zod22.z.string().min(1).max(64).optional() });
|
|
4028
|
+
var WebResearchQueueResult = import_zod22.z.strictObject({
|
|
4029
|
+
state: import_zod22.z.enum(["ready", "signed_out", "unavailable"]),
|
|
4030
|
+
problem: import_zod22.z.string().max(1e3).nullable(),
|
|
3826
4031
|
/** L1/L2 items on topics this person can edit: what this computer can fetch. */
|
|
3827
|
-
items:
|
|
4032
|
+
items: import_zod22.z.array(WebResearchItem),
|
|
3828
4033
|
/** Items on topics the person can view but not add to (shown, never fetched). */
|
|
3829
4034
|
view_only: nonNegInt
|
|
3830
4035
|
});
|
|
3831
|
-
var WebResearchFetchParams =
|
|
3832
|
-
topic_id:
|
|
3833
|
-
source_ids:
|
|
4036
|
+
var WebResearchFetchParams = import_zod22.z.strictObject({
|
|
4037
|
+
topic_id: import_zod22.z.string().min(1).max(64).optional(),
|
|
4038
|
+
source_ids: import_zod22.z.array(import_zod22.z.string().min(1).max(64)).max(200).optional()
|
|
3834
4039
|
});
|
|
3835
|
-
var WebResearchFetchResult =
|
|
3836
|
-
items:
|
|
4040
|
+
var WebResearchFetchResult = import_zod22.z.strictObject({
|
|
4041
|
+
items: import_zod22.z.array(WebResearchItem),
|
|
3837
4042
|
saved: nonNegInt,
|
|
3838
4043
|
thin: nonNegInt,
|
|
3839
4044
|
failed: nonNegInt,
|
|
3840
4045
|
cannot_edit: nonNegInt
|
|
3841
4046
|
});
|
|
3842
|
-
var ToolsServiceProgress =
|
|
4047
|
+
var ToolsServiceProgress = import_zod22.z.strictObject({ phase: import_zod22.z.enum(["fetching", "installing"]), done: nonNegInt, total: nonNegInt });
|
|
3843
4048
|
|
|
3844
4049
|
// src/schema/system.ts
|
|
3845
|
-
var
|
|
3846
|
-
var SystemOpenUrlParams =
|
|
4050
|
+
var import_zod23 = require("zod");
|
|
4051
|
+
var SystemOpenUrlParams = import_zod23.z.strictObject({
|
|
3847
4052
|
/** http, https or mailto; opened in the person's default app for it. */
|
|
3848
|
-
url:
|
|
4053
|
+
url: import_zod23.z.string().min(1).max(4096)
|
|
3849
4054
|
});
|
|
3850
|
-
var SystemOpenUrlResult =
|
|
3851
|
-
var SystemOpenPathParams =
|
|
4055
|
+
var SystemOpenUrlResult = import_zod23.z.strictObject({ url: import_zod23.z.string().max(4096) });
|
|
4056
|
+
var SystemOpenPathParams = import_zod23.z.strictObject({
|
|
3852
4057
|
path: AbsPath,
|
|
3853
4058
|
/** Show it in the file manager (Finder, Explorer) instead of opening it. */
|
|
3854
|
-
reveal:
|
|
4059
|
+
reveal: import_zod23.z.boolean().default(false)
|
|
3855
4060
|
});
|
|
3856
|
-
var SystemOpenPathResult =
|
|
3857
|
-
var SystemNotifyParams =
|
|
3858
|
-
title:
|
|
3859
|
-
body:
|
|
4061
|
+
var SystemOpenPathResult = import_zod23.z.strictObject({ path: AbsPath, revealed: import_zod23.z.boolean() });
|
|
4062
|
+
var SystemNotifyParams = import_zod23.z.strictObject({
|
|
4063
|
+
title: import_zod23.z.string().min(1).max(128),
|
|
4064
|
+
body: import_zod23.z.string().max(1024).default("")
|
|
3860
4065
|
});
|
|
3861
|
-
var SystemNotifyResult =
|
|
4066
|
+
var SystemNotifyResult = import_zod23.z.strictObject({
|
|
3862
4067
|
/** False when this computer has no notification service to show it (a bare Linux box). */
|
|
3863
|
-
shown:
|
|
4068
|
+
shown: import_zod23.z.boolean()
|
|
3864
4069
|
});
|
|
3865
|
-
var SystemSettingsPane =
|
|
4070
|
+
var SystemSettingsPane = import_zod23.z.enum([
|
|
3866
4071
|
"displays",
|
|
3867
4072
|
"night_shift",
|
|
3868
4073
|
"sound",
|
|
@@ -3897,110 +4102,110 @@ var SystemSettingsPane = import_zod22.z.enum([
|
|
|
3897
4102
|
"messages",
|
|
3898
4103
|
"mail"
|
|
3899
4104
|
]);
|
|
3900
|
-
var SystemOpenSettingsParams =
|
|
3901
|
-
var SystemOpenSettingsResult =
|
|
4105
|
+
var SystemOpenSettingsParams = import_zod23.z.strictObject({ pane: SystemSettingsPane });
|
|
4106
|
+
var SystemOpenSettingsResult = import_zod23.z.strictObject({ pane: SystemSettingsPane });
|
|
3902
4107
|
|
|
3903
4108
|
// src/schema/screen.ts
|
|
3904
|
-
var
|
|
3905
|
-
var ScreenDisplay =
|
|
4109
|
+
var import_zod24 = require("zod");
|
|
4110
|
+
var ScreenDisplay = import_zod24.z.strictObject({
|
|
3906
4111
|
/** The OS's display id; pass it to screen.capture. */
|
|
3907
4112
|
id: nonNegInt,
|
|
3908
|
-
name:
|
|
4113
|
+
name: import_zod24.z.string().max(128),
|
|
3909
4114
|
/** Position and size in the OS's logical points (x and y may be negative left of or above the main display). */
|
|
3910
|
-
x:
|
|
3911
|
-
y:
|
|
3912
|
-
width:
|
|
3913
|
-
height:
|
|
4115
|
+
x: import_zod24.z.int(),
|
|
4116
|
+
y: import_zod24.z.int(),
|
|
4117
|
+
width: import_zod24.z.int().min(1),
|
|
4118
|
+
height: import_zod24.z.int().min(1),
|
|
3914
4119
|
/** Pixels per point (2 on a Retina display). */
|
|
3915
|
-
scale:
|
|
3916
|
-
primary:
|
|
4120
|
+
scale: import_zod24.z.number().min(0.1).max(8),
|
|
4121
|
+
primary: import_zod24.z.boolean(),
|
|
3917
4122
|
/** (1.24) Clockwise rotation in degrees (Displays' Rotation: 0 is Standard). */
|
|
3918
|
-
rotation:
|
|
4123
|
+
rotation: import_zod24.z.int().min(0).max(359).optional(),
|
|
3919
4124
|
/** (1.24) Refresh rate in hertz; absent where the OS does not say. */
|
|
3920
|
-
refresh_hz:
|
|
4125
|
+
refresh_hz: import_zod24.z.number().min(0).max(1e3).optional(),
|
|
3921
4126
|
/** (1.24) The computer's own screen (a laptop's), not one plugged in. */
|
|
3922
|
-
builtin:
|
|
4127
|
+
builtin: import_zod24.z.boolean().optional()
|
|
3923
4128
|
});
|
|
3924
|
-
var ScreenListParams =
|
|
3925
|
-
var ScreenListResult =
|
|
3926
|
-
var ScreenCaptureParams =
|
|
4129
|
+
var ScreenListParams = import_zod24.z.strictObject({});
|
|
4130
|
+
var ScreenListResult = import_zod24.z.strictObject({ displays: import_zod24.z.array(ScreenDisplay).max(32) });
|
|
4131
|
+
var ScreenCaptureParams = import_zod24.z.strictObject({
|
|
3927
4132
|
/** The display (from screen.list); the primary display when absent. */
|
|
3928
4133
|
display_id: nonNegInt.optional(),
|
|
3929
|
-
format:
|
|
4134
|
+
format: import_zod24.z.enum(["jpeg", "png"]).default("jpeg"),
|
|
3930
4135
|
/** Scale the picture down to at most this width in pixels (kept when already smaller). */
|
|
3931
|
-
max_width:
|
|
4136
|
+
max_width: import_zod24.z.int().min(160).max(7680).default(1600)
|
|
3932
4137
|
});
|
|
3933
|
-
var ScreenCaptureResult =
|
|
4138
|
+
var ScreenCaptureResult = import_zod24.z.strictObject({
|
|
3934
4139
|
display_id: nonNegInt,
|
|
3935
|
-
mime_type:
|
|
3936
|
-
width:
|
|
3937
|
-
height:
|
|
4140
|
+
mime_type: import_zod24.z.enum(["image/jpeg", "image/png"]),
|
|
4141
|
+
width: import_zod24.z.int().min(1),
|
|
4142
|
+
height: import_zod24.z.int().min(1),
|
|
3938
4143
|
/** The display's full resolution in pixels, before scaling. */
|
|
3939
|
-
source_width:
|
|
3940
|
-
source_height:
|
|
4144
|
+
source_width: import_zod24.z.int().min(1),
|
|
4145
|
+
source_height: import_zod24.z.int().min(1),
|
|
3941
4146
|
/** The image, base64 (at most 6 MiB of text). */
|
|
3942
|
-
data_base64:
|
|
4147
|
+
data_base64: import_zod24.z.string().max(6291456)
|
|
3943
4148
|
});
|
|
3944
4149
|
|
|
3945
4150
|
// src/schema/window.ts
|
|
3946
|
-
var
|
|
3947
|
-
var WindowInfo =
|
|
4151
|
+
var import_zod25 = require("zod");
|
|
4152
|
+
var WindowInfo = import_zod25.z.strictObject({
|
|
3948
4153
|
/** The OS's window handle (macOS window number, Windows HWND, X11 window id). */
|
|
3949
4154
|
id: nonNegInt,
|
|
3950
|
-
title:
|
|
4155
|
+
title: import_zod25.z.string().max(512),
|
|
3951
4156
|
/** Position and size in logical points. */
|
|
3952
|
-
x:
|
|
3953
|
-
y:
|
|
3954
|
-
width:
|
|
3955
|
-
height:
|
|
4157
|
+
x: import_zod25.z.int(),
|
|
4158
|
+
y: import_zod25.z.int(),
|
|
4159
|
+
width: import_zod25.z.int().min(0),
|
|
4160
|
+
height: import_zod25.z.int().min(0),
|
|
3956
4161
|
/**
|
|
3957
4162
|
* The application that owns the window, by the name the OS shows people; absent when the OS does
|
|
3958
4163
|
* not say. Optional (never null, the schema rule) because it was added in protocol 1.7: an older
|
|
3959
4164
|
* app's answer has no such field (FIELDS_SINCE).
|
|
3960
4165
|
*/
|
|
3961
|
-
app:
|
|
4166
|
+
app: import_zod25.z.string().max(256).optional(),
|
|
3962
4167
|
/** The owning process id; absent when the OS does not say. Added in protocol 1.7. */
|
|
3963
|
-
pid:
|
|
4168
|
+
pid: import_zod25.z.int().min(0).optional()
|
|
3964
4169
|
});
|
|
3965
|
-
var WindowListParams =
|
|
4170
|
+
var WindowListParams = import_zod25.z.strictObject({
|
|
3966
4171
|
/** Case-insensitive substring of the window title. */
|
|
3967
|
-
title:
|
|
4172
|
+
title: import_zod25.z.string().min(1).max(256).optional(),
|
|
3968
4173
|
/** (1.66) Case-insensitive substring of the owning application's name (matrx-local's app_filter). */
|
|
3969
|
-
app:
|
|
3970
|
-
limit:
|
|
4174
|
+
app: import_zod25.z.string().min(1).max(256).optional(),
|
|
4175
|
+
limit: import_zod25.z.int().min(1).max(500).default(100)
|
|
3971
4176
|
});
|
|
3972
|
-
var WindowListResult =
|
|
3973
|
-
windows:
|
|
4177
|
+
var WindowListResult = import_zod25.z.strictObject({
|
|
4178
|
+
windows: import_zod25.z.array(WindowInfo).max(500),
|
|
3974
4179
|
total: nonNegInt,
|
|
3975
|
-
truncated:
|
|
4180
|
+
truncated: import_zod25.z.boolean()
|
|
3976
4181
|
});
|
|
3977
|
-
var WindowFocusParams =
|
|
3978
|
-
var WindowFocusResult =
|
|
3979
|
-
var WindowMoveParams =
|
|
4182
|
+
var WindowFocusParams = import_zod25.z.strictObject({ id: nonNegInt });
|
|
4183
|
+
var WindowFocusResult = import_zod25.z.strictObject({ window: WindowInfo });
|
|
4184
|
+
var WindowMoveParams = import_zod25.z.strictObject({
|
|
3980
4185
|
id: nonNegInt,
|
|
3981
4186
|
/** New top-left corner; unchanged when absent. */
|
|
3982
|
-
x:
|
|
3983
|
-
y:
|
|
4187
|
+
x: import_zod25.z.int().optional(),
|
|
4188
|
+
y: import_zod25.z.int().optional(),
|
|
3984
4189
|
/** New size; unchanged when absent. */
|
|
3985
|
-
width:
|
|
3986
|
-
height:
|
|
4190
|
+
width: import_zod25.z.int().min(50).max(16384).optional(),
|
|
4191
|
+
height: import_zod25.z.int().min(50).max(16384).optional()
|
|
3987
4192
|
});
|
|
3988
|
-
var WindowMoveResult =
|
|
3989
|
-
var WindowState =
|
|
3990
|
-
var WindowMinimizeParams =
|
|
4193
|
+
var WindowMoveResult = import_zod25.z.strictObject({ window: WindowInfo });
|
|
4194
|
+
var WindowState = import_zod25.z.enum(["minimize", "maximize", "restore"]);
|
|
4195
|
+
var WindowMinimizeParams = import_zod25.z.strictObject({
|
|
3991
4196
|
id: nonNegInt,
|
|
3992
4197
|
/** (1.66) minimize (the default), maximize (fill its display), or restore (bring a minimized or maximized window back). */
|
|
3993
4198
|
mode: WindowState.optional()
|
|
3994
4199
|
});
|
|
3995
|
-
var WindowMinimizeResult =
|
|
4200
|
+
var WindowMinimizeResult = import_zod25.z.strictObject({
|
|
3996
4201
|
id: nonNegInt,
|
|
3997
4202
|
/** (1.66) What was done. */
|
|
3998
4203
|
mode: WindowState.optional()
|
|
3999
4204
|
});
|
|
4000
4205
|
|
|
4001
4206
|
// src/schema/input.ts
|
|
4002
|
-
var
|
|
4003
|
-
var InputKey =
|
|
4207
|
+
var import_zod26 = require("zod");
|
|
4208
|
+
var InputKey = import_zod26.z.enum([
|
|
4004
4209
|
"cmd",
|
|
4005
4210
|
"ctrl",
|
|
4006
4211
|
"alt",
|
|
@@ -4080,80 +4285,80 @@ var InputKey = import_zod25.z.enum([
|
|
|
4080
4285
|
"backslash",
|
|
4081
4286
|
"grave"
|
|
4082
4287
|
]);
|
|
4083
|
-
var InputTypeTextParams =
|
|
4084
|
-
var InputTypeTextResult =
|
|
4085
|
-
var InputHotkeyParams =
|
|
4288
|
+
var InputTypeTextParams = import_zod26.z.strictObject({ text: import_zod26.z.string().min(1).max(1e4) });
|
|
4289
|
+
var InputTypeTextResult = import_zod26.z.strictObject({ characters: import_zod26.z.int().min(1) });
|
|
4290
|
+
var InputHotkeyParams = import_zod26.z.strictObject({
|
|
4086
4291
|
/** Pressed together in order and released in reverse: ["cmd", "shift", "t"]. */
|
|
4087
|
-
keys:
|
|
4292
|
+
keys: import_zod26.z.array(InputKey).min(1).max(6)
|
|
4088
4293
|
});
|
|
4089
|
-
var InputHotkeyResult =
|
|
4090
|
-
var InputPoint =
|
|
4091
|
-
var InputMouseMoveParams =
|
|
4294
|
+
var InputHotkeyResult = import_zod26.z.strictObject({ keys: import_zod26.z.array(InputKey) });
|
|
4295
|
+
var InputPoint = import_zod26.z.strictObject({ x: import_zod26.z.int(), y: import_zod26.z.int() });
|
|
4296
|
+
var InputMouseMoveParams = import_zod26.z.strictObject({
|
|
4092
4297
|
/** Screen position in logical points (the coordinates screen.list and window.list report). */
|
|
4093
|
-
x:
|
|
4094
|
-
y:
|
|
4298
|
+
x: import_zod26.z.int(),
|
|
4299
|
+
y: import_zod26.z.int()
|
|
4095
4300
|
});
|
|
4096
|
-
var InputMouseMoveResult =
|
|
4301
|
+
var InputMouseMoveResult = import_zod26.z.strictObject({
|
|
4097
4302
|
/** Where the pointer is now, read back from the OS. */
|
|
4098
4303
|
position: InputPoint
|
|
4099
4304
|
});
|
|
4100
|
-
var InputMouseClickParams =
|
|
4305
|
+
var InputMouseClickParams = import_zod26.z.strictObject({
|
|
4101
4306
|
/** Move here first; clicks where the pointer is when absent. */
|
|
4102
|
-
x:
|
|
4103
|
-
y:
|
|
4104
|
-
button:
|
|
4105
|
-
double:
|
|
4307
|
+
x: import_zod26.z.int().optional(),
|
|
4308
|
+
y: import_zod26.z.int().optional(),
|
|
4309
|
+
button: import_zod26.z.enum(["left", "right", "middle"]).default("left"),
|
|
4310
|
+
double: import_zod26.z.boolean().default(false)
|
|
4106
4311
|
});
|
|
4107
|
-
var InputMouseClickResult =
|
|
4312
|
+
var InputMouseClickResult = import_zod26.z.strictObject({
|
|
4108
4313
|
position: InputPoint,
|
|
4109
|
-
button:
|
|
4110
|
-
double:
|
|
4314
|
+
button: import_zod26.z.enum(["left", "right", "middle"]),
|
|
4315
|
+
double: import_zod26.z.boolean()
|
|
4111
4316
|
});
|
|
4112
|
-
var InputKeyboardSettingsParams =
|
|
4113
|
-
var InputKeyboardSettingsResult =
|
|
4317
|
+
var InputKeyboardSettingsParams = import_zod26.z.strictObject({});
|
|
4318
|
+
var InputKeyboardSettingsResult = import_zod26.z.strictObject({
|
|
4114
4319
|
/** Key repeat is off (a held key types once). */
|
|
4115
|
-
repeat_off:
|
|
4320
|
+
repeat_off: import_zod26.z.boolean().nullable(),
|
|
4116
4321
|
/** Time between repeats while a key is held (Key repeat rate: shorter is faster). */
|
|
4117
4322
|
repeat_interval_ms: nonNegInt.nullable(),
|
|
4118
4323
|
/** Time a key is held before it starts repeating (Delay until repeat). */
|
|
4119
4324
|
repeat_delay_ms: nonNegInt.nullable(),
|
|
4120
4325
|
/** What the fn / globe key does alone. */
|
|
4121
|
-
fn_key:
|
|
4326
|
+
fn_key: import_zod26.z.enum(["nothing", "input_source", "emoji", "dictation"]).nullable(),
|
|
4122
4327
|
/** Tab moves focus between every control. */
|
|
4123
|
-
keyboard_navigation:
|
|
4328
|
+
keyboard_navigation: import_zod26.z.boolean().nullable(),
|
|
4124
4329
|
/** The enabled input sources by name ("U.S.", "ABC – Extended"). */
|
|
4125
|
-
input_sources:
|
|
4330
|
+
input_sources: import_zod26.z.array(import_zod26.z.string().max(128)).max(64),
|
|
4126
4331
|
/** A key repeat change takes effect only after the person logs out and in again (macOS). */
|
|
4127
|
-
applies_after_login:
|
|
4332
|
+
applies_after_login: import_zod26.z.boolean()
|
|
4128
4333
|
});
|
|
4129
|
-
var InputSetKeyboardSettingsParams =
|
|
4130
|
-
repeat_off:
|
|
4131
|
-
repeat_interval_ms:
|
|
4132
|
-
repeat_delay_ms:
|
|
4133
|
-
keyboard_navigation:
|
|
4334
|
+
var InputSetKeyboardSettingsParams = import_zod26.z.strictObject({
|
|
4335
|
+
repeat_off: import_zod26.z.boolean().optional(),
|
|
4336
|
+
repeat_interval_ms: import_zod26.z.int().min(15).max(2e3).optional(),
|
|
4337
|
+
repeat_delay_ms: import_zod26.z.int().min(150).max(2e3).optional(),
|
|
4338
|
+
keyboard_navigation: import_zod26.z.boolean().optional()
|
|
4134
4339
|
});
|
|
4135
4340
|
|
|
4136
4341
|
// src/schema/power.ts
|
|
4137
|
-
var
|
|
4138
|
-
var PowerEnergy =
|
|
4342
|
+
var import_zod27 = require("zod");
|
|
4343
|
+
var PowerEnergy = import_zod27.z.strictObject({
|
|
4139
4344
|
display_sleep_minutes: nonNegInt.nullable(),
|
|
4140
4345
|
/** The computer itself sleeps after this long idle; null = never (Prevent automatic sleeping). */
|
|
4141
4346
|
sleep_minutes: nonNegInt.nullable(),
|
|
4142
4347
|
/** Hard disks sleep after this long; null = never. */
|
|
4143
4348
|
disk_sleep_minutes: nonNegInt.nullable(),
|
|
4144
|
-
wake_for_network:
|
|
4145
|
-
restart_after_power_failure:
|
|
4349
|
+
wake_for_network: import_zod27.z.boolean().nullable(),
|
|
4350
|
+
restart_after_power_failure: import_zod27.z.boolean().nullable(),
|
|
4146
4351
|
/** Low Power Mode (Energy Mode "Low Power"). */
|
|
4147
|
-
low_power_mode:
|
|
4352
|
+
low_power_mode: import_zod27.z.boolean().nullable()
|
|
4148
4353
|
});
|
|
4149
|
-
var PowerStatusParams =
|
|
4150
|
-
var PowerStatusResult =
|
|
4151
|
-
has_battery:
|
|
4354
|
+
var PowerStatusParams = import_zod27.z.strictObject({});
|
|
4355
|
+
var PowerStatusResult = import_zod27.z.strictObject({
|
|
4356
|
+
has_battery: import_zod27.z.boolean(),
|
|
4152
4357
|
/** 0–100; null without a battery. */
|
|
4153
|
-
percent:
|
|
4154
|
-
charging:
|
|
4358
|
+
percent: import_zod27.z.number().min(0).max(100).nullable(),
|
|
4359
|
+
charging: import_zod27.z.boolean().nullable(),
|
|
4155
4360
|
/** On wall power; null where the OS does not say. */
|
|
4156
|
-
plugged_in:
|
|
4361
|
+
plugged_in: import_zod27.z.boolean().nullable(),
|
|
4157
4362
|
/** Minutes of battery left; null when charging, unknown or without a battery. */
|
|
4158
4363
|
minutes_left: nonNegInt.nullable(),
|
|
4159
4364
|
/** Matrx 2 is keeping the computer awake (power.prevent_sleep) until this time; null when it is not. */
|
|
@@ -4161,26 +4366,26 @@ var PowerStatusResult = import_zod26.z.strictObject({
|
|
|
4161
4366
|
/** (1.24) The OS's own energy settings; absent where it keeps none Matrx 2 can read. */
|
|
4162
4367
|
energy: PowerEnergy.optional()
|
|
4163
4368
|
});
|
|
4164
|
-
var PowerHistoryParams =
|
|
4165
|
-
var PowerHistoryPoint =
|
|
4166
|
-
var PowerHistoryResult =
|
|
4369
|
+
var PowerHistoryParams = import_zod27.z.strictObject({});
|
|
4370
|
+
var PowerHistoryPoint = import_zod27.z.strictObject({ at_ms: epochMs, percent: import_zod27.z.number().min(0).max(100), plugged_in: import_zod27.z.boolean() });
|
|
4371
|
+
var PowerHistoryResult = import_zod27.z.strictObject({
|
|
4167
4372
|
/** Oldest first; empty without a battery or where the OS keeps no log. */
|
|
4168
|
-
points:
|
|
4373
|
+
points: import_zod27.z.array(PowerHistoryPoint).max(5e3)
|
|
4169
4374
|
});
|
|
4170
|
-
var PowerPreventSleepParams =
|
|
4375
|
+
var PowerPreventSleepParams = import_zod27.z.strictObject({
|
|
4171
4376
|
/** Keep the computer awake this long; 0 lets it sleep again now. */
|
|
4172
|
-
seconds:
|
|
4377
|
+
seconds: import_zod27.z.int().min(0).max(86400),
|
|
4173
4378
|
/** Shown where the OS lists what keeps it awake. */
|
|
4174
|
-
reason:
|
|
4379
|
+
reason: import_zod27.z.string().min(1).max(128).default("Matrx 2 is working")
|
|
4175
4380
|
});
|
|
4176
|
-
var PowerPreventSleepResult =
|
|
4381
|
+
var PowerPreventSleepResult = import_zod27.z.strictObject({
|
|
4177
4382
|
/** When it may sleep again; null after seconds 0. */
|
|
4178
4383
|
awake_until_ms: epochMs.nullable()
|
|
4179
4384
|
});
|
|
4180
4385
|
|
|
4181
4386
|
// src/schema/diag.ts
|
|
4182
|
-
var
|
|
4183
|
-
var DiagProcess =
|
|
4387
|
+
var import_zod28 = require("zod");
|
|
4388
|
+
var DiagProcess = import_zod28.z.enum([
|
|
4184
4389
|
"main",
|
|
4185
4390
|
"renderer",
|
|
4186
4391
|
"hosted_page",
|
|
@@ -4193,7 +4398,7 @@ var DiagProcess = import_zod27.z.enum([
|
|
|
4193
4398
|
"coding_sessions",
|
|
4194
4399
|
"claude_accounts"
|
|
4195
4400
|
]);
|
|
4196
|
-
var DiagErrorKind =
|
|
4401
|
+
var DiagErrorKind = import_zod28.z.enum([
|
|
4197
4402
|
"uncaught_exception",
|
|
4198
4403
|
"unhandled_rejection",
|
|
4199
4404
|
"renderer_crash",
|
|
@@ -4205,148 +4410,214 @@ var DiagErrorKind = import_zod27.z.enum([
|
|
|
4205
4410
|
"banner",
|
|
4206
4411
|
"logged_error"
|
|
4207
4412
|
]);
|
|
4208
|
-
var DiagErrorStatus =
|
|
4209
|
-
var DiagErrorEntry =
|
|
4413
|
+
var DiagErrorStatus = import_zod28.z.enum(["waiting", "sent", "resolved"]);
|
|
4414
|
+
var DiagErrorEntry = import_zod28.z.strictObject({
|
|
4210
4415
|
/** sha256 prefix over process, kind, source, code and the normalized message. */
|
|
4211
|
-
signature:
|
|
4416
|
+
signature: import_zod28.z.string().regex(/^[0-9a-f]{32}$/),
|
|
4212
4417
|
process: DiagProcess,
|
|
4213
4418
|
kind: DiagErrorKind,
|
|
4214
4419
|
/** Where: a cap.op, a log event, a screen or page name. */
|
|
4215
|
-
source:
|
|
4420
|
+
source: import_zod28.z.string().min(1).max(128),
|
|
4216
4421
|
/** An ErrorCode, an exit code or signal, an error class; null when there is none. */
|
|
4217
|
-
code:
|
|
4422
|
+
code: import_zod28.z.string().max(64).nullable(),
|
|
4218
4423
|
/** The first occurrence's message, personal data removed. */
|
|
4219
|
-
message:
|
|
4424
|
+
message: import_zod28.z.string().max(500),
|
|
4220
4425
|
count: nonNegInt,
|
|
4221
4426
|
first_seen_ms: epochMs,
|
|
4222
4427
|
last_seen_ms: epochMs,
|
|
4223
4428
|
status: DiagErrorStatus,
|
|
4224
4429
|
/** What the agent who resolved it wrote; null until resolved. */
|
|
4225
|
-
resolution_note:
|
|
4226
|
-
app_version:
|
|
4430
|
+
resolution_note: import_zod28.z.string().max(500).nullable(),
|
|
4431
|
+
app_version: import_zod28.z.string().max(64)
|
|
4227
4432
|
});
|
|
4228
|
-
var DiagErrorsListParams =
|
|
4433
|
+
var DiagErrorsListParams = import_zod28.z.strictObject({
|
|
4229
4434
|
/** open = waiting or sent; all includes resolved. */
|
|
4230
|
-
status:
|
|
4231
|
-
limit:
|
|
4435
|
+
status: import_zod28.z.enum(["open", "all"]).default("open"),
|
|
4436
|
+
limit: import_zod28.z.int().min(1).max(500).default(200)
|
|
4232
4437
|
});
|
|
4233
|
-
var DiagErrorsListResult =
|
|
4438
|
+
var DiagErrorsListResult = import_zod28.z.strictObject({
|
|
4234
4439
|
/** Newest last_seen first. */
|
|
4235
|
-
entries:
|
|
4440
|
+
entries: import_zod28.z.array(DiagErrorEntry).max(500),
|
|
4236
4441
|
total_signatures: nonNegInt,
|
|
4237
4442
|
total_occurrences: nonNegInt,
|
|
4238
4443
|
/** Signatures with occurrences not yet delivered. */
|
|
4239
4444
|
waiting: nonNegInt,
|
|
4240
4445
|
/** signed_out = kept until sign-in; ok = the last delivery worked; failing = the last delivery failed (kept, retried). */
|
|
4241
|
-
delivery:
|
|
4446
|
+
delivery: import_zod28.z.enum(["signed_out", "ok", "failing"]),
|
|
4242
4447
|
last_delivery_ms: epochMs.nullable()
|
|
4243
4448
|
});
|
|
4244
|
-
var DiagErrorsReportParams =
|
|
4245
|
-
process:
|
|
4246
|
-
kind:
|
|
4449
|
+
var DiagErrorsReportParams = import_zod28.z.strictObject({
|
|
4450
|
+
process: import_zod28.z.enum(["renderer", "hosted_page"]),
|
|
4451
|
+
kind: import_zod28.z.enum(["uncaught_exception", "unhandled_rejection", "console_error", "banner"]),
|
|
4247
4452
|
/** The screen or page, e.g. "code.chats". */
|
|
4248
|
-
source:
|
|
4249
|
-
message:
|
|
4250
|
-
code:
|
|
4251
|
-
stack:
|
|
4453
|
+
source: import_zod28.z.string().min(1).max(128),
|
|
4454
|
+
message: import_zod28.z.string().min(1).max(2e3),
|
|
4455
|
+
code: import_zod28.z.string().max(64).optional(),
|
|
4456
|
+
stack: import_zod28.z.string().max(8e3).optional()
|
|
4252
4457
|
});
|
|
4253
|
-
var DiagErrorsReportResult =
|
|
4254
|
-
signature:
|
|
4458
|
+
var DiagErrorsReportResult = import_zod28.z.strictObject({
|
|
4459
|
+
signature: import_zod28.z.string().regex(/^[0-9a-f]{32}$/)
|
|
4255
4460
|
});
|
|
4256
|
-
var DiagErrorsChangedEvent =
|
|
4461
|
+
var DiagErrorsChangedEvent = import_zod28.z.strictObject({
|
|
4257
4462
|
total_signatures: nonNegInt,
|
|
4258
4463
|
waiting: nonNegInt
|
|
4259
4464
|
});
|
|
4465
|
+
var ActivitySource = import_zod28.z.enum(["core", "service", "model", "client", "http", "tool"]);
|
|
4466
|
+
var ActivityLevel = import_zod28.z.enum(["debug", "info", "warn", "error"]);
|
|
4467
|
+
var ActivityHttp = import_zod28.z.strictObject({
|
|
4468
|
+
method: import_zod28.z.string().min(1).max(16),
|
|
4469
|
+
/** The path with every secret-looking query value replaced by [redacted]. */
|
|
4470
|
+
path: import_zod28.z.string().max(2048),
|
|
4471
|
+
status: import_zod28.z.int().min(0).max(999),
|
|
4472
|
+
duration_ms: nonNegInt,
|
|
4473
|
+
/** The Origin header, when the caller sent one. */
|
|
4474
|
+
origin: import_zod28.z.string().max(256).nullable()
|
|
4475
|
+
});
|
|
4476
|
+
var ActivityTool = import_zod28.z.strictObject({
|
|
4477
|
+
op: import_zod28.z.string().min(1).max(128),
|
|
4478
|
+
client_type: import_zod28.z.string().max(64),
|
|
4479
|
+
transport: import_zod28.z.string().max(32),
|
|
4480
|
+
duration_ms: nonNegInt,
|
|
4481
|
+
/** ok, or the ErrorCode it ended with. */
|
|
4482
|
+
outcome: import_zod28.z.string().min(1).max(64)
|
|
4483
|
+
});
|
|
4484
|
+
var ActivityLine = import_zod28.z.strictObject({
|
|
4485
|
+
/** Running number across every source; a gap means lines fell off the buffer. */
|
|
4486
|
+
seq: nonNegInt,
|
|
4487
|
+
at_ms: epochMs,
|
|
4488
|
+
source: ActivitySource,
|
|
4489
|
+
level: ActivityLevel,
|
|
4490
|
+
/** The log event name, e.g. "service.state", "http.request", "op.call". */
|
|
4491
|
+
event: import_zod28.z.string().min(1).max(128),
|
|
4492
|
+
text: import_zod28.z.string().max(4e3),
|
|
4493
|
+
http: ActivityHttp.optional(),
|
|
4494
|
+
tool: ActivityTool.optional()
|
|
4495
|
+
});
|
|
4496
|
+
var ActivityDropped = import_zod28.z.strictObject({
|
|
4497
|
+
core: nonNegInt,
|
|
4498
|
+
service: nonNegInt,
|
|
4499
|
+
model: nonNegInt,
|
|
4500
|
+
client: nonNegInt,
|
|
4501
|
+
http: nonNegInt,
|
|
4502
|
+
tool: nonNegInt
|
|
4503
|
+
});
|
|
4504
|
+
var DiagActivityListParams = import_zod28.z.strictObject({
|
|
4505
|
+
/** Only lines after this seq (a screen catching up after it reconnects). */
|
|
4506
|
+
after_seq: nonNegInt.optional(),
|
|
4507
|
+
limit: import_zod28.z.int().min(1).max(5e3).default(2e3)
|
|
4508
|
+
});
|
|
4509
|
+
var DiagActivityListResult = import_zod28.z.strictObject({
|
|
4510
|
+
/** Oldest first: the NEWEST `limit` lines after `after_seq`. */
|
|
4511
|
+
lines: import_zod28.z.array(ActivityLine).max(5e3),
|
|
4512
|
+
/** Lines after `after_seq` not returned because of `limit` (the oldest ones). */
|
|
4513
|
+
more: nonNegInt,
|
|
4514
|
+
dropped: ActivityDropped,
|
|
4515
|
+
/** Lines each source keeps (the desktop.activity_buffer_lines knob). */
|
|
4516
|
+
capacity: import_zod28.z.int().min(1),
|
|
4517
|
+
/** The newest seq written (0 = none yet). */
|
|
4518
|
+
last_seq: nonNegInt
|
|
4519
|
+
});
|
|
4520
|
+
var DiagActivityClearParams = import_zod28.z.strictObject({
|
|
4521
|
+
/** One source, or every source when absent. */
|
|
4522
|
+
source: ActivitySource.optional()
|
|
4523
|
+
});
|
|
4524
|
+
var DiagActivityClearResult = import_zod28.z.strictObject({ cleared: nonNegInt });
|
|
4525
|
+
var DiagActivityLinesEvent = import_zod28.z.strictObject({
|
|
4526
|
+
lines: import_zod28.z.array(ActivityLine).max(5e3),
|
|
4527
|
+
/** Lines written since the last batch that this batch does not carry (a flood past the batch cap). */
|
|
4528
|
+
skipped: nonNegInt,
|
|
4529
|
+
dropped: ActivityDropped
|
|
4530
|
+
});
|
|
4260
4531
|
|
|
4261
4532
|
// src/schema/resources.ts
|
|
4262
|
-
var
|
|
4263
|
-
var ResourcesDisk =
|
|
4533
|
+
var import_zod29 = require("zod");
|
|
4534
|
+
var ResourcesDisk = import_zod29.z.strictObject({
|
|
4264
4535
|
/** Where it is mounted ("/", "C:"). */
|
|
4265
|
-
mount:
|
|
4536
|
+
mount: import_zod29.z.string().max(512),
|
|
4266
4537
|
/** The volume's name as the file manager shows it ("Macintosh HD", "Local Disk (C:)"). Since 1.17. */
|
|
4267
|
-
name:
|
|
4538
|
+
name: import_zod29.z.string().max(256).optional(),
|
|
4268
4539
|
/** The file system ("apfs", "NTFS", "ext4"). */
|
|
4269
|
-
fs:
|
|
4540
|
+
fs: import_zod29.z.string().max(64),
|
|
4270
4541
|
size_bytes: nonNegInt,
|
|
4271
4542
|
used_bytes: nonNegInt,
|
|
4272
4543
|
available_bytes: nonNegInt
|
|
4273
4544
|
});
|
|
4274
|
-
var ResourcesSnapshotParams =
|
|
4275
|
-
var ResourcesSnapshotResult =
|
|
4276
|
-
cpu:
|
|
4545
|
+
var ResourcesSnapshotParams = import_zod29.z.strictObject({});
|
|
4546
|
+
var ResourcesSnapshotResult = import_zod29.z.strictObject({
|
|
4547
|
+
cpu: import_zod29.z.strictObject({
|
|
4277
4548
|
/** Busy share of all cores, 0–100, measured now. */
|
|
4278
|
-
percent:
|
|
4279
|
-
cores:
|
|
4549
|
+
percent: import_zod29.z.number().min(0).max(100),
|
|
4550
|
+
cores: import_zod29.z.int().min(1),
|
|
4280
4551
|
/** 1, 5 and 15 minute load averages; null on Windows. */
|
|
4281
|
-
load:
|
|
4552
|
+
load: import_zod29.z.array(import_zod29.z.number().min(0)).length(3).nullable()
|
|
4282
4553
|
}),
|
|
4283
|
-
memory:
|
|
4284
|
-
swap:
|
|
4285
|
-
disks:
|
|
4554
|
+
memory: import_zod29.z.strictObject({ total_bytes: nonNegInt, used_bytes: nonNegInt, available_bytes: nonNegInt }),
|
|
4555
|
+
swap: import_zod29.z.strictObject({ total_bytes: nonNegInt, used_bytes: nonNegInt }),
|
|
4556
|
+
disks: import_zod29.z.array(ResourcesDisk).max(64),
|
|
4286
4557
|
uptime_seconds: nonNegInt
|
|
4287
4558
|
});
|
|
4288
|
-
var ResourcesJobKind =
|
|
4289
|
-
var ResourcesStrain =
|
|
4290
|
-
var ResourcesPressure =
|
|
4291
|
-
var ResourcesJob =
|
|
4559
|
+
var ResourcesJobKind = import_zod29.z.enum(["type-check", "tests", "build", "lint", "dev server", "language server", "search"]);
|
|
4560
|
+
var ResourcesStrain = import_zod29.z.enum(["good", "strain", "overloaded"]);
|
|
4561
|
+
var ResourcesPressure = import_zod29.z.enum(["normal", "warning", "critical"]);
|
|
4562
|
+
var ResourcesJob = import_zod29.z.strictObject({
|
|
4292
4563
|
/** The job's root process (Stop takes its whole tree). */
|
|
4293
|
-
pid:
|
|
4564
|
+
pid: import_zod29.z.int().min(0),
|
|
4294
4565
|
kind: ResourcesJobKind,
|
|
4295
4566
|
/** Its heaviest process's command line, shortened ("…/lib/tsc --noEmit -p tsconfig.json"). */
|
|
4296
|
-
command:
|
|
4567
|
+
command: import_zod29.z.string().max(256),
|
|
4297
4568
|
/** Who started it: "Claude Code", "Codex", "Cursor", "VS Code", "Terminal", "local stack", "detached"; null when unknown. */
|
|
4298
|
-
started_by:
|
|
4569
|
+
started_by: import_zod29.z.string().max(64).nullable(),
|
|
4299
4570
|
/** Whatever started it is gone and nothing waits for it. */
|
|
4300
|
-
orphan:
|
|
4571
|
+
orphan: import_zod29.z.boolean(),
|
|
4301
4572
|
/** A type-check queued for its turn (no compiler running yet). */
|
|
4302
|
-
waiting:
|
|
4573
|
+
waiting: import_zod29.z.boolean(),
|
|
4303
4574
|
/** The project folder it runs in ("matrx-frontend"); null when not in one. */
|
|
4304
|
-
folder:
|
|
4575
|
+
folder: import_zod29.z.string().max(256).nullable(),
|
|
4305
4576
|
/** The same command in the same folder, running this many times (1 = no duplicate). */
|
|
4306
|
-
duplicates:
|
|
4307
|
-
processes:
|
|
4577
|
+
duplicates: import_zod29.z.int().min(1),
|
|
4578
|
+
processes: import_zod29.z.int().min(1),
|
|
4308
4579
|
/** Sum over the tree, as `ps` reports it: 100 = one full core. */
|
|
4309
|
-
cpu_percent:
|
|
4580
|
+
cpu_percent: import_zod29.z.number().min(0),
|
|
4310
4581
|
/** Real memory (macOS: the physical footprint Activity Monitor shows, compressed included). */
|
|
4311
4582
|
memory_bytes: nonNegInt,
|
|
4312
4583
|
started_at_ms: epochMs.nullable(),
|
|
4313
4584
|
/** False for an app, an agent session, a terminal, a system process, the local stack or Matrx 2 itself. */
|
|
4314
|
-
stoppable:
|
|
4585
|
+
stoppable: import_zod29.z.boolean()
|
|
4315
4586
|
});
|
|
4316
|
-
var ResourcesProcess =
|
|
4317
|
-
pid:
|
|
4587
|
+
var ResourcesProcess = import_zod29.z.strictObject({
|
|
4588
|
+
pid: import_zod29.z.int().min(0),
|
|
4318
4589
|
/** The command line, shortened. */
|
|
4319
|
-
name:
|
|
4320
|
-
cpu_percent:
|
|
4590
|
+
name: import_zod29.z.string().max(256),
|
|
4591
|
+
cpu_percent: import_zod29.z.number().min(0),
|
|
4321
4592
|
memory_bytes: nonNegInt,
|
|
4322
|
-
started_by:
|
|
4593
|
+
started_by: import_zod29.z.string().max(64).nullable(),
|
|
4323
4594
|
/** The job it belongs to ("type-check in aidream"); null when none. */
|
|
4324
|
-
job:
|
|
4595
|
+
job: import_zod29.z.string().max(256).nullable(),
|
|
4325
4596
|
started_at_ms: epochMs.nullable()
|
|
4326
4597
|
});
|
|
4327
|
-
var ResourcesVerdict =
|
|
4598
|
+
var ResourcesVerdict = import_zod29.z.strictObject({
|
|
4328
4599
|
level: ResourcesStrain,
|
|
4329
4600
|
/** One sentence ("Your Mac is under strain. 3 type-checks are running at once."). */
|
|
4330
|
-
text:
|
|
4601
|
+
text: import_zod29.z.string().max(256),
|
|
4331
4602
|
/** The biggest jobs behind it; null when all is well. */
|
|
4332
|
-
cause:
|
|
4603
|
+
cause: import_zod29.z.string().max(1024).nullable()
|
|
4333
4604
|
});
|
|
4334
|
-
var ResourcesSample =
|
|
4605
|
+
var ResourcesSample = import_zod29.z.strictObject({
|
|
4335
4606
|
at_ms: epochMs,
|
|
4336
4607
|
/** The 1-minute load average. */
|
|
4337
|
-
load:
|
|
4608
|
+
load: import_zod29.z.number().min(0),
|
|
4338
4609
|
memory_used_bytes: nonNegInt,
|
|
4339
4610
|
typechecks: nonNegInt
|
|
4340
4611
|
});
|
|
4341
|
-
var ResourcesActivityParams =
|
|
4342
|
-
var ResourcesActivityResult =
|
|
4612
|
+
var ResourcesActivityParams = import_zod29.z.strictObject({});
|
|
4613
|
+
var ResourcesActivityResult = import_zod29.z.strictObject({
|
|
4343
4614
|
/** False until the first reading (a second or two after start). */
|
|
4344
|
-
ready:
|
|
4615
|
+
ready: import_zod29.z.boolean(),
|
|
4345
4616
|
sampled_at_ms: epochMs.nullable(),
|
|
4346
|
-
cores:
|
|
4617
|
+
cores: import_zod29.z.int().min(1),
|
|
4347
4618
|
/** 1, 5 and 15 minute load averages. */
|
|
4348
|
-
load:
|
|
4349
|
-
memory:
|
|
4619
|
+
load: import_zod29.z.array(import_zod29.z.number().min(0)).length(3),
|
|
4620
|
+
memory: import_zod29.z.strictObject({
|
|
4350
4621
|
total_bytes: nonNegInt,
|
|
4351
4622
|
/** Activity Monitor's Memory Used: app memory + wired + compressed. */
|
|
4352
4623
|
used_bytes: nonNegInt,
|
|
@@ -4357,286 +4628,286 @@ var ResourcesActivityResult = import_zod28.z.strictObject({
|
|
|
4357
4628
|
pressure: ResourcesPressure.nullable()
|
|
4358
4629
|
}),
|
|
4359
4630
|
verdict: ResourcesVerdict,
|
|
4360
|
-
typechecks:
|
|
4631
|
+
typechecks: import_zod29.z.strictObject({ running: nonNegInt, waiting: nonNegInt, comfort: nonNegInt }),
|
|
4361
4632
|
/** Heaviest first (1 GB weighs as much as 16 % of a core). */
|
|
4362
|
-
jobs:
|
|
4633
|
+
jobs: import_zod29.z.array(ResourcesJob).max(200),
|
|
4363
4634
|
/** The 15 heaviest by memory and the 15 busiest by CPU, together. */
|
|
4364
|
-
top:
|
|
4635
|
+
top: import_zod29.z.array(ResourcesProcess).max(30),
|
|
4365
4636
|
/** The last hour, oldest first. */
|
|
4366
|
-
history:
|
|
4637
|
+
history: import_zod29.z.array(ResourcesSample).max(1200)
|
|
4367
4638
|
});
|
|
4368
|
-
var ResourcesStopJobParams =
|
|
4369
|
-
var ResourcesStopJobResult =
|
|
4639
|
+
var ResourcesStopJobParams = import_zod29.z.strictObject({ pid: import_zod29.z.int().min(1) });
|
|
4640
|
+
var ResourcesStopJobResult = import_zod29.z.strictObject({
|
|
4370
4641
|
/** Processes signalled; whatever is still running 5 seconds later is force-stopped. */
|
|
4371
4642
|
processes: nonNegInt,
|
|
4372
4643
|
/** It had finished before the request arrived. */
|
|
4373
|
-
already_finished:
|
|
4644
|
+
already_finished: import_zod29.z.boolean()
|
|
4374
4645
|
});
|
|
4375
|
-
var ResourcesIncident =
|
|
4646
|
+
var ResourcesIncident = import_zod29.z.strictObject({
|
|
4376
4647
|
at_ms: epochMs,
|
|
4377
4648
|
verdict: ResourcesVerdict,
|
|
4378
|
-
load:
|
|
4649
|
+
load: import_zod29.z.number().min(0),
|
|
4379
4650
|
memory_used_bytes: nonNegInt,
|
|
4380
4651
|
compressed_bytes: nonNegInt,
|
|
4381
4652
|
pressure: ResourcesPressure.nullable(),
|
|
4382
|
-
jobs:
|
|
4383
|
-
|
|
4653
|
+
jobs: import_zod29.z.array(
|
|
4654
|
+
import_zod29.z.strictObject({
|
|
4384
4655
|
kind: ResourcesJobKind,
|
|
4385
|
-
started_by:
|
|
4386
|
-
folder:
|
|
4387
|
-
command:
|
|
4388
|
-
cpu_percent:
|
|
4656
|
+
started_by: import_zod29.z.string().max(64).nullable(),
|
|
4657
|
+
folder: import_zod29.z.string().max(256).nullable(),
|
|
4658
|
+
command: import_zod29.z.string().max(256),
|
|
4659
|
+
cpu_percent: import_zod29.z.number().min(0),
|
|
4389
4660
|
memory_bytes: nonNegInt,
|
|
4390
|
-
duplicates:
|
|
4661
|
+
duplicates: import_zod29.z.int().min(1)
|
|
4391
4662
|
})
|
|
4392
4663
|
).max(8)
|
|
4393
4664
|
});
|
|
4394
|
-
var ResourcesIncidentsParams =
|
|
4395
|
-
var ResourcesIncidentsResult =
|
|
4665
|
+
var ResourcesIncidentsParams = import_zod29.z.strictObject({ limit: import_zod29.z.int().min(1).max(200).default(50) });
|
|
4666
|
+
var ResourcesIncidentsResult = import_zod29.z.strictObject({
|
|
4396
4667
|
/** Newest first; at most one a minute is written. */
|
|
4397
|
-
incidents:
|
|
4668
|
+
incidents: import_zod29.z.array(ResourcesIncident).max(200)
|
|
4398
4669
|
});
|
|
4399
4670
|
|
|
4400
4671
|
// src/schema/stack.ts
|
|
4401
|
-
var
|
|
4402
|
-
var StackServerName =
|
|
4403
|
-
var StackTone =
|
|
4404
|
-
var StackServer =
|
|
4672
|
+
var import_zod30 = require("zod");
|
|
4673
|
+
var StackServerName = import_zod30.z.string().regex(/^[a-z0-9_-]{1,64}$/);
|
|
4674
|
+
var StackTone = import_zod30.z.enum(["good", "wait", "bad", "off"]);
|
|
4675
|
+
var StackServer = import_zod30.z.strictObject({
|
|
4405
4676
|
name: StackServerName,
|
|
4406
4677
|
/** One word: Healthy, Starting, Unhealthy, Restarting, Stopping, Waiting, Stopped, Crashed, Off. */
|
|
4407
|
-
label:
|
|
4678
|
+
label: import_zod30.z.string().max(32),
|
|
4408
4679
|
tone: StackTone,
|
|
4409
4680
|
/** What is going on, in one or two plain sentences. */
|
|
4410
|
-
sentence:
|
|
4681
|
+
sentence: import_zod30.z.string().max(2e3),
|
|
4411
4682
|
/** The config's own description of the server. */
|
|
4412
|
-
description:
|
|
4683
|
+
description: import_zod30.z.string().max(512),
|
|
4413
4684
|
/** Where the server answers, when its description names an address. */
|
|
4414
|
-
open_url:
|
|
4415
|
-
log_file:
|
|
4685
|
+
open_url: import_zod30.z.string().max(2048).nullable(),
|
|
4686
|
+
log_file: import_zod30.z.string().max(4096),
|
|
4416
4687
|
/** When its log file was last written. */
|
|
4417
4688
|
last_output_at_ms: epochMs.nullable(),
|
|
4418
4689
|
started_at_ms: epochMs.nullable(),
|
|
4419
4690
|
restarts: nonNegInt,
|
|
4420
|
-
exit_code:
|
|
4421
|
-
pid:
|
|
4691
|
+
exit_code: import_zod30.z.int().nullable(),
|
|
4692
|
+
pid: import_zod30.z.int().nullable(),
|
|
4422
4693
|
/** (1.18) CPU of the server's process and everything under it, in percent of one core; absent when it is not running. */
|
|
4423
|
-
cpu_percent:
|
|
4694
|
+
cpu_percent: import_zod30.z.number().min(0).optional(),
|
|
4424
4695
|
/** (1.18) Memory of the same processes: the physical footprint (Activity Monitor's Memory) summed; absent when it is not running. */
|
|
4425
4696
|
memory_bytes: nonNegInt.optional()
|
|
4426
4697
|
});
|
|
4427
|
-
var StackEvent =
|
|
4698
|
+
var StackEvent = import_zod30.z.strictObject({
|
|
4428
4699
|
at_ms: epochMs,
|
|
4429
4700
|
/** A server name, or "stack" for the stack as a whole. */
|
|
4430
|
-
server:
|
|
4701
|
+
server: import_zod30.z.string().max(64),
|
|
4431
4702
|
/** started · stopped · healthy · unhealthy · crashed · exited · restarting · stopping · action · action-done · action-failed · setup · error */
|
|
4432
|
-
kind:
|
|
4433
|
-
text:
|
|
4703
|
+
kind: import_zod30.z.string().max(32),
|
|
4704
|
+
text: import_zod30.z.string().max(4e3)
|
|
4434
4705
|
});
|
|
4435
|
-
var StackStateParams =
|
|
4436
|
-
var StackStateResult =
|
|
4706
|
+
var StackStateParams = import_zod30.z.strictObject({});
|
|
4707
|
+
var StackStateResult = import_zod30.z.strictObject({
|
|
4437
4708
|
/** The stack's config file, when found. */
|
|
4438
|
-
config_path:
|
|
4709
|
+
config_path: import_zod30.z.string().max(4096).nullable(),
|
|
4439
4710
|
/** Why the stack cannot be run from here (no config, no process-compose), else null. */
|
|
4440
|
-
problem:
|
|
4441
|
-
stack_up:
|
|
4711
|
+
problem: import_zod30.z.string().max(1e3).nullable(),
|
|
4712
|
+
stack_up: import_zod30.z.boolean(),
|
|
4442
4713
|
stack_started_at_ms: epochMs.nullable(),
|
|
4443
|
-
servers:
|
|
4714
|
+
servers: import_zod30.z.array(StackServer).max(64),
|
|
4444
4715
|
/** One line about the one-shot setup steps ("Docker Desktop: running."), or null. */
|
|
4445
|
-
setup_note:
|
|
4716
|
+
setup_note: import_zod30.z.string().max(500).nullable(),
|
|
4446
4717
|
/** Start everything / Stop everything in flight. */
|
|
4447
|
-
pending:
|
|
4718
|
+
pending: import_zod30.z.strictObject({ verb: import_zod30.z.enum(["start", "stop"]), label: import_zod30.z.string().max(64), since_ms: epochMs }).nullable(),
|
|
4448
4719
|
/** The newest entries last. */
|
|
4449
|
-
events:
|
|
4720
|
+
events: import_zod30.z.array(StackEvent).max(300)
|
|
4450
4721
|
});
|
|
4451
|
-
var StackStartParams =
|
|
4452
|
-
var StackStopParams =
|
|
4453
|
-
var StackRunResult =
|
|
4454
|
-
var StackServerActionParams =
|
|
4722
|
+
var StackStartParams = import_zod30.z.strictObject({});
|
|
4723
|
+
var StackStopParams = import_zod30.z.strictObject({});
|
|
4724
|
+
var StackRunResult = import_zod30.z.strictObject({ accepted: import_zod30.z.boolean() });
|
|
4725
|
+
var StackServerActionParams = import_zod30.z.strictObject({
|
|
4455
4726
|
name: StackServerName,
|
|
4456
|
-
verb:
|
|
4727
|
+
verb: import_zod30.z.enum(["start", "stop", "restart"])
|
|
4457
4728
|
});
|
|
4458
|
-
var StackServerActionResult =
|
|
4459
|
-
var StackLogsParams =
|
|
4729
|
+
var StackServerActionResult = import_zod30.z.strictObject({ message: import_zod30.z.string().max(1e3) });
|
|
4730
|
+
var StackLogsParams = import_zod30.z.strictObject({
|
|
4460
4731
|
name: StackServerName,
|
|
4461
4732
|
/** Without `offset`: the last this-many complete lines. With it: new lines after it, at most this many. */
|
|
4462
|
-
lines:
|
|
4733
|
+
lines: import_zod30.z.int().min(1).max(2e5).default(2e3),
|
|
4463
4734
|
/** Byte offset the last read ended at: answer only what was written after it (follow). */
|
|
4464
4735
|
offset: nonNegInt.optional(),
|
|
4465
4736
|
/** A "Clear" point: the lines written after this byte offset (no `offset`). */
|
|
4466
4737
|
since: nonNegInt.optional(),
|
|
4467
4738
|
/** With `offset`: wait up to this long for a new line when none is waiting (0 answers at once). */
|
|
4468
|
-
wait_ms:
|
|
4739
|
+
wait_ms: import_zod30.z.int().min(0).max(25e3).default(0)
|
|
4469
4740
|
});
|
|
4470
|
-
var StackLogsResult =
|
|
4741
|
+
var StackLogsResult = import_zod30.z.strictObject({
|
|
4471
4742
|
/** Complete lines, color codes removed. */
|
|
4472
|
-
lines:
|
|
4743
|
+
lines: import_zod30.z.array(import_zod30.z.string().max(65536)).max(2e5),
|
|
4473
4744
|
/** Where these lines end: pass it back as `offset` to follow. */
|
|
4474
4745
|
offset: nonNegInt,
|
|
4475
4746
|
/** False when `since` no longer exists (the log rotated): the lines are the plain tail instead. */
|
|
4476
|
-
since_valid:
|
|
4747
|
+
since_valid: import_zod30.z.boolean(),
|
|
4477
4748
|
/** The log was rotated or truncated since `offset`: these lines start the file again. */
|
|
4478
|
-
reset:
|
|
4479
|
-
log_file:
|
|
4749
|
+
reset: import_zod30.z.boolean(),
|
|
4750
|
+
log_file: import_zod30.z.string().max(4096)
|
|
4480
4751
|
});
|
|
4481
|
-
var StackErrorsParams =
|
|
4482
|
-
window_minutes:
|
|
4752
|
+
var StackErrorsParams = import_zod30.z.strictObject({
|
|
4753
|
+
window_minutes: import_zod30.z.int().min(1).max(1440).default(60)
|
|
4483
4754
|
});
|
|
4484
|
-
var StackErrorsResult =
|
|
4755
|
+
var StackErrorsResult = import_zod30.z.strictObject({
|
|
4485
4756
|
/** Per server: a heading line ("=== aidream — errors in the last 60 minutes (<file>) ===") and each error with the 10 lines after it. */
|
|
4486
|
-
sections:
|
|
4487
|
-
window_minutes:
|
|
4757
|
+
sections: import_zod30.z.array(import_zod30.z.strictObject({ name: StackServerName, heading: import_zod30.z.string().max(4096), lines: import_zod30.z.array(import_zod30.z.string().max(65536)).max(5e3) })).max(64),
|
|
4758
|
+
window_minutes: import_zod30.z.int().min(1).max(1440)
|
|
4488
4759
|
});
|
|
4489
4760
|
|
|
4490
4761
|
// src/schema/audio.ts
|
|
4491
|
-
var
|
|
4492
|
-
var AudioDevice =
|
|
4762
|
+
var import_zod31 = require("zod");
|
|
4763
|
+
var AudioDevice = import_zod31.z.strictObject({
|
|
4493
4764
|
/** The OS's name for it, as audio.record takes it. */
|
|
4494
|
-
id:
|
|
4495
|
-
name:
|
|
4496
|
-
default:
|
|
4765
|
+
id: import_zod31.z.string().min(1).max(256),
|
|
4766
|
+
name: import_zod31.z.string().max(256),
|
|
4767
|
+
default: import_zod31.z.boolean(),
|
|
4497
4768
|
/** (1.24) How it is connected, as Sound's Type column says it: "Built-in", "USB", "Bluetooth",
|
|
4498
4769
|
* "DisplayPort", "HDMI", "AirPlay", "Virtual". Absent where the OS does not say. */
|
|
4499
|
-
kind:
|
|
4770
|
+
kind: import_zod31.z.string().max(64).optional()
|
|
4500
4771
|
});
|
|
4501
|
-
var AudioDevicesParams =
|
|
4502
|
-
var AudioDevicesResult =
|
|
4503
|
-
inputs:
|
|
4504
|
-
outputs:
|
|
4772
|
+
var AudioDevicesParams = import_zod31.z.strictObject({});
|
|
4773
|
+
var AudioDevicesResult = import_zod31.z.strictObject({
|
|
4774
|
+
inputs: import_zod31.z.array(AudioDevice).max(64),
|
|
4775
|
+
outputs: import_zod31.z.array(AudioDevice).max(64)
|
|
4505
4776
|
});
|
|
4506
|
-
var AudioRecordParams =
|
|
4507
|
-
seconds:
|
|
4777
|
+
var AudioRecordParams = import_zod31.z.strictObject({
|
|
4778
|
+
seconds: import_zod31.z.number().min(0.5).max(600),
|
|
4508
4779
|
/** The microphone (from audio.devices); the default input when absent. */
|
|
4509
|
-
device_id:
|
|
4780
|
+
device_id: import_zod31.z.string().min(1).max(256).optional(),
|
|
4510
4781
|
/** Where the WAV file goes; a new file in the temp folder when absent. */
|
|
4511
4782
|
path: AbsPath.optional(),
|
|
4512
4783
|
/** (1.66) 1 (mono, the default) or 2 (stereo). */
|
|
4513
|
-
channels:
|
|
4784
|
+
channels: import_zod31.z.int().min(1).max(2).optional(),
|
|
4514
4785
|
/** (1.66) Samples per second; 16000 when absent (the rate Whisper reads). */
|
|
4515
|
-
sample_rate:
|
|
4786
|
+
sample_rate: import_zod31.z.int().min(8e3).max(192e3).optional()
|
|
4516
4787
|
});
|
|
4517
|
-
var AudioRecordResult =
|
|
4788
|
+
var AudioRecordResult = import_zod31.z.strictObject({
|
|
4518
4789
|
path: AbsPath,
|
|
4519
|
-
seconds:
|
|
4790
|
+
seconds: import_zod31.z.number().min(0),
|
|
4520
4791
|
bytes: nonNegInt,
|
|
4521
4792
|
/** Loudest sample, 0–1: 0 means the device gave silence. */
|
|
4522
|
-
peak:
|
|
4793
|
+
peak: import_zod31.z.number().min(0).max(1),
|
|
4523
4794
|
/** (1.66) The file's channels and sample rate, as written. */
|
|
4524
|
-
channels:
|
|
4525
|
-
sample_rate:
|
|
4795
|
+
channels: import_zod31.z.int().min(1).max(8).optional(),
|
|
4796
|
+
sample_rate: import_zod31.z.int().min(1).max(768e3).optional()
|
|
4526
4797
|
});
|
|
4527
|
-
var AudioPlayParams =
|
|
4798
|
+
var AudioPlayParams = import_zod31.z.strictObject({
|
|
4528
4799
|
path: AbsPath,
|
|
4529
4800
|
/** (1.66) The speaker or output (its id from audio.devices' outputs); the system's output when absent. */
|
|
4530
|
-
device_id:
|
|
4531
|
-
});
|
|
4532
|
-
var AudioPlayResult =
|
|
4533
|
-
var AudioLevelsParams =
|
|
4534
|
-
var AudioLevelsResult =
|
|
4535
|
-
output_volume:
|
|
4536
|
-
output_muted:
|
|
4537
|
-
input_volume:
|
|
4801
|
+
device_id: import_zod31.z.string().min(1).max(256).optional()
|
|
4802
|
+
});
|
|
4803
|
+
var AudioPlayResult = import_zod31.z.strictObject({ path: AbsPath, seconds: import_zod31.z.number().min(0) });
|
|
4804
|
+
var AudioLevelsParams = import_zod31.z.strictObject({});
|
|
4805
|
+
var AudioLevelsResult = import_zod31.z.strictObject({
|
|
4806
|
+
output_volume: import_zod31.z.number().min(0).max(100).nullable(),
|
|
4807
|
+
output_muted: import_zod31.z.boolean().nullable(),
|
|
4808
|
+
input_volume: import_zod31.z.number().min(0).max(100).nullable(),
|
|
4538
4809
|
/** The alert (beep) volume, a share of the output volume. */
|
|
4539
|
-
alert_volume:
|
|
4810
|
+
alert_volume: import_zod31.z.number().min(0).max(100).nullable()
|
|
4540
4811
|
});
|
|
4541
|
-
var AudioSetLevelsParams =
|
|
4542
|
-
output_volume:
|
|
4543
|
-
output_muted:
|
|
4544
|
-
input_volume:
|
|
4545
|
-
alert_volume:
|
|
4812
|
+
var AudioSetLevelsParams = import_zod31.z.strictObject({
|
|
4813
|
+
output_volume: import_zod31.z.number().min(0).max(100).optional(),
|
|
4814
|
+
output_muted: import_zod31.z.boolean().optional(),
|
|
4815
|
+
input_volume: import_zod31.z.number().min(0).max(100).optional(),
|
|
4816
|
+
alert_volume: import_zod31.z.number().min(0).max(100).optional()
|
|
4546
4817
|
});
|
|
4547
4818
|
|
|
4548
4819
|
// src/schema/fs-watch.ts
|
|
4549
|
-
var
|
|
4550
|
-
var FsWatchId =
|
|
4551
|
-
var FsWatchStartParams =
|
|
4820
|
+
var import_zod32 = require("zod");
|
|
4821
|
+
var FsWatchId = import_zod32.z.string().regex(/^fw_[A-Za-z0-9]{12,40}$/);
|
|
4822
|
+
var FsWatchStartParams = import_zod32.z.strictObject({
|
|
4552
4823
|
path: AbsPath,
|
|
4553
|
-
recursive:
|
|
4824
|
+
recursive: import_zod32.z.boolean().default(true),
|
|
4554
4825
|
/** Globs relative to `path` whose changes are not reported (".git/**", "node_modules/**"). */
|
|
4555
|
-
ignore:
|
|
4826
|
+
ignore: import_zod32.z.array(import_zod32.z.string().max(256)).max(64).default([])
|
|
4556
4827
|
});
|
|
4557
|
-
var FsWatchStartResult =
|
|
4828
|
+
var FsWatchStartResult = import_zod32.z.strictObject({
|
|
4558
4829
|
watch_id: FsWatchId,
|
|
4559
4830
|
path: AbsPath,
|
|
4560
4831
|
/** The watch ends by itself if nobody reads it for 30 minutes. */
|
|
4561
4832
|
expires_at_ms: epochMs
|
|
4562
4833
|
});
|
|
4563
|
-
var FsWatchEventsParams =
|
|
4834
|
+
var FsWatchEventsParams = import_zod32.z.strictObject({
|
|
4564
4835
|
watch_id: FsWatchId,
|
|
4565
4836
|
/** Wait up to this long for a first change when none is waiting (0 answers at once). */
|
|
4566
|
-
wait_ms:
|
|
4837
|
+
wait_ms: import_zod32.z.int().min(0).max(25e3).default(0)
|
|
4567
4838
|
});
|
|
4568
|
-
var FsWatchEventsResult =
|
|
4839
|
+
var FsWatchEventsResult = import_zod32.z.strictObject({
|
|
4569
4840
|
/** What changed since the last read, oldest first; re-checked against the disk when read. */
|
|
4570
|
-
changes:
|
|
4841
|
+
changes: import_zod32.z.array(FsChange).max(1e3),
|
|
4571
4842
|
/** Changes were dropped (more than 1000 waited): list the folder again. */
|
|
4572
|
-
overflow:
|
|
4843
|
+
overflow: import_zod32.z.boolean(),
|
|
4573
4844
|
expires_at_ms: epochMs
|
|
4574
4845
|
});
|
|
4575
|
-
var FsWatchStopParams =
|
|
4576
|
-
var FsWatchStopResult =
|
|
4846
|
+
var FsWatchStopParams = import_zod32.z.strictObject({ watch_id: FsWatchId });
|
|
4847
|
+
var FsWatchStopResult = import_zod32.z.strictObject({ watch_id: FsWatchId });
|
|
4577
4848
|
|
|
4578
4849
|
// src/schema/exec-job.ts
|
|
4579
|
-
var
|
|
4580
|
-
var ExecJobId =
|
|
4581
|
-
var ExecJobStartParams =
|
|
4582
|
-
command:
|
|
4850
|
+
var import_zod33 = require("zod");
|
|
4851
|
+
var ExecJobId = import_zod33.z.string().regex(/^job_[A-Za-z0-9]{12,40}$/);
|
|
4852
|
+
var ExecJobStartParams = import_zod33.z.strictObject({
|
|
4853
|
+
command: import_zod33.z.string().min(1).max(131072),
|
|
4583
4854
|
/** The folder it runs in; the home folder when absent. */
|
|
4584
4855
|
cwd: AbsPath.optional(),
|
|
4585
|
-
env:
|
|
4856
|
+
env: import_zod33.z.record(import_zod33.z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(128), import_zod33.z.string().max(32768)).optional()
|
|
4586
4857
|
});
|
|
4587
|
-
var ExecJobStartResult =
|
|
4588
|
-
var ExecJobOutputParams =
|
|
4858
|
+
var ExecJobStartResult = import_zod33.z.strictObject({ job_id: ExecJobId, pid: import_zod33.z.int().min(1), cwd: AbsPath });
|
|
4859
|
+
var ExecJobOutputParams = import_zod33.z.strictObject({
|
|
4589
4860
|
job_id: ExecJobId,
|
|
4590
4861
|
/** Byte offset into the job's output to read from (next_offset of the last read; 0 = the start). */
|
|
4591
4862
|
offset: nonNegInt.default(0),
|
|
4592
4863
|
/** Wait up to this long for new output or the exit when none is waiting (0 answers at once). */
|
|
4593
|
-
wait_ms:
|
|
4594
|
-
max_bytes:
|
|
4864
|
+
wait_ms: import_zod33.z.int().min(0).max(25e3).default(0),
|
|
4865
|
+
max_bytes: import_zod33.z.int().min(1024).max(1048576).default(65536)
|
|
4595
4866
|
});
|
|
4596
|
-
var ExecJobOutputResult =
|
|
4867
|
+
var ExecJobOutputResult = import_zod33.z.strictObject({
|
|
4597
4868
|
/** stdout and stderr interleaved as they arrived (UTF-8). */
|
|
4598
|
-
output:
|
|
4869
|
+
output: import_zod33.z.string(),
|
|
4599
4870
|
next_offset: nonNegInt,
|
|
4600
4871
|
/** Bytes before `offset` that are gone (the job keeps its last 4 MiB). */
|
|
4601
4872
|
dropped_bytes: nonNegInt,
|
|
4602
|
-
running:
|
|
4603
|
-
exit_code:
|
|
4873
|
+
running: import_zod33.z.boolean(),
|
|
4874
|
+
exit_code: import_zod33.z.int().nullable()
|
|
4604
4875
|
});
|
|
4605
|
-
var ExecJobStopParams =
|
|
4876
|
+
var ExecJobStopParams = import_zod33.z.strictObject({
|
|
4606
4877
|
job_id: ExecJobId,
|
|
4607
4878
|
/** End it at once (SIGKILL; on Windows the whole tree with /F) instead of asking it to quit. */
|
|
4608
|
-
force:
|
|
4879
|
+
force: import_zod33.z.boolean().default(false)
|
|
4609
4880
|
});
|
|
4610
|
-
var ExecJobStopResult =
|
|
4611
|
-
var ExecJobInfo =
|
|
4881
|
+
var ExecJobStopResult = import_zod33.z.strictObject({ job_id: ExecJobId, exited: import_zod33.z.boolean(), exit_code: import_zod33.z.int().nullable() });
|
|
4882
|
+
var ExecJobInfo = import_zod33.z.strictObject({
|
|
4612
4883
|
job_id: ExecJobId,
|
|
4613
|
-
command:
|
|
4614
|
-
pid:
|
|
4884
|
+
command: import_zod33.z.string().max(1024),
|
|
4885
|
+
pid: import_zod33.z.int().min(1),
|
|
4615
4886
|
cwd: AbsPath,
|
|
4616
|
-
running:
|
|
4617
|
-
exit_code:
|
|
4887
|
+
running: import_zod33.z.boolean(),
|
|
4888
|
+
exit_code: import_zod33.z.int().nullable(),
|
|
4618
4889
|
started_at_ms: epochMs,
|
|
4619
4890
|
output_bytes: nonNegInt
|
|
4620
4891
|
});
|
|
4621
|
-
var ExecJobListParams =
|
|
4622
|
-
var ExecJobListResult =
|
|
4892
|
+
var ExecJobListParams = import_zod33.z.strictObject({});
|
|
4893
|
+
var ExecJobListResult = import_zod33.z.strictObject({ jobs: import_zod33.z.array(ExecJobInfo).max(64) });
|
|
4623
4894
|
|
|
4624
4895
|
// src/schema/coding.ts
|
|
4625
|
-
var
|
|
4896
|
+
var import_zod34 = require("zod");
|
|
4626
4897
|
var import_uuid5 = require("@ai-matrx/kit/uuid");
|
|
4627
|
-
var CodingServiceCredentials =
|
|
4628
|
-
access_token:
|
|
4629
|
-
user_id:
|
|
4898
|
+
var CodingServiceCredentials = import_zod34.z.strictObject({
|
|
4899
|
+
access_token: import_zod34.z.string().min(16).max(16384),
|
|
4900
|
+
user_id: import_zod34.z.string().regex(import_uuid5.UUID_SHAPE_PATTERN),
|
|
4630
4901
|
/** The AI Matrx server this app talks to (production, or a local server on the nightly copy). */
|
|
4631
|
-
server_url:
|
|
4902
|
+
server_url: import_zod34.z.string().min(1).max(2048).regex(/^https?:\/\/[^\s/?#]+(\/[^\s?#]*)?$/),
|
|
4632
4903
|
/**
|
|
4633
4904
|
* The organization the person works in (the core's active organization): the service sends it as
|
|
4634
4905
|
* X-Organization-Id on every AI Matrx request, as the app's own calls do. Absent: the
|
|
4635
4906
|
* service sends nothing and says an organization is needed (1.77).
|
|
4636
4907
|
*/
|
|
4637
|
-
organization_id:
|
|
4908
|
+
organization_id: import_zod34.z.string().regex(import_uuid5.UUID_SHAPE_PATTERN).optional()
|
|
4638
4909
|
});
|
|
4639
|
-
var CodingHistoryBlocked =
|
|
4910
|
+
var CodingHistoryBlocked = import_zod34.z.enum([
|
|
4640
4911
|
"signed_out",
|
|
4641
4912
|
"offline",
|
|
4642
4913
|
"organization_required",
|
|
@@ -4644,11 +4915,11 @@ var CodingHistoryBlocked = import_zod33.z.enum([
|
|
|
4644
4915
|
"cloud_list_unavailable",
|
|
4645
4916
|
"history_too_large"
|
|
4646
4917
|
]);
|
|
4647
|
-
var CodingHistoryFailure =
|
|
4648
|
-
session_id:
|
|
4649
|
-
reason:
|
|
4918
|
+
var CodingHistoryFailure = import_zod34.z.strictObject({
|
|
4919
|
+
session_id: import_zod34.z.string().max(64),
|
|
4920
|
+
reason: import_zod34.z.string().max(300)
|
|
4650
4921
|
});
|
|
4651
|
-
var CodingHistoryRun =
|
|
4922
|
+
var CodingHistoryRun = import_zod34.z.strictObject({
|
|
4652
4923
|
/** Claude Code sessions found on this computer. */
|
|
4653
4924
|
local_sessions: nonNegInt,
|
|
4654
4925
|
/** Of those, already complete in AI Matrx. */
|
|
@@ -4663,39 +4934,39 @@ var CodingHistoryRun = import_zod33.z.strictObject({
|
|
|
4663
4934
|
/** Changed while being read; a later run takes them. */
|
|
4664
4935
|
changed: nonNegInt,
|
|
4665
4936
|
failed: nonNegInt,
|
|
4666
|
-
failures:
|
|
4937
|
+
failures: import_zod34.z.array(CodingHistoryFailure).max(20),
|
|
4667
4938
|
/** Candidates not reached yet. */
|
|
4668
4939
|
remaining: nonNegInt,
|
|
4669
4940
|
/** The one line a person reads, e.g. "Imported 12 of 14 sessions. 140 already in AI Matrx." */
|
|
4670
|
-
summary:
|
|
4941
|
+
summary: import_zod34.z.string().max(400)
|
|
4671
4942
|
});
|
|
4672
|
-
var CodingHistoryStep =
|
|
4943
|
+
var CodingHistoryStep = import_zod34.z.strictObject({
|
|
4673
4944
|
/** Null when the run could not start (blocked before a plan existed). */
|
|
4674
|
-
plan_id:
|
|
4675
|
-
finished:
|
|
4945
|
+
plan_id: import_zod34.z.string().regex(/^[0-9a-f]{32}$/).nullable(),
|
|
4946
|
+
finished: import_zod34.z.boolean(),
|
|
4676
4947
|
blocked: CodingHistoryBlocked.nullable(),
|
|
4677
4948
|
run: CodingHistoryRun
|
|
4678
4949
|
});
|
|
4679
|
-
var CodingPlanMissingParams =
|
|
4680
|
-
var CodingImportNextParams =
|
|
4681
|
-
plan_id:
|
|
4950
|
+
var CodingPlanMissingParams = import_zod34.z.strictObject({ credentials: CodingServiceCredentials.nullable() });
|
|
4951
|
+
var CodingImportNextParams = import_zod34.z.strictObject({
|
|
4952
|
+
plan_id: import_zod34.z.string().regex(/^[0-9a-f]{32}$/),
|
|
4682
4953
|
credentials: CodingServiceCredentials.nullable()
|
|
4683
4954
|
});
|
|
4684
|
-
var CodingServiceProgress =
|
|
4685
|
-
phase:
|
|
4955
|
+
var CodingServiceProgress = import_zod34.z.strictObject({
|
|
4956
|
+
phase: import_zod34.z.enum(["checking", "importing"]),
|
|
4686
4957
|
done: nonNegInt,
|
|
4687
4958
|
total: nonNegInt
|
|
4688
4959
|
});
|
|
4689
|
-
var CodingHistoryImportMissingParams =
|
|
4690
|
-
var CodingHistoryImportMissingResult =
|
|
4691
|
-
state:
|
|
4960
|
+
var CodingHistoryImportMissingParams = import_zod34.z.strictObject({});
|
|
4961
|
+
var CodingHistoryImportMissingResult = import_zod34.z.strictObject({
|
|
4962
|
+
state: import_zod34.z.enum(["done", "blocked", "cancelled"]),
|
|
4692
4963
|
blocked: CodingHistoryBlocked.nullable(),
|
|
4693
4964
|
run: CodingHistoryRun,
|
|
4694
4965
|
elapsed_ms: nonNegInt
|
|
4695
4966
|
});
|
|
4696
|
-
var CodingHistoryProgressEvent =
|
|
4967
|
+
var CodingHistoryProgressEvent = import_zod34.z.strictObject({
|
|
4697
4968
|
request_id: RequestId,
|
|
4698
|
-
phase:
|
|
4969
|
+
phase: import_zod34.z.enum(["checking", "importing"]),
|
|
4699
4970
|
/** Sessions settled so far, of `total` candidates (0 of 0 while checking). */
|
|
4700
4971
|
done: nonNegInt,
|
|
4701
4972
|
total: nonNegInt,
|
|
@@ -4704,165 +4975,165 @@ var CodingHistoryProgressEvent = import_zod33.z.strictObject({
|
|
|
4704
4975
|
});
|
|
4705
4976
|
|
|
4706
4977
|
// src/schema/coding-sessions.ts
|
|
4707
|
-
var
|
|
4708
|
-
var CodingProviderName =
|
|
4709
|
-
var CodingRunStatus =
|
|
4710
|
-
var SessionKey =
|
|
4711
|
-
var IsoTime =
|
|
4712
|
-
var LocalPath =
|
|
4713
|
-
var CodingClientRequestId =
|
|
4714
|
-
var ShortText =
|
|
4715
|
-
var CodingRunUsage =
|
|
4978
|
+
var import_zod35 = require("zod");
|
|
4979
|
+
var CodingProviderName = import_zod35.z.enum(["claude", "codex"]);
|
|
4980
|
+
var CodingRunStatus = import_zod35.z.enum(["starting", "running", "completed", "stopped", "failed"]);
|
|
4981
|
+
var SessionKey = import_zod35.z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/);
|
|
4982
|
+
var IsoTime = import_zod35.z.string().min(10).max(40);
|
|
4983
|
+
var LocalPath = import_zod35.z.string().min(1).max(4096);
|
|
4984
|
+
var CodingClientRequestId = import_zod35.z.string().regex(/^[A-Za-z0-9_-]{8,64}$/);
|
|
4985
|
+
var ShortText = import_zod35.z.string().max(500);
|
|
4986
|
+
var CodingRunUsage = import_zod35.z.strictObject({
|
|
4716
4987
|
inputTokens: nonNegInt,
|
|
4717
4988
|
outputTokens: nonNegInt,
|
|
4718
4989
|
cachedInputTokens: nonNegInt
|
|
4719
4990
|
});
|
|
4720
|
-
var CodingStartedBy =
|
|
4721
|
-
kind:
|
|
4722
|
-
label:
|
|
4991
|
+
var CodingStartedBy = import_zod35.z.strictObject({
|
|
4992
|
+
kind: import_zod35.z.enum(["this_computer", "web", "phone", "agent", "other"]),
|
|
4993
|
+
label: import_zod35.z.string().min(1).max(80)
|
|
4723
4994
|
});
|
|
4724
|
-
var CodingRunRecord =
|
|
4725
|
-
runId:
|
|
4995
|
+
var CodingRunRecord = import_zod35.z.strictObject({
|
|
4996
|
+
runId: import_zod35.z.string().min(1).max(64),
|
|
4726
4997
|
sessionId: SessionKey,
|
|
4727
4998
|
provider: CodingProviderName,
|
|
4728
4999
|
cwd: LocalPath,
|
|
4729
|
-
prompt:
|
|
4730
|
-
model:
|
|
5000
|
+
prompt: import_zod35.z.string().max(1048576),
|
|
5001
|
+
model: import_zod35.z.string().max(200).nullable(),
|
|
4731
5002
|
status: CodingRunStatus,
|
|
4732
5003
|
startedAt: IsoTime,
|
|
4733
5004
|
endedAt: IsoTime.nullable(),
|
|
4734
|
-
error:
|
|
5005
|
+
error: import_zod35.z.string().max(65536).nullable(),
|
|
4735
5006
|
usage: CodingRunUsage.nullable(),
|
|
4736
|
-
costUsd:
|
|
4737
|
-
billing:
|
|
5007
|
+
costUsd: import_zod35.z.number().nullable(),
|
|
5008
|
+
billing: import_zod35.z.enum(["subscription", "api", "unknown"]).nullable(),
|
|
4738
5009
|
startedBy: CodingStartedBy.nullable()
|
|
4739
5010
|
});
|
|
4740
|
-
var CodingSessionAgentPart =
|
|
4741
|
-
part:
|
|
5011
|
+
var CodingSessionAgentPart = import_zod35.z.strictObject({
|
|
5012
|
+
part: import_zod35.z.enum(["instructions", "skills", "tools"]),
|
|
4742
5013
|
loaded: nonNegInt,
|
|
4743
5014
|
total: nonNegInt
|
|
4744
5015
|
});
|
|
4745
|
-
var CodingSessionAgent =
|
|
4746
|
-
agentId:
|
|
4747
|
-
versionId:
|
|
5016
|
+
var CodingSessionAgent = import_zod35.z.strictObject({
|
|
5017
|
+
agentId: import_zod35.z.string().min(1).max(64),
|
|
5018
|
+
versionId: import_zod35.z.string().max(64).nullable(),
|
|
4748
5019
|
versionNumber: nonNegInt.nullable(),
|
|
4749
|
-
name:
|
|
4750
|
-
definitionHash:
|
|
4751
|
-
loaded:
|
|
4752
|
-
unavailable:
|
|
4753
|
-
skills:
|
|
4754
|
-
tools:
|
|
4755
|
-
variables:
|
|
4756
|
-
blockDue:
|
|
5020
|
+
name: import_zod35.z.string().max(300),
|
|
5021
|
+
definitionHash: import_zod35.z.string().max(200),
|
|
5022
|
+
loaded: import_zod35.z.array(CodingSessionAgentPart).max(3),
|
|
5023
|
+
unavailable: import_zod35.z.array(import_zod35.z.strictObject({ kind: import_zod35.z.string().max(60), name: import_zod35.z.string().max(300), reason: ShortText })).max(500),
|
|
5024
|
+
skills: import_zod35.z.array(import_zod35.z.string().max(300)).max(500),
|
|
5025
|
+
tools: import_zod35.z.array(import_zod35.z.string().max(300)).max(500),
|
|
5026
|
+
variables: import_zod35.z.record(import_zod35.z.string().max(200), import_zod35.z.unknown()),
|
|
5027
|
+
blockDue: import_zod35.z.boolean(),
|
|
4757
5028
|
deliveredAt: IsoTime.nullable(),
|
|
4758
|
-
replaces:
|
|
5029
|
+
replaces: import_zod35.z.string().max(300).nullable()
|
|
4759
5030
|
});
|
|
4760
|
-
var CodingSessionRecord =
|
|
5031
|
+
var CodingSessionRecord = import_zod35.z.strictObject({
|
|
4761
5032
|
id: SessionKey,
|
|
4762
5033
|
provider: CodingProviderName,
|
|
4763
5034
|
providerSessionId: SessionKey.nullable(),
|
|
4764
5035
|
cwd: LocalPath,
|
|
4765
|
-
title:
|
|
4766
|
-
model:
|
|
4767
|
-
effort:
|
|
4768
|
-
origin:
|
|
5036
|
+
title: import_zod35.z.string().max(500),
|
|
5037
|
+
model: import_zod35.z.string().max(200).nullable(),
|
|
5038
|
+
effort: import_zod35.z.string().max(40).nullable(),
|
|
5039
|
+
origin: import_zod35.z.enum(["started", "takeover"]),
|
|
4769
5040
|
createdAt: IsoTime,
|
|
4770
5041
|
updatedAt: IsoTime,
|
|
4771
|
-
lastRunId:
|
|
5042
|
+
lastRunId: import_zod35.z.string().max(64).nullable(),
|
|
4772
5043
|
lastRunStatus: CodingRunStatus.nullable(),
|
|
4773
|
-
queued:
|
|
5044
|
+
queued: import_zod35.z.array(import_zod35.z.string().max(1048576)).max(100),
|
|
4774
5045
|
agent: CodingSessionAgent.nullable(),
|
|
4775
|
-
agentRemovedDue:
|
|
5046
|
+
agentRemovedDue: import_zod35.z.boolean(),
|
|
4776
5047
|
/**
|
|
4777
5048
|
* (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session
|
|
4778
5049
|
* runs as, or whose config directory holds the chat. Absent: the default sign-in.
|
|
4779
5050
|
*/
|
|
4780
|
-
accountId:
|
|
5051
|
+
accountId: import_zod35.z.string().min(1).max(64).optional()
|
|
4781
5052
|
});
|
|
4782
|
-
var CodingActiveElsewhere =
|
|
4783
|
-
reason:
|
|
5053
|
+
var CodingActiveElsewhere = import_zod35.z.strictObject({
|
|
5054
|
+
reason: import_zod35.z.enum(["process", "recent-write", "open-tool-call", "open"]),
|
|
4784
5055
|
message: ShortText,
|
|
4785
5056
|
/** The process driving it, when the evidence is a process (re-checked before any stop). */
|
|
4786
|
-
pid:
|
|
5057
|
+
pid: import_zod35.z.int().min(1).nullable()
|
|
4787
5058
|
});
|
|
4788
|
-
var CodingTitleSource =
|
|
4789
|
-
var CodingDiscoveredChat =
|
|
5059
|
+
var CodingTitleSource = import_zod35.z.enum(["app", "app-remembered", "custom-title", "ai-title", "agent-name", "summary", "first-prompt", "last-prompt", "unknown"]);
|
|
5060
|
+
var CodingDiscoveredChat = import_zod35.z.strictObject({
|
|
4790
5061
|
provider: CodingProviderName,
|
|
4791
5062
|
providerSessionId: SessionKey,
|
|
4792
5063
|
cwd: LocalPath.nullable(),
|
|
4793
|
-
title:
|
|
5064
|
+
title: import_zod35.z.string().max(500),
|
|
4794
5065
|
titleSource: CodingTitleSource.optional(),
|
|
4795
|
-
titlePending:
|
|
4796
|
-
archived:
|
|
4797
|
-
scheduled:
|
|
4798
|
-
unlisted:
|
|
5066
|
+
titlePending: import_zod35.z.boolean().optional(),
|
|
5067
|
+
archived: import_zod35.z.boolean().optional(),
|
|
5068
|
+
scheduled: import_zod35.z.boolean().optional(),
|
|
5069
|
+
unlisted: import_zod35.z.boolean().optional(),
|
|
4799
5070
|
unavailable: ShortText.nullable(),
|
|
4800
5071
|
updatedAt: IsoTime,
|
|
4801
|
-
source:
|
|
5072
|
+
source: import_zod35.z.string().max(60).nullable(),
|
|
4802
5073
|
activeElsewhere: CodingActiveElsewhere.nullable(),
|
|
4803
5074
|
/**
|
|
4804
5075
|
* (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session
|
|
4805
5076
|
* runs as, or whose config directory holds the chat. Absent: the default sign-in.
|
|
4806
5077
|
*/
|
|
4807
|
-
accountId:
|
|
4808
|
-
});
|
|
4809
|
-
var CodingTranscriptItem =
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
kind:
|
|
4817
|
-
id:
|
|
4818
|
-
output:
|
|
4819
|
-
isError:
|
|
5078
|
+
accountId: import_zod35.z.string().min(1).max(64).optional()
|
|
5079
|
+
});
|
|
5080
|
+
var CodingTranscriptItem = import_zod35.z.discriminatedUnion("kind", [
|
|
5081
|
+
import_zod35.z.strictObject({ kind: import_zod35.z.literal("user"), id: import_zod35.z.string().max(200), text: import_zod35.z.string(), at: IsoTime.nullable() }),
|
|
5082
|
+
import_zod35.z.strictObject({ kind: import_zod35.z.literal("text"), id: import_zod35.z.string().max(200), text: import_zod35.z.string() }),
|
|
5083
|
+
import_zod35.z.strictObject({ kind: import_zod35.z.literal("text-delta"), id: import_zod35.z.string().max(200), text: import_zod35.z.string() }),
|
|
5084
|
+
import_zod35.z.strictObject({ kind: import_zod35.z.literal("reasoning"), id: import_zod35.z.string().max(200), text: import_zod35.z.string() }),
|
|
5085
|
+
import_zod35.z.strictObject({ kind: import_zod35.z.literal("tool-call"), id: import_zod35.z.string().max(200), name: import_zod35.z.string().max(300), input: import_zod35.z.unknown() }),
|
|
5086
|
+
import_zod35.z.strictObject({
|
|
5087
|
+
kind: import_zod35.z.literal("tool-result"),
|
|
5088
|
+
id: import_zod35.z.string().max(200),
|
|
5089
|
+
output: import_zod35.z.string(),
|
|
5090
|
+
isError: import_zod35.z.boolean(),
|
|
4820
5091
|
/** The output's full size when only its start is here; `coding.item.full` reads the rest. */
|
|
4821
5092
|
fullBytes: nonNegInt.optional()
|
|
4822
5093
|
}),
|
|
4823
|
-
|
|
4824
|
-
|
|
5094
|
+
import_zod35.z.strictObject({ kind: import_zod35.z.literal("usage"), usage: CodingRunUsage, costUsd: import_zod35.z.number().nullable() }),
|
|
5095
|
+
import_zod35.z.strictObject({ kind: import_zod35.z.literal("notice"), id: import_zod35.z.string().max(200), level: import_zod35.z.enum(["info", "warning"]), text: import_zod35.z.string() }),
|
|
4825
5096
|
/** "Continue on <account>": the line across the transcript where the chat moved from `from`. */
|
|
4826
|
-
|
|
4827
|
-
|
|
5097
|
+
import_zod35.z.strictObject({ kind: import_zod35.z.literal("continued"), id: import_zod35.z.string().max(200), from: import_zod35.z.string().max(300), text: import_zod35.z.string(), at: IsoTime.nullable() }),
|
|
5098
|
+
import_zod35.z.strictObject({ kind: import_zod35.z.literal("error"), id: import_zod35.z.string().max(200), text: import_zod35.z.string() })
|
|
4828
5099
|
]);
|
|
4829
|
-
var CodingHistoryRecord =
|
|
4830
|
-
items:
|
|
5100
|
+
var CodingHistoryRecord = import_zod35.z.strictObject({
|
|
5101
|
+
items: import_zod35.z.array(CodingTranscriptItem),
|
|
4831
5102
|
/** Only the end of the chat is here; "Show earlier" reads more (a bigger `max_bytes`). */
|
|
4832
|
-
truncated:
|
|
5103
|
+
truncated: import_zod35.z.boolean(),
|
|
4833
5104
|
unavailable: ShortText.nullable(),
|
|
4834
5105
|
/** The last live item `seq` this read already contains; a watch applies only newer ones. */
|
|
4835
5106
|
seq: nonNegInt
|
|
4836
5107
|
});
|
|
4837
|
-
var CodingQuotaWindow =
|
|
4838
|
-
label:
|
|
4839
|
-
usedPercent:
|
|
4840
|
-
resetsAt:
|
|
4841
|
-
valueLabel:
|
|
5108
|
+
var CodingQuotaWindow = import_zod35.z.strictObject({
|
|
5109
|
+
label: import_zod35.z.string().max(120),
|
|
5110
|
+
usedPercent: import_zod35.z.number().nullable(),
|
|
5111
|
+
resetsAt: import_zod35.z.string().max(80).nullable(),
|
|
5112
|
+
valueLabel: import_zod35.z.string().max(120).nullable()
|
|
4842
5113
|
});
|
|
4843
|
-
var CodingProviderProblem =
|
|
4844
|
-
kind:
|
|
4845
|
-
message:
|
|
4846
|
-
until:
|
|
5114
|
+
var CodingProviderProblem = import_zod35.z.strictObject({
|
|
5115
|
+
kind: import_zod35.z.enum(["usage-limit", "signed-out"]),
|
|
5116
|
+
message: import_zod35.z.string().max(2e3),
|
|
5117
|
+
until: import_zod35.z.string().max(120).nullable(),
|
|
4847
5118
|
at: IsoTime
|
|
4848
5119
|
});
|
|
4849
|
-
var CodingAccountUsage =
|
|
4850
|
-
windows:
|
|
5120
|
+
var CodingAccountUsage = import_zod35.z.strictObject({
|
|
5121
|
+
windows: import_zod35.z.array(CodingQuotaWindow).max(20),
|
|
4851
5122
|
/** The provider's own status word ("allowed", "allowed_warning", "rejected"...), when it gives one. */
|
|
4852
|
-
status:
|
|
5123
|
+
status: import_zod35.z.string().max(60).nullable(),
|
|
4853
5124
|
/** When a rejected status lifts (ISO), when the provider says. */
|
|
4854
|
-
resetsAt:
|
|
5125
|
+
resetsAt: import_zod35.z.string().max(80).nullable(),
|
|
4855
5126
|
at: IsoTime
|
|
4856
5127
|
});
|
|
4857
|
-
var CodingContinueTarget =
|
|
4858
|
-
accountId:
|
|
4859
|
-
label:
|
|
5128
|
+
var CodingContinueTarget = import_zod35.z.strictObject({
|
|
5129
|
+
accountId: import_zod35.z.string().min(1).max(64).nullable(),
|
|
5130
|
+
label: import_zod35.z.string().max(200)
|
|
4860
5131
|
});
|
|
4861
|
-
var CodingProviderAccount =
|
|
4862
|
-
id:
|
|
4863
|
-
label:
|
|
5132
|
+
var CodingProviderAccount = import_zod35.z.strictObject({
|
|
5133
|
+
id: import_zod35.z.string().min(1).max(64),
|
|
5134
|
+
label: import_zod35.z.string().max(200),
|
|
4864
5135
|
/** (1.57) No known usage limit or expired sign-in on this account. Absent: not read. */
|
|
4865
|
-
ready:
|
|
5136
|
+
ready: import_zod35.z.boolean().optional(),
|
|
4866
5137
|
lastProblem: CodingProviderProblem.optional(),
|
|
4867
5138
|
problem: ShortText.optional(),
|
|
4868
5139
|
fix: ShortText.optional(),
|
|
@@ -4871,43 +5142,43 @@ var CodingProviderAccount = import_zod34.z.strictObject({
|
|
|
4871
5142
|
/** (1.57) This account is limited and that other one is not: "Continue on <label>". */
|
|
4872
5143
|
continueOn: CodingContinueTarget.optional()
|
|
4873
5144
|
});
|
|
4874
|
-
var CodingProviderBinary =
|
|
5145
|
+
var CodingProviderBinary = import_zod35.z.strictObject({
|
|
4875
5146
|
path: LocalPath,
|
|
4876
|
-
version:
|
|
4877
|
-
source:
|
|
4878
|
-
sourceLabel:
|
|
4879
|
-
newer:
|
|
5147
|
+
version: import_zod35.z.string().max(80).nullable(),
|
|
5148
|
+
source: import_zod35.z.enum(["desktop-app", "path", "npm-global", "configured"]),
|
|
5149
|
+
sourceLabel: import_zod35.z.string().max(120),
|
|
5150
|
+
newer: import_zod35.z.strictObject({ path: LocalPath, version: import_zod35.z.string().max(80), sourceLabel: import_zod35.z.string().max(120) }).nullable()
|
|
4880
5151
|
});
|
|
4881
|
-
var CodingProviderStatus =
|
|
5152
|
+
var CodingProviderStatus = import_zod35.z.strictObject({
|
|
4882
5153
|
provider: CodingProviderName,
|
|
4883
|
-
label:
|
|
4884
|
-
installed:
|
|
4885
|
-
version:
|
|
4886
|
-
loggedIn:
|
|
4887
|
-
billing:
|
|
4888
|
-
plan:
|
|
4889
|
-
account:
|
|
5154
|
+
label: import_zod35.z.string().max(60),
|
|
5155
|
+
installed: import_zod35.z.boolean(),
|
|
5156
|
+
version: import_zod35.z.string().max(80).nullable(),
|
|
5157
|
+
loggedIn: import_zod35.z.boolean(),
|
|
5158
|
+
billing: import_zod35.z.enum(["subscription", "api", "unknown"]),
|
|
5159
|
+
plan: import_zod35.z.string().max(80).nullable(),
|
|
5160
|
+
account: import_zod35.z.string().max(320).nullable(),
|
|
4890
5161
|
problem: ShortText.nullable(),
|
|
4891
5162
|
fix: ShortText.nullable(),
|
|
4892
|
-
ready:
|
|
5163
|
+
ready: import_zod35.z.boolean(),
|
|
4893
5164
|
lastProblem: CodingProviderProblem.nullable(),
|
|
4894
|
-
quota:
|
|
4895
|
-
models:
|
|
4896
|
-
efforts:
|
|
5165
|
+
quota: import_zod35.z.array(CodingQuotaWindow).max(20),
|
|
5166
|
+
models: import_zod35.z.array(import_zod35.z.strictObject({ id: import_zod35.z.string().max(200), label: import_zod35.z.string().max(200) })).max(200),
|
|
5167
|
+
efforts: import_zod35.z.array(import_zod35.z.string().max(40)).max(20),
|
|
4897
5168
|
/**
|
|
4898
5169
|
* Where the default model came from: the app's own settings file, the account (1.54: the signed-in
|
|
4899
5170
|
* account's default, e.g. Codex's), or the driver's built-in pick. A peer older than 1.54 is sent
|
|
4900
5171
|
* "driver" for "account" (its enum does not know the value).
|
|
4901
5172
|
*/
|
|
4902
|
-
defaultModel:
|
|
4903
|
-
defaultEffort:
|
|
5173
|
+
defaultModel: import_zod35.z.strictObject({ id: import_zod35.z.string().max(200), source: import_zod35.z.enum(["settings", "driver", "account"]) }).nullable(),
|
|
5174
|
+
defaultEffort: import_zod35.z.string().max(40).nullable(),
|
|
4904
5175
|
binary: CodingProviderBinary.nullable(),
|
|
4905
5176
|
/**
|
|
4906
5177
|
* (1.53) The person's other accounts for this app on the computer (Matrx 2's Accounts) that a run
|
|
4907
5178
|
* can use, as the computer's engine lists them; New session offers them beside the default sign-in.
|
|
4908
5179
|
* Absent: only the default sign-in (or a computer older than 1.53).
|
|
4909
5180
|
*/
|
|
4910
|
-
accounts:
|
|
5181
|
+
accounts: import_zod35.z.array(CodingProviderAccount).max(100).optional(),
|
|
4911
5182
|
/** (1.53) The computer tried to list `accounts` and could not: a short sentence the form shows with a retry. */
|
|
4912
5183
|
accountsProblem: ShortText.optional(),
|
|
4913
5184
|
/** (1.57) The default sign-in's usage as last seen. Absent: never seen ("No usage data yet"). */
|
|
@@ -4915,248 +5186,383 @@ var CodingProviderStatus = import_zod34.z.strictObject({
|
|
|
4915
5186
|
/** (1.57) The default sign-in is limited and this other account is not: "Continue on <label>". */
|
|
4916
5187
|
continueOn: CodingContinueTarget.optional()
|
|
4917
5188
|
});
|
|
4918
|
-
var CodingChatPreference =
|
|
4919
|
-
title:
|
|
4920
|
-
pinned:
|
|
4921
|
-
hidden:
|
|
5189
|
+
var CodingChatPreference = import_zod35.z.strictObject({
|
|
5190
|
+
title: import_zod35.z.string().max(500).nullable(),
|
|
5191
|
+
pinned: import_zod35.z.boolean(),
|
|
5192
|
+
hidden: import_zod35.z.boolean(),
|
|
4922
5193
|
/** When the person last had this chat open on any screen of this computer (the "New output" dot). */
|
|
4923
5194
|
lastSeenAt: IsoTime.nullable(),
|
|
4924
5195
|
updatedAt: IsoTime.nullable()
|
|
4925
5196
|
});
|
|
4926
|
-
var CodingTitleStatus =
|
|
4927
|
-
owner:
|
|
4928
|
-
pending:
|
|
5197
|
+
var CodingTitleStatus = import_zod35.z.strictObject({
|
|
5198
|
+
owner: import_zod35.z.boolean(),
|
|
5199
|
+
pending: import_zod35.z.boolean(),
|
|
4929
5200
|
problem: ShortText.nullable(),
|
|
4930
5201
|
renames: ShortText.nullable()
|
|
4931
5202
|
});
|
|
4932
|
-
var CodingRecentRow =
|
|
4933
|
-
target:
|
|
4934
|
-
title:
|
|
5203
|
+
var CodingRecentRow = import_zod35.z.strictObject({
|
|
5204
|
+
target: import_zod35.z.string().min(3).max(200),
|
|
5205
|
+
title: import_zod35.z.string().max(500),
|
|
4935
5206
|
provider: CodingProviderName,
|
|
4936
5207
|
sessionId: SessionKey.nullable(),
|
|
4937
5208
|
providerSessionId: SessionKey.nullable(),
|
|
4938
5209
|
cwd: LocalPath.nullable(),
|
|
4939
5210
|
updatedAt: IsoTime,
|
|
4940
|
-
state:
|
|
4941
|
-
stateLabel:
|
|
4942
|
-
pinned:
|
|
5211
|
+
state: import_zod35.z.enum(["running", "needs_attention", "new_output", "elsewhere", "idle"]),
|
|
5212
|
+
stateLabel: import_zod35.z.string().max(120).nullable(),
|
|
5213
|
+
pinned: import_zod35.z.boolean(),
|
|
4943
5214
|
startedBy: CodingStartedBy.nullable(),
|
|
4944
5215
|
/**
|
|
4945
5216
|
* (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session
|
|
4946
5217
|
* runs as, or whose config directory holds the chat. Absent: the default sign-in.
|
|
4947
5218
|
*/
|
|
4948
|
-
accountId:
|
|
5219
|
+
accountId: import_zod35.z.string().min(1).max(64).optional()
|
|
4949
5220
|
});
|
|
4950
|
-
var CodingFolderCheck =
|
|
4951
|
-
path:
|
|
4952
|
-
exists:
|
|
4953
|
-
isDirectory:
|
|
5221
|
+
var CodingFolderCheck = import_zod35.z.strictObject({
|
|
5222
|
+
path: import_zod35.z.string().max(4096),
|
|
5223
|
+
exists: import_zod35.z.boolean(),
|
|
5224
|
+
isDirectory: import_zod35.z.boolean()
|
|
4954
5225
|
});
|
|
4955
|
-
var CodingRecentFolder =
|
|
4956
|
-
var CodingAgentSelectionParams =
|
|
4957
|
-
agent_id:
|
|
4958
|
-
version_id:
|
|
4959
|
-
variables:
|
|
5226
|
+
var CodingRecentFolder = import_zod35.z.strictObject({ path: LocalPath, lastUsedAt: IsoTime, exists: import_zod35.z.boolean() });
|
|
5227
|
+
var CodingAgentSelectionParams = import_zod35.z.strictObject({
|
|
5228
|
+
agent_id: import_zod35.z.string().min(1).max(64),
|
|
5229
|
+
version_id: import_zod35.z.string().min(1).max(64).optional(),
|
|
5230
|
+
variables: import_zod35.z.record(import_zod35.z.string().max(200), import_zod35.z.unknown()).optional()
|
|
4960
5231
|
});
|
|
4961
|
-
var CodingSendResult =
|
|
5232
|
+
var CodingSendResult = import_zod35.z.strictObject({
|
|
4962
5233
|
session: CodingSessionRecord,
|
|
4963
5234
|
run: CodingRunRecord.nullable(),
|
|
4964
5235
|
/** The prompt waits behind a live run (it shows as a queued bubble). */
|
|
4965
|
-
queued:
|
|
5236
|
+
queued: import_zod35.z.boolean()
|
|
4966
5237
|
});
|
|
4967
|
-
var CodingProvidersParams =
|
|
4968
|
-
var CodingProvidersResult =
|
|
4969
|
-
var CodingSessionsListParams =
|
|
4970
|
-
var CodingSessionsListResult =
|
|
4971
|
-
sessions:
|
|
5238
|
+
var CodingProvidersParams = import_zod35.z.strictObject({});
|
|
5239
|
+
var CodingProvidersResult = import_zod35.z.strictObject({ providers: import_zod35.z.array(CodingProviderStatus).max(4) });
|
|
5240
|
+
var CodingSessionsListParams = import_zod35.z.strictObject({});
|
|
5241
|
+
var CodingSessionsListResult = import_zod35.z.strictObject({
|
|
5242
|
+
sessions: import_zod35.z.array(CodingSessionRecord),
|
|
4972
5243
|
/** The latest run of each session, by session id. */
|
|
4973
|
-
runs:
|
|
4974
|
-
recent:
|
|
5244
|
+
runs: import_zod35.z.record(import_zod35.z.string().max(128), CodingRunRecord),
|
|
5245
|
+
recent: import_zod35.z.array(CodingRecentRow),
|
|
4975
5246
|
title_status: CodingTitleStatus
|
|
4976
5247
|
});
|
|
4977
|
-
var CodingDiscoverParams =
|
|
4978
|
-
var CodingDiscoverResult =
|
|
4979
|
-
var CodingRunsListParams =
|
|
4980
|
-
var CodingRunsListResult =
|
|
4981
|
-
var CodingHistoryParams =
|
|
5248
|
+
var CodingDiscoverParams = import_zod35.z.strictObject({ limit: import_zod35.z.int().min(1).max(1e3).optional() });
|
|
5249
|
+
var CodingDiscoverResult = import_zod35.z.strictObject({ chats: import_zod35.z.array(CodingDiscoveredChat) });
|
|
5250
|
+
var CodingRunsListParams = import_zod35.z.strictObject({ session_id: SessionKey });
|
|
5251
|
+
var CodingRunsListResult = import_zod35.z.strictObject({ runs: import_zod35.z.array(CodingRunRecord) });
|
|
5252
|
+
var CodingHistoryParams = import_zod35.z.strictObject({ session_id: SessionKey, max_bytes: import_zod35.z.int().min(1024).max(209715200).optional() });
|
|
4982
5253
|
var CodingHistoryResult = CodingHistoryRecord;
|
|
4983
|
-
var CodingTranscriptReadParams =
|
|
5254
|
+
var CodingTranscriptReadParams = import_zod35.z.strictObject({
|
|
4984
5255
|
provider: CodingProviderName,
|
|
4985
5256
|
provider_session_id: SessionKey,
|
|
4986
|
-
max_bytes:
|
|
5257
|
+
max_bytes: import_zod35.z.int().min(1024).max(209715200).optional()
|
|
4987
5258
|
});
|
|
4988
5259
|
var CodingTranscriptReadResult = CodingHistoryRecord;
|
|
4989
|
-
var CodingItemFullParams =
|
|
5260
|
+
var CodingItemFullParams = import_zod35.z.strictObject({
|
|
4990
5261
|
provider: CodingProviderName,
|
|
4991
5262
|
provider_session_id: SessionKey,
|
|
4992
|
-
item_id:
|
|
4993
|
-
});
|
|
4994
|
-
var CodingItemFullResult =
|
|
4995
|
-
var CodingActivityParams =
|
|
4996
|
-
var CodingActivityResult =
|
|
4997
|
-
var CodingFoldersRecentParams =
|
|
4998
|
-
var CodingFoldersRecentResult =
|
|
4999
|
-
var CodingFoldersCheckParams =
|
|
5263
|
+
item_id: import_zod35.z.string().min(1).max(200)
|
|
5264
|
+
});
|
|
5265
|
+
var CodingItemFullResult = import_zod35.z.strictObject({ output: import_zod35.z.string(), bytes: nonNegInt });
|
|
5266
|
+
var CodingActivityParams = import_zod35.z.strictObject({ provider: CodingProviderName, provider_session_id: SessionKey });
|
|
5267
|
+
var CodingActivityResult = import_zod35.z.strictObject({ active: CodingActiveElsewhere.nullable() });
|
|
5268
|
+
var CodingFoldersRecentParams = import_zod35.z.strictObject({});
|
|
5269
|
+
var CodingFoldersRecentResult = import_zod35.z.strictObject({ folders: import_zod35.z.array(CodingRecentFolder).max(100) });
|
|
5270
|
+
var CodingFoldersCheckParams = import_zod35.z.strictObject({ path: import_zod35.z.string().min(1).max(4096) });
|
|
5000
5271
|
var CodingFoldersCheckResult = CodingFolderCheck;
|
|
5001
|
-
var CodingFoldersCreateParams =
|
|
5272
|
+
var CodingFoldersCreateParams = import_zod35.z.strictObject({ path: import_zod35.z.string().min(1).max(4096) });
|
|
5002
5273
|
var CodingFoldersCreateResult = CodingFolderCheck;
|
|
5003
|
-
var CodingStartParams =
|
|
5274
|
+
var CodingStartParams = import_zod35.z.strictObject({
|
|
5004
5275
|
provider: CodingProviderName,
|
|
5005
|
-
cwd:
|
|
5006
|
-
prompt:
|
|
5007
|
-
model:
|
|
5008
|
-
effort:
|
|
5276
|
+
cwd: import_zod35.z.string().min(1).max(4096),
|
|
5277
|
+
prompt: import_zod35.z.string().min(1).max(1048576),
|
|
5278
|
+
model: import_zod35.z.string().min(1).max(200).optional(),
|
|
5279
|
+
effort: import_zod35.z.string().min(1).max(40).optional(),
|
|
5009
5280
|
agent: CodingAgentSelectionParams.optional(),
|
|
5010
5281
|
/** One of the person's coding accounts on this computer (Accounts); absent = the default login. */
|
|
5011
|
-
account_profile_id:
|
|
5282
|
+
account_profile_id: import_zod35.z.string().min(1).max(64).optional(),
|
|
5012
5283
|
client_request_id: CodingClientRequestId
|
|
5013
5284
|
});
|
|
5014
5285
|
var CodingStartResult = CodingSendResult;
|
|
5015
|
-
var CodingTakeoverParams =
|
|
5286
|
+
var CodingTakeoverParams = import_zod35.z.strictObject({
|
|
5016
5287
|
provider: CodingProviderName,
|
|
5017
5288
|
provider_session_id: SessionKey,
|
|
5018
|
-
cwd:
|
|
5019
|
-
title:
|
|
5289
|
+
cwd: import_zod35.z.string().min(1).max(4096),
|
|
5290
|
+
title: import_zod35.z.string().max(500).optional(),
|
|
5020
5291
|
agent: CodingAgentSelectionParams.optional(),
|
|
5021
|
-
confirm_elsewhere:
|
|
5292
|
+
confirm_elsewhere: import_zod35.z.boolean().optional()
|
|
5022
5293
|
});
|
|
5023
|
-
var CodingTakeoverResult =
|
|
5024
|
-
var CodingSendParams =
|
|
5294
|
+
var CodingTakeoverResult = import_zod35.z.strictObject({ session: CodingSessionRecord });
|
|
5295
|
+
var CodingSendParams = import_zod35.z.strictObject({
|
|
5025
5296
|
session_id: SessionKey,
|
|
5026
|
-
prompt:
|
|
5297
|
+
prompt: import_zod35.z.string().min(1).max(1048576),
|
|
5027
5298
|
client_request_id: CodingClientRequestId
|
|
5028
5299
|
});
|
|
5029
|
-
var CodingStopParams =
|
|
5030
|
-
var CodingStopResult =
|
|
5031
|
-
var CodingStopElsewhereParams =
|
|
5300
|
+
var CodingStopParams = import_zod35.z.strictObject({ run_id: import_zod35.z.string().min(1).max(64) });
|
|
5301
|
+
var CodingStopResult = import_zod35.z.strictObject({ run: CodingRunRecord.nullable() });
|
|
5302
|
+
var CodingStopElsewhereParams = import_zod35.z.strictObject({
|
|
5032
5303
|
provider: CodingProviderName,
|
|
5033
5304
|
provider_session_id: SessionKey,
|
|
5034
|
-
pid:
|
|
5305
|
+
pid: import_zod35.z.int().min(1)
|
|
5035
5306
|
});
|
|
5036
|
-
var CodingStopElsewhereResult =
|
|
5037
|
-
var CodingOptionsSetParams =
|
|
5307
|
+
var CodingStopElsewhereResult = import_zod35.z.strictObject({ stopped: import_zod35.z.boolean(), message: ShortText });
|
|
5308
|
+
var CodingOptionsSetParams = import_zod35.z.strictObject({
|
|
5038
5309
|
session_id: SessionKey,
|
|
5039
|
-
model:
|
|
5040
|
-
effort:
|
|
5310
|
+
model: import_zod35.z.string().max(200).optional(),
|
|
5311
|
+
effort: import_zod35.z.string().max(40).optional()
|
|
5041
5312
|
});
|
|
5042
|
-
var CodingOptionsSetResult =
|
|
5043
|
-
var CodingAccountContinueParams =
|
|
5313
|
+
var CodingOptionsSetResult = import_zod35.z.strictObject({ session: CodingSessionRecord });
|
|
5314
|
+
var CodingAccountContinueParams = import_zod35.z.strictObject({
|
|
5044
5315
|
session_id: SessionKey,
|
|
5045
|
-
account_profile_id:
|
|
5316
|
+
account_profile_id: import_zod35.z.string().min(1).max(64).optional(),
|
|
5046
5317
|
client_request_id: CodingClientRequestId
|
|
5047
5318
|
});
|
|
5048
|
-
var CodingAccountContinueResult =
|
|
5319
|
+
var CodingAccountContinueResult = import_zod35.z.strictObject({
|
|
5049
5320
|
session: CodingSessionRecord,
|
|
5050
5321
|
run: CodingRunRecord.nullable(),
|
|
5051
|
-
how:
|
|
5052
|
-
});
|
|
5053
|
-
var CodingAgentSetParams =
|
|
5054
|
-
var CodingAgentSetResult =
|
|
5055
|
-
var CodingAgentsAccessParams =
|
|
5056
|
-
var CodingAgentsAccessResult =
|
|
5057
|
-
signedIn:
|
|
5058
|
-
userId:
|
|
5059
|
-
organizationId:
|
|
5060
|
-
configured:
|
|
5061
|
-
});
|
|
5062
|
-
var CodingTitlesStatusParams =
|
|
5322
|
+
how: import_zod35.z.enum(["moved", "fresh"])
|
|
5323
|
+
});
|
|
5324
|
+
var CodingAgentSetParams = import_zod35.z.strictObject({ session_id: SessionKey, agent: CodingAgentSelectionParams.optional() });
|
|
5325
|
+
var CodingAgentSetResult = import_zod35.z.strictObject({ session: CodingSessionRecord });
|
|
5326
|
+
var CodingAgentsAccessParams = import_zod35.z.strictObject({});
|
|
5327
|
+
var CodingAgentsAccessResult = import_zod35.z.strictObject({
|
|
5328
|
+
signedIn: import_zod35.z.boolean(),
|
|
5329
|
+
userId: import_zod35.z.string().max(64).nullable(),
|
|
5330
|
+
organizationId: import_zod35.z.string().max(64).nullable(),
|
|
5331
|
+
configured: import_zod35.z.boolean()
|
|
5332
|
+
});
|
|
5333
|
+
var CodingTitlesStatusParams = import_zod35.z.strictObject({});
|
|
5063
5334
|
var CodingTitlesStatusResult = CodingTitleStatus;
|
|
5064
|
-
var CodingPrefsListParams =
|
|
5065
|
-
var CodingPrefsListResult =
|
|
5066
|
-
var CodingPrefsSetParams =
|
|
5067
|
-
key:
|
|
5068
|
-
title:
|
|
5069
|
-
clear_title:
|
|
5070
|
-
pinned:
|
|
5071
|
-
hidden:
|
|
5335
|
+
var CodingPrefsListParams = import_zod35.z.strictObject({});
|
|
5336
|
+
var CodingPrefsListResult = import_zod35.z.strictObject({ preferences: import_zod35.z.record(import_zod35.z.string().max(200), CodingChatPreference) });
|
|
5337
|
+
var CodingPrefsSetParams = import_zod35.z.strictObject({
|
|
5338
|
+
key: import_zod35.z.string().min(1).max(200),
|
|
5339
|
+
title: import_zod35.z.string().min(1).max(500).optional(),
|
|
5340
|
+
clear_title: import_zod35.z.boolean().optional(),
|
|
5341
|
+
pinned: import_zod35.z.boolean().optional(),
|
|
5342
|
+
hidden: import_zod35.z.boolean().optional()
|
|
5072
5343
|
});
|
|
5073
5344
|
var CodingPrefsSetResult = CodingPrefsListResult;
|
|
5074
|
-
var CodingRecentSeenParams =
|
|
5075
|
-
var CodingRecentSeenResult =
|
|
5076
|
-
var CodingSearchParams =
|
|
5077
|
-
query:
|
|
5345
|
+
var CodingRecentSeenParams = import_zod35.z.strictObject({ target: import_zod35.z.string().min(3).max(200) });
|
|
5346
|
+
var CodingRecentSeenResult = import_zod35.z.strictObject({ recent: import_zod35.z.array(CodingRecentRow) });
|
|
5347
|
+
var CodingSearchParams = import_zod35.z.strictObject({
|
|
5348
|
+
query: import_zod35.z.string().min(1).max(500),
|
|
5078
5349
|
cursor: nonNegInt.optional(),
|
|
5079
|
-
limit:
|
|
5350
|
+
limit: import_zod35.z.int().min(1).max(100).optional()
|
|
5080
5351
|
});
|
|
5081
|
-
var CodingSearchHit =
|
|
5352
|
+
var CodingSearchHit = import_zod35.z.strictObject({
|
|
5082
5353
|
provider: CodingProviderName,
|
|
5083
5354
|
providerSessionId: SessionKey,
|
|
5084
|
-
title:
|
|
5355
|
+
title: import_zod35.z.string().max(500),
|
|
5085
5356
|
cwd: LocalPath.nullable(),
|
|
5086
5357
|
updatedAt: IsoTime,
|
|
5087
|
-
where:
|
|
5088
|
-
snippet:
|
|
5358
|
+
where: import_zod35.z.enum(["title", "content"]),
|
|
5359
|
+
snippet: import_zod35.z.string().max(2e3).nullable(),
|
|
5089
5360
|
/**
|
|
5090
5361
|
* (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session
|
|
5091
5362
|
* runs as, or whose config directory holds the chat. Absent: the default sign-in.
|
|
5092
5363
|
*/
|
|
5093
|
-
accountId:
|
|
5364
|
+
accountId: import_zod35.z.string().min(1).max(64).optional()
|
|
5094
5365
|
});
|
|
5095
|
-
var CodingSearchResult =
|
|
5096
|
-
query:
|
|
5097
|
-
hits:
|
|
5366
|
+
var CodingSearchResult = import_zod35.z.strictObject({
|
|
5367
|
+
query: import_zod35.z.string().max(500),
|
|
5368
|
+
hits: import_zod35.z.array(CodingSearchHit),
|
|
5098
5369
|
scanned: nonNegInt,
|
|
5099
5370
|
total: nonNegInt,
|
|
5100
5371
|
nextCursor: nonNegInt.nullable()
|
|
5101
5372
|
});
|
|
5102
|
-
var CodingReconcileParams =
|
|
5103
|
-
var CodingReconcileResult =
|
|
5104
|
-
state:
|
|
5105
|
-
summary:
|
|
5373
|
+
var CodingReconcileParams = import_zod35.z.strictObject({ provider: CodingProviderName, provider_session_id: SessionKey });
|
|
5374
|
+
var CodingReconcileResult = import_zod35.z.strictObject({
|
|
5375
|
+
state: import_zod35.z.enum(["done", "blocked", "nothing_to_do"]),
|
|
5376
|
+
summary: import_zod35.z.string().max(400)
|
|
5106
5377
|
});
|
|
5107
|
-
var CodingTranscriptRawParams =
|
|
5108
|
-
var CodingTranscriptRawResult =
|
|
5109
|
-
available:
|
|
5378
|
+
var CodingTranscriptRawParams = import_zod35.z.strictObject({ provider: CodingProviderName, provider_session_id: SessionKey });
|
|
5379
|
+
var CodingTranscriptRawResult = import_zod35.z.strictObject({
|
|
5380
|
+
available: import_zod35.z.boolean(),
|
|
5110
5381
|
reason: ShortText.nullable(),
|
|
5111
|
-
file_name:
|
|
5382
|
+
file_name: import_zod35.z.string().max(300).nullable(),
|
|
5112
5383
|
bytes: nonNegInt,
|
|
5113
5384
|
/** The opt-in cloud backup was refreshed (false: off, unchanged, or signed out). */
|
|
5114
|
-
backup_refreshed:
|
|
5385
|
+
backup_refreshed: import_zod35.z.boolean(),
|
|
5115
5386
|
/** Subagent transcripts beside the chat (Claude Code), downloaded separately. */
|
|
5116
5387
|
subagents: nonNegInt
|
|
5117
5388
|
});
|
|
5118
|
-
var CodingWatchParams =
|
|
5119
|
-
var CodingWatchResult =
|
|
5120
|
-
var CodingSessionWatchParams =
|
|
5121
|
-
var CodingSessionWatchResult =
|
|
5389
|
+
var CodingWatchParams = import_zod35.z.strictObject({});
|
|
5390
|
+
var CodingWatchResult = import_zod35.z.strictObject({ resource_id: ResourceId });
|
|
5391
|
+
var CodingSessionWatchParams = import_zod35.z.strictObject({ session_id: SessionKey, since_seq: nonNegInt.optional() });
|
|
5392
|
+
var CodingSessionWatchResult = import_zod35.z.strictObject({
|
|
5122
5393
|
resource_id: ResourceId,
|
|
5123
5394
|
/** The newest item seq the device has for this session right now. */
|
|
5124
5395
|
seq: nonNegInt
|
|
5125
5396
|
});
|
|
5126
|
-
var CodingChangedEvent =
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5397
|
+
var CodingChangedEvent = import_zod35.z.discriminatedUnion("kind", [
|
|
5398
|
+
import_zod35.z.strictObject({ kind: import_zod35.z.literal("session"), session: CodingSessionRecord }),
|
|
5399
|
+
import_zod35.z.strictObject({ kind: import_zod35.z.literal("run"), run: CodingRunRecord }),
|
|
5400
|
+
import_zod35.z.strictObject({ kind: import_zod35.z.literal("preferences"), preferences: import_zod35.z.record(import_zod35.z.string().max(200), CodingChatPreference) }),
|
|
5401
|
+
import_zod35.z.strictObject({ kind: import_zod35.z.literal("titles") }),
|
|
5402
|
+
import_zod35.z.strictObject({ kind: import_zod35.z.literal("recent"), recent: import_zod35.z.array(CodingRecentRow) })
|
|
5132
5403
|
]);
|
|
5133
|
-
var CodingWatchStateEvent =
|
|
5134
|
-
var CodingItemEvent =
|
|
5404
|
+
var CodingWatchStateEvent = import_zod35.z.strictObject({ live: import_zod35.z.boolean(), reason: ShortText.nullable(), beat_ms: import_zod35.z.int().min(1e3) });
|
|
5405
|
+
var CodingItemEvent = import_zod35.z.strictObject({
|
|
5135
5406
|
session_id: SessionKey,
|
|
5136
|
-
run_id:
|
|
5407
|
+
run_id: import_zod35.z.string().min(1).max(64),
|
|
5137
5408
|
seq: nonNegInt,
|
|
5138
5409
|
item: CodingTranscriptItem
|
|
5139
5410
|
});
|
|
5140
|
-
var CodingGapEvent =
|
|
5141
|
-
var SessionIdentifyParams =
|
|
5142
|
-
var SessionIdentifyResult =
|
|
5411
|
+
var CodingGapEvent = import_zod35.z.strictObject({ session_id: SessionKey, since_seq: nonNegInt, seq: nonNegInt });
|
|
5412
|
+
var SessionIdentifyParams = import_zod35.z.strictObject({ label: import_zod35.z.string().min(1).max(60) });
|
|
5413
|
+
var SessionIdentifyResult = import_zod35.z.strictObject({ label: import_zod35.z.string().max(60) });
|
|
5414
|
+
|
|
5415
|
+
// src/schema/coding-assets.ts
|
|
5416
|
+
var import_zod36 = require("zod");
|
|
5417
|
+
var AgentAssetTool = import_zod36.z.enum(["claude", "codex", "cursor", "copilot", "gemini", "shared"]);
|
|
5418
|
+
var AgentAssetKind = import_zod36.z.enum([
|
|
5419
|
+
"memory",
|
|
5420
|
+
"memory-index",
|
|
5421
|
+
"memory-summary",
|
|
5422
|
+
"memory-raw",
|
|
5423
|
+
"rollout-summary",
|
|
5424
|
+
"memory-extension",
|
|
5425
|
+
"memory-store",
|
|
5426
|
+
"instructions",
|
|
5427
|
+
"rule",
|
|
5428
|
+
"skill",
|
|
5429
|
+
"subagent",
|
|
5430
|
+
"command",
|
|
5431
|
+
"output-style",
|
|
5432
|
+
"plan",
|
|
5433
|
+
"hook",
|
|
5434
|
+
"plugin",
|
|
5435
|
+
"settings",
|
|
5436
|
+
"mcp-config",
|
|
5437
|
+
"scheduled-task",
|
|
5438
|
+
"automation",
|
|
5439
|
+
"automation-memory",
|
|
5440
|
+
"handoff"
|
|
5441
|
+
]);
|
|
5442
|
+
var AgentAssetOrigin = import_zod36.z.enum(["ai-matrx", "ai-matrx-edited", "plugin", "built-in", "claude-app", "linked", "agent", "local"]);
|
|
5443
|
+
var AgentAssetRow = import_zod36.z.strictObject({
|
|
5444
|
+
/** The absolute path: the asset's identity (coding.assets.get takes it). */
|
|
5445
|
+
id: import_zod36.z.string().min(1).max(4096),
|
|
5446
|
+
tool: AgentAssetTool,
|
|
5447
|
+
kind: AgentAssetKind,
|
|
5448
|
+
scope: import_zod36.z.enum(["user", "project"]),
|
|
5449
|
+
name: import_zod36.z.string().max(500),
|
|
5450
|
+
/** Frontmatter `description`, cut to 500 characters (whole in coding.assets.get's text). */
|
|
5451
|
+
description: import_zod36.z.string().max(500).nullable(),
|
|
5452
|
+
/** The project folder the asset belongs to; null for a user-level file or when not known. */
|
|
5453
|
+
project_cwd: import_zod36.z.string().max(4096).nullable(),
|
|
5454
|
+
/** The project's key when its folder is not known (Claude's folder name for it). */
|
|
5455
|
+
project_key: import_zod36.z.string().max(4096).nullable(),
|
|
5456
|
+
/** A grouping inside the tool: a memory generation, a plugin, a backup copy. */
|
|
5457
|
+
group: import_zod36.z.string().max(500).nullable(),
|
|
5458
|
+
bytes: nonNegInt,
|
|
5459
|
+
lines: nonNegInt,
|
|
5460
|
+
modified_ms: import_zod36.z.number().min(0),
|
|
5461
|
+
/** `user` · `feedback` · `project` · `reference` when the file declares one. */
|
|
5462
|
+
memory_type: import_zod36.z.string().max(80).nullable(),
|
|
5463
|
+
origin: AgentAssetOrigin,
|
|
5464
|
+
/** The plugin, the AI Matrx source, the chat id or the link target behind `origin`. */
|
|
5465
|
+
origin_detail: import_zod36.z.string().max(4096).nullable(),
|
|
5466
|
+
/** Claude memories: listed in their folder's MEMORY.md (null: the folder has no index). */
|
|
5467
|
+
in_index: import_zod36.z.boolean().nullable(),
|
|
5468
|
+
links: nonNegInt,
|
|
5469
|
+
/** Links that resolve to nothing on this computer. */
|
|
5470
|
+
broken_links: nonNegInt,
|
|
5471
|
+
/** Two or more non-empty files with identical bytes share a number (null: no twin). */
|
|
5472
|
+
twin_group: nonNegInt.nullable(),
|
|
5473
|
+
/** A skill or plugin folder: files inside and their total bytes (null: a single file). */
|
|
5474
|
+
folder_files: nonNegInt.nullable(),
|
|
5475
|
+
folder_bytes: nonNegInt.nullable(),
|
|
5476
|
+
/** A settings-like file: only its shape is read, never its values. */
|
|
5477
|
+
shape_only: import_zod36.z.boolean()
|
|
5478
|
+
});
|
|
5479
|
+
var CodingAssetsListParams = import_zod36.z.strictObject({
|
|
5480
|
+
/** Read the disk again instead of answering from the last reading. */
|
|
5481
|
+
fresh: import_zod36.z.boolean().default(false)
|
|
5482
|
+
});
|
|
5483
|
+
var CodingAssetsListResult = import_zod36.z.strictObject({
|
|
5484
|
+
/** When this reading was taken (ISO 8601). */
|
|
5485
|
+
read_at: import_zod36.z.string().max(40),
|
|
5486
|
+
elapsed_ms: nonNegInt,
|
|
5487
|
+
/** Project folders the reading looked in. */
|
|
5488
|
+
project_folders: nonNegInt,
|
|
5489
|
+
assets: import_zod36.z.array(AgentAssetRow).max(5e4),
|
|
5490
|
+
/** What was not read, and why. */
|
|
5491
|
+
notes: import_zod36.z.array(import_zod36.z.string().max(2e3)).max(500)
|
|
5492
|
+
});
|
|
5493
|
+
var AgentAssetLink = import_zod36.z.strictObject({
|
|
5494
|
+
text: import_zod36.z.string().max(1e3),
|
|
5495
|
+
target: import_zod36.z.string().max(4096),
|
|
5496
|
+
/** `index`: a line of a memory index · `source`: the chat the file was made from. */
|
|
5497
|
+
via: import_zod36.z.enum(["index", "markdown", "wikilink", "source"]),
|
|
5498
|
+
/** Where it resolves on this computer; null: broken. */
|
|
5499
|
+
resolved_path: import_zod36.z.string().max(4096).nullable()
|
|
5500
|
+
});
|
|
5501
|
+
var AgentAssetFact = import_zod36.z.strictObject({ key: import_zod36.z.string().max(200), value: import_zod36.z.string().max(2e4) });
|
|
5502
|
+
var AgentAssetCount = import_zod36.z.strictObject({ key: import_zod36.z.string().max(200), count: nonNegInt });
|
|
5503
|
+
var CodingAssetsGetParams = import_zod36.z.strictObject({ id: import_zod36.z.string().min(1).max(4096) });
|
|
5504
|
+
var CodingAssetsGetResult = import_zod36.z.strictObject({
|
|
5505
|
+
asset: AgentAssetRow,
|
|
5506
|
+
sha256: import_zod36.z.string().regex(/^[a-f0-9]{64}$/),
|
|
5507
|
+
/** The real path when the asset is a symbolic link. */
|
|
5508
|
+
link_target: import_zod36.z.string().max(4096).nullable(),
|
|
5509
|
+
/** Flattened frontmatter (`metadata.type`), as written. */
|
|
5510
|
+
frontmatter: import_zod36.z.array(AgentAssetFact).max(200),
|
|
5511
|
+
links: import_zod36.z.array(AgentAssetLink).max(5e3),
|
|
5512
|
+
/** A settings-like file's shape: its top-level keys and the entries under each. */
|
|
5513
|
+
shape_keys: import_zod36.z.array(import_zod36.z.string().max(200)).max(1e3),
|
|
5514
|
+
shape_counts: import_zod36.z.array(AgentAssetCount).max(1e3),
|
|
5515
|
+
/** A memory store's rows per table. */
|
|
5516
|
+
store_rows: import_zod36.z.array(AgentAssetCount).max(200),
|
|
5517
|
+
/** `text`: below · `structure-only`: settings, never sent · `binary`: a store. */
|
|
5518
|
+
content: import_zod36.z.enum(["text", "structure-only", "binary"]),
|
|
5519
|
+
text: import_zod36.z.string().max(4194304).nullable(),
|
|
5520
|
+
/** The text was cut at the reader's limit. */
|
|
5521
|
+
truncated: import_zod36.z.boolean()
|
|
5522
|
+
});
|
|
5523
|
+
|
|
5524
|
+
// src/schema/agent-service.ts
|
|
5525
|
+
var import_zod37 = require("zod");
|
|
5526
|
+
var AgentServiceStateName = import_zod37.z.enum(["not_installed", "installing", "installed", "listening", "failed"]);
|
|
5527
|
+
var AgentStatusParams = import_zod37.z.strictObject({});
|
|
5528
|
+
var AgentInstallParams = import_zod37.z.strictObject({});
|
|
5529
|
+
var AgentStartParams = import_zod37.z.strictObject({
|
|
5530
|
+
/** The local model llama-server runs (models.llm.status's running id). */
|
|
5531
|
+
model: import_zod37.z.string().min(1).max(256),
|
|
5532
|
+
/** The core's localhost listener port: the model is reached through its /openai/v1 door. */
|
|
5533
|
+
listener_port: import_zod37.z.int().min(1).max(65535),
|
|
5534
|
+
/** The app's own key for that door (per launch; never logged). */
|
|
5535
|
+
key: import_zod37.z.string().min(16).max(256),
|
|
5536
|
+
/** Renderer origins allowed to call the listener (CORS). */
|
|
5537
|
+
allow_origins: import_zod37.z.array(import_zod37.z.string().min(1).max(512)).max(16)
|
|
5538
|
+
});
|
|
5539
|
+
var AgentServiceState = import_zod37.z.strictObject({
|
|
5540
|
+
state: AgentServiceStateName,
|
|
5541
|
+
/** Why it failed, in the installer's or the service's words; null otherwise. */
|
|
5542
|
+
error: import_zod37.z.string().max(2e3).nullable(),
|
|
5543
|
+
/** The /ai listener's port on 127.0.0.1 while it listens; null otherwise. */
|
|
5544
|
+
port: import_zod37.z.int().min(1).max(65535).nullable(),
|
|
5545
|
+
/** The model the listener answers with while it listens; null otherwise. */
|
|
5546
|
+
model: import_zod37.z.string().max(256).nullable()
|
|
5547
|
+
});
|
|
5548
|
+
var AgentServiceProgress = import_zod37.z.strictObject({ phase: import_zod37.z.enum(["installing", "compiling"]), done: nonNegInt, total: nonNegInt });
|
|
5143
5549
|
|
|
5144
5550
|
// src/schema/browser.ts
|
|
5145
|
-
var
|
|
5146
|
-
var BrowserClientInstance =
|
|
5147
|
-
var BrowserKind =
|
|
5148
|
-
var BrowserSessionState =
|
|
5149
|
-
var BrowserSession =
|
|
5551
|
+
var import_zod38 = require("zod");
|
|
5552
|
+
var BrowserClientInstance = import_zod38.z.string().min(1).max(64).regex(/^[A-Za-z0-9_.:-]+$/);
|
|
5553
|
+
var BrowserKind = import_zod38.z.enum(["chrome", "edge", "brave", "arc", "opera", "vivaldi", "chromium", "firefox", "other"]);
|
|
5554
|
+
var BrowserSessionState = import_zod38.z.enum(["connected", "different_account", "extension_signed_out", "device_signed_out", "unverified"]);
|
|
5555
|
+
var BrowserSession = import_zod38.z.strictObject({
|
|
5150
5556
|
client_instance: BrowserClientInstance,
|
|
5151
5557
|
/** What the person sees ("Chrome — Work"), set by the extension. */
|
|
5152
|
-
client_label:
|
|
5558
|
+
client_label: import_zod38.z.string().min(1).max(128),
|
|
5153
5559
|
browser: BrowserKind,
|
|
5154
|
-
extension_version:
|
|
5560
|
+
extension_version: import_zod38.z.string().min(1).max(32),
|
|
5155
5561
|
state: BrowserSessionState,
|
|
5156
5562
|
/** True only for `connected`: an agent's call can reach this session. */
|
|
5157
|
-
routable:
|
|
5563
|
+
routable: import_zod38.z.boolean(),
|
|
5158
5564
|
/** The extension's account email from its token (null when signed out or unknown). */
|
|
5159
|
-
account_email:
|
|
5565
|
+
account_email: import_zod38.z.string().max(320).nullable(),
|
|
5160
5566
|
connected_at_ms: epochMs,
|
|
5161
5567
|
last_call_at_ms: epochMs.nullable(),
|
|
5162
5568
|
calls: nonNegInt,
|
|
@@ -5165,119 +5571,119 @@ var BrowserSession = import_zod35.z.strictObject({
|
|
|
5165
5571
|
p50_ms: nonNegInt.nullable(),
|
|
5166
5572
|
p95_ms: nonNegInt.nullable(),
|
|
5167
5573
|
/** A call is waiting for the person to confirm it in the browser. */
|
|
5168
|
-
awaiting_confirmation:
|
|
5574
|
+
awaiting_confirmation: import_zod38.z.boolean()
|
|
5169
5575
|
});
|
|
5170
|
-
var BrowserRegisterParams =
|
|
5576
|
+
var BrowserRegisterParams = import_zod38.z.strictObject({
|
|
5171
5577
|
client_instance: BrowserClientInstance,
|
|
5172
|
-
client_label:
|
|
5578
|
+
client_label: import_zod38.z.string().min(1).max(128),
|
|
5173
5579
|
browser: BrowserKind,
|
|
5174
|
-
extension_version:
|
|
5580
|
+
extension_version: import_zod38.z.string().min(1).max(32),
|
|
5175
5581
|
/** The extension's current AI Matrx access token, checked against the device owner; null when signed out. */
|
|
5176
|
-
account_token:
|
|
5582
|
+
account_token: import_zod38.z.string().min(16).max(8192).nullable()
|
|
5177
5583
|
});
|
|
5178
|
-
var BrowserRegisterResult =
|
|
5179
|
-
var BrowserCallError =
|
|
5180
|
-
message:
|
|
5584
|
+
var BrowserRegisterResult = import_zod38.z.strictObject({ session: BrowserSession });
|
|
5585
|
+
var BrowserCallError = import_zod38.z.strictObject({
|
|
5586
|
+
message: import_zod38.z.string().max(1e3),
|
|
5181
5587
|
/** The extension's own error code, when it has one ("tool_not_found", "denied"). */
|
|
5182
|
-
code:
|
|
5588
|
+
code: import_zod38.z.string().max(64).nullable()
|
|
5183
5589
|
});
|
|
5184
|
-
var BrowserResultParams =
|
|
5185
|
-
call_id:
|
|
5186
|
-
ok:
|
|
5590
|
+
var BrowserResultParams = import_zod38.z.strictObject({
|
|
5591
|
+
call_id: import_zod38.z.string().min(1).max(64),
|
|
5592
|
+
ok: import_zod38.z.boolean(),
|
|
5187
5593
|
/** The tool's result when ok (any JSON). */
|
|
5188
|
-
result:
|
|
5594
|
+
result: import_zod38.z.unknown(),
|
|
5189
5595
|
error: BrowserCallError.nullable()
|
|
5190
5596
|
});
|
|
5191
|
-
var BrowserResultResult =
|
|
5192
|
-
var BrowserCallPhase =
|
|
5193
|
-
var BrowserProgressParams =
|
|
5194
|
-
var BrowserProgressResult =
|
|
5195
|
-
var BrowserSessionsParams =
|
|
5196
|
-
var BrowserSessionsResult =
|
|
5597
|
+
var BrowserResultResult = import_zod38.z.strictObject({ accepted: import_zod38.z.boolean() });
|
|
5598
|
+
var BrowserCallPhase = import_zod38.z.enum(["awaiting_confirmation", "running"]);
|
|
5599
|
+
var BrowserProgressParams = import_zod38.z.strictObject({ call_id: import_zod38.z.string().min(1).max(64), phase: BrowserCallPhase });
|
|
5600
|
+
var BrowserProgressResult = import_zod38.z.strictObject({ accepted: import_zod38.z.boolean() });
|
|
5601
|
+
var BrowserSessionsParams = import_zod38.z.strictObject({});
|
|
5602
|
+
var BrowserSessionsResult = import_zod38.z.strictObject({
|
|
5197
5603
|
/** The person's Browser connection switch. Off: no pairing, no extension sessions. */
|
|
5198
|
-
enabled:
|
|
5604
|
+
enabled: import_zod38.z.boolean(),
|
|
5199
5605
|
/** Whether Matrx 2 is signed in (without an owner no session is routable). */
|
|
5200
|
-
owner_signed_in:
|
|
5201
|
-
sessions:
|
|
5202
|
-
});
|
|
5203
|
-
var BrowserDisconnectParams =
|
|
5204
|
-
var BrowserDisconnectResult =
|
|
5205
|
-
var BrowserSetEnabledParams =
|
|
5206
|
-
var BrowserSetEnabledResult =
|
|
5207
|
-
var BrowserPairCodeParams =
|
|
5208
|
-
var BrowserPairCodeResult =
|
|
5209
|
-
var BrowserPairResetParams =
|
|
5210
|
-
var BrowserCallParams =
|
|
5211
|
-
tool:
|
|
5212
|
-
args:
|
|
5606
|
+
owner_signed_in: import_zod38.z.boolean(),
|
|
5607
|
+
sessions: import_zod38.z.array(BrowserSession).max(64)
|
|
5608
|
+
});
|
|
5609
|
+
var BrowserDisconnectParams = import_zod38.z.strictObject({ client_instance: BrowserClientInstance });
|
|
5610
|
+
var BrowserDisconnectResult = import_zod38.z.strictObject({ disconnected: import_zod38.z.boolean() });
|
|
5611
|
+
var BrowserSetEnabledParams = import_zod38.z.strictObject({ enabled: import_zod38.z.boolean() });
|
|
5612
|
+
var BrowserSetEnabledResult = import_zod38.z.strictObject({ enabled: import_zod38.z.boolean() });
|
|
5613
|
+
var BrowserPairCodeParams = import_zod38.z.strictObject({});
|
|
5614
|
+
var BrowserPairCodeResult = import_zod38.z.strictObject({ code: import_zod38.z.string().min(16).max(128) });
|
|
5615
|
+
var BrowserPairResetParams = import_zod38.z.strictObject({});
|
|
5616
|
+
var BrowserCallParams = import_zod38.z.strictObject({
|
|
5617
|
+
tool: import_zod38.z.string().min(1).max(96).regex(/^[a-z][a-z0-9_]*$/),
|
|
5618
|
+
args: import_zod38.z.record(import_zod38.z.string(), import_zod38.z.unknown()),
|
|
5213
5619
|
/** Which session; default: the most recently active routable one (BROWSER ambiguity → CONFLICT). */
|
|
5214
5620
|
client_instance: BrowserClientInstance.optional(),
|
|
5215
5621
|
/** How long to wait, including a person's confirmation; default 120 s. */
|
|
5216
|
-
timeout_ms:
|
|
5622
|
+
timeout_ms: import_zod38.z.int().min(1e3).max(6e5).optional()
|
|
5217
5623
|
});
|
|
5218
|
-
var BrowserCallResult =
|
|
5624
|
+
var BrowserCallResult = import_zod38.z.strictObject({
|
|
5219
5625
|
client_instance: BrowserClientInstance,
|
|
5220
|
-
result:
|
|
5626
|
+
result: import_zod38.z.unknown(),
|
|
5221
5627
|
duration_ms: nonNegInt
|
|
5222
5628
|
});
|
|
5223
|
-
var BrowserToolMetricsParams =
|
|
5224
|
-
var BrowserToolMetric =
|
|
5225
|
-
tool:
|
|
5629
|
+
var BrowserToolMetricsParams = import_zod38.z.strictObject({ client_instance: BrowserClientInstance });
|
|
5630
|
+
var BrowserToolMetric = import_zod38.z.strictObject({
|
|
5631
|
+
tool: import_zod38.z.string().max(256),
|
|
5226
5632
|
calls: nonNegInt,
|
|
5227
5633
|
errors: nonNegInt,
|
|
5228
5634
|
/** Over the last 200 answered calls; null before the first answer. */
|
|
5229
5635
|
p50_ms: nonNegInt.nullable(),
|
|
5230
5636
|
p95_ms: nonNegInt.nullable(),
|
|
5231
5637
|
last_call_at_ms: epochMs.nullable(),
|
|
5232
|
-
last_error:
|
|
5638
|
+
last_error: import_zod38.z.string().max(2048).nullable()
|
|
5233
5639
|
});
|
|
5234
|
-
var BrowserToolMetricsResult =
|
|
5235
|
-
var BrowserResetCountersParams =
|
|
5236
|
-
var BrowserResetCountersResult =
|
|
5237
|
-
var BrowserLogParams =
|
|
5640
|
+
var BrowserToolMetricsResult = import_zod38.z.strictObject({ client_instance: import_zod38.z.string(), tools: import_zod38.z.array(BrowserToolMetric) });
|
|
5641
|
+
var BrowserResetCountersParams = import_zod38.z.strictObject({ client_instance: BrowserClientInstance });
|
|
5642
|
+
var BrowserResetCountersResult = import_zod38.z.strictObject({ reset: import_zod38.z.boolean() });
|
|
5643
|
+
var BrowserLogParams = import_zod38.z.strictObject({
|
|
5238
5644
|
/** Only messages after this seq (0: from the oldest kept; the core keeps the last 500). */
|
|
5239
5645
|
after_seq: nonNegInt.default(0),
|
|
5240
|
-
limit:
|
|
5646
|
+
limit: import_zod38.z.int().min(1).max(500).default(500)
|
|
5241
5647
|
});
|
|
5242
|
-
var BrowserLogMessage =
|
|
5648
|
+
var BrowserLogMessage = import_zod38.z.strictObject({
|
|
5243
5649
|
seq: nonNegInt,
|
|
5244
5650
|
at_ms: epochMs,
|
|
5245
|
-
direction:
|
|
5246
|
-
client_instance:
|
|
5247
|
-
kind:
|
|
5248
|
-
tool:
|
|
5249
|
-
call_id:
|
|
5250
|
-
ok:
|
|
5251
|
-
detail:
|
|
5252
|
-
});
|
|
5253
|
-
var BrowserLogResult =
|
|
5254
|
-
messages:
|
|
5651
|
+
direction: import_zod38.z.enum(["to_browser", "from_browser", "core"]),
|
|
5652
|
+
client_instance: import_zod38.z.string(),
|
|
5653
|
+
kind: import_zod38.z.enum(["register", "invoke", "result", "progress", "timeout", "closed"]),
|
|
5654
|
+
tool: import_zod38.z.string().nullable(),
|
|
5655
|
+
call_id: import_zod38.z.string().nullable(),
|
|
5656
|
+
ok: import_zod38.z.boolean().nullable(),
|
|
5657
|
+
detail: import_zod38.z.string().max(1024)
|
|
5658
|
+
});
|
|
5659
|
+
var BrowserLogResult = import_zod38.z.strictObject({
|
|
5660
|
+
messages: import_zod38.z.array(BrowserLogMessage),
|
|
5255
5661
|
/** The newest seq the core has written (pass it back as after_seq to follow the log). */
|
|
5256
5662
|
last_seq: nonNegInt
|
|
5257
5663
|
});
|
|
5258
|
-
var BrowserInvokeEvent =
|
|
5259
|
-
call_id:
|
|
5260
|
-
tool:
|
|
5261
|
-
args:
|
|
5664
|
+
var BrowserInvokeEvent = import_zod38.z.strictObject({
|
|
5665
|
+
call_id: import_zod38.z.string().min(1).max(64),
|
|
5666
|
+
tool: import_zod38.z.string().min(1).max(96),
|
|
5667
|
+
args: import_zod38.z.record(import_zod38.z.string(), import_zod38.z.unknown()),
|
|
5262
5668
|
deadline_ms: epochMs
|
|
5263
5669
|
});
|
|
5264
|
-
var BrowserSessionsChangedEvent =
|
|
5265
|
-
var BrowserProgressEvent =
|
|
5266
|
-
call_id:
|
|
5670
|
+
var BrowserSessionsChangedEvent = import_zod38.z.strictObject({ count: nonNegInt, enabled: import_zod38.z.boolean() });
|
|
5671
|
+
var BrowserProgressEvent = import_zod38.z.strictObject({
|
|
5672
|
+
call_id: import_zod38.z.string().min(1).max(64),
|
|
5267
5673
|
client_instance: BrowserClientInstance,
|
|
5268
5674
|
phase: BrowserCallPhase
|
|
5269
5675
|
});
|
|
5270
|
-
var DesktopHealth =
|
|
5271
|
-
status:
|
|
5272
|
-
service:
|
|
5273
|
-
version:
|
|
5274
|
-
protocol_version:
|
|
5275
|
-
ws_path:
|
|
5276
|
-
device_id:
|
|
5277
|
-
browser_connection:
|
|
5278
|
-
});
|
|
5279
|
-
var BrowserPairRequest =
|
|
5280
|
-
var BrowserPairResult =
|
|
5676
|
+
var DesktopHealth = import_zod38.z.strictObject({
|
|
5677
|
+
status: import_zod38.z.literal("ok"),
|
|
5678
|
+
service: import_zod38.z.literal("matrx-desktop"),
|
|
5679
|
+
version: import_zod38.z.string().max(32),
|
|
5680
|
+
protocol_version: import_zod38.z.string().max(16),
|
|
5681
|
+
ws_path: import_zod38.z.literal("/v1/connect"),
|
|
5682
|
+
device_id: import_zod38.z.string().max(64),
|
|
5683
|
+
browser_connection: import_zod38.z.enum(["on", "off"])
|
|
5684
|
+
});
|
|
5685
|
+
var BrowserPairRequest = import_zod38.z.strictObject({ client_instance: BrowserClientInstance });
|
|
5686
|
+
var BrowserPairResult = import_zod38.z.strictObject({ pair_token: import_zod38.z.string().min(16).max(128), ws_path: import_zod38.z.literal("/v1/connect") });
|
|
5281
5687
|
var MATRX_EXTENSION_IDS = {
|
|
5282
5688
|
store: "hnfolienncfklkgmdjjmhhegglimlamg",
|
|
5283
5689
|
development: "cihdmkcdjjckfhjpgoedmgfpoljebaml"
|
|
@@ -5285,698 +5691,698 @@ var MATRX_EXTENSION_IDS = {
|
|
|
5285
5691
|
var DISCOVERY_FILE = { live: "matrx2.json", development: "matrx2-dev.json" };
|
|
5286
5692
|
|
|
5287
5693
|
// src/schema/net.ts
|
|
5288
|
-
var
|
|
5289
|
-
var NetInfoParams =
|
|
5290
|
-
var NetAddress =
|
|
5291
|
-
address:
|
|
5292
|
-
family:
|
|
5293
|
-
netmask:
|
|
5694
|
+
var import_zod39 = require("zod");
|
|
5695
|
+
var NetInfoParams = import_zod39.z.strictObject({});
|
|
5696
|
+
var NetAddress = import_zod39.z.strictObject({
|
|
5697
|
+
address: import_zod39.z.string(),
|
|
5698
|
+
family: import_zod39.z.enum(["ipv4", "ipv6"]),
|
|
5699
|
+
netmask: import_zod39.z.string().nullable(),
|
|
5294
5700
|
/** CIDR form ("192.168.1.20/24"); null where the OS gives no prefix. */
|
|
5295
|
-
cidr:
|
|
5701
|
+
cidr: import_zod39.z.string().nullable()
|
|
5296
5702
|
});
|
|
5297
|
-
var NetInterface =
|
|
5298
|
-
name:
|
|
5299
|
-
mac:
|
|
5703
|
+
var NetInterface = import_zod39.z.strictObject({
|
|
5704
|
+
name: import_zod39.z.string(),
|
|
5705
|
+
mac: import_zod39.z.string().nullable(),
|
|
5300
5706
|
/** Loopback and other internal interfaces. */
|
|
5301
|
-
internal:
|
|
5302
|
-
addresses:
|
|
5707
|
+
internal: import_zod39.z.boolean(),
|
|
5708
|
+
addresses: import_zod39.z.array(NetAddress)
|
|
5303
5709
|
});
|
|
5304
|
-
var NetInfoResult =
|
|
5305
|
-
hostname:
|
|
5306
|
-
interfaces:
|
|
5710
|
+
var NetInfoResult = import_zod39.z.strictObject({
|
|
5711
|
+
hostname: import_zod39.z.string(),
|
|
5712
|
+
interfaces: import_zod39.z.array(NetInterface),
|
|
5307
5713
|
/** The default route's gateway; null when the OS does not say (or there is none). */
|
|
5308
|
-
gateway:
|
|
5714
|
+
gateway: import_zod39.z.string().nullable(),
|
|
5309
5715
|
/** The DNS servers the OS uses; empty when it does not say. */
|
|
5310
|
-
dns:
|
|
5716
|
+
dns: import_zod39.z.array(import_zod39.z.string())
|
|
5311
5717
|
});
|
|
5312
|
-
var NetWifiParams =
|
|
5313
|
-
var NetWifiNetwork =
|
|
5718
|
+
var NetWifiParams = import_zod39.z.strictObject({});
|
|
5719
|
+
var NetWifiNetwork = import_zod39.z.strictObject({
|
|
5314
5720
|
/** null: the OS hides the name (macOS without Location Services for this app). */
|
|
5315
|
-
ssid:
|
|
5721
|
+
ssid: import_zod39.z.string().nullable(),
|
|
5316
5722
|
/** dBm; null where the OS does not say. */
|
|
5317
|
-
rssi:
|
|
5318
|
-
channel:
|
|
5319
|
-
security:
|
|
5723
|
+
rssi: import_zod39.z.int().nullable(),
|
|
5724
|
+
channel: import_zod39.z.string().nullable(),
|
|
5725
|
+
security: import_zod39.z.string().nullable()
|
|
5320
5726
|
});
|
|
5321
|
-
var NetWifiResult =
|
|
5727
|
+
var NetWifiResult = import_zod39.z.strictObject({
|
|
5322
5728
|
/** Whether the computer has a Wi-Fi interface at all. */
|
|
5323
|
-
available:
|
|
5729
|
+
available: import_zod39.z.boolean(),
|
|
5324
5730
|
/** The network the computer is on; null when it is on none. */
|
|
5325
5731
|
current: NetWifiNetwork.nullable(),
|
|
5326
5732
|
/** Networks in range (may be empty where the OS lists none to apps). */
|
|
5327
|
-
networks:
|
|
5733
|
+
networks: import_zod39.z.array(NetWifiNetwork)
|
|
5328
5734
|
});
|
|
5329
|
-
var NetBluetoothParams =
|
|
5330
|
-
var NetBluetoothDevice =
|
|
5331
|
-
name:
|
|
5332
|
-
address:
|
|
5333
|
-
connected:
|
|
5735
|
+
var NetBluetoothParams = import_zod39.z.strictObject({});
|
|
5736
|
+
var NetBluetoothDevice = import_zod39.z.strictObject({
|
|
5737
|
+
name: import_zod39.z.string(),
|
|
5738
|
+
address: import_zod39.z.string().nullable(),
|
|
5739
|
+
connected: import_zod39.z.boolean(),
|
|
5334
5740
|
/** What it is, in the OS's words ("Headphones", "Keyboard"); null where it does not say. */
|
|
5335
|
-
kind:
|
|
5741
|
+
kind: import_zod39.z.string().nullable(),
|
|
5336
5742
|
/** Battery percent, where the OS reports it. */
|
|
5337
|
-
battery:
|
|
5743
|
+
battery: import_zod39.z.int().min(0).max(100).nullable()
|
|
5338
5744
|
});
|
|
5339
|
-
var NetBluetoothResult =
|
|
5745
|
+
var NetBluetoothResult = import_zod39.z.strictObject({
|
|
5340
5746
|
/** Bluetooth is on; null where the OS does not say. */
|
|
5341
|
-
powered:
|
|
5342
|
-
devices:
|
|
5343
|
-
});
|
|
5344
|
-
var NetDevicesParams =
|
|
5345
|
-
var NetDevice =
|
|
5346
|
-
ip:
|
|
5347
|
-
mac:
|
|
5348
|
-
interface:
|
|
5747
|
+
powered: import_zod39.z.boolean().nullable(),
|
|
5748
|
+
devices: import_zod39.z.array(NetBluetoothDevice)
|
|
5749
|
+
});
|
|
5750
|
+
var NetDevicesParams = import_zod39.z.strictObject({});
|
|
5751
|
+
var NetDevice = import_zod39.z.strictObject({
|
|
5752
|
+
ip: import_zod39.z.string(),
|
|
5753
|
+
mac: import_zod39.z.string().nullable(),
|
|
5754
|
+
interface: import_zod39.z.string().nullable(),
|
|
5349
5755
|
/** The name the local network gives it (reverse DNS / mDNS), when the table carries one. */
|
|
5350
|
-
hostname:
|
|
5756
|
+
hostname: import_zod39.z.string().nullable()
|
|
5351
5757
|
});
|
|
5352
|
-
var NetDevicesResult =
|
|
5353
|
-
var NetMdnsParams =
|
|
5758
|
+
var NetDevicesResult = import_zod39.z.strictObject({ devices: import_zod39.z.array(NetDevice) });
|
|
5759
|
+
var NetMdnsParams = import_zod39.z.strictObject({
|
|
5354
5760
|
/** A service type ("_http._tcp"); absent lists the service types found. */
|
|
5355
|
-
service_type:
|
|
5761
|
+
service_type: import_zod39.z.string().min(1).max(64).regex(/^_[A-Za-z0-9-]+\._(tcp|udp)$/).optional(),
|
|
5356
5762
|
/** How long to listen. */
|
|
5357
|
-
timeout_s:
|
|
5763
|
+
timeout_s: import_zod39.z.int().min(1).max(30).default(3)
|
|
5358
5764
|
});
|
|
5359
|
-
var NetMdnsService =
|
|
5360
|
-
name:
|
|
5361
|
-
type:
|
|
5362
|
-
domain:
|
|
5363
|
-
interface:
|
|
5765
|
+
var NetMdnsService = import_zod39.z.strictObject({
|
|
5766
|
+
name: import_zod39.z.string(),
|
|
5767
|
+
type: import_zod39.z.string(),
|
|
5768
|
+
domain: import_zod39.z.string(),
|
|
5769
|
+
interface: import_zod39.z.string().nullable()
|
|
5364
5770
|
});
|
|
5365
|
-
var NetMdnsResult =
|
|
5366
|
-
var NetScanParams =
|
|
5771
|
+
var NetMdnsResult = import_zod39.z.strictObject({ services: import_zod39.z.array(NetMdnsService) });
|
|
5772
|
+
var NetScanParams = import_zod39.z.strictObject({
|
|
5367
5773
|
/** A host name or address; a private or loopback address unless `allow_public`. */
|
|
5368
|
-
host:
|
|
5369
|
-
ports:
|
|
5370
|
-
timeout_ms:
|
|
5774
|
+
host: import_zod39.z.string().min(1).max(253),
|
|
5775
|
+
ports: import_zod39.z.array(import_zod39.z.int().min(1).max(65535)).min(1).max(1024),
|
|
5776
|
+
timeout_ms: import_zod39.z.int().min(50).max(1e4).default(800),
|
|
5371
5777
|
/** Scanning a host on the public internet needs saying so. */
|
|
5372
|
-
allow_public:
|
|
5778
|
+
allow_public: import_zod39.z.boolean().default(false)
|
|
5373
5779
|
});
|
|
5374
|
-
var NetScanResult =
|
|
5375
|
-
host:
|
|
5780
|
+
var NetScanResult = import_zod39.z.strictObject({
|
|
5781
|
+
host: import_zod39.z.string(),
|
|
5376
5782
|
/** The address the host resolved to. */
|
|
5377
|
-
address:
|
|
5378
|
-
open:
|
|
5783
|
+
address: import_zod39.z.string(),
|
|
5784
|
+
open: import_zod39.z.array(import_zod39.z.int().min(1).max(65535)),
|
|
5379
5785
|
closed: nonNegInt,
|
|
5380
5786
|
elapsed_ms: nonNegInt
|
|
5381
5787
|
});
|
|
5382
|
-
var NetDownloadParams =
|
|
5383
|
-
url:
|
|
5788
|
+
var NetDownloadParams = import_zod39.z.strictObject({
|
|
5789
|
+
url: import_zod39.z.string().min(1).max(8192).regex(/^https?:\/\//),
|
|
5384
5790
|
/** Where to save it: an absolute path (a folder keeps the URL's file name). */
|
|
5385
5791
|
path: AbsPath,
|
|
5386
|
-
overwrite:
|
|
5387
|
-
timeout_s:
|
|
5792
|
+
overwrite: import_zod39.z.boolean().default(false),
|
|
5793
|
+
timeout_s: import_zod39.z.int().min(1).max(3600).default(300),
|
|
5388
5794
|
/** Refuse anything larger. */
|
|
5389
|
-
max_bytes:
|
|
5795
|
+
max_bytes: import_zod39.z.int().min(1).max(10737418240).default(2147483648)
|
|
5390
5796
|
});
|
|
5391
|
-
var NetDownloadResult =
|
|
5392
|
-
path:
|
|
5797
|
+
var NetDownloadResult = import_zod39.z.strictObject({
|
|
5798
|
+
path: import_zod39.z.string(),
|
|
5393
5799
|
bytes: nonNegInt,
|
|
5394
|
-
content_type:
|
|
5800
|
+
content_type: import_zod39.z.string().nullable(),
|
|
5395
5801
|
/** The final URL after redirects. */
|
|
5396
|
-
url:
|
|
5802
|
+
url: import_zod39.z.string(),
|
|
5397
5803
|
elapsed_ms: nonNegInt
|
|
5398
5804
|
});
|
|
5399
5805
|
|
|
5400
5806
|
// src/schema/personal.ts
|
|
5401
|
-
var
|
|
5402
|
-
var Text =
|
|
5403
|
-
var AutomationScriptParams =
|
|
5807
|
+
var import_zod40 = require("zod");
|
|
5808
|
+
var Text = import_zod40.z.string().max(65536);
|
|
5809
|
+
var AutomationScriptParams = import_zod40.z.strictObject({
|
|
5404
5810
|
/** applescript and jxa: macOS (osascript); powershell: Windows (and pwsh where installed). */
|
|
5405
|
-
language:
|
|
5406
|
-
script:
|
|
5407
|
-
timeout_s:
|
|
5408
|
-
});
|
|
5409
|
-
var AutomationScriptResult =
|
|
5410
|
-
stdout:
|
|
5411
|
-
stderr:
|
|
5412
|
-
exit_code:
|
|
5413
|
-
timed_out:
|
|
5811
|
+
language: import_zod40.z.enum(["applescript", "jxa", "powershell"]),
|
|
5812
|
+
script: import_zod40.z.string().min(1).max(262144),
|
|
5813
|
+
timeout_s: import_zod40.z.int().min(1).max(600).default(60)
|
|
5814
|
+
});
|
|
5815
|
+
var AutomationScriptResult = import_zod40.z.strictObject({
|
|
5816
|
+
stdout: import_zod40.z.string(),
|
|
5817
|
+
stderr: import_zod40.z.string(),
|
|
5818
|
+
exit_code: import_zod40.z.int(),
|
|
5819
|
+
timed_out: import_zod40.z.boolean(),
|
|
5414
5820
|
/** stdout or stderr was cut at 1 MiB. */
|
|
5415
|
-
truncated:
|
|
5821
|
+
truncated: import_zod40.z.boolean(),
|
|
5416
5822
|
elapsed_ms: nonNegInt
|
|
5417
5823
|
});
|
|
5418
|
-
var MailAccountsParams =
|
|
5419
|
-
var MailAccount =
|
|
5420
|
-
name:
|
|
5421
|
-
emails:
|
|
5422
|
-
enabled:
|
|
5824
|
+
var MailAccountsParams = import_zod40.z.strictObject({});
|
|
5825
|
+
var MailAccount = import_zod40.z.strictObject({
|
|
5826
|
+
name: import_zod40.z.string(),
|
|
5827
|
+
emails: import_zod40.z.array(import_zod40.z.string()),
|
|
5828
|
+
enabled: import_zod40.z.boolean(),
|
|
5423
5829
|
/** (1.67) The account's mailboxes by name (Matrx Local's email_accounts listed them). */
|
|
5424
|
-
mailboxes:
|
|
5830
|
+
mailboxes: import_zod40.z.array(import_zod40.z.string()).optional()
|
|
5425
5831
|
});
|
|
5426
|
-
var MailAccountsResult =
|
|
5427
|
-
var MailListParams =
|
|
5832
|
+
var MailAccountsResult = import_zod40.z.strictObject({ accounts: import_zod40.z.array(MailAccount) });
|
|
5833
|
+
var MailListParams = import_zod40.z.strictObject({
|
|
5428
5834
|
/** The account's name in Mail; absent: every account. */
|
|
5429
|
-
account:
|
|
5835
|
+
account: import_zod40.z.string().min(1).max(256).optional(),
|
|
5430
5836
|
/** The mailbox's name ("INBOX", "Sent Messages"). */
|
|
5431
|
-
mailbox:
|
|
5432
|
-
unread_only:
|
|
5433
|
-
limit:
|
|
5434
|
-
});
|
|
5435
|
-
var MailMessage =
|
|
5436
|
-
id:
|
|
5437
|
-
subject:
|
|
5438
|
-
sender:
|
|
5837
|
+
mailbox: import_zod40.z.string().min(1).max(256).default("INBOX"),
|
|
5838
|
+
unread_only: import_zod40.z.boolean().default(false),
|
|
5839
|
+
limit: import_zod40.z.int().min(1).max(200).default(25)
|
|
5840
|
+
});
|
|
5841
|
+
var MailMessage = import_zod40.z.strictObject({
|
|
5842
|
+
id: import_zod40.z.string(),
|
|
5843
|
+
subject: import_zod40.z.string(),
|
|
5844
|
+
sender: import_zod40.z.string(),
|
|
5439
5845
|
received_at_ms: epochMs.nullable(),
|
|
5440
|
-
read:
|
|
5441
|
-
account:
|
|
5442
|
-
mailbox:
|
|
5846
|
+
read: import_zod40.z.boolean(),
|
|
5847
|
+
account: import_zod40.z.string(),
|
|
5848
|
+
mailbox: import_zod40.z.string(),
|
|
5443
5849
|
/** The first lines of the message's text. */
|
|
5444
|
-
preview:
|
|
5850
|
+
preview: import_zod40.z.string()
|
|
5445
5851
|
});
|
|
5446
|
-
var MailListResult =
|
|
5447
|
-
var MailSendParams =
|
|
5448
|
-
to:
|
|
5449
|
-
cc:
|
|
5852
|
+
var MailListResult = import_zod40.z.strictObject({ messages: import_zod40.z.array(MailMessage) });
|
|
5853
|
+
var MailSendParams = import_zod40.z.strictObject({
|
|
5854
|
+
to: import_zod40.z.array(import_zod40.z.string().min(3).max(320)).min(1).max(50),
|
|
5855
|
+
cc: import_zod40.z.array(import_zod40.z.string().min(3).max(320)).max(50).default([]),
|
|
5450
5856
|
/** (1.67) Blind copies (Matrx Local's send_email bcc). */
|
|
5451
|
-
bcc:
|
|
5452
|
-
subject:
|
|
5857
|
+
bcc: import_zod40.z.array(import_zod40.z.string().min(3).max(320)).max(50).optional(),
|
|
5858
|
+
subject: import_zod40.z.string().max(998),
|
|
5453
5859
|
body: Text,
|
|
5454
5860
|
/** The sending account's address; absent: Mail's default. */
|
|
5455
|
-
from:
|
|
5861
|
+
from: import_zod40.z.string().min(3).max(320).optional(),
|
|
5456
5862
|
/** false leaves it open in Mail as a draft for the person to send. */
|
|
5457
|
-
send:
|
|
5863
|
+
send: import_zod40.z.boolean().default(true)
|
|
5458
5864
|
});
|
|
5459
|
-
var MailSendResult =
|
|
5460
|
-
var OutlookStatusParams =
|
|
5461
|
-
var OutlookAccount =
|
|
5462
|
-
var OutlookStatusResult =
|
|
5865
|
+
var MailSendResult = import_zod40.z.strictObject({ sent: import_zod40.z.boolean() });
|
|
5866
|
+
var OutlookStatusParams = import_zod40.z.strictObject({});
|
|
5867
|
+
var OutlookAccount = import_zod40.z.strictObject({ name: import_zod40.z.string(), email: import_zod40.z.string().nullable() });
|
|
5868
|
+
var OutlookStatusResult = import_zod40.z.strictObject({
|
|
5463
5869
|
/** classic_windows: scriptable. new_windows / mac: installed, not scriptable. none: not found. */
|
|
5464
|
-
client:
|
|
5465
|
-
scriptable:
|
|
5466
|
-
version:
|
|
5467
|
-
accounts:
|
|
5870
|
+
client: import_zod40.z.enum(["classic_windows", "new_windows", "mac", "none"]),
|
|
5871
|
+
scriptable: import_zod40.z.boolean(),
|
|
5872
|
+
version: import_zod40.z.string().nullable(),
|
|
5873
|
+
accounts: import_zod40.z.array(OutlookAccount),
|
|
5468
5874
|
/** Why it is not scriptable here, in a sentence the person can act on; null when it is. */
|
|
5469
|
-
reason:
|
|
5470
|
-
});
|
|
5471
|
-
var Address =
|
|
5472
|
-
var OutlookDraftParams =
|
|
5473
|
-
to:
|
|
5474
|
-
cc:
|
|
5475
|
-
bcc:
|
|
5476
|
-
subject:
|
|
5477
|
-
body:
|
|
5478
|
-
body_format:
|
|
5875
|
+
reason: import_zod40.z.string().nullable()
|
|
5876
|
+
});
|
|
5877
|
+
var Address = import_zod40.z.string().min(3).max(320);
|
|
5878
|
+
var OutlookDraftParams = import_zod40.z.strictObject({
|
|
5879
|
+
to: import_zod40.z.array(Address).max(100).default([]),
|
|
5880
|
+
cc: import_zod40.z.array(Address).max(100).default([]),
|
|
5881
|
+
bcc: import_zod40.z.array(Address).max(100).default([]),
|
|
5882
|
+
subject: import_zod40.z.string().max(998).default(""),
|
|
5883
|
+
body: import_zod40.z.string().max(1048576).default(""),
|
|
5884
|
+
body_format: import_zod40.z.enum(["text", "html"]).default("text"),
|
|
5479
5885
|
/** Files on this computer to attach (absolute paths). */
|
|
5480
|
-
attachments:
|
|
5886
|
+
attachments: import_zod40.z.array(import_zod40.z.string().min(1).max(4096)).max(50).default([]),
|
|
5481
5887
|
/** The sending account's address (one of outlook.status's accounts); absent: Outlook's default. */
|
|
5482
5888
|
account: Address.optional(),
|
|
5483
5889
|
/** true also opens the draft in a window for the person. */
|
|
5484
|
-
display:
|
|
5890
|
+
display: import_zod40.z.boolean().default(false)
|
|
5485
5891
|
});
|
|
5486
|
-
var OutlookDraftResult =
|
|
5892
|
+
var OutlookDraftResult = import_zod40.z.strictObject({
|
|
5487
5893
|
/** The draft's id in Outlook (outlook.read takes it). */
|
|
5488
|
-
id:
|
|
5489
|
-
account:
|
|
5490
|
-
folder:
|
|
5894
|
+
id: import_zod40.z.string(),
|
|
5895
|
+
account: import_zod40.z.string().nullable(),
|
|
5896
|
+
folder: import_zod40.z.string(),
|
|
5491
5897
|
attachments: nonNegInt,
|
|
5492
|
-
displayed:
|
|
5898
|
+
displayed: import_zod40.z.boolean()
|
|
5493
5899
|
});
|
|
5494
|
-
var OutlookListParams =
|
|
5495
|
-
folder:
|
|
5900
|
+
var OutlookListParams = import_zod40.z.strictObject({
|
|
5901
|
+
folder: import_zod40.z.enum(["inbox", "sent", "drafts"]).default("inbox"),
|
|
5496
5902
|
/** The account's address; absent: the default account. */
|
|
5497
5903
|
account: Address.optional(),
|
|
5498
|
-
unread_only:
|
|
5499
|
-
limit:
|
|
5904
|
+
unread_only: import_zod40.z.boolean().default(false),
|
|
5905
|
+
limit: import_zod40.z.int().min(1).max(200).default(25)
|
|
5500
5906
|
});
|
|
5501
|
-
var OutlookMessage =
|
|
5502
|
-
id:
|
|
5503
|
-
subject:
|
|
5504
|
-
sender:
|
|
5907
|
+
var OutlookMessage = import_zod40.z.strictObject({
|
|
5908
|
+
id: import_zod40.z.string(),
|
|
5909
|
+
subject: import_zod40.z.string(),
|
|
5910
|
+
sender: import_zod40.z.string(),
|
|
5505
5911
|
received_at_ms: epochMs.nullable(),
|
|
5506
|
-
read:
|
|
5507
|
-
has_attachments:
|
|
5912
|
+
read: import_zod40.z.boolean(),
|
|
5913
|
+
has_attachments: import_zod40.z.boolean(),
|
|
5508
5914
|
/** The first lines of the message's text. */
|
|
5509
|
-
preview:
|
|
5510
|
-
});
|
|
5511
|
-
var OutlookListResult =
|
|
5512
|
-
var OutlookReadParams =
|
|
5513
|
-
var OutlookReadResult =
|
|
5514
|
-
id:
|
|
5515
|
-
subject:
|
|
5516
|
-
sender:
|
|
5517
|
-
to:
|
|
5518
|
-
cc:
|
|
5915
|
+
preview: import_zod40.z.string()
|
|
5916
|
+
});
|
|
5917
|
+
var OutlookListResult = import_zod40.z.strictObject({ folder: import_zod40.z.string(), messages: import_zod40.z.array(OutlookMessage) });
|
|
5918
|
+
var OutlookReadParams = import_zod40.z.strictObject({ id: import_zod40.z.string().min(1).max(1024) });
|
|
5919
|
+
var OutlookReadResult = import_zod40.z.strictObject({
|
|
5920
|
+
id: import_zod40.z.string(),
|
|
5921
|
+
subject: import_zod40.z.string(),
|
|
5922
|
+
sender: import_zod40.z.string(),
|
|
5923
|
+
to: import_zod40.z.array(import_zod40.z.string()),
|
|
5924
|
+
cc: import_zod40.z.array(import_zod40.z.string()),
|
|
5519
5925
|
received_at_ms: epochMs.nullable(),
|
|
5520
5926
|
/** The plain text body, cut at 1 MiB. */
|
|
5521
|
-
body:
|
|
5522
|
-
attachments:
|
|
5523
|
-
});
|
|
5524
|
-
var MessagesChatsParams =
|
|
5525
|
-
var MessagesChat =
|
|
5526
|
-
chat_id:
|
|
5527
|
-
name:
|
|
5528
|
-
participants:
|
|
5927
|
+
body: import_zod40.z.string(),
|
|
5928
|
+
attachments: import_zod40.z.array(import_zod40.z.strictObject({ name: import_zod40.z.string(), size: nonNegInt }))
|
|
5929
|
+
});
|
|
5930
|
+
var MessagesChatsParams = import_zod40.z.strictObject({ limit: import_zod40.z.int().min(1).max(200).default(25) });
|
|
5931
|
+
var MessagesChat = import_zod40.z.strictObject({
|
|
5932
|
+
chat_id: import_zod40.z.string(),
|
|
5933
|
+
name: import_zod40.z.string().nullable(),
|
|
5934
|
+
participants: import_zod40.z.array(import_zod40.z.string()),
|
|
5529
5935
|
last_message_at_ms: epochMs.nullable(),
|
|
5530
|
-
service:
|
|
5936
|
+
service: import_zod40.z.string().nullable(),
|
|
5531
5937
|
/** (1.67) The newest message's text (Matrx Local's list_conversations preview); absent when it has none. */
|
|
5532
|
-
last_message:
|
|
5938
|
+
last_message: import_zod40.z.string().optional()
|
|
5533
5939
|
});
|
|
5534
|
-
var MessagesChatsResult =
|
|
5535
|
-
var MessagesListParams =
|
|
5940
|
+
var MessagesChatsResult = import_zod40.z.strictObject({ chats: import_zod40.z.array(MessagesChat) });
|
|
5941
|
+
var MessagesListParams = import_zod40.z.strictObject({
|
|
5536
5942
|
/** One chat (messages.chats' chat_id); absent: the newest across all. */
|
|
5537
|
-
chat_id:
|
|
5538
|
-
limit:
|
|
5943
|
+
chat_id: import_zod40.z.string().min(1).max(512).optional(),
|
|
5944
|
+
limit: import_zod40.z.int().min(1).max(500).default(50),
|
|
5539
5945
|
/** (1.67) Only messages with this handle or chat name in them (partial: a phone, an email, a name). */
|
|
5540
|
-
contact:
|
|
5946
|
+
contact: import_zod40.z.string().min(1).max(320).optional(),
|
|
5541
5947
|
/** (1.67) Only messages not yet read. */
|
|
5542
|
-
unread_only:
|
|
5948
|
+
unread_only: import_zod40.z.boolean().optional()
|
|
5543
5949
|
});
|
|
5544
|
-
var MessagesMessage =
|
|
5545
|
-
id:
|
|
5546
|
-
chat_id:
|
|
5547
|
-
text:
|
|
5548
|
-
from_me:
|
|
5950
|
+
var MessagesMessage = import_zod40.z.strictObject({
|
|
5951
|
+
id: import_zod40.z.string(),
|
|
5952
|
+
chat_id: import_zod40.z.string().nullable(),
|
|
5953
|
+
text: import_zod40.z.string(),
|
|
5954
|
+
from_me: import_zod40.z.boolean(),
|
|
5549
5955
|
/** The other person's handle (phone or email); null for the person's own messages. */
|
|
5550
|
-
sender:
|
|
5956
|
+
sender: import_zod40.z.string().nullable(),
|
|
5551
5957
|
sent_at_ms: epochMs.nullable(),
|
|
5552
5958
|
/** (1.67) Whether it has been read. */
|
|
5553
|
-
read:
|
|
5959
|
+
read: import_zod40.z.boolean().optional(),
|
|
5554
5960
|
/** (1.67) iMessage, SMS or RCS, as the Messages database says. */
|
|
5555
|
-
service:
|
|
5961
|
+
service: import_zod40.z.string().optional(),
|
|
5556
5962
|
/** (1.67) The chat's name (group chats); absent for a one-to-one chat. */
|
|
5557
|
-
chat_name:
|
|
5963
|
+
chat_name: import_zod40.z.string().optional()
|
|
5558
5964
|
});
|
|
5559
|
-
var MessagesListResult =
|
|
5560
|
-
var MessagesSendParams =
|
|
5965
|
+
var MessagesListResult = import_zod40.z.strictObject({ messages: import_zod40.z.array(MessagesMessage) });
|
|
5966
|
+
var MessagesSendParams = import_zod40.z.strictObject({
|
|
5561
5967
|
/** A phone number or email the person can message. */
|
|
5562
|
-
to:
|
|
5563
|
-
text:
|
|
5968
|
+
to: import_zod40.z.string().min(3).max(320),
|
|
5969
|
+
text: import_zod40.z.string().min(1).max(2e4),
|
|
5564
5970
|
/**
|
|
5565
5971
|
* Send only over this service (Matrx Local's SendMessage `service`). Absent: iMessage first, and
|
|
5566
5972
|
* SMS when the recipient has no iMessage (since 1.42).
|
|
5567
5973
|
*/
|
|
5568
|
-
service:
|
|
5974
|
+
service: import_zod40.z.enum(["iMessage", "SMS"]).optional()
|
|
5569
5975
|
});
|
|
5570
|
-
var MessagesSendResult =
|
|
5571
|
-
var ContactsSearchParams =
|
|
5976
|
+
var MessagesSendResult = import_zod40.z.strictObject({ sent: import_zod40.z.boolean() });
|
|
5977
|
+
var ContactsSearchParams = import_zod40.z.strictObject({
|
|
5572
5978
|
/** Matched against names, organizations, emails and phone numbers; absent (1.67): the first `limit` contacts. */
|
|
5573
|
-
query:
|
|
5574
|
-
limit:
|
|
5575
|
-
});
|
|
5576
|
-
var ContactLabeled =
|
|
5577
|
-
var ContactSummary =
|
|
5578
|
-
id:
|
|
5579
|
-
name:
|
|
5580
|
-
organization:
|
|
5581
|
-
emails:
|
|
5582
|
-
phones:
|
|
5583
|
-
});
|
|
5584
|
-
var ContactsSearchResult =
|
|
5585
|
-
var ContactsGetParams =
|
|
5586
|
-
var ContactDetail =
|
|
5587
|
-
id:
|
|
5588
|
-
name:
|
|
5589
|
-
organization:
|
|
5590
|
-
job_title:
|
|
5591
|
-
emails:
|
|
5592
|
-
phones:
|
|
5593
|
-
addresses:
|
|
5594
|
-
birthday:
|
|
5595
|
-
note:
|
|
5596
|
-
});
|
|
5597
|
-
var ContactsGetResult =
|
|
5598
|
-
var CalendarListParams =
|
|
5979
|
+
query: import_zod40.z.string().min(1).max(256).optional(),
|
|
5980
|
+
limit: import_zod40.z.int().min(1).max(200).default(25)
|
|
5981
|
+
});
|
|
5982
|
+
var ContactLabeled = import_zod40.z.strictObject({ label: import_zod40.z.string().nullable(), value: import_zod40.z.string() });
|
|
5983
|
+
var ContactSummary = import_zod40.z.strictObject({
|
|
5984
|
+
id: import_zod40.z.string(),
|
|
5985
|
+
name: import_zod40.z.string(),
|
|
5986
|
+
organization: import_zod40.z.string().nullable(),
|
|
5987
|
+
emails: import_zod40.z.array(ContactLabeled),
|
|
5988
|
+
phones: import_zod40.z.array(ContactLabeled)
|
|
5989
|
+
});
|
|
5990
|
+
var ContactsSearchResult = import_zod40.z.strictObject({ contacts: import_zod40.z.array(ContactSummary) });
|
|
5991
|
+
var ContactsGetParams = import_zod40.z.strictObject({ id: import_zod40.z.string().min(1).max(256) });
|
|
5992
|
+
var ContactDetail = import_zod40.z.strictObject({
|
|
5993
|
+
id: import_zod40.z.string(),
|
|
5994
|
+
name: import_zod40.z.string(),
|
|
5995
|
+
organization: import_zod40.z.string().nullable(),
|
|
5996
|
+
job_title: import_zod40.z.string().nullable(),
|
|
5997
|
+
emails: import_zod40.z.array(ContactLabeled),
|
|
5998
|
+
phones: import_zod40.z.array(ContactLabeled),
|
|
5999
|
+
addresses: import_zod40.z.array(ContactLabeled),
|
|
6000
|
+
birthday: import_zod40.z.string().nullable(),
|
|
6001
|
+
note: import_zod40.z.string().nullable()
|
|
6002
|
+
});
|
|
6003
|
+
var ContactsGetResult = import_zod40.z.strictObject({ contact: ContactDetail });
|
|
6004
|
+
var CalendarListParams = import_zod40.z.strictObject({
|
|
5599
6005
|
from_ms: epochMs,
|
|
5600
6006
|
to_ms: epochMs,
|
|
5601
6007
|
/** One calendar's name; absent: every calendar. */
|
|
5602
|
-
calendar:
|
|
6008
|
+
calendar: import_zod40.z.string().min(1).max(256).optional(),
|
|
5603
6009
|
/** (1.67) Several calendars by name (Matrx Local's calendar_names); with `calendar`, both count. */
|
|
5604
|
-
calendars:
|
|
5605
|
-
limit:
|
|
6010
|
+
calendars: import_zod40.z.array(import_zod40.z.string().min(1).max(256)).min(1).max(100).optional(),
|
|
6011
|
+
limit: import_zod40.z.int().min(1).max(500).default(100)
|
|
5606
6012
|
});
|
|
5607
|
-
var CalendarEvent =
|
|
5608
|
-
id:
|
|
5609
|
-
title:
|
|
6013
|
+
var CalendarEvent = import_zod40.z.strictObject({
|
|
6014
|
+
id: import_zod40.z.string(),
|
|
6015
|
+
title: import_zod40.z.string(),
|
|
5610
6016
|
start_ms: epochMs,
|
|
5611
6017
|
end_ms: epochMs,
|
|
5612
|
-
all_day:
|
|
5613
|
-
calendar:
|
|
5614
|
-
location:
|
|
5615
|
-
notes:
|
|
6018
|
+
all_day: import_zod40.z.boolean(),
|
|
6019
|
+
calendar: import_zod40.z.string(),
|
|
6020
|
+
location: import_zod40.z.string().nullable(),
|
|
6021
|
+
notes: import_zod40.z.string().nullable(),
|
|
5616
6022
|
/** (1.67) The event's link; absent when it has none. */
|
|
5617
|
-
url:
|
|
6023
|
+
url: import_zod40.z.string().optional()
|
|
5618
6024
|
});
|
|
5619
|
-
var CalendarListResult =
|
|
5620
|
-
var CalendarCreateParams =
|
|
5621
|
-
title:
|
|
6025
|
+
var CalendarListResult = import_zod40.z.strictObject({ events: import_zod40.z.array(CalendarEvent) });
|
|
6026
|
+
var CalendarCreateParams = import_zod40.z.strictObject({
|
|
6027
|
+
title: import_zod40.z.string().min(1).max(1024),
|
|
5622
6028
|
start_ms: epochMs,
|
|
5623
6029
|
end_ms: epochMs,
|
|
5624
|
-
all_day:
|
|
6030
|
+
all_day: import_zod40.z.boolean().default(false),
|
|
5625
6031
|
/** The calendar's name; absent: the first writable calendar. */
|
|
5626
|
-
calendar:
|
|
5627
|
-
location:
|
|
6032
|
+
calendar: import_zod40.z.string().min(1).max(256).optional(),
|
|
6033
|
+
location: import_zod40.z.string().max(1024).optional(),
|
|
5628
6034
|
notes: Text.optional()
|
|
5629
6035
|
});
|
|
5630
|
-
var CalendarCreateResult =
|
|
5631
|
-
var RemindersListParams =
|
|
6036
|
+
var CalendarCreateResult = import_zod40.z.strictObject({ id: import_zod40.z.string(), calendar: import_zod40.z.string() });
|
|
6037
|
+
var RemindersListParams = import_zod40.z.strictObject({
|
|
5632
6038
|
/** One list's name; absent: every list. */
|
|
5633
|
-
list:
|
|
6039
|
+
list: import_zod40.z.string().min(1).max(256).optional(),
|
|
5634
6040
|
/** (1.67) Several lists by name (Matrx Local's list_names); with `list`, both count. */
|
|
5635
|
-
lists:
|
|
5636
|
-
include_completed:
|
|
5637
|
-
limit:
|
|
5638
|
-
});
|
|
5639
|
-
var Reminder =
|
|
5640
|
-
id:
|
|
5641
|
-
title:
|
|
5642
|
-
list:
|
|
6041
|
+
lists: import_zod40.z.array(import_zod40.z.string().min(1).max(256)).min(1).max(100).optional(),
|
|
6042
|
+
include_completed: import_zod40.z.boolean().default(false),
|
|
6043
|
+
limit: import_zod40.z.int().min(1).max(500).default(100)
|
|
6044
|
+
});
|
|
6045
|
+
var Reminder = import_zod40.z.strictObject({
|
|
6046
|
+
id: import_zod40.z.string(),
|
|
6047
|
+
title: import_zod40.z.string(),
|
|
6048
|
+
list: import_zod40.z.string(),
|
|
5643
6049
|
due_ms: epochMs.nullable(),
|
|
5644
|
-
completed:
|
|
5645
|
-
notes:
|
|
6050
|
+
completed: import_zod40.z.boolean(),
|
|
6051
|
+
notes: import_zod40.z.string().nullable(),
|
|
5646
6052
|
/** (1.67) 0 none, 1 high … 9 low (EventKit's scale). */
|
|
5647
|
-
priority:
|
|
6053
|
+
priority: import_zod40.z.int().min(0).max(9).optional(),
|
|
5648
6054
|
/** (1.67) When it was completed; absent while open. */
|
|
5649
6055
|
completed_at_ms: epochMs.optional()
|
|
5650
6056
|
});
|
|
5651
|
-
var RemindersListResult =
|
|
5652
|
-
var RemindersCreateParams =
|
|
5653
|
-
title:
|
|
6057
|
+
var RemindersListResult = import_zod40.z.strictObject({ reminders: import_zod40.z.array(Reminder) });
|
|
6058
|
+
var RemindersCreateParams = import_zod40.z.strictObject({
|
|
6059
|
+
title: import_zod40.z.string().min(1).max(1024),
|
|
5654
6060
|
due_ms: epochMs.optional(),
|
|
5655
|
-
list:
|
|
6061
|
+
list: import_zod40.z.string().min(1).max(256).optional(),
|
|
5656
6062
|
notes: Text.optional()
|
|
5657
6063
|
});
|
|
5658
|
-
var RemindersCreateResult =
|
|
5659
|
-
var PhotosSearchParams =
|
|
6064
|
+
var RemindersCreateResult = import_zod40.z.strictObject({ id: import_zod40.z.string(), list: import_zod40.z.string() });
|
|
6065
|
+
var PhotosSearchParams = import_zod40.z.strictObject({
|
|
5660
6066
|
/** Matched against file names, titles, descriptions and keywords; absent: the newest. */
|
|
5661
|
-
query:
|
|
6067
|
+
query: import_zod40.z.string().min(1).max(256).optional(),
|
|
5662
6068
|
from_ms: epochMs.optional(),
|
|
5663
6069
|
to_ms: epochMs.optional(),
|
|
5664
|
-
favorites_only:
|
|
6070
|
+
favorites_only: import_zod40.z.boolean().default(false),
|
|
5665
6071
|
/** (1.67) image, video or all (Matrx Local's media_type); absent: all. */
|
|
5666
|
-
media_type:
|
|
5667
|
-
limit:
|
|
6072
|
+
media_type: import_zod40.z.enum(["image", "video", "all"]).optional(),
|
|
6073
|
+
limit: import_zod40.z.int().min(1).max(200).default(25)
|
|
5668
6074
|
});
|
|
5669
|
-
var Photo =
|
|
5670
|
-
id:
|
|
5671
|
-
filename:
|
|
6075
|
+
var Photo = import_zod40.z.strictObject({
|
|
6076
|
+
id: import_zod40.z.string(),
|
|
6077
|
+
filename: import_zod40.z.string(),
|
|
5672
6078
|
taken_at_ms: epochMs.nullable(),
|
|
5673
6079
|
width: nonNegInt.nullable(),
|
|
5674
6080
|
height: nonNegInt.nullable(),
|
|
5675
|
-
favorite:
|
|
5676
|
-
title:
|
|
6081
|
+
favorite: import_zod40.z.boolean(),
|
|
6082
|
+
title: import_zod40.z.string().nullable(),
|
|
5677
6083
|
/** (1.67) What the asset is. */
|
|
5678
|
-
media_type:
|
|
6084
|
+
media_type: import_zod40.z.enum(["image", "video", "audio", "unknown"]).optional(),
|
|
5679
6085
|
/** (1.67) A video's length in seconds; absent for a still. */
|
|
5680
|
-
duration_s:
|
|
6086
|
+
duration_s: import_zod40.z.number().min(0).optional()
|
|
5681
6087
|
});
|
|
5682
|
-
var PhotosSearchResult =
|
|
5683
|
-
var PhotosGetParams =
|
|
5684
|
-
id:
|
|
6088
|
+
var PhotosSearchResult = import_zod40.z.strictObject({ photos: import_zod40.z.array(Photo) });
|
|
6089
|
+
var PhotosGetParams = import_zod40.z.strictObject({
|
|
6090
|
+
id: import_zod40.z.string().min(1).max(256),
|
|
5685
6091
|
/** Copy the original into a folder Matrx 2 owns and answer its path (then fs_read or desktop_documents reads it). */
|
|
5686
|
-
export:
|
|
6092
|
+
export: import_zod40.z.boolean().default(false),
|
|
5687
6093
|
/** (1.67) Also answer a PNG thumbnail no larger than this many pixels a side (Matrx Local's get_photo thumbnail). */
|
|
5688
|
-
thumbnail_size:
|
|
6094
|
+
thumbnail_size: import_zod40.z.int().min(64).max(2048).optional()
|
|
5689
6095
|
});
|
|
5690
|
-
var PhotosGetResult =
|
|
6096
|
+
var PhotosGetResult = import_zod40.z.strictObject({
|
|
5691
6097
|
photo: Photo,
|
|
5692
|
-
path:
|
|
6098
|
+
path: import_zod40.z.string().nullable(),
|
|
5693
6099
|
/** (1.67) The thumbnail as base64 PNG, when thumbnail_size asked for one; absent when it could not be drawn. */
|
|
5694
|
-
thumbnail_png_base64:
|
|
6100
|
+
thumbnail_png_base64: import_zod40.z.string().optional()
|
|
5695
6101
|
});
|
|
5696
|
-
var LocationGetParams =
|
|
5697
|
-
var LocationGetResult =
|
|
5698
|
-
latitude:
|
|
5699
|
-
longitude:
|
|
6102
|
+
var LocationGetParams = import_zod40.z.strictObject({ timeout_s: import_zod40.z.int().min(1).max(60).default(15) });
|
|
6103
|
+
var LocationGetResult = import_zod40.z.strictObject({
|
|
6104
|
+
latitude: import_zod40.z.number().min(-90).max(90),
|
|
6105
|
+
longitude: import_zod40.z.number().min(-180).max(180),
|
|
5700
6106
|
/** Metres; null where the OS does not say. */
|
|
5701
|
-
accuracy_m:
|
|
6107
|
+
accuracy_m: import_zod40.z.number().min(0).nullable(),
|
|
5702
6108
|
at_ms: epochMs,
|
|
5703
6109
|
/** Who answered: the OS's own location service. */
|
|
5704
|
-
source:
|
|
6110
|
+
source: import_zod40.z.enum(["corelocation", "windows", "geoclue"]),
|
|
5705
6111
|
/** (1.67) Metres above sea level, its accuracy, speed (m/s) and course (degrees); absent where the OS does not say. */
|
|
5706
|
-
altitude_m:
|
|
5707
|
-
vertical_accuracy_m:
|
|
5708
|
-
speed_mps:
|
|
5709
|
-
course_deg:
|
|
6112
|
+
altitude_m: import_zod40.z.number().optional(),
|
|
6113
|
+
vertical_accuracy_m: import_zod40.z.number().min(0).optional(),
|
|
6114
|
+
speed_mps: import_zod40.z.number().min(0).optional(),
|
|
6115
|
+
course_deg: import_zod40.z.number().min(0).max(360).optional()
|
|
5710
6116
|
});
|
|
5711
6117
|
|
|
5712
6118
|
// src/schema/windows.ts
|
|
5713
|
-
var
|
|
5714
|
-
var RegistryKey =
|
|
5715
|
-
var RegistryValueType =
|
|
5716
|
-
var WindowsRegistryReadParams =
|
|
6119
|
+
var import_zod41 = require("zod");
|
|
6120
|
+
var RegistryKey = import_zod41.z.string().min(6).max(1024).regex(/^(HKLM|HKCU|HKCR|HKU|HKCC|HKEY_LOCAL_MACHINE|HKEY_CURRENT_USER|HKEY_CLASSES_ROOT|HKEY_USERS|HKEY_CURRENT_CONFIG)(\\.*)?$/);
|
|
6121
|
+
var RegistryValueType = import_zod41.z.enum(["REG_SZ", "REG_EXPAND_SZ", "REG_MULTI_SZ", "REG_DWORD", "REG_QWORD", "REG_BINARY", "REG_NONE"]);
|
|
6122
|
+
var WindowsRegistryReadParams = import_zod41.z.strictObject({
|
|
5717
6123
|
key: RegistryKey,
|
|
5718
6124
|
/** One value's name ("" is the key's default value); absent: every value and the subkeys. */
|
|
5719
|
-
name:
|
|
6125
|
+
name: import_zod41.z.string().max(16383).optional()
|
|
5720
6126
|
});
|
|
5721
|
-
var RegistryValue =
|
|
5722
|
-
var WindowsRegistryReadResult =
|
|
5723
|
-
key:
|
|
5724
|
-
exists:
|
|
5725
|
-
values:
|
|
5726
|
-
subkeys:
|
|
6127
|
+
var RegistryValue = import_zod41.z.strictObject({ name: import_zod41.z.string(), type: RegistryValueType, data: import_zod41.z.string() });
|
|
6128
|
+
var WindowsRegistryReadResult = import_zod41.z.strictObject({
|
|
6129
|
+
key: import_zod41.z.string(),
|
|
6130
|
+
exists: import_zod41.z.boolean(),
|
|
6131
|
+
values: import_zod41.z.array(RegistryValue),
|
|
6132
|
+
subkeys: import_zod41.z.array(import_zod41.z.string())
|
|
5727
6133
|
});
|
|
5728
|
-
var WindowsRegistryWriteParams =
|
|
6134
|
+
var WindowsRegistryWriteParams = import_zod41.z.strictObject({
|
|
5729
6135
|
key: RegistryKey,
|
|
5730
|
-
name:
|
|
6136
|
+
name: import_zod41.z.string().max(16383),
|
|
5731
6137
|
type: RegistryValueType.default("REG_SZ"),
|
|
5732
6138
|
/** As reg.exe takes it: text, a number, hex for binary, \\0 between the strings of a multi-string. */
|
|
5733
|
-
data:
|
|
6139
|
+
data: import_zod41.z.string().max(1048576),
|
|
5734
6140
|
/** Remove the value instead of writing it. */
|
|
5735
|
-
delete:
|
|
6141
|
+
delete: import_zod41.z.boolean().default(false)
|
|
5736
6142
|
});
|
|
5737
|
-
var WindowsRegistryWriteResult =
|
|
5738
|
-
var WindowsServicesParams =
|
|
6143
|
+
var WindowsRegistryWriteResult = import_zod41.z.strictObject({ key: import_zod41.z.string(), name: import_zod41.z.string(), deleted: import_zod41.z.boolean() });
|
|
6144
|
+
var WindowsServicesParams = import_zod41.z.strictObject({
|
|
5739
6145
|
/** Matched against the service's name and display name. */
|
|
5740
|
-
filter:
|
|
6146
|
+
filter: import_zod41.z.string().min(1).max(256).optional(),
|
|
5741
6147
|
/** (1.67) Only services in this state (Matrx Local's service_list status). */
|
|
5742
|
-
status:
|
|
5743
|
-
limit:
|
|
6148
|
+
status: import_zod41.z.enum(["running", "stopped", "paused"]).optional(),
|
|
6149
|
+
limit: import_zod41.z.int().min(1).max(1e3).default(200)
|
|
5744
6150
|
});
|
|
5745
|
-
var WindowsService =
|
|
5746
|
-
name:
|
|
5747
|
-
display_name:
|
|
6151
|
+
var WindowsService = import_zod41.z.strictObject({
|
|
6152
|
+
name: import_zod41.z.string(),
|
|
6153
|
+
display_name: import_zod41.z.string(),
|
|
5748
6154
|
/** Running, Stopped, Paused… as Windows says it. */
|
|
5749
|
-
status:
|
|
6155
|
+
status: import_zod41.z.string(),
|
|
5750
6156
|
/** Automatic, Manual, Disabled…; null where Windows does not say. */
|
|
5751
|
-
start_type:
|
|
6157
|
+
start_type: import_zod41.z.string().nullable()
|
|
5752
6158
|
});
|
|
5753
|
-
var WindowsServicesResult =
|
|
5754
|
-
var WindowsServiceControlParams =
|
|
5755
|
-
name:
|
|
6159
|
+
var WindowsServicesResult = import_zod41.z.strictObject({ services: import_zod41.z.array(WindowsService) });
|
|
6160
|
+
var WindowsServiceControlParams = import_zod41.z.strictObject({
|
|
6161
|
+
name: import_zod41.z.string().min(1).max(256),
|
|
5756
6162
|
/** pause and resume since 1.67 (Matrx Local's service_control). */
|
|
5757
|
-
action:
|
|
6163
|
+
action: import_zod41.z.enum(["start", "stop", "restart", "pause", "resume"])
|
|
5758
6164
|
});
|
|
5759
|
-
var WindowsServiceControlResult =
|
|
5760
|
-
var WindowsEventLogParams =
|
|
5761
|
-
log:
|
|
6165
|
+
var WindowsServiceControlResult = import_zod41.z.strictObject({ name: import_zod41.z.string(), status: import_zod41.z.string() });
|
|
6166
|
+
var WindowsEventLogParams = import_zod41.z.strictObject({
|
|
6167
|
+
log: import_zod41.z.string().min(1).max(256).default("System"),
|
|
5762
6168
|
/** Only these levels; absent: all. */
|
|
5763
|
-
levels:
|
|
6169
|
+
levels: import_zod41.z.array(import_zod41.z.enum(["critical", "error", "warning", "information", "verbose"])).max(5).optional(),
|
|
5764
6170
|
since_ms: epochMs.optional(),
|
|
5765
6171
|
/** (1.67) Only events whose source (provider) name contains this. */
|
|
5766
|
-
source:
|
|
5767
|
-
limit:
|
|
6172
|
+
source: import_zod41.z.string().min(1).max(256).optional(),
|
|
6173
|
+
limit: import_zod41.z.int().min(1).max(500).default(50)
|
|
5768
6174
|
});
|
|
5769
|
-
var WindowsEvent =
|
|
5770
|
-
id:
|
|
5771
|
-
level:
|
|
5772
|
-
source:
|
|
6175
|
+
var WindowsEvent = import_zod41.z.strictObject({
|
|
6176
|
+
id: import_zod41.z.int(),
|
|
6177
|
+
level: import_zod41.z.string(),
|
|
6178
|
+
source: import_zod41.z.string(),
|
|
5773
6179
|
at_ms: epochMs,
|
|
5774
|
-
message:
|
|
6180
|
+
message: import_zod41.z.string()
|
|
5775
6181
|
});
|
|
5776
|
-
var WindowsEventLogResult =
|
|
5777
|
-
var WindowsFeaturesParams =
|
|
5778
|
-
filter:
|
|
6182
|
+
var WindowsEventLogResult = import_zod41.z.strictObject({ log: import_zod41.z.string(), events: import_zod41.z.array(WindowsEvent) });
|
|
6183
|
+
var WindowsFeaturesParams = import_zod41.z.strictObject({
|
|
6184
|
+
filter: import_zod41.z.string().min(1).max(256).optional(),
|
|
5779
6185
|
/** (1.67) Only features that are on (Matrx Local's windows_features installed_only). */
|
|
5780
|
-
installed_only:
|
|
6186
|
+
installed_only: import_zod41.z.boolean().optional()
|
|
5781
6187
|
});
|
|
5782
|
-
var WindowsFeature =
|
|
5783
|
-
var WindowsFeaturesResult =
|
|
6188
|
+
var WindowsFeature = import_zod41.z.strictObject({ name: import_zod41.z.string(), state: import_zod41.z.string() });
|
|
6189
|
+
var WindowsFeaturesResult = import_zod41.z.strictObject({ features: import_zod41.z.array(WindowsFeature) });
|
|
5784
6190
|
|
|
5785
6191
|
// src/schema/schedule.ts
|
|
5786
|
-
var
|
|
5787
|
-
var OpRef =
|
|
5788
|
-
var ScheduleCreateParams =
|
|
5789
|
-
name:
|
|
6192
|
+
var import_zod42 = require("zod");
|
|
6193
|
+
var OpRef = import_zod42.z.string().min(3).max(128).regex(/^[a-z_]+(\.[a-z_]+)+$/);
|
|
6194
|
+
var ScheduleCreateParams = import_zod42.z.strictObject({
|
|
6195
|
+
name: import_zod42.z.string().min(1).max(200),
|
|
5790
6196
|
op: OpRef,
|
|
5791
6197
|
/** The op's params, exactly as the op takes them; checked when the task is created. */
|
|
5792
|
-
params:
|
|
5793
|
-
interval_s:
|
|
6198
|
+
params: import_zod42.z.record(import_zod42.z.string(), import_zod42.z.unknown()).default({}),
|
|
6199
|
+
interval_s: import_zod42.z.int().min(10).max(2592e3),
|
|
5794
6200
|
/** Stop after this many runs; absent: until canceled. */
|
|
5795
|
-
max_runs:
|
|
6201
|
+
max_runs: import_zod42.z.int().min(1).max(1e5).optional(),
|
|
5796
6202
|
/** Run once now, before the first interval. */
|
|
5797
|
-
run_now:
|
|
6203
|
+
run_now: import_zod42.z.boolean().default(false)
|
|
5798
6204
|
});
|
|
5799
|
-
var ScheduleRun =
|
|
6205
|
+
var ScheduleRun = import_zod42.z.strictObject({
|
|
5800
6206
|
at_ms: epochMs,
|
|
5801
|
-
ok:
|
|
6207
|
+
ok: import_zod42.z.boolean(),
|
|
5802
6208
|
elapsed_ms: nonNegInt,
|
|
5803
6209
|
/** The error's code and message when the run failed. */
|
|
5804
|
-
error:
|
|
6210
|
+
error: import_zod42.z.string().nullable(),
|
|
5805
6211
|
/** The start of the answer, as JSON (cut at 4 KiB). */
|
|
5806
|
-
result_preview:
|
|
6212
|
+
result_preview: import_zod42.z.string().nullable()
|
|
5807
6213
|
});
|
|
5808
|
-
var ScheduledTask =
|
|
5809
|
-
id:
|
|
5810
|
-
name:
|
|
5811
|
-
op:
|
|
5812
|
-
params:
|
|
6214
|
+
var ScheduledTask = import_zod42.z.strictObject({
|
|
6215
|
+
id: import_zod42.z.string(),
|
|
6216
|
+
name: import_zod42.z.string(),
|
|
6217
|
+
op: import_zod42.z.string(),
|
|
6218
|
+
params: import_zod42.z.record(import_zod42.z.string(), import_zod42.z.unknown()),
|
|
5813
6219
|
interval_s: nonNegInt,
|
|
5814
6220
|
max_runs: nonNegInt.nullable(),
|
|
5815
6221
|
runs: nonNegInt,
|
|
5816
6222
|
created_at_ms: epochMs,
|
|
5817
6223
|
next_run_at_ms: epochMs.nullable(),
|
|
5818
6224
|
/** active, done (ran max_runs), canceled. */
|
|
5819
|
-
state:
|
|
6225
|
+
state: import_zod42.z.enum(["active", "done", "cancelled"]),
|
|
5820
6226
|
/** The newest runs, newest first (at most 10). */
|
|
5821
|
-
recent:
|
|
6227
|
+
recent: import_zod42.z.array(ScheduleRun)
|
|
5822
6228
|
});
|
|
5823
|
-
var ScheduleCreateResult =
|
|
5824
|
-
var ScheduleListParams =
|
|
5825
|
-
var ScheduleListResult =
|
|
5826
|
-
var ScheduleCancelParams =
|
|
5827
|
-
var ScheduleCancelResult =
|
|
6229
|
+
var ScheduleCreateResult = import_zod42.z.strictObject({ task: ScheduledTask });
|
|
6230
|
+
var ScheduleListParams = import_zod42.z.strictObject({ include_finished: import_zod42.z.boolean().default(false) });
|
|
6231
|
+
var ScheduleListResult = import_zod42.z.strictObject({ tasks: import_zod42.z.array(ScheduledTask) });
|
|
6232
|
+
var ScheduleCancelParams = import_zod42.z.strictObject({ id: import_zod42.z.string().min(1).max(64) });
|
|
6233
|
+
var ScheduleCancelResult = import_zod42.z.strictObject({ task: ScheduledTask });
|
|
5828
6234
|
|
|
5829
6235
|
// src/schema/notes.ts
|
|
5830
|
-
var
|
|
5831
|
-
var NoteFolder =
|
|
5832
|
-
var NotePath =
|
|
5833
|
-
var NotesFoldersParams =
|
|
5834
|
-
var NotesFolder =
|
|
5835
|
-
var NotesFoldersResult =
|
|
6236
|
+
var import_zod43 = require("zod");
|
|
6237
|
+
var NoteFolder = import_zod43.z.string().min(1).max(512).regex(/^[^/\\:*?"<>|][^\\:*?"<>|]*$/);
|
|
6238
|
+
var NotePath = import_zod43.z.string().min(4).max(1024).regex(/^[^/\\:*?"<>|][^\\:*?"<>|]*\.md$/);
|
|
6239
|
+
var NotesFoldersParams = import_zod43.z.strictObject({});
|
|
6240
|
+
var NotesFolder = import_zod43.z.strictObject({ folder: import_zod43.z.string(), notes: nonNegInt });
|
|
6241
|
+
var NotesFoldersResult = import_zod43.z.strictObject({
|
|
5836
6242
|
/** The notes root on this computer. */
|
|
5837
|
-
root:
|
|
5838
|
-
folders:
|
|
6243
|
+
root: import_zod43.z.string(),
|
|
6244
|
+
folders: import_zod43.z.array(NotesFolder)
|
|
5839
6245
|
});
|
|
5840
|
-
var NotesListParams =
|
|
6246
|
+
var NotesListParams = import_zod43.z.strictObject({
|
|
5841
6247
|
folder: NoteFolder.optional(),
|
|
5842
|
-
limit:
|
|
6248
|
+
limit: import_zod43.z.int().min(1).max(2e3).default(500)
|
|
5843
6249
|
});
|
|
5844
|
-
var NoteEntry =
|
|
5845
|
-
path:
|
|
5846
|
-
label:
|
|
5847
|
-
folder:
|
|
6250
|
+
var NoteEntry = import_zod43.z.strictObject({
|
|
6251
|
+
path: import_zod43.z.string(),
|
|
6252
|
+
label: import_zod43.z.string(),
|
|
6253
|
+
folder: import_zod43.z.string(),
|
|
5848
6254
|
bytes: nonNegInt,
|
|
5849
6255
|
modified_at_ms: epochMs
|
|
5850
6256
|
});
|
|
5851
|
-
var NotesListResult =
|
|
5852
|
-
var NotesReadParams =
|
|
5853
|
-
var NotesReadResult =
|
|
5854
|
-
path:
|
|
5855
|
-
content:
|
|
6257
|
+
var NotesListResult = import_zod43.z.strictObject({ root: import_zod43.z.string(), notes: import_zod43.z.array(NoteEntry), total: nonNegInt });
|
|
6258
|
+
var NotesReadParams = import_zod43.z.strictObject({ path: NotePath });
|
|
6259
|
+
var NotesReadResult = import_zod43.z.strictObject({
|
|
6260
|
+
path: import_zod43.z.string(),
|
|
6261
|
+
content: import_zod43.z.string(),
|
|
5856
6262
|
bytes: nonNegInt,
|
|
5857
6263
|
modified_at_ms: epochMs,
|
|
5858
6264
|
/** SHA-256 of the content: pass it back as `if_hash` to write only over this version. */
|
|
5859
|
-
hash:
|
|
6265
|
+
hash: import_zod43.z.string()
|
|
5860
6266
|
});
|
|
5861
|
-
var NotesWriteParams =
|
|
6267
|
+
var NotesWriteParams = import_zod43.z.strictObject({
|
|
5862
6268
|
folder: NoteFolder.default("General"),
|
|
5863
6269
|
/** The note's name, without ".md". */
|
|
5864
|
-
label:
|
|
5865
|
-
content:
|
|
6270
|
+
label: import_zod43.z.string().min(1).max(200).regex(/^[^/\\:*?"<>|]+$/),
|
|
6271
|
+
content: import_zod43.z.string().max(10485760),
|
|
5866
6272
|
/** Write only when the note is still this version (notes.read's hash); a change since answers CONFLICT. */
|
|
5867
|
-
if_hash:
|
|
6273
|
+
if_hash: import_zod43.z.string().length(64).optional()
|
|
5868
6274
|
});
|
|
5869
|
-
var NotesWriteResult =
|
|
5870
|
-
var NotesSearchParams =
|
|
5871
|
-
query:
|
|
5872
|
-
limit:
|
|
6275
|
+
var NotesWriteResult = import_zod43.z.strictObject({ path: import_zod43.z.string(), bytes: nonNegInt, created: import_zod43.z.boolean(), hash: import_zod43.z.string() });
|
|
6276
|
+
var NotesSearchParams = import_zod43.z.strictObject({
|
|
6277
|
+
query: import_zod43.z.string().min(1).max(512),
|
|
6278
|
+
limit: import_zod43.z.int().min(1).max(200).default(50)
|
|
5873
6279
|
});
|
|
5874
|
-
var NotesMatch =
|
|
5875
|
-
path:
|
|
5876
|
-
label:
|
|
5877
|
-
folder:
|
|
6280
|
+
var NotesMatch = import_zod43.z.strictObject({
|
|
6281
|
+
path: import_zod43.z.string(),
|
|
6282
|
+
label: import_zod43.z.string(),
|
|
6283
|
+
folder: import_zod43.z.string(),
|
|
5878
6284
|
/** The matching lines (at most five), trimmed. */
|
|
5879
|
-
lines:
|
|
6285
|
+
lines: import_zod43.z.array(import_zod43.z.string())
|
|
5880
6286
|
});
|
|
5881
|
-
var NotesSearchResult =
|
|
6287
|
+
var NotesSearchResult = import_zod43.z.strictObject({ matches: import_zod43.z.array(NotesMatch), total: nonNegInt });
|
|
5882
6288
|
|
|
5883
6289
|
// src/schema/documents.ts
|
|
5884
|
-
var
|
|
6290
|
+
var import_zod44 = require("zod");
|
|
5885
6291
|
var DOCUMENTS_MAX_TEXT_CHARS = 1048576;
|
|
5886
|
-
var DocumentsPdfTextParams =
|
|
6292
|
+
var DocumentsPdfTextParams = import_zod44.z.strictObject({
|
|
5887
6293
|
path: AbsPath,
|
|
5888
6294
|
/** 1-based, inclusive. */
|
|
5889
|
-
first_page:
|
|
5890
|
-
last_page:
|
|
5891
|
-
max_chars:
|
|
6295
|
+
first_page: import_zod44.z.int().min(1).optional(),
|
|
6296
|
+
last_page: import_zod44.z.int().min(1).optional(),
|
|
6297
|
+
max_chars: import_zod44.z.int().min(1).max(DOCUMENTS_MAX_TEXT_CHARS).default(2e5)
|
|
5892
6298
|
});
|
|
5893
|
-
var DocumentsPdfPage =
|
|
5894
|
-
var DocumentsPdfTextResult =
|
|
6299
|
+
var DocumentsPdfPage = import_zod44.z.strictObject({ page: import_zod44.z.int().min(1), text: import_zod44.z.string() });
|
|
6300
|
+
var DocumentsPdfTextResult = import_zod44.z.strictObject({
|
|
5895
6301
|
pages: nonNegInt,
|
|
5896
6302
|
/** Each page read, in order (an image-only page has empty text: OCR it). */
|
|
5897
|
-
read:
|
|
5898
|
-
truncated:
|
|
5899
|
-
title:
|
|
5900
|
-
author:
|
|
6303
|
+
read: import_zod44.z.array(DocumentsPdfPage),
|
|
6304
|
+
truncated: import_zod44.z.boolean(),
|
|
6305
|
+
title: import_zod44.z.string().nullable(),
|
|
6306
|
+
author: import_zod44.z.string().nullable()
|
|
5901
6307
|
});
|
|
5902
|
-
var DocumentsOcrParams =
|
|
6308
|
+
var DocumentsOcrParams = import_zod44.z.strictObject({
|
|
5903
6309
|
path: AbsPath,
|
|
5904
6310
|
/** BCP-47 language hints ("en-US", "fr-FR"); absent: the OS's own choice. */
|
|
5905
|
-
languages:
|
|
6311
|
+
languages: import_zod44.z.array(import_zod44.z.string().min(2).max(16)).max(8).optional(),
|
|
5906
6312
|
/** Faster, less accurate. */
|
|
5907
|
-
fast:
|
|
6313
|
+
fast: import_zod44.z.boolean().default(false)
|
|
5908
6314
|
});
|
|
5909
|
-
var DocumentsOcrLine =
|
|
5910
|
-
text:
|
|
6315
|
+
var DocumentsOcrLine = import_zod44.z.strictObject({
|
|
6316
|
+
text: import_zod44.z.string(),
|
|
5911
6317
|
/** 0–1; null where the engine does not say. */
|
|
5912
|
-
confidence:
|
|
6318
|
+
confidence: import_zod44.z.number().min(0).max(1).nullable()
|
|
5913
6319
|
});
|
|
5914
|
-
var DocumentsOcrResult =
|
|
5915
|
-
text:
|
|
5916
|
-
lines:
|
|
5917
|
-
truncated:
|
|
6320
|
+
var DocumentsOcrResult = import_zod44.z.strictObject({
|
|
6321
|
+
text: import_zod44.z.string(),
|
|
6322
|
+
lines: import_zod44.z.array(DocumentsOcrLine),
|
|
6323
|
+
truncated: import_zod44.z.boolean(),
|
|
5918
6324
|
/** Which engine read it ("vision" on macOS, "windows-ocr", "tesseract"). */
|
|
5919
|
-
engine:
|
|
6325
|
+
engine: import_zod44.z.string()
|
|
5920
6326
|
});
|
|
5921
|
-
var DocumentsImageResizeParams =
|
|
6327
|
+
var DocumentsImageResizeParams = import_zod44.z.strictObject({
|
|
5922
6328
|
path: AbsPath,
|
|
5923
6329
|
/** Where to write it; absent: next to the original, "<name>-resized.<ext>". */
|
|
5924
6330
|
out_path: AbsPath.optional(),
|
|
5925
6331
|
/** The longest side, kept in proportion; absent: the size stays (a format change only). */
|
|
5926
|
-
max_size:
|
|
5927
|
-
format:
|
|
5928
|
-
overwrite:
|
|
6332
|
+
max_size: import_zod44.z.int().min(1).max(32768).optional(),
|
|
6333
|
+
format: import_zod44.z.enum(["png", "jpeg", "tiff", "heic", "bmp", "gif"]).optional(),
|
|
6334
|
+
overwrite: import_zod44.z.boolean().default(false)
|
|
5929
6335
|
});
|
|
5930
|
-
var DocumentsImageResizeResult =
|
|
5931
|
-
path:
|
|
6336
|
+
var DocumentsImageResizeResult = import_zod44.z.strictObject({
|
|
6337
|
+
path: import_zod44.z.string(),
|
|
5932
6338
|
width: nonNegInt,
|
|
5933
6339
|
height: nonNegInt,
|
|
5934
6340
|
bytes: nonNegInt
|
|
5935
6341
|
});
|
|
5936
|
-
var DocumentsParagraph =
|
|
5937
|
-
style:
|
|
5938
|
-
text:
|
|
6342
|
+
var DocumentsParagraph = import_zod44.z.strictObject({
|
|
6343
|
+
style: import_zod44.z.enum(["title", "heading1", "heading2", "heading3", "body", "bullet", "numbered", "quote", "code"]).default("body"),
|
|
6344
|
+
text: import_zod44.z.string().max(1e5)
|
|
5939
6345
|
});
|
|
5940
|
-
var DocumentsSheet =
|
|
5941
|
-
name:
|
|
6346
|
+
var DocumentsSheet = import_zod44.z.strictObject({
|
|
6347
|
+
name: import_zod44.z.string().min(1).max(31),
|
|
5942
6348
|
/** Rows of cells; the first row is the header when `header` is true. */
|
|
5943
|
-
rows:
|
|
5944
|
-
header:
|
|
6349
|
+
rows: import_zod44.z.array(import_zod44.z.array(import_zod44.z.union([import_zod44.z.string().max(32767), import_zod44.z.number(), import_zod44.z.boolean(), import_zod44.z.null()])).max(16384)).max(1e5),
|
|
6350
|
+
header: import_zod44.z.boolean().default(true)
|
|
5945
6351
|
});
|
|
5946
|
-
var DocumentsOfficeGenerateParams =
|
|
5947
|
-
kind:
|
|
6352
|
+
var DocumentsOfficeGenerateParams = import_zod44.z.strictObject({
|
|
6353
|
+
kind: import_zod44.z.enum(["docx", "xlsx"]),
|
|
5948
6354
|
path: AbsPath,
|
|
5949
|
-
title:
|
|
6355
|
+
title: import_zod44.z.string().max(1024).optional(),
|
|
5950
6356
|
/** docx: the document's paragraphs, in order. */
|
|
5951
|
-
paragraphs:
|
|
6357
|
+
paragraphs: import_zod44.z.array(DocumentsParagraph).max(5e4).optional(),
|
|
5952
6358
|
/** xlsx: the workbook's sheets, in order. */
|
|
5953
|
-
sheets:
|
|
5954
|
-
overwrite:
|
|
6359
|
+
sheets: import_zod44.z.array(DocumentsSheet).min(1).max(64).optional(),
|
|
6360
|
+
overwrite: import_zod44.z.boolean().default(false)
|
|
5955
6361
|
});
|
|
5956
|
-
var DocumentsOfficeGenerateResult =
|
|
5957
|
-
var EntitiesNerParams =
|
|
5958
|
-
text:
|
|
6362
|
+
var DocumentsOfficeGenerateResult = import_zod44.z.strictObject({ path: import_zod44.z.string(), bytes: nonNegInt });
|
|
6363
|
+
var EntitiesNerParams = import_zod44.z.strictObject({
|
|
6364
|
+
text: import_zod44.z.string().min(1).max(DOCUMENTS_MAX_TEXT_CHARS),
|
|
5959
6365
|
/** Which kinds to keep; absent: all three. */
|
|
5960
|
-
labels:
|
|
6366
|
+
labels: import_zod44.z.array(import_zod44.z.enum(["person", "place", "organization"])).min(1).max(3).optional()
|
|
5961
6367
|
});
|
|
5962
|
-
var EntitySpan =
|
|
5963
|
-
text:
|
|
5964
|
-
label:
|
|
6368
|
+
var EntitySpan = import_zod44.z.strictObject({
|
|
6369
|
+
text: import_zod44.z.string(),
|
|
6370
|
+
label: import_zod44.z.string(),
|
|
5965
6371
|
/** Character offsets into the text (UTF-16, as JavaScript counts). */
|
|
5966
6372
|
start: nonNegInt,
|
|
5967
6373
|
end: nonNegInt
|
|
5968
6374
|
});
|
|
5969
|
-
var EntitiesNerResult =
|
|
5970
|
-
var PiiKind =
|
|
5971
|
-
var EntitiesPiiParams =
|
|
5972
|
-
text:
|
|
5973
|
-
kinds:
|
|
6375
|
+
var EntitiesNerResult = import_zod44.z.strictObject({ entities: import_zod44.z.array(EntitySpan), engine: import_zod44.z.string() });
|
|
6376
|
+
var PiiKind = import_zod44.z.enum(["email", "phone", "credit_card", "us_ssn", "iban", "ip_address", "url", "api_key"]);
|
|
6377
|
+
var EntitiesPiiParams = import_zod44.z.strictObject({
|
|
6378
|
+
text: import_zod44.z.string().min(1).max(DOCUMENTS_MAX_TEXT_CHARS),
|
|
6379
|
+
kinds: import_zod44.z.array(PiiKind).min(1).max(8).optional(),
|
|
5974
6380
|
/** Also answer the text with each finding replaced by its kind ("[email]"). */
|
|
5975
|
-
redact:
|
|
6381
|
+
redact: import_zod44.z.boolean().default(false)
|
|
5976
6382
|
});
|
|
5977
|
-
var EntitiesPiiResult =
|
|
5978
|
-
findings:
|
|
5979
|
-
redacted:
|
|
6383
|
+
var EntitiesPiiResult = import_zod44.z.strictObject({
|
|
6384
|
+
findings: import_zod44.z.array(import_zod44.z.strictObject({ kind: PiiKind, text: import_zod44.z.string(), start: nonNegInt, end: nonNegInt })),
|
|
6385
|
+
redacted: import_zod44.z.string().nullable()
|
|
5980
6386
|
});
|
|
5981
6387
|
|
|
5982
6388
|
// src/schema/registry.ts
|
|
@@ -6088,6 +6494,14 @@ var OPS = {
|
|
|
6088
6494
|
"proc.kill": { params: ProcKillParams, result: ProcKillResult, kind: "unary", since: "1.3", errors: ["NOT_FOUND", "AUTH_FORBIDDEN", "PERMISSION_DENIED_OS", "INVALID_PARAMS", "INTERNAL"] },
|
|
6089
6495
|
"clipboard.read": { params: ClipboardReadParams, result: ClipboardReadResult, kind: "unary", since: "1.3", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
6090
6496
|
"clipboard.write": { params: ClipboardWriteParams, result: ClipboardWriteResult, kind: "unary", since: "1.3", errors: ["PLATFORM_UNSUPPORTED", "PAYLOAD_TOO_LARGE", "INTERNAL"] },
|
|
6497
|
+
// 1.83: Action needed — what agents on this computer are waiting on the person for.
|
|
6498
|
+
"action_needed.list": { params: ActionNeededListParams, result: ActionNeededListResult, kind: "unary", since: "1.83", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
6499
|
+
"action_needed.raise": { params: ActionNeededRaiseParams, result: ActionNeededRaiseResult, kind: "unary", since: "1.83", errors: ["INVALID_PARAMS", "RATE_LIMITED", "INTERNAL"] },
|
|
6500
|
+
"action_needed.get": { params: ActionNeededGetParams, result: ActionNeededGetResult, kind: "unary", since: "1.83", errors: ["INVALID_PARAMS", "NOT_FOUND", "INTERNAL"] },
|
|
6501
|
+
"action_needed.wait": { params: ActionNeededWaitParams, result: ActionNeededWaitResult, kind: "unary", since: "1.83", errors: ["INVALID_PARAMS", "NOT_FOUND", "CANCELLED", "INTERNAL"] },
|
|
6502
|
+
"action_needed.answer": { params: ActionNeededAnswerParams, result: ActionNeededAnswerResult, kind: "unary", since: "1.83", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
6503
|
+
"action_needed.cancel": { params: ActionNeededCancelParams, result: ActionNeededCancelResult, kind: "unary", since: "1.83", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
6504
|
+
"action_needed.dismiss": { params: ActionNeededDismissParams, result: ActionNeededDismissResult, kind: "unary", since: "1.83", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
6091
6505
|
"fs.watch.start": { params: FsWatchStartParams, result: FsWatchStartResult, kind: "unary", since: "1.4", errors: [...FS_ERR, "RATE_LIMITED"] },
|
|
6092
6506
|
"fs.watch.events": { params: FsWatchEventsParams, result: FsWatchEventsResult, kind: "unary", since: "1.4", errors: ["RESOURCE_GONE", "INVALID_PARAMS", "INTERNAL"] },
|
|
6093
6507
|
"fs.watch.stop": { params: FsWatchStopParams, result: FsWatchStopResult, kind: "unary", since: "1.4", errors: ["RESOURCE_GONE", "INVALID_PARAMS"] },
|
|
@@ -6133,6 +6547,9 @@ var OPS = {
|
|
|
6133
6547
|
// The device's error ledger (SPEC §3.12): every process's errors, grouped, delivered to ops.system_error.
|
|
6134
6548
|
"diag.errors.list": { params: DiagErrorsListParams, result: DiagErrorsListResult, kind: "unary", since: "1.20", errors: ["INTERNAL"] },
|
|
6135
6549
|
"diag.errors.report": { params: DiagErrorsReportParams, result: DiagErrorsReportResult, kind: "unary", since: "1.20", errors: ["INTERNAL"] },
|
|
6550
|
+
// 1.84: Computer › Activity, the live log (capped per-source buffers; diag.activity.lines carries what is new).
|
|
6551
|
+
"diag.activity.list": { params: DiagActivityListParams, result: DiagActivityListResult, kind: "unary", since: "1.84", errors: ["INTERNAL"] },
|
|
6552
|
+
"diag.activity.clear": { params: DiagActivityClearParams, result: DiagActivityClearResult, kind: "unary", since: "1.84", errors: ["INTERNAL"] },
|
|
6136
6553
|
// 1.21: what a window's sidebar draws (the Move-all grouping check).
|
|
6137
6554
|
"apps.windows.groups": { params: AppsWindowsGroupsParams, result: AppsWindowsGroupsResult, kind: "unary", since: "1.43", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
6138
6555
|
"apps.windows.shown": { params: AppsWindowsShownParams, result: AppsWindowsShownResult, kind: "unary", since: "1.21", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
@@ -6158,6 +6575,9 @@ var OPS = {
|
|
|
6158
6575
|
"coding.options.set": { params: CodingOptionsSetParams, result: CodingOptionsSetResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "INTERNAL"] },
|
|
6159
6576
|
// 1.56: "Continue on <account>" — the session moves to another account and its stopped turn is sent again, exactly once.
|
|
6160
6577
|
"coding.account.continue": { params: CodingAccountContinueParams, result: CodingAccountContinueResult, kind: "unary", since: "1.56", errors: ["INVALID_PARAMS", "NOT_FOUND", "RESOURCE_BUSY", "AUTH_FORBIDDEN", "INTERNAL"] },
|
|
6578
|
+
// 1.85: Code › the coding agents' own files (read only).
|
|
6579
|
+
"coding.assets.list": { params: CodingAssetsListParams, result: CodingAssetsListResult, kind: "unary", since: "1.85", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
6580
|
+
"coding.assets.get": { params: CodingAssetsGetParams, result: CodingAssetsGetResult, kind: "unary", since: "1.85", errors: ["INVALID_PARAMS", "NOT_FOUND", "INTERNAL"] },
|
|
6161
6581
|
"coding.agent.set": { params: CodingAgentSetParams, result: CodingAgentSetResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "AUTH_FORBIDDEN", "INTERNAL"] },
|
|
6162
6582
|
"coding.agents.access": { params: CodingAgentsAccessParams, result: CodingAgentsAccessResult, kind: "unary", since: "1.38", errors: ["INTERNAL"] },
|
|
6163
6583
|
"coding.titles.status": { params: CodingTitlesStatusParams, result: CodingTitlesStatusResult, kind: "unary", since: "1.38", errors: ["INTERNAL"] },
|
|
@@ -6287,10 +6707,12 @@ var EVENTS = {
|
|
|
6287
6707
|
"coding.changed": CodingChangedEvent,
|
|
6288
6708
|
"coding.watch_state": CodingWatchStateEvent,
|
|
6289
6709
|
"coding.item": CodingItemEvent,
|
|
6710
|
+
"action_needed.changed": ActionNeededChangedEvent,
|
|
6290
6711
|
"coding.gap": CodingGapEvent,
|
|
6291
6712
|
"relay.device_status": RelayDeviceStatusEvent,
|
|
6292
6713
|
"relay.auth_expiring": RelayAuthExpiringEvent,
|
|
6293
6714
|
"diag.errors.changed": DiagErrorsChangedEvent,
|
|
6715
|
+
"diag.activity.lines": DiagActivityLinesEvent,
|
|
6294
6716
|
"browser.invoke": BrowserInvokeEvent,
|
|
6295
6717
|
"browser.sessions_changed": BrowserSessionsChangedEvent,
|
|
6296
6718
|
"browser.progress": BrowserProgressEvent,
|
|
@@ -6338,9 +6760,58 @@ var SERVICES = {
|
|
|
6338
6760
|
"tools.web_runtime_install": { params: WebRuntimeParams, result: WebRuntimeState },
|
|
6339
6761
|
"tools.web_runtime_remove": { params: WebRuntimeParams, result: WebRuntimeState }
|
|
6340
6762
|
}
|
|
6763
|
+
},
|
|
6764
|
+
// (1.86) The on-device agent turn (matrx-desktop python/agent): first-use install, then the /ai listener.
|
|
6765
|
+
agent: {
|
|
6766
|
+
progress: AgentServiceProgress,
|
|
6767
|
+
ops: {
|
|
6768
|
+
"agent.status": { params: AgentStatusParams, result: AgentServiceState },
|
|
6769
|
+
"agent.install": { params: AgentInstallParams, result: AgentServiceState },
|
|
6770
|
+
"agent.start": { params: AgentStartParams, result: AgentServiceState }
|
|
6771
|
+
}
|
|
6341
6772
|
}
|
|
6342
6773
|
};
|
|
6343
6774
|
var NAMED_SCHEMAS = {
|
|
6775
|
+
AgentServiceStateName,
|
|
6776
|
+
AgentStatusParams,
|
|
6777
|
+
AgentInstallParams,
|
|
6778
|
+
AgentStartParams,
|
|
6779
|
+
AgentServiceState,
|
|
6780
|
+
AgentServiceProgress,
|
|
6781
|
+
AgentAssetTool,
|
|
6782
|
+
AgentAssetKind,
|
|
6783
|
+
AgentAssetOrigin,
|
|
6784
|
+
AgentAssetRow,
|
|
6785
|
+
CodingAssetsListParams,
|
|
6786
|
+
CodingAssetsListResult,
|
|
6787
|
+
AgentAssetLink,
|
|
6788
|
+
AgentAssetFact,
|
|
6789
|
+
AgentAssetCount,
|
|
6790
|
+
CodingAssetsGetParams,
|
|
6791
|
+
CodingAssetsGetResult,
|
|
6792
|
+
ActionNeededKind,
|
|
6793
|
+
ActionNeededStatus,
|
|
6794
|
+
ActionNeededChoice,
|
|
6795
|
+
ActionNeededRemedy,
|
|
6796
|
+
ActionNeededAnswer,
|
|
6797
|
+
ActionNeededItem,
|
|
6798
|
+
ActionNeededListParams,
|
|
6799
|
+
ActionNeededListResult,
|
|
6800
|
+
ActionNeededRaiseParams,
|
|
6801
|
+
ActionNeededRaiseResult,
|
|
6802
|
+
ActionNeededGetParams,
|
|
6803
|
+
ActionNeededGetResult,
|
|
6804
|
+
ActionNeededWaitParams,
|
|
6805
|
+
ActionNeededWaitResult,
|
|
6806
|
+
ActionNeededAnswerEntry,
|
|
6807
|
+
ActionNeededAnswerParams,
|
|
6808
|
+
ActionNeededAnswerOutcome,
|
|
6809
|
+
ActionNeededAnswerResult,
|
|
6810
|
+
ActionNeededCancelParams,
|
|
6811
|
+
ActionNeededCancelResult,
|
|
6812
|
+
ActionNeededDismissParams,
|
|
6813
|
+
ActionNeededDismissResult,
|
|
6814
|
+
ActionNeededChangedEvent,
|
|
6344
6815
|
ChatAppGroup,
|
|
6345
6816
|
ChatParent,
|
|
6346
6817
|
ChatTitleSync,
|
|
@@ -6774,6 +7245,17 @@ var NAMED_SCHEMAS = {
|
|
|
6774
7245
|
DiagErrorsReportParams,
|
|
6775
7246
|
DiagErrorsReportResult,
|
|
6776
7247
|
DiagErrorsChangedEvent,
|
|
7248
|
+
ActivitySource,
|
|
7249
|
+
ActivityLevel,
|
|
7250
|
+
ActivityHttp,
|
|
7251
|
+
ActivityTool,
|
|
7252
|
+
ActivityLine,
|
|
7253
|
+
ActivityDropped,
|
|
7254
|
+
DiagActivityListParams,
|
|
7255
|
+
DiagActivityListResult,
|
|
7256
|
+
DiagActivityClearParams,
|
|
7257
|
+
DiagActivityClearResult,
|
|
7258
|
+
DiagActivityLinesEvent,
|
|
6777
7259
|
FsWatchId,
|
|
6778
7260
|
FsWatchStartParams,
|
|
6779
7261
|
FsWatchStartResult,
|
|
@@ -7563,7 +8045,7 @@ function forPeer(op, part, value, version) {
|
|
|
7563
8045
|
var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
|
|
7564
8046
|
|
|
7565
8047
|
// src/contract.ts
|
|
7566
|
-
var CONTRACT_SHA256 = "
|
|
8048
|
+
var CONTRACT_SHA256 = "f2d7caf22aabba11530c3f2eb4d4341a58df82ac2c5d58e95bbde3f692865df5";
|
|
7567
8049
|
|
|
7568
8050
|
// src/close-policy.ts
|
|
7569
8051
|
var CLOSE_RULES = {
|
|
@@ -7619,6 +8101,7 @@ var TOOL_CATALOG = [
|
|
|
7619
8101
|
{ name: "desktop_apps", group: "os_control", state: "built", path: "device_op", ops: ["apps.list", "apps.open"], platforms: ALL, summary: "Installed apps; open or bring one forward" },
|
|
7620
8102
|
{ name: "desktop_system", group: "os_control", state: "built", path: "device_op", ops: ["sysinfo.get", "sysinfo.hardware", "system.open_url", "system.open_path", "system.open_settings", "system.notify"], platforms: ALL, summary: "System facts, open, notify" },
|
|
7621
8103
|
{ name: "desktop_clipboard", group: "os_control", state: "built", path: "device_op", ops: ["clipboard.read", "clipboard.write"], platforms: ALL, summary: "Read and write the clipboard's text" },
|
|
8104
|
+
{ name: "desktop_action_needed", group: "os_control", state: "built", path: "device_op", ops: ["action_needed.raise", "action_needed.wait", "action_needed.get", "action_needed.cancel", "action_needed.list"], platforms: ALL, summary: "Ask the person for an answer, a pick, an approval, a sign-in, a file or a permission; wait for or poll the answer" },
|
|
7622
8105
|
{ name: "desktop_screen", group: "os_control", state: "built", path: "device_op", ops: ["screen.list", "screen.capture"], platforms: ALL, summary: "Displays and screenshots" },
|
|
7623
8106
|
{ name: "desktop_browser", group: "os_control", state: "built", path: "device_op", ops: ["browser.sessions", "browser.call"], platforms: ALL, summary: "The person's own browser through the AI Matrx extension: tabs, read, screenshot, navigate, click, type" },
|
|
7624
8107
|
{ name: "desktop_window", group: "os_control", state: "built", path: "device_op", ops: ["window.list", "window.focus", "window.move", "window.minimize"], platforms: ALL, summary: "Find, focus and arrange windows" },
|
|
@@ -7642,7 +8125,7 @@ var TOOL_CATALOG = [
|
|
|
7642
8125
|
{ name: "desktop_schedule", group: "personal_automation", state: "built", path: "device_op", ops: ["schedule.create", "schedule.list", "schedule.cancel"], platforms: ALL, summary: "Run a tool's op on this computer on an interval; list and cancel" },
|
|
7643
8126
|
// 1.38, code from anywhere: the person's Claude Code and Codex sessions on this computer. Turning
|
|
7644
8127
|
// either off in Agents › Tools refuses its ops on every relay connection (the existing switch).
|
|
7645
|
-
{ name: "coding_sessions_read", group: "personal_automation", state: "built", path: "device_op", ops: ["coding.providers", "coding.sessions.list", "coding.discover", "coding.runs.list", "coding.history", "coding.transcript.read", "coding.item.full", "coding.activity", "coding.folders.recent", "coding.folders.check", "coding.agents.access", "coding.titles.status", "coding.prefs.list", "coding.recent.seen", "coding.search", "coding.transcript.raw", "coding.watch", "coding.session.watch"], platforms: ALL, summary: "Claude Code and Codex sessions: list, read live, search, download" },
|
|
8128
|
+
{ name: "coding_sessions_read", group: "personal_automation", state: "built", path: "device_op", ops: ["coding.providers", "coding.sessions.list", "coding.discover", "coding.runs.list", "coding.history", "coding.transcript.read", "coding.item.full", "coding.activity", "coding.folders.recent", "coding.folders.check", "coding.agents.access", "coding.titles.status", "coding.prefs.list", "coding.recent.seen", "coding.search", "coding.transcript.raw", "coding.watch", "coding.session.watch", "coding.assets.list", "coding.assets.get"], platforms: ALL, summary: "Claude Code and Codex sessions: list, read live, search, download; the agents' memories and instructions" },
|
|
7646
8129
|
{ name: "coding_sessions_drive", group: "personal_automation", state: "built", path: "device_op", ops: ["coding.start", "coding.takeover", "coding.send", "coding.stop", "coding.stop_elsewhere", "coding.options.set", "coding.account.continue", "coding.agent.set", "coding.folders.create", "coding.prefs.set", "coding.reconcile"], platforms: ALL, summary: "Claude Code and Codex sessions: start, send, stop, take over, rename" },
|
|
7647
8130
|
// ── 4. Documents, notes and entities (1.37: the core's `documents` and `notes` owners; desktop_web is the `tools` service) ──
|
|
7648
8131
|
{ name: "desktop_documents", group: "tools_service", state: "built", path: "device_op", ops: ["documents.pdf_text", "documents.ocr", "documents.image_resize", "documents.office_generate"], platforms: ALL, summary: "PDF text, OCR, images, Word and Excel files" },
|