agents-inc 0.149.2 → 0.151.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 +2287 -0
- package/LICENSE +21 -0
- package/README.md +136 -19
- package/assets/demo.gif +0 -0
- package/assets/demo.tape +266 -0
- package/assets/logo.svg +75 -0
- package/dist/chunk-2RSNKBXC.js +84 -0
- package/dist/chunk-2RSNKBXC.js.map +1 -0
- package/dist/chunk-3LIU2ZEF.js +1355 -0
- package/dist/chunk-3LIU2ZEF.js.map +1 -0
- package/dist/chunk-3XFUQ6OL.js +68 -0
- package/dist/chunk-3XFUQ6OL.js.map +1 -0
- package/dist/chunk-3YGUHWLR.js +258 -0
- package/dist/chunk-3YGUHWLR.js.map +1 -0
- package/dist/chunk-44LLPS2N.js +1135 -0
- package/dist/chunk-44LLPS2N.js.map +1 -0
- package/dist/chunk-4R6PGHQQ.js +300 -0
- package/dist/chunk-4R6PGHQQ.js.map +1 -0
- package/dist/chunk-5V2O6C3T.js +112 -0
- package/dist/chunk-5V2O6C3T.js.map +1 -0
- package/dist/chunk-6RBQBOBS.js +287 -0
- package/dist/chunk-6RBQBOBS.js.map +1 -0
- package/dist/chunk-7QIHKQL5.js +181 -0
- package/dist/chunk-7QIHKQL5.js.map +1 -0
- package/dist/chunk-BNE4HHIH.js +28 -0
- package/dist/chunk-BNE4HHIH.js.map +1 -0
- package/dist/chunk-C55DN7GE.js +35 -0
- package/dist/chunk-C55DN7GE.js.map +1 -0
- package/dist/chunk-DAG2ULNF.js +125 -0
- package/dist/chunk-DAG2ULNF.js.map +1 -0
- package/dist/chunk-DG2NGZ7S.js +10929 -0
- package/dist/chunk-DG2NGZ7S.js.map +1 -0
- package/dist/chunk-DIBCRIMR.js +36 -0
- package/dist/chunk-DIBCRIMR.js.map +1 -0
- package/dist/chunk-DUVWGO6E.js +54 -0
- package/dist/chunk-DUVWGO6E.js.map +1 -0
- package/dist/chunk-EKWAUOQB.js +96 -0
- package/dist/chunk-EKWAUOQB.js.map +1 -0
- package/dist/chunk-ES3NJZON.js +31 -0
- package/dist/chunk-ES3NJZON.js.map +1 -0
- package/dist/chunk-EVXG3X6G.js +179 -0
- package/dist/chunk-EVXG3X6G.js.map +1 -0
- package/dist/chunk-EZ7STXUV.js +349 -0
- package/dist/chunk-EZ7STXUV.js.map +1 -0
- package/dist/chunk-FYPUUYSG.js +31 -0
- package/dist/chunk-FYPUUYSG.js.map +1 -0
- package/dist/chunk-GYG5SE2D.js +81 -0
- package/dist/chunk-GYG5SE2D.js.map +1 -0
- package/dist/chunk-I3XKEGHM.js +16383 -0
- package/dist/chunk-I3XKEGHM.js.map +1 -0
- package/dist/chunk-IHO75PMZ.js +40 -0
- package/dist/chunk-IHO75PMZ.js.map +1 -0
- package/dist/chunk-IOJR5TOY.js +47 -0
- package/dist/chunk-IOJR5TOY.js.map +1 -0
- package/dist/chunk-K3OU6TGX.js +77 -0
- package/dist/chunk-K3OU6TGX.js.map +1 -0
- package/dist/chunk-KIR7VYQD.js +63 -0
- package/dist/chunk-KIR7VYQD.js.map +1 -0
- package/dist/chunk-KOPEM3Q7.js +27 -0
- package/dist/chunk-KOPEM3Q7.js.map +1 -0
- package/dist/chunk-KSZ6PCY4.js +43 -0
- package/dist/chunk-KSZ6PCY4.js.map +1 -0
- package/dist/chunk-LAXAQ3PZ.js +235 -0
- package/dist/chunk-LAXAQ3PZ.js.map +1 -0
- package/dist/chunk-LYYXX2W5.js +87 -0
- package/dist/chunk-LYYXX2W5.js.map +1 -0
- package/dist/chunk-NGLQ5W7U.js +339 -0
- package/dist/chunk-NGLQ5W7U.js.map +1 -0
- package/dist/chunk-NHCGC6DG.js +111 -0
- package/dist/chunk-NHCGC6DG.js.map +1 -0
- package/dist/chunk-NIKUMXE7.js +24 -0
- package/dist/chunk-NIKUMXE7.js.map +1 -0
- package/dist/chunk-NM3EDGB5.js +300 -0
- package/dist/chunk-NM3EDGB5.js.map +1 -0
- package/dist/chunk-O5ASLZ2K.js +270 -0
- package/dist/chunk-O5ASLZ2K.js.map +1 -0
- package/dist/chunk-OJIESW5B.js +174 -0
- package/dist/chunk-OJIESW5B.js.map +1 -0
- package/dist/chunk-OZZGXBCN.js +15 -0
- package/dist/chunk-OZZGXBCN.js.map +1 -0
- package/dist/chunk-P3PN5SVI.js +27 -0
- package/dist/chunk-P3PN5SVI.js.map +1 -0
- package/dist/chunk-P56WJ5FA.js +50 -0
- package/dist/chunk-P56WJ5FA.js.map +1 -0
- package/dist/chunk-PG4G4IIK.js +24 -0
- package/dist/chunk-PG4G4IIK.js.map +1 -0
- package/dist/chunk-PV2HNW4I.js +382 -0
- package/dist/chunk-PV2HNW4I.js.map +1 -0
- package/dist/chunk-QQLRX4KI.js +41 -0
- package/dist/chunk-QQLRX4KI.js.map +1 -0
- package/dist/chunk-QTFQEYDA.js +789 -0
- package/dist/chunk-QTFQEYDA.js.map +1 -0
- package/dist/chunk-RBHYLCUB.js +31 -0
- package/dist/chunk-RBHYLCUB.js.map +1 -0
- package/dist/chunk-SHHOMVWC.js +62 -0
- package/dist/chunk-SHHOMVWC.js.map +1 -0
- package/dist/chunk-SI5FOARI.js +42 -0
- package/dist/chunk-SI5FOARI.js.map +1 -0
- package/dist/chunk-SYUOXSPU.js +510 -0
- package/dist/chunk-SYUOXSPU.js.map +1 -0
- package/dist/chunk-THKIOI32.js +939 -0
- package/dist/chunk-THKIOI32.js.map +1 -0
- package/dist/chunk-TVHRMRD3.js +6014 -0
- package/dist/chunk-TVHRMRD3.js.map +1 -0
- package/dist/chunk-TYJLR32W.js +128 -0
- package/dist/chunk-TYJLR32W.js.map +1 -0
- package/dist/chunk-UFURYGD3.js +20 -0
- package/dist/chunk-UFURYGD3.js.map +1 -0
- package/dist/chunk-UTFN6UJS.js +253 -0
- package/dist/chunk-UTFN6UJS.js.map +1 -0
- package/dist/chunk-V7QOSGQA.js +298 -0
- package/dist/chunk-V7QOSGQA.js.map +1 -0
- package/dist/chunk-VEP23B5W.js +27 -0
- package/dist/chunk-VEP23B5W.js.map +1 -0
- package/dist/chunk-VG2TVBFN.js +52 -0
- package/dist/chunk-VG2TVBFN.js.map +1 -0
- package/dist/chunk-WFWCZEMS.js +92 -0
- package/dist/chunk-WFWCZEMS.js.map +1 -0
- package/dist/chunk-WK4J2CHH.js +430 -0
- package/dist/chunk-WK4J2CHH.js.map +1 -0
- package/dist/chunk-XA57SX4T.js +115 -0
- package/dist/chunk-XA57SX4T.js.map +1 -0
- package/dist/chunk-Y4CXDA3I.js +181 -0
- package/dist/chunk-Y4CXDA3I.js.map +1 -0
- package/dist/chunk-YA4QQKKE.js +51 -0
- package/dist/chunk-YA4QQKKE.js.map +1 -0
- package/dist/chunk-YBVA7GPW.js +27 -0
- package/dist/chunk-YBVA7GPW.js.map +1 -0
- package/dist/chunk-YU2VGX5R.js +4205 -0
- package/dist/chunk-YU2VGX5R.js.map +1 -0
- package/dist/commands/build/marketplace.js +250 -0
- package/dist/commands/build/marketplace.js.map +1 -0
- package/dist/commands/build/plugins.js +176 -0
- package/dist/commands/build/plugins.js.map +1 -0
- package/dist/commands/compile.js +331 -0
- package/dist/commands/compile.js.map +1 -0
- package/dist/commands/doctor.js +475 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/edit.js +765 -0
- package/dist/commands/edit.js.map +1 -0
- package/dist/commands/eject.js +393 -0
- package/dist/commands/eject.js.map +1 -0
- package/dist/commands/import/skill.js +349 -0
- package/dist/commands/import/skill.js.map +1 -0
- package/dist/commands/init.js +66 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list.js +115 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/new/agent.js +304 -0
- package/dist/commands/new/agent.js.map +1 -0
- package/dist/commands/new/marketplace.js +315 -0
- package/dist/commands/new/marketplace.js.map +1 -0
- package/dist/commands/new/skill.js +28 -0
- package/dist/commands/new/skill.js.map +1 -0
- package/dist/commands/search.js +176 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/commands/uninstall.js +570 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.js +368 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/validate.js +581 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/components/common/confirm.js +9 -0
- package/dist/components/common/confirm.js.map +1 -0
- package/dist/components/common/confirm.test.js +203 -0
- package/dist/components/common/confirm.test.js.map +1 -0
- package/dist/components/common/prompt-confirm.js +11 -0
- package/dist/components/common/prompt-confirm.js.map +1 -0
- package/dist/components/common/select-list.js +11 -0
- package/dist/components/common/select-list.js.map +1 -0
- package/dist/components/common/spinner.js +9 -0
- package/dist/components/common/spinner.js.map +1 -0
- package/dist/components/wizard/category-grid.js +16 -0
- package/dist/components/wizard/category-grid.js.map +1 -0
- package/dist/components/wizard/category-grid.test.js +1253 -0
- package/dist/components/wizard/category-grid.test.js.map +1 -0
- package/dist/components/wizard/checkbox-grid.js +14 -0
- package/dist/components/wizard/checkbox-grid.js.map +1 -0
- package/dist/components/wizard/checkbox-grid.test.js +264 -0
- package/dist/components/wizard/checkbox-grid.test.js.map +1 -0
- package/dist/components/wizard/domain-selection.js +22 -0
- package/dist/components/wizard/domain-selection.js.map +1 -0
- package/dist/components/wizard/run-wizard-session.js +47 -0
- package/dist/components/wizard/run-wizard-session.js.map +1 -0
- package/dist/components/wizard/scroll-affordance.js +10 -0
- package/dist/components/wizard/scroll-affordance.js.map +1 -0
- package/dist/components/wizard/search-modal.js +14 -0
- package/dist/components/wizard/search-modal.js.map +1 -0
- package/dist/components/wizard/search-modal.test.js +212 -0
- package/dist/components/wizard/search-modal.test.js.map +1 -0
- package/dist/components/wizard/selection-card.js +10 -0
- package/dist/components/wizard/selection-card.js.map +1 -0
- package/dist/components/wizard/skill-agent-summary.js +16 -0
- package/dist/components/wizard/skill-agent-summary.js.map +1 -0
- package/dist/components/wizard/source-grid.js +23 -0
- package/dist/components/wizard/source-grid.js.map +1 -0
- package/dist/components/wizard/source-grid.test.js +1094 -0
- package/dist/components/wizard/source-grid.test.js.map +1 -0
- package/dist/components/wizard/stack-selection.js +20 -0
- package/dist/components/wizard/stack-selection.js.map +1 -0
- package/dist/components/wizard/step-agents.js +22 -0
- package/dist/components/wizard/step-agents.js.map +1 -0
- package/dist/components/wizard/step-agents.test.js +204 -0
- package/dist/components/wizard/step-agents.test.js.map +1 -0
- package/dist/components/wizard/step-build.js +22 -0
- package/dist/components/wizard/step-build.js.map +1 -0
- package/dist/components/wizard/step-build.test.js +552 -0
- package/dist/components/wizard/step-build.test.js.map +1 -0
- package/dist/components/wizard/step-confirm.js +21 -0
- package/dist/components/wizard/step-confirm.js.map +1 -0
- package/dist/components/wizard/step-confirm.test.js +744 -0
- package/dist/components/wizard/step-confirm.test.js.map +1 -0
- package/dist/components/wizard/step-settings.js +19 -0
- package/dist/components/wizard/step-settings.js.map +1 -0
- package/dist/components/wizard/step-settings.test.js +244 -0
- package/dist/components/wizard/step-settings.test.js.map +1 -0
- package/dist/components/wizard/step-sources.js +28 -0
- package/dist/components/wizard/step-sources.js.map +1 -0
- package/dist/components/wizard/step-sources.test.js +155 -0
- package/dist/components/wizard/step-sources.test.js.map +1 -0
- package/dist/components/wizard/step-stack.js +21 -0
- package/dist/components/wizard/step-stack.js.map +1 -0
- package/dist/components/wizard/step-stack.test.js +262 -0
- package/dist/components/wizard/step-stack.test.js.map +1 -0
- package/dist/components/wizard/summary-panel.js +20 -0
- package/dist/components/wizard/summary-panel.js.map +1 -0
- package/dist/components/wizard/summary-panel.test.js +317 -0
- package/dist/components/wizard/summary-panel.test.js.map +1 -0
- package/dist/components/wizard/toast.js +10 -0
- package/dist/components/wizard/toast.js.map +1 -0
- package/dist/components/wizard/wizard-layout.js +26 -0
- package/dist/components/wizard/wizard-layout.js.map +1 -0
- package/dist/components/wizard/wizard-layout.test.js +200 -0
- package/dist/components/wizard/wizard-layout.test.js.map +1 -0
- package/dist/components/wizard/wizard-tabs.js +20 -0
- package/dist/components/wizard/wizard-tabs.js.map +1 -0
- package/dist/components/wizard/wizard-tabs.test.js +290 -0
- package/dist/components/wizard/wizard-tabs.test.js.map +1 -0
- package/dist/components/wizard/wizard.js +48 -0
- package/dist/components/wizard/wizard.js.map +1 -0
- package/dist/config-exports.js +20 -0
- package/dist/config-exports.js.map +1 -0
- package/dist/copy-local-skills-UPA2GUZV.js +15 -0
- package/dist/copy-local-skills-UPA2GUZV.js.map +1 -0
- package/dist/dist-VNJNNJK7.js +550 -0
- package/dist/dist-VNJNNJK7.js.map +1 -0
- package/dist/hooks/init.js +90 -0
- package/dist/hooks/init.js.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/load-agent-defs-SB4XAOVB.js +16 -0
- package/dist/load-agent-defs-SB4XAOVB.js.map +1 -0
- package/dist/loader-E2ERJYVA.js +23 -0
- package/dist/loader-E2ERJYVA.js.map +1 -0
- package/dist/magic-string.es-5TV73NJD.js +1316 -0
- package/dist/magic-string.es-5TV73NJD.js.map +1 -0
- package/dist/recompile-project-agents-U4ZY2GDX.js +20 -0
- package/dist/recompile-project-agents-U4ZY2GDX.js.map +1 -0
- package/dist/source-loader-5UNRU7EZ.js +20 -0
- package/dist/source-loader-5UNRU7EZ.js.map +1 -0
- package/dist/source-manager-3O54SIIB.js +18 -0
- package/dist/source-manager-3O54SIIB.js.map +1 -0
- package/dist/src/agents/_templates/agent.liquid +161 -0
- package/dist/src/agents/_templates/methodologies/anti-over-engineering.liquid +121 -0
- package/dist/src/agents/_templates/methodologies/context-management.liquid +162 -0
- package/dist/src/agents/_templates/methodologies/improvement-protocol.liquid +150 -0
- package/dist/src/agents/_templates/methodologies/investigation-requirements.liquid +49 -0
- package/dist/src/agents/_templates/methodologies/success-criteria.liquid +111 -0
- package/dist/src/agents/_templates/methodologies/write-verification.liquid +43 -0
- package/dist/src/agents/developer/ai-developer/critical-reminders.md +54 -0
- package/dist/src/agents/developer/ai-developer/critical-requirements.md +59 -0
- package/dist/src/agents/developer/ai-developer/identity.md +51 -0
- package/dist/src/agents/developer/ai-developer/metadata.yaml +12 -0
- package/dist/src/agents/developer/ai-developer/output.md +366 -0
- package/dist/src/agents/developer/ai-developer/playbook.md +335 -0
- package/dist/src/agents/developer/api-developer/critical-reminders.md +46 -0
- package/dist/src/agents/developer/api-developer/critical-requirements.md +44 -0
- package/dist/src/agents/developer/api-developer/identity.md +49 -0
- package/dist/src/agents/developer/api-developer/metadata.yaml +12 -0
- package/dist/src/agents/developer/api-developer/output.md +432 -0
- package/dist/src/agents/developer/api-developer/playbook.md +352 -0
- package/dist/src/agents/developer/cli-developer/critical-reminders.md +51 -0
- package/dist/src/agents/developer/cli-developer/critical-requirements.md +51 -0
- package/dist/src/agents/developer/cli-developer/identity.md +51 -0
- package/dist/src/agents/developer/cli-developer/metadata.yaml +12 -0
- package/dist/src/agents/developer/cli-developer/output.md +285 -0
- package/dist/src/agents/developer/cli-developer/playbook.md +386 -0
- package/dist/src/agents/developer/web-architecture/critical-reminders.md +48 -0
- package/dist/src/agents/developer/web-architecture/critical-requirements.md +65 -0
- package/dist/src/agents/developer/web-architecture/identity.md +64 -0
- package/dist/src/agents/developer/web-architecture/metadata.yaml +12 -0
- package/dist/src/agents/developer/web-architecture/output.md +449 -0
- package/dist/src/agents/developer/web-architecture/playbook.md +481 -0
- package/dist/src/agents/developer/web-developer/critical-reminders.md +40 -0
- package/dist/src/agents/developer/web-developer/critical-requirements.md +39 -0
- package/dist/src/agents/developer/web-developer/identity.md +32 -0
- package/dist/src/agents/developer/web-developer/metadata.yaml +12 -0
- package/dist/src/agents/developer/web-developer/output.md +323 -0
- package/dist/src/agents/developer/web-developer/playbook.md +349 -0
- package/dist/src/agents/meta/agent-summoner/critical-reminders.md +45 -0
- package/dist/src/agents/meta/agent-summoner/critical-requirements.md +52 -0
- package/dist/src/agents/meta/agent-summoner/identity.md +34 -0
- package/dist/src/agents/meta/agent-summoner/metadata.yaml +12 -0
- package/dist/src/agents/meta/agent-summoner/output.md +296 -0
- package/dist/src/agents/meta/agent-summoner/playbook.md +1469 -0
- package/dist/src/agents/meta/codex-keeper/critical-reminders.md +39 -0
- package/dist/src/agents/meta/codex-keeper/critical-requirements.md +29 -0
- package/dist/src/agents/meta/codex-keeper/identity.md +45 -0
- package/dist/src/agents/meta/codex-keeper/metadata.yaml +12 -0
- package/dist/src/agents/meta/codex-keeper/output.md +384 -0
- package/dist/src/agents/meta/codex-keeper/playbook.md +1183 -0
- package/dist/src/agents/meta/convention-keeper/critical-reminders.md +32 -0
- package/dist/src/agents/meta/convention-keeper/critical-requirements.md +32 -0
- package/dist/src/agents/meta/convention-keeper/identity.md +33 -0
- package/dist/src/agents/meta/convention-keeper/metadata.yaml +12 -0
- package/dist/src/agents/meta/convention-keeper/output.md +206 -0
- package/dist/src/agents/meta/convention-keeper/playbook.md +180 -0
- package/dist/src/agents/meta/skill-summoner/critical-reminders.md +112 -0
- package/dist/src/agents/meta/skill-summoner/critical-requirements.md +62 -0
- package/dist/src/agents/meta/skill-summoner/identity.md +31 -0
- package/dist/src/agents/meta/skill-summoner/metadata.yaml +13 -0
- package/dist/src/agents/meta/skill-summoner/output.md +390 -0
- package/dist/src/agents/meta/skill-summoner/playbook.md +1457 -0
- package/dist/src/agents/pattern/pattern-scout/critical-reminders.md +71 -0
- package/dist/src/agents/pattern/pattern-scout/critical-requirements.md +31 -0
- package/dist/src/agents/pattern/pattern-scout/identity.md +25 -0
- package/dist/src/agents/pattern/pattern-scout/metadata.yaml +10 -0
- package/dist/src/agents/pattern/pattern-scout/output.md +290 -0
- package/dist/src/agents/pattern/pattern-scout/playbook.md +1806 -0
- package/dist/src/agents/pattern/web-pattern-critique/critical-reminders.md +30 -0
- package/dist/src/agents/pattern/web-pattern-critique/critical-requirements.md +28 -0
- package/dist/src/agents/pattern/web-pattern-critique/identity.md +41 -0
- package/dist/src/agents/pattern/web-pattern-critique/metadata.yaml +12 -0
- package/dist/src/agents/pattern/web-pattern-critique/output.md +314 -0
- package/dist/src/agents/pattern/web-pattern-critique/playbook.md +572 -0
- package/dist/src/agents/planning/api-pm/critical-reminders.md +48 -0
- package/dist/src/agents/planning/api-pm/critical-requirements.md +41 -0
- package/dist/src/agents/planning/api-pm/identity.md +39 -0
- package/dist/src/agents/planning/api-pm/metadata.yaml +12 -0
- package/dist/src/agents/planning/api-pm/output.md +475 -0
- package/dist/src/agents/planning/api-pm/playbook.md +129 -0
- package/dist/src/agents/planning/web-pm/critical-reminders.md +36 -0
- package/dist/src/agents/planning/web-pm/critical-requirements.md +32 -0
- package/dist/src/agents/planning/web-pm/identity.md +26 -0
- package/dist/src/agents/planning/web-pm/metadata.yaml +12 -0
- package/dist/src/agents/planning/web-pm/output.md +314 -0
- package/dist/src/agents/planning/web-pm/playbook.md +318 -0
- package/dist/src/agents/researcher/api-researcher/critical-reminders.md +27 -0
- package/dist/src/agents/researcher/api-researcher/critical-requirements.md +28 -0
- package/dist/src/agents/researcher/api-researcher/identity.md +71 -0
- package/dist/src/agents/researcher/api-researcher/metadata.yaml +10 -0
- package/dist/src/agents/researcher/api-researcher/output.md +254 -0
- package/dist/src/agents/researcher/api-researcher/playbook.md +201 -0
- package/dist/src/agents/researcher/web-researcher/critical-reminders.md +39 -0
- package/dist/src/agents/researcher/web-researcher/critical-requirements.md +26 -0
- package/dist/src/agents/researcher/web-researcher/identity.md +69 -0
- package/dist/src/agents/researcher/web-researcher/metadata.yaml +10 -0
- package/dist/src/agents/researcher/web-researcher/output.md +241 -0
- package/dist/src/agents/researcher/web-researcher/playbook.md +217 -0
- package/dist/src/agents/reviewer/ai-reviewer/critical-reminders.md +40 -0
- package/dist/src/agents/reviewer/ai-reviewer/critical-requirements.md +37 -0
- package/dist/src/agents/reviewer/ai-reviewer/identity.md +51 -0
- package/dist/src/agents/reviewer/ai-reviewer/metadata.yaml +10 -0
- package/dist/src/agents/reviewer/ai-reviewer/output.md +395 -0
- package/dist/src/agents/reviewer/ai-reviewer/playbook.md +90 -0
- package/dist/src/agents/reviewer/api-reviewer/critical-reminders.md +31 -0
- package/dist/src/agents/reviewer/api-reviewer/critical-requirements.md +27 -0
- package/dist/src/agents/reviewer/api-reviewer/identity.md +51 -0
- package/dist/src/agents/reviewer/api-reviewer/metadata.yaml +12 -0
- package/dist/src/agents/reviewer/api-reviewer/output.md +343 -0
- package/dist/src/agents/reviewer/api-reviewer/playbook.md +288 -0
- package/dist/src/agents/reviewer/cli-reviewer/critical-reminders.md +33 -0
- package/dist/src/agents/reviewer/cli-reviewer/critical-requirements.md +30 -0
- package/dist/src/agents/reviewer/cli-reviewer/identity.md +44 -0
- package/dist/src/agents/reviewer/cli-reviewer/metadata.yaml +12 -0
- package/dist/src/agents/reviewer/cli-reviewer/output.md +414 -0
- package/dist/src/agents/reviewer/cli-reviewer/playbook.md +218 -0
- package/dist/src/agents/reviewer/infra-reviewer/critical-reminders.md +38 -0
- package/dist/src/agents/reviewer/infra-reviewer/critical-requirements.md +38 -0
- package/dist/src/agents/reviewer/infra-reviewer/identity.md +53 -0
- package/dist/src/agents/reviewer/infra-reviewer/metadata.yaml +10 -0
- package/dist/src/agents/reviewer/infra-reviewer/output.md +364 -0
- package/dist/src/agents/reviewer/infra-reviewer/playbook.md +161 -0
- package/dist/src/agents/reviewer/web-reviewer/critical-reminders.md +31 -0
- package/dist/src/agents/reviewer/web-reviewer/critical-requirements.md +26 -0
- package/dist/src/agents/reviewer/web-reviewer/identity.md +40 -0
- package/dist/src/agents/reviewer/web-reviewer/metadata.yaml +12 -0
- package/dist/src/agents/reviewer/web-reviewer/output.md +333 -0
- package/dist/src/agents/reviewer/web-reviewer/playbook.md +156 -0
- package/dist/src/agents/tester/api-tester/critical-reminders.md +41 -0
- package/dist/src/agents/tester/api-tester/critical-requirements.md +41 -0
- package/dist/src/agents/tester/api-tester/identity.md +47 -0
- package/dist/src/agents/tester/api-tester/metadata.yaml +12 -0
- package/dist/src/agents/tester/api-tester/output.md +284 -0
- package/dist/src/agents/tester/api-tester/playbook.md +275 -0
- package/dist/src/agents/tester/cli-tester/critical-reminders.md +36 -0
- package/dist/src/agents/tester/cli-tester/critical-requirements.md +36 -0
- package/dist/src/agents/tester/cli-tester/identity.md +43 -0
- package/dist/src/agents/tester/cli-tester/metadata.yaml +12 -0
- package/dist/src/agents/tester/cli-tester/output.md +313 -0
- package/dist/src/agents/tester/cli-tester/playbook.md +221 -0
- package/dist/src/agents/tester/web-tester/critical-reminders.md +31 -0
- package/dist/src/agents/tester/web-tester/critical-requirements.md +28 -0
- package/dist/src/agents/tester/web-tester/identity.md +41 -0
- package/dist/src/agents/tester/web-tester/metadata.yaml +12 -0
- package/dist/src/agents/tester/web-tester/output.md +321 -0
- package/dist/src/agents/tester/web-tester/playbook.md +428 -0
- package/dist/stores/d227-same-scope-tombstone-duplicate.test.js +118 -0
- package/dist/stores/d227-same-scope-tombstone-duplicate.test.js.map +1 -0
- package/dist/stores/wizard-store.js +21 -0
- package/dist/stores/wizard-store.js.map +1 -0
- package/dist/stores/wizard-store.test.js +3053 -0
- package/dist/stores/wizard-store.test.js.map +1 -0
- package/package.json +130 -12
- package/src/agents/_templates/agent.liquid +161 -0
- package/src/agents/_templates/methodologies/anti-over-engineering.liquid +121 -0
- package/src/agents/_templates/methodologies/context-management.liquid +162 -0
- package/src/agents/_templates/methodologies/improvement-protocol.liquid +150 -0
- package/src/agents/_templates/methodologies/investigation-requirements.liquid +49 -0
- package/src/agents/_templates/methodologies/success-criteria.liquid +111 -0
- package/src/agents/_templates/methodologies/write-verification.liquid +43 -0
- package/src/agents/developer/ai-developer/critical-reminders.md +54 -0
- package/src/agents/developer/ai-developer/critical-requirements.md +59 -0
- package/src/agents/developer/ai-developer/identity.md +51 -0
- package/src/agents/developer/ai-developer/metadata.yaml +12 -0
- package/src/agents/developer/ai-developer/output.md +366 -0
- package/src/agents/developer/ai-developer/playbook.md +335 -0
- package/src/agents/developer/api-developer/critical-reminders.md +46 -0
- package/src/agents/developer/api-developer/critical-requirements.md +44 -0
- package/src/agents/developer/api-developer/identity.md +49 -0
- package/src/agents/developer/api-developer/metadata.yaml +12 -0
- package/src/agents/developer/api-developer/output.md +432 -0
- package/src/agents/developer/api-developer/playbook.md +352 -0
- package/src/agents/developer/cli-developer/critical-reminders.md +51 -0
- package/src/agents/developer/cli-developer/critical-requirements.md +51 -0
- package/src/agents/developer/cli-developer/identity.md +51 -0
- package/src/agents/developer/cli-developer/metadata.yaml +12 -0
- package/src/agents/developer/cli-developer/output.md +285 -0
- package/src/agents/developer/cli-developer/playbook.md +386 -0
- package/src/agents/developer/web-architecture/critical-reminders.md +48 -0
- package/src/agents/developer/web-architecture/critical-requirements.md +65 -0
- package/src/agents/developer/web-architecture/identity.md +64 -0
- package/src/agents/developer/web-architecture/metadata.yaml +12 -0
- package/src/agents/developer/web-architecture/output.md +449 -0
- package/src/agents/developer/web-architecture/playbook.md +481 -0
- package/src/agents/developer/web-developer/critical-reminders.md +40 -0
- package/src/agents/developer/web-developer/critical-requirements.md +39 -0
- package/src/agents/developer/web-developer/identity.md +32 -0
- package/src/agents/developer/web-developer/metadata.yaml +12 -0
- package/src/agents/developer/web-developer/output.md +323 -0
- package/src/agents/developer/web-developer/playbook.md +349 -0
- package/src/agents/meta/agent-summoner/critical-reminders.md +45 -0
- package/src/agents/meta/agent-summoner/critical-requirements.md +52 -0
- package/src/agents/meta/agent-summoner/identity.md +34 -0
- package/src/agents/meta/agent-summoner/metadata.yaml +12 -0
- package/src/agents/meta/agent-summoner/output.md +296 -0
- package/src/agents/meta/agent-summoner/playbook.md +1469 -0
- package/src/agents/meta/codex-keeper/critical-reminders.md +39 -0
- package/src/agents/meta/codex-keeper/critical-requirements.md +29 -0
- package/src/agents/meta/codex-keeper/identity.md +45 -0
- package/src/agents/meta/codex-keeper/metadata.yaml +12 -0
- package/src/agents/meta/codex-keeper/output.md +384 -0
- package/src/agents/meta/codex-keeper/playbook.md +1183 -0
- package/src/agents/meta/convention-keeper/critical-reminders.md +32 -0
- package/src/agents/meta/convention-keeper/critical-requirements.md +32 -0
- package/src/agents/meta/convention-keeper/identity.md +33 -0
- package/src/agents/meta/convention-keeper/metadata.yaml +12 -0
- package/src/agents/meta/convention-keeper/output.md +206 -0
- package/src/agents/meta/convention-keeper/playbook.md +180 -0
- package/src/agents/meta/skill-summoner/critical-reminders.md +112 -0
- package/src/agents/meta/skill-summoner/critical-requirements.md +62 -0
- package/src/agents/meta/skill-summoner/identity.md +31 -0
- package/src/agents/meta/skill-summoner/metadata.yaml +13 -0
- package/src/agents/meta/skill-summoner/output.md +390 -0
- package/src/agents/meta/skill-summoner/playbook.md +1457 -0
- package/src/agents/pattern/pattern-scout/critical-reminders.md +71 -0
- package/src/agents/pattern/pattern-scout/critical-requirements.md +31 -0
- package/src/agents/pattern/pattern-scout/identity.md +25 -0
- package/src/agents/pattern/pattern-scout/metadata.yaml +10 -0
- package/src/agents/pattern/pattern-scout/output.md +290 -0
- package/src/agents/pattern/pattern-scout/playbook.md +1806 -0
- package/src/agents/pattern/web-pattern-critique/critical-reminders.md +30 -0
- package/src/agents/pattern/web-pattern-critique/critical-requirements.md +28 -0
- package/src/agents/pattern/web-pattern-critique/identity.md +41 -0
- package/src/agents/pattern/web-pattern-critique/metadata.yaml +12 -0
- package/src/agents/pattern/web-pattern-critique/output.md +314 -0
- package/src/agents/pattern/web-pattern-critique/playbook.md +572 -0
- package/src/agents/planning/api-pm/critical-reminders.md +48 -0
- package/src/agents/planning/api-pm/critical-requirements.md +41 -0
- package/src/agents/planning/api-pm/identity.md +39 -0
- package/src/agents/planning/api-pm/metadata.yaml +12 -0
- package/src/agents/planning/api-pm/output.md +475 -0
- package/src/agents/planning/api-pm/playbook.md +129 -0
- package/src/agents/planning/web-pm/critical-reminders.md +36 -0
- package/src/agents/planning/web-pm/critical-requirements.md +32 -0
- package/src/agents/planning/web-pm/identity.md +26 -0
- package/src/agents/planning/web-pm/metadata.yaml +12 -0
- package/src/agents/planning/web-pm/output.md +314 -0
- package/src/agents/planning/web-pm/playbook.md +318 -0
- package/src/agents/researcher/api-researcher/critical-reminders.md +27 -0
- package/src/agents/researcher/api-researcher/critical-requirements.md +28 -0
- package/src/agents/researcher/api-researcher/identity.md +71 -0
- package/src/agents/researcher/api-researcher/metadata.yaml +10 -0
- package/src/agents/researcher/api-researcher/output.md +254 -0
- package/src/agents/researcher/api-researcher/playbook.md +201 -0
- package/src/agents/researcher/web-researcher/critical-reminders.md +39 -0
- package/src/agents/researcher/web-researcher/critical-requirements.md +26 -0
- package/src/agents/researcher/web-researcher/identity.md +69 -0
- package/src/agents/researcher/web-researcher/metadata.yaml +10 -0
- package/src/agents/researcher/web-researcher/output.md +241 -0
- package/src/agents/researcher/web-researcher/playbook.md +217 -0
- package/src/agents/reviewer/ai-reviewer/critical-reminders.md +40 -0
- package/src/agents/reviewer/ai-reviewer/critical-requirements.md +37 -0
- package/src/agents/reviewer/ai-reviewer/identity.md +51 -0
- package/src/agents/reviewer/ai-reviewer/metadata.yaml +10 -0
- package/src/agents/reviewer/ai-reviewer/output.md +395 -0
- package/src/agents/reviewer/ai-reviewer/playbook.md +90 -0
- package/src/agents/reviewer/api-reviewer/critical-reminders.md +31 -0
- package/src/agents/reviewer/api-reviewer/critical-requirements.md +27 -0
- package/src/agents/reviewer/api-reviewer/identity.md +51 -0
- package/src/agents/reviewer/api-reviewer/metadata.yaml +12 -0
- package/src/agents/reviewer/api-reviewer/output.md +343 -0
- package/src/agents/reviewer/api-reviewer/playbook.md +288 -0
- package/src/agents/reviewer/cli-reviewer/critical-reminders.md +33 -0
- package/src/agents/reviewer/cli-reviewer/critical-requirements.md +30 -0
- package/src/agents/reviewer/cli-reviewer/identity.md +44 -0
- package/src/agents/reviewer/cli-reviewer/metadata.yaml +12 -0
- package/src/agents/reviewer/cli-reviewer/output.md +414 -0
- package/src/agents/reviewer/cli-reviewer/playbook.md +218 -0
- package/src/agents/reviewer/infra-reviewer/critical-reminders.md +38 -0
- package/src/agents/reviewer/infra-reviewer/critical-requirements.md +38 -0
- package/src/agents/reviewer/infra-reviewer/identity.md +53 -0
- package/src/agents/reviewer/infra-reviewer/metadata.yaml +10 -0
- package/src/agents/reviewer/infra-reviewer/output.md +364 -0
- package/src/agents/reviewer/infra-reviewer/playbook.md +161 -0
- package/src/agents/reviewer/web-reviewer/critical-reminders.md +31 -0
- package/src/agents/reviewer/web-reviewer/critical-requirements.md +26 -0
- package/src/agents/reviewer/web-reviewer/identity.md +40 -0
- package/src/agents/reviewer/web-reviewer/metadata.yaml +12 -0
- package/src/agents/reviewer/web-reviewer/output.md +333 -0
- package/src/agents/reviewer/web-reviewer/playbook.md +156 -0
- package/src/agents/tester/api-tester/critical-reminders.md +41 -0
- package/src/agents/tester/api-tester/critical-requirements.md +41 -0
- package/src/agents/tester/api-tester/identity.md +47 -0
- package/src/agents/tester/api-tester/metadata.yaml +12 -0
- package/src/agents/tester/api-tester/output.md +284 -0
- package/src/agents/tester/api-tester/playbook.md +275 -0
- package/src/agents/tester/cli-tester/critical-reminders.md +36 -0
- package/src/agents/tester/cli-tester/critical-requirements.md +36 -0
- package/src/agents/tester/cli-tester/identity.md +43 -0
- package/src/agents/tester/cli-tester/metadata.yaml +12 -0
- package/src/agents/tester/cli-tester/output.md +313 -0
- package/src/agents/tester/cli-tester/playbook.md +221 -0
- package/src/agents/tester/web-tester/critical-reminders.md +31 -0
- package/src/agents/tester/web-tester/critical-requirements.md +28 -0
- package/src/agents/tester/web-tester/identity.md +41 -0
- package/src/agents/tester/web-tester/metadata.yaml +12 -0
- package/src/agents/tester/web-tester/output.md +321 -0
- package/src/agents/tester/web-tester/playbook.md +428 -0
- package/src/schemas/agent-frontmatter.schema.json +88 -0
- package/src/schemas/agent.schema.json +103 -0
- package/src/schemas/custom-metadata.schema.json +74 -0
- package/src/schemas/hooks.schema.json +47 -0
- package/src/schemas/marketplace.schema.json +119 -0
- package/src/schemas/metadata.schema.json +387 -0
- package/src/schemas/plugin.schema.json +127 -0
- package/src/schemas/project-config.schema.json +189 -0
- package/src/schemas/project-source-config.schema.json +96 -0
- package/src/schemas/skill-frontmatter.schema.json +42 -0
- package/src/schemas/stack.schema.json +191 -0
- package/src/schemas/stacks.schema.json +107 -0
- package/bin/run.js +0 -3
|
@@ -0,0 +1,789 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
promptValue
|
|
4
|
+
} from "./chunk-C55DN7GE.js";
|
|
5
|
+
import {
|
|
6
|
+
runWizardSession
|
|
7
|
+
} from "./chunk-SI5FOARI.js";
|
|
8
|
+
import {
|
|
9
|
+
Spinner
|
|
10
|
+
} from "./chunk-OZZGXBCN.js";
|
|
11
|
+
import {
|
|
12
|
+
useTerminalDimensions
|
|
13
|
+
} from "./chunk-UTFN6UJS.js";
|
|
14
|
+
import {
|
|
15
|
+
SelectList
|
|
16
|
+
} from "./chunk-DUVWGO6E.js";
|
|
17
|
+
import {
|
|
18
|
+
STATUS_MESSAGES,
|
|
19
|
+
SUCCESS_MESSAGES
|
|
20
|
+
} from "./chunk-GYG5SE2D.js";
|
|
21
|
+
import {
|
|
22
|
+
compileAgentsAllScopes,
|
|
23
|
+
loadSource,
|
|
24
|
+
writeProjectConfig
|
|
25
|
+
} from "./chunk-Y4CXDA3I.js";
|
|
26
|
+
import {
|
|
27
|
+
discoverInstalledSkills,
|
|
28
|
+
installPluginSkills,
|
|
29
|
+
pluginInstallFailureError
|
|
30
|
+
} from "./chunk-4R6PGHQQ.js";
|
|
31
|
+
import {
|
|
32
|
+
copyLocalSkills
|
|
33
|
+
} from "./chunk-3XFUQ6OL.js";
|
|
34
|
+
import {
|
|
35
|
+
loadAgentDefs
|
|
36
|
+
} from "./chunk-YBVA7GPW.js";
|
|
37
|
+
import {
|
|
38
|
+
orderDomains
|
|
39
|
+
} from "./chunk-44LLPS2N.js";
|
|
40
|
+
import {
|
|
41
|
+
BaseCommand,
|
|
42
|
+
EXIT_CODES
|
|
43
|
+
} from "./chunk-7QIHKQL5.js";
|
|
44
|
+
import {
|
|
45
|
+
clearTerminalScreen
|
|
46
|
+
} from "./chunk-P3PN5SVI.js";
|
|
47
|
+
import {
|
|
48
|
+
INSTALL_MODE_LABELS,
|
|
49
|
+
buildAgentScopeMap,
|
|
50
|
+
deriveInstallMode,
|
|
51
|
+
detectGlobalInstallation,
|
|
52
|
+
detectInstallation,
|
|
53
|
+
getInstallationInfo,
|
|
54
|
+
isHomeDirectory,
|
|
55
|
+
loadProjectConfig,
|
|
56
|
+
loadProjectConfigFromDir,
|
|
57
|
+
resolveInstallPaths
|
|
58
|
+
} from "./chunk-TVHRMRD3.js";
|
|
59
|
+
import {
|
|
60
|
+
AGENT_NAMES,
|
|
61
|
+
fileExists,
|
|
62
|
+
getErrorMessage,
|
|
63
|
+
readFileSafe,
|
|
64
|
+
settingsFileSchema,
|
|
65
|
+
warn
|
|
66
|
+
} from "./chunk-3LIU2ZEF.js";
|
|
67
|
+
import {
|
|
68
|
+
getCategoryDomain
|
|
69
|
+
} from "./chunk-DG2NGZ7S.js";
|
|
70
|
+
import {
|
|
71
|
+
ASCII_LOGO,
|
|
72
|
+
CLAUDE_DIR,
|
|
73
|
+
CLAUDE_SRC_DIR,
|
|
74
|
+
CLI_COLORS,
|
|
75
|
+
CLI_INVOKE_COMMAND,
|
|
76
|
+
DEFAULT_BRANDING,
|
|
77
|
+
DEFAULT_PUBLIC_SOURCE_NAME,
|
|
78
|
+
EDIT_PROJECT_SETUP_FLAG,
|
|
79
|
+
EJECT_SOURCE,
|
|
80
|
+
MAX_CONFIG_FILE_SIZE,
|
|
81
|
+
STANDARD_FILES
|
|
82
|
+
} from "./chunk-O5ASLZ2K.js";
|
|
83
|
+
import {
|
|
84
|
+
init_esm_shims
|
|
85
|
+
} from "./chunk-P56WJ5FA.js";
|
|
86
|
+
|
|
87
|
+
// src/cli/commands/init.tsx
|
|
88
|
+
init_esm_shims();
|
|
89
|
+
import os from "os";
|
|
90
|
+
import { Flags } from "@oclif/core";
|
|
91
|
+
import { render, Box as Box2, Text as Text2, useApp } from "ink";
|
|
92
|
+
|
|
93
|
+
// src/cli/lib/seed/fetch-seed.ts
|
|
94
|
+
init_esm_shims();
|
|
95
|
+
|
|
96
|
+
// src/cli/lib/seed/seed-schema.ts
|
|
97
|
+
init_esm_shims();
|
|
98
|
+
import { z } from "zod";
|
|
99
|
+
var SEED_VERSION = 3;
|
|
100
|
+
var seedModelSchema = z.enum(["opus", "fable", "sonnet", "haiku"]);
|
|
101
|
+
var seedEffortSchema = z.enum(["low", "medium", "high", "xhigh", "max"]);
|
|
102
|
+
var seedLoadStateSchema = z.enum(["lazy", "preloaded"]);
|
|
103
|
+
var seedSkillSchema = z.object({
|
|
104
|
+
install: z.enum(["plugin", "eject"]),
|
|
105
|
+
scope: z.enum(["project", "global"]),
|
|
106
|
+
/** Sub-agent id -> load state; presence is assignment. */
|
|
107
|
+
assignments: z.record(z.string(), seedLoadStateSchema)
|
|
108
|
+
});
|
|
109
|
+
var seedAgentSchema = z.object({
|
|
110
|
+
/** Explicitly switched on (bare) or off. Absent means "whatever the assignments imply". */
|
|
111
|
+
on: z.boolean().optional(),
|
|
112
|
+
model: seedModelSchema.optional(),
|
|
113
|
+
effort: seedEffortSchema.optional(),
|
|
114
|
+
/**
|
|
115
|
+
* Which `.claude/agents` directory this sub-agent's front-matter is written to. Absent means
|
|
116
|
+
* `project` — the CLI's own default, so a resting choice never has to travel.
|
|
117
|
+
*/
|
|
118
|
+
scope: z.enum(["project", "global"]).optional()
|
|
119
|
+
});
|
|
120
|
+
var seedPayloadSchema = z.object({
|
|
121
|
+
v: z.literal(SEED_VERSION),
|
|
122
|
+
/**
|
|
123
|
+
* Diagnostics only. A mismatch with this CLI's matrix must never fail a decode — it explains
|
|
124
|
+
* why some ids were skipped, it does not decide whether to try.
|
|
125
|
+
*/
|
|
126
|
+
matrixVersion: z.string(),
|
|
127
|
+
stackId: z.string().nullable(),
|
|
128
|
+
/** Sparse — presence is selection. `remembered` never leaves the browser. */
|
|
129
|
+
skills: z.record(z.string(), seedSkillSchema),
|
|
130
|
+
/** Sparse — an agent with nothing to say has no entry. */
|
|
131
|
+
agents: z.record(z.string(), seedAgentSchema)
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
// src/cli/lib/seed/fetch-seed.ts
|
|
135
|
+
var SEED_API_URL = process.env.AGENTS_INC_API_URL ?? "https://api.agentsinc.sh";
|
|
136
|
+
var SEED_USER_AGENT = "agents-inc-cli";
|
|
137
|
+
async function fetchSeedConfig(id) {
|
|
138
|
+
const url = `${SEED_API_URL}/configs/${encodeURIComponent(id)}`;
|
|
139
|
+
let response;
|
|
140
|
+
try {
|
|
141
|
+
response = await fetch(url, {
|
|
142
|
+
headers: { accept: "application/json", "user-agent": SEED_USER_AGENT }
|
|
143
|
+
});
|
|
144
|
+
} catch {
|
|
145
|
+
return { ok: false, error: `Could not reach ${SEED_API_URL} \u2014 check your connection.` };
|
|
146
|
+
}
|
|
147
|
+
if (response.status === 404) {
|
|
148
|
+
return { ok: false, error: `No configuration found for id '${id}'.` };
|
|
149
|
+
}
|
|
150
|
+
if (!response.ok) {
|
|
151
|
+
return { ok: false, error: `Fetching configuration failed (HTTP ${response.status}).` };
|
|
152
|
+
}
|
|
153
|
+
let body;
|
|
154
|
+
try {
|
|
155
|
+
body = await response.json();
|
|
156
|
+
} catch {
|
|
157
|
+
return { ok: false, error: "The configuration store returned something that is not JSON." };
|
|
158
|
+
}
|
|
159
|
+
const parsed = seedPayloadSchema.safeParse(body);
|
|
160
|
+
if (!parsed.success) {
|
|
161
|
+
return {
|
|
162
|
+
ok: false,
|
|
163
|
+
error: `Configuration '${id}' does not match the expected format \u2014 it may have been created by a newer version.`
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
return { ok: true, payload: parsed.data };
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// src/cli/lib/seed/seed-to-wizard.ts
|
|
170
|
+
init_esm_shims();
|
|
171
|
+
|
|
172
|
+
// src/cli/types/agents.ts
|
|
173
|
+
init_esm_shims();
|
|
174
|
+
|
|
175
|
+
// src/cli/lib/seed/seed-to-wizard.ts
|
|
176
|
+
var KNOWN_AGENTS = new Set(AGENT_NAMES);
|
|
177
|
+
function sourceForSkill(skill) {
|
|
178
|
+
return skill?.availableSources?.find((s) => s.primary)?.name ?? DEFAULT_PUBLIC_SOURCE_NAME;
|
|
179
|
+
}
|
|
180
|
+
function addToDomainSelections(selections, domain, category, skillId) {
|
|
181
|
+
const categorySelections = selections[domain] ??= {};
|
|
182
|
+
const skillList = categorySelections[category] ??= [];
|
|
183
|
+
if (!skillList.includes(skillId)) skillList.push(skillId);
|
|
184
|
+
}
|
|
185
|
+
function addToAgentStack(stack, agent, category, assignment) {
|
|
186
|
+
const agentStack = stack[agent] ??= {};
|
|
187
|
+
const assignments = agentStack[category] ??= [];
|
|
188
|
+
assignments.push(assignment);
|
|
189
|
+
}
|
|
190
|
+
function toSkillAssignment(skillId, load) {
|
|
191
|
+
return { id: skillId, preloaded: load === "preloaded" };
|
|
192
|
+
}
|
|
193
|
+
function readAgentMap(agents) {
|
|
194
|
+
const known = /* @__PURE__ */ new Map();
|
|
195
|
+
const switchedOff = /* @__PURE__ */ new Set();
|
|
196
|
+
const unknown = [];
|
|
197
|
+
for (const [name, entry] of Object.entries(agents)) {
|
|
198
|
+
if (!KNOWN_AGENTS.has(name)) unknown.push(name);
|
|
199
|
+
else if (entry.on === false) switchedOff.add(name);
|
|
200
|
+
else known.set(name, entry);
|
|
201
|
+
}
|
|
202
|
+
return { known, switchedOff, unknown };
|
|
203
|
+
}
|
|
204
|
+
function agentScopeConfig(name, entry) {
|
|
205
|
+
return {
|
|
206
|
+
name,
|
|
207
|
+
scope: entry?.scope ?? "project",
|
|
208
|
+
...entry?.model !== void 0 && { model: entry.model },
|
|
209
|
+
...entry?.effort !== void 0 && { effort: entry.effort }
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
function seedToWizardResult(payload, matrix) {
|
|
213
|
+
const domainSelections = {};
|
|
214
|
+
const assignedStack = {};
|
|
215
|
+
const skills = [];
|
|
216
|
+
const skippedSkillIds = [];
|
|
217
|
+
const agentNames = /* @__PURE__ */ new Set();
|
|
218
|
+
const agentMap = readAgentMap(payload.agents);
|
|
219
|
+
const skippedAgentNames = new Set(agentMap.unknown);
|
|
220
|
+
for (const [skillId, entry] of Object.entries(payload.skills)) {
|
|
221
|
+
const skill = matrix.skills[skillId];
|
|
222
|
+
const domain = skill?.category ? getCategoryDomain(skill.category) : void 0;
|
|
223
|
+
if (!skill?.category || !domain) {
|
|
224
|
+
skippedSkillIds.push(skillId);
|
|
225
|
+
continue;
|
|
226
|
+
}
|
|
227
|
+
const id = skillId;
|
|
228
|
+
const category = skill.category;
|
|
229
|
+
addToDomainSelections(domainSelections, domain, category, id);
|
|
230
|
+
skills.push({
|
|
231
|
+
id,
|
|
232
|
+
scope: entry.scope,
|
|
233
|
+
// "eject" is a source in its own right; anything else names the marketplace it came from.
|
|
234
|
+
source: entry.install === "eject" ? "eject" : sourceForSkill(skill)
|
|
235
|
+
});
|
|
236
|
+
for (const [agentName, load] of Object.entries(entry.assignments)) {
|
|
237
|
+
if (agentMap.switchedOff.has(agentName)) continue;
|
|
238
|
+
if (!KNOWN_AGENTS.has(agentName)) {
|
|
239
|
+
skippedAgentNames.add(agentName);
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
const agent = agentName;
|
|
243
|
+
agentNames.add(agent);
|
|
244
|
+
addToAgentStack(assignedStack, agent, category, toSkillAssignment(id, load));
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
for (const [name, entry] of agentMap.known) {
|
|
248
|
+
if (entry.on === true) agentNames.add(name);
|
|
249
|
+
}
|
|
250
|
+
const selectedAgents = [...agentNames];
|
|
251
|
+
return {
|
|
252
|
+
result: {
|
|
253
|
+
skills,
|
|
254
|
+
selectedAgents,
|
|
255
|
+
agentConfigs: selectedAgents.map((name) => agentScopeConfig(name, agentMap.known.get(name))),
|
|
256
|
+
assignedStack,
|
|
257
|
+
selectedStackId: payload.stackId,
|
|
258
|
+
domainSelections,
|
|
259
|
+
selectedDomains: orderDomains(Object.keys(domainSelections)),
|
|
260
|
+
// Nothing was dropped from a *saved config* — the skipped ids came off the wire and are
|
|
261
|
+
// reported to the user directly, so there is no existing entry to preserve.
|
|
262
|
+
unresolvableSkillIds: [],
|
|
263
|
+
cancelled: false,
|
|
264
|
+
// A shared configuration was already validated by the app that built it; this path has no
|
|
265
|
+
// interactive step in which a validation warning could be acted on.
|
|
266
|
+
validation: { valid: true, errors: [], warnings: [] }
|
|
267
|
+
},
|
|
268
|
+
skippedSkillIds,
|
|
269
|
+
skippedAgentNames: [...skippedAgentNames]
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// src/cli/lib/permission-checker.tsx
|
|
274
|
+
init_esm_shims();
|
|
275
|
+
import { Text, Box } from "ink";
|
|
276
|
+
import path from "path";
|
|
277
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
278
|
+
async function readSettingsPermissions(filePath) {
|
|
279
|
+
if (!await fileExists(filePath)) return void 0;
|
|
280
|
+
try {
|
|
281
|
+
const content = await readFileSafe(filePath, MAX_CONFIG_FILE_SIZE);
|
|
282
|
+
const raw = JSON.parse(content);
|
|
283
|
+
const result = settingsFileSchema.safeParse(raw);
|
|
284
|
+
const parsed = result.success ? result.data : {};
|
|
285
|
+
return parsed.permissions;
|
|
286
|
+
} catch {
|
|
287
|
+
warn(`Malformed settings file at '${filePath}' \u2014 skipping`);
|
|
288
|
+
return void 0;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
async function loadPermissions(projectRoot) {
|
|
292
|
+
const settingsPath = path.join(projectRoot, CLAUDE_DIR, STANDARD_FILES.SETTINGS_JSON);
|
|
293
|
+
const localSettingsPath = path.join(projectRoot, CLAUDE_DIR, STANDARD_FILES.SETTINGS_LOCAL_JSON);
|
|
294
|
+
for (const filePath of [localSettingsPath, settingsPath]) {
|
|
295
|
+
const permissions = await readSettingsPermissions(filePath);
|
|
296
|
+
if (permissions) return permissions;
|
|
297
|
+
}
|
|
298
|
+
return void 0;
|
|
299
|
+
}
|
|
300
|
+
async function checkPermissions(projectRoot) {
|
|
301
|
+
const permissions = await loadPermissions(projectRoot);
|
|
302
|
+
if (!permissions) {
|
|
303
|
+
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: CLI_COLORS.WARNING, padding: 1, children: [
|
|
304
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: CLI_COLORS.WARNING, children: "Permission Notice" }),
|
|
305
|
+
/* @__PURE__ */ jsx(Text, { children: "No permissions configured in .claude/settings.json" }),
|
|
306
|
+
/* @__PURE__ */ jsx(Text, { children: "Agents will prompt for approval on each tool use." }),
|
|
307
|
+
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
308
|
+
/* @__PURE__ */ jsx(Text, { children: "For autonomous operation, add to .claude/settings.json:" }),
|
|
309
|
+
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
310
|
+
/* @__PURE__ */ jsx(Text, { color: CLI_COLORS.DIM, children: "{" }),
|
|
311
|
+
/* @__PURE__ */ jsx(Text, { color: CLI_COLORS.DIM, children: ' "permissions": {' }),
|
|
312
|
+
/* @__PURE__ */ jsx(Text, { color: CLI_COLORS.DIM, children: ' "allow": [' }),
|
|
313
|
+
/* @__PURE__ */ jsx(Text, { color: CLI_COLORS.DIM, children: ' "Read(*)",' }),
|
|
314
|
+
/* @__PURE__ */ jsx(Text, { color: CLI_COLORS.DIM, children: ' "Bash(git *)",' }),
|
|
315
|
+
/* @__PURE__ */ jsx(Text, { color: CLI_COLORS.DIM, children: ' "Bash(bun *)"' }),
|
|
316
|
+
/* @__PURE__ */ jsx(Text, { color: CLI_COLORS.DIM, children: " ]" }),
|
|
317
|
+
/* @__PURE__ */ jsx(Text, { color: CLI_COLORS.DIM, children: " }" }),
|
|
318
|
+
/* @__PURE__ */ jsx(Text, { color: CLI_COLORS.DIM, children: "}" })
|
|
319
|
+
] });
|
|
320
|
+
}
|
|
321
|
+
const hasRestrictiveBash = permissions.deny?.some(
|
|
322
|
+
(rule) => rule === "Bash(*)" || rule === "Bash"
|
|
323
|
+
);
|
|
324
|
+
const hasNoAllows = !permissions.allow || permissions.allow.length === 0;
|
|
325
|
+
if (hasRestrictiveBash || hasNoAllows) {
|
|
326
|
+
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: CLI_COLORS.WARNING, padding: 1, children: [
|
|
327
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: CLI_COLORS.WARNING, children: "Permission Warnings" }),
|
|
328
|
+
hasRestrictiveBash && /* @__PURE__ */ jsx(Text, { children: "\u26A0 Bash is denied in permissions. Some agents require Bash for git, testing, and build commands." }),
|
|
329
|
+
hasNoAllows && /* @__PURE__ */ jsx(Text, { children: "\u26A0 No allow rules configured. Agents will prompt for each tool use." })
|
|
330
|
+
] });
|
|
331
|
+
}
|
|
332
|
+
return null;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// src/cli/commands/init.tsx
|
|
336
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
337
|
+
var DASHBOARD_OPTIONS = [
|
|
338
|
+
{ label: "Edit", value: "edit" },
|
|
339
|
+
{ label: "Compile", value: "compile" },
|
|
340
|
+
{ label: "Doctor", value: "doctor" },
|
|
341
|
+
{ label: "List", value: "list" }
|
|
342
|
+
];
|
|
343
|
+
var Dashboard = ({ onSelect, onCancel }) => {
|
|
344
|
+
const { exit } = useApp();
|
|
345
|
+
const { rows: terminalHeight } = useTerminalDimensions();
|
|
346
|
+
return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", height: terminalHeight, children: [
|
|
347
|
+
/* @__PURE__ */ jsx2(Box2, { marginBottom: 1, children: /* @__PURE__ */ jsx2(Text2, { children: ASCII_LOGO }) }),
|
|
348
|
+
/* @__PURE__ */ jsx2(
|
|
349
|
+
SelectList,
|
|
350
|
+
{
|
|
351
|
+
items: DASHBOARD_OPTIONS,
|
|
352
|
+
onSelect: (command) => {
|
|
353
|
+
onSelect(command);
|
|
354
|
+
exit();
|
|
355
|
+
},
|
|
356
|
+
onCancel: () => {
|
|
357
|
+
onCancel();
|
|
358
|
+
exit();
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
)
|
|
362
|
+
] });
|
|
363
|
+
};
|
|
364
|
+
function formatDashboardText(data) {
|
|
365
|
+
const modeLabel = INSTALL_MODE_LABELS[data.mode];
|
|
366
|
+
const lines = [
|
|
367
|
+
DEFAULT_BRANDING.NAME,
|
|
368
|
+
"",
|
|
369
|
+
` Skills: ${data.skillCount} installed`,
|
|
370
|
+
` Agents: ${data.agentCount} compiled`,
|
|
371
|
+
` Mode: ${modeLabel}`
|
|
372
|
+
];
|
|
373
|
+
if (data.source) {
|
|
374
|
+
lines.push(` Source: ${data.source}`);
|
|
375
|
+
}
|
|
376
|
+
lines.push("");
|
|
377
|
+
lines.push(` [Edit] [Compile] [Doctor] [List]`);
|
|
378
|
+
return lines.join("\n");
|
|
379
|
+
}
|
|
380
|
+
async function showDashboard(projectDir, log) {
|
|
381
|
+
const data = await getDashboardData(projectDir);
|
|
382
|
+
if (!process.stdin.isTTY) {
|
|
383
|
+
const output = log ?? console.log;
|
|
384
|
+
output(formatDashboardText(data));
|
|
385
|
+
return null;
|
|
386
|
+
}
|
|
387
|
+
const selectedCommand = await promptValue(
|
|
388
|
+
(resolve) => /* @__PURE__ */ jsx2(Dashboard, { onSelect: (command) => resolve(command), onCancel: () => resolve(null) }),
|
|
389
|
+
{ onExit: null, clearOnResolve: true }
|
|
390
|
+
);
|
|
391
|
+
clearTerminalScreen();
|
|
392
|
+
return selectedCommand;
|
|
393
|
+
}
|
|
394
|
+
function dashboardCommandArgv(command, origin) {
|
|
395
|
+
if (command !== "edit" || origin !== "init") return [];
|
|
396
|
+
return [`--${EDIT_PROJECT_SETUP_FLAG}`];
|
|
397
|
+
}
|
|
398
|
+
async function runDashboardFlow(projectDir, config, origin, log) {
|
|
399
|
+
const installation = await detectInstallation(projectDir);
|
|
400
|
+
if (!installation) return false;
|
|
401
|
+
const selectedCommand = await showDashboard(projectDir, log);
|
|
402
|
+
if (selectedCommand) {
|
|
403
|
+
await config.runCommand(selectedCommand, dashboardCommandArgv(selectedCommand, origin));
|
|
404
|
+
}
|
|
405
|
+
return true;
|
|
406
|
+
}
|
|
407
|
+
var Init = class _Init extends BaseCommand {
|
|
408
|
+
static summary = `Initialize ${DEFAULT_BRANDING.NAME} in this project`;
|
|
409
|
+
static description = "Interactive wizard to set up skills and agents. Supports Plugin Mode (native install) and Eject Mode (copy to .claude/).";
|
|
410
|
+
static examples = [
|
|
411
|
+
{
|
|
412
|
+
description: "Start the setup wizard",
|
|
413
|
+
command: "<%= config.bin %> <%= command.id %>"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
description: "Initialize from a custom marketplace",
|
|
417
|
+
command: "<%= config.bin %> <%= command.id %> --source github:org/marketplace"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
description: "Force refresh skills from remote",
|
|
421
|
+
command: "<%= config.bin %> <%= command.id %> --refresh"
|
|
422
|
+
}
|
|
423
|
+
];
|
|
424
|
+
static flags = {
|
|
425
|
+
...BaseCommand.baseFlags,
|
|
426
|
+
refresh: Flags.boolean({
|
|
427
|
+
description: "Force refresh from remote source",
|
|
428
|
+
default: false
|
|
429
|
+
}),
|
|
430
|
+
from: Flags.string({
|
|
431
|
+
description: "Install a configuration shared from agentsinc.sh by its id, without the wizard",
|
|
432
|
+
helpValue: "<id>"
|
|
433
|
+
})
|
|
434
|
+
};
|
|
435
|
+
/**
|
|
436
|
+
* One spine, two producers. The wizard and a shared id differ only in *where the selection
|
|
437
|
+
* comes from* — everything after it (the empty guard, the install pipeline) is identical, so it
|
|
438
|
+
* lives here once rather than being written twice and drifting.
|
|
439
|
+
*/
|
|
440
|
+
async run() {
|
|
441
|
+
const { flags } = await this.parse(_Init);
|
|
442
|
+
const projectDir = process.cwd();
|
|
443
|
+
if (!flags.from && await this.showDashboardIfInitialized(projectDir)) return;
|
|
444
|
+
const selection = flags.from ? await this.selectionFromSharedConfig(flags.from, flags) : await this.selectionFromWizard(flags, projectDir);
|
|
445
|
+
if (!selection) this.exit(EXIT_CODES.CANCELLED);
|
|
446
|
+
if (selection.result.skills.length === 0 && selection.result.selectedAgents.length === 0) {
|
|
447
|
+
this.error(selection.emptyMessage, { exit: EXIT_CODES.ERROR });
|
|
448
|
+
}
|
|
449
|
+
await this.handleInstallation(
|
|
450
|
+
selection.result,
|
|
451
|
+
selection.sourceResult,
|
|
452
|
+
flags,
|
|
453
|
+
selection.interactive
|
|
454
|
+
);
|
|
455
|
+
}
|
|
456
|
+
/** The interactive producer: load the source, run the wizard, return what was chosen. */
|
|
457
|
+
async selectionFromWizard(flags, projectDir) {
|
|
458
|
+
const isGlobalRoot = isHomeDirectory(projectDir);
|
|
459
|
+
const { unmount, clear: clearSpinner } = render(
|
|
460
|
+
/* @__PURE__ */ jsx2(Spinner, { label: STATUS_MESSAGES.LOADING_SKILLS })
|
|
461
|
+
);
|
|
462
|
+
const [{ sourceResult, startupMessages }, globalConfig] = await Promise.all([
|
|
463
|
+
this.loadSourceOrFail(flags),
|
|
464
|
+
this.loadGlobalConfigIfExists()
|
|
465
|
+
]);
|
|
466
|
+
clearSpinner();
|
|
467
|
+
unmount();
|
|
468
|
+
const result = await this.runWizard(
|
|
469
|
+
sourceResult,
|
|
470
|
+
startupMessages,
|
|
471
|
+
projectDir,
|
|
472
|
+
globalConfig,
|
|
473
|
+
isGlobalRoot
|
|
474
|
+
);
|
|
475
|
+
if (!result) return null;
|
|
476
|
+
return {
|
|
477
|
+
result,
|
|
478
|
+
sourceResult,
|
|
479
|
+
// A person is already at the terminal, so the permission notice can wait for them.
|
|
480
|
+
interactive: true,
|
|
481
|
+
emptyMessage: "No skills selected"
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* The `--from <id>` producer: fetch and map, no wizard. Nothing here may assume a TTY — running
|
|
486
|
+
* headless is most of why the flag exists.
|
|
487
|
+
*/
|
|
488
|
+
async selectionFromSharedConfig(id, flags) {
|
|
489
|
+
this.log(`Fetching configuration ${id}...`);
|
|
490
|
+
const fetched = await fetchSeedConfig(id);
|
|
491
|
+
if (!fetched.ok) {
|
|
492
|
+
this.error(fetched.error, { exit: EXIT_CODES.ERROR });
|
|
493
|
+
}
|
|
494
|
+
const { sourceResult } = await this.loadSourceOrFail(flags);
|
|
495
|
+
const { result, skippedSkillIds, skippedAgentNames } = seedToWizardResult(
|
|
496
|
+
fetched.payload,
|
|
497
|
+
sourceResult.matrix
|
|
498
|
+
);
|
|
499
|
+
if (skippedSkillIds.length > 0) {
|
|
500
|
+
this.warn(
|
|
501
|
+
`Skipped ${skippedSkillIds.length} skill(s) this catalog does not know: ${skippedSkillIds.join(", ")}`
|
|
502
|
+
);
|
|
503
|
+
}
|
|
504
|
+
if (skippedAgentNames.length > 0) {
|
|
505
|
+
this.warn(
|
|
506
|
+
`Skipped ${skippedAgentNames.length} unknown sub-agent(s): ${skippedAgentNames.join(", ")}`
|
|
507
|
+
);
|
|
508
|
+
}
|
|
509
|
+
if (result.skills.length > 0) {
|
|
510
|
+
this.log(
|
|
511
|
+
`Installing ${result.skills.length} skill(s) across ${result.selectedAgents.length} sub-agent(s)
|
|
512
|
+
`
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
return {
|
|
516
|
+
result,
|
|
517
|
+
sourceResult,
|
|
518
|
+
interactive: false,
|
|
519
|
+
emptyMessage: `Configuration '${id}' contains no skills this catalog can install.`
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
async showDashboardIfInitialized(projectDir) {
|
|
523
|
+
return runDashboardFlow(projectDir, this.config, "init", (msg) => this.log(msg));
|
|
524
|
+
}
|
|
525
|
+
async loadGlobalConfigIfExists() {
|
|
526
|
+
const globalInstall = await detectGlobalInstallation();
|
|
527
|
+
if (!globalInstall) return null;
|
|
528
|
+
const loaded = await loadProjectConfigFromDir(os.homedir());
|
|
529
|
+
return loaded?.config ?? null;
|
|
530
|
+
}
|
|
531
|
+
async loadSourceOrFail(flags) {
|
|
532
|
+
try {
|
|
533
|
+
const loaded = await loadSource({
|
|
534
|
+
sourceFlag: flags.source,
|
|
535
|
+
projectDir: process.cwd(),
|
|
536
|
+
forceRefresh: flags.refresh,
|
|
537
|
+
captureStartupMessages: true
|
|
538
|
+
});
|
|
539
|
+
return { sourceResult: loaded.sourceResult, startupMessages: loaded.startupMessages };
|
|
540
|
+
} catch (error) {
|
|
541
|
+
this.error(getErrorMessage(error), {
|
|
542
|
+
exit: EXIT_CODES.ERROR
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
async runWizard(sourceResult, startupMessages, projectDir, globalConfig, isGlobalRoot) {
|
|
547
|
+
return runWizardSession({
|
|
548
|
+
hydrate: {
|
|
549
|
+
initialAgents: globalConfig?.selectedAgents,
|
|
550
|
+
installedSkillIds: globalConfig?.skills?.map((s) => s.id),
|
|
551
|
+
installedSkillConfigs: globalConfig?.skills,
|
|
552
|
+
installedAgentConfigs: globalConfig?.agents,
|
|
553
|
+
isEditingFromGlobalScope: isGlobalRoot
|
|
554
|
+
},
|
|
555
|
+
props: {
|
|
556
|
+
version: this.config.version,
|
|
557
|
+
logo: ASCII_LOGO,
|
|
558
|
+
initialAgents: globalConfig?.selectedAgents,
|
|
559
|
+
installedSkillIds: globalConfig?.skills?.map((s) => s.id),
|
|
560
|
+
projectDir,
|
|
561
|
+
startupMessages
|
|
562
|
+
},
|
|
563
|
+
onCancel: () => this.log("Setup cancelled"),
|
|
564
|
+
clearTerminal: () => this.clearTerminal()
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
async handleInstallation(result, sourceResult, flags, interactive = true) {
|
|
568
|
+
const projectDir = process.cwd();
|
|
569
|
+
const activeSkills = result.skills.filter((s) => !s.excluded);
|
|
570
|
+
const installMode = deriveInstallMode(activeSkills);
|
|
571
|
+
const ejectedSkills = activeSkills.filter((s) => s.source === EJECT_SOURCE);
|
|
572
|
+
const pluginSkills = activeSkills.filter((s) => s.source !== EJECT_SOURCE);
|
|
573
|
+
this.logInstallPlan(installMode, ejectedSkills, pluginSkills);
|
|
574
|
+
const resolvedMarketplace = pluginSkills.length > 0 ? await this.requireMarketplaceOrExit(
|
|
575
|
+
sourceResult,
|
|
576
|
+
"install plugin skills",
|
|
577
|
+
(marketplace) => this.log(`Registering marketplace "${marketplace}"...`)
|
|
578
|
+
) : null;
|
|
579
|
+
const copyResult = installMode === "eject" || installMode === "mixed" ? await this.copyEjectSkillsStep(ejectedSkills, projectDir, sourceResult, installMode) : null;
|
|
580
|
+
if (resolvedMarketplace !== null) {
|
|
581
|
+
await this.installPluginsStep(pluginSkills, resolvedMarketplace, projectDir);
|
|
582
|
+
}
|
|
583
|
+
const pluginModeSucceeded = resolvedMarketplace !== null;
|
|
584
|
+
try {
|
|
585
|
+
const { configResult, compileResult, agentScopeMap } = await this.writeConfigAndCompile(
|
|
586
|
+
result,
|
|
587
|
+
sourceResult,
|
|
588
|
+
flags
|
|
589
|
+
);
|
|
590
|
+
this.reportSuccess(
|
|
591
|
+
configResult,
|
|
592
|
+
compileResult,
|
|
593
|
+
agentScopeMap,
|
|
594
|
+
installMode,
|
|
595
|
+
pluginModeSucceeded,
|
|
596
|
+
copyResult
|
|
597
|
+
);
|
|
598
|
+
const permissionWarning = await checkPermissions(projectDir);
|
|
599
|
+
if (permissionWarning) {
|
|
600
|
+
if (interactive) {
|
|
601
|
+
const { waitUntilExit } = render(permissionWarning);
|
|
602
|
+
await waitUntilExit();
|
|
603
|
+
} else {
|
|
604
|
+
const { unmount } = render(permissionWarning);
|
|
605
|
+
unmount();
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
} catch (error) {
|
|
609
|
+
this.handleError(error);
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
logInstallPlan(installMode, ejectedSkills, pluginSkills) {
|
|
613
|
+
this.log("\n");
|
|
614
|
+
this.log(`Selected ${ejectedSkills.length + pluginSkills.length} skills`);
|
|
615
|
+
this.log(
|
|
616
|
+
`Install mode: ${installMode === "plugin" ? `${INSTALL_MODE_LABELS.plugin} (native install)` : installMode === "mixed" ? `${INSTALL_MODE_LABELS.mixed} (${ejectedSkills.length} eject, ${pluginSkills.length} plugin)` : `${INSTALL_MODE_LABELS.eject} (copy to .claude/skills/)`}`
|
|
617
|
+
);
|
|
618
|
+
}
|
|
619
|
+
async copyEjectSkillsStep(localSkills, projectDir, sourceResult, installMode) {
|
|
620
|
+
this.log("Copying skills to local directory...");
|
|
621
|
+
const copyResult = await copyLocalSkills(localSkills, projectDir, sourceResult);
|
|
622
|
+
if (installMode === "mixed") {
|
|
623
|
+
if (copyResult.projectCopied.length > 0 && copyResult.globalCopied.length > 0) {
|
|
624
|
+
this.log(
|
|
625
|
+
`Copied ${copyResult.totalCopied} local skills (${copyResult.projectCopied.length} project, ${copyResult.globalCopied.length} global)`
|
|
626
|
+
);
|
|
627
|
+
} else if (copyResult.globalCopied.length > 0) {
|
|
628
|
+
this.log(`Copied ${copyResult.globalCopied.length} local skills to ~/.claude/skills/`);
|
|
629
|
+
} else {
|
|
630
|
+
this.log(`Copied ${copyResult.projectCopied.length} local skills to .claude/skills/`);
|
|
631
|
+
}
|
|
632
|
+
} else {
|
|
633
|
+
this.log(`Copied ${copyResult.totalCopied} skills to .claude/skills/
|
|
634
|
+
`);
|
|
635
|
+
}
|
|
636
|
+
return copyResult;
|
|
637
|
+
}
|
|
638
|
+
async installPluginsStep(pluginSkills, marketplace, projectDir) {
|
|
639
|
+
this.log("Installing skill plugins...");
|
|
640
|
+
const pluginResult = await installPluginSkills(pluginSkills, marketplace, projectDir);
|
|
641
|
+
for (const item of pluginResult.installed) {
|
|
642
|
+
this.log(` Installed ${item.ref}`);
|
|
643
|
+
}
|
|
644
|
+
for (const item of pluginResult.failed) {
|
|
645
|
+
this.warn(`Failed to install plugin ${item.id}: ${item.error}`);
|
|
646
|
+
}
|
|
647
|
+
if (pluginResult.failed.length > 0) {
|
|
648
|
+
this.error(pluginInstallFailureError(pluginResult.failed.length), {
|
|
649
|
+
exit: EXIT_CODES.ERROR
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
this.log(`Installed ${pluginResult.installed.length} skill plugins
|
|
653
|
+
`);
|
|
654
|
+
}
|
|
655
|
+
async writeConfigAndCompile(result, sourceResult, flags) {
|
|
656
|
+
this.log("Generating configuration...");
|
|
657
|
+
const configResult = await writeProjectConfig({
|
|
658
|
+
wizardResult: result,
|
|
659
|
+
sourceResult,
|
|
660
|
+
projectDir: process.cwd(),
|
|
661
|
+
sourceFlag: flags.source
|
|
662
|
+
});
|
|
663
|
+
if (configResult.wasMerged) {
|
|
664
|
+
this.log(`Merged with existing config at ${configResult.existingConfigPath}`);
|
|
665
|
+
}
|
|
666
|
+
this.log(`Configuration saved (${configResult.config.agents.length} agents)
|
|
667
|
+
`);
|
|
668
|
+
this.log(STATUS_MESSAGES.COMPILING_AGENTS);
|
|
669
|
+
const cwd = process.cwd();
|
|
670
|
+
const agentDefs = await loadAgentDefs();
|
|
671
|
+
const { allSkills } = await discoverInstalledSkills(cwd);
|
|
672
|
+
const agentScopeMap = buildAgentScopeMap(configResult.config);
|
|
673
|
+
const compileResult = await compileAgentsAllScopes({
|
|
674
|
+
projectDir: cwd,
|
|
675
|
+
sourcePath: agentDefs.sourcePath,
|
|
676
|
+
skills: allSkills,
|
|
677
|
+
agentScopeMap
|
|
678
|
+
});
|
|
679
|
+
this.log(`Compiled ${compileResult.compiled.length} agents
|
|
680
|
+
`);
|
|
681
|
+
this.reportPropagatedRecompile(configResult.propagation);
|
|
682
|
+
return { configResult, compileResult, agentScopeMap };
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* Renders the recompile the gated write already performed on every OTHER
|
|
686
|
+
* registered project this run's global change was propagated into.
|
|
687
|
+
*/
|
|
688
|
+
reportPropagatedRecompile(propagation) {
|
|
689
|
+
if (propagation.propagated.updated.length === 0) return;
|
|
690
|
+
const { recompiledCount, failedCount, warnings } = propagation.recompile;
|
|
691
|
+
for (const warning of warnings) {
|
|
692
|
+
this.warn(warning);
|
|
693
|
+
}
|
|
694
|
+
const failureSuffix = failedCount > 0 ? ` (${failedCount} failed)` : "";
|
|
695
|
+
this.log(`Recompiled agents in ${recompiledCount} registered projects${failureSuffix}
|
|
696
|
+
`);
|
|
697
|
+
}
|
|
698
|
+
reportSuccess(configResult, compileResult, agentScopeMap, installMode, pluginModeSucceeded, copyResult) {
|
|
699
|
+
this.log(`${SUCCESS_MESSAGES.INIT_SUCCESS}
|
|
700
|
+
`);
|
|
701
|
+
const isEjectOutput = installMode === "eject" || installMode === "mixed" && !pluginModeSucceeded;
|
|
702
|
+
if (isEjectOutput && copyResult && copyResult.totalCopied > 0) {
|
|
703
|
+
this.reportSkillsCopied(copyResult);
|
|
704
|
+
}
|
|
705
|
+
this.reportAgentsCompiled(compileResult.compiled, agentScopeMap);
|
|
706
|
+
this.log("Configuration:");
|
|
707
|
+
this.log(` ${configResult.configPath}`);
|
|
708
|
+
this.log("");
|
|
709
|
+
this.log("To customize agent-skill assignments:");
|
|
710
|
+
this.log(` 1. Edit ${CLAUDE_SRC_DIR}/${STANDARD_FILES.CONFIG_TS}`);
|
|
711
|
+
this.log(` 2. Run '${CLI_INVOKE_COMMAND} compile' to regenerate agents`);
|
|
712
|
+
this.log("");
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* Reports where the skills actually landed. `copyLocalSkills` splits by scope,
|
|
716
|
+
* so a default install driven from a project directory writes every skill
|
|
717
|
+
* under HOME — reporting the project path there names a directory that was
|
|
718
|
+
* never written.
|
|
719
|
+
*
|
|
720
|
+
* This block is a filesystem listing, so the entries are the on-disk directory
|
|
721
|
+
* names — skill ids, not display names. `copySkillsToLocalFlattened` names each
|
|
722
|
+
* destination directory after `skill.id`, so a user can copy any line and `cd`
|
|
723
|
+
* into it.
|
|
724
|
+
*/
|
|
725
|
+
reportSkillsCopied(copyResult) {
|
|
726
|
+
const cwd = process.cwd();
|
|
727
|
+
const groups = isHomeDirectory(cwd) ? [
|
|
728
|
+
{
|
|
729
|
+
dir: resolveInstallPaths(cwd, "project").skillsDir,
|
|
730
|
+
copied: [...copyResult.globalCopied, ...copyResult.projectCopied]
|
|
731
|
+
}
|
|
732
|
+
] : [
|
|
733
|
+
{ dir: resolveInstallPaths(cwd, "global").skillsDir, copied: copyResult.globalCopied },
|
|
734
|
+
{ dir: resolveInstallPaths(cwd, "project").skillsDir, copied: copyResult.projectCopied }
|
|
735
|
+
].filter((group) => group.copied.length > 0);
|
|
736
|
+
for (const group of groups) {
|
|
737
|
+
this.log("Skills copied to:");
|
|
738
|
+
this.log(` ${group.dir}`);
|
|
739
|
+
for (const copied of group.copied) {
|
|
740
|
+
this.log(` ${copied.skillId}/`);
|
|
741
|
+
}
|
|
742
|
+
this.log("");
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* Reports where the agents actually landed, mirroring the scope split
|
|
747
|
+
* `compileAgentsAllScopes` performs: one pass at the home root, otherwise a
|
|
748
|
+
* global pass under HOME and a project pass under the project directory.
|
|
749
|
+
*/
|
|
750
|
+
reportAgentsCompiled(compiled, agentScopeMap) {
|
|
751
|
+
const cwd = process.cwd();
|
|
752
|
+
const groups = isHomeDirectory(cwd) ? [{ dir: resolveInstallPaths(cwd, "project").agentsDir, agents: compiled }] : [
|
|
753
|
+
{
|
|
754
|
+
dir: resolveInstallPaths(cwd, "global").agentsDir,
|
|
755
|
+
agents: compiled.filter((name) => agentScopeMap.get(name) === "global")
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
dir: resolveInstallPaths(cwd, "project").agentsDir,
|
|
759
|
+
agents: compiled.filter((name) => agentScopeMap.get(name) !== "global")
|
|
760
|
+
}
|
|
761
|
+
].filter((group) => group.agents.length > 0);
|
|
762
|
+
for (const group of groups) {
|
|
763
|
+
this.log("Agents compiled to:");
|
|
764
|
+
this.log(` ${group.dir}`);
|
|
765
|
+
for (const agentName of group.agents) {
|
|
766
|
+
this.log(` ${agentName}.md`);
|
|
767
|
+
}
|
|
768
|
+
this.log("");
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
};
|
|
772
|
+
async function getDashboardData(projectDir) {
|
|
773
|
+
const [info, loaded] = await Promise.all([getInstallationInfo(), loadProjectConfig(projectDir)]);
|
|
774
|
+
const activeSkills = loaded?.config?.skills?.filter((s) => !s.excluded);
|
|
775
|
+
const skillCount = info?.skillCount ?? 0;
|
|
776
|
+
const agentCount = info?.agentCount ?? 0;
|
|
777
|
+
const mode = info?.mode ?? (activeSkills ? deriveInstallMode(activeSkills) : "eject");
|
|
778
|
+
const source = loaded?.config?.source;
|
|
779
|
+
return { skillCount, agentCount, mode, source };
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
export {
|
|
783
|
+
formatDashboardText,
|
|
784
|
+
showDashboard,
|
|
785
|
+
runDashboardFlow,
|
|
786
|
+
Init,
|
|
787
|
+
getDashboardData
|
|
788
|
+
};
|
|
789
|
+
//# sourceMappingURL=chunk-QTFQEYDA.js.map
|