@kmmao/happy-wire 0.7.1 → 0.8.1
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/dist/index.cjs +130 -16
- package/dist/index.d.cts +358 -4
- package/dist/index.d.mts +358 -4
- package/dist/index.mjs +120 -17
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -166,6 +166,17 @@ const sessionContextUsageCategorySchema = z__namespace.object({
|
|
|
166
166
|
tokens: z__namespace.number(),
|
|
167
167
|
color: z__namespace.string().optional()
|
|
168
168
|
});
|
|
169
|
+
const sessionTaskLogEventSchema = z__namespace.object({
|
|
170
|
+
t: z__namespace.literal("task-log"),
|
|
171
|
+
/** Background task ID or tool call ID that owns this log stream */
|
|
172
|
+
taskId: z__namespace.string(),
|
|
173
|
+
/** Path to the output file on the CLI machine */
|
|
174
|
+
outputFile: z__namespace.string(),
|
|
175
|
+
/** Incremental log content (new lines since last push) */
|
|
176
|
+
chunk: z__namespace.string(),
|
|
177
|
+
/** Byte offset in the output file where this chunk starts */
|
|
178
|
+
offset: z__namespace.number()
|
|
179
|
+
});
|
|
169
180
|
const sessionContextUsageEventSchema = z__namespace.object({
|
|
170
181
|
t: z__namespace.literal("context-usage"),
|
|
171
182
|
totalTokens: z__namespace.number(),
|
|
@@ -201,7 +212,8 @@ const sessionEventSchema = z__namespace.discriminatedUnion("t", [
|
|
|
201
212
|
sessionPromptSuggestionEventSchema,
|
|
202
213
|
sessionNeedsContinueEventSchema,
|
|
203
214
|
sessionStateChangedEventSchema,
|
|
204
|
-
sessionContextUsageEventSchema
|
|
215
|
+
sessionContextUsageEventSchema,
|
|
216
|
+
sessionTaskLogEventSchema
|
|
205
217
|
]);
|
|
206
218
|
const sessionEnvelopeSchema = z__namespace.object({
|
|
207
219
|
id: z__namespace.string(),
|
|
@@ -220,7 +232,7 @@ const sessionEnvelopeSchema = z__namespace.object({
|
|
|
220
232
|
path: ["role"]
|
|
221
233
|
});
|
|
222
234
|
}
|
|
223
|
-
if ((envelope.ev.t === "start" || envelope.ev.t === "stop" || envelope.ev.t === "usage-update" || envelope.ev.t === "task-start" || envelope.ev.t === "task-progress" || envelope.ev.t === "task-end" || envelope.ev.t === "tool-progress" || envelope.ev.t === "prompt-suggestion" || envelope.ev.t === "needs-continue" || envelope.ev.t === "session-state-changed" || envelope.ev.t === "context-usage") && envelope.role !== "agent") {
|
|
235
|
+
if ((envelope.ev.t === "start" || envelope.ev.t === "stop" || envelope.ev.t === "usage-update" || envelope.ev.t === "task-start" || envelope.ev.t === "task-progress" || envelope.ev.t === "task-end" || envelope.ev.t === "tool-progress" || envelope.ev.t === "prompt-suggestion" || envelope.ev.t === "needs-continue" || envelope.ev.t === "session-state-changed" || envelope.ev.t === "context-usage" || envelope.ev.t === "task-log") && envelope.role !== "agent") {
|
|
224
236
|
ctx.addIssue({
|
|
225
237
|
code: z__namespace.ZodIssueCode.custom,
|
|
226
238
|
message: `${envelope.ev.t} events must use role "agent"`,
|
|
@@ -367,25 +379,15 @@ const TailscaleInfoSchema = z__namespace.object({
|
|
|
367
379
|
serves: z__namespace.array(TailscaleServeEntrySchema).optional()
|
|
368
380
|
});
|
|
369
381
|
const TunnelEntrySchema = z__namespace.object({
|
|
370
|
-
/** Provider identifier: "tailscale" | "upnp" | "cloudflare" | "frp" */
|
|
371
382
|
provider: z__namespace.string(),
|
|
372
|
-
/** Local port the service is running on */
|
|
373
383
|
localPort: z__namespace.number(),
|
|
374
|
-
/** Remote/public port (e.g. UPnP external port, Tailscale HTTPS port) */
|
|
375
384
|
remotePort: z__namespace.number().optional(),
|
|
376
|
-
/** Protocol: "HTTPS" | "HTTP" | "TCP" | "UDP" */
|
|
377
385
|
protocol: z__namespace.string(),
|
|
378
|
-
/** Mount path (Tailscale serve path, e.g. "/api") */
|
|
379
386
|
path: z__namespace.string().optional(),
|
|
380
|
-
/** Proxy target URL "http://127.0.0.1:3000" */
|
|
381
387
|
target: z__namespace.string(),
|
|
382
|
-
/** Full public access URL if available */
|
|
383
388
|
publicUrl: z__namespace.string().optional(),
|
|
384
|
-
/** Access scope */
|
|
385
389
|
accessScope: z__namespace.enum(["public", "private", "tailnet"]),
|
|
386
|
-
/** Hostname (Tailscale MagicDNS, Cloudflare domain, etc.) */
|
|
387
390
|
hostname: z__namespace.string().optional(),
|
|
388
|
-
/** Provider-specific extra info */
|
|
389
391
|
metadata: z__namespace.record(z__namespace.string(), z__namespace.string()).optional()
|
|
390
392
|
});
|
|
391
393
|
const TunnelProviderInfoSchema = z__namespace.object({
|
|
@@ -393,29 +395,130 @@ const TunnelProviderInfoSchema = z__namespace.object({
|
|
|
393
395
|
status: z__namespace.enum(["available", "unavailable", "not-installed"]),
|
|
394
396
|
version: z__namespace.string().optional(),
|
|
395
397
|
entries: z__namespace.array(TunnelEntrySchema),
|
|
396
|
-
/** Provider-level info (e.g. Tailscale ipv4/hostname, UPnP external IP) */
|
|
397
398
|
metadata: z__namespace.record(z__namespace.string(), z__namespace.string()).optional()
|
|
398
399
|
});
|
|
399
400
|
const TunnelStateSchema = z__namespace.object({
|
|
400
401
|
providers: z__namespace.array(TunnelProviderInfoSchema)
|
|
401
402
|
});
|
|
403
|
+
const AutomationPrioritySchema = z__namespace.enum(["urgent", "user", "background"]);
|
|
404
|
+
const AutomationJobKindSchema = z__namespace.enum(["supervisor", "webhook"]);
|
|
405
|
+
const AutomationJobStatusSchema = z__namespace.enum([
|
|
406
|
+
"queued",
|
|
407
|
+
"dispatching",
|
|
408
|
+
"running",
|
|
409
|
+
"completed",
|
|
410
|
+
"failed",
|
|
411
|
+
"cancelled"
|
|
412
|
+
]);
|
|
413
|
+
const AutomationJobSummarySchema = z__namespace.object({
|
|
414
|
+
id: z__namespace.string(),
|
|
415
|
+
kind: AutomationJobKindSchema,
|
|
416
|
+
status: AutomationJobStatusSchema,
|
|
417
|
+
priority: AutomationPrioritySchema,
|
|
418
|
+
dedupeKey: z__namespace.string(),
|
|
419
|
+
attempt: z__namespace.number(),
|
|
420
|
+
maxAttempts: z__namespace.number(),
|
|
421
|
+
createdAt: z__namespace.number(),
|
|
422
|
+
updatedAt: z__namespace.number(),
|
|
423
|
+
dispatchedAt: z__namespace.number().optional(),
|
|
424
|
+
completedAt: z__namespace.number().optional(),
|
|
425
|
+
nextRunAt: z__namespace.number().optional(),
|
|
426
|
+
sessionId: z__namespace.string().optional(),
|
|
427
|
+
label: z__namespace.string().optional(),
|
|
428
|
+
projectId: z__namespace.string().optional(),
|
|
429
|
+
runId: z__namespace.string().optional(),
|
|
430
|
+
loopId: z__namespace.string().optional(),
|
|
431
|
+
loopIteration: z__namespace.number().optional(),
|
|
432
|
+
continuityKey: z__namespace.string().optional(),
|
|
433
|
+
errorMessage: z__namespace.string().optional()
|
|
434
|
+
});
|
|
435
|
+
const AutomationGuardianSummarySchema = z__namespace.object({
|
|
436
|
+
key: z__namespace.string(),
|
|
437
|
+
projectId: z__namespace.string(),
|
|
438
|
+
loopId: z__namespace.string().optional(),
|
|
439
|
+
sessionId: z__namespace.string(),
|
|
440
|
+
updatedAt: z__namespace.number(),
|
|
441
|
+
lastRunId: z__namespace.string().optional(),
|
|
442
|
+
attached: z__namespace.boolean().optional()
|
|
443
|
+
});
|
|
444
|
+
const AutomationGuardianUsageSummarySchema = z__namespace.object({
|
|
445
|
+
key: z__namespace.string(),
|
|
446
|
+
projectId: z__namespace.string().optional(),
|
|
447
|
+
loopId: z__namespace.string().optional(),
|
|
448
|
+
reuseCount: z__namespace.number(),
|
|
449
|
+
rememberCount: z__namespace.number(),
|
|
450
|
+
resetCount: z__namespace.number(),
|
|
451
|
+
lastUsedAt: z__namespace.number(),
|
|
452
|
+
currentSessionId: z__namespace.string().optional()
|
|
453
|
+
});
|
|
454
|
+
const AutomationAuditEventSummarySchema = z__namespace.object({
|
|
455
|
+
id: z__namespace.string(),
|
|
456
|
+
occurredAt: z__namespace.number(),
|
|
457
|
+
kind: z__namespace.string(),
|
|
458
|
+
jobId: z__namespace.string().optional(),
|
|
459
|
+
dedupeKey: z__namespace.string().optional(),
|
|
460
|
+
sessionId: z__namespace.string().optional(),
|
|
461
|
+
projectId: z__namespace.string().optional(),
|
|
462
|
+
runId: z__namespace.string().optional(),
|
|
463
|
+
loopId: z__namespace.string().optional(),
|
|
464
|
+
trigger: z__namespace.string().optional(),
|
|
465
|
+
status: z__namespace.string().optional(),
|
|
466
|
+
guardianKey: z__namespace.string().optional(),
|
|
467
|
+
guardianSessionId: z__namespace.string().optional(),
|
|
468
|
+
message: z__namespace.string().optional()
|
|
469
|
+
});
|
|
470
|
+
const AutomationAuditStatsSchema = z__namespace.object({
|
|
471
|
+
totalEvents: z__namespace.number(),
|
|
472
|
+
lastEventAt: z__namespace.number().optional(),
|
|
473
|
+
queuedCount: z__namespace.number(),
|
|
474
|
+
sessionStartedCount: z__namespace.number(),
|
|
475
|
+
terminalCompletedCount: z__namespace.number(),
|
|
476
|
+
terminalFailedCount: z__namespace.number(),
|
|
477
|
+
terminalCancelledCount: z__namespace.number(),
|
|
478
|
+
guardianReuseCount: z__namespace.number(),
|
|
479
|
+
guardianRememberCount: z__namespace.number(),
|
|
480
|
+
guardianResetCount: z__namespace.number(),
|
|
481
|
+
watchdogStopCount: z__namespace.number(),
|
|
482
|
+
stopRequestCount: z__namespace.number(),
|
|
483
|
+
guardianEligibleRunCount: z__namespace.number(),
|
|
484
|
+
guardianReuseRate: z__namespace.number(),
|
|
485
|
+
activeGuardianCount: z__namespace.number()
|
|
486
|
+
});
|
|
487
|
+
const AutomationCountsSchema = z__namespace.object({
|
|
488
|
+
queued: z__namespace.number(),
|
|
489
|
+
dispatching: z__namespace.number(),
|
|
490
|
+
running: z__namespace.number(),
|
|
491
|
+
completed: z__namespace.number(),
|
|
492
|
+
failed: z__namespace.number(),
|
|
493
|
+
cancelled: z__namespace.number()
|
|
494
|
+
});
|
|
495
|
+
const AutomationStateSchema = z__namespace.object({
|
|
496
|
+
updatedAt: z__namespace.number(),
|
|
497
|
+
counts: AutomationCountsSchema,
|
|
498
|
+
recentJobs: z__namespace.array(AutomationJobSummarySchema),
|
|
499
|
+
guardians: z__namespace.array(AutomationGuardianSummarySchema).optional(),
|
|
500
|
+
guardianUsage: z__namespace.array(AutomationGuardianUsageSummarySchema).optional(),
|
|
501
|
+
auditStats: AutomationAuditStatsSchema.optional(),
|
|
502
|
+
recentAuditEvents: z__namespace.array(AutomationAuditEventSummarySchema).optional()
|
|
503
|
+
});
|
|
402
504
|
const DaemonStateSchema = z__namespace.object({
|
|
403
505
|
status: z__namespace.union([
|
|
404
506
|
z__namespace.enum(["running", "shutting-down"]),
|
|
405
507
|
z__namespace.string()
|
|
406
|
-
// Forward compatibility
|
|
407
508
|
]),
|
|
408
509
|
pid: z__namespace.number().optional(),
|
|
409
510
|
httpPort: z__namespace.number().optional(),
|
|
511
|
+
startTime: z__namespace.union([z__namespace.number(), z__namespace.string()]).optional(),
|
|
410
512
|
startedAt: z__namespace.number().optional(),
|
|
513
|
+
startedWithCliVersion: z__namespace.string().optional(),
|
|
411
514
|
shutdownRequestedAt: z__namespace.number().optional(),
|
|
412
515
|
shutdownSource: z__namespace.union([
|
|
413
516
|
z__namespace.enum(["mobile-app", "cli", "os-signal", "unknown"]),
|
|
414
517
|
z__namespace.string()
|
|
415
|
-
// Forward compatibility
|
|
416
518
|
]).optional(),
|
|
417
519
|
tailscale: TailscaleInfoSchema.optional(),
|
|
418
|
-
tunnels: TunnelStateSchema.optional()
|
|
520
|
+
tunnels: TunnelStateSchema.optional(),
|
|
521
|
+
automation: AutomationStateSchema.optional()
|
|
419
522
|
});
|
|
420
523
|
|
|
421
524
|
const KnowledgeEntryTypeSchema = z__namespace.enum([
|
|
@@ -604,6 +707,16 @@ exports.ApiMessageSchema = ApiMessageSchema;
|
|
|
604
707
|
exports.ApiUpdateMachineStateSchema = ApiUpdateMachineStateSchema;
|
|
605
708
|
exports.ApiUpdateNewMessageSchema = ApiUpdateNewMessageSchema;
|
|
606
709
|
exports.ApiUpdateSessionStateSchema = ApiUpdateSessionStateSchema;
|
|
710
|
+
exports.AutomationAuditEventSummarySchema = AutomationAuditEventSummarySchema;
|
|
711
|
+
exports.AutomationAuditStatsSchema = AutomationAuditStatsSchema;
|
|
712
|
+
exports.AutomationCountsSchema = AutomationCountsSchema;
|
|
713
|
+
exports.AutomationGuardianSummarySchema = AutomationGuardianSummarySchema;
|
|
714
|
+
exports.AutomationGuardianUsageSummarySchema = AutomationGuardianUsageSummarySchema;
|
|
715
|
+
exports.AutomationJobKindSchema = AutomationJobKindSchema;
|
|
716
|
+
exports.AutomationJobStatusSchema = AutomationJobStatusSchema;
|
|
717
|
+
exports.AutomationJobSummarySchema = AutomationJobSummarySchema;
|
|
718
|
+
exports.AutomationPrioritySchema = AutomationPrioritySchema;
|
|
719
|
+
exports.AutomationStateSchema = AutomationStateSchema;
|
|
607
720
|
exports.CoreUpdateBodySchema = CoreUpdateBodySchema;
|
|
608
721
|
exports.CoreUpdateContainerSchema = CoreUpdateContainerSchema;
|
|
609
722
|
exports.CreateKnowledgeEntryBodySchema = CreateKnowledgeEntryBodySchema;
|
|
@@ -664,6 +777,7 @@ exports.sessionStartEventSchema = sessionStartEventSchema;
|
|
|
664
777
|
exports.sessionStateChangedEventSchema = sessionStateChangedEventSchema;
|
|
665
778
|
exports.sessionStopEventSchema = sessionStopEventSchema;
|
|
666
779
|
exports.sessionTaskEndEventSchema = sessionTaskEndEventSchema;
|
|
780
|
+
exports.sessionTaskLogEventSchema = sessionTaskLogEventSchema;
|
|
667
781
|
exports.sessionTaskProgressEventSchema = sessionTaskProgressEventSchema;
|
|
668
782
|
exports.sessionTaskStartEventSchema = sessionTaskStartEventSchema;
|
|
669
783
|
exports.sessionTextEventSchema = sessionTextEventSchema;
|
package/dist/index.d.cts
CHANGED
|
@@ -192,6 +192,12 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
|
|
|
192
192
|
assistantMessageTokens: z.ZodNumber;
|
|
193
193
|
userMessageTokens: z.ZodNumber;
|
|
194
194
|
}, z.core.$strip>>;
|
|
195
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
196
|
+
t: z.ZodLiteral<"task-log">;
|
|
197
|
+
taskId: z.ZodString;
|
|
198
|
+
outputFile: z.ZodString;
|
|
199
|
+
chunk: z.ZodString;
|
|
200
|
+
offset: z.ZodNumber;
|
|
195
201
|
}, z.core.$strip>], "t">;
|
|
196
202
|
}, z.core.$strip>;
|
|
197
203
|
meta: z.ZodOptional<z.ZodObject<{
|
|
@@ -418,6 +424,12 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
418
424
|
assistantMessageTokens: z.ZodNumber;
|
|
419
425
|
userMessageTokens: z.ZodNumber;
|
|
420
426
|
}, z.core.$strip>>;
|
|
427
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
428
|
+
t: z.ZodLiteral<"task-log">;
|
|
429
|
+
taskId: z.ZodString;
|
|
430
|
+
outputFile: z.ZodString;
|
|
431
|
+
chunk: z.ZodString;
|
|
432
|
+
offset: z.ZodNumber;
|
|
421
433
|
}, z.core.$strip>], "t">;
|
|
422
434
|
}, z.core.$strip>;
|
|
423
435
|
meta: z.ZodOptional<z.ZodObject<{
|
|
@@ -995,6 +1007,13 @@ declare const sessionContextUsageCategorySchema: z.ZodObject<{
|
|
|
995
1007
|
tokens: z.ZodNumber;
|
|
996
1008
|
color: z.ZodOptional<z.ZodString>;
|
|
997
1009
|
}, z.core.$strip>;
|
|
1010
|
+
declare const sessionTaskLogEventSchema: z.ZodObject<{
|
|
1011
|
+
t: z.ZodLiteral<"task-log">;
|
|
1012
|
+
taskId: z.ZodString;
|
|
1013
|
+
outputFile: z.ZodString;
|
|
1014
|
+
chunk: z.ZodString;
|
|
1015
|
+
offset: z.ZodNumber;
|
|
1016
|
+
}, z.core.$strip>;
|
|
998
1017
|
declare const sessionContextUsageEventSchema: z.ZodObject<{
|
|
999
1018
|
t: z.ZodLiteral<"context-usage">;
|
|
1000
1019
|
totalTokens: z.ZodNumber;
|
|
@@ -1159,6 +1178,12 @@ declare const sessionEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1159
1178
|
assistantMessageTokens: z.ZodNumber;
|
|
1160
1179
|
userMessageTokens: z.ZodNumber;
|
|
1161
1180
|
}, z.core.$strip>>;
|
|
1181
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1182
|
+
t: z.ZodLiteral<"task-log">;
|
|
1183
|
+
taskId: z.ZodString;
|
|
1184
|
+
outputFile: z.ZodString;
|
|
1185
|
+
chunk: z.ZodString;
|
|
1186
|
+
offset: z.ZodNumber;
|
|
1162
1187
|
}, z.core.$strip>], "t">;
|
|
1163
1188
|
type SessionEvent = z.infer<typeof sessionEventSchema>;
|
|
1164
1189
|
declare const sessionEnvelopeSchema: z.ZodObject<{
|
|
@@ -1312,6 +1337,12 @@ declare const sessionEnvelopeSchema: z.ZodObject<{
|
|
|
1312
1337
|
assistantMessageTokens: z.ZodNumber;
|
|
1313
1338
|
userMessageTokens: z.ZodNumber;
|
|
1314
1339
|
}, z.core.$strip>>;
|
|
1340
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1341
|
+
t: z.ZodLiteral<"task-log">;
|
|
1342
|
+
taskId: z.ZodString;
|
|
1343
|
+
outputFile: z.ZodString;
|
|
1344
|
+
chunk: z.ZodString;
|
|
1345
|
+
offset: z.ZodNumber;
|
|
1315
1346
|
}, z.core.$strip>], "t">;
|
|
1316
1347
|
}, z.core.$strip>;
|
|
1317
1348
|
type SessionEnvelope = z.infer<typeof sessionEnvelopeSchema>;
|
|
@@ -1442,6 +1473,228 @@ declare const TunnelStateSchema: z.ZodObject<{
|
|
|
1442
1473
|
}, z.core.$strip>>;
|
|
1443
1474
|
}, z.core.$strip>;
|
|
1444
1475
|
type TunnelState = z.infer<typeof TunnelStateSchema>;
|
|
1476
|
+
declare const AutomationPrioritySchema: z.ZodEnum<{
|
|
1477
|
+
user: "user";
|
|
1478
|
+
urgent: "urgent";
|
|
1479
|
+
background: "background";
|
|
1480
|
+
}>;
|
|
1481
|
+
type AutomationPriority = z.infer<typeof AutomationPrioritySchema>;
|
|
1482
|
+
declare const AutomationJobKindSchema: z.ZodEnum<{
|
|
1483
|
+
supervisor: "supervisor";
|
|
1484
|
+
webhook: "webhook";
|
|
1485
|
+
}>;
|
|
1486
|
+
type AutomationJobKind = z.infer<typeof AutomationJobKindSchema>;
|
|
1487
|
+
declare const AutomationJobStatusSchema: z.ZodEnum<{
|
|
1488
|
+
completed: "completed";
|
|
1489
|
+
failed: "failed";
|
|
1490
|
+
cancelled: "cancelled";
|
|
1491
|
+
running: "running";
|
|
1492
|
+
queued: "queued";
|
|
1493
|
+
dispatching: "dispatching";
|
|
1494
|
+
}>;
|
|
1495
|
+
type AutomationJobStatus = z.infer<typeof AutomationJobStatusSchema>;
|
|
1496
|
+
declare const AutomationJobSummarySchema: z.ZodObject<{
|
|
1497
|
+
id: z.ZodString;
|
|
1498
|
+
kind: z.ZodEnum<{
|
|
1499
|
+
supervisor: "supervisor";
|
|
1500
|
+
webhook: "webhook";
|
|
1501
|
+
}>;
|
|
1502
|
+
status: z.ZodEnum<{
|
|
1503
|
+
completed: "completed";
|
|
1504
|
+
failed: "failed";
|
|
1505
|
+
cancelled: "cancelled";
|
|
1506
|
+
running: "running";
|
|
1507
|
+
queued: "queued";
|
|
1508
|
+
dispatching: "dispatching";
|
|
1509
|
+
}>;
|
|
1510
|
+
priority: z.ZodEnum<{
|
|
1511
|
+
user: "user";
|
|
1512
|
+
urgent: "urgent";
|
|
1513
|
+
background: "background";
|
|
1514
|
+
}>;
|
|
1515
|
+
dedupeKey: z.ZodString;
|
|
1516
|
+
attempt: z.ZodNumber;
|
|
1517
|
+
maxAttempts: z.ZodNumber;
|
|
1518
|
+
createdAt: z.ZodNumber;
|
|
1519
|
+
updatedAt: z.ZodNumber;
|
|
1520
|
+
dispatchedAt: z.ZodOptional<z.ZodNumber>;
|
|
1521
|
+
completedAt: z.ZodOptional<z.ZodNumber>;
|
|
1522
|
+
nextRunAt: z.ZodOptional<z.ZodNumber>;
|
|
1523
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1524
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1525
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1526
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
1527
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1528
|
+
loopIteration: z.ZodOptional<z.ZodNumber>;
|
|
1529
|
+
continuityKey: z.ZodOptional<z.ZodString>;
|
|
1530
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
1531
|
+
}, z.core.$strip>;
|
|
1532
|
+
type AutomationJobSummary = z.infer<typeof AutomationJobSummarySchema>;
|
|
1533
|
+
declare const AutomationGuardianSummarySchema: z.ZodObject<{
|
|
1534
|
+
key: z.ZodString;
|
|
1535
|
+
projectId: z.ZodString;
|
|
1536
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1537
|
+
sessionId: z.ZodString;
|
|
1538
|
+
updatedAt: z.ZodNumber;
|
|
1539
|
+
lastRunId: z.ZodOptional<z.ZodString>;
|
|
1540
|
+
attached: z.ZodOptional<z.ZodBoolean>;
|
|
1541
|
+
}, z.core.$strip>;
|
|
1542
|
+
type AutomationGuardianSummary = z.infer<typeof AutomationGuardianSummarySchema>;
|
|
1543
|
+
declare const AutomationGuardianUsageSummarySchema: z.ZodObject<{
|
|
1544
|
+
key: z.ZodString;
|
|
1545
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1546
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1547
|
+
reuseCount: z.ZodNumber;
|
|
1548
|
+
rememberCount: z.ZodNumber;
|
|
1549
|
+
resetCount: z.ZodNumber;
|
|
1550
|
+
lastUsedAt: z.ZodNumber;
|
|
1551
|
+
currentSessionId: z.ZodOptional<z.ZodString>;
|
|
1552
|
+
}, z.core.$strip>;
|
|
1553
|
+
type AutomationGuardianUsageSummary = z.infer<typeof AutomationGuardianUsageSummarySchema>;
|
|
1554
|
+
declare const AutomationAuditEventSummarySchema: z.ZodObject<{
|
|
1555
|
+
id: z.ZodString;
|
|
1556
|
+
occurredAt: z.ZodNumber;
|
|
1557
|
+
kind: z.ZodString;
|
|
1558
|
+
jobId: z.ZodOptional<z.ZodString>;
|
|
1559
|
+
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
1560
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1561
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1562
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
1563
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1564
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
1565
|
+
status: z.ZodOptional<z.ZodString>;
|
|
1566
|
+
guardianKey: z.ZodOptional<z.ZodString>;
|
|
1567
|
+
guardianSessionId: z.ZodOptional<z.ZodString>;
|
|
1568
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1569
|
+
}, z.core.$strip>;
|
|
1570
|
+
type AutomationAuditEventSummary = z.infer<typeof AutomationAuditEventSummarySchema>;
|
|
1571
|
+
declare const AutomationAuditStatsSchema: z.ZodObject<{
|
|
1572
|
+
totalEvents: z.ZodNumber;
|
|
1573
|
+
lastEventAt: z.ZodOptional<z.ZodNumber>;
|
|
1574
|
+
queuedCount: z.ZodNumber;
|
|
1575
|
+
sessionStartedCount: z.ZodNumber;
|
|
1576
|
+
terminalCompletedCount: z.ZodNumber;
|
|
1577
|
+
terminalFailedCount: z.ZodNumber;
|
|
1578
|
+
terminalCancelledCount: z.ZodNumber;
|
|
1579
|
+
guardianReuseCount: z.ZodNumber;
|
|
1580
|
+
guardianRememberCount: z.ZodNumber;
|
|
1581
|
+
guardianResetCount: z.ZodNumber;
|
|
1582
|
+
watchdogStopCount: z.ZodNumber;
|
|
1583
|
+
stopRequestCount: z.ZodNumber;
|
|
1584
|
+
guardianEligibleRunCount: z.ZodNumber;
|
|
1585
|
+
guardianReuseRate: z.ZodNumber;
|
|
1586
|
+
activeGuardianCount: z.ZodNumber;
|
|
1587
|
+
}, z.core.$strip>;
|
|
1588
|
+
type AutomationAuditStats = z.infer<typeof AutomationAuditStatsSchema>;
|
|
1589
|
+
declare const AutomationCountsSchema: z.ZodObject<{
|
|
1590
|
+
queued: z.ZodNumber;
|
|
1591
|
+
dispatching: z.ZodNumber;
|
|
1592
|
+
running: z.ZodNumber;
|
|
1593
|
+
completed: z.ZodNumber;
|
|
1594
|
+
failed: z.ZodNumber;
|
|
1595
|
+
cancelled: z.ZodNumber;
|
|
1596
|
+
}, z.core.$strip>;
|
|
1597
|
+
type AutomationCounts = z.infer<typeof AutomationCountsSchema>;
|
|
1598
|
+
declare const AutomationStateSchema: z.ZodObject<{
|
|
1599
|
+
updatedAt: z.ZodNumber;
|
|
1600
|
+
counts: z.ZodObject<{
|
|
1601
|
+
queued: z.ZodNumber;
|
|
1602
|
+
dispatching: z.ZodNumber;
|
|
1603
|
+
running: z.ZodNumber;
|
|
1604
|
+
completed: z.ZodNumber;
|
|
1605
|
+
failed: z.ZodNumber;
|
|
1606
|
+
cancelled: z.ZodNumber;
|
|
1607
|
+
}, z.core.$strip>;
|
|
1608
|
+
recentJobs: z.ZodArray<z.ZodObject<{
|
|
1609
|
+
id: z.ZodString;
|
|
1610
|
+
kind: z.ZodEnum<{
|
|
1611
|
+
supervisor: "supervisor";
|
|
1612
|
+
webhook: "webhook";
|
|
1613
|
+
}>;
|
|
1614
|
+
status: z.ZodEnum<{
|
|
1615
|
+
completed: "completed";
|
|
1616
|
+
failed: "failed";
|
|
1617
|
+
cancelled: "cancelled";
|
|
1618
|
+
running: "running";
|
|
1619
|
+
queued: "queued";
|
|
1620
|
+
dispatching: "dispatching";
|
|
1621
|
+
}>;
|
|
1622
|
+
priority: z.ZodEnum<{
|
|
1623
|
+
user: "user";
|
|
1624
|
+
urgent: "urgent";
|
|
1625
|
+
background: "background";
|
|
1626
|
+
}>;
|
|
1627
|
+
dedupeKey: z.ZodString;
|
|
1628
|
+
attempt: z.ZodNumber;
|
|
1629
|
+
maxAttempts: z.ZodNumber;
|
|
1630
|
+
createdAt: z.ZodNumber;
|
|
1631
|
+
updatedAt: z.ZodNumber;
|
|
1632
|
+
dispatchedAt: z.ZodOptional<z.ZodNumber>;
|
|
1633
|
+
completedAt: z.ZodOptional<z.ZodNumber>;
|
|
1634
|
+
nextRunAt: z.ZodOptional<z.ZodNumber>;
|
|
1635
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1636
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1637
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1638
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
1639
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1640
|
+
loopIteration: z.ZodOptional<z.ZodNumber>;
|
|
1641
|
+
continuityKey: z.ZodOptional<z.ZodString>;
|
|
1642
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
1643
|
+
}, z.core.$strip>>;
|
|
1644
|
+
guardians: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1645
|
+
key: z.ZodString;
|
|
1646
|
+
projectId: z.ZodString;
|
|
1647
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1648
|
+
sessionId: z.ZodString;
|
|
1649
|
+
updatedAt: z.ZodNumber;
|
|
1650
|
+
lastRunId: z.ZodOptional<z.ZodString>;
|
|
1651
|
+
attached: z.ZodOptional<z.ZodBoolean>;
|
|
1652
|
+
}, z.core.$strip>>>;
|
|
1653
|
+
guardianUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1654
|
+
key: z.ZodString;
|
|
1655
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1656
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1657
|
+
reuseCount: z.ZodNumber;
|
|
1658
|
+
rememberCount: z.ZodNumber;
|
|
1659
|
+
resetCount: z.ZodNumber;
|
|
1660
|
+
lastUsedAt: z.ZodNumber;
|
|
1661
|
+
currentSessionId: z.ZodOptional<z.ZodString>;
|
|
1662
|
+
}, z.core.$strip>>>;
|
|
1663
|
+
auditStats: z.ZodOptional<z.ZodObject<{
|
|
1664
|
+
totalEvents: z.ZodNumber;
|
|
1665
|
+
lastEventAt: z.ZodOptional<z.ZodNumber>;
|
|
1666
|
+
queuedCount: z.ZodNumber;
|
|
1667
|
+
sessionStartedCount: z.ZodNumber;
|
|
1668
|
+
terminalCompletedCount: z.ZodNumber;
|
|
1669
|
+
terminalFailedCount: z.ZodNumber;
|
|
1670
|
+
terminalCancelledCount: z.ZodNumber;
|
|
1671
|
+
guardianReuseCount: z.ZodNumber;
|
|
1672
|
+
guardianRememberCount: z.ZodNumber;
|
|
1673
|
+
guardianResetCount: z.ZodNumber;
|
|
1674
|
+
watchdogStopCount: z.ZodNumber;
|
|
1675
|
+
stopRequestCount: z.ZodNumber;
|
|
1676
|
+
guardianEligibleRunCount: z.ZodNumber;
|
|
1677
|
+
guardianReuseRate: z.ZodNumber;
|
|
1678
|
+
activeGuardianCount: z.ZodNumber;
|
|
1679
|
+
}, z.core.$strip>>;
|
|
1680
|
+
recentAuditEvents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1681
|
+
id: z.ZodString;
|
|
1682
|
+
occurredAt: z.ZodNumber;
|
|
1683
|
+
kind: z.ZodString;
|
|
1684
|
+
jobId: z.ZodOptional<z.ZodString>;
|
|
1685
|
+
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
1686
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1687
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1688
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
1689
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1690
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
1691
|
+
status: z.ZodOptional<z.ZodString>;
|
|
1692
|
+
guardianKey: z.ZodOptional<z.ZodString>;
|
|
1693
|
+
guardianSessionId: z.ZodOptional<z.ZodString>;
|
|
1694
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1695
|
+
}, z.core.$strip>>>;
|
|
1696
|
+
}, z.core.$strip>;
|
|
1697
|
+
type AutomationState = z.infer<typeof AutomationStateSchema>;
|
|
1445
1698
|
declare const DaemonStateSchema: z.ZodObject<{
|
|
1446
1699
|
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
1447
1700
|
running: "running";
|
|
@@ -1449,7 +1702,9 @@ declare const DaemonStateSchema: z.ZodObject<{
|
|
|
1449
1702
|
}>, z.ZodString]>;
|
|
1450
1703
|
pid: z.ZodOptional<z.ZodNumber>;
|
|
1451
1704
|
httpPort: z.ZodOptional<z.ZodNumber>;
|
|
1705
|
+
startTime: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
1452
1706
|
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
1707
|
+
startedWithCliVersion: z.ZodOptional<z.ZodString>;
|
|
1453
1708
|
shutdownRequestedAt: z.ZodOptional<z.ZodNumber>;
|
|
1454
1709
|
shutdownSource: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1455
1710
|
unknown: "unknown";
|
|
@@ -1505,6 +1760,105 @@ declare const DaemonStateSchema: z.ZodObject<{
|
|
|
1505
1760
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1506
1761
|
}, z.core.$strip>>;
|
|
1507
1762
|
}, z.core.$strip>>;
|
|
1763
|
+
automation: z.ZodOptional<z.ZodObject<{
|
|
1764
|
+
updatedAt: z.ZodNumber;
|
|
1765
|
+
counts: z.ZodObject<{
|
|
1766
|
+
queued: z.ZodNumber;
|
|
1767
|
+
dispatching: z.ZodNumber;
|
|
1768
|
+
running: z.ZodNumber;
|
|
1769
|
+
completed: z.ZodNumber;
|
|
1770
|
+
failed: z.ZodNumber;
|
|
1771
|
+
cancelled: z.ZodNumber;
|
|
1772
|
+
}, z.core.$strip>;
|
|
1773
|
+
recentJobs: z.ZodArray<z.ZodObject<{
|
|
1774
|
+
id: z.ZodString;
|
|
1775
|
+
kind: z.ZodEnum<{
|
|
1776
|
+
supervisor: "supervisor";
|
|
1777
|
+
webhook: "webhook";
|
|
1778
|
+
}>;
|
|
1779
|
+
status: z.ZodEnum<{
|
|
1780
|
+
completed: "completed";
|
|
1781
|
+
failed: "failed";
|
|
1782
|
+
cancelled: "cancelled";
|
|
1783
|
+
running: "running";
|
|
1784
|
+
queued: "queued";
|
|
1785
|
+
dispatching: "dispatching";
|
|
1786
|
+
}>;
|
|
1787
|
+
priority: z.ZodEnum<{
|
|
1788
|
+
user: "user";
|
|
1789
|
+
urgent: "urgent";
|
|
1790
|
+
background: "background";
|
|
1791
|
+
}>;
|
|
1792
|
+
dedupeKey: z.ZodString;
|
|
1793
|
+
attempt: z.ZodNumber;
|
|
1794
|
+
maxAttempts: z.ZodNumber;
|
|
1795
|
+
createdAt: z.ZodNumber;
|
|
1796
|
+
updatedAt: z.ZodNumber;
|
|
1797
|
+
dispatchedAt: z.ZodOptional<z.ZodNumber>;
|
|
1798
|
+
completedAt: z.ZodOptional<z.ZodNumber>;
|
|
1799
|
+
nextRunAt: z.ZodOptional<z.ZodNumber>;
|
|
1800
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1801
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1802
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1803
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
1804
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1805
|
+
loopIteration: z.ZodOptional<z.ZodNumber>;
|
|
1806
|
+
continuityKey: z.ZodOptional<z.ZodString>;
|
|
1807
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
1808
|
+
}, z.core.$strip>>;
|
|
1809
|
+
guardians: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1810
|
+
key: z.ZodString;
|
|
1811
|
+
projectId: z.ZodString;
|
|
1812
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1813
|
+
sessionId: z.ZodString;
|
|
1814
|
+
updatedAt: z.ZodNumber;
|
|
1815
|
+
lastRunId: z.ZodOptional<z.ZodString>;
|
|
1816
|
+
attached: z.ZodOptional<z.ZodBoolean>;
|
|
1817
|
+
}, z.core.$strip>>>;
|
|
1818
|
+
guardianUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1819
|
+
key: z.ZodString;
|
|
1820
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1821
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1822
|
+
reuseCount: z.ZodNumber;
|
|
1823
|
+
rememberCount: z.ZodNumber;
|
|
1824
|
+
resetCount: z.ZodNumber;
|
|
1825
|
+
lastUsedAt: z.ZodNumber;
|
|
1826
|
+
currentSessionId: z.ZodOptional<z.ZodString>;
|
|
1827
|
+
}, z.core.$strip>>>;
|
|
1828
|
+
auditStats: z.ZodOptional<z.ZodObject<{
|
|
1829
|
+
totalEvents: z.ZodNumber;
|
|
1830
|
+
lastEventAt: z.ZodOptional<z.ZodNumber>;
|
|
1831
|
+
queuedCount: z.ZodNumber;
|
|
1832
|
+
sessionStartedCount: z.ZodNumber;
|
|
1833
|
+
terminalCompletedCount: z.ZodNumber;
|
|
1834
|
+
terminalFailedCount: z.ZodNumber;
|
|
1835
|
+
terminalCancelledCount: z.ZodNumber;
|
|
1836
|
+
guardianReuseCount: z.ZodNumber;
|
|
1837
|
+
guardianRememberCount: z.ZodNumber;
|
|
1838
|
+
guardianResetCount: z.ZodNumber;
|
|
1839
|
+
watchdogStopCount: z.ZodNumber;
|
|
1840
|
+
stopRequestCount: z.ZodNumber;
|
|
1841
|
+
guardianEligibleRunCount: z.ZodNumber;
|
|
1842
|
+
guardianReuseRate: z.ZodNumber;
|
|
1843
|
+
activeGuardianCount: z.ZodNumber;
|
|
1844
|
+
}, z.core.$strip>>;
|
|
1845
|
+
recentAuditEvents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1846
|
+
id: z.ZodString;
|
|
1847
|
+
occurredAt: z.ZodNumber;
|
|
1848
|
+
kind: z.ZodString;
|
|
1849
|
+
jobId: z.ZodOptional<z.ZodString>;
|
|
1850
|
+
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
1851
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1852
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1853
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
1854
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1855
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
1856
|
+
status: z.ZodOptional<z.ZodString>;
|
|
1857
|
+
guardianKey: z.ZodOptional<z.ZodString>;
|
|
1858
|
+
guardianSessionId: z.ZodOptional<z.ZodString>;
|
|
1859
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1860
|
+
}, z.core.$strip>>>;
|
|
1861
|
+
}, z.core.$strip>>;
|
|
1508
1862
|
}, z.core.$strip>;
|
|
1509
1863
|
type DaemonState = z.infer<typeof DaemonStateSchema>;
|
|
1510
1864
|
|
|
@@ -1517,9 +1871,9 @@ declare const KnowledgeEntryTypeSchema: z.ZodEnum<{
|
|
|
1517
1871
|
}>;
|
|
1518
1872
|
type KnowledgeEntryType = z.infer<typeof KnowledgeEntryTypeSchema>;
|
|
1519
1873
|
declare const KnowledgeContributorTypeSchema: z.ZodEnum<{
|
|
1520
|
-
session: "session";
|
|
1521
1874
|
user: "user";
|
|
1522
1875
|
supervisor: "supervisor";
|
|
1876
|
+
session: "session";
|
|
1523
1877
|
}>;
|
|
1524
1878
|
type KnowledgeContributorType = z.infer<typeof KnowledgeContributorTypeSchema>;
|
|
1525
1879
|
declare const KnowledgeActionSchema: z.ZodEnum<{
|
|
@@ -1550,9 +1904,9 @@ declare const CreateKnowledgeEntryBodySchema: z.ZodObject<{
|
|
|
1550
1904
|
warning: "warning";
|
|
1551
1905
|
}>;
|
|
1552
1906
|
contributorType: z.ZodEnum<{
|
|
1553
|
-
session: "session";
|
|
1554
1907
|
user: "user";
|
|
1555
1908
|
supervisor: "supervisor";
|
|
1909
|
+
session: "session";
|
|
1556
1910
|
}>;
|
|
1557
1911
|
action: z.ZodEnum<{
|
|
1558
1912
|
create: "create";
|
|
@@ -1860,5 +2214,5 @@ declare const VoiceTokenResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1860
2214
|
}, z.core.$strip>], "allowed">;
|
|
1861
2215
|
type VoiceTokenResponse = z.infer<typeof VoiceTokenResponseSchema>;
|
|
1862
2216
|
|
|
1863
|
-
export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, DaemonStateSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, VoiceTokenAllowedSchema, VoiceTokenDeniedSchema, VoiceTokenResponseSchema, createEnvelope, sessionContextUsageCategorySchema, sessionContextUsageEventSchema, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStateChangedEventSchema, sessionStopEventSchema, sessionTaskEndEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
|
|
1864
|
-
export type { AgentMessage, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, CreateKnowledgeEntryBody, CrossProjectSearchResponse, CrossProjectSearchResult, DaemonState, KnowledgeAction, KnowledgeChainEntry, KnowledgeChainRelation, KnowledgeChainResponse, KnowledgeConfidence, KnowledgeContributorType, KnowledgeEntryType, KnowledgeInjectionMode, KnowledgeInjectionRequest, KnowledgeInjectionResponse, KnowledgeStatus, LegacyMessageContent, MachineMetadata, MessageContent, MessageMeta, ProjectProfile, QueryKnowledgeParams, SessionContextUsageEvent, SessionEnvelope, SessionEvent, SessionMessage, SessionMessageContent, SessionModelUsage, SessionProtocolMessage, SessionRole, SessionTurnEndStatus, TailscaleInfo, TailscaleServeEntry, TunnelEntry, TunnelProviderInfo, TunnelState, TurnKnowledgeExtraction, Update, UpdateBody, UpdateKnowledgeEntryBody, UpdateMachineBody, UpdateNewMessageBody, UpdateSessionBody, UserMessage, VersionedEncryptedValue, VersionedMachineEncryptedValue, VersionedNullableEncryptedValue, VoiceTokenResponse };
|
|
2217
|
+
export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, AutomationAuditEventSummarySchema, AutomationAuditStatsSchema, AutomationCountsSchema, AutomationGuardianSummarySchema, AutomationGuardianUsageSummarySchema, AutomationJobKindSchema, AutomationJobStatusSchema, AutomationJobSummarySchema, AutomationPrioritySchema, AutomationStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, DaemonStateSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, VoiceTokenAllowedSchema, VoiceTokenDeniedSchema, VoiceTokenResponseSchema, createEnvelope, sessionContextUsageCategorySchema, sessionContextUsageEventSchema, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStateChangedEventSchema, sessionStopEventSchema, sessionTaskEndEventSchema, sessionTaskLogEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
|
|
2218
|
+
export type { AgentMessage, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, AutomationAuditEventSummary, AutomationAuditStats, AutomationCounts, AutomationGuardianSummary, AutomationGuardianUsageSummary, AutomationJobKind, AutomationJobStatus, AutomationJobSummary, AutomationPriority, AutomationState, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, CreateKnowledgeEntryBody, CrossProjectSearchResponse, CrossProjectSearchResult, DaemonState, KnowledgeAction, KnowledgeChainEntry, KnowledgeChainRelation, KnowledgeChainResponse, KnowledgeConfidence, KnowledgeContributorType, KnowledgeEntryType, KnowledgeInjectionMode, KnowledgeInjectionRequest, KnowledgeInjectionResponse, KnowledgeStatus, LegacyMessageContent, MachineMetadata, MessageContent, MessageMeta, ProjectProfile, QueryKnowledgeParams, SessionContextUsageEvent, SessionEnvelope, SessionEvent, SessionMessage, SessionMessageContent, SessionModelUsage, SessionProtocolMessage, SessionRole, SessionTurnEndStatus, TailscaleInfo, TailscaleServeEntry, TunnelEntry, TunnelProviderInfo, TunnelState, TurnKnowledgeExtraction, Update, UpdateBody, UpdateKnowledgeEntryBody, UpdateMachineBody, UpdateNewMessageBody, UpdateSessionBody, UserMessage, VersionedEncryptedValue, VersionedMachineEncryptedValue, VersionedNullableEncryptedValue, VoiceTokenResponse };
|
package/dist/index.d.mts
CHANGED
|
@@ -192,6 +192,12 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
|
|
|
192
192
|
assistantMessageTokens: z.ZodNumber;
|
|
193
193
|
userMessageTokens: z.ZodNumber;
|
|
194
194
|
}, z.core.$strip>>;
|
|
195
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
196
|
+
t: z.ZodLiteral<"task-log">;
|
|
197
|
+
taskId: z.ZodString;
|
|
198
|
+
outputFile: z.ZodString;
|
|
199
|
+
chunk: z.ZodString;
|
|
200
|
+
offset: z.ZodNumber;
|
|
195
201
|
}, z.core.$strip>], "t">;
|
|
196
202
|
}, z.core.$strip>;
|
|
197
203
|
meta: z.ZodOptional<z.ZodObject<{
|
|
@@ -418,6 +424,12 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
418
424
|
assistantMessageTokens: z.ZodNumber;
|
|
419
425
|
userMessageTokens: z.ZodNumber;
|
|
420
426
|
}, z.core.$strip>>;
|
|
427
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
428
|
+
t: z.ZodLiteral<"task-log">;
|
|
429
|
+
taskId: z.ZodString;
|
|
430
|
+
outputFile: z.ZodString;
|
|
431
|
+
chunk: z.ZodString;
|
|
432
|
+
offset: z.ZodNumber;
|
|
421
433
|
}, z.core.$strip>], "t">;
|
|
422
434
|
}, z.core.$strip>;
|
|
423
435
|
meta: z.ZodOptional<z.ZodObject<{
|
|
@@ -995,6 +1007,13 @@ declare const sessionContextUsageCategorySchema: z.ZodObject<{
|
|
|
995
1007
|
tokens: z.ZodNumber;
|
|
996
1008
|
color: z.ZodOptional<z.ZodString>;
|
|
997
1009
|
}, z.core.$strip>;
|
|
1010
|
+
declare const sessionTaskLogEventSchema: z.ZodObject<{
|
|
1011
|
+
t: z.ZodLiteral<"task-log">;
|
|
1012
|
+
taskId: z.ZodString;
|
|
1013
|
+
outputFile: z.ZodString;
|
|
1014
|
+
chunk: z.ZodString;
|
|
1015
|
+
offset: z.ZodNumber;
|
|
1016
|
+
}, z.core.$strip>;
|
|
998
1017
|
declare const sessionContextUsageEventSchema: z.ZodObject<{
|
|
999
1018
|
t: z.ZodLiteral<"context-usage">;
|
|
1000
1019
|
totalTokens: z.ZodNumber;
|
|
@@ -1159,6 +1178,12 @@ declare const sessionEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1159
1178
|
assistantMessageTokens: z.ZodNumber;
|
|
1160
1179
|
userMessageTokens: z.ZodNumber;
|
|
1161
1180
|
}, z.core.$strip>>;
|
|
1181
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1182
|
+
t: z.ZodLiteral<"task-log">;
|
|
1183
|
+
taskId: z.ZodString;
|
|
1184
|
+
outputFile: z.ZodString;
|
|
1185
|
+
chunk: z.ZodString;
|
|
1186
|
+
offset: z.ZodNumber;
|
|
1162
1187
|
}, z.core.$strip>], "t">;
|
|
1163
1188
|
type SessionEvent = z.infer<typeof sessionEventSchema>;
|
|
1164
1189
|
declare const sessionEnvelopeSchema: z.ZodObject<{
|
|
@@ -1312,6 +1337,12 @@ declare const sessionEnvelopeSchema: z.ZodObject<{
|
|
|
1312
1337
|
assistantMessageTokens: z.ZodNumber;
|
|
1313
1338
|
userMessageTokens: z.ZodNumber;
|
|
1314
1339
|
}, z.core.$strip>>;
|
|
1340
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1341
|
+
t: z.ZodLiteral<"task-log">;
|
|
1342
|
+
taskId: z.ZodString;
|
|
1343
|
+
outputFile: z.ZodString;
|
|
1344
|
+
chunk: z.ZodString;
|
|
1345
|
+
offset: z.ZodNumber;
|
|
1315
1346
|
}, z.core.$strip>], "t">;
|
|
1316
1347
|
}, z.core.$strip>;
|
|
1317
1348
|
type SessionEnvelope = z.infer<typeof sessionEnvelopeSchema>;
|
|
@@ -1442,6 +1473,228 @@ declare const TunnelStateSchema: z.ZodObject<{
|
|
|
1442
1473
|
}, z.core.$strip>>;
|
|
1443
1474
|
}, z.core.$strip>;
|
|
1444
1475
|
type TunnelState = z.infer<typeof TunnelStateSchema>;
|
|
1476
|
+
declare const AutomationPrioritySchema: z.ZodEnum<{
|
|
1477
|
+
user: "user";
|
|
1478
|
+
urgent: "urgent";
|
|
1479
|
+
background: "background";
|
|
1480
|
+
}>;
|
|
1481
|
+
type AutomationPriority = z.infer<typeof AutomationPrioritySchema>;
|
|
1482
|
+
declare const AutomationJobKindSchema: z.ZodEnum<{
|
|
1483
|
+
supervisor: "supervisor";
|
|
1484
|
+
webhook: "webhook";
|
|
1485
|
+
}>;
|
|
1486
|
+
type AutomationJobKind = z.infer<typeof AutomationJobKindSchema>;
|
|
1487
|
+
declare const AutomationJobStatusSchema: z.ZodEnum<{
|
|
1488
|
+
completed: "completed";
|
|
1489
|
+
failed: "failed";
|
|
1490
|
+
cancelled: "cancelled";
|
|
1491
|
+
running: "running";
|
|
1492
|
+
queued: "queued";
|
|
1493
|
+
dispatching: "dispatching";
|
|
1494
|
+
}>;
|
|
1495
|
+
type AutomationJobStatus = z.infer<typeof AutomationJobStatusSchema>;
|
|
1496
|
+
declare const AutomationJobSummarySchema: z.ZodObject<{
|
|
1497
|
+
id: z.ZodString;
|
|
1498
|
+
kind: z.ZodEnum<{
|
|
1499
|
+
supervisor: "supervisor";
|
|
1500
|
+
webhook: "webhook";
|
|
1501
|
+
}>;
|
|
1502
|
+
status: z.ZodEnum<{
|
|
1503
|
+
completed: "completed";
|
|
1504
|
+
failed: "failed";
|
|
1505
|
+
cancelled: "cancelled";
|
|
1506
|
+
running: "running";
|
|
1507
|
+
queued: "queued";
|
|
1508
|
+
dispatching: "dispatching";
|
|
1509
|
+
}>;
|
|
1510
|
+
priority: z.ZodEnum<{
|
|
1511
|
+
user: "user";
|
|
1512
|
+
urgent: "urgent";
|
|
1513
|
+
background: "background";
|
|
1514
|
+
}>;
|
|
1515
|
+
dedupeKey: z.ZodString;
|
|
1516
|
+
attempt: z.ZodNumber;
|
|
1517
|
+
maxAttempts: z.ZodNumber;
|
|
1518
|
+
createdAt: z.ZodNumber;
|
|
1519
|
+
updatedAt: z.ZodNumber;
|
|
1520
|
+
dispatchedAt: z.ZodOptional<z.ZodNumber>;
|
|
1521
|
+
completedAt: z.ZodOptional<z.ZodNumber>;
|
|
1522
|
+
nextRunAt: z.ZodOptional<z.ZodNumber>;
|
|
1523
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1524
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1525
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1526
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
1527
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1528
|
+
loopIteration: z.ZodOptional<z.ZodNumber>;
|
|
1529
|
+
continuityKey: z.ZodOptional<z.ZodString>;
|
|
1530
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
1531
|
+
}, z.core.$strip>;
|
|
1532
|
+
type AutomationJobSummary = z.infer<typeof AutomationJobSummarySchema>;
|
|
1533
|
+
declare const AutomationGuardianSummarySchema: z.ZodObject<{
|
|
1534
|
+
key: z.ZodString;
|
|
1535
|
+
projectId: z.ZodString;
|
|
1536
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1537
|
+
sessionId: z.ZodString;
|
|
1538
|
+
updatedAt: z.ZodNumber;
|
|
1539
|
+
lastRunId: z.ZodOptional<z.ZodString>;
|
|
1540
|
+
attached: z.ZodOptional<z.ZodBoolean>;
|
|
1541
|
+
}, z.core.$strip>;
|
|
1542
|
+
type AutomationGuardianSummary = z.infer<typeof AutomationGuardianSummarySchema>;
|
|
1543
|
+
declare const AutomationGuardianUsageSummarySchema: z.ZodObject<{
|
|
1544
|
+
key: z.ZodString;
|
|
1545
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1546
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1547
|
+
reuseCount: z.ZodNumber;
|
|
1548
|
+
rememberCount: z.ZodNumber;
|
|
1549
|
+
resetCount: z.ZodNumber;
|
|
1550
|
+
lastUsedAt: z.ZodNumber;
|
|
1551
|
+
currentSessionId: z.ZodOptional<z.ZodString>;
|
|
1552
|
+
}, z.core.$strip>;
|
|
1553
|
+
type AutomationGuardianUsageSummary = z.infer<typeof AutomationGuardianUsageSummarySchema>;
|
|
1554
|
+
declare const AutomationAuditEventSummarySchema: z.ZodObject<{
|
|
1555
|
+
id: z.ZodString;
|
|
1556
|
+
occurredAt: z.ZodNumber;
|
|
1557
|
+
kind: z.ZodString;
|
|
1558
|
+
jobId: z.ZodOptional<z.ZodString>;
|
|
1559
|
+
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
1560
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1561
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1562
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
1563
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1564
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
1565
|
+
status: z.ZodOptional<z.ZodString>;
|
|
1566
|
+
guardianKey: z.ZodOptional<z.ZodString>;
|
|
1567
|
+
guardianSessionId: z.ZodOptional<z.ZodString>;
|
|
1568
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1569
|
+
}, z.core.$strip>;
|
|
1570
|
+
type AutomationAuditEventSummary = z.infer<typeof AutomationAuditEventSummarySchema>;
|
|
1571
|
+
declare const AutomationAuditStatsSchema: z.ZodObject<{
|
|
1572
|
+
totalEvents: z.ZodNumber;
|
|
1573
|
+
lastEventAt: z.ZodOptional<z.ZodNumber>;
|
|
1574
|
+
queuedCount: z.ZodNumber;
|
|
1575
|
+
sessionStartedCount: z.ZodNumber;
|
|
1576
|
+
terminalCompletedCount: z.ZodNumber;
|
|
1577
|
+
terminalFailedCount: z.ZodNumber;
|
|
1578
|
+
terminalCancelledCount: z.ZodNumber;
|
|
1579
|
+
guardianReuseCount: z.ZodNumber;
|
|
1580
|
+
guardianRememberCount: z.ZodNumber;
|
|
1581
|
+
guardianResetCount: z.ZodNumber;
|
|
1582
|
+
watchdogStopCount: z.ZodNumber;
|
|
1583
|
+
stopRequestCount: z.ZodNumber;
|
|
1584
|
+
guardianEligibleRunCount: z.ZodNumber;
|
|
1585
|
+
guardianReuseRate: z.ZodNumber;
|
|
1586
|
+
activeGuardianCount: z.ZodNumber;
|
|
1587
|
+
}, z.core.$strip>;
|
|
1588
|
+
type AutomationAuditStats = z.infer<typeof AutomationAuditStatsSchema>;
|
|
1589
|
+
declare const AutomationCountsSchema: z.ZodObject<{
|
|
1590
|
+
queued: z.ZodNumber;
|
|
1591
|
+
dispatching: z.ZodNumber;
|
|
1592
|
+
running: z.ZodNumber;
|
|
1593
|
+
completed: z.ZodNumber;
|
|
1594
|
+
failed: z.ZodNumber;
|
|
1595
|
+
cancelled: z.ZodNumber;
|
|
1596
|
+
}, z.core.$strip>;
|
|
1597
|
+
type AutomationCounts = z.infer<typeof AutomationCountsSchema>;
|
|
1598
|
+
declare const AutomationStateSchema: z.ZodObject<{
|
|
1599
|
+
updatedAt: z.ZodNumber;
|
|
1600
|
+
counts: z.ZodObject<{
|
|
1601
|
+
queued: z.ZodNumber;
|
|
1602
|
+
dispatching: z.ZodNumber;
|
|
1603
|
+
running: z.ZodNumber;
|
|
1604
|
+
completed: z.ZodNumber;
|
|
1605
|
+
failed: z.ZodNumber;
|
|
1606
|
+
cancelled: z.ZodNumber;
|
|
1607
|
+
}, z.core.$strip>;
|
|
1608
|
+
recentJobs: z.ZodArray<z.ZodObject<{
|
|
1609
|
+
id: z.ZodString;
|
|
1610
|
+
kind: z.ZodEnum<{
|
|
1611
|
+
supervisor: "supervisor";
|
|
1612
|
+
webhook: "webhook";
|
|
1613
|
+
}>;
|
|
1614
|
+
status: z.ZodEnum<{
|
|
1615
|
+
completed: "completed";
|
|
1616
|
+
failed: "failed";
|
|
1617
|
+
cancelled: "cancelled";
|
|
1618
|
+
running: "running";
|
|
1619
|
+
queued: "queued";
|
|
1620
|
+
dispatching: "dispatching";
|
|
1621
|
+
}>;
|
|
1622
|
+
priority: z.ZodEnum<{
|
|
1623
|
+
user: "user";
|
|
1624
|
+
urgent: "urgent";
|
|
1625
|
+
background: "background";
|
|
1626
|
+
}>;
|
|
1627
|
+
dedupeKey: z.ZodString;
|
|
1628
|
+
attempt: z.ZodNumber;
|
|
1629
|
+
maxAttempts: z.ZodNumber;
|
|
1630
|
+
createdAt: z.ZodNumber;
|
|
1631
|
+
updatedAt: z.ZodNumber;
|
|
1632
|
+
dispatchedAt: z.ZodOptional<z.ZodNumber>;
|
|
1633
|
+
completedAt: z.ZodOptional<z.ZodNumber>;
|
|
1634
|
+
nextRunAt: z.ZodOptional<z.ZodNumber>;
|
|
1635
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1636
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1637
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1638
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
1639
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1640
|
+
loopIteration: z.ZodOptional<z.ZodNumber>;
|
|
1641
|
+
continuityKey: z.ZodOptional<z.ZodString>;
|
|
1642
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
1643
|
+
}, z.core.$strip>>;
|
|
1644
|
+
guardians: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1645
|
+
key: z.ZodString;
|
|
1646
|
+
projectId: z.ZodString;
|
|
1647
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1648
|
+
sessionId: z.ZodString;
|
|
1649
|
+
updatedAt: z.ZodNumber;
|
|
1650
|
+
lastRunId: z.ZodOptional<z.ZodString>;
|
|
1651
|
+
attached: z.ZodOptional<z.ZodBoolean>;
|
|
1652
|
+
}, z.core.$strip>>>;
|
|
1653
|
+
guardianUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1654
|
+
key: z.ZodString;
|
|
1655
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1656
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1657
|
+
reuseCount: z.ZodNumber;
|
|
1658
|
+
rememberCount: z.ZodNumber;
|
|
1659
|
+
resetCount: z.ZodNumber;
|
|
1660
|
+
lastUsedAt: z.ZodNumber;
|
|
1661
|
+
currentSessionId: z.ZodOptional<z.ZodString>;
|
|
1662
|
+
}, z.core.$strip>>>;
|
|
1663
|
+
auditStats: z.ZodOptional<z.ZodObject<{
|
|
1664
|
+
totalEvents: z.ZodNumber;
|
|
1665
|
+
lastEventAt: z.ZodOptional<z.ZodNumber>;
|
|
1666
|
+
queuedCount: z.ZodNumber;
|
|
1667
|
+
sessionStartedCount: z.ZodNumber;
|
|
1668
|
+
terminalCompletedCount: z.ZodNumber;
|
|
1669
|
+
terminalFailedCount: z.ZodNumber;
|
|
1670
|
+
terminalCancelledCount: z.ZodNumber;
|
|
1671
|
+
guardianReuseCount: z.ZodNumber;
|
|
1672
|
+
guardianRememberCount: z.ZodNumber;
|
|
1673
|
+
guardianResetCount: z.ZodNumber;
|
|
1674
|
+
watchdogStopCount: z.ZodNumber;
|
|
1675
|
+
stopRequestCount: z.ZodNumber;
|
|
1676
|
+
guardianEligibleRunCount: z.ZodNumber;
|
|
1677
|
+
guardianReuseRate: z.ZodNumber;
|
|
1678
|
+
activeGuardianCount: z.ZodNumber;
|
|
1679
|
+
}, z.core.$strip>>;
|
|
1680
|
+
recentAuditEvents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1681
|
+
id: z.ZodString;
|
|
1682
|
+
occurredAt: z.ZodNumber;
|
|
1683
|
+
kind: z.ZodString;
|
|
1684
|
+
jobId: z.ZodOptional<z.ZodString>;
|
|
1685
|
+
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
1686
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1687
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1688
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
1689
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1690
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
1691
|
+
status: z.ZodOptional<z.ZodString>;
|
|
1692
|
+
guardianKey: z.ZodOptional<z.ZodString>;
|
|
1693
|
+
guardianSessionId: z.ZodOptional<z.ZodString>;
|
|
1694
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1695
|
+
}, z.core.$strip>>>;
|
|
1696
|
+
}, z.core.$strip>;
|
|
1697
|
+
type AutomationState = z.infer<typeof AutomationStateSchema>;
|
|
1445
1698
|
declare const DaemonStateSchema: z.ZodObject<{
|
|
1446
1699
|
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
1447
1700
|
running: "running";
|
|
@@ -1449,7 +1702,9 @@ declare const DaemonStateSchema: z.ZodObject<{
|
|
|
1449
1702
|
}>, z.ZodString]>;
|
|
1450
1703
|
pid: z.ZodOptional<z.ZodNumber>;
|
|
1451
1704
|
httpPort: z.ZodOptional<z.ZodNumber>;
|
|
1705
|
+
startTime: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
1452
1706
|
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
1707
|
+
startedWithCliVersion: z.ZodOptional<z.ZodString>;
|
|
1453
1708
|
shutdownRequestedAt: z.ZodOptional<z.ZodNumber>;
|
|
1454
1709
|
shutdownSource: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1455
1710
|
unknown: "unknown";
|
|
@@ -1505,6 +1760,105 @@ declare const DaemonStateSchema: z.ZodObject<{
|
|
|
1505
1760
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1506
1761
|
}, z.core.$strip>>;
|
|
1507
1762
|
}, z.core.$strip>>;
|
|
1763
|
+
automation: z.ZodOptional<z.ZodObject<{
|
|
1764
|
+
updatedAt: z.ZodNumber;
|
|
1765
|
+
counts: z.ZodObject<{
|
|
1766
|
+
queued: z.ZodNumber;
|
|
1767
|
+
dispatching: z.ZodNumber;
|
|
1768
|
+
running: z.ZodNumber;
|
|
1769
|
+
completed: z.ZodNumber;
|
|
1770
|
+
failed: z.ZodNumber;
|
|
1771
|
+
cancelled: z.ZodNumber;
|
|
1772
|
+
}, z.core.$strip>;
|
|
1773
|
+
recentJobs: z.ZodArray<z.ZodObject<{
|
|
1774
|
+
id: z.ZodString;
|
|
1775
|
+
kind: z.ZodEnum<{
|
|
1776
|
+
supervisor: "supervisor";
|
|
1777
|
+
webhook: "webhook";
|
|
1778
|
+
}>;
|
|
1779
|
+
status: z.ZodEnum<{
|
|
1780
|
+
completed: "completed";
|
|
1781
|
+
failed: "failed";
|
|
1782
|
+
cancelled: "cancelled";
|
|
1783
|
+
running: "running";
|
|
1784
|
+
queued: "queued";
|
|
1785
|
+
dispatching: "dispatching";
|
|
1786
|
+
}>;
|
|
1787
|
+
priority: z.ZodEnum<{
|
|
1788
|
+
user: "user";
|
|
1789
|
+
urgent: "urgent";
|
|
1790
|
+
background: "background";
|
|
1791
|
+
}>;
|
|
1792
|
+
dedupeKey: z.ZodString;
|
|
1793
|
+
attempt: z.ZodNumber;
|
|
1794
|
+
maxAttempts: z.ZodNumber;
|
|
1795
|
+
createdAt: z.ZodNumber;
|
|
1796
|
+
updatedAt: z.ZodNumber;
|
|
1797
|
+
dispatchedAt: z.ZodOptional<z.ZodNumber>;
|
|
1798
|
+
completedAt: z.ZodOptional<z.ZodNumber>;
|
|
1799
|
+
nextRunAt: z.ZodOptional<z.ZodNumber>;
|
|
1800
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1801
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1802
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1803
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
1804
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1805
|
+
loopIteration: z.ZodOptional<z.ZodNumber>;
|
|
1806
|
+
continuityKey: z.ZodOptional<z.ZodString>;
|
|
1807
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
1808
|
+
}, z.core.$strip>>;
|
|
1809
|
+
guardians: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1810
|
+
key: z.ZodString;
|
|
1811
|
+
projectId: z.ZodString;
|
|
1812
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1813
|
+
sessionId: z.ZodString;
|
|
1814
|
+
updatedAt: z.ZodNumber;
|
|
1815
|
+
lastRunId: z.ZodOptional<z.ZodString>;
|
|
1816
|
+
attached: z.ZodOptional<z.ZodBoolean>;
|
|
1817
|
+
}, z.core.$strip>>>;
|
|
1818
|
+
guardianUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1819
|
+
key: z.ZodString;
|
|
1820
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1821
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1822
|
+
reuseCount: z.ZodNumber;
|
|
1823
|
+
rememberCount: z.ZodNumber;
|
|
1824
|
+
resetCount: z.ZodNumber;
|
|
1825
|
+
lastUsedAt: z.ZodNumber;
|
|
1826
|
+
currentSessionId: z.ZodOptional<z.ZodString>;
|
|
1827
|
+
}, z.core.$strip>>>;
|
|
1828
|
+
auditStats: z.ZodOptional<z.ZodObject<{
|
|
1829
|
+
totalEvents: z.ZodNumber;
|
|
1830
|
+
lastEventAt: z.ZodOptional<z.ZodNumber>;
|
|
1831
|
+
queuedCount: z.ZodNumber;
|
|
1832
|
+
sessionStartedCount: z.ZodNumber;
|
|
1833
|
+
terminalCompletedCount: z.ZodNumber;
|
|
1834
|
+
terminalFailedCount: z.ZodNumber;
|
|
1835
|
+
terminalCancelledCount: z.ZodNumber;
|
|
1836
|
+
guardianReuseCount: z.ZodNumber;
|
|
1837
|
+
guardianRememberCount: z.ZodNumber;
|
|
1838
|
+
guardianResetCount: z.ZodNumber;
|
|
1839
|
+
watchdogStopCount: z.ZodNumber;
|
|
1840
|
+
stopRequestCount: z.ZodNumber;
|
|
1841
|
+
guardianEligibleRunCount: z.ZodNumber;
|
|
1842
|
+
guardianReuseRate: z.ZodNumber;
|
|
1843
|
+
activeGuardianCount: z.ZodNumber;
|
|
1844
|
+
}, z.core.$strip>>;
|
|
1845
|
+
recentAuditEvents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1846
|
+
id: z.ZodString;
|
|
1847
|
+
occurredAt: z.ZodNumber;
|
|
1848
|
+
kind: z.ZodString;
|
|
1849
|
+
jobId: z.ZodOptional<z.ZodString>;
|
|
1850
|
+
dedupeKey: z.ZodOptional<z.ZodString>;
|
|
1851
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1852
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1853
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
1854
|
+
loopId: z.ZodOptional<z.ZodString>;
|
|
1855
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
1856
|
+
status: z.ZodOptional<z.ZodString>;
|
|
1857
|
+
guardianKey: z.ZodOptional<z.ZodString>;
|
|
1858
|
+
guardianSessionId: z.ZodOptional<z.ZodString>;
|
|
1859
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1860
|
+
}, z.core.$strip>>>;
|
|
1861
|
+
}, z.core.$strip>>;
|
|
1508
1862
|
}, z.core.$strip>;
|
|
1509
1863
|
type DaemonState = z.infer<typeof DaemonStateSchema>;
|
|
1510
1864
|
|
|
@@ -1517,9 +1871,9 @@ declare const KnowledgeEntryTypeSchema: z.ZodEnum<{
|
|
|
1517
1871
|
}>;
|
|
1518
1872
|
type KnowledgeEntryType = z.infer<typeof KnowledgeEntryTypeSchema>;
|
|
1519
1873
|
declare const KnowledgeContributorTypeSchema: z.ZodEnum<{
|
|
1520
|
-
session: "session";
|
|
1521
1874
|
user: "user";
|
|
1522
1875
|
supervisor: "supervisor";
|
|
1876
|
+
session: "session";
|
|
1523
1877
|
}>;
|
|
1524
1878
|
type KnowledgeContributorType = z.infer<typeof KnowledgeContributorTypeSchema>;
|
|
1525
1879
|
declare const KnowledgeActionSchema: z.ZodEnum<{
|
|
@@ -1550,9 +1904,9 @@ declare const CreateKnowledgeEntryBodySchema: z.ZodObject<{
|
|
|
1550
1904
|
warning: "warning";
|
|
1551
1905
|
}>;
|
|
1552
1906
|
contributorType: z.ZodEnum<{
|
|
1553
|
-
session: "session";
|
|
1554
1907
|
user: "user";
|
|
1555
1908
|
supervisor: "supervisor";
|
|
1909
|
+
session: "session";
|
|
1556
1910
|
}>;
|
|
1557
1911
|
action: z.ZodEnum<{
|
|
1558
1912
|
create: "create";
|
|
@@ -1860,5 +2214,5 @@ declare const VoiceTokenResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1860
2214
|
}, z.core.$strip>], "allowed">;
|
|
1861
2215
|
type VoiceTokenResponse = z.infer<typeof VoiceTokenResponseSchema>;
|
|
1862
2216
|
|
|
1863
|
-
export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, DaemonStateSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, VoiceTokenAllowedSchema, VoiceTokenDeniedSchema, VoiceTokenResponseSchema, createEnvelope, sessionContextUsageCategorySchema, sessionContextUsageEventSchema, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStateChangedEventSchema, sessionStopEventSchema, sessionTaskEndEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
|
|
1864
|
-
export type { AgentMessage, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, CreateKnowledgeEntryBody, CrossProjectSearchResponse, CrossProjectSearchResult, DaemonState, KnowledgeAction, KnowledgeChainEntry, KnowledgeChainRelation, KnowledgeChainResponse, KnowledgeConfidence, KnowledgeContributorType, KnowledgeEntryType, KnowledgeInjectionMode, KnowledgeInjectionRequest, KnowledgeInjectionResponse, KnowledgeStatus, LegacyMessageContent, MachineMetadata, MessageContent, MessageMeta, ProjectProfile, QueryKnowledgeParams, SessionContextUsageEvent, SessionEnvelope, SessionEvent, SessionMessage, SessionMessageContent, SessionModelUsage, SessionProtocolMessage, SessionRole, SessionTurnEndStatus, TailscaleInfo, TailscaleServeEntry, TunnelEntry, TunnelProviderInfo, TunnelState, TurnKnowledgeExtraction, Update, UpdateBody, UpdateKnowledgeEntryBody, UpdateMachineBody, UpdateNewMessageBody, UpdateSessionBody, UserMessage, VersionedEncryptedValue, VersionedMachineEncryptedValue, VersionedNullableEncryptedValue, VoiceTokenResponse };
|
|
2217
|
+
export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, AutomationAuditEventSummarySchema, AutomationAuditStatsSchema, AutomationCountsSchema, AutomationGuardianSummarySchema, AutomationGuardianUsageSummarySchema, AutomationJobKindSchema, AutomationJobStatusSchema, AutomationJobSummarySchema, AutomationPrioritySchema, AutomationStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, DaemonStateSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, VoiceTokenAllowedSchema, VoiceTokenDeniedSchema, VoiceTokenResponseSchema, createEnvelope, sessionContextUsageCategorySchema, sessionContextUsageEventSchema, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStateChangedEventSchema, sessionStopEventSchema, sessionTaskEndEventSchema, sessionTaskLogEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
|
|
2218
|
+
export type { AgentMessage, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, AutomationAuditEventSummary, AutomationAuditStats, AutomationCounts, AutomationGuardianSummary, AutomationGuardianUsageSummary, AutomationJobKind, AutomationJobStatus, AutomationJobSummary, AutomationPriority, AutomationState, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, CreateKnowledgeEntryBody, CrossProjectSearchResponse, CrossProjectSearchResult, DaemonState, KnowledgeAction, KnowledgeChainEntry, KnowledgeChainRelation, KnowledgeChainResponse, KnowledgeConfidence, KnowledgeContributorType, KnowledgeEntryType, KnowledgeInjectionMode, KnowledgeInjectionRequest, KnowledgeInjectionResponse, KnowledgeStatus, LegacyMessageContent, MachineMetadata, MessageContent, MessageMeta, ProjectProfile, QueryKnowledgeParams, SessionContextUsageEvent, SessionEnvelope, SessionEvent, SessionMessage, SessionMessageContent, SessionModelUsage, SessionProtocolMessage, SessionRole, SessionTurnEndStatus, TailscaleInfo, TailscaleServeEntry, TunnelEntry, TunnelProviderInfo, TunnelState, TurnKnowledgeExtraction, Update, UpdateBody, UpdateKnowledgeEntryBody, UpdateMachineBody, UpdateNewMessageBody, UpdateSessionBody, UserMessage, VersionedEncryptedValue, VersionedMachineEncryptedValue, VersionedNullableEncryptedValue, VoiceTokenResponse };
|
package/dist/index.mjs
CHANGED
|
@@ -145,6 +145,17 @@ const sessionContextUsageCategorySchema = z.object({
|
|
|
145
145
|
tokens: z.number(),
|
|
146
146
|
color: z.string().optional()
|
|
147
147
|
});
|
|
148
|
+
const sessionTaskLogEventSchema = z.object({
|
|
149
|
+
t: z.literal("task-log"),
|
|
150
|
+
/** Background task ID or tool call ID that owns this log stream */
|
|
151
|
+
taskId: z.string(),
|
|
152
|
+
/** Path to the output file on the CLI machine */
|
|
153
|
+
outputFile: z.string(),
|
|
154
|
+
/** Incremental log content (new lines since last push) */
|
|
155
|
+
chunk: z.string(),
|
|
156
|
+
/** Byte offset in the output file where this chunk starts */
|
|
157
|
+
offset: z.number()
|
|
158
|
+
});
|
|
148
159
|
const sessionContextUsageEventSchema = z.object({
|
|
149
160
|
t: z.literal("context-usage"),
|
|
150
161
|
totalTokens: z.number(),
|
|
@@ -180,7 +191,8 @@ const sessionEventSchema = z.discriminatedUnion("t", [
|
|
|
180
191
|
sessionPromptSuggestionEventSchema,
|
|
181
192
|
sessionNeedsContinueEventSchema,
|
|
182
193
|
sessionStateChangedEventSchema,
|
|
183
|
-
sessionContextUsageEventSchema
|
|
194
|
+
sessionContextUsageEventSchema,
|
|
195
|
+
sessionTaskLogEventSchema
|
|
184
196
|
]);
|
|
185
197
|
const sessionEnvelopeSchema = z.object({
|
|
186
198
|
id: z.string(),
|
|
@@ -199,7 +211,7 @@ const sessionEnvelopeSchema = z.object({
|
|
|
199
211
|
path: ["role"]
|
|
200
212
|
});
|
|
201
213
|
}
|
|
202
|
-
if ((envelope.ev.t === "start" || envelope.ev.t === "stop" || envelope.ev.t === "usage-update" || envelope.ev.t === "task-start" || envelope.ev.t === "task-progress" || envelope.ev.t === "task-end" || envelope.ev.t === "tool-progress" || envelope.ev.t === "prompt-suggestion" || envelope.ev.t === "needs-continue" || envelope.ev.t === "session-state-changed" || envelope.ev.t === "context-usage") && envelope.role !== "agent") {
|
|
214
|
+
if ((envelope.ev.t === "start" || envelope.ev.t === "stop" || envelope.ev.t === "usage-update" || envelope.ev.t === "task-start" || envelope.ev.t === "task-progress" || envelope.ev.t === "task-end" || envelope.ev.t === "tool-progress" || envelope.ev.t === "prompt-suggestion" || envelope.ev.t === "needs-continue" || envelope.ev.t === "session-state-changed" || envelope.ev.t === "context-usage" || envelope.ev.t === "task-log") && envelope.role !== "agent") {
|
|
203
215
|
ctx.addIssue({
|
|
204
216
|
code: z.ZodIssueCode.custom,
|
|
205
217
|
message: `${envelope.ev.t} events must use role "agent"`,
|
|
@@ -346,25 +358,15 @@ const TailscaleInfoSchema = z.object({
|
|
|
346
358
|
serves: z.array(TailscaleServeEntrySchema).optional()
|
|
347
359
|
});
|
|
348
360
|
const TunnelEntrySchema = z.object({
|
|
349
|
-
/** Provider identifier: "tailscale" | "upnp" | "cloudflare" | "frp" */
|
|
350
361
|
provider: z.string(),
|
|
351
|
-
/** Local port the service is running on */
|
|
352
362
|
localPort: z.number(),
|
|
353
|
-
/** Remote/public port (e.g. UPnP external port, Tailscale HTTPS port) */
|
|
354
363
|
remotePort: z.number().optional(),
|
|
355
|
-
/** Protocol: "HTTPS" | "HTTP" | "TCP" | "UDP" */
|
|
356
364
|
protocol: z.string(),
|
|
357
|
-
/** Mount path (Tailscale serve path, e.g. "/api") */
|
|
358
365
|
path: z.string().optional(),
|
|
359
|
-
/** Proxy target URL "http://127.0.0.1:3000" */
|
|
360
366
|
target: z.string(),
|
|
361
|
-
/** Full public access URL if available */
|
|
362
367
|
publicUrl: z.string().optional(),
|
|
363
|
-
/** Access scope */
|
|
364
368
|
accessScope: z.enum(["public", "private", "tailnet"]),
|
|
365
|
-
/** Hostname (Tailscale MagicDNS, Cloudflare domain, etc.) */
|
|
366
369
|
hostname: z.string().optional(),
|
|
367
|
-
/** Provider-specific extra info */
|
|
368
370
|
metadata: z.record(z.string(), z.string()).optional()
|
|
369
371
|
});
|
|
370
372
|
const TunnelProviderInfoSchema = z.object({
|
|
@@ -372,29 +374,130 @@ const TunnelProviderInfoSchema = z.object({
|
|
|
372
374
|
status: z.enum(["available", "unavailable", "not-installed"]),
|
|
373
375
|
version: z.string().optional(),
|
|
374
376
|
entries: z.array(TunnelEntrySchema),
|
|
375
|
-
/** Provider-level info (e.g. Tailscale ipv4/hostname, UPnP external IP) */
|
|
376
377
|
metadata: z.record(z.string(), z.string()).optional()
|
|
377
378
|
});
|
|
378
379
|
const TunnelStateSchema = z.object({
|
|
379
380
|
providers: z.array(TunnelProviderInfoSchema)
|
|
380
381
|
});
|
|
382
|
+
const AutomationPrioritySchema = z.enum(["urgent", "user", "background"]);
|
|
383
|
+
const AutomationJobKindSchema = z.enum(["supervisor", "webhook"]);
|
|
384
|
+
const AutomationJobStatusSchema = z.enum([
|
|
385
|
+
"queued",
|
|
386
|
+
"dispatching",
|
|
387
|
+
"running",
|
|
388
|
+
"completed",
|
|
389
|
+
"failed",
|
|
390
|
+
"cancelled"
|
|
391
|
+
]);
|
|
392
|
+
const AutomationJobSummarySchema = z.object({
|
|
393
|
+
id: z.string(),
|
|
394
|
+
kind: AutomationJobKindSchema,
|
|
395
|
+
status: AutomationJobStatusSchema,
|
|
396
|
+
priority: AutomationPrioritySchema,
|
|
397
|
+
dedupeKey: z.string(),
|
|
398
|
+
attempt: z.number(),
|
|
399
|
+
maxAttempts: z.number(),
|
|
400
|
+
createdAt: z.number(),
|
|
401
|
+
updatedAt: z.number(),
|
|
402
|
+
dispatchedAt: z.number().optional(),
|
|
403
|
+
completedAt: z.number().optional(),
|
|
404
|
+
nextRunAt: z.number().optional(),
|
|
405
|
+
sessionId: z.string().optional(),
|
|
406
|
+
label: z.string().optional(),
|
|
407
|
+
projectId: z.string().optional(),
|
|
408
|
+
runId: z.string().optional(),
|
|
409
|
+
loopId: z.string().optional(),
|
|
410
|
+
loopIteration: z.number().optional(),
|
|
411
|
+
continuityKey: z.string().optional(),
|
|
412
|
+
errorMessage: z.string().optional()
|
|
413
|
+
});
|
|
414
|
+
const AutomationGuardianSummarySchema = z.object({
|
|
415
|
+
key: z.string(),
|
|
416
|
+
projectId: z.string(),
|
|
417
|
+
loopId: z.string().optional(),
|
|
418
|
+
sessionId: z.string(),
|
|
419
|
+
updatedAt: z.number(),
|
|
420
|
+
lastRunId: z.string().optional(),
|
|
421
|
+
attached: z.boolean().optional()
|
|
422
|
+
});
|
|
423
|
+
const AutomationGuardianUsageSummarySchema = z.object({
|
|
424
|
+
key: z.string(),
|
|
425
|
+
projectId: z.string().optional(),
|
|
426
|
+
loopId: z.string().optional(),
|
|
427
|
+
reuseCount: z.number(),
|
|
428
|
+
rememberCount: z.number(),
|
|
429
|
+
resetCount: z.number(),
|
|
430
|
+
lastUsedAt: z.number(),
|
|
431
|
+
currentSessionId: z.string().optional()
|
|
432
|
+
});
|
|
433
|
+
const AutomationAuditEventSummarySchema = z.object({
|
|
434
|
+
id: z.string(),
|
|
435
|
+
occurredAt: z.number(),
|
|
436
|
+
kind: z.string(),
|
|
437
|
+
jobId: z.string().optional(),
|
|
438
|
+
dedupeKey: z.string().optional(),
|
|
439
|
+
sessionId: z.string().optional(),
|
|
440
|
+
projectId: z.string().optional(),
|
|
441
|
+
runId: z.string().optional(),
|
|
442
|
+
loopId: z.string().optional(),
|
|
443
|
+
trigger: z.string().optional(),
|
|
444
|
+
status: z.string().optional(),
|
|
445
|
+
guardianKey: z.string().optional(),
|
|
446
|
+
guardianSessionId: z.string().optional(),
|
|
447
|
+
message: z.string().optional()
|
|
448
|
+
});
|
|
449
|
+
const AutomationAuditStatsSchema = z.object({
|
|
450
|
+
totalEvents: z.number(),
|
|
451
|
+
lastEventAt: z.number().optional(),
|
|
452
|
+
queuedCount: z.number(),
|
|
453
|
+
sessionStartedCount: z.number(),
|
|
454
|
+
terminalCompletedCount: z.number(),
|
|
455
|
+
terminalFailedCount: z.number(),
|
|
456
|
+
terminalCancelledCount: z.number(),
|
|
457
|
+
guardianReuseCount: z.number(),
|
|
458
|
+
guardianRememberCount: z.number(),
|
|
459
|
+
guardianResetCount: z.number(),
|
|
460
|
+
watchdogStopCount: z.number(),
|
|
461
|
+
stopRequestCount: z.number(),
|
|
462
|
+
guardianEligibleRunCount: z.number(),
|
|
463
|
+
guardianReuseRate: z.number(),
|
|
464
|
+
activeGuardianCount: z.number()
|
|
465
|
+
});
|
|
466
|
+
const AutomationCountsSchema = z.object({
|
|
467
|
+
queued: z.number(),
|
|
468
|
+
dispatching: z.number(),
|
|
469
|
+
running: z.number(),
|
|
470
|
+
completed: z.number(),
|
|
471
|
+
failed: z.number(),
|
|
472
|
+
cancelled: z.number()
|
|
473
|
+
});
|
|
474
|
+
const AutomationStateSchema = z.object({
|
|
475
|
+
updatedAt: z.number(),
|
|
476
|
+
counts: AutomationCountsSchema,
|
|
477
|
+
recentJobs: z.array(AutomationJobSummarySchema),
|
|
478
|
+
guardians: z.array(AutomationGuardianSummarySchema).optional(),
|
|
479
|
+
guardianUsage: z.array(AutomationGuardianUsageSummarySchema).optional(),
|
|
480
|
+
auditStats: AutomationAuditStatsSchema.optional(),
|
|
481
|
+
recentAuditEvents: z.array(AutomationAuditEventSummarySchema).optional()
|
|
482
|
+
});
|
|
381
483
|
const DaemonStateSchema = z.object({
|
|
382
484
|
status: z.union([
|
|
383
485
|
z.enum(["running", "shutting-down"]),
|
|
384
486
|
z.string()
|
|
385
|
-
// Forward compatibility
|
|
386
487
|
]),
|
|
387
488
|
pid: z.number().optional(),
|
|
388
489
|
httpPort: z.number().optional(),
|
|
490
|
+
startTime: z.union([z.number(), z.string()]).optional(),
|
|
389
491
|
startedAt: z.number().optional(),
|
|
492
|
+
startedWithCliVersion: z.string().optional(),
|
|
390
493
|
shutdownRequestedAt: z.number().optional(),
|
|
391
494
|
shutdownSource: z.union([
|
|
392
495
|
z.enum(["mobile-app", "cli", "os-signal", "unknown"]),
|
|
393
496
|
z.string()
|
|
394
|
-
// Forward compatibility
|
|
395
497
|
]).optional(),
|
|
396
498
|
tailscale: TailscaleInfoSchema.optional(),
|
|
397
|
-
tunnels: TunnelStateSchema.optional()
|
|
499
|
+
tunnels: TunnelStateSchema.optional(),
|
|
500
|
+
automation: AutomationStateSchema.optional()
|
|
398
501
|
});
|
|
399
502
|
|
|
400
503
|
const KnowledgeEntryTypeSchema = z.enum([
|
|
@@ -578,4 +681,4 @@ const VoiceTokenResponseSchema = z.discriminatedUnion("allowed", [
|
|
|
578
681
|
VoiceTokenDeniedSchema
|
|
579
682
|
]);
|
|
580
683
|
|
|
581
|
-
export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, DaemonStateSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, VoiceTokenAllowedSchema, VoiceTokenDeniedSchema, VoiceTokenResponseSchema, createEnvelope, sessionContextUsageCategorySchema, sessionContextUsageEventSchema, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStateChangedEventSchema, sessionStopEventSchema, sessionTaskEndEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
|
|
684
|
+
export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, AutomationAuditEventSummarySchema, AutomationAuditStatsSchema, AutomationCountsSchema, AutomationGuardianSummarySchema, AutomationGuardianUsageSummarySchema, AutomationJobKindSchema, AutomationJobStatusSchema, AutomationJobSummarySchema, AutomationPrioritySchema, AutomationStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, DaemonStateSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, VoiceTokenAllowedSchema, VoiceTokenDeniedSchema, VoiceTokenResponseSchema, createEnvelope, sessionContextUsageCategorySchema, sessionContextUsageEventSchema, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStateChangedEventSchema, sessionStopEventSchema, sessionTaskEndEventSchema, sessionTaskLogEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
|