agim-cli 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/README.md +39 -3
- package/README.zh-CN.md +42 -7
- package/dist/cli-ui/cmd-handlers.d.ts +22 -1
- package/dist/cli-ui/cmd-handlers.d.ts.map +1 -1
- package/dist/cli-ui/cmd-handlers.js +304 -40
- package/dist/cli-ui/cmd-handlers.js.map +1 -1
- package/dist/cli-ui/config-wizard.d.ts +13 -1
- package/dist/cli-ui/config-wizard.d.ts.map +1 -1
- package/dist/cli-ui/config-wizard.js +93 -21
- package/dist/cli-ui/config-wizard.js.map +1 -1
- package/dist/cli-ui/doctor.d.ts +15 -0
- package/dist/cli-ui/doctor.d.ts.map +1 -0
- package/dist/cli-ui/doctor.js +151 -0
- package/dist/cli-ui/doctor.js.map +1 -0
- package/dist/cli-ui/entry-menu.d.ts +6 -0
- package/dist/cli-ui/entry-menu.d.ts.map +1 -1
- package/dist/cli-ui/entry-menu.js +67 -30
- package/dist/cli-ui/entry-menu.js.map +1 -1
- package/dist/cli-ui/i18n.d.ts +15 -6
- package/dist/cli-ui/i18n.d.ts.map +1 -1
- package/dist/cli-ui/i18n.js +30 -12
- package/dist/cli-ui/i18n.js.map +1 -1
- package/dist/cli-ui/quickstart.d.ts +3 -0
- package/dist/cli-ui/quickstart.d.ts.map +1 -0
- package/dist/cli-ui/quickstart.js +108 -0
- package/dist/cli-ui/quickstart.js.map +1 -0
- package/dist/cli-ui/readiness.d.ts +10 -0
- package/dist/cli-ui/readiness.d.ts.map +1 -0
- package/dist/cli-ui/readiness.js +75 -0
- package/dist/cli-ui/readiness.js.map +1 -0
- package/dist/cli-ui/service.d.ts +23 -0
- package/dist/cli-ui/service.d.ts.map +1 -1
- package/dist/cli-ui/service.js +114 -5
- package/dist/cli-ui/service.js.map +1 -1
- package/dist/cli.js +99 -396
- package/dist/cli.js.map +1 -1
- package/dist/core/acp-server.d.ts.map +1 -1
- package/dist/core/acp-server.js +16 -2
- package/dist/core/acp-server.js.map +1 -1
- package/dist/core/agent-cwd.d.ts +8 -0
- package/dist/core/agent-cwd.d.ts.map +1 -1
- package/dist/core/agent-cwd.js +57 -7
- package/dist/core/agent-cwd.js.map +1 -1
- package/dist/core/commands/builtin.d.ts.map +1 -1
- package/dist/core/commands/builtin.js +12 -2
- package/dist/core/commands/builtin.js.map +1 -1
- package/dist/core/commands/model.d.ts.map +1 -1
- package/dist/core/commands/model.js +31 -2
- package/dist/core/commands/model.js.map +1 -1
- package/dist/core/llm/anthropic-provider.js +2 -1
- package/dist/core/llm/anthropic-provider.js.map +1 -1
- package/dist/core/llm/openai-compat-provider.js +3 -2
- package/dist/core/llm/openai-compat-provider.js.map +1 -1
- package/dist/core/llm/provider-base.d.ts +4 -4
- package/dist/core/llm/provider-base.d.ts.map +1 -1
- package/dist/core/llm/provider-base.js +1 -1
- package/dist/core/llm/provider-base.js.map +1 -1
- package/dist/plugins/agents/native/index.d.ts +1 -0
- package/dist/plugins/agents/native/index.d.ts.map +1 -1
- package/dist/plugins/agents/native/index.js +14 -0
- package/dist/plugins/agents/native/index.js.map +1 -1
- package/dist/plugins/agents/pi-native/factory.d.ts.map +1 -1
- package/dist/plugins/agents/pi-native/factory.js +19 -3
- package/dist/plugins/agents/pi-native/factory.js.map +1 -1
- package/dist/plugins/agents/pi-native/index.d.ts +11 -0
- package/dist/plugins/agents/pi-native/index.d.ts.map +1 -1
- package/dist/plugins/agents/pi-native/index.js +56 -2
- package/dist/plugins/agents/pi-native/index.js.map +1 -1
- package/dist/plugins/agents/pi-native/provider-resolver.d.ts +2 -0
- package/dist/plugins/agents/pi-native/provider-resolver.d.ts.map +1 -1
- package/dist/plugins/agents/pi-native/provider-resolver.js +9 -1
- package/dist/plugins/agents/pi-native/provider-resolver.js.map +1 -1
- package/dist/web/public/assets/a2a-CTsDMefo.js +7 -0
- package/dist/web/public/assets/a2a-CTsDMefo.js.map +1 -0
- package/dist/web/public/assets/{activity-BAgb2WZC.js → activity-ul8Os7Pz.js} +2 -2
- package/dist/web/public/assets/{activity-BAgb2WZC.js.map → activity-ul8Os7Pz.js.map} +1 -1
- package/dist/web/public/assets/{admins-CZYANmhn.js → admins-ByMAuquy.js} +3 -3
- package/dist/web/public/assets/{admins-CZYANmhn.js.map → admins-ByMAuquy.js.map} +1 -1
- package/dist/web/public/assets/agents-Ds1zyxBj.js +2 -0
- package/dist/web/public/assets/{agents-BXThDW6f.js.map → agents-Ds1zyxBj.js.map} +1 -1
- package/dist/web/public/assets/{approvals-ByPXIYVl.js → approvals-DOWlWI7Z.js} +3 -3
- package/dist/web/public/assets/{approvals-ByPXIYVl.js.map → approvals-DOWlWI7Z.js.map} +1 -1
- package/dist/web/public/assets/{arrow-down-B8DkdbEY.js → arrow-down-7i0xwCI2.js} +2 -2
- package/dist/web/public/assets/{arrow-down-B8DkdbEY.js.map → arrow-down-7i0xwCI2.js.map} +1 -1
- package/dist/web/public/assets/arrow-right-A889Wof8.js +7 -0
- package/dist/web/public/assets/arrow-right-A889Wof8.js.map +1 -0
- package/dist/web/public/assets/{arrow-up-i_dEdXkz.js → arrow-up-Dm0U4-6U.js} +2 -2
- package/dist/web/public/assets/{arrow-up-i_dEdXkz.js.map → arrow-up-Dm0U4-6U.js.map} +1 -1
- package/dist/web/public/assets/{asks-yD_inOnM.js → asks-DGuBsrJ7.js} +3 -3
- package/dist/web/public/assets/{asks-yD_inOnM.js.map → asks-DGuBsrJ7.js.map} +1 -1
- package/dist/web/public/assets/{audit-teCIRtgN.js → audit-BRXsplJ2.js} +2 -2
- package/dist/web/public/assets/{audit-teCIRtgN.js.map → audit-BRXsplJ2.js.map} +1 -1
- package/dist/web/public/assets/{bell-CeWDMs8_.js → bell-B-UdeJsp.js} +2 -2
- package/dist/web/public/assets/{bell-CeWDMs8_.js.map → bell-B-UdeJsp.js.map} +1 -1
- package/dist/web/public/assets/bgjobs-CcRiffyJ.js +2 -0
- package/dist/web/public/assets/bgjobs-CcRiffyJ.js.map +1 -0
- package/dist/web/public/assets/book-open-CSCq5cjL.js +7 -0
- package/dist/web/public/assets/book-open-CSCq5cjL.js.map +1 -0
- package/dist/web/public/assets/{brain-BQqv0Zhc.js → brain-Dl4DF5kX.js} +2 -2
- package/dist/web/public/assets/{brain-BQqv0Zhc.js.map → brain-Dl4DF5kX.js.map} +1 -1
- package/dist/web/public/assets/{briefcase-DUXbR4xs.js → briefcase-CeKUkFSq.js} +2 -2
- package/dist/web/public/assets/{briefcase-DUXbR4xs.js.map → briefcase-CeKUkFSq.js.map} +1 -1
- package/dist/web/public/assets/chat-rLJMdJBk.js +12 -0
- package/dist/web/public/assets/chat-rLJMdJBk.js.map +1 -0
- package/dist/web/public/assets/{chevron-left-RC6mMSiX.js → chevron-left-01fAFVpo.js} +2 -2
- package/dist/web/public/assets/{chevron-left-RC6mMSiX.js.map → chevron-left-01fAFVpo.js.map} +1 -1
- package/dist/web/public/assets/{chevron-right-DrkYVi19.js → chevron-right-CFRb-SM_.js} +3 -3
- package/dist/web/public/assets/{chevron-right-DrkYVi19.js.map → chevron-right-CFRb-SM_.js.map} +1 -1
- package/dist/web/public/assets/{circle-check-big-BC8ntMsz.js → circle-check-big-DBg2BD6o.js} +2 -2
- package/dist/web/public/assets/{circle-check-big-BC8ntMsz.js.map → circle-check-big-DBg2BD6o.js.map} +1 -1
- package/dist/web/public/assets/{circle-x-DHK7ypFY.js → circle-x-CqFMzO-x.js} +2 -2
- package/dist/web/public/assets/{circle-x-DHK7ypFY.js.map → circle-x-CqFMzO-x.js.map} +1 -1
- package/dist/web/public/assets/clipboard-list-lnqdk2_J.js +7 -0
- package/dist/web/public/assets/clipboard-list-lnqdk2_J.js.map +1 -0
- package/dist/web/public/assets/{clock-DXHhWqJH.js → clock-4hd1joQe.js} +3 -3
- package/dist/web/public/assets/{clock-DXHhWqJH.js.map → clock-4hd1joQe.js.map} +1 -1
- package/dist/web/public/assets/confirm-dialog-BDb0NLny.js +2 -0
- package/dist/web/public/assets/{confirm-dialog-gPKJnvEW.js.map → confirm-dialog-BDb0NLny.js.map} +1 -1
- package/dist/web/public/assets/{copy-DtQxgcR0.js → copy-CD4A7VD8.js} +3 -3
- package/dist/web/public/assets/{copy-DtQxgcR0.js.map → copy-CD4A7VD8.js.map} +1 -1
- package/dist/web/public/assets/dashboard-CG3WiG7h.js +2 -0
- package/dist/web/public/assets/dashboard-CG3WiG7h.js.map +1 -0
- package/dist/web/public/assets/{data-table-DOKUic1J.js → data-table-BkUshOZz.js} +2 -2
- package/dist/web/public/assets/{data-table-DOKUic1J.js.map → data-table-BkUshOZz.js.map} +1 -1
- package/dist/web/public/assets/database-lQzk64rV.js +7 -0
- package/dist/web/public/assets/database-lQzk64rV.js.map +1 -0
- package/dist/web/public/assets/{distill-p6P7-1UR.js → distill-CPurVW3v.js} +3 -3
- package/dist/web/public/assets/{distill-p6P7-1UR.js.map → distill-CPurVW3v.js.map} +1 -1
- package/dist/web/public/assets/{download-CqNiIHa8.js → download-CVZnHcwj.js} +2 -2
- package/dist/web/public/assets/{download-CqNiIHa8.js.map → download-CVZnHcwj.js.map} +1 -1
- package/dist/web/public/assets/dropdown-menu-BNH5SrVb.js +7 -0
- package/dist/web/public/assets/dropdown-menu-BNH5SrVb.js.map +1 -0
- package/dist/web/public/assets/{email-DwbfTUlV.js → email-YlI4MWLp.js} +3 -3
- package/dist/web/public/assets/{email-DwbfTUlV.js.map → email-YlI4MWLp.js.map} +1 -1
- package/dist/web/public/assets/{empty-state-CTwOQemt.js → empty-state-CuiqdZiB.js} +2 -2
- package/dist/web/public/assets/{empty-state-CTwOQemt.js.map → empty-state-CuiqdZiB.js.map} +1 -1
- package/dist/web/public/assets/{external-link-BY7Ye8yi.js → external-link-1WPpVvdu.js} +2 -2
- package/dist/web/public/assets/{external-link-BY7Ye8yi.js.map → external-link-1WPpVvdu.js.map} +1 -1
- package/dist/web/public/assets/{eye-6RUADoDS.js → eye-BfPyNFzk.js} +2 -2
- package/dist/web/public/assets/{eye-6RUADoDS.js.map → eye-BfPyNFzk.js.map} +1 -1
- package/dist/web/public/assets/{facts-DXE0aJmb.js → facts-xT_24pH8.js} +2 -2
- package/dist/web/public/assets/{facts-DXE0aJmb.js.map → facts-xT_24pH8.js.map} +1 -1
- package/dist/web/public/assets/file-text-BxfdLM0-.js +7 -0
- package/dist/web/public/assets/file-text-BxfdLM0-.js.map +1 -0
- package/dist/web/public/assets/{goals-C1LCm3qL.js → goals-C8ZQfbhj.js} +3 -3
- package/dist/web/public/assets/{goals-C1LCm3qL.js.map → goals-C8ZQfbhj.js.map} +1 -1
- package/dist/web/public/assets/health-A2StNEfn.js +2 -0
- package/dist/web/public/assets/{health-wqCp-K_o.js.map → health-A2StNEfn.js.map} +1 -1
- package/dist/web/public/assets/{heart-pulse-DfqI4GF7.js → heart-pulse-DXlE9oic.js} +2 -2
- package/dist/web/public/assets/{heart-pulse-DfqI4GF7.js.map → heart-pulse-DXlE9oic.js.map} +1 -1
- package/dist/web/public/assets/{heartbeat-Bumv4XtQ.js → heartbeat-ClO5gJrj.js} +3 -3
- package/dist/web/public/assets/{heartbeat-Bumv4XtQ.js.map → heartbeat-ClO5gJrj.js.map} +1 -1
- package/dist/web/public/assets/hot-bfTA-V_z.js +7 -0
- package/dist/web/public/assets/{hot-B-CMjQIr.js.map → hot-bfTA-V_z.js.map} +1 -1
- package/dist/web/public/assets/index-Bi2qWb-u.css +1 -0
- package/dist/web/public/assets/index-DCfdN5R7.js +244 -0
- package/dist/web/public/assets/index-DCfdN5R7.js.map +1 -0
- package/dist/web/public/assets/{injection-Dn_XqgLG.js → injection-omvCR6-p.js} +2 -2
- package/dist/web/public/assets/{injection-Dn_XqgLG.js.map → injection-omvCR6-p.js.map} +1 -1
- package/dist/web/public/assets/{installed-Cet-1M2Q.js → installed-DL6r3ktm.js} +4 -9
- package/dist/web/public/assets/installed-DL6r3ktm.js.map +1 -0
- package/dist/web/public/assets/jobs-Biy5lYd4.js +2 -0
- package/dist/web/public/assets/jobs-Biy5lYd4.js.map +1 -0
- package/dist/web/public/assets/layout-BLm6NJ3V.js +2 -0
- package/dist/web/public/assets/layout-BLm6NJ3V.js.map +1 -0
- package/dist/web/public/assets/layout-BTKafRVZ.js +2 -0
- package/dist/web/public/assets/layout-BTKafRVZ.js.map +1 -0
- package/dist/web/public/assets/layout-Bm-2s2fp.js +2 -0
- package/dist/web/public/assets/layout-Bm-2s2fp.js.map +1 -0
- package/dist/web/public/assets/layout-DsZ8eR4i.js +2 -0
- package/dist/web/public/assets/layout-DsZ8eR4i.js.map +1 -0
- package/dist/web/public/assets/{layout-D_3ZcVG7.js → layout-sxvovjEH.js} +2 -2
- package/dist/web/public/assets/{layout-D_3ZcVG7.js.map → layout-sxvovjEH.js.map} +1 -1
- package/dist/web/public/assets/llm-JjZDbBvJ.js +37 -0
- package/dist/web/public/assets/llm-JjZDbBvJ.js.map +1 -0
- package/dist/web/public/assets/loader-circle-DDdmcH0k.js +7 -0
- package/dist/web/public/assets/{loader-circle-DgdBWYl0.js.map → loader-circle-DDdmcH0k.js.map} +1 -1
- package/dist/web/public/assets/{map-pin-3QS1A0-I.js → map-pin-C_jAxukI.js} +2 -2
- package/dist/web/public/assets/{map-pin-3QS1A0-I.js.map → map-pin-C_jAxukI.js.map} +1 -1
- package/dist/web/public/assets/{mcp-DwKZULET.js → mcp-vKajK1F8.js} +3 -3
- package/dist/web/public/assets/{mcp-DwKZULET.js.map → mcp-vKajK1F8.js.map} +1 -1
- package/dist/web/public/assets/memos-DAt4k3DO.js +7 -0
- package/dist/web/public/assets/memos-DAt4k3DO.js.map +1 -0
- package/dist/web/public/assets/messengers-GYVTFlAj.js +2 -0
- package/dist/web/public/assets/messengers-GYVTFlAj.js.map +1 -0
- package/dist/web/public/assets/{mobile-Bq0FH9JV.js → mobile-VUyTo40E.js} +3 -3
- package/dist/web/public/assets/{mobile-Bq0FH9JV.js.map → mobile-VUyTo40E.js.map} +1 -1
- package/dist/web/public/assets/{network--s113Jkm.js → network-BUeWK3bs.js} +2 -2
- package/dist/web/public/assets/{network--s113Jkm.js.map → network-BUeWK3bs.js.map} +1 -1
- package/dist/web/public/assets/outbox-CEE0rwN3.js +2 -0
- package/dist/web/public/assets/outbox-CEE0rwN3.js.map +1 -0
- package/dist/web/public/assets/overview-BSOZ5gTD.js +12 -0
- package/dist/web/public/assets/overview-BSOZ5gTD.js.map +1 -0
- package/dist/web/public/assets/overview-COop5K2Y.js +12 -0
- package/dist/web/public/assets/overview-COop5K2Y.js.map +1 -0
- package/dist/web/public/assets/overview-DeH5ud6d.js +2 -0
- package/dist/web/public/assets/overview-DeH5ud6d.js.map +1 -0
- package/dist/web/public/assets/{pagination-DkdCTctJ.js → pagination-BBicLzXP.js} +3 -3
- package/dist/web/public/assets/{pagination-DkdCTctJ.js.map → pagination-BBicLzXP.js.map} +1 -1
- package/dist/web/public/assets/persona-CElXQZ4p.js +2 -0
- package/dist/web/public/assets/{persona-BvtcZh6G.js.map → persona-CElXQZ4p.js.map} +1 -1
- package/dist/web/public/assets/{plans-i3a6lrqF.js → plans-Bo5LlLeH.js} +3 -8
- package/dist/web/public/assets/plans-Bo5LlLeH.js.map +1 -0
- package/dist/web/public/assets/{play-CPoE_JnS.js → play-DX5wp4WH.js} +2 -2
- package/dist/web/public/assets/{play-CPoE_JnS.js.map → play-DX5wp4WH.js.map} +1 -1
- package/dist/web/public/assets/{plus-CfzKV_0u.js → plus-DH4J_YhN.js} +2 -2
- package/dist/web/public/assets/{plus-CfzKV_0u.js.map → plus-DH4J_YhN.js.map} +1 -1
- package/dist/web/public/assets/policy-BrgOuDt_.js +2 -0
- package/dist/web/public/assets/{policy-Cm88P8LO.js.map → policy-BrgOuDt_.js.map} +1 -1
- package/dist/web/public/assets/{qr-code-DMkV8nv2.js → qr-code-YrEuhMPC.js} +2 -2
- package/dist/web/public/assets/{qr-code-DMkV8nv2.js.map → qr-code-YrEuhMPC.js.map} +1 -1
- package/dist/web/public/assets/{refresh-ccw-nBMm5Xal.js → refresh-ccw-DlAd-eTQ.js} +2 -2
- package/dist/web/public/assets/{refresh-ccw-nBMm5Xal.js.map → refresh-ccw-DlAd-eTQ.js.map} +1 -1
- package/dist/web/public/assets/{reminders-DjEujanC.js → reminders-DBEE0zXG.js} +3 -3
- package/dist/web/public/assets/{reminders-DjEujanC.js.map → reminders-DBEE0zXG.js.map} +1 -1
- package/dist/web/public/assets/{save-DbrrCFDM.js → save-BDOtZrfp.js} +2 -2
- package/dist/web/public/assets/{save-DbrrCFDM.js.map → save-BDOtZrfp.js.map} +1 -1
- package/dist/web/public/assets/schedules-DAyhVI8-.js +2 -0
- package/dist/web/public/assets/schedules-DAyhVI8-.js.map +1 -0
- package/dist/web/public/assets/{search-5q3dkINm.js → search-55mtgHrB.js} +3 -3
- package/dist/web/public/assets/{search-5q3dkINm.js.map → search-55mtgHrB.js.map} +1 -1
- package/dist/web/public/assets/{search-DbE4VEm9.js → search-CAICU3aU.js} +2 -2
- package/dist/web/public/assets/{search-DbE4VEm9.js.map → search-CAICU3aU.js.map} +1 -1
- package/dist/web/public/assets/security-CbP4QgVp.js +2 -0
- package/dist/web/public/assets/security-CbP4QgVp.js.map +1 -0
- package/dist/web/public/assets/server-Dg4e8pvm.js +7 -0
- package/dist/web/public/assets/server-Dg4e8pvm.js.map +1 -0
- package/dist/web/public/assets/service-gWZa3sup.js +7 -0
- package/dist/web/public/assets/service-gWZa3sup.js.map +1 -0
- package/dist/web/public/assets/{shield-alert-WOa69jy3.js → shield-alert-DOKK9EnJ.js} +2 -2
- package/dist/web/public/assets/{shield-alert-WOa69jy3.js.map → shield-alert-DOKK9EnJ.js.map} +1 -1
- package/dist/web/public/assets/sparkles-G0QIs9nP.js +7 -0
- package/dist/web/public/assets/sparkles-G0QIs9nP.js.map +1 -0
- package/dist/web/public/assets/start-D-abhl3q.js +2 -0
- package/dist/web/public/assets/start-D-abhl3q.js.map +1 -0
- package/dist/web/public/assets/{status-badge-D5xhwquL.js → status-badge-CyLdpsXq.js} +2 -2
- package/dist/web/public/assets/{status-badge-D5xhwquL.js.map → status-badge-CyLdpsXq.js.map} +1 -1
- package/dist/web/public/assets/{subtasks-DMRyk6YS.js → subtasks-BnEjSGUR.js} +3 -3
- package/dist/web/public/assets/{subtasks-DMRyk6YS.js.map → subtasks-BnEjSGUR.js.map} +1 -1
- package/dist/web/public/assets/{table-Dx65w6V0.js → table-sCMZBe_Z.js} +2 -2
- package/dist/web/public/assets/{table-Dx65w6V0.js.map → table-sCMZBe_Z.js.map} +1 -1
- package/dist/web/public/assets/terminal-_pXeEjXG.js +7 -0
- package/dist/web/public/assets/terminal-_pXeEjXG.js.map +1 -0
- package/dist/web/public/assets/{topn-L7Juczp3.js → topn-D1B-gS1M.js} +3 -3
- package/dist/web/public/assets/{topn-L7Juczp3.js.map → topn-D1B-gS1M.js.map} +1 -1
- package/dist/web/public/assets/{trash-2-7xrfqd-v.js → trash-2-D2x2UPuZ.js} +2 -2
- package/dist/web/public/assets/{trash-2-7xrfqd-v.js.map → trash-2-D2x2UPuZ.js.map} +1 -1
- package/dist/web/public/assets/use-a2a-C98e2Via.js +2 -0
- package/dist/web/public/assets/use-a2a-C98e2Via.js.map +1 -0
- package/dist/web/public/assets/{use-agim-skills-pFjfgqMF.js → use-agim-skills-BbuJP3NT.js} +2 -2
- package/dist/web/public/assets/{use-agim-skills-pFjfgqMF.js.map → use-agim-skills-BbuJP3NT.js.map} +1 -1
- package/dist/web/public/assets/use-background-tasks-CwFmOokw.js +2 -0
- package/dist/web/public/assets/{use-background-tasks-D1--hHjp.js.map → use-background-tasks-CwFmOokw.js.map} +1 -1
- package/dist/web/public/assets/use-jobs-BJjeJ5lh.js +2 -0
- package/dist/web/public/assets/use-jobs-BJjeJ5lh.js.map +1 -0
- package/dist/web/public/assets/use-memory-CXDwKCco.js +2 -0
- package/dist/web/public/assets/{use-memory-Bz1Zao7g.js.map → use-memory-CXDwKCco.js.map} +1 -1
- package/dist/web/public/assets/use-observability-CY5ZUPrC.js +2 -0
- package/dist/web/public/assets/{use-observability-DtqSWVjM.js.map → use-observability-CY5ZUPrC.js.map} +1 -1
- package/dist/web/public/assets/use-outbox-DT_XWB_7.js +7 -0
- package/dist/web/public/assets/use-outbox-DT_XWB_7.js.map +1 -0
- package/dist/web/public/assets/use-schedules-D4W8fMwo.js +7 -0
- package/dist/web/public/assets/use-schedules-D4W8fMwo.js.map +1 -0
- package/dist/web/public/assets/use-settings-DGIjmUX0.js +2 -0
- package/dist/web/public/assets/use-settings-DGIjmUX0.js.map +1 -0
- package/dist/web/public/assets/use-skills-D2bMM580.js +7 -0
- package/dist/web/public/assets/use-skills-D2bMM580.js.map +1 -0
- package/dist/web/public/assets/use-vector-BYOFwjU0.js +2 -0
- package/dist/web/public/assets/use-vector-BYOFwjU0.js.map +1 -0
- package/dist/web/public/assets/use-workspace-CuytyHwb.js +2 -0
- package/dist/web/public/assets/{use-workspace-CConjEx0.js.map → use-workspace-CuytyHwb.js.map} +1 -1
- package/dist/web/public/assets/vector-CL8ezpSR.js +2 -0
- package/dist/web/public/assets/vector-CL8ezpSR.js.map +1 -0
- package/dist/web/public/assets/viewer-CD0iEfPU.js +7 -0
- package/dist/web/public/assets/viewer-CD0iEfPU.js.map +1 -0
- package/dist/web/public/assets/workspace-BA1_hso3.js +17 -0
- package/dist/web/public/assets/workspace-BA1_hso3.js.map +1 -0
- package/dist/web/public/assets/workspaces-DyGLJUgB.js +7 -0
- package/dist/web/public/assets/workspaces-DyGLJUgB.js.map +1 -0
- package/dist/web/public/index.html +2 -2
- package/dist/web/server.d.ts +0 -3
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +138 -3
- package/dist/web/server.js.map +1 -1
- package/package.json +1 -1
- package/dist/web/public/assets/a2a-D7MoJ1iT.js +0 -7
- package/dist/web/public/assets/a2a-D7MoJ1iT.js.map +0 -1
- package/dist/web/public/assets/agents-BXThDW6f.js +0 -7
- package/dist/web/public/assets/bgjobs-Rc05aEy9.js +0 -7
- package/dist/web/public/assets/bgjobs-Rc05aEy9.js.map +0 -1
- package/dist/web/public/assets/chat-DQpQLW9j.js +0 -17
- package/dist/web/public/assets/chat-DQpQLW9j.js.map +0 -1
- package/dist/web/public/assets/circle-check-DZnkaUdk.js +0 -7
- package/dist/web/public/assets/circle-check-DZnkaUdk.js.map +0 -1
- package/dist/web/public/assets/confirm-dialog-gPKJnvEW.js +0 -2
- package/dist/web/public/assets/health-wqCp-K_o.js +0 -2
- package/dist/web/public/assets/hot-B-CMjQIr.js +0 -12
- package/dist/web/public/assets/index-DHh1LYlA.js +0 -209
- package/dist/web/public/assets/index-DHh1LYlA.js.map +0 -1
- package/dist/web/public/assets/index-DknVjPYB.css +0 -1
- package/dist/web/public/assets/installed-Cet-1M2Q.js.map +0 -1
- package/dist/web/public/assets/jobs-CfEzOOAC.js +0 -2
- package/dist/web/public/assets/jobs-CfEzOOAC.js.map +0 -1
- package/dist/web/public/assets/layout-BX43KyXM.js +0 -2
- package/dist/web/public/assets/layout-BX43KyXM.js.map +0 -1
- package/dist/web/public/assets/layout-BcYZlaqf.js +0 -2
- package/dist/web/public/assets/layout-BcYZlaqf.js.map +0 -1
- package/dist/web/public/assets/layout-Cb7looUv.js +0 -2
- package/dist/web/public/assets/layout-Cb7looUv.js.map +0 -1
- package/dist/web/public/assets/layout-D7xH78OU.js +0 -2
- package/dist/web/public/assets/layout-D7xH78OU.js.map +0 -1
- package/dist/web/public/assets/llm-BZ9qqp-D.js +0 -27
- package/dist/web/public/assets/llm-BZ9qqp-D.js.map +0 -1
- package/dist/web/public/assets/loader-circle-DgdBWYl0.js +0 -7
- package/dist/web/public/assets/memos-BBtqFcoH.js +0 -12
- package/dist/web/public/assets/memos-BBtqFcoH.js.map +0 -1
- package/dist/web/public/assets/messengers-i7WvNT3o.js +0 -2
- package/dist/web/public/assets/messengers-i7WvNT3o.js.map +0 -1
- package/dist/web/public/assets/outbox-BbfC5kuG.js +0 -7
- package/dist/web/public/assets/outbox-BbfC5kuG.js.map +0 -1
- package/dist/web/public/assets/persona-BvtcZh6G.js +0 -2
- package/dist/web/public/assets/plans-i3a6lrqF.js.map +0 -1
- package/dist/web/public/assets/policy-Cm88P8LO.js +0 -2
- package/dist/web/public/assets/schedules-DzwDWykc.js +0 -7
- package/dist/web/public/assets/schedules-DzwDWykc.js.map +0 -1
- package/dist/web/public/assets/security-BIcnUrAs.js +0 -2
- package/dist/web/public/assets/security-BIcnUrAs.js.map +0 -1
- package/dist/web/public/assets/service-CnorFHzZ.js +0 -7
- package/dist/web/public/assets/service-CnorFHzZ.js.map +0 -1
- package/dist/web/public/assets/use-background-tasks-D1--hHjp.js +0 -2
- package/dist/web/public/assets/use-memory-Bz1Zao7g.js +0 -2
- package/dist/web/public/assets/use-observability-DtqSWVjM.js +0 -2
- package/dist/web/public/assets/use-settings-DKbDqCEJ.js +0 -2
- package/dist/web/public/assets/use-settings-DKbDqCEJ.js.map +0 -1
- package/dist/web/public/assets/use-workspace-CConjEx0.js +0 -2
- package/dist/web/public/assets/vector-D8sEa2W-.js +0 -2
- package/dist/web/public/assets/vector-D8sEa2W-.js.map +0 -1
- package/dist/web/public/assets/viewer-aSIjAKVA.js +0 -12
- package/dist/web/public/assets/viewer-aSIjAKVA.js.map +0 -1
- package/dist/web/public/assets/workspace-BqwWoinI.js +0 -17
- package/dist/web/public/assets/workspace-BqwWoinI.js.map +0 -1
- package/dist/web/public/assets/workspaces-ChsJcrav.js +0 -7
- package/dist/web/public/assets/workspaces-ChsJcrav.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -14,7 +14,6 @@ import { getDefaultAgent } from './core/live-config.js';
|
|
|
14
14
|
import { sessionManager } from './core/session.js';
|
|
15
15
|
import { runOnThread } from './core/thread-queue.js';
|
|
16
16
|
import { parseMessage, routeMessage } from './core/router.js';
|
|
17
|
-
import { crossSpawn } from './utils/cross-platform.js';
|
|
18
17
|
import { generateTraceId, createLogger, sanitizeUserText, logger as rootLogger } from './core/logger.js';
|
|
19
18
|
import { validateConfig } from './core/config-schema.js';
|
|
20
19
|
import { workspaceRegistry } from './core/workspace.js';
|
|
@@ -28,14 +27,10 @@ import { createReminder } from './core/reminders.js';
|
|
|
28
27
|
import { setReminderConfirmNotifier } from './core/reminder-rpc.js';
|
|
29
28
|
import { sink } from './core/message-sink.js';
|
|
30
29
|
import { createInlineJob, markJobRunning, markJobCompleted, markJobFailed, linkJobOutbox, updateJobAgent, } from './core/job-board.js';
|
|
31
|
-
import { checkMessengerConfig, checkAgentAvailability, runMessengerOnboarding,
|
|
30
|
+
import { checkMessengerConfig, checkAgentAvailability, runMessengerOnboarding, formatMessengerStartError, loadConfig as loadOnboardingConfig, saveConfig as saveOnboardingConfig, } from './core/onboarding.js';
|
|
32
31
|
import { startWebServer } from './web/server.js';
|
|
33
32
|
import { startACPServer } from './core/acp-server.js';
|
|
34
33
|
import { AGIM_HOME } from './core/agim-paths.js';
|
|
35
|
-
// Helper to format agent install hint for missing agents
|
|
36
|
-
function _formatMissingAgentHint(missing) {
|
|
37
|
-
return formatAgentInstallHint(missing);
|
|
38
|
-
}
|
|
39
34
|
const CONFIG_DIR = AGIM_HOME;
|
|
40
35
|
const CONFIG_FILE = join(CONFIG_DIR, 'config.json');
|
|
41
36
|
const PACKAGE_JSON = join(dirname(fileURLToPath(import.meta.url)), '..', 'package.json');
|
|
@@ -60,10 +55,30 @@ function readPackageVersion() {
|
|
|
60
55
|
program
|
|
61
56
|
.name('agim')
|
|
62
57
|
.description('Universal messenger-to-agent bridge')
|
|
63
|
-
.version(readPackageVersion())
|
|
58
|
+
.version(readPackageVersion())
|
|
59
|
+
.addHelpText('afterAll', `
|
|
60
|
+
Common path:
|
|
61
|
+
agim go First run: choose/configure one agent and start Web
|
|
62
|
+
agim web Find the Web console URL, service state, and token hint
|
|
63
|
+
agim web --open Open the Web console in your default browser
|
|
64
|
+
agim web --start --open
|
|
65
|
+
Start the background service and open Web
|
|
66
|
+
agim config Continue setup: Agent, IM, Web port, admins, SMTP
|
|
67
|
+
agim doctor Explain local readiness problems
|
|
68
|
+
|
|
69
|
+
Service:
|
|
70
|
+
agim start --bg Run Agim in the background
|
|
71
|
+
agim status Show runtime state
|
|
72
|
+
agim restart Restart after config changes
|
|
73
|
+
agim stop Stop the service
|
|
74
|
+
|
|
75
|
+
Advanced:
|
|
76
|
+
agim setup llm|mcp
|
|
77
|
+
agim diag llm|mcp
|
|
78
|
+
`);
|
|
64
79
|
program
|
|
65
80
|
.command('start')
|
|
66
|
-
.description('Start the Agim
|
|
81
|
+
.description('Start the Agim runtime; use --bg for the normal background service')
|
|
67
82
|
.option('--bg, --background', 'Start as a detached background daemon (writes pid file + log to ~/.agim/)')
|
|
68
83
|
.action(async (opts) => {
|
|
69
84
|
// v1.2.85 — load ~/.agim/env into process.env BEFORE any branch
|
|
@@ -1560,364 +1575,32 @@ async function handleMessage(ctx, defaultAgent) {
|
|
|
1560
1575
|
}
|
|
1561
1576
|
program
|
|
1562
1577
|
.command('config [component]')
|
|
1563
|
-
.description('
|
|
1578
|
+
.description('Unified config wizard; optional shortcuts jump to a section, e.g. `config wechat`')
|
|
1564
1579
|
.action(async (component) => {
|
|
1580
|
+
const { pickLang } = await import('./cli-ui/lang-picker.js');
|
|
1581
|
+
const { runConfigWizard, sectionForConfigComponent } = await import('./cli-ui/config-wizard.js');
|
|
1582
|
+
const { t: cliT } = await import('./cli-ui/i18n.js');
|
|
1583
|
+
const lang = await pickLang();
|
|
1565
1584
|
if (!component) {
|
|
1566
|
-
// New interactive wizard (since v0.5.0). Falls through to the
|
|
1567
|
-
// per-component switch below when an explicit `config wechat` etc.
|
|
1568
|
-
// is passed — keeps scripted setups working.
|
|
1569
|
-
const { pickLang } = await import('./cli-ui/lang-picker.js');
|
|
1570
|
-
const { runConfigWizard } = await import('./cli-ui/config-wizard.js');
|
|
1571
|
-
const lang = await pickLang();
|
|
1572
1585
|
await runConfigWizard(lang);
|
|
1573
1586
|
return;
|
|
1574
1587
|
}
|
|
1575
|
-
const
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
// Import the iLink adapter for QR login
|
|
1581
|
-
const { ILinkWeChatAdapter } = await import('./plugins/messengers/wechat/ilink-adapter.js');
|
|
1582
|
-
const adapter = new ILinkWeChatAdapter();
|
|
1583
|
-
try {
|
|
1584
|
-
// Get QR code URL and token
|
|
1585
|
-
const { qrUrl, qrToken } = await adapter.startQRLogin();
|
|
1586
|
-
console.log('📱 Scan this QR code with WeChat:\n');
|
|
1587
|
-
console.log(qrUrl);
|
|
1588
|
-
console.log('\n');
|
|
1589
|
-
// Poll for login status
|
|
1590
|
-
const credentials = await adapter.waitForQRLogin(qrToken, (status) => {
|
|
1591
|
-
console.log(`[${new Date().toLocaleTimeString()}] ${status}`);
|
|
1592
|
-
});
|
|
1593
|
-
if (credentials) {
|
|
1594
|
-
console.log(`\n✅ Logged in as ${credentials.userId}`);
|
|
1595
|
-
console.log(` Bot ID: ${credentials.accountId}`);
|
|
1596
|
-
// Add wechat-ilink to config
|
|
1597
|
-
if (!config.messengers.includes('wechat-ilink')) {
|
|
1598
|
-
config.messengers.push('wechat-ilink');
|
|
1599
|
-
}
|
|
1600
|
-
}
|
|
1601
|
-
else {
|
|
1602
|
-
console.log('\n❌ Login failed or timed out');
|
|
1603
|
-
return;
|
|
1604
|
-
}
|
|
1605
|
-
}
|
|
1606
|
-
catch (error) {
|
|
1607
|
-
console.error('\n❌ Failed to configure WeChat:', error);
|
|
1608
|
-
return;
|
|
1609
|
-
}
|
|
1610
|
-
break;
|
|
1611
|
-
}
|
|
1612
|
-
case 'claude': {
|
|
1613
|
-
console.log('🤖 Configuring Claude Code agent...');
|
|
1614
|
-
// Check if claude CLI is available
|
|
1615
|
-
const checkClaude = crossSpawn('claude', ['--version'], { stdio: 'ignore' });
|
|
1616
|
-
checkClaude.on('close', (code) => {
|
|
1617
|
-
if (code === 0) {
|
|
1618
|
-
console.log('✅ Claude Code CLI found!');
|
|
1619
|
-
}
|
|
1620
|
-
else {
|
|
1621
|
-
console.log('❌ Claude Code CLI not found.');
|
|
1622
|
-
console.log('Install with: npm install -g @anthropic-ai/claude-code');
|
|
1623
|
-
}
|
|
1624
|
-
});
|
|
1625
|
-
if (!config.agents.includes('claude-code')) {
|
|
1626
|
-
config.agents.push('claude-code');
|
|
1627
|
-
}
|
|
1628
|
-
config.defaultAgent = 'claude-code';
|
|
1629
|
-
break;
|
|
1630
|
-
}
|
|
1631
|
-
case 'codex': {
|
|
1632
|
-
console.log('🤖 Configuring Codex agent...');
|
|
1633
|
-
const checkCodex = crossSpawn('codex', ['--version'], { stdio: 'ignore' });
|
|
1634
|
-
checkCodex.on('close', (code) => {
|
|
1635
|
-
if (code === 0) {
|
|
1636
|
-
console.log('✅ Codex CLI found!');
|
|
1637
|
-
}
|
|
1638
|
-
else {
|
|
1639
|
-
console.log('❌ Codex CLI not found.');
|
|
1640
|
-
console.log('Install with: npm install -g @openai/codex');
|
|
1641
|
-
}
|
|
1642
|
-
});
|
|
1643
|
-
if (!config.agents.includes('codex')) {
|
|
1644
|
-
config.agents.push('codex');
|
|
1645
|
-
}
|
|
1646
|
-
config.defaultAgent = 'codex';
|
|
1647
|
-
break;
|
|
1648
|
-
}
|
|
1649
|
-
case 'telegram': {
|
|
1650
|
-
console.log('📱 Configuring Telegram adapter...');
|
|
1651
|
-
console.log('To get a bot token:');
|
|
1652
|
-
console.log('1. Open Telegram and search for @BotFather');
|
|
1653
|
-
console.log('2. Send /newbot and follow instructions');
|
|
1654
|
-
console.log('3. Copy the bot token\n');
|
|
1655
|
-
const { createInterface } = await import('node:readline');
|
|
1656
|
-
const rl = createInterface({
|
|
1657
|
-
input: process.stdin,
|
|
1658
|
-
output: process.stdout,
|
|
1659
|
-
});
|
|
1660
|
-
const token = await new Promise((resolve) => {
|
|
1661
|
-
rl.question('Enter your bot token: ', (answer) => {
|
|
1662
|
-
resolve(answer.trim());
|
|
1663
|
-
});
|
|
1664
|
-
});
|
|
1665
|
-
if (!token) {
|
|
1666
|
-
console.log('❌ Bot token is required');
|
|
1667
|
-
return;
|
|
1668
|
-
}
|
|
1669
|
-
const channelId = await new Promise((resolve) => {
|
|
1670
|
-
rl.question('Enter channel ID (optional, press Enter for default): ', (answer) => {
|
|
1671
|
-
resolve(answer.trim() || 'default');
|
|
1672
|
-
});
|
|
1673
|
-
});
|
|
1674
|
-
rl.close();
|
|
1675
|
-
config.telegram = { botToken: token, channelId };
|
|
1676
|
-
if (!config.messengers.includes('telegram')) {
|
|
1677
|
-
config.messengers.push('telegram');
|
|
1678
|
-
}
|
|
1679
|
-
console.log('✅ Telegram bot token saved');
|
|
1680
|
-
console.log(` Channel ID: ${channelId}`);
|
|
1681
|
-
break;
|
|
1682
|
-
}
|
|
1683
|
-
case 'feishu': {
|
|
1684
|
-
console.log('📱 Configuring Feishu adapter (WebSocket long polling mode)...');
|
|
1685
|
-
console.log('To create a Feishu bot:');
|
|
1686
|
-
console.log('1. Go to https://open.feishu.cn/app');
|
|
1687
|
-
console.log('2. Create a custom bot app');
|
|
1688
|
-
console.log('3. Enable Bot capability');
|
|
1689
|
-
console.log('4. Configure event subscriptions (Subscribe to "im.message.receive_v1" event)');
|
|
1690
|
-
console.log('5. Go to Permissions management and enable: im:message, im:message.p2p_msg:readonly, im:message:send_as_bot');
|
|
1691
|
-
console.log('6. Create a version and publish it');
|
|
1692
|
-
console.log('7. Copy App ID and App Secret\n');
|
|
1693
|
-
const { createInterface: createRl } = await import('node:readline');
|
|
1694
|
-
const feishuRl = createRl({
|
|
1695
|
-
input: process.stdin,
|
|
1696
|
-
output: process.stdout,
|
|
1697
|
-
});
|
|
1698
|
-
const appId = await new Promise((resolve) => {
|
|
1699
|
-
feishuRl.question('Enter App ID: ', (answer) => {
|
|
1700
|
-
resolve(answer.trim());
|
|
1701
|
-
});
|
|
1702
|
-
});
|
|
1703
|
-
const appSecret = await new Promise((resolve) => {
|
|
1704
|
-
feishuRl.question('Enter App Secret: ', (answer) => {
|
|
1705
|
-
resolve(answer.trim());
|
|
1706
|
-
});
|
|
1707
|
-
});
|
|
1708
|
-
feishuRl.close();
|
|
1709
|
-
if (!appId || !appSecret) {
|
|
1710
|
-
console.log('❌ App ID and App Secret are required');
|
|
1711
|
-
return;
|
|
1712
|
-
}
|
|
1713
|
-
config.feishu = {
|
|
1714
|
-
appId,
|
|
1715
|
-
appSecret
|
|
1716
|
-
};
|
|
1717
|
-
if (!config.messengers.includes('feishu')) {
|
|
1718
|
-
config.messengers.push('feishu');
|
|
1719
|
-
}
|
|
1720
|
-
console.log('✅ Feishu bot credentials saved');
|
|
1721
|
-
console.log(`\n✅ Using WebSocket long polling mode - no webhook configuration needed!`);
|
|
1722
|
-
console.log(` The bot will automatically connect to Feishu servers.`);
|
|
1723
|
-
break;
|
|
1724
|
-
}
|
|
1725
|
-
case 'discord': {
|
|
1726
|
-
console.log('📱 Configuring Discord adapter...');
|
|
1727
|
-
console.log('To create a Discord bot:');
|
|
1728
|
-
console.log('1. Go to https://discord.com/developers/applications');
|
|
1729
|
-
console.log('2. Click "New Application" and give it a name');
|
|
1730
|
-
console.log('3. Go to "Bot" tab and click "Add Bot"');
|
|
1731
|
-
console.log('4. IMPORTANT: Enable "MESSAGE CONTENT INTENT" under Privileged Gateway Intents');
|
|
1732
|
-
console.log('5. Click "Reset Token" to get your bot token');
|
|
1733
|
-
console.log('6. Use OAuth2 URL Generator to invite the bot to your server\n');
|
|
1734
|
-
const { createInterface: createDiscordRl } = await import('node:readline');
|
|
1735
|
-
const discordRl = createDiscordRl({
|
|
1736
|
-
input: process.stdin,
|
|
1737
|
-
output: process.stdout,
|
|
1738
|
-
});
|
|
1739
|
-
const discordToken = await new Promise((resolve) => {
|
|
1740
|
-
discordRl.question('Enter your bot token: ', (answer) => {
|
|
1741
|
-
resolve(answer.trim());
|
|
1742
|
-
});
|
|
1743
|
-
});
|
|
1744
|
-
if (!discordToken) {
|
|
1745
|
-
console.log('❌ Bot token is required');
|
|
1746
|
-
discordRl.close();
|
|
1747
|
-
return;
|
|
1748
|
-
}
|
|
1749
|
-
const discordChannelId = await new Promise((resolve) => {
|
|
1750
|
-
discordRl.question('Enter channel ID (optional, press Enter for default): ', (answer) => {
|
|
1751
|
-
resolve(answer.trim() || 'default');
|
|
1752
|
-
});
|
|
1753
|
-
});
|
|
1754
|
-
const allowedGuilds = await new Promise((resolve) => {
|
|
1755
|
-
discordRl.question('Allowed guild IDs (comma-separated, optional): ', (answer) => {
|
|
1756
|
-
resolve(answer.trim());
|
|
1757
|
-
});
|
|
1758
|
-
});
|
|
1759
|
-
const allowedChannels = await new Promise((resolve) => {
|
|
1760
|
-
discordRl.question('Allowed channel IDs (comma-separated, optional): ', (answer) => {
|
|
1761
|
-
resolve(answer.trim());
|
|
1762
|
-
});
|
|
1763
|
-
});
|
|
1764
|
-
discordRl.close();
|
|
1765
|
-
config.discord = {
|
|
1766
|
-
botToken: discordToken,
|
|
1767
|
-
channelId: discordChannelId,
|
|
1768
|
-
allowedGuilds: allowedGuilds ? allowedGuilds.split(',').map(s => s.trim()).filter(Boolean) : undefined,
|
|
1769
|
-
allowedChannels: allowedChannels ? allowedChannels.split(',').map(s => s.trim()).filter(Boolean) : undefined,
|
|
1770
|
-
};
|
|
1771
|
-
if (!config.messengers.includes('discord')) {
|
|
1772
|
-
config.messengers.push('discord');
|
|
1773
|
-
}
|
|
1774
|
-
console.log('✅ Discord bot token saved');
|
|
1775
|
-
console.log(` Channel ID: ${discordChannelId}`);
|
|
1776
|
-
if (config.discord.allowedGuilds?.length) {
|
|
1777
|
-
console.log(` Allowed guilds: ${config.discord.allowedGuilds.join(', ')}`);
|
|
1778
|
-
}
|
|
1779
|
-
if (config.discord.allowedChannels?.length) {
|
|
1780
|
-
console.log(` Allowed channels: ${config.discord.allowedChannels.join(', ')}`);
|
|
1781
|
-
}
|
|
1782
|
-
break;
|
|
1783
|
-
}
|
|
1784
|
-
case 'cursor': {
|
|
1785
|
-
console.log('🤖 Configuring Cursor agent...');
|
|
1786
|
-
const cursorAvailable = await new Promise((resolve) => {
|
|
1787
|
-
const proc = crossSpawn('cursor-agent', ['--version'], { stdio: 'ignore' });
|
|
1788
|
-
proc.on('error', () => resolve(false));
|
|
1789
|
-
proc.on('close', (code) => resolve(code === 0));
|
|
1790
|
-
});
|
|
1791
|
-
if (cursorAvailable) {
|
|
1792
|
-
console.log('✅ Cursor CLI found!');
|
|
1793
|
-
console.log('\nTo authenticate, run: cursor-agent login (OAuth) or set CURSOR_API_KEY');
|
|
1794
|
-
}
|
|
1795
|
-
else {
|
|
1796
|
-
console.log('❌ Cursor CLI not found.');
|
|
1797
|
-
console.log('Install with: curl https://cursor.com/install -fsS | bash');
|
|
1798
|
-
}
|
|
1799
|
-
if (!config.agents.includes('cursor')) {
|
|
1800
|
-
config.agents.push('cursor');
|
|
1801
|
-
}
|
|
1802
|
-
config.defaultAgent = 'cursor';
|
|
1803
|
-
break;
|
|
1804
|
-
}
|
|
1805
|
-
case 'opencode': {
|
|
1806
|
-
console.log('🤖 Configuring OpenCode agent...');
|
|
1807
|
-
// Check if opencode CLI is available
|
|
1808
|
-
const openCodeAvailable = await new Promise((resolve) => {
|
|
1809
|
-
const proc = crossSpawn('opencode', ['--version'], { stdio: 'ignore' });
|
|
1810
|
-
proc.on('error', () => resolve(false));
|
|
1811
|
-
proc.on('close', (code) => resolve(code === 0));
|
|
1812
|
-
});
|
|
1813
|
-
if (openCodeAvailable) {
|
|
1814
|
-
console.log('✅ OpenCode CLI found!');
|
|
1815
|
-
console.log('\nTo authenticate, run: opencode auth login');
|
|
1816
|
-
}
|
|
1817
|
-
else {
|
|
1818
|
-
console.log('❌ OpenCode CLI not found.');
|
|
1819
|
-
console.log('Install with: npm i -g opencode-ai@latest');
|
|
1820
|
-
console.log('Or visit: https://github.com/anomalyco/opencode');
|
|
1821
|
-
}
|
|
1822
|
-
if (!config.agents.includes('opencode')) {
|
|
1823
|
-
config.agents.push('opencode');
|
|
1824
|
-
}
|
|
1825
|
-
config.defaultAgent = 'opencode';
|
|
1826
|
-
break;
|
|
1827
|
-
}
|
|
1828
|
-
case 'agent': {
|
|
1829
|
-
console.log('🔌 Configuring remote ACP agent...');
|
|
1830
|
-
console.log('This adds a remote agent that speaks the Agent Communication Protocol.');
|
|
1831
|
-
console.log('ACP is an open standard (https://agentcommunicationprotocol.dev)\n');
|
|
1832
|
-
const { createInterface: createAgentRl } = await import('node:readline');
|
|
1833
|
-
const agentRl = createAgentRl({ input: process.stdin, output: process.stdout });
|
|
1834
|
-
const agentName = await new Promise((resolve) => {
|
|
1835
|
-
agentRl.question('Agent name (e.g. openclaw-dev): ', (answer) => resolve(answer.trim()));
|
|
1836
|
-
});
|
|
1837
|
-
if (!agentName) {
|
|
1838
|
-
console.log('❌ Name is required');
|
|
1839
|
-
agentRl.close();
|
|
1840
|
-
return;
|
|
1841
|
-
}
|
|
1842
|
-
const agentAlias = await new Promise((resolve) => {
|
|
1843
|
-
agentRl.question('Aliases, comma-separated (optional): ', (answer) => resolve(answer.trim()));
|
|
1844
|
-
});
|
|
1845
|
-
const endpoint = await new Promise((resolve) => {
|
|
1846
|
-
agentRl.question('ACP endpoint URL (e.g. http://localhost:8080): ', (answer) => resolve(answer.trim()));
|
|
1847
|
-
});
|
|
1848
|
-
if (!endpoint) {
|
|
1849
|
-
console.log('❌ Endpoint is required');
|
|
1850
|
-
agentRl.close();
|
|
1851
|
-
return;
|
|
1852
|
-
}
|
|
1853
|
-
console.log('\nAuthentication type:');
|
|
1854
|
-
console.log(' 1. none');
|
|
1855
|
-
console.log(' 2. apikey');
|
|
1856
|
-
console.log(' 3. bearer');
|
|
1857
|
-
const authTypeInput = await new Promise((resolve) => {
|
|
1858
|
-
agentRl.question('Choose (1-3, default: none): ', (answer) => resolve(answer.trim() || '1'));
|
|
1859
|
-
});
|
|
1860
|
-
const authTypeMap = { '1': 'none', '2': 'apikey', '3': 'bearer' };
|
|
1861
|
-
const authType = authTypeMap[authTypeInput] || 'none';
|
|
1862
|
-
let auth;
|
|
1863
|
-
if (authType !== 'none') {
|
|
1864
|
-
const token = await new Promise((resolve) => {
|
|
1865
|
-
agentRl.question('Auth token: ', (answer) => resolve(answer.trim()));
|
|
1866
|
-
});
|
|
1867
|
-
if (!token) {
|
|
1868
|
-
console.log('❌ Token is required when auth is enabled');
|
|
1869
|
-
agentRl.close();
|
|
1870
|
-
return;
|
|
1871
|
-
}
|
|
1872
|
-
auth = { type: authType, token };
|
|
1873
|
-
}
|
|
1874
|
-
agentRl.close();
|
|
1875
|
-
// Validate connection
|
|
1876
|
-
console.log('\n🔍 Testing connection...');
|
|
1877
|
-
const { ACPClient } = await import('./plugins/agents/acp/acp-client.js');
|
|
1878
|
-
const testClient = new ACPClient({ name: agentName, endpoint, auth });
|
|
1879
|
-
try {
|
|
1880
|
-
const manifest = await testClient.fetchManifest();
|
|
1881
|
-
console.log(`✅ Connected! Agent: ${manifest.name}`);
|
|
1882
|
-
if (manifest.description)
|
|
1883
|
-
console.log(` ${manifest.description}`);
|
|
1884
|
-
}
|
|
1885
|
-
catch (e) {
|
|
1886
|
-
const msg = e instanceof Error ? e.message : String(e);
|
|
1887
|
-
console.log(`⚠️ Connection failed: ${msg}`);
|
|
1888
|
-
console.log(' Agent will be saved but may not work until endpoint is available.');
|
|
1889
|
-
}
|
|
1890
|
-
// Save
|
|
1891
|
-
if (!config.acpAgents)
|
|
1892
|
-
config.acpAgents = [];
|
|
1893
|
-
const existing = config.acpAgents.findIndex(a => a.name === agentName);
|
|
1894
|
-
const agentConfig = {
|
|
1895
|
-
name: agentName,
|
|
1896
|
-
aliases: agentAlias?.split(',').map(s => s.trim()).filter(Boolean) || [],
|
|
1897
|
-
endpoint,
|
|
1898
|
-
auth,
|
|
1899
|
-
enabled: true
|
|
1900
|
-
};
|
|
1901
|
-
if (existing >= 0) {
|
|
1902
|
-
config.acpAgents[existing] = agentConfig;
|
|
1903
|
-
}
|
|
1904
|
-
else {
|
|
1905
|
-
config.acpAgents.push(agentConfig);
|
|
1906
|
-
}
|
|
1907
|
-
break;
|
|
1908
|
-
}
|
|
1909
|
-
default:
|
|
1910
|
-
console.log(`Unknown component: ${component}`);
|
|
1911
|
-
console.log('Run "agim config" to see available components.');
|
|
1912
|
-
process.exitCode = 1;
|
|
1913
|
-
return;
|
|
1588
|
+
const section = sectionForConfigComponent(component);
|
|
1589
|
+
if (!section) {
|
|
1590
|
+
console.log(cliT(lang, 'config.shortcut.unknown', { component }));
|
|
1591
|
+
process.exitCode = 1;
|
|
1592
|
+
return;
|
|
1914
1593
|
}
|
|
1915
|
-
await
|
|
1916
|
-
|
|
1594
|
+
await runConfigWizard(lang, {
|
|
1595
|
+
initialSection: section,
|
|
1596
|
+
initialOnly: true,
|
|
1597
|
+
shortcutLabel: component,
|
|
1598
|
+
});
|
|
1599
|
+
return;
|
|
1917
1600
|
});
|
|
1918
1601
|
program
|
|
1919
1602
|
.command('tui')
|
|
1920
|
-
.description('Open the terminal chat UI
|
|
1603
|
+
.description('Open the terminal chat UI for local agent conversations')
|
|
1921
1604
|
.option('-a, --agent <name>', 'Pre-select an agent by name (e.g. claude-code, codex, native)')
|
|
1922
1605
|
.option('-r, --resume [id]', 'Resume a saved session by id; "last" or empty picks the most recent')
|
|
1923
1606
|
.option('--list-sessions', 'Print saved TUI sessions (latest first) and exit')
|
|
@@ -1928,7 +1611,29 @@ program
|
|
|
1928
1611
|
await runTui({ agent: opts.agent, resume, listSessions: opts.listSessions });
|
|
1929
1612
|
});
|
|
1930
1613
|
program
|
|
1931
|
-
.command('
|
|
1614
|
+
.command('go')
|
|
1615
|
+
.description('First run: configure one agent, start Web, then continue in `agim web`')
|
|
1616
|
+
.action(async () => {
|
|
1617
|
+
const { runQuickstart } = await import('./cli-ui/quickstart.js');
|
|
1618
|
+
await runQuickstart();
|
|
1619
|
+
});
|
|
1620
|
+
program.addCommand(program.createCommand('quickstart')
|
|
1621
|
+
.description('Compatibility alias for `agim go`')
|
|
1622
|
+
.action(async () => {
|
|
1623
|
+
const { runQuickstart } = await import('./cli-ui/quickstart.js');
|
|
1624
|
+
await runQuickstart();
|
|
1625
|
+
}), { hidden: true });
|
|
1626
|
+
program
|
|
1627
|
+
.command('doctor')
|
|
1628
|
+
.description('Run a local readiness check and suggest the next command')
|
|
1629
|
+
.action(async () => {
|
|
1630
|
+
const { runDoctor } = await import('./cli-ui/doctor.js');
|
|
1631
|
+
const code = await runDoctor();
|
|
1632
|
+
if (code !== 0)
|
|
1633
|
+
process.exit(code);
|
|
1634
|
+
});
|
|
1635
|
+
program
|
|
1636
|
+
.command('agents', { hidden: true })
|
|
1932
1637
|
.description('List available agents')
|
|
1933
1638
|
.action(async () => {
|
|
1934
1639
|
await registry.loadBuiltInPlugins();
|
|
@@ -1971,7 +1676,7 @@ program
|
|
|
1971
1676
|
}
|
|
1972
1677
|
});
|
|
1973
1678
|
program
|
|
1974
|
-
.command('messengers')
|
|
1679
|
+
.command('messengers', { hidden: true })
|
|
1975
1680
|
.description('List available messengers')
|
|
1976
1681
|
.action(async () => {
|
|
1977
1682
|
await registry.loadBuiltInPlugins();
|
|
@@ -1994,7 +1699,7 @@ program
|
|
|
1994
1699
|
// agim diag mcp
|
|
1995
1700
|
const setupCmd = program
|
|
1996
1701
|
.command('setup')
|
|
1997
|
-
.description('
|
|
1702
|
+
.description('Advanced setup helpers for LLM backends and MCP servers');
|
|
1998
1703
|
setupCmd
|
|
1999
1704
|
.command('llm [args...]')
|
|
2000
1705
|
.description('Manage Agim Agent model API backends')
|
|
@@ -2015,7 +1720,7 @@ setupCmd
|
|
|
2015
1720
|
});
|
|
2016
1721
|
const diagCmd = program
|
|
2017
1722
|
.command('diag')
|
|
2018
|
-
.description('
|
|
1723
|
+
.description('Advanced diagnostics for configured LLM/MCP backends');
|
|
2019
1724
|
diagCmd
|
|
2020
1725
|
.command('llm')
|
|
2021
1726
|
.description('Diagnose configured LLM backends')
|
|
@@ -2038,7 +1743,7 @@ diagCmd
|
|
|
2038
1743
|
// status / restart / stop / uninstall — all delegate to cli-ui/cmd-handlers.ts.
|
|
2039
1744
|
program
|
|
2040
1745
|
.command('status')
|
|
2041
|
-
.description('Show whether
|
|
1746
|
+
.description('Show whether Agim is running and where the Web console is')
|
|
2042
1747
|
.action(async () => {
|
|
2043
1748
|
const { cmdStatus } = await import('./cli-ui/cmd-handlers.js');
|
|
2044
1749
|
cmdStatus();
|
|
@@ -2158,7 +1863,7 @@ tokenCmd
|
|
|
2158
1863
|
process.exit(1);
|
|
2159
1864
|
});
|
|
2160
1865
|
// ─── IM admin registry helpers (v2 model) ────────────────────────────
|
|
2161
|
-
const adminCmd = program.command('admin').description('Inspect IM admin assignments');
|
|
1866
|
+
const adminCmd = program.command('admin', { hidden: true }).description('Inspect IM admin assignments');
|
|
2162
1867
|
adminCmd
|
|
2163
1868
|
.command('list')
|
|
2164
1869
|
.description('List current IM admins')
|
|
@@ -2197,38 +1902,21 @@ adminCmd
|
|
|
2197
1902
|
// hint to use IM `/web` instead.
|
|
2198
1903
|
program
|
|
2199
1904
|
.command('web')
|
|
2200
|
-
.description('
|
|
2201
|
-
.
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
const url = getEffectivePublicBaseUrl();
|
|
2216
|
-
if (url) {
|
|
2217
|
-
const source = cfg.publicBaseUrl ? 'AGIM_VIEWER_PUBLIC_BASE_URL' : 'cloudflared tunnel';
|
|
2218
|
-
console.log(url);
|
|
2219
|
-
console.log(`(来源: ${source})`);
|
|
2220
|
-
return;
|
|
2221
|
-
}
|
|
2222
|
-
if (cfg.tunnelMode === 'quick') {
|
|
2223
|
-
console.log('Web 后台地址当前由 cloudflared 临时隧道提供,但本进程查不到隧道 URL。');
|
|
2224
|
-
console.log('请在 IM 内发送 /web 让运行中的 daemon 返回最新地址。');
|
|
2225
|
-
process.exit(2);
|
|
2226
|
-
}
|
|
2227
|
-
console.log('Web 后台地址未配置。');
|
|
2228
|
-
console.log('设置以下任一项后重启服务:');
|
|
2229
|
-
console.log(' AGIM_VIEWER_PUBLIC_BASE_URL=https://your-domain (反代 / 自定义域名)');
|
|
2230
|
-
console.log(' AGIM_VIEWER_TUNNEL_MODE=quick (cloudflared 临时隧道)');
|
|
2231
|
-
process.exit(2);
|
|
1905
|
+
.description('Show the web console URL, service state, and login hint')
|
|
1906
|
+
.option('--public', 'Print the public/reverse-proxy URL only')
|
|
1907
|
+
.option('--welcome', 'Append the first-run welcome flag to the local URL')
|
|
1908
|
+
.option('--open', 'Open the Web console in the default browser')
|
|
1909
|
+
.option('--start', 'Start Agim in the background first when it is not running')
|
|
1910
|
+
.action(async (opts) => {
|
|
1911
|
+
const { cmdWeb } = await import('./cli-ui/cmd-handlers.js');
|
|
1912
|
+
const code = await cmdWeb({
|
|
1913
|
+
public: opts.public,
|
|
1914
|
+
welcome: opts.welcome,
|
|
1915
|
+
open: opts.open,
|
|
1916
|
+
start: opts.start,
|
|
1917
|
+
});
|
|
1918
|
+
if (code !== 0)
|
|
1919
|
+
process.exit(code);
|
|
2232
1920
|
});
|
|
2233
1921
|
// ─── bare `agim` → entry menu (v0.5.0+) ─────────────────────────────
|
|
2234
1922
|
// If the user invoked us with no args (just `agim`), drop them at
|
|
@@ -2244,14 +1932,29 @@ async function maybeRunEntryMenu() {
|
|
|
2244
1932
|
if (!process.stdin.isTTY)
|
|
2245
1933
|
return false; // piped / non-interactive — fall back to commander's help
|
|
2246
1934
|
const { runEntryMenu } = await import('./cli-ui/entry-menu.js');
|
|
2247
|
-
const { cmdStatus, cmdStart, cmdStop, cmdRestart, cmdUninstall } = await import('./cli-ui/cmd-handlers.js');
|
|
1935
|
+
const { cmdStatus, cmdStart, cmdStop, cmdRestart, cmdUninstall, cmdWeb } = await import('./cli-ui/cmd-handlers.js');
|
|
2248
1936
|
const { action, lang } = await runEntryMenu();
|
|
2249
1937
|
switch (action.kind) {
|
|
2250
1938
|
case 'quit':
|
|
2251
1939
|
return true;
|
|
1940
|
+
case 'quickstart': {
|
|
1941
|
+
const { runQuickstart } = await import('./cli-ui/quickstart.js');
|
|
1942
|
+
await runQuickstart(lang);
|
|
1943
|
+
return true;
|
|
1944
|
+
}
|
|
1945
|
+
case 'doctor': {
|
|
1946
|
+
const { runDoctor } = await import('./cli-ui/doctor.js');
|
|
1947
|
+
const code = await runDoctor();
|
|
1948
|
+
if (code !== 0)
|
|
1949
|
+
process.exitCode = code;
|
|
1950
|
+
return true;
|
|
1951
|
+
}
|
|
2252
1952
|
case 'status':
|
|
2253
1953
|
cmdStatus();
|
|
2254
1954
|
return true;
|
|
1955
|
+
case 'web':
|
|
1956
|
+
await cmdWeb({ welcome: true, start: true, open: true });
|
|
1957
|
+
return true;
|
|
2255
1958
|
case 'config': {
|
|
2256
1959
|
// Reuse the lang the user just picked in runEntryMenu — re-prompting
|
|
2257
1960
|
// here was a v0.5.1 regression (user reported: "已经选过语言不要再问").
|