@kmmao/happy-wire 0.9.1 → 0.10.0
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 +277 -2
- package/dist/index.d.cts +432 -4
- package/dist/index.d.mts +432 -4
- package/dist/index.mjs +254 -3
- package/package.json +1 -1
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,218 @@ 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
|
+
const InboxCategorySchema = z__namespace.enum([
|
|
887
|
+
"task",
|
|
888
|
+
// Task queue events (completed, failed, cancelled)
|
|
889
|
+
"trigger",
|
|
890
|
+
// Cron/webhook trigger fired
|
|
891
|
+
"supervisor",
|
|
892
|
+
// Supervisor run results
|
|
893
|
+
"session",
|
|
894
|
+
// Session lifecycle events
|
|
895
|
+
"knowledge",
|
|
896
|
+
// Knowledge base changes
|
|
897
|
+
"system"
|
|
898
|
+
// System notifications
|
|
899
|
+
]);
|
|
900
|
+
const InboxSeveritySchema = z__namespace.enum([
|
|
901
|
+
"info",
|
|
902
|
+
"warning",
|
|
903
|
+
"error"
|
|
904
|
+
]);
|
|
905
|
+
const InboxItemSummarySchema = z__namespace.object({
|
|
906
|
+
id: z__namespace.string(),
|
|
907
|
+
category: InboxCategorySchema,
|
|
908
|
+
eventType: z__namespace.string(),
|
|
909
|
+
// e.g. "task.completed", "trigger.cron.fired"
|
|
910
|
+
severity: InboxSeveritySchema,
|
|
911
|
+
title: z__namespace.string(),
|
|
912
|
+
body: z__namespace.string().optional(),
|
|
913
|
+
read: z__namespace.boolean(),
|
|
914
|
+
referenceUrl: z__namespace.string().optional(),
|
|
915
|
+
// Deep link, e.g. "/machine/xxx/tasks"
|
|
916
|
+
refType: z__namespace.string().optional(),
|
|
917
|
+
// Polymorphic ref: "task" | "trigger" | "session" | ...
|
|
918
|
+
refId: z__namespace.string().optional(),
|
|
919
|
+
// ID of referenced entity
|
|
920
|
+
groupKey: z__namespace.string().optional(),
|
|
921
|
+
// Dedup key (same source within 1h → skip)
|
|
922
|
+
createdAt: z__namespace.number()
|
|
923
|
+
});
|
|
924
|
+
const InboxNewItemSchema = z__namespace.object({
|
|
925
|
+
type: z__namespace.literal("inbox-new-item"),
|
|
926
|
+
item: InboxItemSummarySchema
|
|
927
|
+
});
|
|
928
|
+
const InboxUnreadCountSchema = z__namespace.object({
|
|
929
|
+
type: z__namespace.literal("inbox-unread-count"),
|
|
930
|
+
count: z__namespace.number()
|
|
931
|
+
});
|
|
932
|
+
|
|
933
|
+
const SessionEventTypeSchema = z__namespace.enum([
|
|
934
|
+
"file_edit",
|
|
935
|
+
// File created/modified/deleted
|
|
936
|
+
"bash_command",
|
|
937
|
+
// Shell command executed
|
|
938
|
+
"tool_call",
|
|
939
|
+
// Tool invocation (Read, Grep, etc.)
|
|
940
|
+
"git_operation",
|
|
941
|
+
// Git commit, push, branch, etc.
|
|
942
|
+
"error",
|
|
943
|
+
// Error occurred during session
|
|
944
|
+
"session_start",
|
|
945
|
+
// Session started
|
|
946
|
+
"session_end"
|
|
947
|
+
// Session ended
|
|
948
|
+
]);
|
|
949
|
+
const SessionEventSummarySchema = z__namespace.object({
|
|
950
|
+
id: z__namespace.string(),
|
|
951
|
+
sessionId: z__namespace.string(),
|
|
952
|
+
eventType: SessionEventTypeSchema,
|
|
953
|
+
summary: z__namespace.string(),
|
|
954
|
+
// Human-readable one-liner
|
|
955
|
+
detail: z__namespace.record(z__namespace.string(), z__namespace.unknown()).optional(),
|
|
956
|
+
// Structured metadata (JSON)
|
|
957
|
+
createdAt: z__namespace.number()
|
|
958
|
+
});
|
|
959
|
+
const SessionEventReportSchema = z__namespace.object({
|
|
960
|
+
sessionId: z__namespace.string(),
|
|
961
|
+
eventType: SessionEventTypeSchema,
|
|
962
|
+
summary: z__namespace.string().max(500),
|
|
963
|
+
detail: z__namespace.record(z__namespace.string(), z__namespace.unknown()).optional()
|
|
964
|
+
});
|
|
965
|
+
const SessionEventCreatedSchema = z__namespace.object({
|
|
966
|
+
type: z__namespace.literal("session-event-created"),
|
|
967
|
+
event: SessionEventSummarySchema
|
|
968
|
+
});
|
|
969
|
+
|
|
970
|
+
exports.AgentLoopSummarySchema = AgentLoopSummarySchema;
|
|
719
971
|
exports.AgentMessageSchema = AgentMessageSchema;
|
|
720
972
|
exports.ApiMessageSchema = ApiMessageSchema;
|
|
721
973
|
exports.ApiUpdateMachineStateSchema = ApiUpdateMachineStateSchema;
|
|
722
974
|
exports.ApiUpdateNewMessageSchema = ApiUpdateNewMessageSchema;
|
|
723
975
|
exports.ApiUpdateSessionStateSchema = ApiUpdateSessionStateSchema;
|
|
976
|
+
exports.AutoDreamProfileSummarySchema = AutoDreamProfileSummarySchema;
|
|
724
977
|
exports.AutomationAuditEventSummarySchema = AutomationAuditEventSummarySchema;
|
|
725
978
|
exports.AutomationAuditStatsSchema = AutomationAuditStatsSchema;
|
|
726
979
|
exports.AutomationCountsSchema = AutomationCountsSchema;
|
|
@@ -731,13 +984,21 @@ exports.AutomationJobStatusSchema = AutomationJobStatusSchema;
|
|
|
731
984
|
exports.AutomationJobSummarySchema = AutomationJobSummarySchema;
|
|
732
985
|
exports.AutomationPrioritySchema = AutomationPrioritySchema;
|
|
733
986
|
exports.AutomationStateSchema = AutomationStateSchema;
|
|
987
|
+
exports.BootstrapProfileSummarySchema = BootstrapProfileSummarySchema;
|
|
734
988
|
exports.BriefMessageSchema = BriefMessageSchema;
|
|
735
989
|
exports.CoreUpdateBodySchema = CoreUpdateBodySchema;
|
|
736
990
|
exports.CoreUpdateContainerSchema = CoreUpdateContainerSchema;
|
|
737
991
|
exports.CreateKnowledgeEntryBodySchema = CreateKnowledgeEntryBodySchema;
|
|
992
|
+
exports.CreateSkillBodySchema = CreateSkillBodySchema;
|
|
993
|
+
exports.CreateTaskBodySchema = CreateTaskBodySchema;
|
|
738
994
|
exports.CrossProjectSearchResponseSchema = CrossProjectSearchResponseSchema;
|
|
739
995
|
exports.CrossProjectSearchResultSchema = CrossProjectSearchResultSchema;
|
|
740
996
|
exports.DaemonStateSchema = DaemonStateSchema;
|
|
997
|
+
exports.InboxCategorySchema = InboxCategorySchema;
|
|
998
|
+
exports.InboxItemSummarySchema = InboxItemSummarySchema;
|
|
999
|
+
exports.InboxNewItemSchema = InboxNewItemSchema;
|
|
1000
|
+
exports.InboxSeveritySchema = InboxSeveritySchema;
|
|
1001
|
+
exports.InboxUnreadCountSchema = InboxUnreadCountSchema;
|
|
741
1002
|
exports.KnowledgeActionSchema = KnowledgeActionSchema;
|
|
742
1003
|
exports.KnowledgeChainEntrySchema = KnowledgeChainEntrySchema;
|
|
743
1004
|
exports.KnowledgeChainRelationSchema = KnowledgeChainRelationSchema;
|
|
@@ -755,11 +1016,24 @@ exports.MessageContentSchema = MessageContentSchema;
|
|
|
755
1016
|
exports.MessageMetaSchema = MessageMetaSchema;
|
|
756
1017
|
exports.ProjectProfileSchema = ProjectProfileSchema;
|
|
757
1018
|
exports.QueryKnowledgeParamsSchema = QueryKnowledgeParamsSchema;
|
|
1019
|
+
exports.SessionEventCreatedSchema = SessionEventCreatedSchema;
|
|
1020
|
+
exports.SessionEventReportSchema = SessionEventReportSchema;
|
|
1021
|
+
exports.SessionEventSummarySchema = SessionEventSummarySchema;
|
|
1022
|
+
exports.SessionEventTypeSchema = SessionEventTypeSchema;
|
|
758
1023
|
exports.SessionMessageContentSchema = SessionMessageContentSchema;
|
|
759
1024
|
exports.SessionMessageSchema = SessionMessageSchema;
|
|
760
1025
|
exports.SessionProtocolMessageSchema = SessionProtocolMessageSchema;
|
|
1026
|
+
exports.SkillContentSchema = SkillContentSchema;
|
|
1027
|
+
exports.SkillSummarySchema = SkillSummarySchema;
|
|
761
1028
|
exports.TailscaleInfoSchema = TailscaleInfoSchema;
|
|
762
1029
|
exports.TailscaleServeEntrySchema = TailscaleServeEntrySchema;
|
|
1030
|
+
exports.TaskPrioritySchema = TaskPrioritySchema;
|
|
1031
|
+
exports.TaskStatusChangedSchema = TaskStatusChangedSchema;
|
|
1032
|
+
exports.TaskStatusReportSchema = TaskStatusReportSchema;
|
|
1033
|
+
exports.TaskStatusSchema = TaskStatusSchema;
|
|
1034
|
+
exports.TaskSummarySchema = TaskSummarySchema;
|
|
1035
|
+
exports.TaskTriggerDataSchema = TaskTriggerDataSchema;
|
|
1036
|
+
exports.TaskTriggerTypeSchema = TaskTriggerTypeSchema;
|
|
763
1037
|
exports.TunnelEntrySchema = TunnelEntrySchema;
|
|
764
1038
|
exports.TunnelProviderInfoSchema = TunnelProviderInfoSchema;
|
|
765
1039
|
exports.TunnelStateSchema = TunnelStateSchema;
|
|
@@ -770,6 +1044,7 @@ exports.UpdateMachineBodySchema = UpdateMachineBodySchema;
|
|
|
770
1044
|
exports.UpdateNewMessageBodySchema = UpdateNewMessageBodySchema;
|
|
771
1045
|
exports.UpdateSchema = UpdateSchema;
|
|
772
1046
|
exports.UpdateSessionBodySchema = UpdateSessionBodySchema;
|
|
1047
|
+
exports.UpdateSkillBodySchema = UpdateSkillBodySchema;
|
|
773
1048
|
exports.UserMessageSchema = UserMessageSchema;
|
|
774
1049
|
exports.VersionedEncryptedValueSchema = VersionedEncryptedValueSchema;
|
|
775
1050
|
exports.VersionedMachineEncryptedValueSchema = VersionedMachineEncryptedValueSchema;
|