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
package/dist/commands/edit.js
CHANGED
|
@@ -1,76 +1,70 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
Spinner
|
|
4
|
+
} from "../chunk-ZBPEFQ4G.js";
|
|
2
5
|
import {
|
|
3
6
|
runWizardSession
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-MQ7FLIYS.js";
|
|
18
|
-
import "../chunk-FVDKAVOL.js";
|
|
7
|
+
} from "../chunk-QUDQTO3O.js";
|
|
8
|
+
import "../chunk-R7JV22QK.js";
|
|
9
|
+
import "../chunk-MJFIO5SX.js";
|
|
10
|
+
import "../chunk-NSJ2S7R5.js";
|
|
11
|
+
import "../chunk-JC7DBPRD.js";
|
|
12
|
+
import "../chunk-GUDGCFSF.js";
|
|
13
|
+
import "../chunk-BZ4CZBOM.js";
|
|
14
|
+
import "../chunk-NKCY2ULI.js";
|
|
15
|
+
import "../chunk-NFH6SA62.js";
|
|
16
|
+
import "../chunk-IXEDSKMH.js";
|
|
17
|
+
import "../chunk-AURY6RT6.js";
|
|
18
|
+
import "../chunk-WRRP47PY.js";
|
|
19
|
+
import "../chunk-2IMYK4WN.js";
|
|
19
20
|
import "../chunk-TSIU7DME.js";
|
|
20
|
-
import "../chunk-QRDTLVXG.js";
|
|
21
|
-
import "../chunk-J27W6TXS.js";
|
|
22
|
-
import "../chunk-SX5H6TSC.js";
|
|
23
|
-
import "../chunk-5GUOIJSG.js";
|
|
24
|
-
import "../chunk-MJ2KHG24.js";
|
|
25
|
-
import "../chunk-DTSG5XZB.js";
|
|
26
|
-
import "../chunk-MM7CTTAV.js";
|
|
27
|
-
import "../chunk-KXYVJGJP.js";
|
|
28
|
-
import "../chunk-P44SXVH3.js";
|
|
29
|
-
import "../chunk-LDP5ASDM.js";
|
|
30
|
-
import "../chunk-Q45ZU6HD.js";
|
|
31
|
-
import "../chunk-WBCPLH66.js";
|
|
32
|
-
import "../chunk-RNJWAKMO.js";
|
|
33
21
|
import "../chunk-XVAQG2CV.js";
|
|
34
|
-
import
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
import
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
22
|
+
import "../chunk-LA3JPESW.js";
|
|
23
|
+
import "../chunk-J27W6TXS.js";
|
|
24
|
+
import "../chunk-AKQ5QISO.js";
|
|
25
|
+
import "../chunk-CHNA5RVS.js";
|
|
26
|
+
import "../chunk-ONWEOS77.js";
|
|
27
|
+
import "../chunk-V3ENMW7G.js";
|
|
28
|
+
import "../chunk-DRKSYJZ2.js";
|
|
29
|
+
import "../chunk-Q5FLW4JG.js";
|
|
30
|
+
import "../chunk-6CNRMCFM.js";
|
|
41
31
|
import {
|
|
42
32
|
compileAgentsAllScopes,
|
|
43
33
|
detectProject,
|
|
44
34
|
loadSource,
|
|
45
35
|
writeProjectConfig
|
|
46
|
-
} from "../chunk-
|
|
36
|
+
} from "../chunk-XMEIVWAS.js";
|
|
47
37
|
import {
|
|
48
38
|
discoverInstalledSkills,
|
|
49
|
-
|
|
50
|
-
pluginInstallFailureError,
|
|
39
|
+
removeCompiledAgents,
|
|
51
40
|
uninstallPluginSkills
|
|
52
|
-
} from "../chunk-
|
|
41
|
+
} from "../chunk-ZU6DAR4S.js";
|
|
53
42
|
import {
|
|
54
43
|
copyLocalSkills
|
|
55
|
-
} from "../chunk-
|
|
44
|
+
} from "../chunk-UW44KSYL.js";
|
|
56
45
|
import {
|
|
57
46
|
loadAgentDefs
|
|
58
|
-
} from "../chunk-
|
|
59
|
-
import "../chunk-
|
|
60
|
-
import "../chunk-
|
|
47
|
+
} from "../chunk-PRJD5MMQ.js";
|
|
48
|
+
import "../chunk-TUQF577Z.js";
|
|
49
|
+
import "../chunk-B66SC72V.js";
|
|
61
50
|
import {
|
|
62
51
|
render
|
|
63
52
|
} from "../chunk-JFLVEFFP.js";
|
|
64
53
|
import {
|
|
65
54
|
formatScopeTag
|
|
66
|
-
} from "../chunk-
|
|
55
|
+
} from "../chunk-QQTYMW7N.js";
|
|
67
56
|
import {
|
|
68
57
|
BaseCommand,
|
|
69
|
-
EXIT_CODES
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
import "../chunk-
|
|
58
|
+
EXIT_CODES
|
|
59
|
+
} from "../chunk-FMYHWKGG.js";
|
|
60
|
+
import "../chunk-7VZV4O6B.js";
|
|
61
|
+
import "../chunk-K3O3YQYG.js";
|
|
73
62
|
import {
|
|
63
|
+
ERROR_MESSAGES,
|
|
64
|
+
INFO_MESSAGES,
|
|
65
|
+
INSTALL_MODE_DESCRIPTIONS,
|
|
66
|
+
STATUS_MESSAGES,
|
|
67
|
+
activeAgentNames,
|
|
74
68
|
activeAgentScopeMap,
|
|
75
69
|
applyMigratedGlobalSources,
|
|
76
70
|
buildMarketplacePluginRef,
|
|
@@ -83,20 +77,22 @@ import {
|
|
|
83
77
|
installBaseDir,
|
|
84
78
|
isActiveAt,
|
|
85
79
|
isHomeDirectory,
|
|
80
|
+
localSkillsCopied,
|
|
86
81
|
migrateLocalSkillScope,
|
|
87
82
|
mutateGlobal,
|
|
83
|
+
recompileSummary,
|
|
88
84
|
resolveInstallPaths,
|
|
89
|
-
toClaudePluginScope
|
|
90
|
-
|
|
85
|
+
toClaudePluginScope,
|
|
86
|
+
unresolvedSkillRemovalReasons
|
|
87
|
+
} from "../chunk-CBF4ZYV3.js";
|
|
91
88
|
import {
|
|
92
|
-
getErrorMessage
|
|
93
|
-
|
|
94
|
-
} from "../chunk-PMM2MYMA.js";
|
|
89
|
+
getErrorMessage
|
|
90
|
+
} from "../chunk-4VCWL2IG.js";
|
|
95
91
|
import {
|
|
96
92
|
getSkillById,
|
|
97
93
|
getSkillDisplayName,
|
|
98
94
|
matrix
|
|
99
|
-
} from "../chunk-
|
|
95
|
+
} from "../chunk-IPJOMAWC.js";
|
|
100
96
|
import {
|
|
101
97
|
typedKeys
|
|
102
98
|
} from "../chunk-VASLW636.js";
|
|
@@ -106,19 +102,44 @@ import {
|
|
|
106
102
|
EDIT_PROJECT_SETUP_FLAG,
|
|
107
103
|
EJECT_SOURCE,
|
|
108
104
|
formatSourceDisplayName
|
|
109
|
-
} from "../chunk-
|
|
110
|
-
import "../chunk-
|
|
105
|
+
} from "../chunk-R54KIGN2.js";
|
|
106
|
+
import "../chunk-VZRO7RYT.js";
|
|
111
107
|
|
|
112
108
|
// src/cli/commands/edit.tsx
|
|
113
109
|
import path from "path";
|
|
110
|
+
import chalk from "chalk";
|
|
114
111
|
import { Flags } from "@oclif/core";
|
|
115
112
|
import { difference, indexBy } from "remeda";
|
|
116
113
|
import { jsx } from "react/jsx-runtime";
|
|
114
|
+
var RECOMPILE_SUBJECT = "agents";
|
|
117
115
|
function formatDualScopeTransition(displayName, to) {
|
|
118
116
|
const isAdd = to === "project";
|
|
119
117
|
const prefix = isAdd ? "+" : "-";
|
|
120
118
|
const color = isAdd ? CLI_COLORS.SUCCESS : CLI_COLORS.ERROR;
|
|
121
|
-
return
|
|
119
|
+
return chalk.hex(color)(` ${prefix} ${displayName} [P]`);
|
|
120
|
+
}
|
|
121
|
+
function formatSkillScopeChangeLine(skillId, change, dualScopeSkillTransitions) {
|
|
122
|
+
const displayName = getSkillDisplayName(skillId);
|
|
123
|
+
if (dualScopeSkillTransitions.has(skillId)) {
|
|
124
|
+
return formatDualScopeTransition(displayName, change.to);
|
|
125
|
+
}
|
|
126
|
+
const isGlobalToProject = change.from === "global" && change.to === "project";
|
|
127
|
+
const prefix = isGlobalToProject ? "+" : "~";
|
|
128
|
+
const color = isGlobalToProject ? CLI_COLORS.SUCCESS : CLI_COLORS.WARNING;
|
|
129
|
+
return chalk.hex(color)(` ${prefix} ${displayName}`) + chalk.hex(CLI_COLORS.NEUTRAL)(scopeArrow(change));
|
|
130
|
+
}
|
|
131
|
+
function formatAgentScopeChangeLine(agentName, change, dualScopeAgentTransitions) {
|
|
132
|
+
const agentSuffix = chalk.hex(CLI_COLORS.NEUTRAL)(" (agent)");
|
|
133
|
+
if (dualScopeAgentTransitions.has(agentName)) {
|
|
134
|
+
return formatDualScopeTransition(agentName, change.to) + agentSuffix;
|
|
135
|
+
}
|
|
136
|
+
return chalk.hex(CLI_COLORS.WARNING)(` ~ ${agentName}`) + chalk.hex(CLI_COLORS.NEUTRAL)(scopeArrow(change));
|
|
137
|
+
}
|
|
138
|
+
function scopeArrow(change) {
|
|
139
|
+
return ` (${formatScopeTag(change.from)} \u2192 ${formatScopeTag(change.to)})`;
|
|
140
|
+
}
|
|
141
|
+
function loadedSourceLabel(sourceResult) {
|
|
142
|
+
return sourceResult.marketplace ?? sourceResult.sourceConfig.source;
|
|
122
143
|
}
|
|
123
144
|
var Edit = class _Edit extends BaseCommand {
|
|
124
145
|
static summary = "Edit skills in the plugin";
|
|
@@ -127,22 +148,9 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
127
148
|
{
|
|
128
149
|
description: "Open the edit wizard",
|
|
129
150
|
command: "<%= config.bin %> <%= command.id %>"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
description: "Edit with a custom source",
|
|
133
|
-
command: "<%= config.bin %> <%= command.id %> --source github:org/marketplace"
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
description: "Force refresh skills from remote",
|
|
137
|
-
command: "<%= config.bin %> <%= command.id %> --refresh"
|
|
138
151
|
}
|
|
139
152
|
];
|
|
140
153
|
static flags = {
|
|
141
|
-
...BaseCommand.baseFlags,
|
|
142
|
-
refresh: Flags.boolean({
|
|
143
|
-
description: "Force refresh from remote sources",
|
|
144
|
-
default: false
|
|
145
|
-
}),
|
|
146
154
|
[EDIT_PROJECT_SETUP_FLAG]: Flags.boolean({
|
|
147
155
|
description: "Internal: this run continues an `init` project setup",
|
|
148
156
|
default: false,
|
|
@@ -152,15 +160,16 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
152
160
|
async run() {
|
|
153
161
|
const { flags } = await this.parse(_Edit);
|
|
154
162
|
const cwd = process.cwd();
|
|
155
|
-
|
|
156
|
-
|
|
163
|
+
await this.ensureConfigReadable(cwd);
|
|
164
|
+
const context = await this.loadContextUnderSpinner();
|
|
165
|
+
await this.ensureSavedSkillsReadable(
|
|
166
|
+
context.projectConfig?.skills ?? [],
|
|
167
|
+
context.sourceResult.matrix,
|
|
168
|
+
context.projectDir
|
|
157
169
|
);
|
|
158
|
-
const context = await this.loadContext(flags);
|
|
159
|
-
clearSpinner();
|
|
160
|
-
unmount();
|
|
161
170
|
const result = await this.runEditWizard(context, cwd);
|
|
162
171
|
if (!result) this.error("Cancelled", { exit: EXIT_CODES.CANCELLED });
|
|
163
|
-
this.reportValidationErrors(result);
|
|
172
|
+
this.reportValidationErrors(result.validation);
|
|
164
173
|
const activeNewSkills = result.skills.filter((s) => !s.excluded);
|
|
165
174
|
const activeNewAgents = result.agentConfigs.filter((a) => !a.excluded);
|
|
166
175
|
const activeOldSkills = (context.projectConfig?.skills ?? []).filter((s) => !s.excluded);
|
|
@@ -179,13 +188,24 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
179
188
|
});
|
|
180
189
|
const isProjectSetup = flags[EDIT_PROJECT_SETUP_FLAG] && !isHomeDirectory(cwd);
|
|
181
190
|
if (!hasAnyChanges(changes)) {
|
|
182
|
-
this.log(
|
|
191
|
+
this.log(chalk.hex(CLI_COLORS.NEUTRAL)("No changes made."));
|
|
183
192
|
if (!isProjectSetup) return;
|
|
184
|
-
await this.writeConfigAndCompile(result, context,
|
|
193
|
+
await this.writeConfigAndCompile(result, context, cwd);
|
|
185
194
|
this.logCompletionSummary(changes);
|
|
186
195
|
return;
|
|
187
196
|
}
|
|
188
|
-
|
|
197
|
+
const removalReasons = await unresolvedSkillRemovalReasons(
|
|
198
|
+
result.unresolvableSkillIds,
|
|
199
|
+
activeOldSkills,
|
|
200
|
+
context.projectDir,
|
|
201
|
+
loadedSourceLabel(context.sourceResult)
|
|
202
|
+
);
|
|
203
|
+
this.logChangeSummary(
|
|
204
|
+
changes,
|
|
205
|
+
filteredResult.skills,
|
|
206
|
+
filteredOldConfig?.skills ?? [],
|
|
207
|
+
removalReasons
|
|
208
|
+
);
|
|
189
209
|
const migratedSkillIds = await this.applyMigrations(
|
|
190
210
|
changes,
|
|
191
211
|
filteredResult,
|
|
@@ -199,11 +219,30 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
199
219
|
await this.applyPluginChanges(changes, filteredResult, activeOldSkills, context, cwd);
|
|
200
220
|
await this.copyNewLocalSkills(changes, filteredResult, context, cwd);
|
|
201
221
|
await this.removeDeletedLocalSkills(changes, activeOldSkills, cwd);
|
|
202
|
-
await this.writeConfigAndCompile(result, context,
|
|
222
|
+
await this.writeConfigAndCompile(result, context, cwd);
|
|
203
223
|
await this.cleanupStaleAgentFiles(changes, activeOldAgents, cwd);
|
|
204
224
|
this.logCompletionSummary(changes);
|
|
205
225
|
}
|
|
206
|
-
|
|
226
|
+
/**
|
|
227
|
+
* The load below, behind a spinner that comes down whichever way the await ends.
|
|
228
|
+
*
|
|
229
|
+
* The cleanup is a `finally` because all three of `loadContext`'s refusals are raised
|
|
230
|
+
* while this spinner is mounted, and oclif would otherwise paint its error under an Ink
|
|
231
|
+
* tree still repainting over it. Never a `catch`: the throw reaches oclif untouched, or
|
|
232
|
+
* both the error rendering and the pinned exit codes change with it.
|
|
233
|
+
*/
|
|
234
|
+
async loadContextUnderSpinner() {
|
|
235
|
+
const { unmount, clear: clearSpinner } = render(
|
|
236
|
+
/* @__PURE__ */ jsx(Spinner, { label: STATUS_MESSAGES.LOADING_SKILLS })
|
|
237
|
+
);
|
|
238
|
+
try {
|
|
239
|
+
return await this.loadContext();
|
|
240
|
+
} finally {
|
|
241
|
+
clearSpinner();
|
|
242
|
+
unmount();
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
async loadContext() {
|
|
207
246
|
const detected = await detectProject();
|
|
208
247
|
if (!detected) {
|
|
209
248
|
this.error(ERROR_MESSAGES.NO_INSTALLATION, {
|
|
@@ -215,12 +254,7 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
215
254
|
let sourceResult;
|
|
216
255
|
let startupMessages = [];
|
|
217
256
|
try {
|
|
218
|
-
const loaded = await loadSource({
|
|
219
|
-
sourceFlag: flags.source,
|
|
220
|
-
projectDir,
|
|
221
|
-
forceRefresh: flags.refresh,
|
|
222
|
-
captureStartupMessages: true
|
|
223
|
-
});
|
|
257
|
+
const loaded = await loadSource({ projectDir, captureStartupMessages: true });
|
|
224
258
|
sourceResult = loaded.sourceResult;
|
|
225
259
|
startupMessages = loaded.startupMessages;
|
|
226
260
|
const sourceInfo = sourceResult.isLocal ? "local" : sourceResult.sourceConfig.sourceOrigin;
|
|
@@ -236,9 +270,9 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
236
270
|
const discoveredSkills = await discoverAllPluginSkills(projectDir);
|
|
237
271
|
const pluginSkillIds = typedKeys(discoveredSkills);
|
|
238
272
|
const excludedConfigIds = new Set(
|
|
239
|
-
projectConfig?.skills
|
|
273
|
+
projectConfig?.skills.filter((s) => s.excluded).map((s) => s.id) ?? []
|
|
240
274
|
);
|
|
241
|
-
const configSkillIds = projectConfig?.skills
|
|
275
|
+
const configSkillIds = projectConfig?.skills.filter((s) => !s.excluded).map((s) => s.id) ?? [];
|
|
242
276
|
const filteredPluginSkillIds = pluginSkillIds.filter((id) => !excludedConfigIds.has(id));
|
|
243
277
|
const mergedIds = /* @__PURE__ */ new Set([...filteredPluginSkillIds, ...configSkillIds]);
|
|
244
278
|
currentSkillIds = [...mergedIds];
|
|
@@ -259,22 +293,24 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
259
293
|
};
|
|
260
294
|
}
|
|
261
295
|
async runEditWizard(context, cwd) {
|
|
262
|
-
const { projectConfig,
|
|
296
|
+
const { projectConfig, currentSkillIds } = context;
|
|
297
|
+
const selectedAgents = projectConfig?.agents && activeAgentNames(projectConfig.agents);
|
|
263
298
|
return runWizardSession({
|
|
264
299
|
hydrate: {
|
|
265
300
|
initialStep: "build",
|
|
266
|
-
|
|
267
|
-
|
|
301
|
+
...projectConfig?.selectedDomains !== void 0 && {
|
|
302
|
+
initialDomains: projectConfig.selectedDomains
|
|
303
|
+
},
|
|
304
|
+
...selectedAgents !== void 0 && { initialAgents: selectedAgents },
|
|
268
305
|
installedSkillIds: currentSkillIds,
|
|
269
|
-
installedSkillConfigs: projectConfig
|
|
270
|
-
installedAgentConfigs: projectConfig
|
|
306
|
+
...projectConfig?.skills !== void 0 && { installedSkillConfigs: projectConfig.skills },
|
|
307
|
+
...projectConfig?.agents !== void 0 && { installedAgentConfigs: projectConfig.agents },
|
|
271
308
|
isEditingFromGlobalScope: isHomeDirectory(cwd)
|
|
272
309
|
},
|
|
273
310
|
props: {
|
|
274
311
|
version: this.config.version,
|
|
275
|
-
initialAgents:
|
|
312
|
+
initialAgents: selectedAgents,
|
|
276
313
|
installedSkillIds: currentSkillIds,
|
|
277
|
-
projectDir,
|
|
278
314
|
startupMessages: context.startupMessages
|
|
279
315
|
},
|
|
280
316
|
onCancel: () => this.log("\nEdit cancelled"),
|
|
@@ -299,8 +335,16 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
299
335
|
* `executeMigration` acted on this run are rewritten, and only their `source` field. Global
|
|
300
336
|
* entries this session merely displayed, re-scoped or deselected are untouched, as are
|
|
301
337
|
* `marketplace`, `stack`, `agents` and every other registered project's view of them.
|
|
302
|
-
*
|
|
303
|
-
* project directory is a supported flow
|
|
338
|
+
*
|
|
339
|
+
* Driving a global-scope migration from a project directory is NOT a supported flow, and this
|
|
340
|
+
* method is no longer the thing that permits it. The wizard now refuses it at source: the two
|
|
341
|
+
* bulk install-mode keys are withdrawn, and `setInstallMode` ignores a project-context call
|
|
342
|
+
* against a global slot the hydration snapshot owns — the same authority the Sources grid
|
|
343
|
+
* already enforced by rendering that row inert. What still reaches here is the residue that
|
|
344
|
+
* authority leaves legitimate: a mode change committed on the project half of a `[P][G]` pair
|
|
345
|
+
* and then carried to global scope by a P->G collapse (`s`) in the same session. The entry is
|
|
346
|
+
* the project's own to configure at the moment it is configured, and global at the moment it
|
|
347
|
+
* is written — so the migration is real, and the global config must record it.
|
|
304
348
|
*
|
|
305
349
|
* Runs BEFORE `writeConfigAndCompile`, so the global config written here is the one
|
|
306
350
|
* the wizard write reloads, keeps (existing wins in `mergeGlobalConfigs`) and inlines
|
|
@@ -322,6 +366,10 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
322
366
|
const report = await mutateGlobal(
|
|
323
367
|
{ kind: "migrate-skill-sources", sources: migratedSources },
|
|
324
368
|
{
|
|
369
|
+
// The deps contract in config-gate/deps.ts declares
|
|
370
|
+
// `() => Promise<MergedSkillsMatrix>`; this caller happens to have its
|
|
371
|
+
// matrix in hand already.
|
|
372
|
+
// eslint-disable-next-line @typescript-eslint/require-await -- deps contract
|
|
325
373
|
loadMatrix: async () => context.sourceResult.matrix,
|
|
326
374
|
loadAgents: async () => (await loadAgentDefs({ projectDir: cwd })).agents
|
|
327
375
|
}
|
|
@@ -331,14 +379,7 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
331
379
|
this.warn(`Could not record global source change: ${getErrorMessage(error)}`);
|
|
332
380
|
}
|
|
333
381
|
}
|
|
334
|
-
|
|
335
|
-
if (result.validation.errors.length > 0) {
|
|
336
|
-
for (const err of result.validation.errors) {
|
|
337
|
-
this.warn(err.message);
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
logChangeSummary(changes, newSkills, oldSkills) {
|
|
382
|
+
logChangeSummary(changes, newSkills, oldSkills, removalReasons) {
|
|
342
383
|
const {
|
|
343
384
|
addedSkills,
|
|
344
385
|
removedSkills,
|
|
@@ -351,27 +392,30 @@ var Edit = class _Edit extends BaseCommand {
|
|
|
351
392
|
dualScopeAgentTransitions
|
|
352
393
|
} = changes;
|
|
353
394
|
this.log(`
|
|
354
|
-
${
|
|
395
|
+
${chalk.hex(CLI_COLORS.WHITE).bold("Changes:")}`);
|
|
355
396
|
for (const skillId of addedSkills) {
|
|
356
397
|
const scope = newSkills.find((s) => s.id === skillId)?.scope;
|
|
357
398
|
const scopeLabel = scope ? ` ${formatScopeTag(scope)}` : "";
|
|
358
399
|
this.log(
|
|
359
|
-
|
|
400
|
+
chalk.hex(CLI_COLORS.SUCCESS)(` + ${getSkillById(skillId).displayName}${scopeLabel}`)
|
|
360
401
|
);
|
|
361
402
|
}
|
|
362
403
|
for (const skillId of removedSkills) {
|
|
363
404
|
const scope = oldSkills.find((s) => s.id === skillId)?.scope;
|
|
364
405
|
const scopeLabel = scope ? ` ${formatScopeTag(scope)}` : "";
|
|
365
|
-
|
|
406
|
+
const reason = removalReasons.get(skillId);
|
|
407
|
+
this.log(
|
|
408
|
+
chalk.hex(CLI_COLORS.ERROR)(` - ${getSkillDisplayName(skillId)}${scopeLabel}`) + (reason ? chalk.hex(CLI_COLORS.NEUTRAL)(` (${reason})`) : "")
|
|
409
|
+
);
|
|
366
410
|
}
|
|
367
411
|
for (const agentName of addedAgents) {
|
|
368
412
|
this.log(
|
|
369
|
-
|
|
413
|
+
chalk.hex(CLI_COLORS.SUCCESS)(` + ${agentName}`) + chalk.hex(CLI_COLORS.NEUTRAL)(" (agent)")
|
|
370
414
|
);
|
|
371
415
|
}
|
|
372
416
|
for (const agentName of removedAgents) {
|
|
373
417
|
this.log(
|
|
374
|
-
|
|
418
|
+
chalk.hex(CLI_COLORS.ERROR)(` - ${agentName}`) + chalk.hex(CLI_COLORS.NEUTRAL)(" (agent)")
|
|
375
419
|
);
|
|
376
420
|
}
|
|
377
421
|
for (const [skillId, change] of sourceChanges) {
|
|
@@ -379,75 +423,49 @@ ${source_default.hex(CLI_COLORS.WHITE).bold("Changes:")}`);
|
|
|
379
423
|
const fromLabel = formatSourceDisplayName(change.from);
|
|
380
424
|
const toLabel = formatSourceDisplayName(change.to);
|
|
381
425
|
this.log(
|
|
382
|
-
|
|
426
|
+
chalk.hex(CLI_COLORS.WARNING)(` ~ ${displayName}`) + chalk.hex(CLI_COLORS.NEUTRAL)(` (${fromLabel} \u2192 ${toLabel})`)
|
|
383
427
|
);
|
|
384
428
|
}
|
|
385
429
|
for (const [skillId, change] of scopeChanges) {
|
|
386
|
-
|
|
387
|
-
if (dualScopeSkillTransitions.has(skillId)) {
|
|
388
|
-
this.log(formatDualScopeTransition(displayName, change.to));
|
|
389
|
-
continue;
|
|
390
|
-
}
|
|
391
|
-
const fromLabel = formatScopeTag(change.from);
|
|
392
|
-
const toLabel = formatScopeTag(change.to);
|
|
393
|
-
const isGlobalToProject = change.from === "global" && change.to === "project";
|
|
394
|
-
const prefix = isGlobalToProject ? "+" : "~";
|
|
395
|
-
const color = isGlobalToProject ? CLI_COLORS.SUCCESS : CLI_COLORS.WARNING;
|
|
396
|
-
this.log(
|
|
397
|
-
source_default.hex(color)(` ${prefix} ${displayName}`) + source_default.hex(CLI_COLORS.NEUTRAL)(` (${fromLabel} \u2192 ${toLabel})`)
|
|
398
|
-
);
|
|
430
|
+
this.log(formatSkillScopeChangeLine(skillId, change, dualScopeSkillTransitions));
|
|
399
431
|
}
|
|
400
432
|
for (const [agentName, change] of agentScopeChanges) {
|
|
401
|
-
|
|
402
|
-
this.log(
|
|
403
|
-
formatDualScopeTransition(agentName, change.to) + source_default.hex(CLI_COLORS.NEUTRAL)(" (agent)")
|
|
404
|
-
);
|
|
405
|
-
continue;
|
|
406
|
-
}
|
|
407
|
-
const fromLabel = formatScopeTag(change.from);
|
|
408
|
-
const toLabel = formatScopeTag(change.to);
|
|
409
|
-
this.log(
|
|
410
|
-
source_default.hex(CLI_COLORS.WARNING)(` ~ ${agentName}`) + source_default.hex(CLI_COLORS.NEUTRAL)(` (${fromLabel} \u2192 ${toLabel})`)
|
|
411
|
-
);
|
|
433
|
+
this.log(formatAgentScopeChangeLine(agentName, change, dualScopeAgentTransitions));
|
|
412
434
|
}
|
|
413
435
|
this.log("");
|
|
414
436
|
}
|
|
415
437
|
async applyMigrations(_changes, filteredResult, activeOldSkills, context, cwd) {
|
|
416
438
|
const migrationPlan = detectMigrations(activeOldSkills, filteredResult.skills);
|
|
417
|
-
const
|
|
418
|
-
if (hasMigrations) {
|
|
419
|
-
if (migrationPlan.toEject.length > 0) {
|
|
420
|
-
this.log(
|
|
421
|
-
source_default.hex(CLI_COLORS.NEUTRAL)(
|
|
422
|
-
`Switching ${migrationPlan.toEject.length} skill(s) to eject`
|
|
423
|
-
)
|
|
424
|
-
);
|
|
425
|
-
}
|
|
426
|
-
if (migrationPlan.toPlugin.length > 0) {
|
|
427
|
-
this.log(
|
|
428
|
-
source_default.hex(CLI_COLORS.NEUTRAL)(
|
|
429
|
-
`Switching ${migrationPlan.toPlugin.length} skill(s) to plugin`
|
|
430
|
-
)
|
|
431
|
-
);
|
|
432
|
-
await this.requireMarketplaceOrExit(context.sourceResult, "migrate skills to plugin mode");
|
|
433
|
-
}
|
|
434
|
-
const migrationResult = await executeMigration(migrationPlan, cwd, context.sourceResult);
|
|
435
|
-
for (const warning of migrationResult.warnings) {
|
|
436
|
-
this.warn(warning);
|
|
437
|
-
}
|
|
438
|
-
for (const item of migrationResult.failedPluginInstalls) {
|
|
439
|
-
this.warn(`Failed to install plugin ${item.id}: ${item.error}`);
|
|
440
|
-
}
|
|
441
|
-
if (migrationResult.failedPluginInstalls.length > 0) {
|
|
442
|
-
this.error(pluginInstallFailureError(migrationResult.failedPluginInstalls.length), {
|
|
443
|
-
exit: EXIT_CODES.ERROR
|
|
444
|
-
});
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
return /* @__PURE__ */ new Set([
|
|
439
|
+
const migratedSkillIds = /* @__PURE__ */ new Set([
|
|
448
440
|
...migrationPlan.toEject.map((m) => m.id),
|
|
449
441
|
...migrationPlan.toPlugin.map((m) => m.id)
|
|
450
442
|
]);
|
|
443
|
+
if (migratedSkillIds.size === 0) return migratedSkillIds;
|
|
444
|
+
if (migrationPlan.toEject.length > 0) {
|
|
445
|
+
this.logModeSwitch(migrationPlan.toEject.length, INSTALL_MODE_DESCRIPTIONS.eject);
|
|
446
|
+
}
|
|
447
|
+
if (migrationPlan.toPlugin.length > 0) {
|
|
448
|
+
this.logModeSwitch(migrationPlan.toPlugin.length, INSTALL_MODE_DESCRIPTIONS.plugin);
|
|
449
|
+
await this.requireMarketplaceOrExit(context.sourceResult, "migrate skills to plugin mode");
|
|
450
|
+
this.announcePluginInstall();
|
|
451
|
+
}
|
|
452
|
+
const migrationResult = await executeMigration(migrationPlan, cwd, context.sourceResult);
|
|
453
|
+
for (const warning of migrationResult.warnings) {
|
|
454
|
+
this.warn(warning);
|
|
455
|
+
}
|
|
456
|
+
if (migrationPlan.toEject.length > 0) {
|
|
457
|
+
this.log(
|
|
458
|
+
chalk.hex(CLI_COLORS.NEUTRAL)(localSkillsCopied(migrationResult.ejectedSkills.length))
|
|
459
|
+
);
|
|
460
|
+
}
|
|
461
|
+
if (migrationPlan.toPlugin.length > 0) {
|
|
462
|
+
this.reportPluginInstalls(migrationResult.pluginInstalls);
|
|
463
|
+
}
|
|
464
|
+
return migratedSkillIds;
|
|
465
|
+
}
|
|
466
|
+
/** Names what this run is switching, in the words `init` describes an install mode with. */
|
|
467
|
+
logModeSwitch(count, modeDescription) {
|
|
468
|
+
this.log(chalk.hex(CLI_COLORS.NEUTRAL)(`Switching ${count} skill(s) to ${modeDescription}`));
|
|
451
469
|
}
|
|
452
470
|
async applyScopeChanges(changes, filteredResult, context, cwd) {
|
|
453
471
|
const { scopeChanges } = changes;
|
|
@@ -503,20 +521,7 @@ ${source_default.hex(CLI_COLORS.WHITE).bold("Changes:")}`);
|
|
|
503
521
|
"install or uninstall plugin skills"
|
|
504
522
|
);
|
|
505
523
|
if (addedPluginSkills.length > 0) {
|
|
506
|
-
|
|
507
|
-
if (pluginResult.installed.length > 0) {
|
|
508
|
-
this.log(
|
|
509
|
-
source_default.hex(CLI_COLORS.NEUTRAL)(`Installed ${pluginResult.installed.length} plugin(s)`)
|
|
510
|
-
);
|
|
511
|
-
}
|
|
512
|
-
for (const item of pluginResult.failed) {
|
|
513
|
-
this.warn(`Failed to install plugin ${item.id}: ${item.error}`);
|
|
514
|
-
}
|
|
515
|
-
if (pluginResult.failed.length > 0) {
|
|
516
|
-
this.error(pluginInstallFailureError(pluginResult.failed.length), {
|
|
517
|
-
exit: EXIT_CODES.ERROR
|
|
518
|
-
});
|
|
519
|
-
}
|
|
524
|
+
await this.installPluginSkillsReported(addedPluginSkills, marketplace, cwd);
|
|
520
525
|
}
|
|
521
526
|
if (removedPluginSkills.length > 0) {
|
|
522
527
|
const uninstallResult = await uninstallPluginSkills(
|
|
@@ -527,7 +532,7 @@ ${source_default.hex(CLI_COLORS.WHITE).bold("Changes:")}`);
|
|
|
527
532
|
);
|
|
528
533
|
if (uninstallResult.uninstalled.length > 0) {
|
|
529
534
|
this.log(
|
|
530
|
-
|
|
535
|
+
chalk.hex(CLI_COLORS.NEUTRAL)(`Removed ${uninstallResult.uninstalled.length} plugin(s)`)
|
|
531
536
|
);
|
|
532
537
|
}
|
|
533
538
|
for (const item of uninstallResult.failed) {
|
|
@@ -542,7 +547,7 @@ ${source_default.hex(CLI_COLORS.WHITE).bold("Changes:")}`);
|
|
|
542
547
|
);
|
|
543
548
|
if (addedLocalSkills.length > 0) {
|
|
544
549
|
const copyResult = await copyLocalSkills(addedLocalSkills, cwd, context.sourceResult);
|
|
545
|
-
this.log(
|
|
550
|
+
this.log(chalk.hex(CLI_COLORS.NEUTRAL)(localSkillsCopied(copyResult.totalCopied)));
|
|
546
551
|
}
|
|
547
552
|
}
|
|
548
553
|
async removeDeletedLocalSkills(changes, activeOldSkills, cwd) {
|
|
@@ -554,12 +559,10 @@ ${source_default.hex(CLI_COLORS.WHITE).bold("Changes:")}`);
|
|
|
554
559
|
await deleteLocalSkill(deleteDir, skillId);
|
|
555
560
|
}
|
|
556
561
|
}
|
|
557
|
-
async writeConfigAndCompile(result, context,
|
|
562
|
+
async writeConfigAndCompile(result, context, cwd) {
|
|
558
563
|
let agentDefsResult;
|
|
559
564
|
try {
|
|
560
|
-
agentDefsResult = await loadAgentDefs({
|
|
561
|
-
forceRefresh: flags.refresh
|
|
562
|
-
});
|
|
565
|
+
agentDefsResult = await loadAgentDefs({});
|
|
563
566
|
} catch (error) {
|
|
564
567
|
this.handleError(error);
|
|
565
568
|
}
|
|
@@ -569,7 +572,6 @@ ${source_default.hex(CLI_COLORS.WHITE).bold("Changes:")}`);
|
|
|
569
572
|
wizardResult: result,
|
|
570
573
|
sourceResult: context.sourceResult,
|
|
571
574
|
projectDir: cwd,
|
|
572
|
-
sourceFlag: flags.source,
|
|
573
575
|
agents: agentDefsResult.agents,
|
|
574
576
|
// A full `cc edit` pass is authoritative over the roster it owns, so deselected entries
|
|
575
577
|
// are removed rather than union-preserved (D-233 Scenario C). Global-context edit owns
|
|
@@ -580,6 +582,9 @@ ${source_default.hex(CLI_COLORS.WHITE).bold("Changes:")}`);
|
|
|
580
582
|
} catch (error) {
|
|
581
583
|
this.warn(`Could not update config: ${getErrorMessage(error)}`);
|
|
582
584
|
}
|
|
585
|
+
if (configResult) {
|
|
586
|
+
this.reportUnassignedSkills(configResult.config);
|
|
587
|
+
}
|
|
583
588
|
try {
|
|
584
589
|
const agentScopeMap = activeAgentScopeMap(result.agentConfigs);
|
|
585
590
|
const { allSkills } = await discoverInstalledSkills(cwd);
|
|
@@ -589,19 +594,23 @@ ${source_default.hex(CLI_COLORS.WHITE).bold("Changes:")}`);
|
|
|
589
594
|
skills: allSkills,
|
|
590
595
|
agentScopeMap
|
|
591
596
|
});
|
|
592
|
-
|
|
597
|
+
const { compiled, rewritten, failed, warnings } = compilationResult;
|
|
598
|
+
const summary = recompileSummary(
|
|
599
|
+
rewritten.length,
|
|
600
|
+
compiled.length - rewritten.length,
|
|
601
|
+
RECOMPILE_SUBJECT
|
|
602
|
+
);
|
|
603
|
+
if (failed.length > 0) {
|
|
593
604
|
this.log(
|
|
594
|
-
|
|
605
|
+
chalk.hex(CLI_COLORS.NEUTRAL)(summary) + chalk.hex(CLI_COLORS.WARNING)(` (${failed.length} failed)`)
|
|
595
606
|
);
|
|
596
|
-
for (const warning of
|
|
607
|
+
for (const warning of warnings) {
|
|
597
608
|
this.warn(warning);
|
|
598
609
|
}
|
|
599
|
-
} else if (
|
|
600
|
-
this.log(
|
|
601
|
-
source_default.hex(CLI_COLORS.NEUTRAL)(`Recompiled ${compilationResult.compiled.length} agents`)
|
|
602
|
-
);
|
|
610
|
+
} else if (compiled.length > 0) {
|
|
611
|
+
this.log(chalk.hex(CLI_COLORS.NEUTRAL)(summary));
|
|
603
612
|
} else {
|
|
604
|
-
this.log(
|
|
613
|
+
this.log(chalk.hex(CLI_COLORS.NEUTRAL)(INFO_MESSAGES.NO_AGENTS_TO_RECOMPILE));
|
|
605
614
|
}
|
|
606
615
|
} catch (error) {
|
|
607
616
|
this.warn(`Agent recompilation failed: ${getErrorMessage(error)}`);
|
|
@@ -611,57 +620,25 @@ ${source_default.hex(CLI_COLORS.WHITE).bold("Changes:")}`);
|
|
|
611
620
|
this.reportPropagatedRecompile(configResult.propagation);
|
|
612
621
|
}
|
|
613
622
|
}
|
|
614
|
-
/**
|
|
615
|
-
* Renders the recompile the gated write already performed on every OTHER
|
|
616
|
-
* registered project this run's global change was propagated into.
|
|
617
|
-
*/
|
|
618
|
-
reportPropagatedRecompile(propagation) {
|
|
619
|
-
if (propagation.propagated.updated.length === 0) return;
|
|
620
|
-
const { recompiledCount, failedCount, warnings } = propagation.recompile;
|
|
621
|
-
for (const warning of warnings) {
|
|
622
|
-
this.warn(warning);
|
|
623
|
-
}
|
|
624
|
-
const summary = source_default.hex(CLI_COLORS.NEUTRAL)(
|
|
625
|
-
`Recompiled agents in ${recompiledCount} registered project(s)`
|
|
626
|
-
);
|
|
627
|
-
this.log(
|
|
628
|
-
failedCount > 0 ? summary + source_default.hex(CLI_COLORS.WARNING)(` (${failedCount} failed)`) : summary
|
|
629
|
-
);
|
|
630
|
-
}
|
|
631
623
|
async cleanupStaleAgentFiles(changes, oldAgents, cwd) {
|
|
632
|
-
const
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
`${agentName}.md`
|
|
638
|
-
);
|
|
639
|
-
try {
|
|
640
|
-
await remove(oldAgentPath);
|
|
641
|
-
} catch (error) {
|
|
642
|
-
this.warn(`Could not remove old agent file ${oldAgentPath}: ${getErrorMessage(error)}`);
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
for (const agentName of removedAgents) {
|
|
646
|
-
const oldScope = oldAgents.find((a) => a.name === agentName)?.scope ?? "project";
|
|
647
|
-
const agentPath = path.join(resolveInstallPaths(cwd, oldScope).agentsDir, `${agentName}.md`);
|
|
648
|
-
try {
|
|
649
|
-
await remove(agentPath);
|
|
650
|
-
} catch (error) {
|
|
651
|
-
this.warn(`Could not remove agent file ${agentPath}: ${getErrorMessage(error)}`);
|
|
624
|
+
for (const removal of planStaleAgentRemovals(changes, oldAgents, cwd)) {
|
|
625
|
+
const { failed } = await removeCompiledAgents(removal);
|
|
626
|
+
for (const { name, error } of failed) {
|
|
627
|
+
const agentPath = path.join(removal.agentsDir, `${name}.md`);
|
|
628
|
+
this.warn(`Could not remove agent file ${agentPath}: ${error}`);
|
|
652
629
|
}
|
|
653
630
|
}
|
|
654
631
|
}
|
|
655
632
|
logCompletionSummary(_changes) {
|
|
656
633
|
this.log(`
|
|
657
|
-
${
|
|
634
|
+
${chalk.hex(CLI_COLORS.SUCCESS)("\u2713 Done")}
|
|
658
635
|
`);
|
|
659
636
|
}
|
|
660
637
|
};
|
|
661
638
|
function detectConfigChanges(oldConfig, wizardResult, fullEntries) {
|
|
662
|
-
const oldSkillIds = oldConfig?.skills
|
|
639
|
+
const oldSkillIds = oldConfig?.skills.map((s) => s.id) ?? [];
|
|
663
640
|
const newSkillIds = wizardResult.skills.map((s) => s.id);
|
|
664
|
-
const oldAgentNames = oldConfig?.agents
|
|
641
|
+
const oldAgentNames = oldConfig?.agents.map((a) => a.name) ?? [];
|
|
665
642
|
const newAgentNames = wizardResult.agentConfigs.map((a) => a.name);
|
|
666
643
|
const oldSkillsById = indexBy(oldConfig?.skills ?? [], (s) => s.id);
|
|
667
644
|
const oldAgentsByName = indexBy(oldConfig?.agents ?? [], (a) => a.name);
|
|
@@ -727,6 +704,24 @@ function detectDualScopeTransitions(scopeChanges, fullNew, fullOld, getKey) {
|
|
|
727
704
|
}
|
|
728
705
|
return result;
|
|
729
706
|
}
|
|
707
|
+
var STALE_AGENT_SCOPES = ["project", "global"];
|
|
708
|
+
var UNRECORDED_AGENT_SCOPE = "project";
|
|
709
|
+
function installedScope(name, oldAgents) {
|
|
710
|
+
return oldAgents.find((agent) => agent.name === name)?.scope ?? UNRECORDED_AGENT_SCOPE;
|
|
711
|
+
}
|
|
712
|
+
function planStaleAgentRemovals(changes, oldAgents, cwd) {
|
|
713
|
+
const supersededByGlobal = [...changes.agentScopeChanges].filter(([, change]) => change.from !== "global").map(([name]) => ({ name, scope: "project" }));
|
|
714
|
+
const deselected = changes.removedAgents.map((name) => ({
|
|
715
|
+
name,
|
|
716
|
+
scope: installedScope(name, oldAgents)
|
|
717
|
+
}));
|
|
718
|
+
const stale = [...supersededByGlobal, ...deselected];
|
|
719
|
+
const removalAtScope = (scope) => ({
|
|
720
|
+
agentsDir: resolveInstallPaths(cwd, scope).agentsDir,
|
|
721
|
+
agents: stale.filter((agent) => agent.scope === scope).map((agent) => agent.name)
|
|
722
|
+
});
|
|
723
|
+
return STALE_AGENT_SCOPES.map(removalAtScope).filter((removal) => removal.agents.length > 0);
|
|
724
|
+
}
|
|
730
725
|
function hasAnyChanges(changes) {
|
|
731
726
|
return changes.addedSkills.length > 0 || changes.removedSkills.length > 0 || changes.addedAgents.length > 0 || changes.removedAgents.length > 0 || changes.sourceChanges.size > 0 || changes.scopeChanges.size > 0 || changes.agentScopeChanges.size > 0;
|
|
732
727
|
}
|