@agents-inc/cli 0.64.0 → 0.68.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 (115) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/{chunk-J4POGAJF.js → chunk-2JJUPWE5.js} +2 -2
  3. package/dist/{chunk-53URJ5XK.js → chunk-45R64U2S.js} +21 -21
  4. package/dist/chunk-45R64U2S.js.map +1 -0
  5. package/dist/{chunk-FGLUQSVU.js → chunk-6BXKF5GP.js} +2 -2
  6. package/dist/{chunk-EZ35IPXZ.js → chunk-7LCI5PSJ.js} +2 -2
  7. package/dist/{chunk-4C7CSZC5.js → chunk-EULHBV5V.js} +3 -3
  8. package/dist/{chunk-ZFY5EMDV.js → chunk-F6KEZ4Y5.js} +4 -4
  9. package/dist/{chunk-EE5EPS32.js → chunk-FCF4WQEI.js} +2 -2
  10. package/dist/{chunk-R46CB36B.js → chunk-GK5CAS3A.js} +4 -4
  11. package/dist/{chunk-WSMQ5GAP.js → chunk-HADHP7XF.js} +3 -3
  12. package/dist/{chunk-OORWBS6F.js → chunk-JAWXWNIX.js} +16 -10
  13. package/dist/chunk-JAWXWNIX.js.map +1 -0
  14. package/dist/{chunk-3YNT3NX3.js → chunk-KBG7GYPL.js} +5 -5
  15. package/dist/{chunk-O2HK3NTG.js → chunk-KMDBOO3E.js} +2 -2
  16. package/dist/{chunk-EC3UJRKZ.js → chunk-KWB3B2HS.js} +92 -163
  17. package/dist/chunk-KWB3B2HS.js.map +1 -0
  18. package/dist/{chunk-7DI3HGKL.js → chunk-KYULKBFC.js} +2 -2
  19. package/dist/chunk-KYULKBFC.js.map +1 -0
  20. package/dist/{chunk-6DEK3TDF.js → chunk-L5LD3ZSR.js} +4 -4
  21. package/dist/{chunk-F3REOP7N.js → chunk-L6MTIQ2U.js} +2 -2
  22. package/dist/{chunk-MOMI77PL.js → chunk-N4D43IOO.js} +57 -137
  23. package/dist/chunk-N4D43IOO.js.map +1 -0
  24. package/dist/{chunk-RG3KDXMR.js → chunk-QUEO6QEL.js} +3 -3
  25. package/dist/{chunk-LMZXL5RQ.js → chunk-R3AR4VLZ.js} +11 -11
  26. package/dist/chunk-R3AR4VLZ.js.map +1 -0
  27. package/dist/{chunk-4KVBH2X4.js → chunk-RMMHVE2R.js} +3 -3
  28. package/dist/{chunk-YEGPTBX5.js → chunk-SSGPFKS4.js} +3 -3
  29. package/dist/{chunk-BGPGQF35.js → chunk-VTRVAXUM.js} +3 -3
  30. package/dist/commands/build/marketplace.js +3 -3
  31. package/dist/commands/build/plugins.js +6 -6
  32. package/dist/commands/build/stack.js +6 -6
  33. package/dist/commands/compile.js +6 -6
  34. package/dist/commands/config/index.js +6 -6
  35. package/dist/commands/config/path.js +5 -5
  36. package/dist/commands/config/show.js +6 -6
  37. package/dist/commands/diff.js +5 -5
  38. package/dist/commands/doctor.js +5 -5
  39. package/dist/commands/edit.js +40 -20
  40. package/dist/commands/edit.js.map +1 -1
  41. package/dist/commands/eject.js +5 -5
  42. package/dist/commands/import/skill.js +5 -5
  43. package/dist/commands/info.js +5 -5
  44. package/dist/commands/init.js +17 -17
  45. package/dist/commands/list.js +5 -5
  46. package/dist/commands/new/agent.js +6 -6
  47. package/dist/commands/new/marketplace.js +7 -7
  48. package/dist/commands/new/skill.js +6 -6
  49. package/dist/commands/outdated.js +5 -5
  50. package/dist/commands/search.js +5 -5
  51. package/dist/commands/uninstall.js +5 -5
  52. package/dist/commands/update.js +6 -6
  53. package/dist/commands/validate.js +5 -5
  54. package/dist/components/wizard/category-grid.test.js +11 -11
  55. package/dist/components/wizard/category-grid.test.js.map +1 -1
  56. package/dist/components/wizard/domain-selection.js +6 -6
  57. package/dist/components/wizard/help-modal.js +1 -1
  58. package/dist/components/wizard/search-modal.test.js.map +1 -1
  59. package/dist/components/wizard/source-grid.test.js +8 -13
  60. package/dist/components/wizard/source-grid.test.js.map +1 -1
  61. package/dist/components/wizard/stack-selection.js +6 -6
  62. package/dist/components/wizard/step-agents.js +6 -6
  63. package/dist/components/wizard/step-agents.test.js +8 -8
  64. package/dist/components/wizard/step-agents.test.js.map +1 -1
  65. package/dist/components/wizard/step-build.js +6 -6
  66. package/dist/components/wizard/step-build.test.js +62 -76
  67. package/dist/components/wizard/step-build.test.js.map +1 -1
  68. package/dist/components/wizard/step-confirm.test.js +6 -6
  69. package/dist/components/wizard/step-settings.js +5 -5
  70. package/dist/components/wizard/step-settings.test.js +8 -8
  71. package/dist/components/wizard/step-sources.js +6 -6
  72. package/dist/components/wizard/step-sources.test.js +10 -9
  73. package/dist/components/wizard/step-sources.test.js.map +1 -1
  74. package/dist/components/wizard/step-stack.js +8 -8
  75. package/dist/components/wizard/step-stack.test.js +20 -30
  76. package/dist/components/wizard/step-stack.test.js.map +1 -1
  77. package/dist/components/wizard/wizard-layout.js +7 -7
  78. package/dist/components/wizard/wizard.js +15 -15
  79. package/dist/config-exports.js +1 -1
  80. package/dist/hooks/init.js +17 -17
  81. package/dist/{loader-4YOZCFIP.js → loader-CMSC3RAO.js} +3 -3
  82. package/dist/{source-loader-O5RMYUBW.js → source-loader-YMWWZFVD.js} +5 -5
  83. package/dist/{source-manager-NKLL6HCL.js → source-manager-6G3EVTU2.js} +5 -5
  84. package/dist/stores/matrix-store.test.js +23 -46
  85. package/dist/stores/matrix-store.test.js.map +1 -1
  86. package/dist/stores/wizard-store.js +5 -5
  87. package/dist/stores/wizard-store.test.js +39 -54
  88. package/dist/stores/wizard-store.test.js.map +1 -1
  89. package/package.json +1 -1
  90. package/src/schemas/metadata.schema.json +1 -1
  91. package/dist/chunk-53URJ5XK.js.map +0 -1
  92. package/dist/chunk-7DI3HGKL.js.map +0 -1
  93. package/dist/chunk-EC3UJRKZ.js.map +0 -1
  94. package/dist/chunk-LMZXL5RQ.js.map +0 -1
  95. package/dist/chunk-MOMI77PL.js.map +0 -1
  96. package/dist/chunk-OORWBS6F.js.map +0 -1
  97. /package/dist/{chunk-J4POGAJF.js.map → chunk-2JJUPWE5.js.map} +0 -0
  98. /package/dist/{chunk-FGLUQSVU.js.map → chunk-6BXKF5GP.js.map} +0 -0
  99. /package/dist/{chunk-EZ35IPXZ.js.map → chunk-7LCI5PSJ.js.map} +0 -0
  100. /package/dist/{chunk-4C7CSZC5.js.map → chunk-EULHBV5V.js.map} +0 -0
  101. /package/dist/{chunk-ZFY5EMDV.js.map → chunk-F6KEZ4Y5.js.map} +0 -0
  102. /package/dist/{chunk-EE5EPS32.js.map → chunk-FCF4WQEI.js.map} +0 -0
  103. /package/dist/{chunk-R46CB36B.js.map → chunk-GK5CAS3A.js.map} +0 -0
  104. /package/dist/{chunk-WSMQ5GAP.js.map → chunk-HADHP7XF.js.map} +0 -0
  105. /package/dist/{chunk-3YNT3NX3.js.map → chunk-KBG7GYPL.js.map} +0 -0
  106. /package/dist/{chunk-O2HK3NTG.js.map → chunk-KMDBOO3E.js.map} +0 -0
  107. /package/dist/{chunk-6DEK3TDF.js.map → chunk-L5LD3ZSR.js.map} +0 -0
  108. /package/dist/{chunk-F3REOP7N.js.map → chunk-L6MTIQ2U.js.map} +0 -0
  109. /package/dist/{chunk-RG3KDXMR.js.map → chunk-QUEO6QEL.js.map} +0 -0
  110. /package/dist/{chunk-4KVBH2X4.js.map → chunk-RMMHVE2R.js.map} +0 -0
  111. /package/dist/{chunk-YEGPTBX5.js.map → chunk-SSGPFKS4.js.map} +0 -0
  112. /package/dist/{chunk-BGPGQF35.js.map → chunk-VTRVAXUM.js.map} +0 -0
  113. /package/dist/{loader-4YOZCFIP.js.map → loader-CMSC3RAO.js.map} +0 -0
  114. /package/dist/{source-loader-O5RMYUBW.js.map → source-loader-YMWWZFVD.js.map} +0 -0
  115. /package/dist/{source-manager-NKLL6HCL.js.map → source-manager-6G3EVTU2.js.map} +0 -0
