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