@namzu/cli 36.1.2 → 36.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/bin.js +1 -1
- package/dist/chunks/{acp-QXCMYZW7.js → acp-P22WRX3A.js} +102 -34
- package/dist/chunks/{acp-QXCMYZW7.js.map → acp-P22WRX3A.js.map} +1 -1
- package/dist/chunks/{activity-command-HK7YJTXV.js → activity-command-OK463NV4.js} +10 -10
- package/dist/chunks/{add-UYIKY4OE.js → add-ML53TFN2.js} +16 -16
- package/dist/chunks/{agent-Y2WYEXWC.js → agent-3ST7Q6HZ.js} +24 -22
- package/dist/chunks/agent-session-C2HDOXK4.js +46 -0
- package/dist/chunks/{archive-C4A3HPLF.js → archive-WV2NBOHR.js} +8 -8
- package/dist/chunks/{bin-main-VQKMQICY.js → bin-main-FPJQMK33.js} +3 -3
- package/dist/chunks/{browser-CRX4HM4C.js → browser-JRWZ3PYX.js} +6 -6
- package/dist/chunks/{chat-5MWPKAET.js → chat-3IJFKDSN.js} +13 -13
- package/dist/chunks/{chunk-RC6X3ZY6.js → chunk-22P25PLK.js} +186 -7
- package/dist/chunks/chunk-22P25PLK.js.map +6 -0
- package/dist/chunks/{chunk-O7DBCVNY.js → chunk-27VZRJTG.js} +2 -2
- package/dist/chunks/{chunk-HBBB2CAC.js → chunk-2VXA7GZU.js} +2 -2
- package/dist/chunks/{chunk-NQY5P2EB.js → chunk-3OZ2OBGU.js} +2 -2
- package/dist/chunks/{chunk-NROIHI6L.js → chunk-43FBWINL.js} +5 -5
- package/dist/chunks/{chunk-N5IF64K3.js → chunk-53EZXXT4.js} +6 -6
- package/dist/chunks/{chunk-7WJOQ6EA.js → chunk-5GARJ3CK.js} +2 -2
- package/dist/chunks/{chunk-MJMDPZ6G.js → chunk-7OEK2NAO.js} +19 -9
- package/dist/chunks/chunk-7OEK2NAO.js.map +6 -0
- package/dist/chunks/{chunk-ZKEWE6K4.js → chunk-7WQV2FSF.js} +3 -3
- package/dist/chunks/{chunk-HV4LJFNV.js → chunk-AABPCENY.js} +4 -4
- package/dist/chunks/{chunk-TIGWWAJI.js → chunk-ABD2DOO2.js} +4 -4
- package/dist/chunks/{chunk-5GRV6P5C.js → chunk-AGHVC2IJ.js} +2 -2
- package/dist/chunks/{chunk-YTESW44T.js → chunk-AL6ESCHD.js} +12 -12
- package/dist/chunks/{chunk-SRU3MDHZ.js → chunk-AVIW5JJF.js} +2 -2
- package/dist/chunks/{chunk-YXLD46UI.js → chunk-CFN7CUD3.js} +13 -13
- package/dist/chunks/{chunk-EIYM6TY7.js → chunk-CXLSM5SH.js} +4 -4
- package/dist/chunks/{chunk-Q5YM2GCX.js → chunk-DYBUCWAB.js} +3 -3
- package/dist/chunks/{chunk-V7TQR6AR.js → chunk-EOO5AKO4.js} +6 -6
- package/dist/chunks/{chunk-UOOQPODR.js → chunk-G5XTLTDR.js} +3 -3
- package/dist/chunks/{chunk-CG65NUSJ.js → chunk-GFSD2D3M.js} +2 -2
- package/dist/chunks/{chunk-HQM2WSQT.js → chunk-GPBUDMUF.js} +2 -2
- package/dist/chunks/{chunk-AIY4PCDR.js → chunk-GWOW3U2S.js} +4 -4
- package/dist/chunks/{chunk-TJJUB7VQ.js → chunk-H7VJHF5S.js} +609 -37
- package/dist/chunks/chunk-H7VJHF5S.js.map +6 -0
- package/dist/chunks/{chunk-FXS3AG6B.js → chunk-HIZ7F6BT.js} +4 -4
- package/dist/chunks/{chunk-4BZMQ2VD.js → chunk-HJ42RG5U.js} +4 -4
- package/dist/chunks/{chunk-UWWGSDZ5.js → chunk-HQZSTYKY.js} +3 -3
- package/dist/chunks/{chunk-WATMFOHB.js → chunk-KNNQHRZ4.js} +6 -6
- package/dist/chunks/{chunk-UDBEU2FR.js → chunk-KQOIPRZ5.js} +2 -2
- package/dist/chunks/{chunk-PYG7DZ2D.js → chunk-L6FMG3R6.js} +3 -3
- package/dist/chunks/{chunk-AN7FO7NS.js → chunk-LIZPXS73.js} +2 -2
- package/dist/chunks/{chunk-TWMKJ6BE.js → chunk-MBGQS5YA.js} +4 -4
- package/dist/chunks/{chunk-YMKYJ4DI.js → chunk-NKEOCU52.js} +7 -7
- package/dist/chunks/{chunk-OLPOM3DR.js → chunk-NRML7BIR.js} +4 -4
- package/dist/chunks/{chunk-JELVHU7X.js → chunk-OS7IVIYH.js} +20 -3
- package/dist/chunks/{chunk-JELVHU7X.js.map → chunk-OS7IVIYH.js.map} +1 -1
- package/dist/chunks/{chunk-JPPC4LJF.js → chunk-PJ3UYK2K.js} +3 -3
- package/dist/chunks/{chunk-GMCOZ3CU.js → chunk-PT7TZNBV.js} +4 -4
- package/dist/chunks/{chunk-Q24K7536.js → chunk-QQLB573I.js} +2 -2
- package/dist/chunks/{chunk-2NJ2XUXJ.js → chunk-RPAHIOW6.js} +3 -3
- package/dist/chunks/{chunk-TLTJ2KTW.js → chunk-S7E42272.js} +2 -2
- package/dist/chunks/{chunk-K76WV7TN.js → chunk-U5AWHJ7O.js} +2 -2
- package/dist/chunks/{chunk-IJH7J5NJ.js → chunk-VHKKPDL2.js} +3 -3
- package/dist/chunks/{chunk-J72CRUNX.js → chunk-VSUHR44P.js} +2 -2
- package/dist/chunks/{chunk-C5WBEO3X.js → chunk-WNMRETWS.js} +2 -2
- package/dist/chunks/{chunk-A5UXODFL.js → chunk-WW4VKEBD.js} +2 -2
- package/dist/chunks/{chunk-HFJHHCTY.js → chunk-X2YRM3UE.js} +3 -3
- package/dist/chunks/{chunk-3P5PF6XE.js → chunk-XAKL7C7B.js} +2 -2
- package/dist/chunks/{chunk-L2T4O6S3.js → chunk-YEFJAE2B.js} +34 -26
- package/dist/chunks/{chunk-L2T4O6S3.js.map → chunk-YEFJAE2B.js.map} +1 -1
- package/dist/chunks/{chunk-X2FWNSZ7.js → chunk-YLIKDPD6.js} +9 -9
- package/dist/chunks/{chunk-LQMHASKR.js → chunk-YTJO7G24.js} +3 -3
- package/dist/chunks/{chunk-WM2JEUGV.js → chunk-YZ675PG4.js} +2 -2
- package/dist/chunks/{chunk-EWKJGHRO.js → chunk-ZKTLXAQK.js} +3 -1
- package/dist/chunks/{chunk-AXIGFKJF.js → chunk-ZNAH4EGP.js} +2 -2
- package/dist/chunks/{chunk-KU3W6IHV.js → chunk-ZXWJ6G3J.js} +2 -2
- package/dist/chunks/{chunk-7Z7CAVIN.js → chunk-ZZ6Z2DO6.js} +12 -10
- package/dist/chunks/{chunk-7Z7CAVIN.js.map → chunk-ZZ6Z2DO6.js.map} +1 -1
- package/dist/chunks/{cli-runtime-FXV35STX.js → cli-runtime-CQKITOHY.js} +8 -8
- package/dist/chunks/{commands-QPVRB3RK.js → commands-UEPVSG33.js} +5 -5
- package/dist/chunks/{crash-report-S3BTEPYR.js → crash-report-3GQ3SJML.js} +6 -6
- package/dist/chunks/{dist-G42HPNIE.js → dist-AMYVT2VT.js} +2 -2
- package/dist/chunks/{dist-3GJFRS2X.js → dist-FFMNE5LK.js} +2 -2
- package/dist/chunks/{dist-EY3OJBQH.js → dist-IPJVDPA3.js} +2 -2
- package/dist/chunks/{dist-LVG2TYZT.js → dist-Q37IZHCW.js} +2 -2
- package/dist/chunks/{dist-SKRHHPUR.js → dist-SCEJQJFY.js} +2 -2
- package/dist/chunks/{dist-ERN5DRKK.js → dist-VJ2UQYSX.js} +2 -2
- package/dist/chunks/{dist-BFC7XUCT.js → dist-YDFJ4YOH.js} +2 -2
- package/dist/chunks/{doctor-KMTPPEWG.js → doctor-YWK25HGQ.js} +6 -6
- package/dist/chunks/{drain-PL5VSYUQ.js → drain-5R73B66Y.js} +11 -10
- package/dist/chunks/{drain-PL5VSYUQ.js.map → drain-5R73B66Y.js.map} +1 -1
- package/dist/chunks/{eval-53UONRWR.js → eval-GYPUHRIK.js} +2 -2
- package/dist/chunks/{exec-5ZXTX5XC.js → exec-AHAC6YBQ.js} +25 -22
- package/dist/chunks/exec-AHAC6YBQ.js.map +6 -0
- package/dist/chunks/{home-QS7RBP34.js → home-GI6TRZAN.js} +3 -3
- package/dist/chunks/{host-queries-A55WPD4R.js → host-queries-MN57UTDU.js} +13 -13
- package/dist/chunks/{lifecycle-VR36VUPC.js → lifecycle-7LD634AQ.js} +23 -23
- package/dist/chunks/{list-DQZU7NEF.js → list-DSHTQRTP.js} +12 -12
- package/dist/chunks/{login-6OFDFHD6.js → login-R5P2OAXZ.js} +8 -8
- package/dist/chunks/{logs-KSG7SFAB.js → logs-SGPSXLBY.js} +4 -4
- package/dist/chunks/{mcp-CHPFRT2Y.js → mcp-MC6B34XH.js} +15 -15
- package/dist/chunks/{message-command-AJFVZ5EY.js → message-command-4MV2SVHP.js} +29 -29
- package/dist/chunks/{operator-tools-LTPV3CH5.js → operator-tools-GI63VOXH.js} +11 -11
- package/dist/chunks/{output-schema-UM3P5AOR.js → output-schema-74VSN66J.js} +3 -3
- package/dist/chunks/{pal-CWO3HUXQ.js → pal-BWPYGQ4B.js} +11 -11
- package/dist/chunks/{providers-7P5CTPHT.js → providers-YV45XVWS.js} +6 -6
- package/dist/chunks/{resident-3K7SI2UP.js → resident-OC2D5V5I.js} +18 -18
- package/dist/chunks/{resume-command-XZWGUXRK.js → resume-command-DZBKOABY.js} +4 -4
- package/dist/chunks/{schedule-GKM3RRIU.js → schedule-GUD625PJ.js} +8 -8
- package/dist/chunks/{service-CIWTUMRI.js → service-67FZ3N75.js} +22 -22
- package/dist/chunks/session-step-YNMU75FQ.js +26 -0
- package/dist/chunks/{skills-HV2MOBEW.js → skills-DNNEKEOH.js} +8 -8
- package/dist/chunks/{state-6HV3D3O4.js → state-K7MMFNZC.js} +2 -2
- package/dist/chunks/{store-GDP2EW27.js → store-2PDDGKYZ.js} +6 -6
- package/dist/chunks/{store-VXNKMMNW.js → store-KYMOKW6X.js} +4 -4
- package/dist/chunks/{store-6J2MUGON.js → store-NIBJFQOT.js} +8 -8
- package/dist/chunks/{tui-ZURFLJQB.js → tui-UY3ZLTMX.js} +138 -53
- package/dist/chunks/tui-UY3ZLTMX.js.map +6 -0
- package/dist/chunks/{upgrade-MC5JB7DK.js → upgrade-2NO7NPPM.js} +2 -2
- package/dist/chunks/{worktree-6YPRX6SU.js → worktree-ADQJ4AJ5.js} +10 -10
- package/dist/cli.d.ts.map +1 -1
- package/dist/commands/acp-harness.d.ts.map +1 -1
- package/dist/commands/acp.d.ts +6 -0
- package/dist/commands/acp.d.ts.map +1 -1
- package/dist/commands/desktop-host.d.ts +3 -0
- package/dist/commands/desktop-host.d.ts.map +1 -1
- package/dist/commands/drain.d.ts.map +1 -1
- package/dist/commands/exec-json.d.ts.map +1 -1
- package/dist/commands/exec.d.ts.map +1 -1
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/schema.d.ts +83 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/integrations/decision/model.d.ts +26 -0
- package/dist/integrations/decision/model.d.ts.map +1 -0
- package/dist/integrations/decision/routing.d.ts +75 -0
- package/dist/integrations/decision/routing.d.ts.map +1 -0
- package/dist/integrations/resident/runner-worker.js +16 -16
- package/dist/integrations/resident/session-step.d.ts.map +1 -1
- package/dist/pals/agent-session.d.ts.map +1 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/Picker.d.ts +11 -1
- package/dist/tui/Picker.d.ts.map +1 -1
- package/dist/tui/agent.d.ts +23 -1
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/model-choices.d.ts +20 -0
- package/dist/tui/model-choices.d.ts.map +1 -1
- package/dist/tui/model-selection-intent.d.ts +25 -0
- package/dist/tui/model-selection-intent.d.ts.map +1 -1
- package/dist/tui/types.d.ts +14 -1
- package/dist/tui/types.d.ts.map +1 -1
- package/package.json +6 -5
- package/dist/chunks/agent-session-UNUZAMRW.js +0 -46
- package/dist/chunks/chunk-MJMDPZ6G.js.map +0 -6
- package/dist/chunks/chunk-RC6X3ZY6.js.map +0 -6
- package/dist/chunks/chunk-TJJUB7VQ.js.map +0 -6
- package/dist/chunks/exec-5ZXTX5XC.js.map +0 -6
- package/dist/chunks/session-step-XATOSLSM.js +0 -26
- package/dist/chunks/tui-ZURFLJQB.js.map +0 -6
- /package/dist/chunks/{activity-command-HK7YJTXV.js.map → activity-command-OK463NV4.js.map} +0 -0
- /package/dist/chunks/{add-UYIKY4OE.js.map → add-ML53TFN2.js.map} +0 -0
- /package/dist/chunks/{agent-Y2WYEXWC.js.map → agent-3ST7Q6HZ.js.map} +0 -0
- /package/dist/chunks/{agent-session-UNUZAMRW.js.map → agent-session-C2HDOXK4.js.map} +0 -0
- /package/dist/chunks/{archive-C4A3HPLF.js.map → archive-WV2NBOHR.js.map} +0 -0
- /package/dist/chunks/{bin-main-VQKMQICY.js.map → bin-main-FPJQMK33.js.map} +0 -0
- /package/dist/chunks/{browser-CRX4HM4C.js.map → browser-JRWZ3PYX.js.map} +0 -0
- /package/dist/chunks/{chat-5MWPKAET.js.map → chat-3IJFKDSN.js.map} +0 -0
- /package/dist/chunks/{chunk-O7DBCVNY.js.map → chunk-27VZRJTG.js.map} +0 -0
- /package/dist/chunks/{chunk-HBBB2CAC.js.map → chunk-2VXA7GZU.js.map} +0 -0
- /package/dist/chunks/{chunk-NQY5P2EB.js.map → chunk-3OZ2OBGU.js.map} +0 -0
- /package/dist/chunks/{chunk-NROIHI6L.js.map → chunk-43FBWINL.js.map} +0 -0
- /package/dist/chunks/{chunk-N5IF64K3.js.map → chunk-53EZXXT4.js.map} +0 -0
- /package/dist/chunks/{chunk-7WJOQ6EA.js.map → chunk-5GARJ3CK.js.map} +0 -0
- /package/dist/chunks/{chunk-ZKEWE6K4.js.map → chunk-7WQV2FSF.js.map} +0 -0
- /package/dist/chunks/{chunk-HV4LJFNV.js.map → chunk-AABPCENY.js.map} +0 -0
- /package/dist/chunks/{chunk-TIGWWAJI.js.map → chunk-ABD2DOO2.js.map} +0 -0
- /package/dist/chunks/{chunk-5GRV6P5C.js.map → chunk-AGHVC2IJ.js.map} +0 -0
- /package/dist/chunks/{chunk-YTESW44T.js.map → chunk-AL6ESCHD.js.map} +0 -0
- /package/dist/chunks/{chunk-SRU3MDHZ.js.map → chunk-AVIW5JJF.js.map} +0 -0
- /package/dist/chunks/{chunk-YXLD46UI.js.map → chunk-CFN7CUD3.js.map} +0 -0
- /package/dist/chunks/{chunk-EIYM6TY7.js.map → chunk-CXLSM5SH.js.map} +0 -0
- /package/dist/chunks/{chunk-Q5YM2GCX.js.map → chunk-DYBUCWAB.js.map} +0 -0
- /package/dist/chunks/{chunk-V7TQR6AR.js.map → chunk-EOO5AKO4.js.map} +0 -0
- /package/dist/chunks/{chunk-UOOQPODR.js.map → chunk-G5XTLTDR.js.map} +0 -0
- /package/dist/chunks/{chunk-CG65NUSJ.js.map → chunk-GFSD2D3M.js.map} +0 -0
- /package/dist/chunks/{chunk-HQM2WSQT.js.map → chunk-GPBUDMUF.js.map} +0 -0
- /package/dist/chunks/{chunk-AIY4PCDR.js.map → chunk-GWOW3U2S.js.map} +0 -0
- /package/dist/chunks/{chunk-FXS3AG6B.js.map → chunk-HIZ7F6BT.js.map} +0 -0
- /package/dist/chunks/{chunk-4BZMQ2VD.js.map → chunk-HJ42RG5U.js.map} +0 -0
- /package/dist/chunks/{chunk-UWWGSDZ5.js.map → chunk-HQZSTYKY.js.map} +0 -0
- /package/dist/chunks/{chunk-WATMFOHB.js.map → chunk-KNNQHRZ4.js.map} +0 -0
- /package/dist/chunks/{chunk-UDBEU2FR.js.map → chunk-KQOIPRZ5.js.map} +0 -0
- /package/dist/chunks/{chunk-PYG7DZ2D.js.map → chunk-L6FMG3R6.js.map} +0 -0
- /package/dist/chunks/{chunk-AN7FO7NS.js.map → chunk-LIZPXS73.js.map} +0 -0
- /package/dist/chunks/{chunk-TWMKJ6BE.js.map → chunk-MBGQS5YA.js.map} +0 -0
- /package/dist/chunks/{chunk-YMKYJ4DI.js.map → chunk-NKEOCU52.js.map} +0 -0
- /package/dist/chunks/{chunk-OLPOM3DR.js.map → chunk-NRML7BIR.js.map} +0 -0
- /package/dist/chunks/{chunk-JPPC4LJF.js.map → chunk-PJ3UYK2K.js.map} +0 -0
- /package/dist/chunks/{chunk-GMCOZ3CU.js.map → chunk-PT7TZNBV.js.map} +0 -0
- /package/dist/chunks/{chunk-Q24K7536.js.map → chunk-QQLB573I.js.map} +0 -0
- /package/dist/chunks/{chunk-2NJ2XUXJ.js.map → chunk-RPAHIOW6.js.map} +0 -0
- /package/dist/chunks/{chunk-TLTJ2KTW.js.map → chunk-S7E42272.js.map} +0 -0
- /package/dist/chunks/{chunk-K76WV7TN.js.map → chunk-U5AWHJ7O.js.map} +0 -0
- /package/dist/chunks/{chunk-IJH7J5NJ.js.map → chunk-VHKKPDL2.js.map} +0 -0
- /package/dist/chunks/{chunk-J72CRUNX.js.map → chunk-VSUHR44P.js.map} +0 -0
- /package/dist/chunks/{chunk-C5WBEO3X.js.map → chunk-WNMRETWS.js.map} +0 -0
- /package/dist/chunks/{chunk-A5UXODFL.js.map → chunk-WW4VKEBD.js.map} +0 -0
- /package/dist/chunks/{chunk-HFJHHCTY.js.map → chunk-X2YRM3UE.js.map} +0 -0
- /package/dist/chunks/{chunk-3P5PF6XE.js.map → chunk-XAKL7C7B.js.map} +0 -0
- /package/dist/chunks/{chunk-X2FWNSZ7.js.map → chunk-YLIKDPD6.js.map} +0 -0
- /package/dist/chunks/{chunk-LQMHASKR.js.map → chunk-YTJO7G24.js.map} +0 -0
- /package/dist/chunks/{chunk-WM2JEUGV.js.map → chunk-YZ675PG4.js.map} +0 -0
- /package/dist/chunks/{chunk-EWKJGHRO.js.map → chunk-ZKTLXAQK.js.map} +0 -0
- /package/dist/chunks/{chunk-AXIGFKJF.js.map → chunk-ZNAH4EGP.js.map} +0 -0
- /package/dist/chunks/{chunk-KU3W6IHV.js.map → chunk-ZXWJ6G3J.js.map} +0 -0
- /package/dist/chunks/{cli-runtime-FXV35STX.js.map → cli-runtime-CQKITOHY.js.map} +0 -0
- /package/dist/chunks/{commands-QPVRB3RK.js.map → commands-UEPVSG33.js.map} +0 -0
- /package/dist/chunks/{crash-report-S3BTEPYR.js.map → crash-report-3GQ3SJML.js.map} +0 -0
- /package/dist/chunks/{dist-G42HPNIE.js.map → dist-AMYVT2VT.js.map} +0 -0
- /package/dist/chunks/{dist-3GJFRS2X.js.map → dist-FFMNE5LK.js.map} +0 -0
- /package/dist/chunks/{dist-EY3OJBQH.js.map → dist-IPJVDPA3.js.map} +0 -0
- /package/dist/chunks/{dist-LVG2TYZT.js.map → dist-Q37IZHCW.js.map} +0 -0
- /package/dist/chunks/{dist-SKRHHPUR.js.map → dist-SCEJQJFY.js.map} +0 -0
- /package/dist/chunks/{dist-ERN5DRKK.js.map → dist-VJ2UQYSX.js.map} +0 -0
- /package/dist/chunks/{dist-BFC7XUCT.js.map → dist-YDFJ4YOH.js.map} +0 -0
- /package/dist/chunks/{doctor-KMTPPEWG.js.map → doctor-YWK25HGQ.js.map} +0 -0
- /package/dist/chunks/{eval-53UONRWR.js.map → eval-GYPUHRIK.js.map} +0 -0
- /package/dist/chunks/{home-QS7RBP34.js.map → home-GI6TRZAN.js.map} +0 -0
- /package/dist/chunks/{host-queries-A55WPD4R.js.map → host-queries-MN57UTDU.js.map} +0 -0
- /package/dist/chunks/{lifecycle-VR36VUPC.js.map → lifecycle-7LD634AQ.js.map} +0 -0
- /package/dist/chunks/{list-DQZU7NEF.js.map → list-DSHTQRTP.js.map} +0 -0
- /package/dist/chunks/{login-6OFDFHD6.js.map → login-R5P2OAXZ.js.map} +0 -0
- /package/dist/chunks/{logs-KSG7SFAB.js.map → logs-SGPSXLBY.js.map} +0 -0
- /package/dist/chunks/{mcp-CHPFRT2Y.js.map → mcp-MC6B34XH.js.map} +0 -0
- /package/dist/chunks/{message-command-AJFVZ5EY.js.map → message-command-4MV2SVHP.js.map} +0 -0
- /package/dist/chunks/{operator-tools-LTPV3CH5.js.map → operator-tools-GI63VOXH.js.map} +0 -0
- /package/dist/chunks/{output-schema-UM3P5AOR.js.map → output-schema-74VSN66J.js.map} +0 -0
- /package/dist/chunks/{pal-CWO3HUXQ.js.map → pal-BWPYGQ4B.js.map} +0 -0
- /package/dist/chunks/{providers-7P5CTPHT.js.map → providers-YV45XVWS.js.map} +0 -0
- /package/dist/chunks/{resident-3K7SI2UP.js.map → resident-OC2D5V5I.js.map} +0 -0
- /package/dist/chunks/{resume-command-XZWGUXRK.js.map → resume-command-DZBKOABY.js.map} +0 -0
- /package/dist/chunks/{schedule-GKM3RRIU.js.map → schedule-GUD625PJ.js.map} +0 -0
- /package/dist/chunks/{service-CIWTUMRI.js.map → service-67FZ3N75.js.map} +0 -0
- /package/dist/chunks/{session-step-XATOSLSM.js.map → session-step-YNMU75FQ.js.map} +0 -0
- /package/dist/chunks/{skills-HV2MOBEW.js.map → skills-DNNEKEOH.js.map} +0 -0
- /package/dist/chunks/{state-6HV3D3O4.js.map → state-K7MMFNZC.js.map} +0 -0
- /package/dist/chunks/{store-6J2MUGON.js.map → store-2PDDGKYZ.js.map} +0 -0
- /package/dist/chunks/{store-GDP2EW27.js.map → store-KYMOKW6X.js.map} +0 -0
- /package/dist/chunks/{store-VXNKMMNW.js.map → store-NIBJFQOT.js.map} +0 -0
- /package/dist/chunks/{upgrade-MC5JB7DK.js.map → upgrade-2NO7NPPM.js.map} +0 -0
- /package/dist/chunks/{worktree-6YPRX6SU.js.map → worktree-ADQJ4AJ5.js.map} +0 -0
|
@@ -2,24 +2,24 @@ import { createRequire as __namzuCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __namzuCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
openManagedWorktrees
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PT7TZNBV.js";
|
|
6
6
|
import {
|
|
7
7
|
createBrowserControl
|
|
8
8
|
} from "./chunk-WHODOMXA.js";
|
|
9
9
|
import {
|
|
10
10
|
connectMcpServers
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HIZ7F6BT.js";
|
|
12
12
|
import {
|
|
13
13
|
createSessionSkillCatalog
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YTJO7G24.js";
|
|
15
15
|
import {
|
|
16
16
|
SAVE_SKILL_TOOL_NAME,
|
|
17
17
|
readStoredTurnGuards,
|
|
18
18
|
resolveTurnGuards
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-L6FMG3R6.js";
|
|
20
20
|
import {
|
|
21
21
|
openInBrowser
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-XAKL7C7B.js";
|
|
23
23
|
import {
|
|
24
24
|
CredentialRefreshRejectedError,
|
|
25
25
|
CredentialWithdrawnError,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
ensureFreshStoredCodexCredential,
|
|
28
28
|
readSubscriptionCredential,
|
|
29
29
|
sameOAuthCredential
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-HJ42RG5U.js";
|
|
31
31
|
import {
|
|
32
32
|
debugRequested
|
|
33
33
|
} from "./chunk-GNBMKISG.js";
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
configuredPassthroughTools,
|
|
36
36
|
resolveToolResultScreens,
|
|
37
37
|
unmatchedPassthroughTools
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-U5AWHJ7O.js";
|
|
39
39
|
import {
|
|
40
40
|
formatSize,
|
|
41
41
|
homePath,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
requiresCredentialForModel,
|
|
64
64
|
resolveChainCapabilities,
|
|
65
65
|
unresolvedMembers
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-CFN7CUD3.js";
|
|
67
67
|
import {
|
|
68
68
|
PROVIDER_REGISTRY,
|
|
69
69
|
missingCredentialMessage,
|
|
@@ -71,11 +71,11 @@ import {
|
|
|
71
71
|
} from "./chunk-6LLJQ3KY.js";
|
|
72
72
|
import {
|
|
73
73
|
cliLogger
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-2VXA7GZU.js";
|
|
75
75
|
import {
|
|
76
76
|
isPermissionMode,
|
|
77
77
|
permissionModeLabel
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-AGHVC2IJ.js";
|
|
79
79
|
import {
|
|
80
80
|
probeCapabilities
|
|
81
81
|
} from "./chunk-OH6TB27S.js";
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
import {
|
|
87
87
|
conversationLogPath,
|
|
88
88
|
ensureSessionStarted
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-ABD2DOO2.js";
|
|
90
90
|
import {
|
|
91
91
|
INSTRUCTIONS_FILENAME,
|
|
92
92
|
MAX_CHARS_PER_FILE,
|
|
@@ -96,13 +96,13 @@ import {
|
|
|
96
96
|
} from "./chunk-H6B6AROX.js";
|
|
97
97
|
import {
|
|
98
98
|
ensurePrivateStateDirectory
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-WW4VKEBD.js";
|
|
100
100
|
import {
|
|
101
101
|
restrictToOwner
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-QQLB573I.js";
|
|
103
103
|
import {
|
|
104
104
|
namzuHomePath
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-3OZ2OBGU.js";
|
|
106
106
|
import {
|
|
107
107
|
AgentManager,
|
|
108
108
|
AgentRegistry,
|
|
@@ -111,6 +111,7 @@ import {
|
|
|
111
111
|
CODING_AGENT_DELEGATION_DOCTRINE,
|
|
112
112
|
CODING_AGENT_HYPERMODE_DOCTRINE,
|
|
113
113
|
CODING_AGENT_WORKING_DOCTRINE,
|
|
114
|
+
COMPUTER_USE_TOOL_NAME,
|
|
114
115
|
CompletionInbox,
|
|
115
116
|
DefaultCapacityValidator,
|
|
116
117
|
DiskMemoryStore,
|
|
@@ -190,6 +191,7 @@ import {
|
|
|
190
191
|
discoverAgentDefinitions,
|
|
191
192
|
discoverAllPluginDirs,
|
|
192
193
|
ensureProject,
|
|
194
|
+
external_exports,
|
|
193
195
|
filtered,
|
|
194
196
|
generateSessionId,
|
|
195
197
|
generateSummaryId,
|
|
@@ -230,7 +232,7 @@ import {
|
|
|
230
232
|
webGuidanceContribution,
|
|
231
233
|
withProviderFallback,
|
|
232
234
|
wrapUntrusted
|
|
233
|
-
} from "./chunk-
|
|
235
|
+
} from "./chunk-ZKTLXAQK.js";
|
|
234
236
|
import {
|
|
235
237
|
__name
|
|
236
238
|
} from "./chunk-76FLAFCG.js";
|
|
@@ -2626,6 +2628,499 @@ function composeTurnSnapshot(snapshot) {
|
|
|
2626
2628
|
}
|
|
2627
2629
|
__name(composeTurnSnapshot, "composeTurnSnapshot");
|
|
2628
2630
|
|
|
2631
|
+
// ../decision/dist/contract.js
|
|
2632
|
+
var DecisionError = class extends Error {
|
|
2633
|
+
static {
|
|
2634
|
+
__name(this, "DecisionError");
|
|
2635
|
+
}
|
|
2636
|
+
status;
|
|
2637
|
+
code;
|
|
2638
|
+
constructor(message2, status, code) {
|
|
2639
|
+
super(message2);
|
|
2640
|
+
this.status = status;
|
|
2641
|
+
this.code = code;
|
|
2642
|
+
this.name = "DecisionError";
|
|
2643
|
+
}
|
|
2644
|
+
};
|
|
2645
|
+
|
|
2646
|
+
// ../decision/dist/drivers/wire.js
|
|
2647
|
+
function isRecord(v) {
|
|
2648
|
+
return typeof v === "object" && v !== null && !Array.isArray(v);
|
|
2649
|
+
}
|
|
2650
|
+
__name(isRecord, "isRecord");
|
|
2651
|
+
function numberRecord(v) {
|
|
2652
|
+
const out = {};
|
|
2653
|
+
if (isRecord(v)) {
|
|
2654
|
+
for (const [k, val] of Object.entries(v))
|
|
2655
|
+
if (typeof val === "number")
|
|
2656
|
+
out[k] = val;
|
|
2657
|
+
}
|
|
2658
|
+
return out;
|
|
2659
|
+
}
|
|
2660
|
+
__name(numberRecord, "numberRecord");
|
|
2661
|
+
async function postDecision(post) {
|
|
2662
|
+
const res = await post.fetch(post.url, {
|
|
2663
|
+
method: "POST",
|
|
2664
|
+
headers: { "Content-Type": "application/json", ...post.headers },
|
|
2665
|
+
body: JSON.stringify(post.body),
|
|
2666
|
+
signal: post.signal
|
|
2667
|
+
});
|
|
2668
|
+
let json;
|
|
2669
|
+
try {
|
|
2670
|
+
json = await res.json();
|
|
2671
|
+
} catch {
|
|
2672
|
+
json = void 0;
|
|
2673
|
+
}
|
|
2674
|
+
if (!res.ok) {
|
|
2675
|
+
const err = isRecord(json) && isRecord(json.error) ? json.error : {};
|
|
2676
|
+
throw new DecisionError(typeof err.message === "string" ? err.message : `Decision request failed (${res.status})`, res.status, typeof err.code === "string" ? err.code : void 0);
|
|
2677
|
+
}
|
|
2678
|
+
const answers = isRecord(json) ? json.answers : void 0;
|
|
2679
|
+
return isRecord(answers) ? answers.q : void 0;
|
|
2680
|
+
}
|
|
2681
|
+
__name(postDecision, "postDecision");
|
|
2682
|
+
function yesnoQuestion(instructions) {
|
|
2683
|
+
return { type: "noul", instructions };
|
|
2684
|
+
}
|
|
2685
|
+
__name(yesnoQuestion, "yesnoQuestion");
|
|
2686
|
+
function choiceQuestion(instructions, options) {
|
|
2687
|
+
return { type: "choice", instructions, options: [...options] };
|
|
2688
|
+
}
|
|
2689
|
+
__name(choiceQuestion, "choiceQuestion");
|
|
2690
|
+
function scoreQuestion(instructions, levels2) {
|
|
2691
|
+
return { type: "score", instructions, levels: [...levels2] };
|
|
2692
|
+
}
|
|
2693
|
+
__name(scoreQuestion, "scoreQuestion");
|
|
2694
|
+
function parseYesNo(answer) {
|
|
2695
|
+
const noul = isRecord(answer) ? answer.noul : void 0;
|
|
2696
|
+
if (typeof noul !== "number") {
|
|
2697
|
+
throw new DecisionError('Decision response carried no "noul" probability');
|
|
2698
|
+
}
|
|
2699
|
+
return { p: noul };
|
|
2700
|
+
}
|
|
2701
|
+
__name(parseYesNo, "parseYesNo");
|
|
2702
|
+
function parseChoice(answer) {
|
|
2703
|
+
const body = isRecord(answer) && isRecord(answer.choice) ? answer.choice : answer;
|
|
2704
|
+
const probabilities = numberRecord(isRecord(body) ? body.probabilities : void 0);
|
|
2705
|
+
let option = isRecord(body) ? body.option : void 0;
|
|
2706
|
+
if (typeof option !== "string") {
|
|
2707
|
+
option = Object.entries(probabilities).sort((a, b) => b[1] - a[1])[0]?.[0];
|
|
2708
|
+
}
|
|
2709
|
+
if (typeof option !== "string") {
|
|
2710
|
+
throw new DecisionError('Decision response carried no "choice" answer');
|
|
2711
|
+
}
|
|
2712
|
+
return { option, probabilities };
|
|
2713
|
+
}
|
|
2714
|
+
__name(parseChoice, "parseChoice");
|
|
2715
|
+
function parseScore(answer) {
|
|
2716
|
+
const body = isRecord(answer) && isRecord(answer.score) ? answer.score : answer;
|
|
2717
|
+
const raw = isRecord(body) ? body : {};
|
|
2718
|
+
const probabilities = Array.isArray(raw.probabilities) ? raw.probabilities.filter((x) => typeof x === "number") : [];
|
|
2719
|
+
let level = raw.level;
|
|
2720
|
+
if (typeof level !== "number") {
|
|
2721
|
+
let best = -1;
|
|
2722
|
+
probabilities.forEach((p, i) => {
|
|
2723
|
+
if (best < 0 || p > (probabilities[best] ?? 0))
|
|
2724
|
+
best = i;
|
|
2725
|
+
});
|
|
2726
|
+
level = best >= 0 ? best : void 0;
|
|
2727
|
+
}
|
|
2728
|
+
if (typeof level !== "number") {
|
|
2729
|
+
throw new DecisionError('Decision response carried no "score" answer');
|
|
2730
|
+
}
|
|
2731
|
+
return { level, probabilities };
|
|
2732
|
+
}
|
|
2733
|
+
__name(parseScore, "parseScore");
|
|
2734
|
+
|
|
2735
|
+
// ../decision/dist/drivers/azure-foundry.js
|
|
2736
|
+
var AzureFoundryDecisionModel = class {
|
|
2737
|
+
static {
|
|
2738
|
+
__name(this, "AzureFoundryDecisionModel");
|
|
2739
|
+
}
|
|
2740
|
+
config;
|
|
2741
|
+
constructor(config) {
|
|
2742
|
+
this.config = config;
|
|
2743
|
+
}
|
|
2744
|
+
async yesno(state, instructions, opts) {
|
|
2745
|
+
return parseYesNo(await this.ask(state, yesnoQuestion(instructions), opts));
|
|
2746
|
+
}
|
|
2747
|
+
async choice(state, instructions, options, opts) {
|
|
2748
|
+
return parseChoice(await this.ask(state, choiceQuestion(instructions, options), opts));
|
|
2749
|
+
}
|
|
2750
|
+
async score(state, instructions, levels2, opts) {
|
|
2751
|
+
return parseScore(await this.ask(state, scoreQuestion(instructions, levels2), opts));
|
|
2752
|
+
}
|
|
2753
|
+
async ask(state, question, opts) {
|
|
2754
|
+
const token = await this.config.getToken();
|
|
2755
|
+
return postDecision({
|
|
2756
|
+
url: `${this.config.endpoint.replace(/\/$/, "")}/providers/microsoft/v1/systemone`,
|
|
2757
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
2758
|
+
body: { model: this.config.deployment, state, questions: { q: question } },
|
|
2759
|
+
fetch: this.config.fetch ?? globalThis.fetch,
|
|
2760
|
+
...opts?.signal ? { signal: opts.signal } : {}
|
|
2761
|
+
});
|
|
2762
|
+
}
|
|
2763
|
+
};
|
|
2764
|
+
|
|
2765
|
+
// ../decision/dist/drivers/http.js
|
|
2766
|
+
var HttpDecisionModel = class {
|
|
2767
|
+
static {
|
|
2768
|
+
__name(this, "HttpDecisionModel");
|
|
2769
|
+
}
|
|
2770
|
+
config;
|
|
2771
|
+
constructor(config) {
|
|
2772
|
+
this.config = config;
|
|
2773
|
+
}
|
|
2774
|
+
async yesno(state, instructions, opts) {
|
|
2775
|
+
return parseYesNo(await this.ask(state, yesnoQuestion(instructions), opts));
|
|
2776
|
+
}
|
|
2777
|
+
async choice(state, instructions, options, opts) {
|
|
2778
|
+
return parseChoice(await this.ask(state, choiceQuestion(instructions, options), opts));
|
|
2779
|
+
}
|
|
2780
|
+
async score(state, instructions, levels2, opts) {
|
|
2781
|
+
return parseScore(await this.ask(state, scoreQuestion(instructions, levels2), opts));
|
|
2782
|
+
}
|
|
2783
|
+
async ask(state, question, opts) {
|
|
2784
|
+
return postDecision({
|
|
2785
|
+
url: this.config.url,
|
|
2786
|
+
headers: {
|
|
2787
|
+
...this.config.apiKey ? { Authorization: `Bearer ${this.config.apiKey}` } : {},
|
|
2788
|
+
...this.config.headers
|
|
2789
|
+
},
|
|
2790
|
+
body: {
|
|
2791
|
+
...this.config.model ? { model: this.config.model } : {},
|
|
2792
|
+
state,
|
|
2793
|
+
questions: { q: question }
|
|
2794
|
+
},
|
|
2795
|
+
fetch: this.config.fetch ?? globalThis.fetch,
|
|
2796
|
+
...opts?.signal ? { signal: opts.signal } : {}
|
|
2797
|
+
});
|
|
2798
|
+
}
|
|
2799
|
+
};
|
|
2800
|
+
|
|
2801
|
+
// ../decision/dist/create.js
|
|
2802
|
+
function createDecisionModel(config) {
|
|
2803
|
+
switch (config.provider) {
|
|
2804
|
+
case "azure":
|
|
2805
|
+
return new AzureFoundryDecisionModel({
|
|
2806
|
+
endpoint: config.endpoint,
|
|
2807
|
+
deployment: config.deployment,
|
|
2808
|
+
getToken: config.getToken,
|
|
2809
|
+
...config.fetch ? { fetch: config.fetch } : {}
|
|
2810
|
+
});
|
|
2811
|
+
case "http":
|
|
2812
|
+
return new HttpDecisionModel({
|
|
2813
|
+
url: config.url,
|
|
2814
|
+
...config.model ? { model: config.model } : {},
|
|
2815
|
+
...config.apiKey ? { apiKey: config.apiKey } : {},
|
|
2816
|
+
...config.headers ? { headers: config.headers } : {},
|
|
2817
|
+
...config.fetch ? { fetch: config.fetch } : {}
|
|
2818
|
+
});
|
|
2819
|
+
default: {
|
|
2820
|
+
const unknown = config;
|
|
2821
|
+
throw new Error(`Unknown decision provider: ${JSON.stringify(unknown.provider)}`);
|
|
2822
|
+
}
|
|
2823
|
+
}
|
|
2824
|
+
}
|
|
2825
|
+
__name(createDecisionModel, "createDecisionModel");
|
|
2826
|
+
|
|
2827
|
+
// ../decision/dist/tool.js
|
|
2828
|
+
var DECIDE_TOOL_NAME = "decide";
|
|
2829
|
+
var inputSchema3 = external_exports.object({
|
|
2830
|
+
kind: external_exports.enum(["yesno", "choice", "score"]).describe("yesno = probability a statement is true; choice = pick one of `options`; score = pick one of ordered `levels`."),
|
|
2831
|
+
context: external_exports.string().describe("The situation to judge: the state, the evidence, whatever the decision turns on."),
|
|
2832
|
+
question: external_exports.string().describe("What to decide, phrased for the chosen kind (a yes/no claim, a pick instruction, a scoring rubric)."),
|
|
2833
|
+
options: external_exports.array(external_exports.string()).optional().describe('kind="choice" only: the options to pick exactly one of (2 or more).'),
|
|
2834
|
+
levels: external_exports.array(external_exports.string()).optional().describe('kind="score" only: the ordered levels, lowest first (2 or more).')
|
|
2835
|
+
});
|
|
2836
|
+
function round(n) {
|
|
2837
|
+
return n.toFixed(4);
|
|
2838
|
+
}
|
|
2839
|
+
__name(round, "round");
|
|
2840
|
+
function distribution(probabilities) {
|
|
2841
|
+
return Object.entries(probabilities).sort((a, b) => b[1] - a[1]).map(([k, v]) => `${k}=${round(v)}`).join(", ");
|
|
2842
|
+
}
|
|
2843
|
+
__name(distribution, "distribution");
|
|
2844
|
+
var ADVISORY = "This is a fast, advisory System-1 judgment \u2014 you remain responsible for hard constraints; weigh low-confidence results with your own reasoning.";
|
|
2845
|
+
function createDecisionTool(model, options = {}) {
|
|
2846
|
+
return defineTool({
|
|
2847
|
+
name: options.name ?? DECIDE_TOOL_NAME,
|
|
2848
|
+
description: "Ask a fast System-1 decision model for a typed judgment: a yes/no probability, a choice among options, or a score across ordered levels. Optional and advisory \u2014 reach for it when a quick, well-scoped classification, routing, safety pre-screen, element pick or ranking would help, then act on your own reasoning. If the model is unavailable the tool says so and you simply proceed.",
|
|
2849
|
+
inputSchema: inputSchema3,
|
|
2850
|
+
category: "analysis",
|
|
2851
|
+
permissions: [],
|
|
2852
|
+
readOnly: true,
|
|
2853
|
+
destructive: false,
|
|
2854
|
+
concurrencySafe: true,
|
|
2855
|
+
async execute(input, context) {
|
|
2856
|
+
const opts = context.abortSignal ? { signal: context.abortSignal } : void 0;
|
|
2857
|
+
try {
|
|
2858
|
+
if (input.kind === "yesno") {
|
|
2859
|
+
const { p } = await model.yesno(input.context, input.question, opts);
|
|
2860
|
+
return {
|
|
2861
|
+
success: true,
|
|
2862
|
+
output: `P(true) = ${round(p)}. ${ADVISORY}`,
|
|
2863
|
+
data: { kind: "yesno", p }
|
|
2864
|
+
};
|
|
2865
|
+
}
|
|
2866
|
+
if (input.kind === "choice") {
|
|
2867
|
+
const choices = input.options ?? [];
|
|
2868
|
+
if (choices.length < 2) {
|
|
2869
|
+
return {
|
|
2870
|
+
success: true,
|
|
2871
|
+
output: "decide(choice) needs 2 or more `options`. None judged \u2014 decide with your own reasoning."
|
|
2872
|
+
};
|
|
2873
|
+
}
|
|
2874
|
+
const { option, probabilities: probabilities2 } = await model.choice(input.context, input.question, choices, opts);
|
|
2875
|
+
return {
|
|
2876
|
+
success: true,
|
|
2877
|
+
output: `Pick: ${option} (${distribution(probabilities2)}). ${ADVISORY}`,
|
|
2878
|
+
data: { kind: "choice", option, probabilities: probabilities2 }
|
|
2879
|
+
};
|
|
2880
|
+
}
|
|
2881
|
+
const levels2 = input.levels ?? [];
|
|
2882
|
+
if (levels2.length < 2) {
|
|
2883
|
+
return {
|
|
2884
|
+
success: true,
|
|
2885
|
+
output: "decide(score) needs 2 or more `levels`. None judged \u2014 decide with your own reasoning."
|
|
2886
|
+
};
|
|
2887
|
+
}
|
|
2888
|
+
const { level, probabilities } = await model.score(input.context, input.question, levels2, opts);
|
|
2889
|
+
const name = levels2[level] ?? `level ${level}`;
|
|
2890
|
+
return {
|
|
2891
|
+
success: true,
|
|
2892
|
+
output: `Score: ${name} (index ${level}) [${probabilities.map(round).join(", ")}]. ${ADVISORY}`,
|
|
2893
|
+
data: { kind: "score", level, name, probabilities }
|
|
2894
|
+
};
|
|
2895
|
+
} catch (error) {
|
|
2896
|
+
const why = error instanceof DecisionError ? error.message : String(error);
|
|
2897
|
+
return {
|
|
2898
|
+
success: true,
|
|
2899
|
+
output: `The decision model is unavailable (${why}). Decide using your own reasoning; this tool is advisory only.`,
|
|
2900
|
+
data: { kind: "unavailable", reason: why }
|
|
2901
|
+
};
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
});
|
|
2905
|
+
}
|
|
2906
|
+
__name(createDecisionTool, "createDecisionTool");
|
|
2907
|
+
|
|
2908
|
+
// src/integrations/decision/model.ts
|
|
2909
|
+
function buildDecisionProviderConfig(cfg, env) {
|
|
2910
|
+
if (cfg.provider === "azure") {
|
|
2911
|
+
return {
|
|
2912
|
+
provider: "azure",
|
|
2913
|
+
endpoint: cfg.endpoint,
|
|
2914
|
+
deployment: cfg.deployment,
|
|
2915
|
+
getToken: /* @__PURE__ */ __name(async () => env[cfg.tokenEnv ?? "AZURE_FOUNDRY_TOKEN"] ?? "", "getToken")
|
|
2916
|
+
};
|
|
2917
|
+
}
|
|
2918
|
+
return {
|
|
2919
|
+
provider: "http",
|
|
2920
|
+
url: cfg.url,
|
|
2921
|
+
...cfg.model !== void 0 ? { model: cfg.model } : {},
|
|
2922
|
+
...cfg.apiKeyEnv ? { apiKey: env[cfg.apiKeyEnv] } : {}
|
|
2923
|
+
};
|
|
2924
|
+
}
|
|
2925
|
+
__name(buildDecisionProviderConfig, "buildDecisionProviderConfig");
|
|
2926
|
+
function maybeCreateDecisionTool(cfg, env) {
|
|
2927
|
+
if (!cfg) return void 0;
|
|
2928
|
+
return createDecisionTool(createDecisionModel(buildDecisionProviderConfig(cfg, env)));
|
|
2929
|
+
}
|
|
2930
|
+
__name(maybeCreateDecisionTool, "maybeCreateDecisionTool");
|
|
2931
|
+
function maybeCreateDecisionModel(cfg, env) {
|
|
2932
|
+
if (!cfg) return void 0;
|
|
2933
|
+
return createDecisionModel(buildDecisionProviderConfig(cfg, env));
|
|
2934
|
+
}
|
|
2935
|
+
__name(maybeCreateDecisionModel, "maybeCreateDecisionModel");
|
|
2936
|
+
|
|
2937
|
+
// src/integrations/decision/routing.ts
|
|
2938
|
+
var DEFAULT_ROUTING_TIMEOUT_MS = 1500;
|
|
2939
|
+
var DEFAULT_ROUTING_THRESHOLD = 0.7;
|
|
2940
|
+
var ROUTING_TASK_CHARS = 1500;
|
|
2941
|
+
var FAST_MAX_CONVERSATION = 40;
|
|
2942
|
+
var ROUTING_FAST_QUESTION = "Is this task simple enough for a small, fast model to complete correctly? Answer yes only for short chat, a lookup, or a single small step.";
|
|
2943
|
+
var ROUTING_BIG_QUESTION = "Does this task need deep multi-step reasoning or large-scale code changes across many files?";
|
|
2944
|
+
var ROUTING_SCORE_LEVELS = [
|
|
2945
|
+
"trivial: chat, lookup, or one step",
|
|
2946
|
+
"small: a single-file or single-tool task",
|
|
2947
|
+
"medium: multi-step work across several files",
|
|
2948
|
+
"large: open-ended, architectural, or long-horizon work"
|
|
2949
|
+
];
|
|
2950
|
+
function truncate(task) {
|
|
2951
|
+
return task.length > ROUTING_TASK_CHARS ? task.slice(0, ROUTING_TASK_CHARS) : task;
|
|
2952
|
+
}
|
|
2953
|
+
__name(truncate, "truncate");
|
|
2954
|
+
function describeState(task, features) {
|
|
2955
|
+
const facts = [];
|
|
2956
|
+
if (features?.attachmentCount) facts.push(`attachments: ${features.attachmentCount}`);
|
|
2957
|
+
if (features?.usesComputerUse) facts.push("drives the desktop");
|
|
2958
|
+
if (features?.usesPal) facts.push("runs in a Pal");
|
|
2959
|
+
if (features?.conversationLength) facts.push(`messages so far: ${features.conversationLength}`);
|
|
2960
|
+
if (features?.voice) facts.push("spoken");
|
|
2961
|
+
return facts.length > 0 ? `${truncate(task)}
|
|
2962
|
+
|
|
2963
|
+
[${facts.join("; ")}]` : truncate(task);
|
|
2964
|
+
}
|
|
2965
|
+
__name(describeState, "describeState");
|
|
2966
|
+
function probability(value) {
|
|
2967
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0 || value > 1) {
|
|
2968
|
+
throw new RangeError("malformed probability");
|
|
2969
|
+
}
|
|
2970
|
+
return value;
|
|
2971
|
+
}
|
|
2972
|
+
__name(probability, "probability");
|
|
2973
|
+
function massAtOrBelow(probabilities, last) {
|
|
2974
|
+
const total = probabilities.reduce((sum, p) => sum + p, 0);
|
|
2975
|
+
if (!(total > 0)) throw new RangeError("malformed probabilities");
|
|
2976
|
+
return probabilities.slice(0, last + 1).reduce((sum, p) => sum + p, 0) / total;
|
|
2977
|
+
}
|
|
2978
|
+
__name(massAtOrBelow, "massAtOrBelow");
|
|
2979
|
+
var RouteInterrupted = class extends Error {
|
|
2980
|
+
constructor(reason) {
|
|
2981
|
+
super(reason);
|
|
2982
|
+
this.reason = reason;
|
|
2983
|
+
}
|
|
2984
|
+
reason;
|
|
2985
|
+
static {
|
|
2986
|
+
__name(this, "RouteInterrupted");
|
|
2987
|
+
}
|
|
2988
|
+
};
|
|
2989
|
+
async function withinBudget(run2, timeoutMs, outer) {
|
|
2990
|
+
const controller = new AbortController();
|
|
2991
|
+
let timer;
|
|
2992
|
+
let onOuterAbort;
|
|
2993
|
+
const interrupted = new Promise((_, reject) => {
|
|
2994
|
+
timer = setTimeout(() => {
|
|
2995
|
+
controller.abort();
|
|
2996
|
+
reject(new RouteInterrupted("timeout"));
|
|
2997
|
+
}, timeoutMs);
|
|
2998
|
+
onOuterAbort = /* @__PURE__ */ __name(() => {
|
|
2999
|
+
controller.abort();
|
|
3000
|
+
reject(new RouteInterrupted("aborted"));
|
|
3001
|
+
}, "onOuterAbort");
|
|
3002
|
+
if (outer?.aborted) onOuterAbort();
|
|
3003
|
+
else outer?.addEventListener("abort", onOuterAbort, { once: true });
|
|
3004
|
+
});
|
|
3005
|
+
try {
|
|
3006
|
+
return await Promise.race([run2(controller.signal), interrupted]);
|
|
3007
|
+
} finally {
|
|
3008
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
3009
|
+
if (onOuterAbort) outer?.removeEventListener("abort", onOuterAbort);
|
|
3010
|
+
}
|
|
3011
|
+
}
|
|
3012
|
+
__name(withinBudget, "withinBudget");
|
|
3013
|
+
async function askOnce(call, signal) {
|
|
3014
|
+
try {
|
|
3015
|
+
return await call(signal);
|
|
3016
|
+
} catch (err) {
|
|
3017
|
+
if (signal.aborted) throw err;
|
|
3018
|
+
return await call(signal);
|
|
3019
|
+
}
|
|
3020
|
+
}
|
|
3021
|
+
__name(askOnce, "askOnce");
|
|
3022
|
+
async function routeModel(input, deps = {}) {
|
|
3023
|
+
const now = deps.now ?? Date.now;
|
|
3024
|
+
const started = now();
|
|
3025
|
+
const { config } = input;
|
|
3026
|
+
const result = /* @__PURE__ */ __name((tier, target, confidence, reason, error) => {
|
|
3027
|
+
const routed = {
|
|
3028
|
+
tier,
|
|
3029
|
+
provider: target.provider,
|
|
3030
|
+
model: target.model,
|
|
3031
|
+
confidence,
|
|
3032
|
+
reason
|
|
3033
|
+
};
|
|
3034
|
+
try {
|
|
3035
|
+
deps.logger?.debug("auto model routed", {
|
|
3036
|
+
"namzu.routing.tier": tier,
|
|
3037
|
+
"namzu.routing.reason": reason,
|
|
3038
|
+
"namzu.routing.confidence": confidence,
|
|
3039
|
+
"namzu.routing.duration_ms": Math.max(0, now() - started),
|
|
3040
|
+
"gen_ai.request.model": target.model,
|
|
3041
|
+
"namzu.provider.id": target.provider,
|
|
3042
|
+
// The class of what made it fall back, never its message: that can carry an endpoint.
|
|
3043
|
+
...error instanceof Error ? { "error.type": error.name } : {}
|
|
3044
|
+
});
|
|
3045
|
+
} catch {
|
|
3046
|
+
}
|
|
3047
|
+
return routed;
|
|
3048
|
+
}, "result");
|
|
3049
|
+
const fallback = /* @__PURE__ */ __name((reason, error) => result("default", config.default, 0, reason, error), "fallback");
|
|
3050
|
+
try {
|
|
3051
|
+
if (input.pin) return result("default", input.pin, 1, "pinned");
|
|
3052
|
+
const usable = /* @__PURE__ */ __name((target) => target && (deps.isAvailable?.(target) ?? true) ? target : void 0, "usable");
|
|
3053
|
+
const features = input.features;
|
|
3054
|
+
const failedOn = features?.previousTurnFailedOnTier;
|
|
3055
|
+
const big = usable(config.tiers?.big);
|
|
3056
|
+
const fastBarred = features?.usesComputerUse === true || features?.usesPal === true || (features?.attachmentCount ?? 0) > 0 || (features?.conversationLength ?? 0) > FAST_MAX_CONVERSATION || failedOn === "fast" || failedOn === "default";
|
|
3057
|
+
const fast = fastBarred ? void 0 : usable(config.tiers?.fast);
|
|
3058
|
+
if (failedOn === "fast") return result("default", config.default, 1, "escalated-after-failure");
|
|
3059
|
+
if (failedOn === "default") {
|
|
3060
|
+
return big ? result("big", big, 1, "escalated-after-failure") : fallback("failed-no-bigger-tier");
|
|
3061
|
+
}
|
|
3062
|
+
if (!fast && !big) return fallback(fastBarred ? "fast-tier-barred" : "no-tier-available");
|
|
3063
|
+
if (!deps.model) return fallback("no-decision-model");
|
|
3064
|
+
const model = deps.model;
|
|
3065
|
+
const timeoutMs = config.timeoutMs ?? DEFAULT_ROUTING_TIMEOUT_MS;
|
|
3066
|
+
const fastThreshold = config.thresholds?.fast ?? DEFAULT_ROUTING_THRESHOLD;
|
|
3067
|
+
const bigThreshold = config.thresholds?.big ?? DEFAULT_ROUTING_THRESHOLD;
|
|
3068
|
+
const state = describeState(input.task, features);
|
|
3069
|
+
let pFast;
|
|
3070
|
+
let pBig;
|
|
3071
|
+
if (config.strategy === "score") {
|
|
3072
|
+
const decision = await withinBudget(
|
|
3073
|
+
(signal) => askOnce(
|
|
3074
|
+
(inner) => model.score(state, "", ROUTING_SCORE_LEVELS, { signal: inner }),
|
|
3075
|
+
signal
|
|
3076
|
+
),
|
|
3077
|
+
timeoutMs,
|
|
3078
|
+
input.signal
|
|
3079
|
+
);
|
|
3080
|
+
const { probabilities } = decision;
|
|
3081
|
+
if (!Array.isArray(probabilities) || probabilities.length !== ROUTING_SCORE_LEVELS.length) {
|
|
3082
|
+
throw new RangeError("malformed probabilities");
|
|
3083
|
+
}
|
|
3084
|
+
for (const p of probabilities) probability(p);
|
|
3085
|
+
if (fast) pFast = massAtOrBelow(probabilities, 1);
|
|
3086
|
+
if (big) pBig = 1 - massAtOrBelow(probabilities, 2);
|
|
3087
|
+
} else {
|
|
3088
|
+
const [fastDecision, bigDecision] = await withinBudget(
|
|
3089
|
+
(signal) => Promise.all([
|
|
3090
|
+
fast ? askOnce(
|
|
3091
|
+
(inner) => model.yesno(state, ROUTING_FAST_QUESTION, { signal: inner }),
|
|
3092
|
+
signal
|
|
3093
|
+
) : Promise.resolve(void 0),
|
|
3094
|
+
big ? askOnce(
|
|
3095
|
+
(inner) => model.yesno(state, ROUTING_BIG_QUESTION, { signal: inner }),
|
|
3096
|
+
signal
|
|
3097
|
+
) : Promise.resolve(void 0)
|
|
3098
|
+
]),
|
|
3099
|
+
timeoutMs,
|
|
3100
|
+
input.signal
|
|
3101
|
+
);
|
|
3102
|
+
if (fastDecision) pFast = probability(fastDecision.p);
|
|
3103
|
+
if (bigDecision) pBig = probability(bigDecision.p);
|
|
3104
|
+
}
|
|
3105
|
+
const wantsFast = fast !== void 0 && pFast !== void 0 && pFast >= fastThreshold;
|
|
3106
|
+
const wantsBig = big !== void 0 && pBig !== void 0 && pBig >= bigThreshold;
|
|
3107
|
+
if (wantsFast && wantsBig) return fallback("contradictory-decision");
|
|
3108
|
+
if (wantsFast && fast) return result("fast", fast, pFast ?? 0, "simple-task");
|
|
3109
|
+
if (wantsBig && big) return result("big", big, pBig ?? 0, "demanding-task");
|
|
3110
|
+
const leaning = Math.max(pFast ?? 0, pBig ?? 0);
|
|
3111
|
+
return result("default", config.default, Math.max(0, 1 - leaning), "ordinary-task");
|
|
3112
|
+
} catch (err) {
|
|
3113
|
+
if (err instanceof RouteInterrupted) return fallback(err.reason);
|
|
3114
|
+
if (err instanceof RangeError) return fallback("malformed-decision", err);
|
|
3115
|
+
return fallback("decision-unavailable", err);
|
|
3116
|
+
}
|
|
3117
|
+
}
|
|
3118
|
+
__name(routeModel, "routeModel");
|
|
3119
|
+
function resolveAutoDefault(config, isAvailable) {
|
|
3120
|
+
return isAvailable(config.default) ? config.default : void 0;
|
|
3121
|
+
}
|
|
3122
|
+
__name(resolveAutoDefault, "resolveAutoDefault");
|
|
3123
|
+
|
|
2629
3124
|
// src/integrations/plugins/settings.ts
|
|
2630
3125
|
import { createHash as createHash3, randomUUID as randomUUID3 } from "node:crypto";
|
|
2631
3126
|
import {
|
|
@@ -7865,10 +8360,10 @@ function clipRequestContext(prompt, limit, kind) {
|
|
|
7865
8360
|
__name(clipRequestContext, "clipRequestContext");
|
|
7866
8361
|
async function createAgentSession(prefs, detected, options = {}) {
|
|
7867
8362
|
if (options.palEnvironment) {
|
|
7868
|
-
const { createPalAgentSession } = await import("./agent-session-
|
|
8363
|
+
const { createPalAgentSession } = await import("./agent-session-C2HDOXK4.js");
|
|
7869
8364
|
return createPalAgentSession(prefs, detected, options);
|
|
7870
8365
|
}
|
|
7871
|
-
const { palAtWorkspace } = await import("./store-
|
|
8366
|
+
const { palAtWorkspace } = await import("./store-2PDDGKYZ.js");
|
|
7872
8367
|
if (palAtWorkspace(options.cwd ?? process.cwd()))
|
|
7873
8368
|
throw new Error("This Pal requires its owned virtual computer. Open it with namzu pal chat.");
|
|
7874
8369
|
const fileObservations = /* @__PURE__ */ new Map();
|
|
@@ -8167,6 +8662,8 @@ async function createAgentSession(prefs, detected, options = {}) {
|
|
|
8167
8662
|
}
|
|
8168
8663
|
return readCurrentAuxiliaryCredential(found, signal);
|
|
8169
8664
|
}, "currentCredentialFor");
|
|
8665
|
+
let turnRouteTarget;
|
|
8666
|
+
let lastAutoRoute;
|
|
8170
8667
|
const providerForSession = /* @__PURE__ */ __name((sessionId) => primary.id === "zen" || primary.id === "zen-go" ? constructProvider(primary.id, det, model, { sessionId }) : provider, "providerForSession");
|
|
8171
8668
|
const projectInstructions = new ProjectInstructionTracker(cwd);
|
|
8172
8669
|
let sandbox;
|
|
@@ -8393,9 +8890,10 @@ async function createAgentSession(prefs, detected, options = {}) {
|
|
|
8393
8890
|
const nativeSearchAvailable = provider.capabilities?.supportsHostedWebSearch === true && !options.structuredOutput && (provider.supportsHostedWebSearchFor?.(
|
|
8394
8891
|
model,
|
|
8395
8892
|
options.web?.search === "cached" ? "cached" : "live"
|
|
8396
|
-
) ?? true) && prefs.providers.length === 1;
|
|
8893
|
+
) ?? true) && prefs.providers.length === 1 && !options.routing;
|
|
8397
8894
|
const webSearch = resolveWebSearch(options.web, nativeSearchAvailable);
|
|
8398
8895
|
const nativeWebSearch = webSearch.mode !== "off" && webSearch.backend === "native" ? { mode: webSearch.mode } : void 0;
|
|
8896
|
+
const routedWebSearch = /* @__PURE__ */ __name((routed) => nativeWebSearch && routed.provider.capabilities?.supportsHostedWebSearch === true && (routed.provider.supportsHostedWebSearchFor?.(routed.model, nativeWebSearch.mode) ?? true) ? nativeWebSearch : void 0, "routedWebSearch");
|
|
8399
8897
|
let webSearchTool;
|
|
8400
8898
|
if (webSearch.mode !== "off" && webSearch.backend === "exa") {
|
|
8401
8899
|
webSearchTool = createWebSearchTool();
|
|
@@ -8607,8 +9105,8 @@ async function createAgentSession(prefs, detected, options = {}) {
|
|
|
8607
9105
|
});
|
|
8608
9106
|
}, "listModels"),
|
|
8609
9107
|
buildProvider: /* @__PURE__ */ __name(async (invokingSessionId, selection) => {
|
|
8610
|
-
const providerId = selection ? selection.provider : primary.id;
|
|
8611
|
-
const selectedModel = selection?.model ?? model;
|
|
9108
|
+
const providerId = selection ? selection.provider : turnRouteTarget?.provider ?? primary.id;
|
|
9109
|
+
const selectedModel = selection?.model ?? turnRouteTarget?.model ?? model;
|
|
8612
9110
|
if (!invokingSessionId && (providerId === "zen" || providerId === "zen-go"))
|
|
8613
9111
|
throw new Error("A delegated provider requires its invoking conversation.");
|
|
8614
9112
|
await ensureRegistered(providerId);
|
|
@@ -8723,7 +9221,9 @@ async function createAgentSession(prefs, detected, options = {}) {
|
|
|
8723
9221
|
toolsets.push(toolset("extra", options.extraTools));
|
|
8724
9222
|
}
|
|
8725
9223
|
if (options.openUrl) toolsets.push(toolset("open-url", [createOpenUrlTool()]));
|
|
8726
|
-
const
|
|
9224
|
+
const decisionTool = maybeCreateDecisionTool(options.decision, process.env);
|
|
9225
|
+
if (decisionTool) toolsets.push(toolset("decide", [decisionTool]));
|
|
9226
|
+
const operatorPals = await import("./operator-tools-GI63VOXH.js");
|
|
8727
9227
|
toolsets.push(
|
|
8728
9228
|
readyWhen(
|
|
8729
9229
|
toolset(
|
|
@@ -8914,6 +9414,58 @@ async function createAgentSession(prefs, detected, options = {}) {
|
|
|
8914
9414
|
...effort ? { effort } : {}
|
|
8915
9415
|
};
|
|
8916
9416
|
}, "pinnedResumeRoute");
|
|
9417
|
+
const routingDecisionModel = options.routing ? maybeCreateDecisionModel(options.decision, process.env) : void 0;
|
|
9418
|
+
const autoRouteFor = /* @__PURE__ */ __name(async (messages, sessionId, signal) => {
|
|
9419
|
+
const routing = options.routing;
|
|
9420
|
+
if (!routing) return void 0;
|
|
9421
|
+
try {
|
|
9422
|
+
const routed = await routeModel(
|
|
9423
|
+
{
|
|
9424
|
+
task: lastUserText(messages),
|
|
9425
|
+
config: routing,
|
|
9426
|
+
features: {
|
|
9427
|
+
conversationLength: messages.length,
|
|
9428
|
+
// Mounted is not used: the tool is on in every interactive session,
|
|
9429
|
+
// so only a conversation that has driven the desktop keeps the small
|
|
9430
|
+
// tier out.
|
|
9431
|
+
usesComputerUse: options.enableComputerUse === true && conversationDrovePc(messages),
|
|
9432
|
+
usesPal: false
|
|
9433
|
+
},
|
|
9434
|
+
signal
|
|
9435
|
+
},
|
|
9436
|
+
{
|
|
9437
|
+
...routingDecisionModel ? { model: routingDecisionModel } : {},
|
|
9438
|
+
isAvailable: /* @__PURE__ */ __name((target) => {
|
|
9439
|
+
const found = findDetected(detected, target.provider);
|
|
9440
|
+
if (!found) return false;
|
|
9441
|
+
return found.entry.constructible && canSelectModel(found.entry, found.apiKey, target.model);
|
|
9442
|
+
}, "isAvailable"),
|
|
9443
|
+
logger: cliLogger()
|
|
9444
|
+
}
|
|
9445
|
+
);
|
|
9446
|
+
lastAutoRoute = { tier: routed.tier, model: routed.model };
|
|
9447
|
+
if (routed.provider === primary.id && routed.model === model) {
|
|
9448
|
+
turnRouteTarget = void 0;
|
|
9449
|
+
return void 0;
|
|
9450
|
+
}
|
|
9451
|
+
const route = await pinnedResumeRoute(
|
|
9452
|
+
{ provider: routed.provider, model: routed.model },
|
|
9453
|
+
sessionId,
|
|
9454
|
+
signal
|
|
9455
|
+
);
|
|
9456
|
+
turnRouteTarget = route ? { provider: routed.provider, model: route.model } : void 0;
|
|
9457
|
+
return route;
|
|
9458
|
+
} catch (err) {
|
|
9459
|
+
signal.throwIfAborted();
|
|
9460
|
+
turnRouteTarget = void 0;
|
|
9461
|
+
lastAutoRoute = void 0;
|
|
9462
|
+
cliLogger().warn(
|
|
9463
|
+
"auto model routing failed, using the session model",
|
|
9464
|
+
exceptionAttributes(err)
|
|
9465
|
+
);
|
|
9466
|
+
return void 0;
|
|
9467
|
+
}
|
|
9468
|
+
}, "autoRouteFor");
|
|
8917
9469
|
const kernelResume = /* @__PURE__ */ __name(({
|
|
8918
9470
|
entry: entry2,
|
|
8919
9471
|
sessionLog,
|
|
@@ -8935,6 +9487,7 @@ async function createAgentSession(prefs, detected, options = {}) {
|
|
|
8935
9487
|
const resumedLimits = await readStoredTurnGuards(sessionLog, entry2.turnId) ?? resolveTurnGuards(options.limits);
|
|
8936
9488
|
await prepareProviderCredential(ownedSignal);
|
|
8937
9489
|
const route = await pinnedResumeRoute(pinned, entry2.sessionId, ownedSignal);
|
|
9490
|
+
const resumeWebSearch = route ? routedWebSearch(route) : nativeWebSearch;
|
|
8938
9491
|
const turnSkills = await turnSkillsFor(route?.model ?? model);
|
|
8939
9492
|
const curatedMemory = readMemory(void 0, cwd);
|
|
8940
9493
|
for (const notice of formatMemoryDiagnostics(curatedMemory)) cliLogger().warn(notice);
|
|
@@ -9054,7 +9607,7 @@ async function createAgentSession(prefs, detected, options = {}) {
|
|
|
9054
9607
|
turnConfig: {
|
|
9055
9608
|
model: route?.model ?? model,
|
|
9056
9609
|
...route?.effort ? { effort: route.effort } : {},
|
|
9057
|
-
...
|
|
9610
|
+
...resumeWebSearch ? { webSearch: resumeWebSearch } : {},
|
|
9058
9611
|
...sandbox.provider ? { sandbox: { workspace: sandboxWorkspace } } : {},
|
|
9059
9612
|
...resumedLimits,
|
|
9060
9613
|
maxResponseTokens: 8192,
|
|
@@ -9201,6 +9754,9 @@ async function createAgentSession(prefs, detected, options = {}) {
|
|
|
9201
9754
|
},
|
|
9202
9755
|
providerSummary: entry.label,
|
|
9203
9756
|
modelSummary: model,
|
|
9757
|
+
get autoRoute() {
|
|
9758
|
+
return lastAutoRoute;
|
|
9759
|
+
},
|
|
9204
9760
|
get imageAttachmentsSupported() {
|
|
9205
9761
|
return providerForSession(scope.sessionId).capabilities?.supportsVision;
|
|
9206
9762
|
},
|
|
@@ -9537,7 +10093,9 @@ async function createAgentSession(prefs, detected, options = {}) {
|
|
|
9537
10093
|
}, "claimTurn");
|
|
9538
10094
|
try {
|
|
9539
10095
|
await prepareProviderCredential(signal);
|
|
9540
|
-
const
|
|
10096
|
+
const autoRoute = await autoRouteFor(messages, turnScope.sessionId, signal);
|
|
10097
|
+
const turnWebSearch = autoRoute ? routedWebSearch(autoRoute) : nativeWebSearch;
|
|
10098
|
+
const turnSkills = await turnSkillsFor(autoRoute?.model ?? model);
|
|
9541
10099
|
const curatedMemory = readMemory(void 0, cwd);
|
|
9542
10100
|
for (const notice of formatMemoryDiagnostics(curatedMemory)) {
|
|
9543
10101
|
yield { kind: "context", text: notice, shed: false };
|
|
@@ -9700,7 +10258,7 @@ async function createAgentSession(prefs, detected, options = {}) {
|
|
|
9700
10258
|
}
|
|
9701
10259
|
try {
|
|
9702
10260
|
for await (const event of runTurn({
|
|
9703
|
-
provider: providerForSession(turnScope.sessionId),
|
|
10261
|
+
provider: autoRoute?.provider ?? providerForSession(turnScope.sessionId),
|
|
9704
10262
|
fileReadTracker: await observationsFor(turnScope.sessionId, messages),
|
|
9705
10263
|
compactionConfig: compactionConfigFor(options.compaction),
|
|
9706
10264
|
retainedToolPreviewChars: options.conversationSessions ? options.compaction?.retainedToolPreviewChars ?? 4e3 : void 0,
|
|
@@ -9716,8 +10274,9 @@ async function createAgentSession(prefs, detected, options = {}) {
|
|
|
9716
10274
|
// that expired hours ago — and a chain whose own members are stale
|
|
9717
10275
|
// is a fallback that fails for the reason the fallback exists to
|
|
9718
10276
|
// survive. Building a driver is a client object, not a request.
|
|
9719
|
-
|
|
9720
|
-
|
|
10277
|
+
// A routed turn has no fallback chain, like a pinned resume.
|
|
10278
|
+
fallbackProviders: autoRoute ? [] : fallbackPlan.build(currentToken, turnScope.sessionId),
|
|
10279
|
+
model: autoRoute?.model ?? model,
|
|
9721
10280
|
toolsets: runToolsets,
|
|
9722
10281
|
...screensConfig !== void 0 ? { toolResultGuardrails: screensConfig } : {},
|
|
9723
10282
|
pluginManager: pluginRuntime?.manager,
|
|
@@ -9769,7 +10328,7 @@ async function createAgentSession(prefs, detected, options = {}) {
|
|
|
9769
10328
|
completionInbox: await subagentRuntime?.completionInboxForTurn(turnId),
|
|
9770
10329
|
promptContributions,
|
|
9771
10330
|
...webCapability ? { web: webCapability } : {},
|
|
9772
|
-
...
|
|
10331
|
+
...turnWebSearch ? { webSearch: turnWebSearch } : {},
|
|
9773
10332
|
// Tasks join this turn's registry inside query, after the fork.
|
|
9774
10333
|
// Keep the existing eager path unless deferral was requested.
|
|
9775
10334
|
runtimeToolOverrides: {
|
|
@@ -10153,6 +10712,16 @@ async function listProviderModels(id, det) {
|
|
|
10153
10712
|
return listing.kind === "ok" ? [...listing.models] : [];
|
|
10154
10713
|
}
|
|
10155
10714
|
__name(listProviderModels, "listProviderModels");
|
|
10715
|
+
var DESKTOP_USE_LOOKBACK = 20;
|
|
10716
|
+
function conversationDrovePc(messages) {
|
|
10717
|
+
for (let i = messages.length - 1; i >= 0 && i >= messages.length - DESKTOP_USE_LOOKBACK; i--) {
|
|
10718
|
+
const m = messages[i];
|
|
10719
|
+
if (m?.role === "assistant" && m.toolCalls?.some((call) => call.function.name === COMPUTER_USE_TOOL_NAME))
|
|
10720
|
+
return true;
|
|
10721
|
+
}
|
|
10722
|
+
return false;
|
|
10723
|
+
}
|
|
10724
|
+
__name(conversationDrovePc, "conversationDrovePc");
|
|
10156
10725
|
function lastUserText(messages) {
|
|
10157
10726
|
for (let i = messages.length - 1; i >= 0; i--) {
|
|
10158
10727
|
const m = messages[i];
|
|
@@ -10844,29 +11413,29 @@ __name(takeCallDiff, "takeCallDiff");
|
|
|
10844
11413
|
function viewToSummary(view) {
|
|
10845
11414
|
switch (view.kind) {
|
|
10846
11415
|
case "generic":
|
|
10847
|
-
return
|
|
11416
|
+
return truncate2(view.label, 120);
|
|
10848
11417
|
case "diff":
|
|
10849
|
-
return
|
|
11418
|
+
return truncate2(view.label ?? view.path ?? view.after.split("\n")[0] ?? "", 120);
|
|
10850
11419
|
case "terminal":
|
|
10851
|
-
return
|
|
11420
|
+
return truncate2(view.command ?? view.output.split("\n")[0] ?? "", 120);
|
|
10852
11421
|
}
|
|
10853
11422
|
}
|
|
10854
11423
|
__name(viewToSummary, "viewToSummary");
|
|
10855
11424
|
var RESULT_SUMMARY_WHOLE_MAX = 300;
|
|
10856
11425
|
function resultSummaryLine(line) {
|
|
10857
11426
|
const flat = line.replace(/\s+/g, " ");
|
|
10858
|
-
return flat.length <= RESULT_SUMMARY_WHOLE_MAX ? flat :
|
|
11427
|
+
return flat.length <= RESULT_SUMMARY_WHOLE_MAX ? flat : truncate2(line, 120);
|
|
10859
11428
|
}
|
|
10860
11429
|
__name(resultSummaryLine, "resultSummaryLine");
|
|
10861
11430
|
function summarySaysAll(line, summary) {
|
|
10862
11431
|
return line === summary || line.replace(/\s+/g, " ") === summary;
|
|
10863
11432
|
}
|
|
10864
11433
|
__name(summarySaysAll, "summarySaysAll");
|
|
10865
|
-
function
|
|
11434
|
+
function truncate2(value, max) {
|
|
10866
11435
|
const oneLine3 = value.replace(/\s+/g, " ");
|
|
10867
11436
|
return oneLine3.length > max ? `${oneLine3.slice(0, max - 1)}\u2026` : oneLine3;
|
|
10868
11437
|
}
|
|
10869
|
-
__name(
|
|
11438
|
+
__name(truncate2, "truncate");
|
|
10870
11439
|
function diffContentLines(value) {
|
|
10871
11440
|
if (value === "") return [];
|
|
10872
11441
|
const lines = value.split("\n");
|
|
@@ -10913,16 +11482,16 @@ __name(resultToLines, "resultToLines");
|
|
|
10913
11482
|
function firstLine3(result) {
|
|
10914
11483
|
const payload = payloadString(result);
|
|
10915
11484
|
if (payload !== null) {
|
|
10916
|
-
return
|
|
11485
|
+
return truncate2(payload.split("\n").find((l) => l.trim().length > 0) ?? "", 120);
|
|
10917
11486
|
}
|
|
10918
11487
|
const obj = parseJsonObject(result);
|
|
10919
11488
|
if (obj) {
|
|
10920
|
-
if (obj.success === false && typeof obj.error === "string") return
|
|
11489
|
+
if (obj.success === false && typeof obj.error === "string") return truncate2(obj.error, 120);
|
|
10921
11490
|
const keys = Object.keys(obj);
|
|
10922
11491
|
return keys.length > 0 ? `{ ${keys.slice(0, 6).join(", ")}${keys.length > 6 ? ", \u2026" : ""} }` : "{}";
|
|
10923
11492
|
}
|
|
10924
11493
|
const cleaned = cleanToolText(result.trim());
|
|
10925
|
-
return
|
|
11494
|
+
return truncate2(cleaned.split("\n").find((l) => l.trim().length > 0) ?? "", 120);
|
|
10926
11495
|
}
|
|
10927
11496
|
__name(firstLine3, "firstLine");
|
|
10928
11497
|
function exceptionAttributes(err) {
|
|
@@ -11053,6 +11622,8 @@ export {
|
|
|
11053
11622
|
renderRestoreNote,
|
|
11054
11623
|
PluginSettingsStore,
|
|
11055
11624
|
validateComposerSendSettings,
|
|
11625
|
+
maybeCreateDecisionTool,
|
|
11626
|
+
resolveAutoDefault,
|
|
11056
11627
|
createCurrentCredentialReader,
|
|
11057
11628
|
createTaskContextStep,
|
|
11058
11629
|
createLiveModeControl,
|
|
@@ -11094,6 +11665,7 @@ export {
|
|
|
11094
11665
|
computerUseHasControl,
|
|
11095
11666
|
isCredentialRejection,
|
|
11096
11667
|
listProviderModels,
|
|
11668
|
+
conversationDrovePc,
|
|
11097
11669
|
makeResumeHandler,
|
|
11098
11670
|
makeHoldingResumeHandler,
|
|
11099
11671
|
isPromptExempt,
|
|
@@ -11108,4 +11680,4 @@ export {
|
|
|
11108
11680
|
RESULT_SUMMARY_WHOLE_MAX,
|
|
11109
11681
|
resultSummaryLine
|
|
11110
11682
|
};
|
|
11111
|
-
//# sourceMappingURL=chunk-
|
|
11683
|
+
//# sourceMappingURL=chunk-H7VJHF5S.js.map
|