agentix-cli 0.71.0 → 0.73.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.
Files changed (123) hide show
  1. package/dist/{App-PRD5JNO4.js → App-LXQUWRY6.js} +2 -2
  2. package/dist/{ChatApp-BKS6OJ3L.js → ChatApp-PCVXNFEJ.js} +2 -2
  3. package/dist/{agent-QF2JQ72Z.js → agent-AJOPKBST.js} +2 -2
  4. package/dist/{board-dashboard-AROMOAKS.js → board-dashboard-A56FT4U6.js} +576 -219
  5. package/dist/board-dashboard-A56FT4U6.js.map +1 -0
  6. package/dist/chunk-5QCFJ5GO.js +156 -0
  7. package/dist/chunk-5QCFJ5GO.js.map +1 -0
  8. package/dist/{chunk-AAA6NGY5.js → chunk-6AUW7HPX.js} +2 -2
  9. package/dist/{chunk-JBVABB26.js → chunk-73MVBAFG.js} +2 -2
  10. package/dist/chunk-7XB2CVC3.js +2 -0
  11. package/dist/chunk-7XB2CVC3.js.map +1 -0
  12. package/dist/{chunk-XJQNIFZ4.js → chunk-B45SJSFP.js} +2 -2
  13. package/dist/{chunk-IK2XG65P.js → chunk-C555JABY.js} +2 -2
  14. package/dist/{chunk-4XBYHKYG.js → chunk-D5BPN3JR.js} +2 -2
  15. package/dist/{chunk-HXW4NAWF.js → chunk-GULZIVVA.js} +2 -2
  16. package/dist/{chunk-BO4WLXXC.js → chunk-JKGWQNUL.js} +2 -2
  17. package/dist/{chunk-EMRQ6W5J.js → chunk-L43CVWCL.js} +2 -2
  18. package/dist/chunk-MQ5SG3VF.js +15 -0
  19. package/dist/chunk-MQ5SG3VF.js.map +1 -0
  20. package/dist/chunk-MYVHVJWZ.js +2 -0
  21. package/dist/chunk-MYVHVJWZ.js.map +1 -0
  22. package/dist/{chunk-SFWA67GQ.js → chunk-PHG5FJOC.js} +2 -2
  23. package/dist/{chunk-OTMDMGHE.js → chunk-PNTFOROF.js} +65 -65
  24. package/dist/chunk-PNTFOROF.js.map +1 -0
  25. package/dist/{chunk-DJMUP6TK.js → chunk-PVNDAEWC.js} +2 -2
  26. package/dist/{chunk-6LTD7XL5.js → chunk-RF3HJHFP.js} +2 -2
  27. package/dist/{chunk-RCKICCTT.js → chunk-RR2P5FLW.js} +2 -2
  28. package/dist/{chunk-K6CHA6JJ.js → chunk-U75OD25W.js} +2 -2
  29. package/dist/{chunk-3C2SQDIH.js → chunk-UXH6IX7V.js} +251 -224
  30. package/dist/chunk-UXH6IX7V.js.map +1 -0
  31. package/dist/{chunk-5Y7QRFSL.js → chunk-WMGB25WL.js} +2 -2
  32. package/dist/{chunk-WLX4766Y.js → chunk-XBLL3T2F.js} +2 -2
  33. package/dist/{chunk-MT3BD6WG.js → chunk-XN4ZOLVQ.js} +186 -183
  34. package/dist/chunk-XN4ZOLVQ.js.map +1 -0
  35. package/dist/{chunk-SELIVR6U.js → chunk-Y2425AFZ.js} +2 -2
  36. package/dist/{chunk-D233M73Q.js → chunk-ZSIWNIUK.js} +2 -2
  37. package/dist/cli.js +1 -1
  38. package/dist/cli.js.map +1 -1
  39. package/dist/client-V7YJR55E.js +2 -0
  40. package/dist/{config-UY5K6SCL.js → config-HI4ECCSU.js} +2 -2
  41. package/dist/config-mutator-OHXSKALT.js +2 -0
  42. package/dist/doctor-IAY3GUHJ.js +2 -0
  43. package/dist/{facts-X44PF73W.js → facts-2K6UX5GD.js} +6 -6
  44. package/dist/facts-2K6UX5GD.js.map +1 -0
  45. package/dist/index.d.ts +296 -17
  46. package/dist/index.js +1 -1
  47. package/dist/index.js.map +1 -1
  48. package/dist/opencode-launch-ECMEY2QZ.js +2 -0
  49. package/dist/opencode-launch-ECMEY2QZ.js.map +1 -0
  50. package/dist/opencode-process-ENS4MXHM.js +2 -0
  51. package/dist/program-IQVDNQS6.js +2 -0
  52. package/dist/{promote-YLKNYYIU.js → promote-PWUCBE57.js} +2 -2
  53. package/dist/{query-CVRXEG43.js → query-U6QKWGAG.js} +2 -2
  54. package/dist/registry-SYY47NXH.js +2 -0
  55. package/dist/{request-planner-76NCBYBW.js → request-planner-BXU5GECQ.js} +2 -2
  56. package/dist/{review-candidates-ZUXMX6BJ.js → review-candidates-TVVYKJ2K.js} +2 -2
  57. package/dist/{routing-EIGWDKH7.js → routing-O2WE73C7.js} +2 -2
  58. package/dist/schedule-tool-5CSP47M4.js +2 -0
  59. package/dist/scheduler-FBG6Q5L7.js +2 -0
  60. package/dist/{seat-QOY6FA4N.js → seat-OR5IXRA5.js} +2 -2
  61. package/dist/{select-JHKHO5BO.js → select-LN4TSDRS.js} +2 -2
  62. package/dist/{set-enabled-DVJIUOKX.js → set-enabled-6H3YQOVB.js} +2 -2
  63. package/dist/{tool-WKSLNQ6H.js → tool-U4PSEWS2.js} +2 -2
  64. package/dist/wiki-YQFIR7HR.js +2 -0
  65. package/dist/wiki-YQFIR7HR.js.map +1 -0
  66. package/package.json +1 -1
  67. package/dist/board-dashboard-AROMOAKS.js.map +0 -1
  68. package/dist/chunk-3C2SQDIH.js.map +0 -1
  69. package/dist/chunk-AHOGFVHA.js +0 -15
  70. package/dist/chunk-AHOGFVHA.js.map +0 -1
  71. package/dist/chunk-JU67IZLC.js +0 -131
  72. package/dist/chunk-JU67IZLC.js.map +0 -1
  73. package/dist/chunk-MT3BD6WG.js.map +0 -1
  74. package/dist/chunk-NMFXY3QU.js +0 -2
  75. package/dist/chunk-NMFXY3QU.js.map +0 -1
  76. package/dist/chunk-OTMDMGHE.js.map +0 -1
  77. package/dist/client-UPBQVXYM.js +0 -2
  78. package/dist/config-mutator-7KOSRAQF.js +0 -2
  79. package/dist/doctor-GFPSIJGB.js +0 -2
  80. package/dist/facts-X44PF73W.js.map +0 -1
  81. package/dist/program-XMGZOYX3.js +0 -2
  82. package/dist/registry-HZL363TA.js +0 -2
  83. package/dist/schedule-tool-PSZMP7C4.js +0 -2
  84. package/dist/scheduler-S24PXNB6.js +0 -2
  85. package/dist/wiki-PTXUMSIR.js +0 -2
  86. /package/dist/{App-PRD5JNO4.js.map → App-LXQUWRY6.js.map} +0 -0
  87. /package/dist/{ChatApp-BKS6OJ3L.js.map → ChatApp-PCVXNFEJ.js.map} +0 -0
  88. /package/dist/{agent-QF2JQ72Z.js.map → agent-AJOPKBST.js.map} +0 -0
  89. /package/dist/{chunk-AAA6NGY5.js.map → chunk-6AUW7HPX.js.map} +0 -0
  90. /package/dist/{chunk-JBVABB26.js.map → chunk-73MVBAFG.js.map} +0 -0
  91. /package/dist/{chunk-XJQNIFZ4.js.map → chunk-B45SJSFP.js.map} +0 -0
  92. /package/dist/{chunk-IK2XG65P.js.map → chunk-C555JABY.js.map} +0 -0
  93. /package/dist/{chunk-4XBYHKYG.js.map → chunk-D5BPN3JR.js.map} +0 -0
  94. /package/dist/{chunk-HXW4NAWF.js.map → chunk-GULZIVVA.js.map} +0 -0
  95. /package/dist/{chunk-BO4WLXXC.js.map → chunk-JKGWQNUL.js.map} +0 -0
  96. /package/dist/{chunk-EMRQ6W5J.js.map → chunk-L43CVWCL.js.map} +0 -0
  97. /package/dist/{chunk-SFWA67GQ.js.map → chunk-PHG5FJOC.js.map} +0 -0
  98. /package/dist/{chunk-DJMUP6TK.js.map → chunk-PVNDAEWC.js.map} +0 -0
  99. /package/dist/{chunk-6LTD7XL5.js.map → chunk-RF3HJHFP.js.map} +0 -0
  100. /package/dist/{chunk-RCKICCTT.js.map → chunk-RR2P5FLW.js.map} +0 -0
  101. /package/dist/{chunk-K6CHA6JJ.js.map → chunk-U75OD25W.js.map} +0 -0
  102. /package/dist/{chunk-5Y7QRFSL.js.map → chunk-WMGB25WL.js.map} +0 -0
  103. /package/dist/{chunk-WLX4766Y.js.map → chunk-XBLL3T2F.js.map} +0 -0
  104. /package/dist/{chunk-SELIVR6U.js.map → chunk-Y2425AFZ.js.map} +0 -0
  105. /package/dist/{chunk-D233M73Q.js.map → chunk-ZSIWNIUK.js.map} +0 -0
  106. /package/dist/{client-UPBQVXYM.js.map → client-V7YJR55E.js.map} +0 -0
  107. /package/dist/{config-UY5K6SCL.js.map → config-HI4ECCSU.js.map} +0 -0
  108. /package/dist/{config-mutator-7KOSRAQF.js.map → config-mutator-OHXSKALT.js.map} +0 -0
  109. /package/dist/{doctor-GFPSIJGB.js.map → doctor-IAY3GUHJ.js.map} +0 -0
  110. /package/dist/{program-XMGZOYX3.js.map → opencode-process-ENS4MXHM.js.map} +0 -0
  111. /package/dist/{promote-YLKNYYIU.js.map → program-IQVDNQS6.js.map} +0 -0
  112. /package/dist/{query-CVRXEG43.js.map → promote-PWUCBE57.js.map} +0 -0
  113. /package/dist/{registry-HZL363TA.js.map → query-U6QKWGAG.js.map} +0 -0
  114. /package/dist/{routing-EIGWDKH7.js.map → registry-SYY47NXH.js.map} +0 -0
  115. /package/dist/{request-planner-76NCBYBW.js.map → request-planner-BXU5GECQ.js.map} +0 -0
  116. /package/dist/{review-candidates-ZUXMX6BJ.js.map → review-candidates-TVVYKJ2K.js.map} +0 -0
  117. /package/dist/{schedule-tool-PSZMP7C4.js.map → routing-O2WE73C7.js.map} +0 -0
  118. /package/dist/{scheduler-S24PXNB6.js.map → schedule-tool-5CSP47M4.js.map} +0 -0
  119. /package/dist/{seat-QOY6FA4N.js.map → scheduler-FBG6Q5L7.js.map} +0 -0
  120. /package/dist/{wiki-PTXUMSIR.js.map → seat-OR5IXRA5.js.map} +0 -0
  121. /package/dist/{select-JHKHO5BO.js.map → select-LN4TSDRS.js.map} +0 -0
  122. /package/dist/{set-enabled-DVJIUOKX.js.map → set-enabled-6H3YQOVB.js.map} +0 -0
  123. /package/dist/{tool-WKSLNQ6H.js.map → tool-U4PSEWS2.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -1767,6 +1767,10 @@ declare const agentConfigSchema: z.ZodObject<{
1767
1767
  /** See systemVoiceSchema. Unset: one is assigned, of the agent's
1768
1768
  * gender when set, different from every other agent's. */
1769
1769
  system: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
1770
+ /** Voices to try, in order, when `system` names one that is not
1771
+ * installed (e.g. ["Ava (Premium)", "Allison"]). Unset, or none
1772
+ * installed: the best installed voice of its language and gender. */
1773
+ fallbacks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1770
1774
  elevenlabsVoiceId: z.ZodOptional<z.ZodString>;
1771
1775
  gender: z.ZodOptional<z.ZodEnum<["female", "male", "neutral"]>>;
1772
1776
  /** A few words on manner, e.g. "warm, upbeat, a little playful". */
@@ -1790,6 +1794,7 @@ declare const agentConfigSchema: z.ZodObject<{
1790
1794
  provider?: "system" | "elevenlabs" | undefined;
1791
1795
  style?: string | undefined;
1792
1796
  priority?: "high" | "normal" | "low" | undefined;
1797
+ fallbacks?: string[] | undefined;
1793
1798
  elevenlabsVoiceId?: string | undefined;
1794
1799
  gender?: "neutral" | "female" | "male" | undefined;
1795
1800
  intro?: string | undefined;
@@ -1801,6 +1806,7 @@ declare const agentConfigSchema: z.ZodObject<{
1801
1806
  provider?: "system" | "elevenlabs" | undefined;
1802
1807
  style?: string | undefined;
1803
1808
  priority?: "high" | "normal" | "low" | undefined;
1809
+ fallbacks?: string[] | undefined;
1804
1810
  elevenlabsVoiceId?: string | undefined;
1805
1811
  gender?: "neutral" | "female" | "male" | undefined;
1806
1812
  intro?: string | undefined;
@@ -1908,6 +1914,7 @@ declare const agentConfigSchema: z.ZodObject<{
1908
1914
  provider?: "system" | "elevenlabs" | undefined;
1909
1915
  style?: string | undefined;
1910
1916
  priority?: "high" | "normal" | "low" | undefined;
1917
+ fallbacks?: string[] | undefined;
1911
1918
  elevenlabsVoiceId?: string | undefined;
1912
1919
  gender?: "neutral" | "female" | "male" | undefined;
1913
1920
  intro?: string | undefined;
@@ -1993,6 +2000,7 @@ declare const agentConfigSchema: z.ZodObject<{
1993
2000
  provider?: "system" | "elevenlabs" | undefined;
1994
2001
  style?: string | undefined;
1995
2002
  priority?: "high" | "normal" | "low" | undefined;
2003
+ fallbacks?: string[] | undefined;
1996
2004
  elevenlabsVoiceId?: string | undefined;
1997
2005
  gender?: "neutral" | "female" | "male" | undefined;
1998
2006
  intro?: string | undefined;
@@ -2568,6 +2576,10 @@ declare const daemonConfigSchema: z.ZodObject<{
2568
2576
  /** See systemVoiceSchema. Unset: one is assigned, of the agent's
2569
2577
  * gender when set, different from every other agent's. */
2570
2578
  system: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
2579
+ /** Voices to try, in order, when `system` names one that is not
2580
+ * installed (e.g. ["Ava (Premium)", "Allison"]). Unset, or none
2581
+ * installed: the best installed voice of its language and gender. */
2582
+ fallbacks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2571
2583
  elevenlabsVoiceId: z.ZodOptional<z.ZodString>;
2572
2584
  gender: z.ZodOptional<z.ZodEnum<["female", "male", "neutral"]>>;
2573
2585
  /** A few words on manner, e.g. "warm, upbeat, a little playful". */
@@ -2591,6 +2603,7 @@ declare const daemonConfigSchema: z.ZodObject<{
2591
2603
  provider?: "system" | "elevenlabs" | undefined;
2592
2604
  style?: string | undefined;
2593
2605
  priority?: "high" | "normal" | "low" | undefined;
2606
+ fallbacks?: string[] | undefined;
2594
2607
  elevenlabsVoiceId?: string | undefined;
2595
2608
  gender?: "neutral" | "female" | "male" | undefined;
2596
2609
  intro?: string | undefined;
@@ -2602,6 +2615,7 @@ declare const daemonConfigSchema: z.ZodObject<{
2602
2615
  provider?: "system" | "elevenlabs" | undefined;
2603
2616
  style?: string | undefined;
2604
2617
  priority?: "high" | "normal" | "low" | undefined;
2618
+ fallbacks?: string[] | undefined;
2605
2619
  elevenlabsVoiceId?: string | undefined;
2606
2620
  gender?: "neutral" | "female" | "male" | undefined;
2607
2621
  intro?: string | undefined;
@@ -2709,6 +2723,7 @@ declare const daemonConfigSchema: z.ZodObject<{
2709
2723
  provider?: "system" | "elevenlabs" | undefined;
2710
2724
  style?: string | undefined;
2711
2725
  priority?: "high" | "normal" | "low" | undefined;
2726
+ fallbacks?: string[] | undefined;
2712
2727
  elevenlabsVoiceId?: string | undefined;
2713
2728
  gender?: "neutral" | "female" | "male" | undefined;
2714
2729
  intro?: string | undefined;
@@ -2794,6 +2809,7 @@ declare const daemonConfigSchema: z.ZodObject<{
2794
2809
  provider?: "system" | "elevenlabs" | undefined;
2795
2810
  style?: string | undefined;
2796
2811
  priority?: "high" | "normal" | "low" | undefined;
2812
+ fallbacks?: string[] | undefined;
2797
2813
  elevenlabsVoiceId?: string | undefined;
2798
2814
  gender?: "neutral" | "female" | "male" | undefined;
2799
2815
  intro?: string | undefined;
@@ -3377,6 +3393,25 @@ declare const daemonConfigSchema: z.ZodObject<{
3377
3393
  } | undefined;
3378
3394
  maxCallMinutes?: number | undefined;
3379
3395
  }>>;
3396
+ /** The phone app's Share camera (#325). The phone asks for this size and
3397
+ * rate; the browser picks the nearest the camera supports. The share
3398
+ * stops by itself after maxSeconds. */
3399
+ camera: z.ZodDefault<z.ZodObject<{
3400
+ width: z.ZodDefault<z.ZodNumber>;
3401
+ height: z.ZodDefault<z.ZodNumber>;
3402
+ frameRate: z.ZodDefault<z.ZodNumber>;
3403
+ maxSeconds: z.ZodDefault<z.ZodNumber>;
3404
+ }, "strip", z.ZodTypeAny, {
3405
+ width: number;
3406
+ height: number;
3407
+ frameRate: number;
3408
+ maxSeconds: number;
3409
+ }, {
3410
+ width?: number | undefined;
3411
+ height?: number | undefined;
3412
+ frameRate?: number | undefined;
3413
+ maxSeconds?: number | undefined;
3414
+ }>>;
3380
3415
  }, "strip", z.ZodTypeAny, {
3381
3416
  enabled: boolean;
3382
3417
  stunServers: string[];
@@ -3405,6 +3440,12 @@ declare const daemonConfigSchema: z.ZodObject<{
3405
3440
  accountId?: string | undefined;
3406
3441
  } | undefined;
3407
3442
  };
3443
+ camera: {
3444
+ width: number;
3445
+ height: number;
3446
+ frameRate: number;
3447
+ maxSeconds: number;
3448
+ };
3408
3449
  callUrlBase?: string | undefined;
3409
3450
  }, {
3410
3451
  enabled?: boolean | undefined;
@@ -3435,6 +3476,12 @@ declare const daemonConfigSchema: z.ZodObject<{
3435
3476
  } | undefined;
3436
3477
  maxCallMinutes?: number | undefined;
3437
3478
  } | undefined;
3479
+ camera?: {
3480
+ width?: number | undefined;
3481
+ height?: number | undefined;
3482
+ frameRate?: number | undefined;
3483
+ maxSeconds?: number | undefined;
3484
+ } | undefined;
3438
3485
  }>>;
3439
3486
  }, "strip", z.ZodTypeAny, {
3440
3487
  push: {
@@ -3565,6 +3612,12 @@ declare const daemonConfigSchema: z.ZodObject<{
3565
3612
  accountId?: string | undefined;
3566
3613
  } | undefined;
3567
3614
  };
3615
+ camera: {
3616
+ width: number;
3617
+ height: number;
3618
+ frameRate: number;
3619
+ maxSeconds: number;
3620
+ };
3568
3621
  callUrlBase?: string | undefined;
3569
3622
  };
3570
3623
  }, {
@@ -3697,6 +3750,12 @@ declare const daemonConfigSchema: z.ZodObject<{
3697
3750
  } | undefined;
3698
3751
  maxCallMinutes?: number | undefined;
3699
3752
  } | undefined;
3753
+ camera?: {
3754
+ width?: number | undefined;
3755
+ height?: number | undefined;
3756
+ frameRate?: number | undefined;
3757
+ maxSeconds?: number | undefined;
3758
+ } | undefined;
3700
3759
  } | undefined;
3701
3760
  }>>;
3702
3761
  crons: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodEffects<z.ZodObject<{
@@ -4114,6 +4173,145 @@ declare const daemonConfigSchema: z.ZodObject<{
4114
4173
  ringSeconds?: number | undefined;
4115
4174
  ringSound?: string | undefined;
4116
4175
  }>>;
4176
+ /** Watched WhatsApp chats triaged by an agent (src/whatsapp-triage). */
4177
+ whatsappTriage: z.ZodDefault<z.ZodObject<{
4178
+ enabled: z.ZodDefault<z.ZodBoolean>;
4179
+ secretEnv: z.ZodDefault<z.ZodString>;
4180
+ batchSeconds: z.ZodDefault<z.ZodNumber>;
4181
+ timezone: z.ZodOptional<z.ZodString>;
4182
+ allowAutoAck: z.ZodDefault<z.ZodBoolean>;
4183
+ describeMedia: z.ZodDefault<z.ZodBoolean>;
4184
+ wacli: z.ZodDefault<z.ZodObject<{
4185
+ bin: z.ZodDefault<z.ZodString>;
4186
+ account: z.ZodOptional<z.ZodString>;
4187
+ store: z.ZodOptional<z.ZodString>;
4188
+ }, "strip", z.ZodTypeAny, {
4189
+ bin: string;
4190
+ store?: string | undefined;
4191
+ account?: string | undefined;
4192
+ }, {
4193
+ store?: string | undefined;
4194
+ bin?: string | undefined;
4195
+ account?: string | undefined;
4196
+ }>>;
4197
+ rules: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
4198
+ id: z.ZodString;
4199
+ enabled: z.ZodDefault<z.ZodBoolean>;
4200
+ chats: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4201
+ senders: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4202
+ agent: z.ZodString;
4203
+ prompt: z.ZodOptional<z.ZodString>;
4204
+ quietHours: z.ZodOptional<z.ZodObject<{
4205
+ start: z.ZodString;
4206
+ end: z.ZodString;
4207
+ }, "strip", z.ZodTypeAny, {
4208
+ end: string;
4209
+ start: string;
4210
+ }, {
4211
+ end: string;
4212
+ start: string;
4213
+ }>>;
4214
+ autoAck: z.ZodDefault<z.ZodBoolean>;
4215
+ }, "strip", z.ZodTypeAny, {
4216
+ enabled: boolean;
4217
+ agent: string;
4218
+ id: string;
4219
+ chats: string[];
4220
+ senders: string[];
4221
+ autoAck: boolean;
4222
+ prompt?: string | undefined;
4223
+ quietHours?: {
4224
+ end: string;
4225
+ start: string;
4226
+ } | undefined;
4227
+ }, {
4228
+ agent: string;
4229
+ id: string;
4230
+ enabled?: boolean | undefined;
4231
+ prompt?: string | undefined;
4232
+ chats?: string[] | undefined;
4233
+ senders?: string[] | undefined;
4234
+ quietHours?: {
4235
+ end: string;
4236
+ start: string;
4237
+ } | undefined;
4238
+ autoAck?: boolean | undefined;
4239
+ }>, {
4240
+ enabled: boolean;
4241
+ agent: string;
4242
+ id: string;
4243
+ chats: string[];
4244
+ senders: string[];
4245
+ autoAck: boolean;
4246
+ prompt?: string | undefined;
4247
+ quietHours?: {
4248
+ end: string;
4249
+ start: string;
4250
+ } | undefined;
4251
+ }, {
4252
+ agent: string;
4253
+ id: string;
4254
+ enabled?: boolean | undefined;
4255
+ prompt?: string | undefined;
4256
+ chats?: string[] | undefined;
4257
+ senders?: string[] | undefined;
4258
+ quietHours?: {
4259
+ end: string;
4260
+ start: string;
4261
+ } | undefined;
4262
+ autoAck?: boolean | undefined;
4263
+ }>, "many">>;
4264
+ }, "strip", z.ZodTypeAny, {
4265
+ enabled: boolean;
4266
+ secretEnv: string;
4267
+ batchSeconds: number;
4268
+ allowAutoAck: boolean;
4269
+ describeMedia: boolean;
4270
+ wacli: {
4271
+ bin: string;
4272
+ store?: string | undefined;
4273
+ account?: string | undefined;
4274
+ };
4275
+ rules: {
4276
+ enabled: boolean;
4277
+ agent: string;
4278
+ id: string;
4279
+ chats: string[];
4280
+ senders: string[];
4281
+ autoAck: boolean;
4282
+ prompt?: string | undefined;
4283
+ quietHours?: {
4284
+ end: string;
4285
+ start: string;
4286
+ } | undefined;
4287
+ }[];
4288
+ timezone?: string | undefined;
4289
+ }, {
4290
+ enabled?: boolean | undefined;
4291
+ timezone?: string | undefined;
4292
+ secretEnv?: string | undefined;
4293
+ batchSeconds?: number | undefined;
4294
+ allowAutoAck?: boolean | undefined;
4295
+ describeMedia?: boolean | undefined;
4296
+ wacli?: {
4297
+ store?: string | undefined;
4298
+ bin?: string | undefined;
4299
+ account?: string | undefined;
4300
+ } | undefined;
4301
+ rules?: {
4302
+ agent: string;
4303
+ id: string;
4304
+ enabled?: boolean | undefined;
4305
+ prompt?: string | undefined;
4306
+ chats?: string[] | undefined;
4307
+ senders?: string[] | undefined;
4308
+ quietHours?: {
4309
+ end: string;
4310
+ start: string;
4311
+ } | undefined;
4312
+ autoAck?: boolean | undefined;
4313
+ }[] | undefined;
4314
+ }>>;
4117
4315
  approvals: z.ZodDefault<z.ZodObject<{
4118
4316
  /** A card without an `expires` gets this many days. */
4119
4317
  defaultExpiryDays: z.ZodDefault<z.ZodNumber>;
@@ -4318,15 +4516,15 @@ declare const daemonConfigSchema: z.ZodObject<{
4318
4516
  width: z.ZodNumber;
4319
4517
  height: z.ZodNumber;
4320
4518
  }, "strip", z.ZodTypeAny, {
4321
- x: number;
4322
- y: number;
4323
4519
  width: number;
4324
4520
  height: number;
4325
- }, {
4326
4521
  x: number;
4327
4522
  y: number;
4523
+ }, {
4328
4524
  width: number;
4329
4525
  height: number;
4526
+ x: number;
4527
+ y: number;
4330
4528
  }>>>;
4331
4529
  /** The last few seconds of a region, kept in memory by the daemon. Off
4332
4530
  * unless enabled; frames are written out only when asked for. */
@@ -4356,10 +4554,10 @@ declare const daemonConfigSchema: z.ZodObject<{
4356
4554
  changeThreshold: number;
4357
4555
  stableMs: number;
4358
4556
  regions: Record<string, {
4359
- x: number;
4360
- y: number;
4361
4557
  width: number;
4362
4558
  height: number;
4559
+ x: number;
4560
+ y: number;
4363
4561
  }>;
4364
4562
  buffer: {
4365
4563
  enabled: boolean;
@@ -4375,10 +4573,10 @@ declare const daemonConfigSchema: z.ZodObject<{
4375
4573
  changeThreshold?: number | undefined;
4376
4574
  stableMs?: number | undefined;
4377
4575
  regions?: Record<string, {
4378
- x: number;
4379
- y: number;
4380
4576
  width: number;
4381
4577
  height: number;
4578
+ x: number;
4579
+ y: number;
4382
4580
  }> | undefined;
4383
4581
  buffer?: {
4384
4582
  enabled?: boolean | undefined;
@@ -4518,6 +4716,10 @@ declare const daemonConfigSchema: z.ZodObject<{
4518
4716
  /** See systemVoiceSchema. Unset: one is assigned, of the agent's
4519
4717
  * gender when set, different from every other agent's. */
4520
4718
  system: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
4719
+ /** Voices to try, in order, when `system` names one that is not
4720
+ * installed (e.g. ["Ava (Premium)", "Allison"]). Unset, or none
4721
+ * installed: the best installed voice of its language and gender. */
4722
+ fallbacks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4521
4723
  elevenlabsVoiceId: z.ZodOptional<z.ZodString>;
4522
4724
  gender: z.ZodOptional<z.ZodEnum<["female", "male", "neutral"]>>;
4523
4725
  /** A few words on manner, e.g. "warm, upbeat, a little playful". */
@@ -4544,6 +4746,7 @@ declare const daemonConfigSchema: z.ZodObject<{
4544
4746
  provider?: "system" | "elevenlabs" | undefined;
4545
4747
  name?: string | undefined;
4546
4748
  style?: string | undefined;
4749
+ fallbacks?: string[] | undefined;
4547
4750
  elevenlabsVoiceId?: string | undefined;
4548
4751
  gender?: "neutral" | "female" | "male" | undefined;
4549
4752
  intro?: string | undefined;
@@ -4553,6 +4756,7 @@ declare const daemonConfigSchema: z.ZodObject<{
4553
4756
  provider?: "system" | "elevenlabs" | undefined;
4554
4757
  name?: string | undefined;
4555
4758
  style?: string | undefined;
4759
+ fallbacks?: string[] | undefined;
4556
4760
  elevenlabsVoiceId?: string | undefined;
4557
4761
  gender?: "neutral" | "female" | "male" | undefined;
4558
4762
  intro?: string | undefined;
@@ -5152,8 +5356,6 @@ declare const daemonConfigSchema: z.ZodObject<{
5152
5356
  dashboardUrl?: string | undefined;
5153
5357
  dashboardToken?: string | undefined;
5154
5358
  }>, "many">>;
5155
- /** A keyboard shortcut for AgentX Voice, e.g. "opt+space" or
5156
- * "ctrl+opt+1". See src/voice/hotkey.ts. */
5157
5359
  draftAgent: z.ZodOptional<z.ZodString>;
5158
5360
  }, "strip", z.ZodTypeAny, {
5159
5361
  enabled: boolean;
@@ -5815,8 +6017,8 @@ declare const daemonConfigSchema: z.ZodObject<{
5815
6017
  agentId: string;
5816
6018
  description?: string | undefined;
5817
6019
  triggers?: Record<string, string> | undefined;
5818
- node?: string | undefined;
5819
6020
  secretEnv?: string | undefined;
6021
+ node?: string | undefined;
5820
6022
  defaultWorkflow?: string | undefined;
5821
6023
  }, {
5822
6024
  id: string;
@@ -5825,8 +6027,8 @@ declare const daemonConfigSchema: z.ZodObject<{
5825
6027
  enabled?: boolean | undefined;
5826
6028
  description?: string | undefined;
5827
6029
  triggers?: Record<string, string> | undefined;
5828
- node?: string | undefined;
5829
6030
  secretEnv?: string | undefined;
6031
+ node?: string | undefined;
5830
6032
  defaultWorkflow?: string | undefined;
5831
6033
  }>, "many">>;
5832
6034
  /** Session cache-reuse policy. Controls when we drop a Claude `--resume`
@@ -6004,6 +6206,7 @@ declare const daemonConfigSchema: z.ZodObject<{
6004
6206
  provider?: "system" | "elevenlabs" | undefined;
6005
6207
  style?: string | undefined;
6006
6208
  priority?: "high" | "normal" | "low" | undefined;
6209
+ fallbacks?: string[] | undefined;
6007
6210
  elevenlabsVoiceId?: string | undefined;
6008
6211
  gender?: "neutral" | "female" | "male" | undefined;
6009
6212
  intro?: string | undefined;
@@ -6102,10 +6305,10 @@ declare const daemonConfigSchema: z.ZodObject<{
6102
6305
  changeThreshold: number;
6103
6306
  stableMs: number;
6104
6307
  regions: Record<string, {
6105
- x: number;
6106
- y: number;
6107
6308
  width: number;
6108
6309
  height: number;
6310
+ x: number;
6311
+ y: number;
6109
6312
  }>;
6110
6313
  buffer: {
6111
6314
  enabled: boolean;
@@ -6250,6 +6453,12 @@ declare const daemonConfigSchema: z.ZodObject<{
6250
6453
  accountId?: string | undefined;
6251
6454
  } | undefined;
6252
6455
  };
6456
+ camera: {
6457
+ width: number;
6458
+ height: number;
6459
+ frameRate: number;
6460
+ maxSeconds: number;
6461
+ };
6253
6462
  callUrlBase?: string | undefined;
6254
6463
  };
6255
6464
  };
@@ -6324,6 +6533,32 @@ declare const daemonConfigSchema: z.ZodObject<{
6324
6533
  ringSeconds: number;
6325
6534
  ringSound: string;
6326
6535
  };
6536
+ whatsappTriage: {
6537
+ enabled: boolean;
6538
+ secretEnv: string;
6539
+ batchSeconds: number;
6540
+ allowAutoAck: boolean;
6541
+ describeMedia: boolean;
6542
+ wacli: {
6543
+ bin: string;
6544
+ store?: string | undefined;
6545
+ account?: string | undefined;
6546
+ };
6547
+ rules: {
6548
+ enabled: boolean;
6549
+ agent: string;
6550
+ id: string;
6551
+ chats: string[];
6552
+ senders: string[];
6553
+ autoAck: boolean;
6554
+ prompt?: string | undefined;
6555
+ quietHours?: {
6556
+ end: string;
6557
+ start: string;
6558
+ } | undefined;
6559
+ }[];
6560
+ timezone?: string | undefined;
6561
+ };
6327
6562
  approvals: {
6328
6563
  digest: {
6329
6564
  enabled: boolean;
@@ -6358,6 +6593,7 @@ declare const daemonConfigSchema: z.ZodObject<{
6358
6593
  provider?: "system" | "elevenlabs" | undefined;
6359
6594
  name?: string | undefined;
6360
6595
  style?: string | undefined;
6596
+ fallbacks?: string[] | undefined;
6361
6597
  elevenlabsVoiceId?: string | undefined;
6362
6598
  gender?: "neutral" | "female" | "male" | undefined;
6363
6599
  intro?: string | undefined;
@@ -6508,8 +6744,8 @@ declare const daemonConfigSchema: z.ZodObject<{
6508
6744
  agentId: string;
6509
6745
  description?: string | undefined;
6510
6746
  triggers?: Record<string, string> | undefined;
6511
- node?: string | undefined;
6512
6747
  secretEnv?: string | undefined;
6748
+ node?: string | undefined;
6513
6749
  defaultWorkflow?: string | undefined;
6514
6750
  }[];
6515
6751
  session: {
@@ -6676,6 +6912,7 @@ declare const daemonConfigSchema: z.ZodObject<{
6676
6912
  provider?: "system" | "elevenlabs" | undefined;
6677
6913
  style?: string | undefined;
6678
6914
  priority?: "high" | "normal" | "low" | undefined;
6915
+ fallbacks?: string[] | undefined;
6679
6916
  elevenlabsVoiceId?: string | undefined;
6680
6917
  gender?: "neutral" | "female" | "male" | undefined;
6681
6918
  intro?: string | undefined;
@@ -6768,10 +7005,10 @@ declare const daemonConfigSchema: z.ZodObject<{
6768
7005
  changeThreshold?: number | undefined;
6769
7006
  stableMs?: number | undefined;
6770
7007
  regions?: Record<string, {
6771
- x: number;
6772
- y: number;
6773
7008
  width: number;
6774
7009
  height: number;
7010
+ x: number;
7011
+ y: number;
6775
7012
  }> | undefined;
6776
7013
  buffer?: {
6777
7014
  enabled?: boolean | undefined;
@@ -6917,6 +7154,12 @@ declare const daemonConfigSchema: z.ZodObject<{
6917
7154
  } | undefined;
6918
7155
  maxCallMinutes?: number | undefined;
6919
7156
  } | undefined;
7157
+ camera?: {
7158
+ width?: number | undefined;
7159
+ height?: number | undefined;
7160
+ frameRate?: number | undefined;
7161
+ maxSeconds?: number | undefined;
7162
+ } | undefined;
6920
7163
  } | undefined;
6921
7164
  } | undefined;
6922
7165
  crons?: Record<string, {
@@ -6990,6 +7233,32 @@ declare const daemonConfigSchema: z.ZodObject<{
6990
7233
  ringSeconds?: number | undefined;
6991
7234
  ringSound?: string | undefined;
6992
7235
  } | undefined;
7236
+ whatsappTriage?: {
7237
+ enabled?: boolean | undefined;
7238
+ timezone?: string | undefined;
7239
+ secretEnv?: string | undefined;
7240
+ batchSeconds?: number | undefined;
7241
+ allowAutoAck?: boolean | undefined;
7242
+ describeMedia?: boolean | undefined;
7243
+ wacli?: {
7244
+ store?: string | undefined;
7245
+ bin?: string | undefined;
7246
+ account?: string | undefined;
7247
+ } | undefined;
7248
+ rules?: {
7249
+ agent: string;
7250
+ id: string;
7251
+ enabled?: boolean | undefined;
7252
+ prompt?: string | undefined;
7253
+ chats?: string[] | undefined;
7254
+ senders?: string[] | undefined;
7255
+ quietHours?: {
7256
+ end: string;
7257
+ start: string;
7258
+ } | undefined;
7259
+ autoAck?: boolean | undefined;
7260
+ }[] | undefined;
7261
+ } | undefined;
6993
7262
  approvals?: {
6994
7263
  digest?: {
6995
7264
  enabled?: boolean | undefined;
@@ -7024,6 +7293,7 @@ declare const daemonConfigSchema: z.ZodObject<{
7024
7293
  provider?: "system" | "elevenlabs" | undefined;
7025
7294
  name?: string | undefined;
7026
7295
  style?: string | undefined;
7296
+ fallbacks?: string[] | undefined;
7027
7297
  elevenlabsVoiceId?: string | undefined;
7028
7298
  gender?: "neutral" | "female" | "male" | undefined;
7029
7299
  intro?: string | undefined;
@@ -7242,8 +7512,8 @@ declare const daemonConfigSchema: z.ZodObject<{
7242
7512
  enabled?: boolean | undefined;
7243
7513
  description?: string | undefined;
7244
7514
  triggers?: Record<string, string> | undefined;
7245
- node?: string | undefined;
7246
7515
  secretEnv?: string | undefined;
7516
+ node?: string | undefined;
7247
7517
  defaultWorkflow?: string | undefined;
7248
7518
  }[] | undefined;
7249
7519
  session?: {
@@ -7861,6 +8131,8 @@ declare class AgentXDaemon {
7861
8131
  private _assistant?;
7862
8132
  /** Agents ringing the owner (src/calls); needs SQLite. */
7863
8133
  private calls?;
8134
+ /** Watched WhatsApp chats (src/whatsapp-triage). Null without SQLite. */
8135
+ private waTriage;
7864
8136
  private assistantStore;
7865
8137
  /** Workflow health for the monitor. Cached for a minute: the dashboard
7866
8138
  * polls every 15s and dormancy does not change on that timescale. */
@@ -7881,6 +8153,7 @@ declare class AgentXDaemon {
7881
8153
  private screenBuffer?;
7882
8154
  /** Voice for agents on mesh peers: see src/daemon/voice-mesh-proxy.ts. */
7883
8155
  private voiceMesh;
8156
+ private voiceHealth?;
7884
8157
  /** Persistent-claude process registry. Null when no agent has
7885
8158
  * persistentProcess: true (legacy spawn-per-task path). */
7886
8159
  private sessionMonitor?;
@@ -7900,6 +8173,9 @@ declare class AgentXDaemon {
7900
8173
  constructor(configPath?: string);
7901
8174
  start(): Promise<void>;
7902
8175
  stop(): Promise<void>;
8176
+ /** Deliver a notice to the owner through the channel router: the
8177
+ * address it was given, else notifications.channel (push or ntfy). */
8178
+ private ownerSender;
7903
8179
  /** In-flight work the drain waits for: local agent tasks + mesh forwards. */
7904
8180
  private inflightCounts;
7905
8181
  /** Set by start(): the same graceful path a SIGTERM takes. */
@@ -8004,6 +8280,9 @@ declare class AgentXDaemon {
8004
8280
  * this `callId` to the stream.
8005
8281
  */
8006
8282
  private handleWebRtcSSE;
8283
+ /** Watched WhatsApp chats: the rule's agent triages each burst; the
8284
+ * owner hears about action items the way `agentx notify` tells them. */
8285
+ private createWhatsappTriage;
8007
8286
  /** Calls from agents to the owner (#321). The notice path is notify's:
8008
8287
  * Focus holds a non-urgent one; the push goes through the router with
8009
8288
  * its title as the first line, as `agentx notify` sends it. */
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{a as L}from"./chunk-C245D4BZ.js";import{d as St,e as kt,ea as Tt,f as vt,fa as Mt,g as xt,h as $t,i as Ct,j as Pt,k as bt}from"./chunk-3C2SQDIH.js";import"./chunk-JU67IZLC.js";import"./chunk-BYJ3A55Y.js";import"./chunk-NMFXY3QU.js";import"./chunk-4XBYHKYG.js";import"./chunk-LQRBGQIR.js";import"./chunk-ZVP6GB4G.js";import"./chunk-JBVABB26.js";import"./chunk-2D3RYIDU.js";import"./chunk-EKJG63EJ.js";import{S as yt,l as lt,m as ct,n as dt,o as mt,p as pt}from"./chunk-OTMDMGHE.js";import"./chunk-6LTD7XL5.js";import"./chunk-N6EWZGIX.js";import"./chunk-WP6KLXTP.js";import"./chunk-DP7RTNDM.js";import{A as D,B as z,C as V,a as ye,b as we,c as Se,d as Ae,e as Ie,f as Oe,g as Ne,h as He,i as je,j as Ue,k as _e,l as I,m as q,n as Be,o as qe,p as Ye,q as O,r as ze,s as Ve,t as Xe,u as x,v as Y,w as Qe,x as Ze,y as et,z as wt}from"./chunk-HXW4NAWF.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-SELIVR6U.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import{s as ut}from"./chunk-5Y7QRFSL.js";import"./chunk-WLX4766Y.js";import"./chunk-KA2UIZXG.js";import"./chunk-GQ76J72O.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-K6CHA6JJ.js";import"./chunk-DWADWDMU.js";import"./chunk-23A5K5UW.js";import"./chunk-QD6IICK7.js";import"./chunk-VWTBHLMX.js";import"./chunk-RCKICCTT.js";import{a as ht}from"./chunk-EMRQ6W5J.js";import"./chunk-CECHWYJ2.js";import"./chunk-XJQNIFZ4.js";import{f as gt,g as ft}from"./chunk-AAA6NGY5.js";import"./chunk-WPNRDEHW.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-DJMUP6TK.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import{a as ke,b as ve,c as xe,d as $e,e as Ce,f as Pe,g as be,h as Te,i as Me,j as Re,l as Ee,m as Ge,o as T,p as W}from"./chunk-5MUJZODV.js";import{a as m,b as G}from"./chunk-7I7IEX4S.js";import{b as Fe,c as Le,d as A,e as De}from"./chunk-JHCI6XCJ.js";import{a as Ke,b as Je,e as We}from"./chunk-DSYKYZMT.js";import{A as nt,v as tt,x as st,y as ot}from"./chunk-AHOGFVHA.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";W();G();import{execa as Rt}from"execa";import{existsSync as se,promises as X}from"fs";import S from"path";import ie from"node-fetch";async function Et(o,e){let t=o.split("/");if(t.length<2)throw new Error(`Invalid skill package ID: ${o}. Expected format: owner/repo`);let s=t[0],i=t[1],n=t[2];try{let a=n?`${s}/${i}/${n}`:`${s}/${i}`;await Rt("npx",["-y","skills","add",a],{cwd:e,stdio:"pipe"}),m.success(`Installed skill package: ${o}`);let r=S.resolve(e,".skills",`${s}_${i}`);if(se(r))return await ne(r,o);let d=S.resolve(e,".skills");return se(d)?await ne(d,o):[]}catch{return m.info(`Fetching skills directly from GitHub: ${s}/${i}`),await Gt(s,i,n,e)}}async function Gt(o,e,t,s){let i=[];try{let n=`https://api.github.com/repos/${o}/${e}/git/trees/main?recursive=1`,a=await ie(n);if(!a.ok)throw new Error(`GitHub API error: ${a.status}`);let d=(await a.json()).tree.filter(p=>p.type==="blob"&&p.path.endsWith("SKILL.md"));if(t){let p=d.find(f=>f.path.includes(`/${t}/`)||f.path===`${t}/SKILL.md`);if(p){let f=await oe(o,e,p.path,s);f&&i.push(f)}}else for(let p of d){let f=await oe(o,e,p.path,s);f&&i.push(f)}}catch(n){m.error(`Failed to fetch skills from GitHub: ${n.message}`)}return i}async function oe(o,e,t,s){try{let i=`https://raw.githubusercontent.com/${o}/${e}/main/${t}`,n=await ie(i);if(!n.ok)return null;let a=await n.text(),r=A(a);if(r){r.source="remote",r.packageId=`${o}/${e}`;let d=S.dirname(t),p=S.resolve(s,".skills",`${o}_${e}`,d);await X.mkdir(p,{recursive:!0}),await X.writeFile(S.resolve(p,"SKILL.md"),a),r.path=S.resolve(p,"SKILL.md")}return r}catch{return null}}async function ne(o,e){let t=[],{default:s}=await import("fast-glob"),i=await s.glob("**/SKILL.md",{cwd:o,deep:5});for(let n of i)try{let a=S.resolve(o,n),r=await X.readFile(a,"utf8"),d=A(r);d&&(d.source="remote",d.path=a,d.packageId=e,t.push(d))}catch{}return t}async function At(o,e,t,s,i){let n=["---",`name: ${o}`,`description: ${e}`];if(s?.length){n.push("tags:");for(let a of s)n.push(` - ${a}`)}if(i?.length){n.push("globs:");for(let a of i)n.push(` - ${a}`)}return n.push("---"),`${n.join(`
1
+ import{a as L}from"./chunk-C245D4BZ.js";import{d as St,e as kt,f as vt,fa as Tt,g as xt,ga as Mt,h as $t,i as Ct,j as Pt,k as bt}from"./chunk-UXH6IX7V.js";import"./chunk-5QCFJ5GO.js";import"./chunk-D5BPN3JR.js";import"./chunk-BYJ3A55Y.js";import"./chunk-7XB2CVC3.js";import"./chunk-LQRBGQIR.js";import"./chunk-ZVP6GB4G.js";import"./chunk-73MVBAFG.js";import"./chunk-AQASR6KR.js";import"./chunk-2D3RYIDU.js";import"./chunk-EKJG63EJ.js";import{R as yt,k as lt,l as ct,m as dt,n as mt,o as pt}from"./chunk-PNTFOROF.js";import"./chunk-RF3HJHFP.js";import"./chunk-WP6KLXTP.js";import"./chunk-N6EWZGIX.js";import"./chunk-DP7RTNDM.js";import{A as D,B as z,C as V,a as ye,b as we,c as Se,d as Ae,e as Ie,f as Oe,g as Ne,h as He,i as je,j as Ue,k as _e,l as I,m as q,n as Be,o as qe,p as Ye,q as O,r as ze,s as Ve,t as Xe,u as x,v as Y,w as Qe,x as Ze,y as et,z as wt}from"./chunk-GULZIVVA.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-Y2425AFZ.js";import"./chunk-2AXFYDWF.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import{s as ut}from"./chunk-WMGB25WL.js";import"./chunk-XBLL3T2F.js";import"./chunk-VWTBHLMX.js";import"./chunk-RR2P5FLW.js";import{a as ht}from"./chunk-L43CVWCL.js";import"./chunk-KA2UIZXG.js";import"./chunk-GQ76J72O.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-U75OD25W.js";import"./chunk-MYVHVJWZ.js";import"./chunk-DWADWDMU.js";import"./chunk-23A5K5UW.js";import"./chunk-QD6IICK7.js";import"./chunk-CECHWYJ2.js";import"./chunk-B45SJSFP.js";import{f as gt,g as ft}from"./chunk-6AUW7HPX.js";import"./chunk-WPNRDEHW.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-PVNDAEWC.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import{a as ke,b as ve,c as xe,d as $e,e as Ce,f as Pe,g as be,h as Te,i as Me,j as Re,l as Ee,m as Ge,o as T,p as W}from"./chunk-5MUJZODV.js";import{a as m,b as G}from"./chunk-7I7IEX4S.js";import{b as Fe,c as Le,d as A,e as De}from"./chunk-JHCI6XCJ.js";import{a as Ke,b as Je,e as We}from"./chunk-DSYKYZMT.js";import{A as ot,C as nt,x as tt,z as st}from"./chunk-MQ5SG3VF.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";W();G();import{execa as Rt}from"execa";import{existsSync as se,promises as X}from"fs";import S from"path";import ie from"node-fetch";async function Et(o,e){let t=o.split("/");if(t.length<2)throw new Error(`Invalid skill package ID: ${o}. Expected format: owner/repo`);let s=t[0],i=t[1],n=t[2];try{let a=n?`${s}/${i}/${n}`:`${s}/${i}`;await Rt("npx",["-y","skills","add",a],{cwd:e,stdio:"pipe"}),m.success(`Installed skill package: ${o}`);let r=S.resolve(e,".skills",`${s}_${i}`);if(se(r))return await ne(r,o);let d=S.resolve(e,".skills");return se(d)?await ne(d,o):[]}catch{return m.info(`Fetching skills directly from GitHub: ${s}/${i}`),await Gt(s,i,n,e)}}async function Gt(o,e,t,s){let i=[];try{let n=`https://api.github.com/repos/${o}/${e}/git/trees/main?recursive=1`,a=await ie(n);if(!a.ok)throw new Error(`GitHub API error: ${a.status}`);let d=(await a.json()).tree.filter(p=>p.type==="blob"&&p.path.endsWith("SKILL.md"));if(t){let p=d.find(f=>f.path.includes(`/${t}/`)||f.path===`${t}/SKILL.md`);if(p){let f=await oe(o,e,p.path,s);f&&i.push(f)}}else for(let p of d){let f=await oe(o,e,p.path,s);f&&i.push(f)}}catch(n){m.error(`Failed to fetch skills from GitHub: ${n.message}`)}return i}async function oe(o,e,t,s){try{let i=`https://raw.githubusercontent.com/${o}/${e}/main/${t}`,n=await ie(i);if(!n.ok)return null;let a=await n.text(),r=A(a);if(r){r.source="remote",r.packageId=`${o}/${e}`;let d=S.dirname(t),p=S.resolve(s,".skills",`${o}_${e}`,d);await X.mkdir(p,{recursive:!0}),await X.writeFile(S.resolve(p,"SKILL.md"),a),r.path=S.resolve(p,"SKILL.md")}return r}catch{return null}}async function ne(o,e){let t=[],{default:s}=await import("fast-glob"),i=await s.glob("**/SKILL.md",{cwd:o,deep:5});for(let n of i)try{let a=S.resolve(o,n),r=await X.readFile(a,"utf8"),d=A(r);d&&(d.source="remote",d.path=a,d.packageId=e,t.push(d))}catch{}return t}async function At(o,e,t,s,i){let n=["---",`name: ${o}`,`description: ${e}`];if(s?.length){n.push("tags:");for(let a of s)n.push(` - ${a}`)}if(i?.length){n.push("globs:");for(let a of i)n.push(` - ${a}`)}return n.push("---"),`${n.join(`
2
2
  `)}
3
3
 
4
4
  ${t}`}async function It(o){let{loadLocalSkills:e}=await import("./loader-YFVSSYSL.js");return e(o)}async function Ot(o,e,t,s,i){let a=[{role:"system",content:`You are a skill author for the Agent Skills ecosystem (skills.sh).