@kmmao/happy-wire 0.8.0 → 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 CHANGED
@@ -379,25 +379,15 @@ const TailscaleInfoSchema = z__namespace.object({
379
379
  serves: z__namespace.array(TailscaleServeEntrySchema).optional()
380
380
  });
381
381
  const TunnelEntrySchema = z__namespace.object({
382
- /** Provider identifier: "tailscale" | "upnp" | "cloudflare" | "frp" */
383
382
  provider: z__namespace.string(),
384
- /** Local port the service is running on */
385
383
  localPort: z__namespace.number(),
386
- /** Remote/public port (e.g. UPnP external port, Tailscale HTTPS port) */
387
384
  remotePort: z__namespace.number().optional(),
388
- /** Protocol: "HTTPS" | "HTTP" | "TCP" | "UDP" */
389
385
  protocol: z__namespace.string(),
390
- /** Mount path (Tailscale serve path, e.g. "/api") */
391
386
  path: z__namespace.string().optional(),
392
- /** Proxy target URL "http://127.0.0.1:3000" */
393
387
  target: z__namespace.string(),
394
- /** Full public access URL if available */
395
388
  publicUrl: z__namespace.string().optional(),
396
- /** Access scope */
397
389
  accessScope: z__namespace.enum(["public", "private", "tailnet"]),
398
- /** Hostname (Tailscale MagicDNS, Cloudflare domain, etc.) */
399
390
  hostname: z__namespace.string().optional(),
400
- /** Provider-specific extra info */
401
391
  metadata: z__namespace.record(z__namespace.string(), z__namespace.string()).optional()
402
392
  });
