agentix-cli 0.130.0 → 0.131.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 (195) hide show
  1. package/dist/{App-DWSHIDN6.js → App-WZ3HAKES.js} +2 -2
  2. package/dist/{ChatApp-CROSI7JM.js → ChatApp-K4HDJL2S.js} +2 -2
  3. package/dist/absorb-eval-ER27DHHK.js +2 -0
  4. package/dist/{agent-4AQOFPRD.js → agent-AQSVISXX.js} +2 -2
  5. package/dist/article-sync-4NOPOQU7.js +2 -0
  6. package/dist/{board-dashboard-54A3XTV5.js → board-dashboard-3AI2Z2SP.js} +243 -210
  7. package/dist/board-dashboard-3AI2Z2SP.js.map +1 -0
  8. package/dist/chunk-2SXF66O6.js +55 -0
  9. package/dist/chunk-2SXF66O6.js.map +1 -0
  10. package/dist/{chunk-5VKFIBXY.js → chunk-2YB2G2BP.js} +2 -2
  11. package/dist/chunk-2ZDV3DCT.js +52 -0
  12. package/dist/chunk-2ZDV3DCT.js.map +1 -0
  13. package/dist/chunk-3UOTLMXD.js +4 -0
  14. package/dist/chunk-3UOTLMXD.js.map +1 -0
  15. package/dist/chunk-5BI2T3WD.js +3 -0
  16. package/dist/chunk-5BI2T3WD.js.map +1 -0
  17. package/dist/{chunk-242MPMJX.js → chunk-6O6NW3ZG.js} +2 -2
  18. package/dist/chunk-6TURWSMN.js +3 -0
  19. package/dist/{chunk-VD7IO653.js.map → chunk-6TURWSMN.js.map} +1 -1
  20. package/dist/{chunk-BGG3ZSMW.js → chunk-7LN4VKDU.js} +14 -16
  21. package/dist/chunk-7LN4VKDU.js.map +1 -0
  22. package/dist/chunk-7UPFZJIT.js +861 -0
  23. package/dist/chunk-7UPFZJIT.js.map +1 -0
  24. package/dist/chunk-7VLLZQ3N.js +2 -0
  25. package/dist/chunk-7VLLZQ3N.js.map +1 -0
  26. package/dist/{chunk-TJDNS5G6.js → chunk-AKOXTIJS.js} +2 -2
  27. package/dist/{chunk-U2EHJZAZ.js → chunk-APZIH3AY.js} +2 -2
  28. package/dist/{chunk-Q5FEWCS5.js → chunk-B2Q3PTPS.js} +2 -2
  29. package/dist/{chunk-SCJ5ZXEN.js → chunk-B2QYMUTD.js} +2 -2
  30. package/dist/{chunk-SCJ5ZXEN.js.map → chunk-B2QYMUTD.js.map} +1 -1
  31. package/dist/chunk-BIJHMWXK.js +21 -0
  32. package/dist/chunk-BIJHMWXK.js.map +1 -0
  33. package/dist/{chunk-4VDA4UM7.js → chunk-BKHIR2YJ.js} +2 -2
  34. package/dist/chunk-CBFBGN7J.js +54 -0
  35. package/dist/chunk-CBFBGN7J.js.map +1 -0
  36. package/dist/{chunk-QXZLYCEZ.js → chunk-CL33CRH5.js} +3 -3
  37. package/dist/chunk-CL33CRH5.js.map +1 -0
  38. package/dist/{chunk-N2YSVZML.js → chunk-CSWGYSC4.js} +2 -2
  39. package/dist/{chunk-5KKXJZZ4.js → chunk-E2VDBT3T.js} +2 -2
  40. package/dist/{chunk-WX67I2KN.js → chunk-ERNBJLIQ.js} +2 -2
  41. package/dist/{chunk-I4GT27UO.js → chunk-IA7INHXY.js} +2 -2
  42. package/dist/chunk-IMLAPB7G.js +4 -0
  43. package/dist/chunk-IMLAPB7G.js.map +1 -0
  44. package/dist/{chunk-3PGPN323.js → chunk-JP5OAMWQ.js} +1 -1
  45. package/dist/chunk-JP5OAMWQ.js.map +1 -0
  46. package/dist/chunk-KFIJDLQ5.js +3 -0
  47. package/dist/chunk-KFIJDLQ5.js.map +1 -0
  48. package/dist/{chunk-QPYN2UTV.js → chunk-KIYV4ZHG.js} +2 -2
  49. package/dist/{chunk-YHCPBMRH.js → chunk-KRK7OOTK.js} +2 -2
  50. package/dist/{chunk-MZJY26FW.js → chunk-L2WVQREN.js} +2 -2
  51. package/dist/{chunk-LJWEJ6UZ.js → chunk-L4ALHWII.js} +2 -2
  52. package/dist/{chunk-UBA2QJCY.js → chunk-L4ZS4HGJ.js} +268 -251
  53. package/dist/chunk-L4ZS4HGJ.js.map +1 -0
  54. package/dist/chunk-MCBTVNPX.js +152 -0
  55. package/dist/chunk-MCBTVNPX.js.map +1 -0
  56. package/dist/{chunk-RKB7FQJF.js → chunk-MFIM5Y3J.js} +2 -2
  57. package/dist/chunk-MRIVENBY.js +2 -0
  58. package/dist/{article-sync-TLZTHRZB.js.map → chunk-MRIVENBY.js.map} +1 -1
  59. package/dist/{chunk-W2HEJKJR.js → chunk-VSL2SSBH.js} +6 -6
  60. package/dist/{chunk-LLLBH2HH.js → chunk-WKQQIYOE.js} +2 -2
  61. package/dist/{chunk-TN5A7PLU.js → chunk-YA6E47BR.js} +2 -2
  62. package/dist/{chunk-HF4OXA5L.js → chunk-YPCZ5TNK.js} +2 -2
  63. package/dist/{chunk-J4I5ZJ2V.js → chunk-YQRWUF4Y.js} +2 -2
  64. package/dist/{chunk-NR7WLMNI.js → chunk-YVR6652A.js} +2 -2
  65. package/dist/cli.js +1 -1
  66. package/dist/{client-KGWYROLX.js → client-YIR3ELVN.js} +2 -2
  67. package/dist/config-4DOJYA2K.js +2 -0
  68. package/dist/{config-mutate-7BLOYRZF.js → config-mutate-KDRHKQE4.js} +2 -2
  69. package/dist/config-mutator-4PPBACWU.js +2 -0
  70. package/dist/{contributions-DLUQEAGL.js → contributions-MTKXXLIP.js} +2 -2
  71. package/dist/{contributions-DLUQEAGL.js.map → contributions-MTKXXLIP.js.map} +1 -1
  72. package/dist/{doctor-32YP26SJ.js → doctor-FJ5RCG4J.js} +2 -2
  73. package/dist/enrich-NH3WHKD6.js +16 -0
  74. package/dist/enrich-NH3WHKD6.js.map +1 -0
  75. package/dist/{follow-up-tool-AQ7NYZZR.js → follow-up-tool-SVZDSUIU.js} +2 -2
  76. package/dist/graph-EXDH7EPZ.js +2 -0
  77. package/dist/hub-CF4VFSRT.js +2 -0
  78. package/dist/index.d.ts +484 -0
  79. package/dist/index.js +1 -1
  80. package/dist/index.js.map +1 -1
  81. package/dist/load-5DNMGHFW.js +2 -0
  82. package/dist/model-call-BGTDPWZD.js +2 -0
  83. package/dist/notes-WJJEJ4CJ.js +2 -0
  84. package/dist/processes-M3N3S7V5.js +2 -0
  85. package/dist/{program-FESSM5TY.js → program-ZPNEAACQ.js} +231 -229
  86. package/dist/program-ZPNEAACQ.js.map +1 -0
  87. package/dist/{promote-R7FKN5SY.js → promote-G6BOY7K5.js} +2 -2
  88. package/dist/query-H24BI3BI.js +2 -0
  89. package/dist/query-settings-IJB3QMDW.js +3 -0
  90. package/dist/query-settings-IJB3QMDW.js.map +1 -0
  91. package/dist/registry-TAUHYJCK.js +2 -0
  92. package/dist/{request-planner-LEUMSI2K.js → request-planner-V3R5J3V4.js} +2 -2
  93. package/dist/{review-candidates-MOSGA4IS.js → review-candidates-TC7RJB4W.js} +2 -2
  94. package/dist/roster-IRXP32XF.js +2 -0
  95. package/dist/{rotation-memo-7VLREGS6.js → rotation-memo-2G6N3VF3.js} +2 -2
  96. package/dist/{routing-FSJ42RZH.js → routing-XQD74ERK.js} +2 -2
  97. package/dist/schedule-tool-U6KLY5MT.js +2 -0
  98. package/dist/{scheduler-6AQDHQI4.js → scheduler-WOOXIOER.js} +2 -2
  99. package/dist/scheduler-WOOXIOER.js.map +1 -0
  100. package/dist/{seat-O37EQRHE.js → seat-B75JIAS3.js} +2 -2
  101. package/dist/seat-B75JIAS3.js.map +1 -0
  102. package/dist/{select-XO2STSQN.js → select-I6BSBQXP.js} +2 -2
  103. package/dist/{set-enabled-ZNEPEFGF.js → set-enabled-THNVITGU.js} +2 -2
  104. package/dist/summaries-BIRSNWGH.js +2 -0
  105. package/dist/summaries-BIRSNWGH.js.map +1 -0
  106. package/dist/{tool-6KMEAY4U.js → tool-CEBIS6GK.js} +2 -2
  107. package/dist/{tool-PH45YCO5.js → tool-LFWTZHB7.js} +2 -2
  108. package/dist/wiki-3ATPAHC2.js +2 -0
  109. package/dist/wiki-3ATPAHC2.js.map +1 -0
  110. package/dist/workspace-env-ROH45HXN.js +2 -0
  111. package/dist/workspace-env-ROH45HXN.js.map +1 -0
  112. package/package.json +1 -1
  113. package/dist/absorb-eval-MNGQ752C.js +0 -2
  114. package/dist/article-sync-TLZTHRZB.js +0 -2
  115. package/dist/board-dashboard-54A3XTV5.js.map +0 -1
  116. package/dist/chunk-3PGPN323.js.map +0 -1
  117. package/dist/chunk-AERIU4AH.js +0 -892
  118. package/dist/chunk-AERIU4AH.js.map +0 -1
  119. package/dist/chunk-BGG3ZSMW.js.map +0 -1
  120. package/dist/chunk-EO4DEEXL.js +0 -2
  121. package/dist/chunk-EO4DEEXL.js.map +0 -1
  122. package/dist/chunk-I4OQQRY2.js +0 -55
  123. package/dist/chunk-I4OQQRY2.js.map +0 -1
  124. package/dist/chunk-JE5EJGGD.js +0 -4
  125. package/dist/chunk-JE5EJGGD.js.map +0 -1
  126. package/dist/chunk-QX2B4TJU.js +0 -3
  127. package/dist/chunk-QX2B4TJU.js.map +0 -1
  128. package/dist/chunk-QXZLYCEZ.js.map +0 -1
  129. package/dist/chunk-UBA2QJCY.js.map +0 -1
  130. package/dist/chunk-UUFJQMHE.js +0 -54
  131. package/dist/chunk-UUFJQMHE.js.map +0 -1
  132. package/dist/chunk-VD7IO653.js +0 -3
  133. package/dist/config-FNTLKUGA.js +0 -2
  134. package/dist/config-mutator-NCLHYPJ3.js +0 -2
  135. package/dist/graph-5ZJ7YACP.js +0 -2
  136. package/dist/hub-Q3I4ALQ2.js +0 -2
  137. package/dist/load-NK3MIYXP.js +0 -2
  138. package/dist/notes-TMAGEDUS.js +0 -2
  139. package/dist/processes-5MP32QZT.js +0 -2
  140. package/dist/program-FESSM5TY.js.map +0 -1
  141. package/dist/query-YTKTNXCQ.js +0 -2
  142. package/dist/registry-7L4RUATA.js +0 -2
  143. package/dist/schedule-tool-4T2VZIDW.js +0 -2
  144. package/dist/wiki-4HD4FZ4W.js +0 -2
  145. /package/dist/{App-DWSHIDN6.js.map → App-WZ3HAKES.js.map} +0 -0
  146. /package/dist/{ChatApp-CROSI7JM.js.map → ChatApp-K4HDJL2S.js.map} +0 -0
  147. /package/dist/{absorb-eval-MNGQ752C.js.map → absorb-eval-ER27DHHK.js.map} +0 -0
  148. /package/dist/{agent-4AQOFPRD.js.map → agent-AQSVISXX.js.map} +0 -0
  149. /package/dist/{client-KGWYROLX.js.map → article-sync-4NOPOQU7.js.map} +0 -0
  150. /package/dist/{chunk-5VKFIBXY.js.map → chunk-2YB2G2BP.js.map} +0 -0
  151. /package/dist/{chunk-242MPMJX.js.map → chunk-6O6NW3ZG.js.map} +0 -0
  152. /package/dist/{chunk-TJDNS5G6.js.map → chunk-AKOXTIJS.js.map} +0 -0
  153. /package/dist/{chunk-U2EHJZAZ.js.map → chunk-APZIH3AY.js.map} +0 -0
  154. /package/dist/{chunk-Q5FEWCS5.js.map → chunk-B2Q3PTPS.js.map} +0 -0
  155. /package/dist/{chunk-4VDA4UM7.js.map → chunk-BKHIR2YJ.js.map} +0 -0
  156. /package/dist/{chunk-N2YSVZML.js.map → chunk-CSWGYSC4.js.map} +0 -0
  157. /package/dist/{chunk-5KKXJZZ4.js.map → chunk-E2VDBT3T.js.map} +0 -0
  158. /package/dist/{chunk-WX67I2KN.js.map → chunk-ERNBJLIQ.js.map} +0 -0
  159. /package/dist/{chunk-I4GT27UO.js.map → chunk-IA7INHXY.js.map} +0 -0
  160. /package/dist/{chunk-QPYN2UTV.js.map → chunk-KIYV4ZHG.js.map} +0 -0
  161. /package/dist/{chunk-YHCPBMRH.js.map → chunk-KRK7OOTK.js.map} +0 -0
  162. /package/dist/{chunk-MZJY26FW.js.map → chunk-L2WVQREN.js.map} +0 -0
  163. /package/dist/{chunk-LJWEJ6UZ.js.map → chunk-L4ALHWII.js.map} +0 -0
  164. /package/dist/{chunk-RKB7FQJF.js.map → chunk-MFIM5Y3J.js.map} +0 -0
  165. /package/dist/{chunk-W2HEJKJR.js.map → chunk-VSL2SSBH.js.map} +0 -0
  166. /package/dist/{chunk-LLLBH2HH.js.map → chunk-WKQQIYOE.js.map} +0 -0
  167. /package/dist/{chunk-TN5A7PLU.js.map → chunk-YA6E47BR.js.map} +0 -0
  168. /package/dist/{chunk-HF4OXA5L.js.map → chunk-YPCZ5TNK.js.map} +0 -0
  169. /package/dist/{chunk-J4I5ZJ2V.js.map → chunk-YQRWUF4Y.js.map} +0 -0
  170. /package/dist/{chunk-NR7WLMNI.js.map → chunk-YVR6652A.js.map} +0 -0
  171. /package/dist/{config-FNTLKUGA.js.map → client-YIR3ELVN.js.map} +0 -0
  172. /package/dist/{config-mutate-7BLOYRZF.js.map → config-4DOJYA2K.js.map} +0 -0
  173. /package/dist/{config-mutator-NCLHYPJ3.js.map → config-mutate-KDRHKQE4.js.map} +0 -0
  174. /package/dist/{doctor-32YP26SJ.js.map → config-mutator-4PPBACWU.js.map} +0 -0
  175. /package/dist/{graph-5ZJ7YACP.js.map → doctor-FJ5RCG4J.js.map} +0 -0
  176. /package/dist/{follow-up-tool-AQ7NYZZR.js.map → follow-up-tool-SVZDSUIU.js.map} +0 -0
  177. /package/dist/{hub-Q3I4ALQ2.js.map → graph-EXDH7EPZ.js.map} +0 -0
  178. /package/dist/{load-NK3MIYXP.js.map → hub-CF4VFSRT.js.map} +0 -0
  179. /package/dist/{notes-TMAGEDUS.js.map → load-5DNMGHFW.js.map} +0 -0
  180. /package/dist/{processes-5MP32QZT.js.map → model-call-BGTDPWZD.js.map} +0 -0
  181. /package/dist/{promote-R7FKN5SY.js.map → notes-WJJEJ4CJ.js.map} +0 -0
  182. /package/dist/{query-YTKTNXCQ.js.map → processes-M3N3S7V5.js.map} +0 -0
  183. /package/dist/{registry-7L4RUATA.js.map → promote-G6BOY7K5.js.map} +0 -0
  184. /package/dist/{routing-FSJ42RZH.js.map → query-H24BI3BI.js.map} +0 -0
  185. /package/dist/{schedule-tool-4T2VZIDW.js.map → registry-TAUHYJCK.js.map} +0 -0
  186. /package/dist/{request-planner-LEUMSI2K.js.map → request-planner-V3R5J3V4.js.map} +0 -0
  187. /package/dist/{review-candidates-MOSGA4IS.js.map → review-candidates-TC7RJB4W.js.map} +0 -0
  188. /package/dist/{scheduler-6AQDHQI4.js.map → roster-IRXP32XF.js.map} +0 -0
  189. /package/dist/{rotation-memo-7VLREGS6.js.map → rotation-memo-2G6N3VF3.js.map} +0 -0
  190. /package/dist/{seat-O37EQRHE.js.map → routing-XQD74ERK.js.map} +0 -0
  191. /package/dist/{wiki-4HD4FZ4W.js.map → schedule-tool-U6KLY5MT.js.map} +0 -0
  192. /package/dist/{select-XO2STSQN.js.map → select-I6BSBQXP.js.map} +0 -0
  193. /package/dist/{set-enabled-ZNEPEFGF.js.map → set-enabled-THNVITGU.js.map} +0 -0
  194. /package/dist/{tool-6KMEAY4U.js.map → tool-CEBIS6GK.js.map} +0 -0
  195. /package/dist/{tool-PH45YCO5.js.map → tool-LFWTZHB7.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -3111,14 +3111,338 @@ declare const daemonConfigSchema: z.ZodObject<{
3111
3111
  /** `wiki query` also searches other agents' readable pages and the
3112
3112
  * root wiki's own pages. */
3113
3113
  shared: z.ZodDefault<z.ZodBoolean>;
3114
+ /** How pages are picked (#855). `summaries`: from the one-line page
3115
+ * summaries `agentx wiki summarize` writes, then a live read.
3116
+ * `catalog`: from titles, then a walk along the pages' links.
3117
+ * `auto`: `summaries` once summaries exist, `catalog` until then. */
3118
+ method: z.ZodDefault<z.ZodEnum<["auto", "summaries", "catalog"]>>;
3119
+ /** The agent's own pages shown to the model that picks. */
3120
+ candidates: z.ZodDefault<z.ZodNumber>;
3121
+ /** Other agents' pages shown beside them. */
3122
+ sharedCandidates: z.ZodDefault<z.ZodNumber>;
3123
+ /** Most pages opened for one answer. */
3124
+ maxPages: z.ZodDefault<z.ZodNumber>;
3125
+ /** Characters of each opened page given to the answer. */
3126
+ pageChars: z.ZodDefault<z.ZodNumber>;
3127
+ /** Model that picks pages from the summary lines. */
3128
+ navigatorModel: z.ZodDefault<z.ZodString>;
3129
+ /** Model that writes the answer. */
3130
+ answerModel: z.ZodDefault<z.ZodString>;
3131
+ /** Before the answer, confirm at the source what may have changed
3132
+ * since the pages were written. A model names the reads; code runs
3133
+ * them, and each is one HTTP GET. Nothing runs until `sources`
3134
+ * lists where to read. */
3135
+ live: z.ZodDefault<z.ZodObject<{
3136
+ enabled: z.ZodDefault<z.ZodBoolean>;
3137
+ /** Most reads for one question. */
3138
+ maxReads: z.ZodDefault<z.ZodNumber>;
3139
+ /** Timeout of one read, in milliseconds. */
3140
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
3141
+ /** Model that names the reads. */
3142
+ plannerModel: z.ZodDefault<z.ZodString>;
3143
+ sources: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3144
+ repos: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
3145
+ repo: z.ZodString;
3146
+ /** What lives there, shown to the model so it names the right one. */
3147
+ about: z.ZodOptional<z.ZodString>;
3148
+ }, "strip", z.ZodTypeAny, {
3149
+ repo: string;
3150
+ about?: string | undefined;
3151
+ }, {
3152
+ repo: string;
3153
+ about?: string | undefined;
3154
+ }>]>, "many">;
3155
+ /** Name of the environment variable that holds the token. */
3156
+ tokenEnv: z.ZodOptional<z.ZodString>;
3157
+ /** File whose first line is the token. */
3158
+ tokenFile: z.ZodOptional<z.ZodString>;
3159
+ type: z.ZodLiteral<"github">;
3160
+ apiUrl: z.ZodDefault<z.ZodString>;
3161
+ }, "strip", z.ZodTypeAny, {
3162
+ type: "github";
3163
+ apiUrl: string;
3164
+ repos: (string | {
3165
+ repo: string;
3166
+ about?: string | undefined;
3167
+ })[];
3168
+ tokenEnv?: string | undefined;
3169
+ tokenFile?: string | undefined;
3170
+ }, {
3171
+ type: "github";
3172
+ repos: (string | {
3173
+ repo: string;
3174
+ about?: string | undefined;
3175
+ })[];
3176
+ tokenEnv?: string | undefined;
3177
+ tokenFile?: string | undefined;
3178
+ apiUrl?: string | undefined;
3179
+ }>, z.ZodObject<{
3180
+ repos: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
3181
+ repo: z.ZodString;
3182
+ /** What lives there, shown to the model so it names the right one. */
3183
+ about: z.ZodOptional<z.ZodString>;
3184
+ }, "strip", z.ZodTypeAny, {
3185
+ repo: string;
3186
+ about?: string | undefined;
3187
+ }, {
3188
+ repo: string;
3189
+ about?: string | undefined;
3190
+ }>]>, "many">;
3191
+ /** Name of the environment variable that holds the token. */
3192
+ tokenEnv: z.ZodOptional<z.ZodString>;
3193
+ /** File whose first line is the token. */
3194
+ tokenFile: z.ZodOptional<z.ZodString>;
3195
+ type: z.ZodLiteral<"gitlab">;
3196
+ /** The GitLab host. Unset: `channels.gitlab.host`. */
3197
+ url: z.ZodOptional<z.ZodString>;
3198
+ }, "strip", z.ZodTypeAny, {
3199
+ type: "gitlab";
3200
+ repos: (string | {
3201
+ repo: string;
3202
+ about?: string | undefined;
3203
+ })[];
3204
+ url?: string | undefined;
3205
+ tokenEnv?: string | undefined;
3206
+ tokenFile?: string | undefined;
3207
+ }, {
3208
+ type: "gitlab";
3209
+ repos: (string | {
3210
+ repo: string;
3211
+ about?: string | undefined;
3212
+ })[];
3213
+ url?: string | undefined;
3214
+ tokenEnv?: string | undefined;
3215
+ tokenFile?: string | undefined;
3216
+ }>, z.ZodObject<{
3217
+ type: z.ZodLiteral<"agentx">;
3218
+ /** The daemon to ask. Unset: this node. */
3219
+ url: z.ZodOptional<z.ZodString>;
3220
+ /** Also ask each mesh peer the daemon lists. */
3221
+ peers: z.ZodDefault<z.ZodBoolean>;
3222
+ }, "strip", z.ZodTypeAny, {
3223
+ type: "agentx";
3224
+ peers: boolean;
3225
+ url?: string | undefined;
3226
+ }, {
3227
+ type: "agentx";
3228
+ url?: string | undefined;
3229
+ peers?: boolean | undefined;
3230
+ }>]>, "many">>;
3231
+ }, "strip", z.ZodTypeAny, {
3232
+ enabled: boolean;
3233
+ timeoutMs: number;
3234
+ maxReads: number;
3235
+ plannerModel: string;
3236
+ sources: ({
3237
+ type: "github";
3238
+ apiUrl: string;
3239
+ repos: (string | {
3240
+ repo: string;
3241
+ about?: string | undefined;
3242
+ })[];
3243
+ tokenEnv?: string | undefined;
3244
+ tokenFile?: string | undefined;
3245
+ } | {
3246
+ type: "gitlab";
3247
+ repos: (string | {
3248
+ repo: string;
3249
+ about?: string | undefined;
3250
+ })[];
3251
+ url?: string | undefined;
3252
+ tokenEnv?: string | undefined;
3253
+ tokenFile?: string | undefined;
3254
+ } | {
3255
+ type: "agentx";
3256
+ peers: boolean;
3257
+ url?: string | undefined;
3258
+ })[];
3259
+ }, {
3260
+ enabled?: boolean | undefined;
3261
+ timeoutMs?: number | undefined;
3262
+ maxReads?: number | undefined;
3263
+ plannerModel?: string | undefined;
3264
+ sources?: ({
3265
+ type: "github";
3266
+ repos: (string | {
3267
+ repo: string;
3268
+ about?: string | undefined;
3269
+ })[];
3270
+ tokenEnv?: string | undefined;
3271
+ tokenFile?: string | undefined;
3272
+ apiUrl?: string | undefined;
3273
+ } | {
3274
+ type: "gitlab";
3275
+ repos: (string | {
3276
+ repo: string;
3277
+ about?: string | undefined;
3278
+ })[];
3279
+ url?: string | undefined;
3280
+ tokenEnv?: string | undefined;
3281
+ tokenFile?: string | undefined;
3282
+ } | {
3283
+ type: "agentx";
3284
+ url?: string | undefined;
3285
+ peers?: boolean | undefined;
3286
+ })[] | undefined;
3287
+ }>>;
3114
3288
  }, "strip", z.ZodTypeAny, {
3289
+ method: "auto" | "summaries" | "catalog";
3115
3290
  shared: boolean;
3291
+ candidates: number;
3292
+ sharedCandidates: number;
3293
+ maxPages: number;
3294
+ pageChars: number;
3295
+ navigatorModel: string;
3296
+ answerModel: string;
3297
+ live: {
3298
+ enabled: boolean;
3299
+ timeoutMs: number;
3300
+ maxReads: number;
3301
+ plannerModel: string;
3302
+ sources: ({
3303
+ type: "github";
3304
+ apiUrl: string;
3305
+ repos: (string | {
3306
+ repo: string;
3307
+ about?: string | undefined;
3308
+ })[];
3309
+ tokenEnv?: string | undefined;
3310
+ tokenFile?: string | undefined;
3311
+ } | {
3312
+ type: "gitlab";
3313
+ repos: (string | {
3314
+ repo: string;
3315
+ about?: string | undefined;
3316
+ })[];
3317
+ url?: string | undefined;
3318
+ tokenEnv?: string | undefined;
3319
+ tokenFile?: string | undefined;
3320
+ } | {
3321
+ type: "agentx";
3322
+ peers: boolean;
3323
+ url?: string | undefined;
3324
+ })[];
3325
+ };
3116
3326
  }, {
3327
+ method?: "auto" | "summaries" | "catalog" | undefined;
3117
3328
  shared?: boolean | undefined;
3329
+ candidates?: number | undefined;
3330
+ sharedCandidates?: number | undefined;
3331
+ maxPages?: number | undefined;
3332
+ pageChars?: number | undefined;
3333
+ navigatorModel?: string | undefined;
3334
+ answerModel?: string | undefined;
3335
+ live?: {
3336
+ enabled?: boolean | undefined;
3337
+ timeoutMs?: number | undefined;
3338
+ maxReads?: number | undefined;
3339
+ plannerModel?: string | undefined;
3340
+ sources?: ({
3341
+ type: "github";
3342
+ repos: (string | {
3343
+ repo: string;
3344
+ about?: string | undefined;
3345
+ })[];
3346
+ tokenEnv?: string | undefined;
3347
+ tokenFile?: string | undefined;
3348
+ apiUrl?: string | undefined;
3349
+ } | {
3350
+ type: "gitlab";
3351
+ repos: (string | {
3352
+ repo: string;
3353
+ about?: string | undefined;
3354
+ })[];
3355
+ url?: string | undefined;
3356
+ tokenEnv?: string | undefined;
3357
+ tokenFile?: string | undefined;
3358
+ } | {
3359
+ type: "agentx";
3360
+ url?: string | undefined;
3361
+ peers?: boolean | undefined;
3362
+ })[] | undefined;
3363
+ } | undefined;
3364
+ }>>;
3365
+ /** One-line page summaries `wiki query` picks pages from (#855). */
3366
+ summaries: z.ZodDefault<z.ZodObject<{
3367
+ model: z.ZodDefault<z.ZodString>;
3368
+ /** Pages per model call. */
3369
+ batchSize: z.ZodDefault<z.ZodNumber>;
3370
+ /** Longest summary, in words. */
3371
+ maxWords: z.ZodDefault<z.ZodNumber>;
3372
+ /** When `agentx wiki summarize` runs on its own (cron, 5 fields).
3373
+ * Unset: no job is added. */
3374
+ schedule: z.ZodOptional<z.ZodString>;
3375
+ timezone: z.ZodDefault<z.ZodString>;
3376
+ /** Agent the job is filed under. Unset: `node.defaultAgent`, else
3377
+ * the first agent. */
3378
+ agent: z.ZodOptional<z.ZodString>;
3379
+ }, "strip", z.ZodTypeAny, {
3380
+ model: string;
3381
+ timezone: string;
3382
+ batchSize: number;
3383
+ maxWords: number;
3384
+ agent?: string | undefined;
3385
+ schedule?: string | undefined;
3386
+ }, {
3387
+ model?: string | undefined;
3388
+ agent?: string | undefined;
3389
+ schedule?: string | undefined;
3390
+ timezone?: string | undefined;
3391
+ batchSize?: number | undefined;
3392
+ maxWords?: number | undefined;
3393
+ }>>;
3394
+ /** The chat bubble on every wiki page: the owner types an instruction and
3395
+ * an agent researches it and edits the open page. */
3396
+ curator: z.ZodDefault<z.ZodObject<{
3397
+ enabled: z.ZodDefault<z.ZodBoolean>;
3398
+ /** Agent that answers. Unset: the page's owner agent. */
3399
+ agent: z.ZodOptional<z.ZodString>;
3400
+ }, "strip", z.ZodTypeAny, {
3401
+ enabled: boolean;
3402
+ agent?: string | undefined;
3403
+ }, {
3404
+ enabled?: boolean | undefined;
3405
+ agent?: string | undefined;
3118
3406
  }>>;
