agentix-cli 0.36.0 → 0.38.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 (90) hide show
  1. package/apps/mac-voice/Sources/AgentXVoice/AgentClient.swift +6 -7
  2. package/apps/mac-voice/Sources/AgentXVoice/Config.swift +4 -0
  3. package/apps/mac-voice/Sources/AgentXVoice/Progress.swift +4 -4
  4. package/apps/mac-voice/Sources/AgentXVoice/Speech.swift +84 -13
  5. package/apps/mac-voice/Sources/AgentXVoice/main.swift +6 -6
  6. package/dist/{App-WY6GOC3O.js → App-HSRGG5VA.js} +2 -2
  7. package/dist/{ChatApp-H7W5V2QL.js → ChatApp-4FOU6Q3S.js} +2 -2
  8. package/dist/{agent-6MW3J5FN.js → agent-54NUP2Z3.js} +2 -2
  9. package/dist/{board-dashboard-FKT5GEYE.js → board-dashboard-R7FWWFFK.js} +4 -4
  10. package/dist/{chunk-COY76JUG.js → chunk-B32HVIDN.js} +2 -2
  11. package/dist/{chunk-2IK2SIFN.js → chunk-B5HKRYCU.js} +2 -2
  12. package/dist/{chunk-ZA7FEJKR.js → chunk-DIKZWTL5.js} +5 -5
  13. package/dist/{chunk-EXBIM6WZ.js → chunk-DWAVMTAV.js} +145 -137
  14. package/dist/chunk-DWAVMTAV.js.map +1 -0
  15. package/dist/{chunk-YAER4PD6.js → chunk-FAJEBVZE.js} +2 -2
  16. package/dist/{chunk-AXYREZLV.js → chunk-H4MIYENA.js} +2 -2
  17. package/dist/chunk-IAG6FI3Q.js +13 -0
  18. package/dist/chunk-IAG6FI3Q.js.map +1 -0
  19. package/dist/{chunk-3CGB43RZ.js → chunk-KZPHCJMW.js} +242 -192
  20. package/dist/chunk-KZPHCJMW.js.map +1 -0
  21. package/dist/{chunk-GM5PFIJU.js → chunk-NZ6AQIKJ.js} +2 -2
  22. package/dist/{chunk-AOVH27BF.js → chunk-P7LNYB53.js} +2 -2
  23. package/dist/{chunk-DPNBGANY.js → chunk-RCVGIKC2.js} +2 -2
  24. package/dist/{chunk-CHWSVTY7.js → chunk-REPZID5M.js} +2 -2
  25. package/dist/{chunk-4LDSMWKQ.js → chunk-RQKUQOFC.js} +2 -2
  26. package/dist/{chunk-CRKOJZVK.js → chunk-SJPLXXCI.js} +2 -2
  27. package/dist/{chunk-BTMNOTTO.js → chunk-WBGROLOX.js} +2 -2
  28. package/dist/{chunk-TRAVSDZN.js → chunk-X763UOES.js} +2 -2
  29. package/dist/cli.js +1 -1
  30. package/dist/client-6BGTH2TT.js +2 -0
  31. package/dist/config-SRTXHGSK.js +2 -0
  32. package/dist/config-mutator-KJ5GEMVV.js +2 -0
  33. package/dist/doctor-J4FLV45L.js +2 -0
  34. package/dist/index.d.ts +80 -1
  35. package/dist/index.js +1 -1
  36. package/dist/index.js.map +1 -1
  37. package/dist/program-P7LNISI7.js +2 -0
  38. package/dist/query-ZSUBNWOL.js +2 -0
  39. package/dist/{registry-LANHP7WG.js → registry-OMUDCBKM.js} +2 -2
  40. package/dist/{request-planner-S4YWZEOG.js → request-planner-326NOKPZ.js} +2 -2
  41. package/dist/{review-candidates-3E3GW4K7.js → review-candidates-LEOPEOEG.js} +2 -2
  42. package/dist/{routing-QT4Z2ORA.js → routing-AWIRBYGU.js} +2 -2
  43. package/dist/scheduler-PGGYW5AB.js +2 -0
  44. package/dist/{seat-VFYCLEMH.js → seat-XB4EGUKJ.js} +2 -2
  45. package/dist/{select-SIJHCD54.js → select-L4VIYSFJ.js} +2 -2
  46. package/dist/wiki-GBC6I7ZX.js +2 -0
  47. package/package.json +1 -1
  48. package/dist/chunk-3CGB43RZ.js.map +0 -1
  49. package/dist/chunk-EBWWNNJF.js +0 -13
  50. package/dist/chunk-EBWWNNJF.js.map +0 -1
  51. package/dist/chunk-EXBIM6WZ.js.map +0 -1
  52. package/dist/client-OC7COXM6.js +0 -2
  53. package/dist/config-KAMUYXO3.js +0 -2
  54. package/dist/config-mutator-SMGYCOYW.js +0 -2
  55. package/dist/doctor-RNQDJCCI.js +0 -2
  56. package/dist/program-Q3URXEEE.js +0 -2
  57. package/dist/query-PINMYFMF.js +0 -2
  58. package/dist/scheduler-JUYBJLLK.js +0 -2
  59. package/dist/wiki-NY6V6OAT.js +0 -2
  60. /package/dist/{App-WY6GOC3O.js.map → App-HSRGG5VA.js.map} +0 -0
  61. /package/dist/{ChatApp-H7W5V2QL.js.map → ChatApp-4FOU6Q3S.js.map} +0 -0
  62. /package/dist/{agent-6MW3J5FN.js.map → agent-54NUP2Z3.js.map} +0 -0
  63. /package/dist/{board-dashboard-FKT5GEYE.js.map → board-dashboard-R7FWWFFK.js.map} +0 -0
  64. /package/dist/{chunk-COY76JUG.js.map → chunk-B32HVIDN.js.map} +0 -0
  65. /package/dist/{chunk-2IK2SIFN.js.map → chunk-B5HKRYCU.js.map} +0 -0
  66. /package/dist/{chunk-ZA7FEJKR.js.map → chunk-DIKZWTL5.js.map} +0 -0
  67. /package/dist/{chunk-YAER4PD6.js.map → chunk-FAJEBVZE.js.map} +0 -0
  68. /package/dist/{chunk-AXYREZLV.js.map → chunk-H4MIYENA.js.map} +0 -0
  69. /package/dist/{chunk-GM5PFIJU.js.map → chunk-NZ6AQIKJ.js.map} +0 -0
  70. /package/dist/{chunk-AOVH27BF.js.map → chunk-P7LNYB53.js.map} +0 -0
  71. /package/dist/{chunk-DPNBGANY.js.map → chunk-RCVGIKC2.js.map} +0 -0
  72. /package/dist/{chunk-CHWSVTY7.js.map → chunk-REPZID5M.js.map} +0 -0
  73. /package/dist/{chunk-4LDSMWKQ.js.map → chunk-RQKUQOFC.js.map} +0 -0
  74. /package/dist/{chunk-CRKOJZVK.js.map → chunk-SJPLXXCI.js.map} +0 -0
  75. /package/dist/{chunk-BTMNOTTO.js.map → chunk-WBGROLOX.js.map} +0 -0
  76. /package/dist/{chunk-TRAVSDZN.js.map → chunk-X763UOES.js.map} +0 -0
  77. /package/dist/{client-OC7COXM6.js.map → client-6BGTH2TT.js.map} +0 -0
  78. /package/dist/{config-KAMUYXO3.js.map → config-SRTXHGSK.js.map} +0 -0
  79. /package/dist/{config-mutator-SMGYCOYW.js.map → config-mutator-KJ5GEMVV.js.map} +0 -0
  80. /package/dist/{doctor-RNQDJCCI.js.map → doctor-J4FLV45L.js.map} +0 -0
  81. /package/dist/{program-Q3URXEEE.js.map → program-P7LNISI7.js.map} +0 -0
  82. /package/dist/{query-PINMYFMF.js.map → query-ZSUBNWOL.js.map} +0 -0
  83. /package/dist/{registry-LANHP7WG.js.map → registry-OMUDCBKM.js.map} +0 -0
  84. /package/dist/{request-planner-S4YWZEOG.js.map → request-planner-326NOKPZ.js.map} +0 -0
  85. /package/dist/{review-candidates-3E3GW4K7.js.map → review-candidates-LEOPEOEG.js.map} +0 -0
  86. /package/dist/{routing-QT4Z2ORA.js.map → routing-AWIRBYGU.js.map} +0 -0
  87. /package/dist/{scheduler-JUYBJLLK.js.map → scheduler-PGGYW5AB.js.map} +0 -0
  88. /package/dist/{seat-VFYCLEMH.js.map → seat-XB4EGUKJ.js.map} +0 -0
  89. /package/dist/{select-SIJHCD54.js.map → select-L4VIYSFJ.js.map} +0 -0
  90. /package/dist/{wiki-NY6V6OAT.js.map → wiki-GBC6I7ZX.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -1711,6 +1711,11 @@ declare const agentConfigSchema: z.ZodObject<{
1711
1711
  * AGENTX_VOICE_ID, no intro is derived from the system prompt. See
1712
1712
  * src/voice/agent-voice.ts. */
1713
1713
  voice: z.ZodOptional<z.ZodObject<{
1714
+ /** Overrides the global voice.provider for this agent. */
1715
+ provider: z.ZodOptional<z.ZodEnum<["system", "elevenlabs"]>>;
1716
+ /** See systemVoiceSchema. Unset: one is assigned, of the agent's
1717
+ * gender when set, different from every other agent's. */
1718
+ system: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
1714
1719
  elevenlabsVoiceId: z.ZodOptional<z.ZodString>;
1715
1720
  gender: z.ZodOptional<z.ZodEnum<["female", "male", "neutral"]>>;
1716
1721
  /** A few words on manner, e.g. "warm, upbeat, a little playful". */
@@ -1721,12 +1726,16 @@ declare const agentConfigSchema: z.ZodObject<{
1721
1726
  * works: "on" for everything but cron, "all" to include cron. */
1722
1727
  narrate: z.ZodOptional<z.ZodEnum<["off", "on", "all"]>>;
1723
1728
  }, "strip", z.ZodTypeAny, {
1729
+ system?: string | Record<string, string> | undefined;
1730
+ provider?: "system" | "elevenlabs" | undefined;
1724
1731
  style?: string | undefined;
1725
1732
  elevenlabsVoiceId?: string | undefined;
1726
1733
  gender?: "neutral" | "female" | "male" | undefined;
1727
1734
  intro?: string | undefined;
1728
1735
  narrate?: "all" | "on" | "off" | undefined;
1729
1736
  }, {
1737
+ system?: string | Record<string, string> | undefined;
1738
+ provider?: "system" | "elevenlabs" | undefined;
1730
1739
  style?: string | undefined;
1731
1740
  elevenlabsVoiceId?: string | undefined;
1732
1741
  gender?: "neutral" | "female" | "male" | undefined;
@@ -1813,6 +1822,8 @@ declare const agentConfigSchema: z.ZodObject<{
1813
1822
  contextStrategy?: "layered" | "planner" | undefined;
1814
1823
  gitlabAutoReply?: boolean | undefined;
1815
1824
  voice?: {
1825
+ system?: string | Record<string, string> | undefined;
1826
+ provider?: "system" | "elevenlabs" | undefined;
1816
1827
  style?: string | undefined;
1817
1828
  elevenlabsVoiceId?: string | undefined;
1818
1829
  gender?: "neutral" | "female" | "male" | undefined;
@@ -1881,6 +1892,8 @@ declare const agentConfigSchema: z.ZodObject<{
1881
1892
  metadata?: Record<string, string | number | boolean> | undefined;
1882
1893
  }[] | undefined;
1883
1894
  voice?: {
1895
+ system?: string | Record<string, string> | undefined;
1896
+ provider?: "system" | "elevenlabs" | undefined;
1884
1897
  style?: string | undefined;
1885
1898
  elevenlabsVoiceId?: string | undefined;
1886
1899
  gender?: "neutral" | "female" | "male" | undefined;
@@ -2295,6 +2308,11 @@ declare const daemonConfigSchema: z.ZodObject<{
2295
2308
  * AGENTX_VOICE_ID, no intro is derived from the system prompt. See
2296
2309
  * src/voice/agent-voice.ts. */
2297
2310
  voice: z.ZodOptional<z.ZodObject<{
2311
+ /** Overrides the global voice.provider for this agent. */
2312
+ provider: z.ZodOptional<z.ZodEnum<["system", "elevenlabs"]>>;
2313
+ /** See systemVoiceSchema. Unset: one is assigned, of the agent's
2314
+ * gender when set, different from every other agent's. */
2315
+ system: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
2298
2316
  elevenlabsVoiceId: z.ZodOptional<z.ZodString>;
2299
2317
  gender: z.ZodOptional<z.ZodEnum<["female", "male", "neutral"]>>;
2300
2318
  /** A few words on manner, e.g. "warm, upbeat, a little playful". */
@@ -2305,12 +2323,16 @@ declare const daemonConfigSchema: z.ZodObject<{
2305
2323
  * works: "on" for everything but cron, "all" to include cron. */
2306
2324
  narrate: z.ZodOptional<z.ZodEnum<["off", "on", "all"]>>;
2307
2325
  }, "strip", z.ZodTypeAny, {
2326
+ system?: string | Record<string, string> | undefined;
2327
+ provider?: "system" | "elevenlabs" | undefined;
2308
2328
  style?: string | undefined;
2309
2329
  elevenlabsVoiceId?: string | undefined;
2310
2330
  gender?: "neutral" | "female" | "male" | undefined;
2311
2331
  intro?: string | undefined;
2312
2332
  narrate?: "all" | "on" | "off" | undefined;
2313
2333
  }, {
2334
+ system?: string | Record<string, string> | undefined;
2335
+ provider?: "system" | "elevenlabs" | undefined;
2314
2336
  style?: string | undefined;
2315
2337
  elevenlabsVoiceId?: string | undefined;
2316
2338
  gender?: "neutral" | "female" | "male" | undefined;
@@ -2397,6 +2419,8 @@ declare const daemonConfigSchema: z.ZodObject<{
2397
2419
  contextStrategy?: "layered" | "planner" | undefined;
2398
2420
  gitlabAutoReply?: boolean | undefined;
2399
2421
  voice?: {
2422
+ system?: string | Record<string, string> | undefined;
2423
+ provider?: "system" | "elevenlabs" | undefined;
2400
2424
  style?: string | undefined;
2401
2425
  elevenlabsVoiceId?: string | undefined;
2402
2426
  gender?: "neutral" | "female" | "male" | undefined;
@@ -2465,6 +2489,8 @@ declare const daemonConfigSchema: z.ZodObject<{
2465
2489
  metadata?: Record<string, string | number | boolean> | undefined;
2466
2490
  }[] | undefined;
2467
2491
  voice?: {
2492
+ system?: string | Record<string, string> | undefined;
2493
+ provider?: "system" | "elevenlabs" | undefined;
2468
2494
  style?: string | undefined;
2469
2495
  elevenlabsVoiceId?: string | undefined;
2470
2496
  gender?: "neutral" | "female" | "male" | undefined;
@@ -3610,6 +3636,11 @@ declare const daemonConfigSchema: z.ZodObject<{
3610
3636
  * speaks for them, so their nodes need no ElevenLabs key. Unset fields
3611
3637
  * are derived from the agent card; see src/voice/mesh-voice.ts. */
3612
3638
  meshVoices: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3639
+ /** Overrides the global voice.provider for this agent. */
3640
+ provider: z.ZodOptional<z.ZodEnum<["system", "elevenlabs"]>>;
3641
+ /** See systemVoiceSchema. Unset: one is assigned, of the agent's
3642
+ * gender when set, different from every other agent's. */
3643
+ system: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
3613
3644
  elevenlabsVoiceId: z.ZodOptional<z.ZodString>;
3614
3645
  gender: z.ZodOptional<z.ZodEnum<["female", "male", "neutral"]>>;
3615
3646
  /** A few words on manner, e.g. "warm, upbeat, a little playful". */
@@ -3623,6 +3654,8 @@ declare const daemonConfigSchema: z.ZodObject<{
3623
3654
  /** What to call the agent aloud, e.g. "Atlas" for "Main Agent". */
3624
3655
  name: z.ZodOptional<z.ZodString>;
3625
3656
  }, "strip", z.ZodTypeAny, {
3657
+ system?: string | Record<string, string> | undefined;
3658
+ provider?: "system" | "elevenlabs" | undefined;
3626
3659
  name?: string | undefined;
3627
3660
  style?: string | undefined;
3628
3661
  elevenlabsVoiceId?: string | undefined;
@@ -3630,6 +3663,8 @@ declare const daemonConfigSchema: z.ZodObject<{
3630
3663
  intro?: string | undefined;
3631
3664
  narrate?: "all" | "on" | "off" | undefined;
3632
3665
  }, {
3666
+ system?: string | Record<string, string> | undefined;
3667
+ provider?: "system" | "elevenlabs" | undefined;
3633
3668
  name?: string | undefined;
3634
3669
  style?: string | undefined;
3635
3670
  elevenlabsVoiceId?: string | undefined;
@@ -3637,6 +3672,30 @@ declare const daemonConfigSchema: z.ZodObject<{
3637
3672
  intro?: string | undefined;
3638
3673
  narrate?: "all" | "on" | "off" | undefined;
3639
3674
  }>>>;
3675
+ /** How agents speak. The free system voices by default; ElevenLabs is an
3676
+ * opt-in upgrade. Each agent's `voice` block can override the provider
3677
+ * and pick its voice; see src/voice/agent-voice.ts. */
3678
+ voice: z.ZodDefault<z.ZodObject<{
3679
+ provider: z.ZodDefault<z.ZodEnum<["system", "elevenlabs"]>>;
3680
+ /** When ElevenLabs cannot speak (no key, an error): the system voice,
3681
+ * or silence. */
3682
+ fallback: z.ZodDefault<z.ZodEnum<["system", "none"]>>;
3683
+ /** The system voice for agents without one of their own (see
3684
+ * systemVoiceSchema). Unset: each agent gets its own. */
3685
+ system: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
3686
+ /** Language for assigned system voices, e.g. "en", "fr-FR". */
3687
+ locale: z.ZodDefault<z.ZodString>;
3688
+ }, "strip", z.ZodTypeAny, {
3689
+ provider: "system" | "elevenlabs";
3690
+ fallback: "system" | "none";
3691
+ locale: string;
3692
+ system?: string | Record<string, string> | undefined;
3693
+ }, {
3694
+ system?: string | Record<string, string> | undefined;
3695
+ provider?: "system" | "elevenlabs" | undefined;
3696
+ fallback?: "system" | "none" | undefined;
3697
+ locale?: string | undefined;
3698
+ }>>;
3640
3699
  business: z.ZodOptional<z.ZodObject<{
3641
3700
  enabled: z.ZodDefault<z.ZodBoolean>;
3642
3701
  timezone: z.ZodDefault<z.ZodString>;
@@ -4111,7 +4170,7 @@ declare const daemonConfigSchema: z.ZodObject<{
4111
4170
  port: z.ZodDefault<z.ZodNumber>;
4112
4171
  bind: z.ZodDefault<z.ZodString>;
4113
4172
  token: z.ZodOptional<z.ZodString>;
4114
- daemonUrl: z.ZodDefault<z.ZodString>;
4173
+ daemonUrl: z.ZodDefault<z.ZodString>; /** Overrides the global voice.provider for this agent. */
4115
4174
  daemons: z.ZodDefault<z.ZodArray<z.ZodObject<{
4116
4175
  name: z.ZodString;
4117
4176
  url: z.ZodString;
@@ -4963,6 +5022,8 @@ declare const daemonConfigSchema: z.ZodObject<{
4963
5022
  contextStrategy?: "layered" | "planner" | undefined;
4964
5023
  gitlabAutoReply?: boolean | undefined;
4965
5024
  voice?: {
5025
+ system?: string | Record<string, string> | undefined;
5026
+ provider?: "system" | "elevenlabs" | undefined;
4966
5027
  style?: string | undefined;
4967
5028
  elevenlabsVoiceId?: string | undefined;
4968
5029
  gender?: "neutral" | "female" | "male" | undefined;
@@ -4994,6 +5055,12 @@ declare const daemonConfigSchema: z.ZodObject<{
4994
5055
  interval: number;
4995
5056
  };
4996
5057
  };
5058
+ voice: {
5059
+ provider: "system" | "elevenlabs";
5060
+ fallback: "system" | "none";
5061
+ locale: string;
5062
+ system?: string | Record<string, string> | undefined;
5063
+ };
4997
5064
  node: {
4998
5065
  id: string;
4999
5066
  name: string;
@@ -5189,6 +5256,8 @@ declare const daemonConfigSchema: z.ZodObject<{
5189
5256
  } | undefined;
5190
5257
  };
5191
5258
  meshVoices: Record<string, {
5259
+ system?: string | Record<string, string> | undefined;
5260
+ provider?: "system" | "elevenlabs" | undefined;
5192
5261
  name?: string | undefined;
5193
5262
  style?: string | undefined;
5194
5263
  elevenlabsVoiceId?: string | undefined;
@@ -5491,6 +5560,8 @@ declare const daemonConfigSchema: z.ZodObject<{
5491
5560
  metadata?: Record<string, string | number | boolean> | undefined;
5492
5561
  }[] | undefined;
5493
5562
  voice?: {
5563
+ system?: string | Record<string, string> | undefined;
5564
+ provider?: "system" | "elevenlabs" | undefined;
5494
5565
  style?: string | undefined;
5495
5566
  elevenlabsVoiceId?: string | undefined;
5496
5567
  gender?: "neutral" | "female" | "male" | undefined;
@@ -5522,6 +5593,12 @@ declare const daemonConfigSchema: z.ZodObject<{
5522
5593
  interval?: number | undefined;
5523
5594
  } | undefined;
5524
5595
  } | undefined;
5596
+ voice?: {
5597
+ system?: string | Record<string, string> | undefined;
5598
+ provider?: "system" | "elevenlabs" | undefined;
5599
+ fallback?: "system" | "none" | undefined;
5600
+ locale?: string | undefined;
5601
+ } | undefined;
5525
5602
  graph?: {
5526
5603
  enabled?: boolean | undefined;
5527
5604
  draftAgent?: string | undefined;
@@ -5711,6 +5788,8 @@ declare const daemonConfigSchema: z.ZodObject<{
5711
5788
  } | undefined;
5712
5789
  } | undefined;
5713
5790
  meshVoices?: Record<string, {
5791
+ system?: string | Record<string, string> | undefined;
5792
+ provider?: "system" | "elevenlabs" | undefined;
5714
5793
  name?: string | undefined;
5715
5794
  style?: string | undefined;
5716
5795
  elevenlabsVoiceId?: string | undefined;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{a as L}from"./chunk-W5C2GDNC.js";import{$ as Tt,_ as bt,a as St,aa as Mt,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt}from"./chunk-3CGB43RZ.js";import"./chunk-F6CNF7V3.js";import"./chunk-YAER4PD6.js";import"./chunk-V7FYSZSV.js";import"./chunk-ZVP6GB4G.js";import{J as yt,h as lt,i as ct,j as dt,k as mt,l as pt}from"./chunk-ZA7FEJKR.js";import"./chunk-AOVH27BF.js";import"./chunk-VMDA2SX2.js";import"./chunk-QLTM3F7M.js";import{h as ut}from"./chunk-GM5PFIJU.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-BTMNOTTO.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-3SCPRYJB.js";import"./chunk-WPMX3VGI.js";import"./chunk-K33GIBSE.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-COY76JUG.js";import"./chunk-TRAVSDZN.js";import"./chunk-DWADWDMU.js";import"./chunk-77OV7346.js";import"./chunk-VWTBHLMX.js";import{a as gt,b as ft,e as ht}from"./chunk-DPNBGANY.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-4LDSMWKQ.js";import"./chunk-AJ5RMU7X.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-AXYREZLV.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.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-LCIREYTD.js";import{a as m,b as G}from"./chunk-L2WSPY6S.js";import{a as Fe,b as Le,c as A,d as De}from"./chunk-VDMYBPYB.js";import{a as Ke,b as Je,e as We}from"./chunk-DSYKYZMT.js";import{e as tt,g as st,h as ot,j as nt}from"./chunk-EBWWNNJF.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.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-W5C2GDNC.js";import{a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,ga as bt,ha as Tt,ia as Mt}from"./chunk-KZPHCJMW.js";import"./chunk-F6CNF7V3.js";import"./chunk-FAJEBVZE.js";import"./chunk-V7FYSZSV.js";import"./chunk-ZVP6GB4G.js";import{J as yt,h as lt,i as ct,j as dt,k as mt,l as pt}from"./chunk-DIKZWTL5.js";import"./chunk-P7LNYB53.js";import"./chunk-VMDA2SX2.js";import"./chunk-QLTM3F7M.js";import{h as ut}from"./chunk-NZ6AQIKJ.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-WBGROLOX.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-3SCPRYJB.js";import"./chunk-WPMX3VGI.js";import"./chunk-K33GIBSE.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-B32HVIDN.js";import"./chunk-X763UOES.js";import"./chunk-DWADWDMU.js";import"./chunk-77OV7346.js";import"./chunk-VWTBHLMX.js";import{a as gt,b as ft,e as ht}from"./chunk-RCVGIKC2.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-RQKUQOFC.js";import"./chunk-AJ5RMU7X.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-H4MIYENA.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.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-LCIREYTD.js";import{a as m,b as G}from"./chunk-L2WSPY6S.js";import{a as Fe,b as Le,c as A,d as De}from"./chunk-VDMYBPYB.js";import{a as Ke,b as Je,e as We}from"./chunk-DSYKYZMT.js";import{e as tt,g as st,h as ot,j as nt}from"./chunk-IAG6FI3Q.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.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-BOKE5M5S.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).