agents-inc 0.152.1 → 0.154.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 +57 -0
- package/README.md +31 -35
- package/dist/{chunk-FVDKAVOL.js → chunk-2IMYK4WN.js} +18 -51
- package/dist/chunk-2IMYK4WN.js.map +1 -0
- package/dist/{chunk-PMM2MYMA.js → chunk-4VCWL2IG.js} +649 -357
- package/dist/chunk-4VCWL2IG.js.map +1 -0
- package/dist/{chunk-PZIZNMHK.js → chunk-5MFJ24VM.js} +237 -150
- package/dist/chunk-5MFJ24VM.js.map +1 -0
- package/dist/{chunk-KXYVJGJP.js → chunk-6CNRMCFM.js} +3 -2
- package/dist/{chunk-KXYVJGJP.js.map → chunk-6CNRMCFM.js.map} +1 -1
- package/dist/chunk-7VZV4O6B.js +40 -0
- package/dist/chunk-7VZV4O6B.js.map +1 -0
- package/dist/{chunk-SX5H6TSC.js → chunk-AKQ5QISO.js} +11 -8
- package/dist/chunk-AKQ5QISO.js.map +1 -0
- package/dist/{chunk-BNSRA6HL.js → chunk-AURY6RT6.js} +39 -176
- package/dist/chunk-AURY6RT6.js.map +1 -0
- package/dist/{chunk-LZ52XEPR.js → chunk-B66SC72V.js} +7 -6
- package/dist/chunk-B66SC72V.js.map +1 -0
- package/dist/{chunk-LASI35KT.js → chunk-BZ4CZBOM.js} +14 -28
- package/dist/chunk-BZ4CZBOM.js.map +1 -0
- package/dist/chunk-CBF4ZYV3.js +18540 -0
- package/dist/chunk-CBF4ZYV3.js.map +1 -0
- package/dist/{chunk-5GUOIJSG.js → chunk-CHNA5RVS.js} +3 -15
- package/dist/chunk-CHNA5RVS.js.map +1 -0
- package/dist/{chunk-LDP5ASDM.js → chunk-DRKSYJZ2.js} +2 -19
- package/dist/chunk-DRKSYJZ2.js.map +1 -0
- package/dist/chunk-FMYHWKGG.js +325 -0
- package/dist/chunk-FMYHWKGG.js.map +1 -0
- package/dist/{chunk-SKQWRUPX.js → chunk-GUDGCFSF.js} +59 -33
- package/dist/chunk-GUDGCFSF.js.map +1 -0
- package/dist/{chunk-WKTHWQKM.js → chunk-IPJOMAWC.js} +5070 -6305
- package/dist/chunk-IPJOMAWC.js.map +1 -0
- package/dist/chunk-IXEDSKMH.js +48 -0
- package/dist/chunk-IXEDSKMH.js.map +1 -0
- package/dist/{chunk-TUPYW2IQ.js → chunk-JC7DBPRD.js} +9 -12
- package/dist/chunk-JC7DBPRD.js.map +1 -0
- package/dist/{chunk-ZL7PFNHN.js → chunk-K3O3YQYG.js} +2 -2
- package/dist/{chunk-QRDTLVXG.js → chunk-LA3JPESW.js} +9 -22
- package/dist/chunk-LA3JPESW.js.map +1 -0
- package/dist/{chunk-MWG4VU64.js → chunk-MJFIO5SX.js} +50 -74
- package/dist/chunk-MJFIO5SX.js.map +1 -0
- package/dist/{chunk-L7SZXUBJ.js → chunk-NFH6SA62.js} +7 -6
- package/dist/{chunk-L7SZXUBJ.js.map → chunk-NFH6SA62.js.map} +1 -1
- package/dist/{chunk-GRVKW3CC.js → chunk-NKCY2ULI.js} +3 -2
- package/dist/{chunk-GRVKW3CC.js.map → chunk-NKCY2ULI.js.map} +1 -1
- package/dist/{chunk-TJJPWUMA.js → chunk-NSJ2S7R5.js} +3 -2
- package/dist/{chunk-TJJPWUMA.js.map → chunk-NSJ2S7R5.js.map} +1 -1
- package/dist/{chunk-Q2KG7UV3.js → chunk-OJJLYHM3.js} +2 -1
- package/dist/{chunk-Q2KG7UV3.js.map → chunk-OJJLYHM3.js.map} +1 -1
- package/dist/{chunk-MJ2KHG24.js → chunk-ONWEOS77.js} +6 -6
- package/dist/{chunk-MJ2KHG24.js.map → chunk-ONWEOS77.js.map} +1 -1
- package/dist/{chunk-NR3OZGL4.js → chunk-OZXAJNLA.js} +2 -1
- package/dist/{chunk-NR3OZGL4.js.map → chunk-OZXAJNLA.js.map} +1 -1
- package/dist/{chunk-QZZJFYUQ.js → chunk-PRJD5MMQ.js} +3 -3
- package/dist/chunk-PRJD5MMQ.js.map +1 -0
- package/dist/{chunk-MM7CTTAV.js → chunk-Q5FLW4JG.js} +2 -2
- package/dist/{chunk-MM7CTTAV.js.map → chunk-Q5FLW4JG.js.map} +1 -1
- package/dist/{chunk-5UWKOOIS.js → chunk-QQTYMW7N.js} +131 -209
- package/dist/chunk-QQTYMW7N.js.map +1 -0
- package/dist/{chunk-MVR3SYMN.js → chunk-QUDQTO3O.js} +4 -3
- package/dist/{chunk-MVR3SYMN.js.map → chunk-QUDQTO3O.js.map} +1 -1
- package/dist/{chunk-76ADG7LQ.js → chunk-R54KIGN2.js} +8 -22
- package/dist/chunk-R54KIGN2.js.map +1 -0
- package/dist/{chunk-XHUODHZ4.js → chunk-R7JV22QK.js} +22 -49
- package/dist/chunk-R7JV22QK.js.map +1 -0
- package/dist/{chunk-E5X6RJ4E.js → chunk-TUQF577Z.js} +56 -53
- package/dist/chunk-TUQF577Z.js.map +1 -0
- package/dist/{chunk-IHUY4M22.js → chunk-UW44KSYL.js} +4 -4
- package/dist/{chunk-DTSG5XZB.js → chunk-V3ENMW7G.js} +3 -3
- package/dist/chunk-VZRO7RYT.js +3694 -0
- package/dist/chunk-VZRO7RYT.js.map +1 -0
- package/dist/{chunk-MQ7FLIYS.js → chunk-WRRP47PY.js} +3 -2
- package/dist/{chunk-MQ7FLIYS.js.map → chunk-WRRP47PY.js.map} +1 -1
- package/dist/{chunk-RNJWAKMO.js → chunk-XGMOXMS4.js} +9 -8
- package/dist/chunk-XGMOXMS4.js.map +1 -0
- package/dist/{chunk-STMHDOZD.js → chunk-XMEIVWAS.js} +12 -9
- package/dist/chunk-XMEIVWAS.js.map +1 -0
- package/dist/{chunk-IUQBOCSU.js → chunk-ZBPEFQ4G.js} +2 -1
- package/dist/{chunk-IUQBOCSU.js.map → chunk-ZBPEFQ4G.js.map} +1 -1
- package/dist/chunk-ZU6DAR4S.js +223 -0
- package/dist/chunk-ZU6DAR4S.js.map +1 -0
- package/dist/commands/build/marketplace.js +115 -35
- package/dist/commands/build/marketplace.js.map +1 -1
- package/dist/commands/build/plugins.js +9 -10
- package/dist/commands/build/plugins.js.map +1 -1
- package/dist/commands/compile.js +135 -70
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/doctor.js +793 -64
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/edit.js +231 -236
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/eject.js +24 -39
- package/dist/commands/eject.js.map +1 -1
- package/dist/commands/init.js +41 -46
- package/dist/commands/list.js +10 -12
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/search.js +35 -88
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/uninstall.js +212 -167
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.js +82 -332
- package/dist/commands/update.js.map +1 -1
- package/dist/components/common/confirm.js +1 -1
- package/dist/components/common/prompt-confirm.js +1 -1
- package/dist/components/common/select-list.js +2 -2
- package/dist/components/common/spinner.js +1 -1
- package/dist/components/wizard/category-grid.js +5 -6
- package/dist/components/wizard/checkbox-grid.js +5 -6
- package/dist/components/wizard/domain-selection.js +12 -13
- package/dist/components/wizard/run-wizard-session.js +30 -36
- package/dist/components/wizard/scroll-affordance.js +2 -2
- package/dist/components/wizard/skill-agent-summary.js +7 -7
- package/dist/components/wizard/source-grid.js +6 -11
- package/dist/components/wizard/stack-selection.js +9 -9
- package/dist/components/wizard/step-agents.js +12 -12
- package/dist/components/wizard/step-build.js +10 -11
- package/dist/components/wizard/step-confirm.js +11 -11
- package/dist/components/wizard/step-sources.js +11 -17
- package/dist/components/wizard/step-stack.js +10 -10
- package/dist/components/wizard/summary-panel.js +10 -10
- package/dist/components/wizard/toast.js +2 -2
- package/dist/components/wizard/wizard-layout.js +15 -16
- package/dist/components/wizard/wizard-tabs.js +6 -12
- package/dist/components/wizard/wizard.js +29 -35
- package/dist/config-exports.js +1 -1
- package/dist/copy-local-skills-WVHJFRPK.js +14 -0
- package/dist/hooks/init.js +49 -48
- package/dist/hooks/init.js.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/load-agent-defs-5OT54J5M.js +15 -0
- package/dist/{loader-5JP4S7CJ.js → loader-JIZDTR4G.js} +7 -5
- package/dist/recompile-project-agents-VREEPBDV.js +20 -0
- package/dist/{source-loader-MZYCPL2S.js → source-loader-OE6EJFPU.js} +6 -6
- package/dist/src/agents/developer/ai-developer/identity.md +4 -4
- package/dist/src/agents/developer/ai-developer/playbook.md +1 -1
- package/dist/src/agents/developer/api-developer/identity.md +4 -4
- package/dist/src/agents/developer/api-developer/metadata.yaml +1 -1
- package/dist/src/agents/developer/cli-developer/identity.md +4 -4
- package/dist/src/agents/developer/web-developer/identity.md +2 -2
- package/dist/src/agents/developer/web-developer/metadata.yaml +1 -1
- package/dist/src/agents/meta/agent-summoner/identity.md +4 -5
- package/dist/src/agents/meta/agent-summoner/output.md +2 -2
- package/dist/src/agents/meta/agent-summoner/playbook.md +15 -16
- package/dist/src/agents/meta/codex-keeper/identity.md +4 -4
- package/dist/src/agents/meta/codex-keeper/playbook.md +1 -1
- package/dist/src/agents/meta/convention-keeper/identity.md +1 -1
- package/dist/src/agents/meta/skill-summoner/critical-reminders.md +0 -34
- package/dist/src/agents/meta/skill-summoner/critical-requirements.md +27 -3
- package/dist/src/agents/meta/skill-summoner/identity.md +2 -2
- package/{src/agents/planning/web-pm → dist/src/agents/planning/pm}/critical-reminders.md +10 -7
- package/dist/src/agents/planning/{web-pm → pm}/critical-requirements.md +8 -4
- package/dist/src/agents/planning/pm/identity.md +47 -0
- package/dist/src/agents/planning/pm/metadata.yaml +12 -0
- package/dist/src/agents/planning/{web-pm → pm}/output.md +7 -90
- package/dist/src/agents/planning/pm/playbook.md +185 -0
- package/dist/src/agents/researcher/ai-researcher/critical-reminders.md +58 -0
- package/dist/src/agents/researcher/ai-researcher/critical-requirements.md +40 -0
- package/dist/src/agents/researcher/ai-researcher/identity.md +86 -0
- package/dist/src/agents/researcher/ai-researcher/metadata.yaml +10 -0
- package/dist/src/agents/researcher/ai-researcher/output.md +363 -0
- package/dist/src/agents/researcher/ai-researcher/playbook.md +545 -0
- package/dist/src/agents/researcher/api-researcher/critical-reminders.md +16 -0
- package/dist/src/agents/researcher/api-researcher/identity.md +7 -7
- package/dist/src/agents/researcher/cli-researcher/critical-reminders.md +50 -0
- package/dist/src/agents/researcher/cli-researcher/critical-requirements.md +36 -0
- package/dist/src/agents/researcher/cli-researcher/identity.md +87 -0
- package/dist/src/agents/researcher/cli-researcher/metadata.yaml +10 -0
- package/dist/src/agents/researcher/cli-researcher/output.md +343 -0
- package/dist/src/agents/researcher/cli-researcher/playbook.md +370 -0
- package/dist/src/agents/researcher/web-researcher/identity.md +5 -6
- package/dist/src/agents/reviewer/reviewer/critical-reminders.md +29 -0
- package/dist/src/agents/reviewer/reviewer/critical-requirements.md +31 -0
- package/dist/src/agents/reviewer/reviewer/identity.md +41 -0
- package/dist/src/agents/reviewer/reviewer/metadata.yaml +12 -0
- package/dist/src/agents/reviewer/reviewer/output.md +202 -0
- package/dist/src/agents/reviewer/reviewer/playbook.md +141 -0
- package/dist/src/agents/tester/ai-tester/critical-reminders.md +48 -0
- package/dist/src/agents/tester/ai-tester/critical-requirements.md +49 -0
- package/dist/src/agents/tester/ai-tester/identity.md +62 -0
- package/dist/src/agents/tester/ai-tester/metadata.yaml +12 -0
- package/dist/src/agents/tester/ai-tester/output.md +375 -0
- package/dist/src/agents/tester/ai-tester/playbook.md +789 -0
- package/dist/src/agents/tester/api-tester/identity.md +3 -3
- package/dist/src/agents/tester/cli-tester/critical-reminders.md +3 -3
- package/dist/src/agents/tester/cli-tester/critical-requirements.md +2 -2
- package/dist/src/agents/tester/cli-tester/identity.md +3 -3
- package/dist/src/agents/tester/cli-tester/output.md +4 -4
- package/dist/src/agents/tester/cli-tester/playbook.md +3 -3
- package/dist/src/agents/tester/web-tester/identity.md +3 -3
- package/dist/stores/wizard-store.js +8 -6
- package/package.json +13 -2
- package/src/agents/developer/ai-developer/identity.md +4 -4
- package/src/agents/developer/ai-developer/playbook.md +1 -1
- package/src/agents/developer/api-developer/identity.md +4 -4
- package/src/agents/developer/api-developer/metadata.yaml +1 -1
- package/src/agents/developer/cli-developer/identity.md +4 -4
- package/src/agents/developer/web-developer/identity.md +2 -2
- package/src/agents/developer/web-developer/metadata.yaml +1 -1
- package/src/agents/meta/agent-summoner/identity.md +4 -5
- package/src/agents/meta/agent-summoner/output.md +2 -2
- package/src/agents/meta/agent-summoner/playbook.md +15 -16
- package/src/agents/meta/codex-keeper/identity.md +4 -4
- package/src/agents/meta/codex-keeper/playbook.md +1 -1
- package/src/agents/meta/convention-keeper/identity.md +1 -1
- package/src/agents/meta/skill-summoner/critical-reminders.md +0 -34
- package/src/agents/meta/skill-summoner/critical-requirements.md +27 -3
- package/src/agents/meta/skill-summoner/identity.md +2 -2
- package/{dist/src/agents/planning/web-pm → src/agents/planning/pm}/critical-reminders.md +10 -7
- package/src/agents/planning/{web-pm → pm}/critical-requirements.md +8 -4
- package/src/agents/planning/pm/identity.md +47 -0
- package/src/agents/planning/pm/metadata.yaml +12 -0
- package/src/agents/planning/{web-pm → pm}/output.md +7 -90
- package/src/agents/planning/pm/playbook.md +185 -0
- package/src/agents/researcher/ai-researcher/critical-reminders.md +58 -0
- package/src/agents/researcher/ai-researcher/critical-requirements.md +40 -0
- package/src/agents/researcher/ai-researcher/identity.md +86 -0
- package/src/agents/researcher/ai-researcher/metadata.yaml +10 -0
- package/src/agents/researcher/ai-researcher/output.md +363 -0
- package/src/agents/researcher/ai-researcher/playbook.md +545 -0
- package/src/agents/researcher/api-researcher/critical-reminders.md +16 -0
- package/src/agents/researcher/api-researcher/identity.md +7 -7
- package/src/agents/researcher/cli-researcher/critical-reminders.md +50 -0
- package/src/agents/researcher/cli-researcher/critical-requirements.md +36 -0
- package/src/agents/researcher/cli-researcher/identity.md +87 -0
- package/src/agents/researcher/cli-researcher/metadata.yaml +10 -0
- package/src/agents/researcher/cli-researcher/output.md +343 -0
- package/src/agents/researcher/cli-researcher/playbook.md +370 -0
- package/src/agents/researcher/web-researcher/identity.md +5 -6
- package/src/agents/reviewer/reviewer/critical-reminders.md +29 -0
- package/src/agents/reviewer/reviewer/critical-requirements.md +31 -0
- package/src/agents/reviewer/reviewer/identity.md +41 -0
- package/src/agents/reviewer/reviewer/metadata.yaml +12 -0
- package/src/agents/reviewer/reviewer/output.md +202 -0
- package/src/agents/reviewer/reviewer/playbook.md +141 -0
- package/src/agents/tester/ai-tester/critical-reminders.md +48 -0
- package/src/agents/tester/ai-tester/critical-requirements.md +49 -0
- package/src/agents/tester/ai-tester/identity.md +62 -0
- package/src/agents/tester/ai-tester/metadata.yaml +12 -0
- package/src/agents/tester/ai-tester/output.md +375 -0
- package/src/agents/tester/ai-tester/playbook.md +789 -0
- package/src/agents/tester/api-tester/identity.md +3 -3
- package/src/agents/tester/cli-tester/critical-reminders.md +3 -3
- package/src/agents/tester/cli-tester/critical-requirements.md +2 -2
- package/src/agents/tester/cli-tester/identity.md +3 -3
- package/src/agents/tester/cli-tester/output.md +4 -4
- package/src/agents/tester/cli-tester/playbook.md +3 -3
- package/src/agents/tester/web-tester/identity.md +3 -3
- package/src/schemas/metadata.schema.json +31 -2
- package/src/schemas/plugin.schema.json +3 -0
- package/src/schemas/project-config.schema.json +61 -15
- package/src/schemas/project-source-config.schema.json +0 -47
- package/dist/chunk-5GUOIJSG.js.map +0 -1
- package/dist/chunk-5UWKOOIS.js.map +0 -1
- package/dist/chunk-76ADG7LQ.js.map +0 -1
- package/dist/chunk-BNSRA6HL.js.map +0 -1
- package/dist/chunk-E5X6RJ4E.js.map +0 -1
- package/dist/chunk-EEPELKOM.js +0 -5938
- package/dist/chunk-EEPELKOM.js.map +0 -1
- package/dist/chunk-F7T5AFFN.js +0 -20
- package/dist/chunk-F7T5AFFN.js.map +0 -1
- package/dist/chunk-FVDKAVOL.js.map +0 -1
- package/dist/chunk-KFB5CRXZ.js +0 -377
- package/dist/chunk-KFB5CRXZ.js.map +0 -1
- package/dist/chunk-KR65TPKC.js +0 -664
- package/dist/chunk-KR65TPKC.js.map +0 -1
- package/dist/chunk-LASI35KT.js.map +0 -1
- package/dist/chunk-LDP5ASDM.js.map +0 -1
- package/dist/chunk-LZ52XEPR.js.map +0 -1
- package/dist/chunk-M7HO7NBK.js +0 -88
- package/dist/chunk-M7HO7NBK.js.map +0 -1
- package/dist/chunk-MWG4VU64.js.map +0 -1
- package/dist/chunk-ODNDXQH2.js +0 -77
- package/dist/chunk-ODNDXQH2.js.map +0 -1
- package/dist/chunk-P44SXVH3.js +0 -80
- package/dist/chunk-P44SXVH3.js.map +0 -1
- package/dist/chunk-PMM2MYMA.js.map +0 -1
- package/dist/chunk-PZIZNMHK.js.map +0 -1
- package/dist/chunk-Q45ZU6HD.js +0 -37
- package/dist/chunk-Q45ZU6HD.js.map +0 -1
- package/dist/chunk-QRDTLVXG.js.map +0 -1
- package/dist/chunk-QZZJFYUQ.js.map +0 -1
- package/dist/chunk-R5NOI2LP.js +0 -170
- package/dist/chunk-R5NOI2LP.js.map +0 -1
- package/dist/chunk-RNJWAKMO.js.map +0 -1
- package/dist/chunk-SBHBBZKF.js +0 -284
- package/dist/chunk-SBHBBZKF.js.map +0 -1
- package/dist/chunk-SKQWRUPX.js.map +0 -1
- package/dist/chunk-STMHDOZD.js.map +0 -1
- package/dist/chunk-SX5H6TSC.js.map +0 -1
- package/dist/chunk-TUPYW2IQ.js.map +0 -1
- package/dist/chunk-UBEDZ4FD.js +0 -4198
- package/dist/chunk-UBEDZ4FD.js.map +0 -1
- package/dist/chunk-VY6MNOXL.js +0 -20
- package/dist/chunk-VY6MNOXL.js.map +0 -1
- package/dist/chunk-WBCPLH66.js +0 -42
- package/dist/chunk-WBCPLH66.js.map +0 -1
- package/dist/chunk-WKTHWQKM.js.map +0 -1
- package/dist/chunk-XHUODHZ4.js.map +0 -1
- package/dist/chunk-ZPPHXXAP.js +0 -252
- package/dist/chunk-ZPPHXXAP.js.map +0 -1
- package/dist/commands/import/skill.js +0 -344
- package/dist/commands/import/skill.js.map +0 -1
- package/dist/commands/new/agent.js +0 -300
- package/dist/commands/new/agent.js.map +0 -1
- package/dist/commands/new/marketplace.js +0 -310
- package/dist/commands/new/marketplace.js.map +0 -1
- package/dist/commands/new/skill.js +0 -26
- package/dist/commands/validate.js +0 -575
- package/dist/commands/validate.js.map +0 -1
- package/dist/components/wizard/search-modal.js +0 -13
- package/dist/components/wizard/selection-card.js +0 -9
- package/dist/components/wizard/step-settings.js +0 -18
- package/dist/copy-local-skills-6EMVN7RB.js +0 -14
- package/dist/load-agent-defs-BWOUVEAR.js +0 -15
- package/dist/load-agent-defs-BWOUVEAR.js.map +0 -1
- package/dist/loader-5JP4S7CJ.js.map +0 -1
- package/dist/recompile-project-agents-6DL45TDI.js +0 -19
- package/dist/recompile-project-agents-6DL45TDI.js.map +0 -1
- package/dist/source-loader-MZYCPL2S.js.map +0 -1
- package/dist/src/agents/developer/web-architecture/critical-reminders.md +0 -48
- package/dist/src/agents/developer/web-architecture/critical-requirements.md +0 -65
- package/dist/src/agents/developer/web-architecture/identity.md +0 -64
- package/dist/src/agents/developer/web-architecture/metadata.yaml +0 -12
- package/dist/src/agents/developer/web-architecture/output.md +0 -449
- package/dist/src/agents/developer/web-architecture/playbook.md +0 -481
- package/dist/src/agents/pattern/pattern-scout/critical-reminders.md +0 -71
- package/dist/src/agents/pattern/pattern-scout/critical-requirements.md +0 -31
- package/dist/src/agents/pattern/pattern-scout/identity.md +0 -25
- package/dist/src/agents/pattern/pattern-scout/metadata.yaml +0 -10
- package/dist/src/agents/pattern/pattern-scout/output.md +0 -290
- package/dist/src/agents/pattern/pattern-scout/playbook.md +0 -1806
- package/dist/src/agents/pattern/web-pattern-critique/critical-reminders.md +0 -30
- package/dist/src/agents/pattern/web-pattern-critique/critical-requirements.md +0 -28
- package/dist/src/agents/pattern/web-pattern-critique/identity.md +0 -41
- package/dist/src/agents/pattern/web-pattern-critique/metadata.yaml +0 -12
- package/dist/src/agents/pattern/web-pattern-critique/output.md +0 -314
- package/dist/src/agents/pattern/web-pattern-critique/playbook.md +0 -572
- package/dist/src/agents/planning/api-pm/critical-reminders.md +0 -48
- package/dist/src/agents/planning/api-pm/critical-requirements.md +0 -41
- package/dist/src/agents/planning/api-pm/identity.md +0 -39
- package/dist/src/agents/planning/api-pm/metadata.yaml +0 -12
- package/dist/src/agents/planning/api-pm/output.md +0 -475
- package/dist/src/agents/planning/api-pm/playbook.md +0 -129
- package/dist/src/agents/planning/web-pm/identity.md +0 -26
- package/dist/src/agents/planning/web-pm/metadata.yaml +0 -12
- package/dist/src/agents/planning/web-pm/playbook.md +0 -318
- package/dist/src/agents/reviewer/ai-reviewer/critical-reminders.md +0 -40
- package/dist/src/agents/reviewer/ai-reviewer/critical-requirements.md +0 -37
- package/dist/src/agents/reviewer/ai-reviewer/identity.md +0 -51
- package/dist/src/agents/reviewer/ai-reviewer/metadata.yaml +0 -10
- package/dist/src/agents/reviewer/ai-reviewer/output.md +0 -395
- package/dist/src/agents/reviewer/ai-reviewer/playbook.md +0 -90
- package/dist/src/agents/reviewer/api-reviewer/critical-reminders.md +0 -31
- package/dist/src/agents/reviewer/api-reviewer/critical-requirements.md +0 -27
- package/dist/src/agents/reviewer/api-reviewer/identity.md +0 -51
- package/dist/src/agents/reviewer/api-reviewer/metadata.yaml +0 -12
- package/dist/src/agents/reviewer/api-reviewer/output.md +0 -343
- package/dist/src/agents/reviewer/api-reviewer/playbook.md +0 -288
- package/dist/src/agents/reviewer/cli-reviewer/critical-reminders.md +0 -33
- package/dist/src/agents/reviewer/cli-reviewer/critical-requirements.md +0 -30
- package/dist/src/agents/reviewer/cli-reviewer/identity.md +0 -44
- package/dist/src/agents/reviewer/cli-reviewer/metadata.yaml +0 -12
- package/dist/src/agents/reviewer/cli-reviewer/output.md +0 -414
- package/dist/src/agents/reviewer/cli-reviewer/playbook.md +0 -218
- package/dist/src/agents/reviewer/infra-reviewer/critical-reminders.md +0 -38
- package/dist/src/agents/reviewer/infra-reviewer/critical-requirements.md +0 -38
- package/dist/src/agents/reviewer/infra-reviewer/identity.md +0 -53
- package/dist/src/agents/reviewer/infra-reviewer/metadata.yaml +0 -10
- package/dist/src/agents/reviewer/infra-reviewer/output.md +0 -364
- package/dist/src/agents/reviewer/infra-reviewer/playbook.md +0 -161
- package/dist/src/agents/reviewer/web-reviewer/critical-reminders.md +0 -31
- package/dist/src/agents/reviewer/web-reviewer/critical-requirements.md +0 -26
- package/dist/src/agents/reviewer/web-reviewer/identity.md +0 -40
- package/dist/src/agents/reviewer/web-reviewer/metadata.yaml +0 -12
- package/dist/src/agents/reviewer/web-reviewer/output.md +0 -333
- package/dist/src/agents/reviewer/web-reviewer/playbook.md +0 -156
- package/src/agents/developer/web-architecture/critical-reminders.md +0 -48
- package/src/agents/developer/web-architecture/critical-requirements.md +0 -65
- package/src/agents/developer/web-architecture/identity.md +0 -64
- package/src/agents/developer/web-architecture/metadata.yaml +0 -12
- package/src/agents/developer/web-architecture/output.md +0 -449
- package/src/agents/developer/web-architecture/playbook.md +0 -481
- package/src/agents/pattern/pattern-scout/critical-reminders.md +0 -71
- package/src/agents/pattern/pattern-scout/critical-requirements.md +0 -31
- package/src/agents/pattern/pattern-scout/identity.md +0 -25
- package/src/agents/pattern/pattern-scout/metadata.yaml +0 -10
- package/src/agents/pattern/pattern-scout/output.md +0 -290
- package/src/agents/pattern/pattern-scout/playbook.md +0 -1806
- package/src/agents/pattern/web-pattern-critique/critical-reminders.md +0 -30
- package/src/agents/pattern/web-pattern-critique/critical-requirements.md +0 -28
- package/src/agents/pattern/web-pattern-critique/identity.md +0 -41
- package/src/agents/pattern/web-pattern-critique/metadata.yaml +0 -12
- package/src/agents/pattern/web-pattern-critique/output.md +0 -314
- package/src/agents/pattern/web-pattern-critique/playbook.md +0 -572
- package/src/agents/planning/api-pm/critical-reminders.md +0 -48
- package/src/agents/planning/api-pm/critical-requirements.md +0 -41
- package/src/agents/planning/api-pm/identity.md +0 -39
- package/src/agents/planning/api-pm/metadata.yaml +0 -12
- package/src/agents/planning/api-pm/output.md +0 -475
- package/src/agents/planning/api-pm/playbook.md +0 -129
- package/src/agents/planning/web-pm/identity.md +0 -26
- package/src/agents/planning/web-pm/metadata.yaml +0 -12
- package/src/agents/planning/web-pm/playbook.md +0 -318
- package/src/agents/reviewer/ai-reviewer/critical-reminders.md +0 -40
- package/src/agents/reviewer/ai-reviewer/critical-requirements.md +0 -37
- package/src/agents/reviewer/ai-reviewer/identity.md +0 -51
- package/src/agents/reviewer/ai-reviewer/metadata.yaml +0 -10
- package/src/agents/reviewer/ai-reviewer/output.md +0 -395
- package/src/agents/reviewer/ai-reviewer/playbook.md +0 -90
- package/src/agents/reviewer/api-reviewer/critical-reminders.md +0 -31
- package/src/agents/reviewer/api-reviewer/critical-requirements.md +0 -27
- package/src/agents/reviewer/api-reviewer/identity.md +0 -51
- package/src/agents/reviewer/api-reviewer/metadata.yaml +0 -12
- package/src/agents/reviewer/api-reviewer/output.md +0 -343
- package/src/agents/reviewer/api-reviewer/playbook.md +0 -288
- package/src/agents/reviewer/cli-reviewer/critical-reminders.md +0 -33
- package/src/agents/reviewer/cli-reviewer/critical-requirements.md +0 -30
- package/src/agents/reviewer/cli-reviewer/identity.md +0 -44
- package/src/agents/reviewer/cli-reviewer/metadata.yaml +0 -12
- package/src/agents/reviewer/cli-reviewer/output.md +0 -414
- package/src/agents/reviewer/cli-reviewer/playbook.md +0 -218
- package/src/agents/reviewer/infra-reviewer/critical-reminders.md +0 -38
- package/src/agents/reviewer/infra-reviewer/critical-requirements.md +0 -38
- package/src/agents/reviewer/infra-reviewer/identity.md +0 -53
- package/src/agents/reviewer/infra-reviewer/metadata.yaml +0 -10
- package/src/agents/reviewer/infra-reviewer/output.md +0 -364
- package/src/agents/reviewer/infra-reviewer/playbook.md +0 -161
- package/src/agents/reviewer/web-reviewer/critical-reminders.md +0 -31
- package/src/agents/reviewer/web-reviewer/critical-requirements.md +0 -26
- package/src/agents/reviewer/web-reviewer/identity.md +0 -40
- package/src/agents/reviewer/web-reviewer/metadata.yaml +0 -12
- package/src/agents/reviewer/web-reviewer/output.md +0 -333
- package/src/agents/reviewer/web-reviewer/playbook.md +0 -156
- /package/dist/{chunk-ZL7PFNHN.js.map → chunk-K3O3YQYG.js.map} +0 -0
- /package/dist/{chunk-IHUY4M22.js.map → chunk-UW44KSYL.js.map} +0 -0
- /package/dist/{chunk-DTSG5XZB.js.map → chunk-V3ENMW7G.js.map} +0 -0
- /package/dist/{commands/new/skill.js.map → copy-local-skills-WVHJFRPK.js.map} +0 -0
- /package/dist/{components/wizard/search-modal.js.map → load-agent-defs-5OT54J5M.js.map} +0 -0
- /package/dist/{components/wizard/selection-card.js.map → loader-JIZDTR4G.js.map} +0 -0
- /package/dist/{components/wizard/step-settings.js.map → recompile-project-agents-VREEPBDV.js.map} +0 -0
- /package/dist/{copy-local-skills-6EMVN7RB.js.map → source-loader-OE6EJFPU.js.map} +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
StackSelection
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2IMYK4WN.js";
|
|
5
5
|
|
|
6
6
|
// src/cli/components/wizard/step-stack.tsx
|
|
7
7
|
import { Box } from "ink";
|
|
8
|
+
import "react";
|
|
8
9
|
import { jsx } from "react/jsx-runtime";
|
|
9
10
|
var StepStack = ({ onCancel }) => {
|
|
10
11
|
return /* @__PURE__ */ jsx(Box, { flexDirection: "column", width: "100%", flexGrow: 1, flexBasis: 0, children: /* @__PURE__ */ jsx(Box, { flexGrow: 1, flexBasis: 0, children: /* @__PURE__ */ jsx(StackSelection, { onCancel }) }) });
|
|
@@ -13,4 +14,4 @@ var StepStack = ({ onCancel }) => {
|
|
|
13
14
|
export {
|
|
14
15
|
StepStack
|
|
15
16
|
};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-WRRP47PY.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli/components/wizard/step-stack.tsx"],"sourcesContent":["import { Box } from \"ink\";\nimport React from \"react\";\nimport { StackSelection } from \"./stack-selection.js\";\n\ntype StepStackProps = {\n onCancel?: () => void;\n};\n\n/**\n * First step of the wizard: select a stack or \"Start from scratch\".\n *\n * After selection, the wizard transitions to the \"domains\" step.\n */\nexport const StepStack: React.FC<StepStackProps> = ({ onCancel }) => {\n return (\n <Box flexDirection=\"column\" width=\"100%\" flexGrow={1} flexBasis={0}>\n <Box flexGrow={1} flexBasis={0}>\n <StackSelection onCancel={onCancel} />\n </Box>\n </Box>\n );\n};\n"],"mappings":";;;;;;AAAA,SAAS,WAAW;
|
|
1
|
+
{"version":3,"sources":["../src/cli/components/wizard/step-stack.tsx"],"sourcesContent":["import { Box } from \"ink\";\nimport React from \"react\";\nimport { StackSelection } from \"./stack-selection.js\";\n\ntype StepStackProps = {\n onCancel?: () => void;\n};\n\n/**\n * First step of the wizard: select a stack or \"Start from scratch\".\n *\n * After selection, the wizard transitions to the \"domains\" step.\n */\nexport const StepStack: React.FC<StepStackProps> = ({ onCancel }) => {\n return (\n <Box flexDirection=\"column\" width=\"100%\" flexGrow={1} flexBasis={0}>\n <Box flexGrow={1} flexBasis={0}>\n <StackSelection onCancel={onCancel} />\n </Box>\n </Box>\n );\n};\n"],"mappings":";;;;;;AAAA,SAAS,WAAW;AACpB,OAAkB;AAgBV;AAJD,IAAM,YAAsC,CAAC,EAAE,SAAS,MAAM;AACnE,SACE,oBAAC,OAAI,eAAc,UAAS,OAAM,QAAO,UAAU,GAAG,WAAW,GAC/D,8BAAC,OAAI,UAAU,GAAG,WAAW,GAC3B,8BAAC,kBAAe,UAAoB,GACtC,GACF;AAEJ;","names":[]}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
CLI_COLORS,
|
|
7
7
|
UI_SYMBOLS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-R54KIGN2.js";
|
|
9
9
|
|
|
10
10
|
// src/cli/components/common/select-list.tsx
|
|
11
11
|
import { useCallback } from "react";
|
|
@@ -20,26 +20,27 @@ function SelectList({
|
|
|
20
20
|
}) {
|
|
21
21
|
const handleEnter = useCallback(
|
|
22
22
|
(index) => {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
const item = items[index];
|
|
24
|
+
if (item) {
|
|
25
|
+
onSelect(item.value);
|
|
25
26
|
}
|
|
26
27
|
},
|
|
27
28
|
[items, onSelect]
|
|
28
29
|
);
|
|
29
30
|
const { focusedIndex } = useKeyboardNavigation(
|
|
30
31
|
items.length,
|
|
31
|
-
{ onEnter: handleEnter, onEscape: onCancel },
|
|
32
|
-
{ vimKeys: false, active }
|
|
32
|
+
{ onEnter: handleEnter, ...onCancel !== void 0 && { onEscape: onCancel } },
|
|
33
|
+
{ vimKeys: false, ...active !== void 0 && { active } }
|
|
33
34
|
);
|
|
34
35
|
return /* @__PURE__ */ jsx(Box, { flexDirection: "column", children: items.map((item, index) => {
|
|
35
36
|
const isFocused = index === focusedIndex;
|
|
36
37
|
const marker = isFocused ? UI_SYMBOLS.CHEVRON : UI_SYMBOLS.CHEVRON_SPACER;
|
|
37
38
|
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
38
|
-
/* @__PURE__ */ jsxs(Text, { bold: isFocused, color:
|
|
39
|
+
/* @__PURE__ */ jsxs(Text, { bold: isFocused, ...isFocused && { color: CLI_COLORS.PRIMARY }, children: [
|
|
39
40
|
marker,
|
|
40
41
|
" "
|
|
41
42
|
] }),
|
|
42
|
-
renderItem ? renderItem(item, isFocused) : /* @__PURE__ */ jsx(Text, { bold: isFocused, color:
|
|
43
|
+
renderItem ? renderItem(item, isFocused) : /* @__PURE__ */ jsx(Text, { bold: isFocused, ...isFocused && { color: CLI_COLORS.PRIMARY }, children: item.label })
|
|
43
44
|
] }, index);
|
|
44
45
|
}) });
|
|
45
46
|
}
|
|
@@ -47,4 +48,4 @@ function SelectList({
|
|
|
47
48
|
export {
|
|
48
49
|
SelectList
|
|
49
50
|
};
|
|
50
|
-
//# sourceMappingURL=chunk-
|
|
51
|
+
//# sourceMappingURL=chunk-XGMOXMS4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli/components/common/select-list.tsx"],"sourcesContent":["import React, { useCallback } from \"react\";\nimport { Box, Text } from \"ink\";\nimport { CLI_COLORS, UI_SYMBOLS } from \"../../consts.js\";\nimport { useKeyboardNavigation } from \"../hooks/use-keyboard-navigation.js\";\n\nexport type SelectListItem<T> = {\n value: T;\n label: string;\n};\n\nexport type SelectListProps<T> = {\n items: readonly SelectListItem<T>[];\n onSelect: (value: T) => void;\n onCancel?: (() => void) | undefined;\n renderItem?: ((item: SelectListItem<T>, isFocused: boolean) => React.ReactNode) | undefined;\n active?: boolean | undefined;\n};\n\nexport function SelectList<T>({\n items,\n onSelect,\n onCancel,\n renderItem,\n active,\n}: SelectListProps<T>): React.ReactElement {\n const handleEnter = useCallback(\n (index: number) => {\n const item = items[index];\n if (item) {\n onSelect(item.value);\n }\n },\n [items, onSelect],\n );\n\n const { focusedIndex } = useKeyboardNavigation(\n items.length,\n { onEnter: handleEnter, ...(onCancel !== undefined && { onEscape: onCancel }) },\n { vimKeys: false, ...(active !== undefined && { active }) },\n );\n\n return (\n <Box flexDirection=\"column\">\n {items.map((item, index) => {\n const isFocused = index === focusedIndex;\n const marker = isFocused ? UI_SYMBOLS.CHEVRON : UI_SYMBOLS.CHEVRON_SPACER;\n\n return (\n <Box key={index}>\n <Text bold={isFocused} {...(isFocused && { color: CLI_COLORS.PRIMARY })}>\n {marker}{\" \"}\n </Text>\n {renderItem ? (\n renderItem(item, isFocused)\n ) : (\n <Text bold={isFocused} {...(isFocused && { color: CLI_COLORS.PRIMARY })}>\n {item.label}\n </Text>\n )}\n </Box>\n );\n })}\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAgB,mBAAmB;AACnC,SAAS,KAAK,YAAY;AAgDd,SAME,KANF;AA/BL,SAAS,WAAc;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA2C;AACzC,QAAM,cAAc;AAAA,IAClB,CAAC,UAAkB;AACjB,YAAM,OAAO,MAAM,KAAK;AACxB,UAAI,MAAM;AACR,iBAAS,KAAK,KAAK;AAAA,MACrB;AAAA,IACF;AAAA,IACA,CAAC,OAAO,QAAQ;AAAA,EAClB;AAEA,QAAM,EAAE,aAAa,IAAI;AAAA,IACvB,MAAM;AAAA,IACN,EAAE,SAAS,aAAa,GAAI,aAAa,UAAa,EAAE,UAAU,SAAS,EAAG;AAAA,IAC9E,EAAE,SAAS,OAAO,GAAI,WAAW,UAAa,EAAE,OAAO,EAAG;AAAA,EAC5D;AAEA,SACE,oBAAC,OAAI,eAAc,UAChB,gBAAM,IAAI,CAAC,MAAM,UAAU;AAC1B,UAAM,YAAY,UAAU;AAC5B,UAAM,SAAS,YAAY,WAAW,UAAU,WAAW;AAE3D,WACE,qBAAC,OACC;AAAA,2BAAC,QAAK,MAAM,WAAY,GAAI,aAAa,EAAE,OAAO,WAAW,QAAQ,GAClE;AAAA;AAAA,QAAQ;AAAA,SACX;AAAA,MACC,aACC,WAAW,MAAM,SAAS,IAE1B,oBAAC,QAAK,MAAM,WAAY,GAAI,aAAa,EAAE,OAAO,WAAW,QAAQ,GAClE,eAAK,OACR;AAAA,SATM,KAWV;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
compileAgents
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZU6DAR4S.js";
|
|
5
5
|
import {
|
|
6
6
|
ConfigLoadError,
|
|
7
7
|
buildAndMergeConfig,
|
|
@@ -14,27 +14,27 @@ import {
|
|
|
14
14
|
loadSkillsMatrixFromSource,
|
|
15
15
|
resolveInstallPaths,
|
|
16
16
|
writeScopedFromWizard
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-CBF4ZYV3.js";
|
|
18
18
|
import {
|
|
19
19
|
disableBuffering,
|
|
20
20
|
drainBuffer,
|
|
21
21
|
enableBuffering,
|
|
22
22
|
ensureDir,
|
|
23
23
|
loadMergedAgents
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-4VCWL2IG.js";
|
|
25
25
|
|
|
26
26
|
// src/cli/lib/operations/source/load-source.ts
|
|
27
27
|
async function loadSource(options) {
|
|
28
|
-
const { sourceFlag, projectDir,
|
|
28
|
+
const { caller, sourceFlag, projectDir, captureStartupMessages } = options;
|
|
29
29
|
if (captureStartupMessages) {
|
|
30
30
|
enableBuffering();
|
|
31
31
|
}
|
|
32
32
|
let sourceResult;
|
|
33
33
|
try {
|
|
34
34
|
sourceResult = await loadSkillsMatrixFromSource({
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
...caller !== void 0 && { caller },
|
|
36
|
+
...sourceFlag !== void 0 && { sourceFlag },
|
|
37
|
+
projectDir
|
|
38
38
|
});
|
|
39
39
|
} catch (error) {
|
|
40
40
|
if (captureStartupMessages) {
|
|
@@ -114,7 +114,9 @@ async function writeProjectConfig(options) {
|
|
|
114
114
|
config: finalConfig,
|
|
115
115
|
configPath: projectPaths.configPath,
|
|
116
116
|
wasMerged: mergeResult.merged,
|
|
117
|
-
|
|
117
|
+
...mergeResult.existingConfigPath !== void 0 && {
|
|
118
|
+
existingConfigPath: mergeResult.existingConfigPath
|
|
119
|
+
},
|
|
118
120
|
filesWritten: isProjectContext ? 4 : 2,
|
|
119
121
|
propagation
|
|
120
122
|
};
|
|
@@ -149,6 +151,7 @@ async function compileAgentsAllScopes(options) {
|
|
|
149
151
|
function mergeCompilationResults(...results) {
|
|
150
152
|
return {
|
|
151
153
|
compiled: results.flatMap((r) => r.compiled),
|
|
154
|
+
rewritten: results.flatMap((r) => r.rewritten),
|
|
152
155
|
failed: results.flatMap((r) => r.failed),
|
|
153
156
|
warnings: results.flatMap((r) => r.warnings)
|
|
154
157
|
};
|
|
@@ -161,4 +164,4 @@ export {
|
|
|
161
164
|
writeProjectConfig,
|
|
162
165
|
compileAgentsAllScopes
|
|
163
166
|
};
|
|
164
|
-
//# sourceMappingURL=chunk-
|
|
167
|
+
//# sourceMappingURL=chunk-XMEIVWAS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli/lib/operations/source/load-source.ts","../src/cli/lib/operations/project/detect-project.ts","../src/cli/lib/operations/project/detect-both-installations.ts","../src/cli/lib/operations/project/write-project-config.ts","../src/cli/lib/operations/project/compile-agents-all-scopes.ts"],"sourcesContent":["import { loadSkillsMatrixFromSource, type SourceLoadResult } from \"../../loading/index.js\";\nimport type { SourceCaller } from \"../../configuration/index.js\";\nimport {\n enableBuffering,\n drainBuffer,\n disableBuffering,\n type StartupMessage,\n} from \"../../../utils/logger.js\";\n\nexport type LoadSourceOptions = {\n /** Whether this load may reach the init-time source rungs — see {@link SourceCaller}. */\n caller?: SourceCaller;\n sourceFlag?: string;\n projectDir: string;\n /** When true, enables message buffering and captures startup messages. Default: false. */\n captureStartupMessages?: boolean;\n};\n\nexport type LoadedSource = {\n sourceResult: SourceLoadResult;\n /** Empty array when captureStartupMessages is false. */\n startupMessages: StartupMessage[];\n};\n\n/**\n * Loads the skills matrix from a resolved source.\n *\n * When `captureStartupMessages` is true, wraps the load in buffer mode so\n * warn() calls during loading are captured instead of written to stderr.\n * The caller (init/edit) hands them to the wizard, which paints them as a band\n * above the step — stderr does not survive the wizard clearing the terminal.\n *\n * @throws {Error} If source resolution or fetching fails.\n */\nexport async function loadSource(options: LoadSourceOptions): Promise<LoadedSource> {\n const { caller, sourceFlag, projectDir, captureStartupMessages } = options;\n\n if (captureStartupMessages) {\n enableBuffering();\n }\n\n let sourceResult: SourceLoadResult;\n try {\n sourceResult = await loadSkillsMatrixFromSource({\n ...(caller !== undefined && { caller }),\n ...(sourceFlag !== undefined && { sourceFlag }),\n projectDir,\n });\n } catch (error) {\n if (captureStartupMessages) {\n disableBuffering();\n }\n throw error;\n }\n\n let startupMessages: StartupMessage[] = [];\n if (captureStartupMessages) {\n startupMessages = drainBuffer();\n disableBuffering();\n }\n\n return { sourceResult, startupMessages };\n}\n","import { detectInstallation, type Installation } from \"../../installation/index.js\";\nimport { ConfigLoadError, loadProjectConfig } from \"../../configuration/index.js\";\nimport type { ProjectConfig } from \"../../../types/index.js\";\n\nexport type DetectedProject = {\n installation: Installation;\n config: ProjectConfig | null;\n configPath: string | null;\n};\n\n/**\n * Detects an existing CLI installation and loads its project config.\n *\n * Uses detectInstallation() which checks project-level first, then falls back\n * to global. Returns the installation metadata plus the loaded config.\n *\n * Does NOT throw. Returns null when no installation is found OR when the config\n * file exists but is corrupt — the caller (doctor, edit) reports the resulting\n * null as a config/installation problem to the user. `compile` deliberately\n * does NOT use this wrapper: it detects scopes directly so it can hard-error on\n * a corrupt config instead of degrading to null.\n */\nexport async function detectProject(projectDir?: string): Promise<DetectedProject | null> {\n const resolvedDir = projectDir ?? process.cwd();\n\n let installation: Installation | null;\n try {\n installation = await detectInstallation(resolvedDir);\n } catch (error) {\n if (error instanceof ConfigLoadError) return null;\n throw error;\n }\n\n if (!installation) {\n return null;\n }\n\n const loaded = await loadProjectConfig(installation.projectDir);\n\n return {\n installation,\n config: loaded?.config ?? null,\n configPath: loaded?.configPath ?? null,\n };\n}\n","import {\n detectGlobalInstallation,\n detectProjectInstallation,\n isHomeDirectory,\n type Installation,\n} from \"../../installation/index.js\";\n\nexport type BothInstallations = {\n global: Installation | null;\n project: Installation | null;\n hasBoth: boolean;\n};\n\n/**\n * Detects both global and project installations.\n *\n * Skips project detection when projectDir is the home directory\n * to avoid double-compile. Returns a convenience `hasBoth` flag\n * used by callers to set scopeFilter on compile passes.\n */\nexport async function detectBothInstallations(projectDir: string): Promise<BothInstallations> {\n const global = await detectGlobalInstallation();\n\n const project = isHomeDirectory(projectDir) ? null : await detectProjectInstallation(projectDir);\n return { global, project, hasBoth: !!global && !!project };\n}\n","import path from \"path\";\nimport {\n buildAndMergeConfig,\n resolveInstallPaths,\n isHomeDirectory,\n} from \"../../installation/index.js\";\nimport { loadMergedAgents, type SourceLoadResult } from \"../../loading/index.js\";\nimport type { AuthoritativeScope } from \"../../configuration/index.js\";\nimport {\n ensureBlankPair,\n writeScopedFromWizard,\n type GateReport,\n} from \"../../config-gate/index.js\";\nimport { ensureDir } from \"../../../utils/fs.js\";\nimport type { ProjectConfig, AgentDefinition, AgentName } from \"../../../types/index.js\";\nimport type { WizardResultV2 } from \"../../../components/wizard/wizard.js\";\n\nexport type ConfigWriteOptions = {\n wizardResult: WizardResultV2;\n sourceResult: SourceLoadResult;\n projectDir: string;\n sourceFlag?: string;\n /** Pre-loaded agent definitions. If omitted, loads from CLI + source. */\n agents?: Partial<Record<AgentName, AgentDefinition>>;\n /**\n * Authority of `cc edit`'s newConfig over absent entries (D-233 Scenario C):\n * `\"all\"` (global edit) drops any deselected entry, `\"owned\"` (project edit) drops deselected\n * project-owned entries only, `undefined` (init) keeps additive union-preserve.\n */\n authoritativeScope?: AuthoritativeScope;\n};\n\nexport type ConfigWriteResult = {\n config: ProjectConfig;\n configPath: string;\n wasMerged: boolean;\n existingConfigPath?: string;\n filesWritten: number;\n /**\n * What the gated write did: what moved in the global config, which registered\n * projects it fanned out to, and the recompile it drove in them. The caller\n * renders it; the work is already done.\n */\n propagation: GateReport;\n};\n\n/**\n * Builds, merges, and writes project configuration files.\n *\n * Handles the full config pipeline:\n * 1. buildAndMergeConfig() — generates config from wizard result, merges with existing\n * 2. loadAllAgents() — loads agent definitions for config-types generation\n * 3. ensureBlankPair() — ensures the global config pair exists (when in project context)\n * 4. writeScopedFromWizard() — writes config.ts and config-types.ts split by scope,\n * fans global changes out to registered projects and recompiles their agents\n */\nexport async function writeProjectConfig(options: ConfigWriteOptions): Promise<ConfigWriteResult> {\n const { wizardResult, sourceResult, projectDir, sourceFlag } = options;\n const projectPaths = resolveInstallPaths(projectDir, \"project\");\n\n await ensureDir(path.dirname(projectPaths.configPath));\n\n let agents: Partial<Record<AgentName, AgentDefinition>>;\n if (options.agents) {\n agents = options.agents;\n } else {\n agents = await loadMergedAgents(sourceResult.sourcePath);\n }\n\n const mergeResult = await buildAndMergeConfig(\n wizardResult,\n sourceResult,\n projectDir,\n sourceFlag,\n options.authoritativeScope,\n );\n const finalConfig = mergeResult.config;\n\n const isProjectContext = !isHomeDirectory(projectDir);\n\n if (isProjectContext) {\n await ensureBlankPair();\n }\n\n const propagation = await writeScopedFromWizard({\n finalConfig,\n matrix: sourceResult.matrix,\n agents,\n projectDir,\n projectConfigPath: projectPaths.configPath,\n projectInstallationExists: isProjectContext,\n });\n\n return {\n config: finalConfig,\n configPath: projectPaths.configPath,\n wasMerged: mergeResult.merged,\n ...(mergeResult.existingConfigPath !== undefined && {\n existingConfigPath: mergeResult.existingConfigPath,\n }),\n filesWritten: isProjectContext ? 4 : 2,\n propagation,\n };\n}\n","import os from \"os\";\nimport { compileAgents, type CompilationResult } from \"./compile-agents.js\";\nimport { isHomeDirectory, resolveInstallPaths } from \"../../installation/index.js\";\nimport type { AgentName, SkillDefinitionMap, SkillScope } from \"../../../types/index.js\";\n\nexport type CompileAllScopesOptions = {\n /** Working directory of the command — a project root, or home for global context. */\n projectDir: string;\n sourcePath: string;\n skills: SkillDefinitionMap;\n agentScopeMap: Map<AgentName, SkillScope>;\n};\n\n/**\n * Compiles agents for every scope the current context owns.\n *\n * Home context: a single pass writing to the home agents directory.\n * Project context: a global pass (from home) then a project pass, each\n * filtered to its own scope so the project pass cannot overwrite global\n * agents with zero-skill versions. Results merge in pass order.\n */\nexport async function compileAgentsAllScopes(\n options: CompileAllScopesOptions,\n): Promise<CompilationResult> {\n const { projectDir, sourcePath, skills, agentScopeMap } = options;\n const base = { sourcePath, skills, agentScopeMap };\n\n if (isHomeDirectory(projectDir)) {\n return compileAgents({\n ...base,\n projectDir,\n outputDir: resolveInstallPaths(projectDir, \"project\").agentsDir,\n });\n }\n\n const globalResult = await compileAgents({\n ...base,\n projectDir: os.homedir(),\n outputDir: resolveInstallPaths(os.homedir(), \"global\").agentsDir,\n scopeFilter: \"global\",\n });\n const projectResult = await compileAgents({\n ...base,\n projectDir,\n outputDir: resolveInstallPaths(projectDir, \"project\").agentsDir,\n scopeFilter: \"project\",\n });\n return mergeCompilationResults(globalResult, projectResult);\n}\n\nfunction mergeCompilationResults(...results: CompilationResult[]): CompilationResult {\n return {\n compiled: results.flatMap((r) => r.compiled),\n rewritten: results.flatMap((r) => r.rewritten),\n failed: results.flatMap((r) => r.failed),\n warnings: results.flatMap((r) => r.warnings),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,eAAsB,WAAW,SAAmD;AAClF,QAAM,EAAE,QAAQ,YAAY,YAAY,uBAAuB,IAAI;AAEnE,MAAI,wBAAwB;AAC1B,oBAAgB;AAAA,EAClB;AAEA,MAAI;AACJ,MAAI;AACF,mBAAe,MAAM,2BAA2B;AAAA,MAC9C,GAAI,WAAW,UAAa,EAAE,OAAO;AAAA,MACrC,GAAI,eAAe,UAAa,EAAE,WAAW;AAAA,MAC7C;AAAA,IACF,CAAC;AAAA,EACH,SAAS,OAAO;AACd,QAAI,wBAAwB;AAC1B,uBAAiB;AAAA,IACnB;AACA,UAAM;AAAA,EACR;AAEA,MAAI,kBAAoC,CAAC;AACzC,MAAI,wBAAwB;AAC1B,sBAAkB,YAAY;AAC9B,qBAAiB;AAAA,EACnB;AAEA,SAAO,EAAE,cAAc,gBAAgB;AACzC;;;ACxCA,eAAsB,cAAc,YAAsD;AACxF,QAAM,cAAc,cAAc,QAAQ,IAAI;AAE9C,MAAI;AACJ,MAAI;AACF,mBAAe,MAAM,mBAAmB,WAAW;AAAA,EACrD,SAAS,OAAO;AACd,QAAI,iBAAiB,gBAAiB,QA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sx } from "react/jsx-runtime";
|
|
6
7
|
var Spinner = ({ label }) => /* @__PURE__ */ jsx(InkSpinner, { label });
|
|
@@ -8,4 +9,4 @@ var Spinner = ({ label }) => /* @__PURE__ */ jsx(InkSpinner, { label });
|
|
|
8
9
|
export {
|
|
9
10
|
Spinner
|
|
10
11
|
};
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
12
|
+
//# sourceMappingURL=chunk-ZBPEFQ4G.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli/components/common/spinner.tsx"],"sourcesContent":["import React from \"react\";\nimport { Spinner as InkSpinner } from \"@inkjs/ui\";\n\ntype SpinnerProps = {\n label: string;\n};\n\nexport const Spinner: React.FC<SpinnerProps> = ({ label }) => <InkSpinner label={label} />;\n"],"mappings":";;;
|
|
1
|
+
{"version":3,"sources":["../src/cli/components/common/spinner.tsx"],"sourcesContent":["import React from \"react\";\nimport { Spinner as InkSpinner } from \"@inkjs/ui\";\n\ntype SpinnerProps = {\n label: string;\n};\n\nexport const Spinner: React.FC<SpinnerProps> = ({ label }) => <InkSpinner label={label} />;\n"],"mappings":";;;AAAA,OAAkB;AAClB,SAAS,WAAW,kBAAkB;AAMwB;AAAvD,IAAM,UAAkC,CAAC,EAAE,MAAM,MAAM,oBAAC,cAAW,OAAc;","names":[]}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
loadAgentDefs
|
|
4
|
+
} from "./chunk-PRJD5MMQ.js";
|
|
5
|
+
import {
|
|
6
|
+
pruneStaleCompiledAgents,
|
|
7
|
+
recompileAgents
|
|
8
|
+
} from "./chunk-TUQF577Z.js";
|
|
9
|
+
import {
|
|
10
|
+
buildAgentScopeMap,
|
|
11
|
+
buildMarketplacePluginRef,
|
|
12
|
+
claudePluginUninstall,
|
|
13
|
+
discoverAllPluginSkills,
|
|
14
|
+
isHomeDirectory,
|
|
15
|
+
loadProjectConfigFromDir,
|
|
16
|
+
resolveInstallPaths,
|
|
17
|
+
toClaudePluginScope
|
|
18
|
+
} from "./chunk-CBF4ZYV3.js";
|
|
19
|
+
import {
|
|
20
|
+
getErrorMessage,
|
|
21
|
+
loadSkillsFromDir,
|
|
22
|
+
remove,
|
|
23
|
+
removeDirIfEmpty,
|
|
24
|
+
verbose
|
|
25
|
+
} from "./chunk-4VCWL2IG.js";
|
|
26
|
+
import {
|
|
27
|
+
typedEntries,
|
|
28
|
+
typedKeys
|
|
29
|
+
} from "./chunk-VASLW636.js";
|
|
30
|
+
import {
|
|
31
|
+
GLOBAL_INSTALL_ROOT,
|
|
32
|
+
LOCAL_SKILLS_PATH
|
|
33
|
+
} from "./chunk-R54KIGN2.js";
|
|
34
|
+
|
|
35
|
+
// src/cli/lib/operations/project/remove-compiled-agents.ts
|
|
36
|
+
import path from "path";
|
|
37
|
+
var AGENT_FILE_EXTENSION = ".md";
|
|
38
|
+
async function removeCompiledAgents(options) {
|
|
39
|
+
const outcomes = await Promise.all(
|
|
40
|
+
options.agents.map((name) => removeCompiledAgentFile(options.agentsDir, name))
|
|
41
|
+
);
|
|
42
|
+
await tidyEmptiedAgentsDir(options.agentsDir);
|
|
43
|
+
return {
|
|
44
|
+
removed: outcomes.flatMap((outcome) => outcome.ok ? [outcome.name] : []),
|
|
45
|
+
failed: outcomes.flatMap(
|
|
46
|
+
(outcome) => outcome.ok ? [] : [{ name: outcome.name, error: outcome.error }]
|
|
47
|
+
)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
async function pruneCompiledAgents(options) {
|
|
51
|
+
await pruneStaleCompiledAgents(options.agentsDir, options.keep);
|
|
52
|
+
await tidyEmptiedAgentsDir(options.agentsDir);
|
|
53
|
+
}
|
|
54
|
+
async function removeCompiledAgentFile(agentsDir, name) {
|
|
55
|
+
try {
|
|
56
|
+
await remove(path.join(agentsDir, `${name}${AGENT_FILE_EXTENSION}`));
|
|
57
|
+
return { name, ok: true };
|
|
58
|
+
} catch (error) {
|
|
59
|
+
return { name, ok: false, error: getErrorMessage(error) };
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
async function tidyEmptiedAgentsDir(agentsDir) {
|
|
63
|
+
await removeDirIfEmpty(agentsDir);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// src/cli/lib/operations/project/compile-agents.ts
|
|
67
|
+
async function compileAgents(options) {
|
|
68
|
+
let resolvedAgents = options.agents;
|
|
69
|
+
let resolvedAgentScopeMap = options.agentScopeMap;
|
|
70
|
+
if (options.scopeFilter) {
|
|
71
|
+
const loadedConfig = await loadProjectConfigFromDir(options.projectDir);
|
|
72
|
+
if (!resolvedAgentScopeMap && loadedConfig?.config) {
|
|
73
|
+
resolvedAgentScopeMap = buildAgentScopeMap(loadedConfig.config);
|
|
74
|
+
}
|
|
75
|
+
const filteredAgents = loadedConfig?.config.agents.filter((a) => !a.excluded && a.scope === options.scopeFilter).map((a) => a.name);
|
|
76
|
+
if (resolvedAgents && filteredAgents) {
|
|
77
|
+
const filterSet = new Set(filteredAgents);
|
|
78
|
+
resolvedAgents = resolvedAgents.filter((a) => filterSet.has(a));
|
|
79
|
+
} else if (filteredAgents) {
|
|
80
|
+
resolvedAgents = filteredAgents;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const recompileResult = await recompileAgents({
|
|
84
|
+
pluginDir: options.pluginDir ?? options.projectDir,
|
|
85
|
+
sourcePath: options.sourcePath,
|
|
86
|
+
...resolvedAgents !== void 0 && { agents: resolvedAgents },
|
|
87
|
+
...options.skills !== void 0 && { skills: options.skills },
|
|
88
|
+
projectDir: options.projectDir,
|
|
89
|
+
...options.outputDir !== void 0 && { outputDir: options.outputDir },
|
|
90
|
+
...resolvedAgentScopeMap !== void 0 && { agentScopeMap: resolvedAgentScopeMap }
|
|
91
|
+
});
|
|
92
|
+
await pruneStaleAgentsForPass(options, recompileResult);
|
|
93
|
+
return {
|
|
94
|
+
compiled: recompileResult.compiled,
|
|
95
|
+
rewritten: recompileResult.rewritten,
|
|
96
|
+
failed: recompileResult.failed,
|
|
97
|
+
warnings: recompileResult.warnings
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
async function pruneStaleAgentsForPass(options, recompileResult) {
|
|
101
|
+
if (options.scopeFilter || !options.outputDir) return;
|
|
102
|
+
const compiledForDir = /* @__PURE__ */ new Set([
|
|
103
|
+
...recompileResult.compiled,
|
|
104
|
+
...recompileResult.failed
|
|
105
|
+
]);
|
|
106
|
+
await pruneCompiledAgents({ agentsDir: options.outputDir, keep: compiledForDir });
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// src/cli/lib/operations/skills/discover-skills.ts
|
|
110
|
+
import os from "os";
|
|
111
|
+
import path2 from "path";
|
|
112
|
+
var NO_LOCAL_SKILLS = { skills: {}, unusableMetadata: [] };
|
|
113
|
+
async function discoverLocalProjectSkills(rootDir) {
|
|
114
|
+
const localSkillsDir = path2.join(rootDir, LOCAL_SKILLS_PATH);
|
|
115
|
+
return loadSkillsFromDir(localSkillsDir, {
|
|
116
|
+
pathPrefix: LOCAL_SKILLS_PATH,
|
|
117
|
+
requireMetadata: true
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
function mergeSkills(...skillSources) {
|
|
121
|
+
const merged = {};
|
|
122
|
+
for (const source of skillSources) {
|
|
123
|
+
for (const [id, skill] of typedEntries(source)) {
|
|
124
|
+
if (skill) {
|
|
125
|
+
merged[id] = skill;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return merged;
|
|
130
|
+
}
|
|
131
|
+
async function discoverInstalledSkills(projectDir) {
|
|
132
|
+
const isGlobalProject = isHomeDirectory(projectDir);
|
|
133
|
+
const globalPluginSkills = isGlobalProject ? {} : await discoverAllPluginSkills(os.homedir());
|
|
134
|
+
const globalPluginSkillCount = typedKeys(globalPluginSkills).length;
|
|
135
|
+
if (globalPluginSkillCount > 0) {
|
|
136
|
+
verbose(` Found ${globalPluginSkillCount} skills from global plugins`);
|
|
137
|
+
}
|
|
138
|
+
const globalLocal = isGlobalProject ? NO_LOCAL_SKILLS : await discoverLocalProjectSkills(GLOBAL_INSTALL_ROOT);
|
|
139
|
+
const globalLocalSkillCount = typedKeys(globalLocal.skills).length;
|
|
140
|
+
if (globalLocalSkillCount > 0) {
|
|
141
|
+
verbose(` Found ${globalLocalSkillCount} global local skills from ~/.claude/skills/`);
|
|
142
|
+
}
|
|
143
|
+
const pluginSkills = await discoverAllPluginSkills(projectDir);
|
|
144
|
+
const pluginSkillCount = typedKeys(pluginSkills).length;
|
|
145
|
+
verbose(` Found ${pluginSkillCount} skills from installed plugins`);
|
|
146
|
+
const local = await discoverLocalProjectSkills(projectDir);
|
|
147
|
+
const localSkillCount = typedKeys(local.skills).length;
|
|
148
|
+
verbose(` Found ${localSkillCount} local skills from .claude/skills/`);
|
|
149
|
+
const allSkills = mergeSkills(globalPluginSkills, globalLocal.skills, pluginSkills, local.skills);
|
|
150
|
+
const totalSkillCount = typedKeys(allSkills).length;
|
|
151
|
+
return {
|
|
152
|
+
allSkills,
|
|
153
|
+
totalSkillCount,
|
|
154
|
+
pluginSkillCount: globalPluginSkillCount + pluginSkillCount,
|
|
155
|
+
localSkillCount: globalLocalSkillCount + localSkillCount,
|
|
156
|
+
globalPluginSkillCount,
|
|
157
|
+
globalLocalSkillCount,
|
|
158
|
+
unusableMetadata: [...globalLocal.unusableMetadata, ...local.unusableMetadata]
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// src/cli/lib/operations/skills/uninstall-plugin-skills.ts
|
|
163
|
+
async function uninstallPluginSkills(skillIds, oldSkills, marketplace, projectDir) {
|
|
164
|
+
const uninstalled = [];
|
|
165
|
+
const failed = [];
|
|
166
|
+
for (const skillId of skillIds) {
|
|
167
|
+
const oldSkill = oldSkills.find((s) => s.id === skillId);
|
|
168
|
+
const pluginScope = toClaudePluginScope(oldSkill?.scope);
|
|
169
|
+
const pluginRef = buildMarketplacePluginRef(skillId, marketplace);
|
|
170
|
+
try {
|
|
171
|
+
await claudePluginUninstall(pluginRef, pluginScope, projectDir);
|
|
172
|
+
uninstalled.push(skillId);
|
|
173
|
+
} catch (error) {
|
|
174
|
+
failed.push({ id: skillId, error: getErrorMessage(error) });
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return { uninstalled, failed };
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// src/cli/lib/operations/project/recompile-project-agents.ts
|
|
181
|
+
async function recompileRegisteredProjectAgents(projectDir) {
|
|
182
|
+
const { allSkills } = await discoverInstalledSkills(projectDir);
|
|
183
|
+
const { sourcePath } = await loadAgentDefs({ projectDir });
|
|
184
|
+
return compileAgents({
|
|
185
|
+
projectDir,
|
|
186
|
+
sourcePath,
|
|
187
|
+
skills: allSkills,
|
|
188
|
+
scopeFilter: "project",
|
|
189
|
+
outputDir: resolveInstallPaths(projectDir, "project").agentsDir
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
async function recompilePropagatedProjectAgents(projectDirs) {
|
|
193
|
+
let rewrittenCount = 0;
|
|
194
|
+
let unchangedCount = 0;
|
|
195
|
+
let failedCount = 0;
|
|
196
|
+
const warnings = [];
|
|
197
|
+
for (const dir of projectDirs) {
|
|
198
|
+
try {
|
|
199
|
+
const result = await recompileRegisteredProjectAgents(dir);
|
|
200
|
+
if (result.failed.length > 0) {
|
|
201
|
+
failedCount++;
|
|
202
|
+
warnings.push(...result.warnings);
|
|
203
|
+
continue;
|
|
204
|
+
}
|
|
205
|
+
if (result.rewritten.length > 0) rewrittenCount++;
|
|
206
|
+
else unchangedCount++;
|
|
207
|
+
} catch (error) {
|
|
208
|
+
failedCount++;
|
|
209
|
+
warnings.push(`Could not recompile agents in ${dir}: ${getErrorMessage(error)}`);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return { rewrittenCount, unchangedCount, failedCount, warnings };
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export {
|
|
216
|
+
removeCompiledAgents,
|
|
217
|
+
compileAgents,
|
|
218
|
+
discoverInstalledSkills,
|
|
219
|
+
uninstallPluginSkills,
|
|
220
|
+
recompileRegisteredProjectAgents,
|
|
221
|
+
recompilePropagatedProjectAgents
|
|
222
|
+
};
|
|
223
|
+
//# sourceMappingURL=chunk-ZU6DAR4S.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli/lib/operations/project/remove-compiled-agents.ts","../src/cli/lib/operations/project/compile-agents.ts","../src/cli/lib/operations/skills/discover-skills.ts","../src/cli/lib/operations/skills/uninstall-plugin-skills.ts","../src/cli/lib/operations/project/recompile-project-agents.ts"],"sourcesContent":["import path from \"path\";\nimport { pruneStaleCompiledAgents } from \"../../agents/list-compiled-agents.js\";\nimport { getErrorMessage } from \"../../../utils/errors.js\";\nimport { remove, removeDirIfEmpty } from \"../../../utils/fs.js\";\nimport type { AgentName } from \"../../../types/index.js\";\n\nconst AGENT_FILE_EXTENSION = \".md\";\n\nexport type RemoveCompiledAgentsOptions = {\n /** The scope's `.claude/agents/` directory holding the compiled files. */\n agentsDir: string;\n agents: readonly AgentName[];\n};\n\nexport type PruneCompiledAgentsOptions = {\n agentsDir: string;\n /**\n * The COMPLETE set of agents that belong in `agentsDir` — every other\n * CLI-compiled agent there is stale. Only an authoritative pass can say this.\n */\n keep: ReadonlySet<AgentName>;\n};\n\nexport type RemoveCompiledAgentsResult = {\n /** Agents whose compiled file this call disposed of; an absent file counts. */\n removed: AgentName[];\n /** Agents whose file survived an error, for the caller to report. */\n failed: Array<{ name: AgentName; error: string }>;\n};\n\ntype RemovalOutcome = { name: AgentName; ok: true } | { name: AgentName; ok: false; error: string };\n\n/**\n * Deletes the named agents' compiled `.md` files from `agentsDir`, then takes the\n * directory itself when nothing at all is left in it — the shape `deleteLocalSkill`\n * models for skills.\n *\n * A scope's `.claude/agents/` is an artefact of what it holds, so the removal that\n * empties it owns the tidy and no caller has to remember. An agent with no file on\n * disk is nothing to do rather than an error.\n */\nexport async function removeCompiledAgents(\n options: RemoveCompiledAgentsOptions,\n): Promise<RemoveCompiledAgentsResult> {\n const outcomes = await Promise.all(\n options.agents.map((name) => removeCompiledAgentFile(options.agentsDir, name)),\n );\n await tidyEmptiedAgentsDir(options.agentsDir);\n\n return {\n removed: outcomes.flatMap((outcome) => (outcome.ok ? [outcome.name] : [])),\n failed: outcomes.flatMap((outcome) =>\n outcome.ok ? [] : [{ name: outcome.name, error: outcome.error }],\n ),\n };\n}\n\n/**\n * Deletes every CLI-compiled agent in `agentsDir` outside `keep`, then takes the\n * directory on the same terms as `removeCompiledAgents`.\n *\n * Hand-authored agents are preserved by `pruneStaleCompiledAgents`'s `isAgentName`\n * predicate, so a directory this leaves empty is one nothing at all remains in.\n */\nexport async function pruneCompiledAgents(options: PruneCompiledAgentsOptions): Promise<void> {\n await pruneStaleCompiledAgents(options.agentsDir, options.keep);\n await tidyEmptiedAgentsDir(options.agentsDir);\n}\n\nasync function removeCompiledAgentFile(\n agentsDir: string,\n name: AgentName,\n): Promise<RemovalOutcome> {\n try {\n await remove(path.join(agentsDir, `${name}${AGENT_FILE_EXTENSION}`));\n return { name, ok: true };\n } catch (error) {\n return { name, ok: false, error: getErrorMessage(error) };\n }\n}\n\n/**\n * Emptiness is FILESYSTEM emptiness, never roster emptiness: a hand-authored agent\n * or any user-owned file keeps the directory alive whatever a config says. The\n * agents directory only — `.claude/` above it is uninstall's decision, not a\n * removal path's.\n */\nasync function tidyEmptiedAgentsDir(agentsDir: string): Promise<void> {\n await removeDirIfEmpty(agentsDir);\n}\n","import { pruneCompiledAgents } from \"./remove-compiled-agents.js\";\nimport { recompileAgents } from \"../../agents/index.js\";\nimport { loadProjectConfigFromDir } from \"../../configuration/index.js\";\nimport { buildAgentScopeMap } from \"../../installation/index.js\";\nimport type { AgentName, SkillDefinitionMap, SkillScope } from \"../../../types/index.js\";\n\nexport type CompileAgentsOptions = {\n projectDir: string;\n sourcePath: string;\n pluginDir?: string;\n skills?: SkillDefinitionMap;\n agentScopeMap?: Map<AgentName, SkillScope>;\n agents?: AgentName[];\n /** When set, loads config and filters agents to only those matching this scope. */\n scopeFilter?: SkillScope;\n outputDir?: string;\n};\n\nexport type CompilationResult = {\n compiled: AgentName[];\n /**\n * The subset of `compiled` whose file this pass actually wrote. A pass whose\n * `rewritten` is empty changed nothing on disk, which is exactly what the\n * recompile summary reports and what the count it replaced could not say.\n */\n rewritten: AgentName[];\n failed: AgentName[];\n warnings: string[];\n};\n\n/**\n * Compiles agent markdown files from templates + skill content.\n *\n * Thin wrapper around recompileAgents() that standardizes options.\n * The caller invokes this once (edit, update) or twice with scopeFilter (compile).\n */\nexport async function compileAgents(options: CompileAgentsOptions): Promise<CompilationResult> {\n let resolvedAgents = options.agents;\n let resolvedAgentScopeMap = options.agentScopeMap;\n\n if (options.scopeFilter) {\n const loadedConfig = await loadProjectConfigFromDir(options.projectDir);\n\n // Auto-build agentScopeMap from config if not provided\n if (!resolvedAgentScopeMap && loadedConfig?.config) {\n resolvedAgentScopeMap = buildAgentScopeMap(loadedConfig.config);\n }\n\n const filteredAgents = loadedConfig?.config.agents\n .filter((a) => !a.excluded && a.scope === options.scopeFilter)\n .map((a) => a.name);\n\n if (resolvedAgents && filteredAgents) {\n const filterSet = new Set(filteredAgents);\n resolvedAgents = resolvedAgents.filter((a) => filterSet.has(a));\n } else if (filteredAgents) {\n resolvedAgents = filteredAgents;\n }\n }\n\n const recompileResult = await recompileAgents({\n pluginDir: options.pluginDir ?? options.projectDir,\n sourcePath: options.sourcePath,\n ...(resolvedAgents !== undefined && { agents: resolvedAgents }),\n ...(options.skills !== undefined && { skills: options.skills }),\n projectDir: options.projectDir,\n ...(options.outputDir !== undefined && { outputDir: options.outputDir }),\n ...(resolvedAgentScopeMap !== undefined && { agentScopeMap: resolvedAgentScopeMap }),\n });\n\n await pruneStaleAgentsForPass(options, recompileResult);\n\n return {\n compiled: recompileResult.compiled,\n rewritten: recompileResult.rewritten,\n failed: recompileResult.failed,\n warnings: recompileResult.warnings,\n };\n}\n\n/**\n * Compiled-agent writes are additive, so a deselected or stale agent's `.md`\n * lingers after recompile. An authoritative, scope-UNfiltered pass owns its\n * entire `outputDir` (its resolved roster is the full set for that directory),\n * so it prunes built-in agents no longer compiled there. A scope-FILTERED pass\n * (the hasBoth two-pass compile, or the D-240 registered-project recompile)\n * sees only one scope's agents and must never delete another scope's files, so\n * it skips pruning. Removing the stale files and tidying the directory they\n * emptied is one operation's job, not this pass's.\n */\nasync function pruneStaleAgentsForPass(\n options: CompileAgentsOptions,\n recompileResult: CompilationResult,\n): Promise<void> {\n if (options.scopeFilter || !options.outputDir) return;\n\n const compiledForDir = new Set<AgentName>([\n ...recompileResult.compiled,\n ...recompileResult.failed,\n ]);\n await pruneCompiledAgents({ agentsDir: options.outputDir, keep: compiledForDir });\n}\n","import os from \"os\";\nimport path from \"path\";\nimport { discoverAllPluginSkills } from \"../../plugins/index.js\";\nimport { isHomeDirectory } from \"../../installation/is-home-directory.js\";\n// loadSkillsFromDir lives in loading/ (a leaf) so both this module and\n// plugins/plugin-discovery can share it without an operations↔plugins cycle.\nimport { loadSkillsFromDir, type LoadedSkills } from \"../../loading/index.js\";\nimport { verbose } from \"../../../utils/logger.js\";\nimport { GLOBAL_INSTALL_ROOT, LOCAL_SKILLS_PATH } from \"../../../consts.js\";\nimport { typedEntries, typedKeys } from \"../../../utils/typed-object.js\";\nimport type { UnusableSkillMetadata } from \"../../loading/index.js\";\nimport type { SkillDefinition, SkillDefinitionMap, SkillId } from \"../../../types/index.js\";\n\nexport type DiscoveredSkills = {\n allSkills: SkillDefinitionMap;\n totalSkillCount: number;\n pluginSkillCount: number;\n localSkillCount: number;\n globalPluginSkillCount: number;\n globalLocalSkillCount: number;\n /**\n * Installed skills whose metadata.yaml exists but describes no skill, from either\n * scope. Nothing was loaded for them; `compile` refuses the run over any entry\n * here rather than compile agents around a skill its metadata does not describe.\n */\n unusableMetadata: UnusableSkillMetadata[];\n};\n\n/** The result of a local-skill scan that was not performed. */\nconst NO_LOCAL_SKILLS: LoadedSkills = { skills: {}, unusableMetadata: [] };\n\n/**\n * Discovers local (non-plugin) skills from `<rootDir>/.claude/skills/`. Used for\n * both the project root and the global install root.\n */\nexport async function discoverLocalProjectSkills(rootDir: string): Promise<LoadedSkills> {\n const localSkillsDir = path.join(rootDir, LOCAL_SKILLS_PATH);\n return loadSkillsFromDir(localSkillsDir, {\n pathPrefix: LOCAL_SKILLS_PATH,\n requireMetadata: true,\n });\n}\n\n/** Merges skill maps — later sources take precedence over earlier ones. */\nexport function mergeSkills(...skillSources: SkillDefinitionMap[]): SkillDefinitionMap {\n const merged: SkillDefinitionMap = {};\n\n for (const source of skillSources) {\n for (const [id, skill] of typedEntries<SkillId, SkillDefinition | undefined>(source)) {\n if (skill) {\n merged[id] = skill;\n }\n }\n }\n\n return merged;\n}\n\n/**\n * Discovers all installed skills for a project directory using 4-way merge:\n * 1. Global plugins (from ~/.claude/plugins/)\n * 2. Global local (from ~/.claude/skills/)\n * 3. Project plugins (from <projectDir>/.claude/plugins/)\n * 4. Project local (from <projectDir>/.claude/skills/)\n *\n * Pure function — no user-facing logging. Callers add their own log messages.\n * Uses verbose() for diagnostic output only.\n */\nexport async function discoverInstalledSkills(projectDir: string): Promise<DiscoveredSkills> {\n const isGlobalProject = isHomeDirectory(projectDir);\n\n // 1. Global plugins\n const globalPluginSkills = isGlobalProject ? {} : await discoverAllPluginSkills(os.homedir());\n const globalPluginSkillCount = typedKeys<SkillId>(globalPluginSkills).length;\n if (globalPluginSkillCount > 0) {\n verbose(` Found ${globalPluginSkillCount} skills from global plugins`);\n }\n\n // 2. Global local skills\n const globalLocal = isGlobalProject\n ? NO_LOCAL_SKILLS\n : await discoverLocalProjectSkills(GLOBAL_INSTALL_ROOT);\n const globalLocalSkillCount = typedKeys<SkillId>(globalLocal.skills).length;\n if (globalLocalSkillCount > 0) {\n verbose(` Found ${globalLocalSkillCount} global local skills from ~/.claude/skills/`);\n }\n\n // 3. Project plugins\n const pluginSkills = await discoverAllPluginSkills(projectDir);\n const pluginSkillCount = typedKeys<SkillId>(pluginSkills).length;\n verbose(` Found ${pluginSkillCount} skills from installed plugins`);\n\n // 4. Project local skills\n const local = await discoverLocalProjectSkills(projectDir);\n const localSkillCount = typedKeys<SkillId>(local.skills).length;\n verbose(` Found ${localSkillCount} local skills from .claude/skills/`);\n\n // Merge: global first, project second — project wins on conflict\n const allSkills = mergeSkills(globalPluginSkills, globalLocal.skills, pluginSkills, local.skills);\n const totalSkillCount = typedKeys<SkillId>(allSkills).length;\n\n return {\n allSkills,\n totalSkillCount,\n pluginSkillCount: globalPluginSkillCount + pluginSkillCount,\n localSkillCount: globalLocalSkillCount + localSkillCount,\n globalPluginSkillCount,\n globalLocalSkillCount,\n unusableMetadata: [...globalLocal.unusableMetadata, ...local.unusableMetadata],\n };\n}\n","import { claudePluginUninstall } from \"../../../utils/exec.js\";\nimport { buildMarketplacePluginRef, toClaudePluginScope } from \"../../plugins/index.js\";\nimport { getErrorMessage } from \"../../../utils/errors.js\";\nimport type { SkillId } from \"../../../types/index.js\";\nimport type { SkillConfig } from \"../../../types/config.js\";\n\nexport type PluginUninstallResult = {\n uninstalled: SkillId[];\n failed: Array<{ id: SkillId; error: string }>;\n};\n\n/**\n * Uninstalls skill plugins via the Claude CLI, using scope from old config.\n *\n * Each plugin reference is qualified as `{skillId}@{marketplace}` to match\n * the form used at install time — bare skill IDs will not match the registry.\n */\nexport async function uninstallPluginSkills(\n skillIds: SkillId[],\n oldSkills: SkillConfig[],\n marketplace: string,\n projectDir: string,\n): Promise<PluginUninstallResult> {\n const uninstalled: SkillId[] = [];\n const failed: PluginUninstallResult[\"failed\"] = [];\n\n for (const skillId of skillIds) {\n const oldSkill = oldSkills.find((s) => s.id === skillId);\n const pluginScope = toClaudePluginScope(oldSkill?.scope);\n const pluginRef = buildMarketplacePluginRef(skillId, marketplace);\n try {\n await claudePluginUninstall(pluginRef, pluginScope, projectDir);\n uninstalled.push(skillId);\n } catch (error) {\n failed.push({ id: skillId, error: getErrorMessage(error) });\n }\n }\n\n return { uninstalled, failed };\n}\n","import { compileAgents, type CompilationResult } from \"./compile-agents.js\";\nimport { loadAgentDefs } from \"./load-agent-defs.js\";\nimport { discoverInstalledSkills } from \"../skills/index.js\";\nimport { resolveInstallPaths } from \"../../installation/index.js\";\nimport { getErrorMessage } from \"../../../utils/errors.js\";\n\n/**\n * Recompiles the PROJECT-scoped agents of a registered project after a global\n * config change was propagated into that project's `config.ts`.\n *\n * Propagation (`propagateGlobalChangesToProjects`) rewrites a registered\n * project's `config.ts` / `config-types.ts` but never touches its compiled\n * `.claude/agents/*.md`, so the compiled agents keep emitting whatever skill\n * reference form the OLD global data dictated. Run this per propagated project,\n * after propagation, to bring the compiled artifacts back in step.\n *\n * Scope: project only. The global agents were already recompiled by the\n * triggering operation's own pass; repeating a global pass per project would\n * rewrite `~/.claude/agents` once per registered project for no gain.\n *\n * `skills` is passed explicitly: without it `recompileAgents` falls back to\n * `discoverAllPluginSkills`, which sees plugin skills only and would silently\n * strip every global-local and project-local skill from the compiled agents.\n *\n * Agent partials always come from the CLI itself (`getLocalAgentDefinitions`\n * returns `sourcePath: PROJECT_ROOT`), so no per-project marketplace source\n * resolution is needed.\n */\nexport async function recompileRegisteredProjectAgents(\n projectDir: string,\n): Promise<CompilationResult> {\n const { allSkills } = await discoverInstalledSkills(projectDir);\n const { sourcePath } = await loadAgentDefs({ projectDir });\n\n return compileAgents({\n projectDir,\n sourcePath,\n skills: allSkills,\n scopeFilter: \"project\",\n outputDir: resolveInstallPaths(projectDir, \"project\").agentsDir,\n });\n}\n\nexport type PropagatedRecompileSummary = {\n /** Projects where at least one compiled agent's content actually moved. */\n rewrittenCount: number;\n /**\n * Projects the fan-out reached whose agents all came back byte-identical. They\n * were visited and left alone, which is a different fact from being recompiled\n * and the one the old single count could not tell apart.\n */\n unchangedCount: number;\n failedCount: number;\n /** Per-project warnings in processing order — the caller surfaces them via warn(). */\n warnings: string[];\n};\n\n/**\n * Runs {@link recompileRegisteredProjectAgents} over every propagated project,\n * isolating per-project failures: one project's unreadable config or broken\n * template must not abort the loop or leave the remaining projects stale.\n * Projects are processed sequentially so the collected warnings keep a\n * deterministic per-project order.\n */\nexport async function recompilePropagatedProjectAgents(\n projectDirs: string[],\n): Promise<PropagatedRecompileSummary> {\n let rewrittenCount = 0;\n let unchangedCount = 0;\n let failedCount = 0;\n const warnings: string[] = [];\n\n for (const dir of projectDirs) {\n try {\n const result = await recompileRegisteredProjectAgents(dir);\n if (result.failed.length > 0) {\n failedCount++;\n warnings.push(...result.warnings);\n continue;\n }\n if (result.rewritten.length > 0) rewrittenCount++;\n else unchangedCount++;\n } catch (error) {\n failedCount++;\n warnings.push(`Could not recompile agents in ${dir}: ${getErrorMessage(error)}`);\n }\n }\n\n return { rewrittenCount, unchangedCount, failedCount, warnings };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,UAAU;AAMjB,IAAM,uBAAuB;AAmC7B,eAAsB,qBACpB,SACqC;AACrC,QAAM,WAAW,MAAM,QAAQ;AAAA,IAC7B,QAAQ,OAAO,IAAI,CAAC,SAAS,wBAAwB,QAAQ,WAAW,IAAI,CAAC;AAAA,EAC/E;AACA,QAAM,qBAAqB,QAAQ,SAAS;AAE5C,SAAO;AAAA,IACL,SAAS,SAAS,QAAQ,CAAC,YAAa,QAAQ,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAE;AAAA,IACzE,QAAQ,SAAS;AAAA,MAAQ,CAAC,YACxB,QAAQ,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,QAAQ,MAAM,OAAO,QAAQ,MAAM,CAAC;AAAA,IACjE;AAAA,EACF;AACF;AASA,eAAsB,oBAAoB,SAAoD;AAC5F,QAAM,yBAAyB,QAAQ,WAAW,QAAQ,IAAI;AAC9D,QAAM,qBAAqB,QAAQ,SAAS;AAC9C;AAEA,eAAe,wBACb,WACA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