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