403
393
  const TunnelProviderInfoSchema = z__namespace.object({
@@ -405,29 +395,130 @@ const TunnelProviderInfoSchema = z__namespace.object({
405
395
  status: z__namespace.enum(["available", "unavailable", "not-installed"]),
406
396
  version: z__namespace.string().optional(),
407
397
  entries: z__namespace.array(TunnelEntrySchema),
408
- /** Provider-level info (e.g. Tailscale ipv4/hostname, UPnP external IP) */
409
398
  metadata: z__namespace.record(z__namespace.string(), z__namespace.string()).optional()
410
399
  });
411
400
  const TunnelStateSchema = z__namespace.object({
412
401
  providers: z__namespace.array(TunnelProviderInfoSchema)
413
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
+ });
414
504
  const DaemonStateSchema = z__namespace.object({
415
505
  status: z__namespace.union([
416
506
  z__namespace.enum(["running", "shutting-down"]),
417
507
  z__namespace.string()
418
- // Forward compatibility
419
508
  ]),
420
509
  pid: z__namespace.number().optional(),
421
510
  httpPort: z__namespace.number().optional(),
511
+ startTime: z__namespace.union([z__namespace.number(), z__namespace.string()]).optional(),
422
512
  startedAt: z__namespace.number().optional(),
513
+ startedWithCliVersion: z__namespace.string().optional(),
423
514
  shutdownRequestedAt: z__namespace.number().optional(),
424
515
  shutdownSource: z__namespace.union([
425
516
  z__namespace.enum(["mobile-app", "cli", "os-signal", "unknown"]),
426
517
  z__namespace.string()
427
- // Forward compatibility
428
518
  ]).optional(),
429
519
  tailscale: TailscaleInfoSchema.optional(),
430
- tunnels: TunnelStateSchema.optional()
520
+ tunnels: TunnelStateSchema.optional(),
521
+ automation: AutomationStateSchema.optional()
431
522
  });
432
523
 
433
524
  const KnowledgeEntryTypeSchema = z__namespace.enum([
@@ -616,6 +707,16 @@ exports.ApiMessageSchema = ApiMessageSchema;
616
707
  exports.ApiUpdateMachineStateSchema = ApiUpdateMachineStateSchema;
617
708
  exports.ApiUpdateNewMessageSchema = ApiUpdateNewMessageSchema;
618
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;
619
720
  exports.CoreUpdateBodySchema = CoreUpdateBodySchema;
620
721
  exports.CoreUpdateContainerSchema = CoreUpdateContainerSchema;
621
722
  exports.CreateKnowledgeEntryBodySchema = CreateKnowledgeEntryBodySchema;
package/dist/index.d.cts CHANGED
@@ -1473,6 +1473,228 @@ declare const TunnelStateSchema: z.ZodObject<{
1473
1473
  }, z.core.$strip>>;
1474
1474
  }, z.core.$strip>;
1475
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>;
1476
1698
  declare const DaemonStateSchema: z.ZodObject<{
1477
1699
  status: z.ZodUnion<readonly [z.ZodEnum<{
1478
1700
  running: "running";
@@ -1480,7 +1702,9 @@ declare const DaemonStateSchema: z.ZodObject<{
1480
1702
  }>, z.ZodString]>;
1481
1703
  pid: z.ZodOptional<z.ZodNumber>;
1482
1704
  httpPort: z.ZodOptional<z.ZodNumber>;
1705
+ startTime: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
1483
1706
  startedAt: z.ZodOptional<z.ZodNumber>;
1707
+ startedWithCliVersion: z.ZodOptional<z.ZodString>;
1484
1708
  shutdownRequestedAt: z.ZodOptional<z.ZodNumber>;
1485
1709
  shutdownSource: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1486
1710
  unknown: "unknown";
@@ -1536,6 +1760,105 @@ declare const DaemonStateSchema: z.ZodObject<{
1536
1760
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1537
1761
  }, z.core.$strip>>;
1538
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>>;
1539
1862
  }, z.core.$strip>;
1540
1863
  type DaemonState = z.infer<typeof DaemonStateSchema>;
1541
1864
 
@@ -1548,9 +1871,9 @@ declare const KnowledgeEntryTypeSchema: z.ZodEnum<{
1548
1871
  }>;
1549
1872
  type KnowledgeEntryType = z.infer<typeof KnowledgeEntryTypeSchema>;
1550
1873
  declare const KnowledgeContributorTypeSchema: z.ZodEnum<{
1551
- session: "session";
1552
1874
  user: "user";
1553
1875
  supervisor: "supervisor";
1876
+ session: "session";
1554
1877
  }>;
1555
1878
  type KnowledgeContributorType = z.infer<typeof KnowledgeContributorTypeSchema>;
1556
1879
  declare const KnowledgeActionSchema: z.ZodEnum<{
@@ -1581,9 +1904,9 @@ declare const CreateKnowledgeEntryBodySchema: z.ZodObject<{
1581
1904
  warning: "warning";
1582
1905
  }>;
1583
1906
  contributorType: z.ZodEnum<{
1584
- session: "session";
1585
1907
  user: "user";
1586
1908
  supervisor: "supervisor";
1909
+ session: "session";
1587
1910
  }>;
1588
1911
  action: z.ZodEnum<{
1589
1912
  create: "create";
@@ -1891,5 +2214,5 @@ declare const VoiceTokenResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1891
2214
  }, z.core.$strip>], "allowed">;
1892
2215
  type VoiceTokenResponse = z.infer<typeof VoiceTokenResponseSchema>;
1893
2216
 
1894
- 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, sessionTaskLogEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
1895
- 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
@@ -1473,6 +1473,228 @@ declare const TunnelStateSchema: z.ZodObject<{
1473
1473
  }, z.core.$strip>>;
1474
1474
  }, z.core.$strip>;
1475
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>;
1476
1698
  declare const DaemonStateSchema: z.ZodObject<{
1477
1699
  status: z.ZodUnion<readonly [z.ZodEnum<{
1478
1700
  running: "running";
@@ -1480,7 +1702,9 @@ declare const DaemonStateSchema: z.ZodObject<{
1480
1702
  }>, z.ZodString]>;
1481
1703
  pid: z.ZodOptional<z.ZodNumber>;
1482
1704
  httpPort: z.ZodOptional<z.ZodNumber>;
1705
+ startTime: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
1483
1706
  startedAt: z.ZodOptional<z.ZodNumber>;
1707
+ startedWithCliVersion: z.ZodOptional<z.ZodString>;
1484
1708
  shutdownRequestedAt: z.ZodOptional<z.ZodNumber>;
1485
1709
  shutdownSource: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1486
1710
  unknown: "unknown";
@@ -1536,6 +1760,105 @@ declare const DaemonStateSchema: z.ZodObject<{
1536
1760
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1537
1761
  }, z.core.$strip>>;
1538
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>>;
1539
1862
  }, z.core.$strip>;
1540
1863
  type DaemonState = z.infer<typeof DaemonStateSchema>;
1541
1864
 
@@ -1548,9 +1871,9 @@ declare const KnowledgeEntryTypeSchema: z.ZodEnum<{
1548
1871
  }>;
1549
1872
  type KnowledgeEntryType = z.infer<typeof KnowledgeEntryTypeSchema>;
1550
1873
  declare const KnowledgeContributorTypeSchema: z.ZodEnum<{
1551
- session: "session";
1552
1874
  user: "user";
1553
1875
  supervisor: "supervisor";
1876
+ session: "session";
1554
1877
  }>;
1555
1878
  type KnowledgeContributorType = z.infer<typeof KnowledgeContributorTypeSchema>;
1556
1879
  declare const KnowledgeActionSchema: z.ZodEnum<{
@@ -1581,9 +1904,9 @@ declare const CreateKnowledgeEntryBodySchema: z.ZodObject<{
1581
1904
  warning: "warning";
1582
1905
  }>;
1583
1906
  contributorType: z.ZodEnum<{
1584
- session: "session";
1585
1907
  user: "user";
1586
1908
  supervisor: "supervisor";
1909
+ session: "session";
1587
1910
  }>;
1588
1911
  action: z.ZodEnum<{
1589
1912
  create: "create";
@@ -1891,5 +2214,5 @@ declare const VoiceTokenResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1891
2214
  }, z.core.$strip>], "allowed">;
1892
2215
  type VoiceTokenResponse = z.infer<typeof VoiceTokenResponseSchema>;
1893
2216
 
1894
- 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, sessionTaskLogEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
1895
- 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
@@ -358,25 +358,15 @@ const TailscaleInfoSchema = z.object({
358
358
  serves: z.array(TailscaleServeEntrySchema).optional()
359
359
  });
360
360
  const TunnelEntrySchema = z.object({
361
- /** Provider identifier: "tailscale" | "upnp" | "cloudflare" | "frp" */
362
361
  provider: z.string(),
363
- /** Local port the service is running on */
364
362
  localPort: z.number(),
365
- /** Remote/public port (e.g. UPnP external port, Tailscale HTTPS port) */
366
363
  remotePort: z.number().optional(),
367
- /** Protocol: "HTTPS" | "HTTP" | "TCP" | "UDP" */
368
364
  protocol: z.string(),
369
- /** Mount path (Tailscale serve path, e.g. "/api") */
370
365
  path: z.string().optional(),
371
- /** Proxy target URL "http://127.0.0.1:3000" */
372
366
  target: z.string(),
373
- /** Full public access URL if available */
374
367
  publicUrl: z.string().optional(),
375
- /** Access scope */
376
368
  accessScope: z.enum(["public", "private", "tailnet"]),
377
- /** Hostname (Tailscale MagicDNS, Cloudflare domain, etc.) */
378
369
  hostname: z.string().optional(),
379
- /** Provider-specific extra info */
380
370
  metadata: z.record(z.string(), z.string()).optional()
381
371
  });
382
372
  const TunnelProviderInfoSchema = z.object({
@@ -384,29 +374,130 @@ const TunnelProviderInfoSchema = z.object({
384
374
  status: z.enum(["available", "unavailable", "not-installed"]),
385
375
  version: z.string().optional(),
386
376
  entries: z.array(TunnelEntrySchema),
387
- /** Provider-level info (e.g. Tailscale ipv4/hostname, UPnP external IP) */
388
377
  metadata: z.record(z.string(), z.string()).optional()
389
378
  });
390
379
  const TunnelStateSchema = z.object({
391
380
  providers: z.array(TunnelProviderInfoSchema)
392
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
+ });
393
483
  const DaemonStateSchema = z.object({
394
484
  status: z.union([
395
485
  z.enum(["running", "shutting-down"]),
396
486
  z.string()
397
- // Forward compatibility
398
487
  ]),
399
488
  pid: z.number().optional(),
400
489
  httpPort: z.number().optional(),
490
+ startTime: z.union([z.number(), z.string()]).optional(),
401
491
  startedAt: z.number().optional(),
492
+ startedWithCliVersion: z.string().optional(),
402
493
  shutdownRequestedAt: z.number().optional(),
403
494
  shutdownSource: z.union([
404
495
  z.enum(["mobile-app", "cli", "os-signal", "unknown"]),
405
496
  z.string()
406
- // Forward compatibility
407
497
  ]).optional(),
408
498
  tailscale: TailscaleInfoSchema.optional(),
409
- tunnels: TunnelStateSchema.optional()
499
+ tunnels: TunnelStateSchema.optional(),
500
+ automation: AutomationStateSchema.optional()
410
501
  });
411
502
 
412
503
  const KnowledgeEntryTypeSchema = z.enum([
@@ -590,4 +681,4 @@ const VoiceTokenResponseSchema = z.discriminatedUnion("allowed", [
590
681
  VoiceTokenDeniedSchema
591
682
  ]);
592
683
 
593
- 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, sessionTaskLogEventSchema, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmmao/happy-wire",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Shared message wire types and Zod schemas for Happy clients and services",
5
5
  "author": "kmmao",
6
6
  "license": "MIT",