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,3 @@
|
|
|
1
|
+
import { Command } from "effect/unstable/cli";
|
|
2
|
+
export declare const authCommand: Command.Command<"auth", {}, {}, 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" | import("packages/core/src/unstable/auth/device-login.ts").DeviceLoginInteraction>;
|
|
3
|
+
//# sourceMappingURL=_auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_auth.d.ts","sourceRoot":"","sources":["../../../../src/root/auth/_auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAO9C,eAAO,MAAM,WAAW,sWAQvB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Command } from "effect/unstable/cli";
|
|
2
|
+
import { loginCommand } from "./login.js";
|
|
3
|
+
import { logoutCommand } from "./logout.js";
|
|
4
|
+
import { whoamiCommand } from "./whoami.js";
|
|
5
|
+
import { tokenCommand } from "./token.js";
|
|
6
|
+
export const authCommand = Command.make("auth").pipe(Command.withDescription("Manage authentication"), Command.withExamples([
|
|
7
|
+
{ command: "axm auth login", description: "Sign in to the default registry" },
|
|
8
|
+
{ command: "axm auth whoami", description: "Check who you're authenticated as" },
|
|
9
|
+
{ command: "axm auth token", description: "Print your auth token for scripting" },
|
|
10
|
+
]), Command.withSubcommands([loginCommand, logoutCommand, whoamiCommand, tokenCommand]));
|
|
11
|
+
//# sourceMappingURL=_auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_auth.js","sourceRoot":"","sources":["../../../../src/root/auth/_auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAClD,OAAO,CAAC,eAAe,CAAC,uBAAuB,CAAC,EAChD,OAAO,CAAC,YAAY,CAAC;IACnB,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,iCAAiC,EAAE;IAC7E,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,mCAAmC,EAAE;IAChF,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,qCAAqC,EAAE;CAClF,CAAC,EACF,OAAO,CAAC,eAAe,CAAC,CAAC,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC,CACpF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import { Command, Prompt } from "effect/unstable/cli";
|
|
3
|
+
import { AuthClient, RegistryUrl, CredentialStore } from "@agentxm/client-core/unstable/auth";
|
|
4
|
+
import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
|
|
5
|
+
import { type AppError } from "@agentxm/client-core/unstable/app-error";
|
|
6
|
+
import type { PromptCancelled } from "@agentxm/client-core/unstable/prompt-cancelled";
|
|
7
|
+
interface LoginInteractions {
|
|
8
|
+
readonly confirmRelogin?: (message: string) => Effect.Effect<boolean, PromptCancelled | AppError>;
|
|
9
|
+
}
|
|
10
|
+
export declare const handleLogin: (options: {
|
|
11
|
+
yes: boolean;
|
|
12
|
+
}, interactions?: LoginInteractions | undefined) => Effect.Effect<void, AppError | PromptCancelled, CliRenderer | "effect/unstable/cli/GlobalFlag/axm-non-interactive" | Prompt.Environment | CredentialStore | RegistryUrl | AuthClient | import("@agentxm/client-core/unstable/auth").DeviceLoginInteraction>;
|
|
13
|
+
export declare const loginCommand: Command.Command<"login", 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" | import("@agentxm/client-core/unstable/auth").DeviceLoginInteraction>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=login.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../src/root/auth/login.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,OAAO,EAAQ,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EACL,UAAU,EACV,WAAW,EACX,eAAe,EAGhB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAGzE,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AAGtF,UAAU,iBAAiB;IACzB,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,QAAQ,CAAC,CAAC;CACnG;AAKD,eAAO,MAAM,WAAW;SACN,OAAO;+SA0CR,CAAC;AAQlB,eAAO,MAAM,YAAY,+WAUxB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Option from "effect/Option";
|
|
3
|
+
import { Command, Flag, Prompt } from "effect/unstable/cli";
|
|
4
|
+
import { AuthClient, RegistryUrl, CredentialStore, makePersistedCredentialsUnsupportedError, runDeviceLogin, } from "@agentxm/client-core/unstable/auth";
|
|
5
|
+
import { requireInteractive } from "@agentxm/client-core/unstable/cli/prompt";
|
|
6
|
+
import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
|
|
7
|
+
import { isNonInteractive, yesFlag } from "@agentxm/client-core/unstable/cli-flags";
|
|
8
|
+
import { withArgvTracking } from "@agentxm/client-core/unstable/cli-runtime";
|
|
9
|
+
import { makeAppError } from "@agentxm/client-core/unstable/app-error";
|
|
10
|
+
import { withAuthRuntime } from "../../runtime.js";
|
|
11
|
+
const confirmRelogin = (message) => requireInteractive(Prompt.confirm({ message }), { message });
|
|
12
|
+
export const handleLogin = Effect.fn("AuthLogin.handle")(function* (options, interactions) {
|
|
13
|
+
const credStore = yield* CredentialStore;
|
|
14
|
+
const renderer = yield* CliRenderer;
|
|
15
|
+
const registryUrl = yield* RegistryUrl;
|
|
16
|
+
if (!credStore.allowsPersistedCredentials) {
|
|
17
|
+
return yield* makePersistedCredentialsUnsupportedError();
|
|
18
|
+
}
|
|
19
|
+
// Step 1: Reject non-interactive mode
|
|
20
|
+
const nonInteractive = yield* isNonInteractive;
|
|
21
|
+
if (nonInteractive) {
|
|
22
|
+
return yield* makeAppError({
|
|
23
|
+
code: "AUTH_LOGIN_REQUIRED",
|
|
24
|
+
what: "Login requires an interactive terminal",
|
|
25
|
+
howToFix: "Set the AXM_TOKEN environment variable or run `axm login` in an interactive terminal.",
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
// Step 2: Check existing auth — validate token against the server
|
|
29
|
+
const existing = yield* credStore.load(registryUrl);
|
|
30
|
+
if (Option.isSome(existing)) {
|
|
31
|
+
const authClient = yield* AuthClient;
|
|
32
|
+
const meResult = yield* authClient.getMe(existing.value.access_token).pipe(Effect.option);
|
|
33
|
+
if (Option.isSome(meResult)) {
|
|
34
|
+
yield* renderer.info(`Already logged in as ${meResult.value.userHandle}.`);
|
|
35
|
+
if (!options.yes) {
|
|
36
|
+
const message = "Log in with a different account?";
|
|
37
|
+
const shouldContinue = yield* interactions?.confirmRelogin?.(message) ??
|
|
38
|
+
confirmRelogin(message);
|
|
39
|
+
if (!shouldContinue) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
yield* runDeviceLogin(registryUrl);
|
|
46
|
+
}, Effect.asVoid);
|
|
47
|
+
const loginConfig = {
|
|
48
|
+
yes: yesFlag.pipe(Flag.withDescription("Skip the browser-open confirmation and launch immediately")),
|
|
49
|
+
};
|
|
50
|
+
export const loginCommand = Command.make("login", loginConfig, ({ yes }) => handleLogin({ yes }).pipe(withAuthRuntime("auth login"))).pipe(withArgvTracking(loginConfig), Command.withDescription("Sign in to a registry"), Command.withExamples([
|
|
51
|
+
{ command: "axm auth login", description: "Sign in to the default registry" },
|
|
52
|
+
{ command: "axm login", description: "Same command via shortcut" },
|
|
53
|
+
{ command: "axm auth login --yes", description: "Skip the browser confirmation" },
|
|
54
|
+
]));
|
|
55
|
+
//# sourceMappingURL=login.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../../src/root/auth/login.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EACL,UAAU,EACV,WAAW,EACX,eAAe,EACf,wCAAwC,EACxC,cAAc,GACf,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAiB,MAAM,yCAAyC,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAMnD,MAAM,cAAc,GAAG,CAAC,OAAe,EAAE,EAAE,CACzC,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;AAE/D,MAAM,CAAC,MAAM,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M,OAAO,GAAG,kCAAkC,CAAC;gBACnD,MAAM,cAAc,GAAG,KAAK,CAAC,CAAC,YAAY,EAAE,cAAc,EAAE,CAAC,OAAO,CAAC;oBACnE,cAAc,CAAC,OAAO,CAAC,CAAC;gBAC1B,IAAI,CAAC,cAAc,EAAE,CAAC;oBACpB,OAAO;gBACT,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,KAAK,CAAC,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;AACrC,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;AAElB,MAAM,WAAW,GAAG;IAClB,GAAG,EAAE,OAAO,CAAC,IAAI,CACf,IAAI,CAAC,eAAe,CAAC,2DAA2D,CAAC,CAClF;CACO,CAAC;AAEX,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CACzE,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CACzD,CAAC,IAAI,CACJ,gBAAgB,CAAC,WAAW,CAAC,EAC7B,OAAO,CAAC,eAAe,CAAC,uBAAuB,CAAC,EAChD,OAAO,CAAC,YAAY,CAAC;IACnB,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,iCAAiC,EAAE;IAC7E,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,2BAA2B,EAAE;IAClE,EAAE,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,+BAA+B,EAAE;CAClF,CAAC,CACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import { Command } from "effect/unstable/cli";
|
|
3
|
+
import { AuthClient, RegistryUrl, CredentialStore } from "@agentxm/client-core/unstable/auth";
|
|
4
|
+
import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
|
|
5
|
+
export declare const handleLogout: () => Effect.Effect<void, import("packages/core/src/unstable/app-error/app-error.ts").AppError, CliRenderer | CredentialStore | RegistryUrl | AuthClient>;
|
|
6
|
+
export declare const logoutCommand: Command.Command<"logout", 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">;
|
|
7
|
+
//# sourceMappingURL=logout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../../src/root/auth/logout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAczE,eAAO,MAAM,YAAY,2JAmDR,CAAC;AAIlB,eAAO,MAAM,aAAa,0SASzB,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Option from "effect/Option";
|
|
3
|
+
import { Command } from "effect/unstable/cli";
|
|
4
|
+
import { AuthClient, RegistryUrl, CredentialStore } from "@agentxm/client-core/unstable/auth";
|
|
5
|
+
import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
|
|
6
|
+
import { withArgvTracking } from "@agentxm/client-core/unstable/cli-runtime";
|
|
7
|
+
import * as Schema from "effect/Schema";
|
|
8
|
+
import { withAuthRuntime } from "../../runtime.js";
|
|
9
|
+
const LogoutResultSchema = Schema.Struct({
|
|
10
|
+
status: Schema.Literals(["not-logged-in", "logged-out", "logged-out-local-only"]),
|
|
11
|
+
registryHost: Schema.String,
|
|
12
|
+
handle: Schema.optional(Schema.String),
|
|
13
|
+
});
|
|
14
|
+
const LogoutDocumentFields = {
|
|
15
|
+
result: LogoutResultSchema,
|
|
16
|
+
};
|
|
17
|
+
export const handleLogout = Effect.fn("AuthLogout.handle")(function* () {
|
|
18
|
+
const authClient = yield* AuthClient;
|
|
19
|
+
const credStore = yield* CredentialStore;
|
|
20
|
+
const renderer = yield* CliRenderer;
|
|
21
|
+
const registryUrl = yield* RegistryUrl;
|
|
22
|
+
const registryHost = new URL(registryUrl).host;
|
|
23
|
+
// Step 1: Load credentials
|
|
24
|
+
const existing = yield* credStore.load(registryUrl);
|
|
25
|
+
if (Option.isNone(existing)) {
|
|
26
|
+
if (yield* renderer.document("auth.logout", { result: { status: "not-logged-in", registryHost } }, LogoutDocumentFields)) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
yield* renderer.success(`Not logged in to ${registryHost}. Nothing to do.`);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const handle = existing.value.handle;
|
|
33
|
+
const identity = handle === "unknown" ? "" : ` as ${handle}`;
|
|
34
|
+
const optionalHandle = handle !== "unknown" ? { handle } : {};
|
|
35
|
+
// Step 2: Attempt remote revoke (tolerate failure)
|
|
36
|
+
const revokeResult = yield* authClient
|
|
37
|
+
.revokeToken(existing.value.access_token)
|
|
38
|
+
.pipe(Effect.option);
|
|
39
|
+
// Step 3: Clear local credentials
|
|
40
|
+
yield* credStore.clear(registryUrl);
|
|
41
|
+
// Step 4: Build result and render
|
|
42
|
+
const status = Option.isSome(revokeResult) ? "logged-out" : "logged-out-local-only";
|
|
43
|
+
const result = { status, registryHost, ...optionalHandle };
|
|
44
|
+
if (yield* renderer.document("auth.logout", { result }, LogoutDocumentFields)) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (Option.isSome(revokeResult)) {
|
|
48
|
+
yield* renderer.success(`Logged out of ${registryHost}${identity}.`);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
yield* renderer.warn(`Logged out of ${registryHost}${identity} locally. Remote revocation failed — token will expire automatically.`);
|
|
52
|
+
}
|
|
53
|
+
}, Effect.asVoid);
|
|
54
|
+
const logoutConfig = {};
|
|
55
|
+
export const logoutCommand = Command.make("logout", logoutConfig, () => handleLogout().pipe(withAuthRuntime("auth logout"))).pipe(withArgvTracking(logoutConfig), Command.withDescription("Sign out of a registry"), Command.withExamples([
|
|
56
|
+
{ command: "axm auth logout", description: "Sign out of the current registry" },
|
|
57
|
+
{ command: "axm logout", description: "Same command via shortcut" },
|
|
58
|
+
]));
|
|
59
|
+
//# sourceMappingURL=logout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logout.js","sourceRoot":"","sources":["../../../../src/root/auth/logout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,eAAe,EAAE,YAAY,EAAE,uBAAuB,CAAU,CAAC;IAC1F,YAAY,EAAE,MAAM,CAAC,MAAM;IAC3B,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;CACvC,CAAC,CAAC;AACH,MAAM,oBAAoB,GAAG;IA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AW,EAAE,kCAAkC,EAAE;IAC/E,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,2BAA2B,EAAE;CACpE,CAAC,CACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import { Command } from "effect/unstable/cli";
|
|
3
|
+
import { RegistryUrl } from "@agentxm/client-core/unstable/auth";
|
|
4
|
+
import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
|
|
5
|
+
export declare const handleToken: () => Effect.Effect<void, import("@agentxm/client-core/unstable/app-error").AppError, CliRenderer | "effect/unstable/cli/GlobalFlag/axm-json" | import("@agentxm/client-core/unstable/auth").CredentialStore | RegistryUrl>;
|
|
6
|
+
export declare const tokenCommand: Command.Command<"token", 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">;
|
|
7
|
+
//# sourceMappingURL=token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../../src/root/auth/token.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAwB,MAAM,oCAAoC,CAAC;AAGvF,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAWzE,eAAO,MAAM,WAAW,6NAqBP,CAAC;AAIlB,eAAO,MAAM,YAAY,ySAaxB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Option from "effect/Option";
|
|
3
|
+
import * as Schema from "effect/Schema";
|
|
4
|
+
import { Command } from "effect/unstable/cli";
|
|
5
|
+
import { RegistryUrl, resolveRequiredToken } from "@agentxm/client-core/unstable/auth";
|
|
6
|
+
import { makeAppError } from "@agentxm/client-core/unstable/app-error";
|
|
7
|
+
import { jsonFlag } from "@agentxm/client-core/unstable/cli-flags";
|
|
8
|
+
import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
|
|
9
|
+
import { withArgvTracking } from "@agentxm/client-core/unstable/cli-runtime";
|
|
10
|
+
import { withAuthRuntime } from "../../runtime.js";
|
|
11
|
+
const TokenDataSchema = Schema.Struct({
|
|
12
|
+
token: Schema.String,
|
|
13
|
+
});
|
|
14
|
+
const TokenDocumentFields = {
|
|
15
|
+
data: TokenDataSchema,
|
|
16
|
+
};
|
|
17
|
+
export const handleToken = Effect.fn("AuthToken.handle")(function* () {
|
|
18
|
+
const registryUrl = yield* RegistryUrl;
|
|
19
|
+
const renderer = yield* CliRenderer;
|
|
20
|
+
const json = Option.getOrElse(yield* jsonFlag, () => false);
|
|
21
|
+
// Step 1: Resolve token
|
|
22
|
+
const token = yield* resolveRequiredToken(registryUrl, {
|
|
23
|
+
missingTokenError: makeAppError({
|
|
24
|
+
code: "AUTH_LOGIN_REQUIRED",
|
|
25
|
+
what: "No token available",
|
|
26
|
+
howToFix: "Run `axm login` to sign in, or set the AXM_TOKEN environment variable.",
|
|
27
|
+
}),
|
|
28
|
+
});
|
|
29
|
+
// Step 2: Output raw token to stdout, unless --json was explicitly requested
|
|
30
|
+
if (json) {
|
|
31
|
+
yield* renderer.document("auth.token", { data: { token: token.token } }, TokenDocumentFields);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
yield* renderer.raw(token.token + "\n");
|
|
35
|
+
}, Effect.asVoid);
|
|
36
|
+
const tokenConfig = {};
|
|
37
|
+
export const tokenCommand = Command.make("token", tokenConfig, () => handleToken().pipe(withAuthRuntime("auth token"))).pipe(withArgvTracking(tokenConfig), Command.withDescription("Output current auth token to stdout"), Command.withExamples([
|
|
38
|
+
{
|
|
39
|
+
command: "axm auth token",
|
|
40
|
+
description: "Print your auth token (e.g., for piping to another tool)",
|
|
41
|
+
},
|
|
42
|
+
{ command: "axm token", description: "Same command via shortcut" },
|
|
43
|
+
{ command: "axm auth token --json", description: "Get the token as structured JSON" },
|
|
44
|
+
]));
|
|
45
|
+
//# sourceMappingURL=token.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token.js","sourceRoot":"","sources":["../../../../src/root/auth/token.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC;IACpC,KAAK,EAAE,MAAM,CAAC,MAAM;CACrB,CAAC,CAAC;AACH,MAAM,mBAAmB,GAAG;IAC1B,IAAI,EAAE,eAAe;CACS,CAAC;AAEjC,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC;IAChE,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,WAAW,CAAC;IACvC,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,WAAW,CAAC;IACpC,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,C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|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import { Command } from "effect/unstable/cli";
|
|
3
|
+
import { AuthClient, RegistryUrl } from "@agentxm/client-core/unstable/auth";
|
|
4
|
+
import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
|
|
5
|
+
export declare const handleWhoami: () => Effect.Effect<void, import("@agentxm/client-core/unstable/app-error").AppError, CliRenderer | import("@agentxm/client-core/unstable/auth").CredentialStore | RegistryUrl | AuthClient>;
|
|
6
|
+
export declare const whoamiCommand: Command.Command<"whoami", 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">;
|
|
7
|
+
//# sourceMappingURL=whoami.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whoami.d.ts","sourceRoot":"","sources":["../../../../src/root/auth/whoami.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAwB,MAAM,oCAAoC,CAAC;AAEnG,OAAO,EAAE,WAAW,EAAmB,MAAM,4CAA4C,CAAC;AAuC1F,eAAO,MAAM,YAAY,8LAuCR,CAAC;AAIlB,eAAO,MAAM,aAAa,0SAUzB,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Schema from "effect/Schema";
|
|
3
|
+
import { Command } from "effect/unstable/cli";
|
|
4
|
+
import { AuthClient, RegistryUrl, resolveRequiredToken } from "@agentxm/client-core/unstable/auth";
|
|
5
|
+
import { makeAppError } from "@agentxm/client-core/unstable/app-error";
|
|
6
|
+
import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
|
|
7
|
+
import { withArgvTracking } from "@agentxm/client-core/unstable/cli-runtime";
|
|
8
|
+
import { withAuthRuntime } from "../../runtime.js";
|
|
9
|
+
const WhoamiDataSchema = Schema.Struct({
|
|
10
|
+
userId: Schema.String,
|
|
11
|
+
userHandle: Schema.String,
|
|
12
|
+
email: Schema.String,
|
|
13
|
+
tokenType: Schema.String,
|
|
14
|
+
scopes: Schema.Array(Schema.String),
|
|
15
|
+
orgs: Schema.Array(Schema.Struct({
|
|
16
|
+
id: Schema.String,
|
|
17
|
+
handle: Schema.String,
|
|
18
|
+
})),
|
|
19
|
+
});
|
|
20
|
+
const WhoamiDocumentFields = {
|
|
21
|
+
data: WhoamiDataSchema,
|
|
22
|
+
};
|
|
23
|
+
const WhoamiDetail = {
|
|
24
|
+
fields: {
|
|
25
|
+
handle: { label: "Handle" },
|
|
26
|
+
email: { label: "Email" },
|
|
27
|
+
tokenType: { label: "Token type" },
|
|
28
|
+
scopes: { label: "Scopes" },
|
|
29
|
+
organizations: { label: "Organizations" },
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
export const handleWhoami = Effect.fn("AuthWhoami.handle")(function* () {
|
|
33
|
+
const authClient = yield* AuthClient;
|
|
34
|
+
const renderer = yield* CliRenderer;
|
|
35
|
+
const registryUrl = yield* RegistryUrl;
|
|
36
|
+
// Step 1: Resolve token
|
|
37
|
+
const token = yield* resolveRequiredToken(registryUrl, {
|
|
38
|
+
missingTokenError: makeAppError({
|
|
39
|
+
code: "AUTH_LOGIN_REQUIRED",
|
|
40
|
+
what: "Not authenticated",
|
|
41
|
+
howToFix: "Run `axm login` to sign in.",
|
|
42
|
+
}),
|
|
43
|
+
});
|
|
44
|
+
// Step 2: Call getMe
|
|
45
|
+
const me = yield* authClient.getMe(token.token);
|
|
46
|
+
const identity = {
|
|
47
|
+
userId: me.userId,
|
|
48
|
+
userHandle: me.userHandle,
|
|
49
|
+
email: me.email,
|
|
50
|
+
tokenType: me.tokenType,
|
|
51
|
+
scopes: me.scopes,
|
|
52
|
+
orgs: me.orgs,
|
|
53
|
+
};
|
|
54
|
+
// Step 3: Display result
|
|
55
|
+
if (yield* renderer.document("auth.whoami", { data: identity }, WhoamiDocumentFields)) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const detail = {
|
|
59
|
+
handle: me.userHandle,
|
|
60
|
+
email: me.email,
|
|
61
|
+
tokenType: me.tokenType,
|
|
62
|
+
scopes: me.scopes.join(", "),
|
|
63
|
+
organizations: me.orgs.map((org) => org.handle).join(", "),
|
|
64
|
+
};
|
|
65
|
+
yield* renderer.detail(detail, WhoamiDetail, "Authenticated identity");
|
|
66
|
+
}, Effect.asVoid);
|
|
67
|
+
const whoamiConfig = {};
|
|
68
|
+
export const whoamiCommand = Command.make("whoami", whoamiConfig, () => handleWhoami().pipe(withAuthRuntime("auth whoami"))).pipe(withArgvTracking(whoamiConfig), Command.withDescription("Show current authenticated identity"), Command.withExamples([
|
|
69
|
+
{ command: "axm auth whoami", description: "Check who you're authenticated as" },
|
|
70
|
+
{ command: "axm whoami", description: "Same command via shortcut" },
|
|
71
|
+
{ command: "axm auth whoami --json", description: "Get identity as JSON for scripts" },
|
|
72
|
+
]));
|
|
73
|
+
//# sourceMappingURL=whoami.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whoami.js","sourceRoot":"","sources":["../../../../src/root/auth/whoami.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAmB,MAAM,4CAA4C,CAAC;AAC1F,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,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,YAAY,EAAE,GAAG,EAAE,CACrE,YAAY,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,CACpD,CAAC,IAAI,CACJ,gBAAgB,CAAC,YAAY,CAAC,EAC9B,OAAO,CAAC,eAAe,CAAC,qCAAqC,CAAC,EAC9D,OAAO,CAAC,YAAY,CAAC;IACnB,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,mCAAmC,EAAE;IAChF,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,2BAA2B,EAAE;IACnE,EAAE,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,kCAAkC,EAAE;CACvF,CAAC,CACH,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Command } from "effect/unstable/cli";
|
|
2
|
+
export declare const commandsCommand: Command.Command<"commands", {}, {}, 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=_commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_commands.d.ts","sourceRoot":"","sources":["../../../../src/root/commands/_commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAW9C,eAAO,MAAM,eAAe,uRAsC3B,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.js";
|
|
5
|
+
import { enableCommand } from "./enable.js";
|
|
6
|
+
import { disableCommand } from "./disable.js";
|
|
7
|
+
import { updateCommand } from "./update.js";
|
|
8
|
+
import { newCommand } from "./new.js";
|
|
9
|
+
import { publishCommand } from "./publish.js";
|
|
10
|
+
export const commandsCommand = Command.make("commands").pipe(Command.withDescription("Install and manage commands"), Command.withExamples([
|
|
11
|
+
{
|
|
12
|
+
command: "axm commands install @acme/commands/my-cmd",
|
|
13
|
+
description: "Add a command from the registry",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
command: "axm commands list",
|
|
17
|
+
description: "List installed commands",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
command: "axm commands enable my-cmd",
|
|
21
|
+
description: "Enable a disabled command",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
command: "axm commands uninstall my-cmd",
|
|
25
|
+
description: "Remove a command",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
command: "axm commands new my-cmd",
|
|
29
|
+
description: "Scaffold a new command",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
command: "axm commands publish @acme/commands/my-cmd",
|
|
33
|
+
description: "Publish a command to a registry",
|
|
34
|
+
},
|
|
35
|
+
]), Command.withSubcommands([
|
|
36
|
+
installCommand,
|
|
37
|
+
uninstallCommand,
|
|
38
|
+
listCommand,
|
|
39
|
+
enableCommand,
|
|
40
|
+
disableCommand,
|
|
41
|
+
updateCommand,
|
|
42
|
+
newCommand,
|
|
43
|
+
publishCommand,
|
|
44
|
+
]));
|
|
45
|
+
//# sourceMappingURL=_commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_commands.js","sourceRoot":"","sources":["../../../../src/root/commands/_commands.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,WAAW,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,CAC1D,OAAO,CAAC,eAAe,CAAC,6BAA6B,CAAC,EACtD,OAAO,CAAC,YAAY,CAAC;IACnB;QACE,OAAO,EAAE,4CAA4C;QACrD,WAAW,EAAE,iCAAiC;KAC/C;IACD;QACE,OAAO,EAAE,mBAAmB;QAC5B,WAAW,EAAE,yBAAyB;KACvC;IACD;QACE,OAAO,EAAE,4BAA4B;QACrC,WAAW,EAAE,2BAA2B;KACzC;IACD;QACE,OAAO,EAAE,+BAA+B;QACxC,WAAW,EAAE,kBAAkB;KAChC;IACD;QACE,OAAO,EAAE,yBAAyB;QAClC,WAAW,EAAE,wBAAwB;KACtC;IACD;QACE,OAAO,EAAE,4CAA4C;QACrD,WAAW,EAAE,iCAAiC;KAC/C;CACF,CAAC,EACF,OAAO,CAAC,eAAe,CAAC;IACtB,cAAc;IACd,gBAAgB;IAChB,WAAW;IACX,aAAa;IACb,cAAc;IACd,aAAa;IACb,UAAU;IACV,cAAc;CACf,CAAC,CACH,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as FileSystem from "effect/FileSystem";
|
|
2
|
+
import * as Path from "effect/Path";
|
|
3
|
+
import { Command } from "effect/unstable/cli";
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import { CodingAgentRepository } from "@agentxm/client-core/unstable/agents";
|
|
6
|
+
import { type ExtensionName } from "@agentxm/client-core/unstable/extensions";
|
|
7
|
+
import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
|
|
8
|
+
import { Workspace } from "@agentxm/client-core/unstable/workspace";
|
|
9
|
+
export interface DisableCommandHandlerArgs {
|
|
10
|
+
readonly name: ExtensionName;
|
|
11
|
+
readonly yes: boolean;
|
|
12
|
+
readonly force: boolean;
|
|
13
|
+
readonly preview: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const handleDisableCommand: (args: DisableCommandHandlerArgs) => Effect.Effect<undefined, import("@agentxm/client-core/unstable/app-error").AppError | import("packages/core/src/unstable/cli-prompt/prompt-cancelled.ts").PromptCancelled, CliRenderer | import("@agentxm/client-core/unstable/cli-flags").Verbosity | FileSystem.FileSystem | Path.Path | "effect/unstable/cli/GlobalFlag/axm-non-interactive" | Workspace | CodingAgentRepository>;
|
|
16
|
+
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">;
|
|
17
|
+
//# sourceMappingURL=disable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disable.d.ts","sourceRoot":"","sources":["../../../../src/root/commands/disable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAY,OAAO,EAAQ,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAiBpE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,oBAAoB,2ZA6F/B,CAAC;AAYH,eAAO,MAAM,cAAc,2SAqB1B,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as FileSystem from "effect/FileSystem";
|
|
2
|
+
import * as Path from "effect/Path";
|
|
3
|
+
import * as Option from "effect/Option";
|
|
4
|
+
import { Argument, Command, Flag } from "effect/unstable/cli";
|
|
5
|
+
import * as Effect from "effect/Effect";
|
|
6
|
+
import { makeAppError } from "@agentxm/client-core/unstable/app-error";
|
|
7
|
+
import { CodingAgentRepository } from "@agentxm/client-core/unstable/agents";
|
|
8
|
+
import { decodeExtensionNameSync, } from "@agentxm/client-core/unstable/extensions";
|
|
9
|
+
import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
|
|
10
|
+
import { Workspace } from "@agentxm/client-core/unstable/workspace";
|
|
11
|
+
import { disableCommand as runDisableCommand } from "@agentxm/client-core/unstable/commands";
|
|
12
|
+
import { forceFlag, previewFlag, yesFlag } from "@agentxm/client-core/unstable/cli-flags";
|
|
13
|
+
import { withArgvTracking } from "@agentxm/client-core/unstable/cli-runtime";
|
|
14
|
+
import { previewOrApplyPlan } from "@agentxm/client-core/unstable/workspace";
|
|
15
|
+
import { emitNoOpResult, emitPlanResolutionResult } from "../../json-output.js";
|
|
16
|
+
import { withRuntime, withWorkspace } from "../../runtime.js";
|
|
17
|
+
import { scopeFlag } from "../../cli-flags.js";
|
|
18
|
+
import { toJobStepResult } from "./job-step-result.js";
|
|
19
|
+
import { combinePlanSections, makeAgentSection, makeRenderedFilesSection, } from "./preview-sections.js";
|
|
20
|
+
export const handleDisableCommand = Effect.fn("DisableCommand.handle")(function* (args) {
|
|
21
|
+
const ws = yield* Workspace;
|
|
22
|
+
const renderer = yield* CliRenderer;
|
|
23
|
+
const fs = yield* FileSystem.FileSystem;
|
|
24
|
+
const path = yield* Path.Path;
|
|
25
|
+
const agentRepo = yield* CodingAgentRepository;
|
|
26
|
+
yield* renderer.info("axm commands disable");
|
|
27
|
+
// Load installed commands (configured + implicit) -- taxonomy lifecycle view
|
|
28
|
+
const installedCommands = yield* ws.getInstalledCommands();
|
|
29
|
+
const installedEntry = installedCommands[args.name];
|
|
30
|
+
// Validate: command is installed (ignored names are excluded from installed)
|
|
31
|
+
if (installedEntry === undefined) {
|
|
32
|
+
return yield* makeAppError({
|
|
33
|
+
code: "COMMAND_NOT_FOUND",
|
|
34
|
+
what: `Command '${args.name}' is not installed`,
|
|
35
|
+
howToFix: "Run `axm commands list` to see available commands",
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
// Configured command -- check if already disabled (implicit commands are always enabled)
|
|
39
|
+
if (installedEntry.lifecycle === "configured" && !installedEntry.enabled) {
|
|
40
|
+
if (yield* emitNoOpResult("commands.disable", {
|
|
41
|
+
planName: "Disable command",
|
|
42
|
+
planDescription: `Disable ${args.name}`,
|
|
43
|
+
message: `Command '${args.name}' is already disabled`,
|
|
44
|
+
})) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
yield* renderer.info(`Command '${args.name}' is already disabled`);
|
|
48
|
+
yield* renderer.success("Nothing to do.");
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const lockedEntry = yield* ws.getLockedCommand(args.name);
|
|
52
|
+
const planSections = Option.isSome(lockedEntry)
|
|
53
|
+
? combinePlanSections(makeAgentSection("Would remove rendered files from agents", lockedEntry.value.agents, "(no agents recorded)"), makeRenderedFilesSection("Files that would be removed", lockedEntry.value.renderedFiles ?? {}))
|
|
54
|
+
: undefined;
|
|
55
|
+
// Build operation
|
|
56
|
+
const op = {
|
|
57
|
+
name: "disable-command",
|
|
58
|
+
args: { commandName: args.name },
|
|
59
|
+
};
|
|
60
|
+
// Build plan with inline run closure
|
|
61
|
+
const step = {
|
|
62
|
+
readiness: "ready",
|
|
63
|
+
label: args.name,
|
|
64
|
+
run: runDisableCommand(op).pipe(Effect.map(toJobStepResult), Effect.provideService(Workspace, ws), Effect.provideService(FileSystem.FileSystem, fs), Effect.provideService(Path.Path, path), Effect.provideService(CodingAgentRepository, agentRepo)),
|
|
65
|
+
};
|
|
66
|
+
const plan = {
|
|
67
|
+
_tag: "Plan",
|
|
68
|
+
name: "Disable command",
|
|
69
|
+
description: Option.some(`Disable ${args.name}`),
|
|
70
|
+
jobs: [{ concurrency: 1, steps: [step] }],
|
|
71
|
+
...(planSections === undefined ? {} : { sections: planSections }),
|
|
72
|
+
};
|
|
73
|
+
const resolution = yield* previewOrApplyPlan(plan, {
|
|
74
|
+
yes: args.yes,
|
|
75
|
+
force: args.force,
|
|
76
|
+
preview: args.preview,
|
|
77
|
+
});
|
|
78
|
+
yield* emitPlanResolutionResult("commands.disable", resolution);
|
|
79
|
+
if (resolution._tag === "ExecutedPlan") {
|
|
80
|
+
yield* renderer.success("Done");
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
const disableConfig = {
|
|
84
|
+
name: Argument.string("name").pipe(Argument.withDescription("Name of the command to disable")),
|
|
85
|
+
scope: scopeFlag.pipe(Flag.withDescription("Disable in project (default) or user-level configuration")),
|
|
86
|
+
yes: yesFlag.pipe(Flag.withDescription("Disable without confirmation")),
|
|
87
|
+
force: forceFlag.pipe(Flag.withDescription("Disable even if other commands depend on it")),
|
|
88
|
+
preview: previewFlag.pipe(Flag.withDescription("Show what would change without disabling")),
|
|
89
|
+
};
|
|
90
|
+
export const disableCommand = Command.make("disable", disableConfig, ({ name, scope, yes, force, preview }) => handleDisableCommand({ name: decodeExtensionNameSync(name), yes, force, preview }).pipe(withWorkspace(scope), withRuntime("commands disable"))).pipe(withArgvTracking(disableConfig), Command.withDescription("Disable a command without uninstalling it"), Command.withExamples([
|
|
91
|
+
{
|
|
92
|
+
command: "axm commands disable my-cmd",
|
|
93
|
+
description: "Temporarily disable a command without removing it",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
command: "axm commands disable my-cmd --scope user",
|
|
97
|
+
description: "Disable for user-scope configuration",
|
|
98
|
+
},
|
|
99
|
+
]));
|
|
100
|
+
//# sourceMappingURL=disable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disable.js","sourceRoot":"","sources":["../../../../src/root/commands/disable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EACL,uBAAuB,GAExB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAE7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,WAAW,EA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8BAA8B,CAAC,CAAC;IACvE,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,6CAA6C,CAAC,CAAC;IAC1F,OAAO,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,0CAA0C,CAAC,CAAC;CACnF,CAAC;AAEX,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC,IAAI,CACxC,SAAS,EACT,aAAa,EACb,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CACvC,oBAAoB,CAAC,EAAE,IAAI,EAAE,uBAAuB,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,CACrF,aAAa,CAAC,KAAK,CAAC,EACpB,WAAW,CAAC,kBAAkB,CAAC,CAChC,CACJ,CAAC,IAAI,CACJ,gBAAgB,CAAC,aAAa,CAAC,EAC/B,OAAO,CAAC,eAAe,CAAC,2CAA2C,CAAC,EACpE,OAAO,CAAC,YAAY,CAAC;IACnB;QACE,OAAO,EAAE,6BAA6B;QACtC,WAAW,EAAE,mDAAmD;KACjE;IACD;QACE,OAAO,EAAE,0CAA0C;QACnD,WAAW,EAAE,sCAAsC;KACpD;CACF,CAAC,CACH,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as FileSystem from "effect/FileSystem";
|
|
2
|
+
import * as Path from "effect/Path";
|
|
3
|
+
import { Command } from "effect/unstable/cli";
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import { CodingAgentRepository } from "@agentxm/client-core/unstable/agents";
|
|
6
|
+
import { type ExtensionName } from "@agentxm/client-core/unstable/extensions";
|
|
7
|
+
import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
|
|
8
|
+
import { Workspace } from "@agentxm/client-core/unstable/workspace";
|
|
9
|
+
export interface EnableCommandHandlerArgs {
|
|
10
|
+
readonly name: ExtensionName;
|
|
11
|
+
readonly yes: boolean;
|
|
12
|
+
readonly force: boolean;
|
|
13
|
+
readonly preview: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const handleEnableCommand: (args: EnableCommandHandlerArgs) => Effect.Effect<undefined, import("@agentxm/client-core/unstable/app-error").AppError | import("packages/core/src/unstable/cli-prompt/prompt-cancelled.ts").PromptCancelled, CliRenderer | import("@agentxm/client-core/unstable/cli-flags").Verbosity | FileSystem.FileSystem | Path.Path | "effect/unstable/cli/GlobalFlag/axm-non-interactive" | Workspace | CodingAgentRepository>;
|
|
16
|
+
export declare const enableCommand: Command.Command<"enable", 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">;
|
|
17
|
+
//# sourceMappingURL=enable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enable.d.ts","sourceRoot":"","sources":["../../../../src/root/commands/enable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAY,OAAO,EAAQ,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAapE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,mBAAmB,0ZAgG9B,CAAC;AAcH,eAAO,MAAM,aAAa,0SAqBzB,CAAC"}
|