@namzu/cli 50.3.1 → 51.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -0
- package/dist/bin.js +1 -1
- package/dist/chunks/{acp-GJQH42RG.js → acp-OKCSCFH2.js} +112 -61
- package/dist/chunks/acp-OKCSCFH2.js.map +6 -0
- package/dist/chunks/{activity-command-I3AIOI7D.js → activity-command-SJGXPUYE.js} +12 -12
- package/dist/chunks/{add-UGB46RWA.js → add-H4FUTHAQ.js} +19 -19
- package/dist/chunks/{agent-DM74JBNA.js → agent-U4YLYJ4N.js} +40 -36
- package/dist/chunks/agent-session-YNUAPMAL.js +69 -0
- package/dist/chunks/{archive-3AAGSJMI.js → archive-O236ZKWI.js} +11 -11
- package/dist/chunks/{bin-main-EFP5SLD4.js → bin-main-YS3HF46K.js} +7 -7
- package/dist/chunks/{binding-YGRSM4NK.js → binding-SS7YOEIZ.js} +3 -3
- package/dist/chunks/{browser-55KWOLRE.js → browser-OA2KB5Z2.js} +6 -6
- package/dist/chunks/{chat-JHGNJACB.js → chat-EBNDAIRO.js} +15 -15
- package/dist/chunks/{chunk-IWBRKHR3.js → chunk-22PMPEFX.js} +3 -3
- package/dist/chunks/{chunk-H6NLFR25.js → chunk-2E3ALKOF.js} +2 -2
- package/dist/chunks/{chunk-QKPM4YWZ.js → chunk-3XIWMQLP.js} +7 -7
- package/dist/chunks/{chunk-QAQBDQOO.js → chunk-4HGQJYDZ.js} +3 -3
- package/dist/chunks/{chunk-M3BND4IS.js → chunk-56SPZGFT.js} +2 -2
- package/dist/chunks/{chunk-H7GNPOE4.js → chunk-5FZDDFXS.js} +2 -2
- package/dist/chunks/{chunk-2T3C6WAE.js → chunk-635U2FDK.js} +3 -3
- package/dist/chunks/{chunk-BKAGWRB7.js → chunk-6GITBOHO.js} +2 -2
- package/dist/chunks/{chunk-G3R4GLH5.js → chunk-77RA2AU7.js} +3 -3
- package/dist/chunks/{chunk-7JPWIMTU.js → chunk-7J3IMJKF.js} +2 -2
- package/dist/chunks/{chunk-XN7X4A7F.js → chunk-AJHNH4WR.js} +13 -13
- package/dist/chunks/{chunk-7HYNH2U5.js → chunk-B5AIMVRI.js} +2 -2
- package/dist/chunks/{chunk-KONJIEUP.js → chunk-BK5AJ7TL.js} +2 -2
- package/dist/chunks/{chunk-572QEPMC.js → chunk-BPZQYXLI.js} +5 -5
- package/dist/chunks/{chunk-KCRRCSBK.js → chunk-C5P7OAML.js} +3 -3
- package/dist/chunks/{chunk-V6W5ILRM.js → chunk-CDDXHKSP.js} +20 -13
- package/dist/chunks/chunk-CDDXHKSP.js.map +6 -0
- package/dist/chunks/{chunk-QKRGJPU6.js → chunk-CIHHPULI.js} +2 -2
- package/dist/chunks/{chunk-RC3A3XQL.js → chunk-D3ITBQ7T.js} +2 -2
- package/dist/chunks/{chunk-R5W3XDG5.js → chunk-DFFTGAS7.js} +9 -9
- package/dist/chunks/{chunk-HHZYPDYM.js → chunk-DWFJETFP.js} +4 -4
- package/dist/chunks/{chunk-FBQ7SPP2.js → chunk-EB7AS2K4.js} +9 -9
- package/dist/chunks/{chunk-FKTZTO3B.js → chunk-F3QD24YN.js} +34 -34
- package/dist/chunks/{chunk-P2CH7AHO.js → chunk-F7ECNFNX.js} +3 -3
- package/dist/chunks/{chunk-35KJUUIZ.js → chunk-FA2ZVSEU.js} +2 -2
- package/dist/chunks/{chunk-EEN7FPSL.js → chunk-FSPBJ5VF.js} +2 -2
- package/dist/chunks/{chunk-H734PAIA.js → chunk-FUVWMCRY.js} +2 -2
- package/dist/chunks/{chunk-KRGFQLGY.js → chunk-GUZEB3KN.js} +3 -3
- package/dist/chunks/{chunk-IO6AH6S6.js → chunk-HAIXGRRS.js} +2 -2
- package/dist/chunks/{chunk-CI2P6MWQ.js → chunk-HARFWJBQ.js} +2 -2
- package/dist/chunks/{chunk-IDHX5QU5.js → chunk-HDBTTV2S.js} +2 -2
- package/dist/chunks/{chunk-JZVNLDXW.js → chunk-HXWIEKOB.js} +4 -4
- package/dist/chunks/{chunk-IYUW2RAA.js → chunk-I4GTRFPK.js} +18 -2
- package/dist/chunks/{chunk-IYUW2RAA.js.map → chunk-I4GTRFPK.js.map} +1 -1
- package/dist/chunks/{chunk-CKQSYJLF.js → chunk-JABCT4RQ.js} +5 -5
- package/dist/chunks/{chunk-QFECRPMQ.js → chunk-JEEF7UIH.js} +4 -4
- package/dist/chunks/{chunk-AXB6T7KH.js → chunk-JHLJJDNJ.js} +6 -6
- package/dist/chunks/{chunk-ZVAXTBZ4.js → chunk-JVIS6M37.js} +13 -13
- package/dist/chunks/{chunk-FPW3QSQD.js → chunk-KN3FKKYY.js} +3 -3
- package/dist/chunks/{chunk-RVWRZVRT.js → chunk-KUVGN7VF.js} +2 -2
- package/dist/chunks/{chunk-TPYEIOFB.js → chunk-LLR7GHVU.js} +2 -2
- package/dist/chunks/{chunk-BFK5ZLTI.js → chunk-LMLCGIQR.js} +3 -3
- package/dist/chunks/{chunk-JXIZ23M4.js → chunk-MEZUNP2E.js} +2 -2
- package/dist/chunks/{chunk-QHNAT275.js → chunk-MOGE5ZMI.js} +3 -3
- package/dist/chunks/{chunk-2ADHYVB2.js → chunk-MTY3SZOT.js} +2 -2
- package/dist/chunks/{chunk-K6CL6T23.js → chunk-MV2T5HFQ.js} +4 -4
- package/dist/chunks/{chunk-HK7GUHPD.js → chunk-NWIOFCDB.js} +66 -40
- package/dist/chunks/{chunk-HK7GUHPD.js.map → chunk-NWIOFCDB.js.map} +1 -1
- package/dist/chunks/{chunk-GNBTKM54.js → chunk-O53H43CX.js} +2 -2
- package/dist/chunks/{chunk-UU6Z4RNI.js → chunk-O62YM5KA.js} +2 -2
- package/dist/chunks/{chunk-UGECQ2K7.js → chunk-O7J6EFVD.js} +14 -11
- package/dist/chunks/chunk-O7J6EFVD.js.map +6 -0
- package/dist/chunks/{chunk-MT2KWIQD.js → chunk-OLI35PTE.js} +2 -2
- package/dist/chunks/{chunk-VXZ4I76G.js → chunk-ONVXBWB5.js} +2 -2
- package/dist/chunks/{chunk-3L7O76A5.js → chunk-P52PAWBP.js} +4 -4
- package/dist/chunks/{chunk-ENQ34C3Q.js → chunk-P5OZ7YN6.js} +3 -3
- package/dist/chunks/{chunk-WBDMD7WY.js → chunk-PKGMZRUT.js} +2 -2
- package/dist/chunks/{chunk-HOBBN5HG.js → chunk-PN2UBL2H.js} +2 -2
- package/dist/chunks/{chunk-LML7JKQR.js → chunk-PR2EE4G4.js} +3 -3
- package/dist/chunks/{chunk-HM3XROXV.js → chunk-PV4TEEGI.js} +5 -5
- package/dist/chunks/{chunk-C2Z7OQYW.js → chunk-PWNFXNFK.js} +4 -4
- package/dist/chunks/{chunk-RSMLOV7S.js → chunk-QY4UUQQT.js} +12 -12
- package/dist/chunks/{chunk-R5SZRIJ4.js → chunk-R6P5H47N.js} +3 -3
- package/dist/chunks/{chunk-L37OHUPQ.js → chunk-R6ZDPAEV.js} +4 -4
- package/dist/chunks/{chunk-QUADPKLH.js → chunk-RTDE5QSZ.js} +4 -4
- package/dist/chunks/{chunk-2VKT4OPG.js → chunk-RTFC2VXR.js} +26 -6
- package/dist/chunks/chunk-RTFC2VXR.js.map +6 -0
- package/dist/chunks/{chunk-PMUGOF5V.js → chunk-TQG7WZI5.js} +2 -2
- package/dist/chunks/{chunk-LYTJJ2LG.js → chunk-UBOE47YI.js} +4 -4
- package/dist/chunks/{chunk-JNPUGWLC.js → chunk-UNQYPFDZ.js} +6 -6
- package/dist/chunks/{chunk-SDK374XH.js → chunk-V4WSIY32.js} +3 -3
- package/dist/chunks/{chunk-MVCDUAE3.js → chunk-V5DDXBVW.js} +3 -3
- package/dist/chunks/{chunk-PP5FDOXX.js → chunk-VLE4DKQR.js} +3 -3
- package/dist/chunks/{chunk-W4BOQPYP.js → chunk-VVMRXGQ6.js} +506 -163
- package/dist/chunks/chunk-VVMRXGQ6.js.map +6 -0
- package/dist/chunks/{chunk-RJTLS6RP.js → chunk-WCMXLFUB.js} +10 -10
- package/dist/chunks/{chunk-S5HIHXZO.js → chunk-WD45OZPT.js} +3 -3
- package/dist/chunks/{chunk-LJFJLXD5.js → chunk-WEUXBFYG.js} +4 -4
- package/dist/chunks/{chunk-TCOZSNNY.js → chunk-XMYFIXCP.js} +4 -4
- package/dist/chunks/{chunk-WBWDM4FM.js → chunk-Y5D6542Z.js} +2 -2
- package/dist/chunks/{chunk-VZD5OAVF.js → chunk-YGLJBR4L.js} +4 -4
- package/dist/chunks/{chunk-SWEP7MWK.js → chunk-YM5DH66D.js} +3 -3
- package/dist/chunks/{chunk-VWLPYZM7.js → chunk-YY6RFZ2L.js} +9 -9
- package/dist/chunks/{chunk-DBPV2NYH.js → chunk-ZIUKLIUS.js} +2 -2
- package/dist/chunks/{chunk-KUPDSMDC.js → chunk-ZNC5BEFK.js} +2 -2
- package/dist/chunks/{cli-runtime-WBHLU5Z2.js → cli-runtime-5GEVVA3K.js} +14 -14
- package/dist/chunks/{commands-Q5YVFT5H.js → commands-Y37MKMRJ.js} +5 -5
- package/dist/chunks/{crash-report-7B6INW5Z.js → crash-report-S6W5DXCO.js} +7 -7
- package/dist/chunks/{dist-XF4ALE5R.js → dist-2RVY7QOH.js} +2 -2
- package/dist/chunks/{dist-JXBZJMCJ.js → dist-3FVIUYVA.js} +2 -2
- package/dist/chunks/{dist-55O7DGZC.js → dist-4ATGJMUC.js} +2 -2
- package/dist/chunks/{dist-CX6YZPQP.js → dist-5E47CZZT.js} +2 -2
- package/dist/chunks/{dist-64A6FTG4.js → dist-DODOSCTW.js} +10 -2
- package/dist/chunks/{dist-DM56OGFI.js → dist-HCI4L6AO.js} +2 -2
- package/dist/chunks/{dist-JTKWJRF3.js → dist-IPQPISKD.js} +2 -2
- package/dist/chunks/{dist-JFEBD4RQ.js → dist-YO357DAD.js} +2 -2
- package/dist/chunks/{doctor-7VGHHJPO.js → doctor-EZEJEK6B.js} +16 -16
- package/dist/chunks/{drain-XXZ2WGI7.js → drain-VVEMLN3L.js} +9 -9
- package/dist/chunks/{entry-EBSTYPZD.js → entry-CZ63UJYN.js} +6 -6
- package/dist/chunks/{eval-6FWPUHTJ.js → eval-ZOF3EXZS.js} +2 -2
- package/dist/chunks/{exec-3SWUDHXF.js → exec-DYAFXHZM.js} +37 -37
- package/dist/chunks/{github-VS24TC5M.js → github-VCUDZDGI.js} +2 -2
- package/dist/chunks/{home-S7VBBT2P.js → home-UVU2HRDB.js} +3 -3
- package/dist/chunks/{host-F6WQBUBZ.js → host-Q3YNLTNL.js} +10 -10
- package/dist/chunks/{host-queries-U6KGTEF7.js → host-queries-Z4BSL457.js} +15 -15
- package/dist/chunks/{learn-Y4THSWLS.js → learn-SAZ3JOK3.js} +11 -11
- package/dist/chunks/{learn-builtin-YLECAT67.js → learn-builtin-SQ2BTDFH.js} +14 -14
- package/dist/chunks/{lifecycle-ZUYCZRMU.js → lifecycle-24A5HH4I.js} +29 -29
- package/dist/chunks/{list-RAVXA62R.js → list-HAI55KLQ.js} +12 -12
- package/dist/chunks/{live-R7UZIHRU.js → live-EIQ666TU.js} +15 -15
- package/dist/chunks/{login-XFL5R3F3.js → login-YJ6L7KSY.js} +13 -13
- package/dist/chunks/{logs-FHXX2ZYY.js → logs-RWGXFRMN.js} +4 -4
- package/dist/chunks/{mcp-GJYWIZDK.js → mcp-DO454555.js} +22 -22
- package/dist/chunks/{message-command-ALRNDWDM.js → message-command-AJOTC3UK.js} +42 -42
- package/dist/chunks/{open-52RISMYT.js → open-LEAR5UBX.js} +8 -8
- package/dist/chunks/{operator-tools-KRVBU5DK.js → operator-tools-AHP32F2J.js} +13 -13
- package/dist/chunks/{output-schema-TN574F4W.js → output-schema-YDKTNTMM.js} +3 -3
- package/dist/chunks/{pal-Z72EQIYV.js → pal-XPZD6PAO.js} +16 -16
- package/dist/chunks/{peers-TJCZBKJN.js → peers-MRKWY3MG.js} +8 -8
- package/dist/chunks/{peers-VBFD7USO.js → peers-NLUBD4IW.js} +6 -6
- package/dist/chunks/{providers-WZ5ZDUB3.js → providers-QPESWN6K.js} +11 -11
- package/dist/chunks/{pty-KWFUBODN.js → pty-BDOOEOCB.js} +3 -3
- package/dist/chunks/resume-ZS3VS5OQ.js +23 -0
- package/dist/chunks/{resume-command-RVILL4QU.js → resume-command-KIXKOEM3.js} +5 -5
- package/dist/chunks/{schedule-YZ5QHVUE.js → schedule-6BKCRYAT.js} +8 -8
- package/dist/chunks/{service-WE5GLBMV.js → service-ENTDZAVD.js} +29 -29
- package/dist/chunks/{skills-W5AH33BU.js → skills-MG2BRTPV.js} +9 -9
- package/dist/chunks/{start-check-EBQJY4RL.js → start-check-7WYNSBON.js} +2 -2
- package/dist/chunks/{startup-failure-AXFS5D3F.js → startup-failure-EWWYKPVE.js} +2 -2
- package/dist/chunks/{state-NYIQ2RRT.js → state-6UVY4EHA.js} +3 -3
- package/dist/chunks/{store-LNGCY3CJ.js → store-ASWK7TVD.js} +3 -3
- package/dist/chunks/{store-LWOLZU4Z.js → store-OKK7A6ZE.js} +6 -6
- package/dist/chunks/{store-JUC4TU6P.js → store-UFUDXZG6.js} +14 -10
- package/dist/chunks/{store-BEOWOJIT.js → store-XU4PITDA.js} +4 -4
- package/dist/chunks/{tui-JPQMFVPY.js → tui-L4BRR4H5.js} +284 -149
- package/dist/chunks/tui-L4BRR4H5.js.map +6 -0
- package/dist/chunks/{upgrade-XR3ZBXRQ.js → upgrade-IJFMAW3T.js} +7 -7
- package/dist/chunks/{workspaces-F6RNJXKR.js → workspaces-KVFY66IC.js} +16 -16
- package/dist/chunks/{worktree-LE5FPYCK.js → worktree-7JTMEYRX.js} +13 -13
- package/dist/commands/acp-provider-retry.d.ts +30 -0
- package/dist/commands/acp-provider-retry.d.ts.map +1 -1
- 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/config/schema.d.ts +3 -2
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/index.js +19 -19
- package/dist/integrations/sessions/store.d.ts +7 -1
- package/dist/integrations/sessions/store.d.ts.map +1 -1
- package/dist/integrations/workflows/host.d.ts.map +1 -1
- package/dist/integrations/workflows/offering.d.ts.map +1 -1
- package/dist/integrations/workflows/size.d.ts +21 -7
- package/dist/integrations/workflows/size.d.ts.map +1 -1
- package/dist/tui/AgentExplorer.d.ts +59 -8
- package/dist/tui/AgentExplorer.d.ts.map +1 -1
- package/dist/tui/App.d.ts +3 -0
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/PermissionOverlay.d.ts +15 -0
- package/dist/tui/PermissionOverlay.d.ts.map +1 -1
- package/dist/tui/agent-transcript-rows.d.ts.map +1 -1
- package/dist/tui/agent.d.ts +21 -1
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/conversation-in-use.d.ts +2 -2
- package/dist/tui/conversation-in-use.d.ts.map +1 -1
- package/dist/tui/permission-review.d.ts +22 -0
- package/dist/tui/permission-review.d.ts.map +1 -1
- package/dist/tui/terminal-display.d.ts +19 -0
- package/dist/tui/terminal-display.d.ts.map +1 -1
- package/package.json +6 -6
- package/skills/README.md +4 -0
- package/skills/browser-automation/SKILL.md +1 -1
- package/skills/review-changes/SKILL.md +63 -0
- package/skills/schedule-task/SKILL.md +1 -1
- package/skills/skill-creator/SKILL.md +1 -1
- package/skills/verify-change/SKILL.md +63 -0
- package/dist/chunks/acp-GJQH42RG.js.map +0 -6
- package/dist/chunks/agent-session-MCYT4656.js +0 -69
- package/dist/chunks/chunk-2VKT4OPG.js.map +0 -6
- package/dist/chunks/chunk-UGECQ2K7.js.map +0 -6
- package/dist/chunks/chunk-V6W5ILRM.js.map +0 -6
- package/dist/chunks/chunk-W4BOQPYP.js.map +0 -6
- package/dist/chunks/resume-FVNBMR6D.js +0 -23
- package/dist/chunks/tui-JPQMFVPY.js.map +0 -6
- /package/dist/chunks/{activity-command-I3AIOI7D.js.map → activity-command-SJGXPUYE.js.map} +0 -0
- /package/dist/chunks/{add-UGB46RWA.js.map → add-H4FUTHAQ.js.map} +0 -0
- /package/dist/chunks/{agent-DM74JBNA.js.map → agent-U4YLYJ4N.js.map} +0 -0
- /package/dist/chunks/{agent-session-MCYT4656.js.map → agent-session-YNUAPMAL.js.map} +0 -0
- /package/dist/chunks/{archive-3AAGSJMI.js.map → archive-O236ZKWI.js.map} +0 -0
- /package/dist/chunks/{bin-main-EFP5SLD4.js.map → bin-main-YS3HF46K.js.map} +0 -0
- /package/dist/chunks/{binding-YGRSM4NK.js.map → binding-SS7YOEIZ.js.map} +0 -0
- /package/dist/chunks/{browser-55KWOLRE.js.map → browser-OA2KB5Z2.js.map} +0 -0
- /package/dist/chunks/{chat-JHGNJACB.js.map → chat-EBNDAIRO.js.map} +0 -0
- /package/dist/chunks/{chunk-IWBRKHR3.js.map → chunk-22PMPEFX.js.map} +0 -0
- /package/dist/chunks/{chunk-H6NLFR25.js.map → chunk-2E3ALKOF.js.map} +0 -0
- /package/dist/chunks/{chunk-QKPM4YWZ.js.map → chunk-3XIWMQLP.js.map} +0 -0
- /package/dist/chunks/{chunk-QAQBDQOO.js.map → chunk-4HGQJYDZ.js.map} +0 -0
- /package/dist/chunks/{chunk-M3BND4IS.js.map → chunk-56SPZGFT.js.map} +0 -0
- /package/dist/chunks/{chunk-H7GNPOE4.js.map → chunk-5FZDDFXS.js.map} +0 -0
- /package/dist/chunks/{chunk-2T3C6WAE.js.map → chunk-635U2FDK.js.map} +0 -0
- /package/dist/chunks/{chunk-BKAGWRB7.js.map → chunk-6GITBOHO.js.map} +0 -0
- /package/dist/chunks/{chunk-G3R4GLH5.js.map → chunk-77RA2AU7.js.map} +0 -0
- /package/dist/chunks/{chunk-7JPWIMTU.js.map → chunk-7J3IMJKF.js.map} +0 -0
- /package/dist/chunks/{chunk-XN7X4A7F.js.map → chunk-AJHNH4WR.js.map} +0 -0
- /package/dist/chunks/{chunk-7HYNH2U5.js.map → chunk-B5AIMVRI.js.map} +0 -0
- /package/dist/chunks/{chunk-KONJIEUP.js.map → chunk-BK5AJ7TL.js.map} +0 -0
- /package/dist/chunks/{chunk-572QEPMC.js.map → chunk-BPZQYXLI.js.map} +0 -0
- /package/dist/chunks/{chunk-KCRRCSBK.js.map → chunk-C5P7OAML.js.map} +0 -0
- /package/dist/chunks/{chunk-QKRGJPU6.js.map → chunk-CIHHPULI.js.map} +0 -0
- /package/dist/chunks/{chunk-RC3A3XQL.js.map → chunk-D3ITBQ7T.js.map} +0 -0
- /package/dist/chunks/{chunk-R5W3XDG5.js.map → chunk-DFFTGAS7.js.map} +0 -0
- /package/dist/chunks/{chunk-HHZYPDYM.js.map → chunk-DWFJETFP.js.map} +0 -0
- /package/dist/chunks/{chunk-FBQ7SPP2.js.map → chunk-EB7AS2K4.js.map} +0 -0
- /package/dist/chunks/{chunk-FKTZTO3B.js.map → chunk-F3QD24YN.js.map} +0 -0
- /package/dist/chunks/{chunk-P2CH7AHO.js.map → chunk-F7ECNFNX.js.map} +0 -0
- /package/dist/chunks/{chunk-35KJUUIZ.js.map → chunk-FA2ZVSEU.js.map} +0 -0
- /package/dist/chunks/{chunk-EEN7FPSL.js.map → chunk-FSPBJ5VF.js.map} +0 -0
- /package/dist/chunks/{chunk-H734PAIA.js.map → chunk-FUVWMCRY.js.map} +0 -0
- /package/dist/chunks/{chunk-KRGFQLGY.js.map → chunk-GUZEB3KN.js.map} +0 -0
- /package/dist/chunks/{chunk-IO6AH6S6.js.map → chunk-HAIXGRRS.js.map} +0 -0
- /package/dist/chunks/{chunk-CI2P6MWQ.js.map → chunk-HARFWJBQ.js.map} +0 -0
- /package/dist/chunks/{chunk-IDHX5QU5.js.map → chunk-HDBTTV2S.js.map} +0 -0
- /package/dist/chunks/{chunk-JZVNLDXW.js.map → chunk-HXWIEKOB.js.map} +0 -0
- /package/dist/chunks/{chunk-CKQSYJLF.js.map → chunk-JABCT4RQ.js.map} +0 -0
- /package/dist/chunks/{chunk-QFECRPMQ.js.map → chunk-JEEF7UIH.js.map} +0 -0
- /package/dist/chunks/{chunk-AXB6T7KH.js.map → chunk-JHLJJDNJ.js.map} +0 -0
- /package/dist/chunks/{chunk-ZVAXTBZ4.js.map → chunk-JVIS6M37.js.map} +0 -0
- /package/dist/chunks/{chunk-FPW3QSQD.js.map → chunk-KN3FKKYY.js.map} +0 -0
- /package/dist/chunks/{chunk-RVWRZVRT.js.map → chunk-KUVGN7VF.js.map} +0 -0
- /package/dist/chunks/{chunk-TPYEIOFB.js.map → chunk-LLR7GHVU.js.map} +0 -0
- /package/dist/chunks/{chunk-BFK5ZLTI.js.map → chunk-LMLCGIQR.js.map} +0 -0
- /package/dist/chunks/{chunk-JXIZ23M4.js.map → chunk-MEZUNP2E.js.map} +0 -0
- /package/dist/chunks/{chunk-QHNAT275.js.map → chunk-MOGE5ZMI.js.map} +0 -0
- /package/dist/chunks/{chunk-2ADHYVB2.js.map → chunk-MTY3SZOT.js.map} +0 -0
- /package/dist/chunks/{chunk-K6CL6T23.js.map → chunk-MV2T5HFQ.js.map} +0 -0
- /package/dist/chunks/{chunk-GNBTKM54.js.map → chunk-O53H43CX.js.map} +0 -0
- /package/dist/chunks/{chunk-UU6Z4RNI.js.map → chunk-O62YM5KA.js.map} +0 -0
- /package/dist/chunks/{chunk-MT2KWIQD.js.map → chunk-OLI35PTE.js.map} +0 -0
- /package/dist/chunks/{chunk-VXZ4I76G.js.map → chunk-ONVXBWB5.js.map} +0 -0
- /package/dist/chunks/{chunk-3L7O76A5.js.map → chunk-P52PAWBP.js.map} +0 -0
- /package/dist/chunks/{chunk-ENQ34C3Q.js.map → chunk-P5OZ7YN6.js.map} +0 -0
- /package/dist/chunks/{chunk-WBDMD7WY.js.map → chunk-PKGMZRUT.js.map} +0 -0
- /package/dist/chunks/{chunk-HOBBN5HG.js.map → chunk-PN2UBL2H.js.map} +0 -0
- /package/dist/chunks/{chunk-LML7JKQR.js.map → chunk-PR2EE4G4.js.map} +0 -0
- /package/dist/chunks/{chunk-HM3XROXV.js.map → chunk-PV4TEEGI.js.map} +0 -0
- /package/dist/chunks/{chunk-C2Z7OQYW.js.map → chunk-PWNFXNFK.js.map} +0 -0
- /package/dist/chunks/{chunk-RSMLOV7S.js.map → chunk-QY4UUQQT.js.map} +0 -0
- /package/dist/chunks/{chunk-R5SZRIJ4.js.map → chunk-R6P5H47N.js.map} +0 -0
- /package/dist/chunks/{chunk-L37OHUPQ.js.map → chunk-R6ZDPAEV.js.map} +0 -0
- /package/dist/chunks/{chunk-QUADPKLH.js.map → chunk-RTDE5QSZ.js.map} +0 -0
- /package/dist/chunks/{chunk-PMUGOF5V.js.map → chunk-TQG7WZI5.js.map} +0 -0
- /package/dist/chunks/{chunk-LYTJJ2LG.js.map → chunk-UBOE47YI.js.map} +0 -0
- /package/dist/chunks/{chunk-JNPUGWLC.js.map → chunk-UNQYPFDZ.js.map} +0 -0
- /package/dist/chunks/{chunk-SDK374XH.js.map → chunk-V4WSIY32.js.map} +0 -0
- /package/dist/chunks/{chunk-MVCDUAE3.js.map → chunk-V5DDXBVW.js.map} +0 -0
- /package/dist/chunks/{chunk-PP5FDOXX.js.map → chunk-VLE4DKQR.js.map} +0 -0
- /package/dist/chunks/{chunk-RJTLS6RP.js.map → chunk-WCMXLFUB.js.map} +0 -0
- /package/dist/chunks/{chunk-S5HIHXZO.js.map → chunk-WD45OZPT.js.map} +0 -0
- /package/dist/chunks/{chunk-LJFJLXD5.js.map → chunk-WEUXBFYG.js.map} +0 -0
- /package/dist/chunks/{chunk-TCOZSNNY.js.map → chunk-XMYFIXCP.js.map} +0 -0
- /package/dist/chunks/{chunk-WBWDM4FM.js.map → chunk-Y5D6542Z.js.map} +0 -0
- /package/dist/chunks/{chunk-VZD5OAVF.js.map → chunk-YGLJBR4L.js.map} +0 -0
- /package/dist/chunks/{chunk-SWEP7MWK.js.map → chunk-YM5DH66D.js.map} +0 -0
- /package/dist/chunks/{chunk-VWLPYZM7.js.map → chunk-YY6RFZ2L.js.map} +0 -0
- /package/dist/chunks/{chunk-DBPV2NYH.js.map → chunk-ZIUKLIUS.js.map} +0 -0
- /package/dist/chunks/{chunk-KUPDSMDC.js.map → chunk-ZNC5BEFK.js.map} +0 -0
- /package/dist/chunks/{cli-runtime-WBHLU5Z2.js.map → cli-runtime-5GEVVA3K.js.map} +0 -0
- /package/dist/chunks/{commands-Q5YVFT5H.js.map → commands-Y37MKMRJ.js.map} +0 -0
- /package/dist/chunks/{crash-report-7B6INW5Z.js.map → crash-report-S6W5DXCO.js.map} +0 -0
- /package/dist/chunks/{dist-XF4ALE5R.js.map → dist-2RVY7QOH.js.map} +0 -0
- /package/dist/chunks/{dist-JXBZJMCJ.js.map → dist-3FVIUYVA.js.map} +0 -0
- /package/dist/chunks/{dist-55O7DGZC.js.map → dist-4ATGJMUC.js.map} +0 -0
- /package/dist/chunks/{dist-CX6YZPQP.js.map → dist-5E47CZZT.js.map} +0 -0
- /package/dist/chunks/{dist-64A6FTG4.js.map → dist-DODOSCTW.js.map} +0 -0
- /package/dist/chunks/{dist-DM56OGFI.js.map → dist-HCI4L6AO.js.map} +0 -0
- /package/dist/chunks/{dist-JTKWJRF3.js.map → dist-IPQPISKD.js.map} +0 -0
- /package/dist/chunks/{dist-JFEBD4RQ.js.map → dist-YO357DAD.js.map} +0 -0
- /package/dist/chunks/{doctor-7VGHHJPO.js.map → doctor-EZEJEK6B.js.map} +0 -0
- /package/dist/chunks/{drain-XXZ2WGI7.js.map → drain-VVEMLN3L.js.map} +0 -0
- /package/dist/chunks/{entry-EBSTYPZD.js.map → entry-CZ63UJYN.js.map} +0 -0
- /package/dist/chunks/{eval-6FWPUHTJ.js.map → eval-ZOF3EXZS.js.map} +0 -0
- /package/dist/chunks/{exec-3SWUDHXF.js.map → exec-DYAFXHZM.js.map} +0 -0
- /package/dist/chunks/{github-VS24TC5M.js.map → github-VCUDZDGI.js.map} +0 -0
- /package/dist/chunks/{home-S7VBBT2P.js.map → home-UVU2HRDB.js.map} +0 -0
- /package/dist/chunks/{host-F6WQBUBZ.js.map → host-Q3YNLTNL.js.map} +0 -0
- /package/dist/chunks/{host-queries-U6KGTEF7.js.map → host-queries-Z4BSL457.js.map} +0 -0
- /package/dist/chunks/{learn-Y4THSWLS.js.map → learn-SAZ3JOK3.js.map} +0 -0
- /package/dist/chunks/{learn-builtin-YLECAT67.js.map → learn-builtin-SQ2BTDFH.js.map} +0 -0
- /package/dist/chunks/{lifecycle-ZUYCZRMU.js.map → lifecycle-24A5HH4I.js.map} +0 -0
- /package/dist/chunks/{list-RAVXA62R.js.map → list-HAI55KLQ.js.map} +0 -0
- /package/dist/chunks/{live-R7UZIHRU.js.map → live-EIQ666TU.js.map} +0 -0
- /package/dist/chunks/{login-XFL5R3F3.js.map → login-YJ6L7KSY.js.map} +0 -0
- /package/dist/chunks/{logs-FHXX2ZYY.js.map → logs-RWGXFRMN.js.map} +0 -0
- /package/dist/chunks/{mcp-GJYWIZDK.js.map → mcp-DO454555.js.map} +0 -0
- /package/dist/chunks/{message-command-ALRNDWDM.js.map → message-command-AJOTC3UK.js.map} +0 -0
- /package/dist/chunks/{open-52RISMYT.js.map → open-LEAR5UBX.js.map} +0 -0
- /package/dist/chunks/{operator-tools-KRVBU5DK.js.map → operator-tools-AHP32F2J.js.map} +0 -0
- /package/dist/chunks/{output-schema-TN574F4W.js.map → output-schema-YDKTNTMM.js.map} +0 -0
- /package/dist/chunks/{pal-Z72EQIYV.js.map → pal-XPZD6PAO.js.map} +0 -0
- /package/dist/chunks/{peers-TJCZBKJN.js.map → peers-MRKWY3MG.js.map} +0 -0
- /package/dist/chunks/{peers-VBFD7USO.js.map → peers-NLUBD4IW.js.map} +0 -0
- /package/dist/chunks/{providers-WZ5ZDUB3.js.map → providers-QPESWN6K.js.map} +0 -0
- /package/dist/chunks/{pty-KWFUBODN.js.map → pty-BDOOEOCB.js.map} +0 -0
- /package/dist/chunks/{resume-FVNBMR6D.js.map → resume-ZS3VS5OQ.js.map} +0 -0
- /package/dist/chunks/{resume-command-RVILL4QU.js.map → resume-command-KIXKOEM3.js.map} +0 -0
- /package/dist/chunks/{schedule-YZ5QHVUE.js.map → schedule-6BKCRYAT.js.map} +0 -0
- /package/dist/chunks/{service-WE5GLBMV.js.map → service-ENTDZAVD.js.map} +0 -0
- /package/dist/chunks/{skills-W5AH33BU.js.map → skills-MG2BRTPV.js.map} +0 -0
- /package/dist/chunks/{start-check-EBQJY4RL.js.map → start-check-7WYNSBON.js.map} +0 -0
- /package/dist/chunks/{startup-failure-AXFS5D3F.js.map → startup-failure-EWWYKPVE.js.map} +0 -0
- /package/dist/chunks/{state-NYIQ2RRT.js.map → state-6UVY4EHA.js.map} +0 -0
- /package/dist/chunks/{store-BEOWOJIT.js.map → store-ASWK7TVD.js.map} +0 -0
- /package/dist/chunks/{store-JUC4TU6P.js.map → store-OKK7A6ZE.js.map} +0 -0
- /package/dist/chunks/{store-LNGCY3CJ.js.map → store-UFUDXZG6.js.map} +0 -0
- /package/dist/chunks/{store-LWOLZU4Z.js.map → store-XU4PITDA.js.map} +0 -0
- /package/dist/chunks/{upgrade-XR3ZBXRQ.js.map → upgrade-IJFMAW3T.js.map} +0 -0
- /package/dist/chunks/{workspaces-F6RNJXKR.js.map → workspaces-KVFY66IC.js.map} +0 -0
- /package/dist/chunks/{worktree-LE5FPYCK.js.map → worktree-7JTMEYRX.js.map} +0 -0
|
@@ -325,7 +325,7 @@ var require_brace_expansion = __commonJS({
|
|
|
325
325
|
});
|
|
326
326
|
|
|
327
327
|
// ../sdk/dist/version.js
|
|
328
|
-
var VERSION = "62.
|
|
328
|
+
var VERSION = "62.12.0";
|
|
329
329
|
|
|
330
330
|
// ../sdk/dist/runtime/harness-session/index.js
|
|
331
331
|
import { posix, win32 } from "node:path";
|
|
@@ -3282,9 +3282,9 @@ function stripTabAndNewline(value) {
|
|
|
3282
3282
|
return value.replace(asciiTabOrNewline, "");
|
|
3283
3283
|
}
|
|
3284
3284
|
__name(stripTabAndNewline, "stripTabAndNewline");
|
|
3285
|
-
function urlHostnameOk(url2,
|
|
3286
|
-
|
|
3287
|
-
return
|
|
3285
|
+
function urlHostnameOk(url2, hostname4) {
|
|
3286
|
+
hostname4.lastIndex = 0;
|
|
3287
|
+
return hostname4.test(url2.hostname);
|
|
3288
3288
|
}
|
|
3289
3289
|
__name(urlHostnameOk, "urlHostnameOk");
|
|
3290
3290
|
function urlProtocolOk(url2, protocol) {
|
|
@@ -21813,6 +21813,7 @@ var EPHEMERAL_EVENT_TYPES = /* @__PURE__ */ new Set([
|
|
|
21813
21813
|
"tool_progress",
|
|
21814
21814
|
"monitor_event",
|
|
21815
21815
|
"compaction_started",
|
|
21816
|
+
"compaction_skills_carried",
|
|
21816
21817
|
"session_log_degraded",
|
|
21817
21818
|
"session_log_recovered"
|
|
21818
21819
|
]);
|
|
@@ -24446,9 +24447,9 @@ var GuardedFetchProvider = class {
|
|
|
24446
24447
|
if (!ALLOWED_SCHEMES.has(url2.protocol)) {
|
|
24447
24448
|
throw new WebFetchRefusedError(`Refused "${url2.protocol}" \u2014 only http and https are fetched.`, { url: rawUrl, reason: "scheme" });
|
|
24448
24449
|
}
|
|
24449
|
-
const
|
|
24450
|
-
if (this.config.blockedHosts?.some((blocked) => blocked.toLowerCase() ===
|
|
24451
|
-
throw new WebFetchRefusedError(`Refused "${
|
|
24450
|
+
const hostname4 = url2.hostname.toLowerCase().replace(/^\[|\]$/g, "");
|
|
24451
|
+
if (this.config.blockedHosts?.some((blocked) => blocked.toLowerCase() === hostname4)) {
|
|
24452
|
+
throw new WebFetchRefusedError(`Refused "${hostname4}" \u2014 the host blocks this name.`, {
|
|
24452
24453
|
url: rawUrl,
|
|
24453
24454
|
reason: "blocked-host"
|
|
24454
24455
|
});
|
|
@@ -24459,17 +24460,17 @@ var GuardedFetchProvider = class {
|
|
|
24459
24460
|
}
|
|
24460
24461
|
const resolve37 = this.config.resolve ?? (async (name2) => (await lookup(name2, { all: true })).map((r) => r.address));
|
|
24461
24462
|
let addresses;
|
|
24462
|
-
if (isIP(
|
|
24463
|
-
addresses = [
|
|
24463
|
+
if (isIP(hostname4)) {
|
|
24464
|
+
addresses = [hostname4];
|
|
24464
24465
|
} else {
|
|
24465
24466
|
try {
|
|
24466
|
-
addresses = await operation.run(() => resolve37(
|
|
24467
|
+
addresses = await operation.run(() => resolve37(hostname4, operation.signal));
|
|
24467
24468
|
} catch (err) {
|
|
24468
24469
|
operation.throwIfStopped();
|
|
24469
|
-
throw new WebFetchRefusedError(`Refused "${
|
|
24470
|
+
throw new WebFetchRefusedError(`Refused "${hostname4}" \u2014 it could not be resolved (${err instanceof Error ? err.message : String(err)}), so nothing here can say where it points.`, { url: rawUrl, reason: "private-address" });
|
|
24470
24471
|
}
|
|
24471
24472
|
if (addresses.length === 0) {
|
|
24472
|
-
throw new WebFetchRefusedError(`Refused "${
|
|
24473
|
+
throw new WebFetchRefusedError(`Refused "${hostname4}" \u2014 it resolves to no addresses.`, {
|
|
24473
24474
|
url: rawUrl,
|
|
24474
24475
|
reason: "private-address"
|
|
24475
24476
|
});
|
|
@@ -24477,7 +24478,7 @@ var GuardedFetchProvider = class {
|
|
|
24477
24478
|
}
|
|
24478
24479
|
for (const address2 of addresses) {
|
|
24479
24480
|
if (isPrivateAddress(address2)) {
|
|
24480
|
-
throw new WebFetchRefusedError(`Refused "${
|
|
24481
|
+
throw new WebFetchRefusedError(`Refused "${hostname4}" \u2014 it resolves to ${address2}, inside this host's own network.`, { url: rawUrl, reason: "private-address" });
|
|
24481
24482
|
}
|
|
24482
24483
|
}
|
|
24483
24484
|
operation.throwIfStopped();
|
|
@@ -24803,26 +24804,26 @@ function webSocketHostname(raw) {
|
|
|
24803
24804
|
}
|
|
24804
24805
|
__name(webSocketHostname, "webSocketHostname");
|
|
24805
24806
|
async function vetWebSocketTarget(raw, options = {}) {
|
|
24806
|
-
const
|
|
24807
|
+
const hostname4 = webSocketHostname(raw);
|
|
24807
24808
|
let addresses;
|
|
24808
|
-
const literal3 = isIP2(
|
|
24809
|
+
const literal3 = isIP2(hostname4);
|
|
24809
24810
|
if (literal3 !== 0) {
|
|
24810
|
-
addresses = [
|
|
24811
|
+
addresses = [hostname4];
|
|
24811
24812
|
} else {
|
|
24812
24813
|
const resolve37 = options.resolve ?? (async (name2) => (await dnsLookup(name2, { all: true })).map((r) => r.address));
|
|
24813
24814
|
try {
|
|
24814
|
-
addresses = await resolve37(
|
|
24815
|
+
addresses = await resolve37(hostname4);
|
|
24815
24816
|
} catch (err) {
|
|
24816
|
-
throw new WebSocketRefusedError(`Refused "${
|
|
24817
|
+
throw new WebSocketRefusedError(`Refused "${hostname4}": it could not be resolved (${err instanceof Error ? err.message : String(err)}), so nothing here can say where it points.`);
|
|
24817
24818
|
}
|
|
24818
24819
|
if (addresses.length === 0) {
|
|
24819
|
-
throw new WebSocketRefusedError(`Refused "${
|
|
24820
|
+
throw new WebSocketRefusedError(`Refused "${hostname4}": it resolves to no addresses.`);
|
|
24820
24821
|
}
|
|
24821
24822
|
}
|
|
24822
24823
|
if (options.allowPrivateAddresses !== true) {
|
|
24823
24824
|
for (const address2 of addresses) {
|
|
24824
24825
|
if (isPrivateAddress(address2)) {
|
|
24825
|
-
throw new WebSocketRefusedError(`Refused "${
|
|
24826
|
+
throw new WebSocketRefusedError(`Refused "${hostname4}": it resolves to ${address2}, inside this host's own network. A WebSocket monitor only connects to public addresses.`);
|
|
24826
24827
|
}
|
|
24827
24828
|
}
|
|
24828
24829
|
}
|
|
@@ -24848,8 +24849,8 @@ function pinnedLookup(addresses) {
|
|
|
24848
24849
|
};
|
|
24849
24850
|
}
|
|
24850
24851
|
__name(pinnedLookup, "pinnedLookup");
|
|
24851
|
-
function hostMatchesPolicy(
|
|
24852
|
-
const host =
|
|
24852
|
+
function hostMatchesPolicy(hostname4, allowedHosts) {
|
|
24853
|
+
const host = hostname4.toLowerCase().replace(/\.$/, "");
|
|
24853
24854
|
return allowedHosts.some((entry) => {
|
|
24854
24855
|
const allowed = entry.toLowerCase().replace(/\.$/, "");
|
|
24855
24856
|
if (allowed.startsWith("."))
|
|
@@ -24858,15 +24859,15 @@ function hostMatchesPolicy(hostname3, allowedHosts) {
|
|
|
24858
24859
|
});
|
|
24859
24860
|
}
|
|
24860
24861
|
__name(hostMatchesPolicy, "hostMatchesPolicy");
|
|
24861
|
-
function webSocketSandboxRefusal(sandbox,
|
|
24862
|
+
function webSocketSandboxRefusal(sandbox, hostname4) {
|
|
24862
24863
|
if (sandbox === void 0)
|
|
24863
24864
|
return void 0;
|
|
24864
24865
|
if (!isolationOf(sandbox.environment).network)
|
|
24865
24866
|
return void 0;
|
|
24866
24867
|
const allowed = sandbox.networkPolicy?.allowedHosts;
|
|
24867
|
-
if (allowed !== void 0 && hostMatchesPolicy(
|
|
24868
|
+
if (allowed !== void 0 && hostMatchesPolicy(hostname4, allowed))
|
|
24868
24869
|
return void 0;
|
|
24869
|
-
return `A WebSocket monitor connects from the host, outside this turn's sandbox, which blocks the network. "${
|
|
24870
|
+
return `A WebSocket monitor connects from the host, outside this turn's sandbox, which blocks the network. "${hostname4}" is not on the sandbox's list of allowed hosts, so the connection was not opened. Allow the host in the sandbox's network policy, or watch the service from inside the sandbox with a command.`;
|
|
24870
24871
|
}
|
|
24871
24872
|
__name(webSocketSandboxRefusal, "webSocketSandboxRefusal");
|
|
24872
24873
|
function oneLine2(text9) {
|
|
@@ -27399,22 +27400,34 @@ function parseWorkflowMeta(source) {
|
|
|
27399
27400
|
__name(parseWorkflowMeta, "parseWorkflowMeta");
|
|
27400
27401
|
|
|
27401
27402
|
// ../sdk/dist/execution/workflow/phases.js
|
|
27403
|
+
function matchTitle(entries2, title) {
|
|
27404
|
+
const lower = title.toLowerCase();
|
|
27405
|
+
let loose;
|
|
27406
|
+
for (const entry of entries2) {
|
|
27407
|
+
if (entry.title === title)
|
|
27408
|
+
return entry;
|
|
27409
|
+
if (loose === void 0 && entry.title.toLowerCase() === lower)
|
|
27410
|
+
loose = entry;
|
|
27411
|
+
}
|
|
27412
|
+
return loose;
|
|
27413
|
+
}
|
|
27414
|
+
__name(matchTitle, "matchTitle");
|
|
27402
27415
|
var PhaseRegistry = class {
|
|
27403
27416
|
static {
|
|
27404
27417
|
__name(this, "PhaseRegistry");
|
|
27405
27418
|
}
|
|
27406
|
-
|
|
27419
|
+
records = [];
|
|
27407
27420
|
register(rawTitle, declared = false) {
|
|
27408
27421
|
const title = normalizePhaseTitle(rawTitle);
|
|
27409
|
-
const existing = this.
|
|
27422
|
+
const existing = declared ? this.records.find((record4) => record4.title === title) : matchTitle(this.records, title);
|
|
27410
27423
|
if (existing)
|
|
27411
27424
|
return { phase: existing, isNew: false };
|
|
27412
|
-
const phase = { index: this.
|
|
27413
|
-
this.
|
|
27425
|
+
const phase = { index: this.records.length + 1, title, declared };
|
|
27426
|
+
this.records.push(phase);
|
|
27414
27427
|
return { phase, isNew: true };
|
|
27415
27428
|
}
|
|
27416
27429
|
all() {
|
|
27417
|
-
return [...this.
|
|
27430
|
+
return [...this.records];
|
|
27418
27431
|
}
|
|
27419
27432
|
};
|
|
27420
27433
|
function statusOf(total2, done, failed) {
|
|
@@ -27426,7 +27439,7 @@ function statusOf(total2, done, failed) {
|
|
|
27426
27439
|
}
|
|
27427
27440
|
__name(statusOf, "statusOf");
|
|
27428
27441
|
function summarizeWorkflowPhases(declared, phases, agents) {
|
|
27429
|
-
const
|
|
27442
|
+
const named2 = declared.map((p) => ({ title: normalizePhaseTitle(p.title), detail: p.detail }));
|
|
27430
27443
|
const summarize2 = /* @__PURE__ */ __name((index, title, members2, extra) => {
|
|
27431
27444
|
const done = members2.filter((a) => a.state === "done").length;
|
|
27432
27445
|
const failed = members2.filter((a) => a.state === "error").length;
|
|
@@ -27441,7 +27454,7 @@ function summarizeWorkflowPhases(declared, phases, agents) {
|
|
|
27441
27454
|
tokens: members2.reduce((sum, a) => sum + a.tokens, 0)
|
|
27442
27455
|
};
|
|
27443
27456
|
}, "summarize");
|
|
27444
|
-
const out = phases.map((p) => summarize2(p.index, p.title, agents.filter((a) => a.phaseIndex === p.index),
|
|
27457
|
+
const out = phases.map((p) => summarize2(p.index, p.title, agents.filter((a) => a.phaseIndex === p.index), matchTitle(named2, p.title)?.detail));
|
|
27445
27458
|
const ungrouped = agents.filter((a) => a.phaseIndex === void 0);
|
|
27446
27459
|
if (ungrouped.length > 0)
|
|
27447
27460
|
out.push(summarize2(0, "Agents", ungrouped));
|
|
@@ -40298,6 +40311,24 @@ var WorkingStateManager = class {
|
|
|
40298
40311
|
while (restorable.skills.length > MAX_RESTORABLE_SKILLS)
|
|
40299
40312
|
restorable.skills.shift();
|
|
40300
40313
|
}
|
|
40314
|
+
/**
|
|
40315
|
+
* Take in skills the conversation shows that this manager did not see load
|
|
40316
|
+
* (a turn that began from a history, or a resumed one). They count as older
|
|
40317
|
+
* than anything this manager recorded itself, and never replace it.
|
|
40318
|
+
* `skills` is oldest first.
|
|
40319
|
+
*/
|
|
40320
|
+
adoptSkillBodies(skills) {
|
|
40321
|
+
const missing2 = skills.filter((skill) => skill.name.trim().length > 0 && skill.body.trim().length > 0 && !this.state.restorable?.skills.some((held3) => held3.name === skill.name));
|
|
40322
|
+
if (missing2.length === 0)
|
|
40323
|
+
return;
|
|
40324
|
+
const restorable = this.restorableState();
|
|
40325
|
+
restorable.skills.unshift(...missing2.map((skill) => ({
|
|
40326
|
+
name: skill.name,
|
|
40327
|
+
body: skill.body.slice(0, MAX_RESTORABLE_CHARS)
|
|
40328
|
+
})));
|
|
40329
|
+
while (restorable.skills.length > MAX_RESTORABLE_SKILLS)
|
|
40330
|
+
restorable.skills.shift();
|
|
40331
|
+
}
|
|
40301
40332
|
/** Remember what a read returned so a compaction can put it back. */
|
|
40302
40333
|
recordFileText(path2, text9) {
|
|
40303
40334
|
const key6 = normalizeRestorablePath(path2);
|
|
@@ -41514,6 +41545,7 @@ var SESSION_EVENT_TYPE_TABLE = {
|
|
|
41514
41545
|
compaction_shed: true,
|
|
41515
41546
|
compaction_completed: true,
|
|
41516
41547
|
compaction_tool_results_cleared: true,
|
|
41548
|
+
compaction_skills_carried: true,
|
|
41517
41549
|
compaction_failed: true,
|
|
41518
41550
|
tool_executing: true,
|
|
41519
41551
|
tool_progress: true,
|
|
@@ -44644,6 +44676,78 @@ function readSessionLog(file2, options = {}) {
|
|
|
44644
44676
|
}
|
|
44645
44677
|
__name(readSessionLog, "readSessionLog");
|
|
44646
44678
|
|
|
44679
|
+
// ../sdk/dist/store/session-log/turn-holder.js
|
|
44680
|
+
import { createHash as createHash10 } from "node:crypto";
|
|
44681
|
+
import { readFileSync as readFileSync3, readlinkSync } from "node:fs";
|
|
44682
|
+
import { hostname as hostname3 } from "node:os";
|
|
44683
|
+
var PLACE_LENGTH = 12;
|
|
44684
|
+
var PLACE_TAIL = new RegExp(`@([0-9a-f]{${PLACE_LENGTH}})$`);
|
|
44685
|
+
var HOLDER = /^namzu:([0-9]+):([\s\S]+)$/;
|
|
44686
|
+
function placeOf(source) {
|
|
44687
|
+
let material = `host:${source.hostName}`;
|
|
44688
|
+
if (source.pidNamespace)
|
|
44689
|
+
material += `
|
|
44690
|
+
pidns:${source.pidNamespace}`;
|
|
44691
|
+
if (source.machineId)
|
|
44692
|
+
material += `
|
|
44693
|
+
machine:${source.machineId}`;
|
|
44694
|
+
return createHash10("sha256").update(material).digest("hex").slice(0, PLACE_LENGTH);
|
|
44695
|
+
}
|
|
44696
|
+
__name(placeOf, "placeOf");
|
|
44697
|
+
function readPidNamespace() {
|
|
44698
|
+
try {
|
|
44699
|
+
return readlinkSync("/proc/self/ns/pid");
|
|
44700
|
+
} catch {
|
|
44701
|
+
return void 0;
|
|
44702
|
+
}
|
|
44703
|
+
}
|
|
44704
|
+
__name(readPidNamespace, "readPidNamespace");
|
|
44705
|
+
function readMachineId() {
|
|
44706
|
+
for (const path2 of ["/etc/machine-id", "/var/lib/dbus/machine-id"]) {
|
|
44707
|
+
try {
|
|
44708
|
+
const id3 = readFileSync3(path2, "utf8").trim();
|
|
44709
|
+
if (id3 !== "")
|
|
44710
|
+
return id3;
|
|
44711
|
+
} catch {
|
|
44712
|
+
}
|
|
44713
|
+
}
|
|
44714
|
+
return void 0;
|
|
44715
|
+
}
|
|
44716
|
+
__name(readMachineId, "readMachineId");
|
|
44717
|
+
var cachedPlace;
|
|
44718
|
+
function currentPlace() {
|
|
44719
|
+
cachedPlace ??= placeOf({
|
|
44720
|
+
hostName: hostname3(),
|
|
44721
|
+
pidNamespace: readPidNamespace(),
|
|
44722
|
+
machineId: readMachineId()
|
|
44723
|
+
});
|
|
44724
|
+
return cachedPlace;
|
|
44725
|
+
}
|
|
44726
|
+
__name(currentPlace, "currentPlace");
|
|
44727
|
+
function turnHolder(tail, options = {}) {
|
|
44728
|
+
return `namzu:${options.pid ?? process.pid}:${tail}@${options.place ?? currentPlace()}`;
|
|
44729
|
+
}
|
|
44730
|
+
__name(turnHolder, "turnHolder");
|
|
44731
|
+
function parseTurnHolder(holder) {
|
|
44732
|
+
const match = HOLDER.exec(holder);
|
|
44733
|
+
if (!match)
|
|
44734
|
+
return null;
|
|
44735
|
+
const pid = Number(match[1]);
|
|
44736
|
+
if (!Number.isSafeInteger(pid))
|
|
44737
|
+
return null;
|
|
44738
|
+
let turnId6 = match[2];
|
|
44739
|
+
let place;
|
|
44740
|
+
const tail = PLACE_TAIL.exec(turnId6);
|
|
44741
|
+
if (tail) {
|
|
44742
|
+
place = tail[1];
|
|
44743
|
+
turnId6 = turnId6.slice(0, turnId6.length - tail[0].length);
|
|
44744
|
+
}
|
|
44745
|
+
if (turnId6 === "")
|
|
44746
|
+
return null;
|
|
44747
|
+
return place === void 0 ? { pid, turnId: turnId6 } : { pid, turnId: turnId6, place };
|
|
44748
|
+
}
|
|
44749
|
+
__name(parseTurnHolder, "parseTurnHolder");
|
|
44750
|
+
|
|
44647
44751
|
// ../sdk/dist/store/session-log/memory.js
|
|
44648
44752
|
var InMemoryLogMedium = class {
|
|
44649
44753
|
static {
|
|
@@ -45235,7 +45339,7 @@ var TurnRecorder = class {
|
|
|
45235
45339
|
if (this.#phase !== "new")
|
|
45236
45340
|
throw new Error("TurnRecorder.open was already called.");
|
|
45237
45341
|
this.#leaseTtlMs = options.leaseTtlMs ?? DEFAULT_TURN_LEASE_TTL_MS;
|
|
45238
|
-
this.#leaseHolder = options.holder ?? options.lease?.holder ??
|
|
45342
|
+
this.#leaseHolder = options.holder ?? options.lease?.holder ?? turnHolder(this.turnId);
|
|
45239
45343
|
try {
|
|
45240
45344
|
if (options.lease) {
|
|
45241
45345
|
this.#lease = options.lease;
|
|
@@ -50439,10 +50543,10 @@ var DetachedCalls = class {
|
|
|
50439
50543
|
};
|
|
50440
50544
|
|
|
50441
50545
|
// ../sdk/dist/store/memory/digest.js
|
|
50442
|
-
import { createHash as
|
|
50546
|
+
import { createHash as createHash11 } from "node:crypto";
|
|
50443
50547
|
var KNOWLEDGE_TAG_PREFIX = "knowledge:";
|
|
50444
50548
|
function knowledgeDigest(value) {
|
|
50445
|
-
return
|
|
50549
|
+
return createHash11("sha256").update(JSON.stringify(value)).digest("hex");
|
|
50446
50550
|
}
|
|
50447
50551
|
__name(knowledgeDigest, "knowledgeDigest");
|
|
50448
50552
|
async function holdsKnowledgeDigest(store, tags, digest8, isWriter) {
|
|
@@ -52547,7 +52651,7 @@ async function deliverDurableInbound(recorder, source, signal) {
|
|
|
52547
52651
|
__name(deliverDurableInbound, "deliverDurableInbound");
|
|
52548
52652
|
|
|
52549
52653
|
// ../sdk/dist/runtime/query/observation-context.js
|
|
52550
|
-
import { createHash as
|
|
52654
|
+
import { createHash as createHash14 } from "node:crypto";
|
|
52551
52655
|
|
|
52552
52656
|
// ../sdk/dist/compaction/retention.js
|
|
52553
52657
|
var isAssistantWithCalls = /* @__PURE__ */ __name((m) => m.role === "assistant" && Array.isArray(m.toolCalls), "isAssistantWithCalls");
|
|
@@ -52623,12 +52727,12 @@ function findRetainedIndices(messages) {
|
|
|
52623
52727
|
__name(findRetainedIndices, "findRetainedIndices");
|
|
52624
52728
|
|
|
52625
52729
|
// ../sdk/dist/runtime/query/tool-output-budget.js
|
|
52626
|
-
import { createHash as
|
|
52730
|
+
import { createHash as createHash13 } from "node:crypto";
|
|
52627
52731
|
import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync2 } from "node:fs";
|
|
52628
52732
|
import { join as join13 } from "node:path";
|
|
52629
52733
|
|
|
52630
52734
|
// ../sdk/dist/store/evidence/format.js
|
|
52631
|
-
import { createHash as
|
|
52735
|
+
import { createHash as createHash12 } from "node:crypto";
|
|
52632
52736
|
|
|
52633
52737
|
// ../sdk/dist/utils/evidence-tokens.js
|
|
52634
52738
|
function evidenceTokens(text9) {
|
|
@@ -52667,7 +52771,7 @@ var SEARCH_OVERLAP_BYTES = 1024;
|
|
|
52667
52771
|
var FILTER_BYTES = 1024;
|
|
52668
52772
|
var TOKEN_FILTER_PREFIX = `tokens-v1:${digest2(`${process.version}:${process.versions.v8}:${process.versions.unicode}`).slice(0, 16)}:`;
|
|
52669
52773
|
function digest2(value) {
|
|
52670
|
-
return
|
|
52774
|
+
return createHash12("sha256").update(value).digest("hex");
|
|
52671
52775
|
}
|
|
52672
52776
|
__name(digest2, "digest");
|
|
52673
52777
|
function hashAt(text9, offset) {
|
|
@@ -52932,7 +53036,7 @@ __name(applyToolOutputBudget, "applyToolOutputBudget");
|
|
|
52932
53036
|
function spill2(dir, toolUseId3, content, onError) {
|
|
52933
53037
|
try {
|
|
52934
53038
|
mkdirSync3(dir, { recursive: true, mode: 448 });
|
|
52935
|
-
const name2 =
|
|
53039
|
+
const name2 = createHash13("sha256").update(toolUseId3).digest("hex");
|
|
52936
53040
|
const path2 = join13(dir, `${name2}.txt`);
|
|
52937
53041
|
const bytes = Buffer.from(content, "utf8");
|
|
52938
53042
|
writeFileSync2(path2, bytes, { flag: "wx", mode: 384 });
|
|
@@ -53154,7 +53258,7 @@ function projectObservationContext(messages, tools, preserveToolResultsFrom = []
|
|
|
53154
53258
|
}
|
|
53155
53259
|
if (executionKey === void 0)
|
|
53156
53260
|
continue;
|
|
53157
|
-
const key6 =
|
|
53261
|
+
const key6 = createHash14("sha256").update(JSON.stringify([
|
|
53158
53262
|
call2.function.name,
|
|
53159
53263
|
call2.function.arguments,
|
|
53160
53264
|
message.content,
|
|
@@ -53181,7 +53285,7 @@ function projectObservationContext(messages, tools, preserveToolResultsFrom = []
|
|
|
53181
53285
|
__name(projectObservationContext, "projectObservationContext");
|
|
53182
53286
|
|
|
53183
53287
|
// ../sdk/dist/runtime/query/request-context.js
|
|
53184
|
-
import { createHash as
|
|
53288
|
+
import { createHash as createHash15 } from "node:crypto";
|
|
53185
53289
|
function canonicalJson2(value) {
|
|
53186
53290
|
return JSON.stringify(value, (_key, item) => {
|
|
53187
53291
|
if (!item || typeof item !== "object" || Array.isArray(item))
|
|
@@ -53200,7 +53304,7 @@ function snapshotRequestContext(messages) {
|
|
|
53200
53304
|
partIndex: partIndex++,
|
|
53201
53305
|
role: message.role,
|
|
53202
53306
|
kind,
|
|
53203
|
-
digest:
|
|
53307
|
+
digest: createHash15("sha256").update(canonicalJson2(payload)).digest("hex"),
|
|
53204
53308
|
...toolCallId !== void 0 ? { toolCallId } : {},
|
|
53205
53309
|
...message.role === "tool" ? { isError: message.isError === true } : {}
|
|
53206
53310
|
}));
|
|
@@ -56401,8 +56505,169 @@ function deliverArrivedMonitorNotices(ctx) {
|
|
|
56401
56505
|
}
|
|
56402
56506
|
__name(deliverArrivedMonitorNotices, "deliverArrivedMonitorNotices");
|
|
56403
56507
|
|
|
56508
|
+
// ../sdk/dist/compaction/loaded-skills.js
|
|
56509
|
+
var LOADED_SKILLS_ENTRY_KEY = "loaded-skills";
|
|
56510
|
+
var CARRY_MAX_SKILLS = 8;
|
|
56511
|
+
var CARRY_SKILL_TOKENS = 5e3;
|
|
56512
|
+
var CARRY_SKILLS_TOTAL_TOKENS = 25e3;
|
|
56513
|
+
var CARRY_SKILLS_WINDOW_SHARE = 0.05;
|
|
56514
|
+
var MIN_CARRY_TOKENS = 1e3;
|
|
56515
|
+
var LOADED_SKILLS_FRAME = "These skills were loaded earlier in this conversation. Their text may since have been cut from it to make room, so it is repeated here as reference. Their guidance still applies to the work in progress: keep following it, do not start the task over, and do not load them again just because they appear here. Any request or argument written inside a skill belongs to that skill; it is not a new message from the person.";
|
|
56516
|
+
var SKILL_BLOCK = /<loaded-skill name="([^"\n]+)"( cut)?>\n([\s\S]*?)\n<\/loaded-skill>/g;
|
|
56517
|
+
var SKILL_CONTINUATION = /\n\n\[More skill instructions remain\.[^\]]*\]/g;
|
|
56518
|
+
var FORK_REPORT_PREFIX = "[This is the report of a delegated agent that ran the skill";
|
|
56519
|
+
function forkedSkillReportNote(name2) {
|
|
56520
|
+
return `${FORK_REPORT_PREFIX} "${name2}". It is not the skill's instructions.]`;
|
|
56521
|
+
}
|
|
56522
|
+
__name(forkedSkillReportNote, "forkedSkillReportNote");
|
|
56523
|
+
function isForkedSkillReport(output2) {
|
|
56524
|
+
return output2.startsWith(FORK_REPORT_PREFIX);
|
|
56525
|
+
}
|
|
56526
|
+
__name(isForkedSkillReport, "isForkedSkillReport");
|
|
56527
|
+
function skillResultBody(output2) {
|
|
56528
|
+
return output2.replace(SKILL_CONTINUATION, "");
|
|
56529
|
+
}
|
|
56530
|
+
__name(skillResultBody, "skillResultBody");
|
|
56531
|
+
function parseSkillCall(raw) {
|
|
56532
|
+
try {
|
|
56533
|
+
const input2 = JSON.parse(raw);
|
|
56534
|
+
if (typeof input2.name !== "string" || input2.name.trim().length === 0)
|
|
56535
|
+
return void 0;
|
|
56536
|
+
return {
|
|
56537
|
+
name: input2.name.trim(),
|
|
56538
|
+
paged: typeof input2.cursor === "string" && input2.cursor.length > 0
|
|
56539
|
+
};
|
|
56540
|
+
} catch {
|
|
56541
|
+
return void 0;
|
|
56542
|
+
}
|
|
56543
|
+
}
|
|
56544
|
+
__name(parseSkillCall, "parseSkillCall");
|
|
56545
|
+
function collectLoadedSkills(messages) {
|
|
56546
|
+
const found = /* @__PURE__ */ new Map();
|
|
56547
|
+
const calls = /* @__PURE__ */ new Map();
|
|
56548
|
+
const put = /* @__PURE__ */ __name((skill) => {
|
|
56549
|
+
found.delete(skill.name);
|
|
56550
|
+
found.set(skill.name, skill);
|
|
56551
|
+
}, "put");
|
|
56552
|
+
for (const message of messages) {
|
|
56553
|
+
if (message.role === "assistant") {
|
|
56554
|
+
for (const call2 of message.toolCalls ?? []) {
|
|
56555
|
+
if (call2.function.name !== "skill")
|
|
56556
|
+
continue;
|
|
56557
|
+
const parsed = parseSkillCall(call2.function.arguments);
|
|
56558
|
+
if (parsed)
|
|
56559
|
+
calls.set(call2.id, parsed);
|
|
56560
|
+
}
|
|
56561
|
+
continue;
|
|
56562
|
+
}
|
|
56563
|
+
if (message.role === "tool") {
|
|
56564
|
+
const call2 = calls.get(message.toolCallId);
|
|
56565
|
+
if (!call2 || message.isError === true)
|
|
56566
|
+
continue;
|
|
56567
|
+
const text10 = typeof message.content === "string" ? message.content : toolResultToText(message.content);
|
|
56568
|
+
const earlier = found.get(call2.name);
|
|
56569
|
+
if (isClearedToolResult(text10)) {
|
|
56570
|
+
if (!call2.paged && earlier?.whole)
|
|
56571
|
+
continue;
|
|
56572
|
+
put({ name: call2.name, body: earlier?.body ?? "", whole: false });
|
|
56573
|
+
continue;
|
|
56574
|
+
}
|
|
56575
|
+
if (text10.trim().length === 0)
|
|
56576
|
+
continue;
|
|
56577
|
+
if (isForkedSkillReport(text10))
|
|
56578
|
+
continue;
|
|
56579
|
+
const body = skillResultBody(text10);
|
|
56580
|
+
put(call2.paged && earlier ? {
|
|
56581
|
+
name: call2.name,
|
|
56582
|
+
body: `${earlier.body}${body}`,
|
|
56583
|
+
whole: earlier.whole
|
|
56584
|
+
} : { name: call2.name, body, whole: true });
|
|
56585
|
+
continue;
|
|
56586
|
+
}
|
|
56587
|
+
const text9 = typeof message.content === "string" ? message.content : void 0;
|
|
56588
|
+
if (text9 === void 0)
|
|
56589
|
+
continue;
|
|
56590
|
+
const carriesSkills = message.role === "user" ? turnContextKey(message) === LOADED_SKILLS_ENTRY_KEY : message.role === "system" && isCompactionMessage(text9);
|
|
56591
|
+
if (!carriesSkills)
|
|
56592
|
+
continue;
|
|
56593
|
+
for (const match of text9.matchAll(SKILL_BLOCK)) {
|
|
56594
|
+
const [, name2, cut, body] = match;
|
|
56595
|
+
if (name2 && body !== void 0)
|
|
56596
|
+
put({ name: name2, body, whole: cut === void 0, carried: true });
|
|
56597
|
+
}
|
|
56598
|
+
}
|
|
56599
|
+
return [...found.values()];
|
|
56600
|
+
}
|
|
56601
|
+
__name(collectLoadedSkills, "collectLoadedSkills");
|
|
56602
|
+
var LEFT_OUT = /left out to keep this short: ([^\n]*?)\. Call the skill tool/g;
|
|
56603
|
+
function handledSkillNames(messages) {
|
|
56604
|
+
const handled = /* @__PURE__ */ new Set();
|
|
56605
|
+
for (const skill of collectLoadedSkills(messages)) {
|
|
56606
|
+
if (skill.whole || skill.carried)
|
|
56607
|
+
handled.add(skill.name);
|
|
56608
|
+
}
|
|
56609
|
+
for (const message of messages) {
|
|
56610
|
+
if (typeof message.content !== "string")
|
|
56611
|
+
continue;
|
|
56612
|
+
const carries = message.role === "user" ? turnContextKey(message) === LOADED_SKILLS_ENTRY_KEY : message.role === "system" && isCompactionMessage(message.content);
|
|
56613
|
+
if (!carries)
|
|
56614
|
+
continue;
|
|
56615
|
+
for (const match of message.content.matchAll(LEFT_OUT)) {
|
|
56616
|
+
for (const name2 of (match[1] ?? "").split(", "))
|
|
56617
|
+
if (name2)
|
|
56618
|
+
handled.add(name2);
|
|
56619
|
+
}
|
|
56620
|
+
}
|
|
56621
|
+
return handled;
|
|
56622
|
+
}
|
|
56623
|
+
__name(handledSkillNames, "handledSkillNames");
|
|
56624
|
+
function adoptableSkills(messages) {
|
|
56625
|
+
return collectLoadedSkills(messages).filter((skill) => skill.body.trim().length > 0 && (skill.whole || skill.carried));
|
|
56626
|
+
}
|
|
56627
|
+
__name(adoptableSkills, "adoptableSkills");
|
|
56628
|
+
var tokensOf = /* @__PURE__ */ __name((text9) => Math.ceil(text9.length / CHARS_PER_TOKEN), "tokensOf");
|
|
56629
|
+
function cutNote(name2) {
|
|
56630
|
+
return `\u2026 [cut here to save space; call the skill tool with name "${name2}" to read all of it]`;
|
|
56631
|
+
}
|
|
56632
|
+
__name(cutNote, "cutNote");
|
|
56633
|
+
function renderLoadedSkills(skills, options = {}) {
|
|
56634
|
+
const window2 = options.contextWindowTokens;
|
|
56635
|
+
let budget = window2 === void 0 ? CARRY_SKILLS_TOTAL_TOKENS : Math.min(CARRY_SKILLS_TOTAL_TOKENS, Math.floor(window2 * CARRY_SKILLS_WINDOW_SHARE));
|
|
56636
|
+
const blocks = [];
|
|
56637
|
+
const carried2 = [];
|
|
56638
|
+
const cut = [];
|
|
56639
|
+
const left = [];
|
|
56640
|
+
for (const skill of [...skills].reverse()) {
|
|
56641
|
+
if (carried2.length >= CARRY_MAX_SKILLS || budget < MIN_CARRY_TOKENS) {
|
|
56642
|
+
left.push(skill.name);
|
|
56643
|
+
continue;
|
|
56644
|
+
}
|
|
56645
|
+
const room = Math.min(CARRY_SKILL_TOKENS, budget) * CHARS_PER_TOKEN;
|
|
56646
|
+
const note = cutNote(skill.name);
|
|
56647
|
+
const isCut = skill.body.length > room;
|
|
56648
|
+
const body = isCut ? `${skill.body.slice(0, Math.max(0, room - note.length))}
|
|
56649
|
+
${note}` : skill.body;
|
|
56650
|
+
budget -= tokensOf(body);
|
|
56651
|
+
carried2.unshift(skill.name);
|
|
56652
|
+
if (isCut)
|
|
56653
|
+
cut.unshift(skill.name);
|
|
56654
|
+
blocks.unshift(`<loaded-skill name="${skill.name}"${isCut ? " cut" : ""}>
|
|
56655
|
+
${body.replaceAll("</loaded-skill>", "<\\/loaded-skill>")}
|
|
56656
|
+
</loaded-skill>`);
|
|
56657
|
+
}
|
|
56658
|
+
if (carried2.length === 0 && left.length === 0) {
|
|
56659
|
+
return { text: void 0, carried: carried2, cut, left };
|
|
56660
|
+
}
|
|
56661
|
+
const parts = [LOADED_SKILLS_FRAME, ...blocks];
|
|
56662
|
+
if (left.length > 0) {
|
|
56663
|
+
parts.push(`Also loaded earlier, left out to keep this short: ${left.join(", ")}. Call the skill tool with a name to load one again.`);
|
|
56664
|
+
}
|
|
56665
|
+
return { text: parts.join("\n\n"), carried: carried2, cut, left };
|
|
56666
|
+
}
|
|
56667
|
+
__name(renderLoadedSkills, "renderLoadedSkills");
|
|
56668
|
+
|
|
56404
56669
|
// ../sdk/dist/runtime/query/iteration/request-repair.js
|
|
56405
|
-
import { createHash as
|
|
56670
|
+
import { createHash as createHash16 } from "node:crypto";
|
|
56406
56671
|
|
|
56407
56672
|
// ../sdk/dist/provider/image-input-refusal.js
|
|
56408
56673
|
var IMAGE_INPUT_REFUSAL_PATTERNS = [
|
|
@@ -56679,7 +56944,7 @@ function isAccepted(chunk) {
|
|
|
56679
56944
|
return Boolean(chunk.delta.content || chunk.delta.toolCalls?.length || chunk.delta.toolCallEnd || chunk.delta.reasoning || chunk.delta.citation || chunk.finishReason !== void 0 || chunk.usage !== void 0 || chunk.replayState !== void 0 || chunk.textParts !== void 0);
|
|
56680
56945
|
}
|
|
56681
56946
|
__name(isAccepted, "isAccepted");
|
|
56682
|
-
var mediaFingerprint = /* @__PURE__ */ __name((data, mediaType) =>
|
|
56947
|
+
var mediaFingerprint = /* @__PURE__ */ __name((data, mediaType) => createHash16("sha256").update(mediaType).update("\0").update(data).digest("hex"), "mediaFingerprint");
|
|
56683
56948
|
var FAULT_NOTE = "the provider could not process it. The file may be unsupported or corrupt; do not retry reading it. If you need to inspect it, use a shell command instead.";
|
|
56684
56949
|
var LIMIT_NOTE = "this conversation holds more files than the provider accepts at once, so the oldest are left out of the request. They are still in the conversation.";
|
|
56685
56950
|
var removedNote = /* @__PURE__ */ __name((kind, limit) => `[${kind} removed: ${limit ? LIMIT_NOTE : FAULT_NOTE}]`, "removedNote");
|
|
@@ -58314,16 +58579,11 @@ __name(createSlidingWindowReducer, "createSlidingWindowReducer");
|
|
|
58314
58579
|
|
|
58315
58580
|
// ../sdk/dist/compaction/restore.js
|
|
58316
58581
|
import { resolve as resolvePath } from "node:path";
|
|
58317
|
-
var RESTORE_MAX_SKILLS = 8;
|
|
58318
|
-
var RESTORE_SKILL_TOKENS = 5e3;
|
|
58319
|
-
var RESTORE_SKILLS_TOTAL_TOKENS = 25e3;
|
|
58320
58582
|
var RESTORE_MAX_FILES = 5;
|
|
58321
58583
|
var RESTORE_FILE_TOKENS = 5e3;
|
|
58322
58584
|
var RESTORE_FILES_TOTAL_TOKENS = 5e4;
|
|
58323
58585
|
var RESTORE_FILES_WINDOW_SHARE = 0.1;
|
|
58324
|
-
var RESTORE_SKILLS_WINDOW_SHARE = 0.05;
|
|
58325
58586
|
var CUT_MARKER = "\n\u2026 [cut to fit the restore budget]";
|
|
58326
|
-
var SKILL_CONTINUATION = /\n\n\[More skill instructions remain\.[^\]]*\]/g;
|
|
58327
58587
|
function isInstructionPath(path2) {
|
|
58328
58588
|
const normal = path2.replace(/\\/g, "/");
|
|
58329
58589
|
const name2 = normal.slice(normal.lastIndexOf("/") + 1);
|
|
@@ -58345,7 +58605,11 @@ function recordRestorable(manager, call2) {
|
|
|
58345
58605
|
if (call2.toolName === "skill") {
|
|
58346
58606
|
if (!call2.success || typeof input2.name !== "string")
|
|
58347
58607
|
return;
|
|
58348
|
-
|
|
58608
|
+
if (isClearedToolResult(call2.output))
|
|
58609
|
+
return;
|
|
58610
|
+
if (isForkedSkillReport(call2.output))
|
|
58611
|
+
return;
|
|
58612
|
+
manager.recordSkillBody(input2.name, skillResultBody(call2.output), typeof input2.cursor === "string" && input2.cursor.length > 0);
|
|
58349
58613
|
return;
|
|
58350
58614
|
}
|
|
58351
58615
|
if (call2.toolName === "read") {
|
|
@@ -58369,20 +58633,15 @@ function fit(text9, tokens) {
|
|
|
58369
58633
|
__name(fit, "fit");
|
|
58370
58634
|
function renderRestoredContext(state, options = {}) {
|
|
58371
58635
|
const window2 = options.contextWindowTokens;
|
|
58372
|
-
const skillsTotal = window2 === void 0 ? RESTORE_SKILLS_TOTAL_TOKENS : Math.min(RESTORE_SKILLS_TOTAL_TOKENS, Math.floor(window2 * RESTORE_SKILLS_WINDOW_SHARE));
|
|
58373
58636
|
const filesTotal = window2 === void 0 ? RESTORE_FILES_TOTAL_TOKENS : Math.min(RESTORE_FILES_TOTAL_TOKENS, Math.floor(window2 * RESTORE_FILES_WINDOW_SHARE));
|
|
58374
58637
|
const sections = [];
|
|
58375
|
-
|
|
58376
|
-
const skills =
|
|
58377
|
-
|
|
58378
|
-
|
|
58379
|
-
|
|
58380
|
-
const body = fit(skill.body, Math.min(RESTORE_SKILL_TOKENS, skillBudget));
|
|
58381
|
-
skillBudget -= Math.ceil(body.length / CHARS_PER_TOKEN);
|
|
58382
|
-
sections.push(`### Skill: ${skill.name}
|
|
58638
|
+
const toShow = (state.restorable?.skills ?? []).filter((skill) => !options.wholeSkills?.has(skill.name));
|
|
58639
|
+
const skills = renderLoadedSkills(toShow, window2 === void 0 ? {} : { contextWindowTokens: window2 });
|
|
58640
|
+
options.onSkills?.(skills);
|
|
58641
|
+
if (skills.text)
|
|
58642
|
+
sections.push(`### Skills loaded earlier
|
|
58383
58643
|
|
|
58384
|
-
${
|
|
58385
|
-
}
|
|
58644
|
+
${skills.text}`);
|
|
58386
58645
|
let fileBudget = filesTotal;
|
|
58387
58646
|
let files = 0;
|
|
58388
58647
|
const candidates = [...state.restorable?.files ?? []].reverse();
|
|
@@ -58878,11 +59137,47 @@ async function emitToolResultClear(ctx, plan) {
|
|
|
58878
59137
|
});
|
|
58879
59138
|
}
|
|
58880
59139
|
__name(emitToolResultClear, "emitToolResultClear");
|
|
59140
|
+
function adoptLoadedSkills(ctx) {
|
|
59141
|
+
ctx.workingStateManager?.adoptSkillBodies(adoptableSkills(ctx.recorder.messages));
|
|
59142
|
+
}
|
|
59143
|
+
__name(adoptLoadedSkills, "adoptLoadedSkills");
|
|
59144
|
+
async function carryLoadedSkills(ctx, contextWindowTokens) {
|
|
59145
|
+
const manager = ctx.workingStateManager;
|
|
59146
|
+
const loaded = manager?.getState().restorable?.skills;
|
|
59147
|
+
if (!loaded || loaded.length === 0)
|
|
59148
|
+
return;
|
|
59149
|
+
const handled = handledSkillNames(ctx.recorder.messages);
|
|
59150
|
+
const missing2 = loaded.filter((skill) => !handled.has(skill.name));
|
|
59151
|
+
if (missing2.length === 0)
|
|
59152
|
+
return;
|
|
59153
|
+
const rendered = renderLoadedSkills(missing2, { contextWindowTokens });
|
|
59154
|
+
if (!rendered.text)
|
|
59155
|
+
return;
|
|
59156
|
+
const earlier = turnContextEntries(ctx.recorder.messages, LOADED_SKILLS_ENTRY_KEY);
|
|
59157
|
+
ctx.recorder.pushMessage(createTurnContextEntry(LOADED_SKILLS_ENTRY_KEY, rendered.text, /* @__PURE__ */ new Date(), {
|
|
59158
|
+
later: earlier.length > 0
|
|
59159
|
+
}));
|
|
59160
|
+
await emitSkillsCarried(ctx, rendered);
|
|
59161
|
+
}
|
|
59162
|
+
__name(carryLoadedSkills, "carryLoadedSkills");
|
|
59163
|
+
async function emitSkillsCarried(ctx, rendered) {
|
|
59164
|
+
await ctx.emitEvent?.({
|
|
59165
|
+
type: "compaction_skills_carried",
|
|
59166
|
+
turnId: ctx.recorder.turnId,
|
|
59167
|
+
iteration: ctx.recorder.currentIteration,
|
|
59168
|
+
skills: [...rendered.carried],
|
|
59169
|
+
cut: [...rendered.cut],
|
|
59170
|
+
leftOut: [...rendered.left]
|
|
59171
|
+
});
|
|
59172
|
+
}
|
|
59173
|
+
__name(emitSkillsCarried, "emitSkillsCarried");
|
|
58881
59174
|
async function commitToolResultClear(ctx, plan, contextWindowTokens, windowSource, reason) {
|
|
58882
59175
|
await recordShed(ctx, [...ctx.recorder.messages], plan.messages, reason);
|
|
59176
|
+
adoptLoadedSkills(ctx);
|
|
58883
59177
|
installMessages(ctx.recorder.messages, plan.messages);
|
|
58884
59178
|
ctx.recorder.clearLastPromptTokens?.();
|
|
58885
59179
|
await emitToolResultClear(ctx, plan);
|
|
59180
|
+
await carryLoadedSkills(ctx, contextWindowTokens);
|
|
58886
59181
|
await emitContextUsageSnapshot(ctx, estimateTokens(ctx), contextWindowTokens, windowSource);
|
|
58887
59182
|
if (reason !== "manual")
|
|
58888
59183
|
compactionBreaker(ctx)?.recordRelief();
|
|
@@ -59436,6 +59731,7 @@ async function runCompactionCheckInner(ctx, pass, options) {
|
|
|
59436
59731
|
} else {
|
|
59437
59732
|
compactedContent = serializeState(manager.getState());
|
|
59438
59733
|
}
|
|
59734
|
+
adoptLoadedSkills(ctx);
|
|
59439
59735
|
let hostNote;
|
|
59440
59736
|
try {
|
|
59441
59737
|
hostNote = await ctx.postCompactionContext?.();
|
|
@@ -59445,8 +59741,17 @@ async function runCompactionCheckInner(ctx, pass, options) {
|
|
|
59445
59741
|
"exception.message": error62 instanceof Error ? error62.message : String(error62)
|
|
59446
59742
|
});
|
|
59447
59743
|
}
|
|
59744
|
+
const preservedSystem = systemMessages.filter((m) => !isCompactionMessage(typeof m.content === "string" ? m.content : null) || m.retain === true);
|
|
59745
|
+
const retained = findRetainedIndices(messages);
|
|
59746
|
+
const retainedOlder = retained.size === 0 ? [] : messages.slice(systemMessages.length, keepStart).filter((_, offset) => retained.has(systemMessages.length + offset));
|
|
59747
|
+
const wholeSkills = handledSkillNames([...preservedSystem, ...retainedOlder, ...recentMessages]);
|
|
59748
|
+
const putBack = {};
|
|
59448
59749
|
const restored = renderRestoredContext(manager.getState(), {
|
|
59449
59750
|
contextWindowTokens: budget,
|
|
59751
|
+
wholeSkills,
|
|
59752
|
+
onSkills: /* @__PURE__ */ __name((rendered) => {
|
|
59753
|
+
putBack.rendered = rendered;
|
|
59754
|
+
}, "onSkills"),
|
|
59450
59755
|
...hostNote ? { hostNote } : {}
|
|
59451
59756
|
});
|
|
59452
59757
|
if (restored)
|
|
@@ -59455,9 +59760,6 @@ async function runCompactionCheckInner(ctx, pass, options) {
|
|
|
59455
59760
|
${restored}`;
|
|
59456
59761
|
const mounted = new Set(ctx.tools?.listNames?.() ?? []);
|
|
59457
59762
|
const compactionMessage = buildCompactionMessage(compactedContent, mounted.has("search_conversation") && mounted.has("read_conversation") ? COMPACTION_RECOVERY_NOTE : void 0);
|
|
59458
|
-
const preservedSystem = systemMessages.filter((m) => !isCompactionMessage(typeof m.content === "string" ? m.content : null) || m.retain === true);
|
|
59459
|
-
const retained = findRetainedIndices(messages);
|
|
59460
|
-
const retainedOlder = retained.size === 0 ? [] : messages.slice(systemMessages.length, keepStart).filter((_, offset) => retained.has(systemMessages.length + offset));
|
|
59461
59763
|
const newMessages = [...preservedSystem, compactionMessage, ...retainedOlder, ...recentMessages];
|
|
59462
59764
|
const survives = newMessages.some((m) => m.role === "system" && isWorkingMemoryMessage(m.content));
|
|
59463
59765
|
if (!survives) {
|
|
@@ -59520,6 +59822,9 @@ ${restored}`;
|
|
|
59520
59822
|
reachedResetThreshold: reachedReset
|
|
59521
59823
|
});
|
|
59522
59824
|
await emitContextUsageSnapshot(ctx, newEstimate, budget, window2.source);
|
|
59825
|
+
if (putBack.rendered && putBack.rendered.carried.length > 0) {
|
|
59826
|
+
await emitSkillsCarried(ctx, putBack.rendered);
|
|
59827
|
+
}
|
|
59523
59828
|
compactionBreaker(ctx)?.recordCompaction(ctx.recorder.currentIteration, beforeTokens, estimateRefillTokens(live2));
|
|
59524
59829
|
}
|
|
59525
59830
|
__name(runCompactionCheckInner, "runCompactionCheckInner");
|
|
@@ -60150,7 +60455,7 @@ function replaceProjectInstructionSnapshot(messages, snapshot, placement = "appe
|
|
|
60150
60455
|
__name(replaceProjectInstructionSnapshot, "replaceProjectInstructionSnapshot");
|
|
60151
60456
|
|
|
60152
60457
|
// ../sdk/dist/runtime/query/repeat-call.js
|
|
60153
|
-
import { createHash as
|
|
60458
|
+
import { createHash as createHash17 } from "node:crypto";
|
|
60154
60459
|
|
|
60155
60460
|
// ../sdk/dist/runtime/query/tool-grants.js
|
|
60156
60461
|
function toolGrantKeys(call2) {
|
|
@@ -60259,7 +60564,7 @@ var RepeatCallTracker = class {
|
|
|
60259
60564
|
this.failures.delete(key6);
|
|
60260
60565
|
return;
|
|
60261
60566
|
}
|
|
60262
|
-
const fingerprint =
|
|
60567
|
+
const fingerprint = createHash17("sha256").update(stableStringify(outcome.result ?? null)).digest("hex");
|
|
60263
60568
|
const previous = this.failures.get(key6);
|
|
60264
60569
|
this.failures.set(key6, {
|
|
60265
60570
|
fingerprint,
|
|
@@ -63162,9 +63467,9 @@ import { homedir } from "node:os";
|
|
|
63162
63467
|
import { basename as basename6, isAbsolute as isAbsolute6, join as join15, resolve as resolve6 } from "node:path";
|
|
63163
63468
|
|
|
63164
63469
|
// ../sdk/dist/tools/builtins/content-fingerprint.js
|
|
63165
|
-
import { createHash as
|
|
63470
|
+
import { createHash as createHash18 } from "node:crypto";
|
|
63166
63471
|
function fingerprintContent(content) {
|
|
63167
|
-
return
|
|
63472
|
+
return createHash18("sha256").update(content, "utf-8").digest("hex").slice(0, 16);
|
|
63168
63473
|
}
|
|
63169
63474
|
__name(fingerprintContent, "fingerprintContent");
|
|
63170
63475
|
function staleFileError(path2, operation = "edit") {
|
|
@@ -63596,17 +63901,17 @@ ${read.tail}`,
|
|
|
63596
63901
|
const changed = wrote !== void 0 && fingerprint !== void 0 && fingerprint !== wrote;
|
|
63597
63902
|
const unverifiable = wrote !== void 0 && fingerprint === void 0;
|
|
63598
63903
|
const nested = read.whole === void 0 ? [] : nestedLaunches(read.whole, dialect);
|
|
63599
|
-
const
|
|
63904
|
+
const cutNote2 = cap.cut > 0 ? ` It is long, so only its start and end are shown; ${cap.cut} characters in the middle are not, and cannot be assumed harmless.` : "";
|
|
63600
63905
|
const nestedNote = nested.length > 0 ? ` It also launches, sources or loads other files (${nested.map((n) => JSON.stringify(clip3(n))).join(", ")}) that are not read here, so what they run is not known.` : "";
|
|
63601
63906
|
let note;
|
|
63602
63907
|
if (origin === "unknown") {
|
|
63603
|
-
note = `this file was not written through the write or edit tools but appeared during this session (for example through a shell command or a download), so who wrote it is unknown.${
|
|
63908
|
+
note = `this file was not written through the write or edit tools but appeared during this session (for example through a shell command or a download), so who wrote it is unknown.${cutNote2}${nestedNote}`;
|
|
63604
63909
|
} else if (changed) {
|
|
63605
|
-
note = `the agent wrote this file, but it is no longer what the agent wrote: something changed it since. The current text is shown.${
|
|
63910
|
+
note = `the agent wrote this file, but it is no longer what the agent wrote: something changed it since. The current text is shown.${cutNote2}${nestedNote}`;
|
|
63606
63911
|
} else if (unverifiable) {
|
|
63607
|
-
note = `the agent wrote this file, but it is too large to check against what the agent wrote.${
|
|
63912
|
+
note = `the agent wrote this file, but it is too large to check against what the agent wrote.${cutNote2}${nestedNote}`;
|
|
63608
63913
|
} else {
|
|
63609
|
-
note = `the agent wrote this file and it is unchanged since.${
|
|
63914
|
+
note = `the agent wrote this file and it is unchanged since.${cutNote2}${nestedNote}`;
|
|
63610
63915
|
}
|
|
63611
63916
|
scripts.push({
|
|
63612
63917
|
path: asTyped,
|
|
@@ -65448,7 +65753,7 @@ function createReviewPolicy(options = {}) {
|
|
|
65448
65753
|
__name(createReviewPolicy, "createReviewPolicy");
|
|
65449
65754
|
|
|
65450
65755
|
// ../sdk/dist/runtime/query/executor.js
|
|
65451
|
-
import { createHash as
|
|
65756
|
+
import { createHash as createHash21 } from "node:crypto";
|
|
65452
65757
|
import { isAbsolute as isAbsolute11, join as join20, resolve as resolve12 } from "node:path";
|
|
65453
65758
|
|
|
65454
65759
|
// ../sdk/dist/probe/context.js
|
|
@@ -66615,7 +66920,7 @@ async function cropAndFitPng(data, rect, limits) {
|
|
|
66615
66920
|
__name(cropAndFitPng, "cropAndFitPng");
|
|
66616
66921
|
|
|
66617
66922
|
// ../sdk/dist/tools/builtins/view-image.js
|
|
66618
|
-
import { createHash as
|
|
66923
|
+
import { createHash as createHash19 } from "node:crypto";
|
|
66619
66924
|
import { open as open10 } from "node:fs/promises";
|
|
66620
66925
|
import { inflateSync } from "node:zlib";
|
|
66621
66926
|
|
|
@@ -67235,7 +67540,7 @@ ${validation === "container" ? "The complete container and dimensions were valid
|
|
|
67235
67540
|
width: image.width,
|
|
67236
67541
|
height: image.height,
|
|
67237
67542
|
sourceBytes: artifact.bytes.length,
|
|
67238
|
-
sha256:
|
|
67543
|
+
sha256: createHash19("sha256").update(artifact.bytes).digest("hex"),
|
|
67239
67544
|
validation
|
|
67240
67545
|
}
|
|
67241
67546
|
};
|
|
@@ -69941,7 +70246,7 @@ import { mkdir as mkdir9, readFile as readFile10 } from "node:fs/promises";
|
|
|
69941
70246
|
import { dirname as dirname13 } from "node:path";
|
|
69942
70247
|
|
|
69943
70248
|
// ../sdk/dist/tools/builtins/file-write-result.js
|
|
69944
|
-
import { createHash as
|
|
70249
|
+
import { createHash as createHash20 } from "node:crypto";
|
|
69945
70250
|
function previewSide(hunks2, changed) {
|
|
69946
70251
|
return hunks2.flatMap((hunk) => hunk.lines).filter((row) => row.startsWith(" ") || row.startsWith(changed)).map((row) => `${row.slice(1)}
|
|
69947
70252
|
`).join("");
|
|
@@ -69983,7 +70288,7 @@ function fileWriteResult(path2, before, after, sandboxed = false) {
|
|
|
69983
70288
|
}
|
|
69984
70289
|
},
|
|
69985
70290
|
bytes,
|
|
69986
|
-
sha256:
|
|
70291
|
+
sha256: createHash20("sha256").update(after, "utf8").digest("hex"),
|
|
69987
70292
|
...before === null ? {} : { added: diff.added, removed: diff.removed, newlineChanged }
|
|
69988
70293
|
}
|
|
69989
70294
|
}
|
|
@@ -71247,7 +71552,7 @@ var ToolExecutor = class {
|
|
|
71247
71552
|
return recorded !== void 0 && message.toolCallId === call2.id && !message.isError && typeof message.content === "string" && this.config.tools.get(recorded.toolName) === recorded.definition && recorded.fingerprint === this.observationFingerprint(call2, message.content) ? recorded.inputFingerprint : void 0;
|
|
71248
71553
|
}
|
|
71249
71554
|
observationFingerprint(call2, content) {
|
|
71250
|
-
return
|
|
71555
|
+
return createHash21("sha256").update(JSON.stringify([call2.function.name, call2.function.arguments, content])).digest("hex");
|
|
71251
71556
|
}
|
|
71252
71557
|
recordExecutedObservation(call2, toolName, definition, input2, content) {
|
|
71253
71558
|
if (typeof content !== "string" || this.config.tools.get(toolName) !== definition)
|
|
@@ -71259,7 +71564,7 @@ var ToolExecutor = class {
|
|
|
71259
71564
|
toolName,
|
|
71260
71565
|
definition,
|
|
71261
71566
|
fingerprint: this.observationFingerprint(call2, content),
|
|
71262
|
-
inputFingerprint:
|
|
71567
|
+
inputFingerprint: createHash21("sha256").update(JSON.stringify([toolName, input2])).digest("hex")
|
|
71263
71568
|
});
|
|
71264
71569
|
} catch {
|
|
71265
71570
|
}
|
|
@@ -80254,7 +80559,7 @@ import { lstat as lstat4 } from "node:fs/promises";
|
|
|
80254
80559
|
import { resolve as resolve13 } from "node:path";
|
|
80255
80560
|
|
|
80256
80561
|
// ../sdk/dist/store/evidence/index-page.js
|
|
80257
|
-
import { createHash as
|
|
80562
|
+
import { createHash as createHash22, createHmac as createHmac2, timingSafeEqual as timingSafeEqual2 } from "node:crypto";
|
|
80258
80563
|
|
|
80259
80564
|
// ../sdk/dist/store/evidence/compaction-provenance.js
|
|
80260
80565
|
function record2(value) {
|
|
@@ -80369,7 +80674,7 @@ var positionSchema = external_exports.object({
|
|
|
80369
80674
|
textIndex: integer3.default(0)
|
|
80370
80675
|
});
|
|
80371
80676
|
function evidenceSeal(sessionStart, sourceKey) {
|
|
80372
|
-
const key6 =
|
|
80677
|
+
const key6 = createHash22("sha256").update("namzu-session-evidence-v1\n").update(sessionStart).digest();
|
|
80373
80678
|
const mac3 = /* @__PURE__ */ __name((value) => createHmac2("sha256", key6).update(`${sourceKey}
|
|
80374
80679
|
${value}`).digest(), "mac");
|
|
80375
80680
|
return {
|
|
@@ -81546,7 +81851,7 @@ var PreludeSessionLease = class _PreludeSessionLease {
|
|
|
81546
81851
|
if (supplied)
|
|
81547
81852
|
return new _PreludeSessionLease(log, supplied, false);
|
|
81548
81853
|
const lease = await log.claim({
|
|
81549
|
-
holder:
|
|
81854
|
+
holder: turnHolder(turnId6),
|
|
81550
81855
|
ttlMs: DEFAULT_TURN_LEASE_TTL_MS,
|
|
81551
81856
|
repairTornTail: false
|
|
81552
81857
|
});
|
|
@@ -82554,7 +82859,7 @@ var InMemorySessionTokenBudgetStore = class {
|
|
|
82554
82859
|
};
|
|
82555
82860
|
|
|
82556
82861
|
// ../sdk/dist/store/checkpoint/contract.js
|
|
82557
|
-
import { createHash as
|
|
82862
|
+
import { createHash as createHash23 } from "node:crypto";
|
|
82558
82863
|
var CheckpointIntegrityError = class extends Error {
|
|
82559
82864
|
static {
|
|
82560
82865
|
__name(this, "CheckpointIntegrityError");
|
|
@@ -82589,7 +82894,7 @@ function serializeCheckpoint(checkpoint) {
|
|
|
82589
82894
|
}
|
|
82590
82895
|
__name(serializeCheckpoint, "serializeCheckpoint");
|
|
82591
82896
|
function sha256Hex5(text9) {
|
|
82592
|
-
return
|
|
82897
|
+
return createHash23("sha256").update(text9, "utf8").digest("hex");
|
|
82593
82898
|
}
|
|
82594
82899
|
__name(sha256Hex5, "sha256Hex");
|
|
82595
82900
|
function checkpointRecordPath(checkpointId4) {
|
|
@@ -85709,7 +86014,7 @@ async function startBidiTurn(params) {
|
|
|
85709
86014
|
__name(startBidiTurn, "startBidiTurn");
|
|
85710
86015
|
|
|
85711
86016
|
// ../sdk/dist/runtime/query/prompt-cache.js
|
|
85712
|
-
import { createHash as
|
|
86017
|
+
import { createHash as createHash24 } from "node:crypto";
|
|
85713
86018
|
var PromptCache = class {
|
|
85714
86019
|
static {
|
|
85715
86020
|
__name(this, "PromptCache");
|
|
@@ -85784,7 +86089,7 @@ var PromptCache = class {
|
|
|
85784
86089
|
this.cachedStaticHash = void 0;
|
|
85785
86090
|
}
|
|
85786
86091
|
computeStaticHash(staticSegment) {
|
|
85787
|
-
return
|
|
86092
|
+
return createHash24("sha256").update(staticSegment).digest("hex").slice(0, 16);
|
|
85788
86093
|
}
|
|
85789
86094
|
computeConfigHash(input2, prompt) {
|
|
85790
86095
|
const parts = [
|
|
@@ -85794,7 +86099,7 @@ var PromptCache = class {
|
|
|
85794
86099
|
// unsegmented text happens to be identical.
|
|
85795
86100
|
input2.contributions?.list().map((c) => [c.id, c.placement]) ?? []
|
|
85796
86101
|
];
|
|
85797
|
-
return
|
|
86102
|
+
return createHash24("sha256").update(JSON.stringify(parts)).digest("hex").slice(0, 16);
|
|
85798
86103
|
}
|
|
85799
86104
|
};
|
|
85800
86105
|
|
|
@@ -87622,7 +87927,7 @@ async function withSessionLease(log, lease, operation) {
|
|
|
87622
87927
|
if (lease)
|
|
87623
87928
|
return operation(lease);
|
|
87624
87929
|
const claimed = await log.claim({
|
|
87625
|
-
holder:
|
|
87930
|
+
holder: turnHolder(log.sessionId),
|
|
87626
87931
|
ttlMs: OPERATION_LEASE_TTL_MS
|
|
87627
87932
|
});
|
|
87628
87933
|
if (!claimed) {
|
|
@@ -87730,10 +88035,12 @@ function splice(preservedSystem, summaryBody, retainedOlder, recentMessages, rec
|
|
|
87730
88035
|
return { messages: [...preservedSystem, summary2, ...retainedOlder, ...recentMessages], summary: summary2 };
|
|
87731
88036
|
}
|
|
87732
88037
|
__name(splice, "splice");
|
|
87733
|
-
function withRestoredContext(body, manager, input2) {
|
|
88038
|
+
function withRestoredContext(body, manager, input2, kept) {
|
|
87734
88039
|
const window2 = resolveContextWindow(input2.contextWindowTokens ?? input2.config.contextWindowTokens, input2.model);
|
|
87735
88040
|
const restored = renderRestoredContext(manager.getState(), {
|
|
87736
88041
|
contextWindowTokens: window2.tokens,
|
|
88042
|
+
// Instructions already whole in what the pass keeps are not put back twice.
|
|
88043
|
+
wholeSkills: handledSkillNames(kept),
|
|
87737
88044
|
...input2.restoreNote ? { hostNote: input2.restoreNote } : {}
|
|
87738
88045
|
});
|
|
87739
88046
|
return restored ? `${body}
|
|
@@ -87743,6 +88050,7 @@ ${restored}` : body;
|
|
|
87743
88050
|
__name(withRestoredContext, "withRestoredContext");
|
|
87744
88051
|
function populateWorkingState(manager, messages, config2) {
|
|
87745
88052
|
let firstUser = true;
|
|
88053
|
+
manager.adoptSkillBodies(adoptableSkills(messages));
|
|
87746
88054
|
const toolNames = /* @__PURE__ */ new Map();
|
|
87747
88055
|
const toolInputs = /* @__PURE__ */ new Map();
|
|
87748
88056
|
for (const message of messages) {
|
|
@@ -87814,7 +88122,11 @@ async function compactNow(input2) {
|
|
|
87814
88122
|
streamIdleTimeoutMs: input2.streamIdleTimeoutMs,
|
|
87815
88123
|
instructions: input2.instructions
|
|
87816
88124
|
});
|
|
87817
|
-
const { messages, summary: summary2 } = splice(preservedSystem, withRestoredContext(body, manager, input2
|
|
88125
|
+
const { messages, summary: summary2 } = splice(preservedSystem, withRestoredContext(body, manager, input2, [
|
|
88126
|
+
...preservedSystem,
|
|
88127
|
+
...retainedOlder,
|
|
88128
|
+
...plan.recentMessages
|
|
88129
|
+
]), retainedOlder, plan.recentMessages, input2.recoveryNote);
|
|
87818
88130
|
return publishManualCompaction(input2, {
|
|
87819
88131
|
messages,
|
|
87820
88132
|
shed: input2.messages.length - messages.length,
|
|
@@ -87865,7 +88177,11 @@ async function compactRegion(input2) {
|
|
|
87865
88177
|
instructions: input2.instructions
|
|
87866
88178
|
});
|
|
87867
88179
|
const summary2 = {
|
|
87868
|
-
...buildCompactionMessage(withRestoredContext(body, manager, input2
|
|
88180
|
+
...buildCompactionMessage(withRestoredContext(body, manager, input2, [
|
|
88181
|
+
...messages.slice(0, start),
|
|
88182
|
+
...retainedSelected,
|
|
88183
|
+
...messages.slice(end)
|
|
88184
|
+
]), input2.recoveryNote),
|
|
87869
88185
|
retain: true
|
|
87870
88186
|
};
|
|
87871
88187
|
const out = [...messages.slice(0, start), summary2, ...retainedSelected, ...messages.slice(end)];
|
|
@@ -88602,6 +88918,15 @@ function createTurnReporter(parentLogger) {
|
|
|
88602
88918
|
"namzu.compaction.relief_was_enough": event.reliefWasEnough
|
|
88603
88919
|
});
|
|
88604
88920
|
break;
|
|
88921
|
+
case "compaction_skills_carried":
|
|
88922
|
+
log.info("Put loaded skills back after a pass cut them", {
|
|
88923
|
+
[NAMZU.TURN_ID]: event.turnId,
|
|
88924
|
+
[NAMZU.ITERATION]: event.iteration,
|
|
88925
|
+
"namzu.compaction.skills": event.skills.join(","),
|
|
88926
|
+
"namzu.compaction.skills_cut": event.cut.join(","),
|
|
88927
|
+
"namzu.compaction.skills_left_out": event.leftOut.join(",")
|
|
88928
|
+
});
|
|
88929
|
+
break;
|
|
88605
88930
|
case "compaction_failed":
|
|
88606
88931
|
log.warn("Context compaction shed nothing", {
|
|
88607
88932
|
[NAMZU.TURN_ID]: event.turnId,
|
|
@@ -89361,7 +89686,7 @@ var LocalExecutionContext = class extends BaseExecutionContext {
|
|
|
89361
89686
|
};
|
|
89362
89687
|
|
|
89363
89688
|
// ../sdk/dist/turn/workspace-fingerprint.js
|
|
89364
|
-
import { createHash as
|
|
89689
|
+
import { createHash as createHash25 } from "node:crypto";
|
|
89365
89690
|
import { lstat as lstat5, readFile as readFile13, readlink } from "node:fs/promises";
|
|
89366
89691
|
import { join as join27 } from "node:path";
|
|
89367
89692
|
var NODE_FS = { lstat: lstat5, readlink, readFile: readFile13 };
|
|
@@ -89377,7 +89702,7 @@ async function untrackedEntry(cwd, rel, fs) {
|
|
|
89377
89702
|
if (!stats.isFile())
|
|
89378
89703
|
return `? ${rel}`;
|
|
89379
89704
|
const body = await fs.readFile(abs);
|
|
89380
|
-
return `F ${rel}\0${
|
|
89705
|
+
return `F ${rel}\0${createHash25("sha256").update(body).digest("hex")}`;
|
|
89381
89706
|
} catch {
|
|
89382
89707
|
return null;
|
|
89383
89708
|
}
|
|
@@ -89422,7 +89747,7 @@ async function fingerprintWorkspace(options) {
|
|
|
89422
89747
|
return null;
|
|
89423
89748
|
parts.push(entry);
|
|
89424
89749
|
}
|
|
89425
|
-
const hash4 =
|
|
89750
|
+
const hash4 = createHash25("sha256");
|
|
89426
89751
|
for (const part2 of parts)
|
|
89427
89752
|
hash4.update(`${Buffer.byteLength(part2, "utf8")}:${part2}`);
|
|
89428
89753
|
return hash4.digest("hex");
|
|
@@ -89652,7 +89977,7 @@ function createMemoryPromoter(options) {
|
|
|
89652
89977
|
__name(createMemoryPromoter, "createMemoryPromoter");
|
|
89653
89978
|
|
|
89654
89979
|
// ../sdk/dist/turn/json-claim-verifier.js
|
|
89655
|
-
import { createHash as
|
|
89980
|
+
import { createHash as createHash26, randomUUID as randomUUID5 } from "node:crypto";
|
|
89656
89981
|
import { performance as performance2 } from "node:perf_hooks";
|
|
89657
89982
|
function scalar(value) {
|
|
89658
89983
|
return value === null || typeof value === "boolean" || typeof value === "string" && value.length <= 2e3 || typeof value === "number" && Number.isSafeInteger(value);
|
|
@@ -89785,7 +90110,7 @@ function createJsonClaimVerifier(options) {
|
|
|
89785
90110
|
requestId: request.requestId,
|
|
89786
90111
|
observedAt: observation.observedAt,
|
|
89787
90112
|
bytes: bytes.byteLength,
|
|
89788
|
-
sha256:
|
|
90113
|
+
sha256: createHash26("sha256").update(bytes).digest("hex")
|
|
89789
90114
|
});
|
|
89790
90115
|
}
|
|
89791
90116
|
ensureActive();
|
|
@@ -94760,7 +95085,7 @@ var DiskTaskStore = class {
|
|
|
94760
95085
|
};
|
|
94761
95086
|
|
|
94762
95087
|
// ../sdk/dist/store/memory/revision.js
|
|
94763
|
-
import { createHash as
|
|
95088
|
+
import { createHash as createHash27 } from "node:crypto";
|
|
94764
95089
|
var MemoryRevisionUnavailableError = class extends Error {
|
|
94765
95090
|
static {
|
|
94766
95091
|
__name(this, "MemoryRevisionUnavailableError");
|
|
@@ -94866,7 +95191,7 @@ function canonicalRecord(record4) {
|
|
|
94866
95191
|
}
|
|
94867
95192
|
__name(canonicalRecord, "canonicalRecord");
|
|
94868
95193
|
function memoryRevision(record4) {
|
|
94869
|
-
return `m2:${
|
|
95194
|
+
return `m2:${createHash27("sha256").update(canonicalRecord(record4)).digest("hex")}`;
|
|
94870
95195
|
}
|
|
94871
95196
|
__name(memoryRevision, "memoryRevision");
|
|
94872
95197
|
var MemoryRevisionConflictError = class extends NamzuError {
|
|
@@ -95626,7 +95951,7 @@ var DiskMemoryStore = class {
|
|
|
95626
95951
|
};
|
|
95627
95952
|
|
|
95628
95953
|
// ../sdk/dist/store/memory/markdown.js
|
|
95629
|
-
import { createHash as
|
|
95954
|
+
import { createHash as createHash28 } from "node:crypto";
|
|
95630
95955
|
import { lstat as lstat8, mkdir as mkdir15, readFile as readFile18, readdir as readdir11, realpath as realpath9, rename as rename6, unlink as unlink12 } from "node:fs/promises";
|
|
95631
95956
|
import { dirname as dirname19, join as join34, resolve as resolve18 } from "node:path";
|
|
95632
95957
|
|
|
@@ -95866,7 +96191,7 @@ function invalidFile(file2, reason, cause) {
|
|
|
95866
96191
|
}
|
|
95867
96192
|
__name(invalidFile, "invalidFile");
|
|
95868
96193
|
function derivedMemoryId(name2) {
|
|
95869
|
-
const hex4 =
|
|
96194
|
+
const hex4 = createHash28("sha256").update(`namzu-memory-name:${name2}`).digest("hex");
|
|
95870
96195
|
const variant = (Number.parseInt(hex4[16] ?? "0", 16) & 3 | 8).toString(16);
|
|
95871
96196
|
return `${hex4.slice(0, 8)}-${hex4.slice(8, 12)}-8${hex4.slice(13, 16)}-${variant}${hex4.slice(17, 20)}-${hex4.slice(20, 32)}`;
|
|
95872
96197
|
}
|
|
@@ -101430,7 +101755,7 @@ function toolResultToMCPToolResult(result) {
|
|
|
101430
101755
|
__name(toolResultToMCPToolResult, "toolResultToMCPToolResult");
|
|
101431
101756
|
|
|
101432
101757
|
// ../sdk/dist/connector/mcp/policy.js
|
|
101433
|
-
import { createHash as
|
|
101758
|
+
import { createHash as createHash29 } from "node:crypto";
|
|
101434
101759
|
function applyToolPolicy(tools, policy) {
|
|
101435
101760
|
return applyNamePolicy(tools, policy);
|
|
101436
101761
|
}
|
|
@@ -101470,7 +101795,7 @@ function toolsHash(tools) {
|
|
|
101470
101795
|
// fingerprint built to catch exactly that rug-pull saw nothing.
|
|
101471
101796
|
annotations: stableStringify2(tool.annotations)
|
|
101472
101797
|
}));
|
|
101473
|
-
return
|
|
101798
|
+
return createHash29("sha256").update(JSON.stringify(canonical3)).digest("hex");
|
|
101474
101799
|
}
|
|
101475
101800
|
__name(toolsHash, "toolsHash");
|
|
101476
101801
|
function diffTools(before, after) {
|
|
@@ -101693,7 +102018,7 @@ var MCPToolDiscovery = class {
|
|
|
101693
102018
|
};
|
|
101694
102019
|
|
|
101695
102020
|
// ../sdk/dist/connector/mcp/mcp-toolset.js
|
|
101696
|
-
import { createHash as
|
|
102021
|
+
import { createHash as createHash30 } from "node:crypto";
|
|
101697
102022
|
|
|
101698
102023
|
// ../sdk/dist/connector/mcp/prompt-adapter.js
|
|
101699
102024
|
function renderPromptMessages(serverName, promptName, messages, description) {
|
|
@@ -101764,7 +102089,7 @@ function mcpToolsetName(serverName, ...segments) {
|
|
|
101764
102089
|
const full = ["mcp", serverName, ...segments].join("__");
|
|
101765
102090
|
if (full.length <= MCP_TOOLSET_NAME_MAX_LENGTH)
|
|
101766
102091
|
return full;
|
|
101767
|
-
const hash4 =
|
|
102092
|
+
const hash4 = createHash30("sha256").update(full).digest("hex").slice(0, 8);
|
|
101768
102093
|
const suffix = `_${hash4}`;
|
|
101769
102094
|
return `${full.slice(0, MCP_TOOLSET_NAME_MAX_LENGTH - suffix.length)}${suffix}`;
|
|
101770
102095
|
}
|
|
@@ -102997,8 +103322,8 @@ function isReachableHookAddress(address2) {
|
|
|
102997
103322
|
return false;
|
|
102998
103323
|
}
|
|
102999
103324
|
__name(isReachableHookAddress, "isReachableHookAddress");
|
|
103000
|
-
function guardedLookup(
|
|
103001
|
-
lookup2(
|
|
103325
|
+
function guardedLookup(hostname4, options, callback) {
|
|
103326
|
+
lookup2(hostname4, { ...options, all: true }, (error62, addresses) => {
|
|
103002
103327
|
if (error62) {
|
|
103003
103328
|
callback(error62);
|
|
103004
103329
|
return;
|
|
@@ -103006,7 +103331,7 @@ function guardedLookup(hostname3, options, callback) {
|
|
|
103006
103331
|
const list2 = addresses;
|
|
103007
103332
|
const refused2 = list2.find((entry) => !isReachableHookAddress(entry.address));
|
|
103008
103333
|
if (refused2 || list2.length === 0) {
|
|
103009
|
-
callback(new Error(`${
|
|
103334
|
+
callback(new Error(`${hostname4} resolves to ${refused2?.address ?? "nothing"}, a private or link-local address`));
|
|
103010
103335
|
return;
|
|
103011
103336
|
}
|
|
103012
103337
|
if (options.all) {
|
|
@@ -112977,6 +113302,7 @@ var MAPPING = {
|
|
|
112977
113302
|
// manages its own context. A peer models a task lifecycle and cannot act on
|
|
112978
113303
|
// either outcome.
|
|
112979
113304
|
compaction_failed: null,
|
|
113305
|
+
compaction_skills_carried: null,
|
|
112980
113306
|
// A refusal is the turn's own policy decision; the peer sees it in the
|
|
112981
113307
|
// terminal task state, not as a separate signal.
|
|
112982
113308
|
guardrail_triggered: null,
|
|
@@ -113668,6 +113994,15 @@ var MAPPING2 = {
|
|
|
113668
113994
|
relief_was_enough: e.reliefWasEnough
|
|
113669
113995
|
}), "transform")
|
|
113670
113996
|
},
|
|
113997
|
+
compaction_skills_carried: {
|
|
113998
|
+
wire: "compaction.skills_carried",
|
|
113999
|
+
transform: /* @__PURE__ */ __name((e) => ({
|
|
114000
|
+
iteration: e.iteration,
|
|
114001
|
+
skills: e.skills,
|
|
114002
|
+
cut: e.cut,
|
|
114003
|
+
left_out: e.leftOut
|
|
114004
|
+
}), "transform")
|
|
114005
|
+
},
|
|
113671
114006
|
compaction_failed: {
|
|
113672
114007
|
wire: "compaction.failed",
|
|
113673
114008
|
transform: /* @__PURE__ */ __name((e) => ({
|
|
@@ -115697,7 +116032,7 @@ var WorkspaceBackendRegistry = class {
|
|
|
115697
116032
|
|
|
115698
116033
|
// ../sdk/dist/session/workspace/git-worktree.js
|
|
115699
116034
|
import { execFile } from "node:child_process";
|
|
115700
|
-
import { readFileSync as
|
|
116035
|
+
import { readFileSync as readFileSync4, realpathSync as realpathSync4 } from "node:fs";
|
|
115701
116036
|
import { realpath as realpath12 } from "node:fs/promises";
|
|
115702
116037
|
import { basename as basename12, dirname as dirname21, isAbsolute as isAbsolute16, join as join39, relative as relative8, resolve as resolve22, sep as sep10 } from "node:path";
|
|
115703
116038
|
import { promisify } from "node:util";
|
|
@@ -116010,7 +116345,7 @@ function defaultWorktreesDir(repoRoot) {
|
|
|
116010
116345
|
const home = resolveNamzuHome();
|
|
116011
116346
|
let slug = slugForCwd(cwd);
|
|
116012
116347
|
try {
|
|
116013
|
-
const document = JSON.parse(
|
|
116348
|
+
const document = JSON.parse(readFileSync4(join39(home, "projects", slug, "project.json"), "utf8"));
|
|
116014
116349
|
if (document.cwd !== cwd)
|
|
116015
116350
|
slug = hashedSlugForCwd(cwd);
|
|
116016
116351
|
} catch {
|
|
@@ -117735,7 +118070,7 @@ var InMemorySessionStore = class {
|
|
|
117735
118070
|
};
|
|
117736
118071
|
|
|
117737
118072
|
// ../sdk/dist/store/session/disk.js
|
|
117738
|
-
import { createHash as
|
|
118073
|
+
import { createHash as createHash31 } from "node:crypto";
|
|
117739
118074
|
import { mkdir as mkdir19, rm as rm7 } from "node:fs/promises";
|
|
117740
118075
|
import { join as join42, resolve as resolve25 } from "node:path";
|
|
117741
118076
|
var SCHEMA9 = defineSchema({
|
|
@@ -117904,7 +118239,7 @@ var DiskSessionStore = class {
|
|
|
117904
118239
|
}
|
|
117905
118240
|
rootPathBindingLocation(rootPath, tenantId2) {
|
|
117906
118241
|
const key6 = rootPathIndexKey(rootPath, tenantId2);
|
|
117907
|
-
const digest8 =
|
|
118242
|
+
const digest8 = createHash31("sha256").update(key6).digest("hex");
|
|
117908
118243
|
const root = join42(this.rootDir, "projects", ".root-path-index", digest8.slice(0, 2));
|
|
117909
118244
|
return {
|
|
117910
118245
|
legacyPath: join42(root, `${digest8.slice(2)}.json`),
|
|
@@ -120154,7 +120489,7 @@ function analyzeContextUsage(input2) {
|
|
|
120154
120489
|
__name(analyzeContextUsage, "analyzeContextUsage");
|
|
120155
120490
|
|
|
120156
120491
|
// ../sdk/dist/learning/skill.js
|
|
120157
|
-
import { createHash as
|
|
120492
|
+
import { createHash as createHash32 } from "node:crypto";
|
|
120158
120493
|
var label = external_exports.string().trim().min(1).max(256);
|
|
120159
120494
|
var name = external_exports.string().regex(/^[a-z0-9][a-z0-9_-]{0,63}$/);
|
|
120160
120495
|
var digest3 = external_exports.string().regex(/^[a-f0-9]{64}$/);
|
|
@@ -120307,7 +120642,7 @@ function reviseLearningProfile(current, input2) {
|
|
|
120307
120642
|
__name(reviseLearningProfile, "reviseLearningProfile");
|
|
120308
120643
|
function hashLearningSkill(input2) {
|
|
120309
120644
|
const candidate = candidateSchema.parse(input2);
|
|
120310
|
-
return
|
|
120645
|
+
return createHash32("sha256").update(JSON.stringify([
|
|
120311
120646
|
candidate.name,
|
|
120312
120647
|
candidate.description,
|
|
120313
120648
|
candidate.body,
|
|
@@ -120347,13 +120682,13 @@ function promoteLearningSkill(current, input2, evaluation, inputEvidence) {
|
|
|
120347
120682
|
verification: {
|
|
120348
120683
|
baselineHash,
|
|
120349
120684
|
candidateHash: hash4,
|
|
120350
|
-
evidenceDigest:
|
|
120685
|
+
evidenceDigest: createHash32("sha256").update(JSON.stringify({ ...evaluation, protection })).digest("hex"),
|
|
120351
120686
|
verificationTasks: review.verification.tasks.length,
|
|
120352
120687
|
confirmationTasks: review.confirmation?.tasks.length ?? 0,
|
|
120353
120688
|
protection: {
|
|
120354
120689
|
verificationTasks: protection.verification.length,
|
|
120355
120690
|
confirmationTasks: protection.confirmation.length,
|
|
120356
|
-
planDigest:
|
|
120691
|
+
planDigest: createHash32("sha256").update(JSON.stringify(protection)).digest("hex")
|
|
120357
120692
|
}
|
|
120358
120693
|
}
|
|
120359
120694
|
};
|
|
@@ -120462,10 +120797,10 @@ function projectLearning(current, options) {
|
|
|
120462
120797
|
__name(projectLearning, "projectLearning");
|
|
120463
120798
|
|
|
120464
120799
|
// ../sdk/dist/learning/cycle.js
|
|
120465
|
-
import { createHash as
|
|
120800
|
+
import { createHash as createHash34, randomUUID as randomUUID9 } from "node:crypto";
|
|
120466
120801
|
|
|
120467
120802
|
// ../sdk/dist/learning/guidance.js
|
|
120468
|
-
import { createHash as
|
|
120803
|
+
import { createHash as createHash33 } from "node:crypto";
|
|
120469
120804
|
import { readdir as readdir15 } from "node:fs/promises";
|
|
120470
120805
|
import { join as join43 } from "node:path";
|
|
120471
120806
|
import { isDeepStrictEqual as isDeepStrictEqual7 } from "node:util";
|
|
@@ -120510,7 +120845,7 @@ var ADOPTED_MARKER = "adopted.json";
|
|
|
120510
120845
|
var REVISION_FILE = /^([1-9][0-9]{0,15})\.json$/;
|
|
120511
120846
|
function keySegment(key6) {
|
|
120512
120847
|
const encoded = revisionFileSegment(key6);
|
|
120513
|
-
return encoded.length <= 255 ? encoded : `~sha256-${
|
|
120848
|
+
return encoded.length <= 255 ? encoded : `~sha256-${createHash33("sha256").update(encoded).digest("hex")}`;
|
|
120514
120849
|
}
|
|
120515
120850
|
__name(keySegment, "keySegment");
|
|
120516
120851
|
function earlierGuidanceDirectory(root, scope) {
|
|
@@ -121080,7 +121415,7 @@ ${exploration.evidence.reason}`
|
|
|
121080
121415
|
}, { subject: "exploration.trace", text: exploration.trace });
|
|
121081
121416
|
await append("exploration", {
|
|
121082
121417
|
observations: exploration,
|
|
121083
|
-
digest:
|
|
121418
|
+
digest: createHash34("sha256").update(JSON.stringify(exploration)).digest("hex")
|
|
121084
121419
|
}, "explore");
|
|
121085
121420
|
const problem2 = resourceProblem(true);
|
|
121086
121421
|
if (problem2)
|
|
@@ -121129,7 +121464,7 @@ ${s.revision}`).join("\n"),
|
|
|
121129
121464
|
await append("evaluation", {
|
|
121130
121465
|
baselineRevision,
|
|
121131
121466
|
candidateRevision,
|
|
121132
|
-
digest:
|
|
121467
|
+
digest: createHash34("sha256").update(JSON.stringify(batch)).digest("hex"),
|
|
121133
121468
|
baselineTrajectories: batch.baseline.map((t) => t.trajectoryId),
|
|
121134
121469
|
candidateTrajectories: batch.candidate.map((t) => t.trajectoryId)
|
|
121135
121470
|
}, name2);
|
|
@@ -121660,8 +121995,8 @@ var SqliteLearningExperienceStore = class {
|
|
|
121660
121995
|
};
|
|
121661
121996
|
|
|
121662
121997
|
// ../sdk/dist/learning/store.js
|
|
121663
|
-
import { createHash as
|
|
121664
|
-
import { closeSync as closeSync2, existsSync as existsSync6, fsyncSync, linkSync, lstatSync as lstatSync4, mkdirSync as mkdirSync5, openSync as openSync2, readFileSync as
|
|
121998
|
+
import { createHash as createHash35, randomUUID as randomUUID11 } from "node:crypto";
|
|
121999
|
+
import { closeSync as closeSync2, existsSync as existsSync6, fsyncSync, linkSync, lstatSync as lstatSync4, mkdirSync as mkdirSync5, openSync as openSync2, readFileSync as readFileSync5, unlinkSync, writeFileSync as writeFileSync3 } from "node:fs";
|
|
121665
122000
|
import { createRequire as createRequire4 } from "node:module";
|
|
121666
122001
|
import { dirname as dirname24, join as join44, resolve as resolve27 } from "node:path";
|
|
121667
122002
|
|
|
@@ -121689,7 +122024,7 @@ var learningObservationSchema = learningTargetSchema.extend({
|
|
|
121689
122024
|
|
|
121690
122025
|
// ../sdk/dist/learning/store.js
|
|
121691
122026
|
var uuid5 = external_exports.string().uuid().transform((id3) => id3.toLowerCase());
|
|
121692
|
-
var digest4 = /* @__PURE__ */ __name((text9) =>
|
|
122027
|
+
var digest4 = /* @__PURE__ */ __name((text9) => createHash35("sha256").update(text9).digest("hex"), "digest");
|
|
121693
122028
|
var MAX_EVENT_BYTES = 256 * 1024;
|
|
121694
122029
|
var MAX_ARTIFACT_BYTES = 8 * 1024 * 1024;
|
|
121695
122030
|
var MAX_EVENTS = 4096;
|
|
@@ -122127,7 +122462,7 @@ var SqliteLearningStore = class {
|
|
|
122127
122462
|
throw error62;
|
|
122128
122463
|
}
|
|
122129
122464
|
const entry = lstatSync4(target);
|
|
122130
|
-
if (!entry.isFile() || entry.isSymbolicLink() || entry.size !== artifact.bytes || digest4(
|
|
122465
|
+
if (!entry.isFile() || entry.isSymbolicLink() || entry.size !== artifact.bytes || digest4(readFileSync5(target)) !== artifact.hash)
|
|
122131
122466
|
throw new Error("Learning artifact content does not match its hash.");
|
|
122132
122467
|
} finally {
|
|
122133
122468
|
unlinkSync(temporary);
|
|
@@ -122164,7 +122499,7 @@ var SqliteLearningStore = class {
|
|
|
122164
122499
|
const entry = lstatSync4(path2);
|
|
122165
122500
|
if (!entry.isFile() || entry.isSymbolicLink() || entry.size !== artifact.bytes || entry.size > MAX_ARTIFACT_BYTES)
|
|
122166
122501
|
throw new Error("Learning artifact is not a regular file of the recorded size.");
|
|
122167
|
-
const body =
|
|
122502
|
+
const body = readFileSync5(path2);
|
|
122168
122503
|
if (digest4(body) !== artifact.hash)
|
|
122169
122504
|
throw new Error("Learning artifact hash mismatch.");
|
|
122170
122505
|
return JSON.parse(body.toString("utf8"));
|
|
@@ -122408,7 +122743,7 @@ function parsePeerAddress(address2) {
|
|
|
122408
122743
|
__name(parsePeerAddress, "parsePeerAddress");
|
|
122409
122744
|
|
|
122410
122745
|
// ../sdk/dist/peers/record.js
|
|
122411
|
-
import { createHash as
|
|
122746
|
+
import { createHash as createHash36 } from "node:crypto";
|
|
122412
122747
|
|
|
122413
122748
|
// ../sdk/dist/peers/protocol.js
|
|
122414
122749
|
var PEER_PROTOCOL_VERSION = "namzu-peer/1";
|
|
@@ -122546,13 +122881,13 @@ var PeerRecordSchema = external_exports.object({
|
|
|
122546
122881
|
var PeerRecordReaderSchema = PeerRecordSchema.strip();
|
|
122547
122882
|
var PEER_REF_HEX_LENGTH = 6;
|
|
122548
122883
|
function derivePeerRef(sessionId5) {
|
|
122549
|
-
return
|
|
122884
|
+
return createHash36("sha256").update(sessionId5, "utf8").digest("hex").slice(0, PEER_REF_HEX_LENGTH);
|
|
122550
122885
|
}
|
|
122551
122886
|
__name(derivePeerRef, "derivePeerRef");
|
|
122552
122887
|
|
|
122553
122888
|
// ../sdk/dist/peers/registry.js
|
|
122554
122889
|
import { randomBytes as randomBytes9 } from "node:crypto";
|
|
122555
|
-
import { closeSync as closeSync3, fsyncSync as fsyncSync2, lstatSync as lstatSync6, openSync as openSync3, readFileSync as
|
|
122890
|
+
import { closeSync as closeSync3, fsyncSync as fsyncSync2, lstatSync as lstatSync6, openSync as openSync3, readFileSync as readFileSync6, readdirSync as readdirSync2, renameSync, unlinkSync as unlinkSync2, writeSync } from "node:fs";
|
|
122556
122891
|
import { basename as basename13, dirname as dirname25, join as join47 } from "node:path";
|
|
122557
122892
|
|
|
122558
122893
|
// ../sdk/dist/peers/client.js
|
|
@@ -122729,7 +123064,7 @@ __name(parseRecordText, "parseRecordText");
|
|
|
122729
123064
|
function readPeerRecord(sessionsDir, sessionId5) {
|
|
122730
123065
|
let text9;
|
|
122731
123066
|
try {
|
|
122732
|
-
text9 =
|
|
123067
|
+
text9 = readFileSync6(recordPath(sessionsDir, sessionId5), "utf8");
|
|
122733
123068
|
} catch (error62) {
|
|
122734
123069
|
if (error62.code === "ENOENT")
|
|
122735
123070
|
return void 0;
|
|
@@ -122753,7 +123088,7 @@ function readPeerRecords(sessionsDir) {
|
|
|
122753
123088
|
continue;
|
|
122754
123089
|
let text9;
|
|
122755
123090
|
try {
|
|
122756
|
-
text9 =
|
|
123091
|
+
text9 = readFileSync6(join47(sessionsDir, entry), "utf8");
|
|
122757
123092
|
} catch {
|
|
122758
123093
|
continue;
|
|
122759
123094
|
}
|
|
@@ -123250,12 +123585,12 @@ __name(formatPeerNotice, "formatPeerNotice");
|
|
|
123250
123585
|
|
|
123251
123586
|
// ../sdk/dist/account/registry.js
|
|
123252
123587
|
import { randomBytes as randomBytes11 } from "node:crypto";
|
|
123253
|
-
import { chmodSync as chmodSync3, closeSync as closeSync5, fsyncSync as fsyncSync3, mkdirSync as mkdirSync8, openSync as openSync5, readFileSync as
|
|
123588
|
+
import { chmodSync as chmodSync3, closeSync as closeSync5, fsyncSync as fsyncSync3, mkdirSync as mkdirSync8, openSync as openSync5, readFileSync as readFileSync8, realpathSync as realpathSync6, renameSync as renameSync2, rmSync as rmSync2, unlinkSync as unlinkSync4, writeSync as writeSync3 } from "node:fs";
|
|
123254
123589
|
import { basename as basename15, dirname as dirname27, isAbsolute as isAbsolute17, join as join49, relative as relative10, resolve as resolve28 } from "node:path";
|
|
123255
123590
|
|
|
123256
123591
|
// ../sdk/dist/account/lock.js
|
|
123257
123592
|
import { randomBytes as randomBytes10 } from "node:crypto";
|
|
123258
|
-
import { closeSync as closeSync4, mkdirSync as mkdirSync7, openSync as openSync4, readFileSync as
|
|
123593
|
+
import { closeSync as closeSync4, mkdirSync as mkdirSync7, openSync as openSync4, readFileSync as readFileSync7, rmSync, writeSync as writeSync2 } from "node:fs";
|
|
123259
123594
|
import { dirname as dirname26, join as join48 } from "node:path";
|
|
123260
123595
|
|
|
123261
123596
|
// ../sdk/dist/account/types.js
|
|
@@ -123335,7 +123670,7 @@ __name(processIsDead, "processIsDead");
|
|
|
123335
123670
|
function reclaimIfStale(lockPath) {
|
|
123336
123671
|
let observed;
|
|
123337
123672
|
try {
|
|
123338
|
-
observed =
|
|
123673
|
+
observed = readFileSync7(lockPath, "utf8");
|
|
123339
123674
|
} catch {
|
|
123340
123675
|
return true;
|
|
123341
123676
|
}
|
|
@@ -123350,7 +123685,7 @@ function reclaimIfStale(lockPath) {
|
|
|
123350
123685
|
if (error62.code !== "EEXIST")
|
|
123351
123686
|
throw error62;
|
|
123352
123687
|
try {
|
|
123353
|
-
const holder = pidOf(
|
|
123688
|
+
const holder = pidOf(readFileSync7(guard, "utf8"));
|
|
123354
123689
|
if (holder !== void 0 && processIsDead(holder))
|
|
123355
123690
|
rmSync(guard, { force: true });
|
|
123356
123691
|
} catch {
|
|
@@ -123362,7 +123697,7 @@ function reclaimIfStale(lockPath) {
|
|
|
123362
123697
|
closeSync4(fd);
|
|
123363
123698
|
let again;
|
|
123364
123699
|
try {
|
|
123365
|
-
again =
|
|
123700
|
+
again = readFileSync7(lockPath, "utf8");
|
|
123366
123701
|
} catch {
|
|
123367
123702
|
return true;
|
|
123368
123703
|
}
|
|
@@ -123377,7 +123712,7 @@ function reclaimIfStale(lockPath) {
|
|
|
123377
123712
|
__name(reclaimIfStale, "reclaimIfStale");
|
|
123378
123713
|
function release(lockPath, token) {
|
|
123379
123714
|
try {
|
|
123380
|
-
if (
|
|
123715
|
+
if (readFileSync7(lockPath, "utf8") === token)
|
|
123381
123716
|
rmSync(lockPath, { force: true });
|
|
123382
123717
|
} catch {
|
|
123383
123718
|
}
|
|
@@ -123509,7 +123844,7 @@ function createAccountRegistry(options = {}) {
|
|
|
123509
123844
|
function read() {
|
|
123510
123845
|
let text9;
|
|
123511
123846
|
try {
|
|
123512
|
-
text9 =
|
|
123847
|
+
text9 = readFileSync8(path2, "utf8");
|
|
123513
123848
|
} catch (error62) {
|
|
123514
123849
|
if (error62.code === "ENOENT") {
|
|
123515
123850
|
return { version: ACCOUNTS_FILE_VERSION, accounts: [], keys: {} };
|
|
@@ -123773,7 +124108,7 @@ __name(resolveBoundAccount, "resolveBoundAccount");
|
|
|
123773
124108
|
|
|
123774
124109
|
// ../sdk/dist/pals/store.js
|
|
123775
124110
|
import { randomUUID as randomUUID12 } from "node:crypto";
|
|
123776
|
-
import { chmodSync as chmodSync4, closeSync as closeSync6, fsyncSync as fsyncSync4, linkSync as linkSync2, lstatSync as lstatSync8, mkdirSync as mkdirSync9, openSync as openSync6, readFileSync as
|
|
124111
|
+
import { chmodSync as chmodSync4, closeSync as closeSync6, fsyncSync as fsyncSync4, linkSync as linkSync2, lstatSync as lstatSync8, mkdirSync as mkdirSync9, openSync as openSync6, readFileSync as readFileSync9, readdirSync as readdirSync3, realpathSync as realpathSync7, unlinkSync as unlinkSync5, writeSync as writeSync4 } from "node:fs";
|
|
123777
124112
|
import { dirname as dirname28, isAbsolute as isAbsolute18, join as join50, relative as relative11, resolve as resolve29, sep as sep12 } from "node:path";
|
|
123778
124113
|
var ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/u;
|
|
123779
124114
|
var REVISION_FILE2 = /^[1-9][0-9]*\.json$/u;
|
|
@@ -123869,7 +124204,7 @@ function readStoredRevision(home, workspaceRoot, id3, revision) {
|
|
|
123869
124204
|
const file2 = lstatSync8(source);
|
|
123870
124205
|
if (!file2.isFile() || file2.isSymbolicLink())
|
|
123871
124206
|
throw new Error("Pal revision must be a real file.");
|
|
123872
|
-
const raw = JSON.parse(
|
|
124207
|
+
const raw = JSON.parse(readFileSync9(source, "utf8"));
|
|
123873
124208
|
if (raw.v !== 1 || raw.kind !== "pal" && raw.kind !== "pal-deleted" || raw.id !== id3 || raw.revision !== revision || !Number.isSafeInteger(revision) || revision < 1 || typeof raw.createdAt !== "string" || typeof raw.updatedAt !== "string" || typeof raw.workspace !== "string" || typeof raw.paused !== "boolean")
|
|
123874
124209
|
throw new Error(`Invalid Pal definition ${id3} revision ${revision}.`);
|
|
123875
124210
|
const expected = paths(home, workspaceRoot, id3).workspace;
|
|
@@ -124702,7 +125037,7 @@ var PAL_WORK_GUIDANCE = [
|
|
|
124702
125037
|
].join("\n\n");
|
|
124703
125038
|
|
|
124704
125039
|
// ../sdk/dist/pals/reference-images.js
|
|
124705
|
-
import { createHash as
|
|
125040
|
+
import { createHash as createHash37, randomUUID as randomUUID13 } from "node:crypto";
|
|
124706
125041
|
import { posix as posix4 } from "node:path";
|
|
124707
125042
|
var MAX_IMAGES = 8;
|
|
124708
125043
|
var MAX_IMAGE_BYTES = 3 * 1024 * 1024;
|
|
@@ -124746,7 +125081,7 @@ function preparePalReferenceImages(attachments) {
|
|
|
124746
125081
|
attachmentIndex: index + 1,
|
|
124747
125082
|
mediaType: attachment.mediaType,
|
|
124748
125083
|
data: attachment.data,
|
|
124749
|
-
sha256:
|
|
125084
|
+
sha256: createHash37("sha256").update(bytes).digest("hex"),
|
|
124750
125085
|
bytes: bytes.length
|
|
124751
125086
|
}));
|
|
124752
125087
|
}
|
|
@@ -124933,7 +125268,7 @@ import { isDeepStrictEqual as isDeepStrictEqual10 } from "node:util";
|
|
|
124933
125268
|
import { isDeepStrictEqual as isDeepStrictEqual8 } from "node:util";
|
|
124934
125269
|
|
|
124935
125270
|
// ../sdk/dist/pals/communication/schema.js
|
|
124936
|
-
import { createHash as
|
|
125271
|
+
import { createHash as createHash38 } from "node:crypto";
|
|
124937
125272
|
var id2 = external_exports.string().uuid();
|
|
124938
125273
|
var sessionId3 = external_exports.custom((s) => isEntityId(s, "session"));
|
|
124939
125274
|
var turnId4 = external_exports.custom((s) => isEntityId(s, "turn"));
|
|
@@ -125028,7 +125363,7 @@ function freezeCommunicationValue(value) {
|
|
|
125028
125363
|
}
|
|
125029
125364
|
__name(freezeCommunicationValue, "freezeCommunicationValue");
|
|
125030
125365
|
function hash3(value) {
|
|
125031
|
-
return
|
|
125366
|
+
return createHash38("sha256").update(JSON.stringify(value)).digest("hex");
|
|
125032
125367
|
}
|
|
125033
125368
|
__name(hash3, "hash");
|
|
125034
125369
|
function addressTuple(value) {
|
|
@@ -126736,10 +127071,10 @@ var DiskPalMessagePolicy = class {
|
|
|
126736
127071
|
};
|
|
126737
127072
|
|
|
126738
127073
|
// ../sdk/dist/pals/activity/source.js
|
|
126739
|
-
import { createHash as
|
|
127074
|
+
import { createHash as createHash40 } from "node:crypto";
|
|
126740
127075
|
|
|
126741
127076
|
// ../sdk/dist/pals/activity/projection.js
|
|
126742
|
-
import { createHash as
|
|
127077
|
+
import { createHash as createHash39 } from "node:crypto";
|
|
126743
127078
|
var activityId2 = external_exports.custom((value) => isEntityId(value, "activity"));
|
|
126744
127079
|
var checkpointId3 = external_exports.custom((value) => isEntityId(value, "checkpoint"));
|
|
126745
127080
|
var toolUseId2 = external_exports.string().min(1).max(512).regex(/^[A-Za-z0-9_.:-]+$/);
|
|
@@ -126798,7 +127133,7 @@ function projectPalActivity(entry, scopeHash) {
|
|
|
126798
127133
|
return null;
|
|
126799
127134
|
}
|
|
126800
127135
|
return Object.freeze({
|
|
126801
|
-
id:
|
|
127136
|
+
id: createHash39("sha256").update(JSON.stringify(["pal-activity/1", scopeHash, pointer2])).digest("hex"),
|
|
126802
127137
|
type: record4.type,
|
|
126803
127138
|
sessionId: record4.sessionId,
|
|
126804
127139
|
..."turnId" in record4 ? { turnId: record4.turnId } : {},
|
|
@@ -126892,7 +127227,7 @@ function createPalActivitySource(options) {
|
|
|
126892
127227
|
if (definition.id !== scope.palId || definition.revision !== scope.profileRevision)
|
|
126893
127228
|
throw new PalActivityIntegrityError();
|
|
126894
127229
|
const workspace = definition.workspace;
|
|
126895
|
-
const scopeHash =
|
|
127230
|
+
const scopeHash = createHash40("sha256").update(JSON.stringify([
|
|
126896
127231
|
"pal-activity/1",
|
|
126897
127232
|
scope.tenantId,
|
|
126898
127233
|
scope.projectId,
|
|
@@ -127285,7 +127620,7 @@ import { join as join53, resolve as resolve32 } from "node:path";
|
|
|
127285
127620
|
import { isDeepStrictEqual as isDeepStrictEqual11 } from "node:util";
|
|
127286
127621
|
|
|
127287
127622
|
// ../sdk/dist/pals/channels/schema.js
|
|
127288
|
-
import { createHash as
|
|
127623
|
+
import { createHash as createHash41 } from "node:crypto";
|
|
127289
127624
|
var connectionSchema = external_exports.object({
|
|
127290
127625
|
tenantId: addressSchema2.shape.tenantId,
|
|
127291
127626
|
provider: label4,
|
|
@@ -127316,7 +127651,7 @@ var verifiedActionSchema = external_exports.object({
|
|
|
127316
127651
|
actionId: label4,
|
|
127317
127652
|
payloadDigest: external_exports.string().regex(/^[a-f0-9]{64}$/),
|
|
127318
127653
|
payload: external_exports.string().min(1).max(32e3).refine((value) => !value.includes("\0"))
|
|
127319
|
-
}).strict().refine((value) =>
|
|
127654
|
+
}).strict().refine((value) => createHash41("sha256").update(value.payload).digest("hex") === value.payloadDigest, "Channel action payload does not match its authenticated digest.");
|
|
127320
127655
|
var routeDecisionSchema = external_exports.object({
|
|
127321
127656
|
v: external_exports.literal(1),
|
|
127322
127657
|
revision: external_exports.literal(1),
|
|
@@ -128169,7 +128504,7 @@ async function publishPalActivityOnce(options, id3, input2) {
|
|
|
128169
128504
|
__name(publishPalActivityOnce, "publishPalActivityOnce");
|
|
128170
128505
|
|
|
128171
128506
|
// ../sdk/dist/pals/activity/causality.js
|
|
128172
|
-
import { createHash as
|
|
128507
|
+
import { createHash as createHash42 } from "node:crypto";
|
|
128173
128508
|
import { isDeepStrictEqual as isDeepStrictEqual17 } from "node:util";
|
|
128174
128509
|
var requestMarkerSchema = external_exports.object({
|
|
128175
128510
|
type: external_exports.literal("request_envelope"),
|
|
@@ -128248,7 +128583,7 @@ function createPalActivityCausalityResolver(options) {
|
|
|
128248
128583
|
const root = entries2[0]?.record;
|
|
128249
128584
|
if (root?.type !== "session_started" || root.parent || root.forkedFrom || root.tenantId !== scope.tenantId || root.projectId !== scope.projectId || root.cwd !== workspace || root.origin?.protocol !== "desktop" || root.origin.externalSessionId !== JSON.stringify(["namzu-pal", scope.palId, scope.profileRevision, scope.sessionId]))
|
|
128250
128585
|
unavailable3();
|
|
128251
|
-
const scopeHash =
|
|
128586
|
+
const scopeHash = createHash42("sha256").update(JSON.stringify([
|
|
128252
128587
|
"pal-activity/1",
|
|
128253
128588
|
scope.tenantId,
|
|
128254
128589
|
scope.projectId,
|
|
@@ -130234,8 +130569,8 @@ function createMonitorTool(options = {}) {
|
|
|
130234
130569
|
error: options.webAccessHint ? `${MONITOR_WEBSOCKET_WEB_OFF} ${options.webAccessHint}` : MONITOR_WEBSOCKET_WEB_OFF
|
|
130235
130570
|
};
|
|
130236
130571
|
}
|
|
130237
|
-
const
|
|
130238
|
-
const sandboxRefusal = webSocketSandboxRefusal(context2.sandbox,
|
|
130572
|
+
const hostname4 = webSocketHostname(input2.ws.url);
|
|
130573
|
+
const sandboxRefusal = webSocketSandboxRefusal(context2.sandbox, hostname4);
|
|
130239
130574
|
if (sandboxRefusal !== void 0) {
|
|
130240
130575
|
return { success: false, output: "", error: sandboxRefusal };
|
|
130241
130576
|
}
|
|
@@ -130654,7 +130989,7 @@ ${observed}
|
|
|
130654
130989
|
});
|
|
130655
130990
|
|
|
130656
130991
|
// ../sdk/dist/tools/builtins/skill.js
|
|
130657
|
-
import { createHash as
|
|
130992
|
+
import { createHash as createHash43 } from "node:crypto";
|
|
130658
130993
|
var inputSchema16 = external_exports.object({
|
|
130659
130994
|
name: external_exports.string().min(1).optional().describe("The skill to load, exactly as listed in the available-skills manifest. Omit it to list model-invocable skills."),
|
|
130660
130995
|
args: external_exports.string().max(8e3).optional().describe("What to apply the skill to, in your own words. A skill that runs as a delegated agent sees only this and its own instructions, so say what it needs. Omit it on a continuation."),
|
|
@@ -130665,7 +131000,7 @@ var LIST_CURSOR_PATTERN = /^v1\.list\.(0|[1-9][0-9]*)\.([01])\.([A-Za-z0-9_-]{43
|
|
|
130665
131000
|
var MAX_SKILLS_PER_PAGE = 20;
|
|
130666
131001
|
var OVERSIZED_CATALOG_WARNING = "Some skills were omitted because their metadata is too large for this response budget.";
|
|
130667
131002
|
function snapshotDigest(snapshot) {
|
|
130668
|
-
return
|
|
131003
|
+
return createHash43("sha256").update(JSON.stringify({
|
|
130669
131004
|
version: 1,
|
|
130670
131005
|
name: snapshot.name,
|
|
130671
131006
|
body: snapshot.body,
|
|
@@ -130709,7 +131044,7 @@ function activeOutputCap(maxChars2) {
|
|
|
130709
131044
|
}
|
|
130710
131045
|
__name(activeOutputCap, "activeOutputCap");
|
|
130711
131046
|
function listDigest(skills, maxChars2) {
|
|
130712
|
-
return
|
|
131047
|
+
return createHash43("sha256").update(JSON.stringify({ version: 1, kind: "list", maxChars: maxChars2 ?? null, skills })).digest("base64url");
|
|
130713
131048
|
}
|
|
130714
131049
|
__name(listDigest, "listDigest");
|
|
130715
131050
|
function serializeListPage(page) {
|
|
@@ -131048,6 +131383,10 @@ async function runForkedSkill(input2) {
|
|
|
131048
131383
|
});
|
|
131049
131384
|
return {
|
|
131050
131385
|
...result,
|
|
131386
|
+
// Says what the text is, so a later pass never carries a report as the skill's steps.
|
|
131387
|
+
output: result.success ? `${forkedSkillReportNote(input2.name)}
|
|
131388
|
+
|
|
131389
|
+
${result.output}` : result.output,
|
|
131051
131390
|
data: {
|
|
131052
131391
|
...typeof result.data === "object" && result.data !== null ? result.data : {},
|
|
131053
131392
|
skill: input2.name,
|
|
@@ -133892,8 +134231,8 @@ var ABOUT_BLANK = "about:blank";
|
|
|
133892
134231
|
var METADATA_HOSTNAMES = /* @__PURE__ */ new Set(["metadata.google.internal", "metadata", "metadata.goog"]);
|
|
133893
134232
|
var METADATA_IPV4 = /* @__PURE__ */ new Set(["169.254.169.254", "100.100.100.200"]);
|
|
133894
134233
|
var METADATA_IPV6 = /* @__PURE__ */ new Set(["fd00:ec2::254"]);
|
|
133895
|
-
function stripTrailingDots(
|
|
133896
|
-
return
|
|
134234
|
+
function stripTrailingDots(hostname4) {
|
|
134235
|
+
return hostname4.replace(/\.+$/, "");
|
|
133897
134236
|
}
|
|
133898
134237
|
__name(stripTrailingDots, "stripTrailingDots");
|
|
133899
134238
|
function expandIpv6(address2) {
|
|
@@ -133942,8 +134281,8 @@ function embeddedIpv4(h) {
|
|
|
133942
134281
|
return out;
|
|
133943
134282
|
}
|
|
133944
134283
|
__name(embeddedIpv4, "embeddedIpv4");
|
|
133945
|
-
function isCloudMetadataHost(
|
|
133946
|
-
let host = stripTrailingDots(
|
|
134284
|
+
function isCloudMetadataHost(hostname4) {
|
|
134285
|
+
let host = stripTrailingDots(hostname4.trim().toLowerCase());
|
|
133947
134286
|
if (host === "")
|
|
133948
134287
|
return false;
|
|
133949
134288
|
const bracketed = host.startsWith("[") ? host : host.includes(":") ? `[${host}]` : host;
|
|
@@ -136872,6 +137211,10 @@ export {
|
|
|
136872
137211
|
DiskSessionLog,
|
|
136873
137212
|
streamSessionLog,
|
|
136874
137213
|
readSessionLog,
|
|
137214
|
+
placeOf,
|
|
137215
|
+
currentPlace,
|
|
137216
|
+
turnHolder,
|
|
137217
|
+
parseTurnHolder,
|
|
136875
137218
|
InMemoryLogMedium,
|
|
136876
137219
|
InMemorySessionLog,
|
|
136877
137220
|
readStructuredOutput,
|
|
@@ -137716,4 +138059,4 @@ export {
|
|
|
137716
138059
|
WakeBudget,
|
|
137717
138060
|
wakeBudgetFromEnv
|
|
137718
138061
|
};
|
|
137719
|
-
//# sourceMappingURL=chunk-
|
|
138062
|
+
//# sourceMappingURL=chunk-VVMRXGQ6.js.map
|