@@ -8,10 +8,10 @@ import {
8
8
  } from "./chunk-HGTC76BX.js";
9
9
  import {
10
10
  HelpModal
11
- } from "./chunk-7DI3HGKL.js";
11
+ } from "./chunk-KYULKBFC.js";
12
12
  import {
13
13
  useWizardStore
14
- } from "./chunk-4C7CSZC5.js";
14
+ } from "./chunk-EULHBV5V.js";
15
15
  import {
16
16
  HOTKEY_ACCEPT_DEFAULTS,
17
17
  HOTKEY_HELP,
@@ -203,4 +203,4 @@ var WizardLayout = ({
203
203
  export {
204
204
  WizardLayout
205
205
  };
206
- //# sourceMappingURL=chunk-4KVBH2X4.js.map
206
+ //# sourceMappingURL=chunk-RMMHVE2R.js.map
@@ -7,10 +7,10 @@ import {
7
7
  loadProjectSourceConfig,
8
8
  resolveAgentsSource,
9
9
  resolveSource
10
- } from "./chunk-53URJ5XK.js";
10
+ } from "./chunk-45R64U2S.js";
11
11
  import {
12
12
  BaseCommand
13
- } from "./chunk-EE5EPS32.js";
13
+ } from "./chunk-FCF4WQEI.js";
14
14
  import {
15
15
  DEFAULT_BRANDING
16
16
  } from "./chunk-EGMQ3SXN.js";
@@ -90,4 +90,4 @@ ${DEFAULT_BRANDING.NAME} Configuration
90
90
  export {
91
91
  ConfigShow
92
92
  };
93
- //# sourceMappingURL=chunk-YEGPTBX5.js.map
93
+ //# sourceMappingURL=chunk-SSGPFKS4.js.map
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-AQYAVLZK.js";
15
15
  import {
16
16
  useWizardStore
17
- } from "./chunk-4C7CSZC5.js";
17
+ } from "./chunk-EULHBV5V.js";
18
18
  import {
19
19
  KEY_LABEL_ENTER,
20
20
  KEY_LABEL_ESC
@@ -22,7 +22,7 @@ import {
22
22
  import {
23
23
  getAvailableSkills,
24
24
  resolveAlias
25
- } from "./chunk-53URJ5XK.js";
25
+ } from "./chunk-45R64U2S.js";
26
26
  import {
27
27
  findSkill,
28
28
  getMatrix
@@ -245,4 +245,4 @@ export {
245
245
  validateBuildStep,
246
246
  StepBuild
247
247
  };
248
- //# sourceMappingURL=chunk-BGPGQF35.js.map
248
+ //# sourceMappingURL=chunk-VTRVAXUM.js.map
@@ -3,13 +3,13 @@ import {
3
3
  generateMarketplace,
4
4
  getMarketplaceStats,
5
5
  writeMarketplace
6
- } from "../../chunk-FGLUQSVU.js";
6
+ } from "../../chunk-6BXKF5GP.js";
7
7
  import {
8
8
  BaseCommand
9
- } from "../../chunk-EE5EPS32.js";
9
+ } from "../../chunk-FCF4WQEI.js";
10
10
  import {
11
11
  setVerbose
12
- } from "../../chunk-LMZXL5RQ.js";
12
+ } from "../../chunk-R3AR4VLZ.js";
13
13
  import {
14
14
  DEFAULT_BRANDING,
15
15
  DEFAULT_PLUGIN_NAME,
@@ -2,25 +2,25 @@
2
2
  import {
3
3
  compileAllAgentPlugins,
4
4
  printAgentCompilationSummary
5
- } from "../../chunk-ZFY5EMDV.js";
5
+ } from "../../chunk-F6KEZ4Y5.js";
6
6
  import {
7
7
  compileAllSkillPlugins,
8
8
  compileSkillPlugin,
9
9
  printCompilationSummary
10
- } from "../../chunk-53URJ5XK.js";
11
- import "../../chunk-F3REOP7N.js";
10
+ } from "../../chunk-45R64U2S.js";
11
+ import "../../chunk-L6MTIQ2U.js";
12
12
  import "../../chunk-T4EXUIBY.js";
13
13
  import "../../chunk-BKL3DF2Q.js";
14
14
  import {
15
15
  BaseCommand
16
- } from "../../chunk-EE5EPS32.js";
16
+ } from "../../chunk-FCF4WQEI.js";
17
17
  import {
18
18
  setVerbose
19
- } from "../../chunk-LMZXL5RQ.js";
19
+ } from "../../chunk-R3AR4VLZ.js";
20
20
  import {
21
21
  DIRS
22
22
  } from "../../chunk-EGMQ3SXN.js";
23
- import "../../chunk-EC3UJRKZ.js";
23
+ import "../../chunk-KWB3B2HS.js";
24
24
  import {
25
25
  init_esm_shims
26
26
  } from "../../chunk-DHET7RCE.js";
@@ -1,27 +1,27 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  getAgentDefinitions
4
- } from "../../chunk-ZFY5EMDV.js";
4
+ } from "../../chunk-F6KEZ4Y5.js";
5
5
  import {
6
6
  compileStackPlugin,
7
7
  loadStacks,
8
8
  printStackCompilationSummary
9
- } from "../../chunk-53URJ5XK.js";
10
- import "../../chunk-F3REOP7N.js";
9
+ } from "../../chunk-45R64U2S.js";
10
+ import "../../chunk-L6MTIQ2U.js";
11
11
  import "../../chunk-T4EXUIBY.js";
12
12
  import "../../chunk-BKL3DF2Q.js";
13
13
  import {
14
14
  BaseCommand,
15
15
  EXIT_CODES
16
- } from "../../chunk-EE5EPS32.js";
16
+ } from "../../chunk-FCF4WQEI.js";
17
17
  import {
18
18
  setVerbose
19
- } from "../../chunk-LMZXL5RQ.js";
19
+ } from "../../chunk-R3AR4VLZ.js";
20
20
  import {
21
21
  PROJECT_ROOT,
22
22
  STACKS_FILE_PATH
23
23
  } from "../../chunk-EGMQ3SXN.js";
24
- import "../../chunk-EC3UJRKZ.js";
24
+ import "../../chunk-KWB3B2HS.js";
25
25
  import {
26
26
  init_esm_shims
27
27
  } from "../../chunk-DHET7RCE.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getAgentDefinitions,
4
4
  recompileAgents
5
- } from "../chunk-ZFY5EMDV.js";
5
+ } from "../chunk-F6KEZ4Y5.js";
6
6
  import {
7
7
  ERROR_MESSAGES,
8
8
  INFO_MESSAGES,
@@ -13,10 +13,10 @@ import {
13
13
  detectProjectInstallation,
14
14
  discoverAllPluginSkills,
15
15
  resolveSource
16
- } from "../chunk-53URJ5XK.js";
16
+ } from "../chunk-45R64U2S.js";
17
17
  import {
18
18
  parseFrontmatter
19
- } from "../chunk-F3REOP7N.js";
19
+ } from "../chunk-L6MTIQ2U.js";
20
20
  import {
21
21
  typedEntries,
22
22
  typedKeys
@@ -25,7 +25,7 @@ import "../chunk-BKL3DF2Q.js";
25
25
  import {
26
26
  BaseCommand,
27
27
  EXIT_CODES
28
- } from "../chunk-EE5EPS32.js";
28
+ } from "../chunk-FCF4WQEI.js";
29
29
  import {
30
30
  directoryExists,
31
31
  fileExists,
@@ -34,14 +34,14 @@ import {
34
34
  setVerbose,
35
35
  verbose,
36
36
  warn
37
- } from "../chunk-LMZXL5RQ.js";
37
+ } from "../chunk-R3AR4VLZ.js";
38
38
  import {
39
39
  CLI_BIN_NAME,
40
40
  GLOBAL_INSTALL_ROOT,
41
41
  LOCAL_SKILLS_PATH,
42
42
  STANDARD_FILES
43
43
  } from "../chunk-EGMQ3SXN.js";
44
- import "../chunk-EC3UJRKZ.js";
44
+ import "../chunk-KWB3B2HS.js";
45
45
  import {
46
46
  init_esm_shims
47
47
  } from "../chunk-DHET7RCE.js";
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ConfigShow
4
- } from "../../chunk-YEGPTBX5.js";
5
- import "../../chunk-53URJ5XK.js";
6
- import "../../chunk-F3REOP7N.js";
4
+ } from "../../chunk-SSGPFKS4.js";
5
+ import "../../chunk-45R64U2S.js";
6
+ import "../../chunk-L6MTIQ2U.js";
7
7
  import "../../chunk-T4EXUIBY.js";
