@namzu/cli 44.1.1 → 44.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 +34 -0
- package/dist/bin.js +1 -1
- package/dist/chunks/acp-OUBJWH5B.js +7754 -0
- package/dist/chunks/acp-OUBJWH5B.js.map +6 -0
- package/dist/chunks/{activity-command-Y5ZLCQ63.js → activity-command-R7MUSZIY.js} +16 -15
- package/dist/chunks/activity-command-R7MUSZIY.js.map +6 -0
- package/dist/chunks/{add-F7M57FGR.js → add-PSEIDDRW.js} +21 -18
- package/dist/chunks/add-PSEIDDRW.js.map +6 -0
- package/dist/chunks/{agent-AFX2UZU5.js → agent-YPEXUYPH.js} +35 -30
- package/dist/chunks/agent-session-EZB2OYG3.js +65 -0
- package/dist/chunks/{archive-6NM6DYAT.js → archive-ET4PXE34.js} +11 -10
- package/dist/chunks/archive-ET4PXE34.js.map +6 -0
- package/dist/chunks/{bin-main-I6CHRYYQ.js → bin-main-PMB57AZJ.js} +9 -9
- package/dist/chunks/binding-K6RIQ5AP.js +17 -0
- package/dist/chunks/{browser-OPMOTWTV.js → browser-SKTIAVBF.js} +6 -6
- package/dist/chunks/{chat-KGVPXQS6.js → chat-AVIVXXMD.js} +20 -19
- package/dist/chunks/chat-AVIVXXMD.js.map +6 -0
- package/dist/chunks/chunk-26C37THH.js +867 -0
- package/dist/chunks/chunk-26C37THH.js.map +6 -0
- package/dist/chunks/{chunk-CTN4O42X.js → chunk-2EHPXO4E.js} +3 -3
- package/dist/chunks/{chunk-LS75R55C.js → chunk-2NI5NS5S.js} +3 -3
- package/dist/chunks/{chunk-RV5QY3IY.js → chunk-2U5M5IYH.js} +6 -6
- package/dist/chunks/{chunk-PWOG3OMH.js → chunk-2X6JZAKH.js} +9 -9
- package/dist/chunks/{chunk-W5QFVC74.js → chunk-2Y26DLOF.js} +27 -10
- package/dist/chunks/{chunk-W5QFVC74.js.map → chunk-2Y26DLOF.js.map} +1 -1
- package/dist/chunks/{chunk-BR6EWAKQ.js → chunk-3QGJXD7U.js} +5 -5
- package/dist/chunks/{chunk-XFNCCDJK.js → chunk-435DYOG4.js} +2 -2
- package/dist/chunks/{chunk-Y44FAVKA.js → chunk-4OXIJ2EF.js} +3 -3
- package/dist/chunks/{chunk-RSRJQB6Q.js → chunk-6EJFXJDO.js} +204 -68
- package/dist/chunks/chunk-6EJFXJDO.js.map +6 -0
- package/dist/chunks/{chunk-UC3ZACVN.js → chunk-6FWFSPUL.js} +2 -2
- package/dist/chunks/chunk-6HTC5TQ3.js +89 -0
- package/dist/chunks/chunk-6HTC5TQ3.js.map +6 -0
- package/dist/chunks/chunk-6IDFHPY3.js +413 -0
- package/dist/chunks/chunk-6IDFHPY3.js.map +6 -0
- package/dist/chunks/chunk-7FPKSX4M.js +61 -0
- package/dist/chunks/chunk-7FPKSX4M.js.map +6 -0
- package/dist/chunks/{chunk-EFEZWLZC.js → chunk-7QQOUCGI.js} +12 -10
- package/dist/chunks/chunk-7QQOUCGI.js.map +6 -0
- package/dist/chunks/{chunk-KHM2XON5.js → chunk-7TEXDZVO.js} +17 -3
- package/dist/chunks/chunk-7TEXDZVO.js.map +6 -0
- package/dist/chunks/{chunk-WPNT6IGU.js → chunk-A5GTZ7R2.js} +2 -2
- package/dist/chunks/{chunk-BIGRB2H4.js → chunk-ACSG5R5P.js} +3 -3
- package/dist/chunks/{chunk-QV43JSBP.js → chunk-AI6PBE5G.js} +2 -2
- package/dist/chunks/{chunk-HXZ2JXCO.js → chunk-AX5ESG6K.js} +2 -2
- package/dist/chunks/{chunk-DESOZLEL.js → chunk-B3XIVOLM.js} +2 -2
- package/dist/chunks/{chunk-ZXKN4TWP.js → chunk-BGKQCLLH.js} +242 -447
- package/dist/chunks/chunk-BGKQCLLH.js.map +6 -0
- package/dist/chunks/chunk-BT7ZELXJ.js +63 -0
- package/dist/chunks/chunk-BT7ZELXJ.js.map +6 -0
- package/dist/chunks/{chunk-ZUN2WRCB.js → chunk-DECJPLLA.js} +13 -13
- package/dist/chunks/{chunk-GSYPRZZU.js → chunk-DFCJYRT5.js} +2 -2
- package/dist/chunks/{chunk-QNTR7X7D.js → chunk-DQLSLXDF.js} +5 -5
- package/dist/chunks/chunk-EXFSMYH4.js +83 -0
- package/dist/chunks/chunk-EXFSMYH4.js.map +6 -0
- package/dist/chunks/{chunk-6Z2ZJ4BA.js → chunk-FHQTXWDA.js} +4 -4
- package/dist/chunks/chunk-G73G2WGR.js +242 -0
- package/dist/chunks/chunk-G73G2WGR.js.map +6 -0
- package/dist/chunks/{chunk-BLM6IQS4.js → chunk-GANFMGV7.js} +5 -5
- package/dist/chunks/{chunk-REDD2WY7.js → chunk-GBS6ATYF.js} +2 -2
- package/dist/chunks/{chunk-ORVWGSLG.js → chunk-GCCFTP47.js} +4 -4
- package/dist/chunks/{chunk-FKIO77IY.js → chunk-GNEDN6MU.js} +12 -12
- package/dist/chunks/{chunk-NS7EU37U.js → chunk-HB5ZN5KQ.js} +2 -2
- package/dist/chunks/{chunk-EFQ6FUFZ.js → chunk-HELINLSD.js} +2 -2
- package/dist/chunks/{chunk-AY7B43MK.js → chunk-HKCIZR5P.js} +13 -13
- package/dist/chunks/chunk-HRJPVPSU.js +164 -0
- package/dist/chunks/chunk-HRJPVPSU.js.map +6 -0
- package/dist/chunks/{chunk-NPZY5OJ5.js → chunk-HTBMDD6Y.js} +8 -8
- package/dist/chunks/{chunk-LN26A356.js → chunk-I5E4MT3C.js} +4 -4
- package/dist/chunks/{chunk-KK2L4FD2.js → chunk-IJZ7SLBV.js} +3 -3
- package/dist/chunks/{chunk-YAEHAYI4.js → chunk-ITA57VY5.js} +7 -5
- package/dist/chunks/chunk-ITA57VY5.js.map +6 -0
- package/dist/chunks/{chunk-W4E2N7TY.js → chunk-IZVN6K6U.js} +4 -4
- package/dist/chunks/{chunk-7U36A4WQ.js → chunk-JL64XHSL.js} +55 -5
- package/dist/chunks/chunk-JL64XHSL.js.map +6 -0
- package/dist/chunks/chunk-KLKAK2O5.js +5817 -0
- package/dist/chunks/chunk-KLKAK2O5.js.map +6 -0
- package/dist/chunks/{chunk-465CVUN4.js → chunk-L2NNJ4XL.js} +3 -3
- package/dist/chunks/{chunk-JCUPTKQY.js → chunk-LF76CVOZ.js} +4 -4
- package/dist/chunks/{chunk-ZATO2QOS.js → chunk-LFPTXRMM.js} +2 -2
- package/dist/chunks/chunk-LG27EJU6.js +189 -0
- package/dist/chunks/chunk-LG27EJU6.js.map +6 -0
- package/dist/chunks/{chunk-UHPRMPWX.js → chunk-LKJBDF7W.js} +15 -3
- package/dist/chunks/chunk-LKJBDF7W.js.map +6 -0
- package/dist/chunks/chunk-LKODRKMZ.js +575 -0
- package/dist/chunks/chunk-LKODRKMZ.js.map +6 -0
- package/dist/chunks/{chunk-WLUGKIYQ.js → chunk-LQRP2VRQ.js} +4 -4
- package/dist/chunks/{chunk-UGAT33T5.js → chunk-LYGD5P7O.js} +3 -3
- package/dist/chunks/{chunk-CRWNJ62V.js → chunk-M2OZ4SVS.js} +3 -3
- package/dist/chunks/{chunk-I32JTWDW.js → chunk-MGZSEPDY.js} +2 -2
- package/dist/chunks/{chunk-HYFX32Y3.js → chunk-MJBGVVI5.js} +3 -3
- package/dist/chunks/{chunk-YPRKTJ5P.js → chunk-MYL75RA4.js} +2 -2
- package/dist/chunks/chunk-PIVHVYCN.js +3925 -0
- package/dist/chunks/chunk-PIVHVYCN.js.map +6 -0
- package/dist/chunks/{chunk-AE4LOPZF.js → chunk-PMX2WTZL.js} +2 -2
- package/dist/chunks/{chunk-FPLDTTM2.js → chunk-QWSZ5P4C.js} +6 -6
- package/dist/chunks/{chunk-T5POXPXY.js → chunk-RSIWTHYS.js} +3 -3
- package/dist/chunks/{chunk-UP3SWACV.js → chunk-S4QOQGAT.js} +2 -2
- package/dist/chunks/chunk-S7WRWA25.js +33 -0
- package/dist/chunks/chunk-S7WRWA25.js.map +6 -0
- package/dist/chunks/{chunk-ZRBGY4SL.js → chunk-SGRO4RJP.js} +2 -2
- package/dist/chunks/{chunk-WKUTR7YW.js → chunk-SJFPZPOJ.js} +80 -17
- package/dist/chunks/chunk-SJFPZPOJ.js.map +6 -0
- package/dist/chunks/{chunk-JAYPFJGZ.js → chunk-TZZOQ62Z.js} +2 -2
- package/dist/chunks/chunk-U4SST7AD.js +219 -0
- package/dist/chunks/chunk-U4SST7AD.js.map +6 -0
- package/dist/chunks/{chunk-CMAZ3DYB.js → chunk-UGDZ7MLG.js} +4 -4
- package/dist/chunks/chunk-VDKDXDOH.js +290 -0
- package/dist/chunks/chunk-VDKDXDOH.js.map +6 -0
- package/dist/chunks/{chunk-2NFPIARP.js → chunk-VFVWHYHT.js} +4 -4
- package/dist/chunks/{chunk-5UB2LLPG.js → chunk-VZ4PKWLF.js} +2 -2
- package/dist/chunks/{chunk-WLAI3VCE.js → chunk-WKFHQQOU.js} +2 -2
- package/dist/chunks/{chunk-JSFF2HGX.js → chunk-WKPRYH24.js} +3 -3
- package/dist/chunks/{chunk-VR4MTSMH.js → chunk-WQFHJ4TO.js} +3 -3
- package/dist/chunks/{chunk-RFMODICJ.js → chunk-WYJ3CNXX.js} +80 -38
- package/dist/chunks/chunk-WYJ3CNXX.js.map +6 -0
- package/dist/chunks/{chunk-ZNYKZ3MI.js → chunk-XPLHAOGE.js} +2 -2
- package/dist/chunks/{chunk-2NGXQQPP.js → chunk-XX2SP5AM.js} +3 -3
- package/dist/chunks/{chunk-T2PF65KB.js → chunk-YDSWGJWF.js} +2 -2
- package/dist/chunks/{chunk-LUSUJZR2.js → chunk-YJ6NWB2B.js} +2 -2
- package/dist/chunks/{chunk-O4MFP726.js → chunk-YTE3QIH3.js} +998 -393
- package/dist/chunks/chunk-YTE3QIH3.js.map +6 -0
- package/dist/chunks/{chunk-JH3SDABI.js → chunk-YUYNIAJX.js} +6 -6
- package/dist/chunks/{chunk-TX2PUHTP.js → chunk-YXIG4OT2.js} +2 -2
- package/dist/chunks/{cli-runtime-HTTDQPEZ.js → cli-runtime-F4MEMBDL.js} +11 -10
- package/dist/chunks/cli-runtime-F4MEMBDL.js.map +6 -0
- package/dist/chunks/{commands-ZD2L5QMI.js → commands-ZCNZVYTG.js} +5 -5
- package/dist/chunks/{crash-report-2IRIZSBD.js → crash-report-K53VF4H5.js} +6 -6
- package/dist/chunks/{dist-GSYFGRQT.js → dist-6IPPA55L.js} +2 -2
- package/dist/chunks/{dist-45IFTDJW.js → dist-H53G25BE.js} +2 -2
- package/dist/chunks/{dist-RQJEJN3Z.js → dist-L5LBM77I.js} +2 -2
- package/dist/chunks/{dist-OJTB6QLR.js → dist-RIH2Q2ER.js} +2 -2
- package/dist/chunks/{dist-OCZJJFHF.js → dist-RTIKLSUV.js} +2 -2
- package/dist/chunks/{dist-TWYNAZDN.js → dist-T6KE7URX.js} +2 -2
- package/dist/chunks/{dist-FNGLTQIG.js → dist-VSJGDIXP.js} +32 -2
- package/dist/chunks/{dist-NL7WG7PX.js → dist-XNGK3C4G.js} +2 -2
- package/dist/chunks/{doctor-NKPCWPB4.js → doctor-DOCGTBME.js} +17 -15
- package/dist/chunks/{drain-YTSVAQP5.js → drain-LT3J2MEA.js} +13 -13
- package/dist/chunks/entry-UHKDLPDS.js +232 -0
- package/dist/chunks/entry-UHKDLPDS.js.map +6 -0
- package/dist/chunks/{eval-ILFXDQUQ.js → eval-DH26W2QK.js} +2 -2
- package/dist/chunks/{exec-3JDAB34N.js → exec-QGAHWUUQ.js} +57 -47
- package/dist/chunks/exec-QGAHWUUQ.js.map +6 -0
- package/dist/chunks/{github-FH7PPWVW.js → github-JTMZJAZL.js} +4 -4
- package/dist/chunks/{home-5OIZIDIT.js → home-GGVNSCCU.js} +3 -3
- package/dist/chunks/host-6CUYPX4T.js +23 -0
- package/dist/chunks/{host-queries-SO2NOQRR.js → host-queries-4EW7M54U.js} +16 -15
- package/dist/chunks/host-queries-4EW7M54U.js.map +6 -0
- package/dist/chunks/{learn-RHNMJ4BD.js → learn-PAO3IOYA.js} +13 -13
- package/dist/chunks/{learn-builtin-UQ3MWGK6.js → learn-builtin-DXZUXOGG.js} +19 -19
- package/dist/chunks/{lifecycle-RTDYXKBW.js → lifecycle-KDN4D7DP.js} +30 -26
- package/dist/chunks/{list-G6OA34RL.js → list-KSP6S57Z.js} +15 -14
- package/dist/chunks/list-KSP6S57Z.js.map +6 -0
- package/dist/chunks/{live-44HBQCQY.js → live-XWJ2JOFO.js} +15 -13
- package/dist/chunks/{login-J4PWR4FM.js → login-3Q2HKQUW.js} +10 -8
- package/dist/chunks/{logs-22QAEH2Q.js → logs-UYB55HOX.js} +4 -4
- package/dist/chunks/{mcp-EXFVIHPJ.js → mcp-JWSI4KA6.js} +25 -22
- package/dist/chunks/mcp-JWSI4KA6.js.map +6 -0
- package/dist/chunks/{message-command-B4L2W4YZ.js → message-command-YP6TGD3K.js} +47 -42
- package/dist/chunks/message-command-YP6TGD3K.js.map +6 -0
- package/dist/chunks/open-QUDHJK5H.js +19 -0
- package/dist/chunks/{operator-tools-TEP4UTI6.js → operator-tools-43NL7HKO.js} +15 -14
- package/dist/chunks/operator-tools-43NL7HKO.js.map +6 -0
- package/dist/chunks/{output-schema-FZXJ7V33.js → output-schema-TLW5FA37.js} +3 -3
- package/dist/chunks/{pal-BUDEBIBJ.js → pal-EZE2KLYZ.js} +16 -14
- package/dist/chunks/pal-EZE2KLYZ.js.map +6 -0
- package/dist/chunks/palette-WDPS7W6Q.js +15 -0
- package/dist/chunks/peers-OBENILN2.js +18 -0
- package/dist/chunks/prefix-MLAG4KTK.js +14 -0
- package/dist/chunks/{providers-EQ32NZAT.js → providers-PJIHLTXP.js} +22 -18
- package/dist/chunks/pty-HDEXCPR6.js +29 -0
- package/dist/chunks/{resident-FSUGNG56.js → resident-2GHB3BKR.js} +32 -30
- package/dist/chunks/resident-2GHB3BKR.js.map +6 -0
- package/dist/chunks/resume-FHPY2RU3.js +24 -0
- package/dist/chunks/resume-FHPY2RU3.js.map +6 -0
- package/dist/chunks/{resume-command-DHPXCZVL.js → resume-command-VB6VA64L.js} +4 -4
- package/dist/chunks/resume-command-VB6VA64L.js.map +6 -0
- package/dist/chunks/{schedule-OJMZEWJG.js → schedule-42N4JOQJ.js} +8 -8
- package/dist/chunks/{service-EP2QHCK7.js → service-6WGZKKI4.js} +33 -29
- package/dist/chunks/service-6WGZKKI4.js.map +6 -0
- package/dist/chunks/{session-step-44XBOUDV.js → session-step-SBWIM4MZ.js} +15 -15
- package/dist/chunks/session-step-SBWIM4MZ.js.map +6 -0
- package/dist/chunks/{skills-YHAQXVP2.js → skills-V3VDOL3D.js} +11 -11
- package/dist/chunks/spaces-6II4JYTZ.js +231 -0
- package/dist/chunks/spaces-6II4JYTZ.js.map +6 -0
- package/dist/chunks/{start-check-KVZFDBD3.js → start-check-MRSPS5JT.js} +2 -2
- package/dist/chunks/start-check-MRSPS5JT.js.map +6 -0
- package/dist/chunks/{state-NXFKMBOX.js → state-HX3XRNPC.js} +2 -2
- package/dist/chunks/store-7P462EUD.js +17 -0
- package/dist/chunks/store-7P462EUD.js.map +6 -0
- package/dist/chunks/{store-KFJWAELA.js → store-FUQE7EWU.js} +13 -10
- package/dist/chunks/store-FUQE7EWU.js.map +6 -0
- package/dist/chunks/{store-QNY242NN.js → store-IX6KNJA4.js} +6 -6
- package/dist/chunks/store-IX6KNJA4.js.map +6 -0
- package/dist/chunks/{store-JLTSSGKL.js → store-MQXI7G2H.js} +4 -4
- package/dist/chunks/store-MQXI7G2H.js.map +6 -0
- package/dist/chunks/{tui-L5GKR237.js → tui-PH5B6UCO.js} +1822 -816
- package/dist/chunks/tui-PH5B6UCO.js.map +6 -0
- package/dist/chunks/{upgrade-PROVWX55.js → upgrade-HDW5MWLE.js} +6 -6
- package/dist/chunks/{worktree-ELHDXX4X.js → worktree-MLFYZF56.js} +13 -12
- package/dist/chunks/worktree-MLFYZF56.js.map +6 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/commands/exec-json.d.ts.map +1 -1
- package/dist/commands/manifest.d.ts +1 -0
- package/dist/commands/manifest.d.ts.map +1 -1
- package/dist/commands/spaces.d.ts +42 -0
- package/dist/commands/spaces.d.ts.map +1 -0
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/schema.d.ts +7 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/doctor/checks/index.d.ts +2 -1
- package/dist/doctor/checks/index.d.ts.map +1 -1
- package/dist/doctor/checks/terminal.d.ts +12 -0
- package/dist/doctor/checks/terminal.d.ts.map +1 -0
- package/dist/index.js +22 -19
- package/dist/integrations/accounts/activity.d.ts +39 -0
- package/dist/integrations/accounts/activity.d.ts.map +1 -0
- package/dist/integrations/accounts/binding.d.ts +30 -0
- package/dist/integrations/accounts/binding.d.ts.map +1 -0
- package/dist/integrations/accounts/codex-login.d.ts +33 -0
- package/dist/integrations/accounts/codex-login.d.ts.map +1 -0
- package/dist/integrations/accounts/host-facts.d.ts +22 -0
- package/dist/integrations/accounts/host-facts.d.ts.map +1 -0
- package/dist/integrations/accounts/open.d.ts +23 -0
- package/dist/integrations/accounts/open.d.ts.map +1 -0
- package/dist/integrations/accounts/rows.d.ts +45 -0
- package/dist/integrations/accounts/rows.d.ts.map +1 -0
- package/dist/integrations/peers/runtime.d.ts +12 -0
- package/dist/integrations/peers/runtime.d.ts.map +1 -1
- package/dist/integrations/providers/codex-account.d.ts +30 -0
- package/dist/integrations/providers/codex-account.d.ts.map +1 -0
- package/dist/integrations/providers/codex-oauth.d.ts +12 -0
- package/dist/integrations/providers/codex-oauth.d.ts.map +1 -1
- package/dist/integrations/providers/preferences.d.ts +8 -0
- package/dist/integrations/providers/preferences.d.ts.map +1 -1
- package/dist/integrations/resident/runner-worker.js +24 -23
- package/dist/integrations/resident/runner-worker.js.map +1 -1
- package/dist/integrations/sessions/store.d.ts +13 -1
- package/dist/integrations/sessions/store.d.ts.map +1 -1
- package/dist/spaces/git.d.ts +27 -0
- package/dist/spaces/git.d.ts.map +1 -0
- package/dist/spaces/goto.d.ts +31 -0
- package/dist/spaces/goto.d.ts.map +1 -0
- package/dist/spaces/host.d.ts +380 -0
- package/dist/spaces/host.d.ts.map +1 -0
- package/dist/spaces/input.d.ts +87 -0
- package/dist/spaces/input.d.ts.map +1 -0
- package/dist/spaces/keymap.d.ts +30 -0
- package/dist/spaces/keymap.d.ts.map +1 -0
- package/dist/spaces/layout.d.ts +34 -0
- package/dist/spaces/layout.d.ts.map +1 -0
- package/dist/spaces/overlay.d.ts +105 -0
- package/dist/spaces/overlay.d.ts.map +1 -0
- package/dist/spaces/palette.d.ts +35 -0
- package/dist/spaces/palette.d.ts.map +1 -0
- package/dist/spaces/peers.d.ts +19 -0
- package/dist/spaces/peers.d.ts.map +1 -0
- package/dist/spaces/prefix.d.ts +19 -0
- package/dist/spaces/prefix.d.ts.map +1 -0
- package/dist/spaces/roster.d.ts +111 -0
- package/dist/spaces/roster.d.ts.map +1 -0
- package/dist/spaces/session.d.ts +83 -0
- package/dist/spaces/session.d.ts.map +1 -0
- package/dist/spaces/sidebar.d.ts +99 -0
- package/dist/spaces/sidebar.d.ts.map +1 -0
- package/dist/spaces/signal.d.ts +28 -0
- package/dist/spaces/signal.d.ts.map +1 -0
- package/dist/spaces/status.d.ts +20 -0
- package/dist/spaces/status.d.ts.map +1 -0
- package/dist/spaces/store.d.ts +69 -0
- package/dist/spaces/store.d.ts.map +1 -0
- package/dist/spaces/tabbar.d.ts +36 -0
- package/dist/spaces/tabbar.d.ts.map +1 -0
- package/dist/spaces/tiling.d.ts +90 -0
- package/dist/spaces/tiling.d.ts.map +1 -0
- package/dist/terminal/host/cell.d.ts +35 -0
- package/dist/terminal/host/cell.d.ts.map +1 -0
- package/dist/terminal/host/frame.d.ts +64 -0
- package/dist/terminal/host/frame.d.ts.map +1 -0
- package/dist/terminal/host/index.d.ts +5 -0
- package/dist/terminal/host/index.d.ts.map +1 -0
- package/dist/terminal/host/writer.d.ts +21 -0
- package/dist/terminal/host/writer.d.ts.map +1 -0
- package/dist/terminal/host/xterm-source.d.ts +18 -0
- package/dist/terminal/host/xterm-source.d.ts.map +1 -0
- package/dist/terminal/pty.d.ts.map +1 -1
- package/dist/terminal/screen.d.ts +12 -0
- package/dist/terminal/screen.d.ts.map +1 -1
- package/dist/tui/App.d.ts +106 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/Composer.d.ts +7 -1
- package/dist/tui/Composer.d.ts.map +1 -1
- package/dist/tui/ResumePicker.d.ts.map +1 -1
- package/dist/tui/TextPrompt.d.ts +5 -1
- package/dist/tui/TextPrompt.d.ts.map +1 -1
- package/dist/tui/account-flow.d.ts +126 -0
- package/dist/tui/account-flow.d.ts.map +1 -0
- package/dist/tui/agent.d.ts +17 -1
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/compaction-rows.d.ts.map +1 -1
- package/dist/tui/context-usage.d.ts +14 -0
- package/dist/tui/context-usage.d.ts.map +1 -1
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/launch-settings.d.ts +5 -2
- package/dist/tui/launch-settings.d.ts.map +1 -1
- package/dist/tui/plain-interruption.d.ts +3 -1
- package/dist/tui/plain-interruption.d.ts.map +1 -1
- package/dist/tui/resume-picker-state.d.ts +7 -0
- package/dist/tui/resume-picker-state.d.ts.map +1 -1
- package/dist/tui/slashCommands.d.ts +11 -0
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/dist/tui/tidy-tool-output.d.ts +3 -1
- package/dist/tui/tidy-tool-output.d.ts.map +1 -1
- package/dist/tui/tool-end-rows.d.ts +2 -0
- package/dist/tui/tool-end-rows.d.ts.map +1 -1
- package/dist/tui/zoom/entry.d.ts +34 -0
- package/dist/tui/zoom/entry.d.ts.map +1 -0
- package/dist/tui/zoom/gesture.d.ts +51 -0
- package/dist/tui/zoom/gesture.d.ts.map +1 -0
- package/dist/tui/zoom/leave.d.ts +11 -0
- package/dist/tui/zoom/leave.d.ts.map +1 -0
- package/dist/tui/zoom/local.d.ts +55 -0
- package/dist/tui/zoom/local.d.ts.map +1 -0
- package/dist/tui/zoom/proxy.d.ts +40 -0
- package/dist/tui/zoom/proxy.d.ts.map +1 -0
- package/package.json +9 -8
- package/dist/chunks/acp-P3S54TTC.js +0 -13601
- package/dist/chunks/acp-P3S54TTC.js.map +0 -6
- package/dist/chunks/activity-command-Y5ZLCQ63.js.map +0 -6
- package/dist/chunks/add-F7M57FGR.js.map +0 -6
- package/dist/chunks/agent-session-CFWQHSYT.js +0 -60
- package/dist/chunks/archive-6NM6DYAT.js.map +0 -6
- package/dist/chunks/chat-KGVPXQS6.js.map +0 -6
- package/dist/chunks/chunk-43PPWWYD.js +0 -1415
- package/dist/chunks/chunk-43PPWWYD.js.map +0 -6
- package/dist/chunks/chunk-7U36A4WQ.js.map +0 -6
- package/dist/chunks/chunk-EFEZWLZC.js.map +0 -6
- package/dist/chunks/chunk-KHM2XON5.js.map +0 -6
- package/dist/chunks/chunk-O4MFP726.js.map +0 -6
- package/dist/chunks/chunk-RFMODICJ.js.map +0 -6
- package/dist/chunks/chunk-RSRJQB6Q.js.map +0 -6
- package/dist/chunks/chunk-UHPRMPWX.js.map +0 -6
- package/dist/chunks/chunk-WKUTR7YW.js.map +0 -6
- package/dist/chunks/chunk-YAEHAYI4.js.map +0 -6
- package/dist/chunks/chunk-ZXKN4TWP.js.map +0 -6
- package/dist/chunks/cli-runtime-HTTDQPEZ.js.map +0 -6
- package/dist/chunks/exec-3JDAB34N.js.map +0 -6
- package/dist/chunks/host-queries-SO2NOQRR.js.map +0 -6
- package/dist/chunks/list-G6OA34RL.js.map +0 -6
- package/dist/chunks/mcp-EXFVIHPJ.js.map +0 -6
- package/dist/chunks/message-command-B4L2W4YZ.js.map +0 -6
- package/dist/chunks/operator-tools-TEP4UTI6.js.map +0 -6
- package/dist/chunks/pal-BUDEBIBJ.js.map +0 -6
- package/dist/chunks/resident-FSUGNG56.js.map +0 -6
- package/dist/chunks/resume-VXHGE5GC.js +0 -23
- package/dist/chunks/service-EP2QHCK7.js.map +0 -6
- package/dist/chunks/tui-L5GKR237.js.map +0 -6
- package/dist/chunks/worktree-ELHDXX4X.js.map +0 -6
- /package/dist/chunks/{agent-AFX2UZU5.js.map → agent-YPEXUYPH.js.map} +0 -0
- /package/dist/chunks/{agent-session-CFWQHSYT.js.map → agent-session-EZB2OYG3.js.map} +0 -0
- /package/dist/chunks/{bin-main-I6CHRYYQ.js.map → bin-main-PMB57AZJ.js.map} +0 -0
- /package/dist/chunks/{commands-ZD2L5QMI.js.map → binding-K6RIQ5AP.js.map} +0 -0
- /package/dist/chunks/{browser-OPMOTWTV.js.map → browser-SKTIAVBF.js.map} +0 -0
- /package/dist/chunks/{chunk-CTN4O42X.js.map → chunk-2EHPXO4E.js.map} +0 -0
- /package/dist/chunks/{chunk-LS75R55C.js.map → chunk-2NI5NS5S.js.map} +0 -0
- /package/dist/chunks/{chunk-RV5QY3IY.js.map → chunk-2U5M5IYH.js.map} +0 -0
- /package/dist/chunks/{chunk-PWOG3OMH.js.map → chunk-2X6JZAKH.js.map} +0 -0
- /package/dist/chunks/{chunk-BR6EWAKQ.js.map → chunk-3QGJXD7U.js.map} +0 -0
- /package/dist/chunks/{chunk-XFNCCDJK.js.map → chunk-435DYOG4.js.map} +0 -0
- /package/dist/chunks/{chunk-Y44FAVKA.js.map → chunk-4OXIJ2EF.js.map} +0 -0
- /package/dist/chunks/{chunk-UC3ZACVN.js.map → chunk-6FWFSPUL.js.map} +0 -0
- /package/dist/chunks/{chunk-WPNT6IGU.js.map → chunk-A5GTZ7R2.js.map} +0 -0
- /package/dist/chunks/{chunk-BIGRB2H4.js.map → chunk-ACSG5R5P.js.map} +0 -0
- /package/dist/chunks/{chunk-QV43JSBP.js.map → chunk-AI6PBE5G.js.map} +0 -0
- /package/dist/chunks/{chunk-HXZ2JXCO.js.map → chunk-AX5ESG6K.js.map} +0 -0
- /package/dist/chunks/{chunk-DESOZLEL.js.map → chunk-B3XIVOLM.js.map} +0 -0
- /package/dist/chunks/{chunk-ZUN2WRCB.js.map → chunk-DECJPLLA.js.map} +0 -0
- /package/dist/chunks/{chunk-GSYPRZZU.js.map → chunk-DFCJYRT5.js.map} +0 -0
- /package/dist/chunks/{chunk-QNTR7X7D.js.map → chunk-DQLSLXDF.js.map} +0 -0
- /package/dist/chunks/{chunk-6Z2ZJ4BA.js.map → chunk-FHQTXWDA.js.map} +0 -0
- /package/dist/chunks/{chunk-BLM6IQS4.js.map → chunk-GANFMGV7.js.map} +0 -0
- /package/dist/chunks/{chunk-REDD2WY7.js.map → chunk-GBS6ATYF.js.map} +0 -0
- /package/dist/chunks/{chunk-ORVWGSLG.js.map → chunk-GCCFTP47.js.map} +0 -0
- /package/dist/chunks/{chunk-FKIO77IY.js.map → chunk-GNEDN6MU.js.map} +0 -0
- /package/dist/chunks/{chunk-NS7EU37U.js.map → chunk-HB5ZN5KQ.js.map} +0 -0
- /package/dist/chunks/{chunk-EFQ6FUFZ.js.map → chunk-HELINLSD.js.map} +0 -0
- /package/dist/chunks/{chunk-AY7B43MK.js.map → chunk-HKCIZR5P.js.map} +0 -0
- /package/dist/chunks/{chunk-NPZY5OJ5.js.map → chunk-HTBMDD6Y.js.map} +0 -0
- /package/dist/chunks/{chunk-LN26A356.js.map → chunk-I5E4MT3C.js.map} +0 -0
- /package/dist/chunks/{chunk-KK2L4FD2.js.map → chunk-IJZ7SLBV.js.map} +0 -0
- /package/dist/chunks/{chunk-W4E2N7TY.js.map → chunk-IZVN6K6U.js.map} +0 -0
- /package/dist/chunks/{chunk-465CVUN4.js.map → chunk-L2NNJ4XL.js.map} +0 -0
- /package/dist/chunks/{chunk-JCUPTKQY.js.map → chunk-LF76CVOZ.js.map} +0 -0
- /package/dist/chunks/{chunk-ZATO2QOS.js.map → chunk-LFPTXRMM.js.map} +0 -0
- /package/dist/chunks/{chunk-WLUGKIYQ.js.map → chunk-LQRP2VRQ.js.map} +0 -0
- /package/dist/chunks/{chunk-UGAT33T5.js.map → chunk-LYGD5P7O.js.map} +0 -0
- /package/dist/chunks/{chunk-CRWNJ62V.js.map → chunk-M2OZ4SVS.js.map} +0 -0
- /package/dist/chunks/{chunk-I32JTWDW.js.map → chunk-MGZSEPDY.js.map} +0 -0
- /package/dist/chunks/{chunk-HYFX32Y3.js.map → chunk-MJBGVVI5.js.map} +0 -0
- /package/dist/chunks/{chunk-YPRKTJ5P.js.map → chunk-MYL75RA4.js.map} +0 -0
- /package/dist/chunks/{chunk-AE4LOPZF.js.map → chunk-PMX2WTZL.js.map} +0 -0
- /package/dist/chunks/{chunk-FPLDTTM2.js.map → chunk-QWSZ5P4C.js.map} +0 -0
- /package/dist/chunks/{chunk-T5POXPXY.js.map → chunk-RSIWTHYS.js.map} +0 -0
- /package/dist/chunks/{chunk-UP3SWACV.js.map → chunk-S4QOQGAT.js.map} +0 -0
- /package/dist/chunks/{chunk-ZRBGY4SL.js.map → chunk-SGRO4RJP.js.map} +0 -0
- /package/dist/chunks/{chunk-JAYPFJGZ.js.map → chunk-TZZOQ62Z.js.map} +0 -0
- /package/dist/chunks/{chunk-CMAZ3DYB.js.map → chunk-UGDZ7MLG.js.map} +0 -0
- /package/dist/chunks/{chunk-2NFPIARP.js.map → chunk-VFVWHYHT.js.map} +0 -0
- /package/dist/chunks/{chunk-5UB2LLPG.js.map → chunk-VZ4PKWLF.js.map} +0 -0
- /package/dist/chunks/{chunk-WLAI3VCE.js.map → chunk-WKFHQQOU.js.map} +0 -0
- /package/dist/chunks/{chunk-JSFF2HGX.js.map → chunk-WKPRYH24.js.map} +0 -0
- /package/dist/chunks/{chunk-VR4MTSMH.js.map → chunk-WQFHJ4TO.js.map} +0 -0
- /package/dist/chunks/{chunk-ZNYKZ3MI.js.map → chunk-XPLHAOGE.js.map} +0 -0
- /package/dist/chunks/{chunk-2NGXQQPP.js.map → chunk-XX2SP5AM.js.map} +0 -0
- /package/dist/chunks/{chunk-T2PF65KB.js.map → chunk-YDSWGJWF.js.map} +0 -0
- /package/dist/chunks/{chunk-LUSUJZR2.js.map → chunk-YJ6NWB2B.js.map} +0 -0
- /package/dist/chunks/{chunk-JH3SDABI.js.map → chunk-YUYNIAJX.js.map} +0 -0
- /package/dist/chunks/{chunk-TX2PUHTP.js.map → chunk-YXIG4OT2.js.map} +0 -0
- /package/dist/chunks/{crash-report-2IRIZSBD.js.map → commands-ZCNZVYTG.js.map} +0 -0
- /package/dist/chunks/{dist-FNGLTQIG.js.map → crash-report-K53VF4H5.js.map} +0 -0
- /package/dist/chunks/{dist-GSYFGRQT.js.map → dist-6IPPA55L.js.map} +0 -0
- /package/dist/chunks/{dist-45IFTDJW.js.map → dist-H53G25BE.js.map} +0 -0
- /package/dist/chunks/{dist-RQJEJN3Z.js.map → dist-L5LBM77I.js.map} +0 -0
- /package/dist/chunks/{dist-OJTB6QLR.js.map → dist-RIH2Q2ER.js.map} +0 -0
- /package/dist/chunks/{dist-OCZJJFHF.js.map → dist-RTIKLSUV.js.map} +0 -0
- /package/dist/chunks/{dist-TWYNAZDN.js.map → dist-T6KE7URX.js.map} +0 -0
- /package/dist/chunks/{doctor-NKPCWPB4.js.map → dist-VSJGDIXP.js.map} +0 -0
- /package/dist/chunks/{dist-NL7WG7PX.js.map → dist-XNGK3C4G.js.map} +0 -0
- /package/dist/chunks/{home-5OIZIDIT.js.map → doctor-DOCGTBME.js.map} +0 -0
- /package/dist/chunks/{drain-YTSVAQP5.js.map → drain-LT3J2MEA.js.map} +0 -0
- /package/dist/chunks/{eval-ILFXDQUQ.js.map → eval-DH26W2QK.js.map} +0 -0
- /package/dist/chunks/{github-FH7PPWVW.js.map → github-JTMZJAZL.js.map} +0 -0
- /package/dist/chunks/{lifecycle-RTDYXKBW.js.map → home-GGVNSCCU.js.map} +0 -0
- /package/dist/chunks/{live-44HBQCQY.js.map → host-6CUYPX4T.js.map} +0 -0
- /package/dist/chunks/{learn-RHNMJ4BD.js.map → learn-PAO3IOYA.js.map} +0 -0
- /package/dist/chunks/{learn-builtin-UQ3MWGK6.js.map → learn-builtin-DXZUXOGG.js.map} +0 -0
- /package/dist/chunks/{login-J4PWR4FM.js.map → lifecycle-KDN4D7DP.js.map} +0 -0
- /package/dist/chunks/{output-schema-FZXJ7V33.js.map → live-XWJ2JOFO.js.map} +0 -0
- /package/dist/chunks/{providers-EQ32NZAT.js.map → login-3Q2HKQUW.js.map} +0 -0
- /package/dist/chunks/{logs-22QAEH2Q.js.map → logs-UYB55HOX.js.map} +0 -0
- /package/dist/chunks/{resume-VXHGE5GC.js.map → open-QUDHJK5H.js.map} +0 -0
- /package/dist/chunks/{resume-command-DHPXCZVL.js.map → output-schema-TLW5FA37.js.map} +0 -0
- /package/dist/chunks/{session-step-44XBOUDV.js.map → palette-WDPS7W6Q.js.map} +0 -0
- /package/dist/chunks/{start-check-KVZFDBD3.js.map → peers-OBENILN2.js.map} +0 -0
- /package/dist/chunks/{store-JLTSSGKL.js.map → prefix-MLAG4KTK.js.map} +0 -0
- /package/dist/chunks/{store-KFJWAELA.js.map → providers-PJIHLTXP.js.map} +0 -0
- /package/dist/chunks/{store-QNY242NN.js.map → pty-HDEXCPR6.js.map} +0 -0
- /package/dist/chunks/{schedule-OJMZEWJG.js.map → schedule-42N4JOQJ.js.map} +0 -0
- /package/dist/chunks/{skills-YHAQXVP2.js.map → skills-V3VDOL3D.js.map} +0 -0
- /package/dist/chunks/{state-NXFKMBOX.js.map → state-HX3XRNPC.js.map} +0 -0
- /package/dist/chunks/{upgrade-PROVWX55.js.map → upgrade-HDW5MWLE.js.map} +0 -0
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
import { createRequire as __namzuCreateRequire } from 'node:module';
|
|
2
|
+
const require = __namzuCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
hostCommandShell
|
|
5
|
+
} from "./chunk-YTE3QIH3.js";
|
|
6
|
+
import {
|
|
7
|
+
__name
|
|
8
|
+
} from "./chunk-76FLAFCG.js";
|
|
9
|
+
|
|
10
|
+
// src/context/environment.ts
|
|
11
|
+
import { execFile } from "node:child_process";
|
|
12
|
+
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
13
|
+
import { type as osType, release } from "node:os";
|
|
14
|
+
import { resolve } from "node:path";
|
|
15
|
+
import { promisify } from "node:util";
|
|
16
|
+
var run = promisify(execFile);
|
|
17
|
+
var GIT_TIMEOUT_MS = 2e3;
|
|
18
|
+
function detectWsl(env = process.env, probe = {}) {
|
|
19
|
+
const distro = env.WSL_DISTRO_NAME?.trim() || null;
|
|
20
|
+
const socket = env.WSL_INTEROP?.trim() || null;
|
|
21
|
+
if (!distro && !socket) return void 0;
|
|
22
|
+
const exists = probe.exists ?? existsSync;
|
|
23
|
+
const list = probe.list ?? ((path) => {
|
|
24
|
+
try {
|
|
25
|
+
return readdirSync(path);
|
|
26
|
+
} catch {
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
const interop = socket !== null || exists("/proc/sys/fs/binfmt_misc/WSLInterop");
|
|
31
|
+
const mountRoot = probe.mountRoot ?? readWslMountRoot();
|
|
32
|
+
const drives = list(mountRoot === "/" ? "/" : mountRoot.slice(0, -1)).filter((name) => /^[a-z]$/i.test(name)).sort().map((name) => `${mountRoot}${name}`);
|
|
33
|
+
return { distro, interop, drives, mountRoot };
|
|
34
|
+
}
|
|
35
|
+
__name(detectWsl, "detectWsl");
|
|
36
|
+
var DEFAULT_WSL_MOUNT_ROOT = "/mnt/";
|
|
37
|
+
function parseWslMountRoot(wslConf) {
|
|
38
|
+
if (!wslConf) return DEFAULT_WSL_MOUNT_ROOT;
|
|
39
|
+
let inAutomount = false;
|
|
40
|
+
let root;
|
|
41
|
+
for (const raw of wslConf.replace(/^\uFEFF/, "").split(/\r?\n/)) {
|
|
42
|
+
const line = raw.trim();
|
|
43
|
+
if (line.length === 0 || line.startsWith("#") || line.startsWith(";")) continue;
|
|
44
|
+
const section = /^\[([^\]]+)\]$/.exec(line);
|
|
45
|
+
if (section) {
|
|
46
|
+
inAutomount = (section[1] ?? "").trim().toLowerCase() === "automount";
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const eq = line.indexOf("=");
|
|
50
|
+
if (!inAutomount || eq <= 0 || line.slice(0, eq).trim().toLowerCase() !== "root") continue;
|
|
51
|
+
let value = line.slice(eq + 1).replace(/\s[#;].*$/, "").trim();
|
|
52
|
+
if (/^(["']).*\1$/.test(value)) value = value.slice(1, -1);
|
|
53
|
+
root = value;
|
|
54
|
+
}
|
|
55
|
+
if (!root || !root.startsWith("/")) return DEFAULT_WSL_MOUNT_ROOT;
|
|
56
|
+
return root.endsWith("/") ? root : `${root}/`;
|
|
57
|
+
}
|
|
58
|
+
__name(parseWslMountRoot, "parseWslMountRoot");
|
|
59
|
+
function readWslMountRoot(readFile = (path) => {
|
|
60
|
+
try {
|
|
61
|
+
return readFileSync(path, "utf8");
|
|
62
|
+
} catch {
|
|
63
|
+
return void 0;
|
|
64
|
+
}
|
|
65
|
+
}) {
|
|
66
|
+
return parseWslMountRoot(readFile("/etc/wsl.conf"));
|
|
67
|
+
}
|
|
68
|
+
__name(readWslMountRoot, "readWslMountRoot");
|
|
69
|
+
function wslSystem32(mountRoot = DEFAULT_WSL_MOUNT_ROOT) {
|
|
70
|
+
return `${mountRoot}c/Windows/System32`;
|
|
71
|
+
}
|
|
72
|
+
__name(wslSystem32, "wslSystem32");
|
|
73
|
+
function localIsoDate(now) {
|
|
74
|
+
const pad = /* @__PURE__ */ __name((n) => String(n).padStart(2, "0"), "pad");
|
|
75
|
+
return `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}`;
|
|
76
|
+
}
|
|
77
|
+
__name(localIsoDate, "localIsoDate");
|
|
78
|
+
async function git(cwd, args) {
|
|
79
|
+
try {
|
|
80
|
+
const { stdout } = await run("git", [...args], { cwd, timeout: GIT_TIMEOUT_MS });
|
|
81
|
+
const out = stdout.trim();
|
|
82
|
+
return out.length > 0 ? out : null;
|
|
83
|
+
} catch {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
__name(git, "git");
|
|
88
|
+
async function readEnvironmentFacts(cwd, now = /* @__PURE__ */ new Date(), probe = {}) {
|
|
89
|
+
const readGit = probe.git ?? git;
|
|
90
|
+
const [insideWorkTree, branch, gitDir, commonDir] = await Promise.all([
|
|
91
|
+
readGit(cwd, ["rev-parse", "--is-inside-work-tree"]),
|
|
92
|
+
readGit(cwd, ["symbolic-ref", "--short", "HEAD"]),
|
|
93
|
+
readGit(cwd, ["rev-parse", "--absolute-git-dir"]),
|
|
94
|
+
readGit(cwd, ["rev-parse", "--path-format=absolute", "--git-common-dir"])
|
|
95
|
+
]);
|
|
96
|
+
const isRepository = insideWorkTree === "true";
|
|
97
|
+
return {
|
|
98
|
+
today: localIsoDate(now),
|
|
99
|
+
// A repository with no symbolic HEAD is on a detached one. Distinguishing
|
|
100
|
+
// that from "not a repository" matters: on a detached HEAD a commit goes
|
|
101
|
+
// nowhere reachable, and an agent about to commit should know.
|
|
102
|
+
branch: isRepository ? branch ?? "detached" : null,
|
|
103
|
+
isRepository,
|
|
104
|
+
...isRepository && gitDir && commonDir ? { linkedWorktree: resolve(cwd, gitDir) !== resolve(cwd, commonDir) } : {},
|
|
105
|
+
osVersion: (probe.osVersion ?? (() => `${osType()} ${release()}`))(),
|
|
106
|
+
executionShell: (probe.executionShell ?? hostCommandShell)()
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
__name(readEnvironmentFacts, "readEnvironmentFacts");
|
|
110
|
+
function environmentFactLines(facts) {
|
|
111
|
+
const lines = [`Today's date is ${facts.today}.`];
|
|
112
|
+
if (!facts.isRepository) {
|
|
113
|
+
lines.push("The working directory is not a git repository.");
|
|
114
|
+
} else if (facts.branch === "detached") {
|
|
115
|
+
lines.push(
|
|
116
|
+
"The working directory is a git repository with a detached HEAD \u2014 no branch is checked out, so a commit made here is not reachable from any branch."
|
|
117
|
+
);
|
|
118
|
+
} else {
|
|
119
|
+
lines.push(`The working directory is a git repository on branch \`${facts.branch}\`.`);
|
|
120
|
+
}
|
|
121
|
+
if (facts.isRepository && facts.linkedWorktree) {
|
|
122
|
+
lines.push(
|
|
123
|
+
"This is a linked git worktree: it has its own working files and HEAD, but shares repository history with other worktrees."
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
return lines;
|
|
127
|
+
}
|
|
128
|
+
__name(environmentFactLines, "environmentFactLines");
|
|
129
|
+
var FACTS_FRAMING = "These are facts about right now. Prefer them over any date or branch you would otherwise assume.";
|
|
130
|
+
function composeEnvironmentPrompt(facts, options = {}) {
|
|
131
|
+
const stable = options.stable === true;
|
|
132
|
+
const lines = stable ? [] : [FACTS_FRAMING, ...environmentFactLines(facts)];
|
|
133
|
+
if (facts.additionalDirectories && facts.additionalDirectories.length > 0) {
|
|
134
|
+
lines.push(
|
|
135
|
+
`Besides the working directory, the file tools may reach these directories, by absolute path: ${facts.additionalDirectories.map((d) => `\`${d}\``).join(", ")}. Relative paths still resolve against the working directory.`
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
if (facts.osVersion) lines.push(`Host OS version: ${facts.osVersion}.`);
|
|
139
|
+
if (facts.executionShell) {
|
|
140
|
+
const shell = facts.executionShell;
|
|
141
|
+
lines.push(
|
|
142
|
+
`Host execution shell: ${shell.path ? `\`${shell.path}\`` : "the platform command shell"} (${shell.dialect} dialect).`
|
|
143
|
+
);
|
|
144
|
+
if (facts.boundary?.sandbox) {
|
|
145
|
+
lines.push(
|
|
146
|
+
"Inside the sandbox, commands use bash if the guest has it, otherwise /bin/sh; the host shell above applies only to host execution."
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (facts.boundary) lines.push(...boundaryLines(facts.boundary, stable));
|
|
151
|
+
if (facts.wsl) lines.push(...wslLines(facts.wsl, facts.boundary));
|
|
152
|
+
return `## Environment
|
|
153
|
+
|
|
154
|
+
${lines.join("\n")}`;
|
|
155
|
+
}
|
|
156
|
+
__name(composeEnvironmentPrompt, "composeEnvironmentPrompt");
|
|
157
|
+
function permissionSentence(boundary, stable = false) {
|
|
158
|
+
if (stable) {
|
|
159
|
+
return "Shell commands and file changes go through the permission settings. Whether the user is asked first depends on the permission mode; you are told whenever the mode is anything but the usual one, and when it ends (plan mode has its own notices).";
|
|
160
|
+
}
|
|
161
|
+
if (boundary.delegated) {
|
|
162
|
+
return "Your shell commands and file changes follow the permission mode of the session that started you. You have no one to ask yourself, and a refused call stays refused.";
|
|
163
|
+
}
|
|
164
|
+
const noOneAsks = boundary.interactive ? "" : " Nobody is at the terminal, so a call that would ask is refused.";
|
|
165
|
+
switch (boundary.mode) {
|
|
166
|
+
case void 0:
|
|
167
|
+
return "Shell commands and file changes go through the permission settings, which may ask the user before they run.";
|
|
168
|
+
case "prompt":
|
|
169
|
+
return `Shell commands and file changes the user's rules do not already allow are put to the user before they run.${noOneAsks}`;
|
|
170
|
+
case "accept-edits":
|
|
171
|
+
return `File edits and simple file commands in the working directory run without asking; any other shell command or change is put to the user first.${noOneAsks}`;
|
|
172
|
+
case "plan":
|
|
173
|
+
return "This is plan mode: reading is allowed and every change is refused, except to the plan file, until the user leaves plan mode.";
|
|
174
|
+
case "bypass":
|
|
175
|
+
return "Permission prompts are off in this mode, so calls run without asking. What always needs the user still does: removing a home or top-level directory, leaving a sandbox, and anything the user's rules say to ask about. Protected files and the safety rules apply as usual.";
|
|
176
|
+
case "classify":
|
|
177
|
+
return `Calls that would otherwise ask the user are checked automatically instead, and some may still be refused. A refused call is a decision, not an error to route around.${noOneAsks}`;
|
|
178
|
+
case "strict":
|
|
179
|
+
return "Only preapproved tools run; any other call is refused without asking.";
|
|
180
|
+
case "auto":
|
|
181
|
+
return "Nobody is asked: routine calls run and anything out of bounds is refused.";
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
__name(permissionSentence, "permissionSentence");
|
|
185
|
+
function boundaryLines(boundary, stable = false) {
|
|
186
|
+
if (!boundary.sandbox) {
|
|
187
|
+
const outside = boundary.delegated ? "A path anywhere else is refused, or decided by the session that started you, and you cannot approve it yourself. If you needed a directory, name it in your summary." : boundary.interactive ? "A path anywhere else is not refused outright: the user is asked to approve that call first, every time \u2014 in plan mode too, for a read; the strict permission mode refuses it. When you need a directory repeatedly, suggest the user add it with `/add-dir <path>`." : "A path anywhere else is refused in this session, because it needs a person to approve it and nobody is at the terminal. If you need one, say which directory and why, so the user can add it (`--add-dir <path>`) and run again.";
|
|
188
|
+
return [
|
|
189
|
+
`Tools run on this machine, not in a sandbox. ${permissionSentence(boundary, stable)}`,
|
|
190
|
+
`The file tools reach the working directory and any added directories directly. ${outside} A refusal that remains is a decision, not a missing file; say so rather than retrying another spelling.`
|
|
191
|
+
];
|
|
192
|
+
}
|
|
193
|
+
const { environment, enforced } = boundary.sandbox;
|
|
194
|
+
const network = enforced.includes("network") ? " The network is cut inside it." : " It does not cut the network on this machine.";
|
|
195
|
+
const escapeRoute = boundary.escape === "ask" ? "When one command genuinely cannot work inside it (it needs the network, a path it does not mount, or a host tool), set `dangerously_disable_sandbox: true` on that one `bash` call: the user is asked to approve it every time, whatever else is approved; the plan and strict permission modes refuse it. Never use it to get around a permission refusal." : boundary.escape === "unattended" ? "When one command genuinely cannot work inside it, `dangerously_disable_sandbox: true` on that `bash` call runs it on the host: this session is configured to allow that without asking, and every use is recorded. Use it only when the sandbox is the obstacle." : "Commands cannot leave the sandbox in this session. When one needs something the sandbox withholds, say what and why, and let the user decide.";
|
|
196
|
+
const files = enforced.includes("filesystem") ? " Inside it, commands can read and write the working directory and the added directories; the system directories programs need are readable, /tmp is private to the command, and the rest of this machine (the home directory, other projects, other mounts) cannot be reached from it, so no spelling of such a path will be found." : " It does not confine the file system here, so commands can still see files outside the working directory.";
|
|
197
|
+
return [
|
|
198
|
+
`Shell commands run in a sandbox (${environment}${enforced.length > 0 ? `, enforcing ${enforced.join(", ")}` : ", enforcing nothing on this platform"}).${files}${network} The file tools reach only the working directory and the added directories.`,
|
|
199
|
+
`${boundary.delegated ? "To reach another directory, name it in your summary; the session that started you decides whether to add it." : "To reach another directory, ask the user to add it with `/add-dir <path>` (the next turn binds it)."} ${escapeRoute}`
|
|
200
|
+
];
|
|
201
|
+
}
|
|
202
|
+
__name(boundaryLines, "boundaryLines");
|
|
203
|
+
function wslLines(wsl, boundary) {
|
|
204
|
+
const sandboxed = boundary?.sandbox?.enforced.includes("filesystem") === true;
|
|
205
|
+
const fileTools = boundary?.sandbox !== void 0 ? "the file tools reach them only once added with `/add-dir`" : boundary?.interactive === false ? "a file tool reaching them is refused in this session, since nobody is here to approve it" : "a file tool reaching them asks for approval first, like any other outside path";
|
|
206
|
+
const root = wsl.mountRoot ?? DEFAULT_WSL_MOUNT_ROOT;
|
|
207
|
+
const drives = wsl.drives.length > 0 ? `Windows drives are mounted under ${wsl.drives.map((d) => `\`${d}\``).join(", ")} (\`C:\\Users\` is \`${root}c/Users\`; \`wslpath -w\` and \`wslpath -u\` convert).` : `No Windows drive is mounted under \`${root === "/" ? "/" : root.slice(0, -1)}\` right now.`;
|
|
208
|
+
const reach = sandboxed ? "They are outside the sandbox, so a command there needs `/add-dir` or the sandbox escape." : `They are outside the working directory, so ${fileTools}.`;
|
|
209
|
+
const interop = wsl.interop ? `Windows programs start from the shell through WSL interop, by their \`.exe\` name: \`powershell.exe -NoProfile -Command ...\`, \`cmd.exe /c ...\`, \`explorer.exe .\` (it exits 1 even when it succeeds). \`cmd.exe\` started from a Linux directory warns that UNC paths are unsupported and falls back to C:\\Windows, so \`cd\` under \`${root}c\` first or use \`powershell.exe\`. If a name is not found, the Windows side of \`PATH\` was not appended; \`cmd.exe\` is under \`${wslSystem32(root)}\` and \`powershell.exe\` under its \`WindowsPowerShell/v1.0\`.${sandboxed ? " The sandbox does not mount the Windows drives those programs live on, so running one needs the sandbox escape." : ""}` : "WSL interop is off here, so Windows `.exe` programs cannot be started from the shell.";
|
|
210
|
+
return [
|
|
211
|
+
`This machine is Windows Subsystem for Linux${wsl.distro ? ` (distro \`${wsl.distro}\`)` : ""}. ${drives} ${reach}`,
|
|
212
|
+
interop
|
|
213
|
+
];
|
|
214
|
+
}
|
|
215
|
+
__name(wslLines, "wslLines");
|
|
216
|
+
|
|
217
|
+
// src/integrations/providers/harness-credentials.ts
|
|
218
|
+
import { execFileSync } from "node:child_process";
|
|
219
|
+
import { randomBytes } from "node:crypto";
|
|
220
|
+
import {
|
|
221
|
+
closeSync,
|
|
222
|
+
fsyncSync,
|
|
223
|
+
openSync,
|
|
224
|
+
readFileSync as readFileSync2,
|
|
225
|
+
renameSync,
|
|
226
|
+
statSync,
|
|
227
|
+
unlinkSync,
|
|
228
|
+
writeFileSync
|
|
229
|
+
} from "node:fs";
|
|
230
|
+
import { homedir } from "node:os";
|
|
231
|
+
import { basename, dirname, isAbsolute, join, resolve as resolve2 } from "node:path";
|
|
232
|
+
var MAX_CREDENTIAL_FILE_BYTES = 1024 * 1024;
|
|
233
|
+
function claudeCredentialsPath(home = homedir(), env = process.env) {
|
|
234
|
+
const configured = env.CLAUDE_CONFIG_DIR;
|
|
235
|
+
return join(configured ? resolve2(configured) : join(home, ".claude"), ".credentials.json");
|
|
236
|
+
}
|
|
237
|
+
__name(claudeCredentialsPath, "claudeCredentialsPath");
|
|
238
|
+
function windowsPathToWsl(path, mountRoot = DEFAULT_WSL_MOUNT_ROOT) {
|
|
239
|
+
const normalized = path.trim().replaceAll("\\", "/");
|
|
240
|
+
const match = /^([A-Za-z]):\/(.+)$/u.exec(normalized);
|
|
241
|
+
if (!match?.[1] || !match[2] || match[2].split("/").includes("..")) return null;
|
|
242
|
+
return `${mountRoot}${match[1].toLowerCase()}/${match[2]}`;
|
|
243
|
+
}
|
|
244
|
+
__name(windowsPathToWsl, "windowsPathToWsl");
|
|
245
|
+
function wslWindowsHome(env = process.env, run2 = execFileSync, command, mountRoot) {
|
|
246
|
+
if (!env.WSL_DISTRO_NAME && !env.WSL_INTEROP) return null;
|
|
247
|
+
const root = mountRoot ?? readWslMountRoot();
|
|
248
|
+
const cmd = command ?? `${wslSystem32(root)}/cmd.exe`;
|
|
249
|
+
try {
|
|
250
|
+
if (!statSync(cmd).isFile()) return null;
|
|
251
|
+
const output = run2(cmd, ["/d", "/s", "/c", "echo", "%USERPROFILE%"], {
|
|
252
|
+
encoding: "utf8",
|
|
253
|
+
timeout: 1e3,
|
|
254
|
+
// The interop shim that fronts a Windows process does not honour
|
|
255
|
+
// SIGTERM the way a Linux process does; a probe that overran its
|
|
256
|
+
// second was left alive, and the synchronous call waited on it for
|
|
257
|
+
// as long as Windows took to answer. SIGKILL is what actually ends
|
|
258
|
+
// it, and the answer is "no paired home", which is the correct one
|
|
259
|
+
// for a probe that could not be made in time.
|
|
260
|
+
killSignal: "SIGKILL",
|
|
261
|
+
windowsHide: true,
|
|
262
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
263
|
+
});
|
|
264
|
+
return windowsPathToWsl(String(output), root);
|
|
265
|
+
} catch {
|
|
266
|
+
return null;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
__name(wslWindowsHome, "wslWindowsHome");
|
|
270
|
+
function readClaudeFileCredentialCandidates(home, env = process.env, windowsHome = home === void 0 ? wslWindowsHome(env) : null) {
|
|
271
|
+
return claudeCredentialSearchPaths(home, env, windowsHome).flatMap((path) => {
|
|
272
|
+
const credential = readClaudeCredentialFile(path);
|
|
273
|
+
return credential ? [{ path, credential }] : [];
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
__name(readClaudeFileCredentialCandidates, "readClaudeFileCredentialCandidates");
|
|
277
|
+
function claudeCredentialSearchPaths(home, env = process.env, windowsHome = home === void 0 ? wslWindowsHome(env) : null) {
|
|
278
|
+
const paths = env.CLAUDE_CONFIG_DIR ? [claudeCredentialsPath(home, env)] : [
|
|
279
|
+
claudeCredentialsPath(home, env),
|
|
280
|
+
...windowsHome ? [claudeCredentialsPath(windowsHome, {})] : []
|
|
281
|
+
];
|
|
282
|
+
return [...new Set(paths)];
|
|
283
|
+
}
|
|
284
|
+
__name(claudeCredentialSearchPaths, "claudeCredentialSearchPaths");
|
|
285
|
+
function codexCredentialsPath(home = homedir(), env = process.env) {
|
|
286
|
+
const configured = env.CODEX_HOME?.trim();
|
|
287
|
+
const root = configured ? isAbsolute(configured) ? configured : resolve2(configured) : join(home, ".codex");
|
|
288
|
+
return join(root, "auth.json");
|
|
289
|
+
}
|
|
290
|
+
__name(codexCredentialsPath, "codexCredentialsPath");
|
|
291
|
+
function opencodeCredentialsPath(home = homedir(), env = process.env) {
|
|
292
|
+
const configured = env.XDG_DATA_HOME?.trim();
|
|
293
|
+
const root = configured && isAbsolute(configured) ? configured : join(home, ".local", "share");
|
|
294
|
+
return join(root, "opencode", "auth.json");
|
|
295
|
+
}
|
|
296
|
+
__name(opencodeCredentialsPath, "opencodeCredentialsPath");
|
|
297
|
+
function readOpenCodeApiCredentialCandidates(home, env = process.env, windowsHome = home === void 0 ? wslWindowsHome(env) : null) {
|
|
298
|
+
const parse = /* @__PURE__ */ __name((value, source) => {
|
|
299
|
+
const root = record(value);
|
|
300
|
+
return ["opencode", "opencode-go"].flatMap((id) => {
|
|
301
|
+
const entry = record(root?.[id]);
|
|
302
|
+
const apiKey = typeof entry?.key === "string" ? entry.key.trim() : void 0;
|
|
303
|
+
return entry?.type === "api" && apiKey && apiKey !== "public" ? [
|
|
304
|
+
{
|
|
305
|
+
provider: id === "opencode" ? "zen" : "zen-go",
|
|
306
|
+
apiKey,
|
|
307
|
+
source
|
|
308
|
+
}
|
|
309
|
+
] : [];
|
|
310
|
+
});
|
|
311
|
+
}, "parse");
|
|
312
|
+
if (env.OPENCODE_AUTH_CONTENT !== void 0) {
|
|
313
|
+
try {
|
|
314
|
+
if (Buffer.byteLength(env.OPENCODE_AUTH_CONTENT, "utf8") > MAX_CREDENTIAL_FILE_BYTES)
|
|
315
|
+
return [];
|
|
316
|
+
return parse(JSON.parse(env.OPENCODE_AUTH_CONTENT), {
|
|
317
|
+
kind: "env",
|
|
318
|
+
envName: "OPENCODE_AUTH_CONTENT"
|
|
319
|
+
});
|
|
320
|
+
} catch {
|
|
321
|
+
return [];
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
const paths = env.XDG_DATA_HOME?.trim() && isAbsolute(env.XDG_DATA_HOME.trim()) ? [opencodeCredentialsPath(home, env)] : [
|
|
325
|
+
opencodeCredentialsPath(home, env),
|
|
326
|
+
...windowsHome ? [opencodeCredentialsPath(windowsHome, {})] : []
|
|
327
|
+
];
|
|
328
|
+
return [...new Set(paths)].flatMap(
|
|
329
|
+
(path) => parse(readCredentialJson(path), { kind: "opencode-file", path })
|
|
330
|
+
);
|
|
331
|
+
}
|
|
332
|
+
__name(readOpenCodeApiCredentialCandidates, "readOpenCodeApiCredentialCandidates");
|
|
333
|
+
function readCredentialJson(path) {
|
|
334
|
+
try {
|
|
335
|
+
const stat = statSync(path);
|
|
336
|
+
if (!stat.isFile() || stat.size <= 0 || stat.size > MAX_CREDENTIAL_FILE_BYTES) return null;
|
|
337
|
+
return JSON.parse(readFileSync2(path, "utf8"));
|
|
338
|
+
} catch {
|
|
339
|
+
return null;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
__name(readCredentialJson, "readCredentialJson");
|
|
343
|
+
function record(value) {
|
|
344
|
+
return typeof value === "object" && value !== null ? value : null;
|
|
345
|
+
}
|
|
346
|
+
__name(record, "record");
|
|
347
|
+
function optionalString(value) {
|
|
348
|
+
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
349
|
+
}
|
|
350
|
+
__name(optionalString, "optionalString");
|
|
351
|
+
function optionalFiniteNumber(value) {
|
|
352
|
+
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
353
|
+
}
|
|
354
|
+
__name(optionalFiniteNumber, "optionalFiniteNumber");
|
|
355
|
+
function optionalStringArray(value) {
|
|
356
|
+
if (!Array.isArray(value) || value.some((item) => typeof item !== "string")) return void 0;
|
|
357
|
+
return value;
|
|
358
|
+
}
|
|
359
|
+
__name(optionalStringArray, "optionalStringArray");
|
|
360
|
+
function readClaudeFileCredential(home = homedir(), env = process.env) {
|
|
361
|
+
return readClaudeCredentialFile(claudeCredentialsPath(home, env));
|
|
362
|
+
}
|
|
363
|
+
__name(readClaudeFileCredential, "readClaudeFileCredential");
|
|
364
|
+
function readClaudeCredentialFile(path) {
|
|
365
|
+
const root = record(readCredentialJson(path));
|
|
366
|
+
const oauth = record(root?.claudeAiOauth);
|
|
367
|
+
const accessToken = optionalString(oauth?.accessToken);
|
|
368
|
+
if (!accessToken) return null;
|
|
369
|
+
return {
|
|
370
|
+
accessToken,
|
|
371
|
+
refreshToken: optionalString(oauth?.refreshToken),
|
|
372
|
+
expiresAt: optionalFiniteNumber(oauth?.expiresAt),
|
|
373
|
+
scopes: optionalStringArray(oauth?.scopes)
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
__name(readClaudeCredentialFile, "readClaudeCredentialFile");
|
|
377
|
+
function sameClaudeCredential(left, right) {
|
|
378
|
+
return left.accessToken === right.accessToken && left.refreshToken === right.refreshToken && left.expiresAt === right.expiresAt && JSON.stringify(left.scopes ?? []) === JSON.stringify(right.scopes ?? []);
|
|
379
|
+
}
|
|
380
|
+
__name(sameClaudeCredential, "sameClaudeCredential");
|
|
381
|
+
function replaceClaudeCredentialFile(path, expected, replacement) {
|
|
382
|
+
const root = record(readCredentialJson(path));
|
|
383
|
+
const oauth = record(root?.claudeAiOauth);
|
|
384
|
+
const current = readClaudeCredentialFile(path);
|
|
385
|
+
if (!root || !oauth || !current) return { replaced: false, current };
|
|
386
|
+
if (!sameClaudeCredential(current, expected)) return { replaced: false, current };
|
|
387
|
+
const updated = {
|
|
388
|
+
...root,
|
|
389
|
+
claudeAiOauth: {
|
|
390
|
+
...oauth,
|
|
391
|
+
accessToken: replacement.accessToken,
|
|
392
|
+
...replacement.refreshToken === void 0 ? {} : { refreshToken: replacement.refreshToken },
|
|
393
|
+
...replacement.expiresAt === void 0 ? {} : { expiresAt: replacement.expiresAt },
|
|
394
|
+
...replacement.scopes === void 0 ? {} : { scopes: replacement.scopes }
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
const tempPath = join(
|
|
398
|
+
dirname(path),
|
|
399
|
+
`.${basename(path)}.namzu-${process.pid}-${randomBytes(8).toString("hex")}.tmp`
|
|
400
|
+
);
|
|
401
|
+
let descriptor;
|
|
402
|
+
try {
|
|
403
|
+
descriptor = openSync(tempPath, "wx", 384);
|
|
404
|
+
writeFileSync(descriptor, `${JSON.stringify(updated, null, 2)}
|
|
405
|
+
`, "utf8");
|
|
406
|
+
fsyncSync(descriptor);
|
|
407
|
+
closeSync(descriptor);
|
|
408
|
+
descriptor = void 0;
|
|
409
|
+
const beforeCommit = readClaudeCredentialFile(path);
|
|
410
|
+
if (!beforeCommit || !sameClaudeCredential(beforeCommit, expected)) {
|
|
411
|
+
return { replaced: false, current: beforeCommit };
|
|
412
|
+
}
|
|
413
|
+
renameSync(tempPath, path);
|
|
414
|
+
return { replaced: true, current: replacement };
|
|
415
|
+
} finally {
|
|
416
|
+
if (descriptor !== void 0) {
|
|
417
|
+
try {
|
|
418
|
+
closeSync(descriptor);
|
|
419
|
+
} catch {
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
try {
|
|
423
|
+
unlinkSync(tempPath);
|
|
424
|
+
} catch {
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
__name(replaceClaudeCredentialFile, "replaceClaudeCredentialFile");
|
|
429
|
+
function codexCredentialFromTokens(tokens) {
|
|
430
|
+
if (tokens.accessToken.length === 0) return null;
|
|
431
|
+
const claims = jwtClaims(tokens.accessToken);
|
|
432
|
+
const accountId = tokens.accountId ?? claims.accountId;
|
|
433
|
+
if (!accountId) return null;
|
|
434
|
+
return {
|
|
435
|
+
accessToken: tokens.accessToken,
|
|
436
|
+
...tokens.refreshToken ? { refreshToken: tokens.refreshToken } : {},
|
|
437
|
+
accountId,
|
|
438
|
+
...claims.expiresAt === void 0 ? {} : { expiresAt: claims.expiresAt }
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
__name(codexCredentialFromTokens, "codexCredentialFromTokens");
|
|
442
|
+
function jwtClaims(token) {
|
|
443
|
+
const parts = token.split(".");
|
|
444
|
+
if (parts.length !== 3 || !parts[1]) return {};
|
|
445
|
+
try {
|
|
446
|
+
const payload = record(JSON.parse(Buffer.from(parts[1], "base64url").toString("utf8")));
|
|
447
|
+
const auth = record(payload?.["https://api.openai.com/auth"]);
|
|
448
|
+
const exp = optionalFiniteNumber(payload?.exp);
|
|
449
|
+
return {
|
|
450
|
+
...exp === void 0 ? {} : { expiresAt: exp * 1e3 },
|
|
451
|
+
...optionalString(auth?.chatgpt_account_id) ? { accountId: optionalString(auth?.chatgpt_account_id) } : {}
|
|
452
|
+
};
|
|
453
|
+
} catch {
|
|
454
|
+
return {};
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
__name(jwtClaims, "jwtClaims");
|
|
458
|
+
function readCodexFileCredential(home = homedir(), env = process.env) {
|
|
459
|
+
return readCodexCredentialFile(codexCredentialsPath(home, env));
|
|
460
|
+
}
|
|
461
|
+
__name(readCodexFileCredential, "readCodexFileCredential");
|
|
462
|
+
function readCodexFileCredentialCandidates(home, env = process.env, windowsHome = home === void 0 ? wslWindowsHome(env) : null) {
|
|
463
|
+
const paths = env.CODEX_HOME?.trim() ? [codexCredentialsPath(home, env)] : [
|
|
464
|
+
codexCredentialsPath(home, env),
|
|
465
|
+
...windowsHome ? [codexCredentialsPath(windowsHome, {})] : []
|
|
466
|
+
];
|
|
467
|
+
return [...new Set(paths)].flatMap((path) => {
|
|
468
|
+
const credential = readCodexCredentialFile(path);
|
|
469
|
+
return credential ? [{ path, credential }] : [];
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
__name(readCodexFileCredentialCandidates, "readCodexFileCredentialCandidates");
|
|
473
|
+
function readCodexCredentialFile(path) {
|
|
474
|
+
const root = record(readCredentialJson(path));
|
|
475
|
+
const tokens = record(root?.tokens);
|
|
476
|
+
const accessToken = optionalString(tokens?.access_token);
|
|
477
|
+
if (!accessToken) return null;
|
|
478
|
+
const accessClaims = jwtClaims(accessToken);
|
|
479
|
+
const idToken = optionalString(tokens?.id_token);
|
|
480
|
+
const idClaims = idToken ? jwtClaims(idToken) : {};
|
|
481
|
+
const accountId = optionalString(tokens?.account_id) ?? accessClaims.accountId ?? idClaims.accountId;
|
|
482
|
+
if (!accountId) return null;
|
|
483
|
+
return codexCredentialFromTokens({
|
|
484
|
+
accessToken,
|
|
485
|
+
...optionalString(tokens?.refresh_token) ? { refreshToken: optionalString(tokens?.refresh_token) } : {},
|
|
486
|
+
accountId
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
__name(readCodexCredentialFile, "readCodexCredentialFile");
|
|
490
|
+
function preferFresherCredential(left, right, now = Date.now()) {
|
|
491
|
+
if (!left) return right;
|
|
492
|
+
if (!right) return left;
|
|
493
|
+
const leftExpiry = left.expiresAt ?? Number.POSITIVE_INFINITY;
|
|
494
|
+
const rightExpiry = right.expiresAt ?? Number.POSITIVE_INFINITY;
|
|
495
|
+
const leftFresh = leftExpiry > now + 6e4;
|
|
496
|
+
const rightFresh = rightExpiry > now + 6e4;
|
|
497
|
+
if (leftFresh !== rightFresh) return leftFresh ? left : right;
|
|
498
|
+
return leftExpiry >= rightExpiry ? left : right;
|
|
499
|
+
}
|
|
500
|
+
__name(preferFresherCredential, "preferFresherCredential");
|
|
501
|
+
|
|
502
|
+
// src/integrations/providers/keychain.ts
|
|
503
|
+
import { execFileSync as execFileSync2 } from "node:child_process";
|
|
504
|
+
import { platform } from "node:os";
|
|
505
|
+
var KEYCHAIN_SERVICE = "Claude Code-credentials";
|
|
506
|
+
function readAgentKeychainCredential() {
|
|
507
|
+
if (platform() !== "darwin") return null;
|
|
508
|
+
let raw;
|
|
509
|
+
try {
|
|
510
|
+
raw = execFileSync2("security", ["find-generic-password", "-s", KEYCHAIN_SERVICE, "-w"], {
|
|
511
|
+
encoding: "utf8",
|
|
512
|
+
timeout: 5e3,
|
|
513
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
514
|
+
}).trim();
|
|
515
|
+
} catch {
|
|
516
|
+
return null;
|
|
517
|
+
}
|
|
518
|
+
if (raw.length === 0) return null;
|
|
519
|
+
let parsed;
|
|
520
|
+
try {
|
|
521
|
+
parsed = JSON.parse(raw);
|
|
522
|
+
} catch {
|
|
523
|
+
return null;
|
|
524
|
+
}
|
|
525
|
+
if (typeof parsed !== "object" || parsed === null) return null;
|
|
526
|
+
const env = parsed.claudeAiOauth;
|
|
527
|
+
if (typeof env !== "object" || env === null) return null;
|
|
528
|
+
const oauth = env;
|
|
529
|
+
const accessToken = oauth.accessToken;
|
|
530
|
+
if (typeof accessToken !== "string" || accessToken.length === 0) return null;
|
|
531
|
+
return {
|
|
532
|
+
accessToken,
|
|
533
|
+
refreshToken: typeof oauth.refreshToken === "string" ? oauth.refreshToken : void 0,
|
|
534
|
+
expiresAt: typeof oauth.expiresAt === "number" ? oauth.expiresAt : void 0,
|
|
535
|
+
scopes: Array.isArray(oauth.scopes) ? oauth.scopes.filter((s) => typeof s === "string") : void 0
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
__name(readAgentKeychainCredential, "readAgentKeychainCredential");
|
|
539
|
+
function isAnthropicOAuthToken(value) {
|
|
540
|
+
if (value.startsWith("sk-ant-api")) return false;
|
|
541
|
+
if (value.startsWith("sk-ant-oat")) return true;
|
|
542
|
+
if (value.startsWith("eyJ")) return true;
|
|
543
|
+
if (value.startsWith("cc-")) return true;
|
|
544
|
+
return false;
|
|
545
|
+
}
|
|
546
|
+
__name(isAnthropicOAuthToken, "isAnthropicOAuthToken");
|
|
547
|
+
|
|
548
|
+
export {
|
|
549
|
+
detectWsl,
|
|
550
|
+
DEFAULT_WSL_MOUNT_ROOT,
|
|
551
|
+
readWslMountRoot,
|
|
552
|
+
wslSystem32,
|
|
553
|
+
readEnvironmentFacts,
|
|
554
|
+
environmentFactLines,
|
|
555
|
+
composeEnvironmentPrompt,
|
|
556
|
+
permissionSentence,
|
|
557
|
+
claudeCredentialsPath,
|
|
558
|
+
wslWindowsHome,
|
|
559
|
+
readClaudeFileCredentialCandidates,
|
|
560
|
+
claudeCredentialSearchPaths,
|
|
561
|
+
codexCredentialsPath,
|
|
562
|
+
readOpenCodeApiCredentialCandidates,
|
|
563
|
+
readClaudeFileCredential,
|
|
564
|
+
readClaudeCredentialFile,
|
|
565
|
+
replaceClaudeCredentialFile,
|
|
566
|
+
codexCredentialFromTokens,
|
|
567
|
+
readCodexFileCredential,
|
|
568
|
+
readCodexFileCredentialCandidates,
|
|
569
|
+
readCodexCredentialFile,
|
|
570
|
+
preferFresherCredential,
|
|
571
|
+
KEYCHAIN_SERVICE,
|
|
572
|
+
readAgentKeychainCredential,
|
|
573
|
+
isAnthropicOAuthToken
|
|
574
|
+
};
|
|
575
|
+
//# sourceMappingURL=chunk-LKODRKMZ.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/context/environment.ts", "../../src/integrations/providers/harness-credentials.ts", "../../src/integrations/providers/keychain.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;AAwCA,SAAS,gBAAgB;AACzB,SAAS,YAAY,cAAc,mBAAmB;AACtD,SAAS,QAAQ,QAAQ,eAAe;AACxC,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAK1B,IAAM,MAAM,UAAU,QAAQ;AAG9B,IAAM,iBAAiB;AAmEhB,SAAS,UACf,MAAyB,QAAQ,KACjC,QAKI,CAAC,GACkB;AACvB,QAAM,SAAS,IAAI,iBAAiB,KAAK,KAAK;AAC9C,QAAM,SAAS,IAAI,aAAa,KAAK,KAAK;AAC1C,MAAI,CAAC,UAAU,CAAC,OAAQ,QAAO;AAC/B,QAAM,SAAS,MAAM,UAAU;AAC/B,QAAM,OACL,MAAM,SACL,CAAC,SAAiB;AAClB,QAAI;AACH,aAAO,YAAY,IAAI;AAAA,IACxB,QAAQ;AACP,aAAO,CAAC;AAAA,IAC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
|
7
7
|
openSessions,
|
|
8
8
|
readConversationFacts,
|
|
9
9
|
startConversation
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JL64XHSL.js";
|
|
11
11
|
import {
|
|
12
12
|
getPal,
|
|
13
13
|
getPalRevision,
|
|
14
14
|
palAtWorkspace
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-IZVN6K6U.js";
|
|
16
16
|
import {
|
|
17
17
|
asSessionId,
|
|
18
18
|
generateSessionId,
|
|
19
19
|
isEntityId,
|
|
20
20
|
palConversationGreeting
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-YTE3QIH3.js";
|
|
22
22
|
import {
|
|
23
23
|
__name
|
|
24
24
|
} from "./chunk-76FLAFCG.js";
|
|
@@ -161,4 +161,4 @@ export {
|
|
|
161
161
|
listPalConversations,
|
|
162
162
|
newPalSessionId
|
|
163
163
|
};
|
|
164
|
-
//# sourceMappingURL=chunk-
|
|
164
|
+
//# sourceMappingURL=chunk-LQRP2VRQ.js.map
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
} from "./chunk-KONYGNG6.js";
|
|
6
6
|
import {
|
|
7
7
|
restrictToOwner
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TZZOQ62Z.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveNamzuHome
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YTE3QIH3.js";
|
|
12
12
|
import {
|
|
13
13
|
__name,
|
|
14
14
|
__toESM
|
|
@@ -137,4 +137,4 @@ export {
|
|
|
137
137
|
setUserConfigValue,
|
|
138
138
|
deleteUserConfigValue
|
|
139
139
|
};
|
|
140
|
-
//# sourceMappingURL=chunk-
|
|
140
|
+
//# sourceMappingURL=chunk-LYGD5P7O.js.map
|