@ai-matrx/desktop-protocol 0.21.91 → 0.21.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/dist/{chunk-server-7Q7L4DZ2.js → chunk-server-AANZ3QIC.js} +1356 -1309
- package/dist/chunk-server-AANZ3QIC.js.map +1 -0
- package/dist/{chunk-server-3GQSOBMI.js → chunk-server-FPYXJ5IT.js} +3 -3
- package/dist/{chunk-server-KY27EMK4.js → chunk-server-WSXKBBEB.js} +2 -2
- package/dist/chunk-server-WSXKBBEB.js.map +1 -0
- package/dist/{chunk-server-IN2FRJI2.js → chunk-server-YUJXCEFI.js} +2 -2
- package/dist/client.cjs +1369 -1320
- 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 +575 -528
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +144 -85
- package/dist/index.d.ts +144 -85
- package/dist/index.js +16 -4
- package/dist/index.js.map +1 -1
- package/dist/{models-x0kM5elk.d.cts → models-D7pVOe7f.d.cts} +243 -143
- package/dist/{models-x0kM5elk.d.ts → models-D7pVOe7f.d.ts} +243 -143
- package/generated/desktop-protocol.schema.json +153 -2
- package/package.json +2 -2
- package/dist/chunk-server-7Q7L4DZ2.js.map +0 -1
- package/dist/chunk-server-KY27EMK4.js.map +0 -1
- /package/dist/{chunk-server-3GQSOBMI.js.map → chunk-server-FPYXJ5IT.js.map} +0 -0
- /package/dist/{chunk-server-IN2FRJI2.js.map → chunk-server-YUJXCEFI.js.map} +0 -0
package/dist/client.cjs
CHANGED
|
@@ -147,7 +147,7 @@ var init_primitives = __esm({
|
|
|
147
147
|
import_zod = require("zod");
|
|
148
148
|
import_uuid = require("@ai-matrx/kit/uuid");
|
|
149
149
|
PROTOCOL_MAJOR = 1;
|
|
150
|
-
PROTOCOL_MINOR =
|
|
150
|
+
PROTOCOL_MINOR = 86;
|
|
151
151
|
PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
152
152
|
ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
153
153
|
RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -1183,7 +1183,7 @@ var init_service = __esm({
|
|
|
1183
1183
|
import_zod10 = require("zod");
|
|
1184
1184
|
init_errors();
|
|
1185
1185
|
init_primitives();
|
|
1186
|
-
ServiceName = import_zod10.z.enum(["ml", "coding", "tools"]);
|
|
1186
|
+
ServiceName = import_zod10.z.enum(["ml", "coding", "tools", "agent"]);
|
|
1187
1187
|
ContractHash = import_zod10.z.string().regex(/^[0-9a-f]{64}$/);
|
|
1188
1188
|
ServiceToken = import_zod10.z.string().regex(/^[A-Za-z0-9_-]{43}$/);
|
|
1189
1189
|
ServiceRequestId = u32;
|
|
@@ -3231,171 +3231,204 @@ var init_coding_assets = __esm({
|
|
|
3231
3231
|
}
|
|
3232
3232
|
});
|
|
3233
3233
|
|
|
3234
|
+
// src/schema/agent-service.ts
|
|
3235
|
+
var import_zod32, AgentServiceStateName, AgentStatusParams, AgentInstallParams, AgentStartParams, AgentServiceState, AgentServiceProgress;
|
|
3236
|
+
var init_agent_service = __esm({
|
|
3237
|
+
"src/schema/agent-service.ts"() {
|
|
3238
|
+
"use strict";
|
|
3239
|
+
import_zod32 = require("zod");
|
|
3240
|
+
init_primitives();
|
|
3241
|
+
AgentServiceStateName = import_zod32.z.enum(["not_installed", "installing", "installed", "listening", "failed"]);
|
|
3242
|
+
AgentStatusParams = import_zod32.z.strictObject({});
|
|
3243
|
+
AgentInstallParams = import_zod32.z.strictObject({});
|
|
3244
|
+
AgentStartParams = import_zod32.z.strictObject({
|
|
3245
|
+
/** The local model llama-server runs (models.llm.status's running id). */
|
|
3246
|
+
model: import_zod32.z.string().min(1).max(256),
|
|
3247
|
+
/** The core's localhost listener port: the model is reached through its /openai/v1 door. */
|
|
3248
|
+
listener_port: import_zod32.z.int().min(1).max(65535),
|
|
3249
|
+
/** The app's own key for that door (per launch; never logged). */
|
|
3250
|
+
key: import_zod32.z.string().min(16).max(256),
|
|
3251
|
+
/** Renderer origins allowed to call the listener (CORS). */
|
|
3252
|
+
allow_origins: import_zod32.z.array(import_zod32.z.string().min(1).max(512)).max(16)
|
|
3253
|
+
});
|
|
3254
|
+
AgentServiceState = import_zod32.z.strictObject({
|
|
3255
|
+
state: AgentServiceStateName,
|
|
3256
|
+
/** Why it failed, in the installer's or the service's words; null otherwise. */
|
|
3257
|
+
error: import_zod32.z.string().max(2e3).nullable(),
|
|
3258
|
+
/** The /ai listener's port on 127.0.0.1 while it listens; null otherwise. */
|
|
3259
|
+
port: import_zod32.z.int().min(1).max(65535).nullable(),
|
|
3260
|
+
/** The model the listener answers with while it listens; null otherwise. */
|
|
3261
|
+
model: import_zod32.z.string().max(256).nullable()
|
|
3262
|
+
});
|
|
3263
|
+
AgentServiceProgress = import_zod32.z.strictObject({ phase: import_zod32.z.enum(["installing", "compiling"]), done: nonNegInt, total: nonNegInt });
|
|
3264
|
+
}
|
|
3265
|
+
});
|
|
3266
|
+
|
|
3234
3267
|
// src/schema/coding-sessions.ts
|
|
3235
|
-
var
|
|
3268
|
+
var import_zod33, CodingProviderName, CodingRunStatus, SessionKey, IsoTime, LocalPath, CodingClientRequestId, ShortText, CodingRunUsage, CodingStartedBy, CodingRunRecord, CodingSessionAgentPart, CodingSessionAgent, CodingSessionRecord, CodingActiveElsewhere, CodingTitleSource, CodingDiscoveredChat, CodingTranscriptItem, CodingHistoryRecord, CodingQuotaWindow, CodingProviderProblem, CodingAccountUsage, CodingContinueTarget, CodingProviderAccount, CodingProviderBinary, CodingProviderStatus, CodingChatPreference, CodingTitleStatus, CodingRecentRow, CodingFolderCheck, CodingRecentFolder, CodingAgentSelectionParams, CodingSendResult, CodingProvidersParams, CodingProvidersResult, CodingSessionsListParams, CodingSessionsListResult, CodingDiscoverParams, CodingDiscoverResult, CodingRunsListParams, CodingRunsListResult, CodingHistoryParams, CodingHistoryResult, CodingTranscriptReadParams, CodingTranscriptReadResult, CodingItemFullParams, CodingItemFullResult, CodingActivityParams, CodingActivityResult, CodingFoldersRecentParams, CodingFoldersRecentResult, CodingFoldersCheckParams, CodingFoldersCheckResult, CodingFoldersCreateParams, CodingFoldersCreateResult, CodingStartParams, CodingStartResult, CodingTakeoverParams, CodingTakeoverResult, CodingSendParams, CodingStopParams, CodingStopResult, CodingStopElsewhereParams, CodingStopElsewhereResult, CodingOptionsSetParams, CodingOptionsSetResult, CodingAccountContinueParams, CodingAccountContinueResult, CodingAgentSetParams, CodingAgentSetResult, CodingAgentsAccessParams, CodingAgentsAccessResult, CodingTitlesStatusParams, CodingTitlesStatusResult, CodingPrefsListParams, CodingPrefsListResult, CodingPrefsSetParams, CodingPrefsSetResult, CodingRecentSeenParams, CodingRecentSeenResult, CodingSearchParams, CodingSearchHit, CodingSearchResult, CodingReconcileParams, CodingReconcileResult, CodingTranscriptRawParams, CodingTranscriptRawResult, CodingWatchParams, CodingWatchResult, CodingSessionWatchParams, CodingSessionWatchResult, CodingChangedEvent, CodingWatchStateEvent, CodingItemEvent, CodingGapEvent, SessionIdentifyParams, SessionIdentifyResult;
|
|
3236
3269
|
var init_coding_sessions = __esm({
|
|
3237
3270
|
"src/schema/coding-sessions.ts"() {
|
|
3238
3271
|
"use strict";
|
|
3239
|
-
|
|
3272
|
+
import_zod33 = require("zod");
|
|
3240
3273
|
init_primitives();
|
|
3241
|
-
CodingProviderName =
|
|
3242
|
-
CodingRunStatus =
|
|
3243
|
-
SessionKey =
|
|
3244
|
-
IsoTime =
|
|
3245
|
-
LocalPath =
|
|
3246
|
-
CodingClientRequestId =
|
|
3247
|
-
ShortText =
|
|
3248
|
-
CodingRunUsage =
|
|
3274
|
+
CodingProviderName = import_zod33.z.enum(["claude", "codex"]);
|
|
3275
|
+
CodingRunStatus = import_zod33.z.enum(["starting", "running", "completed", "stopped", "failed"]);
|
|
3276
|
+
SessionKey = import_zod33.z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/);
|
|
3277
|
+
IsoTime = import_zod33.z.string().min(10).max(40);
|
|
3278
|
+
LocalPath = import_zod33.z.string().min(1).max(4096);
|
|
3279
|
+
CodingClientRequestId = import_zod33.z.string().regex(/^[A-Za-z0-9_-]{8,64}$/);
|
|
3280
|
+
ShortText = import_zod33.z.string().max(500);
|
|
3281
|
+
CodingRunUsage = import_zod33.z.strictObject({
|
|
3249
3282
|
inputTokens: nonNegInt,
|
|
3250
3283
|
outputTokens: nonNegInt,
|
|
3251
3284
|
cachedInputTokens: nonNegInt
|
|
3252
3285
|
});
|
|
3253
|
-
CodingStartedBy =
|
|
3254
|
-
kind:
|
|
3255
|
-
label:
|
|
3286
|
+
CodingStartedBy = import_zod33.z.strictObject({
|
|
3287
|
+
kind: import_zod33.z.enum(["this_computer", "web", "phone", "agent", "other"]),
|
|
3288
|
+
label: import_zod33.z.string().min(1).max(80)
|
|
3256
3289
|
});
|
|
3257
|
-
CodingRunRecord =
|
|
3258
|
-
runId:
|
|
3290
|
+
CodingRunRecord = import_zod33.z.strictObject({
|
|
3291
|
+
runId: import_zod33.z.string().min(1).max(64),
|
|
3259
3292
|
sessionId: SessionKey,
|
|
3260
3293
|
provider: CodingProviderName,
|
|
3261
3294
|
cwd: LocalPath,
|
|
3262
|
-
prompt:
|
|
3263
|
-
model:
|
|
3295
|
+
prompt: import_zod33.z.string().max(1048576),
|
|
3296
|
+
model: import_zod33.z.string().max(200).nullable(),
|
|
3264
3297
|
status: CodingRunStatus,
|
|
3265
3298
|
startedAt: IsoTime,
|
|
3266
3299
|
endedAt: IsoTime.nullable(),
|
|
3267
|
-
error:
|
|
3300
|
+
error: import_zod33.z.string().max(65536).nullable(),
|
|
3268
3301
|
usage: CodingRunUsage.nullable(),
|
|
3269
|
-
costUsd:
|
|
3270
|
-
billing:
|
|
3302
|
+
costUsd: import_zod33.z.number().nullable(),
|
|
3303
|
+
billing: import_zod33.z.enum(["subscription", "api", "unknown"]).nullable(),
|
|
3271
3304
|
startedBy: CodingStartedBy.nullable()
|
|
3272
3305
|
});
|
|
3273
|
-
CodingSessionAgentPart =
|
|
3274
|
-
part:
|
|
3306
|
+
CodingSessionAgentPart = import_zod33.z.strictObject({
|
|
3307
|
+
part: import_zod33.z.enum(["instructions", "skills", "tools"]),
|
|
3275
3308
|
loaded: nonNegInt,
|
|
3276
3309
|
total: nonNegInt
|
|
3277
3310
|
});
|
|
3278
|
-
CodingSessionAgent =
|
|
3279
|
-
agentId:
|
|
3280
|
-
versionId:
|
|
3311
|
+
CodingSessionAgent = import_zod33.z.strictObject({
|
|
3312
|
+
agentId: import_zod33.z.string().min(1).max(64),
|
|
3313
|
+
versionId: import_zod33.z.string().max(64).nullable(),
|
|
3281
3314
|
versionNumber: nonNegInt.nullable(),
|
|
3282
|
-
name:
|
|
3283
|
-
definitionHash:
|
|
3284
|
-
loaded:
|
|
3285
|
-
unavailable:
|
|
3286
|
-
skills:
|
|
3287
|
-
tools:
|
|
3288
|
-
variables:
|
|
3289
|
-
blockDue:
|
|
3315
|
+
name: import_zod33.z.string().max(300),
|
|
3316
|
+
definitionHash: import_zod33.z.string().max(200),
|
|
3317
|
+
loaded: import_zod33.z.array(CodingSessionAgentPart).max(3),
|
|
3318
|
+
unavailable: import_zod33.z.array(import_zod33.z.strictObject({ kind: import_zod33.z.string().max(60), name: import_zod33.z.string().max(300), reason: ShortText })).max(500),
|
|
3319
|
+
skills: import_zod33.z.array(import_zod33.z.string().max(300)).max(500),
|
|
3320
|
+
tools: import_zod33.z.array(import_zod33.z.string().max(300)).max(500),
|
|
3321
|
+
variables: import_zod33.z.record(import_zod33.z.string().max(200), import_zod33.z.unknown()),
|
|
3322
|
+
blockDue: import_zod33.z.boolean(),
|
|
3290
3323
|
deliveredAt: IsoTime.nullable(),
|
|
3291
|
-
replaces:
|
|
3324
|
+
replaces: import_zod33.z.string().max(300).nullable()
|
|
3292
3325
|
});
|
|
3293
|
-
CodingSessionRecord =
|
|
3326
|
+
CodingSessionRecord = import_zod33.z.strictObject({
|
|
3294
3327
|
id: SessionKey,
|
|
3295
3328
|
provider: CodingProviderName,
|
|
3296
3329
|
providerSessionId: SessionKey.nullable(),
|
|
3297
3330
|
cwd: LocalPath,
|
|
3298
|
-
title:
|
|
3299
|
-
model:
|
|
3300
|
-
effort:
|
|
3301
|
-
origin:
|
|
3331
|
+
title: import_zod33.z.string().max(500),
|
|
3332
|
+
model: import_zod33.z.string().max(200).nullable(),
|
|
3333
|
+
effort: import_zod33.z.string().max(40).nullable(),
|
|
3334
|
+
origin: import_zod33.z.enum(["started", "takeover"]),
|
|
3302
3335
|
createdAt: IsoTime,
|
|
3303
3336
|
updatedAt: IsoTime,
|
|
3304
|
-
lastRunId:
|
|
3337
|
+
lastRunId: import_zod33.z.string().max(64).nullable(),
|
|
3305
3338
|
lastRunStatus: CodingRunStatus.nullable(),
|
|
3306
|
-
queued:
|
|
3339
|
+
queued: import_zod33.z.array(import_zod33.z.string().max(1048576)).max(100),
|
|
3307
3340
|
agent: CodingSessionAgent.nullable(),
|
|
3308
|
-
agentRemovedDue:
|
|
3341
|
+
agentRemovedDue: import_zod33.z.boolean(),
|
|
3309
3342
|
/**
|
|
3310
3343
|
* (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session
|
|
3311
3344
|
* runs as, or whose config directory holds the chat. Absent: the default sign-in.
|
|
3312
3345
|
*/
|
|
3313
|
-
accountId:
|
|
3346
|
+
accountId: import_zod33.z.string().min(1).max(64).optional()
|
|
3314
3347
|
});
|
|
3315
|
-
CodingActiveElsewhere =
|
|
3316
|
-
reason:
|
|
3348
|
+
CodingActiveElsewhere = import_zod33.z.strictObject({
|
|
3349
|
+
reason: import_zod33.z.enum(["process", "recent-write", "open-tool-call", "open"]),
|
|
3317
3350
|
message: ShortText,
|
|
3318
3351
|
/** The process driving it, when the evidence is a process (re-checked before any stop). */
|
|
3319
|
-
pid:
|
|
3352
|
+
pid: import_zod33.z.int().min(1).nullable()
|
|
3320
3353
|
});
|
|
3321
|
-
CodingTitleSource =
|
|
3322
|
-
CodingDiscoveredChat =
|
|
3354
|
+
CodingTitleSource = import_zod33.z.enum(["app", "app-remembered", "custom-title", "ai-title", "agent-name", "summary", "first-prompt", "last-prompt", "unknown"]);
|
|
3355
|
+
CodingDiscoveredChat = import_zod33.z.strictObject({
|
|
3323
3356
|
provider: CodingProviderName,
|
|
3324
3357
|
providerSessionId: SessionKey,
|
|
3325
3358
|
cwd: LocalPath.nullable(),
|
|
3326
|
-
title:
|
|
3359
|
+
title: import_zod33.z.string().max(500),
|
|
3327
3360
|
titleSource: CodingTitleSource.optional(),
|
|
3328
|
-
titlePending:
|
|
3329
|
-
archived:
|
|
3330
|
-
scheduled:
|
|
3331
|
-
unlisted:
|
|
3361
|
+
titlePending: import_zod33.z.boolean().optional(),
|
|
3362
|
+
archived: import_zod33.z.boolean().optional(),
|
|
3363
|
+
scheduled: import_zod33.z.boolean().optional(),
|
|
3364
|
+
unlisted: import_zod33.z.boolean().optional(),
|
|
3332
3365
|
unavailable: ShortText.nullable(),
|
|
3333
3366
|
updatedAt: IsoTime,
|
|
3334
|
-
source:
|
|
3367
|
+
source: import_zod33.z.string().max(60).nullable(),
|
|
3335
3368
|
activeElsewhere: CodingActiveElsewhere.nullable(),
|
|
3336
3369
|
/**
|
|
3337
3370
|
* (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session
|
|
3338
3371
|
* runs as, or whose config directory holds the chat. Absent: the default sign-in.
|
|
3339
3372
|
*/
|
|
3340
|
-
accountId:
|
|
3341
|
-
});
|
|
3342
|
-
CodingTranscriptItem =
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
kind:
|
|
3350
|
-
id:
|
|
3351
|
-
output:
|
|
3352
|
-
isError:
|
|
3373
|
+
accountId: import_zod33.z.string().min(1).max(64).optional()
|
|
3374
|
+
});
|
|
3375
|
+
CodingTranscriptItem = import_zod33.z.discriminatedUnion("kind", [
|
|
3376
|
+
import_zod33.z.strictObject({ kind: import_zod33.z.literal("user"), id: import_zod33.z.string().max(200), text: import_zod33.z.string(), at: IsoTime.nullable() }),
|
|
3377
|
+
import_zod33.z.strictObject({ kind: import_zod33.z.literal("text"), id: import_zod33.z.string().max(200), text: import_zod33.z.string() }),
|
|
3378
|
+
import_zod33.z.strictObject({ kind: import_zod33.z.literal("text-delta"), id: import_zod33.z.string().max(200), text: import_zod33.z.string() }),
|
|
3379
|
+
import_zod33.z.strictObject({ kind: import_zod33.z.literal("reasoning"), id: import_zod33.z.string().max(200), text: import_zod33.z.string() }),
|
|
3380
|
+
import_zod33.z.strictObject({ kind: import_zod33.z.literal("tool-call"), id: import_zod33.z.string().max(200), name: import_zod33.z.string().max(300), input: import_zod33.z.unknown() }),
|
|
3381
|
+
import_zod33.z.strictObject({
|
|
3382
|
+
kind: import_zod33.z.literal("tool-result"),
|
|
3383
|
+
id: import_zod33.z.string().max(200),
|
|
3384
|
+
output: import_zod33.z.string(),
|
|
3385
|
+
isError: import_zod33.z.boolean(),
|
|
3353
3386
|
/** The output's full size when only its start is here; `coding.item.full` reads the rest. */
|
|
3354
3387
|
fullBytes: nonNegInt.optional()
|
|
3355
3388
|
}),
|
|
3356
|
-
|
|
3357
|
-
|
|
3389
|
+
import_zod33.z.strictObject({ kind: import_zod33.z.literal("usage"), usage: CodingRunUsage, costUsd: import_zod33.z.number().nullable() }),
|
|
3390
|
+
import_zod33.z.strictObject({ kind: import_zod33.z.literal("notice"), id: import_zod33.z.string().max(200), level: import_zod33.z.enum(["info", "warning"]), text: import_zod33.z.string() }),
|
|
3358
3391
|
/** "Continue on <account>": the line across the transcript where the chat moved from `from`. */
|
|
3359
|
-
|
|
3360
|
-
|
|
3392
|
+
import_zod33.z.strictObject({ kind: import_zod33.z.literal("continued"), id: import_zod33.z.string().max(200), from: import_zod33.z.string().max(300), text: import_zod33.z.string(), at: IsoTime.nullable() }),
|
|
3393
|
+
import_zod33.z.strictObject({ kind: import_zod33.z.literal("error"), id: import_zod33.z.string().max(200), text: import_zod33.z.string() })
|
|
3361
3394
|
]);
|
|
3362
|
-
CodingHistoryRecord =
|
|
3363
|
-
items:
|
|
3395
|
+
CodingHistoryRecord = import_zod33.z.strictObject({
|
|
3396
|
+
items: import_zod33.z.array(CodingTranscriptItem),
|
|
3364
3397
|
/** Only the end of the chat is here; "Show earlier" reads more (a bigger `max_bytes`). */
|
|
3365
|
-
truncated:
|
|
3398
|
+
truncated: import_zod33.z.boolean(),
|
|
3366
3399
|
unavailable: ShortText.nullable(),
|
|
3367
3400
|
/** The last live item `seq` this read already contains; a watch applies only newer ones. */
|
|
3368
3401
|
seq: nonNegInt
|
|
3369
3402
|
});
|
|
3370
|
-
CodingQuotaWindow =
|
|
3371
|
-
label:
|
|
3372
|
-
usedPercent:
|
|
3373
|
-
resetsAt:
|
|
3374
|
-
valueLabel:
|
|
3403
|
+
CodingQuotaWindow = import_zod33.z.strictObject({
|
|
3404
|
+
label: import_zod33.z.string().max(120),
|
|
3405
|
+
usedPercent: import_zod33.z.number().nullable(),
|
|
3406
|
+
resetsAt: import_zod33.z.string().max(80).nullable(),
|
|
3407
|
+
valueLabel: import_zod33.z.string().max(120).nullable()
|
|
3375
3408
|
});
|
|
3376
|
-
CodingProviderProblem =
|
|
3377
|
-
kind:
|
|
3378
|
-
message:
|
|
3379
|
-
until:
|
|
3409
|
+
CodingProviderProblem = import_zod33.z.strictObject({
|
|
3410
|
+
kind: import_zod33.z.enum(["usage-limit", "signed-out"]),
|
|
3411
|
+
message: import_zod33.z.string().max(2e3),
|
|
3412
|
+
until: import_zod33.z.string().max(120).nullable(),
|
|
3380
3413
|
at: IsoTime
|
|
3381
3414
|
});
|
|
3382
|
-
CodingAccountUsage =
|
|
3383
|
-
windows:
|
|
3415
|
+
CodingAccountUsage = import_zod33.z.strictObject({
|
|
3416
|
+
windows: import_zod33.z.array(CodingQuotaWindow).max(20),
|
|
3384
3417
|
/** The provider's own status word ("allowed", "allowed_warning", "rejected"...), when it gives one. */
|
|
3385
|
-
status:
|
|
3418
|
+
status: import_zod33.z.string().max(60).nullable(),
|
|
3386
3419
|
/** When a rejected status lifts (ISO), when the provider says. */
|
|
3387
|
-
resetsAt:
|
|
3420
|
+
resetsAt: import_zod33.z.string().max(80).nullable(),
|
|
3388
3421
|
at: IsoTime
|
|
3389
3422
|
});
|
|
3390
|
-
CodingContinueTarget =
|
|
3391
|
-
accountId:
|
|
3392
|
-
label:
|
|
3423
|
+
CodingContinueTarget = import_zod33.z.strictObject({
|
|
3424
|
+
accountId: import_zod33.z.string().min(1).max(64).nullable(),
|
|
3425
|
+
label: import_zod33.z.string().max(200)
|
|
3393
3426
|
});
|
|
3394
|
-
CodingProviderAccount =
|
|
3395
|
-
id:
|
|
3396
|
-
label:
|
|
3427
|
+
CodingProviderAccount = import_zod33.z.strictObject({
|
|
3428
|
+
id: import_zod33.z.string().min(1).max(64),
|
|
3429
|
+
label: import_zod33.z.string().max(200),
|
|
3397
3430
|
/** (1.57) No known usage limit or expired sign-in on this account. Absent: not read. */
|
|
3398
|
-
ready:
|
|
3431
|
+
ready: import_zod33.z.boolean().optional(),
|
|
3399
3432
|
lastProblem: CodingProviderProblem.optional(),
|
|
3400
3433
|
problem: ShortText.optional(),
|
|
3401
3434
|
fix: ShortText.optional(),
|
|
@@ -3404,43 +3437,43 @@ var init_coding_sessions = __esm({
|
|
|
3404
3437
|
/** (1.57) This account is limited and that other one is not: "Continue on <label>". */
|
|
3405
3438
|
continueOn: CodingContinueTarget.optional()
|
|
3406
3439
|
});
|
|
3407
|
-
CodingProviderBinary =
|
|
3440
|
+
CodingProviderBinary = import_zod33.z.strictObject({
|
|
3408
3441
|
path: LocalPath,
|
|
3409
|
-
version:
|
|
3410
|
-
source:
|
|
3411
|
-
sourceLabel:
|
|
3412
|
-
newer:
|
|
3442
|
+
version: import_zod33.z.string().max(80).nullable(),
|
|
3443
|
+
source: import_zod33.z.enum(["desktop-app", "path", "npm-global", "configured"]),
|
|
3444
|
+
sourceLabel: import_zod33.z.string().max(120),
|
|
3445
|
+
newer: import_zod33.z.strictObject({ path: LocalPath, version: import_zod33.z.string().max(80), sourceLabel: import_zod33.z.string().max(120) }).nullable()
|
|
3413
3446
|
});
|
|
3414
|
-
CodingProviderStatus =
|
|
3447
|
+
CodingProviderStatus = import_zod33.z.strictObject({
|
|
3415
3448
|
provider: CodingProviderName,
|
|
3416
|
-
label:
|
|
3417
|
-
installed:
|
|
3418
|
-
version:
|
|
3419
|
-
loggedIn:
|
|
3420
|
-
billing:
|
|
3421
|
-
plan:
|
|
3422
|
-
account:
|
|
3449
|
+
label: import_zod33.z.string().max(60),
|
|
3450
|
+
installed: import_zod33.z.boolean(),
|
|
3451
|
+
version: import_zod33.z.string().max(80).nullable(),
|
|
3452
|
+
loggedIn: import_zod33.z.boolean(),
|
|
3453
|
+
billing: import_zod33.z.enum(["subscription", "api", "unknown"]),
|
|
3454
|
+
plan: import_zod33.z.string().max(80).nullable(),
|
|
3455
|
+
account: import_zod33.z.string().max(320).nullable(),
|
|
3423
3456
|
problem: ShortText.nullable(),
|
|
3424
3457
|
fix: ShortText.nullable(),
|
|
3425
|
-
ready:
|
|
3458
|
+
ready: import_zod33.z.boolean(),
|
|
3426
3459
|
lastProblem: CodingProviderProblem.nullable(),
|
|
3427
|
-
quota:
|
|
3428
|
-
models:
|
|
3429
|
-
efforts:
|
|
3460
|
+
quota: import_zod33.z.array(CodingQuotaWindow).max(20),
|
|
3461
|
+
models: import_zod33.z.array(import_zod33.z.strictObject({ id: import_zod33.z.string().max(200), label: import_zod33.z.string().max(200) })).max(200),
|
|
3462
|
+
efforts: import_zod33.z.array(import_zod33.z.string().max(40)).max(20),
|
|
3430
3463
|
/**
|
|
3431
3464
|
* Where the default model came from: the app's own settings file, the account (1.54: the signed-in
|
|
3432
3465
|
* account's default, e.g. Codex's), or the driver's built-in pick. A peer older than 1.54 is sent
|
|
3433
3466
|
* "driver" for "account" (its enum does not know the value).
|
|
3434
3467
|
*/
|
|
3435
|
-
defaultModel:
|
|
3436
|
-
defaultEffort:
|
|
3468
|
+
defaultModel: import_zod33.z.strictObject({ id: import_zod33.z.string().max(200), source: import_zod33.z.enum(["settings", "driver", "account"]) }).nullable(),
|
|
3469
|
+
defaultEffort: import_zod33.z.string().max(40).nullable(),
|
|
3437
3470
|
binary: CodingProviderBinary.nullable(),
|
|
3438
3471
|
/**
|
|
3439
3472
|
* (1.53) The person's other accounts for this app on the computer (Matrx 2's Accounts) that a run
|
|
3440
3473
|
* can use, as the computer's engine lists them; New session offers them beside the default sign-in.
|
|
3441
3474
|
* Absent: only the default sign-in (or a computer older than 1.53).
|
|
3442
3475
|
*/
|
|
3443
|
-
accounts:
|
|
3476
|
+
accounts: import_zod33.z.array(CodingProviderAccount).max(100).optional(),
|
|
3444
3477
|
/** (1.53) The computer tried to list `accounts` and could not: a short sentence the form shows with a retry. */
|
|
3445
3478
|
accountsProblem: ShortText.optional(),
|
|
3446
3479
|
/** (1.57) The default sign-in's usage as last seen. Absent: never seen ("No usage data yet"). */
|
|
@@ -3448,257 +3481,257 @@ var init_coding_sessions = __esm({
|
|
|
3448
3481
|
/** (1.57) The default sign-in is limited and this other account is not: "Continue on <label>". */
|
|
3449
3482
|
continueOn: CodingContinueTarget.optional()
|
|
3450
3483
|
});
|
|
3451
|
-
CodingChatPreference =
|
|
3452
|
-
title:
|
|
3453
|
-
pinned:
|
|
3454
|
-
hidden:
|
|
3484
|
+
CodingChatPreference = import_zod33.z.strictObject({
|
|
3485
|
+
title: import_zod33.z.string().max(500).nullable(),
|
|
3486
|
+
pinned: import_zod33.z.boolean(),
|
|
3487
|
+
hidden: import_zod33.z.boolean(),
|
|
3455
3488
|
/** When the person last had this chat open on any screen of this computer (the "New output" dot). */
|
|
3456
3489
|
lastSeenAt: IsoTime.nullable(),
|
|
3457
3490
|
updatedAt: IsoTime.nullable()
|
|
3458
3491
|
});
|
|
3459
|
-
CodingTitleStatus =
|
|
3460
|
-
owner:
|
|
3461
|
-
pending:
|
|
3492
|
+
CodingTitleStatus = import_zod33.z.strictObject({
|
|
3493
|
+
owner: import_zod33.z.boolean(),
|
|
3494
|
+
pending: import_zod33.z.boolean(),
|
|
3462
3495
|
problem: ShortText.nullable(),
|
|
3463
3496
|
renames: ShortText.nullable()
|
|
3464
3497
|
});
|
|
3465
|
-
CodingRecentRow =
|
|
3466
|
-
target:
|
|
3467
|
-
title:
|
|
3498
|
+
CodingRecentRow = import_zod33.z.strictObject({
|
|
3499
|
+
target: import_zod33.z.string().min(3).max(200),
|
|
3500
|
+
title: import_zod33.z.string().max(500),
|
|
3468
3501
|
provider: CodingProviderName,
|
|
3469
3502
|
sessionId: SessionKey.nullable(),
|
|
3470
3503
|
providerSessionId: SessionKey.nullable(),
|
|
3471
3504
|
cwd: LocalPath.nullable(),
|
|
3472
3505
|
updatedAt: IsoTime,
|
|
3473
|
-
state:
|
|
3474
|
-
stateLabel:
|
|
3475
|
-
pinned:
|
|
3506
|
+
state: import_zod33.z.enum(["running", "needs_attention", "new_output", "elsewhere", "idle"]),
|
|
3507
|
+
stateLabel: import_zod33.z.string().max(120).nullable(),
|
|
3508
|
+
pinned: import_zod33.z.boolean(),
|
|
3476
3509
|
startedBy: CodingStartedBy.nullable(),
|
|
3477
3510
|
/**
|
|
3478
3511
|
* (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session
|
|
3479
3512
|
* runs as, or whose config directory holds the chat. Absent: the default sign-in.
|
|
3480
3513
|
*/
|
|
3481
|
-
accountId:
|
|
3514
|
+
accountId: import_zod33.z.string().min(1).max(64).optional()
|
|
3482
3515
|
});
|
|
3483
|
-
CodingFolderCheck =
|
|
3484
|
-
path:
|
|
3485
|
-
exists:
|
|
3486
|
-
isDirectory:
|
|
3516
|
+
CodingFolderCheck = import_zod33.z.strictObject({
|
|
3517
|
+
path: import_zod33.z.string().max(4096),
|
|
3518
|
+
exists: import_zod33.z.boolean(),
|
|
3519
|
+
isDirectory: import_zod33.z.boolean()
|
|
3487
3520
|
});
|
|
3488
|
-
CodingRecentFolder =
|
|
3489
|
-
CodingAgentSelectionParams =
|
|
3490
|
-
agent_id:
|
|
3491
|
-
version_id:
|
|
3492
|
-
variables:
|
|
3521
|
+
CodingRecentFolder = import_zod33.z.strictObject({ path: LocalPath, lastUsedAt: IsoTime, exists: import_zod33.z.boolean() });
|
|
3522
|
+
CodingAgentSelectionParams = import_zod33.z.strictObject({
|
|
3523
|
+
agent_id: import_zod33.z.string().min(1).max(64),
|
|
3524
|
+
version_id: import_zod33.z.string().min(1).max(64).optional(),
|
|
3525
|
+
variables: import_zod33.z.record(import_zod33.z.string().max(200), import_zod33.z.unknown()).optional()
|
|
3493
3526
|
});
|
|
3494
|
-
CodingSendResult =
|
|
3527
|
+
CodingSendResult = import_zod33.z.strictObject({
|
|
3495
3528
|
session: CodingSessionRecord,
|
|
3496
3529
|
run: CodingRunRecord.nullable(),
|
|
3497
3530
|
/** The prompt waits behind a live run (it shows as a queued bubble). */
|
|
3498
|
-
queued:
|
|
3531
|
+
queued: import_zod33.z.boolean()
|
|
3499
3532
|
});
|
|
3500
|
-
CodingProvidersParams =
|
|
3501
|
-
CodingProvidersResult =
|
|
3502
|
-
CodingSessionsListParams =
|
|
3503
|
-
CodingSessionsListResult =
|
|
3504
|
-
sessions:
|
|
3533
|
+
CodingProvidersParams = import_zod33.z.strictObject({});
|
|
3534
|
+
CodingProvidersResult = import_zod33.z.strictObject({ providers: import_zod33.z.array(CodingProviderStatus).max(4) });
|
|
3535
|
+
CodingSessionsListParams = import_zod33.z.strictObject({});
|
|
3536
|
+
CodingSessionsListResult = import_zod33.z.strictObject({
|
|
3537
|
+
sessions: import_zod33.z.array(CodingSessionRecord),
|
|
3505
3538
|
/** The latest run of each session, by session id. */
|
|
3506
|
-
runs:
|
|
3507
|
-
recent:
|
|
3539
|
+
runs: import_zod33.z.record(import_zod33.z.string().max(128), CodingRunRecord),
|
|
3540
|
+
recent: import_zod33.z.array(CodingRecentRow),
|
|
3508
3541
|
title_status: CodingTitleStatus
|
|
3509
3542
|
});
|
|
3510
|
-
CodingDiscoverParams =
|
|
3511
|
-
CodingDiscoverResult =
|
|
3512
|
-
CodingRunsListParams =
|
|
3513
|
-
CodingRunsListResult =
|
|
3514
|
-
CodingHistoryParams =
|
|
3543
|
+
CodingDiscoverParams = import_zod33.z.strictObject({ limit: import_zod33.z.int().min(1).max(1e3).optional() });
|
|
3544
|
+
CodingDiscoverResult = import_zod33.z.strictObject({ chats: import_zod33.z.array(CodingDiscoveredChat) });
|
|
3545
|
+
CodingRunsListParams = import_zod33.z.strictObject({ session_id: SessionKey });
|
|
3546
|
+
CodingRunsListResult = import_zod33.z.strictObject({ runs: import_zod33.z.array(CodingRunRecord) });
|
|
3547
|
+
CodingHistoryParams = import_zod33.z.strictObject({ session_id: SessionKey, max_bytes: import_zod33.z.int().min(1024).max(209715200).optional() });
|
|
3515
3548
|
CodingHistoryResult = CodingHistoryRecord;
|
|
3516
|
-
CodingTranscriptReadParams =
|
|
3549
|
+
CodingTranscriptReadParams = import_zod33.z.strictObject({
|
|
3517
3550
|
provider: CodingProviderName,
|
|
3518
3551
|
provider_session_id: SessionKey,
|
|
3519
|
-
max_bytes:
|
|
3552
|
+
max_bytes: import_zod33.z.int().min(1024).max(209715200).optional()
|
|
3520
3553
|
});
|
|
3521
3554
|
CodingTranscriptReadResult = CodingHistoryRecord;
|
|
3522
|
-
CodingItemFullParams =
|
|
3555
|
+
CodingItemFullParams = import_zod33.z.strictObject({
|
|
3523
3556
|
provider: CodingProviderName,
|
|
3524
3557
|
provider_session_id: SessionKey,
|
|
3525
|
-
item_id:
|
|
3526
|
-
});
|
|
3527
|
-
CodingItemFullResult =
|
|
3528
|
-
CodingActivityParams =
|
|
3529
|
-
CodingActivityResult =
|
|
3530
|
-
CodingFoldersRecentParams =
|
|
3531
|
-
CodingFoldersRecentResult =
|
|
3532
|
-
CodingFoldersCheckParams =
|
|
3558
|
+
item_id: import_zod33.z.string().min(1).max(200)
|
|
3559
|
+
});
|
|
3560
|
+
CodingItemFullResult = import_zod33.z.strictObject({ output: import_zod33.z.string(), bytes: nonNegInt });
|
|
3561
|
+
CodingActivityParams = import_zod33.z.strictObject({ provider: CodingProviderName, provider_session_id: SessionKey });
|
|
3562
|
+
CodingActivityResult = import_zod33.z.strictObject({ active: CodingActiveElsewhere.nullable() });
|
|
3563
|
+
CodingFoldersRecentParams = import_zod33.z.strictObject({});
|
|
3564
|
+
CodingFoldersRecentResult = import_zod33.z.strictObject({ folders: import_zod33.z.array(CodingRecentFolder).max(100) });
|
|
3565
|
+
CodingFoldersCheckParams = import_zod33.z.strictObject({ path: import_zod33.z.string().min(1).max(4096) });
|
|
3533
3566
|
CodingFoldersCheckResult = CodingFolderCheck;
|
|
3534
|
-
CodingFoldersCreateParams =
|
|
3567
|
+
CodingFoldersCreateParams = import_zod33.z.strictObject({ path: import_zod33.z.string().min(1).max(4096) });
|
|
3535
3568
|
CodingFoldersCreateResult = CodingFolderCheck;
|
|
3536
|
-
CodingStartParams =
|
|
3569
|
+
CodingStartParams = import_zod33.z.strictObject({
|
|
3537
3570
|
provider: CodingProviderName,
|
|
3538
|
-
cwd:
|
|
3539
|
-
prompt:
|
|
3540
|
-
model:
|
|
3541
|
-
effort:
|
|
3571
|
+
cwd: import_zod33.z.string().min(1).max(4096),
|
|
3572
|
+
prompt: import_zod33.z.string().min(1).max(1048576),
|
|
3573
|
+
model: import_zod33.z.string().min(1).max(200).optional(),
|
|
3574
|
+
effort: import_zod33.z.string().min(1).max(40).optional(),
|
|
3542
3575
|
agent: CodingAgentSelectionParams.optional(),
|
|
3543
3576
|
/** One of the person's coding accounts on this computer (Accounts); absent = the default login. */
|
|
3544
|
-
account_profile_id:
|
|
3577
|
+
account_profile_id: import_zod33.z.string().min(1).max(64).optional(),
|
|
3545
3578
|
client_request_id: CodingClientRequestId
|
|
3546
3579
|
});
|
|
3547
3580
|
CodingStartResult = CodingSendResult;
|
|
3548
|
-
CodingTakeoverParams =
|
|
3581
|
+
CodingTakeoverParams = import_zod33.z.strictObject({
|
|
3549
3582
|
provider: CodingProviderName,
|
|
3550
3583
|
provider_session_id: SessionKey,
|
|
3551
|
-
cwd:
|
|
3552
|
-
title:
|
|
3584
|
+
cwd: import_zod33.z.string().min(1).max(4096),
|
|
3585
|
+
title: import_zod33.z.string().max(500).optional(),
|
|
3553
3586
|
agent: CodingAgentSelectionParams.optional(),
|
|
3554
|
-
confirm_elsewhere:
|
|
3587
|
+
confirm_elsewhere: import_zod33.z.boolean().optional()
|
|
3555
3588
|
});
|
|
3556
|
-
CodingTakeoverResult =
|
|
3557
|
-
CodingSendParams =
|
|
3589
|
+
CodingTakeoverResult = import_zod33.z.strictObject({ session: CodingSessionRecord });
|
|
3590
|
+
CodingSendParams = import_zod33.z.strictObject({
|
|
3558
3591
|
session_id: SessionKey,
|
|
3559
|
-
prompt:
|
|
3592
|
+
prompt: import_zod33.z.string().min(1).max(1048576),
|
|
3560
3593
|
client_request_id: CodingClientRequestId
|
|
3561
3594
|
});
|
|
3562
|
-
CodingStopParams =
|
|
3563
|
-
CodingStopResult =
|
|
3564
|
-
CodingStopElsewhereParams =
|
|
3595
|
+
CodingStopParams = import_zod33.z.strictObject({ run_id: import_zod33.z.string().min(1).max(64) });
|
|
3596
|
+
CodingStopResult = import_zod33.z.strictObject({ run: CodingRunRecord.nullable() });
|
|
3597
|
+
CodingStopElsewhereParams = import_zod33.z.strictObject({
|
|
3565
3598
|
provider: CodingProviderName,
|
|
3566
3599
|
provider_session_id: SessionKey,
|
|
3567
|
-
pid:
|
|
3600
|
+
pid: import_zod33.z.int().min(1)
|
|
3568
3601
|
});
|
|
3569
|
-
CodingStopElsewhereResult =
|
|
3570
|
-
CodingOptionsSetParams =
|
|
3602
|
+
CodingStopElsewhereResult = import_zod33.z.strictObject({ stopped: import_zod33.z.boolean(), message: ShortText });
|
|
3603
|
+
CodingOptionsSetParams = import_zod33.z.strictObject({
|
|
3571
3604
|
session_id: SessionKey,
|
|
3572
|
-
model:
|
|
3573
|
-
effort:
|
|
3605
|
+
model: import_zod33.z.string().max(200).optional(),
|
|
3606
|
+
effort: import_zod33.z.string().max(40).optional()
|
|
3574
3607
|
});
|
|
3575
|
-
CodingOptionsSetResult =
|
|
3576
|
-
CodingAccountContinueParams =
|
|
3608
|
+
CodingOptionsSetResult = import_zod33.z.strictObject({ session: CodingSessionRecord });
|
|
3609
|
+
CodingAccountContinueParams = import_zod33.z.strictObject({
|
|
3577
3610
|
session_id: SessionKey,
|
|
3578
|
-
account_profile_id:
|
|
3611
|
+
account_profile_id: import_zod33.z.string().min(1).max(64).optional(),
|
|
3579
3612
|
client_request_id: CodingClientRequestId
|
|
3580
3613
|
});
|
|
3581
|
-
CodingAccountContinueResult =
|
|
3614
|
+
CodingAccountContinueResult = import_zod33.z.strictObject({
|
|
3582
3615
|
session: CodingSessionRecord,
|
|
3583
3616
|
run: CodingRunRecord.nullable(),
|
|
3584
|
-
how:
|
|
3585
|
-
});
|
|
3586
|
-
CodingAgentSetParams =
|
|
3587
|
-
CodingAgentSetResult =
|
|
3588
|
-
CodingAgentsAccessParams =
|
|
3589
|
-
CodingAgentsAccessResult =
|
|
3590
|
-
signedIn:
|
|
3591
|
-
userId:
|
|
3592
|
-
organizationId:
|
|
3593
|
-
configured:
|
|
3594
|
-
});
|
|
3595
|
-
CodingTitlesStatusParams =
|
|
3617
|
+
how: import_zod33.z.enum(["moved", "fresh"])
|
|
3618
|
+
});
|
|
3619
|
+
CodingAgentSetParams = import_zod33.z.strictObject({ session_id: SessionKey, agent: CodingAgentSelectionParams.optional() });
|
|
3620
|
+
CodingAgentSetResult = import_zod33.z.strictObject({ session: CodingSessionRecord });
|
|
3621
|
+
CodingAgentsAccessParams = import_zod33.z.strictObject({});
|
|
3622
|
+
CodingAgentsAccessResult = import_zod33.z.strictObject({
|
|
3623
|
+
signedIn: import_zod33.z.boolean(),
|
|
3624
|
+
userId: import_zod33.z.string().max(64).nullable(),
|
|
3625
|
+
organizationId: import_zod33.z.string().max(64).nullable(),
|
|
3626
|
+
configured: import_zod33.z.boolean()
|
|
3627
|
+
});
|
|
3628
|
+
CodingTitlesStatusParams = import_zod33.z.strictObject({});
|
|
3596
3629
|
CodingTitlesStatusResult = CodingTitleStatus;
|
|
3597
|
-
CodingPrefsListParams =
|
|
3598
|
-
CodingPrefsListResult =
|
|
3599
|
-
CodingPrefsSetParams =
|
|
3600
|
-
key:
|
|
3601
|
-
title:
|
|
3602
|
-
clear_title:
|
|
3603
|
-
pinned:
|
|
3604
|
-
hidden:
|
|
3630
|
+
CodingPrefsListParams = import_zod33.z.strictObject({});
|
|
3631
|
+
CodingPrefsListResult = import_zod33.z.strictObject({ preferences: import_zod33.z.record(import_zod33.z.string().max(200), CodingChatPreference) });
|
|
3632
|
+
CodingPrefsSetParams = import_zod33.z.strictObject({
|
|
3633
|
+
key: import_zod33.z.string().min(1).max(200),
|
|
3634
|
+
title: import_zod33.z.string().min(1).max(500).optional(),
|
|
3635
|
+
clear_title: import_zod33.z.boolean().optional(),
|
|
3636
|
+
pinned: import_zod33.z.boolean().optional(),
|
|
3637
|
+
hidden: import_zod33.z.boolean().optional()
|
|
3605
3638
|
});
|
|
3606
3639
|
CodingPrefsSetResult = CodingPrefsListResult;
|
|
3607
|
-
CodingRecentSeenParams =
|
|
3608
|
-
CodingRecentSeenResult =
|
|
3609
|
-
CodingSearchParams =
|
|
3610
|
-
query:
|
|
3640
|
+
CodingRecentSeenParams = import_zod33.z.strictObject({ target: import_zod33.z.string().min(3).max(200) });
|
|
3641
|
+
CodingRecentSeenResult = import_zod33.z.strictObject({ recent: import_zod33.z.array(CodingRecentRow) });
|
|
3642
|
+
CodingSearchParams = import_zod33.z.strictObject({
|
|
3643
|
+
query: import_zod33.z.string().min(1).max(500),
|
|
3611
3644
|
cursor: nonNegInt.optional(),
|
|
3612
|
-
limit:
|
|
3645
|
+
limit: import_zod33.z.int().min(1).max(100).optional()
|
|
3613
3646
|
});
|
|
3614
|
-
CodingSearchHit =
|
|
3647
|
+
CodingSearchHit = import_zod33.z.strictObject({
|
|
3615
3648
|
provider: CodingProviderName,
|
|
3616
3649
|
providerSessionId: SessionKey,
|
|
3617
|
-
title:
|
|
3650
|
+
title: import_zod33.z.string().max(500),
|
|
3618
3651
|
cwd: LocalPath.nullable(),
|
|
3619
3652
|
updatedAt: IsoTime,
|
|
3620
|
-
where:
|
|
3621
|
-
snippet:
|
|
3653
|
+
where: import_zod33.z.enum(["title", "content"]),
|
|
3654
|
+
snippet: import_zod33.z.string().max(2e3).nullable(),
|
|
3622
3655
|
/**
|
|
3623
3656
|
* (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session
|
|
3624
3657
|
* runs as, or whose config directory holds the chat. Absent: the default sign-in.
|
|
3625
3658
|
*/
|
|
3626
|
-
accountId:
|
|
3659
|
+
accountId: import_zod33.z.string().min(1).max(64).optional()
|
|
3627
3660
|
});
|
|
3628
|
-
CodingSearchResult =
|
|
3629
|
-
query:
|
|
3630
|
-
hits:
|
|
3661
|
+
CodingSearchResult = import_zod33.z.strictObject({
|
|
3662
|
+
query: import_zod33.z.string().max(500),
|
|
3663
|
+
hits: import_zod33.z.array(CodingSearchHit),
|
|
3631
3664
|
scanned: nonNegInt,
|
|
3632
3665
|
total: nonNegInt,
|
|
3633
3666
|
nextCursor: nonNegInt.nullable()
|
|
3634
3667
|
});
|
|
3635
|
-
CodingReconcileParams =
|
|
3636
|
-
CodingReconcileResult =
|
|
3637
|
-
state:
|
|
3638
|
-
summary:
|
|
3668
|
+
CodingReconcileParams = import_zod33.z.strictObject({ provider: CodingProviderName, provider_session_id: SessionKey });
|
|
3669
|
+
CodingReconcileResult = import_zod33.z.strictObject({
|
|
3670
|
+
state: import_zod33.z.enum(["done", "blocked", "nothing_to_do"]),
|
|
3671
|
+
summary: import_zod33.z.string().max(400)
|
|
3639
3672
|
});
|
|
3640
|
-
CodingTranscriptRawParams =
|
|
3641
|
-
CodingTranscriptRawResult =
|
|
3642
|
-
available:
|
|
3673
|
+
CodingTranscriptRawParams = import_zod33.z.strictObject({ provider: CodingProviderName, provider_session_id: SessionKey });
|
|
3674
|
+
CodingTranscriptRawResult = import_zod33.z.strictObject({
|
|
3675
|
+
available: import_zod33.z.boolean(),
|
|
3643
3676
|
reason: ShortText.nullable(),
|
|
3644
|
-
file_name:
|
|
3677
|
+
file_name: import_zod33.z.string().max(300).nullable(),
|
|
3645
3678
|
bytes: nonNegInt,
|
|
3646
3679
|
/** The opt-in cloud backup was refreshed (false: off, unchanged, or signed out). */
|
|
3647
|
-
backup_refreshed:
|
|
3680
|
+
backup_refreshed: import_zod33.z.boolean(),
|
|
3648
3681
|
/** Subagent transcripts beside the chat (Claude Code), downloaded separately. */
|
|
3649
3682
|
subagents: nonNegInt
|
|
3650
3683
|
});
|
|
3651
|
-
CodingWatchParams =
|
|
3652
|
-
CodingWatchResult =
|
|
3653
|
-
CodingSessionWatchParams =
|
|
3654
|
-
CodingSessionWatchResult =
|
|
3684
|
+
CodingWatchParams = import_zod33.z.strictObject({});
|
|
3685
|
+
CodingWatchResult = import_zod33.z.strictObject({ resource_id: ResourceId });
|
|
3686
|
+
CodingSessionWatchParams = import_zod33.z.strictObject({ session_id: SessionKey, since_seq: nonNegInt.optional() });
|
|
3687
|
+
CodingSessionWatchResult = import_zod33.z.strictObject({
|
|
3655
3688
|
resource_id: ResourceId,
|
|
3656
3689
|
/** The newest item seq the device has for this session right now. */
|
|
3657
3690
|
seq: nonNegInt
|
|
3658
3691
|
});
|
|
3659
|
-
CodingChangedEvent =
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3692
|
+
CodingChangedEvent = import_zod33.z.discriminatedUnion("kind", [
|
|
3693
|
+
import_zod33.z.strictObject({ kind: import_zod33.z.literal("session"), session: CodingSessionRecord }),
|
|
3694
|
+
import_zod33.z.strictObject({ kind: import_zod33.z.literal("run"), run: CodingRunRecord }),
|
|
3695
|
+
import_zod33.z.strictObject({ kind: import_zod33.z.literal("preferences"), preferences: import_zod33.z.record(import_zod33.z.string().max(200), CodingChatPreference) }),
|
|
3696
|
+
import_zod33.z.strictObject({ kind: import_zod33.z.literal("titles") }),
|
|
3697
|
+
import_zod33.z.strictObject({ kind: import_zod33.z.literal("recent"), recent: import_zod33.z.array(CodingRecentRow) })
|
|
3665
3698
|
]);
|
|
3666
|
-
CodingWatchStateEvent =
|
|
3667
|
-
CodingItemEvent =
|
|
3699
|
+
CodingWatchStateEvent = import_zod33.z.strictObject({ live: import_zod33.z.boolean(), reason: ShortText.nullable(), beat_ms: import_zod33.z.int().min(1e3) });
|
|
3700
|
+
CodingItemEvent = import_zod33.z.strictObject({
|
|
3668
3701
|
session_id: SessionKey,
|
|
3669
|
-
run_id:
|
|
3702
|
+
run_id: import_zod33.z.string().min(1).max(64),
|
|
3670
3703
|
seq: nonNegInt,
|
|
3671
3704
|
item: CodingTranscriptItem
|
|
3672
3705
|
});
|
|
3673
|
-
CodingGapEvent =
|
|
3674
|
-
SessionIdentifyParams =
|
|
3675
|
-
SessionIdentifyResult =
|
|
3706
|
+
CodingGapEvent = import_zod33.z.strictObject({ session_id: SessionKey, since_seq: nonNegInt, seq: nonNegInt });
|
|
3707
|
+
SessionIdentifyParams = import_zod33.z.strictObject({ label: import_zod33.z.string().min(1).max(60) });
|
|
3708
|
+
SessionIdentifyResult = import_zod33.z.strictObject({ label: import_zod33.z.string().max(60) });
|
|
3676
3709
|
}
|
|
3677
3710
|
});
|
|
3678
3711
|
|
|
3679
3712
|
// src/schema/apps.ts
|
|
3680
|
-
var
|
|
3713
|
+
var import_zod34, import_uuid5, AppKey, AppProfileId, AppProfileLocator, AppSupport, AppFeatureStatus, AppInfo, AppUsageReading, AppProfile, AppsListParams, AppsListResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesSaveParams, AppsProfilesSaveResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsOpenParams, AppsOpenResult;
|
|
3681
3714
|
var init_apps = __esm({
|
|
3682
3715
|
"src/schema/apps.ts"() {
|
|
3683
3716
|
"use strict";
|
|
3684
|
-
|
|
3717
|
+
import_zod34 = require("zod");
|
|
3685
3718
|
import_uuid5 = require("@ai-matrx/kit/uuid");
|
|
3686
3719
|
init_primitives();
|
|
3687
|
-
AppKey =
|
|
3688
|
-
AppProfileId =
|
|
3689
|
-
AppProfileLocator =
|
|
3690
|
-
AppSupport =
|
|
3691
|
-
AppFeatureStatus =
|
|
3720
|
+
AppKey = import_zod34.z.string().regex(/^[a-z][a-z0-9_-]{0,39}$/);
|
|
3721
|
+
AppProfileId = import_zod34.z.string().regex(import_uuid5.UUID_SHAPE_PATTERN);
|
|
3722
|
+
AppProfileLocator = import_zod34.z.string().min(1).max(512).regex(/^[A-Za-z0-9 _()+@,-][A-Za-z0-9 ._()+@,-]{0,127}(\/[A-Za-z0-9 _()+@,-][A-Za-z0-9 ._()+@,-]{0,127}){0,7}$/);
|
|
3723
|
+
AppSupport = import_zod34.z.enum(["supported", "partial", "unsupported"]);
|
|
3724
|
+
AppFeatureStatus = import_zod34.z.strictObject({
|
|
3692
3725
|
status: AppSupport,
|
|
3693
3726
|
/** One line, set whenever status is not "supported". */
|
|
3694
|
-
reason:
|
|
3727
|
+
reason: import_zod34.z.string().max(140).nullable()
|
|
3695
3728
|
});
|
|
3696
|
-
AppInfo =
|
|
3729
|
+
AppInfo = import_zod34.z.strictObject({
|
|
3697
3730
|
app_key: AppKey,
|
|
3698
|
-
name:
|
|
3699
|
-
installed:
|
|
3731
|
+
name: import_zod34.z.string().max(64),
|
|
3732
|
+
installed: import_zod34.z.boolean(),
|
|
3700
3733
|
/** The app's own version string, or null when it is not installed or does not say. */
|
|
3701
|
-
version:
|
|
3734
|
+
version: import_zod34.z.string().max(64).nullable(),
|
|
3702
3735
|
/** The install found (an .app bundle, an .exe, a binary), or null. */
|
|
3703
3736
|
location: AbsPath.nullable(),
|
|
3704
3737
|
/** Open the app at all on this OS. */
|
|
@@ -3708,166 +3741,166 @@ var init_apps = __esm({
|
|
|
3708
3741
|
/** Plan usage read from the app's own files on this OS. */
|
|
3709
3742
|
usage: AppFeatureStatus
|
|
3710
3743
|
});
|
|
3711
|
-
AppUsageReading =
|
|
3712
|
-
window:
|
|
3744
|
+
AppUsageReading = import_zod34.z.strictObject({
|
|
3745
|
+
window: import_zod34.z.enum(["five_hour", "weekly", "extra"]),
|
|
3713
3746
|
/** 0–100 for five_hour and weekly; extra-usage spend as a percent of its cap (may pass 100). */
|
|
3714
|
-
percent:
|
|
3747
|
+
percent: import_zod34.z.number().min(0).max(1e4),
|
|
3715
3748
|
/** When the app recorded it. */
|
|
3716
3749
|
sampled_at_ms: epochMs,
|
|
3717
3750
|
/** True when the window has rolled over since the sample, so the figure has reset. */
|
|
3718
|
-
reset_since:
|
|
3751
|
+
reset_since: import_zod34.z.boolean()
|
|
3719
3752
|
});
|
|
3720
|
-
AppProfile =
|
|
3753
|
+
AppProfile = import_zod34.z.strictObject({
|
|
3721
3754
|
/** The row's id; null for a folder found on disk that no row names yet. */
|
|
3722
3755
|
id: AppProfileId.nullable(),
|
|
3723
3756
|
app_key: AppKey,
|
|
3724
|
-
display_name:
|
|
3757
|
+
display_name: import_zod34.z.string().min(1).max(120),
|
|
3725
3758
|
/** The account the person means to be signed in here; null when not stated (never guessed). */
|
|
3726
|
-
account_identity:
|
|
3759
|
+
account_identity: import_zod34.z.string().min(3).max(320).nullable(),
|
|
3727
3760
|
profile_locator: AppProfileLocator.nullable(),
|
|
3728
3761
|
/** The device the row is tied to; null when the row names none. */
|
|
3729
3762
|
device_id: DeviceId.nullable(),
|
|
3730
3763
|
/** The folder this profile resolves to on this device; null for a row tied to another device. */
|
|
3731
3764
|
folder: AbsPath.nullable(),
|
|
3732
3765
|
/** The folder exists on this device. */
|
|
3733
|
-
on_disk:
|
|
3766
|
+
on_disk: import_zod34.z.boolean(),
|
|
3734
3767
|
/** An instance with this profile is running; null when it could not be determined. */
|
|
3735
|
-
running:
|
|
3768
|
+
running: import_zod34.z.boolean().nullable(),
|
|
3736
3769
|
/** Usage the app recorded for this profile; null when the app exposes none here. */
|
|
3737
|
-
usage:
|
|
3770
|
+
usage: import_zod34.z.array(AppUsageReading).nullable(),
|
|
3738
3771
|
last_opened_ms: epochMs.nullable()
|
|
3739
3772
|
});
|
|
3740
|
-
AppsListParams =
|
|
3741
|
-
AppsListResult =
|
|
3742
|
-
AppsProfilesListParams =
|
|
3773
|
+
AppsListParams = import_zod34.z.strictObject({});
|
|
3774
|
+
AppsListResult = import_zod34.z.strictObject({ apps: import_zod34.z.array(AppInfo) });
|
|
3775
|
+
AppsProfilesListParams = import_zod34.z.strictObject({
|
|
3743
3776
|
/** Only this app's profiles; every app's when absent. */
|
|
3744
3777
|
app_key: AppKey.optional()
|
|
3745
3778
|
});
|
|
3746
|
-
AppsProfilesListResult =
|
|
3747
|
-
profiles:
|
|
3779
|
+
AppsProfilesListResult = import_zod34.z.strictObject({
|
|
3780
|
+
profiles: import_zod34.z.array(AppProfile),
|
|
3748
3781
|
/**
|
|
3749
3782
|
* Whether the saved rows could be read: false while signed out or offline, when only folders
|
|
3750
3783
|
* found on disk are listed.
|
|
3751
3784
|
*/
|
|
3752
|
-
registry:
|
|
3785
|
+
registry: import_zod34.z.enum(["ok", "signed_out", "unavailable"])
|
|
3753
3786
|
});
|
|
3754
|
-
AppsProfilesSaveParams =
|
|
3787
|
+
AppsProfilesSaveParams = import_zod34.z.strictObject({
|
|
3755
3788
|
id: AppProfileId.optional(),
|
|
3756
3789
|
app_key: AppKey,
|
|
3757
|
-
display_name:
|
|
3758
|
-
account_identity:
|
|
3790
|
+
display_name: import_zod34.z.string().min(1).max(120),
|
|
3791
|
+
account_identity: import_zod34.z.string().min(3).max(320).nullable(),
|
|
3759
3792
|
/** On create: the folder to use (one found on disk), or null for the app's default profile. Ignored on update. */
|
|
3760
3793
|
profile_locator: AppProfileLocator.nullable(),
|
|
3761
3794
|
/** On create with profile_locator null: make a new folder named after display_name instead. */
|
|
3762
|
-
new_folder:
|
|
3795
|
+
new_folder: import_zod34.z.boolean().default(false)
|
|
3763
3796
|
});
|
|
3764
3797
|
AppsProfilesSaveResult = AppProfile;
|
|
3765
|
-
AppsProfilesRemoveParams =
|
|
3766
|
-
AppsProfilesRemoveResult =
|
|
3767
|
-
AppsOpenParams =
|
|
3798
|
+
AppsProfilesRemoveParams = import_zod34.z.strictObject({ id: AppProfileId });
|
|
3799
|
+
AppsProfilesRemoveResult = import_zod34.z.strictObject({ removed: import_zod34.z.boolean() });
|
|
3800
|
+
AppsOpenParams = import_zod34.z.strictObject({
|
|
3768
3801
|
app_key: AppKey,
|
|
3769
3802
|
profile_id: AppProfileId.optional()
|
|
3770
3803
|
});
|
|
3771
|
-
AppsOpenResult =
|
|
3804
|
+
AppsOpenResult = import_zod34.z.strictObject({
|
|
3772
3805
|
/** True when an instance with this profile was already running; it is brought forward. */
|
|
3773
|
-
already_running:
|
|
3806
|
+
already_running: import_zod34.z.boolean(),
|
|
3774
3807
|
folder: AbsPath.nullable()
|
|
3775
3808
|
});
|
|
3776
3809
|
}
|
|
3777
3810
|
});
|
|
3778
3811
|
|
|
3779
3812
|
// src/schema/apps-chats.ts
|
|
3780
|
-
var
|
|
3813
|
+
var import_zod35, ChatId, ChatPlace, ChatProjectId, ChatWindow, ChatProject, ChatPin, ChatRunning, ChatHidden, ChatLastUse, ChatAppProject, ChatTitleSource, ChatAppGroup, ChatParent, ChatTitleSync, ChatMove, ChatRow, ChatFamily, AppsChatsListParams, AppsChatsListResult, AppsChatsWatchParams, AppsChatsWatchResult, AppsChatsChangedEvent, AppsChatsWatchStateEvent, AppsChatsPlaceParams, AppsChatsPlaceResult, AppsProjectsFileManyParams, AppsProjectsFileManyResult, AppsProjectsUpdateParams, AppsProjectsUpdateResult, AppsProjectsCopyParams, AppsProjectsCopyResult, AppsProjectsFileParams, AppsProjectsFileResult, AppsProjectsUnfileParams, AppsProjectsUnfileResult, AppsChatsStarParams, AppsChatsStarResult, AppsChatsHideParams, AppsChatsHideResult;
|
|
3781
3814
|
var init_apps_chats = __esm({
|
|
3782
3815
|
"src/schema/apps-chats.ts"() {
|
|
3783
3816
|
"use strict";
|
|
3784
|
-
|
|
3817
|
+
import_zod35 = require("zod");
|
|
3785
3818
|
init_apps();
|
|
3786
3819
|
init_primitives();
|
|
3787
|
-
ChatId =
|
|
3788
|
-
ChatPlace =
|
|
3789
|
-
ChatProjectId =
|
|
3790
|
-
ChatWindow =
|
|
3820
|
+
ChatId = import_zod35.z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/);
|
|
3821
|
+
ChatPlace = import_zod35.z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/);
|
|
3822
|
+
ChatProjectId = import_zod35.z.string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/);
|
|
3823
|
+
ChatWindow = import_zod35.z.strictObject({
|
|
3791
3824
|
key: ChatPlace,
|
|
3792
3825
|
/** The app's default profile (Claude: the main window, which lists every account's chats). */
|
|
3793
|
-
main:
|
|
3826
|
+
main: import_zod35.z.boolean(),
|
|
3794
3827
|
/** The account the window is signed into, when known. */
|
|
3795
|
-
account:
|
|
3828
|
+
account: import_zod35.z.string().max(320).nullable()
|
|
3796
3829
|
});
|
|
3797
|
-
ChatProject =
|
|
3830
|
+
ChatProject = import_zod35.z.strictObject({
|
|
3798
3831
|
id: ChatProjectId,
|
|
3799
|
-
name:
|
|
3800
|
-
archived:
|
|
3832
|
+
name: import_zod35.z.string().min(1).max(200),
|
|
3833
|
+
archived: import_zod35.z.boolean(),
|
|
3801
3834
|
/** Chats in it. */
|
|
3802
3835
|
count: nonNegInt
|
|
3803
3836
|
});
|
|
3804
|
-
ChatPin =
|
|
3837
|
+
ChatPin = import_zod35.z.strictObject({
|
|
3805
3838
|
/** The window whose account pins it; an account with no window of its own is named by its email. */
|
|
3806
|
-
window:
|
|
3839
|
+
window: import_zod35.z.string().min(1).max(320),
|
|
3807
3840
|
/** When that account's pin list was last read; null when the reading has no time. */
|
|
3808
3841
|
observed_at_ms: epochMs.nullable()
|
|
3809
3842
|
});
|
|
3810
|
-
ChatRunning =
|
|
3843
|
+
ChatRunning = import_zod35.z.strictObject({
|
|
3811
3844
|
window: ChatPlace,
|
|
3812
3845
|
/** process: a live process resumed this chat there (exact); activity: that window's own record moved in the last 3 minutes. */
|
|
3813
|
-
how:
|
|
3846
|
+
how: import_zod35.z.enum(["process", "activity"])
|
|
3814
3847
|
});
|
|
3815
|
-
ChatHidden =
|
|
3848
|
+
ChatHidden = import_zod35.z.strictObject({
|
|
3816
3849
|
window: ChatPlace,
|
|
3817
|
-
reason:
|
|
3850
|
+
reason: import_zod35.z.string().max(200)
|
|
3818
3851
|
});
|
|
3819
|
-
ChatLastUse =
|
|
3852
|
+
ChatLastUse = import_zod35.z.strictObject({
|
|
3820
3853
|
/** The conversation's last reply. */
|
|
3821
3854
|
at_ms: epochMs,
|
|
3822
3855
|
window: ChatPlace.nullable(),
|
|
3823
|
-
account:
|
|
3856
|
+
account: import_zod35.z.string().max(320).nullable(),
|
|
3824
3857
|
/** How the window was decided (one short line). */
|
|
3825
|
-
how:
|
|
3858
|
+
how: import_zod35.z.string().max(120).nullable(),
|
|
3826
3859
|
/** The account's 1-hour prompt cache is still warm. */
|
|
3827
|
-
cache_warm:
|
|
3860
|
+
cache_warm: import_zod35.z.boolean(),
|
|
3828
3861
|
cache_minutes_left: nonNegInt
|
|
3829
3862
|
});
|
|
3830
|
-
ChatAppProject =
|
|
3831
|
-
id:
|
|
3832
|
-
name:
|
|
3863
|
+
ChatAppProject = import_zod35.z.strictObject({
|
|
3864
|
+
id: import_zod35.z.string().min(1).max(200),
|
|
3865
|
+
name: import_zod35.z.string().max(200)
|
|
3833
3866
|
});
|
|
3834
|
-
ChatTitleSource =
|
|
3835
|
-
ChatAppGroup =
|
|
3836
|
-
ChatParent =
|
|
3837
|
-
ChatTitleSync =
|
|
3838
|
-
ChatMove =
|
|
3839
|
-
kind:
|
|
3867
|
+
ChatTitleSource = import_zod35.z.enum(["app", "app-remembered", "custom-title", "ai-title", "agent-name", "summary", "first-prompt", "last-prompt"]);
|
|
3868
|
+
ChatAppGroup = import_zod35.z.strictObject({ window: ChatPlace, group_id: import_zod35.z.string().max(120), name: import_zod35.z.string().max(200) });
|
|
3869
|
+
ChatParent = import_zod35.z.strictObject({ id: ChatId, how: import_zod35.z.enum(["spawned", "dispatched", "forked"]), title: import_zod35.z.string().max(1e3).nullable() });
|
|
3870
|
+
ChatTitleSync = import_zod35.z.strictObject({ state: import_zod35.z.enum(["synced", "not_synced", "unsupported"]), note: import_zod35.z.string().max(200) });
|
|
3871
|
+
ChatMove = import_zod35.z.strictObject({
|
|
3872
|
+
kind: import_zod35.z.enum(["move", "copy"]),
|
|
3840
3873
|
from: ChatPlace.nullable(),
|
|
3841
3874
|
to: ChatPlace.nullable(),
|
|
3842
3875
|
at_ms: epochMs.nullable(),
|
|
3843
3876
|
back_at_ms: epochMs.nullable()
|
|
3844
3877
|
});
|
|
3845
|
-
ChatRow =
|
|
3878
|
+
ChatRow = import_zod35.z.strictObject({
|
|
3846
3879
|
id: ChatId,
|
|
3847
3880
|
/** The short id people see (the listing's first 8 characters). */
|
|
3848
|
-
short_id:
|
|
3881
|
+
short_id: import_zod35.z.string().max(16),
|
|
3849
3882
|
/** The listing's own name (Claude: local_<id>), null for a chat only in the holder. */
|
|
3850
|
-
record:
|
|
3851
|
-
title:
|
|
3883
|
+
record: import_zod35.z.string().max(160).nullable(),
|
|
3884
|
+
title: import_zod35.z.string().max(1e3),
|
|
3852
3885
|
last_active_ms: epochMs.nullable(),
|
|
3853
3886
|
created_ms: epochMs.nullable(),
|
|
3854
|
-
projects:
|
|
3855
|
-
starred:
|
|
3856
|
-
pinned_in:
|
|
3887
|
+
projects: import_zod35.z.array(ChatProjectId).max(500),
|
|
3888
|
+
starred: import_zod35.z.boolean(),
|
|
3889
|
+
pinned_in: import_zod35.z.array(ChatPin).max(200),
|
|
3857
3890
|
/** Every place it is listed now: window keys, plus "holder". */
|
|
3858
|
-
places:
|
|
3859
|
-
held:
|
|
3860
|
-
running:
|
|
3861
|
-
hidden_in:
|
|
3891
|
+
places: import_zod35.z.array(ChatPlace).max(200),
|
|
3892
|
+
held: import_zod35.z.boolean(),
|
|
3893
|
+
running: import_zod35.z.array(ChatRunning).max(200),
|
|
3894
|
+
hidden_in: import_zod35.z.array(ChatHidden).max(200),
|
|
3862
3895
|
/** Kept out of the main window on purpose. */
|
|
3863
|
-
hidden_from_main:
|
|
3896
|
+
hidden_from_main: import_zod35.z.boolean(),
|
|
3864
3897
|
/** Listed in a side window and not yet copied into main. */
|
|
3865
|
-
main_pending:
|
|
3898
|
+
main_pending: import_zod35.z.boolean(),
|
|
3866
3899
|
/** A scheduled routine's run (its task id). */
|
|
3867
|
-
scheduled:
|
|
3900
|
+
scheduled: import_zod35.z.string().max(200).nullable(),
|
|
3868
3901
|
/** Created recently and in no project: offered for filing. */
|
|
3869
|
-
new_unfiled:
|
|
3870
|
-
warnings:
|
|
3902
|
+
new_unfiled: import_zod35.z.boolean(),
|
|
3903
|
+
warnings: import_zod35.z.array(import_zod35.z.string().max(400)).max(20),
|
|
3871
3904
|
last_use: ChatLastUse.nullable(),
|
|
3872
3905
|
/** 1.13: the app's own project the chat is grouped under in the app (Codex), read only; absent = none or not an app that groups. */
|
|
3873
3906
|
app_project: ChatAppProject.optional(),
|
|
@@ -3877,21 +3910,21 @@ var init_apps_chats = __esm({
|
|
|
3877
3910
|
* 1.14: the chat's own title before the person's rename (the one title rule, `@ai-matrx/coding-sessions/sessions`);
|
|
3878
3911
|
* `title` is what to show (`title_override` when set, else this).
|
|
3879
3912
|
*/
|
|
3880
|
-
original_title:
|
|
3913
|
+
original_title: import_zod35.z.string().max(1e3).optional(),
|
|
3881
3914
|
/** 1.14: where `original_title` came from (the one rule's sources, strongest first; 1.15: a closed set). */
|
|
3882
3915
|
title_source: ChatTitleSource.optional(),
|
|
3883
3916
|
/** 1.14: the person's rename inside Matrx (Coding Sessions), applied once by the row builder; absent = none. */
|
|
3884
|
-
title_override:
|
|
3917
|
+
title_override: import_zod35.z.string().min(1).max(300).optional(),
|
|
3885
3918
|
/** 1.15: the app itself archived it (hidden_in says where and why, in words for people; this is the typed fact). */
|
|
3886
|
-
archived:
|
|
3919
|
+
archived: import_zod35.z.boolean().optional(),
|
|
3887
3920
|
/** 1.59: the coding session Matrx itself drives this chat in (the one chat, whether it runs in the app or in Matrx); absent = none. */
|
|
3888
|
-
session_id:
|
|
3921
|
+
session_id: import_zod35.z.string().max(80).optional(),
|
|
3889
3922
|
/** 1.59: the app's own groups it is filed in, per instance, as the app keeps them (never merged into the person's projects). */
|
|
3890
|
-
app_groups:
|
|
3923
|
+
app_groups: import_zod35.z.array(ChatAppGroup).max(200).optional(),
|
|
3891
3924
|
/** 1.59: the chat it came from (nesting): an agent's chat that spawned it, dispatched it, or that it was forked from. */
|
|
3892
3925
|
parent: ChatParent.optional(),
|
|
3893
3926
|
/** 1.59: earlier sessions of this same chat (the app continued it under new session ids). */
|
|
3894
|
-
prior_sessions:
|
|
3927
|
+
prior_sessions: import_zod35.z.array(ChatId).max(50).optional(),
|
|
3895
3928
|
/** 1.61: where the title shows (the title facet's sync state for this chat's app). */
|
|
3896
3929
|
title_sync: ChatTitleSync.optional(),
|
|
3897
3930
|
/**
|
|
@@ -3900,7 +3933,7 @@ var init_apps_chats = __esm({
|
|
|
3900
3933
|
*/
|
|
3901
3934
|
pin_sync: ChatTitleSync.optional(),
|
|
3902
3935
|
/** 1.62: every Move and Copy of this chat between instances, newest first (absent = never moved or copied). */
|
|
3903
|
-
moved:
|
|
3936
|
+
moved: import_zod35.z.array(ChatMove).max(50).optional(),
|
|
3904
3937
|
/**
|
|
3905
3938
|
* 1.63: the instance the chat belongs to: the one whose folder holds it (read only; nothing is
|
|
3906
3939
|
* moved). Claude: the side window holding its newest record copy (main mirrors every window), else
|
|
@@ -3911,164 +3944,164 @@ var init_apps_chats = __esm({
|
|
|
3911
3944
|
* 1.70: the person hid it from Matrx's lists (ours, kept by Matrx, never written into the app;
|
|
3912
3945
|
* absent = shown). The app's own hidden facts stay apart: `hidden_in`, `archived`, `hidden_from_main`.
|
|
3913
3946
|
*/
|
|
3914
|
-
hidden:
|
|
3947
|
+
hidden: import_zod35.z.boolean().optional()
|
|
3915
3948
|
});
|
|
3916
|
-
ChatFamily =
|
|
3949
|
+
ChatFamily = import_zod35.z.strictObject({
|
|
3917
3950
|
id: ChatId,
|
|
3918
3951
|
fork_of: ChatId.nullable(),
|
|
3919
3952
|
copy_of: ChatId.nullable()
|
|
3920
3953
|
});
|
|
3921
|
-
AppsChatsListParams =
|
|
3954
|
+
AppsChatsListParams = import_zod35.z.strictObject({
|
|
3922
3955
|
app_key: AppKey,
|
|
3923
3956
|
/** Only these chats (a live update re-reads just what changed). */
|
|
3924
|
-
ids:
|
|
3957
|
+
ids: import_zod35.z.array(ChatId).max(500).optional()
|
|
3925
3958
|
});
|
|
3926
|
-
AppsChatsListResult =
|
|
3959
|
+
AppsChatsListResult = import_zod35.z.strictObject({
|
|
3927
3960
|
app_key: AppKey,
|
|
3928
3961
|
/** Bumps on every change the index sees; `apps.chats.changed` carries the same number. */
|
|
3929
3962
|
version: nonNegInt,
|
|
3930
|
-
windows:
|
|
3931
|
-
projects:
|
|
3932
|
-
chats:
|
|
3963
|
+
windows: import_zod35.z.array(ChatWindow).max(200),
|
|
3964
|
+
projects: import_zod35.z.array(ChatProject).max(5e3),
|
|
3965
|
+
chats: import_zod35.z.array(ChatRow).max(2e4),
|
|
3933
3966
|
/** How long a chat in no project counts as new. */
|
|
3934
3967
|
new_window_ms: nonNegInt,
|
|
3935
3968
|
/** 1.9: this is the copy saved at the last read, shown while everything is read again. */
|
|
3936
|
-
updating:
|
|
3969
|
+
updating: import_zod35.z.boolean().optional(),
|
|
3937
3970
|
/** 1.9: false while the folder watches are down (changes are not arriving); `apps.chats.watch_state` says when it changes. */
|
|
3938
|
-
live:
|
|
3971
|
+
live: import_zod35.z.boolean().optional(),
|
|
3939
3972
|
/** 1.10: every listed chat that is a fork or a copy of another (read from the conversations' first lines). */
|
|
3940
|
-
families:
|
|
3973
|
+
families: import_zod35.z.array(ChatFamily).max(2e4).optional()
|
|
3941
3974
|
});
|
|
3942
|
-
AppsChatsWatchParams =
|
|
3943
|
-
AppsChatsWatchResult =
|
|
3944
|
-
AppsChatsChangedEvent =
|
|
3975
|
+
AppsChatsWatchParams = import_zod35.z.strictObject({ app_key: AppKey });
|
|
3976
|
+
AppsChatsWatchResult = import_zod35.z.strictObject({ resource_id: ResourceId, version: nonNegInt });
|
|
3977
|
+
AppsChatsChangedEvent = import_zod35.z.strictObject({
|
|
3945
3978
|
app_key: AppKey,
|
|
3946
3979
|
version: nonNegInt,
|
|
3947
|
-
ids:
|
|
3948
|
-
all:
|
|
3980
|
+
ids: import_zod35.z.array(ChatId).max(1e3),
|
|
3981
|
+
all: import_zod35.z.boolean()
|
|
3949
3982
|
});
|
|
3950
|
-
AppsChatsWatchStateEvent =
|
|
3983
|
+
AppsChatsWatchStateEvent = import_zod35.z.strictObject({
|
|
3951
3984
|
app_key: AppKey,
|
|
3952
|
-
live:
|
|
3953
|
-
updating:
|
|
3954
|
-
reason:
|
|
3985
|
+
live: import_zod35.z.boolean(),
|
|
3986
|
+
updating: import_zod35.z.boolean(),
|
|
3987
|
+
reason: import_zod35.z.string().max(300).nullable()
|
|
3955
3988
|
});
|
|
3956
|
-
AppsChatsPlaceParams =
|
|
3989
|
+
AppsChatsPlaceParams = import_zod35.z.strictObject({
|
|
3957
3990
|
app_key: AppKey,
|
|
3958
3991
|
chat_id: ChatId,
|
|
3959
|
-
action:
|
|
3992
|
+
action: import_zod35.z.enum(["place", "take_off", "hold"]),
|
|
3960
3993
|
/** The window (for place and take_off). */
|
|
3961
3994
|
window: ChatPlace.optional(),
|
|
3962
3995
|
/** take_off where it is open: stop it there first (the person confirmed). */
|
|
3963
|
-
stop_if_open:
|
|
3996
|
+
stop_if_open: import_zod35.z.boolean().default(false)
|
|
3964
3997
|
});
|
|
3965
|
-
AppsChatsPlaceResult =
|
|
3966
|
-
AppsProjectsFileManyParams =
|
|
3998
|
+
AppsChatsPlaceResult = import_zod35.z.strictObject({ chat: ChatRow, message: import_zod35.z.string().max(400) });
|
|
3999
|
+
AppsProjectsFileManyParams = import_zod35.z.strictObject({
|
|
3967
4000
|
app_key: AppKey,
|
|
3968
|
-
chat_ids:
|
|
4001
|
+
chat_ids: import_zod35.z.array(ChatId).min(1).max(500),
|
|
3969
4002
|
project_id: ChatProjectId.optional(),
|
|
3970
|
-
new_project_name:
|
|
4003
|
+
new_project_name: import_zod35.z.string().min(1).max(200).optional()
|
|
3971
4004
|
});
|
|
3972
|
-
AppsProjectsFileManyResult =
|
|
3973
|
-
AppsProjectsUpdateParams =
|
|
4005
|
+
AppsProjectsFileManyResult = import_zod35.z.strictObject({ chats: import_zod35.z.array(ChatRow).max(500), project: ChatProject });
|
|
4006
|
+
AppsProjectsUpdateParams = import_zod35.z.strictObject({
|
|
3974
4007
|
app_key: AppKey,
|
|
3975
4008
|
project_id: ChatProjectId,
|
|
3976
|
-
name:
|
|
3977
|
-
archived:
|
|
4009
|
+
name: import_zod35.z.string().min(1).max(200).optional(),
|
|
4010
|
+
archived: import_zod35.z.boolean().optional()
|
|
3978
4011
|
});
|
|
3979
|
-
AppsProjectsUpdateResult =
|
|
3980
|
-
AppsProjectsCopyParams =
|
|
3981
|
-
AppsProjectsCopyResult =
|
|
3982
|
-
AppsProjectsFileParams =
|
|
4012
|
+
AppsProjectsUpdateResult = import_zod35.z.strictObject({ project: ChatProject });
|
|
4013
|
+
AppsProjectsCopyParams = import_zod35.z.strictObject({ app_key: AppKey, project_id: ChatProjectId, new_project_name: import_zod35.z.string().min(1).max(200) });
|
|
4014
|
+
AppsProjectsCopyResult = import_zod35.z.strictObject({ project: ChatProject });
|
|
4015
|
+
AppsProjectsFileParams = import_zod35.z.strictObject({
|
|
3983
4016
|
app_key: AppKey,
|
|
3984
4017
|
chat_id: ChatId,
|
|
3985
4018
|
project_id: ChatProjectId.optional(),
|
|
3986
|
-
new_project_name:
|
|
3987
|
-
});
|
|
3988
|
-
AppsProjectsFileResult =
|
|
3989
|
-
AppsProjectsUnfileParams =
|
|
3990
|
-
AppsProjectsUnfileResult =
|
|
3991
|
-
AppsChatsStarParams =
|
|
3992
|
-
AppsChatsStarResult =
|
|
3993
|
-
AppsChatsHideParams =
|
|
3994
|
-
AppsChatsHideResult =
|
|
4019
|
+
new_project_name: import_zod35.z.string().min(1).max(200).optional()
|
|
4020
|
+
});
|
|
4021
|
+
AppsProjectsFileResult = import_zod35.z.strictObject({ chat: ChatRow, project: ChatProject });
|
|
4022
|
+
AppsProjectsUnfileParams = import_zod35.z.strictObject({ app_key: AppKey, chat_id: ChatId, project_id: ChatProjectId });
|
|
4023
|
+
AppsProjectsUnfileResult = import_zod35.z.strictObject({ chat: ChatRow });
|
|
4024
|
+
AppsChatsStarParams = import_zod35.z.strictObject({ app_key: AppKey, chat_id: ChatId, starred: import_zod35.z.boolean() });
|
|
4025
|
+
AppsChatsStarResult = import_zod35.z.strictObject({ chat: ChatRow });
|
|
4026
|
+
AppsChatsHideParams = import_zod35.z.strictObject({ app_key: AppKey, chat_ids: import_zod35.z.array(ChatId).min(1).max(500), hidden: import_zod35.z.boolean() });
|
|
4027
|
+
AppsChatsHideResult = import_zod35.z.strictObject({ app_key: AppKey, hidden: import_zod35.z.boolean(), changed: import_zod35.z.array(ChatId).max(500) });
|
|
3995
4028
|
}
|
|
3996
4029
|
});
|
|
3997
4030
|
|
|
3998
4031
|
// src/schema/apps-accounts.ts
|
|
3999
|
-
var
|
|
4032
|
+
var import_zod36, WindowRemoteControl, AppWindowInfo, AccountUsage, AccountReset, AppsWindowsListParams, AppsWindowsListResult, AppsAccountsUsageParams, AppsAccountsUsageResult, AppsAccountsResetsParams, AppsAccountsResetsResult, AppsWindowActionResult, AppsWindowsOpenParams, AppsWindowsReloadParams, ShownSection, AppsWindowsShownParams, AppsWindowsShownResult, AppsWindowsSetRemoteControlParams, AppsWindowsSetRemoteControlResult, AppsWindowsRestartParams, AppsWindowsRefreshUsageParams, AppsProjectsMoveParams, AppsProjectsMoveResult, AppsProjectsCreateParams, AppsProjectsCreateResult, AppsProjectsImportPinsParams, AppsProjectsImportPinsResult, ProjectMoveChat, ProjectMoveSkip, ProjectMoveGroup, ProjectMoveOutcome, WindowGroup, AppsWindowsGroupsParams, AppsWindowsGroupsResult, ProjectMovePin, AppsProjectsToWindowParams, AppsProjectsToWindowResult, AppsChatsBringBackParams, AppsChatsBringBackResult, TidyUpFacet, TidyUpRestart, AppsChatsTidyUpParams, AppsChatsTidyUpResult, ColdChat, AppsChatsColdParams, AppsChatsColdResult, TitleCopies, TitleMismatch, StaleTitleWindow, AppsChatsTitlesCheckParams, AppsChatsTitlesCheckResult, AppsChatsTitlesPushParams, AppsChatsTitlesPushResult, AppsChatsOpenParams, SpendSplit, SpendScopes, SpendAccount, SpendModel, SpendChat, SpendHelper, SpendLive, SpendIdleScope, SpendIdle, SpendStart, SpendDay, AppsSpendParams, AppsSpendResult, AppsSyncStatusParams, AppsSyncStatusResult, AppsSyncRunParams, AppsWindowsProcessesParams, AppsWindowsProcessesResult, AppsWindowsAddParams, AppsWindowsSaveNamesParams, AppsWindowsUpdateStateParams, AppsWindowsUpdateStateResult, AppsWindowsReopenParams, AppsWindowsReopenResult, AppsWindowsUpdateAndReopenParams, AppsWindowsUpdateAndReopenResult, WeightProcess, WeightSession, WeightOrphan, WeightMachine, WeightGuardStop, WeightGuard, WeightThresholds, WeightTotals, AppsWeightParams, AppsWeightResult, AppsChatsCopyToAccountParams, CopiedChat, CopyReopened, CopyRestart, AppsChatsCopyToAccountResult;
|
|
4000
4033
|
var init_apps_accounts = __esm({
|
|
4001
4034
|
"src/schema/apps-accounts.ts"() {
|
|
4002
4035
|
"use strict";
|
|
4003
|
-
|
|
4036
|
+
import_zod36 = require("zod");
|
|
4004
4037
|
init_apps();
|
|
4005
4038
|
init_apps_chats();
|
|
4006
4039
|
init_primitives();
|
|
4007
|
-
WindowRemoteControl =
|
|
4040
|
+
WindowRemoteControl = import_zod36.z.strictObject({
|
|
4008
4041
|
/**
|
|
4009
4042
|
* As the window's settings file holds it: on, off, or never set (the app's default). 1.52:
|
|
4010
4043
|
* "unreadable" = the file is there but damaged, so the setting is not known (`problem` says why).
|
|
4011
4044
|
*/
|
|
4012
|
-
setting:
|
|
4045
|
+
setting: import_zod36.z.enum(["on", "off", "default", "unreadable"]),
|
|
4013
4046
|
/** The window serves Remote Control now (its live state says "on"); null: not known (closed, or no state file). */
|
|
4014
|
-
serving:
|
|
4047
|
+
serving: import_zod36.z.boolean().nullable(),
|
|
4015
4048
|
/** A change queued until the window next closes (or restarts); null: none. */
|
|
4016
|
-
pending:
|
|
4049
|
+
pending: import_zod36.z.enum(["on", "off"]).nullable(),
|
|
4017
4050
|
/**
|
|
4018
4051
|
* 1.52: why the setting cannot be trusted, as a plain sentence for the person: the settings file is
|
|
4019
4052
|
* damaged ("unreadable"), or a queued change failed to land (it stays queued; asking again retries).
|
|
4020
4053
|
* Absent: nothing wrong. An older core omits it.
|
|
4021
4054
|
*/
|
|
4022
|
-
problem:
|
|
4055
|
+
problem: import_zod36.z.string().max(300).optional()
|
|
4023
4056
|
});
|
|
4024
|
-
AppWindowInfo =
|
|
4057
|
+
AppWindowInfo = import_zod36.z.strictObject({
|
|
4025
4058
|
key: ChatPlace,
|
|
4026
4059
|
/** The app's default profile (Claude: main, which may sign into any account). */
|
|
4027
|
-
main:
|
|
4060
|
+
main: import_zod36.z.boolean(),
|
|
4028
4061
|
/** The account the window is meant for (null for main). */
|
|
4029
|
-
account:
|
|
4062
|
+
account: import_zod36.z.string().max(320).nullable(),
|
|
4030
4063
|
/** The account signed in there now: an email, or the account id while it has no saved name. */
|
|
4031
|
-
signed_in:
|
|
4032
|
-
signed_in_is_email:
|
|
4064
|
+
signed_in: import_zod36.z.string().max(320).nullable(),
|
|
4065
|
+
signed_in_is_email: import_zod36.z.boolean(),
|
|
4033
4066
|
/** Signed into another account than the one it is meant for. */
|
|
4034
|
-
mismatch:
|
|
4067
|
+
mismatch: import_zod36.z.boolean(),
|
|
4035
4068
|
/** Its folder exists. */
|
|
4036
|
-
created:
|
|
4069
|
+
created: import_zod36.z.boolean(),
|
|
4037
4070
|
/** Open now. */
|
|
4038
|
-
running:
|
|
4071
|
+
running: import_zod36.z.boolean(),
|
|
4039
4072
|
/** Chats open in it now (a process resuming each one). */
|
|
4040
4073
|
open_chats: nonNegInt,
|
|
4041
4074
|
/** 1.50: its Remote Control (phone) setting; absent from an older core, or an app without one. */
|
|
4042
4075
|
remote_control: WindowRemoteControl.optional()
|
|
4043
4076
|
});
|
|
4044
|
-
AccountUsage =
|
|
4077
|
+
AccountUsage = import_zod36.z.strictObject({
|
|
4045
4078
|
/** The account's email, or "org <8 chars>" when no window has ever sampled that org. */
|
|
4046
|
-
account:
|
|
4047
|
-
org:
|
|
4079
|
+
account: import_zod36.z.string().max(320),
|
|
4080
|
+
org: import_zod36.z.string().max(80).nullable(),
|
|
4048
4081
|
/** False when the org was sampled in several accounts' windows and the vote is not clear (≥ 75 %). */
|
|
4049
|
-
account_certain:
|
|
4082
|
+
account_certain: import_zod36.z.boolean(),
|
|
4050
4083
|
/** 5-hour use in percent (0 once the reading is over 5 hours old). */
|
|
4051
|
-
five_hour:
|
|
4052
|
-
five_hour_reset_since:
|
|
4084
|
+
five_hour: import_zod36.z.number().nullable(),
|
|
4085
|
+
five_hour_reset_since: import_zod36.z.boolean(),
|
|
4053
4086
|
/** Weekly use in percent (0 once the week reset after the reading). */
|
|
4054
|
-
weekly:
|
|
4055
|
-
weekly_reset_since:
|
|
4087
|
+
weekly: import_zod36.z.number().nullable(),
|
|
4088
|
+
weekly_reset_since: import_zod36.z.boolean(),
|
|
4056
4089
|
/** Extra-usage spend in percent of its cap, when on. */
|
|
4057
|
-
extra_usage:
|
|
4090
|
+
extra_usage: import_zod36.z.number().nullable(),
|
|
4058
4091
|
extra_usage_as_of_ms: epochMs.nullable(),
|
|
4059
4092
|
as_of_ms: epochMs,
|
|
4060
4093
|
/** The windows meant for this account (and main when main took the reading). */
|
|
4061
|
-
windows:
|
|
4094
|
+
windows: import_zod36.z.array(ChatPlace).max(200),
|
|
4062
4095
|
/** The window that took the reading is open now and the reading is under 30 minutes old. */
|
|
4063
|
-
live:
|
|
4096
|
+
live: import_zod36.z.boolean(),
|
|
4064
4097
|
/** The next weekly reset, when known. */
|
|
4065
4098
|
weekly_resets_at_ms: epochMs.nullable(),
|
|
4066
4099
|
/** That reset time is Claude's own (its reading, or a reset seen in its usage history). */
|
|
4067
|
-
weekly_reset_official:
|
|
4100
|
+
weekly_reset_official: import_zod36.z.boolean().nullable(),
|
|
4068
4101
|
/** 1.13: the account's plan as the app names it (Codex: "pro", "prolite"), when recorded. */
|
|
4069
|
-
plan:
|
|
4102
|
+
plan: import_zod36.z.string().max(80).optional(),
|
|
4070
4103
|
/** 1.13: the account's credit balance as the app records it (Codex), when recorded. */
|
|
4071
|
-
credits:
|
|
4104
|
+
credits: import_zod36.z.string().max(40).optional(),
|
|
4072
4105
|
/**
|
|
4073
4106
|
* 1.25: the latest the account's 5-hour window can reset: 5 hours after the first reading of this
|
|
4074
4107
|
* window's use (its usage history), so the real reset is at or before it. Absent when no 5-hour
|
|
@@ -4076,110 +4109,110 @@ var init_apps_accounts = __esm({
|
|
|
4076
4109
|
*/
|
|
4077
4110
|
five_hour_resets_by_ms: epochMs.optional(),
|
|
4078
4111
|
/** 1.73: where the reading came from (absent = the app itself). */
|
|
4079
|
-
read_source:
|
|
4112
|
+
read_source: import_zod36.z.enum(["app", "claude_code"]).optional()
|
|
4080
4113
|
});
|
|
4081
|
-
AccountReset =
|
|
4114
|
+
AccountReset = import_zod36.z.strictObject({
|
|
4082
4115
|
window: ChatPlace,
|
|
4083
|
-
account:
|
|
4116
|
+
account: import_zod36.z.string().max(320).nullable(),
|
|
4084
4117
|
next_reset_ms: epochMs.nullable(),
|
|
4085
4118
|
/** claude: the app's own reading; usage_history: a weekly drop seen in its usage record; your_list: the person's own entry. */
|
|
4086
|
-
source:
|
|
4119
|
+
source: import_zod36.z.enum(["claude", "usage_history", "your_list"]).nullable(),
|
|
4087
4120
|
/** claude or usage_history. */
|
|
4088
|
-
official:
|
|
4121
|
+
official: import_zod36.z.boolean(),
|
|
4089
4122
|
/** Set when the person's list disagrees with the official time. */
|
|
4090
|
-
note:
|
|
4123
|
+
note: import_zod36.z.string().max(200).nullable()
|
|
4091
4124
|
});
|
|
4092
|
-
AppsWindowsListParams =
|
|
4093
|
-
AppsWindowsListResult =
|
|
4094
|
-
AppsAccountsUsageParams =
|
|
4095
|
-
AppsAccountsUsageResult =
|
|
4125
|
+
AppsWindowsListParams = import_zod36.z.strictObject({ app_key: AppKey });
|
|
4126
|
+
AppsWindowsListResult = import_zod36.z.strictObject({ app_key: AppKey, windows: import_zod36.z.array(AppWindowInfo).max(200) });
|
|
4127
|
+
AppsAccountsUsageParams = import_zod36.z.strictObject({ app_key: AppKey });
|
|
4128
|
+
AppsAccountsUsageResult = import_zod36.z.strictObject({
|
|
4096
4129
|
app_key: AppKey,
|
|
4097
|
-
accounts:
|
|
4130
|
+
accounts: import_zod36.z.array(AccountUsage).max(500),
|
|
4098
4131
|
/** 1.12: the rows are right but something around them failed (a newly read reset time could not be saved); shown, never hidden. */
|
|
4099
|
-
problem:
|
|
4132
|
+
problem: import_zod36.z.string().max(400).optional()
|
|
4100
4133
|
});
|
|
4101
|
-
AppsAccountsResetsParams =
|
|
4102
|
-
AppsAccountsResetsResult =
|
|
4134
|
+
AppsAccountsResetsParams = import_zod36.z.strictObject({ app_key: AppKey });
|
|
4135
|
+
AppsAccountsResetsResult = import_zod36.z.strictObject({
|
|
4103
4136
|
app_key: AppKey,
|
|
4104
|
-
resets:
|
|
4137
|
+
resets: import_zod36.z.array(AccountReset).max(200),
|
|
4105
4138
|
/** 1.12: as on `apps.accounts.usage`. */
|
|
4106
|
-
problem:
|
|
4139
|
+
problem: import_zod36.z.string().max(400).optional()
|
|
4107
4140
|
});
|
|
4108
|
-
AppsWindowActionResult =
|
|
4109
|
-
AppsWindowsOpenParams =
|
|
4110
|
-
AppsWindowsReloadParams =
|
|
4111
|
-
ShownSection =
|
|
4112
|
-
title:
|
|
4141
|
+
AppsWindowActionResult = import_zod36.z.strictObject({ message: import_zod36.z.string().max(400) });
|
|
4142
|
+
AppsWindowsOpenParams = import_zod36.z.strictObject({ app_key: AppKey, window: ChatPlace });
|
|
4143
|
+
AppsWindowsReloadParams = import_zod36.z.strictObject({ app_key: AppKey, window: ChatPlace });
|
|
4144
|
+
ShownSection = import_zod36.z.strictObject({
|
|
4145
|
+
title: import_zod36.z.string().max(300),
|
|
4113
4146
|
/** Rows drawn under it (a collapsed section draws none). */
|
|
4114
|
-
rows:
|
|
4115
|
-
expanded:
|
|
4147
|
+
rows: import_zod36.z.number().int().nonnegative(),
|
|
4148
|
+
expanded: import_zod36.z.boolean()
|
|
4116
4149
|
});
|
|
4117
|
-
AppsWindowsShownParams =
|
|
4118
|
-
AppsWindowsShownResult =
|
|
4150
|
+
AppsWindowsShownParams = import_zod36.z.strictObject({ app_key: AppKey, window: ChatPlace });
|
|
4151
|
+
AppsWindowsShownResult = import_zod36.z.strictObject({
|
|
4119
4152
|
window: ChatPlace,
|
|
4120
|
-
open:
|
|
4121
|
-
sections:
|
|
4122
|
-
problem:
|
|
4153
|
+
open: import_zod36.z.boolean(),
|
|
4154
|
+
sections: import_zod36.z.array(ShownSection).max(200),
|
|
4155
|
+
problem: import_zod36.z.string().max(400).nullable()
|
|
4123
4156
|
});
|
|
4124
|
-
AppsWindowsSetRemoteControlParams =
|
|
4125
|
-
AppsWindowsSetRemoteControlResult =
|
|
4126
|
-
message:
|
|
4157
|
+
AppsWindowsSetRemoteControlParams = import_zod36.z.strictObject({ app_key: AppKey, window: ChatPlace, enabled: import_zod36.z.boolean() });
|
|
4158
|
+
AppsWindowsSetRemoteControlResult = import_zod36.z.strictObject({
|
|
4159
|
+
message: import_zod36.z.string().max(400),
|
|
4127
4160
|
/** "now" = written into the closed window; "next_close" = queued until it closes. */
|
|
4128
|
-
when:
|
|
4161
|
+
when: import_zod36.z.enum(["now", "next_close"]),
|
|
4129
4162
|
remote_control: WindowRemoteControl
|
|
4130
4163
|
});
|
|
4131
|
-
AppsWindowsRestartParams =
|
|
4132
|
-
AppsWindowsRefreshUsageParams =
|
|
4133
|
-
AppsProjectsMoveParams =
|
|
4164
|
+
AppsWindowsRestartParams = import_zod36.z.strictObject({ app_key: AppKey, window: ChatPlace, force: import_zod36.z.boolean().default(false) });
|
|
4165
|
+
AppsWindowsRefreshUsageParams = import_zod36.z.strictObject({ app_key: AppKey, window: ChatPlace });
|
|
4166
|
+
AppsProjectsMoveParams = import_zod36.z.strictObject({
|
|
4134
4167
|
app_key: AppKey,
|
|
4135
4168
|
chat_id: ChatId,
|
|
4136
4169
|
from_project_id: ChatProjectId,
|
|
4137
4170
|
to_project_id: ChatProjectId.optional(),
|
|
4138
|
-
new_project_name:
|
|
4139
|
-
});
|
|
4140
|
-
AppsProjectsMoveResult =
|
|
4141
|
-
AppsProjectsCreateParams =
|
|
4142
|
-
AppsProjectsCreateResult =
|
|
4143
|
-
AppsProjectsImportPinsParams =
|
|
4144
|
-
AppsProjectsImportPinsResult =
|
|
4145
|
-
ProjectMoveChat =
|
|
4146
|
-
ProjectMoveSkip =
|
|
4147
|
-
ProjectMoveGroup =
|
|
4148
|
-
ok:
|
|
4149
|
-
name:
|
|
4171
|
+
new_project_name: import_zod36.z.string().min(1).max(200).optional()
|
|
4172
|
+
});
|
|
4173
|
+
AppsProjectsMoveResult = import_zod36.z.strictObject({ chat: ChatRow, project: ChatProject });
|
|
4174
|
+
AppsProjectsCreateParams = import_zod36.z.strictObject({ app_key: AppKey, name: import_zod36.z.string().min(1).max(200) });
|
|
4175
|
+
AppsProjectsCreateResult = import_zod36.z.strictObject({ project: ChatProject });
|
|
4176
|
+
AppsProjectsImportPinsParams = import_zod36.z.strictObject({ app_key: AppKey });
|
|
4177
|
+
AppsProjectsImportPinsResult = import_zod36.z.strictObject({ message: import_zod36.z.string().max(400) });
|
|
4178
|
+
ProjectMoveChat = import_zod36.z.strictObject({ chat_id: ChatId, title: import_zod36.z.string().max(300) });
|
|
4179
|
+
ProjectMoveSkip = import_zod36.z.strictObject({ chat_id: ChatId, title: import_zod36.z.string().max(300), window: ChatPlace.nullable(), reason: import_zod36.z.string().max(400) });
|
|
4180
|
+
ProjectMoveGroup = import_zod36.z.strictObject({
|
|
4181
|
+
ok: import_zod36.z.boolean(),
|
|
4182
|
+
name: import_zod36.z.string().max(200),
|
|
4150
4183
|
/** Why it is not (or was not) grouped — e.g. the window is open. */
|
|
4151
|
-
reason:
|
|
4184
|
+
reason: import_zod36.z.string().max(400).optional(),
|
|
4152
4185
|
/** Chats that get (or got) the group; already in it; taken from another group of the window. */
|
|
4153
4186
|
assign: nonNegInt.optional(),
|
|
4154
4187
|
already: nonNegInt.optional(),
|
|
4155
4188
|
from_other_groups: nonNegInt.optional(),
|
|
4156
4189
|
/** A group of that name was already there (reused, never doubled). */
|
|
4157
|
-
group_exists:
|
|
4190
|
+
group_exists: import_zod36.z.boolean().optional(),
|
|
4158
4191
|
/** 1.43: "now" = written into the closed window; "next_close" = queued until that window closes. */
|
|
4159
|
-
when:
|
|
4192
|
+
when: import_zod36.z.enum(["now", "next_close"]).optional(),
|
|
4160
4193
|
/** 1.43: the window's own id of the group used (absent while a new one waits to be made). */
|
|
4161
|
-
group_id:
|
|
4194
|
+
group_id: import_zod36.z.string().max(200).optional()
|
|
4162
4195
|
});
|
|
4163
|
-
ProjectMoveOutcome =
|
|
4196
|
+
ProjectMoveOutcome = import_zod36.z.strictObject({
|
|
4164
4197
|
chat_id: ChatId,
|
|
4165
|
-
title:
|
|
4166
|
-
outcome:
|
|
4167
|
-
off:
|
|
4168
|
-
reason:
|
|
4169
|
-
pin:
|
|
4170
|
-
group:
|
|
4171
|
-
});
|
|
4172
|
-
WindowGroup =
|
|
4173
|
-
AppsWindowsGroupsParams =
|
|
4174
|
-
AppsWindowsGroupsResult =
|
|
4198
|
+
title: import_zod36.z.string().max(300),
|
|
4199
|
+
outcome: import_zod36.z.enum(["copied", "moved", "already", "skipped"]),
|
|
4200
|
+
off: import_zod36.z.array(ChatPlace).max(50),
|
|
4201
|
+
reason: import_zod36.z.string().max(400).nullable(),
|
|
4202
|
+
pin: import_zod36.z.enum(["now", "next_close", "failed"]).nullable(),
|
|
4203
|
+
group: import_zod36.z.enum(["now", "next_close", "failed"]).nullable()
|
|
4204
|
+
});
|
|
4205
|
+
WindowGroup = import_zod36.z.strictObject({ id: import_zod36.z.string().max(200), name: import_zod36.z.string().max(200), count: nonNegInt });
|
|
4206
|
+
AppsWindowsGroupsParams = import_zod36.z.strictObject({ app_key: AppKey, window: ChatPlace });
|
|
4207
|
+
AppsWindowsGroupsResult = import_zod36.z.strictObject({
|
|
4175
4208
|
window: ChatPlace,
|
|
4176
|
-
open:
|
|
4177
|
-
groups:
|
|
4209
|
+
open: import_zod36.z.boolean(),
|
|
4210
|
+
groups: import_zod36.z.array(WindowGroup).max(1e3)
|
|
4178
4211
|
});
|
|
4179
|
-
ProjectMovePin =
|
|
4180
|
-
ok:
|
|
4212
|
+
ProjectMovePin = import_zod36.z.strictObject({
|
|
4213
|
+
ok: import_zod36.z.boolean(),
|
|
4181
4214
|
/** "now" = written into the closed window; "next_close" = queued until that window closes. */
|
|
4182
|
-
when:
|
|
4215
|
+
when: import_zod36.z.enum(["now", "next_close"]),
|
|
4183
4216
|
/** Pinned by this call (dry run: would be). */
|
|
4184
4217
|
pinned: nonNegInt,
|
|
4185
4218
|
/** Already pinned there. */
|
|
@@ -4187,140 +4220,140 @@ var init_apps_accounts = __esm({
|
|
|
4187
4220
|
/** Waiting for the window to close (dry run: would wait). */
|
|
4188
4221
|
queued: nonNegInt,
|
|
4189
4222
|
/** Why not pinned (ok false), or why queued. */
|
|
4190
|
-
reason:
|
|
4223
|
+
reason: import_zod36.z.string().max(400).optional()
|
|
4191
4224
|
});
|
|
4192
|
-
AppsProjectsToWindowParams =
|
|
4225
|
+
AppsProjectsToWindowParams = import_zod36.z.strictObject({
|
|
4193
4226
|
app_key: AppKey,
|
|
4194
4227
|
project_id: ChatProjectId,
|
|
4195
4228
|
window: ChatPlace,
|
|
4196
4229
|
/** Also take each chat off its other side windows where safe (never main, the holder, an open window). */
|
|
4197
|
-
take_off:
|
|
4230
|
+
take_off: import_zod36.z.boolean().default(false),
|
|
4198
4231
|
/** Also group them under the project's name in that window's sidebar (1.43: an open window's is queued for its next close). */
|
|
4199
|
-
group:
|
|
4232
|
+
group: import_zod36.z.boolean().default(false),
|
|
4200
4233
|
/** 1.43: group them into this existing group of the window (apps.windows.groups); implies group. */
|
|
4201
|
-
group_id:
|
|
4234
|
+
group_id: import_zod36.z.string().min(1).max(200).optional(),
|
|
4202
4235
|
/** 1.43: group them under this name (an existing group of that name is reused, else made); implies group. */
|
|
4203
|
-
group_name:
|
|
4236
|
+
group_name: import_zod36.z.string().trim().min(1).max(200).optional(),
|
|
4204
4237
|
/** 1.32: also pin them in that window (now if closed, else when it next closes). */
|
|
4205
|
-
pin:
|
|
4238
|
+
pin: import_zod36.z.boolean().optional(),
|
|
4206
4239
|
/** 1.36: a batch: exactly these chats of the project and no other (a reused marker is a label, never a sweep). */
|
|
4207
|
-
chat_ids:
|
|
4240
|
+
chat_ids: import_zod36.z.array(ChatId).min(1).max(5e3).optional(),
|
|
4208
4241
|
/** 1.36: take them off this one side window only (a Move's origin), never main or another window that lists them. */
|
|
4209
4242
|
take_off_from: ChatPlace.optional(),
|
|
4210
|
-
dry_run:
|
|
4243
|
+
dry_run: import_zod36.z.boolean().default(false)
|
|
4211
4244
|
});
|
|
4212
|
-
AppsProjectsToWindowResult =
|
|
4245
|
+
AppsProjectsToWindowResult = import_zod36.z.strictObject({
|
|
4213
4246
|
project_id: ChatProjectId,
|
|
4214
4247
|
window: ChatPlace,
|
|
4215
|
-
dry_run:
|
|
4216
|
-
place:
|
|
4217
|
-
already:
|
|
4218
|
-
take_off:
|
|
4219
|
-
skipped:
|
|
4248
|
+
dry_run: import_zod36.z.boolean(),
|
|
4249
|
+
place: import_zod36.z.array(ProjectMoveChat).max(5e3),
|
|
4250
|
+
already: import_zod36.z.array(ProjectMoveChat).max(5e3),
|
|
4251
|
+
take_off: import_zod36.z.array(ProjectMoveChat.extend({ window: ChatPlace })).max(2e4),
|
|
4252
|
+
skipped: import_zod36.z.array(ProjectMoveSkip).max(2e4),
|
|
4220
4253
|
/** Chats of the project from other apps (no windows to place into), left as they are. */
|
|
4221
4254
|
other_apps: nonNegInt,
|
|
4222
4255
|
group: ProjectMoveGroup.nullable(),
|
|
4223
4256
|
/** 1.32: the pin in the target window (absent: not asked). */
|
|
4224
4257
|
pin: ProjectMovePin.optional(),
|
|
4225
4258
|
/** 1.43: one row per chat, what happened to it (absent from an older core). */
|
|
4226
|
-
chats:
|
|
4227
|
-
message:
|
|
4259
|
+
chats: import_zod36.z.array(ProjectMoveOutcome).max(5e3).optional(),
|
|
4260
|
+
message: import_zod36.z.string().max(400)
|
|
4228
4261
|
});
|
|
4229
|
-
AppsChatsBringBackParams =
|
|
4262
|
+
AppsChatsBringBackParams = import_zod36.z.strictObject({ app_key: AppKey, chat_id: ChatId, dry_run: import_zod36.z.boolean().optional() });
|
|
4230
4263
|
AppsChatsBringBackResult = AppsProjectsToWindowResult.extend({ project_id: ChatProjectId.nullable() });
|
|
4231
|
-
TidyUpFacet =
|
|
4264
|
+
TidyUpFacet = import_zod36.z.strictObject({
|
|
4232
4265
|
app_key: AppKey,
|
|
4233
|
-
facet:
|
|
4234
|
-
state:
|
|
4235
|
-
note:
|
|
4266
|
+
facet: import_zod36.z.enum(["title", "pin"]),
|
|
4267
|
+
state: import_zod36.z.enum(["synced", "not_synced", "unsupported"]),
|
|
4268
|
+
note: import_zod36.z.string().max(400),
|
|
4236
4269
|
to_push: nonNegInt,
|
|
4237
4270
|
pushed: nonNegInt,
|
|
4238
4271
|
already: nonNegInt,
|
|
4239
4272
|
waiting: nonNegInt,
|
|
4240
4273
|
failed: nonNegInt
|
|
4241
4274
|
});
|
|
4242
|
-
TidyUpRestart =
|
|
4243
|
-
AppsChatsTidyUpParams =
|
|
4244
|
-
AppsChatsTidyUpResult =
|
|
4245
|
-
dry_run:
|
|
4246
|
-
facets:
|
|
4275
|
+
TidyUpRestart = import_zod36.z.strictObject({ window: ChatPlace, why: import_zod36.z.string().max(400) });
|
|
4276
|
+
AppsChatsTidyUpParams = import_zod36.z.strictObject({ dry_run: import_zod36.z.boolean(), restart_windows: import_zod36.z.array(ChatPlace).max(64).optional() });
|
|
4277
|
+
AppsChatsTidyUpResult = import_zod36.z.strictObject({
|
|
4278
|
+
dry_run: import_zod36.z.boolean(),
|
|
4279
|
+
facets: import_zod36.z.array(TidyUpFacet).max(32),
|
|
4247
4280
|
/** Claude windows that would keep an old name until they reopen (the plan lists them; nothing is quit unasked). */
|
|
4248
|
-
restart:
|
|
4281
|
+
restart: import_zod36.z.array(TidyUpRestart).max(64),
|
|
4249
4282
|
/** The windows this run quit and reopened. */
|
|
4250
|
-
restarted:
|
|
4251
|
-
message:
|
|
4283
|
+
restarted: import_zod36.z.array(ChatPlace).max(64),
|
|
4284
|
+
message: import_zod36.z.string().max(600)
|
|
4252
4285
|
});
|
|
4253
|
-
ColdChat =
|
|
4286
|
+
ColdChat = import_zod36.z.strictObject({
|
|
4254
4287
|
id: ChatId,
|
|
4255
|
-
title:
|
|
4256
|
-
repo:
|
|
4257
|
-
window:
|
|
4258
|
-
account:
|
|
4259
|
-
model_name:
|
|
4288
|
+
title: import_zod36.z.string().max(1e3),
|
|
4289
|
+
repo: import_zod36.z.string().max(200).nullable(),
|
|
4290
|
+
window: import_zod36.z.string().max(64).nullable(),
|
|
4291
|
+
account: import_zod36.z.string().max(320).nullable(),
|
|
4292
|
+
model_name: import_zod36.z.string().max(120).nullable(),
|
|
4260
4293
|
context_tokens: nonNegInt,
|
|
4261
4294
|
cold_at_ms: epochMs,
|
|
4262
4295
|
/** Waking it once the cache is cold. */
|
|
4263
|
-
cold_cost:
|
|
4296
|
+
cold_cost: import_zod36.z.number().nullable(),
|
|
4264
4297
|
/** Waking it while the cache is warm. */
|
|
4265
|
-
warm_cost:
|
|
4298
|
+
warm_cost: import_zod36.z.number().nullable(),
|
|
4266
4299
|
/** Its account is on extra usage (a 5-minute cache, and real money). */
|
|
4267
|
-
extra_usage:
|
|
4300
|
+
extra_usage: import_zod36.z.boolean(),
|
|
4268
4301
|
/** A scheduled routine's run. */
|
|
4269
|
-
scheduled:
|
|
4302
|
+
scheduled: import_zod36.z.boolean(),
|
|
4270
4303
|
/** It can be shown in its window (started in the desktop app). */
|
|
4271
|
-
openable:
|
|
4304
|
+
openable: import_zod36.z.boolean(),
|
|
4272
4305
|
/** How its window was decided, or why it can't be opened. */
|
|
4273
|
-
how:
|
|
4306
|
+
how: import_zod36.z.string().max(200).nullable(),
|
|
4274
4307
|
/** 1.78: the person hid this chat from Matrx's lists (our Hide, as on ChatRow.hidden); absent = shown. */
|
|
4275
|
-
hidden:
|
|
4308
|
+
hidden: import_zod36.z.boolean().optional()
|
|
4276
4309
|
});
|
|
4277
|
-
AppsChatsColdParams =
|
|
4278
|
-
AppsChatsColdResult =
|
|
4310
|
+
AppsChatsColdParams = import_zod36.z.strictObject({ app_key: AppKey });
|
|
4311
|
+
AppsChatsColdResult = import_zod36.z.strictObject({
|
|
4279
4312
|
app_key: AppKey,
|
|
4280
4313
|
/** Waiting for the person with a warm cache, most urgent first. */
|
|
4281
|
-
waiting:
|
|
4314
|
+
waiting: import_zod36.z.array(ColdChat).max(2e3),
|
|
4282
4315
|
/** Went cold in the last while. */
|
|
4283
|
-
recently_cold:
|
|
4316
|
+
recently_cold: import_zod36.z.array(ColdChat).max(2e3),
|
|
4284
4317
|
/** Chats working right now (not waiting). */
|
|
4285
4318
|
working: nonNegInt
|
|
4286
4319
|
});
|
|
4287
|
-
TitleCopies =
|
|
4320
|
+
TitleCopies = import_zod36.z.strictObject({
|
|
4288
4321
|
window: ChatPlace,
|
|
4289
4322
|
/** Record copies in that window holding a different name (main keeps one per account folder). */
|
|
4290
4323
|
copies: nonNegInt,
|
|
4291
|
-
titles:
|
|
4324
|
+
titles: import_zod36.z.array(import_zod36.z.strictObject({ title: import_zod36.z.string().max(2e3), source: import_zod36.z.string().max(32) })).max(50)
|
|
4292
4325
|
});
|
|
4293
|
-
TitleMismatch =
|
|
4326
|
+
TitleMismatch = import_zod36.z.strictObject({
|
|
4294
4327
|
chat_id: ChatId,
|
|
4295
4328
|
/** The right name: the latest one a person gave it (in any window, or in Matrx), else the newest automatic title. */
|
|
4296
|
-
title:
|
|
4297
|
-
title_source:
|
|
4329
|
+
title: import_zod36.z.string().max(2e3),
|
|
4330
|
+
title_source: import_zod36.z.enum(["user", "auto"]),
|
|
4298
4331
|
/** Where the right name came from: a window, "matrx", or "ledger" (decided earlier). */
|
|
4299
|
-
decided_from:
|
|
4300
|
-
kind:
|
|
4301
|
-
windows:
|
|
4302
|
-
differs_in:
|
|
4332
|
+
decided_from: import_zod36.z.string().max(64),
|
|
4333
|
+
kind: import_zod36.z.enum(["user_vs_auto", "user_vs_user", "auto_vs_auto", "source_only"]),
|
|
4334
|
+
windows: import_zod36.z.array(ChatPlace).max(200),
|
|
4335
|
+
differs_in: import_zod36.z.array(TitleCopies).max(200)
|
|
4303
4336
|
});
|
|
4304
|
-
StaleTitleWindow =
|
|
4337
|
+
StaleTitleWindow = import_zod36.z.strictObject({
|
|
4305
4338
|
window: ChatPlace,
|
|
4306
4339
|
/** First and latest time (ms) it was seen writing an old name back. */
|
|
4307
4340
|
since_ms: nonNegInt,
|
|
4308
4341
|
last_ms: nonNegInt
|
|
4309
4342
|
});
|
|
4310
|
-
AppsChatsTitlesCheckParams =
|
|
4311
|
-
AppsChatsTitlesCheckResult =
|
|
4343
|
+
AppsChatsTitlesCheckParams = import_zod36.z.strictObject({ app_key: AppKey });
|
|
4344
|
+
AppsChatsTitlesCheckResult = import_zod36.z.strictObject({
|
|
4312
4345
|
app_key: AppKey,
|
|
4313
4346
|
chats_total: nonNegInt,
|
|
4314
4347
|
chats_in_several_windows: nonNegInt,
|
|
4315
4348
|
/** Chats with a different name in some window (or in Matrx). */
|
|
4316
4349
|
chats_with_a_different_name: nonNegInt,
|
|
4317
4350
|
copies_to_write: nonNegInt,
|
|
4318
|
-
chats:
|
|
4351
|
+
chats: import_zod36.z.array(TitleMismatch).max(5e3),
|
|
4319
4352
|
/** Windows that keep writing old names back (each is fixed every pass; reloading it, Cmd+R, stops it). Since 1.33. */
|
|
4320
|
-
stale_windows:
|
|
4353
|
+
stale_windows: import_zod36.z.array(StaleTitleWindow).max(200).optional()
|
|
4321
4354
|
});
|
|
4322
|
-
AppsChatsTitlesPushParams =
|
|
4323
|
-
AppsChatsTitlesPushResult =
|
|
4355
|
+
AppsChatsTitlesPushParams = import_zod36.z.strictObject({ app_key: AppKey, chat_id: ChatId.optional(), dry_run: import_zod36.z.boolean().optional() });
|
|
4356
|
+
AppsChatsTitlesPushResult = import_zod36.z.strictObject({
|
|
4324
4357
|
app_key: AppKey,
|
|
4325
4358
|
/** Record files rewritten (title and titleSource only, each backed up first). */
|
|
4326
4359
|
written: nonNegInt,
|
|
@@ -4330,243 +4363,243 @@ var init_apps_accounts = __esm({
|
|
|
4330
4363
|
/** Still different after the push (dry_run: would be written). */
|
|
4331
4364
|
chats_with_a_different_name: nonNegInt
|
|
4332
4365
|
});
|
|
4333
|
-
AppsChatsOpenParams =
|
|
4334
|
-
SpendSplit =
|
|
4335
|
-
SpendScopes =
|
|
4336
|
-
SpendAccount =
|
|
4337
|
-
account:
|
|
4366
|
+
AppsChatsOpenParams = import_zod36.z.strictObject({ app_key: AppKey, chat_id: ChatId, window: ChatPlace.optional() });
|
|
4367
|
+
SpendSplit = import_zod36.z.strictObject({ main: import_zod36.z.number(), helpers: import_zod36.z.number() });
|
|
4368
|
+
SpendScopes = import_zod36.z.strictObject({ today: SpendSplit, week: SpendSplit });
|
|
4369
|
+
SpendAccount = import_zod36.z.strictObject({
|
|
4370
|
+
account: import_zod36.z.string().max(320),
|
|
4338
4371
|
spend: SpendScopes,
|
|
4339
|
-
last_hour:
|
|
4340
|
-
last_5h:
|
|
4341
|
-
five_hour:
|
|
4342
|
-
weekly:
|
|
4372
|
+
last_hour: import_zod36.z.number().nullable(),
|
|
4373
|
+
last_5h: import_zod36.z.number().nullable(),
|
|
4374
|
+
five_hour: import_zod36.z.number().nullable(),
|
|
4375
|
+
weekly: import_zod36.z.number().nullable(),
|
|
4343
4376
|
as_of_ms: epochMs.nullable(),
|
|
4344
4377
|
weekly_resets_at_ms: epochMs.nullable(),
|
|
4345
4378
|
/** When the 5-hour or weekly limit is projected to be reached at the current burn. */
|
|
4346
4379
|
five_hour_full_at_ms: epochMs.nullable(),
|
|
4347
4380
|
weekly_full_at_ms: epochMs.nullable(),
|
|
4348
4381
|
/** The reading is too old to project. */
|
|
4349
|
-
stale:
|
|
4382
|
+
stale: import_zod36.z.boolean()
|
|
4350
4383
|
});
|
|
4351
|
-
SpendModel =
|
|
4352
|
-
SpendChat =
|
|
4384
|
+
SpendModel = import_zod36.z.strictObject({ model: import_zod36.z.string().max(120), name: import_zod36.z.string().max(120), spend: SpendScopes });
|
|
4385
|
+
SpendChat = import_zod36.z.strictObject({
|
|
4353
4386
|
id: ChatId,
|
|
4354
|
-
title:
|
|
4355
|
-
repo:
|
|
4356
|
-
window:
|
|
4387
|
+
title: import_zod36.z.string().max(1e3),
|
|
4388
|
+
repo: import_zod36.z.string().max(200).nullable(),
|
|
4389
|
+
window: import_zod36.z.string().max(64).nullable(),
|
|
4357
4390
|
spend: SpendScopes,
|
|
4358
4391
|
helpers: nonNegInt,
|
|
4359
4392
|
/** 1.78: the person hid this chat from Matrx's lists (our Hide, as on ChatRow.hidden); absent = shown. */
|
|
4360
|
-
hidden:
|
|
4393
|
+
hidden: import_zod36.z.boolean().optional()
|
|
4361
4394
|
});
|
|
4362
|
-
SpendHelper =
|
|
4363
|
-
SpendLive =
|
|
4395
|
+
SpendHelper = import_zod36.z.strictObject({ model: import_zod36.z.string().max(120), steps: nonNegInt, over_steps: import_zod36.z.boolean(), description: import_zod36.z.string().max(400) });
|
|
4396
|
+
SpendLive = import_zod36.z.strictObject({
|
|
4364
4397
|
id: ChatId,
|
|
4365
|
-
title:
|
|
4366
|
-
window:
|
|
4367
|
-
helpers:
|
|
4398
|
+
title: import_zod36.z.string().max(1e3),
|
|
4399
|
+
window: import_zod36.z.string().max(64).nullable(),
|
|
4400
|
+
helpers: import_zod36.z.array(SpendHelper).max(200),
|
|
4368
4401
|
/** 1.78: the person hid this chat from Matrx's lists (our Hide, as on ChatRow.hidden); absent = shown. */
|
|
4369
|
-
hidden:
|
|
4402
|
+
hidden: import_zod36.z.boolean().optional()
|
|
4370
4403
|
});
|
|
4371
|
-
SpendIdleScope =
|
|
4372
|
-
SpendIdle =
|
|
4404
|
+
SpendIdleScope = import_zod36.z.strictObject({ count: nonNegInt, tokens: nonNegInt, cost: import_zod36.z.number(), avoidable: import_zod36.z.number() });
|
|
4405
|
+
SpendIdle = import_zod36.z.strictObject({
|
|
4373
4406
|
id: ChatId,
|
|
4374
|
-
chat:
|
|
4375
|
-
who:
|
|
4407
|
+
chat: import_zod36.z.string().max(1e3),
|
|
4408
|
+
who: import_zod36.z.string().max(400),
|
|
4376
4409
|
today: SpendIdleScope,
|
|
4377
4410
|
week: SpendIdleScope,
|
|
4378
4411
|
last_ms: epochMs,
|
|
4379
4412
|
/** 1.78: the person hid this chat from Matrx's lists (our Hide, as on ChatRow.hidden); absent = shown. */
|
|
4380
|
-
hidden:
|
|
4413
|
+
hidden: import_zod36.z.boolean().optional()
|
|
4381
4414
|
});
|
|
4382
|
-
SpendStart =
|
|
4383
|
-
SpendDay =
|
|
4384
|
-
AppsSpendParams =
|
|
4385
|
-
AppsSpendResult =
|
|
4415
|
+
SpendStart = import_zod36.z.strictObject({ repo: import_zod36.z.string().max(200), count: nonNegInt, median: nonNegInt, latest: import_zod36.z.array(nonNegInt).max(20), alarm: import_zod36.z.string().max(400).nullable() });
|
|
4416
|
+
SpendDay = import_zod36.z.strictObject({ date: import_zod36.z.string().regex(/^\d{4}-\d{2}-\d{2}$/), main: import_zod36.z.number(), helpers: import_zod36.z.number() });
|
|
4417
|
+
AppsSpendParams = import_zod36.z.strictObject({ app_key: AppKey });
|
|
4418
|
+
AppsSpendResult = import_zod36.z.strictObject({
|
|
4386
4419
|
app_key: AppKey,
|
|
4387
4420
|
/** False while older chats are still being read. */
|
|
4388
|
-
complete:
|
|
4389
|
-
today_total:
|
|
4390
|
-
week_total:
|
|
4391
|
-
idle_today:
|
|
4392
|
-
idle_week:
|
|
4421
|
+
complete: import_zod36.z.boolean(),
|
|
4422
|
+
today_total: import_zod36.z.number(),
|
|
4423
|
+
week_total: import_zod36.z.number(),
|
|
4424
|
+
idle_today: import_zod36.z.number(),
|
|
4425
|
+
idle_week: import_zod36.z.number(),
|
|
4393
4426
|
/** Models with no known list price. */
|
|
4394
|
-
unpriced:
|
|
4427
|
+
unpriced: import_zod36.z.array(import_zod36.z.string().max(120)).max(100),
|
|
4395
4428
|
/** Helpers past their step budget, unusual starting sizes. */
|
|
4396
|
-
alarms:
|
|
4397
|
-
live:
|
|
4398
|
-
accounts:
|
|
4399
|
-
models:
|
|
4429
|
+
alarms: import_zod36.z.array(import_zod36.z.string().max(400)).max(200),
|
|
4430
|
+
live: import_zod36.z.array(SpendLive).max(200),
|
|
4431
|
+
accounts: import_zod36.z.array(SpendAccount).max(200),
|
|
4432
|
+
models: import_zod36.z.array(SpendModel).max(100),
|
|
4400
4433
|
/** (1.24) The last 7 days, oldest first (today last). */
|
|
4401
|
-
days:
|
|
4402
|
-
chats:
|
|
4403
|
-
idle:
|
|
4404
|
-
starts:
|
|
4405
|
-
});
|
|
4406
|
-
AppsSyncStatusParams =
|
|
4407
|
-
AppsSyncStatusResult =
|
|
4408
|
-
healthy:
|
|
4409
|
-
summary:
|
|
4410
|
-
problems:
|
|
4411
|
-
warnings:
|
|
4434
|
+
days: import_zod36.z.array(SpendDay).max(14).optional(),
|
|
4435
|
+
chats: import_zod36.z.array(SpendChat).max(500),
|
|
4436
|
+
idle: import_zod36.z.array(SpendIdle).max(500),
|
|
4437
|
+
starts: import_zod36.z.array(SpendStart).max(200)
|
|
4438
|
+
});
|
|
4439
|
+
AppsSyncStatusParams = import_zod36.z.strictObject({ app_key: AppKey });
|
|
4440
|
+
AppsSyncStatusResult = import_zod36.z.strictObject({
|
|
4441
|
+
healthy: import_zod36.z.boolean(),
|
|
4442
|
+
summary: import_zod36.z.string().max(400),
|
|
4443
|
+
problems: import_zod36.z.array(import_zod36.z.string().max(400)).max(200),
|
|
4444
|
+
warnings: import_zod36.z.array(import_zod36.z.string().max(400)).max(200),
|
|
4412
4445
|
/** Accounts seen with no saved name yet (Save account names fixes them). */
|
|
4413
|
-
unnamed_accounts:
|
|
4446
|
+
unnamed_accounts: import_zod36.z.array(import_zod36.z.string().max(80)).max(200),
|
|
4414
4447
|
/** The full report. */
|
|
4415
|
-
output:
|
|
4416
|
-
});
|
|
4417
|
-
AppsSyncRunParams =
|
|
4418
|
-
AppsWindowsProcessesParams =
|
|
4419
|
-
AppsWindowsProcessesResult =
|
|
4420
|
-
AppsWindowsAddParams =
|
|
4421
|
-
AppsWindowsSaveNamesParams =
|
|
4422
|
-
AppsWindowsUpdateStateParams =
|
|
4423
|
-
AppsWindowsUpdateStateResult =
|
|
4448
|
+
output: import_zod36.z.string().max(2e5)
|
|
4449
|
+
});
|
|
4450
|
+
AppsSyncRunParams = import_zod36.z.strictObject({ app_key: AppKey });
|
|
4451
|
+
AppsWindowsProcessesParams = import_zod36.z.strictObject({ app_key: AppKey });
|
|
4452
|
+
AppsWindowsProcessesResult = import_zod36.z.strictObject({ processes: import_zod36.z.array(import_zod36.z.string().max(2e3)).max(2e3) });
|
|
4453
|
+
AppsWindowsAddParams = import_zod36.z.strictObject({ app_key: AppKey, window: ChatPlace, email: import_zod36.z.string().min(3).max(320) });
|
|
4454
|
+
AppsWindowsSaveNamesParams = import_zod36.z.strictObject({ app_key: AppKey });
|
|
4455
|
+
AppsWindowsUpdateStateParams = import_zod36.z.strictObject({ app_key: AppKey });
|
|
4456
|
+
AppsWindowsUpdateStateResult = import_zod36.z.strictObject({
|
|
4424
4457
|
app_key: AppKey,
|
|
4425
|
-
pending:
|
|
4458
|
+
pending: import_zod36.z.boolean(),
|
|
4426
4459
|
/** The downloaded release's name (Claude: "Claude 2.31226.1"), when the app's log names it. */
|
|
4427
|
-
version:
|
|
4460
|
+
version: import_zod36.z.string().max(120).nullable(),
|
|
4428
4461
|
/** When the update became pending (the download's time), when known. */
|
|
4429
4462
|
since_ms: epochMs.nullable(),
|
|
4430
4463
|
/** Windows open when the update became pending (or last seen open) that are closed now. */
|
|
4431
|
-
closed:
|
|
4464
|
+
closed: import_zod36.z.array(ChatPlace).max(200),
|
|
4432
4465
|
/**
|
|
4433
4466
|
* Since 1.27: the windows in `closed` that the update itself quit (the app's log records a quit for
|
|
4434
4467
|
* the update within a minute of when each was last seen running). Absent: not known.
|
|
4435
4468
|
*/
|
|
4436
|
-
closed_by_update:
|
|
4469
|
+
closed_by_update: import_zod36.z.array(ChatPlace).max(200).optional()
|
|
4437
4470
|
});
|
|
4438
|
-
AppsWindowsReopenParams =
|
|
4439
|
-
AppsWindowsReopenResult =
|
|
4440
|
-
AppsWindowsUpdateAndReopenParams =
|
|
4441
|
-
AppsWindowsUpdateAndReopenResult =
|
|
4442
|
-
message:
|
|
4471
|
+
AppsWindowsReopenParams = import_zod36.z.strictObject({ app_key: AppKey, windows: import_zod36.z.array(ChatPlace).min(1).max(200) });
|
|
4472
|
+
AppsWindowsReopenResult = import_zod36.z.strictObject({ message: import_zod36.z.string().max(400), opened: import_zod36.z.array(ChatPlace).max(200) });
|
|
4473
|
+
AppsWindowsUpdateAndReopenParams = import_zod36.z.strictObject({ app_key: AppKey, force: import_zod36.z.boolean().default(false), dry_run: import_zod36.z.boolean().default(false) });
|
|
4474
|
+
AppsWindowsUpdateAndReopenResult = import_zod36.z.strictObject({
|
|
4475
|
+
message: import_zod36.z.string().max(400),
|
|
4443
4476
|
/** Windows quit (with dry_run: to be quit). */
|
|
4444
|
-
quit:
|
|
4477
|
+
quit: import_zod36.z.array(ChatPlace).max(200),
|
|
4445
4478
|
/** Windows reopened (with dry_run: to be reopened), main first. */
|
|
4446
|
-
reopened:
|
|
4479
|
+
reopened: import_zod36.z.array(ChatPlace).max(200),
|
|
4447
4480
|
/** The version installed, null when the install did not happen (or dry_run). */
|
|
4448
|
-
installed_version:
|
|
4481
|
+
installed_version: import_zod36.z.string().max(64).nullable()
|
|
4449
4482
|
});
|
|
4450
|
-
WeightProcess =
|
|
4451
|
-
WeightSession =
|
|
4483
|
+
WeightProcess = import_zod36.z.strictObject({ cmd: import_zod36.z.string().max(200), gb: import_zod36.z.number(), cpu: import_zod36.z.number() });
|
|
4484
|
+
WeightSession = import_zod36.z.strictObject({
|
|
4452
4485
|
/** The chat's id (its --resume); null for a new chat with no transcript yet. */
|
|
4453
4486
|
id: ChatId.nullable(),
|
|
4454
4487
|
/** Every window it runs in ("main", "work"); two or more is a duplicate. */
|
|
4455
|
-
windows:
|
|
4488
|
+
windows: import_zod36.z.array(ChatPlace).max(20),
|
|
4456
4489
|
/** Hours since its last reply; 0 while working; null when not known (a new chat). */
|
|
4457
|
-
idle_h:
|
|
4490
|
+
idle_h: import_zod36.z.number().nullable(),
|
|
4458
4491
|
/** The engine's word: waiting, idle, working, new. */
|
|
4459
|
-
state:
|
|
4460
|
-
title:
|
|
4461
|
-
gb:
|
|
4462
|
-
cpu:
|
|
4492
|
+
state: import_zod36.z.string().max(40),
|
|
4493
|
+
title: import_zod36.z.string().max(1e3),
|
|
4494
|
+
gb: import_zod36.z.number(),
|
|
4495
|
+
cpu: import_zod36.z.number(),
|
|
4463
4496
|
procs: nonNegInt,
|
|
4464
4497
|
/** The heaviest processes of its tree, heaviest first. */
|
|
4465
|
-
top:
|
|
4498
|
+
top: import_zod36.z.array(WeightProcess).max(10),
|
|
4466
4499
|
/** The engine's verdicts: "OLD+HEAVY", "BURNING IDLE", "dup". */
|
|
4467
|
-
flags:
|
|
4500
|
+
flags: import_zod36.z.array(import_zod36.z.string().max(40)).max(10),
|
|
4468
4501
|
/** Idle hours x (GB + cores now): the engine's sort order. */
|
|
4469
|
-
score:
|
|
4470
|
-
pids:
|
|
4471
|
-
});
|
|
4472
|
-
WeightOrphan =
|
|
4473
|
-
pid:
|
|
4474
|
-
age_h:
|
|
4475
|
-
cmd:
|
|
4476
|
-
args:
|
|
4477
|
-
gb:
|
|
4478
|
-
cpu:
|
|
4502
|
+
score: import_zod36.z.number(),
|
|
4503
|
+
pids: import_zod36.z.array(import_zod36.z.int().min(1)).max(50)
|
|
4504
|
+
});
|
|
4505
|
+
WeightOrphan = import_zod36.z.strictObject({
|
|
4506
|
+
pid: import_zod36.z.int().min(1),
|
|
4507
|
+
age_h: import_zod36.z.number(),
|
|
4508
|
+
cmd: import_zod36.z.string().max(200),
|
|
4509
|
+
args: import_zod36.z.string().max(2e3),
|
|
4510
|
+
gb: import_zod36.z.number(),
|
|
4511
|
+
cpu: import_zod36.z.number(),
|
|
4479
4512
|
procs: nonNegInt,
|
|
4480
|
-
top:
|
|
4513
|
+
top: import_zod36.z.array(WeightProcess).max(10)
|
|
4481
4514
|
});
|
|
4482
|
-
WeightMachine =
|
|
4515
|
+
WeightMachine = import_zod36.z.strictObject({
|
|
4483
4516
|
procs: nonNegInt,
|
|
4484
4517
|
/** Every process's memory added up, GB. */
|
|
4485
|
-
gb:
|
|
4518
|
+
gb: import_zod36.z.number(),
|
|
4486
4519
|
/** Cores busy now (every process's CPU / 100). */
|
|
4487
|
-
cpu_cores:
|
|
4520
|
+
cpu_cores: import_zod36.z.number(),
|
|
4488
4521
|
/** Load over 1, 5 and 15 minutes. */
|
|
4489
|
-
load:
|
|
4522
|
+
load: import_zod36.z.array(import_zod36.z.number()).max(3).nullable(),
|
|
4490
4523
|
cores: nonNegInt.nullable(),
|
|
4491
|
-
ram_gb:
|
|
4492
|
-
free_gb:
|
|
4493
|
-
compressed_gb:
|
|
4494
|
-
swap_used_gb:
|
|
4524
|
+
ram_gb: import_zod36.z.number().nullable(),
|
|
4525
|
+
free_gb: import_zod36.z.number().nullable(),
|
|
4526
|
+
compressed_gb: import_zod36.z.number().nullable(),
|
|
4527
|
+
swap_used_gb: import_zod36.z.number().nullable(),
|
|
4495
4528
|
/** The kernel's memory pressure level: 1 normal, 2 warning, 4 critical. */
|
|
4496
4529
|
pressure: nonNegInt.nullable()
|
|
4497
4530
|
});
|
|
4498
|
-
WeightGuardStop =
|
|
4499
|
-
WeightGuard =
|
|
4500
|
-
WeightThresholds =
|
|
4501
|
-
WeightTotals =
|
|
4502
|
-
AppsWeightParams =
|
|
4503
|
-
AppsWeightResult =
|
|
4531
|
+
WeightGuardStop = import_zod36.z.strictObject({ at_ms: epochMs.nullable(), gb: import_zod36.z.number().nullable(), reason: import_zod36.z.string().max(400).nullable(), kind: import_zod36.z.string().max(80).nullable(), session_id: import_zod36.z.string().max(128).nullable() });
|
|
4532
|
+
WeightGuard = import_zod36.z.strictObject({ daemon_alive: import_zod36.z.boolean(), stops_24h: nonNegInt, last_stops: import_zod36.z.array(WeightGuardStop).max(50) });
|
|
4533
|
+
WeightThresholds = import_zod36.z.strictObject({ min_idle_h: import_zod36.z.number(), min_gb: import_zod36.z.number(), min_cpu: import_zod36.z.number() });
|
|
4534
|
+
WeightTotals = import_zod36.z.strictObject({ sessions: nonNegInt, session_gb: import_zod36.z.number(), session_cores: import_zod36.z.number(), flagged: nonNegInt, flagged_gb: import_zod36.z.number(), orphan_gb: import_zod36.z.number(), orphan_cores: import_zod36.z.number() });
|
|
4535
|
+
AppsWeightParams = import_zod36.z.strictObject({ app_key: AppKey, fresh: import_zod36.z.boolean().optional() });
|
|
4536
|
+
AppsWeightResult = import_zod36.z.strictObject({
|
|
4504
4537
|
app_key: AppKey,
|
|
4505
4538
|
/** When the engine took this reading. */
|
|
4506
4539
|
taken_at_ms: epochMs,
|
|
4507
|
-
sample_s:
|
|
4540
|
+
sample_s: import_zod36.z.number(),
|
|
4508
4541
|
thresholds: WeightThresholds,
|
|
4509
4542
|
machine: WeightMachine,
|
|
4510
4543
|
/** Null when this computer has never run the machine guard. */
|
|
4511
4544
|
guard: WeightGuard.nullable(),
|
|
4512
4545
|
/** Every session, highest score first. */
|
|
4513
|
-
sessions:
|
|
4514
|
-
orphans:
|
|
4546
|
+
sessions: import_zod36.z.array(WeightSession).max(500),
|
|
4547
|
+
orphans: import_zod36.z.array(WeightOrphan).max(500),
|
|
4515
4548
|
totals: WeightTotals,
|
|
4516
4549
|
/** When the answer was read (the last reading answers at once) and whether a newer one is being taken. */
|
|
4517
4550
|
as_of_ms: epochMs.optional(),
|
|
4518
|
-
refreshing:
|
|
4551
|
+
refreshing: import_zod36.z.boolean().optional()
|
|
4519
4552
|
});
|
|
4520
|
-
AppsChatsCopyToAccountParams =
|
|
4553
|
+
AppsChatsCopyToAccountParams = import_zod36.z.strictObject({
|
|
4521
4554
|
app_key: AppKey,
|
|
4522
4555
|
origin: ChatPlace,
|
|
4523
4556
|
target: ChatPlace,
|
|
4524
|
-
chat_ids:
|
|
4525
|
-
mode:
|
|
4526
|
-
restart:
|
|
4557
|
+
chat_ids: import_zod36.z.array(ChatId).min(1).max(500),
|
|
4558
|
+
mode: import_zod36.z.enum(["copy", "move"]).default("copy"),
|
|
4559
|
+
restart: import_zod36.z.enum(["queued", "restart_verify"]).default("queued"),
|
|
4527
4560
|
/** Put each chat in the target group named as its origin group (default true). */
|
|
4528
|
-
mirror_groups:
|
|
4561
|
+
mirror_groups: import_zod36.z.boolean().default(true),
|
|
4529
4562
|
/** Pin in the target the chats pinned in the origin (default true). */
|
|
4530
|
-
pins_follow:
|
|
4563
|
+
pins_follow: import_zod36.z.boolean().default(true),
|
|
4531
4564
|
/** A copy: group them in the origin under this name ("Copied to <target>"). */
|
|
4532
|
-
source_group:
|
|
4565
|
+
source_group: import_zod36.z.string().trim().min(1).max(200).optional()
|
|
4533
4566
|
});
|
|
4534
|
-
CopiedChat =
|
|
4567
|
+
CopiedChat = import_zod36.z.strictObject({
|
|
4535
4568
|
chat_id: ChatId,
|
|
4536
|
-
title:
|
|
4537
|
-
outcome:
|
|
4569
|
+
title: import_zod36.z.string().max(500),
|
|
4570
|
+
outcome: import_zod36.z.enum(["copied", "moved", "already", "skipped"]),
|
|
4538
4571
|
/** The target group it was put in (its origin group's name), or null. */
|
|
4539
|
-
group:
|
|
4540
|
-
group_state:
|
|
4541
|
-
pinned:
|
|
4542
|
-
pin_state:
|
|
4572
|
+
group: import_zod36.z.string().max(200).nullable(),
|
|
4573
|
+
group_state: import_zod36.z.enum(["now", "next_close", "failed"]).nullable(),
|
|
4574
|
+
pinned: import_zod36.z.boolean(),
|
|
4575
|
+
pin_state: import_zod36.z.enum(["now", "next_close", "failed"]).nullable(),
|
|
4543
4576
|
/** The read-back: verified, waiting for a window to close (queued), or failed. */
|
|
4544
|
-
state:
|
|
4545
|
-
reason:
|
|
4546
|
-
});
|
|
4547
|
-
CopyReopened =
|
|
4548
|
-
CopyRestart =
|
|
4549
|
-
asked:
|
|
4550
|
-
done:
|
|
4551
|
-
windows:
|
|
4552
|
-
reason:
|
|
4577
|
+
state: import_zod36.z.enum(["verified", "queued", "failed"]),
|
|
4578
|
+
reason: import_zod36.z.string().max(400).nullable()
|
|
4579
|
+
});
|
|
4580
|
+
CopyReopened = import_zod36.z.strictObject({ window: ChatPlace, ok: import_zod36.z.boolean(), reason: import_zod36.z.string().max(400).nullable() });
|
|
4581
|
+
CopyRestart = import_zod36.z.strictObject({
|
|
4582
|
+
asked: import_zod36.z.enum(["queued", "restart_verify"]),
|
|
4583
|
+
done: import_zod36.z.enum(["queued", "restart_verify"]),
|
|
4584
|
+
windows: import_zod36.z.array(ChatPlace).max(2),
|
|
4585
|
+
reason: import_zod36.z.string().max(400).nullable(),
|
|
4553
4586
|
/** 1.60: each closed window's reopen outcome (absent from a 1.59 core, and when no window was closed): `ok: false` is a window that did not come back. */
|
|
4554
|
-
reopened:
|
|
4587
|
+
reopened: import_zod36.z.array(CopyReopened).max(2).optional()
|
|
4555
4588
|
});
|
|
4556
|
-
AppsChatsCopyToAccountResult =
|
|
4557
|
-
message:
|
|
4589
|
+
AppsChatsCopyToAccountResult = import_zod36.z.strictObject({
|
|
4590
|
+
message: import_zod36.z.string().max(400),
|
|
4558
4591
|
origin: ChatPlace,
|
|
4559
4592
|
target: ChatPlace,
|
|
4560
|
-
mode:
|
|
4593
|
+
mode: import_zod36.z.enum(["copy", "move"]),
|
|
4561
4594
|
/** The marker the chats are filed under ("From <origin>"), for Bring back. */
|
|
4562
|
-
project:
|
|
4595
|
+
project: import_zod36.z.strictObject({ id: ChatProjectId, name: import_zod36.z.string().max(200) }),
|
|
4563
4596
|
/** The target groups used, by name: made or reused, now or at the next close. */
|
|
4564
|
-
groups:
|
|
4565
|
-
source_group:
|
|
4566
|
-
chats:
|
|
4567
|
-
verified:
|
|
4568
|
-
queued:
|
|
4569
|
-
failed:
|
|
4597
|
+
groups: import_zod36.z.array(import_zod36.z.strictObject({ name: import_zod36.z.string().max(200), chats: import_zod36.z.number().int().nonnegative(), ok: import_zod36.z.boolean(), when: import_zod36.z.enum(["now", "next_close"]).nullable(), reason: import_zod36.z.string().max(400).nullable() })).max(500),
|
|
4598
|
+
source_group: import_zod36.z.strictObject({ name: import_zod36.z.string().max(200), ok: import_zod36.z.boolean(), when: import_zod36.z.enum(["now", "next_close"]).nullable(), reason: import_zod36.z.string().max(400).nullable() }).nullable(),
|
|
4599
|
+
chats: import_zod36.z.array(CopiedChat).max(500),
|
|
4600
|
+
verified: import_zod36.z.number().int().nonnegative(),
|
|
4601
|
+
queued: import_zod36.z.number().int().nonnegative(),
|
|
4602
|
+
failed: import_zod36.z.number().int().nonnegative(),
|
|
4570
4603
|
/** What the restart choice did: "restart_verify" closed and reopened `windows`; a fall back to "queued" says why. */
|
|
4571
4604
|
restart: CopyRestart
|
|
4572
4605
|
});
|
|
@@ -4574,225 +4607,225 @@ var init_apps_accounts = __esm({
|
|
|
4574
4607
|
});
|
|
4575
4608
|
|
|
4576
4609
|
// src/schema/apps-instances.ts
|
|
4577
|
-
var
|
|
4610
|
+
var import_zod37, InstanceStatus, AppInstall, InstanceGap, AppInstance, ElsewhereInstance, AccountResetSource, AccountGap, AccountReadSource, AccountProfile, AccountReadingsKept, AppAccount, AppsInstancesListParams, AppsInstancesListResult, AppsAccountsListParams, AppsAccountsListResult, AppsWindowsSetAccountParams, AppsWindowsForgetParams, ProbeFact, ProbeSource, AppsChatsProbeParams, AppsChatsProbeResult, McpTransport, McpServerRow, SetupFact, SetupItemKind, SetupItem, AppSetup, AppsSetupListParams, AppsSetupListResult;
|
|
4578
4611
|
var init_apps_instances = __esm({
|
|
4579
4612
|
"src/schema/apps-instances.ts"() {
|
|
4580
4613
|
"use strict";
|
|
4581
|
-
|
|
4614
|
+
import_zod37 = require("zod");
|
|
4582
4615
|
init_apps();
|
|
4583
4616
|
init_apps_chats();
|
|
4584
4617
|
init_primitives();
|
|
4585
|
-
InstanceStatus =
|
|
4586
|
-
AppInstall =
|
|
4587
|
-
location:
|
|
4588
|
-
version:
|
|
4618
|
+
InstanceStatus = import_zod37.z.enum(["open", "closed", "wrong_account", "update_waiting", "folder_missing"]);
|
|
4619
|
+
AppInstall = import_zod37.z.strictObject({
|
|
4620
|
+
location: import_zod37.z.string().max(1024),
|
|
4621
|
+
version: import_zod37.z.string().max(80).nullable()
|
|
4589
4622
|
});
|
|
4590
|
-
InstanceGap =
|
|
4591
|
-
AppInstance =
|
|
4623
|
+
InstanceGap = import_zod37.z.enum(["account", "email", "version"]);
|
|
4624
|
+
AppInstance = import_zod37.z.strictObject({
|
|
4592
4625
|
app_key: AppKey,
|
|
4593
4626
|
/** "main", or the instance's name: the same key every window action takes. */
|
|
4594
4627
|
key: ChatPlace,
|
|
4595
|
-
main:
|
|
4628
|
+
main: import_zod37.z.boolean(),
|
|
4596
4629
|
status: InstanceStatus,
|
|
4597
|
-
running:
|
|
4630
|
+
running: import_zod37.z.boolean(),
|
|
4598
4631
|
/** Its process while open. */
|
|
4599
4632
|
pid: nonNegInt.nullable(),
|
|
4600
4633
|
/** Its data folder on this device. */
|
|
4601
|
-
folder:
|
|
4602
|
-
folder_exists:
|
|
4634
|
+
folder: import_zod37.z.string().max(1024).nullable(),
|
|
4635
|
+
folder_exists: import_zod37.z.boolean(),
|
|
4603
4636
|
/** The provider's id of the account signed in there now, when the app records it. */
|
|
4604
|
-
account_id:
|
|
4637
|
+
account_id: import_zod37.z.string().max(200).nullable(),
|
|
4605
4638
|
/** That account's email, when known. */
|
|
4606
|
-
account:
|
|
4639
|
+
account: import_zod37.z.string().max(320).nullable(),
|
|
4607
4640
|
/** The account this instance is kept for (null for main: it signs into any). */
|
|
4608
|
-
meant_for:
|
|
4641
|
+
meant_for: import_zod37.z.string().max(320).nullable(),
|
|
4609
4642
|
/** The version running in it now, or the one it last ran when closed. */
|
|
4610
|
-
version:
|
|
4611
|
-
installed_version:
|
|
4643
|
+
version: import_zod37.z.string().max(80).nullable(),
|
|
4644
|
+
installed_version: import_zod37.z.string().max(80).nullable(),
|
|
4612
4645
|
/** Chats open in it now. */
|
|
4613
4646
|
open_chats: nonNegInt,
|
|
4614
4647
|
launched_ms: epochMs.nullable(),
|
|
4615
4648
|
quit_ms: epochMs.nullable(),
|
|
4616
4649
|
first_launch_ms: epochMs.nullable(),
|
|
4617
4650
|
/** 1.63: what this record still lacks after Matrx filled what it remembered (absent = nothing). */
|
|
4618
|
-
missing:
|
|
4651
|
+
missing: import_zod37.z.array(InstanceGap).max(3).optional()
|
|
4619
4652
|
});
|
|
4620
|
-
ElsewhereInstance =
|
|
4653
|
+
ElsewhereInstance = import_zod37.z.strictObject({
|
|
4621
4654
|
app_key: AppKey,
|
|
4622
4655
|
/** Its key on its own computer ("main", or its name). */
|
|
4623
|
-
key:
|
|
4624
|
-
main:
|
|
4656
|
+
key: import_zod37.z.string().max(120),
|
|
4657
|
+
main: import_zod37.z.boolean(),
|
|
4625
4658
|
/** The computer it is on, by its name in Devices. */
|
|
4626
|
-
computer:
|
|
4659
|
+
computer: import_zod37.z.string().max(200),
|
|
4627
4660
|
/** Its data folder, as that computer shows it (a label: it is not on this computer). */
|
|
4628
|
-
folder:
|
|
4629
|
-
account_id:
|
|
4630
|
-
account:
|
|
4661
|
+
folder: import_zod37.z.string().max(1024).nullable(),
|
|
4662
|
+
account_id: import_zod37.z.string().max(200).nullable(),
|
|
4663
|
+
account: import_zod37.z.string().max(320).nullable(),
|
|
4631
4664
|
/** When that computer last read it. */
|
|
4632
4665
|
seen_ms: epochMs.nullable()
|
|
4633
4666
|
});
|
|
4634
|
-
AccountResetSource =
|
|
4635
|
-
AccountGap =
|
|
4636
|
-
AccountReadSource =
|
|
4637
|
-
AccountProfile =
|
|
4667
|
+
AccountResetSource = import_zod37.z.enum(["app", "usage_history", "your_list"]);
|
|
4668
|
+
AccountGap = import_zod37.z.enum(["email", "plan", "usage"]);
|
|
4669
|
+
AccountReadSource = import_zod37.z.enum(["app", "claude_code"]);
|
|
4670
|
+
AccountProfile = import_zod37.z.strictObject({
|
|
4638
4671
|
/** The person's name on the account. */
|
|
4639
|
-
name:
|
|
4672
|
+
name: import_zod37.z.string().max(200).nullable(),
|
|
4640
4673
|
/** The organization the sign-in is in, and the person's role there. */
|
|
4641
|
-
org_name:
|
|
4642
|
-
org_role:
|
|
4674
|
+
org_name: import_zod37.z.string().max(200).nullable(),
|
|
4675
|
+
org_role: import_zod37.z.string().max(80).nullable(),
|
|
4643
4676
|
/** Claude: the seat tier of a team plan, the rate-limit tier, how it is billed, when a trial ends. */
|
|
4644
|
-
seat_tier:
|
|
4645
|
-
rate_limit_tier:
|
|
4646
|
-
billing:
|
|
4677
|
+
seat_tier: import_zod37.z.string().max(80).nullable(),
|
|
4678
|
+
rate_limit_tier: import_zod37.z.string().max(120).nullable(),
|
|
4679
|
+
billing: import_zod37.z.string().max(80).nullable(),
|
|
4647
4680
|
trial_ends_ms: epochMs.nullable(),
|
|
4648
4681
|
/** Cursor: whether the subscription is active ("active", "canceled", …) as Cursor records it. */
|
|
4649
|
-
subscription:
|
|
4682
|
+
subscription: import_zod37.z.string().max(80).nullable(),
|
|
4650
4683
|
/** Where these facts were read (a short label: "Claude Code's sign-in"). */
|
|
4651
|
-
source:
|
|
4684
|
+
source: import_zod37.z.string().max(200),
|
|
4652
4685
|
/** When the app last fetched them, when it says. */
|
|
4653
4686
|
as_of_ms: epochMs.nullable()
|
|
4654
4687
|
});
|
|
4655
|
-
AccountReadingsKept =
|
|
4656
|
-
kept:
|
|
4688
|
+
AccountReadingsKept = import_zod37.z.strictObject({
|
|
4689
|
+
kept: import_zod37.z.number().int().nonnegative(),
|
|
4657
4690
|
since_ms: epochMs.nullable(),
|
|
4658
|
-
days:
|
|
4691
|
+
days: import_zod37.z.array(import_zod37.z.strictObject({ day_ms: epochMs, weekly: import_zod37.z.number().nullable() })).max(31)
|
|
4659
4692
|
});
|
|
4660
|
-
AppAccount =
|
|
4693
|
+
AppAccount = import_zod37.z.strictObject({
|
|
4661
4694
|
app_key: AppKey,
|
|
4662
4695
|
/** The provider's own account id (Claude's account uuid, ChatGPT's account id); `org:<uuid>` when only its organization is known. */
|
|
4663
|
-
account_id:
|
|
4664
|
-
email:
|
|
4665
|
-
plan:
|
|
4696
|
+
account_id: import_zod37.z.string().max(200),
|
|
4697
|
+
email: import_zod37.z.string().max(320).nullable(),
|
|
4698
|
+
plan: import_zod37.z.string().max(80).nullable(),
|
|
4666
4699
|
/** The provider organizations its readings are filed under. */
|
|
4667
|
-
orgs:
|
|
4700
|
+
orgs: import_zod37.z.array(import_zod37.z.string().max(80)).max(20),
|
|
4668
4701
|
/** Weekly use in percent; 0 once the week reset after the reading. */
|
|
4669
|
-
weekly:
|
|
4670
|
-
weekly_reset_since:
|
|
4702
|
+
weekly: import_zod37.z.number().nullable(),
|
|
4703
|
+
weekly_reset_since: import_zod37.z.boolean(),
|
|
4671
4704
|
weekly_resets_at_ms: epochMs.nullable(),
|
|
4672
4705
|
weekly_reset_source: AccountResetSource.nullable(),
|
|
4673
4706
|
/** 5-hour use in percent; 0 once the 5-hour window passed after the reading. */
|
|
4674
|
-
five_hour:
|
|
4675
|
-
five_hour_reset_since:
|
|
4707
|
+
five_hour: import_zod37.z.number().nullable(),
|
|
4708
|
+
five_hour_reset_since: import_zod37.z.boolean(),
|
|
4676
4709
|
/** The latest the 5-hour window resets. */
|
|
4677
4710
|
five_hour_resets_at_ms: epochMs.nullable(),
|
|
4678
4711
|
/** Claude: extra-usage spend as a percent of its cap. */
|
|
4679
|
-
extra_usage:
|
|
4712
|
+
extra_usage: import_zod37.z.number().nullable(),
|
|
4680
4713
|
/** Codex: the credit balance. */
|
|
4681
|
-
credits:
|
|
4714
|
+
credits: import_zod37.z.number().nullable(),
|
|
4682
4715
|
/** When the newest reading was taken, and in which instance. */
|
|
4683
4716
|
read_at_ms: epochMs.nullable(),
|
|
4684
4717
|
read_in: ChatPlace.nullable(),
|
|
4685
4718
|
/** Instances signed into it now. */
|
|
4686
|
-
instances:
|
|
4719
|
+
instances: import_zod37.z.array(ChatPlace).max(200),
|
|
4687
4720
|
first_seen_ms: epochMs.nullable(),
|
|
4688
4721
|
last_seen_ms: epochMs.nullable(),
|
|
4689
|
-
missing:
|
|
4722
|
+
missing: import_zod37.z.array(AccountGap).max(3),
|
|
4690
4723
|
/** 1.73: who the account is beyond its email (plan details, role, tiers), when the app records it. */
|
|
4691
4724
|
profile: AccountProfile.optional(),
|
|
4692
4725
|
/** 1.73: where the newest reading came from (absent = the app itself). */
|
|
4693
4726
|
read_source: AccountReadSource.optional(),
|
|
4694
4727
|
/** 1.73: Claude Code: the running session's cost as Claude Code estimates it (US dollars), with a Claude Code reading. */
|
|
4695
|
-
session_cost_usd:
|
|
4728
|
+
session_cost_usd: import_zod37.z.number().nonnegative().optional(),
|
|
4696
4729
|
/** 1.79: the readings Matrx kept of this account on this computer (its reading history). */
|
|
4697
4730
|
readings: AccountReadingsKept.optional()
|
|
4698
4731
|
});
|
|
4699
|
-
AppsInstancesListParams =
|
|
4700
|
-
AppsInstancesListResult =
|
|
4732
|
+
AppsInstancesListParams = import_zod37.z.strictObject({ app_key: AppKey, fresh: import_zod37.z.boolean().optional() });
|
|
4733
|
+
AppsInstancesListResult = import_zod37.z.strictObject({
|
|
4701
4734
|
app_key: AppKey,
|
|
4702
4735
|
install: AppInstall.nullable(),
|
|
4703
|
-
instances:
|
|
4736
|
+
instances: import_zod37.z.array(AppInstance).max(200),
|
|
4704
4737
|
/** The rows are right but something around them failed; shown, never hidden. */
|
|
4705
|
-
problem:
|
|
4738
|
+
problem: import_zod37.z.string().max(400).optional(),
|
|
4706
4739
|
as_of_ms: epochMs.optional(),
|
|
4707
|
-
refreshing:
|
|
4740
|
+
refreshing: import_zod37.z.boolean().optional(),
|
|
4708
4741
|
/** 1.71: this computer's name (the Computer of every `instances` row). */
|
|
4709
|
-
computer:
|
|
4742
|
+
computer: import_zod37.z.string().max(200).optional(),
|
|
4710
4743
|
/** 1.71: the person's instances on their other computers, from the database (read only). */
|
|
4711
|
-
elsewhere:
|
|
4744
|
+
elsewhere: import_zod37.z.array(ElsewhereInstance).max(500).optional(),
|
|
4712
4745
|
/** 1.71: the database copy could not be read or written (signed out, offline): the rows are this computer's alone. */
|
|
4713
|
-
shared_problem:
|
|
4746
|
+
shared_problem: import_zod37.z.string().max(200).optional()
|
|
4714
4747
|
});
|
|
4715
|
-
AppsAccountsListParams =
|
|
4716
|
-
AppsAccountsListResult =
|
|
4748
|
+
AppsAccountsListParams = import_zod37.z.strictObject({ app_key: AppKey, fresh: import_zod37.z.boolean().optional() });
|
|
4749
|
+
AppsAccountsListResult = import_zod37.z.strictObject({
|
|
4717
4750
|
app_key: AppKey,
|
|
4718
|
-
accounts:
|
|
4719
|
-
problem:
|
|
4751
|
+
accounts: import_zod37.z.array(AppAccount).max(500),
|
|
4752
|
+
problem: import_zod37.z.string().max(400).optional(),
|
|
4720
4753
|
as_of_ms: epochMs.optional(),
|
|
4721
|
-
refreshing:
|
|
4754
|
+
refreshing: import_zod37.z.boolean().optional(),
|
|
4722
4755
|
/** 1.71: the database copy could not be read or written (signed out, offline): the rows are this computer's memory alone. */
|
|
4723
|
-
shared_problem:
|
|
4724
|
-
});
|
|
4725
|
-
AppsWindowsSetAccountParams =
|
|
4726
|
-
AppsWindowsForgetParams =
|
|
4727
|
-
ProbeFact =
|
|
4728
|
-
ProbeSource =
|
|
4729
|
-
AppsChatsProbeParams =
|
|
4730
|
-
AppsChatsProbeResult =
|
|
4731
|
-
McpTransport =
|
|
4732
|
-
McpServerRow =
|
|
4756
|
+
shared_problem: import_zod37.z.string().max(200).optional()
|
|
4757
|
+
});
|
|
4758
|
+
AppsWindowsSetAccountParams = import_zod37.z.strictObject({ app_key: AppKey, window: ChatPlace, email: import_zod37.z.string().min(3).max(320) });
|
|
4759
|
+
AppsWindowsForgetParams = import_zod37.z.strictObject({ app_key: AppKey, window: ChatPlace });
|
|
4760
|
+
ProbeFact = import_zod37.z.strictObject({ key: import_zod37.z.string().max(200), value: import_zod37.z.string().max(2e3) });
|
|
4761
|
+
ProbeSource = import_zod37.z.strictObject({ source: import_zod37.z.string().max(120), instance: import_zod37.z.string().max(64).nullable(), facts: import_zod37.z.array(ProbeFact).max(500) });
|
|
4762
|
+
AppsChatsProbeParams = import_zod37.z.strictObject({ app_key: AppKey, chat_id: import_zod37.z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/) });
|
|
4763
|
+
AppsChatsProbeResult = import_zod37.z.strictObject({ app_key: AppKey, chat_id: import_zod37.z.string().max(128), sources: import_zod37.z.array(ProbeSource).max(200) });
|
|
4764
|
+
McpTransport = import_zod37.z.enum(["stdio", "http", "sse", "unknown"]);
|
|
4765
|
+
McpServerRow = import_zod37.z.strictObject({
|
|
4733
4766
|
app_key: AppKey,
|
|
4734
4767
|
/** The app's instance whose settings hold it ("main", a home's name). */
|
|
4735
|
-
instance:
|
|
4736
|
-
name:
|
|
4768
|
+
instance: import_zod37.z.string().max(120),
|
|
4769
|
+
name: import_zod37.z.string().max(200),
|
|
4737
4770
|
transport: McpTransport,
|
|
4738
4771
|
/** The URL (scheme, host and path only) or the command and its arguments (secret-looking ones blanked). */
|
|
4739
|
-
target:
|
|
4772
|
+
target: import_zod37.z.string().max(400).nullable(),
|
|
4740
4773
|
/** "user" (every folder), "desktop" (the desktop app), or the folder it is set up for. */
|
|
4741
|
-
scope:
|
|
4774
|
+
scope: import_zod37.z.string().max(400),
|
|
4742
4775
|
/** Turned on or off in the app, when it records it. */
|
|
4743
|
-
enabled:
|
|
4776
|
+
enabled: import_zod37.z.boolean().nullable(),
|
|
4744
4777
|
/** The settings file it was read from. */
|
|
4745
|
-
where:
|
|
4778
|
+
where: import_zod37.z.string().max(400)
|
|
4746
4779
|
});
|
|
4747
|
-
SetupFact =
|
|
4748
|
-
SetupItemKind =
|
|
4749
|
-
SetupItem =
|
|
4780
|
+
SetupFact = import_zod37.z.strictObject({ name: import_zod37.z.string().max(80), value: import_zod37.z.string().max(300) });
|
|
4781
|
+
SetupItemKind = import_zod37.z.enum(["extension", "plugin", "marketplace", "model", "skill"]);
|
|
4782
|
+
SetupItem = import_zod37.z.strictObject({
|
|
4750
4783
|
kind: SetupItemKind,
|
|
4751
|
-
name:
|
|
4752
|
-
version:
|
|
4784
|
+
name: import_zod37.z.string().max(200),
|
|
4785
|
+
version: import_zod37.z.string().max(80).nullable(),
|
|
4753
4786
|
/** Turned on or off, when the app records it. */
|
|
4754
|
-
enabled:
|
|
4787
|
+
enabled: import_zod37.z.boolean().nullable()
|
|
4755
4788
|
});
|
|
4756
|
-
AppSetup =
|
|
4789
|
+
AppSetup = import_zod37.z.strictObject({
|
|
4757
4790
|
app_key: AppKey,
|
|
4758
|
-
instance:
|
|
4791
|
+
instance: import_zod37.z.string().max(120),
|
|
4759
4792
|
/** The folder its settings were read from. */
|
|
4760
|
-
where:
|
|
4761
|
-
facts:
|
|
4762
|
-
items:
|
|
4793
|
+
where: import_zod37.z.string().max(400),
|
|
4794
|
+
facts: import_zod37.z.array(SetupFact).max(60),
|
|
4795
|
+
items: import_zod37.z.array(SetupItem).max(2e3),
|
|
4763
4796
|
/** What could not be read there (shown, never hidden). */
|
|
4764
|
-
problems:
|
|
4797
|
+
problems: import_zod37.z.array(import_zod37.z.string().max(300)).max(20)
|
|
4765
4798
|
});
|
|
4766
|
-
AppsSetupListParams =
|
|
4767
|
-
AppsSetupListResult =
|
|
4768
|
-
setups:
|
|
4769
|
-
mcp:
|
|
4770
|
-
problem:
|
|
4799
|
+
AppsSetupListParams = import_zod37.z.strictObject({ app_key: AppKey.optional() });
|
|
4800
|
+
AppsSetupListResult = import_zod37.z.strictObject({
|
|
4801
|
+
setups: import_zod37.z.array(AppSetup).max(200),
|
|
4802
|
+
mcp: import_zod37.z.array(McpServerRow).max(2e3),
|
|
4803
|
+
problem: import_zod37.z.string().max(400).optional()
|
|
4771
4804
|
});
|
|
4772
4805
|
}
|
|
4773
4806
|
});
|
|
4774
4807
|
|
|
4775
4808
|
// src/schema/browser.ts
|
|
4776
|
-
var
|
|
4809
|
+
var import_zod38, BrowserClientInstance, BrowserKind, BrowserSessionState, BrowserSession, BrowserRegisterParams, BrowserRegisterResult, BrowserCallError, BrowserResultParams, BrowserResultResult, BrowserCallPhase, BrowserProgressParams, BrowserProgressResult, BrowserSessionsParams, BrowserSessionsResult, BrowserDisconnectParams, BrowserDisconnectResult, BrowserSetEnabledParams, BrowserSetEnabledResult, BrowserPairCodeParams, BrowserPairCodeResult, BrowserPairResetParams, BrowserCallParams, BrowserCallResult, BrowserToolMetricsParams, BrowserToolMetric, BrowserToolMetricsResult, BrowserResetCountersParams, BrowserResetCountersResult, BrowserLogParams, BrowserLogMessage, BrowserLogResult, BrowserInvokeEvent, BrowserSessionsChangedEvent, BrowserProgressEvent, DesktopHealth, BrowserPairRequest, BrowserPairResult;
|
|
4777
4810
|
var init_browser = __esm({
|
|
4778
4811
|
"src/schema/browser.ts"() {
|
|
4779
4812
|
"use strict";
|
|
4780
|
-
|
|
4813
|
+
import_zod38 = require("zod");
|
|
4781
4814
|
init_primitives();
|
|
4782
|
-
BrowserClientInstance =
|
|
4783
|
-
BrowserKind =
|
|
4784
|
-
BrowserSessionState =
|
|
4785
|
-
BrowserSession =
|
|
4815
|
+
BrowserClientInstance = import_zod38.z.string().min(1).max(64).regex(/^[A-Za-z0-9_.:-]+$/);
|
|
4816
|
+
BrowserKind = import_zod38.z.enum(["chrome", "edge", "brave", "arc", "opera", "vivaldi", "chromium", "firefox", "other"]);
|
|
4817
|
+
BrowserSessionState = import_zod38.z.enum(["connected", "different_account", "extension_signed_out", "device_signed_out", "unverified"]);
|
|
4818
|
+
BrowserSession = import_zod38.z.strictObject({
|
|
4786
4819
|
client_instance: BrowserClientInstance,
|
|
4787
4820
|
/** What the person sees ("Chrome — Work"), set by the extension. */
|
|
4788
|
-
client_label:
|
|
4821
|
+
client_label: import_zod38.z.string().min(1).max(128),
|
|
4789
4822
|
browser: BrowserKind,
|
|
4790
|
-
extension_version:
|
|
4823
|
+
extension_version: import_zod38.z.string().min(1).max(32),
|
|
4791
4824
|
state: BrowserSessionState,
|
|
4792
4825
|
/** True only for `connected`: an agent's call can reach this session. */
|
|
4793
|
-
routable:
|
|
4826
|
+
routable: import_zod38.z.boolean(),
|
|
4794
4827
|
/** The extension's account email from its token (null when signed out or unknown). */
|
|
4795
|
-
account_email:
|
|
4828
|
+
account_email: import_zod38.z.string().max(320).nullable(),
|
|
4796
4829
|
connected_at_ms: epochMs,
|
|
4797
4830
|
last_call_at_ms: epochMs.nullable(),
|
|
4798
4831
|
calls: nonNegInt,
|
|
@@ -4801,855 +4834,855 @@ var init_browser = __esm({
|
|
|
4801
4834
|
p50_ms: nonNegInt.nullable(),
|
|
4802
4835
|
p95_ms: nonNegInt.nullable(),
|
|
4803
4836
|
/** A call is waiting for the person to confirm it in the browser. */
|
|
4804
|
-
awaiting_confirmation:
|
|
4837
|
+
awaiting_confirmation: import_zod38.z.boolean()
|
|
4805
4838
|
});
|
|
4806
|
-
BrowserRegisterParams =
|
|
4839
|
+
BrowserRegisterParams = import_zod38.z.strictObject({
|
|
4807
4840
|
client_instance: BrowserClientInstance,
|
|
4808
|
-
client_label:
|
|
4841
|
+
client_label: import_zod38.z.string().min(1).max(128),
|
|
4809
4842
|
browser: BrowserKind,
|
|
4810
|
-
extension_version:
|
|
4843
|
+
extension_version: import_zod38.z.string().min(1).max(32),
|
|
4811
4844
|
/** The extension's current AI Matrx access token, checked against the device owner; null when signed out. */
|
|
4812
|
-
account_token:
|
|
4845
|
+
account_token: import_zod38.z.string().min(16).max(8192).nullable()
|
|
4813
4846
|
});
|
|
4814
|
-
BrowserRegisterResult =
|
|
4815
|
-
BrowserCallError =
|
|
4816
|
-
message:
|
|
4847
|
+
BrowserRegisterResult = import_zod38.z.strictObject({ session: BrowserSession });
|
|
4848
|
+
BrowserCallError = import_zod38.z.strictObject({
|
|
4849
|
+
message: import_zod38.z.string().max(1e3),
|
|
4817
4850
|
/** The extension's own error code, when it has one ("tool_not_found", "denied"). */
|
|
4818
|
-
code:
|
|
4851
|
+
code: import_zod38.z.string().max(64).nullable()
|
|
4819
4852
|
});
|
|
4820
|
-
BrowserResultParams =
|
|
4821
|
-
call_id:
|
|
4822
|
-
ok:
|
|
4853
|
+
BrowserResultParams = import_zod38.z.strictObject({
|
|
4854
|
+
call_id: import_zod38.z.string().min(1).max(64),
|
|
4855
|
+
ok: import_zod38.z.boolean(),
|
|
4823
4856
|
/** The tool's result when ok (any JSON). */
|
|
4824
|
-
result:
|
|
4857
|
+
result: import_zod38.z.unknown(),
|
|
4825
4858
|
error: BrowserCallError.nullable()
|
|
4826
4859
|
});
|
|
4827
|
-
BrowserResultResult =
|
|
4828
|
-
BrowserCallPhase =
|
|
4829
|
-
BrowserProgressParams =
|
|
4830
|
-
BrowserProgressResult =
|
|
4831
|
-
BrowserSessionsParams =
|
|
4832
|
-
BrowserSessionsResult =
|
|
4860
|
+
BrowserResultResult = import_zod38.z.strictObject({ accepted: import_zod38.z.boolean() });
|
|
4861
|
+
BrowserCallPhase = import_zod38.z.enum(["awaiting_confirmation", "running"]);
|
|
4862
|
+
BrowserProgressParams = import_zod38.z.strictObject({ call_id: import_zod38.z.string().min(1).max(64), phase: BrowserCallPhase });
|
|
4863
|
+
BrowserProgressResult = import_zod38.z.strictObject({ accepted: import_zod38.z.boolean() });
|
|
4864
|
+
BrowserSessionsParams = import_zod38.z.strictObject({});
|
|
4865
|
+
BrowserSessionsResult = import_zod38.z.strictObject({
|
|
4833
4866
|
/** The person's Browser connection switch. Off: no pairing, no extension sessions. */
|
|
4834
|
-
enabled:
|
|
4867
|
+
enabled: import_zod38.z.boolean(),
|
|
4835
4868
|
/** Whether Matrx 2 is signed in (without an owner no session is routable). */
|
|
4836
|
-
owner_signed_in:
|
|
4837
|
-
sessions:
|
|
4838
|
-
});
|
|
4839
|
-
BrowserDisconnectParams =
|
|
4840
|
-
BrowserDisconnectResult =
|
|
4841
|
-
BrowserSetEnabledParams =
|
|
4842
|
-
BrowserSetEnabledResult =
|
|
4843
|
-
BrowserPairCodeParams =
|
|
4844
|
-
BrowserPairCodeResult =
|
|
4845
|
-
BrowserPairResetParams =
|
|
4846
|
-
BrowserCallParams =
|
|
4847
|
-
tool:
|
|
4848
|
-
args:
|
|
4869
|
+
owner_signed_in: import_zod38.z.boolean(),
|
|
4870
|
+
sessions: import_zod38.z.array(BrowserSession).max(64)
|
|
4871
|
+
});
|
|
4872
|
+
BrowserDisconnectParams = import_zod38.z.strictObject({ client_instance: BrowserClientInstance });
|
|
4873
|
+
BrowserDisconnectResult = import_zod38.z.strictObject({ disconnected: import_zod38.z.boolean() });
|
|
4874
|
+
BrowserSetEnabledParams = import_zod38.z.strictObject({ enabled: import_zod38.z.boolean() });
|
|
4875
|
+
BrowserSetEnabledResult = import_zod38.z.strictObject({ enabled: import_zod38.z.boolean() });
|
|
4876
|
+
BrowserPairCodeParams = import_zod38.z.strictObject({});
|
|
4877
|
+
BrowserPairCodeResult = import_zod38.z.strictObject({ code: import_zod38.z.string().min(16).max(128) });
|
|
4878
|
+
BrowserPairResetParams = import_zod38.z.strictObject({});
|
|
4879
|
+
BrowserCallParams = import_zod38.z.strictObject({
|
|
4880
|
+
tool: import_zod38.z.string().min(1).max(96).regex(/^[a-z][a-z0-9_]*$/),
|
|
4881
|
+
args: import_zod38.z.record(import_zod38.z.string(), import_zod38.z.unknown()),
|
|
4849
4882
|
/** Which session; default: the most recently active routable one (BROWSER ambiguity → CONFLICT). */
|
|
4850
4883
|
client_instance: BrowserClientInstance.optional(),
|
|
4851
4884
|
/** How long to wait, including a person's confirmation; default 120 s. */
|
|
4852
|
-
timeout_ms:
|
|
4885
|
+
timeout_ms: import_zod38.z.int().min(1e3).max(6e5).optional()
|
|
4853
4886
|
});
|
|
4854
|
-
BrowserCallResult =
|
|
4887
|
+
BrowserCallResult = import_zod38.z.strictObject({
|
|
4855
4888
|
client_instance: BrowserClientInstance,
|
|
4856
|
-
result:
|
|
4889
|
+
result: import_zod38.z.unknown(),
|
|
4857
4890
|
duration_ms: nonNegInt
|
|
4858
4891
|
});
|
|
4859
|
-
BrowserToolMetricsParams =
|
|
4860
|
-
BrowserToolMetric =
|
|
4861
|
-
tool:
|
|
4892
|
+
BrowserToolMetricsParams = import_zod38.z.strictObject({ client_instance: BrowserClientInstance });
|
|
4893
|
+
BrowserToolMetric = import_zod38.z.strictObject({
|
|
4894
|
+
tool: import_zod38.z.string().max(256),
|
|
4862
4895
|
calls: nonNegInt,
|
|
4863
4896
|
errors: nonNegInt,
|
|
4864
4897
|
/** Over the last 200 answered calls; null before the first answer. */
|
|
4865
4898
|
p50_ms: nonNegInt.nullable(),
|
|
4866
4899
|
p95_ms: nonNegInt.nullable(),
|
|
4867
4900
|
last_call_at_ms: epochMs.nullable(),
|
|
4868
|
-
last_error:
|
|
4901
|
+
last_error: import_zod38.z.string().max(2048).nullable()
|
|
4869
4902
|
});
|
|
4870
|
-
BrowserToolMetricsResult =
|
|
4871
|
-
BrowserResetCountersParams =
|
|
4872
|
-
BrowserResetCountersResult =
|
|
4873
|
-
BrowserLogParams =
|
|
4903
|
+
BrowserToolMetricsResult = import_zod38.z.strictObject({ client_instance: import_zod38.z.string(), tools: import_zod38.z.array(BrowserToolMetric) });
|
|
4904
|
+
BrowserResetCountersParams = import_zod38.z.strictObject({ client_instance: BrowserClientInstance });
|
|
4905
|
+
BrowserResetCountersResult = import_zod38.z.strictObject({ reset: import_zod38.z.boolean() });
|
|
4906
|
+
BrowserLogParams = import_zod38.z.strictObject({
|
|
4874
4907
|
/** Only messages after this seq (0: from the oldest kept; the core keeps the last 500). */
|
|
4875
4908
|
after_seq: nonNegInt.default(0),
|
|
4876
|
-
limit:
|
|
4909
|
+
limit: import_zod38.z.int().min(1).max(500).default(500)
|
|
4877
4910
|
});
|
|
4878
|
-
BrowserLogMessage =
|
|
4911
|
+
BrowserLogMessage = import_zod38.z.strictObject({
|
|
4879
4912
|
seq: nonNegInt,
|
|
4880
4913
|
at_ms: epochMs,
|
|
4881
|
-
direction:
|
|
4882
|
-
client_instance:
|
|
4883
|
-
kind:
|
|
4884
|
-
tool:
|
|
4885
|
-
call_id:
|
|
4886
|
-
ok:
|
|
4887
|
-
detail:
|
|
4888
|
-
});
|
|
4889
|
-
BrowserLogResult =
|
|
4890
|
-
messages:
|
|
4914
|
+
direction: import_zod38.z.enum(["to_browser", "from_browser", "core"]),
|
|
4915
|
+
client_instance: import_zod38.z.string(),
|
|
4916
|
+
kind: import_zod38.z.enum(["register", "invoke", "result", "progress", "timeout", "closed"]),
|
|
4917
|
+
tool: import_zod38.z.string().nullable(),
|
|
4918
|
+
call_id: import_zod38.z.string().nullable(),
|
|
4919
|
+
ok: import_zod38.z.boolean().nullable(),
|
|
4920
|
+
detail: import_zod38.z.string().max(1024)
|
|
4921
|
+
});
|
|
4922
|
+
BrowserLogResult = import_zod38.z.strictObject({
|
|
4923
|
+
messages: import_zod38.z.array(BrowserLogMessage),
|
|
4891
4924
|
/** The newest seq the core has written (pass it back as after_seq to follow the log). */
|
|
4892
4925
|
last_seq: nonNegInt
|
|
4893
4926
|
});
|
|
4894
|
-
BrowserInvokeEvent =
|
|
4895
|
-
call_id:
|
|
4896
|
-
tool:
|
|
4897
|
-
args:
|
|
4927
|
+
BrowserInvokeEvent = import_zod38.z.strictObject({
|
|
4928
|
+
call_id: import_zod38.z.string().min(1).max(64),
|
|
4929
|
+
tool: import_zod38.z.string().min(1).max(96),
|
|
4930
|
+
args: import_zod38.z.record(import_zod38.z.string(), import_zod38.z.unknown()),
|
|
4898
4931
|
deadline_ms: epochMs
|
|
4899
4932
|
});
|
|
4900
|
-
BrowserSessionsChangedEvent =
|
|
4901
|
-
BrowserProgressEvent =
|
|
4902
|
-
call_id:
|
|
4933
|
+
BrowserSessionsChangedEvent = import_zod38.z.strictObject({ count: nonNegInt, enabled: import_zod38.z.boolean() });
|
|
4934
|
+
BrowserProgressEvent = import_zod38.z.strictObject({
|
|
4935
|
+
call_id: import_zod38.z.string().min(1).max(64),
|
|
4903
4936
|
client_instance: BrowserClientInstance,
|
|
4904
4937
|
phase: BrowserCallPhase
|
|
4905
4938
|
});
|
|
4906
|
-
DesktopHealth =
|
|
4907
|
-
status:
|
|
4908
|
-
service:
|
|
4909
|
-
version:
|
|
4910
|
-
protocol_version:
|
|
4911
|
-
ws_path:
|
|
4912
|
-
device_id:
|
|
4913
|
-
browser_connection:
|
|
4914
|
-
});
|
|
4915
|
-
BrowserPairRequest =
|
|
4916
|
-
BrowserPairResult =
|
|
4939
|
+
DesktopHealth = import_zod38.z.strictObject({
|
|
4940
|
+
status: import_zod38.z.literal("ok"),
|
|
4941
|
+
service: import_zod38.z.literal("matrx-desktop"),
|
|
4942
|
+
version: import_zod38.z.string().max(32),
|
|
4943
|
+
protocol_version: import_zod38.z.string().max(16),
|
|
4944
|
+
ws_path: import_zod38.z.literal("/v1/connect"),
|
|
4945
|
+
device_id: import_zod38.z.string().max(64),
|
|
4946
|
+
browser_connection: import_zod38.z.enum(["on", "off"])
|
|
4947
|
+
});
|
|
4948
|
+
BrowserPairRequest = import_zod38.z.strictObject({ client_instance: BrowserClientInstance });
|
|
4949
|
+
BrowserPairResult = import_zod38.z.strictObject({ pair_token: import_zod38.z.string().min(16).max(128), ws_path: import_zod38.z.literal("/v1/connect") });
|
|
4917
4950
|
}
|
|
4918
4951
|
});
|
|
4919
4952
|
|
|
4920
4953
|
// src/schema/net.ts
|
|
4921
|
-
var
|
|
4954
|
+
var import_zod39, NetInfoParams, NetAddress, NetInterface, NetInfoResult, NetWifiParams, NetWifiNetwork, NetWifiResult, NetBluetoothParams, NetBluetoothDevice, NetBluetoothResult, NetDevicesParams, NetDevice, NetDevicesResult, NetMdnsParams, NetMdnsService, NetMdnsResult, NetScanParams, NetScanResult, NetDownloadParams, NetDownloadResult;
|
|
4922
4955
|
var init_net = __esm({
|
|
4923
4956
|
"src/schema/net.ts"() {
|
|
4924
4957
|
"use strict";
|
|
4925
|
-
|
|
4958
|
+
import_zod39 = require("zod");
|
|
4926
4959
|
init_primitives();
|
|
4927
|
-
NetInfoParams =
|
|
4928
|
-
NetAddress =
|
|
4929
|
-
address:
|
|
4930
|
-
family:
|
|
4931
|
-
netmask:
|
|
4960
|
+
NetInfoParams = import_zod39.z.strictObject({});
|
|
4961
|
+
NetAddress = import_zod39.z.strictObject({
|
|
4962
|
+
address: import_zod39.z.string(),
|
|
4963
|
+
family: import_zod39.z.enum(["ipv4", "ipv6"]),
|
|
4964
|
+
netmask: import_zod39.z.string().nullable(),
|
|
4932
4965
|
/** CIDR form ("192.168.1.20/24"); null where the OS gives no prefix. */
|
|
4933
|
-
cidr:
|
|
4966
|
+
cidr: import_zod39.z.string().nullable()
|
|
4934
4967
|
});
|
|
4935
|
-
NetInterface =
|
|
4936
|
-
name:
|
|
4937
|
-
mac:
|
|
4968
|
+
NetInterface = import_zod39.z.strictObject({
|
|
4969
|
+
name: import_zod39.z.string(),
|
|
4970
|
+
mac: import_zod39.z.string().nullable(),
|
|
4938
4971
|
/** Loopback and other internal interfaces. */
|
|
4939
|
-
internal:
|
|
4940
|
-
addresses:
|
|
4972
|
+
internal: import_zod39.z.boolean(),
|
|
4973
|
+
addresses: import_zod39.z.array(NetAddress)
|
|
4941
4974
|
});
|
|
4942
|
-
NetInfoResult =
|
|
4943
|
-
hostname:
|
|
4944
|
-
interfaces:
|
|
4975
|
+
NetInfoResult = import_zod39.z.strictObject({
|
|
4976
|
+
hostname: import_zod39.z.string(),
|
|
4977
|
+
interfaces: import_zod39.z.array(NetInterface),
|
|
4945
4978
|
/** The default route's gateway; null when the OS does not say (or there is none). */
|
|
4946
|
-
gateway:
|
|
4979
|
+
gateway: import_zod39.z.string().nullable(),
|
|
4947
4980
|
/** The DNS servers the OS uses; empty when it does not say. */
|
|
4948
|
-
dns:
|
|
4981
|
+
dns: import_zod39.z.array(import_zod39.z.string())
|
|
4949
4982
|
});
|
|
4950
|
-
NetWifiParams =
|
|
4951
|
-
NetWifiNetwork =
|
|
4983
|
+
NetWifiParams = import_zod39.z.strictObject({});
|
|
4984
|
+
NetWifiNetwork = import_zod39.z.strictObject({
|
|
4952
4985
|
/** null: the OS hides the name (macOS without Location Services for this app). */
|
|
4953
|
-
ssid:
|
|
4986
|
+
ssid: import_zod39.z.string().nullable(),
|
|
4954
4987
|
/** dBm; null where the OS does not say. */
|
|
4955
|
-
rssi:
|
|
4956
|
-
channel:
|
|
4957
|
-
security:
|
|
4988
|
+
rssi: import_zod39.z.int().nullable(),
|
|
4989
|
+
channel: import_zod39.z.string().nullable(),
|
|
4990
|
+
security: import_zod39.z.string().nullable()
|
|
4958
4991
|
});
|
|
4959
|
-
NetWifiResult =
|
|
4992
|
+
NetWifiResult = import_zod39.z.strictObject({
|
|
4960
4993
|
/** Whether the computer has a Wi-Fi interface at all. */
|
|
4961
|
-
available:
|
|
4994
|
+
available: import_zod39.z.boolean(),
|
|
4962
4995
|
/** The network the computer is on; null when it is on none. */
|
|
4963
4996
|
current: NetWifiNetwork.nullable(),
|
|
4964
4997
|
/** Networks in range (may be empty where the OS lists none to apps). */
|
|
4965
|
-
networks:
|
|
4998
|
+
networks: import_zod39.z.array(NetWifiNetwork)
|
|
4966
4999
|
});
|
|
4967
|
-
NetBluetoothParams =
|
|
4968
|
-
NetBluetoothDevice =
|
|
4969
|
-
name:
|
|
4970
|
-
address:
|
|
4971
|
-
connected:
|
|
5000
|
+
NetBluetoothParams = import_zod39.z.strictObject({});
|
|
5001
|
+
NetBluetoothDevice = import_zod39.z.strictObject({
|
|
5002
|
+
name: import_zod39.z.string(),
|
|
5003
|
+
address: import_zod39.z.string().nullable(),
|
|
5004
|
+
connected: import_zod39.z.boolean(),
|
|
4972
5005
|
/** What it is, in the OS's words ("Headphones", "Keyboard"); null where it does not say. */
|
|
4973
|
-
kind:
|
|
5006
|
+
kind: import_zod39.z.string().nullable(),
|
|
4974
5007
|
/** Battery percent, where the OS reports it. */
|
|
4975
|
-
battery:
|
|
5008
|
+
battery: import_zod39.z.int().min(0).max(100).nullable()
|
|
4976
5009
|
});
|
|
4977
|
-
NetBluetoothResult =
|
|
5010
|
+
NetBluetoothResult = import_zod39.z.strictObject({
|
|
4978
5011
|
/** Bluetooth is on; null where the OS does not say. */
|
|
4979
|
-
powered:
|
|
4980
|
-
devices:
|
|
4981
|
-
});
|
|
4982
|
-
NetDevicesParams =
|
|
4983
|
-
NetDevice =
|
|
4984
|
-
ip:
|
|
4985
|
-
mac:
|
|
4986
|
-
interface:
|
|
5012
|
+
powered: import_zod39.z.boolean().nullable(),
|
|
5013
|
+
devices: import_zod39.z.array(NetBluetoothDevice)
|
|
5014
|
+
});
|
|
5015
|
+
NetDevicesParams = import_zod39.z.strictObject({});
|
|
5016
|
+
NetDevice = import_zod39.z.strictObject({
|
|
5017
|
+
ip: import_zod39.z.string(),
|
|
5018
|
+
mac: import_zod39.z.string().nullable(),
|
|
5019
|
+
interface: import_zod39.z.string().nullable(),
|
|
4987
5020
|
/** The name the local network gives it (reverse DNS / mDNS), when the table carries one. */
|
|
4988
|
-
hostname:
|
|
5021
|
+
hostname: import_zod39.z.string().nullable()
|
|
4989
5022
|
});
|
|
4990
|
-
NetDevicesResult =
|
|
4991
|
-
NetMdnsParams =
|
|
5023
|
+
NetDevicesResult = import_zod39.z.strictObject({ devices: import_zod39.z.array(NetDevice) });
|
|
5024
|
+
NetMdnsParams = import_zod39.z.strictObject({
|
|
4992
5025
|
/** A service type ("_http._tcp"); absent lists the service types found. */
|
|
4993
|
-
service_type:
|
|
5026
|
+
service_type: import_zod39.z.string().min(1).max(64).regex(/^_[A-Za-z0-9-]+\._(tcp|udp)$/).optional(),
|
|
4994
5027
|
/** How long to listen. */
|
|
4995
|
-
timeout_s:
|
|
5028
|
+
timeout_s: import_zod39.z.int().min(1).max(30).default(3)
|
|
4996
5029
|
});
|
|
4997
|
-
NetMdnsService =
|
|
4998
|
-
name:
|
|
4999
|
-
type:
|
|
5000
|
-
domain:
|
|
5001
|
-
interface:
|
|
5030
|
+
NetMdnsService = import_zod39.z.strictObject({
|
|
5031
|
+
name: import_zod39.z.string(),
|
|
5032
|
+
type: import_zod39.z.string(),
|
|
5033
|
+
domain: import_zod39.z.string(),
|
|
5034
|
+
interface: import_zod39.z.string().nullable()
|
|
5002
5035
|
});
|
|
5003
|
-
NetMdnsResult =
|
|
5004
|
-
NetScanParams =
|
|
5036
|
+
NetMdnsResult = import_zod39.z.strictObject({ services: import_zod39.z.array(NetMdnsService) });
|
|
5037
|
+
NetScanParams = import_zod39.z.strictObject({
|
|
5005
5038
|
/** A host name or address; a private or loopback address unless `allow_public`. */
|
|
5006
|
-
host:
|
|
5007
|
-
ports:
|
|
5008
|
-
timeout_ms:
|
|
5039
|
+
host: import_zod39.z.string().min(1).max(253),
|
|
5040
|
+
ports: import_zod39.z.array(import_zod39.z.int().min(1).max(65535)).min(1).max(1024),
|
|
5041
|
+
timeout_ms: import_zod39.z.int().min(50).max(1e4).default(800),
|
|
5009
5042
|
/** Scanning a host on the public internet needs saying so. */
|
|
5010
|
-
allow_public:
|
|
5043
|
+
allow_public: import_zod39.z.boolean().default(false)
|
|
5011
5044
|
});
|
|
5012
|
-
NetScanResult =
|
|
5013
|
-
host:
|
|
5045
|
+
NetScanResult = import_zod39.z.strictObject({
|
|
5046
|
+
host: import_zod39.z.string(),
|
|
5014
5047
|
/** The address the host resolved to. */
|
|
5015
|
-
address:
|
|
5016
|
-
open:
|
|
5048
|
+
address: import_zod39.z.string(),
|
|
5049
|
+
open: import_zod39.z.array(import_zod39.z.int().min(1).max(65535)),
|
|
5017
5050
|
closed: nonNegInt,
|
|
5018
5051
|
elapsed_ms: nonNegInt
|
|
5019
5052
|
});
|
|
5020
|
-
NetDownloadParams =
|
|
5021
|
-
url:
|
|
5053
|
+
NetDownloadParams = import_zod39.z.strictObject({
|
|
5054
|
+
url: import_zod39.z.string().min(1).max(8192).regex(/^https?:\/\//),
|
|
5022
5055
|
/** Where to save it: an absolute path (a folder keeps the URL's file name). */
|
|
5023
5056
|
path: AbsPath,
|
|
5024
|
-
overwrite:
|
|
5025
|
-
timeout_s:
|
|
5057
|
+
overwrite: import_zod39.z.boolean().default(false),
|
|
5058
|
+
timeout_s: import_zod39.z.int().min(1).max(3600).default(300),
|
|
5026
5059
|
/** Refuse anything larger. */
|
|
5027
|
-
max_bytes:
|
|
5060
|
+
max_bytes: import_zod39.z.int().min(1).max(10737418240).default(2147483648)
|
|
5028
5061
|
});
|
|
5029
|
-
NetDownloadResult =
|
|
5030
|
-
path:
|
|
5062
|
+
NetDownloadResult = import_zod39.z.strictObject({
|
|
5063
|
+
path: import_zod39.z.string(),
|
|
5031
5064
|
bytes: nonNegInt,
|
|
5032
|
-
content_type:
|
|
5065
|
+
content_type: import_zod39.z.string().nullable(),
|
|
5033
5066
|
/** The final URL after redirects. */
|
|
5034
|
-
url:
|
|
5067
|
+
url: import_zod39.z.string(),
|
|
5035
5068
|
elapsed_ms: nonNegInt
|
|
5036
5069
|
});
|
|
5037
5070
|
}
|
|
5038
5071
|
});
|
|
5039
5072
|
|
|
5040
5073
|
// src/schema/personal.ts
|
|
5041
|
-
var
|
|
5074
|
+
var import_zod40, Text, AutomationScriptParams, AutomationScriptResult, MailAccountsParams, MailAccount, MailAccountsResult, MailListParams, MailMessage, MailListResult, MailSendParams, MailSendResult, OutlookStatusParams, OutlookAccount, OutlookStatusResult, Address, OutlookDraftParams, OutlookDraftResult, OutlookListParams, OutlookMessage, OutlookListResult, OutlookReadParams, OutlookReadResult, MessagesChatsParams, MessagesChat, MessagesChatsResult, MessagesListParams, MessagesMessage, MessagesListResult, MessagesSendParams, MessagesSendResult, ContactsSearchParams, ContactLabeled, ContactSummary, ContactsSearchResult, ContactsGetParams, ContactDetail, ContactsGetResult, CalendarListParams, CalendarEvent, CalendarListResult, CalendarCreateParams, CalendarCreateResult, RemindersListParams, Reminder, RemindersListResult, RemindersCreateParams, RemindersCreateResult, PhotosSearchParams, Photo, PhotosSearchResult, PhotosGetParams, PhotosGetResult, LocationGetParams, LocationGetResult;
|
|
5042
5075
|
var init_personal = __esm({
|
|
5043
5076
|
"src/schema/personal.ts"() {
|
|
5044
5077
|
"use strict";
|
|
5045
|
-
|
|
5078
|
+
import_zod40 = require("zod");
|
|
5046
5079
|
init_primitives();
|
|
5047
|
-
Text =
|
|
5048
|
-
AutomationScriptParams =
|
|
5080
|
+
Text = import_zod40.z.string().max(65536);
|
|
5081
|
+
AutomationScriptParams = import_zod40.z.strictObject({
|
|
5049
5082
|
/** applescript and jxa: macOS (osascript); powershell: Windows (and pwsh where installed). */
|
|
5050
|
-
language:
|
|
5051
|
-
script:
|
|
5052
|
-
timeout_s:
|
|
5053
|
-
});
|
|
5054
|
-
AutomationScriptResult =
|
|
5055
|
-
stdout:
|
|
5056
|
-
stderr:
|
|
5057
|
-
exit_code:
|
|
5058
|
-
timed_out:
|
|
5083
|
+
language: import_zod40.z.enum(["applescript", "jxa", "powershell"]),
|
|
5084
|
+
script: import_zod40.z.string().min(1).max(262144),
|
|
5085
|
+
timeout_s: import_zod40.z.int().min(1).max(600).default(60)
|
|
5086
|
+
});
|
|
5087
|
+
AutomationScriptResult = import_zod40.z.strictObject({
|
|
5088
|
+
stdout: import_zod40.z.string(),
|
|
5089
|
+
stderr: import_zod40.z.string(),
|
|
5090
|
+
exit_code: import_zod40.z.int(),
|
|
5091
|
+
timed_out: import_zod40.z.boolean(),
|
|
5059
5092
|
/** stdout or stderr was cut at 1 MiB. */
|
|
5060
|
-
truncated:
|
|
5093
|
+
truncated: import_zod40.z.boolean(),
|
|
5061
5094
|
elapsed_ms: nonNegInt
|
|
5062
5095
|
});
|
|
5063
|
-
MailAccountsParams =
|
|
5064
|
-
MailAccount =
|
|
5065
|
-
name:
|
|
5066
|
-
emails:
|
|
5067
|
-
enabled:
|
|
5096
|
+
MailAccountsParams = import_zod40.z.strictObject({});
|
|
5097
|
+
MailAccount = import_zod40.z.strictObject({
|
|
5098
|
+
name: import_zod40.z.string(),
|
|
5099
|
+
emails: import_zod40.z.array(import_zod40.z.string()),
|
|
5100
|
+
enabled: import_zod40.z.boolean(),
|
|
5068
5101
|
/** (1.67) The account's mailboxes by name (Matrx Local's email_accounts listed them). */
|
|
5069
|
-
mailboxes:
|
|
5102
|
+
mailboxes: import_zod40.z.array(import_zod40.z.string()).optional()
|
|
5070
5103
|
});
|
|
5071
|
-
MailAccountsResult =
|
|
5072
|
-
MailListParams =
|
|
5104
|
+
MailAccountsResult = import_zod40.z.strictObject({ accounts: import_zod40.z.array(MailAccount) });
|
|
5105
|
+
MailListParams = import_zod40.z.strictObject({
|
|
5073
5106
|
/** The account's name in Mail; absent: every account. */
|
|
5074
|
-
account:
|
|
5107
|
+
account: import_zod40.z.string().min(1).max(256).optional(),
|
|
5075
5108
|
/** The mailbox's name ("INBOX", "Sent Messages"). */
|
|
5076
|
-
mailbox:
|
|
5077
|
-
unread_only:
|
|
5078
|
-
limit:
|
|
5079
|
-
});
|
|
5080
|
-
MailMessage =
|
|
5081
|
-
id:
|
|
5082
|
-
subject:
|
|
5083
|
-
sender:
|
|
5109
|
+
mailbox: import_zod40.z.string().min(1).max(256).default("INBOX"),
|
|
5110
|
+
unread_only: import_zod40.z.boolean().default(false),
|
|
5111
|
+
limit: import_zod40.z.int().min(1).max(200).default(25)
|
|
5112
|
+
});
|
|
5113
|
+
MailMessage = import_zod40.z.strictObject({
|
|
5114
|
+
id: import_zod40.z.string(),
|
|
5115
|
+
subject: import_zod40.z.string(),
|
|
5116
|
+
sender: import_zod40.z.string(),
|
|
5084
5117
|
received_at_ms: epochMs.nullable(),
|
|
5085
|
-
read:
|
|
5086
|
-
account:
|
|
5087
|
-
mailbox:
|
|
5118
|
+
read: import_zod40.z.boolean(),
|
|
5119
|
+
account: import_zod40.z.string(),
|
|
5120
|
+
mailbox: import_zod40.z.string(),
|
|
5088
5121
|
/** The first lines of the message's text. */
|
|
5089
|
-
preview:
|
|
5122
|
+
preview: import_zod40.z.string()
|
|
5090
5123
|
});
|
|
5091
|
-
MailListResult =
|
|
5092
|
-
MailSendParams =
|
|
5093
|
-
to:
|
|
5094
|
-
cc:
|
|
5124
|
+
MailListResult = import_zod40.z.strictObject({ messages: import_zod40.z.array(MailMessage) });
|
|
5125
|
+
MailSendParams = import_zod40.z.strictObject({
|
|
5126
|
+
to: import_zod40.z.array(import_zod40.z.string().min(3).max(320)).min(1).max(50),
|
|
5127
|
+
cc: import_zod40.z.array(import_zod40.z.string().min(3).max(320)).max(50).default([]),
|
|
5095
5128
|
/** (1.67) Blind copies (Matrx Local's send_email bcc). */
|
|
5096
|
-
bcc:
|
|
5097
|
-
subject:
|
|
5129
|
+
bcc: import_zod40.z.array(import_zod40.z.string().min(3).max(320)).max(50).optional(),
|
|
5130
|
+
subject: import_zod40.z.string().max(998),
|
|
5098
5131
|
body: Text,
|
|
5099
5132
|
/** The sending account's address; absent: Mail's default. */
|
|
5100
|
-
from:
|
|
5133
|
+
from: import_zod40.z.string().min(3).max(320).optional(),
|
|
5101
5134
|
/** false leaves it open in Mail as a draft for the person to send. */
|
|
5102
|
-
send:
|
|
5135
|
+
send: import_zod40.z.boolean().default(true)
|
|
5103
5136
|
});
|
|
5104
|
-
MailSendResult =
|
|
5105
|
-
OutlookStatusParams =
|
|
5106
|
-
OutlookAccount =
|
|
5107
|
-
OutlookStatusResult =
|
|
5137
|
+
MailSendResult = import_zod40.z.strictObject({ sent: import_zod40.z.boolean() });
|
|
5138
|
+
OutlookStatusParams = import_zod40.z.strictObject({});
|
|
5139
|
+
OutlookAccount = import_zod40.z.strictObject({ name: import_zod40.z.string(), email: import_zod40.z.string().nullable() });
|
|
5140
|
+
OutlookStatusResult = import_zod40.z.strictObject({
|
|
5108
5141
|
/** classic_windows: scriptable. new_windows / mac: installed, not scriptable. none: not found. */
|
|
5109
|
-
client:
|
|
5110
|
-
scriptable:
|
|
5111
|
-
version:
|
|
5112
|
-
accounts:
|
|
5142
|
+
client: import_zod40.z.enum(["classic_windows", "new_windows", "mac", "none"]),
|
|
5143
|
+
scriptable: import_zod40.z.boolean(),
|
|
5144
|
+
version: import_zod40.z.string().nullable(),
|
|
5145
|
+
accounts: import_zod40.z.array(OutlookAccount),
|
|
5113
5146
|
/** Why it is not scriptable here, in a sentence the person can act on; null when it is. */
|
|
5114
|
-
reason:
|
|
5115
|
-
});
|
|
5116
|
-
Address =
|
|
5117
|
-
OutlookDraftParams =
|
|
5118
|
-
to:
|
|
5119
|
-
cc:
|
|
5120
|
-
bcc:
|
|
5121
|
-
subject:
|
|
5122
|
-
body:
|
|
5123
|
-
body_format:
|
|
5147
|
+
reason: import_zod40.z.string().nullable()
|
|
5148
|
+
});
|
|
5149
|
+
Address = import_zod40.z.string().min(3).max(320);
|
|
5150
|
+
OutlookDraftParams = import_zod40.z.strictObject({
|
|
5151
|
+
to: import_zod40.z.array(Address).max(100).default([]),
|
|
5152
|
+
cc: import_zod40.z.array(Address).max(100).default([]),
|
|
5153
|
+
bcc: import_zod40.z.array(Address).max(100).default([]),
|
|
5154
|
+
subject: import_zod40.z.string().max(998).default(""),
|
|
5155
|
+
body: import_zod40.z.string().max(1048576).default(""),
|
|
5156
|
+
body_format: import_zod40.z.enum(["text", "html"]).default("text"),
|
|
5124
5157
|
/** Files on this computer to attach (absolute paths). */
|
|
5125
|
-
attachments:
|
|
5158
|
+
attachments: import_zod40.z.array(import_zod40.z.string().min(1).max(4096)).max(50).default([]),
|
|
5126
5159
|
/** The sending account's address (one of outlook.status's accounts); absent: Outlook's default. */
|
|
5127
5160
|
account: Address.optional(),
|
|
5128
5161
|
/** true also opens the draft in a window for the person. */
|
|
5129
|
-
display:
|
|
5162
|
+
display: import_zod40.z.boolean().default(false)
|
|
5130
5163
|
});
|
|
5131
|
-
OutlookDraftResult =
|
|
5164
|
+
OutlookDraftResult = import_zod40.z.strictObject({
|
|
5132
5165
|
/** The draft's id in Outlook (outlook.read takes it). */
|
|
5133
|
-
id:
|
|
5134
|
-
account:
|
|
5135
|
-
folder:
|
|
5166
|
+
id: import_zod40.z.string(),
|
|
5167
|
+
account: import_zod40.z.string().nullable(),
|
|
5168
|
+
folder: import_zod40.z.string(),
|
|
5136
5169
|
attachments: nonNegInt,
|
|
5137
|
-
displayed:
|
|
5170
|
+
displayed: import_zod40.z.boolean()
|
|
5138
5171
|
});
|
|
5139
|
-
OutlookListParams =
|
|
5140
|
-
folder:
|
|
5172
|
+
OutlookListParams = import_zod40.z.strictObject({
|
|
5173
|
+
folder: import_zod40.z.enum(["inbox", "sent", "drafts"]).default("inbox"),
|
|
5141
5174
|
/** The account's address; absent: the default account. */
|
|
5142
5175
|
account: Address.optional(),
|
|
5143
|
-
unread_only:
|
|
5144
|
-
limit:
|
|
5176
|
+
unread_only: import_zod40.z.boolean().default(false),
|
|
5177
|
+
limit: import_zod40.z.int().min(1).max(200).default(25)
|
|
5145
5178
|
});
|
|
5146
|
-
OutlookMessage =
|
|
5147
|
-
id:
|
|
5148
|
-
subject:
|
|
5149
|
-
sender:
|
|
5179
|
+
OutlookMessage = import_zod40.z.strictObject({
|
|
5180
|
+
id: import_zod40.z.string(),
|
|
5181
|
+
subject: import_zod40.z.string(),
|
|
5182
|
+
sender: import_zod40.z.string(),
|
|
5150
5183
|
received_at_ms: epochMs.nullable(),
|
|
5151
|
-
read:
|
|
5152
|
-
has_attachments:
|
|
5184
|
+
read: import_zod40.z.boolean(),
|
|
5185
|
+
has_attachments: import_zod40.z.boolean(),
|
|
5153
5186
|
/** The first lines of the message's text. */
|
|
5154
|
-
preview:
|
|
5155
|
-
});
|
|
5156
|
-
OutlookListResult =
|
|
5157
|
-
OutlookReadParams =
|
|
5158
|
-
OutlookReadResult =
|
|
5159
|
-
id:
|
|
5160
|
-
subject:
|
|
5161
|
-
sender:
|
|
5162
|
-
to:
|
|
5163
|
-
cc:
|
|
5187
|
+
preview: import_zod40.z.string()
|
|
5188
|
+
});
|
|
5189
|
+
OutlookListResult = import_zod40.z.strictObject({ folder: import_zod40.z.string(), messages: import_zod40.z.array(OutlookMessage) });
|
|
5190
|
+
OutlookReadParams = import_zod40.z.strictObject({ id: import_zod40.z.string().min(1).max(1024) });
|
|
5191
|
+
OutlookReadResult = import_zod40.z.strictObject({
|
|
5192
|
+
id: import_zod40.z.string(),
|
|
5193
|
+
subject: import_zod40.z.string(),
|
|
5194
|
+
sender: import_zod40.z.string(),
|
|
5195
|
+
to: import_zod40.z.array(import_zod40.z.string()),
|
|
5196
|
+
cc: import_zod40.z.array(import_zod40.z.string()),
|
|
5164
5197
|
received_at_ms: epochMs.nullable(),
|
|
5165
5198
|
/** The plain text body, cut at 1 MiB. */
|
|
5166
|
-
body:
|
|
5167
|
-
attachments:
|
|
5168
|
-
});
|
|
5169
|
-
MessagesChatsParams =
|
|
5170
|
-
MessagesChat =
|
|
5171
|
-
chat_id:
|
|
5172
|
-
name:
|
|
5173
|
-
participants:
|
|
5199
|
+
body: import_zod40.z.string(),
|
|
5200
|
+
attachments: import_zod40.z.array(import_zod40.z.strictObject({ name: import_zod40.z.string(), size: nonNegInt }))
|
|
5201
|
+
});
|
|
5202
|
+
MessagesChatsParams = import_zod40.z.strictObject({ limit: import_zod40.z.int().min(1).max(200).default(25) });
|
|
5203
|
+
MessagesChat = import_zod40.z.strictObject({
|
|
5204
|
+
chat_id: import_zod40.z.string(),
|
|
5205
|
+
name: import_zod40.z.string().nullable(),
|
|
5206
|
+
participants: import_zod40.z.array(import_zod40.z.string()),
|
|
5174
5207
|
last_message_at_ms: epochMs.nullable(),
|
|
5175
|
-
service:
|
|
5208
|
+
service: import_zod40.z.string().nullable(),
|
|
5176
5209
|
/** (1.67) The newest message's text (Matrx Local's list_conversations preview); absent when it has none. */
|
|
5177
|
-
last_message:
|
|
5210
|
+
last_message: import_zod40.z.string().optional()
|
|
5178
5211
|
});
|
|
5179
|
-
MessagesChatsResult =
|
|
5180
|
-
MessagesListParams =
|
|
5212
|
+
MessagesChatsResult = import_zod40.z.strictObject({ chats: import_zod40.z.array(MessagesChat) });
|
|
5213
|
+
MessagesListParams = import_zod40.z.strictObject({
|
|
5181
5214
|
/** One chat (messages.chats' chat_id); absent: the newest across all. */
|
|
5182
|
-
chat_id:
|
|
5183
|
-
limit:
|
|
5215
|
+
chat_id: import_zod40.z.string().min(1).max(512).optional(),
|
|
5216
|
+
limit: import_zod40.z.int().min(1).max(500).default(50),
|
|
5184
5217
|
/** (1.67) Only messages with this handle or chat name in them (partial: a phone, an email, a name). */
|
|
5185
|
-
contact:
|
|
5218
|
+
contact: import_zod40.z.string().min(1).max(320).optional(),
|
|
5186
5219
|
/** (1.67) Only messages not yet read. */
|
|
5187
|
-
unread_only:
|
|
5220
|
+
unread_only: import_zod40.z.boolean().optional()
|
|
5188
5221
|
});
|
|
5189
|
-
MessagesMessage =
|
|
5190
|
-
id:
|
|
5191
|
-
chat_id:
|
|
5192
|
-
text:
|
|
5193
|
-
from_me:
|
|
5222
|
+
MessagesMessage = import_zod40.z.strictObject({
|
|
5223
|
+
id: import_zod40.z.string(),
|
|
5224
|
+
chat_id: import_zod40.z.string().nullable(),
|
|
5225
|
+
text: import_zod40.z.string(),
|
|
5226
|
+
from_me: import_zod40.z.boolean(),
|
|
5194
5227
|
/** The other person's handle (phone or email); null for the person's own messages. */
|
|
5195
|
-
sender:
|
|
5228
|
+
sender: import_zod40.z.string().nullable(),
|
|
5196
5229
|
sent_at_ms: epochMs.nullable(),
|
|
5197
5230
|
/** (1.67) Whether it has been read. */
|
|
5198
|
-
read:
|
|
5231
|
+
read: import_zod40.z.boolean().optional(),
|
|
5199
5232
|
/** (1.67) iMessage, SMS or RCS, as the Messages database says. */
|
|
5200
|
-
service:
|
|
5233
|
+
service: import_zod40.z.string().optional(),
|
|
5201
5234
|
/** (1.67) The chat's name (group chats); absent for a one-to-one chat. */
|
|
5202
|
-
chat_name:
|
|
5235
|
+
chat_name: import_zod40.z.string().optional()
|
|
5203
5236
|
});
|
|
5204
|
-
MessagesListResult =
|
|
5205
|
-
MessagesSendParams =
|
|
5237
|
+
MessagesListResult = import_zod40.z.strictObject({ messages: import_zod40.z.array(MessagesMessage) });
|
|
5238
|
+
MessagesSendParams = import_zod40.z.strictObject({
|
|
5206
5239
|
/** A phone number or email the person can message. */
|
|
5207
|
-
to:
|
|
5208
|
-
text:
|
|
5240
|
+
to: import_zod40.z.string().min(3).max(320),
|
|
5241
|
+
text: import_zod40.z.string().min(1).max(2e4),
|
|
5209
5242
|
/**
|
|
5210
5243
|
* Send only over this service (Matrx Local's SendMessage `service`). Absent: iMessage first, and
|
|
5211
5244
|
* SMS when the recipient has no iMessage (since 1.42).
|
|
5212
5245
|
*/
|
|
5213
|
-
service:
|
|
5246
|
+
service: import_zod40.z.enum(["iMessage", "SMS"]).optional()
|
|
5214
5247
|
});
|
|
5215
|
-
MessagesSendResult =
|
|
5216
|
-
ContactsSearchParams =
|
|
5248
|
+
MessagesSendResult = import_zod40.z.strictObject({ sent: import_zod40.z.boolean() });
|
|
5249
|
+
ContactsSearchParams = import_zod40.z.strictObject({
|
|
5217
5250
|
/** Matched against names, organizations, emails and phone numbers; absent (1.67): the first `limit` contacts. */
|
|
5218
|
-
query:
|
|
5219
|
-
limit:
|
|
5251
|
+
query: import_zod40.z.string().min(1).max(256).optional(),
|
|
5252
|
+
limit: import_zod40.z.int().min(1).max(200).default(25)
|
|
5220
5253
|
});
|
|
5221
|
-
ContactLabeled =
|
|
5222
|
-
ContactSummary =
|
|
5223
|
-
id:
|
|
5224
|
-
name:
|
|
5225
|
-
organization:
|
|
5226
|
-
emails:
|
|
5227
|
-
phones:
|
|
5228
|
-
});
|
|
5229
|
-
ContactsSearchResult =
|
|
5230
|
-
ContactsGetParams =
|
|
5231
|
-
ContactDetail =
|
|
5232
|
-
id:
|
|
5233
|
-
name:
|
|
5234
|
-
organization:
|
|
5235
|
-
job_title:
|
|
5236
|
-
emails:
|
|
5237
|
-
phones:
|
|
5238
|
-
addresses:
|
|
5239
|
-
birthday:
|
|
5240
|
-
note:
|
|
5241
|
-
});
|
|
5242
|
-
ContactsGetResult =
|
|
5243
|
-
CalendarListParams =
|
|
5254
|
+
ContactLabeled = import_zod40.z.strictObject({ label: import_zod40.z.string().nullable(), value: import_zod40.z.string() });
|
|
5255
|
+
ContactSummary = import_zod40.z.strictObject({
|
|
5256
|
+
id: import_zod40.z.string(),
|
|
5257
|
+
name: import_zod40.z.string(),
|
|
5258
|
+
organization: import_zod40.z.string().nullable(),
|
|
5259
|
+
emails: import_zod40.z.array(ContactLabeled),
|
|
5260
|
+
phones: import_zod40.z.array(ContactLabeled)
|
|
5261
|
+
});
|
|
5262
|
+
ContactsSearchResult = import_zod40.z.strictObject({ contacts: import_zod40.z.array(ContactSummary) });
|
|
5263
|
+
ContactsGetParams = import_zod40.z.strictObject({ id: import_zod40.z.string().min(1).max(256) });
|
|
5264
|
+
ContactDetail = import_zod40.z.strictObject({
|
|
5265
|
+
id: import_zod40.z.string(),
|
|
5266
|
+
name: import_zod40.z.string(),
|
|
5267
|
+
organization: import_zod40.z.string().nullable(),
|
|
5268
|
+
job_title: import_zod40.z.string().nullable(),
|
|
5269
|
+
emails: import_zod40.z.array(ContactLabeled),
|
|
5270
|
+
phones: import_zod40.z.array(ContactLabeled),
|
|
5271
|
+
addresses: import_zod40.z.array(ContactLabeled),
|
|
5272
|
+
birthday: import_zod40.z.string().nullable(),
|
|
5273
|
+
note: import_zod40.z.string().nullable()
|
|
5274
|
+
});
|
|
5275
|
+
ContactsGetResult = import_zod40.z.strictObject({ contact: ContactDetail });
|
|
5276
|
+
CalendarListParams = import_zod40.z.strictObject({
|
|
5244
5277
|
from_ms: epochMs,
|
|
5245
5278
|
to_ms: epochMs,
|
|
5246
5279
|
/** One calendar's name; absent: every calendar. */
|
|
5247
|
-
calendar:
|
|
5280
|
+
calendar: import_zod40.z.string().min(1).max(256).optional(),
|
|
5248
5281
|
/** (1.67) Several calendars by name (Matrx Local's calendar_names); with `calendar`, both count. */
|
|
5249
|
-
calendars:
|
|
5250
|
-
limit:
|
|
5282
|
+
calendars: import_zod40.z.array(import_zod40.z.string().min(1).max(256)).min(1).max(100).optional(),
|
|
5283
|
+
limit: import_zod40.z.int().min(1).max(500).default(100)
|
|
5251
5284
|
});
|
|
5252
|
-
CalendarEvent =
|
|
5253
|
-
id:
|
|
5254
|
-
title:
|
|
5285
|
+
CalendarEvent = import_zod40.z.strictObject({
|
|
5286
|
+
id: import_zod40.z.string(),
|
|
5287
|
+
title: import_zod40.z.string(),
|
|
5255
5288
|
start_ms: epochMs,
|
|
5256
5289
|
end_ms: epochMs,
|
|
5257
|
-
all_day:
|
|
5258
|
-
calendar:
|
|
5259
|
-
location:
|
|
5260
|
-
notes:
|
|
5290
|
+
all_day: import_zod40.z.boolean(),
|
|
5291
|
+
calendar: import_zod40.z.string(),
|
|
5292
|
+
location: import_zod40.z.string().nullable(),
|
|
5293
|
+
notes: import_zod40.z.string().nullable(),
|
|
5261
5294
|
/** (1.67) The event's link; absent when it has none. */
|
|
5262
|
-
url:
|
|
5295
|
+
url: import_zod40.z.string().optional()
|
|
5263
5296
|
});
|
|
5264
|
-
CalendarListResult =
|
|
5265
|
-
CalendarCreateParams =
|
|
5266
|
-
title:
|
|
5297
|
+
CalendarListResult = import_zod40.z.strictObject({ events: import_zod40.z.array(CalendarEvent) });
|
|
5298
|
+
CalendarCreateParams = import_zod40.z.strictObject({
|
|
5299
|
+
title: import_zod40.z.string().min(1).max(1024),
|
|
5267
5300
|
start_ms: epochMs,
|
|
5268
5301
|
end_ms: epochMs,
|
|
5269
|
-
all_day:
|
|
5302
|
+
all_day: import_zod40.z.boolean().default(false),
|
|
5270
5303
|
/** The calendar's name; absent: the first writable calendar. */
|
|
5271
|
-
calendar:
|
|
5272
|
-
location:
|
|
5304
|
+
calendar: import_zod40.z.string().min(1).max(256).optional(),
|
|
5305
|
+
location: import_zod40.z.string().max(1024).optional(),
|
|
5273
5306
|
notes: Text.optional()
|
|
5274
5307
|
});
|
|
5275
|
-
CalendarCreateResult =
|
|
5276
|
-
RemindersListParams =
|
|
5308
|
+
CalendarCreateResult = import_zod40.z.strictObject({ id: import_zod40.z.string(), calendar: import_zod40.z.string() });
|
|
5309
|
+
RemindersListParams = import_zod40.z.strictObject({
|
|
5277
5310
|
/** One list's name; absent: every list. */
|
|
5278
|
-
list:
|
|
5311
|
+
list: import_zod40.z.string().min(1).max(256).optional(),
|
|
5279
5312
|
/** (1.67) Several lists by name (Matrx Local's list_names); with `list`, both count. */
|
|
5280
|
-
lists:
|
|
5281
|
-
include_completed:
|
|
5282
|
-
limit:
|
|
5283
|
-
});
|
|
5284
|
-
Reminder =
|
|
5285
|
-
id:
|
|
5286
|
-
title:
|
|
5287
|
-
list:
|
|
5313
|
+
lists: import_zod40.z.array(import_zod40.z.string().min(1).max(256)).min(1).max(100).optional(),
|
|
5314
|
+
include_completed: import_zod40.z.boolean().default(false),
|
|
5315
|
+
limit: import_zod40.z.int().min(1).max(500).default(100)
|
|
5316
|
+
});
|
|
5317
|
+
Reminder = import_zod40.z.strictObject({
|
|
5318
|
+
id: import_zod40.z.string(),
|
|
5319
|
+
title: import_zod40.z.string(),
|
|
5320
|
+
list: import_zod40.z.string(),
|
|
5288
5321
|
due_ms: epochMs.nullable(),
|
|
5289
|
-
completed:
|
|
5290
|
-
notes:
|
|
5322
|
+
completed: import_zod40.z.boolean(),
|
|
5323
|
+
notes: import_zod40.z.string().nullable(),
|
|
5291
5324
|
/** (1.67) 0 none, 1 high … 9 low (EventKit's scale). */
|
|
5292
|
-
priority:
|
|
5325
|
+
priority: import_zod40.z.int().min(0).max(9).optional(),
|
|
5293
5326
|
/** (1.67) When it was completed; absent while open. */
|
|
5294
5327
|
completed_at_ms: epochMs.optional()
|
|
5295
5328
|
});
|
|
5296
|
-
RemindersListResult =
|
|
5297
|
-
RemindersCreateParams =
|
|
5298
|
-
title:
|
|
5329
|
+
RemindersListResult = import_zod40.z.strictObject({ reminders: import_zod40.z.array(Reminder) });
|
|
5330
|
+
RemindersCreateParams = import_zod40.z.strictObject({
|
|
5331
|
+
title: import_zod40.z.string().min(1).max(1024),
|
|
5299
5332
|
due_ms: epochMs.optional(),
|
|
5300
|
-
list:
|
|
5333
|
+
list: import_zod40.z.string().min(1).max(256).optional(),
|
|
5301
5334
|
notes: Text.optional()
|
|
5302
5335
|
});
|
|
5303
|
-
RemindersCreateResult =
|
|
5304
|
-
PhotosSearchParams =
|
|
5336
|
+
RemindersCreateResult = import_zod40.z.strictObject({ id: import_zod40.z.string(), list: import_zod40.z.string() });
|
|
5337
|
+
PhotosSearchParams = import_zod40.z.strictObject({
|
|
5305
5338
|
/** Matched against file names, titles, descriptions and keywords; absent: the newest. */
|
|
5306
|
-
query:
|
|
5339
|
+
query: import_zod40.z.string().min(1).max(256).optional(),
|
|
5307
5340
|
from_ms: epochMs.optional(),
|
|
5308
5341
|
to_ms: epochMs.optional(),
|
|
5309
|
-
favorites_only:
|
|
5342
|
+
favorites_only: import_zod40.z.boolean().default(false),
|
|
5310
5343
|
/** (1.67) image, video or all (Matrx Local's media_type); absent: all. */
|
|
5311
|
-
media_type:
|
|
5312
|
-
limit:
|
|
5344
|
+
media_type: import_zod40.z.enum(["image", "video", "all"]).optional(),
|
|
5345
|
+
limit: import_zod40.z.int().min(1).max(200).default(25)
|
|
5313
5346
|
});
|
|
5314
|
-
Photo =
|
|
5315
|
-
id:
|
|
5316
|
-
filename:
|
|
5347
|
+
Photo = import_zod40.z.strictObject({
|
|
5348
|
+
id: import_zod40.z.string(),
|
|
5349
|
+
filename: import_zod40.z.string(),
|
|
5317
5350
|
taken_at_ms: epochMs.nullable(),
|
|
5318
5351
|
width: nonNegInt.nullable(),
|
|
5319
5352
|
height: nonNegInt.nullable(),
|
|
5320
|
-
favorite:
|
|
5321
|
-
title:
|
|
5353
|
+
favorite: import_zod40.z.boolean(),
|
|
5354
|
+
title: import_zod40.z.string().nullable(),
|
|
5322
5355
|
/** (1.67) What the asset is. */
|
|
5323
|
-
media_type:
|
|
5356
|
+
media_type: import_zod40.z.enum(["image", "video", "audio", "unknown"]).optional(),
|
|
5324
5357
|
/** (1.67) A video's length in seconds; absent for a still. */
|
|
5325
|
-
duration_s:
|
|
5358
|
+
duration_s: import_zod40.z.number().min(0).optional()
|
|
5326
5359
|
});
|
|
5327
|
-
PhotosSearchResult =
|
|
5328
|
-
PhotosGetParams =
|
|
5329
|
-
id:
|
|
5360
|
+
PhotosSearchResult = import_zod40.z.strictObject({ photos: import_zod40.z.array(Photo) });
|
|
5361
|
+
PhotosGetParams = import_zod40.z.strictObject({
|
|
5362
|
+
id: import_zod40.z.string().min(1).max(256),
|
|
5330
5363
|
/** Copy the original into a folder Matrx 2 owns and answer its path (then fs_read or desktop_documents reads it). */
|
|
5331
|
-
export:
|
|
5364
|
+
export: import_zod40.z.boolean().default(false),
|
|
5332
5365
|
/** (1.67) Also answer a PNG thumbnail no larger than this many pixels a side (Matrx Local's get_photo thumbnail). */
|
|
5333
|
-
thumbnail_size:
|
|
5366
|
+
thumbnail_size: import_zod40.z.int().min(64).max(2048).optional()
|
|
5334
5367
|
});
|
|
5335
|
-
PhotosGetResult =
|
|
5368
|
+
PhotosGetResult = import_zod40.z.strictObject({
|
|
5336
5369
|
photo: Photo,
|
|
5337
|
-
path:
|
|
5370
|
+
path: import_zod40.z.string().nullable(),
|
|
5338
5371
|
/** (1.67) The thumbnail as base64 PNG, when thumbnail_size asked for one; absent when it could not be drawn. */
|
|
5339
|
-
thumbnail_png_base64:
|
|
5372
|
+
thumbnail_png_base64: import_zod40.z.string().optional()
|
|
5340
5373
|
});
|
|
5341
|
-
LocationGetParams =
|
|
5342
|
-
LocationGetResult =
|
|
5343
|
-
latitude:
|
|
5344
|
-
longitude:
|
|
5374
|
+
LocationGetParams = import_zod40.z.strictObject({ timeout_s: import_zod40.z.int().min(1).max(60).default(15) });
|
|
5375
|
+
LocationGetResult = import_zod40.z.strictObject({
|
|
5376
|
+
latitude: import_zod40.z.number().min(-90).max(90),
|
|
5377
|
+
longitude: import_zod40.z.number().min(-180).max(180),
|
|
5345
5378
|
/** Metres; null where the OS does not say. */
|
|
5346
|
-
accuracy_m:
|
|
5379
|
+
accuracy_m: import_zod40.z.number().min(0).nullable(),
|
|
5347
5380
|
at_ms: epochMs,
|
|
5348
5381
|
/** Who answered: the OS's own location service. */
|
|
5349
|
-
source:
|
|
5382
|
+
source: import_zod40.z.enum(["corelocation", "windows", "geoclue"]),
|
|
5350
5383
|
/** (1.67) Metres above sea level, its accuracy, speed (m/s) and course (degrees); absent where the OS does not say. */
|
|
5351
|
-
altitude_m:
|
|
5352
|
-
vertical_accuracy_m:
|
|
5353
|
-
speed_mps:
|
|
5354
|
-
course_deg:
|
|
5384
|
+
altitude_m: import_zod40.z.number().optional(),
|
|
5385
|
+
vertical_accuracy_m: import_zod40.z.number().min(0).optional(),
|
|
5386
|
+
speed_mps: import_zod40.z.number().min(0).optional(),
|
|
5387
|
+
course_deg: import_zod40.z.number().min(0).max(360).optional()
|
|
5355
5388
|
});
|
|
5356
5389
|
}
|
|
5357
5390
|
});
|
|
5358
5391
|
|
|
5359
5392
|
// src/schema/windows.ts
|
|
5360
|
-
var
|
|
5393
|
+
var import_zod41, RegistryKey, RegistryValueType, WindowsRegistryReadParams, RegistryValue, WindowsRegistryReadResult, WindowsRegistryWriteParams, WindowsRegistryWriteResult, WindowsServicesParams, WindowsService, WindowsServicesResult, WindowsServiceControlParams, WindowsServiceControlResult, WindowsEventLogParams, WindowsEvent, WindowsEventLogResult, WindowsFeaturesParams, WindowsFeature, WindowsFeaturesResult;
|
|
5361
5394
|
var init_windows = __esm({
|
|
5362
5395
|
"src/schema/windows.ts"() {
|
|
5363
5396
|
"use strict";
|
|
5364
|
-
|
|
5397
|
+
import_zod41 = require("zod");
|
|
5365
5398
|
init_primitives();
|
|
5366
|
-
RegistryKey =
|
|
5367
|
-
RegistryValueType =
|
|
5368
|
-
WindowsRegistryReadParams =
|
|
5399
|
+
RegistryKey = import_zod41.z.string().min(6).max(1024).regex(/^(HKLM|HKCU|HKCR|HKU|HKCC|HKEY_LOCAL_MACHINE|HKEY_CURRENT_USER|HKEY_CLASSES_ROOT|HKEY_USERS|HKEY_CURRENT_CONFIG)(\\.*)?$/);
|
|
5400
|
+
RegistryValueType = import_zod41.z.enum(["REG_SZ", "REG_EXPAND_SZ", "REG_MULTI_SZ", "REG_DWORD", "REG_QWORD", "REG_BINARY", "REG_NONE"]);
|
|
5401
|
+
WindowsRegistryReadParams = import_zod41.z.strictObject({
|
|
5369
5402
|
key: RegistryKey,
|
|
5370
5403
|
/** One value's name ("" is the key's default value); absent: every value and the subkeys. */
|
|
5371
|
-
name:
|
|
5404
|
+
name: import_zod41.z.string().max(16383).optional()
|
|
5372
5405
|
});
|
|
5373
|
-
RegistryValue =
|
|
5374
|
-
WindowsRegistryReadResult =
|
|
5375
|
-
key:
|
|
5376
|
-
exists:
|
|
5377
|
-
values:
|
|
5378
|
-
subkeys:
|
|
5406
|
+
RegistryValue = import_zod41.z.strictObject({ name: import_zod41.z.string(), type: RegistryValueType, data: import_zod41.z.string() });
|
|
5407
|
+
WindowsRegistryReadResult = import_zod41.z.strictObject({
|
|
5408
|
+
key: import_zod41.z.string(),
|
|
5409
|
+
exists: import_zod41.z.boolean(),
|
|
5410
|
+
values: import_zod41.z.array(RegistryValue),
|
|
5411
|
+
subkeys: import_zod41.z.array(import_zod41.z.string())
|
|
5379
5412
|
});
|
|
5380
|
-
WindowsRegistryWriteParams =
|
|
5413
|
+
WindowsRegistryWriteParams = import_zod41.z.strictObject({
|
|
5381
5414
|
key: RegistryKey,
|
|
5382
|
-
name:
|
|
5415
|
+
name: import_zod41.z.string().max(16383),
|
|
5383
5416
|
type: RegistryValueType.default("REG_SZ"),
|
|
5384
5417
|
/** As reg.exe takes it: text, a number, hex for binary, \\0 between the strings of a multi-string. */
|
|
5385
|
-
data:
|
|
5418
|
+
data: import_zod41.z.string().max(1048576),
|
|
5386
5419
|
/** Remove the value instead of writing it. */
|
|
5387
|
-
delete:
|
|
5420
|
+
delete: import_zod41.z.boolean().default(false)
|
|
5388
5421
|
});
|
|
5389
|
-
WindowsRegistryWriteResult =
|
|
5390
|
-
WindowsServicesParams =
|
|
5422
|
+
WindowsRegistryWriteResult = import_zod41.z.strictObject({ key: import_zod41.z.string(), name: import_zod41.z.string(), deleted: import_zod41.z.boolean() });
|
|
5423
|
+
WindowsServicesParams = import_zod41.z.strictObject({
|
|
5391
5424
|
/** Matched against the service's name and display name. */
|
|
5392
|
-
filter:
|
|
5425
|
+
filter: import_zod41.z.string().min(1).max(256).optional(),
|
|
5393
5426
|
/** (1.67) Only services in this state (Matrx Local's service_list status). */
|
|
5394
|
-
status:
|
|
5395
|
-
limit:
|
|
5427
|
+
status: import_zod41.z.enum(["running", "stopped", "paused"]).optional(),
|
|
5428
|
+
limit: import_zod41.z.int().min(1).max(1e3).default(200)
|
|
5396
5429
|
});
|
|
5397
|
-
WindowsService =
|
|
5398
|
-
name:
|
|
5399
|
-
display_name:
|
|
5430
|
+
WindowsService = import_zod41.z.strictObject({
|
|
5431
|
+
name: import_zod41.z.string(),
|
|
5432
|
+
display_name: import_zod41.z.string(),
|
|
5400
5433
|
/** Running, Stopped, Paused… as Windows says it. */
|
|
5401
|
-
status:
|
|
5434
|
+
status: import_zod41.z.string(),
|
|
5402
5435
|
/** Automatic, Manual, Disabled…; null where Windows does not say. */
|
|
5403
|
-
start_type:
|
|
5436
|
+
start_type: import_zod41.z.string().nullable()
|
|
5404
5437
|
});
|
|
5405
|
-
WindowsServicesResult =
|
|
5406
|
-
WindowsServiceControlParams =
|
|
5407
|
-
name:
|
|
5438
|
+
WindowsServicesResult = import_zod41.z.strictObject({ services: import_zod41.z.array(WindowsService) });
|
|
5439
|
+
WindowsServiceControlParams = import_zod41.z.strictObject({
|
|
5440
|
+
name: import_zod41.z.string().min(1).max(256),
|
|
5408
5441
|
/** pause and resume since 1.67 (Matrx Local's service_control). */
|
|
5409
|
-
action:
|
|
5442
|
+
action: import_zod41.z.enum(["start", "stop", "restart", "pause", "resume"])
|
|
5410
5443
|
});
|
|
5411
|
-
WindowsServiceControlResult =
|
|
5412
|
-
WindowsEventLogParams =
|
|
5413
|
-
log:
|
|
5444
|
+
WindowsServiceControlResult = import_zod41.z.strictObject({ name: import_zod41.z.string(), status: import_zod41.z.string() });
|
|
5445
|
+
WindowsEventLogParams = import_zod41.z.strictObject({
|
|
5446
|
+
log: import_zod41.z.string().min(1).max(256).default("System"),
|
|
5414
5447
|
/** Only these levels; absent: all. */
|
|
5415
|
-
levels:
|
|
5448
|
+
levels: import_zod41.z.array(import_zod41.z.enum(["critical", "error", "warning", "information", "verbose"])).max(5).optional(),
|
|
5416
5449
|
since_ms: epochMs.optional(),
|
|
5417
5450
|
/** (1.67) Only events whose source (provider) name contains this. */
|
|
5418
|
-
source:
|
|
5419
|
-
limit:
|
|
5451
|
+
source: import_zod41.z.string().min(1).max(256).optional(),
|
|
5452
|
+
limit: import_zod41.z.int().min(1).max(500).default(50)
|
|
5420
5453
|
});
|
|
5421
|
-
WindowsEvent =
|
|
5422
|
-
id:
|
|
5423
|
-
level:
|
|
5424
|
-
source:
|
|
5454
|
+
WindowsEvent = import_zod41.z.strictObject({
|
|
5455
|
+
id: import_zod41.z.int(),
|
|
5456
|
+
level: import_zod41.z.string(),
|
|
5457
|
+
source: import_zod41.z.string(),
|
|
5425
5458
|
at_ms: epochMs,
|
|
5426
|
-
message:
|
|
5459
|
+
message: import_zod41.z.string()
|
|
5427
5460
|
});
|
|
5428
|
-
WindowsEventLogResult =
|
|
5429
|
-
WindowsFeaturesParams =
|
|
5430
|
-
filter:
|
|
5461
|
+
WindowsEventLogResult = import_zod41.z.strictObject({ log: import_zod41.z.string(), events: import_zod41.z.array(WindowsEvent) });
|
|
5462
|
+
WindowsFeaturesParams = import_zod41.z.strictObject({
|
|
5463
|
+
filter: import_zod41.z.string().min(1).max(256).optional(),
|
|
5431
5464
|
/** (1.67) Only features that are on (Matrx Local's windows_features installed_only). */
|
|
5432
|
-
installed_only:
|
|
5465
|
+
installed_only: import_zod41.z.boolean().optional()
|
|
5433
5466
|
});
|
|
5434
|
-
WindowsFeature =
|
|
5435
|
-
WindowsFeaturesResult =
|
|
5467
|
+
WindowsFeature = import_zod41.z.strictObject({ name: import_zod41.z.string(), state: import_zod41.z.string() });
|
|
5468
|
+
WindowsFeaturesResult = import_zod41.z.strictObject({ features: import_zod41.z.array(WindowsFeature) });
|
|
5436
5469
|
}
|
|
5437
5470
|
});
|
|
5438
5471
|
|
|
5439
5472
|
// src/schema/schedule.ts
|
|
5440
|
-
var
|
|
5473
|
+
var import_zod42, OpRef, ScheduleCreateParams, ScheduleRun, ScheduledTask, ScheduleCreateResult, ScheduleListParams, ScheduleListResult, ScheduleCancelParams, ScheduleCancelResult;
|
|
5441
5474
|
var init_schedule = __esm({
|
|
5442
5475
|
"src/schema/schedule.ts"() {
|
|
5443
5476
|
"use strict";
|
|
5444
|
-
|
|
5477
|
+
import_zod42 = require("zod");
|
|
5445
5478
|
init_primitives();
|
|
5446
|
-
OpRef =
|
|
5447
|
-
ScheduleCreateParams =
|
|
5448
|
-
name:
|
|
5479
|
+
OpRef = import_zod42.z.string().min(3).max(128).regex(/^[a-z_]+(\.[a-z_]+)+$/);
|
|
5480
|
+
ScheduleCreateParams = import_zod42.z.strictObject({
|
|
5481
|
+
name: import_zod42.z.string().min(1).max(200),
|
|
5449
5482
|
op: OpRef,
|
|
5450
5483
|
/** The op's params, exactly as the op takes them; checked when the task is created. */
|
|
5451
|
-
params:
|
|
5452
|
-
interval_s:
|
|
5484
|
+
params: import_zod42.z.record(import_zod42.z.string(), import_zod42.z.unknown()).default({}),
|
|
5485
|
+
interval_s: import_zod42.z.int().min(10).max(2592e3),
|
|
5453
5486
|
/** Stop after this many runs; absent: until canceled. */
|
|
5454
|
-
max_runs:
|
|
5487
|
+
max_runs: import_zod42.z.int().min(1).max(1e5).optional(),
|
|
5455
5488
|
/** Run once now, before the first interval. */
|
|
5456
|
-
run_now:
|
|
5489
|
+
run_now: import_zod42.z.boolean().default(false)
|
|
5457
5490
|
});
|
|
5458
|
-
ScheduleRun =
|
|
5491
|
+
ScheduleRun = import_zod42.z.strictObject({
|
|
5459
5492
|
at_ms: epochMs,
|
|
5460
|
-
ok:
|
|
5493
|
+
ok: import_zod42.z.boolean(),
|
|
5461
5494
|
elapsed_ms: nonNegInt,
|
|
5462
5495
|
/** The error's code and message when the run failed. */
|
|
5463
|
-
error:
|
|
5496
|
+
error: import_zod42.z.string().nullable(),
|
|
5464
5497
|
/** The start of the answer, as JSON (cut at 4 KiB). */
|
|
5465
|
-
result_preview:
|
|
5498
|
+
result_preview: import_zod42.z.string().nullable()
|
|
5466
5499
|
});
|
|
5467
|
-
ScheduledTask =
|
|
5468
|
-
id:
|
|
5469
|
-
name:
|
|
5470
|
-
op:
|
|
5471
|
-
params:
|
|
5500
|
+
ScheduledTask = import_zod42.z.strictObject({
|
|
5501
|
+
id: import_zod42.z.string(),
|
|
5502
|
+
name: import_zod42.z.string(),
|
|
5503
|
+
op: import_zod42.z.string(),
|
|
5504
|
+
params: import_zod42.z.record(import_zod42.z.string(), import_zod42.z.unknown()),
|
|
5472
5505
|
interval_s: nonNegInt,
|
|
5473
5506
|
max_runs: nonNegInt.nullable(),
|
|
5474
5507
|
runs: nonNegInt,
|
|
5475
5508
|
created_at_ms: epochMs,
|
|
5476
5509
|
next_run_at_ms: epochMs.nullable(),
|
|
5477
5510
|
/** active, done (ran max_runs), canceled. */
|
|
5478
|
-
state:
|
|
5511
|
+
state: import_zod42.z.enum(["active", "done", "cancelled"]),
|
|
5479
5512
|
/** The newest runs, newest first (at most 10). */
|
|
5480
|
-
recent:
|
|
5513
|
+
recent: import_zod42.z.array(ScheduleRun)
|
|
5481
5514
|
});
|
|
5482
|
-
ScheduleCreateResult =
|
|
5483
|
-
ScheduleListParams =
|
|
5484
|
-
ScheduleListResult =
|
|
5485
|
-
ScheduleCancelParams =
|
|
5486
|
-
ScheduleCancelResult =
|
|
5515
|
+
ScheduleCreateResult = import_zod42.z.strictObject({ task: ScheduledTask });
|
|
5516
|
+
ScheduleListParams = import_zod42.z.strictObject({ include_finished: import_zod42.z.boolean().default(false) });
|
|
5517
|
+
ScheduleListResult = import_zod42.z.strictObject({ tasks: import_zod42.z.array(ScheduledTask) });
|
|
5518
|
+
ScheduleCancelParams = import_zod42.z.strictObject({ id: import_zod42.z.string().min(1).max(64) });
|
|
5519
|
+
ScheduleCancelResult = import_zod42.z.strictObject({ task: ScheduledTask });
|
|
5487
5520
|
}
|
|
5488
5521
|
});
|
|
5489
5522
|
|
|
5490
5523
|
// src/schema/notes.ts
|
|
5491
|
-
var
|
|
5524
|
+
var import_zod43, NoteFolder, NotePath, NotesFoldersParams, NotesFolder, NotesFoldersResult, NotesListParams, NoteEntry, NotesListResult, NotesReadParams, NotesReadResult, NotesWriteParams, NotesWriteResult, NotesSearchParams, NotesMatch, NotesSearchResult;
|
|
5492
5525
|
var init_notes = __esm({
|
|
5493
5526
|
"src/schema/notes.ts"() {
|
|
5494
5527
|
"use strict";
|
|
5495
|
-
|
|
5528
|
+
import_zod43 = require("zod");
|
|
5496
5529
|
init_primitives();
|
|
5497
|
-
NoteFolder =
|
|
5498
|
-
NotePath =
|
|
5499
|
-
NotesFoldersParams =
|
|
5500
|
-
NotesFolder =
|
|
5501
|
-
NotesFoldersResult =
|
|
5530
|
+
NoteFolder = import_zod43.z.string().min(1).max(512).regex(/^[^/\\:*?"<>|][^\\:*?"<>|]*$/);
|
|
5531
|
+
NotePath = import_zod43.z.string().min(4).max(1024).regex(/^[^/\\:*?"<>|][^\\:*?"<>|]*\.md$/);
|
|
5532
|
+
NotesFoldersParams = import_zod43.z.strictObject({});
|
|
5533
|
+
NotesFolder = import_zod43.z.strictObject({ folder: import_zod43.z.string(), notes: nonNegInt });
|
|
5534
|
+
NotesFoldersResult = import_zod43.z.strictObject({
|
|
5502
5535
|
/** The notes root on this computer. */
|
|
5503
|
-
root:
|
|
5504
|
-
folders:
|
|
5536
|
+
root: import_zod43.z.string(),
|
|
5537
|
+
folders: import_zod43.z.array(NotesFolder)
|
|
5505
5538
|
});
|
|
5506
|
-
NotesListParams =
|
|
5539
|
+
NotesListParams = import_zod43.z.strictObject({
|
|
5507
5540
|
folder: NoteFolder.optional(),
|
|
5508
|
-
limit:
|
|
5541
|
+
limit: import_zod43.z.int().min(1).max(2e3).default(500)
|
|
5509
5542
|
});
|
|
5510
|
-
NoteEntry =
|
|
5511
|
-
path:
|
|
5512
|
-
label:
|
|
5513
|
-
folder:
|
|
5543
|
+
NoteEntry = import_zod43.z.strictObject({
|
|
5544
|
+
path: import_zod43.z.string(),
|
|
5545
|
+
label: import_zod43.z.string(),
|
|
5546
|
+
folder: import_zod43.z.string(),
|
|
5514
5547
|
bytes: nonNegInt,
|
|
5515
5548
|
modified_at_ms: epochMs
|
|
5516
5549
|
});
|
|
5517
|
-
NotesListResult =
|
|
5518
|
-
NotesReadParams =
|
|
5519
|
-
NotesReadResult =
|
|
5520
|
-
path:
|
|
5521
|
-
content:
|
|
5550
|
+
NotesListResult = import_zod43.z.strictObject({ root: import_zod43.z.string(), notes: import_zod43.z.array(NoteEntry), total: nonNegInt });
|
|
5551
|
+
NotesReadParams = import_zod43.z.strictObject({ path: NotePath });
|
|
5552
|
+
NotesReadResult = import_zod43.z.strictObject({
|
|
5553
|
+
path: import_zod43.z.string(),
|
|
5554
|
+
content: import_zod43.z.string(),
|
|
5522
5555
|
bytes: nonNegInt,
|
|
5523
5556
|
modified_at_ms: epochMs,
|
|
5524
5557
|
/** SHA-256 of the content: pass it back as `if_hash` to write only over this version. */
|
|
5525
|
-
hash:
|
|
5558
|
+
hash: import_zod43.z.string()
|
|
5526
5559
|
});
|
|
5527
|
-
NotesWriteParams =
|
|
5560
|
+
NotesWriteParams = import_zod43.z.strictObject({
|
|
5528
5561
|
folder: NoteFolder.default("General"),
|
|
5529
5562
|
/** The note's name, without ".md". */
|
|
5530
|
-
label:
|
|
5531
|
-
content:
|
|
5563
|
+
label: import_zod43.z.string().min(1).max(200).regex(/^[^/\\:*?"<>|]+$/),
|
|
5564
|
+
content: import_zod43.z.string().max(10485760),
|
|
5532
5565
|
/** Write only when the note is still this version (notes.read's hash); a change since answers CONFLICT. */
|
|
5533
|
-
if_hash:
|
|
5566
|
+
if_hash: import_zod43.z.string().length(64).optional()
|
|
5534
5567
|
});
|
|
5535
|
-
NotesWriteResult =
|
|
5536
|
-
NotesSearchParams =
|
|
5537
|
-
query:
|
|
5538
|
-
limit:
|
|
5568
|
+
NotesWriteResult = import_zod43.z.strictObject({ path: import_zod43.z.string(), bytes: nonNegInt, created: import_zod43.z.boolean(), hash: import_zod43.z.string() });
|
|
5569
|
+
NotesSearchParams = import_zod43.z.strictObject({
|
|
5570
|
+
query: import_zod43.z.string().min(1).max(512),
|
|
5571
|
+
limit: import_zod43.z.int().min(1).max(200).default(50)
|
|
5539
5572
|
});
|
|
5540
|
-
NotesMatch =
|
|
5541
|
-
path:
|
|
5542
|
-
label:
|
|
5543
|
-
folder:
|
|
5573
|
+
NotesMatch = import_zod43.z.strictObject({
|
|
5574
|
+
path: import_zod43.z.string(),
|
|
5575
|
+
label: import_zod43.z.string(),
|
|
5576
|
+
folder: import_zod43.z.string(),
|
|
5544
5577
|
/** The matching lines (at most five), trimmed. */
|
|
5545
|
-
lines:
|
|
5578
|
+
lines: import_zod43.z.array(import_zod43.z.string())
|
|
5546
5579
|
});
|
|
5547
|
-
NotesSearchResult =
|
|
5580
|
+
NotesSearchResult = import_zod43.z.strictObject({ matches: import_zod43.z.array(NotesMatch), total: nonNegInt });
|
|
5548
5581
|
}
|
|
5549
5582
|
});
|
|
5550
5583
|
|
|
5551
5584
|
// src/schema/documents.ts
|
|
5552
|
-
var
|
|
5585
|
+
var import_zod44, DOCUMENTS_MAX_TEXT_CHARS, DocumentsPdfTextParams, DocumentsPdfPage, DocumentsPdfTextResult, DocumentsOcrParams, DocumentsOcrLine, DocumentsOcrResult, DocumentsImageResizeParams, DocumentsImageResizeResult, DocumentsParagraph, DocumentsSheet, DocumentsOfficeGenerateParams, DocumentsOfficeGenerateResult, EntitiesNerParams, EntitySpan, EntitiesNerResult, PiiKind, EntitiesPiiParams, EntitiesPiiResult;
|
|
5553
5586
|
var init_documents = __esm({
|
|
5554
5587
|
"src/schema/documents.ts"() {
|
|
5555
5588
|
"use strict";
|
|
5556
|
-
|
|
5589
|
+
import_zod44 = require("zod");
|
|
5557
5590
|
init_primitives();
|
|
5558
5591
|
DOCUMENTS_MAX_TEXT_CHARS = 1048576;
|
|
5559
|
-
DocumentsPdfTextParams =
|
|
5592
|
+
DocumentsPdfTextParams = import_zod44.z.strictObject({
|
|
5560
5593
|
path: AbsPath,
|
|
5561
5594
|
/** 1-based, inclusive. */
|
|
5562
|
-
first_page:
|
|
5563
|
-
last_page:
|
|
5564
|
-
max_chars:
|
|
5595
|
+
first_page: import_zod44.z.int().min(1).optional(),
|
|
5596
|
+
last_page: import_zod44.z.int().min(1).optional(),
|
|
5597
|
+
max_chars: import_zod44.z.int().min(1).max(DOCUMENTS_MAX_TEXT_CHARS).default(2e5)
|
|
5565
5598
|
});
|
|
5566
|
-
DocumentsPdfPage =
|
|
5567
|
-
DocumentsPdfTextResult =
|
|
5599
|
+
DocumentsPdfPage = import_zod44.z.strictObject({ page: import_zod44.z.int().min(1), text: import_zod44.z.string() });
|
|
5600
|
+
DocumentsPdfTextResult = import_zod44.z.strictObject({
|
|
5568
5601
|
pages: nonNegInt,
|
|
5569
5602
|
/** Each page read, in order (an image-only page has empty text: OCR it). */
|
|
5570
|
-
read:
|
|
5571
|
-
truncated:
|
|
5572
|
-
title:
|
|
5573
|
-
author:
|
|
5603
|
+
read: import_zod44.z.array(DocumentsPdfPage),
|
|
5604
|
+
truncated: import_zod44.z.boolean(),
|
|
5605
|
+
title: import_zod44.z.string().nullable(),
|
|
5606
|
+
author: import_zod44.z.string().nullable()
|
|
5574
5607
|
});
|
|
5575
|
-
DocumentsOcrParams =
|
|
5608
|
+
DocumentsOcrParams = import_zod44.z.strictObject({
|
|
5576
5609
|
path: AbsPath,
|
|
5577
5610
|
/** BCP-47 language hints ("en-US", "fr-FR"); absent: the OS's own choice. */
|
|
5578
|
-
languages:
|
|
5611
|
+
languages: import_zod44.z.array(import_zod44.z.string().min(2).max(16)).max(8).optional(),
|
|
5579
5612
|
/** Faster, less accurate. */
|
|
5580
|
-
fast:
|
|
5613
|
+
fast: import_zod44.z.boolean().default(false)
|
|
5581
5614
|
});
|
|
5582
|
-
DocumentsOcrLine =
|
|
5583
|
-
text:
|
|
5615
|
+
DocumentsOcrLine = import_zod44.z.strictObject({
|
|
5616
|
+
text: import_zod44.z.string(),
|
|
5584
5617
|
/** 0–1; null where the engine does not say. */
|
|
5585
|
-
confidence:
|
|
5618
|
+
confidence: import_zod44.z.number().min(0).max(1).nullable()
|
|
5586
5619
|
});
|
|
5587
|
-
DocumentsOcrResult =
|
|
5588
|
-
text:
|
|
5589
|
-
lines:
|
|
5590
|
-
truncated:
|
|
5620
|
+
DocumentsOcrResult = import_zod44.z.strictObject({
|
|
5621
|
+
text: import_zod44.z.string(),
|
|
5622
|
+
lines: import_zod44.z.array(DocumentsOcrLine),
|
|
5623
|
+
truncated: import_zod44.z.boolean(),
|
|
5591
5624
|
/** Which engine read it ("vision" on macOS, "windows-ocr", "tesseract"). */
|
|
5592
|
-
engine:
|
|
5625
|
+
engine: import_zod44.z.string()
|
|
5593
5626
|
});
|
|
5594
|
-
DocumentsImageResizeParams =
|
|
5627
|
+
DocumentsImageResizeParams = import_zod44.z.strictObject({
|
|
5595
5628
|
path: AbsPath,
|
|
5596
5629
|
/** Where to write it; absent: next to the original, "<name>-resized.<ext>". */
|
|
5597
5630
|
out_path: AbsPath.optional(),
|
|
5598
5631
|
/** The longest side, kept in proportion; absent: the size stays (a format change only). */
|
|
5599
|
-
max_size:
|
|
5600
|
-
format:
|
|
5601
|
-
overwrite:
|
|
5632
|
+
max_size: import_zod44.z.int().min(1).max(32768).optional(),
|
|
5633
|
+
format: import_zod44.z.enum(["png", "jpeg", "tiff", "heic", "bmp", "gif"]).optional(),
|
|
5634
|
+
overwrite: import_zod44.z.boolean().default(false)
|
|
5602
5635
|
});
|
|
5603
|
-
DocumentsImageResizeResult =
|
|
5604
|
-
path:
|
|
5636
|
+
DocumentsImageResizeResult = import_zod44.z.strictObject({
|
|
5637
|
+
path: import_zod44.z.string(),
|
|
5605
5638
|
width: nonNegInt,
|
|
5606
5639
|
height: nonNegInt,
|
|
5607
5640
|
bytes: nonNegInt
|
|
5608
5641
|
});
|
|
5609
|
-
DocumentsParagraph =
|
|
5610
|
-
style:
|
|
5611
|
-
text:
|
|
5642
|
+
DocumentsParagraph = import_zod44.z.strictObject({
|
|
5643
|
+
style: import_zod44.z.enum(["title", "heading1", "heading2", "heading3", "body", "bullet", "numbered", "quote", "code"]).default("body"),
|
|
5644
|
+
text: import_zod44.z.string().max(1e5)
|
|
5612
5645
|
});
|
|
5613
|
-
DocumentsSheet =
|
|
5614
|
-
name:
|
|
5646
|
+
DocumentsSheet = import_zod44.z.strictObject({
|
|
5647
|
+
name: import_zod44.z.string().min(1).max(31),
|
|
5615
5648
|
/** Rows of cells; the first row is the header when `header` is true. */
|
|
5616
|
-
rows:
|
|
5617
|
-
header:
|
|
5649
|
+
rows: import_zod44.z.array(import_zod44.z.array(import_zod44.z.union([import_zod44.z.string().max(32767), import_zod44.z.number(), import_zod44.z.boolean(), import_zod44.z.null()])).max(16384)).max(1e5),
|
|
5650
|
+
header: import_zod44.z.boolean().default(true)
|
|
5618
5651
|
});
|
|
5619
|
-
DocumentsOfficeGenerateParams =
|
|
5620
|
-
kind:
|
|
5652
|
+
DocumentsOfficeGenerateParams = import_zod44.z.strictObject({
|
|
5653
|
+
kind: import_zod44.z.enum(["docx", "xlsx"]),
|
|
5621
5654
|
path: AbsPath,
|
|
5622
|
-
title:
|
|
5655
|
+
title: import_zod44.z.string().max(1024).optional(),
|
|
5623
5656
|
/** docx: the document's paragraphs, in order. */
|
|
5624
|
-
paragraphs:
|
|
5657
|
+
paragraphs: import_zod44.z.array(DocumentsParagraph).max(5e4).optional(),
|
|
5625
5658
|
/** xlsx: the workbook's sheets, in order. */
|
|
5626
|
-
sheets:
|
|
5627
|
-
overwrite:
|
|
5659
|
+
sheets: import_zod44.z.array(DocumentsSheet).min(1).max(64).optional(),
|
|
5660
|
+
overwrite: import_zod44.z.boolean().default(false)
|
|
5628
5661
|
});
|
|
5629
|
-
DocumentsOfficeGenerateResult =
|
|
5630
|
-
EntitiesNerParams =
|
|
5631
|
-
text:
|
|
5662
|
+
DocumentsOfficeGenerateResult = import_zod44.z.strictObject({ path: import_zod44.z.string(), bytes: nonNegInt });
|
|
5663
|
+
EntitiesNerParams = import_zod44.z.strictObject({
|
|
5664
|
+
text: import_zod44.z.string().min(1).max(DOCUMENTS_MAX_TEXT_CHARS),
|
|
5632
5665
|
/** Which kinds to keep; absent: all three. */
|
|
5633
|
-
labels:
|
|
5666
|
+
labels: import_zod44.z.array(import_zod44.z.enum(["person", "place", "organization"])).min(1).max(3).optional()
|
|
5634
5667
|
});
|
|
5635
|
-
EntitySpan =
|
|
5636
|
-
text:
|
|
5637
|
-
label:
|
|
5668
|
+
EntitySpan = import_zod44.z.strictObject({
|
|
5669
|
+
text: import_zod44.z.string(),
|
|
5670
|
+
label: import_zod44.z.string(),
|
|
5638
5671
|
/** Character offsets into the text (UTF-16, as JavaScript counts). */
|
|
5639
5672
|
start: nonNegInt,
|
|
5640
5673
|
end: nonNegInt
|
|
5641
5674
|
});
|
|
5642
|
-
EntitiesNerResult =
|
|
5643
|
-
PiiKind =
|
|
5644
|
-
EntitiesPiiParams =
|
|
5645
|
-
text:
|
|
5646
|
-
kinds:
|
|
5675
|
+
EntitiesNerResult = import_zod44.z.strictObject({ entities: import_zod44.z.array(EntitySpan), engine: import_zod44.z.string() });
|
|
5676
|
+
PiiKind = import_zod44.z.enum(["email", "phone", "credit_card", "us_ssn", "iban", "ip_address", "url", "api_key"]);
|
|
5677
|
+
EntitiesPiiParams = import_zod44.z.strictObject({
|
|
5678
|
+
text: import_zod44.z.string().min(1).max(DOCUMENTS_MAX_TEXT_CHARS),
|
|
5679
|
+
kinds: import_zod44.z.array(PiiKind).min(1).max(8).optional(),
|
|
5647
5680
|
/** Also answer the text with each finding replaced by its kind ("[email]"). */
|
|
5648
|
-
redact:
|
|
5681
|
+
redact: import_zod44.z.boolean().default(false)
|
|
5649
5682
|
});
|
|
5650
|
-
EntitiesPiiResult =
|
|
5651
|
-
findings:
|
|
5652
|
-
redacted:
|
|
5683
|
+
EntitiesPiiResult = import_zod44.z.strictObject({
|
|
5684
|
+
findings: import_zod44.z.array(import_zod44.z.strictObject({ kind: PiiKind, text: import_zod44.z.string(), start: nonNegInt, end: nonNegInt })),
|
|
5685
|
+
redacted: import_zod44.z.string().nullable()
|
|
5653
5686
|
});
|
|
5654
5687
|
}
|
|
5655
5688
|
});
|
|
@@ -5697,6 +5730,7 @@ var init_registry = __esm({
|
|
|
5697
5730
|
init_tools();
|
|
5698
5731
|
init_coding();
|
|
5699
5732
|
init_coding_assets();
|
|
5733
|
+
init_agent_service();
|
|
5700
5734
|
init_coding_sessions();
|
|
5701
5735
|
init_apps();
|
|
5702
5736
|
init_apps_chats();
|
|
@@ -6083,9 +6117,24 @@ var init_registry = __esm({
|
|
|
6083
6117
|
"tools.web_runtime_install": { params: WebRuntimeParams, result: WebRuntimeState },
|
|
6084
6118
|
"tools.web_runtime_remove": { params: WebRuntimeParams, result: WebRuntimeState }
|
|
6085
6119
|
}
|
|
6120
|
+
},
|
|
6121
|
+
// (1.86) The on-device agent turn (matrx-desktop python/agent): first-use install, then the /ai listener.
|
|
6122
|
+
agent: {
|
|
6123
|
+
progress: AgentServiceProgress,
|
|
6124
|
+
ops: {
|
|
6125
|
+
"agent.status": { params: AgentStatusParams, result: AgentServiceState },
|
|
6126
|
+
"agent.install": { params: AgentInstallParams, result: AgentServiceState },
|
|
6127
|
+
"agent.start": { params: AgentStartParams, result: AgentServiceState }
|
|
6128
|
+
}
|
|
6086
6129
|
}
|
|
6087
6130
|
};
|
|
6088
6131
|
NAMED_SCHEMAS = {
|
|
6132
|
+
AgentServiceStateName,
|
|
6133
|
+
AgentStatusParams,
|
|
6134
|
+
AgentInstallParams,
|
|
6135
|
+
AgentStartParams,
|
|
6136
|
+
AgentServiceState,
|
|
6137
|
+
AgentServiceProgress,
|
|
6089
6138
|
AgentAssetTool,
|
|
6090
6139
|
AgentAssetKind,
|
|
6091
6140
|
AgentAssetOrigin,
|