8
8
  import "../../chunk-BKL3DF2Q.js";
9
- import "../../chunk-EE5EPS32.js";
10
- import "../../chunk-LMZXL5RQ.js";
9
+ import "../../chunk-FCF4WQEI.js";
10
+ import "../../chunk-R3AR4VLZ.js";
11
11
  import "../../chunk-EGMQ3SXN.js";
12
- import "../../chunk-EC3UJRKZ.js";
12
+ import "../../chunk-KWB3B2HS.js";
13
13
  import {
14
14
  init_esm_shims
15
15
  } from "../../chunk-DHET7RCE.js";
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  getProjectConfigPath
4
- } from "../../chunk-53URJ5XK.js";
5
- import "../../chunk-F3REOP7N.js";
4
+ } from "../../chunk-45R64U2S.js";
5
+ import "../../chunk-L6MTIQ2U.js";
6
6
  import "../../chunk-T4EXUIBY.js";
7
7
  import "../../chunk-BKL3DF2Q.js";
8
8
  import {
9
9
  BaseCommand
10
- } from "../../chunk-EE5EPS32.js";
11
- import "../../chunk-LMZXL5RQ.js";
10
+ } from "../../chunk-FCF4WQEI.js";
11
+ import "../../chunk-R3AR4VLZ.js";
12
12
  import "../../chunk-EGMQ3SXN.js";
13
- import "../../chunk-EC3UJRKZ.js";
13
+ import "../../chunk-KWB3B2HS.js";
14
14
  import {
15
15
  init_esm_shims
16
16
  } from "../../chunk-DHET7RCE.js";
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ConfigShow
4
- } from "../../chunk-YEGPTBX5.js";
5
- import "../../chunk-53URJ5XK.js";
6
- import "../../chunk-F3REOP7N.js";
4
+ } from "../../chunk-SSGPFKS4.js";
5
+ import "../../chunk-45R64U2S.js";
6
+ import "../../chunk-L6MTIQ2U.js";
7
7
  import "../../chunk-T4EXUIBY.js";
8
8
  import "../../chunk-BKL3DF2Q.js";
9
- import "../../chunk-EE5EPS32.js";
10
- import "../../chunk-LMZXL5RQ.js";
9
+ import "../../chunk-FCF4WQEI.js";
10
+ import "../../chunk-R3AR4VLZ.js";
11
11
  import "../../chunk-EGMQ3SXN.js";
12
- import "../../chunk-EC3UJRKZ.js";
12
+ import "../../chunk-KWB3B2HS.js";
13
13
  import "../../chunk-DHET7RCE.js";
14
14
  export {
15
15
  ConfigShow as default
@@ -2,26 +2,26 @@
2
2
  import {
3
3
  loadSkillsMatrixFromSource,
4
4
  readForkedFromMetadata
5
- } from "../chunk-53URJ5XK.js";
6
- import "../chunk-F3REOP7N.js";
5
+ } from "../chunk-45R64U2S.js";
6
+ import "../chunk-L6MTIQ2U.js";
7
7
  import "../chunk-T4EXUIBY.js";
8
8
  import "../chunk-BKL3DF2Q.js";
9
9
  import {
10
10
  BaseCommand,
11
11
  EXIT_CODES
12
- } from "../chunk-EE5EPS32.js";
12
+ } from "../chunk-FCF4WQEI.js";
13
13
  import {
14
14
  fileExists,
15
15
  getErrorMessage,
16
16
  listDirectories,
17
17
  readFile
18
- } from "../chunk-LMZXL5RQ.js";
18
+ } from "../chunk-R3AR4VLZ.js";
19
19
  import {
20
20
  CLI_BIN_NAME,
21
21
  LOCAL_SKILLS_PATH,
22
22
  STANDARD_FILES
23
23
  } from "../chunk-EGMQ3SXN.js";
24
- import "../chunk-EC3UJRKZ.js";
24
+ import "../chunk-KWB3B2HS.js";
25
25
  import {
26
26
  init_esm_shims
27
27
  } from "../chunk-DHET7RCE.js";
@@ -5,8 +5,8 @@ import {
5
5
  loadProjectConfig,
6
6
  loadSkillsMatrixFromSource,
7
7
  validateProjectConfig
8
- } from "../chunk-53URJ5XK.js";
9
- import "../chunk-F3REOP7N.js";
8
+ } from "../chunk-45R64U2S.js";
9
+ import "../chunk-L6MTIQ2U.js";
10
10
  import "../chunk-T4EXUIBY.js";
11
11
  import {
12
12
  useMatrixStore
@@ -14,14 +14,14 @@ import {
14
14
  import {
15
15
  BaseCommand,
16
16
  EXIT_CODES
17
- } from "../chunk-EE5EPS32.js";
17
+ } from "../chunk-FCF4WQEI.js";
18
18
  import {
19
19
  directoryExists,
20
20
  fileExists,
21
21
  getErrorMessage,
22
22
  glob,
23
23
  setVerbose
24
- } from "../chunk-LMZXL5RQ.js";
24
+ } from "../chunk-R3AR4VLZ.js";
25
25
  import {
26
26
  CLAUDE_DIR,
27
27
  CLAUDE_SRC_DIR,
@@ -29,7 +29,7 @@ import {
29
29
  DEFAULT_BRANDING,
30
30
  STANDARD_FILES
31
31
  } from "../chunk-EGMQ3SXN.js";
32
- import "../chunk-EC3UJRKZ.js";
32
+ import "../chunk-KWB3B2HS.js";
33
33
  import {
34
34
  init_esm_shims
35
35
  } from "../chunk-DHET7RCE.js";
@@ -1,19 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  Wizard
4
- } from "../chunk-OORWBS6F.js";
5
- import "../chunk-4KVBH2X4.js";
4
+ } from "../chunk-JAWXWNIX.js";
5
+ import "../chunk-RMMHVE2R.js";
6
6
  import "../chunk-SXGBPQY6.js";
7
- import "../chunk-RG3KDXMR.js";
8
- import "../chunk-WSMQ5GAP.js";
7
+ import "../chunk-QUEO6QEL.js";
8
+ import "../chunk-HADHP7XF.js";
9
9
  import "../chunk-HGTC76BX.js";
10
- import "../chunk-6DEK3TDF.js";
11
- import "../chunk-EZ35IPXZ.js";
12
- import "../chunk-J4POGAJF.js";
13
- import "../chunk-BGPGQF35.js";
10
+ import "../chunk-L5LD3ZSR.js";
11
+ import "../chunk-7LCI5PSJ.js";
12
+ import "../chunk-2JJUPWE5.js";
13
+ import "../chunk-VTRVAXUM.js";
14
14
  import "../chunk-K77I4XGL.js";
15
15
  import "../chunk-52THXN5G.js";
16
- import "../chunk-7DI3HGKL.js";
16
+ import "../chunk-KYULKBFC.js";
17
17
  import "../chunk-MWGDG4QN.js";
18
18
  import "../chunk-KFDTVSIC.js";
19
19
  import "../chunk-7SOPVGDV.js";
@@ -21,20 +21,20 @@ import "../chunk-6IK2TCK7.js";
21
21
  import "../chunk-KUV24B5M.js";
22
22
  import "../chunk-CKPJTMNC.js";
23
23
  import "../chunk-GG4BSB6S.js";
24
- import "../chunk-O2HK3NTG.js";
24
+ import "../chunk-KMDBOO3E.js";
25
25
  import "../chunk-ZYUASJUN.js";
26
26
  import "../chunk-OV5UJWS5.js";
27
27
  import "../chunk-XMLCXRTS.js";
28
28
  import "../chunk-AQYAVLZK.js";
29
29
  import "../chunk-AUNBGZS4.js";
30
- import "../chunk-4C7CSZC5.js";
30
+ import "../chunk-EULHBV5V.js";
31
31
  import "../chunk-T5DJCIUP.js";
32
32
  import "../chunk-U3IGFMCY.js";
33
33
  import "../chunk-6VIOO74O.js";
34
34
  import {
35
35
  getAgentDefinitions,
36
36
  recompileAgents
37
- } from "../chunk-ZFY5EMDV.js";
37
+ } from "../chunk-F6KEZ4Y5.js";
38
38
  import {
39
39
  ERROR_MESSAGES,
40
40
  INFO_MESSAGES,
@@ -55,10 +55,10 @@ import {
55
55
  loadSkillsMatrixFromSource,
56
56
  migrateLocalSkillScope,
57
57
  writeScopedConfigs
58
- } from "../chunk-53URJ5XK.js";
58
+ } from "../chunk-45R64U2S.js";
59
59
  import {
60
60
  loadAllAgents
61
- } from "../chunk-F3REOP7N.js";
61
+ } from "../chunk-L6MTIQ2U.js";
62
62
  import "../chunk-T4EXUIBY.js";