3119
3407
  }, "strip", z.ZodTypeAny, {
3120
3408
  query: {
3409
+ method: "auto" | "summaries" | "catalog";
3121
3410
  shared: boolean;
3411
+ candidates: number;
3412
+ sharedCandidates: number;
3413
+ maxPages: number;
3414
+ pageChars: number;
3415
+ navigatorModel: string;
3416
+ answerModel: string;
3417
+ live: {
3418
+ enabled: boolean;
3419
+ timeoutMs: number;
3420
+ maxReads: number;
3421
+ plannerModel: string;
3422
+ sources: ({
3423
+ type: "github";
3424
+ apiUrl: string;
3425
+ repos: (string | {
3426
+ repo: string;
3427
+ about?: string | undefined;
3428
+ })[];
3429
+ tokenEnv?: string | undefined;
3430
+ tokenFile?: string | undefined;
3431
+ } | {
3432
+ type: "gitlab";
3433
+ repos: (string | {
3434
+ repo: string;
3435
+ about?: string | undefined;
3436
+ })[];
3437
+ url?: string | undefined;
3438
+ tokenEnv?: string | undefined;
3439
+ tokenFile?: string | undefined;
3440
+ } | {
3441
+ type: "agentx";
3442
+ peers: boolean;
3443
+ url?: string | undefined;
3444
+ })[];
3445
+ };
3122
3446
  };
3123
3447
  contributions: {
3124
3448
  model: string;
@@ -3127,9 +3451,57 @@ declare const daemonConfigSchema: z.ZodObject<{
3127
3451
  maxCostUsd: number;
3128
3452
  mergeSchedule: string;
3129
3453
  };
3454
+ summaries: {
3455
+ model: string;
3456
+ timezone: string;
3457
+ batchSize: number;
3458
+ maxWords: number;
3459
+ agent?: string | undefined;
3460
+ schedule?: string | undefined;
3461
+ };
3462
+ curator: {
3463
+ enabled: boolean;
3464
+ agent?: string | undefined;
3465
+ };
3130
3466
  }, {
3131
3467
  query?: {
3468
+ method?: "auto" | "summaries" | "catalog" | undefined;
3132
3469
  shared?: boolean | undefined;
3470
+ candidates?: number | undefined;
3471
+ sharedCandidates?: number | undefined;
3472
+ maxPages?: number | undefined;
3473
+ pageChars?: number | undefined;
3474
+ navigatorModel?: string | undefined;
3475
+ answerModel?: string | undefined;
3476
+ live?: {
3477
+ enabled?: boolean | undefined;
3478
+ timeoutMs?: number | undefined;
3479
+ maxReads?: number | undefined;
3480
+ plannerModel?: string | undefined;
3481
+ sources?: ({
3482
+ type: "github";
3483
+ repos: (string | {
3484
+ repo: string;
3485
+ about?: string | undefined;
3486
+ })[];
3487
+ tokenEnv?: string | undefined;
3488
+ tokenFile?: string | undefined;
3489
+ apiUrl?: string | undefined;
3490
+ } | {
3491
+ type: "gitlab";
3492
+ repos: (string | {
3493
+ repo: string;
3494
+ about?: string | undefined;
3495
+ })[];
3496
+ url?: string | undefined;
3497
+ tokenEnv?: string | undefined;
3498
+ tokenFile?: string | undefined;
3499
+ } | {
3500
+ type: "agentx";
3501
+ url?: string | undefined;
3502
+ peers?: boolean | undefined;
3503
+ })[] | undefined;
3504
+ } | undefined;
3133
3505
  } | undefined;
3134
3506
  contributions?: {
3135
3507
  model?: string | undefined;
@@ -3138,6 +3510,18 @@ declare const daemonConfigSchema: z.ZodObject<{
3138
3510
  maxCostUsd?: number | undefined;
3139
3511
  mergeSchedule?: string | undefined;
3140
3512
  } | undefined;
3513
+ summaries?: {
3514
+ model?: string | undefined;
3515
+ agent?: string | undefined;
3516
+ schedule?: string | undefined;
3517
+ timezone?: string | undefined;
3518
+ batchSize?: number | undefined;
3519
+ maxWords?: number | undefined;
3520
+ } | undefined;
3521
+ curator?: {
3522
+ enabled?: boolean | undefined;
3523
+ agent?: string | undefined;
3524
+ } | undefined;
3141
3525
  }>>;
3142
3526
  channels: z.ZodDefault<z.ZodObject<{
3143
3527
  telegram: z.ZodDefault<z.ZodObject<{
@@ -7641,7 +8025,43 @@ declare const daemonConfigSchema: z.ZodObject<{
7641
8025
  };
7642
8026
  wiki: {
7643
8027
  query: {
8028
+ method: "auto" | "summaries" | "catalog";
7644
8029
  shared: boolean;
8030
+ candidates: number;
8031
+ sharedCandidates: number;
8032
+ maxPages: number;
8033
+ pageChars: number;
8034
+ navigatorModel: string;
8035
+ answerModel: string;
8036
+ live: {
8037
+ enabled: boolean;
8038
+ timeoutMs: number;
8039
+ maxReads: number;
8040
+ plannerModel: string;
8041
+ sources: ({
8042
+ type: "github";
8043
+ apiUrl: string;
8044
+ repos: (string | {
8045
+ repo: string;
8046
+ about?: string | undefined;
8047
+ })[];
8048
+ tokenEnv?: string | undefined;
8049
+ tokenFile?: string | undefined;
8050
+ } | {
8051
+ type: "gitlab";
8052
+ repos: (string | {
8053
+ repo: string;
8054
+ about?: string | undefined;
8055
+ })[];
8056
+ url?: string | undefined;
8057
+ tokenEnv?: string | undefined;
8058
+ tokenFile?: string | undefined;
8059
+ } | {
8060
+ type: "agentx";
8061
+ peers: boolean;
8062
+ url?: string | undefined;
8063
+ })[];
8064
+ };
7645
8065
  };
7646
8066
  contributions: {
7647
8067
  model: string;
@@ -7650,6 +8070,18 @@ declare const daemonConfigSchema: z.ZodObject<{
7650
8070
  maxCostUsd: number;
7651
8071
  mergeSchedule: string;
7652
8072
  };
8073
+ summaries: {
8074
+ model: string;
8075
+ timezone: string;
8076
+ batchSize: number;
8077
+ maxWords: number;
8078
+ agent?: string | undefined;
8079
+ schedule?: string | undefined;
8080
+ };
8081
+ curator: {
8082
+ enabled: boolean;
8083
+ agent?: string | undefined;
8084
+ };
7653
8085
  };
7654
8086
  app: {
7655
8087
  android: {
@@ -8536,7 +8968,43 @@ declare const daemonConfigSchema: z.ZodObject<{
8536
8968
  } | undefined;
8537
8969
  wiki?: {
8538
8970
  query?: {
8971
+ method?: "auto" | "summaries" | "catalog" | undefined;
8539
8972
  shared?: boolean | undefined;
8973
+ candidates?: number | undefined;
8974
+ sharedCandidates?: number | undefined;
8975
+ maxPages?: number | undefined;
8976
+ pageChars?: number | undefined;
8977
+ navigatorModel?: string | undefined;
8978
+ answerModel?: string | undefined;
8979
+ live?: {
8980
+ enabled?: boolean | undefined;
8981
+ timeoutMs?: number | undefined;
8982
+ maxReads?: number | undefined;
8983
+ plannerModel?: string | undefined;
8984
+ sources?: ({
8985
+ type: "github";
8986
+ repos: (string | {
8987
+ repo: string;
8988
+ about?: string | undefined;
8989
+ })[];
8990
+ tokenEnv?: string | undefined;
8991
+ tokenFile?: string | undefined;
8992
+ apiUrl?: string | undefined;
8993
+ } | {
8994
+ type: "gitlab";
8995
+ repos: (string | {
8996
+ repo: string;
8997
+ about?: string | undefined;
8998
+ })[];
8999
+ url?: string | undefined;
9000
+ tokenEnv?: string | undefined;
9001
+ tokenFile?: string | undefined;
9002
+ } | {
9003
+ type: "agentx";
9004
+ url?: string | undefined;
9005
+ peers?: boolean | undefined;
9006
+ })[] | undefined;
9007
+ } | undefined;
8540
9008
  } | undefined;
8541
9009
  contributions?: {
8542
9010
  model?: string | undefined;
@@ -8545,6 +9013,18 @@ declare const daemonConfigSchema: z.ZodObject<{
8545
9013
  maxCostUsd?: number | undefined;
8546
9014
  mergeSchedule?: string | undefined;
8547
9015
  } | undefined;
9016
+ summaries?: {
9017
+ model?: string | undefined;
9018
+ agent?: string | undefined;
9019
+ schedule?: string | undefined;
9020
+ timezone?: string | undefined;
9021
+ batchSize?: number | undefined;
9022
+ maxWords?: number | undefined;
9023
+ } | undefined;
9024
+ curator?: {
9025
+ enabled?: boolean | undefined;
9026
+ agent?: string | undefined;
9027
+ } | undefined;
8548
9028
  } | undefined;
8549
9029
  app?: {
8550
9030
  android?: {
@@ -9977,6 +10457,8 @@ declare class AgentXDaemon {
9977
10457
  /** Watched WhatsApp chats (src/whatsapp-triage). Null without SQLite. */
9978
10458
  private waTriage;
9979
10459
  private assistantStore;
10460
+ /** The chat bubble on wiki pages (#818). */
10461
+ private wikiCurate;
9980
10462
  /** Workflow health for the monitor. Cached for a minute: the dashboard
9981
10463
  * polls every 15s and dormancy does not change on that timescale. */
9982
10464
  private workflowHealth;
@@ -11501,6 +11983,8 @@ interface WikiStatement {
11501
11983
  status?: "proposed" | "confirmed";
11502
11984
  confirmed_by?: string;
11503
11985
  checked_at?: string;
11986
+ /** The job that wrote it, e.g. "wiki-enrich"; its next run replaces it. */
11987
+ by?: string;
11504
11988
  note?: string;
11505
11989
  }
11506
11990
 
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,h as bt,la as Tt,ma as Mt}from"./chunk-UBA2QJCY.js";import"./chunk-QXZLYCEZ.js";import"./chunk-GTJIKXDB.js";import"./chunk-5KKXJZZ4.js";import"./chunk-BGG3ZSMW.js";import"./chunk-ZVP6GB4G.js";import"./chunk-S2GAEH2F.js";import"./chunk-PPUN7YHA.js";import"./chunk-VZLIBDLH.js";import"./chunk-EKJG63EJ.js";import"./chunk-EMGB23H5.js";import"./chunk-XGOBZCYC.js";import"./chunk-WCXXXAHV.js";import"./chunk-JWDJMFU6.js";import"./chunk-GRMCAO3Q.js";import"./chunk-KZKDVIOE.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-WEPON4FP.js";import"./chunk-AKLZ4YO2.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-Q5FEWCS5.js";import"./chunk-Y4CYQV7G.js";import"./chunk-LLNPKE7H.js";import"./chunk-SHEUCITK.js";import"./chunk-242MPMJX.js";import"./chunk-LJWEJ6UZ.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import{ca as yt,m as lt,n as ct,o as dt,p as mt,q as pt}from"./chunk-W2HEJKJR.js";import"./chunk-HF4OXA5L.js";import"./chunk-GLQLCBJS.js";import"./chunk-MEFPXHQJ.js";import{s as ut}from"./chunk-YHCPBMRH.js";import{a as L}from"./chunk-UG2OF2EI.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-X5C5W3E4.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-SZDACK6O.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-J4I5ZJ2V.js";import"./chunk-JE5EJGGD.js";import"./chunk-VWTBHLMX.js";import"./chunk-TJDNS5G6.js";import{a as ht}from"./chunk-NR7WLMNI.js";import"./chunk-3PGPN323.js";import"./chunk-I4OQQRY2.js";import"./chunk-VD7IO653.js";import{f as gt,g as ft}from"./chunk-N2YSVZML.js";import"./chunk-WPNRDEHW.js";import"./chunk-36AXN6ZB.js";import"./chunk-KA2UIZXG.js";import"./chunk-GQ76J72O.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-WX67I2KN.js";import{j as it,k as rt,l as at}from"./chunk-I4GT27UO.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-MYVHVJWZ.js";import"./chunk-AV7T3SYT.js";import"./chunk-Y5MFVVTM.js";import"./chunk-QD6IICK7.js";import"./chunk-QOYAX2FT.js";import"./chunk-4VVHGR7H.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-2PJKGZWP.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{ma as tt,oa as st,pa as ot,ua as nt}from"./chunk-UUFJQMHE.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.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 St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,h as bt,la as Tt,ma as Mt}from"./chunk-L4ZS4HGJ.js";import"./chunk-CL33CRH5.js";import"./chunk-GTJIKXDB.js";import"./chunk-E2VDBT3T.js";import"./chunk-S2GAEH2F.js";import"./chunk-7LN4VKDU.js";import"./chunk-IMLAPB7G.js";import"./chunk-ZVP6GB4G.js";import"./chunk-XGOBZCYC.js";import"./chunk-WCXXXAHV.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-MRIVENBY.js";import"./chunk-WEPON4FP.js";import"./chunk-AKLZ4YO2.js";import"./chunk-PPUN7YHA.js";import"./chunk-VZLIBDLH.js";import"./chunk-EKJG63EJ.js";import"./chunk-L4ALHWII.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-EMGB23H5.js";import"./chunk-JWDJMFU6.js";import"./chunk-GRMCAO3Q.js";import"./chunk-KZKDVIOE.js";import{ca as yt,m as lt,n as ct,o as dt,p as mt,q as pt}from"./chunk-VSL2SSBH.js";import"./chunk-YPCZ5TNK.js";import"./chunk-GLQLCBJS.js";import"./chunk-MEFPXHQJ.js";import{a as L}from"./chunk-UG2OF2EI.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-B2Q3PTPS.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-Y4CYQV7G.js";import"./chunk-LLNPKE7H.js";import"./chunk-SHEUCITK.js";import"./chunk-6O6NW3ZG.js";import"./chunk-AFRHKA7B.js";import{s as ut}from"./chunk-KRK7OOTK.js";import"./chunk-YQRWUF4Y.js";import"./chunk-3UOTLMXD.js";import"./chunk-KA2UIZXG.js";import"./chunk-GQ76J72O.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-SZDACK6O.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-VWTBHLMX.js";import"./chunk-AKOXTIJS.js";import{a as ht}from"./chunk-YVR6652A.js";import"./chunk-JP5OAMWQ.js";import"./chunk-4VVHGR7H.js";import"./chunk-2SXF66O6.js";import"./chunk-2ZDV3DCT.js";import{f as gt,g as ft}from"./chunk-CSWGYSC4.js";import"./chunk-WPNRDEHW.js";import"./chunk-7VLLZQ3N.js";import"./chunk-BIJHMWXK.js";import"./chunk-36AXN6ZB.js";import"./chunk-ILEC3IAV.js";import"./chunk-ERNBJLIQ.js";import{j as it,k as rt,l as at}from"./chunk-IA7INHXY.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-MYVHVJWZ.js";import"./chunk-6TURWSMN.js";import"./chunk-AV7T3SYT.js";import"./chunk-Y5MFVVTM.js";import"./chunk-QD6IICK7.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-2PJKGZWP.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{ma as tt,oa as st,pa as ot,wa as nt}from"./chunk-CBFBGN7J.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.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).