@kmmao/happy-wire 0.9.1 → 0.9.2

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
@@ -401,7 +401,7 @@ const TunnelStateSchema = z__namespace.object({
401
401
  providers: z__namespace.array(TunnelProviderInfoSchema)
402
402
  });
403
403
  const AutomationPrioritySchema = z__namespace.enum(["urgent", "user", "background"]);
404
- const AutomationJobKindSchema = z__namespace.enum(["supervisor", "webhook", "agent_loop"]);
404
+ const AutomationJobKindSchema = z__namespace.enum(["supervisor", "webhook", "agent_loop", "task"]);
405
405
  const AutomationJobStatusSchema = z__namespace.enum([
406
406
  "queued",
407
407
  "dispatching",
@@ -495,6 +495,49 @@ const AutomationCountsSchema = z__namespace.object({
495
495
  failed: z__namespace.number(),
496
496
  cancelled: z__namespace.number()
497
497
  });
498
+ const AgentLoopSummarySchema = z__namespace.object({
499
+ id: z__namespace.string(),
500
+ name: z__namespace.string().optional(),
501
+ directory: z__namespace.string(),
502
+ enabled: z__namespace.boolean(),
503
+ intervalMs: z__namespace.number(),
504
+ cronExpression: z__namespace.string().optional(),
505
+ iteration: z__namespace.number(),
506
+ nextRunAt: z__namespace.number(),
507
+ runtimeState: z__namespace.string(),
508
+ phase: z__namespace.string(),
509
+ lastTriggerSource: z__namespace.string().optional(),
510
+ lastBriefSummary: z__namespace.string().optional(),
511
+ lastError: z__namespace.string().optional(),
512
+ agent: z__namespace.string()
513
+ });
514
+ const BootstrapProfileSummarySchema = z__namespace.object({
515
+ id: z__namespace.string(),
516
+ name: z__namespace.string().optional(),
517
+ rootDirectory: z__namespace.string(),
518
+ intervalMs: z__namespace.number(),
519
+ enabled: z__namespace.boolean(),
520
+ status: z__namespace.string(),
521
+ statusUpdatedAt: z__namespace.number(),
522
+ lastRunAt: z__namespace.number().optional(),
523
+ lastRepoCount: z__namespace.number().optional(),
524
+ lastSuggestionCount: z__namespace.number().optional(),
525
+ lastError: z__namespace.string().optional()
526
+ });
527
+ const AutoDreamProfileSummarySchema = z__namespace.object({
528
+ id: z__namespace.string(),
529
+ name: z__namespace.string().optional(),
530
+ rootDirectory: z__namespace.string(),
531
+ intervalMs: z__namespace.number(),
532
+ enabled: z__namespace.boolean(),
533
+ nextRunAt: z__namespace.number(),
534
+ status: z__namespace.string(),
535
+ stage: z__namespace.string(),
536
+ statusUpdatedAt: z__namespace.number(),
537
+ lastRunAt: z__namespace.number().optional(),
538
+ lastMemoryFiles: z__namespace.number().optional(),
539
+ lastError: z__namespace.string().optional()
540
+ });
498
541
  const AutomationStateSchema = z__namespace.object({
499
542
  updatedAt: z__namespace.number(),
500
543
  counts: AutomationCountsSchema,
@@ -502,7 +545,10 @@ const AutomationStateSchema = z__namespace.object({
502
545
  guardians: z__namespace.array(AutomationGuardianSummarySchema).optional(),
503
546
  guardianUsage: z__namespace.array(AutomationGuardianUsageSummarySchema).optional(),
504
547
  auditStats: AutomationAuditStatsSchema.optional(),
505
- recentAuditEvents: z__namespace.array(AutomationAuditEventSummarySchema).optional()
548
+ recentAuditEvents: z__namespace.array(AutomationAuditEventSummarySchema).optional(),
549
+ loops: z__namespace.array(AgentLoopSummarySchema).optional(),
550
+ bootstrapProfiles: z__namespace.array(BootstrapProfileSummarySchema).optional(),
551
+ autoDreamProfiles: z__namespace.array(AutoDreamProfileSummarySchema).optional()
506
552
  });
507
553
  const BriefMessageSchema = z__namespace.object({
508
554
  loopId: z__namespace.string(),
@@ -716,11 +762,134 @@ const VoiceTokenResponseSchema = z__namespace.discriminatedUnion("allowed", [
716
762
  VoiceTokenDeniedSchema
717
763
  ]);
718
764
 
765
+ const TaskPrioritySchema = z__namespace.enum([
766
+ "urgent",
767
+ // User-initiated, needs immediate execution
768
+ "user",
769
+ // Normal user-created task (default)
770
+ "background"
771
+ // Automated / scheduled tasks
772
+ ]);
773
+ const TaskStatusSchema = z__namespace.enum([
774
+ "queued",
775
+ // Waiting in queue
776
+ "dispatching",
777
+ // Being sent to CLI daemon
778
+ "running",
779
+ // Executing on CLI
780
+ "completed",
781
+ // Finished successfully
782
+ "failed",
783
+ // Execution failed
784
+ "cancelled"
785
+ // Cancelled by user
786
+ ]);
787
+ const TaskTriggerTypeSchema = z__namespace.enum([
788
+ "manual",
789
+ // Created from App by user
790
+ "cron",
791
+ // Created by TriggerSchedule
792
+ "webhook"
793
+ // Created by WebhookTrigger
794
+ ]);
795
+ const TaskSummarySchema = z__namespace.object({
796
+ id: z__namespace.string(),
797
+ projectId: z__namespace.string().nullable(),
798
+ machineId: z__namespace.string(),
799
+ priority: TaskPrioritySchema,
800
+ status: TaskStatusSchema,
801
+ triggerType: TaskTriggerTypeSchema,
802
+ triggerRef: z__namespace.string().optional(),
803
+ attempt: z__namespace.number(),
804
+ maxAttempts: z__namespace.number(),
805
+ sessionId: z__namespace.string().optional(),
806
+ errorMessage: z__namespace.string().optional(),
807
+ dispatchedAt: z__namespace.number().optional(),
808
+ completedAt: z__namespace.number().optional(),
809
+ createdAt: z__namespace.number(),
810
+ updatedAt: z__namespace.number(),
811
+ // Encrypted prompt preview (first 100 chars)
812
+ promptPreview: z__namespace.string().optional(),
813
+ // Names of bound skills for display
814
+ skillNames: z__namespace.array(z__namespace.string()).optional()
815
+ });
816
+ const CreateTaskBodySchema = z__namespace.object({
817
+ projectId: z__namespace.string().optional(),
818
+ machineId: z__namespace.string(),
819
+ prompt: z__namespace.string().min(1),
820
+ // Encrypted by App
821
+ priority: TaskPrioritySchema.default("user"),
822
+ maxAttempts: z__namespace.number().int().min(1).max(10).default(3),
823
+ skillIds: z__namespace.array(z__namespace.string()).max(10).default([])
824
+ });
825
+ const TaskTriggerDataSchema = z__namespace.object({
826
+ type: z__namespace.literal("task-trigger"),
827
+ taskId: z__namespace.string(),
828
+ prompt: z__namespace.string(),
829
+ // Encrypted prompt
830
+ directory: z__namespace.string(),
831
+ // Project directory on machine
832
+ priority: TaskPrioritySchema,
833
+ projectId: z__namespace.string().optional(),
834
+ skillContents: z__namespace.array(z__namespace.object({
835
+ name: z__namespace.string(),
836
+ content: z__namespace.string()
837
+ })).optional()
838
+ });
839
+ const TaskStatusReportSchema = z__namespace.object({
840
+ taskId: z__namespace.string(),
841
+ status: TaskStatusSchema,
842
+ sessionId: z__namespace.string().optional(),
843
+ errorMessage: z__namespace.string().optional()
844
+ });
845
+ const TaskStatusChangedSchema = z__namespace.object({
846
+ type: z__namespace.literal("task-status-changed"),
847
+ taskId: z__namespace.string(),
848
+ status: TaskStatusSchema,
849
+ sessionId: z__namespace.string().optional(),
850
+ errorMessage: z__namespace.string().optional(),
851
+ completedAt: z__namespace.number().optional()
852
+ });
853
+
854
+ const SkillSummarySchema = z__namespace.object({
855
+ id: z__namespace.string(),
856
+ projectId: z__namespace.string().nullable(),
857
+ name: z__namespace.string(),
858
+ description: z__namespace.string().optional(),
859
+ content: z__namespace.string(),
860
+ attachments: z__namespace.array(z__namespace.string()),
861
+ sourceKnowledgeId: z__namespace.string().optional(),
862
+ archived: z__namespace.boolean(),
863
+ createdAt: z__namespace.number(),
864
+ updatedAt: z__namespace.number()
865
+ });
866
+ const CreateSkillBodySchema = z__namespace.object({
867
+ projectId: z__namespace.string().optional(),
868
+ name: z__namespace.string().min(1).max(100),
869
+ description: z__namespace.string().max(500).optional(),
870
+ content: z__namespace.string().min(1).max(5e4),
871
+ attachments: z__namespace.array(z__namespace.string()).max(10).default([]),
872
+ sourceKnowledgeId: z__namespace.string().optional()
873
+ });
874
+ const UpdateSkillBodySchema = z__namespace.object({
875
+ name: z__namespace.string().min(1).max(100).optional(),
876
+ description: z__namespace.string().max(500).optional(),
877
+ content: z__namespace.string().min(1).max(5e4).optional(),
878
+ attachments: z__namespace.array(z__namespace.string()).max(10).optional(),
879
+ archived: z__namespace.boolean().optional()
880
+ });
881
+ const SkillContentSchema = z__namespace.object({
882
+ name: z__namespace.string(),
883
+ content: z__namespace.string()
884
+ });
885
+
886
+ exports.AgentLoopSummarySchema = AgentLoopSummarySchema;
719
887
  exports.AgentMessageSchema = AgentMessageSchema;
720
888
  exports.ApiMessageSchema = ApiMessageSchema;
721
889
  exports.ApiUpdateMachineStateSchema = ApiUpdateMachineStateSchema;
722
890
  exports.ApiUpdateNewMessageSchema = ApiUpdateNewMessageSchema;
723
891
  exports.ApiUpdateSessionStateSchema = ApiUpdateSessionStateSchema;
892
+ exports.AutoDreamProfileSummarySchema = AutoDreamProfileSummarySchema;
724
893
  exports.AutomationAuditEventSummarySchema = AutomationAuditEventSummarySchema;
725
894
  exports.AutomationAuditStatsSchema = AutomationAuditStatsSchema;
726
895
  exports.AutomationCountsSchema = AutomationCountsSchema;
@@ -731,10 +900,13 @@ exports.AutomationJobStatusSchema = AutomationJobStatusSchema;
731
900
  exports.AutomationJobSummarySchema = AutomationJobSummarySchema;
732
901
  exports.AutomationPrioritySchema = AutomationPrioritySchema;
733
902
  exports.AutomationStateSchema = AutomationStateSchema;
903
+ exports.BootstrapProfileSummarySchema = BootstrapProfileSummarySchema;
734
904
  exports.BriefMessageSchema = BriefMessageSchema;
735
905
  exports.CoreUpdateBodySchema = CoreUpdateBodySchema;
736
906
  exports.CoreUpdateContainerSchema = CoreUpdateContainerSchema;
737
907
  exports.CreateKnowledgeEntryBodySchema = CreateKnowledgeEntryBodySchema;
908
+ exports.CreateSkillBodySchema = CreateSkillBodySchema;
909
+ exports.CreateTaskBodySchema = CreateTaskBodySchema;
738
910
  exports.CrossProjectSearchResponseSchema = CrossProjectSearchResponseSchema;
739
911
  exports.CrossProjectSearchResultSchema = CrossProjectSearchResultSchema;
740
912
  exports.DaemonStateSchema = DaemonStateSchema;
@@ -758,8 +930,17 @@ exports.QueryKnowledgeParamsSchema = QueryKnowledgeParamsSchema;
758
930
  exports.SessionMessageContentSchema = SessionMessageContentSchema;
759
931
  exports.SessionMessageSchema = SessionMessageSchema;
760
932
  exports.SessionProtocolMessageSchema = SessionProtocolMessageSchema;
933
+ exports.SkillContentSchema = SkillContentSchema;
934
+ exports.SkillSummarySchema = SkillSummarySchema;
761
935
  exports.TailscaleInfoSchema = TailscaleInfoSchema;
762
936
  exports.TailscaleServeEntrySchema = TailscaleServeEntrySchema;
937
+ exports.TaskPrioritySchema = TaskPrioritySchema;
938
+ exports.TaskStatusChangedSchema = TaskStatusChangedSchema;
939
+ exports.TaskStatusReportSchema = TaskStatusReportSchema;
940
+ exports.TaskStatusSchema = TaskStatusSchema;
941
+ exports.TaskSummarySchema = TaskSummarySchema;
942
+ exports.TaskTriggerDataSchema = TaskTriggerDataSchema;
943
+ exports.TaskTriggerTypeSchema = TaskTriggerTypeSchema;
763
944
  exports.TunnelEntrySchema = TunnelEntrySchema;
764
945
  exports.TunnelProviderInfoSchema = TunnelProviderInfoSchema;
765
946
  exports.TunnelStateSchema = TunnelStateSchema;
@@ -770,6 +951,7 @@ exports.UpdateMachineBodySchema = UpdateMachineBodySchema;
770
951
  exports.UpdateNewMessageBodySchema = UpdateNewMessageBodySchema;
771
952
  exports.UpdateSchema = UpdateSchema;
772
953
  exports.UpdateSessionBodySchema = UpdateSessionBodySchema;
954
+ exports.UpdateSkillBodySchema = UpdateSkillBodySchema;
773
955
  exports.UserMessageSchema = UserMessageSchema;
774
956
  exports.VersionedEncryptedValueSchema = VersionedEncryptedValueSchema;
775
957
  exports.VersionedMachineEncryptedValueSchema = VersionedMachineEncryptedValueSchema;
package/dist/index.d.cts CHANGED
@@ -1501,6 +1501,7 @@ declare const AutomationJobKindSchema: z.ZodEnum<{
1501
1501
  supervisor: "supervisor";
1502
1502
  webhook: "webhook";
1503
1503
  agent_loop: "agent_loop";
1504
+ task: "task";
1504
1505
  }>;
1505
1506
  type AutomationJobKind = z.infer<typeof AutomationJobKindSchema>;
1506
1507
  declare const AutomationJobStatusSchema: z.ZodEnum<{
@@ -1518,6 +1519,7 @@ declare const AutomationJobSummarySchema: z.ZodObject<{
1518
1519
  supervisor: "supervisor";
1519
1520
  webhook: "webhook";
1520
1521
  agent_loop: "agent_loop";
1522
+ task: "task";
1521
1523
  }>;
1522
1524
  status: z.ZodEnum<{
1523
1525
  completed: "completed";
@@ -1618,6 +1620,52 @@ declare const AutomationCountsSchema: z.ZodObject<{
1618
1620
  cancelled: z.ZodNumber;
1619
1621
  }, z.core.$strip>;
1620
1622
  type AutomationCounts = z.infer<typeof AutomationCountsSchema>;
1623
+ declare const AgentLoopSummarySchema: z.ZodObject<{
1624
+ id: z.ZodString;
1625
+ name: z.ZodOptional<z.ZodString>;
1626
+ directory: z.ZodString;
1627
+ enabled: z.ZodBoolean;
1628
+ intervalMs: z.ZodNumber;
1629
+ cronExpression: z.ZodOptional<z.ZodString>;
1630
+ iteration: z.ZodNumber;
1631
+ nextRunAt: z.ZodNumber;
1632
+ runtimeState: z.ZodString;
1633
+ phase: z.ZodString;
1634
+ lastTriggerSource: z.ZodOptional<z.ZodString>;
1635
+ lastBriefSummary: z.ZodOptional<z.ZodString>;
1636
+ lastError: z.ZodOptional<z.ZodString>;
1637
+ agent: z.ZodString;
1638
+ }, z.core.$strip>;
1639
+ type AgentLoopSummary = z.infer<typeof AgentLoopSummarySchema>;
1640
+ declare const BootstrapProfileSummarySchema: z.ZodObject<{
1641
+ id: z.ZodString;
1642
+ name: z.ZodOptional<z.ZodString>;
1643
+ rootDirectory: z.ZodString;
1644
+ intervalMs: z.ZodNumber;
1645
+ enabled: z.ZodBoolean;
1646
+ status: z.ZodString;
1647
+ statusUpdatedAt: z.ZodNumber;
1648
+ lastRunAt: z.ZodOptional<z.ZodNumber>;
1649
+ lastRepoCount: z.ZodOptional<z.ZodNumber>;
1650
+ lastSuggestionCount: z.ZodOptional<z.ZodNumber>;
1651
+ lastError: z.ZodOptional<z.ZodString>;
1652
+ }, z.core.$strip>;
1653
+ type BootstrapProfileSummary = z.infer<typeof BootstrapProfileSummarySchema>;
1654
+ declare const AutoDreamProfileSummarySchema: z.ZodObject<{
1655
+ id: z.ZodString;
1656
+ name: z.ZodOptional<z.ZodString>;
1657
+ rootDirectory: z.ZodString;
1658
+ intervalMs: z.ZodNumber;
1659
+ enabled: z.ZodBoolean;
1660
+ nextRunAt: z.ZodNumber;
1661
+ status: z.ZodString;
1662
+ stage: z.ZodString;
1663
+ statusUpdatedAt: z.ZodNumber;
1664
+ lastRunAt: z.ZodOptional<z.ZodNumber>;
1665
+ lastMemoryFiles: z.ZodOptional<z.ZodNumber>;
1666
+ lastError: z.ZodOptional<z.ZodString>;
1667
+ }, z.core.$strip>;
1668
+ type AutoDreamProfileSummary = z.infer<typeof AutoDreamProfileSummarySchema>;
1621
1669
  declare const AutomationStateSchema: z.ZodObject<{
1622
1670
  updatedAt: z.ZodNumber;
1623
1671
  counts: z.ZodObject<{
@@ -1634,6 +1682,7 @@ declare const AutomationStateSchema: z.ZodObject<{
1634
1682
  supervisor: "supervisor";
1635
1683
  webhook: "webhook";
1636
1684
  agent_loop: "agent_loop";
1685
+ task: "task";
1637
1686
  }>;
1638
1687
  status: z.ZodEnum<{
1639
1688
  completed: "completed";
@@ -1720,6 +1769,49 @@ declare const AutomationStateSchema: z.ZodObject<{
1720
1769
  guardianSessionId: z.ZodOptional<z.ZodString>;
1721
1770
  message: z.ZodOptional<z.ZodString>;
1722
1771
  }, z.core.$strip>>>;
1772
+ loops: z.ZodOptional<z.ZodArray<z.ZodObject<{
1773
+ id: z.ZodString;
1774
+ name: z.ZodOptional<z.ZodString>;
1775
+ directory: z.ZodString;
1776
+ enabled: z.ZodBoolean;
1777
+ intervalMs: z.ZodNumber;
1778
+ cronExpression: z.ZodOptional<z.ZodString>;
1779
+ iteration: z.ZodNumber;
1780
+ nextRunAt: z.ZodNumber;
1781
+ runtimeState: z.ZodString;
1782
+ phase: z.ZodString;
1783
+ lastTriggerSource: z.ZodOptional<z.ZodString>;
1784
+ lastBriefSummary: z.ZodOptional<z.ZodString>;
1785
+ lastError: z.ZodOptional<z.ZodString>;
1786
+ agent: z.ZodString;
1787
+ }, z.core.$strip>>>;
1788
+ bootstrapProfiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
1789
+ id: z.ZodString;
1790
+ name: z.ZodOptional<z.ZodString>;
1791
+ rootDirectory: z.ZodString;
1792
+ intervalMs: z.ZodNumber;
1793
+ enabled: z.ZodBoolean;
1794
+ status: z.ZodString;
1795
+ statusUpdatedAt: z.ZodNumber;
1796
+ lastRunAt: z.ZodOptional<z.ZodNumber>;
1797
+ lastRepoCount: z.ZodOptional<z.ZodNumber>;
1798
+ lastSuggestionCount: z.ZodOptional<z.ZodNumber>;
1799
+ lastError: z.ZodOptional<z.ZodString>;
1800
+ }, z.core.$strip>>>;
1801
+ autoDreamProfiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
1802
+ id: z.ZodString;
1803
+ name: z.ZodOptional<z.ZodString>;
1804
+ rootDirectory: z.ZodString;
1805
+ intervalMs: z.ZodNumber;
1806
+ enabled: z.ZodBoolean;
1807
+ nextRunAt: z.ZodNumber;
1808
+ status: z.ZodString;
1809
+ stage: z.ZodString;
1810
+ statusUpdatedAt: z.ZodNumber;
1811
+ lastRunAt: z.ZodOptional<z.ZodNumber>;
1812
+ lastMemoryFiles: z.ZodOptional<z.ZodNumber>;
1813
+ lastError: z.ZodOptional<z.ZodString>;
1814
+ }, z.core.$strip>>>;
1723
1815
  }, z.core.$strip>;
1724
1816
  type AutomationState = z.infer<typeof AutomationStateSchema>;
1725
1817
  declare const BriefMessageSchema: z.ZodObject<{
@@ -1817,6 +1909,7 @@ declare const DaemonStateSchema: z.ZodObject<{
1817
1909
  supervisor: "supervisor";
1818
1910
  webhook: "webhook";
1819
1911
  agent_loop: "agent_loop";
1912
+ task: "task";
1820
1913
  }>;
1821
1914
  status: z.ZodEnum<{
1822
1915
  completed: "completed";
@@ -1903,6 +1996,49 @@ declare const DaemonStateSchema: z.ZodObject<{
1903
1996
  guardianSessionId: z.ZodOptional<z.ZodString>;
1904
1997
  message: z.ZodOptional<z.ZodString>;
1905
1998
  }, z.core.$strip>>>;
1999
+ loops: z.ZodOptional<z.ZodArray<z.ZodObject<{
2000
+ id: z.ZodString;
2001
+ name: z.ZodOptional<z.ZodString>;
2002
+ directory: z.ZodString;
2003
+ enabled: z.ZodBoolean;
2004
+ intervalMs: z.ZodNumber;
2005
+ cronExpression: z.ZodOptional<z.ZodString>;
2006
+ iteration: z.ZodNumber;
2007
+ nextRunAt: z.ZodNumber;
2008
+ runtimeState: z.ZodString;
2009
+ phase: z.ZodString;
2010
+ lastTriggerSource: z.ZodOptional<z.ZodString>;
2011
+ lastBriefSummary: z.ZodOptional<z.ZodString>;
2012
+ lastError: z.ZodOptional<z.ZodString>;
2013
+ agent: z.ZodString;
2014
+ }, z.core.$strip>>>;
2015
+ bootstrapProfiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
2016
+ id: z.ZodString;
2017
+ name: z.ZodOptional<z.ZodString>;
2018
+ rootDirectory: z.ZodString;
2019
+ intervalMs: z.ZodNumber;
2020
+ enabled: z.ZodBoolean;
2021
+ status: z.ZodString;
2022
+ statusUpdatedAt: z.ZodNumber;
2023
+ lastRunAt: z.ZodOptional<z.ZodNumber>;
2024
+ lastRepoCount: z.ZodOptional<z.ZodNumber>;
2025
+ lastSuggestionCount: z.ZodOptional<z.ZodNumber>;
2026
+ lastError: z.ZodOptional<z.ZodString>;
2027
+ }, z.core.$strip>>>;
2028
+ autoDreamProfiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
2029
+ id: z.ZodString;
2030
+ name: z.ZodOptional<z.ZodString>;
2031
+ rootDirectory: z.ZodString;
2032
+ intervalMs: z.ZodNumber;
2033
+ enabled: z.ZodBoolean;
2034
+ nextRunAt: z.ZodNumber;
2035
+ status: z.ZodString;
2036
+ stage: z.ZodString;
2037
+ statusUpdatedAt: z.ZodNumber;
2038
+ lastRunAt: z.ZodOptional<z.ZodNumber>;
2039
+ lastMemoryFiles: z.ZodOptional<z.ZodNumber>;
2040
+ lastError: z.ZodOptional<z.ZodString>;
2041
+ }, z.core.$strip>>>;
1906
2042
  }, z.core.$strip>>;
1907
2043
  recentBriefs: z.ZodOptional<z.ZodArray<z.ZodObject<{
1908
2044
  loopId: z.ZodString;
@@ -1930,8 +2066,8 @@ declare const KnowledgeEntryTypeSchema: z.ZodEnum<{
1930
2066
  }>;
1931
2067
  type KnowledgeEntryType = z.infer<typeof KnowledgeEntryTypeSchema>;
1932
2068
  declare const KnowledgeContributorTypeSchema: z.ZodEnum<{
1933
- user: "user";
1934
2069
  session: "session";
2070
+ user: "user";
1935
2071
  supervisor: "supervisor";
1936
2072
  }>;
1937
2073
  type KnowledgeContributorType = z.infer<typeof KnowledgeContributorTypeSchema>;
@@ -1963,8 +2099,8 @@ declare const CreateKnowledgeEntryBodySchema: z.ZodObject<{
1963
2099
  warning: "warning";
1964
2100
  }>;
1965
2101
  contributorType: z.ZodEnum<{
1966
- user: "user";
1967
2102
  session: "session";
2103
+ user: "user";
1968
2104
  supervisor: "supervisor";
1969
2105
  }>;
1970
2106
  action: z.ZodEnum<{
@@ -2273,5 +2409,158 @@ declare const VoiceTokenResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2273
2409
  }, z.core.$strip>], "allowed">;
2274
2410
  type VoiceTokenResponse = z.infer<typeof VoiceTokenResponseSchema>;
2275
2411
 
2276
- export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, AutomationAuditEventSummarySchema, AutomationAuditStatsSchema, AutomationCountsSchema, AutomationGuardianSummarySchema, AutomationGuardianUsageSummarySchema, AutomationJobKindSchema, AutomationJobStatusSchema, AutomationJobSummarySchema, AutomationPrioritySchema, AutomationStateSchema, BriefMessageSchema, 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 };
2277
- export type { AgentMessage, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, AutomationAuditEventSummary, AutomationAuditStats, AutomationCounts, AutomationGuardianSummary, AutomationGuardianUsageSummary, AutomationJobKind, AutomationJobStatus, AutomationJobSummary, AutomationPriority, AutomationState, BriefMessage, 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 };
2412
+ declare const TaskPrioritySchema: z.ZodEnum<{
2413
+ user: "user";
2414
+ urgent: "urgent";
2415
+ background: "background";
2416
+ }>;
2417
+ type TaskPriority = z.infer<typeof TaskPrioritySchema>;
2418
+ declare const TaskStatusSchema: z.ZodEnum<{
2419
+ completed: "completed";
2420
+ failed: "failed";
2421
+ cancelled: "cancelled";
2422
+ running: "running";
2423
+ queued: "queued";
2424
+ dispatching: "dispatching";
2425
+ }>;
2426
+ type TaskStatus = z.infer<typeof TaskStatusSchema>;
2427
+ declare const TaskTriggerTypeSchema: z.ZodEnum<{
2428
+ webhook: "webhook";
2429
+ manual: "manual";
2430
+ cron: "cron";
2431
+ }>;
2432
+ type TaskTriggerType = z.infer<typeof TaskTriggerTypeSchema>;
2433
+ declare const TaskSummarySchema: z.ZodObject<{
2434
+ id: z.ZodString;
2435
+ projectId: z.ZodNullable<z.ZodString>;
2436
+ machineId: z.ZodString;
2437
+ priority: z.ZodEnum<{
2438
+ user: "user";
2439
+ urgent: "urgent";
2440
+ background: "background";
2441
+ }>;
2442
+ status: z.ZodEnum<{
2443
+ completed: "completed";
2444
+ failed: "failed";
2445
+ cancelled: "cancelled";
2446
+ running: "running";
2447
+ queued: "queued";
2448
+ dispatching: "dispatching";
2449
+ }>;
2450
+ triggerType: z.ZodEnum<{
2451
+ webhook: "webhook";
2452
+ manual: "manual";
2453
+ cron: "cron";
2454
+ }>;
2455
+ triggerRef: z.ZodOptional<z.ZodString>;
2456
+ attempt: z.ZodNumber;
2457
+ maxAttempts: z.ZodNumber;
2458
+ sessionId: z.ZodOptional<z.ZodString>;
2459
+ errorMessage: z.ZodOptional<z.ZodString>;
2460
+ dispatchedAt: z.ZodOptional<z.ZodNumber>;
2461
+ completedAt: z.ZodOptional<z.ZodNumber>;
2462
+ createdAt: z.ZodNumber;
2463
+ updatedAt: z.ZodNumber;
2464
+ promptPreview: z.ZodOptional<z.ZodString>;
2465
+ skillNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
2466
+ }, z.core.$strip>;
2467
+ type TaskSummary = z.infer<typeof TaskSummarySchema>;
2468
+ declare const CreateTaskBodySchema: z.ZodObject<{
2469
+ projectId: z.ZodOptional<z.ZodString>;
2470
+ machineId: z.ZodString;
2471
+ prompt: z.ZodString;
2472
+ priority: z.ZodDefault<z.ZodEnum<{
2473
+ user: "user";
2474
+ urgent: "urgent";
2475
+ background: "background";
2476
+ }>>;
2477
+ maxAttempts: z.ZodDefault<z.ZodNumber>;
2478
+ skillIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
2479
+ }, z.core.$strip>;
2480
+ type CreateTaskBody = z.infer<typeof CreateTaskBodySchema>;
2481
+ declare const TaskTriggerDataSchema: z.ZodObject<{
2482
+ type: z.ZodLiteral<"task-trigger">;
2483
+ taskId: z.ZodString;
2484
+ prompt: z.ZodString;
2485
+ directory: z.ZodString;
2486
+ priority: z.ZodEnum<{
2487
+ user: "user";
2488
+ urgent: "urgent";
2489
+ background: "background";
2490
+ }>;
2491
+ projectId: z.ZodOptional<z.ZodString>;
2492
+ skillContents: z.ZodOptional<z.ZodArray<z.ZodObject<{
2493
+ name: z.ZodString;
2494
+ content: z.ZodString;
2495
+ }, z.core.$strip>>>;
2496
+ }, z.core.$strip>;
2497
+ type TaskTriggerData = z.infer<typeof TaskTriggerDataSchema>;
2498
+ declare const TaskStatusReportSchema: z.ZodObject<{
2499
+ taskId: z.ZodString;
2500
+ status: z.ZodEnum<{
2501
+ completed: "completed";
2502
+ failed: "failed";
2503
+ cancelled: "cancelled";
2504
+ running: "running";
2505
+ queued: "queued";
2506
+ dispatching: "dispatching";
2507
+ }>;
2508
+ sessionId: z.ZodOptional<z.ZodString>;
2509
+ errorMessage: z.ZodOptional<z.ZodString>;
2510
+ }, z.core.$strip>;
2511
+ type TaskStatusReport = z.infer<typeof TaskStatusReportSchema>;
2512
+ declare const TaskStatusChangedSchema: z.ZodObject<{
2513
+ type: z.ZodLiteral<"task-status-changed">;
2514
+ taskId: z.ZodString;
2515
+ status: z.ZodEnum<{
2516
+ completed: "completed";
2517
+ failed: "failed";
2518
+ cancelled: "cancelled";
2519
+ running: "running";
2520
+ queued: "queued";
2521
+ dispatching: "dispatching";
2522
+ }>;
2523
+ sessionId: z.ZodOptional<z.ZodString>;
2524
+ errorMessage: z.ZodOptional<z.ZodString>;
2525
+ completedAt: z.ZodOptional<z.ZodNumber>;
2526
+ }, z.core.$strip>;
2527
+ type TaskStatusChanged = z.infer<typeof TaskStatusChangedSchema>;
2528
+
2529
+ declare const SkillSummarySchema: z.ZodObject<{
2530
+ id: z.ZodString;
2531
+ projectId: z.ZodNullable<z.ZodString>;
2532
+ name: z.ZodString;
2533
+ description: z.ZodOptional<z.ZodString>;
2534
+ content: z.ZodString;
2535
+ attachments: z.ZodArray<z.ZodString>;
2536
+ sourceKnowledgeId: z.ZodOptional<z.ZodString>;
2537
+ archived: z.ZodBoolean;
2538
+ createdAt: z.ZodNumber;
2539
+ updatedAt: z.ZodNumber;
2540
+ }, z.core.$strip>;
2541
+ type SkillSummary = z.infer<typeof SkillSummarySchema>;
2542
+ declare const CreateSkillBodySchema: z.ZodObject<{
2543
+ projectId: z.ZodOptional<z.ZodString>;
2544
+ name: z.ZodString;
2545
+ description: z.ZodOptional<z.ZodString>;
2546
+ content: z.ZodString;
2547
+ attachments: z.ZodDefault<z.ZodArray<z.ZodString>>;
2548
+ sourceKnowledgeId: z.ZodOptional<z.ZodString>;
2549
+ }, z.core.$strip>;
2550
+ type CreateSkillBody = z.infer<typeof CreateSkillBodySchema>;
2551
+ declare const UpdateSkillBodySchema: z.ZodObject<{
2552
+ name: z.ZodOptional<z.ZodString>;
2553
+ description: z.ZodOptional<z.ZodString>;
2554
+ content: z.ZodOptional<z.ZodString>;
2555
+ attachments: z.ZodOptional<z.ZodArray<z.ZodString>>;
2556
+ archived: z.ZodOptional<z.ZodBoolean>;
2557
+ }, z.core.$strip>;
2558
+ type UpdateSkillBody = z.infer<typeof UpdateSkillBodySchema>;
2559
+ declare const SkillContentSchema: z.ZodObject<{
2560
+ name: z.ZodString;
2561
+ content: z.ZodString;
2562
+ }, z.core.$strip>;
2563
+ type SkillContent = z.infer<typeof SkillContentSchema>;
2564
+
2565
+ export { AgentLoopSummarySchema, AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, AutoDreamProfileSummarySchema, AutomationAuditEventSummarySchema, AutomationAuditStatsSchema, AutomationCountsSchema, AutomationGuardianSummarySchema, AutomationGuardianUsageSummarySchema, AutomationJobKindSchema, AutomationJobStatusSchema, AutomationJobSummarySchema, AutomationPrioritySchema, AutomationStateSchema, BootstrapProfileSummarySchema, BriefMessageSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CreateSkillBodySchema, CreateTaskBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, DaemonStateSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, SkillContentSchema, SkillSummarySchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TaskPrioritySchema, TaskStatusChangedSchema, TaskStatusReportSchema, TaskStatusSchema, TaskSummarySchema, TaskTriggerDataSchema, TaskTriggerTypeSchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UpdateSkillBodySchema, 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 };
2566
+ export type { AgentLoopSummary, AgentMessage, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, AutoDreamProfileSummary, AutomationAuditEventSummary, AutomationAuditStats, AutomationCounts, AutomationGuardianSummary, AutomationGuardianUsageSummary, AutomationJobKind, AutomationJobStatus, AutomationJobSummary, AutomationPriority, AutomationState, BootstrapProfileSummary, BriefMessage, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, CreateKnowledgeEntryBody, CreateSkillBody, CreateTaskBody, 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, SkillContent, SkillSummary, TailscaleInfo, TailscaleServeEntry, TaskPriority, TaskStatus, TaskStatusChanged, TaskStatusReport, TaskSummary, TaskTriggerData, TaskTriggerType, TunnelEntry, TunnelProviderInfo, TunnelState, TurnKnowledgeExtraction, Update, UpdateBody, UpdateKnowledgeEntryBody, UpdateMachineBody, UpdateNewMessageBody, UpdateSessionBody, UpdateSkillBody, UserMessage, VersionedEncryptedValue, VersionedMachineEncryptedValue, VersionedNullableEncryptedValue, VoiceTokenResponse };
package/dist/index.d.mts CHANGED
@@ -1501,6 +1501,7 @@ declare const AutomationJobKindSchema: z.ZodEnum<{
1501
1501
  supervisor: "supervisor";
1502
1502
  webhook: "webhook";
1503
1503
  agent_loop: "agent_loop";
1504
+ task: "task";
1504
1505
  }>;
1505
1506
  type AutomationJobKind = z.infer<typeof AutomationJobKindSchema>;
1506
1507
  declare const AutomationJobStatusSchema: z.ZodEnum<{
@@ -1518,6 +1519,7 @@ declare const AutomationJobSummarySchema: z.ZodObject<{
1518
1519
  supervisor: "supervisor";
1519
1520
  webhook: "webhook";
1520
1521
  agent_loop: "agent_loop";
1522
+ task: "task";
1521
1523
  }>;
1522
1524
  status: z.ZodEnum<{
1523
1525
  completed: "completed";
@@ -1618,6 +1620,52 @@ declare const AutomationCountsSchema: z.ZodObject<{
1618
1620
  cancelled: z.ZodNumber;
1619
1621
  }, z.core.$strip>;
1620
1622
  type AutomationCounts = z.infer<typeof AutomationCountsSchema>;
1623
+ declare const AgentLoopSummarySchema: z.ZodObject<{
1624
+ id: z.ZodString;
1625
+ name: z.ZodOptional<z.ZodString>;
1626
+ directory: z.ZodString;
1627
+ enabled: z.ZodBoolean;
1628
+ intervalMs: z.ZodNumber;
1629
+ cronExpression: z.ZodOptional<z.ZodString>;
1630
+ iteration: z.ZodNumber;
1631
+ nextRunAt: z.ZodNumber;
1632
+ runtimeState: z.ZodString;
1633
+ phase: z.ZodString;
1634
+ lastTriggerSource: z.ZodOptional<z.ZodString>;
1635
+ lastBriefSummary: z.ZodOptional<z.ZodString>;
1636
+ lastError: z.ZodOptional<z.ZodString>;
1637
+ agent: z.ZodString;
1638
+ }, z.core.$strip>;
1639
+ type AgentLoopSummary = z.infer<typeof AgentLoopSummarySchema>;
1640
+ declare const BootstrapProfileSummarySchema: z.ZodObject<{
1641
+ id: z.ZodString;
1642
+ name: z.ZodOptional<z.ZodString>;
1643
+ rootDirectory: z.ZodString;
1644
+ intervalMs: z.ZodNumber;
1645
+ enabled: z.ZodBoolean;
1646
+ status: z.ZodString;
1647
+ statusUpdatedAt: z.ZodNumber;
1648
+ lastRunAt: z.ZodOptional<z.ZodNumber>;
1649
+ lastRepoCount: z.ZodOptional<z.ZodNumber>;
1650
+ lastSuggestionCount: z.ZodOptional<z.ZodNumber>;
1651
+ lastError: z.ZodOptional<z.ZodString>;
1652
+ }, z.core.$strip>;
1653
+ type BootstrapProfileSummary = z.infer<typeof BootstrapProfileSummarySchema>;
1654
+ declare const AutoDreamProfileSummarySchema: z.ZodObject<{
1655
+ id: z.ZodString;
1656
+ name: z.ZodOptional<z.ZodString>;
1657
+ rootDirectory: z.ZodString;
1658
+ intervalMs: z.ZodNumber;
1659
+ enabled: z.ZodBoolean;
1660
+ nextRunAt: z.ZodNumber;
1661
+ status: z.ZodString;
1662
+ stage: z.ZodString;
1663
+ statusUpdatedAt: z.ZodNumber;
1664
+ lastRunAt: z.ZodOptional<z.ZodNumber>;
1665
+ lastMemoryFiles: z.ZodOptional<z.ZodNumber>;
1666
+ lastError: z.ZodOptional<z.ZodString>;
1667
+ }, z.core.$strip>;
1668
+ type AutoDreamProfileSummary = z.infer<typeof AutoDreamProfileSummarySchema>;
1621
1669
  declare const AutomationStateSchema: z.ZodObject<{
1622
1670
  updatedAt: z.ZodNumber;
1623
1671
  counts: z.ZodObject<{
@@ -1634,6 +1682,7 @@ declare const AutomationStateSchema: z.ZodObject<{
1634
1682
  supervisor: "supervisor";
1635
1683
  webhook: "webhook";
1636
1684
  agent_loop: "agent_loop";
1685
+ task: "task";
1637
1686
  }>;
1638
1687
  status: z.ZodEnum<{
1639
1688
  completed: "completed";
@@ -1720,6 +1769,49 @@ declare const AutomationStateSchema: z.ZodObject<{
1720
1769
  guardianSessionId: z.ZodOptional<z.ZodString>;
1721
1770
  message: z.ZodOptional<z.ZodString>;
1722
1771
  }, z.core.$strip>>>;
1772
+ loops: z.ZodOptional<z.ZodArray<z.ZodObject<{
1773
+ id: z.ZodString;
1774
+ name: z.ZodOptional<z.ZodString>;
1775
+ directory: z.ZodString;
1776
+ enabled: z.ZodBoolean;
1777
+ intervalMs: z.ZodNumber;
1778
+ cronExpression: z.ZodOptional<z.ZodString>;
1779
+ iteration: z.ZodNumber;
1780
+ nextRunAt: z.ZodNumber;
1781
+ runtimeState: z.ZodString;
1782
+ phase: z.ZodString;
1783
+ lastTriggerSource: z.ZodOptional<z.ZodString>;
1784
+ lastBriefSummary: z.ZodOptional<z.ZodString>;
1785
+ lastError: z.ZodOptional<z.ZodString>;
1786
+ agent: z.ZodString;
1787
+ }, z.core.$strip>>>;
1788
+ bootstrapProfiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
1789
+ id: z.ZodString;
1790
+ name: z.ZodOptional<z.ZodString>;
1791
+ rootDirectory: z.ZodString;
1792
+ intervalMs: z.ZodNumber;
1793
+ enabled: z.ZodBoolean;
1794
+ status: z.ZodString;
1795
+ statusUpdatedAt: z.ZodNumber;
1796
+ lastRunAt: z.ZodOptional<z.ZodNumber>;
1797
+ lastRepoCount: z.ZodOptional<z.ZodNumber>;
1798
+ lastSuggestionCount: z.ZodOptional<z.ZodNumber>;
1799
+ lastError: z.ZodOptional<z.ZodString>;
1800
+ }, z.core.$strip>>>;
1801
+ autoDreamProfiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
1802
+ id: z.ZodString;
1803
+ name: z.ZodOptional<z.ZodString>;
1804
+ rootDirectory: z.ZodString;
1805
+ intervalMs: z.ZodNumber;
1806
+ enabled: z.ZodBoolean;
1807
+ nextRunAt: z.ZodNumber;
1808
+ status: z.ZodString;
1809
+ stage: z.ZodString;
1810
+ statusUpdatedAt: z.ZodNumber;
1811
+ lastRunAt: z.ZodOptional<z.ZodNumber>;
1812
+ lastMemoryFiles: z.ZodOptional<z.ZodNumber>;
1813
+ lastError: z.ZodOptional<z.ZodString>;
1814
+ }, z.core.$strip>>>;
1723
1815
  }, z.core.$strip>;
1724
1816
  type AutomationState = z.infer<typeof AutomationStateSchema>;
1725
1817
  declare const BriefMessageSchema: z.ZodObject<{
@@ -1817,6 +1909,7 @@ declare const DaemonStateSchema: z.ZodObject<{
1817
1909
  supervisor: "supervisor";
1818
1910
  webhook: "webhook";
1819
1911
  agent_loop: "agent_loop";
1912
+ task: "task";
1820
1913
  }>;
1821
1914
  status: z.ZodEnum<{
1822
1915
  completed: "completed";
@@ -1903,6 +1996,49 @@ declare const DaemonStateSchema: z.ZodObject<{
1903
1996
  guardianSessionId: z.ZodOptional<z.ZodString>;
1904
1997
  message: z.ZodOptional<z.ZodString>;
1905
1998
  }, z.core.$strip>>>;
1999
+ loops: z.ZodOptional<z.ZodArray<z.ZodObject<{
2000
+ id: z.ZodString;
2001
+ name: z.ZodOptional<z.ZodString>;
2002
+ directory: z.ZodString;
2003
+ enabled: z.ZodBoolean;
2004
+ intervalMs: z.ZodNumber;
2005
+ cronExpression: z.ZodOptional<z.ZodString>;
2006
+ iteration: z.ZodNumber;
2007
+ nextRunAt: z.ZodNumber;
2008
+ runtimeState: z.ZodString;
2009
+ phase: z.ZodString;
2010
+ lastTriggerSource: z.ZodOptional<z.ZodString>;
2011
+ lastBriefSummary: z.ZodOptional<z.ZodString>;
2012
+ lastError: z.ZodOptional<z.ZodString>;
2013
+ agent: z.ZodString;
2014
+ }, z.core.$strip>>>;
2015
+ bootstrapProfiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
2016
+ id: z.ZodString;
2017
+ name: z.ZodOptional<z.ZodString>;
2018
+ rootDirectory: z.ZodString;
2019
+ intervalMs: z.ZodNumber;
2020
+ enabled: z.ZodBoolean;
2021
+ status: z.ZodString;
2022
+ statusUpdatedAt: z.ZodNumber;
2023
+ lastRunAt: z.ZodOptional<z.ZodNumber>;
2024
+ lastRepoCount: z.ZodOptional<z.ZodNumber>;
2025
+ lastSuggestionCount: z.ZodOptional<z.ZodNumber>;
2026
+ lastError: z.ZodOptional<z.ZodString>;
2027
+ }, z.core.$strip>>>;
2028
+ autoDreamProfiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
2029
+ id: z.ZodString;
2030
+ name: z.ZodOptional<z.ZodString>;
2031
+ rootDirectory: z.ZodString;
2032
+ intervalMs: z.ZodNumber;
2033
+ enabled: z.ZodBoolean;
2034
+ nextRunAt: z.ZodNumber;
2035
+ status: z.ZodString;
2036
+ stage: z.ZodString;
2037
+ statusUpdatedAt: z.ZodNumber;
2038
+ lastRunAt: z.ZodOptional<z.ZodNumber>;
2039
+ lastMemoryFiles: z.ZodOptional<z.ZodNumber>;
2040
+ lastError: z.ZodOptional<z.ZodString>;
2041
+ }, z.core.$strip>>>;
1906
2042
  }, z.core.$strip>>;
1907
2043
  recentBriefs: z.ZodOptional<z.ZodArray<z.ZodObject<{
1908
2044
  loopId: z.ZodString;
@@ -1930,8 +2066,8 @@ declare const KnowledgeEntryTypeSchema: z.ZodEnum<{
1930
2066
  }>;
1931
2067
  type KnowledgeEntryType = z.infer<typeof KnowledgeEntryTypeSchema>;
1932
2068
  declare const KnowledgeContributorTypeSchema: z.ZodEnum<{
1933
- user: "user";
1934
2069
  session: "session";
2070
+ user: "user";
1935
2071
  supervisor: "supervisor";
1936
2072
  }>;
1937
2073
  type KnowledgeContributorType = z.infer<typeof KnowledgeContributorTypeSchema>;
@@ -1963,8 +2099,8 @@ declare const CreateKnowledgeEntryBodySchema: z.ZodObject<{
1963
2099
  warning: "warning";
1964
2100
  }>;
1965
2101
  contributorType: z.ZodEnum<{
1966
- user: "user";
1967
2102
  session: "session";
2103
+ user: "user";
1968
2104
  supervisor: "supervisor";
1969
2105
  }>;
1970
2106
  action: z.ZodEnum<{
@@ -2273,5 +2409,158 @@ declare const VoiceTokenResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2273
2409
  }, z.core.$strip>], "allowed">;
2274
2410
  type VoiceTokenResponse = z.infer<typeof VoiceTokenResponseSchema>;
2275
2411
 
2276
- export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, AutomationAuditEventSummarySchema, AutomationAuditStatsSchema, AutomationCountsSchema, AutomationGuardianSummarySchema, AutomationGuardianUsageSummarySchema, AutomationJobKindSchema, AutomationJobStatusSchema, AutomationJobSummarySchema, AutomationPrioritySchema, AutomationStateSchema, BriefMessageSchema, 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 };
2277
- export type { AgentMessage, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, AutomationAuditEventSummary, AutomationAuditStats, AutomationCounts, AutomationGuardianSummary, AutomationGuardianUsageSummary, AutomationJobKind, AutomationJobStatus, AutomationJobSummary, AutomationPriority, AutomationState, BriefMessage, 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 };
2412
+ declare const TaskPrioritySchema: z.ZodEnum<{
2413
+ user: "user";
2414
+ urgent: "urgent";
2415
+ background: "background";
2416
+ }>;
2417
+ type TaskPriority = z.infer<typeof TaskPrioritySchema>;
2418
+ declare const TaskStatusSchema: z.ZodEnum<{
2419
+ completed: "completed";
2420
+ failed: "failed";
2421
+ cancelled: "cancelled";
2422
+ running: "running";
2423
+ queued: "queued";
2424
+ dispatching: "dispatching";
2425
+ }>;
2426
+ type TaskStatus = z.infer<typeof TaskStatusSchema>;
2427
+ declare const TaskTriggerTypeSchema: z.ZodEnum<{
2428
+ webhook: "webhook";
2429
+ manual: "manual";
2430
+ cron: "cron";
2431
+ }>;
2432
+ type TaskTriggerType = z.infer<typeof TaskTriggerTypeSchema>;
2433
+ declare const TaskSummarySchema: z.ZodObject<{
2434
+ id: z.ZodString;
2435
+ projectId: z.ZodNullable<z.ZodString>;
2436
+ machineId: z.ZodString;
2437
+ priority: z.ZodEnum<{
2438
+ user: "user";
2439
+ urgent: "urgent";
2440
+ background: "background";
2441
+ }>;
2442
+ status: z.ZodEnum<{
2443
+ completed: "completed";
2444
+ failed: "failed";
2445
+ cancelled: "cancelled";
2446
+ running: "running";
2447
+ queued: "queued";
2448
+ dispatching: "dispatching";
2449
+ }>;
2450
+ triggerType: z.ZodEnum<{
2451
+ webhook: "webhook";
2452
+ manual: "manual";
2453
+ cron: "cron";
2454
+ }>;
2455
+ triggerRef: z.ZodOptional<z.ZodString>;
2456
+ attempt: z.ZodNumber;
2457
+ maxAttempts: z.ZodNumber;
2458
+ sessionId: z.ZodOptional<z.ZodString>;
2459
+ errorMessage: z.ZodOptional<z.ZodString>;
2460
+ dispatchedAt: z.ZodOptional<z.ZodNumber>;
2461
+ completedAt: z.ZodOptional<z.ZodNumber>;
2462
+ createdAt: z.ZodNumber;
2463
+ updatedAt: z.ZodNumber;
2464
+ promptPreview: z.ZodOptional<z.ZodString>;
2465
+ skillNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
2466
+ }, z.core.$strip>;
2467
+ type TaskSummary = z.infer<typeof TaskSummarySchema>;
2468
+ declare const CreateTaskBodySchema: z.ZodObject<{
2469
+ projectId: z.ZodOptional<z.ZodString>;
2470
+ machineId: z.ZodString;
2471
+ prompt: z.ZodString;
2472
+ priority: z.ZodDefault<z.ZodEnum<{
2473
+ user: "user";
2474
+ urgent: "urgent";
2475
+ background: "background";
2476
+ }>>;
2477
+ maxAttempts: z.ZodDefault<z.ZodNumber>;
2478
+ skillIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
2479
+ }, z.core.$strip>;
2480
+ type CreateTaskBody = z.infer<typeof CreateTaskBodySchema>;
2481
+ declare const TaskTriggerDataSchema: z.ZodObject<{
2482
+ type: z.ZodLiteral<"task-trigger">;
2483
+ taskId: z.ZodString;
2484
+ prompt: z.ZodString;
2485
+ directory: z.ZodString;
2486
+ priority: z.ZodEnum<{
2487
+ user: "user";
2488
+ urgent: "urgent";
2489
+ background: "background";
2490
+ }>;
2491
+ projectId: z.ZodOptional<z.ZodString>;
2492
+ skillContents: z.ZodOptional<z.ZodArray<z.ZodObject<{
2493
+ name: z.ZodString;
2494
+ content: z.ZodString;
2495
+ }, z.core.$strip>>>;
2496
+ }, z.core.$strip>;
2497
+ type TaskTriggerData = z.infer<typeof TaskTriggerDataSchema>;
2498
+ declare const TaskStatusReportSchema: z.ZodObject<{
2499
+ taskId: z.ZodString;
2500
+ status: z.ZodEnum<{
2501
+ completed: "completed";
2502
+ failed: "failed";
2503
+ cancelled: "cancelled";
2504
+ running: "running";
2505
+ queued: "queued";
2506
+ dispatching: "dispatching";
2507
+ }>;
2508
+ sessionId: z.ZodOptional<z.ZodString>;
2509
+ errorMessage: z.ZodOptional<z.ZodString>;
2510
+ }, z.core.$strip>;
2511
+ type TaskStatusReport = z.infer<typeof TaskStatusReportSchema>;
2512
+ declare const TaskStatusChangedSchema: z.ZodObject<{
2513
+ type: z.ZodLiteral<"task-status-changed">;
2514
+ taskId: z.ZodString;
2515
+ status: z.ZodEnum<{
2516
+ completed: "completed";
2517
+ failed: "failed";
2518
+ cancelled: "cancelled";
2519
+ running: "running";
2520
+ queued: "queued";
2521
+ dispatching: "dispatching";
2522
+ }>;
2523
+ sessionId: z.ZodOptional<z.ZodString>;
2524
+ errorMessage: z.ZodOptional<z.ZodString>;
2525
+ completedAt: z.ZodOptional<z.ZodNumber>;
2526
+ }, z.core.$strip>;
2527
+ type TaskStatusChanged = z.infer<typeof TaskStatusChangedSchema>;
2528
+
2529
+ declare const SkillSummarySchema: z.ZodObject<{
2530
+ id: z.ZodString;
2531
+ projectId: z.ZodNullable<z.ZodString>;
2532
+ name: z.ZodString;
2533
+ description: z.ZodOptional<z.ZodString>;
2534
+ content: z.ZodString;
2535
+ attachments: z.ZodArray<z.ZodString>;
2536
+ sourceKnowledgeId: z.ZodOptional<z.ZodString>;
2537
+ archived: z.ZodBoolean;
2538
+ createdAt: z.ZodNumber;
2539
+ updatedAt: z.ZodNumber;
2540
+ }, z.core.$strip>;
2541
+ type SkillSummary = z.infer<typeof SkillSummarySchema>;
2542
+ declare const CreateSkillBodySchema: z.ZodObject<{
2543
+ projectId: z.ZodOptional<z.ZodString>;
2544
+ name: z.ZodString;
2545
+ description: z.ZodOptional<z.ZodString>;
2546
+ content: z.ZodString;
2547
+ attachments: z.ZodDefault<z.ZodArray<z.ZodString>>;
2548
+ sourceKnowledgeId: z.ZodOptional<z.ZodString>;
2549
+ }, z.core.$strip>;
2550
+ type CreateSkillBody = z.infer<typeof CreateSkillBodySchema>;
2551
+ declare const UpdateSkillBodySchema: z.ZodObject<{
2552
+ name: z.ZodOptional<z.ZodString>;
2553
+ description: z.ZodOptional<z.ZodString>;
2554
+ content: z.ZodOptional<z.ZodString>;
2555
+ attachments: z.ZodOptional<z.ZodArray<z.ZodString>>;
2556
+ archived: z.ZodOptional<z.ZodBoolean>;
2557
+ }, z.core.$strip>;
2558
+ type UpdateSkillBody = z.infer<typeof UpdateSkillBodySchema>;
2559
+ declare const SkillContentSchema: z.ZodObject<{
2560
+ name: z.ZodString;
2561
+ content: z.ZodString;
2562
+ }, z.core.$strip>;
2563
+ type SkillContent = z.infer<typeof SkillContentSchema>;
2564
+
2565
+ export { AgentLoopSummarySchema, AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, AutoDreamProfileSummarySchema, AutomationAuditEventSummarySchema, AutomationAuditStatsSchema, AutomationCountsSchema, AutomationGuardianSummarySchema, AutomationGuardianUsageSummarySchema, AutomationJobKindSchema, AutomationJobStatusSchema, AutomationJobSummarySchema, AutomationPrioritySchema, AutomationStateSchema, BootstrapProfileSummarySchema, BriefMessageSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CreateSkillBodySchema, CreateTaskBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, DaemonStateSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, SkillContentSchema, SkillSummarySchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TaskPrioritySchema, TaskStatusChangedSchema, TaskStatusReportSchema, TaskStatusSchema, TaskSummarySchema, TaskTriggerDataSchema, TaskTriggerTypeSchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UpdateSkillBodySchema, 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 };
2566
+ export type { AgentLoopSummary, AgentMessage, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, AutoDreamProfileSummary, AutomationAuditEventSummary, AutomationAuditStats, AutomationCounts, AutomationGuardianSummary, AutomationGuardianUsageSummary, AutomationJobKind, AutomationJobStatus, AutomationJobSummary, AutomationPriority, AutomationState, BootstrapProfileSummary, BriefMessage, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, CreateKnowledgeEntryBody, CreateSkillBody, CreateTaskBody, 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, SkillContent, SkillSummary, TailscaleInfo, TailscaleServeEntry, TaskPriority, TaskStatus, TaskStatusChanged, TaskStatusReport, TaskSummary, TaskTriggerData, TaskTriggerType, TunnelEntry, TunnelProviderInfo, TunnelState, TurnKnowledgeExtraction, Update, UpdateBody, UpdateKnowledgeEntryBody, UpdateMachineBody, UpdateNewMessageBody, UpdateSessionBody, UpdateSkillBody, UserMessage, VersionedEncryptedValue, VersionedMachineEncryptedValue, VersionedNullableEncryptedValue, VoiceTokenResponse };
package/dist/index.mjs CHANGED
@@ -380,7 +380,7 @@ const TunnelStateSchema = z.object({
380
380
  providers: z.array(TunnelProviderInfoSchema)
381
381
  });
382
382
  const AutomationPrioritySchema = z.enum(["urgent", "user", "background"]);
383
- const AutomationJobKindSchema = z.enum(["supervisor", "webhook", "agent_loop"]);
383
+ const AutomationJobKindSchema = z.enum(["supervisor", "webhook", "agent_loop", "task"]);
384
384
  const AutomationJobStatusSchema = z.enum([
385
385
  "queued",
386
386
  "dispatching",
@@ -474,6 +474,49 @@ const AutomationCountsSchema = z.object({
474
474
  failed: z.number(),
475
475
  cancelled: z.number()
476
476
  });
477
+ const AgentLoopSummarySchema = z.object({
478
+ id: z.string(),
479
+ name: z.string().optional(),
480
+ directory: z.string(),
481
+ enabled: z.boolean(),
482
+ intervalMs: z.number(),
483
+ cronExpression: z.string().optional(),
484
+ iteration: z.number(),
485
+ nextRunAt: z.number(),
486
+ runtimeState: z.string(),
487
+ phase: z.string(),
488
+ lastTriggerSource: z.string().optional(),
489
+ lastBriefSummary: z.string().optional(),
490
+ lastError: z.string().optional(),
491
+ agent: z.string()
492
+ });
493
+ const BootstrapProfileSummarySchema = z.object({
494
+ id: z.string(),
495
+ name: z.string().optional(),
496
+ rootDirectory: z.string(),
497
+ intervalMs: z.number(),
498
+ enabled: z.boolean(),
499
+ status: z.string(),
500
+ statusUpdatedAt: z.number(),
501
+ lastRunAt: z.number().optional(),
502
+ lastRepoCount: z.number().optional(),
503
+ lastSuggestionCount: z.number().optional(),
504
+ lastError: z.string().optional()
505
+ });
506
+ const AutoDreamProfileSummarySchema = z.object({
507
+ id: z.string(),
508
+ name: z.string().optional(),
509
+ rootDirectory: z.string(),
510
+ intervalMs: z.number(),
511
+ enabled: z.boolean(),
512
+ nextRunAt: z.number(),
513
+ status: z.string(),
514
+ stage: z.string(),
515
+ statusUpdatedAt: z.number(),
516
+ lastRunAt: z.number().optional(),
517
+ lastMemoryFiles: z.number().optional(),
518
+ lastError: z.string().optional()
519
+ });
477
520
  const AutomationStateSchema = z.object({
478
521
  updatedAt: z.number(),
479
522
  counts: AutomationCountsSchema,
@@ -481,7 +524,10 @@ const AutomationStateSchema = z.object({
481
524
  guardians: z.array(AutomationGuardianSummarySchema).optional(),
482
525
  guardianUsage: z.array(AutomationGuardianUsageSummarySchema).optional(),
483
526
  auditStats: AutomationAuditStatsSchema.optional(),
484
- recentAuditEvents: z.array(AutomationAuditEventSummarySchema).optional()
527
+ recentAuditEvents: z.array(AutomationAuditEventSummarySchema).optional(),
528
+ loops: z.array(AgentLoopSummarySchema).optional(),
529
+ bootstrapProfiles: z.array(BootstrapProfileSummarySchema).optional(),
530
+ autoDreamProfiles: z.array(AutoDreamProfileSummarySchema).optional()
485
531
  });
486
532
  const BriefMessageSchema = z.object({
487
533
  loopId: z.string(),
@@ -695,4 +741,125 @@ const VoiceTokenResponseSchema = z.discriminatedUnion("allowed", [
695
741
  VoiceTokenDeniedSchema
696
742
  ]);
697
743
 
698
- export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, AutomationAuditEventSummarySchema, AutomationAuditStatsSchema, AutomationCountsSchema, AutomationGuardianSummarySchema, AutomationGuardianUsageSummarySchema, AutomationJobKindSchema, AutomationJobStatusSchema, AutomationJobSummarySchema, AutomationPrioritySchema, AutomationStateSchema, BriefMessageSchema, 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 };
744
+ const TaskPrioritySchema = z.enum([
745
+ "urgent",
746
+ // User-initiated, needs immediate execution
747
+ "user",
748
+ // Normal user-created task (default)
749
+ "background"
750
+ // Automated / scheduled tasks
751
+ ]);
752
+ const TaskStatusSchema = z.enum([
753
+ "queued",
754
+ // Waiting in queue
755
+ "dispatching",
756
+ // Being sent to CLI daemon
757
+ "running",
758
+ // Executing on CLI
759
+ "completed",
760
+ // Finished successfully
761
+ "failed",
762
+ // Execution failed
763
+ "cancelled"
764
+ // Cancelled by user
765
+ ]);
766
+ const TaskTriggerTypeSchema = z.enum([
767
+ "manual",
768
+ // Created from App by user
769
+ "cron",
770
+ // Created by TriggerSchedule
771
+ "webhook"
772
+ // Created by WebhookTrigger
773
+ ]);
774
+ const TaskSummarySchema = z.object({
775
+ id: z.string(),
776
+ projectId: z.string().nullable(),
777
+ machineId: z.string(),
778
+ priority: TaskPrioritySchema,
779
+ status: TaskStatusSchema,
780
+ triggerType: TaskTriggerTypeSchema,
781
+ triggerRef: z.string().optional(),
782
+ attempt: z.number(),
783
+ maxAttempts: z.number(),
784
+ sessionId: z.string().optional(),
785
+ errorMessage: z.string().optional(),
786
+ dispatchedAt: z.number().optional(),
787
+ completedAt: z.number().optional(),
788
+ createdAt: z.number(),
789
+ updatedAt: z.number(),
790
+ // Encrypted prompt preview (first 100 chars)
791
+ promptPreview: z.string().optional(),
792
+ // Names of bound skills for display
793
+ skillNames: z.array(z.string()).optional()
794
+ });
795
+ const CreateTaskBodySchema = z.object({
796
+ projectId: z.string().optional(),
797
+ machineId: z.string(),
798
+ prompt: z.string().min(1),
799
+ // Encrypted by App
800
+ priority: TaskPrioritySchema.default("user"),
801
+ maxAttempts: z.number().int().min(1).max(10).default(3),
802
+ skillIds: z.array(z.string()).max(10).default([])
803
+ });
804
+ const TaskTriggerDataSchema = z.object({
805
+ type: z.literal("task-trigger"),
806
+ taskId: z.string(),
807
+ prompt: z.string(),
808
+ // Encrypted prompt
809
+ directory: z.string(),
810
+ // Project directory on machine
811
+ priority: TaskPrioritySchema,
812
+ projectId: z.string().optional(),
813
+ skillContents: z.array(z.object({
814
+ name: z.string(),
815
+ content: z.string()
816
+ })).optional()
817
+ });
818
+ const TaskStatusReportSchema = z.object({
819
+ taskId: z.string(),
820
+ status: TaskStatusSchema,
821
+ sessionId: z.string().optional(),
822
+ errorMessage: z.string().optional()
823
+ });
824
+ const TaskStatusChangedSchema = z.object({
825
+ type: z.literal("task-status-changed"),
826
+ taskId: z.string(),
827
+ status: TaskStatusSchema,
828
+ sessionId: z.string().optional(),
829
+ errorMessage: z.string().optional(),
830
+ completedAt: z.number().optional()
831
+ });
832
+
833
+ const SkillSummarySchema = z.object({
834
+ id: z.string(),
835
+ projectId: z.string().nullable(),
836
+ name: z.string(),
837
+ description: z.string().optional(),
838
+ content: z.string(),
839
+ attachments: z.array(z.string()),
840
+ sourceKnowledgeId: z.string().optional(),
841
+ archived: z.boolean(),
842
+ createdAt: z.number(),
843
+ updatedAt: z.number()
844
+ });
845
+ const CreateSkillBodySchema = z.object({
846
+ projectId: z.string().optional(),
847
+ name: z.string().min(1).max(100),
848
+ description: z.string().max(500).optional(),
849
+ content: z.string().min(1).max(5e4),
850
+ attachments: z.array(z.string()).max(10).default([]),
851
+ sourceKnowledgeId: z.string().optional()
852
+ });
853
+ const UpdateSkillBodySchema = z.object({
854
+ name: z.string().min(1).max(100).optional(),
855
+ description: z.string().max(500).optional(),
856
+ content: z.string().min(1).max(5e4).optional(),
857
+ attachments: z.array(z.string()).max(10).optional(),
858
+ archived: z.boolean().optional()
859
+ });
860
+ const SkillContentSchema = z.object({
861
+ name: z.string(),
862
+ content: z.string()
863
+ });
864
+
865
+ export { AgentLoopSummarySchema, AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, AutoDreamProfileSummarySchema, AutomationAuditEventSummarySchema, AutomationAuditStatsSchema, AutomationCountsSchema, AutomationGuardianSummarySchema, AutomationGuardianUsageSummarySchema, AutomationJobKindSchema, AutomationJobStatusSchema, AutomationJobSummarySchema, AutomationPrioritySchema, AutomationStateSchema, BootstrapProfileSummarySchema, BriefMessageSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CreateSkillBodySchema, CreateTaskBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, DaemonStateSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, SkillContentSchema, SkillSummarySchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TaskPrioritySchema, TaskStatusChangedSchema, TaskStatusReportSchema, TaskStatusSchema, TaskSummarySchema, TaskTriggerDataSchema, TaskTriggerTypeSchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UpdateSkillBodySchema, 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.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "Shared message wire types and Zod schemas for Happy clients and services",
5
5
  "author": "kmmao",
6
6
  "license": "MIT",