63
63
  import {
64
64
  findSkill,
@@ -69,14 +69,14 @@ import {
69
69
  import {
70
70
  BaseCommand,
71
71
  EXIT_CODES
72
- } from "../chunk-EE5EPS32.js";
72
+ } from "../chunk-FCF4WQEI.js";
73
73
  import {
74
74
  disableBuffering,
75
75
  drainBuffer,
76
76
  enableBuffering,
77
77
  getErrorMessage,
78
78
  pushBufferMessage
79
- } from "../chunk-LMZXL5RQ.js";
79
+ } from "../chunk-R3AR4VLZ.js";
80
80
  import {
81
81
  ASCII_LOGO,
82
82
  CLI_BIN_NAME,
@@ -84,7 +84,7 @@ import {
84
84
  PROJECT_ROOT,
85
85
  SOURCE_DISPLAY_NAMES
86
86
  } from "../chunk-EGMQ3SXN.js";
87
- import "../chunk-EC3UJRKZ.js";
87
+ import "../chunk-KWB3B2HS.js";
88
88
  import {
89
89
  init_esm_shims
90
90
  } from "../chunk-DHET7RCE.js";
@@ -194,6 +194,7 @@ var Edit = class _Edit extends BaseCommand {
194
194
  installedSkillIds: currentSkillIds,
195
195
  installedSkillConfigs: projectConfig?.config?.skills,
196
196
  lockedSkillIds,
197
+ installedAgentConfigs: projectConfig?.config?.agents,
197
198
  lockedAgentNames,
198
199
  projectDir,
199
200
  startupMessages,
@@ -240,10 +241,23 @@ var Edit = class _Edit extends BaseCommand {
240
241
  }
241
242
  }
242
243
  }
244
+ const agentScopeChanges = /* @__PURE__ */ new Map();
245
+ if (projectConfig?.config?.agents) {
246
+ for (const newAgent of result.agentConfigs) {
247
+ const oldAgent = projectConfig.config.agents.find((a) => a.name === newAgent.name);
248
+ if (oldAgent && oldAgent.scope !== newAgent.scope) {
249
+ agentScopeChanges.set(newAgent.name, {
250
+ from: oldAgent.scope,
251
+ to: newAgent.scope
252
+ });
253
+ }
254
+ }
255
+ }
243
256
  const hasSourceChanges = sourceChanges.size > 0;
244
257
  const hasScopeChanges = scopeChanges.size > 0;
258
+ const hasAgentScopeChanges = agentScopeChanges.size > 0;
245
259
  const hasSkillChanges = addedSkills.length > 0 || removedSkills.length > 0;
