axm.sh 0.1.6
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/LICENSE +21 -0
- package/README.md +26 -0
- package/dist/src/app.d.ts +7 -0
- package/dist/src/app.d.ts.map +1 -0
- package/dist/src/app.js +96 -0
- package/dist/src/app.js.map +1 -0
- package/dist/src/cli-flags.d.ts +3 -0
- package/dist/src/cli-flags.d.ts.map +1 -0
- package/dist/src/cli-flags.js +4 -0
- package/dist/src/cli-flags.js.map +1 -0
- package/dist/src/formatter.d.ts +22 -0
- package/dist/src/formatter.d.ts.map +1 -0
- package/dist/src/formatter.js +170 -0
- package/dist/src/formatter.js.map +1 -0
- package/dist/src/json-output.d.ts +41 -0
- package/dist/src/json-output.d.ts.map +1 -0
- package/dist/src/json-output.js +171 -0
- package/dist/src/json-output.js.map +1 -0
- package/dist/src/main.d.ts +3 -0
- package/dist/src/main.d.ts.map +1 -0
- package/dist/src/main.js +4 -0
- package/dist/src/main.js.map +1 -0
- package/dist/src/root/auth/_auth.d.ts +3 -0
- package/dist/src/root/auth/_auth.d.ts.map +1 -0
- package/dist/src/root/auth/_auth.js +11 -0
- package/dist/src/root/auth/_auth.js.map +1 -0
- package/dist/src/root/auth/login.d.ts +15 -0
- package/dist/src/root/auth/login.d.ts.map +1 -0
- package/dist/src/root/auth/login.js +55 -0
- package/dist/src/root/auth/login.js.map +1 -0
- package/dist/src/root/auth/logout.d.ts +7 -0
- package/dist/src/root/auth/logout.d.ts.map +1 -0
- package/dist/src/root/auth/logout.js +59 -0
- package/dist/src/root/auth/logout.js.map +1 -0
- package/dist/src/root/auth/token.d.ts +7 -0
- package/dist/src/root/auth/token.d.ts.map +1 -0
- package/dist/src/root/auth/token.js +45 -0
- package/dist/src/root/auth/token.js.map +1 -0
- package/dist/src/root/auth/whoami.d.ts +7 -0
- package/dist/src/root/auth/whoami.d.ts.map +1 -0
- package/dist/src/root/auth/whoami.js +73 -0
- package/dist/src/root/auth/whoami.js.map +1 -0
- package/dist/src/root/commands/_commands.d.ts +3 -0
- package/dist/src/root/commands/_commands.d.ts.map +1 -0
- package/dist/src/root/commands/_commands.js +45 -0
- package/dist/src/root/commands/_commands.js.map +1 -0
- package/dist/src/root/commands/disable.d.ts +17 -0
- package/dist/src/root/commands/disable.d.ts.map +1 -0
- package/dist/src/root/commands/disable.js +100 -0
- package/dist/src/root/commands/disable.js.map +1 -0
- package/dist/src/root/commands/enable.d.ts +17 -0
- package/dist/src/root/commands/enable.d.ts.map +1 -0
- package/dist/src/root/commands/enable.js +101 -0
- package/dist/src/root/commands/enable.js.map +1 -0
- package/dist/src/root/commands/install/command-actions.d.ts +61 -0
- package/dist/src/root/commands/install/command-actions.d.ts.map +1 -0
- package/dist/src/root/commands/install/command-actions.js +211 -0
- package/dist/src/root/commands/install/command-actions.js.map +1 -0
- package/dist/src/root/commands/install/command.d.ts +3 -0
- package/dist/src/root/commands/install/command.d.ts.map +1 -0
- package/dist/src/root/commands/install/command.js +32 -0
- package/dist/src/root/commands/install/command.js.map +1 -0
- package/dist/src/root/commands/install/handler.d.ts +11 -0
- package/dist/src/root/commands/install/handler.d.ts.map +1 -0
- package/dist/src/root/commands/install/handler.js +31 -0
- package/dist/src/root/commands/install/handler.js.map +1 -0
- package/dist/src/root/commands/install/intent.d.ts +19 -0
- package/dist/src/root/commands/install/intent.d.ts.map +1 -0
- package/dist/src/root/commands/install/intent.js +9 -0
- package/dist/src/root/commands/install/intent.js.map +1 -0
- package/dist/src/root/commands/job-step-result.d.ts +21 -0
- package/dist/src/root/commands/job-step-result.d.ts.map +1 -0
- package/dist/src/root/commands/job-step-result.js +17 -0
- package/dist/src/root/commands/job-step-result.js.map +1 -0
- package/dist/src/root/commands/list.d.ts +7 -0
- package/dist/src/root/commands/list.d.ts.map +1 -0
- package/dist/src/root/commands/list.js +63 -0
- package/dist/src/root/commands/list.js.map +1 -0
- package/dist/src/root/commands/new.d.ts +19 -0
- package/dist/src/root/commands/new.d.ts.map +1 -0
- package/dist/src/root/commands/new.js +111 -0
- package/dist/src/root/commands/new.js.map +1 -0
- package/dist/src/root/commands/preview-sections.d.ts +11 -0
- package/dist/src/root/commands/preview-sections.d.ts.map +1 -0
- package/dist/src/root/commands/preview-sections.js +25 -0
- package/dist/src/root/commands/preview-sections.js.map +1 -0
- package/dist/src/root/commands/publish.d.ts +20 -0
- package/dist/src/root/commands/publish.d.ts.map +1 -0
- package/dist/src/root/commands/publish.js +238 -0
- package/dist/src/root/commands/publish.js.map +1 -0
- package/dist/src/root/commands/uninstall/command-actions.d.ts +31 -0
- package/dist/src/root/commands/uninstall/command-actions.d.ts.map +1 -0
- package/dist/src/root/commands/uninstall/command-actions.js +85 -0
- package/dist/src/root/commands/uninstall/command-actions.js.map +1 -0
- package/dist/src/root/commands/uninstall/command.d.ts +3 -0
- package/dist/src/root/commands/uninstall/command.d.ts.map +1 -0
- package/dist/src/root/commands/uninstall/command.js +27 -0
- package/dist/src/root/commands/uninstall/command.js.map +1 -0
- package/dist/src/root/commands/uninstall/handler.d.ts +8 -0
- package/dist/src/root/commands/uninstall/handler.d.ts.map +1 -0
- package/dist/src/root/commands/uninstall/handler.js +10 -0
- package/dist/src/root/commands/uninstall/handler.js.map +1 -0
- package/dist/src/root/commands/uninstall/intent.d.ts +15 -0
- package/dist/src/root/commands/uninstall/intent.d.ts.map +1 -0
- package/dist/src/root/commands/uninstall/intent.js +9 -0
- package/dist/src/root/commands/uninstall/intent.js.map +1 -0
- package/dist/src/root/commands/update.d.ts +18 -0
- package/dist/src/root/commands/update.d.ts.map +1 -0
- package/dist/src/root/commands/update.js +145 -0
- package/dist/src/root/commands/update.js.map +1 -0
- package/dist/src/root/discover/command.d.ts +6 -0
- package/dist/src/root/discover/command.d.ts.map +1 -0
- package/dist/src/root/discover/command.js +22 -0
- package/dist/src/root/discover/command.js.map +1 -0
- package/dist/src/root/discover/handler.d.ts +52 -0
- package/dist/src/root/discover/handler.d.ts.map +1 -0
- package/dist/src/root/discover/handler.js +102 -0
- package/dist/src/root/discover/handler.js.map +1 -0
- package/dist/src/root/doctor/command.d.ts +3 -0
- package/dist/src/root/doctor/command.d.ts.map +1 -0
- package/dist/src/root/doctor/command.js +19 -0
- package/dist/src/root/doctor/command.js.map +1 -0
- package/dist/src/root/doctor/handler.d.ts +10 -0
- package/dist/src/root/doctor/handler.d.ts.map +1 -0
- package/dist/src/root/doctor/handler.js +27 -0
- package/dist/src/root/doctor/handler.js.map +1 -0
- package/dist/src/root/doctor/render.d.ts +8 -0
- package/dist/src/root/doctor/render.d.ts.map +1 -0
- package/dist/src/root/doctor/render.js +183 -0
- package/dist/src/root/doctor/render.js.map +1 -0
- package/dist/src/root/init.d.ts +10 -0
- package/dist/src/root/init.d.ts.map +1 -0
- package/dist/src/root/init.js +133 -0
- package/dist/src/root/init.js.map +1 -0
- package/dist/src/root/install/command.d.ts +3 -0
- package/dist/src/root/install/command.d.ts.map +1 -0
- package/dist/src/root/install/command.js +32 -0
- package/dist/src/root/install/command.js.map +1 -0
- package/dist/src/root/install/handler.d.ts +17 -0
- package/dist/src/root/install/handler.d.ts.map +1 -0
- package/dist/src/root/install/handler.js +62 -0
- package/dist/src/root/install/handler.js.map +1 -0
- package/dist/src/root/install/resolve-root-install-intent.d.ts +16 -0
- package/dist/src/root/install/resolve-root-install-intent.d.ts.map +1 -0
- package/dist/src/root/install/resolve-root-install-intent.js +75 -0
- package/dist/src/root/install/resolve-root-install-intent.js.map +1 -0
- package/dist/src/root/install/workspace-install-handler.d.ts +23 -0
- package/dist/src/root/install/workspace-install-handler.d.ts.map +1 -0
- package/dist/src/root/install/workspace-install-handler.js +52 -0
- package/dist/src/root/install/workspace-install-handler.js.map +1 -0
- package/dist/src/root/install/workspace-install.d.ts +38 -0
- package/dist/src/root/install/workspace-install.d.ts.map +1 -0
- package/dist/src/root/install/workspace-install.js +160 -0
- package/dist/src/root/install/workspace-install.js.map +1 -0
- package/dist/src/root/mcp-servers/_mcp-servers.d.ts +3 -0
- package/dist/src/root/mcp-servers/_mcp-servers.d.ts.map +1 -0
- package/dist/src/root/mcp-servers/_mcp-servers.js +14 -0
- package/dist/src/root/mcp-servers/_mcp-servers.js.map +1 -0
- package/dist/src/root/mcp-servers/install/command-actions.d.ts +48 -0
- package/dist/src/root/mcp-servers/install/command-actions.d.ts.map +1 -0
- package/dist/src/root/mcp-servers/install/command-actions.js +185 -0
- package/dist/src/root/mcp-servers/install/command-actions.js.map +1 -0
- package/dist/src/root/mcp-servers/install/command.d.ts +3 -0
- package/dist/src/root/mcp-servers/install/command.d.ts.map +1 -0
- package/dist/src/root/mcp-servers/install/command.js +32 -0
- package/dist/src/root/mcp-servers/install/command.js.map +1 -0
- package/dist/src/root/mcp-servers/install/handler.d.ts +13 -0
- package/dist/src/root/mcp-servers/install/handler.d.ts.map +1 -0
- package/dist/src/root/mcp-servers/install/handler.js +22 -0
- package/dist/src/root/mcp-servers/install/handler.js.map +1 -0
- package/dist/src/root/mcp-servers/install/intent.d.ts +18 -0
- package/dist/src/root/mcp-servers/install/intent.d.ts.map +1 -0
- package/dist/src/root/mcp-servers/install/intent.js +9 -0
- package/dist/src/root/mcp-servers/install/intent.js.map +1 -0
- package/dist/src/root/mcp-servers/uninstall/command-actions.d.ts +31 -0
- package/dist/src/root/mcp-servers/uninstall/command-actions.d.ts.map +1 -0
- package/dist/src/root/mcp-servers/uninstall/command-actions.js +68 -0
- package/dist/src/root/mcp-servers/uninstall/command-actions.js.map +1 -0
- package/dist/src/root/mcp-servers/uninstall/command.d.ts +3 -0
- package/dist/src/root/mcp-servers/uninstall/command.d.ts.map +1 -0
- package/dist/src/root/mcp-servers/uninstall/command.js +27 -0
- package/dist/src/root/mcp-servers/uninstall/command.js.map +1 -0
- package/dist/src/root/mcp-servers/uninstall/handler.d.ts +8 -0
- package/dist/src/root/mcp-servers/uninstall/handler.d.ts.map +1 -0
- package/dist/src/root/mcp-servers/uninstall/handler.js +10 -0
- package/dist/src/root/mcp-servers/uninstall/handler.js.map +1 -0
- package/dist/src/root/mcp-servers/uninstall/intent.d.ts +15 -0
- package/dist/src/root/mcp-servers/uninstall/intent.d.ts.map +1 -0
- package/dist/src/root/mcp-servers/uninstall/intent.js +9 -0
- package/dist/src/root/mcp-servers/uninstall/intent.js.map +1 -0
- package/dist/src/root/packs/_packs.d.ts +3 -0
- package/dist/src/root/packs/_packs.d.ts.map +1 -0
- package/dist/src/root/packs/_packs.js +35 -0
- package/dist/src/root/packs/_packs.js.map +1 -0
- package/dist/src/root/packs/add.d.ts +16 -0
- package/dist/src/root/packs/add.d.ts.map +1 -0
- package/dist/src/root/packs/add.js +198 -0
- package/dist/src/root/packs/add.js.map +1 -0
- package/dist/src/root/packs/install/command-actions.d.ts +56 -0
- package/dist/src/root/packs/install/command-actions.d.ts.map +1 -0
- package/dist/src/root/packs/install/command-actions.js +373 -0
- package/dist/src/root/packs/install/command-actions.js.map +1 -0
- package/dist/src/root/packs/install/command.d.ts +3 -0
- package/dist/src/root/packs/install/command.d.ts.map +1 -0
- package/dist/src/root/packs/install/command.js +36 -0
- package/dist/src/root/packs/install/command.js.map +1 -0
- package/dist/src/root/packs/install/handler.d.ts +13 -0
- package/dist/src/root/packs/install/handler.d.ts.map +1 -0
- package/dist/src/root/packs/install/handler.js +22 -0
- package/dist/src/root/packs/install/handler.js.map +1 -0
- package/dist/src/root/packs/install/intent.d.ts +15 -0
- package/dist/src/root/packs/install/intent.d.ts.map +1 -0
- package/dist/src/root/packs/install/intent.js +9 -0
- package/dist/src/root/packs/install/intent.js.map +1 -0
- package/dist/src/root/packs/install/plan.d.ts +63 -0
- package/dist/src/root/packs/install/plan.d.ts.map +1 -0
- package/dist/src/root/packs/install/plan.js +181 -0
- package/dist/src/root/packs/install/plan.js.map +1 -0
- package/dist/src/root/packs/new.d.ts +18 -0
- package/dist/src/root/packs/new.d.ts.map +1 -0
- package/dist/src/root/packs/new.js +103 -0
- package/dist/src/root/packs/new.js.map +1 -0
- package/dist/src/root/packs/publish.d.ts +30 -0
- package/dist/src/root/packs/publish.d.ts.map +1 -0
- package/dist/src/root/packs/publish.js +288 -0
- package/dist/src/root/packs/publish.js.map +1 -0
- package/dist/src/root/packs/remove.d.ts +16 -0
- package/dist/src/root/packs/remove.d.ts.map +1 -0
- package/dist/src/root/packs/remove.js +156 -0
- package/dist/src/root/packs/remove.js.map +1 -0
- package/dist/src/root/packs/uninstall/command-actions.d.ts +47 -0
- package/dist/src/root/packs/uninstall/command-actions.d.ts.map +1 -0
- package/dist/src/root/packs/uninstall/command-actions.js +175 -0
- package/dist/src/root/packs/uninstall/command-actions.js.map +1 -0
- package/dist/src/root/packs/uninstall/command.d.ts +3 -0
- package/dist/src/root/packs/uninstall/command.d.ts.map +1 -0
- package/dist/src/root/packs/uninstall/command.js +31 -0
- package/dist/src/root/packs/uninstall/command.js.map +1 -0
- package/dist/src/root/packs/uninstall/handler.d.ts +8 -0
- package/dist/src/root/packs/uninstall/handler.d.ts.map +1 -0
- package/dist/src/root/packs/uninstall/handler.js +10 -0
- package/dist/src/root/packs/uninstall/handler.js.map +1 -0
- package/dist/src/root/packs/uninstall/intent.d.ts +13 -0
- package/dist/src/root/packs/uninstall/intent.d.ts.map +1 -0
- package/dist/src/root/packs/uninstall/intent.js +10 -0
- package/dist/src/root/packs/uninstall/intent.js.map +1 -0
- package/dist/src/root/packs/uninstall/plan.d.ts +60 -0
- package/dist/src/root/packs/uninstall/plan.d.ts.map +1 -0
- package/dist/src/root/packs/uninstall/plan.js +166 -0
- package/dist/src/root/packs/uninstall/plan.js.map +1 -0
- package/dist/src/root/packs/unpack/command.d.ts +3 -0
- package/dist/src/root/packs/unpack/command.d.ts.map +1 -0
- package/dist/src/root/packs/unpack/command.js +31 -0
- package/dist/src/root/packs/unpack/command.js.map +1 -0
- package/dist/src/root/packs/unpack/handler.d.ts +16 -0
- package/dist/src/root/packs/unpack/handler.d.ts.map +1 -0
- package/dist/src/root/packs/unpack/handler.js +117 -0
- package/dist/src/root/packs/unpack/handler.js.map +1 -0
- package/dist/src/root/packs/unpack/plan.d.ts +72 -0
- package/dist/src/root/packs/unpack/plan.d.ts.map +1 -0
- package/dist/src/root/packs/unpack/plan.js +120 -0
- package/dist/src/root/packs/unpack/plan.js.map +1 -0
- package/dist/src/root/shared/registry-install-target.d.ts +35 -0
- package/dist/src/root/shared/registry-install-target.d.ts.map +1 -0
- package/dist/src/root/shared/registry-install-target.js +66 -0
- package/dist/src/root/shared/registry-install-target.js.map +1 -0
- package/dist/src/root/skills/_skills.d.ts +3 -0
- package/dist/src/root/skills/_skills.d.ts.map +1 -0
- package/dist/src/root/skills/_skills.js +38 -0
- package/dist/src/root/skills/_skills.js.map +1 -0
- package/dist/src/root/skills/disable.d.ts +15 -0
- package/dist/src/root/skills/disable.d.ts.map +1 -0
- package/dist/src/root/skills/disable.js +91 -0
- package/dist/src/root/skills/disable.js.map +1 -0
- package/dist/src/root/skills/enable.d.ts +16 -0
- package/dist/src/root/skills/enable.d.ts.map +1 -0
- package/dist/src/root/skills/enable.js +92 -0
- package/dist/src/root/skills/enable.js.map +1 -0
- package/dist/src/root/skills/fork.d.ts +22 -0
- package/dist/src/root/skills/fork.d.ts.map +1 -0
- package/dist/src/root/skills/fork.js +288 -0
- package/dist/src/root/skills/fork.js.map +1 -0
- package/dist/src/root/skills/install/command-actions.d.ts +76 -0
- package/dist/src/root/skills/install/command-actions.d.ts.map +1 -0
- package/dist/src/root/skills/install/command-actions.js +323 -0
- package/dist/src/root/skills/install/command-actions.js.map +1 -0
- package/dist/src/root/skills/install/command.d.ts +3 -0
- package/dist/src/root/skills/install/command.d.ts.map +1 -0
- package/dist/src/root/skills/install/command.js +46 -0
- package/dist/src/root/skills/install/command.js.map +1 -0
- package/dist/src/root/skills/install/handler.d.ts +15 -0
- package/dist/src/root/skills/install/handler.d.ts.map +1 -0
- package/dist/src/root/skills/install/handler.js +39 -0
- package/dist/src/root/skills/install/handler.js.map +1 -0
- package/dist/src/root/skills/install/intent.d.ts +21 -0
- package/dist/src/root/skills/install/intent.d.ts.map +1 -0
- package/dist/src/root/skills/install/intent.js +7 -0
- package/dist/src/root/skills/install/intent.js.map +1 -0
- package/dist/src/root/skills/install/plan.d.ts +43 -0
- package/dist/src/root/skills/install/plan.d.ts.map +1 -0
- package/dist/src/root/skills/install/plan.js +82 -0
- package/dist/src/root/skills/install/plan.js.map +1 -0
- package/dist/src/root/skills/install/resolve-skill-install-source.d.ts +17 -0
- package/dist/src/root/skills/install/resolve-skill-install-source.d.ts.map +1 -0
- package/dist/src/root/skills/install/resolve-skill-install-source.js +271 -0
- package/dist/src/root/skills/install/resolve-skill-install-source.js.map +1 -0
- package/dist/src/root/skills/install/select-skills.d.ts +37 -0
- package/dist/src/root/skills/install/select-skills.d.ts.map +1 -0
- package/dist/src/root/skills/install/select-skills.js +91 -0
- package/dist/src/root/skills/install/select-skills.js.map +1 -0
- package/dist/src/root/skills/list.d.ts +10 -0
- package/dist/src/root/skills/list.d.ts.map +1 -0
- package/dist/src/root/skills/list.js +68 -0
- package/dist/src/root/skills/list.js.map +1 -0
- package/dist/src/root/skills/new.d.ts +19 -0
- package/dist/src/root/skills/new.d.ts.map +1 -0
- package/dist/src/root/skills/new.js +113 -0
- package/dist/src/root/skills/new.js.map +1 -0
- package/dist/src/root/skills/publish.d.ts +20 -0
- package/dist/src/root/skills/publish.d.ts.map +1 -0
- package/dist/src/root/skills/publish.js +230 -0
- package/dist/src/root/skills/publish.js.map +1 -0
- package/dist/src/root/skills/rename.d.ts +16 -0
- package/dist/src/root/skills/rename.d.ts.map +1 -0
- package/dist/src/root/skills/rename.js +84 -0
- package/dist/src/root/skills/rename.js.map +1 -0
- package/dist/src/root/skills/uninstall/command-actions.d.ts +39 -0
- package/dist/src/root/skills/uninstall/command-actions.d.ts.map +1 -0
- package/dist/src/root/skills/uninstall/command-actions.js +85 -0
- package/dist/src/root/skills/uninstall/command-actions.js.map +1 -0
- package/dist/src/root/skills/uninstall/command.d.ts +3 -0
- package/dist/src/root/skills/uninstall/command.d.ts.map +1 -0
- package/dist/src/root/skills/uninstall/command.js +24 -0
- package/dist/src/root/skills/uninstall/command.js.map +1 -0
- package/dist/src/root/skills/uninstall/handler.d.ts +8 -0
- package/dist/src/root/skills/uninstall/handler.d.ts.map +1 -0
- package/dist/src/root/skills/uninstall/handler.js +10 -0
- package/dist/src/root/skills/uninstall/handler.js.map +1 -0
- package/dist/src/root/skills/uninstall/intent.d.ts +17 -0
- package/dist/src/root/skills/uninstall/intent.d.ts.map +1 -0
- package/dist/src/root/skills/uninstall/intent.js +7 -0
- package/dist/src/root/skills/uninstall/intent.js.map +1 -0
- package/dist/src/root/skills/uninstall/plan.d.ts +35 -0
- package/dist/src/root/skills/uninstall/plan.d.ts.map +1 -0
- package/dist/src/root/skills/uninstall/plan.js +66 -0
- package/dist/src/root/skills/uninstall/plan.js.map +1 -0
- package/dist/src/root/skills/update/command.d.ts +3 -0
- package/dist/src/root/skills/update/command.d.ts.map +1 -0
- package/dist/src/root/skills/update/command.js +31 -0
- package/dist/src/root/skills/update/command.js.map +1 -0
- package/dist/src/root/skills/update/constraint-resolution.d.ts +70 -0
- package/dist/src/root/skills/update/constraint-resolution.d.ts.map +1 -0
- package/dist/src/root/skills/update/constraint-resolution.js +94 -0
- package/dist/src/root/skills/update/constraint-resolution.js.map +1 -0
- package/dist/src/root/skills/update/handler.d.ts +18 -0
- package/dist/src/root/skills/update/handler.d.ts.map +1 -0
- package/dist/src/root/skills/update/handler.js +409 -0
- package/dist/src/root/skills/update/handler.js.map +1 -0
- package/dist/src/root/skills/update/plan.d.ts +35 -0
- package/dist/src/root/skills/update/plan.d.ts.map +1 -0
- package/dist/src/root/skills/update/plan.js +92 -0
- package/dist/src/root/skills/update/plan.js.map +1 -0
- package/dist/src/root/subagents/_subagents.d.ts +3 -0
- package/dist/src/root/subagents/_subagents.d.ts.map +1 -0
- package/dist/src/root/subagents/_subagents.js +31 -0
- package/dist/src/root/subagents/_subagents.js.map +1 -0
- package/dist/src/root/subagents/disable/command.d.ts +3 -0
- package/dist/src/root/subagents/disable/command.d.ts.map +1 -0
- package/dist/src/root/subagents/disable/command.js +24 -0
- package/dist/src/root/subagents/disable/command.js.map +1 -0
- package/dist/src/root/subagents/disable/handler.d.ts +14 -0
- package/dist/src/root/subagents/disable/handler.d.ts.map +1 -0
- package/dist/src/root/subagents/disable/handler.js +71 -0
- package/dist/src/root/subagents/disable/handler.js.map +1 -0
- package/dist/src/root/subagents/enable/command.d.ts +3 -0
- package/dist/src/root/subagents/enable/command.d.ts.map +1 -0
- package/dist/src/root/subagents/enable/command.js +24 -0
- package/dist/src/root/subagents/enable/command.js.map +1 -0
- package/dist/src/root/subagents/enable/handler.d.ts +14 -0
- package/dist/src/root/subagents/enable/handler.d.ts.map +1 -0
- package/dist/src/root/subagents/enable/handler.js +71 -0
- package/dist/src/root/subagents/enable/handler.js.map +1 -0
- package/dist/src/root/subagents/install/command-actions.d.ts +58 -0
- package/dist/src/root/subagents/install/command-actions.d.ts.map +1 -0
- package/dist/src/root/subagents/install/command-actions.js +258 -0
- package/dist/src/root/subagents/install/command-actions.js.map +1 -0
- package/dist/src/root/subagents/install/command.d.ts +3 -0
- package/dist/src/root/subagents/install/command.d.ts.map +1 -0
- package/dist/src/root/subagents/install/command.js +46 -0
- package/dist/src/root/subagents/install/command.js.map +1 -0
- package/dist/src/root/subagents/install/handler.d.ts +15 -0
- package/dist/src/root/subagents/install/handler.d.ts.map +1 -0
- package/dist/src/root/subagents/install/handler.js +39 -0
- package/dist/src/root/subagents/install/handler.js.map +1 -0
- package/dist/src/root/subagents/install/intent.d.ts +21 -0
- package/dist/src/root/subagents/install/intent.d.ts.map +1 -0
- package/dist/src/root/subagents/install/intent.js +7 -0
- package/dist/src/root/subagents/install/intent.js.map +1 -0
- package/dist/src/root/subagents/install/plan.d.ts +44 -0
- package/dist/src/root/subagents/install/plan.d.ts.map +1 -0
- package/dist/src/root/subagents/install/plan.js +74 -0
- package/dist/src/root/subagents/install/plan.js.map +1 -0
- package/dist/src/root/subagents/install/resolve-subagent-install-source.d.ts +17 -0
- package/dist/src/root/subagents/install/resolve-subagent-install-source.d.ts.map +1 -0
- package/dist/src/root/subagents/install/resolve-subagent-install-source.js +265 -0
- package/dist/src/root/subagents/install/resolve-subagent-install-source.js.map +1 -0
- package/dist/src/root/subagents/install/select-subagents.d.ts +43 -0
- package/dist/src/root/subagents/install/select-subagents.d.ts.map +1 -0
- package/dist/src/root/subagents/install/select-subagents.js +90 -0
- package/dist/src/root/subagents/install/select-subagents.js.map +1 -0
- package/dist/src/root/subagents/list/command.d.ts +3 -0
- package/dist/src/root/subagents/list/command.d.ts.map +1 -0
- package/dist/src/root/subagents/list/command.js +21 -0
- package/dist/src/root/subagents/list/command.js.map +1 -0
- package/dist/src/root/subagents/list/handler.d.ts +8 -0
- package/dist/src/root/subagents/list/handler.d.ts.map +1 -0
- package/dist/src/root/subagents/list/handler.js +56 -0
- package/dist/src/root/subagents/list/handler.js.map +1 -0
- package/dist/src/root/subagents/new/command.d.ts +3 -0
- package/dist/src/root/subagents/new/command.d.ts.map +1 -0
- package/dist/src/root/subagents/new/command.js +42 -0
- package/dist/src/root/subagents/new/command.js.map +1 -0
- package/dist/src/root/subagents/new/handler.d.ts +21 -0
- package/dist/src/root/subagents/new/handler.d.ts.map +1 -0
- package/dist/src/root/subagents/new/handler.js +199 -0
- package/dist/src/root/subagents/new/handler.js.map +1 -0
- package/dist/src/root/subagents/publish/command.d.ts +3 -0
- package/dist/src/root/subagents/publish/command.d.ts.map +1 -0
- package/dist/src/root/subagents/publish/command.js +28 -0
- package/dist/src/root/subagents/publish/command.js.map +1 -0
- package/dist/src/root/subagents/publish/handler.d.ts +18 -0
- package/dist/src/root/subagents/publish/handler.d.ts.map +1 -0
- package/dist/src/root/subagents/publish/handler.js +204 -0
- package/dist/src/root/subagents/publish/handler.js.map +1 -0
- package/dist/src/root/subagents/rename/command.d.ts +3 -0
- package/dist/src/root/subagents/rename/command.d.ts.map +1 -0
- package/dist/src/root/subagents/rename/command.js +25 -0
- package/dist/src/root/subagents/rename/command.js.map +1 -0
- package/dist/src/root/subagents/rename/handler.d.ts +15 -0
- package/dist/src/root/subagents/rename/handler.d.ts.map +1 -0
- package/dist/src/root/subagents/rename/handler.js +174 -0
- package/dist/src/root/subagents/rename/handler.js.map +1 -0
- package/dist/src/root/subagents/uninstall/command-actions.d.ts +39 -0
- package/dist/src/root/subagents/uninstall/command-actions.d.ts.map +1 -0
- package/dist/src/root/subagents/uninstall/command-actions.js +85 -0
- package/dist/src/root/subagents/uninstall/command-actions.js.map +1 -0
- package/dist/src/root/subagents/uninstall/command.d.ts +3 -0
- package/dist/src/root/subagents/uninstall/command.d.ts.map +1 -0
- package/dist/src/root/subagents/uninstall/command.js +27 -0
- package/dist/src/root/subagents/uninstall/command.js.map +1 -0
- package/dist/src/root/subagents/uninstall/handler.d.ts +8 -0
- package/dist/src/root/subagents/uninstall/handler.d.ts.map +1 -0
- package/dist/src/root/subagents/uninstall/handler.js +10 -0
- package/dist/src/root/subagents/uninstall/handler.js.map +1 -0
- package/dist/src/root/subagents/uninstall/intent.d.ts +17 -0
- package/dist/src/root/subagents/uninstall/intent.d.ts.map +1 -0
- package/dist/src/root/subagents/uninstall/intent.js +7 -0
- package/dist/src/root/subagents/uninstall/intent.js.map +1 -0
- package/dist/src/root/subagents/update/command.d.ts +3 -0
- package/dist/src/root/subagents/update/command.d.ts.map +1 -0
- package/dist/src/root/subagents/update/command.js +41 -0
- package/dist/src/root/subagents/update/command.js.map +1 -0
- package/dist/src/root/subagents/update/handler.d.ts +16 -0
- package/dist/src/root/subagents/update/handler.d.ts.map +1 -0
- package/dist/src/root/subagents/update/handler.js +188 -0
- package/dist/src/root/subagents/update/handler.js.map +1 -0
- package/dist/src/root/subagents/update/plan.d.ts +39 -0
- package/dist/src/root/subagents/update/plan.d.ts.map +1 -0
- package/dist/src/root/subagents/update/plan.js +81 -0
- package/dist/src/root/subagents/update/plan.js.map +1 -0
- package/dist/src/root/sync.d.ts +15 -0
- package/dist/src/root/sync.d.ts.map +1 -0
- package/dist/src/root/sync.js +82 -0
- package/dist/src/root/sync.js.map +1 -0
- package/dist/src/root/upgrade/handler.d.ts +21 -0
- package/dist/src/root/upgrade/handler.d.ts.map +1 -0
- package/dist/src/root/upgrade/handler.js +303 -0
- package/dist/src/root/upgrade/handler.js.map +1 -0
- package/dist/src/root/upgrade/upgrade.d.ts +3 -0
- package/dist/src/root/upgrade/upgrade.d.ts.map +1 -0
- package/dist/src/root/upgrade/upgrade.js +18 -0
- package/dist/src/root/upgrade/upgrade.js.map +1 -0
- package/dist/src/runtime.d.ts +39 -0
- package/dist/src/runtime.d.ts.map +1 -0
- package/dist/src/runtime.js +144 -0
- package/dist/src/runtime.js.map +1 -0
- package/dist/src/test-helpers.d.ts +101 -0
- package/dist/src/test-helpers.d.ts.map +1 -0
- package/dist/src/test-helpers.js +153 -0
- package/dist/src/test-helpers.js.map +1 -0
- package/dist/src/test-stubs.d.ts +128 -0
- package/dist/src/test-stubs.d.ts.map +1 -0
- package/dist/src/test-stubs.js +227 -0
- package/dist/src/test-stubs.js.map +1 -0
- package/dist/src/update-check-startup.d.ts +68 -0
- package/dist/src/update-check-startup.d.ts.map +1 -0
- package/dist/src/update-check-startup.js +127 -0
- package/dist/src/update-check-startup.js.map +1 -0
- package/dist/src/version.d.ts +2 -0
- package/dist/src/version.d.ts.map +1 -0
- package/dist/src/version.js +23 -0
- package/dist/src/version.js.map +1 -0
- package/package.json +96 -0
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
import * as FileSystem from "effect/FileSystem";
|
|
2
|
+
import * as Path from "effect/Path";
|
|
3
|
+
import { resolveSource, SourceHostProviders, } from "@agentxm/client-core/unstable/source-resolution";
|
|
4
|
+
import * as Array from "effect/Array";
|
|
5
|
+
import * as Effect from "effect/Effect";
|
|
6
|
+
import * as Option from "effect/Option";
|
|
7
|
+
import * as Schema from "effect/Schema";
|
|
8
|
+
import { makeAppError } from "@agentxm/client-core/unstable/app-error";
|
|
9
|
+
import { CodingAgentRepository } from "@agentxm/client-core/unstable/agents";
|
|
10
|
+
import { expandGlobs } from "@agentxm/client-core/unstable/utils";
|
|
11
|
+
import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
|
|
12
|
+
import { Workspace } from "@agentxm/client-core/unstable/workspace";
|
|
13
|
+
import { REGISTRY_EXTENSIONS_DIR, decodeExtensionNameSync, parseRegistrySourcePatternParts, } from "@agentxm/client-core/unstable/extensions";
|
|
14
|
+
import { EXTENSION_PACK_MANIFEST_FILENAME, ExtensionPackManifestSchema, } from "@agentxm/client-core/unstable/packs";
|
|
15
|
+
import { createRegistryClient } from "@agentxm/client-core/unstable/registry";
|
|
16
|
+
import { buildUpdatePlan } from "./plan.js";
|
|
17
|
+
import { installSkill } from "@agentxm/client-core/unstable/skills";
|
|
18
|
+
import { uninstallSkill } from "@agentxm/client-core/unstable/skills";
|
|
19
|
+
import { previewOrApplyPlan } from "@agentxm/client-core/unstable/workspace";
|
|
20
|
+
import { detectHoldbackWarnings, resolveConstrainedVersion, } from "./constraint-resolution.js";
|
|
21
|
+
import { emitNoOpResult, emitPlanResolutionResult } from "../../../json-output.js";
|
|
22
|
+
const toRegistrySkillPattern = (source) => {
|
|
23
|
+
const parsed = parseRegistrySourcePatternParts(source);
|
|
24
|
+
if (parsed === undefined)
|
|
25
|
+
return Option.none();
|
|
26
|
+
if (parsed.type !== undefined && parsed.type !== "skills") {
|
|
27
|
+
return Option.none();
|
|
28
|
+
}
|
|
29
|
+
return Option.some(parsed);
|
|
30
|
+
};
|
|
31
|
+
export const handleUpdate = Effect.fn("Update.handle")(function* (args) {
|
|
32
|
+
const ws = yield* Workspace;
|
|
33
|
+
const sources = yield* SourceHostProviders;
|
|
34
|
+
const renderer = yield* CliRenderer;
|
|
35
|
+
yield* renderer.info(`axm skills update (${ws.scope})`);
|
|
36
|
+
// Step 1: Load configured skills and filter to enabled
|
|
37
|
+
const allSkills = yield* ws.getConfiguredSkills();
|
|
38
|
+
const lockedSkills = yield* ws.getLockedSkills();
|
|
39
|
+
const skillEntries = yield* Effect.forEach(Object.entries(allSkills), ([name, entry]) => Effect.gen(function* () {
|
|
40
|
+
if (!entry.enabled) {
|
|
41
|
+
yield* renderer.info(`Skipping ${name} (disabled)`);
|
|
42
|
+
return Option.none();
|
|
43
|
+
}
|
|
44
|
+
return Option.some([name, entry.source]);
|
|
45
|
+
})).pipe(Effect.map(Array.getSomes));
|
|
46
|
+
if (skillEntries.length === 0) {
|
|
47
|
+
if (yield* emitNoOpResult("skills.update", {
|
|
48
|
+
planName: "Update skill(s)",
|
|
49
|
+
planDescription: "Update installed skills",
|
|
50
|
+
message: "No skills installed. Nothing to update.",
|
|
51
|
+
})) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
yield* renderer.info("No skills installed. Nothing to update.");
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
// Step 2: Filter by source argument if provided
|
|
58
|
+
const sourceValue = Option.getOrUndefined(args.source);
|
|
59
|
+
const sourceFilteredEntries = sourceValue !== undefined
|
|
60
|
+
? yield* Effect.gen(function* () {
|
|
61
|
+
const sourceArg = yield* resolveSource(sourceValue).pipe(Effect.mapError((error) => makeAppError({
|
|
62
|
+
code: "INVALID_SOURCE",
|
|
63
|
+
what: `Invalid source: ${error.message}`,
|
|
64
|
+
details: [`Provided: ${sourceValue}`],
|
|
65
|
+
cause: error,
|
|
66
|
+
})));
|
|
67
|
+
// Compare sources by identity using canonical origin string
|
|
68
|
+
const sourceArgOrigin = sources.origin(sourceArg);
|
|
69
|
+
return yield* Effect.forEach(skillEntries, ([name, sourceStr]) => resolveSource(sourceStr).pipe(Effect.map((resolved) => sources.origin(resolved) === sourceArgOrigin
|
|
70
|
+
? Option.some([name, sourceStr])
|
|
71
|
+
: Option.none()), Effect.catch(() => Effect.succeed(Option.none()))), { concurrency: "unbounded" }).pipe(Effect.map(Array.getSomes));
|
|
72
|
+
})
|
|
73
|
+
: skillEntries;
|
|
74
|
+
// Step 3: Filter by --skill glob patterns
|
|
75
|
+
const filteredEntries = (() => {
|
|
76
|
+
if (args.skills.length === 0)
|
|
77
|
+
return sourceFilteredEntries;
|
|
78
|
+
const allNames = sourceFilteredEntries.map(([name]) => name);
|
|
79
|
+
const matchedNames = expandGlobs(args.skills, allNames);
|
|
80
|
+
const matchedSet = new Set(matchedNames);
|
|
81
|
+
return sourceFilteredEntries.filter(([name]) => matchedSet.has(name));
|
|
82
|
+
})();
|
|
83
|
+
if (args.skills.length > 0) {
|
|
84
|
+
if (filteredEntries.length === 0) {
|
|
85
|
+
if (yield* emitNoOpResult("skills.update", {
|
|
86
|
+
planName: "Update skill(s)",
|
|
87
|
+
planDescription: "Update installed skills",
|
|
88
|
+
message: "No installed skills match the --skill filter. Nothing to update.",
|
|
89
|
+
})) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
yield* renderer.warn("No installed skills match the --skill filter. Nothing to update.");
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
// Step 4: Collect pack constraints from installed pack manifests
|
|
97
|
+
const packConstraintMap = yield* collectPackConstraints();
|
|
98
|
+
const findSkillRefs = (source, options) => sources
|
|
99
|
+
.find(source, {
|
|
100
|
+
names: options.skillNames,
|
|
101
|
+
type: "skill",
|
|
102
|
+
owner: options.owner,
|
|
103
|
+
versionConstraint: options.versionConstraint,
|
|
104
|
+
})
|
|
105
|
+
.pipe(Effect.map((refs) => Array.filter(refs, (ref) => ref.type === "skill")));
|
|
106
|
+
const resolveRegistrySkillWithConstraints = ({ source, owner, lookupName, userConstraint, packConstraints, }) => Effect.gen(function* () {
|
|
107
|
+
const location = source.location.protocol === "file:" ? source.location.pathname : source.location.href;
|
|
108
|
+
const client = yield* createRegistryClient(location);
|
|
109
|
+
const indexOption = yield* client.getExtensionIndex({
|
|
110
|
+
owner,
|
|
111
|
+
type: "skill",
|
|
112
|
+
name: lookupName,
|
|
113
|
+
});
|
|
114
|
+
if (Option.isNone(indexOption)) {
|
|
115
|
+
return Option.none();
|
|
116
|
+
}
|
|
117
|
+
const skillFqn = `${owner}/skills/${lookupName}`;
|
|
118
|
+
const constraints = { userConstraint, packConstraints };
|
|
119
|
+
const versions = indexOption.value.versions.map((entry) => entry.version);
|
|
120
|
+
const [latestVersion] = versions;
|
|
121
|
+
if (latestVersion === undefined) {
|
|
122
|
+
return yield* makeAppError({
|
|
123
|
+
code: "UPDATE_SOURCE_EMPTY",
|
|
124
|
+
what: `Registry skill "${skillFqn}" has no published versions`,
|
|
125
|
+
details: [`Source: ${sources.origin(source)}`],
|
|
126
|
+
howToFix: "Publish a version before running `axm skills update`.",
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
const resolvedVersion = resolveConstrainedVersion(versions, constraints, skillFqn);
|
|
130
|
+
if (Option.isNone(resolvedVersion)) {
|
|
131
|
+
const constraintLabel = Option.match(userConstraint, {
|
|
132
|
+
onNone: () => "the configured constraints",
|
|
133
|
+
onSome: (constraint) => `"${constraint}"`,
|
|
134
|
+
});
|
|
135
|
+
return yield* makeAppError({
|
|
136
|
+
code: "UPDATE_CONSTRAINT_UNSATISFIABLE",
|
|
137
|
+
what: `No published version of "${skillFqn}" satisfies ${constraintLabel}`,
|
|
138
|
+
details: [`Source: ${sources.origin(source)}`],
|
|
139
|
+
howToFix: "Relax the version constraint or update the dependent pack constraints.",
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
const exactRefs = yield* findSkillRefs(source, {
|
|
143
|
+
skillNames: [lookupName],
|
|
144
|
+
owner: Option.some(owner),
|
|
145
|
+
versionConstraint: Option.some(resolvedVersion.value.resolvedVersion),
|
|
146
|
+
});
|
|
147
|
+
const exactRef = exactRefs.find((ref) => ref.refType === "registry" &&
|
|
148
|
+
ref.skill.name === lookupName &&
|
|
149
|
+
ref.version === resolvedVersion.value.resolvedVersion);
|
|
150
|
+
if (exactRef === undefined) {
|
|
151
|
+
return yield* makeAppError({
|
|
152
|
+
code: "UPDATE_RESOLUTION_FAILED",
|
|
153
|
+
what: `Resolved version "${resolvedVersion.value.resolvedVersion}" for "${skillFqn}" could not be rediscovered`,
|
|
154
|
+
details: [`Source: ${sources.origin(source)}`],
|
|
155
|
+
howToFix: "Verify the registry index and package metadata are consistent.",
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
return Option.some({
|
|
159
|
+
ref: exactRef,
|
|
160
|
+
versionConstraint: userConstraint,
|
|
161
|
+
warnings: [
|
|
162
|
+
...resolvedVersion.value.warnings,
|
|
163
|
+
...detectHoldbackWarnings(latestVersion, resolvedVersion.value.resolvedVersion, constraints, skillFqn),
|
|
164
|
+
],
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
const decodeConfiguredSkillName = (name, sourceStr) => Effect.try({
|
|
168
|
+
try: () => decodeExtensionNameSync(name),
|
|
169
|
+
catch: () => makeAppError({
|
|
170
|
+
code: "INVALID_SOURCE",
|
|
171
|
+
what: `Configured skill name "${name}" is invalid`,
|
|
172
|
+
details: [`Source: ${sourceStr}`],
|
|
173
|
+
howToFix: "Use lowercase letters, numbers, and hyphens only, with a maximum length of 64 characters.",
|
|
174
|
+
}),
|
|
175
|
+
});
|
|
176
|
+
const results = yield* renderer.withSpinner("Resolving sources...", () => Effect.forEach(filteredEntries, ([name, sourceStr]) => Effect.gen(function* () {
|
|
177
|
+
const source = yield* resolveSource(sourceStr);
|
|
178
|
+
const registryPattern = toRegistrySkillPattern(sourceStr);
|
|
179
|
+
if (source.type === "registry" && Option.isSome(registryPattern)) {
|
|
180
|
+
const lookupName = registryPattern.value.name ?? (yield* decodeConfiguredSkillName(name, sourceStr));
|
|
181
|
+
const registryResolved = yield* resolveRegistrySkillWithConstraints({
|
|
182
|
+
source,
|
|
183
|
+
owner: registryPattern.value.owner,
|
|
184
|
+
lookupName,
|
|
185
|
+
userConstraint: registryPattern.value.versionConstraint === undefined
|
|
186
|
+
? Option.none()
|
|
187
|
+
: Option.some(registryPattern.value.versionConstraint),
|
|
188
|
+
packConstraints: packConstraintMap.get(`${registryPattern.value.owner}/skills/${lookupName}`) ??
|
|
189
|
+
[],
|
|
190
|
+
});
|
|
191
|
+
if (Option.isSome(registryResolved)) {
|
|
192
|
+
return Option.some({
|
|
193
|
+
type: "match",
|
|
194
|
+
ref: registryResolved.value.ref,
|
|
195
|
+
versionConstraint: registryResolved.value.versionConstraint,
|
|
196
|
+
warnings: registryResolved.value.warnings,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
const requestedOwner = Option.match(registryPattern, {
|
|
201
|
+
onNone: () => Option.none(),
|
|
202
|
+
onSome: (pattern) => Option.some(pattern.owner),
|
|
203
|
+
});
|
|
204
|
+
// First try with name filter (fast path)
|
|
205
|
+
const namedRefs = yield* findSkillRefs(source, {
|
|
206
|
+
skillNames: [name],
|
|
207
|
+
owner: requestedOwner,
|
|
208
|
+
versionConstraint: Option.none(),
|
|
209
|
+
});
|
|
210
|
+
const skillRef = namedRefs.find((r) => r.skill.name === name);
|
|
211
|
+
if (skillRef) {
|
|
212
|
+
return Option.some({
|
|
213
|
+
type: "match",
|
|
214
|
+
ref: skillRef,
|
|
215
|
+
versionConstraint: Option.none(),
|
|
216
|
+
warnings: [],
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
// Skill not found by name — re-resolve without name filter for rename detection
|
|
220
|
+
const allSkillRefs = yield* findSkillRefs(source, {
|
|
221
|
+
skillNames: [],
|
|
222
|
+
owner: requestedOwner,
|
|
223
|
+
versionConstraint: Option.none(),
|
|
224
|
+
});
|
|
225
|
+
if (allSkillRefs.length === 1) {
|
|
226
|
+
// Single-skill source: treat as rename
|
|
227
|
+
const [newRef] = allSkillRefs;
|
|
228
|
+
if (newRef === undefined) {
|
|
229
|
+
return Option.none();
|
|
230
|
+
}
|
|
231
|
+
if (source.type === "registry" &&
|
|
232
|
+
newRef.refType === "registry" &&
|
|
233
|
+
Option.isSome(registryPattern)) {
|
|
234
|
+
const renameResolved = yield* resolveRegistrySkillWithConstraints({
|
|
235
|
+
source,
|
|
236
|
+
owner: registryPattern.value.owner,
|
|
237
|
+
lookupName: newRef.skill.name,
|
|
238
|
+
userConstraint: registryPattern.value.versionConstraint === undefined
|
|
239
|
+
? Option.none()
|
|
240
|
+
: Option.some(registryPattern.value.versionConstraint),
|
|
241
|
+
packConstraints: packConstraintMap.get(`${registryPattern.value.owner}/skills/${newRef.skill.name}`) ?? [],
|
|
242
|
+
});
|
|
243
|
+
if (Option.isSome(renameResolved)) {
|
|
244
|
+
return Option.some({
|
|
245
|
+
type: "rename",
|
|
246
|
+
oldName: name,
|
|
247
|
+
newRef: renameResolved.value.ref,
|
|
248
|
+
versionConstraint: renameResolved.value.versionConstraint,
|
|
249
|
+
warnings: renameResolved.value.warnings,
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
return Option.some({
|
|
254
|
+
type: "rename",
|
|
255
|
+
oldName: name,
|
|
256
|
+
newRef,
|
|
257
|
+
versionConstraint: Option.none(),
|
|
258
|
+
warnings: [],
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
else if (allSkillRefs.length > 1) {
|
|
262
|
+
// Multi-skill source: ambiguous rename
|
|
263
|
+
const availableNames = allSkillRefs.map((r) => r.skill.name).join(", ");
|
|
264
|
+
yield* renderer.warn(`Skill "${name}" not found in source. Available skills: ${availableNames}. Use \`axm skills rename ${name} <new-name>\` to update.`);
|
|
265
|
+
return Option.none();
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
yield* renderer.warn(`Skill "${name}" not found in source ${sources.origin(source)}`);
|
|
269
|
+
return Option.none();
|
|
270
|
+
}
|
|
271
|
+
}).pipe(Effect.catch((error) => {
|
|
272
|
+
return renderer
|
|
273
|
+
.warn(`Failed to resolve "${name}": ${String(error)}`)
|
|
274
|
+
.pipe(Effect.map(() => Option.none()));
|
|
275
|
+
})), { concurrency: "unbounded" }), { successMessage: "Sources resolved" });
|
|
276
|
+
// Step 6: Collect successful resolutions
|
|
277
|
+
const resolved = Array.getSomes(results);
|
|
278
|
+
if (resolved.length === 0) {
|
|
279
|
+
return yield* makeAppError({
|
|
280
|
+
code: "UPDATE_FAILED",
|
|
281
|
+
what: "All source re-resolutions failed. Nothing to update.",
|
|
282
|
+
howToFix: "Verify the original source paths are still accessible.",
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
// Step 7: Emit resolution warnings
|
|
286
|
+
yield* Effect.forEach(Array.flatMap(resolved, (item) => item.warnings), (warning) => renderer.warn(warning), { discard: true });
|
|
287
|
+
// Step 8: Build operations
|
|
288
|
+
const ops = Array.flatMap(resolved, (item) => {
|
|
289
|
+
if (item.type === "match") {
|
|
290
|
+
const existingLock = lockedSkills[item.ref.skill.name];
|
|
291
|
+
const existingInstalledAt = Option.fromUndefinedOr(existingLock?.installedAt);
|
|
292
|
+
return [
|
|
293
|
+
{
|
|
294
|
+
name: "install-skill",
|
|
295
|
+
args: {
|
|
296
|
+
ref: item.ref,
|
|
297
|
+
force: args.force,
|
|
298
|
+
versionConstraint: item.versionConstraint,
|
|
299
|
+
skipSettings: Option.none(),
|
|
300
|
+
strictUnknownAgents: Option.none(),
|
|
301
|
+
existingInstalledAt,
|
|
302
|
+
sourceName: Option.none(),
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
];
|
|
306
|
+
}
|
|
307
|
+
// Rename: install new name + uninstall old name — preserve original installedAt
|
|
308
|
+
const existingLock = lockedSkills[item.oldName];
|
|
309
|
+
const existingInstalledAt = Option.fromUndefinedOr(existingLock?.installedAt);
|
|
310
|
+
return [
|
|
311
|
+
{
|
|
312
|
+
name: "install-skill",
|
|
313
|
+
args: {
|
|
314
|
+
ref: item.newRef,
|
|
315
|
+
force: args.force,
|
|
316
|
+
versionConstraint: item.versionConstraint,
|
|
317
|
+
skipSettings: Option.none(),
|
|
318
|
+
strictUnknownAgents: Option.none(),
|
|
319
|
+
existingInstalledAt,
|
|
320
|
+
sourceName: Option.none(),
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
name: "uninstall-skill",
|
|
325
|
+
args: {
|
|
326
|
+
skillName: item.oldName,
|
|
327
|
+
agents: [],
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
];
|
|
331
|
+
});
|
|
332
|
+
// Step 9: Capture services for run closures
|
|
333
|
+
const fs = yield* FileSystem.FileSystem;
|
|
334
|
+
const path = yield* Path.Path;
|
|
335
|
+
const agentRepo = yield* CodingAgentRepository;
|
|
336
|
+
const toJobStepResult = (result) => result.result === "error" && result.error != null
|
|
337
|
+
? { result: "error", message: result.message, error: result.error }
|
|
338
|
+
: { result: "success", message: result.message };
|
|
339
|
+
const makeRunClosure = (op) => {
|
|
340
|
+
if (op.name === "install-skill") {
|
|
341
|
+
return installSkill(op).pipe(Effect.map(toJobStepResult), Effect.provideService(Workspace, ws), Effect.provideService(FileSystem.FileSystem, fs), Effect.provideService(Path.Path, path), Effect.provideService(CliRenderer, renderer), Effect.provideService(SourceHostProviders, sources), Effect.provideService(CodingAgentRepository, agentRepo));
|
|
342
|
+
}
|
|
343
|
+
return uninstallSkill(op).pipe(Effect.map(toJobStepResult), Effect.provideService(Workspace, ws), Effect.provideService(FileSystem.FileSystem, fs), Effect.provideService(Path.Path, path));
|
|
344
|
+
};
|
|
345
|
+
// Step 10: Build plan
|
|
346
|
+
const lockfile = { lockfileVersion: 1, skills: lockedSkills };
|
|
347
|
+
const plan = buildUpdatePlan(ops, lockfile, "Update skill(s)", Option.some("Update installed skills"), makeRunClosure);
|
|
348
|
+
// Step 11: Resolve plan
|
|
349
|
+
const resolution = yield* previewOrApplyPlan(plan, {
|
|
350
|
+
yes: args.yes,
|
|
351
|
+
force: args.force,
|
|
352
|
+
preview: args.preview,
|
|
353
|
+
});
|
|
354
|
+
yield* emitPlanResolutionResult("skills.update", resolution);
|
|
355
|
+
yield* renderer.success("Done");
|
|
356
|
+
});
|
|
357
|
+
/**
|
|
358
|
+
* Read installed pack manifests and collect per-skill constraints.
|
|
359
|
+
*
|
|
360
|
+
* Returns a map from skill FQN (e.g., "@acme/skills/code-review") to an array of
|
|
361
|
+
* pack constraints. Silently skips packs whose manifest can't be read.
|
|
362
|
+
*/
|
|
363
|
+
const collectPackConstraints = () => Effect.gen(function* () {
|
|
364
|
+
const fs = yield* FileSystem.FileSystem;
|
|
365
|
+
const path = yield* Path.Path;
|
|
366
|
+
const ws = yield* Workspace;
|
|
367
|
+
const base = ws.baseDir;
|
|
368
|
+
// Read lockfile to find installed packs
|
|
369
|
+
const lockedPacks = yield* ws.getLockedExtensionPacks();
|
|
370
|
+
const constraintMap = new Map();
|
|
371
|
+
// Read each pack's manifest from disk (sequential to avoid data race on constraintMap)
|
|
372
|
+
yield* Effect.forEach(Object.entries(lockedPacks), ([packName, packEntry]) => Effect.gen(function* () {
|
|
373
|
+
const packDir = path.join(base, REGISTRY_EXTENSIONS_DIR, packEntry.owner, "packs", packName);
|
|
374
|
+
const manifestPath = path.join(packDir, EXTENSION_PACK_MANIFEST_FILENAME);
|
|
375
|
+
const exists = yield* fs
|
|
376
|
+
.exists(manifestPath)
|
|
377
|
+
.pipe(Effect.catch(() => Effect.succeed(false)));
|
|
378
|
+
if (!exists)
|
|
379
|
+
return;
|
|
380
|
+
const content = yield* fs
|
|
381
|
+
.readFileString(manifestPath)
|
|
382
|
+
.pipe(Effect.catch(() => Effect.succeed("")));
|
|
383
|
+
if (content === "")
|
|
384
|
+
return;
|
|
385
|
+
const json = yield* Effect.try({
|
|
386
|
+
try: () => JSON.parse(content),
|
|
387
|
+
catch: () => ({ _tag: "parse-failed" }),
|
|
388
|
+
}).pipe(Effect.map((value) => value), Effect.option);
|
|
389
|
+
if (Option.isNone(json))
|
|
390
|
+
return;
|
|
391
|
+
const manifest = yield* Schema.decodeUnknownEffect(ExtensionPackManifestSchema)(json.value).pipe(Effect.option);
|
|
392
|
+
if (Option.isNone(manifest))
|
|
393
|
+
return;
|
|
394
|
+
// Collect skill constraints from manifest
|
|
395
|
+
const skills = manifest.value.skills;
|
|
396
|
+
if (skills === null || skills === undefined || typeof skills !== "object") {
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
for (const [fqn, constraint] of Object.entries(skills)) {
|
|
400
|
+
if (typeof constraint !== "string" || constraint === "*" || constraint === "")
|
|
401
|
+
continue;
|
|
402
|
+
const existing = constraintMap.get(fqn) ?? [];
|
|
403
|
+
existing.push({ packName, constraint });
|
|
404
|
+
constraintMap.set(fqn, existing);
|
|
405
|
+
}
|
|
406
|
+
}));
|
|
407
|
+
return constraintMap;
|
|
408
|
+
});
|
|
409
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../../src/root/skills/update/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAGpC,OAAO,EACL,aAAa,EACb,mBAAmB,GACpB,MAAM,iDAAiD,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAEzE,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,+BAA+B,GAGhC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,gCAAgC,EAChC,2BAA2B,GAC5B,MAAM,qCAA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Aa,CAAC;AACvB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Update-specific plan builder.
|
|
3
|
+
*
|
|
4
|
+
* Compares re-resolved source metadata against lockfile entries to determine
|
|
5
|
+
* which skills need updating. Git sources compare tree hashes, registry sources
|
|
6
|
+
* compare versions, and local sources always update.
|
|
7
|
+
*
|
|
8
|
+
* @experimental This API is unstable and may change without notice.
|
|
9
|
+
*/
|
|
10
|
+
import * as Effect from "effect/Effect";
|
|
11
|
+
import * as Option from "effect/Option";
|
|
12
|
+
import type { AppError } from "@agentxm/client-core/unstable/app-error";
|
|
13
|
+
import type { Lockfile } from "@agentxm/client-core/unstable/lockfile";
|
|
14
|
+
import type { JobStepResult, Plan } from "@agentxm/client-core/unstable/workspace";
|
|
15
|
+
import type { InstallSkillOperation } from "@agentxm/client-core/unstable/skills";
|
|
16
|
+
import type { UninstallSkillOperation } from "@agentxm/client-core/unstable/skills";
|
|
17
|
+
export type UpdateOperation = InstallSkillOperation | UninstallSkillOperation;
|
|
18
|
+
/**
|
|
19
|
+
* A function that creates a run closure for an operation.
|
|
20
|
+
* The closure must have all services already provided (R = never).
|
|
21
|
+
*/
|
|
22
|
+
export type MakeRunClosure = (op: UpdateOperation) => Effect.Effect<JobStepResult, AppError, never>;
|
|
23
|
+
/**
|
|
24
|
+
* Build an update plan by comparing operations against lockfile entries.
|
|
25
|
+
*
|
|
26
|
+
* Accepts both install operations (compared against lockfile) and uninstall
|
|
27
|
+
* operations (rename cleanup — always marked as success).
|
|
28
|
+
*
|
|
29
|
+
* Takes a `makeRunClosure` function that produces service-provided run closures
|
|
30
|
+
* for each operation.
|
|
31
|
+
*
|
|
32
|
+
* Pure function (no Effect needed) — service provision happens in the caller.
|
|
33
|
+
*/
|
|
34
|
+
export declare const buildUpdatePlan: (ops: ReadonlyArray<UpdateOperation>, lockfile: Lockfile, name: string, description: Option.Option<string>, makeRunClosure: MakeRunClosure) => Plan;
|
|
35
|
+
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../../../src/root/skills/update/plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAkB,MAAM,wCAAwC,CAAC;AACvF,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAkB,MAAM,yCAAyC,CAAC;AACnG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAMpF,MAAM,MAAM,eAAe,GAAG,qBAAqB,GAAG,uBAAuB,CAAC;AAE9E;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,EAAE,EAAE,eAAe,KAAK,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AAwCpG;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,GAC1B,KAAK,aAAa,CAAC,eAAe,CAAC,EACnC,UAAU,QAAQ,EAClB,MAAM,MAAM,EACZ,aAAa,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAClC,gBAAgB,cAAc,KAC7B,IAsCD,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Update-specific plan builder.
|
|
3
|
+
*
|
|
4
|
+
* Compares re-resolved source metadata against lockfile entries to determine
|
|
5
|
+
* which skills need updating. Git sources compare tree hashes, registry sources
|
|
6
|
+
* compare versions, and local sources always update.
|
|
7
|
+
*
|
|
8
|
+
* @experimental This API is unstable and may change without notice.
|
|
9
|
+
*/
|
|
10
|
+
import * as Effect from "effect/Effect";
|
|
11
|
+
import * as Option from "effect/Option";
|
|
12
|
+
// -----------------------------------------------------------------------------
|
|
13
|
+
// Version comparison
|
|
14
|
+
// -----------------------------------------------------------------------------
|
|
15
|
+
/**
|
|
16
|
+
* Determine whether a skill needs updating by comparing the operation's
|
|
17
|
+
* resolved metadata against the lockfile entry.
|
|
18
|
+
*
|
|
19
|
+
* Returns `true` when the skill has changed and should be updated.
|
|
20
|
+
*/
|
|
21
|
+
const hasChanged = (op, entry) => {
|
|
22
|
+
const { ref } = op.args;
|
|
23
|
+
if (ref.refType === "git-hosted") {
|
|
24
|
+
const lockHash = Option.fromUndefinedOr(entry.gitTreeHash);
|
|
25
|
+
const opHash = ref.gitTreeSha;
|
|
26
|
+
// If either hash is missing, treat as needing update
|
|
27
|
+
if (Option.isNone(lockHash) || Option.isNone(opHash))
|
|
28
|
+
return true;
|
|
29
|
+
return lockHash.value !== opHash.value;
|
|
30
|
+
}
|
|
31
|
+
if (ref.refType === "registry") {
|
|
32
|
+
if (entry.type !== "registry")
|
|
33
|
+
return true;
|
|
34
|
+
const lockVersion = entry.resolvedVersion;
|
|
35
|
+
const opVersion = ref.version;
|
|
36
|
+
return opVersion !== lockVersion;
|
|
37
|
+
}
|
|
38
|
+
// Local sources: always update (no version tracking)
|
|
39
|
+
return true;
|
|
40
|
+
};
|
|
41
|
+
// -----------------------------------------------------------------------------
|
|
42
|
+
// Plan builder
|
|
43
|
+
// -----------------------------------------------------------------------------
|
|
44
|
+
/**
|
|
45
|
+
* Build an update plan by comparing operations against lockfile entries.
|
|
46
|
+
*
|
|
47
|
+
* Accepts both install operations (compared against lockfile) and uninstall
|
|
48
|
+
* operations (rename cleanup — always marked as success).
|
|
49
|
+
*
|
|
50
|
+
* Takes a `makeRunClosure` function that produces service-provided run closures
|
|
51
|
+
* for each operation.
|
|
52
|
+
*
|
|
53
|
+
* Pure function (no Effect needed) — service provision happens in the caller.
|
|
54
|
+
*/
|
|
55
|
+
export const buildUpdatePlan = (ops, lockfile, name, description, makeRunClosure) => ({
|
|
56
|
+
_tag: "Plan",
|
|
57
|
+
name,
|
|
58
|
+
description,
|
|
59
|
+
jobs: [
|
|
60
|
+
{
|
|
61
|
+
concurrency: "unbounded",
|
|
62
|
+
steps: ops.map((op) => {
|
|
63
|
+
if (op.name === "uninstall-skill") {
|
|
64
|
+
return {
|
|
65
|
+
readiness: "ready",
|
|
66
|
+
label: `${op.args.skillName} (renamed)`,
|
|
67
|
+
run: makeRunClosure(op),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
// install-skill
|
|
71
|
+
const entry = lockfile.skills[op.args.ref.skill.name];
|
|
72
|
+
const needsUpdate = !entry || op.args.force || hasChanged(op, entry);
|
|
73
|
+
if (!needsUpdate) {
|
|
74
|
+
return {
|
|
75
|
+
readiness: "ready",
|
|
76
|
+
label: op.args.ref.skill.name,
|
|
77
|
+
run: Effect.succeed({
|
|
78
|
+
result: "success",
|
|
79
|
+
message: "already up to date",
|
|
80
|
+
}),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
readiness: "ready",
|
|
85
|
+
label: op.args.ref.skill.name,
|
|
86
|
+
run: makeRunClosure(op),
|
|
87
|
+
};
|
|
88
|
+
}),
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
});
|
|
92
|
+
//# sourceMappingURL=plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../../../src/root/skills/update/plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAmBxC,gFAAgF;AAChF,qBAAqB;AACrB,gFAAgF;AAEhF;;;;;GAKG;AACH,MAAM,UAAU,GAAG,CAAC,EAAyB,EAAE,KAAqB,EAAW,EAAE;IAC/E,MAAM,EAAE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C,IAAI,CAAC,SAAS,YAAY;wBACvC,GAAG,EAAE,cAAc,CAAC,EAAE,CAAC;qBACxB,CAAC;gBACJ,CAAC;gBACD,gBAAgB;gBAChB,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBACtD,MAAM,WAAW,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,UAAU,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;gBAErE,IAAI,CAAC,WAAW,EAAE,CAAC;oBACjB,OAAO;wBACL,SAAS,EAAE,OAAO;wBAClB,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI;wBAC7B,GAAG,EAAE,MAAM,CAAC,OAAO,CAAgB;4BACjC,MAAM,EAAE,SAAS;4BACjB,OAAO,EAAE,oBAAoB;yBAC9B,CAAC;qBACH,CAAC;gBACJ,CAAC;gBAED,OAAO;oBACL,SAAS,EAAE,OAAO;oBAClB,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI;oBAC7B,GAAG,EAAE,cAAc,CAAC,EAAE,CAAC;iBACxB,CAAC;YACJ,CAAC,CAAC;SACH;KACF;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Command } from "effect/unstable/cli";
|
|
2
|
+
export declare const subagentsCommand: Command.Command<"subagents", {}, {}, never, "effect/unstable/cli/GlobalFlag/axm-non-interactive" | "effect/unstable/cli/GlobalFlag/axm-json" | "effect/unstable/cli/GlobalFlag/axm-quiet" | "effect/unstable/cli/GlobalFlag/axm-verbose" | "effect/unstable/cli/GlobalFlag/axm-debug">;
|
|
3
|
+
//# sourceMappingURL=_subagents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_subagents.d.ts","sourceRoot":"","sources":["../../../../src/root/subagents/_subagents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAY9C,eAAO,MAAM,gBAAgB,wRAuB5B,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Command } from "effect/unstable/cli";
|
|
2
|
+
import { installCommand } from "./install/command.js";
|
|
3
|
+
import { uninstallCommand } from "./uninstall/command.js";
|
|
4
|
+
import { listCommand } from "./list/command.js";
|
|
5
|
+
import { updateCommand } from "./update/command.js";
|
|
6
|
+
import { newCommand } from "./new/command.js";
|
|
7
|
+
import { publishCommand } from "./publish/command.js";
|
|
8
|
+
import { enableCommand } from "./enable/command.js";
|
|
9
|
+
import { disableCommand } from "./disable/command.js";
|
|
10
|
+
import { renameCommand } from "./rename/command.js";
|
|
11
|
+
export const subagentsCommand = Command.make("subagents").pipe(Command.withDescription("Install, update, and manage subagents"), Command.withExamples([
|
|
12
|
+
{
|
|
13
|
+
command: "axm subagents install @acme/subagents/researcher",
|
|
14
|
+
description: "Add a subagent from the registry",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
command: "axm subagents list",
|
|
18
|
+
description: "See what subagents are installed",
|
|
19
|
+
},
|
|
20
|
+
]), Command.withSubcommands([
|
|
21
|
+
installCommand,
|
|
22
|
+
uninstallCommand,
|
|
23
|
+
listCommand,
|
|
24
|
+
updateCommand,
|
|
25
|
+
newCommand,
|
|
26
|
+
publishCommand,
|
|
27
|
+
enableCommand,
|
|
28
|
+
disableCommand,
|
|
29
|
+
renameCommand,
|
|
30
|
+
]));
|
|
31
|
+
//# sourceMappingURL=_subagents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_subagents.js","sourceRoot":"","sources":["../../../../src/root/subagents/_subagents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAC5D,OAAO,CAAC,eAAe,CAAC,uCAAuC,CAAC,EAChE,OAAO,CAAC,YAAY,CAAC;IACnB;QACE,OAAO,EAAE,kDAAkD;QAC3D,WAAW,EAAE,kCAAkC;KAChD;IACD;QACE,OAAO,EAAE,oBAAoB;QAC7B,WAAW,EAAE,kCAAkC;KAChD;CACF,CAAC,EACF,OAAO,CAAC,eAAe,CAAC;IACtB,cAAc;IACd,gBAAgB;IAChB,WAAW;IACX,aAAa;IACb,UAAU;IACV,cAAc;IACd,aAAa;IACb,cAAc;IACd,aAAa;CACd,CAAC,CACH,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Command } from "effect/unstable/cli";
|
|
2
|
+
export declare const disableCommand: Command.Command<"disable", Record<string, unknown>, {}, never, "effect/unstable/cli/GlobalFlag/axm-non-interactive" | "effect/unstable/cli/GlobalFlag/axm-json" | "effect/unstable/cli/GlobalFlag/axm-quiet" | "effect/unstable/cli/GlobalFlag/axm-verbose" | "effect/unstable/cli/GlobalFlag/axm-debug">;
|
|
3
|
+
//# sourceMappingURL=command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../../src/root/subagents/disable/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,OAAO,EAAQ,MAAM,qBAAqB,CAAC;AAiB9D,eAAO,MAAM,cAAc,2SAqB1B,CAAC"}
|