agentix-cli 0.142.0 → 0.143.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 (127) hide show
  1. package/dist/{App-VHAMAS4I.js → App-UTDCBFZI.js} +2 -2
  2. package/dist/{ChatApp-Y7HOL45K.js → ChatApp-7P22XAL2.js} +2 -2
  3. package/dist/{absorb-eval-VHACXZ3H.js → absorb-eval-EGO6JJOV.js} +2 -2
  4. package/dist/{agent-M7ID5U3U.js → agent-AI6LNZV2.js} +2 -2
  5. package/dist/{board-dashboard-VHUZMYOV.js → board-dashboard-ZKN5Y3GJ.js} +320 -268
  6. package/dist/board-dashboard-ZKN5Y3GJ.js.map +1 -0
  7. package/dist/{chunk-5SEUBOUH.js → chunk-3WBOWXAN.js} +2 -2
  8. package/dist/{chunk-JH6C2Y5D.js → chunk-5BXAKMYK.js} +2 -2
  9. package/dist/{chunk-GPCBOXZM.js → chunk-6CTQPGBR.js} +2 -2
  10. package/dist/{chunk-EMA67BJ5.js → chunk-7H6HDN3K.js} +2 -2
  11. package/dist/{chunk-3E4AEZ2J.js → chunk-AJUWIBLV.js} +2 -2
  12. package/dist/{chunk-WEHEI3JO.js → chunk-DKLVB5L6.js} +5 -5
  13. package/dist/{chunk-WEHEI3JO.js.map → chunk-DKLVB5L6.js.map} +1 -1
  14. package/dist/{chunk-7H7LUBPC.js → chunk-ERG5OUKH.js} +2 -2
  15. package/dist/{chunk-UF4OTZ7D.js → chunk-GB4YT5IG.js} +270 -269
  16. package/dist/chunk-GB4YT5IG.js.map +1 -0
  17. package/dist/{chunk-KEBTFUOZ.js → chunk-HPQ3AAG3.js} +2 -2
  18. package/dist/{chunk-NFI4BCCO.js → chunk-IABJLTZN.js} +2 -2
  19. package/dist/chunk-K22XMF6M.js +62 -0
  20. package/dist/chunk-K22XMF6M.js.map +1 -0
  21. package/dist/{chunk-ZWL44UJS.js → chunk-L4RCA3OC.js} +2 -2
  22. package/dist/{chunk-QTS7MHIA.js → chunk-MFUN3ZS3.js} +2 -2
  23. package/dist/{chunk-SLJFY2AQ.js → chunk-N2HLL25P.js} +2 -2
  24. package/dist/{chunk-TFNBUHRW.js → chunk-NYWIN4BW.js} +2 -2
  25. package/dist/{chunk-25XO6P7W.js → chunk-O2CYERSX.js} +2 -2
  26. package/dist/{chunk-2TLOZN7P.js → chunk-OMO7UTWW.js} +2 -2
  27. package/dist/{chunk-S6QUFAHD.js → chunk-PYI7ZAU3.js} +2 -2
  28. package/dist/{chunk-S6QUFAHD.js.map → chunk-PYI7ZAU3.js.map} +1 -1
  29. package/dist/{chunk-7Y3FEIX7.js → chunk-QVPBSV5Z.js} +2 -2
  30. package/dist/{chunk-B5744ATM.js → chunk-RB5W3FVO.js} +2 -2
  31. package/dist/{chunk-S3LWGPNZ.js → chunk-SDSSRNSU.js} +3 -3
  32. package/dist/{chunk-3NKCOZQO.js → chunk-THWDSPX4.js} +2 -2
  33. package/dist/{chunk-6YPJVGYF.js → chunk-WY5ZOEOE.js} +2 -2
  34. package/dist/{chunk-MLLMBE2W.js → chunk-XWHD2Z3Z.js} +2 -2
  35. package/dist/{chunk-6PJKKLKV.js → chunk-YVNGPYXN.js} +52 -52
  36. package/dist/chunk-YVNGPYXN.js.map +1 -0
  37. package/dist/{chunk-IFUN332M.js → chunk-YYPTXXCJ.js} +2 -2
  38. package/dist/cli.js +1 -1
  39. package/dist/{client-ISQF24N5.js → client-E66ELJK7.js} +2 -2
  40. package/dist/{config-Z64VWERV.js → config-3C3Z7VKG.js} +2 -2
  41. package/dist/{config-mutate-YZ3IH6CJ.js → config-mutate-QBDKJNHA.js} +2 -2
  42. package/dist/config-mutator-ZI3SQIUN.js +2 -0
  43. package/dist/{contributions-FQGIRD44.js → contributions-L5XZJ3DP.js} +2 -2
  44. package/dist/{doctor-FMW2SSCN.js → doctor-3ZUFSE6R.js} +2 -2
  45. package/dist/{follow-up-tool-I7PPM2R5.js → follow-up-tool-6OCQUSC3.js} +2 -2
  46. package/dist/{hub-Z3X4LWMI.js → hub-MOQRSVCQ.js} +2 -2
  47. package/dist/index.d.ts +169 -55
  48. package/dist/index.js +1 -1
  49. package/dist/{program-I7WCAMBP.js → program-AR6F763U.js} +218 -216
  50. package/dist/program-AR6F763U.js.map +1 -0
  51. package/dist/{promote-7YUBVKRC.js → promote-ZGJEPCBE.js} +2 -2
  52. package/dist/{query-TMALX5BE.js → query-JLTHESIZ.js} +2 -2
  53. package/dist/{query-settings-3PEV5GIH.js → query-settings-GMEL3EKR.js} +2 -2
  54. package/dist/{registry-6ZIBMOZQ.js → registry-MFD3XJBR.js} +2 -2
  55. package/dist/{request-planner-GLNHHQXA.js → request-planner-4ORFYSAT.js} +2 -2
  56. package/dist/{review-candidates-DJXNTOG6.js → review-candidates-77NDFTGM.js} +2 -2
  57. package/dist/{routing-YWP2AF56.js → routing-3FL3KYPJ.js} +2 -2
  58. package/dist/schedule-tool-5KJMXBRZ.js +2 -0
  59. package/dist/{scheduler-HK362U53.js → scheduler-QLL7ZHYW.js} +2 -2
  60. package/dist/{seat-4PPUZXFN.js → seat-RBKONP63.js} +2 -2
  61. package/dist/{select-ULCUVM7N.js → select-MOUDR6PQ.js} +2 -2
  62. package/dist/{set-enabled-G4PLW5WK.js → set-enabled-JKYF3QIA.js} +2 -2
  63. package/dist/tool-C4JNMTEF.js +6 -0
  64. package/dist/tool-C4JNMTEF.js.map +1 -0
  65. package/dist/{tool-KGOC2NUZ.js → tool-Y3ZTSZGE.js} +2 -2
  66. package/dist/{wiki-32G6TGCI.js → wiki-3FSSLQAE.js} +2 -2
  67. package/dist/wiki-enrich-HQWXZRID.js +2 -0
  68. package/package.json +1 -1
  69. package/dist/board-dashboard-VHUZMYOV.js.map +0 -1
  70. package/dist/chunk-6PJKKLKV.js.map +0 -1
  71. package/dist/chunk-JYPXNH4C.js +0 -54
  72. package/dist/chunk-JYPXNH4C.js.map +0 -1
  73. package/dist/chunk-UF4OTZ7D.js.map +0 -1
  74. package/dist/config-mutator-3HTNXOPU.js +0 -2
  75. package/dist/program-I7WCAMBP.js.map +0 -1
  76. package/dist/schedule-tool-4O4XWGVA.js +0 -2
  77. package/dist/tool-CBDT7TAG.js +0 -6
  78. package/dist/tool-CBDT7TAG.js.map +0 -1
  79. package/dist/wiki-enrich-XBRY4ZRD.js +0 -2
  80. /package/dist/{App-VHAMAS4I.js.map → App-UTDCBFZI.js.map} +0 -0
  81. /package/dist/{ChatApp-Y7HOL45K.js.map → ChatApp-7P22XAL2.js.map} +0 -0
  82. /package/dist/{absorb-eval-VHACXZ3H.js.map → absorb-eval-EGO6JJOV.js.map} +0 -0
  83. /package/dist/{agent-M7ID5U3U.js.map → agent-AI6LNZV2.js.map} +0 -0
  84. /package/dist/{chunk-5SEUBOUH.js.map → chunk-3WBOWXAN.js.map} +0 -0
  85. /package/dist/{chunk-JH6C2Y5D.js.map → chunk-5BXAKMYK.js.map} +0 -0
  86. /package/dist/{chunk-GPCBOXZM.js.map → chunk-6CTQPGBR.js.map} +0 -0
  87. /package/dist/{chunk-EMA67BJ5.js.map → chunk-7H6HDN3K.js.map} +0 -0
  88. /package/dist/{chunk-3E4AEZ2J.js.map → chunk-AJUWIBLV.js.map} +0 -0
  89. /package/dist/{chunk-7H7LUBPC.js.map → chunk-ERG5OUKH.js.map} +0 -0
  90. /package/dist/{chunk-KEBTFUOZ.js.map → chunk-HPQ3AAG3.js.map} +0 -0
  91. /package/dist/{chunk-NFI4BCCO.js.map → chunk-IABJLTZN.js.map} +0 -0
  92. /package/dist/{chunk-ZWL44UJS.js.map → chunk-L4RCA3OC.js.map} +0 -0
  93. /package/dist/{chunk-QTS7MHIA.js.map → chunk-MFUN3ZS3.js.map} +0 -0
  94. /package/dist/{chunk-SLJFY2AQ.js.map → chunk-N2HLL25P.js.map} +0 -0
  95. /package/dist/{chunk-TFNBUHRW.js.map → chunk-NYWIN4BW.js.map} +0 -0
  96. /package/dist/{chunk-25XO6P7W.js.map → chunk-O2CYERSX.js.map} +0 -0
  97. /package/dist/{chunk-2TLOZN7P.js.map → chunk-OMO7UTWW.js.map} +0 -0
  98. /package/dist/{chunk-7Y3FEIX7.js.map → chunk-QVPBSV5Z.js.map} +0 -0
  99. /package/dist/{chunk-B5744ATM.js.map → chunk-RB5W3FVO.js.map} +0 -0
  100. /package/dist/{chunk-S3LWGPNZ.js.map → chunk-SDSSRNSU.js.map} +0 -0
  101. /package/dist/{chunk-3NKCOZQO.js.map → chunk-THWDSPX4.js.map} +0 -0
  102. /package/dist/{chunk-6YPJVGYF.js.map → chunk-WY5ZOEOE.js.map} +0 -0
  103. /package/dist/{chunk-MLLMBE2W.js.map → chunk-XWHD2Z3Z.js.map} +0 -0
  104. /package/dist/{chunk-IFUN332M.js.map → chunk-YYPTXXCJ.js.map} +0 -0
  105. /package/dist/{client-ISQF24N5.js.map → client-E66ELJK7.js.map} +0 -0
  106. /package/dist/{config-Z64VWERV.js.map → config-3C3Z7VKG.js.map} +0 -0
  107. /package/dist/{config-mutate-YZ3IH6CJ.js.map → config-mutate-QBDKJNHA.js.map} +0 -0
  108. /package/dist/{config-mutator-3HTNXOPU.js.map → config-mutator-ZI3SQIUN.js.map} +0 -0
  109. /package/dist/{contributions-FQGIRD44.js.map → contributions-L5XZJ3DP.js.map} +0 -0
  110. /package/dist/{doctor-FMW2SSCN.js.map → doctor-3ZUFSE6R.js.map} +0 -0
  111. /package/dist/{follow-up-tool-I7PPM2R5.js.map → follow-up-tool-6OCQUSC3.js.map} +0 -0
  112. /package/dist/{hub-Z3X4LWMI.js.map → hub-MOQRSVCQ.js.map} +0 -0
  113. /package/dist/{promote-7YUBVKRC.js.map → promote-ZGJEPCBE.js.map} +0 -0
  114. /package/dist/{query-TMALX5BE.js.map → query-JLTHESIZ.js.map} +0 -0
  115. /package/dist/{query-settings-3PEV5GIH.js.map → query-settings-GMEL3EKR.js.map} +0 -0
  116. /package/dist/{registry-6ZIBMOZQ.js.map → registry-MFD3XJBR.js.map} +0 -0
  117. /package/dist/{request-planner-GLNHHQXA.js.map → request-planner-4ORFYSAT.js.map} +0 -0
  118. /package/dist/{review-candidates-DJXNTOG6.js.map → review-candidates-77NDFTGM.js.map} +0 -0
  119. /package/dist/{routing-YWP2AF56.js.map → routing-3FL3KYPJ.js.map} +0 -0
  120. /package/dist/{schedule-tool-4O4XWGVA.js.map → schedule-tool-5KJMXBRZ.js.map} +0 -0
  121. /package/dist/{scheduler-HK362U53.js.map → scheduler-QLL7ZHYW.js.map} +0 -0
  122. /package/dist/{seat-4PPUZXFN.js.map → seat-RBKONP63.js.map} +0 -0
  123. /package/dist/{select-ULCUVM7N.js.map → select-MOUDR6PQ.js.map} +0 -0
  124. /package/dist/{set-enabled-G4PLW5WK.js.map → set-enabled-JKYF3QIA.js.map} +0 -0
  125. /package/dist/{tool-KGOC2NUZ.js.map → tool-Y3ZTSZGE.js.map} +0 -0
  126. /package/dist/{wiki-32G6TGCI.js.map → wiki-3FSSLQAE.js.map} +0 -0
  127. /package/dist/{wiki-enrich-XBRY4ZRD.js.map → wiki-enrich-HQWXZRID.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -1631,6 +1631,9 @@ declare const agentConfigSchema: z.ZodObject<{
1631
1631
  dir?: string | undefined;
1632
1632
  }>>;
1633
1633
  }, "strip", z.ZodTypeAny, {
1634
+ notes: {
1635
+ dir?: string | undefined;
1636
+ };
1634
1637
  contribute: {
1635
1638
  enabled: boolean;
1636
1639
  maxPatches: number;
@@ -1640,10 +1643,10 @@ declare const agentConfigSchema: z.ZodObject<{
1640
1643
  absorb: {
1641
1644
  enabled: boolean;
1642
1645
  };
1643
- notes: {
1644
- dir?: string | undefined;
1645
- };
1646
1646
  }, {
1647
+ notes?: {
1648
+ dir?: string | undefined;
1649
+ } | undefined;
1647
1650
  contribute?: {
1648
1651
  model?: string | undefined;
1649
1652
  enabled?: boolean | undefined;
@@ -1653,9 +1656,6 @@ declare const agentConfigSchema: z.ZodObject<{
1653
1656
  absorb?: {
1654
1657
  enabled?: boolean | undefined;
1655
1658
  } | undefined;
1656
- notes?: {
1657
- dir?: string | undefined;
1658
- } | undefined;
1659
1659
  }>>;
1660
1660
  permissionMode: z.ZodDefault<z.ZodString>;
1661
1661
  /** How this agent's `claude` CLI is billed (claude-code tier). Default
@@ -2009,6 +2009,9 @@ declare const agentConfigSchema: z.ZodObject<{
2009
2009
  provider?: string | undefined;
2010
2010
  model?: string | undefined;
2011
2011
  wiki?: {
2012
+ notes: {
2013
+ dir?: string | undefined;
2014
+ };
2012
2015
  contribute: {
2013
2016
  enabled: boolean;
2014
2017
  maxPatches: number;
@@ -2018,9 +2021,6 @@ declare const agentConfigSchema: z.ZodObject<{
2018
2021
  absorb: {
2019
2022
  enabled: boolean;
2020
2023
  };
2021
- notes: {
2022
- dir?: string | undefined;
2023
- };
2024
2024
  } | undefined;
2025
2025
  voice?: {
2026
2026
  system?: string | Record<string, string> | undefined;
@@ -2063,6 +2063,9 @@ declare const agentConfigSchema: z.ZodObject<{
2063
2063
  provider?: string | undefined;
2064
2064
  model?: string | undefined;
2065
2065
  wiki?: {
2066
+ notes?: {
2067
+ dir?: string | undefined;
2068
+ } | undefined;
2066
2069
  contribute?: {
2067
2070
  model?: string | undefined;
2068
2071
  enabled?: boolean | undefined;
@@ -2072,9 +2075,6 @@ declare const agentConfigSchema: z.ZodObject<{
2072
2075
  absorb?: {
2073
2076
  enabled?: boolean | undefined;
2074
2077
  } | undefined;
2075
- notes?: {
2076
- dir?: string | undefined;
2077
- } | undefined;
2078
2078
  } | undefined;
2079
2079
  voice?: {
2080
2080
  system?: string | Record<string, string> | undefined;
@@ -2598,6 +2598,9 @@ declare const daemonConfigSchema: z.ZodObject<{
2598
2598
  dir?: string | undefined;
2599
2599
  }>>;
2600
2600
  }, "strip", z.ZodTypeAny, {
2601
+ notes: {
2602
+ dir?: string | undefined;
2603
+ };
2601
2604
  contribute: {
2602
2605
  enabled: boolean;
2603
2606
  maxPatches: number;
@@ -2607,10 +2610,10 @@ declare const daemonConfigSchema: z.ZodObject<{
2607
2610
  absorb: {
2608
2611
  enabled: boolean;
2609
2612
  };
2610
- notes: {
2611
- dir?: string | undefined;
2612
- };
2613
2613
  }, {
2614
+ notes?: {
2615
+ dir?: string | undefined;
2616
+ } | undefined;
2614
2617
  contribute?: {
2615
2618
  model?: string | undefined;
2616
2619
  enabled?: boolean | undefined;
@@ -2620,9 +2623,6 @@ declare const daemonConfigSchema: z.ZodObject<{
2620
2623
  absorb?: {
2621
2624
  enabled?: boolean | undefined;
2622
2625
  } | undefined;
2623
- notes?: {
2624
- dir?: string | undefined;
2625
- } | undefined;
2626
2626
  }>>;
2627
2627
  permissionMode: z.ZodDefault<z.ZodString>;
2628
2628
  /** How this agent's `claude` CLI is billed (claude-code tier). Default
@@ -2976,6 +2976,9 @@ declare const daemonConfigSchema: z.ZodObject<{
2976
2976
  provider?: string | undefined;
2977
2977
  model?: string | undefined;
2978
2978
  wiki?: {
2979
+ notes: {
2980
+ dir?: string | undefined;
2981
+ };
2979
2982
  contribute: {
2980
2983
  enabled: boolean;
2981
2984
  maxPatches: number;
@@ -2985,9 +2988,6 @@ declare const daemonConfigSchema: z.ZodObject<{
2985
2988
  absorb: {
2986
2989
  enabled: boolean;
2987
2990
  };
2988
- notes: {
2989
- dir?: string | undefined;
2990
- };
2991
2991
  } | undefined;
2992
2992
  voice?: {
2993
2993
  system?: string | Record<string, string> | undefined;
@@ -3030,6 +3030,9 @@ declare const daemonConfigSchema: z.ZodObject<{
3030
3030
  provider?: string | undefined;
3031
3031
  model?: string | undefined;
3032
3032
  wiki?: {
3033
+ notes?: {
3034
+ dir?: string | undefined;
3035
+ } | undefined;
3033
3036
  contribute?: {
3034
3037
  model?: string | undefined;
3035
3038
  enabled?: boolean | undefined;
@@ -3039,9 +3042,6 @@ declare const daemonConfigSchema: z.ZodObject<{
3039
3042
  absorb?: {
3040
3043
  enabled?: boolean | undefined;
3041
3044
  } | undefined;
3042
- notes?: {
3043
- dir?: string | undefined;
3044
- } | undefined;
3045
3045
  } | undefined;
3046
3046
  voice?: {
3047
3047
  system?: string | Record<string, string> | undefined;
@@ -3239,11 +3239,11 @@ declare const daemonConfigSchema: z.ZodObject<{
3239
3239
  apiUrl: z.ZodDefault<z.ZodString>;
3240
3240
  }, "strip", z.ZodTypeAny, {
3241
3241
  type: "github";
3242
- apiUrl: string;
3243
3242
  repos: (string | {
3244
3243
  repo: string;
3245
3244
  about?: string | undefined;
3246
3245
  })[];
3246
+ apiUrl: string;
3247
3247
  tokenEnv?: string | undefined;
3248
3248
  tokenFile?: string | undefined;
3249
3249
  }, {
@@ -3314,11 +3314,11 @@ declare const daemonConfigSchema: z.ZodObject<{
3314
3314
  plannerModel: string;
3315
3315
  sources: ({
3316
3316
  type: "github";
3317
- apiUrl: string;
3318
3317
  repos: (string | {
3319
3318
  repo: string;
3320
3319
  about?: string | undefined;
3321
3320
  })[];
3321
+ apiUrl: string;
3322
3322
  tokenEnv?: string | undefined;
3323
3323
  tokenFile?: string | undefined;
3324
3324
  } | {
@@ -3387,11 +3387,11 @@ declare const daemonConfigSchema: z.ZodObject<{
3387
3387
  plannerModel: string;
3388
3388
  sources: ({
3389
3389
  type: "github";
3390
- apiUrl: string;
3391
3390
  repos: (string | {
3392
3391
  repo: string;
3393
3392
  about?: string | undefined;
3394
3393
  })[];
3394
+ apiUrl: string;
3395
3395
  tokenEnv?: string | undefined;
3396
3396
  tokenFile?: string | undefined;
3397
3397
  } | {
@@ -3521,11 +3521,11 @@ declare const daemonConfigSchema: z.ZodObject<{
3521
3521
  plannerModel: string;
3522
3522
  sources: ({
3523
3523
  type: "github";
3524
- apiUrl: string;
3525
3524
  repos: (string | {
3526
3525
  repo: string;
3527
3526
  about?: string | undefined;
3528
3527
  })[];
3528
+ apiUrl: string;
3529
3529
  tokenEnv?: string | undefined;
3530
3530
  tokenFile?: string | undefined;
3531
3531
  } | {
@@ -5956,6 +5956,63 @@ declare const daemonConfigSchema: z.ZodObject<{
5956
5956
  approveKinds?: string[] | undefined;
5957
5957
  disabledAgents?: string[] | undefined;
5958
5958
  }>>;
5959
+ /** Checkers that close an open loop on evidence (src/requests/checkers,
5960
+ * #1039). A loop with a `closeWhen` closes when its check is met; an
5961
+ * agent's done on it is refused while the check says not met. */
5962
+ checkers: z.ZodDefault<z.ZodObject<{
5963
+ /** Kinds agents may use. A loop of a kind turned off is unverifiable. */
5964
+ enabled: z.ZodDefault<z.ZodArray<z.ZodEnum<["url", "issue", "git-ancestor", "reply"]>, "many">>;
5965
+ /** How often each open loop's check runs. */
5966
+ checkEveryMinutes: z.ZodDefault<z.ZodNumber>;
5967
+ /** Local clones the git-ancestor check may read, by name: { "app": "/srv/app" }. */
5968
+ repos: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
5969
+ /** The issue check's GitHub connector. Unset: channels.github.token. */
5970
+ github: z.ZodOptional<z.ZodObject<{
5971
+ apiUrl: z.ZodDefault<z.ZodString>;
5972
+ token: z.ZodOptional<z.ZodString>;
5973
+ }, "strip", z.ZodTypeAny, {
5974
+ apiUrl: string;
5975
+ token?: string | undefined;
5976
+ }, {
5977
+ token?: string | undefined;
5978
+ apiUrl?: string | undefined;
5979
+ }>>;
5980
+ /** The issue check's GitLab connector. Unset: channels.gitlab.host and token. */
5981
+ gitlab: z.ZodOptional<z.ZodObject<{
5982
+ url: z.ZodOptional<z.ZodString>;
5983
+ token: z.ZodOptional<z.ZodString>;
5984
+ }, "strip", z.ZodTypeAny, {
5985
+ token?: string | undefined;
5986
+ url?: string | undefined;
5987
+ }, {
5988
+ token?: string | undefined;
5989
+ url?: string | undefined;
5990
+ }>>;
5991
+ }, "strip", z.ZodTypeAny, {
5992
+ enabled: ("reply" | "url" | "issue" | "git-ancestor")[];
5993
+ repos: Record<string, string>;
5994
+ checkEveryMinutes: number;
5995
+ gitlab?: {
5996
+ token?: string | undefined;
5997
+ url?: string | undefined;
5998
+ } | undefined;
5999
+ github?: {
6000
+ apiUrl: string;
6001
+ token?: string | undefined;
6002
+ } | undefined;
6003
+ }, {
6004
+ enabled?: ("reply" | "url" | "issue" | "git-ancestor")[] | undefined;
6005
+ gitlab?: {
6006
+ token?: string | undefined;
6007
+ url?: string | undefined;
6008
+ } | undefined;
6009
+ github?: {
6010
+ token?: string | undefined;
6011
+ apiUrl?: string | undefined;
6012
+ } | undefined;
6013
+ repos?: Record<string, string> | undefined;
6014
+ checkEveryMinutes?: number | undefined;
6015
+ }>>;
5959
6016
  }, "strip", z.ZodTypeAny, {
5960
6017
  enabled: boolean;
5961
6018
  from: string[];
@@ -5969,6 +6026,19 @@ declare const daemonConfigSchema: z.ZodObject<{
5969
6026
  approveKinds: string[];
5970
6027
  disabledAgents: string[];
5971
6028
  };
6029
+ checkers: {
6030
+ enabled: ("reply" | "url" | "issue" | "git-ancestor")[];
6031
+ repos: Record<string, string>;
6032
+ checkEveryMinutes: number;
6033
+ gitlab?: {
6034
+ token?: string | undefined;
6035
+ url?: string | undefined;
6036
+ } | undefined;
6037
+ github?: {
6038
+ apiUrl: string;
6039
+ token?: string | undefined;
6040
+ } | undefined;
6041
+ };
5972
6042
  }, {
5973
6043
  enabled?: boolean | undefined;
5974
6044
  from?: string[] | undefined;
@@ -5982,6 +6052,19 @@ declare const daemonConfigSchema: z.ZodObject<{
5982
6052
  approveKinds?: string[] | undefined;
5983
6053
  disabledAgents?: string[] | undefined;
5984
6054
  } | undefined;
6055
+ checkers?: {
6056
+ enabled?: ("reply" | "url" | "issue" | "git-ancestor")[] | undefined;
6057
+ gitlab?: {
6058
+ token?: string | undefined;
6059
+ url?: string | undefined;
6060
+ } | undefined;
6061
+ github?: {
6062
+ token?: string | undefined;
6063
+ apiUrl?: string | undefined;
6064
+ } | undefined;
6065
+ repos?: Record<string, string> | undefined;
6066
+ checkEveryMinutes?: number | undefined;
6067
+ } | undefined;
5985
6068
  }>>;
5986
6069
  /** Task watchers (src/watchers, #1030): every task start decides whether
5987
6070
  * the task needs a watcher and attaches one. Off by default. */
@@ -8475,6 +8558,9 @@ declare const daemonConfigSchema: z.ZodObject<{
8475
8558
  provider?: string | undefined;
8476
8559
  model?: string | undefined;
8477
8560
  wiki?: {
8561
+ notes: {
8562
+ dir?: string | undefined;
8563
+ };
8478
8564
  contribute: {
8479
8565
  enabled: boolean;
8480
8566
  maxPatches: number;
@@ -8484,9 +8570,6 @@ declare const daemonConfigSchema: z.ZodObject<{
8484
8570
  absorb: {
8485
8571
  enabled: boolean;
8486
8572
  };
8487
- notes: {
8488
- dir?: string | undefined;
8489
- };
8490
8573
  } | undefined;
8491
8574
  voice?: {
8492
8575
  system?: string | Record<string, string> | undefined;
@@ -8586,11 +8669,11 @@ declare const daemonConfigSchema: z.ZodObject<{
8586
8669
  plannerModel: string;
8587
8670
  sources: ({
8588
8671
  type: "github";
8589
- apiUrl: string;
8590
8672
  repos: (string | {
8591
8673
  repo: string;
8592
8674
  about?: string | undefined;
8593
8675
  })[];
8676
+ apiUrl: string;
8594
8677
  tokenEnv?: string | undefined;
8595
8678
  tokenFile?: string | undefined;
8596
8679
  } | {
@@ -8719,6 +8802,19 @@ declare const daemonConfigSchema: z.ZodObject<{
8719
8802
  approveKinds: string[];
8720
8803
  disabledAgents: string[];
8721
8804
  };
8805
+ checkers: {
8806
+ enabled: ("reply" | "url" | "issue" | "git-ancestor")[];
8807
+ repos: Record<string, string>;
8808
+ checkEveryMinutes: number;
8809
+ gitlab?: {
8810
+ token?: string | undefined;
8811
+ url?: string | undefined;
8812
+ } | undefined;
8813
+ github?: {
8814
+ apiUrl: string;
8815
+ token?: string | undefined;
8816
+ } | undefined;
8817
+ };
8722
8818
  };
8723
8819
  channels: {
8724
8820
  push: {
@@ -9451,6 +9547,9 @@ declare const daemonConfigSchema: z.ZodObject<{
9451
9547
  provider?: string | undefined;
9452
9548
  model?: string | undefined;
9453
9549
  wiki?: {
9550
+ notes?: {
9551
+ dir?: string | undefined;
9552
+ } | undefined;
9454
9553
  contribute?: {
9455
9554
  model?: string | undefined;
9456
9555
  enabled?: boolean | undefined;
@@ -9460,9 +9559,6 @@ declare const daemonConfigSchema: z.ZodObject<{
9460
9559
  absorb?: {
9461
9560
  enabled?: boolean | undefined;
9462
9561
  } | undefined;
9463
- notes?: {
9464
- dir?: string | undefined;
9465
- } | undefined;
9466
9562
  } | undefined;
9467
9563
  voice?: {
9468
9564
  system?: string | Record<string, string> | undefined;
@@ -9815,6 +9911,19 @@ declare const daemonConfigSchema: z.ZodObject<{
9815
9911
  approveKinds?: string[] | undefined;
9816
9912
  disabledAgents?: string[] | undefined;
9817
9913
  } | undefined;
9914
+ checkers?: {
9915
+ enabled?: ("reply" | "url" | "issue" | "git-ancestor")[] | undefined;
9916
+ gitlab?: {
9917
+ token?: string | undefined;
9918
+ url?: string | undefined;
9919
+ } | undefined;
9920
+ github?: {
9921
+ token?: string | undefined;
9922
+ apiUrl?: string | undefined;
9923
+ } | undefined;
9924
+ repos?: Record<string, string> | undefined;
9925
+ checkEveryMinutes?: number | undefined;
9926
+ } | undefined;
9818
9927
  } | undefined;
9819
9928
  channels?: {
9820
9929
  push?: {
@@ -11341,6 +11450,11 @@ declare class AgentXDaemon {
11341
11450
  * approved messages sent, the owner told at the end or on a block
11342
11451
  * (src/requests/plan-sweep.ts, #788). One check at a time. */
11343
11452
  private sweepPlans;
11453
+ /** What the loop checkers read (#1039): the forges through the
11454
+ * configured connectors, the local clones under requests.checkers.repos,
11455
+ * and this node's own record of inbound turns. Built per check, so a
11456
+ * settings change applies without a restart. */
11457
+ private requestCheckContext;
11344
11458
  /** Requests that went quiet come back, each is raised once, and old
11345
11459
  * closed ones are deleted (src/requests/sweep.ts). Plans first: a
11346
11460
  * blocked step marks its request told, so the owner hears once. */
@@ -13163,14 +13277,14 @@ declare const axisDefSchema: z.ZodObject<{
13163
13277
  /** Optional human-readable help, shown as tooltip in the admin UI. */
13164
13278
  description: z.ZodOptional<z.ZodString>;
13165
13279
  }, "strip", z.ZodTypeAny, {
13166
- type: "enum" | "free" | "ref";
13280
+ type: "ref" | "enum" | "free";
13167
13281
  name: string;
13168
13282
  values?: string[] | undefined;
13169
13283
  description?: string | undefined;
13170
13284
  refLevel?: string | undefined;
13171
13285
  optional?: boolean | undefined;
13172
13286
  }, {
13173
- type: "enum" | "free" | "ref";
13287
+ type: "ref" | "enum" | "free";
13174
13288
  name: string;
13175
13289
  values?: string[] | undefined;
13176
13290
  description?: string | undefined;
@@ -13195,14 +13309,14 @@ declare const levelDefSchema: z.ZodObject<{
13195
13309
  /** Optional human-readable help, shown as tooltip in the admin UI. */
13196
13310
  description: z.ZodOptional<z.ZodString>;
13197
13311
  }, "strip", z.ZodTypeAny, {
13198
- type: "enum" | "free" | "ref";
13312
+ type: "ref" | "enum" | "free";
13199
13313
  name: string;
13200
13314
  values?: string[] | undefined;
13201
13315
  description?: string | undefined;
13202
13316
  refLevel?: string | undefined;
13203
13317
  optional?: boolean | undefined;
13204
13318
  }, {
13205
- type: "enum" | "free" | "ref";
13319
+ type: "ref" | "enum" | "free";
13206
13320
  name: string;
13207
13321
  values?: string[] | undefined;
13208
13322
  description?: string | undefined;
@@ -13213,7 +13327,7 @@ declare const levelDefSchema: z.ZodObject<{
13213
13327
  }, "strip", z.ZodTypeAny, {
13214
13328
  id: string;
13215
13329
  axes: {
13216
- type: "enum" | "free" | "ref";
13330
+ type: "ref" | "enum" | "free";
13217
13331
  name: string;
13218
13332
  values?: string[] | undefined;
13219
13333
  description?: string | undefined;
@@ -13224,7 +13338,7 @@ declare const levelDefSchema: z.ZodObject<{
13224
13338
  }, {
13225
13339
  id: string;
13226
13340
  axes: {
13227
- type: "enum" | "free" | "ref";
13341
+ type: "ref" | "enum" | "free";
13228
13342
  name: string;
13229
13343
  values?: string[] | undefined;
13230
13344
  description?: string | undefined;
@@ -13254,14 +13368,14 @@ declare const graphSchemaSchema: z.ZodObject<{
13254
13368
  /** Optional human-readable help, shown as tooltip in the admin UI. */
13255
13369
  description: z.ZodOptional<z.ZodString>;
13256
13370
  }, "strip", z.ZodTypeAny, {
13257
- type: "enum" | "free" | "ref";
13371
+ type: "ref" | "enum" | "free";
13258
13372
  name: string;
13259
13373
  values?: string[] | undefined;
13260
13374
  description?: string | undefined;
13261
13375
  refLevel?: string | undefined;
13262
13376
  optional?: boolean | undefined;
13263
13377
  }, {
13264
- type: "enum" | "free" | "ref";
13378
+ type: "ref" | "enum" | "free";
13265
13379
  name: string;
13266
13380
  values?: string[] | undefined;
13267
13381
  description?: string | undefined;
@@ -13272,7 +13386,7 @@ declare const graphSchemaSchema: z.ZodObject<{
13272
13386
  }, "strip", z.ZodTypeAny, {
13273
13387
  id: string;
13274
13388
  axes: {
13275
- type: "enum" | "free" | "ref";
13389
+ type: "ref" | "enum" | "free";
13276
13390
  name: string;
13277
13391
  values?: string[] | undefined;
13278
13392
  description?: string | undefined;
@@ -13283,7 +13397,7 @@ declare const graphSchemaSchema: z.ZodObject<{
13283
13397
  }, {
13284
13398
  id: string;
13285
13399
  axes: {
13286
- type: "enum" | "free" | "ref";
13400
+ type: "ref" | "enum" | "free";
13287
13401
  name: string;
13288
13402
  values?: string[] | undefined;
13289
13403
  description?: string | undefined;
@@ -13307,14 +13421,14 @@ declare const graphSchemaSchema: z.ZodObject<{
13307
13421
  /** Optional human-readable help, shown as tooltip in the admin UI. */
13308
13422
  description: z.ZodOptional<z.ZodString>;
13309
13423
  }, "strip", z.ZodTypeAny, {
13310
- type: "enum" | "free" | "ref";
13424
+ type: "ref" | "enum" | "free";
13311
13425
  name: string;
13312
13426
  values?: string[] | undefined;
13313
13427
  description?: string | undefined;
13314
13428
  refLevel?: string | undefined;
13315
13429
  optional?: boolean | undefined;
13316
13430
  }, {
13317
- type: "enum" | "free" | "ref";
13431
+ type: "ref" | "enum" | "free";
13318
13432
  name: string;
13319
13433
  values?: string[] | undefined;
13320
13434
  description?: string | undefined;
@@ -13336,14 +13450,14 @@ declare const graphSchemaSchema: z.ZodObject<{
13336
13450
  /** Optional human-readable help, shown as tooltip in the admin UI. */
13337
13451
  description: z.ZodOptional<z.ZodString>;
13338
13452
  }, "strip", z.ZodTypeAny, {
13339
- type: "enum" | "free" | "ref";
13453
+ type: "ref" | "enum" | "free";
13340
13454
  name: string;
13341
13455
  values?: string[] | undefined;
13342
13456
  description?: string | undefined;
13343
13457
  refLevel?: string | undefined;
13344
13458
  optional?: boolean | undefined;
13345
13459
  }, {
13346
- type: "enum" | "free" | "ref";
13460
+ type: "ref" | "enum" | "free";
13347
13461
  name: string;
13348
13462
  values?: string[] | undefined;
13349
13463
  description?: string | undefined;
@@ -13355,7 +13469,7 @@ declare const graphSchemaSchema: z.ZodObject<{
13355
13469
  levels: {
13356
13470
  id: string;
13357
13471
  axes: {
13358
- type: "enum" | "free" | "ref";
13472
+ type: "ref" | "enum" | "free";
13359
13473
  name: string;
13360
13474
  values?: string[] | undefined;
13361
13475
  description?: string | undefined;
@@ -13365,7 +13479,7 @@ declare const graphSchemaSchema: z.ZodObject<{
13365
13479
  description?: string | undefined;
13366
13480
  }[];
13367
13481
  leafInput?: {
13368
- type: "enum" | "free" | "ref";
13482
+ type: "ref" | "enum" | "free";
13369
13483
  name: string;
13370
13484
  values?: string[] | undefined;
13371
13485
  description?: string | undefined;
@@ -13373,7 +13487,7 @@ declare const graphSchemaSchema: z.ZodObject<{
13373
13487
  optional?: boolean | undefined;
13374
13488
  } | undefined;
13375
13489
  leafOutput?: {
13376
- type: "enum" | "free" | "ref";
13490
+ type: "ref" | "enum" | "free";
13377
13491
  name: string;
13378
13492
  values?: string[] | undefined;
13379
13493
  description?: string | undefined;
@@ -13384,7 +13498,7 @@ declare const graphSchemaSchema: z.ZodObject<{
13384
13498
  levels: {
13385
13499
  id: string;
13386
13500
  axes: {
13387
- type: "enum" | "free" | "ref";
13501
+ type: "ref" | "enum" | "free";
13388
13502
  name: string;
13389
13503
  values?: string[] | undefined;
13390
13504
  description?: string | undefined;
@@ -13395,7 +13509,7 @@ declare const graphSchemaSchema: z.ZodObject<{
13395
13509
  }[];
13396
13510
  version?: number | undefined;
13397
13511
  leafInput?: {
13398
- type: "enum" | "free" | "ref";
13512
+ type: "ref" | "enum" | "free";
13399
13513
  name: string;
13400
13514
  values?: string[] | undefined;
13401
13515
  description?: string | undefined;
@@ -13403,7 +13517,7 @@ declare const graphSchemaSchema: z.ZodObject<{
13403
13517
  optional?: boolean | undefined;
13404
13518
  } | undefined;
13405
13519
  leafOutput?: {
13406
- type: "enum" | "free" | "ref";
13520
+ type: "ref" | "enum" | "free";
13407
13521
  name: string;
13408
13522
  values?: string[] | undefined;
13409
13523
  description?: string | undefined;
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-UF4OTZ7D.js";import"./chunk-6PJKKLKV.js";import"./chunk-GTJIKXDB.js";import"./chunk-QTS7MHIA.js";import"./chunk-S2GAEH2F.js";import"./chunk-7LN4VKDU.js";import"./chunk-IMLAPB7G.js";import"./chunk-ZVP6GB4G.js";import"./chunk-MRIVENBY.js";import"./chunk-UNIXYV3U.js";import"./chunk-AKWBDCMU.js";import"./chunk-PPUN7YHA.js";import"./chunk-VZLIBDLH.js";import"./chunk-EKJG63EJ.js";import"./chunk-SLJFY2AQ.js";import"./chunk-EMGB23H5.js";import"./chunk-JAML6222.js";import"./chunk-YMX3QCV7.js";import"./chunk-JWDJMFU6.js";import"./chunk-5HLD66CW.js";import"./chunk-IS2IWRP7.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-Y4CYQV7G.js";import"./chunk-3W2BHUGM.js";import"./chunk-SHEUCITK.js";import"./chunk-A5GYG56I.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import{m as lt,n as ct,na as yt,o as dt,p as mt,q as pt}from"./chunk-WEHEI3JO.js";import"./chunk-3NKCOZQO.js";import"./chunk-QSKG754X.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-25XO6P7W.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-6TTGRTDO.js";import"./chunk-6YPJVGYF.js";import"./chunk-SZDACK6O.js";import"./chunk-VE3SSOQX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import{s as ut}from"./chunk-TFNBUHRW.js";import"./chunk-7Y3FEIX7.js";import"./chunk-3UOTLMXD.js";import"./chunk-36AXN6ZB.js";import"./chunk-PE5V2LI7.js";import"./chunk-GQ76J72O.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-VWTBHLMX.js";import"./chunk-7H7LUBPC.js";import{a as ht}from"./chunk-GPCBOXZM.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-S3LWGPNZ.js";import"./chunk-SKSYII3K.js";import{f as gt,g as ft}from"./chunk-MLLMBE2W.js";import"./chunk-WPNRDEHW.js";import"./chunk-MWNCS57L.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-B5744ATM.js";import{j as it,k as rt,l as at}from"./chunk-KEBTFUOZ.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{Ea as nt,ua as tt,wa as st,xa as ot}from"./chunk-JYPXNH4C.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-GB4YT5IG.js";import"./chunk-YVNGPYXN.js";import"./chunk-GTJIKXDB.js";import"./chunk-MFUN3ZS3.js";import"./chunk-S2GAEH2F.js";import"./chunk-7LN4VKDU.js";import"./chunk-IMLAPB7G.js";import"./chunk-ZVP6GB4G.js";import"./chunk-MRIVENBY.js";import"./chunk-UNIXYV3U.js";import"./chunk-AKWBDCMU.js";import"./chunk-PPUN7YHA.js";import"./chunk-VZLIBDLH.js";import"./chunk-EKJG63EJ.js";import"./chunk-N2HLL25P.js";import"./chunk-EMGB23H5.js";import"./chunk-JAML6222.js";import"./chunk-YMX3QCV7.js";import"./chunk-JWDJMFU6.js";import"./chunk-5HLD66CW.js";import"./chunk-IS2IWRP7.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-Y4CYQV7G.js";import"./chunk-3W2BHUGM.js";import"./chunk-SHEUCITK.js";import"./chunk-A5GYG56I.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import{m as lt,n as ct,na as yt,o as dt,p as mt,q as pt}from"./chunk-DKLVB5L6.js";import"./chunk-THWDSPX4.js";import"./chunk-QSKG754X.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-O2CYERSX.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-6TTGRTDO.js";import"./chunk-WY5ZOEOE.js";import"./chunk-SZDACK6O.js";import"./chunk-VE3SSOQX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import{s as ut}from"./chunk-NYWIN4BW.js";import"./chunk-QVPBSV5Z.js";import"./chunk-3UOTLMXD.js";import"./chunk-36AXN6ZB.js";import"./chunk-PE5V2LI7.js";import"./chunk-GQ76J72O.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-VWTBHLMX.js";import"./chunk-ERG5OUKH.js";import{a as ht}from"./chunk-6CTQPGBR.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-SDSSRNSU.js";import"./chunk-SKSYII3K.js";import{f as gt,g as ft}from"./chunk-XWHD2Z3Z.js";import"./chunk-WPNRDEHW.js";import"./chunk-MWNCS57L.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-RB5W3FVO.js";import{j as it,k as rt,l as at}from"./chunk-HPQ3AAG3.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{Ha as tt,Ja as st,Ka as ot,Ra as nt}from"./chunk-K22XMF6M.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).