246
- if (!hasSkillChanges && !hasSourceChanges && !hasScopeChanges) {
260
+ if (!hasSkillChanges && !hasSourceChanges && !hasScopeChanges && !hasAgentScopeChanges) {
247
261
  this.log(INFO_MESSAGES.NO_CHANGES_MADE);
248
262
  this.log("Plugin unchanged\n");
249
263
  return;
@@ -266,6 +280,11 @@ var Edit = class _Edit extends BaseCommand {
266
280
  const toLabel = change.to === "global" ? "[G]" : "[P]";
267
281
  this.log(` ~ ${skillId} (${fromLabel} \u2192 ${toLabel})`);
268
282
  }
283
+ for (const [agentName, change] of agentScopeChanges) {
284
+ const fromLabel = change.from === "global" ? "[G]" : "[P]";
285
+ const toLabel = change.to === "global" ? "[G]" : "[P]";
286
+ this.log(` ~ ${agentName} (${fromLabel} \u2192 ${toLabel})`);
287
+ }
269
288
  this.log("");
270
289
  const oldSkills = projectConfig?.config?.skills ?? [];
271
290
  const migrationPlan = detectMigrations(oldSkills, result.skills);
@@ -402,8 +421,9 @@ var Edit = class _Edit extends BaseCommand {
402
421
  if (hasSourceChanges) {
403
422
  summaryParts.push(`${sourceChanges.size} source${sourceChanges.size > 1 ? "s" : ""} changed`);
404
423
  }
405
- if (hasScopeChanges) {
406
- summaryParts.push(`${scopeChanges.size} scope${scopeChanges.size > 1 ? "s" : ""} changed`);
424
+ if (hasScopeChanges || hasAgentScopeChanges) {
425
+ const totalScopeChanges = scopeChanges.size + agentScopeChanges.size;
426
+ summaryParts.push(`${totalScopeChanges} scope${totalScopeChanges > 1 ? "s" : ""} changed`);
407
427
  }
408
428
  this.log(`
409
429
  \u2713 Plugin updated! (${summaryParts.join(", ")})
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/cli/commands/edit.tsx"],"sourcesContent":["import os from \"os\";\n\nimport { Flags } from \"@oclif/core\";\nimport { render } from \"ink\";\n\nimport { BaseCommand } from \"../base-command.js\";\nimport { Wizard, type WizardResultV2 } from \"../components/wizard/wizard.js\";\nimport {\n ASCII_LOGO,\n CLI_BIN_NAME,\n GLOBAL_INSTALL_ROOT,\n PROJECT_ROOT,\n SOURCE_DISPLAY_NAMES,\n} from \"../consts.js\";\nimport { getAgentDefinitions, recompileAgents } from \"../lib/agents/index.js\";\nimport { loadProjectConfig } from \"../lib/configuration/index.js\";\nimport { EXIT_CODES } from \"../lib/exit-codes.js\";\nimport {\n detectInstallation,\n buildAndMergeConfig,\n writeScopedConfigs,\n detectMigrations,\n executeMigration,\n deriveInstallMode,\n} from \"../lib/installation/index.js\";\nimport {\n getMarketplaceLabel,\n loadAllAgents,\n loadSkillsMatrixFromSource,\n} from \"../lib/loading/index.js\";\nimport { findSkill, getMatrix, getSkill, useMatrixStore } from \"../stores/matrix-store\";\nimport { discoverAllPluginSkills } from \"../lib/plugins/index.js\";\nimport { deleteLocalSkill, migrateLocalSkillScope } from \"../lib/skills/index.js\";\nimport type { AgentDefinition, AgentName, SkillId } from \"../types/index.js\";\nimport { getErrorMessage } from \"../utils/errors.js\";\nimport { claudePluginInstall, claudePluginUninstall } from \"../utils/exec.js\";\nimport {\n enableBuffering,\n drainBuffer,\n disableBuffering,\n pushBufferMessage,\n type StartupMessage,\n} from \"../utils/logger.js\";\nimport { ERROR_MESSAGES, INFO_MESSAGES, STATUS_MESSAGES } from \"../utils/messages.js\";\n\nfunction formatSourceDisplayName(sourceName: string): string {\n return SOURCE_DISPLAY_NAMES[sourceName] ?? sourceName;\n}\n\nexport default class Edit extends BaseCommand {\n static summary = \"Edit skills in the plugin\";\n static description = \"Modify the currently installed skills via interactive wizard\";\n\n static examples = [\n {\n description: \"Open the edit wizard\",\n command: \"<%= config.bin %> <%= command.id %>\",\n },\n {\n description: \"Edit with a custom source\",\n command: \"<%= config.bin %> <%= command.id %> --source github:org/marketplace\",\n },\n {\n description: \"Force refresh skills from remote\",\n command: \"<%= config.bin %> <%= command.id %> --refresh\",\n },\n ];\n\n static flags = {\n ...BaseCommand.baseFlags,\n refresh: Flags.boolean({\n description: \"Force refresh from remote sources\",\n default: false,\n }),\n \"agent-source\": Flags.string({\n description: \"Remote agent partials source (default: local CLI)\",\n }),\n };\n\n async run(): Promise<void> {\n const { flags } = await this.parse(Edit);\n\n const installation = await detectInstallation();\n\n if (!installation) {\n this.error(ERROR_MESSAGES.NO_INSTALLATION, {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n const projectDir = installation.projectDir;\n\n enableBuffering();\n\n if (installation.projectDir === os.homedir()) {\n pushBufferMessage(\n \"info\",\n \"No project installation found. Using global installation from ~/.claude-src/\",\n );\n }\n let sourceResult;\n let startupMessages: StartupMessage[] = [];\n try {\n sourceResult = await loadSkillsMatrixFromSource({\n sourceFlag: flags.source,\n projectDir,\n forceRefresh: flags.refresh,\n });\n\n const sourceInfo = sourceResult.isLocal ? \"local\" : sourceResult.sourceConfig.sourceOrigin;\n pushBufferMessage(\n \"info\",\n `Loaded ${Object.keys(getMatrix().skills).length} skills (${sourceInfo})`,\n );\n } catch (error) {\n disableBuffering();\n this.handleError(error);\n }\n\n const projectConfig = await loadProjectConfig(projectDir);\n\n let currentSkillIds: SkillId[];\n try {\n const discoveredSkills = await discoverAllPluginSkills(projectDir);\n // Boundary cast: discoverAllPluginSkills keys are skill IDs from frontmatter\n currentSkillIds = Object.keys(discoveredSkills) as SkillId[];\n\n // In local mode, plugin discovery returns empty — fall back to project config skills\n if (currentSkillIds.length === 0 && projectConfig?.config?.skills?.length) {\n currentSkillIds = projectConfig.config.skills.map((s) => s.id);\n pushBufferMessage(\"info\", `Found ${currentSkillIds.length} skills from project config`);\n } else {\n pushBufferMessage(\"info\", `Current plugin has ${currentSkillIds.length} skills`);\n }\n } catch (error) {\n disableBuffering();\n this.handleError(error);\n }\n\n startupMessages = drainBuffer();\n disableBuffering();\n\n let wizardResult: WizardResultV2 | null = null;\n const marketplaceLabel = getMarketplaceLabel(sourceResult);\n\n // D9: In project context, existing global items are read-only (locked).\n // When editing from ~/ (global context), nothing is locked.\n const isGlobalDir = projectDir === GLOBAL_INSTALL_ROOT;\n const lockedSkillIds = isGlobalDir\n ? undefined\n : projectConfig?.config?.skills?.filter((s) => s.scope === \"global\").map((s) => s.id);\n const lockedAgentNames = isGlobalDir\n ? undefined\n : projectConfig?.config?.agents?.filter((a) => a.scope === \"global\").map((a) => a.name);\n\n useMatrixStore.getState().setMatrix(sourceResult.matrix);\n const { waitUntilExit } = render(\n <Wizard\n version={this.config.version}\n marketplaceLabel={marketplaceLabel}\n logo={ASCII_LOGO}\n initialStep=\"build\"\n initialDomains={projectConfig?.config?.domains}\n initialAgents={projectConfig?.config?.selectedAgents}\n installedSkillIds={currentSkillIds}\n installedSkillConfigs={projectConfig?.config?.skills}\n lockedSkillIds={lockedSkillIds}\n lockedAgentNames={lockedAgentNames}\n projectDir={projectDir}\n startupMessages={startupMessages}\n onComplete={(result) => {\n wizardResult = result as WizardResultV2;\n }}\n onCancel={() => {\n this.log(\"\\nEdit cancelled\");\n }}\n />,\n );\n\n await waitUntilExit();\n\n const result = wizardResult as WizardResultV2 | null;\n\n if (!result || result.cancelled) {\n this.error(\"Cancelled\", { exit: EXIT_CODES.CANCELLED });\n }\n\n if (!result.validation.valid) {\n const errorMessages = result.validation.errors.map((e) => e.message).join(\"\\n \");\n this.error(`Selection has validation errors:\\n ${errorMessages}`, {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n const newSkillIds = result.skills.map((s) => s.id);\n const addedSkills = newSkillIds.filter((id) => !currentSkillIds.includes(id));\n const removedSkills = currentSkillIds.filter((id) => !newSkillIds.includes(id));\n\n const sourceChanges = new Map<SkillId, { from: string; to: string }>();\n const scopeChanges = new Map<\n SkillId,\n { from: \"project\" | \"global\"; to: \"project\" | \"global\" }\n >();\n if (projectConfig?.config?.skills) {\n for (const newSkill of result.skills) {\n const oldSkill = projectConfig.config.skills.find((s) => s.id === newSkill.id);\n if (oldSkill && oldSkill.source !== newSkill.source) {\n sourceChanges.set(newSkill.id, {\n from: oldSkill.source,\n to: newSkill.source,\n });\n }\n if (oldSkill && oldSkill.scope !== newSkill.scope) {\n scopeChanges.set(newSkill.id, {\n from: oldSkill.scope,\n to: newSkill.scope,\n });\n }\n }\n }\n\n const hasSourceChanges = sourceChanges.size > 0;\n const hasScopeChanges = scopeChanges.size > 0;\n const hasSkillChanges = addedSkills.length > 0 || removedSkills.length > 0;\n\n if (!hasSkillChanges && !hasSourceChanges && !hasScopeChanges) {\n this.log(INFO_MESSAGES.NO_CHANGES_MADE);\n this.log(\"Plugin unchanged\\n\");\n return;\n }\n\n this.log(\"\\nChanges:\");\n for (const skillId of addedSkills) {\n this.log(` + ${getSkill(skillId).displayName}`);\n }\n for (const skillId of removedSkills) {\n const skill = findSkill(skillId);\n this.log(` - ${skill?.displayName ?? skillId}`);\n }\n for (const [skillId, change] of sourceChanges) {\n const fromLabel = formatSourceDisplayName(change.from);\n const toLabel = formatSourceDisplayName(change.to);\n this.log(` ~ ${skillId} (${fromLabel} \\u2192 ${toLabel})`);\n }\n for (const [skillId, change] of scopeChanges) {\n const fromLabel = change.from === \"global\" ? \"[G]\" : \"[P]\";\n const toLabel = change.to === \"global\" ? \"[G]\" : \"[P]\";\n this.log(` ~ ${skillId} (${fromLabel} \\u2192 ${toLabel})`);\n }\n this.log(\"\");\n\n // Handle per-skill mode migrations (local <-> plugin)\n const oldSkills = projectConfig?.config?.skills ?? [];\n const migrationPlan = detectMigrations(oldSkills, result.skills);\n const hasMigrations = migrationPlan.toLocal.length > 0 || migrationPlan.toPlugin.length > 0;\n\n if (hasMigrations) {\n if (migrationPlan.toLocal.length > 0) {\n this.log(`Switching ${migrationPlan.toLocal.length} skill(s) to local:`);\n for (const migration of migrationPlan.toLocal) {\n this.log(` - ${migration.id}`);\n }\n }\n if (migrationPlan.toPlugin.length > 0) {\n this.log(`Switching ${migrationPlan.toPlugin.length} skill(s) to plugin:`);\n for (const migration of migrationPlan.toPlugin) {\n this.log(` - ${migration.id}`);\n }\n }\n\n const migrationResult = await executeMigration(migrationPlan, projectDir, sourceResult);\n\n for (const warning of migrationResult.warnings) {\n this.warn(warning);\n }\n }\n\n const migratedSkillIds = new Set([\n ...migrationPlan.toLocal.map((m) => m.id),\n ...migrationPlan.toPlugin.map((m) => m.id),\n ]);\n\n // Handle scope migrations (P→G or G→P) for local-mode skills\n for (const [skillId, change] of scopeChanges) {\n const skillConfig = result.skills.find((s) => s.id === skillId);\n if (skillConfig?.source === \"local\") {\n await migrateLocalSkillScope(skillId, change.from, projectDir);\n } else if (sourceResult.marketplace && skillConfig) {\n // Plugin-mode scope change: uninstall from old scope, install to new scope\n const oldPluginScope = change.from === \"global\" ? \"user\" : \"project\";\n const newPluginScope = change.to === \"global\" ? \"user\" : \"project\";\n try {\n await claudePluginUninstall(skillId, oldPluginScope, projectDir);\n const pluginRef = `${skillId}@${sourceResult.marketplace}`;\n await claudePluginInstall(pluginRef, newPluginScope, projectDir);\n } catch (error) {\n this.warn(`Failed to migrate plugin scope for ${skillId}: ${getErrorMessage(error)}`);\n }\n }\n }\n\n // Handle remaining non-migration source changes (e.g., marketplace A -> marketplace B)\n for (const [skillId, change] of sourceChanges) {\n // Skip skills already handled by mode migration\n if (migratedSkillIds.has(skillId)) {\n continue;\n }\n if (change.from === \"local\") {\n await deleteLocalSkill(projectDir, skillId);\n }\n }\n\n if (sourceResult.marketplace) {\n for (const skillId of addedSkills) {\n // Find the skill config to get its scope\n const skillConfig = result.skills.find((s) => s.id === skillId);\n if (!skillConfig || skillConfig.source === \"local\") continue;\n\n const pluginRef = `${skillId}@${sourceResult.marketplace}`;\n const pluginScope = skillConfig.scope === \"global\" ? \"user\" : \"project\";\n this.log(`Installing plugin: ${pluginRef}...`);\n try {\n await claudePluginInstall(pluginRef, pluginScope, projectDir);\n } catch (error) {\n this.warn(`Failed to install plugin ${pluginRef}: ${getErrorMessage(error)}`);\n }\n }\n for (const skillId of removedSkills) {\n // For removed skills, use old config to determine scope\n const oldSkill = projectConfig?.config?.skills?.find((s) => s.id === skillId);\n const pluginScope = oldSkill?.scope === \"global\" ? \"user\" : \"project\";\n this.log(`Uninstalling plugin: ${skillId}...`);\n try {\n await claudePluginUninstall(skillId, pluginScope, projectDir);\n } catch (error) {\n this.warn(`Failed to uninstall plugin ${skillId}: ${getErrorMessage(error)}`);\n }\n }\n }\n\n // Load agent definitions first — needed for both config-types.ts and recompilation\n let sourcePath: string;\n this.log(\n flags[\"agent-source\"]\n ? STATUS_MESSAGES.FETCHING_AGENT_PARTIALS\n : STATUS_MESSAGES.LOADING_AGENT_PARTIALS,\n );\n try {\n const agentDefs = await getAgentDefinitions(flags[\"agent-source\"], {\n forceRefresh: flags.refresh,\n });\n sourcePath = agentDefs.sourcePath;\n this.log(flags[\"agent-source\"] ? \"✓ Agent partials fetched\\n\" : \"✓ Agent partials loaded\\n\");\n } catch (error) {\n this.handleError(error);\n }\n\n // Persist wizard result to config.ts and config-types.ts (split by scope when in project context)\n try {\n const mergeResult = await buildAndMergeConfig(result, sourceResult, projectDir, flags.source);\n\n // Load full agent definitions for config-types.ts generation\n const cliAgents = await loadAllAgents(PROJECT_ROOT);\n const sourceAgents = await loadAllAgents(sourcePath);\n // Boundary cast: loadAllAgents returns Record<string, AgentDefinition>, agent dirs are AgentName by convention\n const agents = { ...cliAgents, ...sourceAgents } as Record<AgentName, AgentDefinition>;\n\n await writeScopedConfigs(\n mergeResult.config,\n sourceResult.matrix,\n agents,\n projectDir,\n installation.configPath,\n );\n } catch (error) {\n this.warn(`Could not update config: ${getErrorMessage(error)}`);\n }\n\n this.log(STATUS_MESSAGES.RECOMPILING_AGENTS);\n try {\n const recompileSkills = await discoverAllPluginSkills(projectDir);\n\n const recompileResult = await recompileAgents({\n pluginDir: projectDir,\n sourcePath,\n skills: recompileSkills,\n projectDir,\n outputDir: installation.agentsDir,\n installMode: deriveInstallMode(result.skills),\n });\n\n if (recompileResult.failed.length > 0) {\n this.log(\n `✓ Recompiled ${recompileResult.compiled.length} agents (${recompileResult.failed.length} failed)\\n`,\n );\n for (const warning of recompileResult.warnings) {\n this.warn(warning);\n }\n } else if (recompileResult.compiled.length > 0) {\n this.log(`✓ Recompiled ${recompileResult.compiled.length} agents\\n`);\n } else {\n this.log(\"✓ No agents to recompile\\n\");\n }\n } catch (error) {\n this.warn(`Agent recompilation failed: ${getErrorMessage(error)}`);\n this.log(`You can manually recompile with '${CLI_BIN_NAME} compile'.\\n`);\n }\n\n const summaryParts = [`${addedSkills.length} added`, `${removedSkills.length} removed`];\n if (hasSourceChanges) {\n summaryParts.push(`${sourceChanges.size} source${sourceChanges.size > 1 ? \"s\" : \"\"} changed`);\n }\n if (hasScopeChanges) {\n summaryParts.push(`${scopeChanges.size} scope${scopeChanges.size > 1 ? \"s\" : \"\"} changed`);\n }\n this.log(`\\n\\u2713 Plugin updated! (${summaryParts.join(\", \")})\\n`);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,OAAO,QAAQ;AAEf,SAAS,aAAa;AACtB,SAAS,cAAc;AA0JjB;AAhHN,SAAS,wBAAwB,YAA4B;AAC3D,SAAO,qBAAqB,UAAU,KAAK;AAC7C;AAEA,IAAqB,OAArB,MAAqB,cAAa,YAAY;AAAA,EAC5C,OAAO,UAAU;AAAA,EACjB,OAAO,cAAc;AAAA,EAErB,OAAO,WAAW;AAAA,IAChB;AAAA,MACE,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA;AAAA,MACE,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA;AAAA,MACE,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EAEA,OAAO,QAAQ;AAAA,IACb,GAAG,YAAY;AAAA,IACf,SAAS,MAAM,QAAQ;AAAA,MACrB,aAAa;AAAA,MACb,SAAS;AAAA,IACX,CAAC;AAAA,IACD,gBAAgB,MAAM,OAAO;AAAA,MAC3B,aAAa;AAAA,IACf,CA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A,QACR;AAAA,QACA,WAAW,aAAa;AAAA,QACxB,aAAa,kBAAkB,OAAO,MAAM;AAAA,MAC9C,CAAC;AAED,UAAI,gBAAgB,OAAO,SAAS,GAAG;AACrC,aAAK;AAAA,UACH,qBAAgB,gBAAgB,SAAS,MAAM,YAAY,gBAAgB,OAAO,MAAM;AAAA;AAAA,QAC1F;AACA,mBAAW,WAAW,gBAAgB,UAAU;AAC9C,eAAK,KAAK,OAAO;AAAA,QACnB;AAAA,MACF,WAAW,gBAAgB,SAAS,SAAS,GAAG;AAC9C,aAAK,IAAI,qBAAgB,gBAAgB,SAAS,MAAM;AAAA,CAAW;AAAA,MACrE,OAAO;AACL,aAAK,IAAI,iCAA4B;AAAA,MACvC;AAAA,IACF,SAAS,OAAO;AACd,WAAK,KAAK,+BAA+B,gBAAgB,KAAK,CAAC,EAAE;AACjE,WAAK,IAAI,oCAAoC,YAAY;AAAA,CAAc;AAAA,IACzE;AAEA,UAAM,eAAe,CAAC,GAAG,YAAY,MAAM,UAAU,GAAG,cAAc,MAAM,UAAU;AACtF,QAAI,kBAAkB;AACpB,mBAAa,KAAK,GAAG,cAAc,IAAI,UAAU,cAAc,OAAO,IAAI,MAAM,EAAE,UAAU;AAAA,IAC9F;AACA,QAAI,iBAAiB;AACnB,mBAAa,KAAK,GAAG,aAAa,IAAI,SAAS,aAAa,OAAO,IAAI,MAAM,EAAE,UAAU;AAAA,IAC3F;AACA,SAAK,IAAI;AAAA,0BAA6B,aAAa,KAAK,IAAI,CAAC;AAAA,CAAK;AAAA,EACpE;AACF;","names":["result"]}
1
+ {"version":3,"sources":["../../src/cli/commands/edit.tsx"],"sourcesContent":["import os from \"os\";\n\nimport { Flags } from \"@oclif/core\";\nimport { render } from \"ink\";\n\nimport { BaseCommand } from \"../base-command.js\";\nimport { Wizard, type WizardResultV2 } from \"../components/wizard/wizard.js\";\nimport {\n ASCII_LOGO,\n CLI_BIN_NAME,\n GLOBAL_INSTALL_ROOT,\n PROJECT_ROOT,\n SOURCE_DISPLAY_NAMES,\n} from \"../consts.js\";\nimport { getAgentDefinitions, recompileAgents } from \"../lib/agents/index.js\";\nimport { loadProjectConfig } from \"../lib/configuration/index.js\";\nimport { EXIT_CODES } from \"../lib/exit-codes.js\";\nimport {\n detectInstallation,\n buildAndMergeConfig,\n writeScopedConfigs,\n detectMigrations,\n executeMigration,\n deriveInstallMode,\n} from \"../lib/installation/index.js\";\nimport {\n getMarketplaceLabel,\n loadAllAgents,\n loadSkillsMatrixFromSource,\n} from \"../lib/loading/index.js\";\nimport { findSkill, getMatrix, getSkill, useMatrixStore } from \"../stores/matrix-store\";\nimport { discoverAllPluginSkills } from \"../lib/plugins/index.js\";\nimport { deleteLocalSkill, migrateLocalSkillScope } from \"../lib/skills/index.js\";\nimport type { AgentDefinition, AgentName, SkillId } from \"../types/index.js\";\nimport { getErrorMessage } from \"../utils/errors.js\";\nimport { claudePluginInstall, claudePluginUninstall } from \"../utils/exec.js\";\nimport {\n enableBuffering,\n drainBuffer,\n disableBuffering,\n pushBufferMessage,\n type StartupMessage,\n} from \"../utils/logger.js\";\nimport { ERROR_MESSAGES, INFO_MESSAGES, STATUS_MESSAGES } from \"../utils/messages.js\";\n\nfunction formatSourceDisplayName(sourceName: string): string {\n return SOURCE_DISPLAY_NAMES[sourceName] ?? sourceName;\n}\n\nexport default class Edit extends BaseCommand {\n static summary = \"Edit skills in the plugin\";\n static description = \"Modify the currently installed skills via interactive wizard\";\n\n static examples = [\n {\n description: \"Open the edit wizard\",\n command: \"<%= config.bin %> <%= command.id %>\",\n },\n {\n description: \"Edit with a custom source\",\n command: \"<%= config.bin %> <%= command.id %> --source github:org/marketplace\",\n },\n {\n description: \"Force refresh skills from remote\",\n command: \"<%= config.bin %> <%= command.id %> --refresh\",\n },\n ];\n\n static flags = {\n ...BaseCommand.baseFlags,\n refresh: Flags.boolean({\n description: \"Force refresh from remote sources\",\n default: false,\n }),\n \"agent-source\": Flags.string({\n description: \"Remote agent partials source (default: local CLI)\",\n }),\n };\n\n async run(): Promise<void> {\n const { flags } = await this.parse(Edit);\n\n const installation = await detectInstallation();\n\n if (!installation) {\n this.error(ERROR_MESSAGES.NO_INSTALLATION, {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n const projectDir = installation.projectDir;\n\n enableBuffering();\n\n if (installation.projectDir === os.homedir()) {\n pushBufferMessage(\n \"info\",\n \"No project installation found. Using global installation from ~/.claude-src/\",\n );\n }\n let sourceResult;\n let startupMessages: StartupMessage[] = [];\n try {\n sourceResult = await loadSkillsMatrixFromSource({\n sourceFlag: flags.source,\n projectDir,\n forceRefresh: flags.refresh,\n });\n\n const sourceInfo = sourceResult.isLocal ? \"local\" : sourceResult.sourceConfig.sourceOrigin;\n pushBufferMessage(\n \"info\",\n `Loaded ${Object.keys(getMatrix().skills).length} skills (${sourceInfo})`,\n );\n } catch (error) {\n disableBuffering();\n this.handleError(error);\n }\n\n const projectConfig = await loadProjectConfig(projectDir);\n\n let currentSkillIds: SkillId[];\n try {\n const discoveredSkills = await discoverAllPluginSkills(projectDir);\n // Boundary cast: discoverAllPluginSkills keys are skill IDs from frontmatter\n currentSkillIds = Object.keys(discoveredSkills) as SkillId[];\n\n // In local mode, plugin discovery returns empty — fall back to project config skills\n if (currentSkillIds.length === 0 && projectConfig?.config?.skills?.length) {\n currentSkillIds = projectConfig.config.skills.map((s) => s.id);\n pushBufferMessage(\"info\", `Found ${currentSkillIds.length} skills from project config`);\n } else {\n pushBufferMessage(\"info\", `Current plugin has ${currentSkillIds.length} skills`);\n }\n } catch (error) {\n disableBuffering();\n this.handleError(error);\n }\n\n startupMessages = drainBuffer();\n disableBuffering();\n\n let wizardResult: WizardResultV2 | null = null;\n const marketplaceLabel = getMarketplaceLabel(sourceResult);\n\n // D9: In project context, existing global items are read-only (locked).\n // When editing from ~/ (global context), nothing is locked.\n const isGlobalDir = projectDir === GLOBAL_INSTALL_ROOT;\n const lockedSkillIds = isGlobalDir\n ? undefined\n : projectConfig?.config?.skills?.filter((s) => s.scope === \"global\").map((s) => s.id);\n const lockedAgentNames = isGlobalDir\n ? undefined\n : projectConfig?.config?.agents?.filter((a) => a.scope === \"global\").map((a) => a.name);\n\n useMatrixStore.getState().setMatrix(sourceResult.matrix);\n const { waitUntilExit } = render(\n <Wizard\n version={this.config.version}\n marketplaceLabel={marketplaceLabel}\n logo={ASCII_LOGO}\n initialStep=\"build\"\n initialDomains={projectConfig?.config?.domains}\n initialAgents={projectConfig?.config?.selectedAgents}\n installedSkillIds={currentSkillIds}\n installedSkillConfigs={projectConfig?.config?.skills}\n lockedSkillIds={lockedSkillIds}\n installedAgentConfigs={projectConfig?.config?.agents}\n lockedAgentNames={lockedAgentNames}\n projectDir={projectDir}\n startupMessages={startupMessages}\n onComplete={(result) => {\n wizardResult = result as WizardResultV2;\n }}\n onCancel={() => {\n this.log(\"\\nEdit cancelled\");\n }}\n />,\n );\n\n await waitUntilExit();\n\n const result = wizardResult as WizardResultV2 | null;\n\n if (!result || result.cancelled) {\n this.error(\"Cancelled\", { exit: EXIT_CODES.CANCELLED });\n }\n\n if (!result.validation.valid) {\n const errorMessages = result.validation.errors.map((e) => e.message).join(\"\\n \");\n this.error(`Selection has validation errors:\\n ${errorMessages}`, {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n const newSkillIds = result.skills.map((s) => s.id);\n const addedSkills = newSkillIds.filter((id) => !currentSkillIds.includes(id));\n const removedSkills = currentSkillIds.filter((id) => !newSkillIds.includes(id));\n\n const sourceChanges = new Map<SkillId, { from: string; to: string }>();\n const scopeChanges = new Map<\n SkillId,\n { from: \"project\" | \"global\"; to: \"project\" | \"global\" }\n >();\n if (projectConfig?.config?.skills) {\n for (const newSkill of result.skills) {\n const oldSkill = projectConfig.config.skills.find((s) => s.id === newSkill.id);\n if (oldSkill && oldSkill.source !== newSkill.source) {\n sourceChanges.set(newSkill.id, {\n from: oldSkill.source,\n to: newSkill.source,\n });\n }\n if (oldSkill && oldSkill.scope !== newSkill.scope) {\n scopeChanges.set(newSkill.id, {\n from: oldSkill.scope,\n to: newSkill.scope,\n });\n }\n }\n }\n\n const agentScopeChanges = new Map<\n AgentName,\n { from: \"project\" | \"global\"; to: \"project\" | \"global\" }\n >();\n if (projectConfig?.config?.agents) {\n for (const newAgent of result.agentConfigs) {\n const oldAgent = projectConfig.config.agents.find((a) => a.name === newAgent.name);\n if (oldAgent && oldAgent.scope !== newAgent.scope) {\n agentScopeChanges.set(newAgent.name, {\n from: oldAgent.scope,\n to: newAgent.scope,\n });\n }\n }\n }\n\n const hasSourceChanges = sourceChanges.size > 0;\n const hasScopeChanges = scopeChanges.size > 0;\n const hasAgentScopeChanges = agentScopeChanges.size > 0;\n const hasSkillChanges = addedSkills.length > 0 || removedSkills.length > 0;\n\n if (!hasSkillChanges && !hasSourceChanges && !hasScopeChanges && !hasAgentScopeChanges) {\n this.log(INFO_MESSAGES.NO_CHANGES_MADE);\n this.log(\"Plugin unchanged\\n\");\n return;\n }\n\n this.log(\"\\nChanges:\");\n for (const skillId of addedSkills) {\n this.log(` + ${getSkill(skillId).displayName}`);\n }\n for (const skillId of removedSkills) {\n const skill = findSkill(skillId);\n this.log(` - ${skill?.displayName ?? skillId}`);\n }\n for (const [skillId, change] of sourceChanges) {\n const fromLabel = formatSourceDisplayName(change.from);\n const toLabel = formatSourceDisplayName(change.to);\n this.log(` ~ ${skillId} (${fromLabel} \\u2192 ${toLabel})`);\n }\n for (const [skillId, change] of scopeChanges) {\n const fromLabel = change.from === \"global\" ? \"[G]\" : \"[P]\";\n const toLabel = change.to === \"global\" ? \"[G]\" : \"[P]\";\n this.log(` ~ ${skillId} (${fromLabel} \\u2192 ${toLabel})`);\n }\n for (const [agentName, change] of agentScopeChanges) {\n const fromLabel = change.from === \"global\" ? \"[G]\" : \"[P]\";\n const toLabel = change.to === \"global\" ? \"[G]\" : \"[P]\";\n this.log(` ~ ${agentName} (${fromLabel} \\u2192 ${toLabel})`);\n }\n this.log(\"\");\n\n // Handle per-skill mode migrations (local <-> plugin)\n const oldSkills = projectConfig?.config?.skills ?? [];\n const migrationPlan = detectMigrations(oldSkills, result.skills);\n const hasMigrations = migrationPlan.toLocal.length > 0 || migrationPlan.toPlugin.length > 0;\n\n if (hasMigrations) {\n if (migrationPlan.toLocal.length > 0) {\n this.log(`Switching ${migrationPlan.toLocal.length} skill(s) to local:`);\n for (const migration of migrationPlan.toLocal) {\n this.log(` - ${migration.id}`);\n }\n }\n if (migrationPlan.toPlugin.length > 0) {\n this.log(`Switching ${migrationPlan.toPlugin.length} skill(s) to plugin:`);\n for (const migration of migrationPlan.toPlugin) {\n this.log(` - ${migration.id}`);\n }\n }\n\n const migrationResult = await executeMigration(migrationPlan, projectDir, sourceResult);\n\n for (const warning of migrationResult.warnings) {\n this.warn(warning);\n }\n }\n\n const migratedSkillIds = new Set([\n ...migrationPlan.toLocal.map((m) => m.id),\n ...migrationPlan.toPlugin.map((m) => m.id),\n ]);\n\n // Handle scope migrations (P→G or G→P) for local-mode skills\n for (const [skillId, change] of scopeChanges) {\n const skillConfig = result.skills.find((s) => s.id === skillId);\n if (skillConfig?.source === \"local\") {\n await migrateLocalSkillScope(skillId, change.from, projectDir);\n } else if (sourceResult.marketplace && skillConfig) {\n // Plugin-mode scope change: uninstall from old scope, install to new scope\n const oldPluginScope = change.from === \"global\" ? \"user\" : \"project\";\n const newPluginScope = change.to === \"global\" ? \"user\" : \"project\";\n try {\n await claudePluginUninstall(skillId, oldPluginScope, projectDir);\n const pluginRef = `${skillId}@${sourceResult.marketplace}`;\n await claudePluginInstall(pluginRef, newPluginScope, projectDir);\n } catch (error) {\n this.warn(`Failed to migrate plugin scope for ${skillId}: ${getErrorMessage(error)}`);\n }\n }\n }\n\n // Handle remaining non-migration source changes (e.g., marketplace A -> marketplace B)\n for (const [skillId, change] of sourceChanges) {\n // Skip skills already handled by mode migration\n if (migratedSkillIds.has(skillId)) {\n continue;\n }\n if (change.from === \"local\") {\n await deleteLocalSkill(projectDir, skillId);\n }\n }\n\n if (sourceResult.marketplace) {\n for (const skillId of addedSkills) {\n // Find the skill config to get its scope\n const skillConfig = result.skills.find((s) => s.id === skillId);\n if (!skillConfig || skillConfig.source === \"local\") continue;\n\n const pluginRef = `${skillId}@${sourceResult.marketplace}`;\n const pluginScope = skillConfig.scope === \"global\" ? \"user\" : \"project\";\n this.log(`Installing plugin: ${pluginRef}...`);\n try {\n await claudePluginInstall(pluginRef, pluginScope, projectDir);\n } catch (error) {\n this.warn(`Failed to install plugin ${pluginRef}: ${getErrorMessage(error)}`);\n }\n }\n for (const skillId of removedSkills) {\n // For removed skills, use old config to determine scope\n const oldSkill = projectConfig?.config?.skills?.find((s) => s.id === skillId);\n const pluginScope = oldSkill?.scope === \"global\" ? \"user\" : \"project\";\n this.log(`Uninstalling plugin: ${skillId}...`);\n try {\n await claudePluginUninstall(skillId, pluginScope, projectDir);\n } catch (error) {\n this.warn(`Failed to uninstall plugin ${skillId}: ${getErrorMessage(error)}`);\n }\n }\n }\n\n // Load agent definitions first — needed for both config-types.ts and recompilation\n let sourcePath: string;\n this.log(\n flags[\"agent-source\"]\n ? STATUS_MESSAGES.FETCHING_AGENT_PARTIALS\n : STATUS_MESSAGES.LOADING_AGENT_PARTIALS,\n );\n try {\n const agentDefs = await getAgentDefinitions(flags[\"agent-source\"], {\n forceRefresh: flags.refresh,\n });\n sourcePath = agentDefs.sourcePath;\n this.log(flags[\"agent-source\"] ? \"✓ Agent partials fetched\\n\" : \"✓ Agent partials loaded\\n\");\n } catch (error) {\n this.handleError(error);\n }\n\n // Persist wizard result to config.ts and config-types.ts (split by scope when in project context)\n try {\n const mergeResult = await buildAndMergeConfig(result, sourceResult, projectDir, flags.source);\n\n // Load full agent definitions for config-types.ts generation\n const cliAgents = await loadAllAgents(PROJECT_ROOT);\n const sourceAgents = await loadAllAgents(sourcePath);\n // Boundary cast: loadAllAgents returns Record<string, AgentDefinition>, agent dirs are AgentName by convention\n const agents = { ...cliAgents, ...sourceAgents } as Record<AgentName, AgentDefinition>;\n\n await writeScopedConfigs(\n mergeResult.config,\n sourceResult.matrix,\n agents,\n projectDir,\n installation.configPath,\n );\n } catch (error) {\n this.warn(`Could not update config: ${getErrorMessage(error)}`);\n }\n\n this.log(STATUS_MESSAGES.RECOMPILING_AGENTS);\n try {\n const recompileSkills = await discoverAllPluginSkills(projectDir);\n\n const recompileResult = await recompileAgents({\n pluginDir: projectDir,\n sourcePath,\n skills: recompileSkills,\n projectDir,\n outputDir: installation.agentsDir,\n installMode: deriveInstallMode(result.skills),\n });\n\n if (recompileResult.failed.length > 0) {\n this.log(\n `✓ Recompiled ${recompileResult.compiled.length} agents (${recompileResult.failed.length} failed)\\n`,\n );\n for (const warning of recompileResult.warnings) {\n this.warn(warning);\n }\n } else if (recompileResult.compiled.length > 0) {\n this.log(`✓ Recompiled ${recompileResult.compiled.length} agents\\n`);\n } else {\n this.log(\"✓ No agents to recompile\\n\");\n }\n } catch (error) {\n this.warn(`Agent recompilation failed: ${getErrorMessage(error)}`);\n this.log(`You can manually recompile with '${CLI_BIN_NAME} compile'.\\n`);\n }\n\n const summaryParts = [`${addedSkills.length} added`, `${removedSkills.length} removed`];\n if (hasSourceChanges) {\n summaryParts.push(`${sourceChanges.size} source${sourceChanges.size > 1 ? \"s\" : \"\"} changed`);\n }\n if (hasScopeChanges || hasAgentScopeChanges) {\n const totalScopeChanges = scopeChanges.size + agentScopeChanges.size;\n summaryParts.push(`${totalScopeChanges} scope${totalScopeChanges > 1 ? \"s\" : \"\"} changed`);\n }\n this.log(`\\n\\u2713 Plugin updated! (${summaryParts.join(\", \")})\\n`);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,OAAO,QAAQ;AAEf,SAAS,aAAa;AACtB,SAAS,cAAc;AA0JjB;AAhHN,SAAS,wBAAwB,YAA4B;AAC3D,SAAO,qBAAqB,UAAU,KAAK;AAC7C;A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AS,GAAG;AACrC,aAAK;AAAA,UACH,qBAAgB,gBAAgB,SAAS,MAAM,YAAY,gBAAgB,OAAO,MAAM;AAAA;AAAA,QAC1F;AACA,mBAAW,WAAW,gBAAgB,UAAU;AAC9C,eAAK,KAAK,OAAO;AAAA,QACnB;AAAA,MACF,WAAW,gBAAgB,SAAS,SAAS,GAAG;AAC9C,aAAK,IAAI,qBAAgB,gBAAgB,SAAS,MAAM;AAAA,CAAW;AAAA,MACrE,OAAO;AACL,aAAK,IAAI,iCAA4B;AAAA,MACvC;AAAA,IACF,SAAS,OAAO;AACd,WAAK,KAAK,+BAA+B,gBAAgB,KAAK,CAAC,EAAE;AACjE,WAAK,IAAI,oCAAoC,YAAY;AAAA,CAAc;AAAA,IACzE;AAEA,UAAM,eAAe,CAAC,GAAG,YAAY,MAAM,UAAU,GAAG,cAAc,MAAM,UAAU;AACtF,QAAI,kBAAkB;AACpB,mBAAa,KAAK,GAAG,cAAc,IAAI,UAAU,cAAc,OAAO,IAAI,MAAM,EAAE,UAAU;AAAA,IAC9F;AACA,QAAI,mBAAmB,sBAAsB;AAC3C,YAAM,oBAAoB,aAAa,OAAO,kBAAkB;AAChE,mBAAa,KAAK,GAAG,iBAAiB,SAAS,oBAAoB,IAAI,MAAM,EAAE,UAAU;AAAA,IAC3F;AACA,SAAK,IAAI;AAAA,0BAA6B,aAAa,KAAK,IAAI,CAAC;AAAA,CAAK;AAAA,EACpE;AACF;","names":["result"]}
@@ -5,8 +5,8 @@ import {
5
5
  loadSkillsMatrixFromSource,
6
6
  resolveSource,
7
7
  saveSourceToProjectConfig
8
- } from "../chunk-53URJ5XK.js";
9
- import "../chunk-F3REOP7N.js";
8
+ } from "../chunk-45R64U2S.js";
9
+ import "../chunk-L6MTIQ2U.js";
10
10
  import {
11
11
  typedKeys
12
12
  } from "../chunk-T4EXUIBY.js";
@@ -17,7 +17,7 @@ import {
17
17
  import {
18
18
  BaseCommand,
19
19
  EXIT_CODES
20
- } from "../chunk-EE5EPS32.js";
20
+ } from "../chunk-FCF4WQEI.js";
21
21
  import {
22
22
  copy,
23
23
  directoryExists,
@@ -25,7 +25,7 @@ import {
25
25
  fileExists,
26
26
  listDirectories,
27
27
  writeFile
28
- } from "../chunk-LMZXL5RQ.js";
28
+ } from "../chunk-R3AR4VLZ.js";
29
29
  import {
30
30
  CLAUDE_SRC_DIR,
31
31
  DEFAULT_BRANDING,
@@ -34,7 +34,7 @@ import {
34
34
  PROJECT_ROOT,
35
35
  STANDARD_FILES
36
36
  } from "../chunk-EGMQ3SXN.js";
37
- import "../chunk-EC3UJRKZ.js";
37
+ import "../chunk-KWB3B2HS.js";
38
38
  import {
39
39
  init_esm_shims
40
40
  } from "../chunk-DHET7RCE.js";