@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/config/stacks.yaml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
getErrorMessage,
|
|
4
4
|
warn
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WBHPCBVN.js";
|
|
6
6
|
import {
|
|
7
7
|
init_esm_shims
|
|
8
8
|
} from "./chunk-DHET7RCE.js";
|
|
@@ -180,4 +180,4 @@ export {
|
|
|
180
180
|
claudePluginMarketplaceAdd,
|
|
181
181
|
claudePluginUninstall
|
|
182
182
|
};
|
|
183
|
-
//# sourceMappingURL=chunk-
|
|
183
|
+
//# sourceMappingURL=chunk-26MXZUHU.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
CLI_COLORS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AWP5A6IM.js";
|
|
5
5
|
import {
|
|
6
6
|
init_esm_shims
|
|
7
7
|
} from "./chunk-DHET7RCE.js";
|
|
@@ -23,7 +23,6 @@ var GLOBAL_KEYS = {
|
|
|
23
23
|
var GLOBAL_TOGGLES = {
|
|
24
24
|
title: "Global Toggles",
|
|
25
25
|
keys: [
|
|
26
|
-
{ key: "E", description: "Toggle expert mode" },
|
|
27
26
|
{ key: "P", description: "Toggle plugin/local install mode" },
|
|
28
27
|
{ key: "?", description: "Toggle this help" }
|
|
29
28
|
]
|
|
@@ -87,4 +86,4 @@ var HelpModal = ({ currentStep }) => {
|
|
|
87
86
|
export {
|
|
88
87
|
HelpModal
|
|
89
88
|
};
|
|
90
|
-
//# sourceMappingURL=chunk-
|
|
89
|
+
//# sourceMappingURL=chunk-2BWCR762.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli/components/wizard/help-modal.tsx"],"sourcesContent":["import { Box, Text } from \"ink\";\nimport React from \"react\";\nimport { CLI_COLORS } from \"../../consts.js\";\nimport type { WizardStep } from \"../../stores/wizard-store.js\";\n\ntype HelpSection = {\n title: string;\n keys: { key: string; description: string }[];\n};\n\nconst GLOBAL_KEYS: HelpSection = {\n title: \"Navigation\",\n keys: [\n { key: \"Arrow keys\", description: \"Move focus\" },\n { key: \"SPACE\", description: \"Toggle selection\" },\n { key: \"ENTER\", description: \"Confirm / continue\" },\n { key: \"ESC\", description: \"Go back\" },\n { key: \"TAB\", description: \"Jump to next section\" },\n ],\n};\n\nconst GLOBAL_TOGGLES: HelpSection = {\n title: \"Global Toggles\",\n keys: [\n { key: \"P\", description: \"Toggle plugin/local install mode\" },\n { key: \"?\", description: \"Toggle this help\" },\n ],\n};\n\nconst BUILD_KEYS: HelpSection = {\n title: \"Build Step\",\n keys: [\n { key: \"D\", description: \"Toggle compatibility labels\" },\n { key: \"A\", description: \"Accept stack defaults (stack path only)\" },\n { key: \"h/j/k/l\", description: \"Vim-style navigation\" },\n ],\n};\n\nconst SOURCES_KEYS: HelpSection = {\n title: \"Sources Step\",\n keys: [{ key: \"G\", description: \"Toggle source settings\" }],\n};\n\nconst AGENTS_KEYS: HelpSection = {\n title: \"Agents Step\",\n keys: [],\n};\n\nconst STEP_SECTIONS: Partial<Record<WizardStep, HelpSection>> = {\n build: BUILD_KEYS,\n sources: SOURCES_KEYS,\n agents: AGENTS_KEYS,\n};\n\nconst KEY_COLUMN_WIDTH = 14;\n\ntype HelpSectionViewProps = {\n section: HelpSection;\n};\n\nconst HelpSectionView: React.FC<HelpSectionViewProps> = ({ section }) => (\n <Box flexDirection=\"column\" marginTop={1} marginBottom={1}>\n <Text bold>{section.title}</Text>\n {section.keys.map(({ key, description }) => (\n <Box key={key} marginTop={1}>\n <Box width={KEY_COLUMN_WIDTH}>\n <Text backgroundColor=\"black\" color={CLI_COLORS.UNFOCUSED}>\n {\" \"}\n {key}{\" \"}\n </Text>\n </Box>\n <Text>{description}</Text>\n </Box>\n ))}\n </Box>\n);\n\nexport type HelpModalProps = {\n currentStep: WizardStep;\n};\n\nexport const HelpModal: React.FC<HelpModalProps> = ({ currentStep }) => {\n const stepSection = STEP_SECTIONS[currentStep];\n\n return (\n <Box\n flexDirection=\"column\"\n borderStyle=\"single\"\n borderColor={CLI_COLORS.PRIMARY}\n paddingX={2}\n paddingY={1}\n marginTop={1}\n >\n <Text bold color={CLI_COLORS.PRIMARY}>\n Keyboard Shortcuts\n </Text>\n <Text> </Text>\n\n <HelpSectionView section={GLOBAL_KEYS} />\n <HelpSectionView section={GLOBAL_TOGGLES} />\n {stepSection && <HelpSectionView section={stepSection} />}\n\n <Text dimColor>Press ESC or ? to close</Text>\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;AAAA;AAAA,SAAS,KAAK,YAAY;AA8DtB,cAIM,YAJN;AApDJ,IAAM,cAA2B;AAAA,EAC/B,OAAO;AAAA,EACP,MAAM;AAAA,IACJ,EAAE,KAAK,cAAc,aAAa,aAAa;AAAA,IAC/C,EAAE,KAAK,SAAS,aAAa,mBAAmB;AAAA,IAChD,EAAE,KAAK,SAAS,aAAa,qBAAqB;AAAA,IAClD,EAAE,KAAK,OAAO,aAAa,UAAU;AAAA,IACrC,EAAE,KAAK,OAAO,aAAa,uBAAuB;AAAA,EACpD;AACF;AAEA,IAAM,iBAA8B;AAAA,EAClC,OAAO;AAAA,EACP,MAAM;AAAA,IACJ,EAAE,KAAK,KAAK,aAAa,mCAAmC;AAAA,IAC5D,EAAE,KAAK,KAAK,aAAa,mBAAmB;AAAA,EAC9C;AACF;AAEA,IAAM,aAA0B;AAAA,EAC9B,OAAO;AAAA,EACP,MAAM;AAAA,IACJ,EAAE,KAAK,KAAK,aAAa,8BAA8B;AAAA,IACvD,EAAE,KAAK,KAAK,aAAa,0CAA0C;AAAA,IACnE,EAAE,KAAK,WAAW,aAAa,uBAAuB;AAAA,EACxD;AACF;AAEA,IAAM,eAA4B;AAAA,EAChC,OAAO;AAAA,EACP,MAAM,CAAC,EAAE,KAAK,KAAK,aAAa,yBAAyB,CAAC;AAC5D;AAEA,IAAM,cAA2B;AAAA,EAC/B,OAAO;AAAA,EACP,MAAM,CAAC;AACT;AAEA,IAAM,gBAA0D;AAAA,EAC9D,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ;AACV;AAEA,IAAM,mBAAmB;AAMzB,IAAM,kBAAkD,CAAC,EAAE,QAAQ,MACjE,qBAAC,OAAI,eAAc,UAAS,WAAW,GAAG,cAAc,GACtD;AAAA,sBAAC,QAAK,MAAI,MAAE,kBAAQ,OAAM;AAAA,EACzB,QAAQ,KAAK,IAAI,CAAC,EAAE,KAAK,YAAY,MACpC,qBAAC,OAAc,WAAW,GACxB;AAAA,wBAAC,OAAI,OAAO,kBACV,+BAAC,QAAK,iBAAgB,SAAQ,OAAO,WAAW,WAC7C;AAAA;AAAA,MACA;AAAA,MAAK;AAAA,OACR,GACF;AAAA,IACA,oBAAC,QAAM,uBAAY;AAAA,OAPX,GAQV,CACD;AAAA,GACH;AAOK,IAAM,YAAsC,CAAC,EAAE,YAAY,MAAM;AACtE,QAAM,cAAc,cAAc,WAAW;AAE7C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAc;AAAA,MACd,aAAY;AAAA,MACZ,aAAa,WAAW;AAAA,MACxB,UAAU;AAAA,MACV,UAAU;AAAA,MACV,WAAW;AAAA,MAEX;AAAA,4BAAC,QAAK,MAAI,MAAC,OAAO,WAAW,SAAS,gCAEtC;AAAA,QACA,oBAAC,QAAK,eAAC;AAAA,QAEP,oBAAC,mBAAgB,SAAS,aAAa;AAAA,QACvC,oBAAC,mBAAgB,SAAS,gBAAgB;AAAA,QACzC,eAAe,oBAAC,mBAAgB,SAAS,aAAa;AAAA,QAEvD,oBAAC,QAAK,UAAQ,MAAC,qCAAuB;AAAA;AAAA;AAAA,EACxC;AAEJ;","names":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
computeRowScrollTop
|
|
4
|
+
} from "./chunk-GBOW6FUW.js";
|
|
5
|
+
import {
|
|
6
|
+
SCROLL_VIEWPORT
|
|
7
|
+
} from "./chunk-AWP5A6IM.js";
|
|
8
|
+
import {
|
|
9
|
+
init_esm_shims
|
|
10
|
+
} from "./chunk-DHET7RCE.js";
|
|
11
|
+
|
|
12
|
+
// src/cli/components/hooks/use-row-scroll.ts
|
|
13
|
+
init_esm_shims();
|
|
14
|
+
import { useRef } from "react";
|
|
15
|
+
function useRowScroll({
|
|
16
|
+
focusedIndex,
|
|
17
|
+
itemCount,
|
|
18
|
+
availableHeight
|
|
19
|
+
}) {
|
|
20
|
+
const scrollTopRef = useRef(0);
|
|
21
|
+
const scrollEnabled = availableHeight > 0 && availableHeight >= SCROLL_VIEWPORT.MIN_VIEWPORT_ROWS && itemCount > availableHeight;
|
|
22
|
+
if (scrollEnabled) {
|
|
23
|
+
scrollTopRef.current = computeRowScrollTop(focusedIndex, scrollTopRef.current, availableHeight);
|
|
24
|
+
}
|
|
25
|
+
return { scrollEnabled, scrollTop: scrollTopRef.current };
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
useRowScroll
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=chunk-3VOL4WEG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli/components/hooks/use-row-scroll.ts"],"sourcesContent":["import { useRef } from \"react\";\nimport { SCROLL_VIEWPORT } from \"../../consts.js\";\nimport { computeRowScrollTop } from \"./use-section-scroll.js\";\n\nexport type UseRowScrollOptions = {\n focusedIndex: number;\n itemCount: number;\n availableHeight: number;\n};\n\nexport type UseRowScrollResult = {\n scrollEnabled: boolean;\n scrollTop: number;\n};\n\n/**\n * Row-based scroll hook for views with uniform 1-line rows.\n *\n * Manages a scroll offset (in rows) to keep the focused row visible within\n * a constrained viewport. Extracted from the identical scroll plumbing in\n * checkbox-grid.tsx, step-agents.tsx, and step-settings.tsx.\n */\nexport function useRowScroll({\n focusedIndex,\n itemCount,\n availableHeight,\n}: UseRowScrollOptions): UseRowScrollResult {\n const scrollTopRef = useRef(0);\n\n const scrollEnabled =\n availableHeight > 0 &&\n availableHeight >= SCROLL_VIEWPORT.MIN_VIEWPORT_ROWS &&\n itemCount > availableHeight;\n\n if (scrollEnabled) {\n scrollTopRef.current = computeRowScrollTop(focusedIndex, scrollTopRef.current, availableHeight);\n }\n\n return { scrollEnabled, scrollTop: scrollTopRef.current };\n}\n"],"mappings":";;;;;;;;;;;;AAAA;AAAA,SAAS,cAAc;AAsBhB,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AACF,GAA4C;AAC1C,QAAM,eAAe,OAAO,CAAC;AAE7B,QAAM,gBACJ,kBAAkB,KAClB,mBAAmB,gBAAgB,qBACnC,YAAY;AAEd,MAAI,eAAe;AACjB,iBAAa,UAAU,oBAAoB,cAAc,aAAa,SAAS,eAAe;AAAA,EAChG;AAEA,SAAO,EAAE,eAAe,WAAW,aAAa,QAAQ;AAC1D;","names":[]}
|
|
@@ -0,0 +1,571 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
Wizard
|
|
4
|
+
} from "./chunk-KQOU4POU.js";
|
|
5
|
+
import {
|
|
6
|
+
claudePluginInstall,
|
|
7
|
+
claudePluginMarketplaceAdd,
|
|
8
|
+
claudePluginMarketplaceExists
|
|
9
|
+
} from "./chunk-26MXZUHU.js";
|
|
10
|
+
import {
|
|
11
|
+
DRY_RUN_MESSAGES,
|
|
12
|
+
STATUS_MESSAGES,
|
|
13
|
+
SUCCESS_MESSAGES
|
|
14
|
+
} from "./chunk-WLZHCM7O.js";
|
|
15
|
+
import {
|
|
16
|
+
BaseCommand,
|
|
17
|
+
EXIT_CODES
|
|
18
|
+
} from "./chunk-PGY5XROM.js";
|
|
19
|
+
import {
|
|
20
|
+
detectProjectInstallation,
|
|
21
|
+
getInstallationInfo,
|
|
22
|
+
getMarketplaceLabel,
|
|
23
|
+
hasIndividualPlugins,
|
|
24
|
+
installLocal,
|
|
25
|
+
installPluginConfig,
|
|
26
|
+
loadProjectConfig,
|
|
27
|
+
loadSkillsMatrixFromSource
|
|
28
|
+
} from "./chunk-HMSHB5EQ.js";
|
|
29
|
+
import {
|
|
30
|
+
disableBuffering,
|
|
31
|
+
drainBuffer,
|
|
32
|
+
enableBuffering,
|
|
33
|
+
fileExists,
|
|
34
|
+
getErrorMessage,
|
|
35
|
+
pushBufferMessage,
|
|
36
|
+
readFileSafe,
|
|
37
|
+
settingsFileSchema,
|
|
38
|
+
warn,
|
|
39
|
+
warnUnknownFields
|
|
40
|
+
} from "./chunk-WBHPCBVN.js";
|
|
41
|
+
import {
|
|
42
|
+
ASCII_LOGO,
|
|
43
|
+
CLAUDE_DIR,
|
|
44
|
+
CLI_BIN_NAME,
|
|
45
|
+
CLI_COLORS,
|
|
46
|
+
DEFAULT_BRANDING,
|
|
47
|
+
LOCAL_SKILLS_PATH,
|
|
48
|
+
MAX_CONFIG_FILE_SIZE
|
|
49
|
+
} from "./chunk-AWP5A6IM.js";
|
|
50
|
+
import {
|
|
51
|
+
init_esm_shims
|
|
52
|
+
} from "./chunk-DHET7RCE.js";
|
|
53
|
+
|
|
54
|
+
// src/cli/commands/init.tsx
|
|
55
|
+
init_esm_shims();
|
|
56
|
+
import { useState } from "react";
|
|
57
|
+
import { Flags } from "@oclif/core";
|
|
58
|
+
import { render, Box as Box2, Text as Text2, useApp, useInput } from "ink";
|
|
59
|
+
import os from "os";
|
|
60
|
+
import path2 from "path";
|
|
61
|
+
|
|
62
|
+
// src/cli/lib/permission-checker.tsx
|
|
63
|
+
init_esm_shims();
|
|
64
|
+
import { Text, Box } from "ink";
|
|
65
|
+
import path from "path";
|
|
66
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
67
|
+
async function checkPermissions(projectRoot) {
|
|
68
|
+
const settingsPath = path.join(projectRoot, CLAUDE_DIR, "settings.json");
|
|
69
|
+
const localSettingsPath = path.join(projectRoot, CLAUDE_DIR, "settings.local.json");
|
|
70
|
+
let permissions;
|
|
71
|
+
for (const filePath of [localSettingsPath, settingsPath]) {
|
|
72
|
+
if (await fileExists(filePath)) {
|
|
73
|
+
try {
|
|
74
|
+
const content = await readFileSafe(filePath, MAX_CONFIG_FILE_SIZE);
|
|
75
|
+
const raw = JSON.parse(content);
|
|
76
|
+
if (typeof raw === "object" && raw !== null && !Array.isArray(raw)) {
|
|
77
|
+
const EXPECTED_SETTINGS_KEYS = [
|
|
78
|
+
"permissions",
|
|
79
|
+
"enabledPlugins",
|
|
80
|
+
"env",
|
|
81
|
+
"allowedTools",
|
|
82
|
+
"customInstructions",
|
|
83
|
+
"defaultModel"
|
|
84
|
+
];
|
|
85
|
+
warnUnknownFields(
|
|
86
|
+
raw,
|
|
87
|
+
EXPECTED_SETTINGS_KEYS,
|
|
88
|
+
`settings file '${filePath}'`
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
const result = settingsFileSchema.safeParse(raw);
|
|
92
|
+
const parsed = result.success ? result.data : {};
|
|
93
|
+
if (parsed.permissions) {
|
|
94
|
+
permissions = parsed.permissions;
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
} catch {
|
|
98
|
+
warn(`Malformed settings file at '${filePath}' \u2014 skipping`);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if (!permissions) {
|
|
103
|
+
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: CLI_COLORS.WARNING, padding: 1, children: [
|
|
104
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: CLI_COLORS.WARNING, children: "Permission Notice" }),
|
|
105
|
+
/* @__PURE__ */ jsx(Text, { children: "No permissions configured in .claude/settings.json" }),
|
|
106
|
+
/* @__PURE__ */ jsx(Text, { children: "Agents will prompt for approval on each tool use." }),
|
|
107
|
+
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
108
|
+
/* @__PURE__ */ jsx(Text, { children: "For autonomous operation, add to .claude/settings.json:" }),
|
|
109
|
+
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
110
|
+
/* @__PURE__ */ jsx(Text, { color: "dim", children: "{" }),
|
|
111
|
+
/* @__PURE__ */ jsx(Text, { color: "dim", children: ' "permissions": {' }),
|
|
112
|
+
/* @__PURE__ */ jsx(Text, { color: "dim", children: ' "allow": [' }),
|
|
113
|
+
/* @__PURE__ */ jsx(Text, { color: "dim", children: ' "Read(*)",' }),
|
|
114
|
+
/* @__PURE__ */ jsx(Text, { color: "dim", children: ' "Bash(git *)",' }),
|
|
115
|
+
/* @__PURE__ */ jsx(Text, { color: "dim", children: ' "Bash(bun *)"' }),
|
|
116
|
+
/* @__PURE__ */ jsx(Text, { color: "dim", children: " ]" }),
|
|
117
|
+
/* @__PURE__ */ jsx(Text, { color: "dim", children: " }" }),
|
|
118
|
+
/* @__PURE__ */ jsx(Text, { color: "dim", children: "}" })
|
|
119
|
+
] });
|
|
120
|
+
}
|
|
121
|
+
const hasRestrictiveBash = permissions.deny?.some(
|
|
122
|
+
(rule) => rule === "Bash(*)" || rule === "Bash"
|
|
123
|
+
);
|
|
124
|
+
const hasNoAllows = !permissions.allow || permissions.allow.length === 0;
|
|
125
|
+
if (hasRestrictiveBash || hasNoAllows) {
|
|
126
|
+
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: CLI_COLORS.WARNING, padding: 1, children: [
|
|
127
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: CLI_COLORS.WARNING, children: "Permission Warnings" }),
|
|
128
|
+
hasRestrictiveBash && /* @__PURE__ */ jsx(Text, { children: "\u26A0 Bash is denied in permissions. Some agents require Bash for git, testing, and build commands." }),
|
|
129
|
+
hasNoAllows && /* @__PURE__ */ jsx(Text, { children: "\u26A0 No allow rules configured. Agents will prompt for each tool use." })
|
|
130
|
+
] });
|
|
131
|
+
}
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// src/cli/commands/init.tsx
|
|
136
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
137
|
+
var DASHBOARD_OPTIONS = [
|
|
138
|
+
{ label: "Edit", command: "edit" },
|
|
139
|
+
{ label: "Compile", command: "compile" },
|
|
140
|
+
{ label: "Doctor", command: "doctor" },
|
|
141
|
+
{ label: "List", command: "list" }
|
|
142
|
+
];
|
|
143
|
+
var Dashboard = ({
|
|
144
|
+
skillCount,
|
|
145
|
+
agentCount,
|
|
146
|
+
source,
|
|
147
|
+
mode,
|
|
148
|
+
onSelect,
|
|
149
|
+
onCancel
|
|
150
|
+
}) => {
|
|
151
|
+
const { exit } = useApp();
|
|
152
|
+
const [focusIndex, setFocusIndex] = useState(0);
|
|
153
|
+
useInput((input, key) => {
|
|
154
|
+
if (key.escape) {
|
|
155
|
+
onCancel();
|
|
156
|
+
exit();
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
if (key.return) {
|
|
160
|
+
onSelect(DASHBOARD_OPTIONS[focusIndex].command);
|
|
161
|
+
exit();
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
if (key.leftArrow) {
|
|
165
|
+
setFocusIndex((i) => i > 0 ? i - 1 : DASHBOARD_OPTIONS.length - 1);
|
|
166
|
+
}
|
|
167
|
+
if (key.rightArrow) {
|
|
168
|
+
setFocusIndex((i) => i < DASHBOARD_OPTIONS.length - 1 ? i + 1 : 0);
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", children: [
|
|
172
|
+
/* @__PURE__ */ jsx2(Text2, { bold: true, children: DEFAULT_BRANDING.NAME }),
|
|
173
|
+
/* @__PURE__ */ jsx2(Text2, { children: " " }),
|
|
174
|
+
/* @__PURE__ */ jsxs2(Text2, { children: [
|
|
175
|
+
" Skills: ",
|
|
176
|
+
skillCount,
|
|
177
|
+
" installed"
|
|
178
|
+
] }),
|
|
179
|
+
/* @__PURE__ */ jsxs2(Text2, { children: [
|
|
180
|
+
" Agents: ",
|
|
181
|
+
agentCount,
|
|
182
|
+
" compiled"
|
|
183
|
+
] }),
|
|
184
|
+
/* @__PURE__ */ jsxs2(Text2, { children: [
|
|
185
|
+
" Mode: ",
|
|
186
|
+
mode === "plugin" ? "Plugin" : "Local"
|
|
187
|
+
] }),
|
|
188
|
+
source && /* @__PURE__ */ jsxs2(Text2, { children: [
|
|
189
|
+
" Source: ",
|
|
190
|
+
source
|
|
191
|
+
] }),
|
|
192
|
+
/* @__PURE__ */ jsx2(Text2, { children: " " }),
|
|
193
|
+
/* @__PURE__ */ jsxs2(Box2, { children: [
|
|
194
|
+
/* @__PURE__ */ jsx2(Text2, { children: " " }),
|
|
195
|
+
DASHBOARD_OPTIONS.map((option, index) => /* @__PURE__ */ jsx2(Box2, { marginRight: 1, children: /* @__PURE__ */ jsxs2(
|
|
196
|
+
Text2,
|
|
197
|
+
{
|
|
198
|
+
color: index === focusIndex ? CLI_COLORS.FOCUS : void 0,
|
|
199
|
+
bold: index === focusIndex,
|
|
200
|
+
children: [
|
|
201
|
+
"[",
|
|
202
|
+
option.label,
|
|
203
|
+
"]"
|
|
204
|
+
]
|
|
205
|
+
}
|
|
206
|
+
) }, option.command))
|
|
207
|
+
] }),
|
|
208
|
+
/* @__PURE__ */ jsx2(Text2, { dimColor: true, children: " Use arrow keys to select, Enter to confirm, Esc to exit" })
|
|
209
|
+
] });
|
|
210
|
+
};
|
|
211
|
+
async function getDashboardData(projectDir) {
|
|
212
|
+
const [info, loaded] = await Promise.all([getInstallationInfo(), loadProjectConfig(projectDir)]);
|
|
213
|
+
const skillCount = loaded?.config?.skills?.length ?? 0;
|
|
214
|
+
const agentCount = info?.agentCount ?? 0;
|
|
215
|
+
const mode = info?.mode ?? loaded?.config?.installMode ?? "local";
|
|
216
|
+
const source = loaded?.config?.source;
|
|
217
|
+
return { skillCount, agentCount, mode, source };
|
|
218
|
+
}
|
|
219
|
+
function formatDashboardText(data) {
|
|
220
|
+
const modeLabel = data.mode === "plugin" ? "Plugin" : "Local";
|
|
221
|
+
const lines = [
|
|
222
|
+
DEFAULT_BRANDING.NAME,
|
|
223
|
+
"",
|
|
224
|
+
` Skills: ${data.skillCount} installed`,
|
|
225
|
+
` Agents: ${data.agentCount} compiled`,
|
|
226
|
+
` Mode: ${modeLabel}`
|
|
227
|
+
];
|
|
228
|
+
if (data.source) {
|
|
229
|
+
lines.push(` Source: ${data.source}`);
|
|
230
|
+
}
|
|
231
|
+
lines.push("");
|
|
232
|
+
lines.push(` [Edit] [Compile] [Doctor] [List]`);
|
|
233
|
+
return lines.join("\n");
|
|
234
|
+
}
|
|
235
|
+
async function showDashboard(projectDir, log) {
|
|
236
|
+
const data = await getDashboardData(projectDir);
|
|
237
|
+
if (!process.stdin.isTTY) {
|
|
238
|
+
const output = log ?? console.log;
|
|
239
|
+
output(formatDashboardText(data));
|
|
240
|
+
return null;
|
|
241
|
+
}
|
|
242
|
+
let selectedCommand = null;
|
|
243
|
+
const { waitUntilExit } = render(
|
|
244
|
+
/* @__PURE__ */ jsx2(
|
|
245
|
+
Dashboard,
|
|
246
|
+
{
|
|
247
|
+
skillCount: data.skillCount,
|
|
248
|
+
agentCount: data.agentCount,
|
|
249
|
+
source: data.source,
|
|
250
|
+
mode: data.mode,
|
|
251
|
+
onSelect: (command) => {
|
|
252
|
+
selectedCommand = command;
|
|
253
|
+
},
|
|
254
|
+
onCancel: () => {
|
|
255
|
+
selectedCommand = null;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
)
|
|
259
|
+
);
|
|
260
|
+
await waitUntilExit();
|
|
261
|
+
return selectedCommand;
|
|
262
|
+
}
|
|
263
|
+
var Init = class _Init extends BaseCommand {
|
|
264
|
+
static summary = `Initialize ${DEFAULT_BRANDING.NAME} in this project`;
|
|
265
|
+
static description = "Interactive wizard to set up skills and agents. Supports Plugin Mode (native install) and Local Mode (copy to .claude/).";
|
|
266
|
+
static examples = [
|
|
267
|
+
{
|
|
268
|
+
description: "Start the setup wizard",
|
|
269
|
+
command: "<%= config.bin %> <%= command.id %>"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
description: "Install globally to home directory",
|
|
273
|
+
command: "<%= config.bin %> <%= command.id %> --global"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
description: "Initialize from a custom marketplace",
|
|
277
|
+
command: "<%= config.bin %> <%= command.id %> --source github:org/marketplace"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
description: "Preview without creating files",
|
|
281
|
+
command: "<%= config.bin %> <%= command.id %> --dry-run"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
description: "Force refresh skills from remote",
|
|
285
|
+
command: "<%= config.bin %> <%= command.id %> --refresh"
|
|
286
|
+
}
|
|
287
|
+
];
|
|
288
|
+
static flags = {
|
|
289
|
+
...BaseCommand.baseFlags,
|
|
290
|
+
global: Flags.boolean({
|
|
291
|
+
char: "g",
|
|
292
|
+
description: "Install globally to home directory (~/.claude-src/)",
|
|
293
|
+
default: false
|
|
294
|
+
}),
|
|
295
|
+
refresh: Flags.boolean({
|
|
296
|
+
description: "Force refresh from remote source",
|
|
297
|
+
default: false
|
|
298
|
+
})
|
|
299
|
+
};
|
|
300
|
+
async run() {
|
|
301
|
+
const { flags } = await this.parse(_Init);
|
|
302
|
+
const projectDir = flags.global ? os.homedir() : process.cwd();
|
|
303
|
+
const individualPluginsExist = await hasIndividualPlugins(projectDir);
|
|
304
|
+
const existingInstallation = await detectProjectInstallation(projectDir);
|
|
305
|
+
if (individualPluginsExist || existingInstallation) {
|
|
306
|
+
const selectedCommand = await showDashboard(projectDir, (msg) => this.log(msg));
|
|
307
|
+
if (selectedCommand) {
|
|
308
|
+
await this.config.runCommand(selectedCommand);
|
|
309
|
+
}
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
if (flags.global) {
|
|
313
|
+
this.log("Installing globally to home directory...");
|
|
314
|
+
}
|
|
315
|
+
enableBuffering();
|
|
316
|
+
if (flags["dry-run"]) {
|
|
317
|
+
pushBufferMessage("info", DRY_RUN_MESSAGES.PREVIEW_NO_FILES_CREATED);
|
|
318
|
+
}
|
|
319
|
+
let sourceResult;
|
|
320
|
+
let startupMessages = [];
|
|
321
|
+
try {
|
|
322
|
+
sourceResult = await loadSkillsMatrixFromSource({
|
|
323
|
+
sourceFlag: flags.source,
|
|
324
|
+
projectDir,
|
|
325
|
+
forceRefresh: flags.refresh
|
|
326
|
+
});
|
|
327
|
+
} catch (error) {
|
|
328
|
+
disableBuffering();
|
|
329
|
+
this.error(getErrorMessage(error), {
|
|
330
|
+
exit: EXIT_CODES.ERROR
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
startupMessages = drainBuffer();
|
|
334
|
+
disableBuffering();
|
|
335
|
+
let wizardResult = null;
|
|
336
|
+
const marketplaceLabel = getMarketplaceLabel(sourceResult);
|
|
337
|
+
const { waitUntilExit } = render(
|
|
338
|
+
/* @__PURE__ */ jsx2(
|
|
339
|
+
Wizard,
|
|
340
|
+
{
|
|
341
|
+
matrix: sourceResult.matrix,
|
|
342
|
+
version: this.config.version,
|
|
343
|
+
marketplaceLabel,
|
|
344
|
+
logo: ASCII_LOGO,
|
|
345
|
+
projectDir,
|
|
346
|
+
initialInstallMode: sourceResult.marketplace ? "plugin" : "local",
|
|
347
|
+
startupMessages,
|
|
348
|
+
onComplete: (result2) => {
|
|
349
|
+
wizardResult = result2;
|
|
350
|
+
},
|
|
351
|
+
onCancel: () => {
|
|
352
|
+
this.log("Setup cancelled");
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
)
|
|
356
|
+
);
|
|
357
|
+
await waitUntilExit();
|
|
358
|
+
const result = wizardResult;
|
|
359
|
+
if (!result || result.cancelled) {
|
|
360
|
+
this.exit(EXIT_CODES.CANCELLED);
|
|
361
|
+
}
|
|
362
|
+
if (result.selectedSkills.length === 0) {
|
|
363
|
+
this.error("No skills selected", { exit: EXIT_CODES.ERROR });
|
|
364
|
+
}
|
|
365
|
+
await this.handleInstallation(result, sourceResult, flags);
|
|
366
|
+
}
|
|
367
|
+
async handleInstallation(result, sourceResult, flags) {
|
|
368
|
+
const projectDir = flags.global ? os.homedir() : process.cwd();
|
|
369
|
+
const pluginScope = flags.global ? "user" : "project";
|
|
370
|
+
const dryRun = flags["dry-run"];
|
|
371
|
+
this.log("\n");
|
|
372
|
+
this.log(`Selected ${result.selectedSkills.length} skills`);
|
|
373
|
+
this.log(
|
|
374
|
+
`Install mode: ${result.installMode === "plugin" ? "Plugin (native install)" : "Local (copy to .claude/skills/)"}`
|
|
375
|
+
);
|
|
376
|
+
if (dryRun) {
|
|
377
|
+
if (result.installMode === "plugin" && result.selectedStackId) {
|
|
378
|
+
const useMarketplace = !!sourceResult.marketplace;
|
|
379
|
+
if (useMarketplace) {
|
|
380
|
+
this.log(
|
|
381
|
+
`[dry-run] Would install stack "${result.selectedStackId}" from marketplace "${sourceResult.marketplace}"`
|
|
382
|
+
);
|
|
383
|
+
this.log(
|
|
384
|
+
`[dry-run] claude plugin install ${result.selectedStackId}@${sourceResult.marketplace} --scope ${pluginScope}`
|
|
385
|
+
);
|
|
386
|
+
} else {
|
|
387
|
+
this.log(
|
|
388
|
+
`[dry-run] Would compile and install stack "${result.selectedStackId}" as a native plugin`
|
|
389
|
+
);
|
|
390
|
+
this.log(
|
|
391
|
+
`[dry-run] claude plugin install ./compiled-stack/${result.selectedStackId} --scope ${pluginScope}`
|
|
392
|
+
);
|
|
393
|
+
this.log(
|
|
394
|
+
`[dry-run] Stack includes ${result.selectedSkills.length} skills and agents bundled together`
|
|
395
|
+
);
|
|
396
|
+
}
|
|
397
|
+
} else if (result.installMode === "plugin" && sourceResult.marketplace) {
|
|
398
|
+
this.log(
|
|
399
|
+
`[dry-run] Would install ${result.selectedSkills.length} skills as individual plugins from "${sourceResult.marketplace}"`
|
|
400
|
+
);
|
|
401
|
+
for (const skillId of result.selectedSkills) {
|
|
402
|
+
this.log(
|
|
403
|
+
`[dry-run] claude plugin install ${skillId}@${sourceResult.marketplace} --scope ${pluginScope}`
|
|
404
|
+
);
|
|
405
|
+
}
|
|
406
|
+
const localAgentsDir = path2.join(projectDir, CLAUDE_DIR, "agents");
|
|
407
|
+
this.log(`[dry-run] Would compile agents to ${localAgentsDir}`);
|
|
408
|
+
this.log(`[dry-run] Would save config to .claude-src/config.yaml`);
|
|
409
|
+
} else {
|
|
410
|
+
if (result.installMode === "plugin") {
|
|
411
|
+
this.log(
|
|
412
|
+
`[dry-run] Plugin Mode requires a marketplace for individual skills \u2014 would fall back to Local Mode`
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
const localSkillsDir = path2.join(projectDir, LOCAL_SKILLS_PATH);
|
|
416
|
+
const localAgentsDir = path2.join(projectDir, CLAUDE_DIR, "agents");
|
|
417
|
+
this.log(
|
|
418
|
+
`[dry-run] Would copy ${result.selectedSkills.length} skills to ${localSkillsDir}`
|
|
419
|
+
);
|
|
420
|
+
this.log(`[dry-run] Would compile agents to ${localAgentsDir}`);
|
|
421
|
+
this.log(`[dry-run] Would save config to .claude-src/config.yaml`);
|
|
422
|
+
}
|
|
423
|
+
this.log(`
|
|
424
|
+
${DRY_RUN_MESSAGES.COMPLETE_NO_FILES_CREATED}`);
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
427
|
+
if (result.installMode === "plugin") {
|
|
428
|
+
if (sourceResult.marketplace) {
|
|
429
|
+
await this.installIndividualPlugins(result, sourceResult, flags, projectDir, pluginScope);
|
|
430
|
+
} else {
|
|
431
|
+
this.warn("Plugin Mode requires a marketplace for individual skill installation.");
|
|
432
|
+
this.log(`Falling back to Local Mode (copying to .claude/skills/)...`);
|
|
433
|
+
this.log("To use Plugin Mode, either select a stack or configure a marketplace source.\n");
|
|
434
|
+
await this.installLocalMode(result, sourceResult, flags, projectDir);
|
|
435
|
+
}
|
|
436
|
+
return;
|
|
437
|
+
}
|
|
438
|
+
await this.installLocalMode(result, sourceResult, flags, projectDir);
|
|
439
|
+
}
|
|
440
|
+
async installIndividualPlugins(result, sourceResult, flags, projectDir, pluginScope) {
|
|
441
|
+
if (sourceResult.marketplace) {
|
|
442
|
+
const marketplaceExists = await claudePluginMarketplaceExists(sourceResult.marketplace);
|
|
443
|
+
if (!marketplaceExists) {
|
|
444
|
+
this.log(`Registering marketplace "${sourceResult.marketplace}"...`);
|
|
445
|
+
try {
|
|
446
|
+
const marketplaceSource = sourceResult.sourceConfig.source.replace(/^github:/, "");
|
|
447
|
+
await claudePluginMarketplaceAdd(marketplaceSource);
|
|
448
|
+
this.log(`Registered marketplace: ${sourceResult.marketplace}`);
|
|
449
|
+
} catch (error) {
|
|
450
|
+
this.error(getErrorMessage(error), {
|
|
451
|
+
exit: EXIT_CODES.ERROR
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
this.log("Installing skill plugins...");
|
|
457
|
+
for (const skillId of result.selectedSkills) {
|
|
458
|
+
const pluginRef = `${skillId}@${sourceResult.marketplace}`;
|
|
459
|
+
try {
|
|
460
|
+
await claudePluginInstall(pluginRef, pluginScope, projectDir);
|
|
461
|
+
this.log(` Installed ${pluginRef}`);
|
|
462
|
+
} catch (error) {
|
|
463
|
+
this.error(`Failed to install plugin ${pluginRef}: ${getErrorMessage(error)}`, {
|
|
464
|
+
exit: EXIT_CODES.ERROR
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
this.log(`Installed ${result.selectedSkills.length} skill plugins
|
|
469
|
+
`);
|
|
470
|
+
this.log("Generating configuration...");
|
|
471
|
+
try {
|
|
472
|
+
const configResult = await installPluginConfig({
|
|
473
|
+
wizardResult: result,
|
|
474
|
+
sourceResult,
|
|
475
|
+
projectDir,
|
|
476
|
+
sourceFlag: flags.source
|
|
477
|
+
});
|
|
478
|
+
if (configResult.wasMerged) {
|
|
479
|
+
this.log(`Merged with existing config at ${configResult.mergedConfigPath}`);
|
|
480
|
+
}
|
|
481
|
+
this.log(`Configuration saved (${configResult.config.agents.length} agents)
|
|
482
|
+
`);
|
|
483
|
+
this.log(STATUS_MESSAGES.COMPILING_AGENTS);
|
|
484
|
+
this.log(`Compiled ${configResult.compiledAgents.length} agents to .claude/agents/
|
|
485
|
+
`);
|
|
486
|
+
this.log(`${SUCCESS_MESSAGES.INIT_SUCCESS}
|
|
487
|
+
`);
|
|
488
|
+
this.log("Agents compiled to:");
|
|
489
|
+
this.log(` ${configResult.agentsDir}`);
|
|
490
|
+
for (const agentName of configResult.compiledAgents) {
|
|
491
|
+
this.log(` ${agentName}.md`);
|
|
492
|
+
}
|
|
493
|
+
this.log("");
|
|
494
|
+
this.log("Configuration:");
|
|
495
|
+
this.log(` ${configResult.configPath}`);
|
|
496
|
+
this.log("");
|
|
497
|
+
this.log("To customize agent-skill assignments:");
|
|
498
|
+
this.log(` 1. Edit .claude-src/config.yaml`);
|
|
499
|
+
this.log(` 2. Run '${CLI_BIN_NAME} compile' to regenerate agents`);
|
|
500
|
+
this.log("");
|
|
501
|
+
const permissionWarning = await checkPermissions(projectDir);
|
|
502
|
+
if (permissionWarning) {
|
|
503
|
+
const { waitUntilExit } = render(permissionWarning);
|
|
504
|
+
await waitUntilExit();
|
|
505
|
+
}
|
|
506
|
+
} catch (error) {
|
|
507
|
+
this.handleError(error);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
async installLocalMode(result, sourceResult, flags, projectDir) {
|
|
511
|
+
const matrix = sourceResult.matrix;
|
|
512
|
+
this.log("Copying skills to local directory...");
|
|
513
|
+
try {
|
|
514
|
+
const installResult = await installLocal({
|
|
515
|
+
wizardResult: result,
|
|
516
|
+
sourceResult,
|
|
517
|
+
projectDir,
|
|
518
|
+
sourceFlag: flags.source
|
|
519
|
+
});
|
|
520
|
+
this.log(`Copied ${installResult.copiedSkills.length} skills to .claude/skills/
|
|
521
|
+
`);
|
|
522
|
+
this.log("Generating configuration...");
|
|
523
|
+
if (installResult.wasMerged) {
|
|
524
|
+
this.log(`Merged with existing config at ${installResult.mergedConfigPath}`);
|
|
525
|
+
}
|
|
526
|
+
this.log(`Configuration saved (${installResult.config.agents.length} agents)
|
|
527
|
+
`);
|
|
528
|
+
this.log(STATUS_MESSAGES.COMPILING_AGENTS);
|
|
529
|
+
this.log(`Compiled ${installResult.compiledAgents.length} agents to .claude/agents/
|
|
530
|
+
`);
|
|
531
|
+
this.log(`${SUCCESS_MESSAGES.INIT_SUCCESS}
|
|
532
|
+
`);
|
|
533
|
+
this.log("Skills copied to:");
|
|
534
|
+
this.log(` ${installResult.skillsDir}`);
|
|
535
|
+
for (const copiedSkill of installResult.copiedSkills) {
|
|
536
|
+
const skill = matrix.skills[copiedSkill.skillId];
|
|
537
|
+
const displayName = skill?.displayName || copiedSkill.skillId;
|
|
538
|
+
this.log(` ${displayName}/`);
|
|
539
|
+
}
|
|
540
|
+
this.log("");
|
|
541
|
+
this.log("Agents compiled to:");
|
|
542
|
+
this.log(` ${installResult.agentsDir}`);
|
|
543
|
+
for (const agentName of installResult.compiledAgents) {
|
|
544
|
+
this.log(` ${agentName}.md`);
|
|
545
|
+
}
|
|
546
|
+
this.log("");
|
|
547
|
+
this.log("Configuration:");
|
|
548
|
+
this.log(` ${installResult.configPath}`);
|
|
549
|
+
this.log("");
|
|
550
|
+
this.log("To customize agent-skill assignments:");
|
|
551
|
+
this.log(` 1. Edit .claude-src/config.yaml`);
|
|
552
|
+
this.log(` 2. Run '${CLI_BIN_NAME} compile' to regenerate agents`);
|
|
553
|
+
this.log("");
|
|
554
|
+
const permissionWarning = await checkPermissions(projectDir);
|
|
555
|
+
if (permissionWarning) {
|
|
556
|
+
const { waitUntilExit } = render(permissionWarning);
|
|
557
|
+
await waitUntilExit();
|
|
558
|
+
}
|
|
559
|
+
} catch (error) {
|
|
560
|
+
this.handleError(error);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
export {
|
|
566
|
+
getDashboardData,
|
|
567
|
+
formatDashboardText,
|
|
568
|
+
showDashboard,
|
|
569
|
+
Init
|
|
570
|
+
};
|
|
571
|
+
//# sourceMappingURL=chunk-4QWDB2MD.js.map
|