@agents-inc/cli 0.47.0 → 0.50.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.
- package/CHANGELOG.md +39 -0
- package/README.md +113 -118
- package/config/skill-categories.yaml +344 -0
- package/config/skill-rules.yaml +740 -0
- package/config/stacks.yaml +0 -1
- package/dist/{chunk-CJFWO46A.js → chunk-26MXZUHU.js} +2 -2
- package/dist/{chunk-KQ27IDYL.js → chunk-2BWCR762.js} +2 -3
- package/dist/chunk-2BWCR762.js.map +1 -0
- package/dist/chunk-3VOL4WEG.js +31 -0
- package/dist/chunk-3VOL4WEG.js.map +1 -0
- package/dist/chunk-4QWDB2MD.js +571 -0
- package/dist/chunk-4QWDB2MD.js.map +1 -0
- package/dist/{chunk-LJ5E4GXC.js → chunk-4R52TQ3K.js} +2 -2
- package/dist/{chunk-SPSGZWTZ.js → chunk-5FCHJLM7.js} +34 -16
- package/dist/chunk-5FCHJLM7.js.map +1 -0
- package/dist/chunk-5FPIKTSA.js +40 -0
- package/dist/chunk-5FPIKTSA.js.map +1 -0
- package/dist/{chunk-HLTJK3XB.js → chunk-5L724R4C.js} +5 -6
- package/dist/{chunk-HLTJK3XB.js.map → chunk-5L724R4C.js.map} +1 -1
- package/dist/{chunk-JTTTXGHX.js → chunk-7LV4V6A4.js} +4 -4
- package/dist/{chunk-FTD5Z6QD.js → chunk-AWP5A6IM.js} +15 -7
- package/dist/chunk-AWP5A6IM.js.map +1 -0
- package/dist/chunk-C3Q43WLC.js +118 -0
- package/dist/chunk-C3Q43WLC.js.map +1 -0
- package/dist/{chunk-B4QYXVPZ.js → chunk-CMNKHDOX.js} +2 -2
- package/dist/{chunk-TBB3THSL.js → chunk-D72AFYQR.js} +8 -13
- package/dist/chunk-D72AFYQR.js.map +1 -0
- package/dist/{chunk-QR2TM4OY.js → chunk-DCE423KO.js} +46 -30
- package/dist/chunk-DCE423KO.js.map +1 -0
- package/dist/chunk-GBOW6FUW.js +74 -0
- package/dist/chunk-GBOW6FUW.js.map +1 -0
- package/dist/{chunk-GFDGYQ6M.js → chunk-HMSHB5EQ.js} +569 -269
- package/dist/chunk-HMSHB5EQ.js.map +1 -0
- package/dist/{chunk-NRCKIHND.js → chunk-HYEUETIC.js} +2 -2
- package/dist/{chunk-OEJDFGAF.js → chunk-I6IOGZSZ.js} +61 -52
- package/dist/chunk-I6IOGZSZ.js.map +1 -0
- package/dist/{chunk-3APMMQUA.js → chunk-JFF7P4LC.js} +30 -93
- package/dist/chunk-JFF7P4LC.js.map +1 -0
- package/dist/{chunk-N5OCAAXY.js → chunk-JWYRXE6C.js} +2 -2
- package/dist/{chunk-TWDVLTU6.js → chunk-KAO3LKB5.js} +3 -3
- package/dist/{chunk-XTRPYUWK.js → chunk-KQOU4POU.js} +26 -28
- package/dist/chunk-KQOU4POU.js.map +1 -0
- package/dist/{chunk-YTRFL3MR.js → chunk-M3GQ2R3E.js} +29 -28
- package/dist/chunk-M3GQ2R3E.js.map +1 -0
- package/dist/{chunk-LNA6M2IE.js → chunk-PGY5XROM.js} +2 -2
- package/dist/chunk-PGY5XROM.js.map +1 -0
- package/dist/{chunk-VAQJLHUW.js → chunk-QB5HHTAA.js} +8 -19
- package/dist/chunk-QB5HHTAA.js.map +1 -0
- package/dist/{chunk-VSZ5GDET.js → chunk-QYLCINGC.js} +2 -2
- package/dist/{chunk-IRJADQM7.js → chunk-RA2IPRO2.js} +2 -2
- package/dist/{chunk-DC333ZDC.js → chunk-RDWGYKDY.js} +4 -4
- package/dist/{chunk-FXQYEXLS.js → chunk-RFKDGJAJ.js} +26 -57
- package/dist/chunk-RFKDGJAJ.js.map +1 -0
- package/dist/{chunk-HPJP3HFD.js → chunk-SPFHPHYL.js} +7 -7
- package/dist/{chunk-EZ46ZTAQ.js → chunk-U2W5SENM.js} +3 -3
- package/dist/{chunk-MVEYK55V.js → chunk-U7X4V4HE.js} +2 -2
- package/dist/{chunk-INKJBMPJ.js → chunk-UAD3SC27.js} +4 -12
- package/dist/chunk-UAD3SC27.js.map +1 -0
- package/dist/{chunk-C4QI54PN.js → chunk-WBHPCBVN.js} +57 -34
- package/dist/chunk-WBHPCBVN.js.map +1 -0
- package/dist/chunk-WFFV254H.js +314 -0
- package/dist/chunk-WFFV254H.js.map +1 -0
- package/dist/{chunk-ZWAL2ZY7.js → chunk-WJHFV6RI.js} +3 -2
- package/dist/chunk-WJHFV6RI.js.map +1 -0
- package/dist/{chunk-2RQYJFKA.js → chunk-WLZHCM7O.js} +2 -2
- package/dist/{chunk-DVW6ASTO.js → chunk-XDSVV5GZ.js} +4 -4
- package/dist/{chunk-JZHIF3K7.js → chunk-YDYRAXSY.js} +57 -27
- package/dist/chunk-YDYRAXSY.js.map +1 -0
- package/dist/commands/build/marketplace.js +4 -4
- package/dist/commands/build/plugins.js +5 -5
- package/dist/commands/build/stack.js +5 -5
- package/dist/commands/compile.js +11 -9
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/config/get.js +4 -4
- package/dist/commands/config/index.js +5 -5
- package/dist/commands/config/path.js +4 -4
- package/dist/commands/config/set-project.js +4 -4
- package/dist/commands/config/show.js +5 -5
- package/dist/commands/config/unset-project.js +4 -4
- package/dist/commands/diff.js +4 -4
- package/dist/commands/doctor.js +4 -4
- package/dist/commands/edit.js +58 -52
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/eject.js +4 -4
- package/dist/commands/import/skill.js +7 -8
- package/dist/commands/import/skill.js.map +1 -1
- package/dist/commands/info.js +5 -5
- package/dist/commands/init.js +40 -435
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list.js +4 -4
- package/dist/commands/new/agent.js +11 -10
- package/dist/commands/new/agent.js.map +1 -1
- package/dist/commands/new/marketplace.js +24 -5
- package/dist/commands/new/marketplace.js.map +1 -1
- package/dist/commands/new/skill.js +15 -209
- package/dist/commands/new/skill.js.map +1 -1
- package/dist/commands/outdated.js +11 -7
- package/dist/commands/outdated.js.map +1 -1
- package/dist/commands/search.js +7 -8
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/uninstall.js +6 -6
- package/dist/commands/update.js +6 -6
- package/dist/commands/validate.js +62 -250
- package/dist/commands/validate.js.map +1 -1
- package/dist/components/skill-search/skill-search.js +3 -3
- package/dist/components/wizard/category-grid.js +3 -2
- package/dist/components/wizard/category-grid.test.js +112 -58
- package/dist/components/wizard/category-grid.test.js.map +1 -1
- package/dist/components/wizard/checkbox-grid.js +5 -3
- package/dist/components/wizard/checkbox-grid.test.js +5 -4
- package/dist/components/wizard/checkbox-grid.test.js.map +1 -1
- package/dist/components/wizard/domain-selection.js +11 -9
- package/dist/components/wizard/help-modal.js +2 -2
- package/dist/components/wizard/menu-item.js +1 -1
- package/dist/components/wizard/search-modal.js +2 -2
- package/dist/components/wizard/search-modal.test.js +2 -2
- package/dist/components/wizard/section-progress.js +2 -2
- package/dist/components/wizard/section-progress.test.js +2 -2
- package/dist/components/wizard/selection-card.js +2 -2
- package/dist/components/wizard/source-grid.js +4 -3
- package/dist/components/wizard/source-grid.test.js +4 -3
- package/dist/components/wizard/source-grid.test.js.map +1 -1
- package/dist/components/wizard/stack-selection.js +8 -8
- package/dist/components/wizard/step-agents.js +10 -8
- package/dist/components/wizard/step-agents.test.js +18 -17
- package/dist/components/wizard/step-agents.test.js.map +1 -1
- package/dist/components/wizard/step-build.js +9 -8
- package/dist/components/wizard/step-build.test.js +17 -35
- package/dist/components/wizard/step-build.test.js.map +1 -1
- package/dist/components/wizard/step-confirm.js +4 -4
- package/dist/components/wizard/step-confirm.test.js +8 -8
- package/dist/components/wizard/step-refine.js +2 -2
- package/dist/components/wizard/step-refine.test.js +2 -2
- package/dist/components/wizard/step-settings.js +7 -5
- package/dist/components/wizard/step-settings.test.js +10 -8
- package/dist/components/wizard/step-settings.test.js.map +1 -1
- package/dist/components/wizard/step-sources.js +11 -10
- package/dist/components/wizard/step-sources.test.js +12 -11
- package/dist/components/wizard/step-sources.test.js.map +1 -1
- package/dist/components/wizard/step-stack.js +15 -12
- package/dist/components/wizard/step-stack.test.js +16 -13
- package/dist/components/wizard/step-stack.test.js.map +1 -1
- package/dist/components/wizard/view-title.js +2 -2
- package/dist/components/wizard/wizard-layout.js +8 -8
- package/dist/components/wizard/wizard-tabs.js +2 -2
- package/dist/components/wizard/wizard-tabs.test.js +2 -2
- package/dist/components/wizard/wizard.js +27 -25
- package/dist/config/skill-categories.yaml +344 -0
- package/dist/config/skill-rules.yaml +740 -0
- package/dist/config/stacks.yaml +0 -1
- package/dist/hooks/init.js +55 -3
- package/dist/hooks/init.js.map +1 -1
- package/dist/{source-manager-Q34LTUVM.js → source-manager-BVB2SG73.js} +4 -4
- package/dist/src/agents/meta/agent-summoner/critical-reminders.md +1 -1
- package/dist/src/agents/meta/agent-summoner/critical-requirements.md +1 -1
- package/dist/src/agents/meta/agent-summoner/examples.md +2 -2
- package/dist/src/agents/meta/agent-summoner/output-format.md +1 -1
- package/dist/src/agents/meta/agent-summoner/workflow.md +5 -7
- package/{src/agents/meta/documentor/agent.yaml → dist/src/agents/meta/documentor/metadata.yaml} +1 -0
- package/dist/stores/wizard-store.js +5 -5
- package/dist/stores/wizard-store.test.js +79 -27
- package/dist/stores/wizard-store.test.js.map +1 -1
- package/package.json +5 -1
- package/src/agents/meta/agent-summoner/critical-reminders.md +1 -1
- package/src/agents/meta/agent-summoner/critical-requirements.md +1 -1
- package/src/agents/meta/agent-summoner/examples.md +2 -2
- package/src/agents/meta/agent-summoner/output-format.md +1 -1
- package/src/agents/meta/agent-summoner/workflow.md +5 -7
- package/{dist/src/agents/meta/documentor/agent.yaml → src/agents/meta/documentor/metadata.yaml} +1 -0
- package/src/schemas/agent.schema.json +1 -1
- package/src/schemas/metadata.schema.json +2 -5
- package/src/schemas/project-config.schema.json +0 -3
- package/src/schemas/project-source-config.schema.json +4 -1
- package/config/skills-matrix.yaml +0 -918
- package/dist/chunk-3APMMQUA.js.map +0 -1
- package/dist/chunk-C4QI54PN.js.map +0 -1
- package/dist/chunk-FMQ3A7W4.js +0 -29
- package/dist/chunk-FMQ3A7W4.js.map +0 -1
- package/dist/chunk-FTD5Z6QD.js.map +0 -1
- package/dist/chunk-FXQYEXLS.js.map +0 -1
- package/dist/chunk-GFDGYQ6M.js.map +0 -1
- package/dist/chunk-INKJBMPJ.js.map +0 -1
- package/dist/chunk-JZHIF3K7.js.map +0 -1
- package/dist/chunk-KQ27IDYL.js.map +0 -1
- package/dist/chunk-LNA6M2IE.js.map +0 -1
- package/dist/chunk-M4P5YJ45.js +0 -99
- package/dist/chunk-M4P5YJ45.js.map +0 -1
- package/dist/chunk-OEJDFGAF.js.map +0 -1
- package/dist/chunk-QR2TM4OY.js.map +0 -1
- package/dist/chunk-SPSGZWTZ.js.map +0 -1
- package/dist/chunk-TBB3THSL.js.map +0 -1
- package/dist/chunk-VAQJLHUW.js.map +0 -1
- package/dist/chunk-XTRPYUWK.js.map +0 -1
- package/dist/chunk-YTRFL3MR.js.map +0 -1
- package/dist/chunk-ZWAL2ZY7.js.map +0 -1
- package/dist/config/skills-matrix.yaml +0 -918
- package/dist/src/agents/migration/cli-migrator/agent.yaml +0 -12
- package/dist/src/agents/migration/cli-migrator/anti-patterns.md +0 -158
- package/dist/src/agents/migration/cli-migrator/conversion-mappings.md +0 -63
- package/dist/src/agents/migration/cli-migrator/critical-reminders.md +0 -17
- package/dist/src/agents/migration/cli-migrator/critical-requirements.md +0 -13
- package/dist/src/agents/migration/cli-migrator/intro.md +0 -15
- package/dist/src/agents/migration/cli-migrator/output-format.md +0 -164
- package/dist/src/agents/migration/cli-migrator/workflow.md +0 -230
- package/src/agents/migration/cli-migrator/agent.yaml +0 -12
- package/src/agents/migration/cli-migrator/anti-patterns.md +0 -158
- package/src/agents/migration/cli-migrator/conversion-mappings.md +0 -63
- package/src/agents/migration/cli-migrator/critical-reminders.md +0 -17
- package/src/agents/migration/cli-migrator/critical-requirements.md +0 -13
- package/src/agents/migration/cli-migrator/intro.md +0 -15
- package/src/agents/migration/cli-migrator/output-format.md +0 -164
- package/src/agents/migration/cli-migrator/workflow.md +0 -230
- package/src/schemas/skills-matrix.schema.json +0 -179
- /package/dist/{chunk-CJFWO46A.js.map → chunk-26MXZUHU.js.map} +0 -0
- /package/dist/{chunk-LJ5E4GXC.js.map → chunk-4R52TQ3K.js.map} +0 -0
- /package/dist/{chunk-JTTTXGHX.js.map → chunk-7LV4V6A4.js.map} +0 -0
- /package/dist/{chunk-B4QYXVPZ.js.map → chunk-CMNKHDOX.js.map} +0 -0
- /package/dist/{chunk-NRCKIHND.js.map → chunk-HYEUETIC.js.map} +0 -0
- /package/dist/{chunk-N5OCAAXY.js.map → chunk-JWYRXE6C.js.map} +0 -0
- /package/dist/{chunk-TWDVLTU6.js.map → chunk-KAO3LKB5.js.map} +0 -0
- /package/dist/{chunk-VSZ5GDET.js.map → chunk-QYLCINGC.js.map} +0 -0
- /package/dist/{chunk-IRJADQM7.js.map → chunk-RA2IPRO2.js.map} +0 -0
- /package/dist/{chunk-DC333ZDC.js.map → chunk-RDWGYKDY.js.map} +0 -0
- /package/dist/{chunk-HPJP3HFD.js.map → chunk-SPFHPHYL.js.map} +0 -0
- /package/dist/{chunk-EZ46ZTAQ.js.map → chunk-U2W5SENM.js.map} +0 -0
- /package/dist/{chunk-MVEYK55V.js.map → chunk-U7X4V4HE.js.map} +0 -0
- /package/dist/{chunk-2RQYJFKA.js.map → chunk-WLZHCM7O.js.map} +0 -0
- /package/dist/{chunk-DVW6ASTO.js.map → chunk-XDSVV5GZ.js.map} +0 -0
- /package/dist/{source-manager-Q34LTUVM.js.map → source-manager-BVB2SG73.js.map} +0 -0
- /package/dist/src/agents/developer/api-developer/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/developer/cli-developer/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/developer/web-architecture/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/developer/web-developer/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/meta/agent-summoner/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/meta/skill-summoner/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/pattern/pattern-scout/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/pattern/web-pattern-critique/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/planning/web-pm/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/researcher/api-researcher/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/researcher/web-researcher/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/reviewer/api-reviewer/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/reviewer/cli-reviewer/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/reviewer/web-reviewer/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/tester/cli-tester/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/tester/web-tester/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/developer/api-developer/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/developer/cli-developer/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/developer/web-architecture/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/developer/web-developer/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/meta/agent-summoner/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/meta/skill-summoner/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/pattern/pattern-scout/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/pattern/web-pattern-critique/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/planning/web-pm/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/researcher/api-researcher/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/researcher/web-researcher/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/reviewer/api-reviewer/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/reviewer/cli-reviewer/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/reviewer/web-reviewer/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/tester/cli-tester/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/tester/web-tester/{agent.yaml → metadata.yaml} +0 -0
package/dist/commands/init.js
CHANGED
|
@@ -1,446 +1,51 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
3
|
+
Init,
|
|
4
|
+
formatDashboardText,
|
|
5
|
+
getDashboardData,
|
|
6
|
+
showDashboard
|
|
7
|
+
} from "../chunk-4QWDB2MD.js";
|
|
8
|
+
import "../chunk-KQOU4POU.js";
|
|
9
|
+
import "../chunk-I6IOGZSZ.js";
|
|
10
|
+
import "../chunk-U7X4V4HE.js";
|
|
11
|
+
import "../chunk-YDYRAXSY.js";
|
|
12
|
+
import "../chunk-SPFHPHYL.js";
|
|
13
|
+
import "../chunk-5FPIKTSA.js";
|
|
14
|
+
import "../chunk-DCE423KO.js";
|
|
15
|
+
import "../chunk-M3GQ2R3E.js";
|
|
16
|
+
import "../chunk-QB5HHTAA.js";
|
|
13
17
|
import "../chunk-K77I4XGL.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-XDSVV5GZ.js";
|
|
19
|
+
import "../chunk-2BWCR762.js";
|
|
20
|
+
import "../chunk-WJHFV6RI.js";
|
|
21
|
+
import "../chunk-RFKDGJAJ.js";
|
|
18
22
|
import "../chunk-7SOPVGDV.js";
|
|
19
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-QYLCINGC.js";
|
|
20
24
|
import "../chunk-KUV24B5M.js";
|
|
21
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-JFF7P4LC.js";
|
|
22
26
|
import "../chunk-GG4BSB6S.js";
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-5L724R4C.js";
|
|
28
|
+
import "../chunk-HYEUETIC.js";
|
|
29
|
+
import "../chunk-C3Q43WLC.js";
|
|
30
|
+
import "../chunk-3VOL4WEG.js";
|
|
31
|
+
import "../chunk-CMNKHDOX.js";
|
|
32
|
+
import "../chunk-GBOW6FUW.js";
|
|
33
|
+
import "../chunk-JWYRXE6C.js";
|
|
28
34
|
import "../chunk-U3IGFMCY.js";
|
|
29
|
-
import
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-INKJBMPJ.js";
|
|
36
|
-
import {
|
|
37
|
-
DRY_RUN_MESSAGES,
|
|
38
|
-
INFO_MESSAGES,
|
|
39
|
-
STATUS_MESSAGES,
|
|
40
|
-
SUCCESS_MESSAGES
|
|
41
|
-
} from "../chunk-2RQYJFKA.js";
|
|
42
|
-
import {
|
|
43
|
-
BaseCommand,
|
|
44
|
-
EXIT_CODES
|
|
45
|
-
} from "../chunk-LNA6M2IE.js";
|
|
46
|
-
import {
|
|
47
|
-
detectInstallation,
|
|
48
|
-
getMarketplaceLabel,
|
|
49
|
-
hasIndividualPlugins,
|
|
50
|
-
installLocal,
|
|
51
|
-
installPluginConfig,
|
|
52
|
-
loadSkillsMatrixFromSource
|
|
53
|
-
} from "../chunk-GFDGYQ6M.js";
|
|
35
|
+
import "../chunk-26MXZUHU.js";
|
|
36
|
+
import "../chunk-5FCHJLM7.js";
|
|
37
|
+
import "../chunk-UAD3SC27.js";
|
|
38
|
+
import "../chunk-WLZHCM7O.js";
|
|
39
|
+
import "../chunk-PGY5XROM.js";
|
|
40
|
+
import "../chunk-HMSHB5EQ.js";
|
|
54
41
|
import "../chunk-T4EXUIBY.js";
|
|
55
|
-
import
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
readFileSafe,
|
|
59
|
-
settingsFileSchema,
|
|
60
|
-
warn,
|
|
61
|
-
warnUnknownFields
|
|
62
|
-
} from "../chunk-C4QI54PN.js";
|
|
63
|
-
import {
|
|
64
|
-
ASCII_LOGO,
|
|
65
|
-
CLAUDE_DIR,
|
|
66
|
-
CLI_BIN_NAME,
|
|
67
|
-
CLI_COLORS,
|
|
68
|
-
DEFAULT_BRANDING,
|
|
69
|
-
LOCAL_SKILLS_PATH,
|
|
70
|
-
MAX_CONFIG_FILE_SIZE
|
|
71
|
-
} from "../chunk-FTD5Z6QD.js";
|
|
72
|
-
import {
|
|
73
|
-
init_esm_shims
|
|
74
|
-
} from "../chunk-DHET7RCE.js";
|
|
75
|
-
|
|
76
|
-
// src/cli/commands/init.tsx
|
|
77
|
-
init_esm_shims();
|
|
78
|
-
import { Flags } from "@oclif/core";
|
|
79
|
-
import { render } from "ink";
|
|
80
|
-
import path2 from "path";
|
|
81
|
-
|
|
82
|
-
// src/cli/lib/permission-checker.tsx
|
|
83
|
-
init_esm_shims();
|
|
84
|
-
import { Text, Box } from "ink";
|
|
85
|
-
import path from "path";
|
|
86
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
87
|
-
async function checkPermissions(projectRoot) {
|
|
88
|
-
const settingsPath = path.join(projectRoot, CLAUDE_DIR, "settings.json");
|
|
89
|
-
const localSettingsPath = path.join(projectRoot, CLAUDE_DIR, "settings.local.json");
|
|
90
|
-
let permissions;
|
|
91
|
-
for (const filePath of [localSettingsPath, settingsPath]) {
|
|
92
|
-
if (await fileExists(filePath)) {
|
|
93
|
-
try {
|
|
94
|
-
const content = await readFileSafe(filePath, MAX_CONFIG_FILE_SIZE);
|
|
95
|
-
const raw = JSON.parse(content);
|
|
96
|
-
if (typeof raw === "object" && raw !== null && !Array.isArray(raw)) {
|
|
97
|
-
const EXPECTED_SETTINGS_KEYS = [
|
|
98
|
-
"permissions",
|
|
99
|
-
"enabledPlugins",
|
|
100
|
-
"env",
|
|
101
|
-
"allowedTools",
|
|
102
|
-
"customInstructions",
|
|
103
|
-
"defaultModel"
|
|
104
|
-
];
|
|
105
|
-
warnUnknownFields(
|
|
106
|
-
raw,
|
|
107
|
-
EXPECTED_SETTINGS_KEYS,
|
|
108
|
-
`settings file '${filePath}'`
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
const result = settingsFileSchema.safeParse(raw);
|
|
112
|
-
const parsed = result.success ? result.data : {};
|
|
113
|
-
if (parsed.permissions) {
|
|
114
|
-
permissions = parsed.permissions;
|
|
115
|
-
break;
|
|
116
|
-
}
|
|
117
|
-
} catch {
|
|
118
|
-
warn(`Malformed settings file at '${filePath}' \u2014 skipping`);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
if (!permissions) {
|
|
123
|
-
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: CLI_COLORS.WARNING, padding: 1, children: [
|
|
124
|
-
/* @__PURE__ */ jsx(Text, { bold: true, color: CLI_COLORS.WARNING, children: "Permission Notice" }),
|
|
125
|
-
/* @__PURE__ */ jsx(Text, { children: "No permissions configured in .claude/settings.json" }),
|
|
126
|
-
/* @__PURE__ */ jsx(Text, { children: "Agents will prompt for approval on each tool use." }),
|
|
127
|
-
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
128
|
-
/* @__PURE__ */ jsx(Text, { children: "For autonomous operation, add to .claude/settings.json:" }),
|
|
129
|
-
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
130
|
-
/* @__PURE__ */ jsx(Text, { color: "dim", children: "{" }),
|
|
131
|
-
/* @__PURE__ */ jsx(Text, { color: "dim", children: ' "permissions": {' }),
|
|
132
|
-
/* @__PURE__ */ jsx(Text, { color: "dim", children: ' "allow": [' }),
|
|
133
|
-
/* @__PURE__ */ jsx(Text, { color: "dim", children: ' "Read(*)",' }),
|
|
134
|
-
/* @__PURE__ */ jsx(Text, { color: "dim", children: ' "Bash(git *)",' }),
|
|
135
|
-
/* @__PURE__ */ jsx(Text, { color: "dim", children: ' "Bash(bun *)"' }),
|
|
136
|
-
/* @__PURE__ */ jsx(Text, { color: "dim", children: " ]" }),
|
|
137
|
-
/* @__PURE__ */ jsx(Text, { color: "dim", children: " }" }),
|
|
138
|
-
/* @__PURE__ */ jsx(Text, { color: "dim", children: "}" })
|
|
139
|
-
] });
|
|
140
|
-
}
|
|
141
|
-
const hasRestrictiveBash = permissions.deny?.some(
|
|
142
|
-
(rule) => rule === "Bash(*)" || rule === "Bash"
|
|
143
|
-
);
|
|
144
|
-
const hasNoAllows = !permissions.allow || permissions.allow.length === 0;
|
|
145
|
-
if (hasRestrictiveBash || hasNoAllows) {
|
|
146
|
-
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: CLI_COLORS.WARNING, padding: 1, children: [
|
|
147
|
-
/* @__PURE__ */ jsx(Text, { bold: true, color: CLI_COLORS.WARNING, children: "Permission Warnings" }),
|
|
148
|
-
hasRestrictiveBash && /* @__PURE__ */ jsx(Text, { children: "\u26A0 Bash is denied in permissions. Some agents require Bash for git, testing, and build commands." }),
|
|
149
|
-
hasNoAllows && /* @__PURE__ */ jsx(Text, { children: "\u26A0 No allow rules configured. Agents will prompt for each tool use." })
|
|
150
|
-
] });
|
|
151
|
-
}
|
|
152
|
-
return null;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// src/cli/commands/init.tsx
|
|
156
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
157
|
-
var Init = class _Init extends BaseCommand {
|
|
158
|
-
static summary = `Initialize ${DEFAULT_BRANDING.NAME} in this project`;
|
|
159
|
-
static description = "Interactive wizard to set up skills and agents. Supports Plugin Mode (native install) and Local Mode (copy to .claude/).";
|
|
160
|
-
static examples = [
|
|
161
|
-
{
|
|
162
|
-
description: "Start the setup wizard",
|
|
163
|
-
command: "<%= config.bin %> <%= command.id %>"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
description: "Initialize from a custom marketplace",
|
|
167
|
-
command: "<%= config.bin %> <%= command.id %> --source github:org/marketplace"
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
description: "Preview without creating files",
|
|
171
|
-
command: "<%= config.bin %> <%= command.id %> --dry-run"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
description: "Force refresh skills from remote",
|
|
175
|
-
command: "<%= config.bin %> <%= command.id %> --refresh"
|
|
176
|
-
}
|
|
177
|
-
];
|
|
178
|
-
static flags = {
|
|
179
|
-
...BaseCommand.baseFlags,
|
|
180
|
-
refresh: Flags.boolean({
|
|
181
|
-
description: "Force refresh from remote source",
|
|
182
|
-
default: false
|
|
183
|
-
})
|
|
184
|
-
};
|
|
185
|
-
async run() {
|
|
186
|
-
const { flags } = await this.parse(_Init);
|
|
187
|
-
const projectDir = process.cwd();
|
|
188
|
-
if (flags["dry-run"]) {
|
|
189
|
-
this.log(`${DRY_RUN_MESSAGES.PREVIEW_NO_FILES_CREATED}
|
|
190
|
-
`);
|
|
191
|
-
}
|
|
192
|
-
const individualPluginsExist = await hasIndividualPlugins(projectDir);
|
|
193
|
-
const existingInstallation = await detectInstallation(projectDir);
|
|
194
|
-
if (individualPluginsExist || existingInstallation) {
|
|
195
|
-
const location = individualPluginsExist ? `.claude/settings.json` : existingInstallation?.configPath ?? projectDir;
|
|
196
|
-
this.warn(`${DEFAULT_BRANDING.NAME} is already initialized at ${location}`);
|
|
197
|
-
this.log(`Use '${CLI_BIN_NAME} edit' to modify skills.`);
|
|
198
|
-
this.log(INFO_MESSAGES.NO_CHANGES_MADE);
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
let sourceResult;
|
|
202
|
-
try {
|
|
203
|
-
sourceResult = await loadSkillsMatrixFromSource({
|
|
204
|
-
sourceFlag: flags.source,
|
|
205
|
-
projectDir,
|
|
206
|
-
forceRefresh: flags.refresh
|
|
207
|
-
});
|
|
208
|
-
} catch (error) {
|
|
209
|
-
this.error(getErrorMessage(error), {
|
|
210
|
-
exit: EXIT_CODES.ERROR
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
let wizardResult = null;
|
|
214
|
-
const marketplaceLabel = getMarketplaceLabel(sourceResult);
|
|
215
|
-
const { waitUntilExit } = render(
|
|
216
|
-
/* @__PURE__ */ jsx2(
|
|
217
|
-
Wizard,
|
|
218
|
-
{
|
|
219
|
-
matrix: sourceResult.matrix,
|
|
220
|
-
version: this.config.version,
|
|
221
|
-
marketplaceLabel,
|
|
222
|
-
logo: ASCII_LOGO,
|
|
223
|
-
projectDir: process.cwd(),
|
|
224
|
-
initialInstallMode: sourceResult.marketplace ? "plugin" : "local",
|
|
225
|
-
initialExpertMode: !!flags.source,
|
|
226
|
-
onComplete: (result2) => {
|
|
227
|
-
wizardResult = result2;
|
|
228
|
-
},
|
|
229
|
-
onCancel: () => {
|
|
230
|
-
this.log("Setup cancelled");
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
)
|
|
234
|
-
);
|
|
235
|
-
await waitUntilExit();
|
|
236
|
-
const result = wizardResult;
|
|
237
|
-
if (!result || result.cancelled) {
|
|
238
|
-
this.exit(EXIT_CODES.CANCELLED);
|
|
239
|
-
}
|
|
240
|
-
if (result.selectedSkills.length === 0) {
|
|
241
|
-
this.error("No skills selected", { exit: EXIT_CODES.ERROR });
|
|
242
|
-
}
|
|
243
|
-
await this.handleInstallation(result, sourceResult, flags);
|
|
244
|
-
}
|
|
245
|
-
async handleInstallation(result, sourceResult, flags) {
|
|
246
|
-
const projectDir = process.cwd();
|
|
247
|
-
const dryRun = flags["dry-run"];
|
|
248
|
-
this.log("\n");
|
|
249
|
-
this.log(`Selected ${result.selectedSkills.length} skills`);
|
|
250
|
-
this.log(
|
|
251
|
-
`Install mode: ${result.installMode === "plugin" ? "Plugin (native install)" : "Local (copy to .claude/skills/)"}`
|
|
252
|
-
);
|
|
253
|
-
if (dryRun) {
|
|
254
|
-
if (result.installMode === "plugin" && result.selectedStackId) {
|
|
255
|
-
const useMarketplace = !!sourceResult.marketplace;
|
|
256
|
-
if (useMarketplace) {
|
|
257
|
-
this.log(
|
|
258
|
-
`[dry-run] Would install stack "${result.selectedStackId}" from marketplace "${sourceResult.marketplace}"`
|
|
259
|
-
);
|
|
260
|
-
this.log(
|
|
261
|
-
`[dry-run] claude plugin install ${result.selectedStackId}@${sourceResult.marketplace} --scope project`
|
|
262
|
-
);
|
|
263
|
-
} else {
|
|
264
|
-
this.log(
|
|
265
|
-
`[dry-run] Would compile and install stack "${result.selectedStackId}" as a native plugin`
|
|
266
|
-
);
|
|
267
|
-
this.log(
|
|
268
|
-
`[dry-run] claude plugin install ./compiled-stack/${result.selectedStackId} --scope project`
|
|
269
|
-
);
|
|
270
|
-
this.log(
|
|
271
|
-
`[dry-run] Stack includes ${result.selectedSkills.length} skills and agents bundled together`
|
|
272
|
-
);
|
|
273
|
-
}
|
|
274
|
-
} else if (result.installMode === "plugin" && sourceResult.marketplace) {
|
|
275
|
-
this.log(
|
|
276
|
-
`[dry-run] Would install ${result.selectedSkills.length} skills as individual plugins from "${sourceResult.marketplace}"`
|
|
277
|
-
);
|
|
278
|
-
for (const skillId of result.selectedSkills) {
|
|
279
|
-
this.log(
|
|
280
|
-
`[dry-run] claude plugin install ${skillId}@${sourceResult.marketplace} --scope project`
|
|
281
|
-
);
|
|
282
|
-
}
|
|
283
|
-
const localAgentsDir = path2.join(projectDir, CLAUDE_DIR, "agents");
|
|
284
|
-
this.log(`[dry-run] Would compile agents to ${localAgentsDir}`);
|
|
285
|
-
this.log(`[dry-run] Would save config to .claude-src/config.yaml`);
|
|
286
|
-
} else {
|
|
287
|
-
if (result.installMode === "plugin") {
|
|
288
|
-
this.log(
|
|
289
|
-
`[dry-run] Plugin Mode requires a marketplace for individual skills \u2014 would fall back to Local Mode`
|
|
290
|
-
);
|
|
291
|
-
}
|
|
292
|
-
const localSkillsDir = path2.join(projectDir, LOCAL_SKILLS_PATH);
|
|
293
|
-
const localAgentsDir = path2.join(projectDir, CLAUDE_DIR, "agents");
|
|
294
|
-
this.log(
|
|
295
|
-
`[dry-run] Would copy ${result.selectedSkills.length} skills to ${localSkillsDir}`
|
|
296
|
-
);
|
|
297
|
-
this.log(`[dry-run] Would compile agents to ${localAgentsDir}`);
|
|
298
|
-
this.log(`[dry-run] Would save config to .claude-src/config.yaml`);
|
|
299
|
-
}
|
|
300
|
-
this.log(`
|
|
301
|
-
${DRY_RUN_MESSAGES.COMPLETE_NO_FILES_CREATED}`);
|
|
302
|
-
return;
|
|
303
|
-
}
|
|
304
|
-
if (result.installMode === "plugin") {
|
|
305
|
-
if (sourceResult.marketplace) {
|
|
306
|
-
await this.installIndividualPlugins(result, sourceResult, flags);
|
|
307
|
-
} else {
|
|
308
|
-
this.warn("Plugin Mode requires a marketplace for individual skill installation.");
|
|
309
|
-
this.log(`Falling back to Local Mode (copying to .claude/skills/)...`);
|
|
310
|
-
this.log("To use Plugin Mode, either select a stack or configure a marketplace source.\n");
|
|
311
|
-
await this.installLocalMode(result, sourceResult, flags);
|
|
312
|
-
}
|
|
313
|
-
return;
|
|
314
|
-
}
|
|
315
|
-
await this.installLocalMode(result, sourceResult, flags);
|
|
316
|
-
}
|
|
317
|
-
async installIndividualPlugins(result, sourceResult, flags) {
|
|
318
|
-
const projectDir = process.cwd();
|
|
319
|
-
if (sourceResult.marketplace) {
|
|
320
|
-
const marketplaceExists = await claudePluginMarketplaceExists(sourceResult.marketplace);
|
|
321
|
-
if (!marketplaceExists) {
|
|
322
|
-
this.log(`Registering marketplace "${sourceResult.marketplace}"...`);
|
|
323
|
-
try {
|
|
324
|
-
const marketplaceSource = sourceResult.sourceConfig.source.replace(/^github:/, "");
|
|
325
|
-
await claudePluginMarketplaceAdd(marketplaceSource);
|
|
326
|
-
this.log(`Registered marketplace: ${sourceResult.marketplace}`);
|
|
327
|
-
} catch (error) {
|
|
328
|
-
this.error(getErrorMessage(error), {
|
|
329
|
-
exit: EXIT_CODES.ERROR
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
this.log("Installing skill plugins...");
|
|
335
|
-
for (const skillId of result.selectedSkills) {
|
|
336
|
-
const pluginRef = `${skillId}@${sourceResult.marketplace}`;
|
|
337
|
-
try {
|
|
338
|
-
await claudePluginInstall(pluginRef, "project", projectDir);
|
|
339
|
-
this.log(` Installed ${pluginRef}`);
|
|
340
|
-
} catch (error) {
|
|
341
|
-
this.error(`Failed to install plugin ${pluginRef}: ${getErrorMessage(error)}`, {
|
|
342
|
-
exit: EXIT_CODES.ERROR
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
this.log(`Installed ${result.selectedSkills.length} skill plugins
|
|
347
|
-
`);
|
|
348
|
-
this.log("Generating configuration...");
|
|
349
|
-
try {
|
|
350
|
-
const configResult = await installPluginConfig({
|
|
351
|
-
wizardResult: result,
|
|
352
|
-
sourceResult,
|
|
353
|
-
projectDir,
|
|
354
|
-
sourceFlag: flags.source
|
|
355
|
-
});
|
|
356
|
-
if (configResult.wasMerged) {
|
|
357
|
-
this.log(`Merged with existing config at ${configResult.mergedConfigPath}`);
|
|
358
|
-
}
|
|
359
|
-
this.log(`Configuration saved (${configResult.config.agents.length} agents)
|
|
360
|
-
`);
|
|
361
|
-
this.log(STATUS_MESSAGES.COMPILING_AGENTS);
|
|
362
|
-
this.log(`Compiled ${configResult.compiledAgents.length} agents to .claude/agents/
|
|
363
|
-
`);
|
|
364
|
-
this.log(`${SUCCESS_MESSAGES.INIT_SUCCESS}
|
|
365
|
-
`);
|
|
366
|
-
this.log("Agents compiled to:");
|
|
367
|
-
this.log(` ${configResult.agentsDir}`);
|
|
368
|
-
for (const agentName of configResult.compiledAgents) {
|
|
369
|
-
this.log(` ${agentName}.md`);
|
|
370
|
-
}
|
|
371
|
-
this.log("");
|
|
372
|
-
this.log("Configuration:");
|
|
373
|
-
this.log(` ${configResult.configPath}`);
|
|
374
|
-
this.log("");
|
|
375
|
-
this.log("To customize agent-skill assignments:");
|
|
376
|
-
this.log(` 1. Edit .claude-src/config.yaml`);
|
|
377
|
-
this.log(` 2. Run '${CLI_BIN_NAME} compile' to regenerate agents`);
|
|
378
|
-
this.log("");
|
|
379
|
-
const permissionWarning = await checkPermissions(projectDir);
|
|
380
|
-
if (permissionWarning) {
|
|
381
|
-
const { waitUntilExit } = render(permissionWarning);
|
|
382
|
-
await waitUntilExit();
|
|
383
|
-
}
|
|
384
|
-
} catch (error) {
|
|
385
|
-
this.handleError(error);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
async installLocalMode(result, sourceResult, flags) {
|
|
389
|
-
const projectDir = process.cwd();
|
|
390
|
-
const matrix = sourceResult.matrix;
|
|
391
|
-
this.log("Copying skills to local directory...");
|
|
392
|
-
try {
|
|
393
|
-
const installResult = await installLocal({
|
|
394
|
-
wizardResult: result,
|
|
395
|
-
sourceResult,
|
|
396
|
-
projectDir,
|
|
397
|
-
sourceFlag: flags.source
|
|
398
|
-
});
|
|
399
|
-
this.log(`Copied ${installResult.copiedSkills.length} skills to .claude/skills/
|
|
400
|
-
`);
|
|
401
|
-
this.log("Generating configuration...");
|
|
402
|
-
if (installResult.wasMerged) {
|
|
403
|
-
this.log(`Merged with existing config at ${installResult.mergedConfigPath}`);
|
|
404
|
-
}
|
|
405
|
-
this.log(`Configuration saved (${installResult.config.agents.length} agents)
|
|
406
|
-
`);
|
|
407
|
-
this.log(STATUS_MESSAGES.COMPILING_AGENTS);
|
|
408
|
-
this.log(`Compiled ${installResult.compiledAgents.length} agents to .claude/agents/
|
|
409
|
-
`);
|
|
410
|
-
this.log(`${SUCCESS_MESSAGES.INIT_SUCCESS}
|
|
411
|
-
`);
|
|
412
|
-
this.log("Skills copied to:");
|
|
413
|
-
this.log(` ${installResult.skillsDir}`);
|
|
414
|
-
for (const copiedSkill of installResult.copiedSkills) {
|
|
415
|
-
const skill = matrix.skills[copiedSkill.skillId];
|
|
416
|
-
const displayName = skill?.displayName || copiedSkill.skillId;
|
|
417
|
-
this.log(` ${displayName}/`);
|
|
418
|
-
}
|
|
419
|
-
this.log("");
|
|
420
|
-
this.log("Agents compiled to:");
|
|
421
|
-
this.log(` ${installResult.agentsDir}`);
|
|
422
|
-
for (const agentName of installResult.compiledAgents) {
|
|
423
|
-
this.log(` ${agentName}.md`);
|
|
424
|
-
}
|
|
425
|
-
this.log("");
|
|
426
|
-
this.log("Configuration:");
|
|
427
|
-
this.log(` ${installResult.configPath}`);
|
|
428
|
-
this.log("");
|
|
429
|
-
this.log("To customize agent-skill assignments:");
|
|
430
|
-
this.log(` 1. Edit .claude-src/config.yaml`);
|
|
431
|
-
this.log(` 2. Run '${CLI_BIN_NAME} compile' to regenerate agents`);
|
|
432
|
-
this.log("");
|
|
433
|
-
const permissionWarning = await checkPermissions(projectDir);
|
|
434
|
-
if (permissionWarning) {
|
|
435
|
-
const { waitUntilExit } = render(permissionWarning);
|
|
436
|
-
await waitUntilExit();
|
|
437
|
-
}
|
|
438
|
-
} catch (error) {
|
|
439
|
-
this.handleError(error);
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
};
|
|
42
|
+
import "../chunk-WBHPCBVN.js";
|
|
43
|
+
import "../chunk-AWP5A6IM.js";
|
|
44
|
+
import "../chunk-DHET7RCE.js";
|
|
443
45
|
export {
|
|
444
|
-
Init as default
|
|
46
|
+
Init as default,
|
|
47
|
+
formatDashboardText,
|
|
48
|
+
getDashboardData,
|
|
49
|
+
showDashboard
|
|
445
50
|
};
|
|
446
51
|
//# sourceMappingURL=init.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli/commands/init.tsx","../../src/cli/lib/permission-checker.tsx"],"sourcesContent":["import { Flags } from \"@oclif/core\";\nimport { render } from \"ink\";\nimport path from \"path\";\n\nimport { BaseCommand } from \"../base-command.js\";\nimport { Wizard, type WizardResultV2 } from \"../components/wizard/wizard.js\";\nimport {\n loadSkillsMatrixFromSource,\n getMarketplaceLabel,\n type SourceLoadResult,\n} from \"../lib/loading/index.js\";\nimport {\n installLocal,\n installPluginConfig,\n detectInstallation as detectExistingInstallation,\n} from \"../lib/installation/index.js\";\nimport { checkPermissions } from \"../lib/permission-checker.js\";\nimport { hasIndividualPlugins } from \"../lib/plugins/index.js\";\nimport {\n claudePluginInstall,\n claudePluginMarketplaceExists,\n claudePluginMarketplaceAdd,\n} from \"../utils/exec.js\";\nimport {\n ASCII_LOGO,\n CLAUDE_DIR,\n CLI_BIN_NAME,\n DEFAULT_BRANDING,\n LOCAL_SKILLS_PATH,\n} from \"../consts.js\";\nimport { getErrorMessage } from \"../utils/errors.js\";\nimport { EXIT_CODES } from \"../lib/exit-codes.js\";\nimport {\n ERROR_MESSAGES,\n SUCCESS_MESSAGES,\n STATUS_MESSAGES,\n INFO_MESSAGES,\n DRY_RUN_MESSAGES,\n} from \"../utils/messages.js\";\n\nexport default class Init extends BaseCommand {\n static summary = `Initialize ${DEFAULT_BRANDING.NAME} in this project`;\n static description =\n \"Interactive wizard to set up skills and agents. Supports Plugin Mode (native install) and Local Mode (copy to .claude/).\";\n\n static examples = [\n {\n description: \"Start the setup wizard\",\n command: \"<%= config.bin %> <%= command.id %>\",\n },\n {\n description: \"Initialize from a custom marketplace\",\n command: \"<%= config.bin %> <%= command.id %> --source github:org/marketplace\",\n },\n {\n description: \"Preview without creating files\",\n command: \"<%= config.bin %> <%= command.id %> --dry-run\",\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 source\",\n default: false,\n }),\n };\n\n async run(): Promise<void> {\n const { flags } = await this.parse(Init);\n const projectDir = process.cwd();\n\n if (flags[\"dry-run\"]) {\n this.log(`${DRY_RUN_MESSAGES.PREVIEW_NO_FILES_CREATED}\\n`);\n }\n\n const individualPluginsExist = await hasIndividualPlugins(projectDir);\n const existingInstallation = await detectExistingInstallation(projectDir);\n\n if (individualPluginsExist || existingInstallation) {\n const location = individualPluginsExist\n ? `.claude/settings.json`\n : (existingInstallation?.configPath ?? projectDir);\n this.warn(`${DEFAULT_BRANDING.NAME} is already initialized at ${location}`);\n this.log(`Use '${CLI_BIN_NAME} edit' to modify skills.`);\n this.log(INFO_MESSAGES.NO_CHANGES_MADE);\n return;\n }\n\n let sourceResult: SourceLoadResult;\n try {\n sourceResult = await loadSkillsMatrixFromSource({\n sourceFlag: flags.source,\n projectDir,\n forceRefresh: flags.refresh,\n });\n } catch (error) {\n this.error(getErrorMessage(error), {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n let wizardResult: WizardResultV2 | null = null;\n\n const marketplaceLabel = getMarketplaceLabel(sourceResult);\n const { waitUntilExit } = render(\n <Wizard\n matrix={sourceResult.matrix}\n version={this.config.version}\n marketplaceLabel={marketplaceLabel}\n logo={ASCII_LOGO}\n projectDir={process.cwd()}\n initialInstallMode={sourceResult.marketplace ? \"plugin\" : \"local\"}\n initialExpertMode={!!flags.source}\n onComplete={(result) => {\n // Boundary cast: Ink render callback returns unknown result type\n wizardResult = result as WizardResultV2;\n }}\n onCancel={() => {\n this.log(\"Setup cancelled\");\n }}\n />,\n );\n\n await waitUntilExit();\n\n // Boundary cast: re-narrow after Ink waitUntilExit()\n const result = wizardResult as WizardResultV2 | null;\n if (!result || result.cancelled) {\n this.exit(EXIT_CODES.CANCELLED);\n }\n\n if (result.selectedSkills.length === 0) {\n this.error(\"No skills selected\", { exit: EXIT_CODES.ERROR });\n }\n\n await this.handleInstallation(result, sourceResult, flags);\n }\n\n private async handleInstallation(\n result: WizardResultV2,\n sourceResult: SourceLoadResult,\n flags: { \"dry-run\": boolean; source?: string; refresh: boolean },\n ): Promise<void> {\n const projectDir = process.cwd();\n const dryRun = flags[\"dry-run\"];\n\n this.log(\"\\n\");\n this.log(`Selected ${result.selectedSkills.length} skills`);\n this.log(\n `Install mode: ${result.installMode === \"plugin\" ? \"Plugin (native install)\" : \"Local (copy to .claude/skills/)\"}`,\n );\n\n if (dryRun) {\n if (result.installMode === \"plugin\" && result.selectedStackId) {\n const useMarketplace = !!sourceResult.marketplace;\n if (useMarketplace) {\n this.log(\n `[dry-run] Would install stack \"${result.selectedStackId}\" from marketplace \"${sourceResult.marketplace}\"`,\n );\n this.log(\n `[dry-run] claude plugin install ${result.selectedStackId}@${sourceResult.marketplace} --scope project`,\n );\n } else {\n this.log(\n `[dry-run] Would compile and install stack \"${result.selectedStackId}\" as a native plugin`,\n );\n this.log(\n `[dry-run] claude plugin install ./compiled-stack/${result.selectedStackId} --scope project`,\n );\n this.log(\n `[dry-run] Stack includes ${result.selectedSkills.length} skills and agents bundled together`,\n );\n }\n } else if (result.installMode === \"plugin\" && sourceResult.marketplace) {\n this.log(\n `[dry-run] Would install ${result.selectedSkills.length} skills as individual plugins from \"${sourceResult.marketplace}\"`,\n );\n for (const skillId of result.selectedSkills) {\n this.log(\n `[dry-run] claude plugin install ${skillId}@${sourceResult.marketplace} --scope project`,\n );\n }\n const localAgentsDir = path.join(projectDir, CLAUDE_DIR, \"agents\");\n this.log(`[dry-run] Would compile agents to ${localAgentsDir}`);\n this.log(`[dry-run] Would save config to .claude-src/config.yaml`);\n } else {\n if (result.installMode === \"plugin\") {\n this.log(\n `[dry-run] Plugin Mode requires a marketplace for individual skills — would fall back to Local Mode`,\n );\n }\n const localSkillsDir = path.join(projectDir, LOCAL_SKILLS_PATH);\n const localAgentsDir = path.join(projectDir, CLAUDE_DIR, \"agents\");\n this.log(\n `[dry-run] Would copy ${result.selectedSkills.length} skills to ${localSkillsDir}`,\n );\n this.log(`[dry-run] Would compile agents to ${localAgentsDir}`);\n this.log(`[dry-run] Would save config to .claude-src/config.yaml`);\n }\n this.log(`\\n${DRY_RUN_MESSAGES.COMPLETE_NO_FILES_CREATED}`);\n return;\n }\n\n if (result.installMode === \"plugin\") {\n if (sourceResult.marketplace) {\n await this.installIndividualPlugins(result, sourceResult, flags);\n } else {\n this.warn(\"Plugin Mode requires a marketplace for individual skill installation.\");\n this.log(`Falling back to Local Mode (copying to .claude/skills/)...`);\n this.log(\"To use Plugin Mode, either select a stack or configure a marketplace source.\\n\");\n await this.installLocalMode(result, sourceResult, flags);\n }\n return;\n }\n\n await this.installLocalMode(result, sourceResult, flags);\n }\n\n private async installIndividualPlugins(\n result: WizardResultV2,\n sourceResult: SourceLoadResult,\n flags: { source?: string },\n ): Promise<void> {\n const projectDir = process.cwd();\n\n if (sourceResult.marketplace) {\n const marketplaceExists = await claudePluginMarketplaceExists(sourceResult.marketplace);\n\n if (!marketplaceExists) {\n this.log(`Registering marketplace \"${sourceResult.marketplace}\"...`);\n try {\n const marketplaceSource = sourceResult.sourceConfig.source.replace(/^github:/, \"\");\n await claudePluginMarketplaceAdd(marketplaceSource);\n this.log(`Registered marketplace: ${sourceResult.marketplace}`);\n } catch (error) {\n this.error(getErrorMessage(error), {\n exit: EXIT_CODES.ERROR,\n });\n }\n }\n }\n\n this.log(\"Installing skill plugins...\");\n for (const skillId of result.selectedSkills) {\n const pluginRef = `${skillId}@${sourceResult.marketplace}`;\n try {\n await claudePluginInstall(pluginRef, \"project\", projectDir);\n this.log(` Installed ${pluginRef}`);\n } catch (error) {\n this.error(`Failed to install plugin ${pluginRef}: ${getErrorMessage(error)}`, {\n exit: EXIT_CODES.ERROR,\n });\n }\n }\n\n this.log(`Installed ${result.selectedSkills.length} skill plugins\\n`);\n\n this.log(\"Generating configuration...\");\n try {\n const configResult = await installPluginConfig({\n wizardResult: result,\n sourceResult,\n projectDir,\n sourceFlag: flags.source,\n });\n\n if (configResult.wasMerged) {\n this.log(`Merged with existing config at ${configResult.mergedConfigPath}`);\n }\n\n this.log(`Configuration saved (${configResult.config.agents.length} agents)\\n`);\n this.log(STATUS_MESSAGES.COMPILING_AGENTS);\n this.log(`Compiled ${configResult.compiledAgents.length} agents to .claude/agents/\\n`);\n\n this.log(`${SUCCESS_MESSAGES.INIT_SUCCESS}\\n`);\n this.log(\"Agents compiled to:\");\n this.log(` ${configResult.agentsDir}`);\n for (const agentName of configResult.compiledAgents) {\n this.log(` ${agentName}.md`);\n }\n this.log(\"\");\n this.log(\"Configuration:\");\n this.log(` ${configResult.configPath}`);\n this.log(\"\");\n this.log(\"To customize agent-skill assignments:\");\n this.log(` 1. Edit .claude-src/config.yaml`);\n this.log(` 2. Run '${CLI_BIN_NAME} compile' to regenerate agents`);\n this.log(\"\");\n\n const permissionWarning = await checkPermissions(projectDir);\n if (permissionWarning) {\n const { waitUntilExit } = render(permissionWarning);\n await waitUntilExit();\n }\n } catch (error) {\n this.handleError(error);\n }\n }\n\n private async installLocalMode(\n result: WizardResultV2,\n sourceResult: SourceLoadResult,\n flags: { source?: string },\n ): Promise<void> {\n const projectDir = process.cwd();\n const matrix = sourceResult.matrix;\n\n this.log(\"Copying skills to local directory...\");\n try {\n const installResult = await installLocal({\n wizardResult: result,\n sourceResult,\n projectDir,\n sourceFlag: flags.source,\n });\n\n this.log(`Copied ${installResult.copiedSkills.length} skills to .claude/skills/\\n`);\n this.log(\"Generating configuration...\");\n\n if (installResult.wasMerged) {\n this.log(`Merged with existing config at ${installResult.mergedConfigPath}`);\n }\n\n this.log(`Configuration saved (${installResult.config.agents.length} agents)\\n`);\n this.log(STATUS_MESSAGES.COMPILING_AGENTS);\n this.log(`Compiled ${installResult.compiledAgents.length} agents to .claude/agents/\\n`);\n\n this.log(`${SUCCESS_MESSAGES.INIT_SUCCESS}\\n`);\n this.log(\"Skills copied to:\");\n this.log(` ${installResult.skillsDir}`);\n for (const copiedSkill of installResult.copiedSkills) {\n const skill = matrix.skills[copiedSkill.skillId];\n const displayName = skill?.displayName || copiedSkill.skillId;\n this.log(` ${displayName}/`);\n }\n this.log(\"\");\n this.log(\"Agents compiled to:\");\n this.log(` ${installResult.agentsDir}`);\n for (const agentName of installResult.compiledAgents) {\n this.log(` ${agentName}.md`);\n }\n this.log(\"\");\n this.log(\"Configuration:\");\n this.log(` ${installResult.configPath}`);\n this.log(\"\");\n this.log(\"To customize agent-skill assignments:\");\n this.log(` 1. Edit .claude-src/config.yaml`);\n this.log(` 2. Run '${CLI_BIN_NAME} compile' to regenerate agents`);\n this.log(\"\");\n\n const permissionWarning = await checkPermissions(projectDir);\n if (permissionWarning) {\n const { waitUntilExit } = render(permissionWarning);\n await waitUntilExit();\n }\n } catch (error) {\n this.handleError(error);\n }\n }\n}\n","import React from \"react\";\n\nimport { Text, Box } from \"ink\";\nimport path from \"path\";\n\nimport { CLAUDE_DIR, CLI_COLORS, MAX_CONFIG_FILE_SIZE } from \"../consts\";\nimport { fileExists, readFileSafe } from \"../utils/fs\";\nimport { warn } from \"../utils/logger\";\nimport { settingsFileSchema, warnUnknownFields } from \"./schemas\";\n\ntype PermissionConfig = {\n allow?: string[];\n deny?: string[];\n};\n\ntype SettingsFile = {\n permissions?: PermissionConfig;\n};\n\nexport async function checkPermissions(projectRoot: string): Promise<React.ReactElement | null> {\n const settingsPath = path.join(projectRoot, CLAUDE_DIR, \"settings.json\");\n const localSettingsPath = path.join(projectRoot, CLAUDE_DIR, \"settings.local.json\");\n\n let permissions: PermissionConfig | undefined;\n\n for (const filePath of [localSettingsPath, settingsPath]) {\n if (await fileExists(filePath)) {\n try {\n const content = await readFileSafe(filePath, MAX_CONFIG_FILE_SIZE);\n const raw = JSON.parse(content);\n if (typeof raw === \"object\" && raw !== null && !Array.isArray(raw)) {\n // Known Claude CLI settings.json fields (permissions is ours; the rest are managed by Claude CLI)\n const EXPECTED_SETTINGS_KEYS = [\n \"permissions\",\n \"enabledPlugins\",\n \"env\",\n \"allowedTools\",\n \"customInstructions\",\n \"defaultModel\",\n ] as const;\n warnUnknownFields(\n raw as Record<string, unknown>,\n EXPECTED_SETTINGS_KEYS,\n `settings file '${filePath}'`,\n );\n }\n const result = settingsFileSchema.safeParse(raw);\n const parsed: SettingsFile = result.success ? (result.data as SettingsFile) : {};\n if (parsed.permissions) {\n permissions = parsed.permissions;\n break;\n }\n } catch {\n warn(`Malformed settings file at '${filePath}' — skipping`);\n }\n }\n }\n\n if (!permissions) {\n return (\n <Box flexDirection=\"column\" borderStyle=\"round\" borderColor={CLI_COLORS.WARNING} padding={1}>\n <Text bold color={CLI_COLORS.WARNING}>\n Permission Notice\n </Text>\n <Text>No permissions configured in .claude/settings.json</Text>\n <Text>Agents will prompt for approval on each tool use.</Text>\n <Text> </Text>\n <Text>For autonomous operation, add to .claude/settings.json:</Text>\n <Text> </Text>\n <Text color=\"dim\">{\"{\"}</Text>\n <Text color=\"dim\">{' \"permissions\": {'}</Text>\n <Text color=\"dim\">{' \"allow\": ['}</Text>\n <Text color=\"dim\">{' \"Read(*)\",'}</Text>\n <Text color=\"dim\">{' \"Bash(git *)\",'}</Text>\n <Text color=\"dim\">{' \"Bash(bun *)\"'}</Text>\n <Text color=\"dim\">{\" ]\"}</Text>\n <Text color=\"dim\">{\" }\"}</Text>\n <Text color=\"dim\">{\"}\"}</Text>\n </Box>\n );\n }\n\n const hasRestrictiveBash = permissions.deny?.some(\n (rule) => rule === \"Bash(*)\" || rule === \"Bash\",\n );\n const hasNoAllows = !permissions.allow || permissions.allow.length === 0;\n\n if (hasRestrictiveBash || hasNoAllows) {\n return (\n <Box flexDirection=\"column\" borderStyle=\"round\" borderColor={CLI_COLORS.WARNING} padding={1}>\n <Text bold color={CLI_COLORS.WARNING}>\n Permission Warnings\n </Text>\n {hasRestrictiveBash && (\n <Text>\n ⚠ Bash is denied in permissions. Some agents require Bash for git, testing, and build\n commands.\n </Text>\n )}\n {hasNoAllows && (\n <Text>⚠ No allow rules configured. Agents will prompt for each tool use.</Text>\n )}\n </Box>\n );\n }\n\n return null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;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,cAAc;AACpD,cAAM,QAAQ,OAAO,OAAO,YAAY,OAAO;AAC/C,cAAM,cAAc,OAAO,eAAe,YAAY;AACtD,aAAK,IAAI,OAAO,WAAW,GAAG;AAAA,MAChC;AACA,WAAK,IAAI,EAAE;AACX,WAAK,IAAI,qBAAqB;AAC9B,WAAK,IAAI,KAAK,cAAc,SAAS,EAAE;AACvC,iBAAW,aAAa,cAAc,gBAAgB;AACpD,aAAK,IAAI,OAAO,SAAS,KAAK;AAAA,MAChC;AACA,WAAK,IAAI,EAAE;AACX,WAAK,IAAI,gBAAgB;AACzB,WAAK,IAAI,KAAK,cAAc,UAAU,EAAE;AACxC,WAAK,IAAI,EAAE;AACX,WAAK,IAAI,uCAAuC;AAChD,WAAK,IAAI,mCAAmC;AAC5C,WAAK,IAAI,aAAa,YAAY,gCAAgC;AAClE,WAAK,IAAI,EAAE;AAEX,YAAM,oBAAoB,MAAM,iBAAiB,UAAU;AAC3D,UAAI,mBAAmB;AACrB,cAAM,EAAE,cAAc,IAAI,OAAO,iBAAiB;AAClD,cAAM,cAAc;AAAA,MACtB;AAAA,IACF,SAAS,OAAO;AACd,WAAK,YAAY,KAAK;AAAA,IACxB;AAAA,EACF;AACF;","names":["path","jsx","result","path"]}
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/commands/list.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
BaseCommand
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-PGY5XROM.js";
|
|
5
5
|
import {
|
|
6
6
|
formatInstallationDisplay,
|
|
7
7
|
getInstallationInfo
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-HMSHB5EQ.js";
|
|
9
9
|
import "../chunk-T4EXUIBY.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-WBHPCBVN.js";
|
|
11
11
|
import {
|
|
12
12
|
CLI_BIN_NAME,
|
|
13
13
|
DEFAULT_BRANDING
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-AWP5A6IM.js";
|
|
15
15
|
import {
|
|
16
16
|
init_esm_shims
|
|
17
17
|
} from "../chunk-DHET7RCE.js";
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
getAgentDefinitions
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-7LV4V6A4.js";
|
|
5
5
|
import {
|
|
6
6
|
isClaudeCLIAvailable
|
|
7
|
-
} from "../../chunk-
|
|
7
|
+
} from "../../chunk-26MXZUHU.js";
|
|
8
8
|
import {
|
|
9
9
|
BaseCommand,
|
|
10
10
|
EXIT_CODES
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-PGY5XROM.js";
|
|
12
12
|
import {
|
|
13
13
|
resolveSource
|
|
14
|
-
} from "../../chunk-
|
|
14
|
+
} from "../../chunk-HMSHB5EQ.js";
|
|
15
15
|
import "../../chunk-T4EXUIBY.js";
|
|
16
16
|
import {
|
|
17
17
|
fileExists,
|
|
18
18
|
readFile
|
|
19
|
-
} from "../../chunk-
|
|
19
|
+
} from "../../chunk-WBHPCBVN.js";
|
|
20
20
|
import {
|
|
21
21
|
CLAUDE_DIR,
|
|
22
22
|
CLI_COLORS
|
|
23
|
-
} from "../../chunk-
|
|
23
|
+
} from "../../chunk-AWP5A6IM.js";
|
|
24
24
|
import {
|
|
25
25
|
init_esm_shims
|
|
26
26
|
} from "../../chunk-DHET7RCE.js";
|
|
@@ -36,6 +36,7 @@ import { render, Box, Text, useApp, useInput } from "ink";
|
|
|
36
36
|
import path from "path";
|
|
37
37
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
38
38
|
var META_AGENT_NAME = "agent-summoner";
|
|
39
|
+
var SEPARATOR_WIDTH = 60;
|
|
39
40
|
var PurposeInput = ({ onSubmit, onCancel }) => {
|
|
40
41
|
const { exit } = useApp();
|
|
41
42
|
const [error, setError] = useState(null);
|
|
@@ -105,12 +106,12 @@ Agent Purpose: ${purpose}
|
|
|
105
106
|
|
|
106
107
|
Requirements:
|
|
107
108
|
1. Create the agent directory structure at ${outputDir}/${agentName}/
|
|
108
|
-
2. Create
|
|
109
|
+
2. Create metadata.yaml with appropriate configuration
|
|
109
110
|
3. Create intro.md with the agent's role and context
|
|
110
111
|
4. Create workflow.md with the agent's operational process
|
|
111
112
|
5. Optionally create examples.md if relevant examples would help
|
|
112
113
|
6. Optionally create critical-requirements.md for important rules
|
|
113
|
-
7. Include \`custom: true\` in the
|
|
114
|
+
7. Include \`custom: true\` in the metadata.yaml configuration
|
|
114
115
|
|
|
115
116
|
Follow the existing agent patterns in the codebase. Keep the agent focused and practical.`;
|
|
116
117
|
}
|
|
@@ -220,11 +221,11 @@ var NewAgent = class _NewAgent extends BaseCommand {
|
|
|
220
221
|
this.log("");
|
|
221
222
|
const agentPrompt = buildAgentPrompt(args.name, purpose, outputDir);
|
|
222
223
|
this.log("Invoking agent-summoner to create your agent...");
|
|
223
|
-
this.log("\u2500".repeat(
|
|
224
|
+
this.log("\u2500".repeat(SEPARATOR_WIDTH));
|
|
224
225
|
this.log("");
|
|
225
226
|
await invokeMetaAgent(agentDef, agentPrompt, flags["non-interactive"]);
|
|
226
227
|
this.log("");
|
|
227
|
-
this.log("\u2500".repeat(
|
|
228
|
+
this.log("\u2500".repeat(SEPARATOR_WIDTH));
|
|
228
229
|
this.logSuccess("Agent creation complete!");
|
|
229
230
|
} catch (error) {
|
|
230
231
|
this.handleError(error);
|