@claude-collective/cli 0.8.0 → 0.13.1
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.
- package/CHANGELOG.md +138 -0
- package/README.md +26 -9
- package/config/skills-matrix.yaml +858 -0
- package/config/stacks.yaml +254 -0
- package/dist/{chunk-TOPAIL5W.js → chunk-3U3R4NCG.js} +2 -2
- package/dist/chunk-3U3R4NCG.js.map +1 -0
- package/dist/{chunk-YKXBGCFD.js → chunk-57Y5RALO.js} +10 -10
- package/dist/chunk-57Y5RALO.js.map +1 -0
- package/dist/{chunk-ED73HCW2.js → chunk-6DCSSORF.js} +37 -88
- package/dist/chunk-6DCSSORF.js.map +1 -0
- package/dist/{chunk-6LS7XO3H.js → chunk-6Q3Y7KVB.js} +2 -2
- package/dist/chunk-6Q3Y7KVB.js.map +1 -0
- package/dist/{chunk-A3J6IAXK.js → chunk-76DWXGQE.js} +4 -2
- package/dist/chunk-76DWXGQE.js.map +1 -0
- package/dist/{chunk-Q6DR5QUH.js → chunk-7Q44DMSP.js} +62 -27
- package/dist/chunk-7Q44DMSP.js.map +1 -0
- package/dist/chunk-ACNBKXXJ.js +321 -0
- package/dist/chunk-ACNBKXXJ.js.map +1 -0
- package/dist/{chunk-QGGSLMO3.js → chunk-B7CCVP6Q.js} +41 -9
- package/dist/chunk-B7CCVP6Q.js.map +1 -0
- package/dist/{chunk-LVKRVFYR.js → chunk-BDLUZVKU.js} +2 -2
- package/dist/chunk-BDLUZVKU.js.map +1 -0
- package/dist/{chunk-HNDT5QRB.js → chunk-CDX4W4DM.js} +3 -3
- package/dist/chunk-CDX4W4DM.js.map +1 -0
- package/dist/{chunk-MYAVQ23U.js → chunk-CJEHB4TB.js} +23 -9
- package/dist/chunk-CJEHB4TB.js.map +1 -0
- package/dist/{chunk-DKGL77IY.js → chunk-CPZOTVCI.js} +15 -14
- package/dist/chunk-CPZOTVCI.js.map +1 -0
- package/dist/{chunk-K7PTOVX4.js → chunk-D237EVNB.js} +32 -3
- package/dist/chunk-D237EVNB.js.map +1 -0
- package/dist/{chunk-Q2LH2DAB.js → chunk-DRXPNNPB.js} +19 -18
- package/dist/chunk-DRXPNNPB.js.map +1 -0
- package/dist/{chunk-Y3V43XCU.js → chunk-E3FJH4TF.js} +12 -8
- package/dist/chunk-E3FJH4TF.js.map +1 -0
- package/dist/{chunk-3HBTELJN.js → chunk-ED4E6Q2T.js} +10 -10
- package/dist/chunk-ED4E6Q2T.js.map +1 -0
- package/dist/{chunk-SYQ7R2JO.js → chunk-EHS3TWWP.js} +3 -3
- package/dist/chunk-EHS3TWWP.js.map +1 -0
- package/dist/{chunk-LQTST4WY.js → chunk-GDH553MV.js} +6 -6
- package/dist/chunk-GDH553MV.js.map +1 -0
- package/dist/{chunk-A65SBAAJ.js → chunk-HLJX2FTL.js} +31 -5
- package/dist/chunk-HLJX2FTL.js.map +1 -0
- package/dist/chunk-I2DSLOXZ.js +75 -0
- package/dist/chunk-I2DSLOXZ.js.map +1 -0
- package/dist/{chunk-SEBPPFUW.js → chunk-I4TPKIYX.js} +33 -18
- package/dist/chunk-I4TPKIYX.js.map +1 -0
- package/dist/{chunk-NGBFJJ7Q.js → chunk-IMDW5ZUP.js} +19 -11
- package/dist/chunk-IMDW5ZUP.js.map +1 -0
- package/dist/{chunk-U4VYHKPM.js → chunk-JIPWV2FX.js} +6 -6
- package/dist/chunk-JIPWV2FX.js.map +1 -0
- package/dist/{chunk-G2FBJOZG.js → chunk-K7EVM5LY.js} +4 -4
- package/dist/chunk-K7EVM5LY.js.map +1 -0
- package/dist/{chunk-MJSFR562.js → chunk-KAAEN2PO.js} +3 -3
- package/dist/chunk-KAAEN2PO.js.map +1 -0
- package/dist/{chunk-FNOYEXUE.js → chunk-LE6IY6IT.js} +22 -17
- package/dist/chunk-LE6IY6IT.js.map +1 -0
- package/dist/{chunk-CIY5UBRB.js → chunk-NDY25DTL.js} +6 -6
- package/dist/chunk-NDY25DTL.js.map +1 -0
- package/dist/{chunk-OLBOTK3O.js → chunk-P26A2K5N.js} +7 -7
- package/dist/chunk-P26A2K5N.js.map +1 -0
- package/dist/{chunk-DHFFRMF6.js → chunk-RTE64SJA.js} +2 -2
- package/dist/chunk-RTE64SJA.js.map +1 -0
- package/dist/{chunk-3ZCB5K33.js → chunk-SGJ23HIP.js} +14 -11
- package/dist/chunk-SGJ23HIP.js.map +1 -0
- package/dist/{chunk-C4ZTIYFR.js → chunk-SVYPSDWY.js} +10 -10
- package/dist/chunk-SVYPSDWY.js.map +1 -0
- package/dist/{chunk-MMDXNZPF.js → chunk-TKFPKEV3.js} +2 -2
- package/dist/chunk-TKFPKEV3.js.map +1 -0
- package/dist/{chunk-M7YCPFIX.js → chunk-UQTEPWU7.js} +2 -2
- package/dist/chunk-UQTEPWU7.js.map +1 -0
- package/dist/{chunk-QESUUPOE.js → chunk-V46GGCCI.js} +80 -27
- package/dist/chunk-V46GGCCI.js.map +1 -0
- package/dist/{chunk-UOWHJ6BE.js → chunk-X6QONICW.js} +6 -3
- package/dist/chunk-X6QONICW.js.map +1 -0
- package/dist/chunk-Y2LW7R3Y.js +23 -0
- package/dist/chunk-Y2LW7R3Y.js.map +1 -0
- package/dist/chunk-Z2CWURZ6.js +78 -0
- package/dist/chunk-Z2CWURZ6.js.map +1 -0
- package/dist/chunk-Z7G4B5HJ.js +377 -0
- package/dist/chunk-Z7G4B5HJ.js.map +1 -0
- package/dist/{chunk-XKEG3SCV.js → chunk-ZENYS6KW.js} +13 -9
- package/dist/chunk-ZENYS6KW.js.map +1 -0
- package/dist/{cli-v2 → cli}/defaults/agent-mappings.yaml +5 -5
- package/dist/commands/build/marketplace.js +9 -9
- package/dist/commands/build/marketplace.js.map +1 -1
- package/dist/commands/build/plugins.js +12 -12
- package/dist/commands/build/plugins.js.map +1 -1
- package/dist/commands/build/stack.js +15 -15
- package/dist/commands/build/stack.js.map +1 -1
- package/dist/commands/compile.js +21 -21
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/config/get.js +9 -8
- package/dist/commands/config/get.js.map +1 -1
- package/dist/commands/config/index.js +7 -6
- package/dist/commands/config/index.js.map +1 -1
- package/dist/commands/config/path.js +8 -7
- package/dist/commands/config/path.js.map +1 -1
- package/dist/commands/config/set-project.js +9 -8
- package/dist/commands/config/set-project.js.map +1 -1
- package/dist/commands/config/set.js +9 -8
- package/dist/commands/config/set.js.map +1 -1
- package/dist/commands/config/show.js +6 -5
- package/dist/commands/config/unset-project.js +9 -8
- package/dist/commands/config/unset-project.js.map +1 -1
- package/dist/commands/config/unset.js +9 -8
- package/dist/commands/config/unset.js.map +1 -1
- package/dist/commands/diff.js +12 -12
- package/dist/commands/diff.js.map +1 -1
- package/dist/commands/doctor.js +10 -10
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/edit.js +52 -49
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/eject.js +180 -97
- package/dist/commands/eject.js.map +1 -1
- package/dist/commands/import/skill.js +339 -0
- package/dist/commands/import/skill.js.map +1 -0
- package/dist/commands/info.js +9 -9
- package/dist/commands/info.js.map +1 -1
- package/dist/commands/init.js +205 -78
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list.js +9 -9
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/new/agent.js +19 -21
- package/dist/commands/new/agent.js.map +1 -1
- package/dist/commands/new/skill.js +11 -12
- package/dist/commands/new/skill.js.map +1 -1
- package/dist/commands/outdated.js +12 -12
- package/dist/commands/outdated.js.map +1 -1
- package/dist/commands/search.js +205 -17
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/test-imports.js +18 -18
- package/dist/commands/test-imports.js.map +1 -1
- package/dist/commands/uninstall.js +58 -78
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.js +21 -21
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/validate.js +9 -9
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/version/bump.js +8 -8
- package/dist/commands/version/bump.js.map +1 -1
- package/dist/commands/version/index.js +8 -8
- package/dist/commands/version/index.js.map +1 -1
- package/dist/commands/version/set.js +7 -7
- package/dist/commands/version/set.js.map +1 -1
- package/dist/commands/version/show.js +8 -8
- package/dist/commands/version/show.js.map +1 -1
- package/dist/components/common/confirm.js +1 -1
- package/dist/components/common/message.js +1 -1
- package/dist/components/common/message.js.map +1 -1
- package/dist/components/common/spinner.js +1 -1
- package/dist/components/common/spinner.js.map +1 -1
- package/dist/components/skill-search/skill-search.js +10 -0
- package/dist/components/skill-search/skill-search.js.map +1 -0
- package/dist/components/wizard/category-grid.js +1 -1
- package/dist/components/wizard/category-grid.test.js +213 -80
- package/dist/components/wizard/category-grid.test.js.map +1 -1
- package/dist/components/wizard/section-progress.js +1 -1
- package/dist/components/wizard/section-progress.test.js +2 -2
- package/dist/components/wizard/section-progress.test.js.map +1 -1
- package/dist/components/wizard/step-approach.js +4 -3
- package/dist/components/wizard/step-build.js +4 -3
- package/dist/components/wizard/step-build.test.js +29 -17
- package/dist/components/wizard/step-build.test.js.map +1 -1
- package/dist/components/wizard/step-confirm.js +2 -1
- package/dist/components/wizard/step-refine.js +2 -1
- package/dist/components/wizard/step-refine.test.js +4 -3
- package/dist/components/wizard/step-refine.test.js.map +1 -1
- package/dist/components/wizard/step-stack-options.js +3 -3
- package/dist/components/wizard/step-stack.js +3 -3
- package/dist/components/wizard/wizard-footer.js +9 -0
- package/dist/components/wizard/wizard-footer.js.map +1 -0
- package/dist/components/wizard/wizard-tabs.js +1 -1
- package/dist/components/wizard/wizard.js +14 -12
- package/dist/config/skills-matrix.yaml +858 -0
- package/dist/config/stacks.yaml +254 -0
- package/dist/hooks/init.js +5 -4
- package/dist/hooks/init.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/stores/wizard-store.js +2 -2
- package/dist/stores/wizard-store.test.js +3 -3
- package/dist/stores/wizard-store.test.js.map +1 -1
- package/package.json +4 -2
- package/dist/chunk-3HBTELJN.js.map +0 -1
- package/dist/chunk-3ZCB5K33.js.map +0 -1
- package/dist/chunk-6LS7XO3H.js.map +0 -1
- package/dist/chunk-A3J6IAXK.js.map +0 -1
- package/dist/chunk-A65SBAAJ.js.map +0 -1
- package/dist/chunk-ALEPJ6YN.js +0 -80
- package/dist/chunk-ALEPJ6YN.js.map +0 -1
- package/dist/chunk-C4ZTIYFR.js.map +0 -1
- package/dist/chunk-CIY5UBRB.js.map +0 -1
- package/dist/chunk-DHFFRMF6.js.map +0 -1
- package/dist/chunk-DKGL77IY.js.map +0 -1
- package/dist/chunk-ED73HCW2.js.map +0 -1
- package/dist/chunk-FNOYEXUE.js.map +0 -1
- package/dist/chunk-G2FBJOZG.js.map +0 -1
- package/dist/chunk-HNDT5QRB.js.map +0 -1
- package/dist/chunk-K7PTOVX4.js.map +0 -1
- package/dist/chunk-LQTST4WY.js.map +0 -1
- package/dist/chunk-LVKRVFYR.js.map +0 -1
- package/dist/chunk-M7YCPFIX.js.map +0 -1
- package/dist/chunk-MJSFR562.js.map +0 -1
- package/dist/chunk-MMDXNZPF.js.map +0 -1
- package/dist/chunk-MYAVQ23U.js.map +0 -1
- package/dist/chunk-NGBFJJ7Q.js.map +0 -1
- package/dist/chunk-OLBOTK3O.js.map +0 -1
- package/dist/chunk-PPNTD5LO.js +0 -330
- package/dist/chunk-PPNTD5LO.js.map +0 -1
- package/dist/chunk-Q2LH2DAB.js.map +0 -1
- package/dist/chunk-Q6DR5QUH.js.map +0 -1
- package/dist/chunk-QESUUPOE.js.map +0 -1
- package/dist/chunk-QGGSLMO3.js.map +0 -1
- package/dist/chunk-SEBPPFUW.js.map +0 -1
- package/dist/chunk-SYQ7R2JO.js.map +0 -1
- package/dist/chunk-TOPAIL5W.js.map +0 -1
- package/dist/chunk-U4VYHKPM.js.map +0 -1
- package/dist/chunk-UOWHJ6BE.js.map +0 -1
- package/dist/chunk-XKEG3SCV.js.map +0 -1
- package/dist/chunk-Y3V43XCU.js.map +0 -1
- package/dist/chunk-YKXBGCFD.js.map +0 -1
package/dist/commands/edit.js
CHANGED
|
@@ -1,64 +1,66 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
bumpPluginVersion
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-P26A2K5N.js";
|
|
5
5
|
import {
|
|
6
6
|
getAgentDefinitions
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-SVYPSDWY.js";
|
|
8
8
|
import {
|
|
9
9
|
detectInstallation
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-SGJ23HIP.js";
|
|
11
11
|
import {
|
|
12
12
|
recompileAgents
|
|
13
|
-
} from "../chunk-
|
|
14
|
-
import "../chunk-MYAVQ23U.js";
|
|
15
|
-
import {
|
|
16
|
-
copySkillsToPluginFromSource
|
|
17
|
-
} from "../chunk-G2FBJOZG.js";
|
|
13
|
+
} from "../chunk-LE6IY6IT.js";
|
|
18
14
|
import {
|
|
19
15
|
Wizard
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
16
|
+
} from "../chunk-6DCSSORF.js";
|
|
17
|
+
import "../chunk-E3FJH4TF.js";
|
|
18
|
+
import "../chunk-HLJX2FTL.js";
|
|
19
|
+
import "../chunk-CDX4W4DM.js";
|
|
20
|
+
import "../chunk-I2DSLOXZ.js";
|
|
21
|
+
import "../chunk-ZENYS6KW.js";
|
|
22
|
+
import "../chunk-7Q44DMSP.js";
|
|
23
|
+
import "../chunk-Z7G4B5HJ.js";
|
|
24
|
+
import "../chunk-BDLUZVKU.js";
|
|
25
|
+
import "../chunk-X6QONICW.js";
|
|
26
|
+
import "../chunk-Y2LW7R3Y.js";
|
|
27
|
+
import "../chunk-D237EVNB.js";
|
|
28
|
+
import "../chunk-Z2CWURZ6.js";
|
|
29
|
+
import "../chunk-DRXPNNPB.js";
|
|
30
|
+
import "../chunk-GDH553MV.js";
|
|
31
|
+
import "../chunk-I4TPKIYX.js";
|
|
35
32
|
import {
|
|
36
33
|
getCollectivePluginDir,
|
|
37
34
|
getPluginSkillIds,
|
|
38
35
|
getPluginSkillsDir
|
|
39
|
-
} from "../chunk-
|
|
36
|
+
} from "../chunk-ED4E6Q2T.js";
|
|
37
|
+
import "../chunk-CJEHB4TB.js";
|
|
38
|
+
import {
|
|
39
|
+
copySkillsToPluginFromSource
|
|
40
|
+
} from "../chunk-K7EVM5LY.js";
|
|
41
|
+
import "../chunk-KAAEN2PO.js";
|
|
40
42
|
import {
|
|
41
43
|
loadSkillsMatrixFromSource
|
|
42
|
-
} from "../chunk-
|
|
43
|
-
import "../chunk-
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-QESUUPOE.js";
|
|
46
|
-
import "../chunk-A3J6IAXK.js";
|
|
44
|
+
} from "../chunk-CPZOTVCI.js";
|
|
45
|
+
import "../chunk-B7CCVP6Q.js";
|
|
46
|
+
import "../chunk-IMDW5ZUP.js";
|
|
47
47
|
import {
|
|
48
48
|
BaseCommand,
|
|
49
49
|
EXIT_CODES
|
|
50
|
-
} from "../chunk-
|
|
51
|
-
import "../chunk-
|
|
50
|
+
} from "../chunk-EHS3TWWP.js";
|
|
51
|
+
import "../chunk-V46GGCCI.js";
|
|
52
|
+
import "../chunk-3U3R4NCG.js";
|
|
52
53
|
import {
|
|
53
54
|
directoryExists,
|
|
54
55
|
ensureDir,
|
|
55
56
|
remove
|
|
56
|
-
} from "../chunk-
|
|
57
|
+
} from "../chunk-TKFPKEV3.js";
|
|
58
|
+
import "../chunk-76DWXGQE.js";
|
|
57
59
|
import {
|
|
58
60
|
init_esm_shims
|
|
59
61
|
} from "../chunk-DHET7RCE.js";
|
|
60
62
|
|
|
61
|
-
// src/cli
|
|
63
|
+
// src/cli/commands/edit.tsx
|
|
62
64
|
init_esm_shims();
|
|
63
65
|
import { Flags } from "@oclif/core";
|
|
64
66
|
import { render } from "ink";
|
|
@@ -125,8 +127,8 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
125
127
|
{
|
|
126
128
|
matrix: sourceResult.matrix,
|
|
127
129
|
initialSkills: currentSkillIds,
|
|
128
|
-
onComplete: (
|
|
129
|
-
wizardResult =
|
|
130
|
+
onComplete: (result2) => {
|
|
131
|
+
wizardResult = result2;
|
|
130
132
|
},
|
|
131
133
|
onCancel: () => {
|
|
132
134
|
this.log("\nEdit cancelled");
|
|
@@ -135,25 +137,26 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
135
137
|
)
|
|
136
138
|
);
|
|
137
139
|
await waitUntilExit();
|
|
138
|
-
|
|
139
|
-
|
|
140
|
+
const result = wizardResult;
|
|
141
|
+
if (!result || result.cancelled) {
|
|
142
|
+
this.error("Cancelled", { exit: EXIT_CODES.CANCELLED });
|
|
140
143
|
}
|
|
141
|
-
if (!
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
if (!result.validation.valid) {
|
|
145
|
+
const errorMessages = result.validation.errors.map((e) => e.message).join("\n ");
|
|
146
|
+
this.error(`Selection has validation errors:
|
|
147
|
+
${errorMessages}`, {
|
|
148
|
+
exit: EXIT_CODES.ERROR
|
|
149
|
+
});
|
|
147
150
|
}
|
|
148
|
-
const addedSkills =
|
|
151
|
+
const addedSkills = result.selectedSkills.filter(
|
|
149
152
|
(id) => !currentSkillIds.includes(id)
|
|
150
153
|
);
|
|
151
154
|
const removedSkills = currentSkillIds.filter(
|
|
152
|
-
(id) => !
|
|
155
|
+
(id) => !result.selectedSkills.includes(id)
|
|
153
156
|
);
|
|
154
|
-
if (
|
|
157
|
+
if (result.validation.warnings.length > 0) {
|
|
155
158
|
this.log("\nWarnings:");
|
|
156
|
-
for (const warning of
|
|
159
|
+
for (const warning of result.validation.warnings) {
|
|
157
160
|
this.warn(` ! ${warning.message}`);
|
|
158
161
|
}
|
|
159
162
|
this.log("");
|
|
@@ -180,13 +183,13 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
180
183
|
}
|
|
181
184
|
await ensureDir(pluginSkillsDir);
|
|
182
185
|
await copySkillsToPluginFromSource(
|
|
183
|
-
|
|
186
|
+
result.selectedSkills,
|
|
184
187
|
pluginDir,
|
|
185
188
|
sourceResult.matrix,
|
|
186
189
|
sourceResult
|
|
187
190
|
);
|
|
188
191
|
this.log(
|
|
189
|
-
`\u2713 Plugin updated with ${
|
|
192
|
+
`\u2713 Plugin updated with ${result.selectedSkills.length} skills
|
|
190
193
|
`
|
|
191
194
|
);
|
|
192
195
|
} catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli-v2/commands/edit.tsx"],"sourcesContent":["import { Flags } from \"@oclif/core\";\nimport { render } from \"ink\";\nimport React from \"react\";\nimport { BaseCommand } from \"../base-command.js\";\nimport { Wizard, WizardResult } from \"../components/wizard/wizard.js\";\nimport { loadSkillsMatrixFromSource } from \"../lib/source-loader.js\";\nimport { directoryExists, ensureDir, remove } from \"../utils/fs.js\";\nimport {\n getCollectivePluginDir,\n getPluginSkillsDir,\n getPluginSkillIds,\n} from \"../lib/plugin-finder.js\";\nimport { copySkillsToPluginFromSource } from \"../lib/skill-copier.js\";\nimport { recompileAgents } from \"../lib/agent-recompiler.js\";\nimport { bumpPluginVersion } from \"../lib/plugin-version.js\";\nimport { getAgentDefinitions } from \"../lib/agent-fetcher.js\";\nimport { EXIT_CODES } from \"../lib/exit-codes.js\";\nimport { detectInstallation } from \"../lib/installation.js\";\n\nexport default class Edit extends BaseCommand {\n static summary = \"Edit skills in the plugin\";\n static description =\n \"Modify the currently installed skills via interactive wizard\";\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 // Detect installation mode\n const installation = await detectInstallation();\n\n if (!installation) {\n this.error(\n \"No installation found. Run 'cc init' first to set up Claude Collective.\",\n { exit: EXIT_CODES.ERROR },\n );\n }\n\n const pluginDir = getCollectivePluginDir();\n const pluginSkillsDir =\n installation.mode === \"local\"\n ? installation.skillsDir\n : getPluginSkillsDir(pluginDir);\n\n const modeLabel = installation.mode === \"local\" ? \"Local\" : \"Plugin\";\n this.log(`Edit ${modeLabel} Skills\\n`);\n\n // Load skills matrix\n this.log(\"Resolving marketplace source...\");\n let sourceResult;\n try {\n sourceResult = await loadSkillsMatrixFromSource({\n sourceFlag: flags.source,\n projectDir: process.cwd(),\n forceRefresh: flags.refresh,\n });\n\n const sourceInfo = sourceResult.isLocal\n ? \"local\"\n : sourceResult.sourceConfig.sourceOrigin;\n this.log(\n `✓ Loaded ${Object.keys(sourceResult.matrix.skills).length} skills (${sourceInfo})\\n`,\n );\n } catch (error) {\n this.handleError(error);\n }\n\n // Load current skills\n this.log(\"Reading current skills...\");\n let currentSkillIds: string[];\n try {\n currentSkillIds = await getPluginSkillIds(\n pluginSkillsDir,\n sourceResult.matrix,\n );\n this.log(`✓ Current plugin has ${currentSkillIds.length} skills\\n`);\n } catch (error) {\n this.handleError(error);\n }\n\n // Run wizard with initial skills\n let wizardResult: WizardResult | null = null;\n\n const { waitUntilExit } = render(\n <Wizard\n matrix={sourceResult.matrix}\n initialSkills={currentSkillIds}\n onComplete={(result) => {\n wizardResult = result;\n }}\n onCancel={() => {\n this.log(\"\\nEdit cancelled\");\n }}\n />,\n );\n\n await waitUntilExit();\n\n // Handle cancellation\n if (!wizardResult || wizardResult.cancelled) {\n this.exit(EXIT_CODES.CANCELLED);\n }\n\n // Validate selection\n if (!wizardResult.validation.valid) {\n this.error(\"Selection has validation errors:\");\n for (const error of wizardResult.validation.errors) {\n this.log(` ${error.message}`);\n }\n this.exit(EXIT_CODES.ERROR);\n }\n\n // Calculate changes\n const addedSkills = wizardResult.selectedSkills.filter(\n (id) => !currentSkillIds.includes(id),\n );\n const removedSkills = currentSkillIds.filter(\n (id) => !wizardResult.selectedSkills.includes(id),\n );\n\n // Show warnings if any\n if (wizardResult.validation.warnings.length > 0) {\n this.log(\"\\nWarnings:\");\n for (const warning of wizardResult.validation.warnings) {\n this.warn(` ! ${warning.message}`);\n }\n this.log(\"\");\n }\n\n // Check if there are no changes\n if (addedSkills.length === 0 && removedSkills.length === 0) {\n this.log(\"No changes made.\");\n this.log(\"Plugin unchanged\\n\");\n return;\n }\n\n // Show changes\n this.log(\"\\nChanges:\");\n for (const skillId of addedSkills) {\n const skill = sourceResult.matrix.skills[skillId];\n this.log(` + ${skill?.name || skillId}`);\n }\n for (const skillId of removedSkills) {\n const skill = sourceResult.matrix.skills[skillId];\n this.log(` - ${skill?.name || skillId}`);\n }\n this.log(\"\");\n\n // Update plugin skills\n this.log(\"Updating plugin skills...\");\n try {\n if (await directoryExists(pluginSkillsDir)) {\n await remove(pluginSkillsDir);\n }\n await ensureDir(pluginSkillsDir);\n\n await copySkillsToPluginFromSource(\n wizardResult.selectedSkills,\n pluginDir,\n sourceResult.matrix,\n sourceResult,\n );\n this.log(\n `✓ Plugin updated with ${wizardResult.selectedSkills.length} skills\\n`,\n );\n } catch (error) {\n this.handleError(error);\n }\n\n // Fetch agent partials\n let sourcePath: string;\n this.log(\n flags[\"agent-source\"]\n ? \"Fetching agent partials...\"\n : \"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(\n flags[\"agent-source\"]\n ? \"✓ Agent partials fetched\\n\"\n : \"✓ Agent partials loaded\\n\",\n );\n } catch (error) {\n this.handleError(error);\n }\n\n // Recompile agents\n this.log(\"Recompiling agents...\");\n try {\n const recompileResult = await recompileAgents({\n pluginDir,\n sourcePath,\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(\n `Agent recompilation failed: ${error instanceof Error ? error.message : String(error)}`,\n );\n this.log(\"You can manually recompile with 'cc compile'.\\n\");\n }\n\n // Update plugin version\n this.log(\"Updating plugin version...\");\n try {\n const newVersion = await bumpPluginVersion(pluginDir, \"patch\");\n this.log(`✓ Version bumped to ${newVersion}\\n`);\n } catch (error) {\n this.handleError(error);\n }\n\n this.log(\n `\\n✓ Plugin updated! (${addedSkills.length} added, ${removedSkills.length} removed)\\n`,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,SAAS,aAAa;AACtB,SAAS,cAAc;AA6FjB;AA3EN,IAAqB,OAArB,MAAqB,cAAa,YAAY;AAAA,EAC5C,OAAO,UAAU;AAAA,EACjB,OAAO,cACL;AAAA,EAEF,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,CAAC;AAAA,EACH;AAAA,EAEA,MAAM,MAAqB;AACzB,UAAM,EAAE,MAAM,IAAI,MAAM,KAAK,MAAM,KAAI;AAGvC,UAAM,eAAe,MAAM,mBAAmB;AAE9C,QAAI,CAAC,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AA,IACxB;AAEA,SAAK;AAAA,MACH;AAAA,0BAAwB,YAAY,MAAM,WAAW,cAAc,MAAM;AAAA;AAAA,IAC3E;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/cli/commands/edit.tsx"],"sourcesContent":["import { Flags } from \"@oclif/core\";\nimport { render } from \"ink\";\nimport React from \"react\";\nimport { BaseCommand } from \"../base-command.js\";\nimport { Wizard, WizardResultV2 } from \"../components/wizard/wizard.js\";\nimport { loadSkillsMatrixFromSource } from \"../lib/source-loader.js\";\nimport { directoryExists, ensureDir, remove } from \"../utils/fs.js\";\nimport {\n getCollectivePluginDir,\n getPluginSkillsDir,\n getPluginSkillIds,\n} from \"../lib/plugin-finder.js\";\nimport { copySkillsToPluginFromSource } from \"../lib/skill-copier.js\";\nimport { recompileAgents } from \"../lib/agent-recompiler.js\";\nimport { bumpPluginVersion } from \"../lib/plugin-version.js\";\nimport { getAgentDefinitions } from \"../lib/agent-fetcher.js\";\nimport { EXIT_CODES } from \"../lib/exit-codes.js\";\nimport { detectInstallation } from \"../lib/installation.js\";\n\nexport default class Edit extends BaseCommand {\n static summary = \"Edit skills in the plugin\";\n static description =\n \"Modify the currently installed skills via interactive wizard\";\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 // Detect installation mode\n const installation = await detectInstallation();\n\n if (!installation) {\n this.error(\n \"No installation found. Run 'cc init' first to set up Claude Collective.\",\n { exit: EXIT_CODES.ERROR },\n );\n }\n\n const pluginDir = getCollectivePluginDir();\n const pluginSkillsDir =\n installation.mode === \"local\"\n ? installation.skillsDir\n : getPluginSkillsDir(pluginDir);\n\n const modeLabel = installation.mode === \"local\" ? \"Local\" : \"Plugin\";\n this.log(`Edit ${modeLabel} Skills\\n`);\n\n // Load skills matrix\n this.log(\"Resolving marketplace source...\");\n let sourceResult;\n try {\n sourceResult = await loadSkillsMatrixFromSource({\n sourceFlag: flags.source,\n projectDir: process.cwd(),\n forceRefresh: flags.refresh,\n });\n\n const sourceInfo = sourceResult.isLocal\n ? \"local\"\n : sourceResult.sourceConfig.sourceOrigin;\n this.log(\n `✓ Loaded ${Object.keys(sourceResult.matrix.skills).length} skills (${sourceInfo})\\n`,\n );\n } catch (error) {\n this.handleError(error);\n }\n\n // Load current skills\n this.log(\"Reading current skills...\");\n let currentSkillIds: string[];\n try {\n currentSkillIds = await getPluginSkillIds(\n pluginSkillsDir,\n sourceResult.matrix,\n );\n this.log(`✓ Current plugin has ${currentSkillIds.length} skills\\n`);\n } catch (error) {\n this.handleError(error);\n }\n\n // Run wizard with initial skills\n let wizardResult: WizardResultV2 | null = null;\n\n const { waitUntilExit } = render(\n <Wizard\n matrix={sourceResult.matrix}\n initialSkills={currentSkillIds}\n onComplete={(result) => {\n // Wizard always returns WizardResultV2 in the current implementation\n wizardResult = result as WizardResultV2;\n }}\n onCancel={() => {\n this.log(\"\\nEdit cancelled\");\n }}\n />,\n );\n\n await waitUntilExit();\n\n // Cast to WizardResultV2 since that's what the current wizard implementation returns\n // Use non-null assertion here since we know the wizard has completed\n const result = wizardResult as WizardResultV2 | null;\n\n // Handle cancellation - use error() which throws and TypeScript understands\n if (!result || result.cancelled) {\n this.error(\"Cancelled\", { exit: EXIT_CODES.CANCELLED });\n }\n\n // Validate selection - use error() which throws and TypeScript understands\n if (!result.validation.valid) {\n const errorMessages = result.validation.errors\n .map((e) => e.message)\n .join(\"\\n \");\n this.error(`Selection has validation errors:\\n ${errorMessages}`, {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n // Calculate changes\n const addedSkills = result.selectedSkills.filter(\n (id: string) => !currentSkillIds.includes(id),\n );\n const removedSkills = currentSkillIds.filter(\n (id) => !result.selectedSkills.includes(id),\n );\n\n // Show warnings if any\n if (result.validation.warnings.length > 0) {\n this.log(\"\\nWarnings:\");\n for (const warning of result.validation.warnings) {\n this.warn(` ! ${warning.message}`);\n }\n this.log(\"\");\n }\n\n // Check if there are no changes\n if (addedSkills.length === 0 && removedSkills.length === 0) {\n this.log(\"No changes made.\");\n this.log(\"Plugin unchanged\\n\");\n return;\n }\n\n // Show changes\n this.log(\"\\nChanges:\");\n for (const skillId of addedSkills) {\n const skill = sourceResult.matrix.skills[skillId];\n this.log(` + ${skill?.name || skillId}`);\n }\n for (const skillId of removedSkills) {\n const skill = sourceResult.matrix.skills[skillId];\n this.log(` - ${skill?.name || skillId}`);\n }\n this.log(\"\");\n\n // Update plugin skills\n this.log(\"Updating plugin skills...\");\n try {\n if (await directoryExists(pluginSkillsDir)) {\n await remove(pluginSkillsDir);\n }\n await ensureDir(pluginSkillsDir);\n\n await copySkillsToPluginFromSource(\n result.selectedSkills,\n pluginDir,\n sourceResult.matrix,\n sourceResult,\n );\n this.log(\n `✓ Plugin updated with ${result.selectedSkills.length} skills\\n`,\n );\n } catch (error) {\n this.handleError(error);\n }\n\n // Fetch agent partials\n let sourcePath: string;\n this.log(\n flags[\"agent-source\"]\n ? \"Fetching agent partials...\"\n : \"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(\n flags[\"agent-source\"]\n ? \"✓ Agent partials fetched\\n\"\n : \"✓ Agent partials loaded\\n\",\n );\n } catch (error) {\n this.handleError(error);\n }\n\n // Recompile agents\n this.log(\"Recompiling agents...\");\n try {\n const recompileResult = await recompileAgents({\n pluginDir,\n sourcePath,\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(\n `Agent recompilation failed: ${error instanceof Error ? error.message : String(error)}`,\n );\n this.log(\"You can manually recompile with 'cc compile'.\\n\");\n }\n\n // Update plugin version\n this.log(\"Updating plugin version...\");\n try {\n const newVersion = await bumpPluginVersion(pluginDir, \"patch\");\n this.log(`✓ Version bumped to ${newVersion}\\n`);\n } catch (error) {\n this.handleError(error);\n }\n\n this.log(\n `\\n✓ Plugin updated! (${addedSkills.length} added, ${removedSkills.length} removed)\\n`,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,SAAS,aAAa;AACtB,SAAS,cAAc;AA6FjB;AA3EN,IAAqB,OAArB,MAAqB,cAAa,YAAY;AAAA,EAC5C,OAAO,UAAU;AAAA,EACjB,OAAO,cACL;AAAA,EAEF,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,CAAC;AAAA,EACH;AAAA,EAEA,MAAM,MAAqB;AACzB,UAAM,EAAE,MAAM,IAAI,MAAM,KAAK,MAAM,KAAI;AAGvC,UAAM,eAAe,MAAM,mBAAmB;AAE9C,QAAI,CAAC,cAAc;AACjB,WAAK;AAAA,QACH;AAAA,QACA,EAAE,MAAM,WAAW,MAAM;AAAA,MAC3B;AAAA,IACF;AAEA,UAAM,YAAY,uBAAuB;AACzC,UAAM,kBACJ,aAAa,SAAS,UAClB,aAAa,YACb,mBAAmB,SAAS;AAElC,UAAM,YAAY,aAAa,SAAS,UAAU,UAAU;AAC5D,SAAK,IAAI,QAAQ,SAAS;AAAA,CAAW;AAGrC,SAAK,IAAI,iCAAiC;AAC1C,QAAI;AACJ,QAA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|
3
|
+
copySkillsToLocalFlattened
|
|
4
|
+
} from "../chunk-K7EVM5LY.js";
|
|
5
|
+
import "../chunk-KAAEN2PO.js";
|
|
6
6
|
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
loadSkillsMatrixFromSource
|
|
8
|
+
} from "../chunk-CPZOTVCI.js";
|
|
9
|
+
import "../chunk-B7CCVP6Q.js";
|
|
10
|
+
import "../chunk-IMDW5ZUP.js";
|
|
10
11
|
import {
|
|
11
12
|
BaseCommand,
|
|
12
13
|
EXIT_CODES
|
|
13
|
-
} from "../chunk-
|
|
14
|
-
import
|
|
14
|
+
} from "../chunk-EHS3TWWP.js";
|
|
15
|
+
import {
|
|
16
|
+
loadProjectConfig,
|
|
17
|
+
resolveSource
|
|
18
|
+
} from "../chunk-V46GGCCI.js";
|
|
19
|
+
import "../chunk-3U3R4NCG.js";
|
|
15
20
|
import {
|
|
16
21
|
copy,
|
|
17
22
|
directoryExists,
|
|
18
23
|
ensureDir,
|
|
19
24
|
fileExists,
|
|
25
|
+
readFile,
|
|
20
26
|
writeFile
|
|
21
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-TKFPKEV3.js";
|
|
28
|
+
import {
|
|
29
|
+
CLAUDE_SRC_DIR,
|
|
30
|
+
DIRS,
|
|
31
|
+
LOCAL_SKILLS_PATH,
|
|
32
|
+
PROJECT_ROOT
|
|
33
|
+
} from "../chunk-76DWXGQE.js";
|
|
22
34
|
import {
|
|
23
35
|
init_esm_shims
|
|
24
36
|
} from "../chunk-DHET7RCE.js";
|
|
25
37
|
|
|
26
|
-
// src/cli
|
|
38
|
+
// src/cli/commands/eject.ts
|
|
27
39
|
init_esm_shims();
|
|
28
40
|
import { Args, Flags } from "@oclif/core";
|
|
29
41
|
import path from "path";
|
|
30
42
|
import os from "os";
|
|
31
|
-
|
|
32
|
-
var
|
|
33
|
-
# Agent-skill mappings for this project
|
|
34
|
-
|
|
35
|
-
name: my-project
|
|
36
|
-
description: Project description
|
|
37
|
-
|
|
38
|
-
# Agents to compile
|
|
39
|
-
agents:
|
|
40
|
-
- web-developer
|
|
41
|
-
- api-developer
|
|
42
|
-
- web-tester
|
|
43
|
-
- web-pm
|
|
44
|
-
|
|
45
|
-
# Agent-specific skill assignments (optional)
|
|
46
|
-
# If not specified, all available skills are given to all agents
|
|
47
|
-
agent_skills:
|
|
48
|
-
web-developer:
|
|
49
|
-
- react
|
|
50
|
-
- zustand
|
|
51
|
-
- scss-modules
|
|
52
|
-
api-developer:
|
|
53
|
-
- hono
|
|
54
|
-
- drizzle
|
|
55
|
-
- better-auth
|
|
56
|
-
`;
|
|
43
|
+
import { parse as parseYaml, stringify as stringifyYaml } from "yaml";
|
|
44
|
+
var EJECT_TYPES = ["agent-partials", "skills", "all"];
|
|
57
45
|
var Eject = class _Eject extends BaseCommand {
|
|
58
|
-
static summary = "Eject
|
|
59
|
-
static description = "Copy
|
|
46
|
+
static summary = "Eject skills or agent partials for local customization";
|
|
47
|
+
static description = "Copy agent partials or skills to your project for customization. Agent partials are always copied from the CLI. Skills are copied from the configured source (public marketplace by default).";
|
|
60
48
|
static args = {
|
|
61
49
|
type: Args.string({
|
|
62
|
-
description: "What to eject:
|
|
50
|
+
description: "What to eject: agent-partials, skills, all",
|
|
63
51
|
required: false,
|
|
64
52
|
options: EJECT_TYPES
|
|
65
53
|
})
|
|
@@ -74,6 +62,10 @@ var Eject = class _Eject extends BaseCommand {
|
|
|
74
62
|
output: Flags.string({
|
|
75
63
|
char: "o",
|
|
76
64
|
description: "Output directory (default: .claude/ in current directory)"
|
|
65
|
+
}),
|
|
66
|
+
refresh: Flags.boolean({
|
|
67
|
+
description: "Force refresh from remote source",
|
|
68
|
+
default: false
|
|
77
69
|
})
|
|
78
70
|
};
|
|
79
71
|
async run() {
|
|
@@ -81,7 +73,7 @@ var Eject = class _Eject extends BaseCommand {
|
|
|
81
73
|
const projectDir = process.cwd();
|
|
82
74
|
if (!args.type) {
|
|
83
75
|
this.error(
|
|
84
|
-
"Please specify what to eject:
|
|
76
|
+
"Please specify what to eject: agent-partials, skills, or all",
|
|
85
77
|
{ exit: EXIT_CODES.INVALID_ARGS }
|
|
86
78
|
);
|
|
87
79
|
}
|
|
@@ -100,7 +92,7 @@ var Eject = class _Eject extends BaseCommand {
|
|
|
100
92
|
});
|
|
101
93
|
}
|
|
102
94
|
} else {
|
|
103
|
-
outputBase = path.join(projectDir,
|
|
95
|
+
outputBase = path.join(projectDir, CLAUDE_SRC_DIR);
|
|
104
96
|
}
|
|
105
97
|
this.log("");
|
|
106
98
|
this.log("Claude Collective Eject");
|
|
@@ -110,96 +102,187 @@ var Eject = class _Eject extends BaseCommand {
|
|
|
110
102
|
}
|
|
111
103
|
const ejectType = args.type;
|
|
112
104
|
const directOutput = !!flags.output;
|
|
105
|
+
let sourceResult;
|
|
106
|
+
if (ejectType === "skills" || ejectType === "all") {
|
|
107
|
+
sourceResult = await loadSkillsMatrixFromSource({
|
|
108
|
+
sourceFlag: flags.source,
|
|
109
|
+
projectDir,
|
|
110
|
+
forceRefresh: flags.refresh
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
113
|
switch (ejectType) {
|
|
114
|
-
case "
|
|
115
|
-
await this.
|
|
116
|
-
break;
|
|
117
|
-
case "config":
|
|
118
|
-
await this.ejectConfig(outputBase, flags.force, directOutput);
|
|
114
|
+
case "agent-partials":
|
|
115
|
+
await this.ejectAgentPartials(outputBase, flags.force, directOutput);
|
|
119
116
|
break;
|
|
120
117
|
case "skills":
|
|
121
|
-
await this.ejectSkills(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
118
|
+
await this.ejectSkills(
|
|
119
|
+
projectDir,
|
|
120
|
+
flags.force,
|
|
121
|
+
directOutput,
|
|
122
|
+
sourceResult,
|
|
123
|
+
directOutput ? outputBase : void 0
|
|
124
|
+
);
|
|
125
125
|
break;
|
|
126
126
|
case "all":
|
|
127
|
-
await this.
|
|
128
|
-
await this.
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
await this.ejectAgentPartials(outputBase, flags.force, directOutput);
|
|
128
|
+
await this.ejectSkills(
|
|
129
|
+
projectDir,
|
|
130
|
+
flags.force,
|
|
131
|
+
directOutput,
|
|
132
|
+
sourceResult,
|
|
133
|
+
directOutput ? outputBase : void 0
|
|
134
|
+
);
|
|
131
135
|
break;
|
|
132
136
|
}
|
|
137
|
+
if (flags.source) {
|
|
138
|
+
await this.saveSourceToProjectConfig(projectDir, flags.source);
|
|
139
|
+
}
|
|
140
|
+
await this.ensureMinimalConfig(projectDir, flags.source, sourceResult);
|
|
133
141
|
this.log("");
|
|
134
142
|
this.logSuccess("Eject complete!");
|
|
135
143
|
this.log("");
|
|
136
144
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
+
/**
|
|
146
|
+
* Save source to project-level .claude-src/config.yaml.
|
|
147
|
+
* Creates the config file if it doesn't exist, or merges with existing config.
|
|
148
|
+
*/
|
|
149
|
+
async saveSourceToProjectConfig(projectDir, source) {
|
|
150
|
+
const configPath = path.join(projectDir, CLAUDE_SRC_DIR, "config.yaml");
|
|
151
|
+
let config = {};
|
|
152
|
+
if (await fileExists(configPath)) {
|
|
153
|
+
const content = await readFile(configPath);
|
|
154
|
+
config = parseYaml(content) || {};
|
|
145
155
|
}
|
|
146
|
-
|
|
147
|
-
await
|
|
148
|
-
|
|
149
|
-
this.log(
|
|
156
|
+
config.source = source;
|
|
157
|
+
await ensureDir(path.join(projectDir, CLAUDE_SRC_DIR));
|
|
158
|
+
await writeFile(configPath, stringifyYaml(config, { indent: 2 }));
|
|
159
|
+
this.log(`Source saved to .claude-src/config.yaml`);
|
|
150
160
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
161
|
+
/**
|
|
162
|
+
* Ensure a minimal config.yaml exists so that `cc compile` can work after eject.
|
|
163
|
+
* Only creates if config doesn't already exist.
|
|
164
|
+
* Includes all resolved config values: source, marketplace, author, agents_source.
|
|
165
|
+
*/
|
|
166
|
+
async ensureMinimalConfig(projectDir, sourceFlag, sourceResult) {
|
|
167
|
+
const configPath = path.join(projectDir, CLAUDE_SRC_DIR, "config.yaml");
|
|
168
|
+
if (await fileExists(configPath)) {
|
|
157
169
|
return;
|
|
158
170
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
171
|
+
const projectName = path.basename(projectDir);
|
|
172
|
+
const config = {
|
|
173
|
+
name: projectName,
|
|
174
|
+
installMode: "local"
|
|
175
|
+
};
|
|
176
|
+
const resolvedConfig = sourceResult?.sourceConfig ?? await resolveSource(sourceFlag, projectDir);
|
|
177
|
+
if (sourceFlag) {
|
|
178
|
+
config.source = sourceFlag;
|
|
179
|
+
} else if (resolvedConfig.source) {
|
|
180
|
+
config.source = resolvedConfig.source;
|
|
181
|
+
}
|
|
182
|
+
if (resolvedConfig.marketplace) {
|
|
183
|
+
config.marketplace = resolvedConfig.marketplace;
|
|
184
|
+
}
|
|
185
|
+
const existingProjectConfig = await loadProjectConfig(projectDir);
|
|
186
|
+
if (existingProjectConfig?.author) {
|
|
187
|
+
config.author = existingProjectConfig.author;
|
|
188
|
+
}
|
|
189
|
+
if (existingProjectConfig?.agents_source) {
|
|
190
|
+
config.agents_source = existingProjectConfig.agents_source;
|
|
191
|
+
}
|
|
192
|
+
await ensureDir(path.join(projectDir, CLAUDE_SRC_DIR));
|
|
193
|
+
let configContent = stringifyYaml(config, { indent: 2 });
|
|
194
|
+
const exampleStackComment = `
|
|
195
|
+
# Example stack configuration (uncomment and customize):
|
|
196
|
+
#
|
|
197
|
+
# skills:
|
|
198
|
+
# - web-framework-react
|
|
199
|
+
# - web-styling-scss-modules
|
|
200
|
+
# - api-framework-hono
|
|
201
|
+
# - api-database-drizzle
|
|
202
|
+
#
|
|
203
|
+
# agents:
|
|
204
|
+
# - web-developer
|
|
205
|
+
# - api-developer
|
|
206
|
+
# - web-reviewer
|
|
207
|
+
#
|
|
208
|
+
# stack:
|
|
209
|
+
# web-developer:
|
|
210
|
+
# framework: web-framework-react
|
|
211
|
+
# styling: web-styling-scss-modules
|
|
212
|
+
# api-developer:
|
|
213
|
+
# api: api-framework-hono
|
|
214
|
+
# database: api-database-drizzle
|
|
215
|
+
`;
|
|
216
|
+
configContent += exampleStackComment;
|
|
217
|
+
await writeFile(configPath, configContent);
|
|
218
|
+
this.logSuccess(`Created ${CLAUDE_SRC_DIR}/config.yaml`);
|
|
163
219
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
220
|
+
/**
|
|
221
|
+
* Eject agent partials (templates + agent partial files).
|
|
222
|
+
*
|
|
223
|
+
* Combines the old templates and agents eject into a single operation:
|
|
224
|
+
* - Copies `PROJECT_ROOT/src/agents/_templates/` to `<dest>/_templates/`
|
|
225
|
+
* - Copies agent partials from `PROJECT_ROOT/src/agents/` (excluding `_templates`) to `<dest>/`
|
|
226
|
+
*
|
|
227
|
+
* Always copies from CLI's PROJECT_ROOT - the `--source` flag has no effect.
|
|
228
|
+
*/
|
|
229
|
+
async ejectAgentPartials(outputBase, force, directOutput = false) {
|
|
230
|
+
const sourceDir = path.join(PROJECT_ROOT, DIRS.agents);
|
|
167
231
|
if (!await directoryExists(sourceDir)) {
|
|
168
|
-
this.warn("No
|
|
169
|
-
this.log("Install skills with 'cc init' first, then try again.");
|
|
232
|
+
this.warn("No agent partials found in CLI.");
|
|
170
233
|
return;
|
|
171
234
|
}
|
|
172
|
-
const destDir = directOutput ? outputBase : path.join(outputBase, "
|
|
235
|
+
const destDir = directOutput ? outputBase : path.join(outputBase, "agents");
|
|
173
236
|
if (await directoryExists(destDir) && !force) {
|
|
174
237
|
this.warn(
|
|
175
|
-
`
|
|
238
|
+
`Agent partials already exist at ${destDir}. Use --force to overwrite.`
|
|
176
239
|
);
|
|
177
240
|
return;
|
|
178
241
|
}
|
|
179
242
|
await ensureDir(destDir);
|
|
180
243
|
await copy(sourceDir, destDir);
|
|
181
|
-
this.logSuccess(`
|
|
182
|
-
this.log(
|
|
244
|
+
this.logSuccess(`Agent partials ejected to ${destDir}`);
|
|
245
|
+
this.log(
|
|
246
|
+
"You can now customize templates, agent intro, workflow, and examples locally."
|
|
247
|
+
);
|
|
183
248
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
249
|
+
/**
|
|
250
|
+
* Eject skills from the configured source to local .claude/skills/ directory.
|
|
251
|
+
*
|
|
252
|
+
* Uses the source resolution system:
|
|
253
|
+
* - Default: Public marketplace
|
|
254
|
+
* - `--source /path`: Custom local source
|
|
255
|
+
* - `--source url`: Custom remote source
|
|
256
|
+
*
|
|
257
|
+
* Skills are copied in a flattened structure using their normalized skill IDs.
|
|
258
|
+
*/
|
|
259
|
+
async ejectSkills(projectDir, force, directOutput = false, sourceResult, customOutputBase) {
|
|
260
|
+
const destDir = directOutput && customOutputBase ? customOutputBase : path.join(projectDir, LOCAL_SKILLS_PATH);
|
|
191
261
|
if (await directoryExists(destDir) && !force) {
|
|
192
262
|
this.warn(
|
|
193
|
-
`
|
|
263
|
+
`Skills already exist at ${destDir}. Use --force to overwrite.`
|
|
194
264
|
);
|
|
195
265
|
return;
|
|
196
266
|
}
|
|
267
|
+
const skillIds = Object.keys(sourceResult.matrix.skills).filter(
|
|
268
|
+
(skillId) => !sourceResult.matrix.skills[skillId].local
|
|
269
|
+
);
|
|
270
|
+
if (skillIds.length === 0) {
|
|
271
|
+
this.warn("No skills found in source to eject.");
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
197
274
|
await ensureDir(destDir);
|
|
198
|
-
await
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
275
|
+
const copiedSkills = await copySkillsToLocalFlattened(
|
|
276
|
+
skillIds,
|
|
277
|
+
destDir,
|
|
278
|
+
sourceResult.matrix,
|
|
279
|
+
sourceResult
|
|
280
|
+
);
|
|
281
|
+
const sourceLabel = sourceResult.isLocal ? sourceResult.sourcePath : sourceResult.marketplace || sourceResult.sourceConfig.source;
|
|
282
|
+
this.logSuccess(
|
|
283
|
+
`${copiedSkills.length} skills ejected to ${destDir} from ${sourceLabel}`
|
|
202
284
|
);
|
|
285
|
+
this.log("You can now customize skill content locally.");
|
|
203
286
|
}
|
|
204
287
|
};
|
|
205
288
|
export {
|