@namzu/cli 38.2.0 → 39.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +122 -50
- package/dist/bin.js +1 -1
- package/dist/chunks/{acp-JU4DX3RK.js → acp-7MS4QWHQ.js} +40 -37
- package/dist/chunks/acp-7MS4QWHQ.js.map +6 -0
- package/dist/chunks/{activity-command-TERANSMO.js → activity-command-ZLQTSOOT.js} +11 -11
- package/dist/chunks/{add-MZ6KIHY3.js → add-I77S5XFR.js} +17 -17
- package/dist/chunks/{agent-JZFFS4IP.js → agent-CD2IIXPD.js} +29 -28
- package/dist/chunks/agent-session-6F55DYFA.js +53 -0
- package/dist/chunks/{archive-SXYHKL3H.js → archive-JRJTOPHL.js} +9 -9
- package/dist/chunks/{bin-main-TFKZQ7NF.js → bin-main-KTQUVYIP.js} +3 -3
- package/dist/chunks/{browser-3U3YBKL6.js → browser-OKCFCNCP.js} +6 -6
- package/dist/chunks/{chat-37QA7HHN.js → chat-LTGXH6SR.js} +14 -14
- package/dist/chunks/{chunk-B5344NIV.js → chunk-24FWPXME.js} +3 -3
- package/dist/chunks/{chunk-U75JG2RT.js → chunk-2GO7AWHX.js} +2 -2
- package/dist/chunks/{chunk-LBPM46OY.js → chunk-2TEGJRBM.js} +2 -2
- package/dist/chunks/{chunk-7O4X4GYL.js → chunk-44JEVSTR.js} +7 -7
- package/dist/chunks/{chunk-EUHPTASG.js → chunk-4UYGMFWB.js} +2 -2
- package/dist/chunks/{chunk-EKMOETAY.js → chunk-5BULAR3C.js} +2 -2
- package/dist/chunks/{chunk-FI7TIM5P.js → chunk-5CKCYCPL.js} +2 -2
- package/dist/chunks/{chunk-UQZNYNX7.js → chunk-5GVYGWMK.js} +2 -2
- package/dist/chunks/{chunk-Q6SF7T77.js → chunk-64WCX6UV.js} +3 -3
- package/dist/chunks/{chunk-Z4LTK3HY.js → chunk-67YTCGFQ.js} +4 -4
- package/dist/chunks/{chunk-LH6J5QQ7.js → chunk-6A5BVWEI.js} +2 -2
- package/dist/chunks/{chunk-GTXD263T.js → chunk-6AH52DNV.js} +2 -2
- package/dist/chunks/{chunk-LLZ32DHS.js → chunk-6MRGH7S5.js} +860 -253
- package/dist/chunks/chunk-6MRGH7S5.js.map +6 -0
- package/dist/chunks/{chunk-6A7P3I3N.js → chunk-7K7VDUT3.js} +29 -28
- package/dist/chunks/{chunk-6A7P3I3N.js.map → chunk-7K7VDUT3.js.map} +1 -1
- package/dist/chunks/{chunk-ICBHR27I.js → chunk-A7F56OV6.js} +16 -13
- package/dist/chunks/{chunk-ICBHR27I.js.map → chunk-A7F56OV6.js.map} +1 -1
- package/dist/chunks/{chunk-TCXFKEYW.js → chunk-B73OIFL6.js} +4 -4
- package/dist/chunks/{chunk-TCXFKEYW.js.map → chunk-B73OIFL6.js.map} +1 -1
- package/dist/chunks/{chunk-PETRJVXF.js → chunk-BGI5U5XL.js} +4 -4
- package/dist/chunks/{chunk-3NIZKJJG.js → chunk-BYJ4AGMC.js} +2 -2
- package/dist/chunks/chunk-CDYUGK7F.js +70 -0
- package/dist/chunks/chunk-CDYUGK7F.js.map +6 -0
- package/dist/chunks/{chunk-N57QO3AA.js → chunk-CI3SKMXQ.js} +2 -2
- package/dist/chunks/{chunk-IG4O4UAL.js → chunk-CL475F3V.js} +2 -2
- package/dist/chunks/{chunk-DQICYFIG.js → chunk-CYGNCTMI.js} +2 -2
- package/dist/chunks/{chunk-5PDW6VPO.js → chunk-D7UUTTLG.js} +3 -3
- package/dist/chunks/{chunk-2UUBILYI.js → chunk-DCAKHMT4.js} +4 -4
- package/dist/chunks/{chunk-D5SIC3SF.js → chunk-DXQQSQQ3.js} +9 -9
- package/dist/chunks/{chunk-KG2YA6TI.js → chunk-ECO3KP5U.js} +3 -3
- package/dist/chunks/{chunk-WLHI2QSC.js → chunk-ERSRQ6QN.js} +3 -3
- package/dist/chunks/{chunk-WLHI2QSC.js.map → chunk-ERSRQ6QN.js.map} +1 -1
- package/dist/chunks/{chunk-LC5VGZO2.js → chunk-EXL2ALVX.js} +2 -2
- package/dist/chunks/{chunk-A64X23MU.js → chunk-FTZT4UAB.js} +485 -57
- package/dist/chunks/chunk-FTZT4UAB.js.map +6 -0
- package/dist/chunks/{chunk-Z56MZ7UW.js → chunk-GQBSRXFY.js} +4 -4
- package/dist/chunks/{chunk-2SVXX5QK.js → chunk-H2SFQIVZ.js} +5 -5
- package/dist/chunks/{chunk-2UT6U22B.js → chunk-HYJTH4L6.js} +2 -2
- package/dist/chunks/{chunk-7MLTWXEW.js → chunk-HZH2LZR3.js} +2 -2
- package/dist/chunks/{chunk-XNHYUV6G.js → chunk-IAA2O76K.js} +2 -2
- package/dist/chunks/{chunk-U3JIZFOS.js → chunk-IE5XIE4W.js} +2 -2
- package/dist/chunks/{chunk-CZVHXYGD.js → chunk-IYPP6HSK.js} +4 -32
- package/dist/chunks/chunk-IYPP6HSK.js.map +6 -0
- package/dist/chunks/{chunk-FOGCQUIH.js → chunk-JBYO5UWH.js} +11 -23
- package/dist/chunks/chunk-JBYO5UWH.js.map +6 -0
- package/dist/chunks/{chunk-JN6M424Z.js → chunk-JDS4SYAJ.js} +2 -2
- package/dist/chunks/{chunk-V2VHVH5S.js → chunk-L5EE2M32.js} +3 -3
- package/dist/chunks/{chunk-2WHVZCLT.js → chunk-M3TJHQF7.js} +18 -2
- package/dist/chunks/{chunk-2WHVZCLT.js.map → chunk-M3TJHQF7.js.map} +1 -1
- package/dist/chunks/{chunk-XEOZYKPJ.js → chunk-MBGTDQFF.js} +3 -3
- package/dist/chunks/{chunk-ZJHOWWXZ.js → chunk-NFCBNDBG.js} +12 -12
- package/dist/chunks/{chunk-3PBSWF6X.js → chunk-NNSCLV6S.js} +3 -3
- package/dist/chunks/{chunk-KUNQW3N3.js → chunk-NXLK7UAG.js} +4 -4
- package/dist/chunks/{chunk-S5U4BG57.js → chunk-PAJTVGYM.js} +3 -52
- package/dist/chunks/chunk-PAJTVGYM.js.map +6 -0
- package/dist/chunks/{chunk-2T7TZDUE.js → chunk-PWO4HKDQ.js} +2 -2
- package/dist/chunks/{chunk-M2EJQU3F.js → chunk-QFAZWIVS.js} +4 -4
- package/dist/chunks/{chunk-XIURI2PQ.js → chunk-QX6YDLUD.js} +7 -7
- package/dist/chunks/{chunk-LPYWPRIF.js → chunk-QYIY7Q5R.js} +4 -4
- package/dist/chunks/{chunk-FMJCN6JZ.js → chunk-RI5G5NS3.js} +90 -6
- package/dist/chunks/chunk-RI5G5NS3.js.map +6 -0
- package/dist/chunks/{chunk-HOOY63EB.js → chunk-SVTNQGLN.js} +15 -15
- package/dist/chunks/{chunk-XKEMUEI5.js → chunk-SYMXDX7F.js} +2 -2
- package/dist/chunks/{chunk-VFBIR3UC.js → chunk-UB6WVOKM.js} +4 -4
- package/dist/chunks/{chunk-ZJMUPGWD.js → chunk-VIRFJSX6.js} +8 -8
- package/dist/chunks/{chunk-CLIP7QVU.js → chunk-VMJWG5TF.js} +3 -3
- package/dist/chunks/{chunk-CK4TOW2N.js → chunk-VUBQ6IRM.js} +2 -2
- package/dist/chunks/{chunk-AHVF22PV.js → chunk-WICKQJR4.js} +5 -5
- package/dist/chunks/{chunk-5G3VKTLZ.js → chunk-WUBN6DXH.js} +2 -2
- package/dist/chunks/{chunk-CDZT7WGY.js → chunk-X62U63KJ.js} +3 -3
- package/dist/chunks/{chunk-TNTP3CNT.js → chunk-XLPUR46F.js} +2 -2
- package/dist/chunks/{chunk-7S5UB6DX.js → chunk-XOIV3R6O.js} +6 -6
- package/dist/chunks/{chunk-OA5772RG.js → chunk-YH7CW765.js} +4 -4
- package/dist/chunks/{chunk-KONWJQLM.js → chunk-YVJTVJN4.js} +2 -2
- package/dist/chunks/{cli-runtime-PRG53LL6.js → cli-runtime-KLGRRAPC.js} +13 -13
- package/dist/chunks/{commands-QMF4AHAY.js → commands-UQGS6244.js} +5 -5
- package/dist/chunks/{crash-report-BSZ6SUOF.js → crash-report-F3CLYQ6A.js} +6 -6
- package/dist/chunks/{dist-GNI4DIHI.js → dist-BF3HQ6PJ.js} +3 -3
- package/dist/chunks/{dist-XDA5OMB2.js → dist-BYIBYB4E.js} +3 -3
- package/dist/chunks/{dist-JDUOF4K7.js → dist-FE7KZYMC.js} +2 -2
- package/dist/chunks/{dist-QSOTJL6Z.js → dist-FFM3ZZQ4.js} +2 -2
- package/dist/chunks/{dist-HRWBXBF3.js → dist-MMWDBT7P.js} +2 -2
- package/dist/chunks/{dist-SO6XBKFN.js → dist-SGU5HCLT.js} +2 -2
- package/dist/chunks/{dist-MYWLKPXK.js → dist-TZU45EHB.js} +2 -2
- package/dist/chunks/{doctor-5MS7V3JB.js → doctor-6ZZOTVMF.js} +10 -10
- package/dist/chunks/{drain-YGGEC4UE.js → drain-XK5PA7E5.js} +10 -10
- package/dist/chunks/{eval-GWP6MISH.js → eval-RPKIJFAB.js} +2 -2
- package/dist/chunks/{exec-YDIFQY7C.js → exec-DJ4ECSDD.js} +42 -30
- package/dist/chunks/{exec-YDIFQY7C.js.map → exec-DJ4ECSDD.js.map} +1 -1
- package/dist/chunks/{home-IZ2H7PM3.js → home-ZAIMBEH7.js} +3 -3
- package/dist/chunks/{host-queries-UCVJBJXU.js → host-queries-AMSRIPNG.js} +14 -14
- package/dist/chunks/{lifecycle-U52Z5ZMZ.js → lifecycle-L4E6FPYN.js} +25 -25
- package/dist/chunks/{list-SVKI2XOL.js → list-2QTHV4YO.js} +11 -11
- package/dist/chunks/{login-MNDG4XIT.js → login-QMOTL6Y5.js} +10 -10
- package/dist/chunks/{logs-M7RCXYPY.js → logs-JIQJGYVR.js} +4 -4
- package/dist/chunks/{mcp-KEQMYKDA.js → mcp-ZCRO5DB3.js} +18 -18
- package/dist/chunks/{message-command-FZ6VEUK5.js → message-command-2SCMXO4D.js} +35 -34
- package/dist/chunks/message-command-2SCMXO4D.js.map +6 -0
- package/dist/chunks/{operator-tools-C57ZIYRG.js → operator-tools-23FYQ5OE.js} +12 -12
- package/dist/chunks/{output-schema-IYQRSIUA.js → output-schema-RTXHP2NW.js} +3 -3
- package/dist/chunks/{pal-NXMTLY6Z.js → pal-AC73MLO6.js} +13 -13
- package/dist/chunks/{providers-TZBRQDXE.js → providers-SUXIFNA4.js} +8 -8
- package/dist/chunks/{resident-DBIZBLOV.js → resident-VFEZDABF.js} +20 -20
- package/dist/chunks/resume-I3YLV7D3.js +22 -0
- package/dist/chunks/{resume-command-36S3HXPO.js → resume-command-PZ3NLBOR.js} +4 -4
- package/dist/chunks/{schedule-UR54S44B.js → schedule-4KYTYQML.js} +8 -8
- package/dist/chunks/{service-VMXEAJCI.js → service-NI46RYPW.js} +24 -24
- package/dist/chunks/session-step-IR57BRZX.js +29 -0
- package/dist/chunks/{skills-RXYS26H3.js → skills-OYRPNK3I.js} +8 -8
- package/dist/chunks/{state-NS47IVWW.js → state-ULVIHH2M.js} +2 -2
- package/dist/chunks/{store-GNFHH2LZ.js → store-3LVJZEHS.js} +4 -4
- package/dist/chunks/{store-TO65IAIZ.js → store-EOHDDBM7.js} +6 -6
- package/dist/chunks/{store-3U2GZAZS.js → store-W2VNXICH.js} +9 -9
- package/dist/chunks/{tui-STU5UZBC.js → tui-GEHRYWRG.js} +2026 -1118
- package/dist/chunks/tui-GEHRYWRG.js.map +6 -0
- package/dist/chunks/{upgrade-USIXROFG.js → upgrade-LSB2KNDF.js} +4 -3
- package/dist/chunks/upgrade-LSB2KNDF.js.map +6 -0
- package/dist/chunks/{worktree-AYI5VJ5H.js → worktree-PZU6IAUF.js} +11 -11
- package/dist/cli.d.ts.map +1 -1
- package/dist/commands/acp.d.ts.map +1 -1
- package/dist/commands/desktop-model-catalogue.d.ts +1 -1
- package/dist/commands/exec-json.d.ts.map +1 -1
- package/dist/commands/exec.d.ts.map +1 -1
- package/dist/commands/resume.d.ts +1 -1
- package/dist/config/load.d.ts +1 -2
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/schema.d.ts +20 -3
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/context/doctrine.d.ts +4 -4
- package/dist/context/doctrine.d.ts.map +1 -1
- package/dist/index.js +14 -14
- package/dist/integrations/harness/codex-protocol.d.ts +1 -1
- package/dist/integrations/harness/codex-protocol.d.ts.map +1 -1
- package/dist/integrations/mcp/tool-search.d.ts +3 -4
- package/dist/integrations/mcp/tool-search.d.ts.map +1 -1
- package/dist/integrations/notifications/idle.d.ts +2 -2
- package/dist/integrations/notifications/idle.d.ts.map +1 -1
- package/dist/integrations/providers/identity.d.ts +1 -1
- package/dist/integrations/resident/runner-worker.js +20 -20
- package/dist/integrations/subagents/activity.d.ts +4 -0
- package/dist/integrations/subagents/activity.d.ts.map +1 -1
- package/dist/integrations/subagents/label-ledger.d.ts +2 -3
- package/dist/integrations/subagents/label-ledger.d.ts.map +1 -1
- package/dist/integrations/subagents/runtime.d.ts +40 -6
- package/dist/integrations/subagents/runtime.d.ts.map +1 -1
- package/dist/integrations/subagents/workflow-assignment.d.ts +13 -0
- package/dist/integrations/subagents/workflow-assignment.d.ts.map +1 -0
- package/dist/integrations/workflows/doctrine.d.ts +4 -3
- package/dist/integrations/workflows/doctrine.d.ts.map +1 -1
- package/dist/integrations/workflows/host.d.ts +5 -0
- package/dist/integrations/workflows/host.d.ts.map +1 -1
- package/dist/integrations/workflows/offering.d.ts +9 -27
- package/dist/integrations/workflows/offering.d.ts.map +1 -1
- package/dist/integrations/workflows/size.d.ts +51 -0
- package/dist/integrations/workflows/size.d.ts.map +1 -0
- package/dist/permissions/live-mode.d.ts +1 -2
- package/dist/permissions/live-mode.d.ts.map +1 -1
- package/dist/permissions/local-settings.d.ts +4 -4
- package/dist/permissions/mode.d.ts +1 -1
- package/dist/permissions/rules.d.ts +1 -2
- package/dist/permissions/rules.d.ts.map +1 -1
- package/dist/permissions/session-allow.d.ts +12 -12
- package/dist/permissions/session-allow.d.ts.map +1 -1
- package/dist/plan/approval.d.ts +1 -2
- package/dist/plan/approval.d.ts.map +1 -1
- package/dist/reminders/frame.d.ts +1 -1
- package/dist/reminders/frame.d.ts.map +1 -1
- package/dist/reminders/hypermode.d.ts +31 -0
- package/dist/reminders/hypermode.d.ts.map +1 -0
- package/dist/reminders/index.d.ts +7 -1
- package/dist/reminders/index.d.ts.map +1 -1
- package/dist/reminders/plan-mode.d.ts +1 -1
- package/dist/reminders/task-nudge.d.ts +1 -1
- package/dist/schedule/fire/fire.d.ts.map +1 -1
- package/dist/tui/AgentExplorer.d.ts +25 -6
- package/dist/tui/AgentExplorer.d.ts.map +1 -1
- package/dist/tui/App.d.ts +10 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/BackgroundAgentRows.d.ts +13 -0
- package/dist/tui/BackgroundAgentRows.d.ts.map +1 -0
- package/dist/tui/BackgroundJobsPanel.d.ts.map +1 -1
- package/dist/tui/ChoicePicker.d.ts.map +1 -1
- package/dist/tui/Composer.d.ts +8 -4
- package/dist/tui/Composer.d.ts.map +1 -1
- package/dist/tui/ComposerFrame.d.ts +1 -1
- package/dist/tui/EffortSlider.d.ts +4 -4
- package/dist/tui/EffortSlider.d.ts.map +1 -1
- package/dist/tui/LiveActivity.d.ts.map +1 -1
- package/dist/tui/PendingInputPanel.d.ts +1 -1
- package/dist/tui/PendingInputPanel.d.ts.map +1 -1
- package/dist/tui/PermissionOverlay.d.ts +10 -3
- package/dist/tui/PermissionOverlay.d.ts.map +1 -1
- package/dist/tui/PlanApprovalOverlay.d.ts +2 -2
- package/dist/tui/QuestionDialog.d.ts +1 -1
- package/dist/tui/StatusBar.d.ts +6 -3
- package/dist/tui/StatusBar.d.ts.map +1 -1
- package/dist/tui/Transcript.d.ts +5 -6
- package/dist/tui/Transcript.d.ts.map +1 -1
- package/dist/tui/agent-stop-all.d.ts +11 -0
- package/dist/tui/agent-stop-all.d.ts.map +1 -1
- package/dist/tui/agent-transcript-rows.d.ts +28 -15
- package/dist/tui/agent-transcript-rows.d.ts.map +1 -1
- package/dist/tui/agent-view-commands.d.ts +3 -5
- package/dist/tui/agent-view-commands.d.ts.map +1 -1
- package/dist/tui/agent.d.ts +26 -12
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/background-agents.d.ts +46 -0
- package/dist/tui/background-agents.d.ts.map +1 -0
- package/dist/tui/choice-selection.d.ts +3 -1
- package/dist/tui/choice-selection.d.ts.map +1 -1
- package/dist/tui/composer-hints.d.ts +26 -0
- package/dist/tui/composer-hints.d.ts.map +1 -0
- package/dist/tui/context-meter.d.ts +1 -1
- package/dist/tui/diff-rows.d.ts +30 -18
- package/dist/tui/diff-rows.d.ts.map +1 -1
- package/dist/tui/diff-view.d.ts +99 -0
- package/dist/tui/diff-view.d.ts.map +1 -0
- package/dist/tui/hint-counts.d.ts +7 -0
- package/dist/tui/hint-counts.d.ts.map +1 -0
- package/dist/tui/hypermode.d.ts +20 -26
- package/dist/tui/hypermode.d.ts.map +1 -1
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/live-window.d.ts +1 -1
- package/dist/tui/live-window.d.ts.map +1 -1
- package/dist/tui/markdown-table.d.ts +1 -2
- package/dist/tui/markdown-table.d.ts.map +1 -1
- package/dist/tui/paste-chips.d.ts +22 -0
- package/dist/tui/paste-chips.d.ts.map +1 -0
- package/dist/tui/permission-review.d.ts +75 -18
- package/dist/tui/permission-review.d.ts.map +1 -1
- package/dist/tui/placeholder-examples.d.ts +5 -0
- package/dist/tui/placeholder-examples.d.ts.map +1 -0
- package/dist/tui/restored-rows.d.ts +3 -1
- package/dist/tui/restored-rows.d.ts.map +1 -1
- package/dist/tui/schedule/source-deliveries.d.ts +1 -1
- package/dist/tui/schedule/source-deliveries.d.ts.map +1 -1
- package/dist/tui/shell-cell.d.ts +15 -0
- package/dist/tui/shell-cell.d.ts.map +1 -1
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/dist/tui/status-line/StatusLineRows.d.ts +1 -2
- package/dist/tui/status-line/StatusLineRows.d.ts.map +1 -1
- package/dist/tui/status-line/controller.d.ts +1 -1
- package/dist/tui/status-line/output.d.ts +2 -2
- package/dist/tui/status-line/payload.d.ts +2 -2
- package/dist/tui/status-line/run-command.d.ts +1 -1
- package/dist/tui/system-rows.d.ts +8 -0
- package/dist/tui/system-rows.d.ts.map +1 -1
- package/dist/tui/terminal-choice-text.d.ts +7 -0
- package/dist/tui/terminal-choice-text.d.ts.map +1 -1
- package/dist/tui/theme.d.ts +21 -0
- package/dist/tui/theme.d.ts.map +1 -1
- package/dist/tui/tool-end-rows.d.ts +9 -1
- package/dist/tui/tool-end-rows.d.ts.map +1 -1
- package/dist/tui/tool-failure-text.d.ts +13 -0
- package/dist/tui/tool-failure-text.d.ts.map +1 -0
- package/dist/tui/triggers/context-text.d.ts +3 -3
- package/dist/tui/triggers/context-text.d.ts.map +1 -1
- package/dist/tui/triggers/copy.d.ts +7 -11
- package/dist/tui/triggers/copy.d.ts.map +1 -1
- package/dist/tui/triggers/registry.d.ts +2 -3
- package/dist/tui/triggers/registry.d.ts.map +1 -1
- package/dist/tui/typed-input.d.ts +14 -0
- package/dist/tui/typed-input.d.ts.map +1 -0
- package/dist/tui/types.d.ts +7 -5
- package/dist/tui/types.d.ts.map +1 -1
- package/dist/tui/user-text-view.d.ts +25 -0
- package/dist/tui/user-text-view.d.ts.map +1 -0
- package/dist/tui/workflow-runs.d.ts.map +1 -1
- package/dist/tui/workspace-diff.d.ts +3 -4
- package/dist/tui/workspace-diff.d.ts.map +1 -1
- package/package.json +6 -5
- package/dist/chunks/acp-JU4DX3RK.js.map +0 -6
- package/dist/chunks/agent-session-YS3JWF6Z.js +0 -52
- package/dist/chunks/chunk-A64X23MU.js.map +0 -6
- package/dist/chunks/chunk-CZVHXYGD.js.map +0 -6
- package/dist/chunks/chunk-FMJCN6JZ.js.map +0 -6
- package/dist/chunks/chunk-FOGCQUIH.js.map +0 -6
- package/dist/chunks/chunk-LLZ32DHS.js.map +0 -6
- package/dist/chunks/chunk-S5U4BG57.js.map +0 -6
- package/dist/chunks/message-command-FZ6VEUK5.js.map +0 -6
- package/dist/chunks/resume-GG6RMJXQ.js +0 -22
- package/dist/chunks/session-step-VJCHKPWD.js +0 -29
- package/dist/chunks/tui-STU5UZBC.js.map +0 -6
- package/dist/chunks/upgrade-USIXROFG.js.map +0 -6
- package/dist/integrations/subagents/failure-text.d.ts +0 -13
- package/dist/integrations/subagents/failure-text.d.ts.map +0 -1
- /package/dist/chunks/{activity-command-TERANSMO.js.map → activity-command-ZLQTSOOT.js.map} +0 -0
- /package/dist/chunks/{add-MZ6KIHY3.js.map → add-I77S5XFR.js.map} +0 -0
- /package/dist/chunks/{agent-JZFFS4IP.js.map → agent-CD2IIXPD.js.map} +0 -0
- /package/dist/chunks/{agent-session-YS3JWF6Z.js.map → agent-session-6F55DYFA.js.map} +0 -0
- /package/dist/chunks/{archive-SXYHKL3H.js.map → archive-JRJTOPHL.js.map} +0 -0
- /package/dist/chunks/{bin-main-TFKZQ7NF.js.map → bin-main-KTQUVYIP.js.map} +0 -0
- /package/dist/chunks/{browser-3U3YBKL6.js.map → browser-OKCFCNCP.js.map} +0 -0
- /package/dist/chunks/{chat-37QA7HHN.js.map → chat-LTGXH6SR.js.map} +0 -0
- /package/dist/chunks/{chunk-B5344NIV.js.map → chunk-24FWPXME.js.map} +0 -0
- /package/dist/chunks/{chunk-U75JG2RT.js.map → chunk-2GO7AWHX.js.map} +0 -0
- /package/dist/chunks/{chunk-LBPM46OY.js.map → chunk-2TEGJRBM.js.map} +0 -0
- /package/dist/chunks/{chunk-7O4X4GYL.js.map → chunk-44JEVSTR.js.map} +0 -0
- /package/dist/chunks/{chunk-EUHPTASG.js.map → chunk-4UYGMFWB.js.map} +0 -0
- /package/dist/chunks/{chunk-EKMOETAY.js.map → chunk-5BULAR3C.js.map} +0 -0
- /package/dist/chunks/{chunk-FI7TIM5P.js.map → chunk-5CKCYCPL.js.map} +0 -0
- /package/dist/chunks/{chunk-UQZNYNX7.js.map → chunk-5GVYGWMK.js.map} +0 -0
- /package/dist/chunks/{chunk-Q6SF7T77.js.map → chunk-64WCX6UV.js.map} +0 -0
- /package/dist/chunks/{chunk-Z4LTK3HY.js.map → chunk-67YTCGFQ.js.map} +0 -0
- /package/dist/chunks/{chunk-LH6J5QQ7.js.map → chunk-6A5BVWEI.js.map} +0 -0
- /package/dist/chunks/{chunk-GTXD263T.js.map → chunk-6AH52DNV.js.map} +0 -0
- /package/dist/chunks/{chunk-PETRJVXF.js.map → chunk-BGI5U5XL.js.map} +0 -0
- /package/dist/chunks/{chunk-3NIZKJJG.js.map → chunk-BYJ4AGMC.js.map} +0 -0
- /package/dist/chunks/{chunk-N57QO3AA.js.map → chunk-CI3SKMXQ.js.map} +0 -0
- /package/dist/chunks/{chunk-IG4O4UAL.js.map → chunk-CL475F3V.js.map} +0 -0
- /package/dist/chunks/{chunk-DQICYFIG.js.map → chunk-CYGNCTMI.js.map} +0 -0
- /package/dist/chunks/{chunk-5PDW6VPO.js.map → chunk-D7UUTTLG.js.map} +0 -0
- /package/dist/chunks/{chunk-2UUBILYI.js.map → chunk-DCAKHMT4.js.map} +0 -0
- /package/dist/chunks/{chunk-D5SIC3SF.js.map → chunk-DXQQSQQ3.js.map} +0 -0
- /package/dist/chunks/{chunk-KG2YA6TI.js.map → chunk-ECO3KP5U.js.map} +0 -0
- /package/dist/chunks/{chunk-LC5VGZO2.js.map → chunk-EXL2ALVX.js.map} +0 -0
- /package/dist/chunks/{chunk-Z56MZ7UW.js.map → chunk-GQBSRXFY.js.map} +0 -0
- /package/dist/chunks/{chunk-2SVXX5QK.js.map → chunk-H2SFQIVZ.js.map} +0 -0
- /package/dist/chunks/{chunk-2UT6U22B.js.map → chunk-HYJTH4L6.js.map} +0 -0
- /package/dist/chunks/{chunk-7MLTWXEW.js.map → chunk-HZH2LZR3.js.map} +0 -0
- /package/dist/chunks/{chunk-XNHYUV6G.js.map → chunk-IAA2O76K.js.map} +0 -0
- /package/dist/chunks/{chunk-U3JIZFOS.js.map → chunk-IE5XIE4W.js.map} +0 -0
- /package/dist/chunks/{chunk-JN6M424Z.js.map → chunk-JDS4SYAJ.js.map} +0 -0
- /package/dist/chunks/{chunk-V2VHVH5S.js.map → chunk-L5EE2M32.js.map} +0 -0
- /package/dist/chunks/{chunk-XEOZYKPJ.js.map → chunk-MBGTDQFF.js.map} +0 -0
- /package/dist/chunks/{chunk-ZJHOWWXZ.js.map → chunk-NFCBNDBG.js.map} +0 -0
- /package/dist/chunks/{chunk-3PBSWF6X.js.map → chunk-NNSCLV6S.js.map} +0 -0
- /package/dist/chunks/{chunk-KUNQW3N3.js.map → chunk-NXLK7UAG.js.map} +0 -0
- /package/dist/chunks/{chunk-2T7TZDUE.js.map → chunk-PWO4HKDQ.js.map} +0 -0
- /package/dist/chunks/{chunk-M2EJQU3F.js.map → chunk-QFAZWIVS.js.map} +0 -0
- /package/dist/chunks/{chunk-XIURI2PQ.js.map → chunk-QX6YDLUD.js.map} +0 -0
- /package/dist/chunks/{chunk-LPYWPRIF.js.map → chunk-QYIY7Q5R.js.map} +0 -0
- /package/dist/chunks/{chunk-HOOY63EB.js.map → chunk-SVTNQGLN.js.map} +0 -0
- /package/dist/chunks/{chunk-XKEMUEI5.js.map → chunk-SYMXDX7F.js.map} +0 -0
- /package/dist/chunks/{chunk-VFBIR3UC.js.map → chunk-UB6WVOKM.js.map} +0 -0
- /package/dist/chunks/{chunk-ZJMUPGWD.js.map → chunk-VIRFJSX6.js.map} +0 -0
- /package/dist/chunks/{chunk-CLIP7QVU.js.map → chunk-VMJWG5TF.js.map} +0 -0
- /package/dist/chunks/{chunk-CK4TOW2N.js.map → chunk-VUBQ6IRM.js.map} +0 -0
- /package/dist/chunks/{chunk-AHVF22PV.js.map → chunk-WICKQJR4.js.map} +0 -0
- /package/dist/chunks/{chunk-5G3VKTLZ.js.map → chunk-WUBN6DXH.js.map} +0 -0
- /package/dist/chunks/{chunk-CDZT7WGY.js.map → chunk-X62U63KJ.js.map} +0 -0
- /package/dist/chunks/{chunk-TNTP3CNT.js.map → chunk-XLPUR46F.js.map} +0 -0
- /package/dist/chunks/{chunk-7S5UB6DX.js.map → chunk-XOIV3R6O.js.map} +0 -0
- /package/dist/chunks/{chunk-OA5772RG.js.map → chunk-YH7CW765.js.map} +0 -0
- /package/dist/chunks/{chunk-KONWJQLM.js.map → chunk-YVJTVJN4.js.map} +0 -0
- /package/dist/chunks/{cli-runtime-PRG53LL6.js.map → cli-runtime-KLGRRAPC.js.map} +0 -0
- /package/dist/chunks/{commands-QMF4AHAY.js.map → commands-UQGS6244.js.map} +0 -0
- /package/dist/chunks/{crash-report-BSZ6SUOF.js.map → crash-report-F3CLYQ6A.js.map} +0 -0
- /package/dist/chunks/{dist-GNI4DIHI.js.map → dist-BF3HQ6PJ.js.map} +0 -0
- /package/dist/chunks/{dist-XDA5OMB2.js.map → dist-BYIBYB4E.js.map} +0 -0
- /package/dist/chunks/{dist-JDUOF4K7.js.map → dist-FE7KZYMC.js.map} +0 -0
- /package/dist/chunks/{dist-QSOTJL6Z.js.map → dist-FFM3ZZQ4.js.map} +0 -0
- /package/dist/chunks/{dist-HRWBXBF3.js.map → dist-MMWDBT7P.js.map} +0 -0
- /package/dist/chunks/{dist-SO6XBKFN.js.map → dist-SGU5HCLT.js.map} +0 -0
- /package/dist/chunks/{dist-MYWLKPXK.js.map → dist-TZU45EHB.js.map} +0 -0
- /package/dist/chunks/{doctor-5MS7V3JB.js.map → doctor-6ZZOTVMF.js.map} +0 -0
- /package/dist/chunks/{drain-YGGEC4UE.js.map → drain-XK5PA7E5.js.map} +0 -0
- /package/dist/chunks/{eval-GWP6MISH.js.map → eval-RPKIJFAB.js.map} +0 -0
- /package/dist/chunks/{home-IZ2H7PM3.js.map → home-ZAIMBEH7.js.map} +0 -0
- /package/dist/chunks/{host-queries-UCVJBJXU.js.map → host-queries-AMSRIPNG.js.map} +0 -0
- /package/dist/chunks/{lifecycle-U52Z5ZMZ.js.map → lifecycle-L4E6FPYN.js.map} +0 -0
- /package/dist/chunks/{list-SVKI2XOL.js.map → list-2QTHV4YO.js.map} +0 -0
- /package/dist/chunks/{login-MNDG4XIT.js.map → login-QMOTL6Y5.js.map} +0 -0
- /package/dist/chunks/{logs-M7RCXYPY.js.map → logs-JIQJGYVR.js.map} +0 -0
- /package/dist/chunks/{mcp-KEQMYKDA.js.map → mcp-ZCRO5DB3.js.map} +0 -0
- /package/dist/chunks/{operator-tools-C57ZIYRG.js.map → operator-tools-23FYQ5OE.js.map} +0 -0
- /package/dist/chunks/{output-schema-IYQRSIUA.js.map → output-schema-RTXHP2NW.js.map} +0 -0
- /package/dist/chunks/{pal-NXMTLY6Z.js.map → pal-AC73MLO6.js.map} +0 -0
- /package/dist/chunks/{providers-TZBRQDXE.js.map → providers-SUXIFNA4.js.map} +0 -0
- /package/dist/chunks/{resident-DBIZBLOV.js.map → resident-VFEZDABF.js.map} +0 -0
- /package/dist/chunks/{resume-GG6RMJXQ.js.map → resume-I3YLV7D3.js.map} +0 -0
- /package/dist/chunks/{resume-command-36S3HXPO.js.map → resume-command-PZ3NLBOR.js.map} +0 -0
- /package/dist/chunks/{schedule-UR54S44B.js.map → schedule-4KYTYQML.js.map} +0 -0
- /package/dist/chunks/{service-VMXEAJCI.js.map → service-NI46RYPW.js.map} +0 -0
- /package/dist/chunks/{session-step-VJCHKPWD.js.map → session-step-IR57BRZX.js.map} +0 -0
- /package/dist/chunks/{skills-RXYS26H3.js.map → skills-OYRPNK3I.js.map} +0 -0
- /package/dist/chunks/{state-NS47IVWW.js.map → state-ULVIHH2M.js.map} +0 -0
- /package/dist/chunks/{store-3U2GZAZS.js.map → store-3LVJZEHS.js.map} +0 -0
- /package/dist/chunks/{store-GNFHH2LZ.js.map → store-EOHDDBM7.js.map} +0 -0
- /package/dist/chunks/{store-TO65IAIZ.js.map → store-W2VNXICH.js.map} +0 -0
- /package/dist/chunks/{worktree-AYI5VJ5H.js.map → worktree-PZU6IAUF.js.map} +0 -0
|
@@ -9342,7 +9342,7 @@ function codeFromMessage(message, status) {
|
|
|
9342
9342
|
// a plain invalid request — which is not retryable, and which the
|
|
9343
9343
|
// overflow rescue tests for by exact equality. The turn died holding
|
|
9344
9344
|
// the remedy.
|
|
9345
|
-
m.includes("too long for") || //
|
|
9345
|
+
m.includes("too long for") || // Known wordings: `context window` and
|
|
9346
9346
|
// `input length and max_tokens exceed context limit` matchers).
|
|
9347
9347
|
// Only where the status cannot say otherwise: a 429, 5xx or 401 that
|
|
9348
9348
|
// mentions the window is still a rate limit, a server fault or an auth
|
|
@@ -9781,14 +9781,14 @@ function revisionFileSegment(value) {
|
|
|
9781
9781
|
return out;
|
|
9782
9782
|
}
|
|
9783
9783
|
__name(revisionFileSegment, "revisionFileSegment");
|
|
9784
|
-
function decodeRevisionFileSegment(
|
|
9785
|
-
if (
|
|
9784
|
+
function decodeRevisionFileSegment(segment2) {
|
|
9785
|
+
if (segment2 === "~empty")
|
|
9786
9786
|
return "";
|
|
9787
|
-
if (
|
|
9787
|
+
if (segment2.length === 0)
|
|
9788
9788
|
return null;
|
|
9789
9789
|
let value = "";
|
|
9790
|
-
for (let i = 0; i <
|
|
9791
|
-
const char =
|
|
9790
|
+
for (let i = 0; i < segment2.length; i++) {
|
|
9791
|
+
const char = segment2[i];
|
|
9792
9792
|
if (char === void 0)
|
|
9793
9793
|
return null;
|
|
9794
9794
|
if (char !== "~") {
|
|
@@ -9797,13 +9797,13 @@ function decodeRevisionFileSegment(segment) {
|
|
|
9797
9797
|
value += char;
|
|
9798
9798
|
continue;
|
|
9799
9799
|
}
|
|
9800
|
-
const escaped =
|
|
9800
|
+
const escaped = segment2.slice(i + 1, i + 5);
|
|
9801
9801
|
if (!/^[0-9a-f]{4}$/u.test(escaped))
|
|
9802
9802
|
return null;
|
|
9803
9803
|
value += String.fromCharCode(Number.parseInt(escaped, 16));
|
|
9804
9804
|
i += 4;
|
|
9805
9805
|
}
|
|
9806
|
-
return revisionFileSegment(value) ===
|
|
9806
|
+
return revisionFileSegment(value) === segment2 ? value : null;
|
|
9807
9807
|
}
|
|
9808
9808
|
__name(decodeRevisionFileSegment, "decodeRevisionFileSegment");
|
|
9809
9809
|
var DiskRevisionRecordStore = class {
|
|
@@ -10379,10 +10379,10 @@ var DiskSessionGoalStore = class extends SessionGoalStoreBase {
|
|
|
10379
10379
|
}
|
|
10380
10380
|
location(sessionId5) {
|
|
10381
10381
|
const root = join4(this.config.rootDir, "goals");
|
|
10382
|
-
const
|
|
10382
|
+
const segment2 = revisionFileSegment(sessionId5);
|
|
10383
10383
|
return {
|
|
10384
|
-
legacyPath: join4(root, `${
|
|
10385
|
-
revisionsDir: join4(root, ".revisions",
|
|
10384
|
+
legacyPath: join4(root, `${segment2}.json`),
|
|
10385
|
+
revisionsDir: join4(root, ".revisions", segment2)
|
|
10386
10386
|
};
|
|
10387
10387
|
}
|
|
10388
10388
|
async put(record3) {
|
|
@@ -14696,6 +14696,61 @@ var InMemorySessionLeaseStore = class {
|
|
|
14696
14696
|
}
|
|
14697
14697
|
};
|
|
14698
14698
|
|
|
14699
|
+
// ../sdk/dist/store/session-log/spilled-input.js
|
|
14700
|
+
var SPILLED_INPUT_KEY = "$spilledInput";
|
|
14701
|
+
var INPUT_PREVIEW_CHARS = 200;
|
|
14702
|
+
function spilledInput(ref, json2) {
|
|
14703
|
+
return { [SPILLED_INPUT_KEY]: ref, preview: json2.slice(0, INPUT_PREVIEW_CHARS) };
|
|
14704
|
+
}
|
|
14705
|
+
__name(spilledInput, "spilledInput");
|
|
14706
|
+
function isSpilledInput(value) {
|
|
14707
|
+
return typeof value === "object" && value !== null && SPILLED_INPUT_KEY in value && typeof value[SPILLED_INPUT_KEY] === "object";
|
|
14708
|
+
}
|
|
14709
|
+
__name(isSpilledInput, "isSpilledInput");
|
|
14710
|
+
function callSlots(calls) {
|
|
14711
|
+
if (!Array.isArray(calls))
|
|
14712
|
+
return [];
|
|
14713
|
+
const slots = [];
|
|
14714
|
+
for (const call2 of calls) {
|
|
14715
|
+
if (typeof call2 === "object" && call2 !== null && "input" in call2) {
|
|
14716
|
+
slots.push({ holder: call2, key: "input" });
|
|
14717
|
+
}
|
|
14718
|
+
}
|
|
14719
|
+
return slots;
|
|
14720
|
+
}
|
|
14721
|
+
__name(callSlots, "callSlots");
|
|
14722
|
+
var TOOL_INPUT_RECORD_TYPES = /* @__PURE__ */ new Set([
|
|
14723
|
+
"tool_review_requested",
|
|
14724
|
+
"decision_requested",
|
|
14725
|
+
"tool_executing",
|
|
14726
|
+
"tool_input_completed"
|
|
14727
|
+
]);
|
|
14728
|
+
function toolInputSlots(record3) {
|
|
14729
|
+
switch (record3.type) {
|
|
14730
|
+
case "tool_review_requested":
|
|
14731
|
+
return callSlots(record3.toolCalls);
|
|
14732
|
+
case "decision_requested": {
|
|
14733
|
+
const request = record3.request;
|
|
14734
|
+
return request ? callSlots(request.toolCalls) : [];
|
|
14735
|
+
}
|
|
14736
|
+
case "tool_executing":
|
|
14737
|
+
case "tool_input_completed":
|
|
14738
|
+
return "input" in record3 ? [{ holder: record3, key: "input" }] : [];
|
|
14739
|
+
default:
|
|
14740
|
+
return [];
|
|
14741
|
+
}
|
|
14742
|
+
}
|
|
14743
|
+
__name(toolInputSlots, "toolInputSlots");
|
|
14744
|
+
async function restoreSpilledRequestInputs(request, read) {
|
|
14745
|
+
for (const { holder, key: key5 } of callSlots(request.toolCalls)) {
|
|
14746
|
+
const value = holder[key5];
|
|
14747
|
+
if (isSpilledInput(value))
|
|
14748
|
+
holder[key5] = JSON.parse(await read(value[SPILLED_INPUT_KEY]));
|
|
14749
|
+
}
|
|
14750
|
+
return request;
|
|
14751
|
+
}
|
|
14752
|
+
__name(restoreSpilledRequestInputs, "restoreSpilledRequestInputs");
|
|
14753
|
+
|
|
14699
14754
|
// ../sdk/dist/store/session-log/core.js
|
|
14700
14755
|
var InvalidSessionRecordError = class extends Error {
|
|
14701
14756
|
static {
|
|
@@ -15015,6 +15070,9 @@ var SessionLogCore = class {
|
|
|
15015
15070
|
async #spillIfLarge(original) {
|
|
15016
15071
|
const candidate = this.#structuredResultSpilling ? await this.#spillStructuredResults(original) : original;
|
|
15017
15072
|
const type = candidate.type;
|
|
15073
|
+
if (typeof type === "string" && TOOL_INPUT_RECORD_TYPES.has(type)) {
|
|
15074
|
+
return this.#spillToolInputs(candidate);
|
|
15075
|
+
}
|
|
15018
15076
|
if (type !== "message" && type !== "message_replaced" && type !== "compaction" && type !== "turn_completed")
|
|
15019
15077
|
return candidate;
|
|
15020
15078
|
const size = Buffer.byteLength(`${JSON.stringify(candidate)}
|
|
@@ -15048,6 +15106,30 @@ var SessionLogCore = class {
|
|
|
15048
15106
|
};
|
|
15049
15107
|
return { ...candidate, content: preview2, spill: ref };
|
|
15050
15108
|
}
|
|
15109
|
+
/**
|
|
15110
|
+
* A record that carries tool inputs and would not fit a line: each large
|
|
15111
|
+
* input goes to `tool-results/` and the record keeps a stand-in, so the
|
|
15112
|
+
* person is still asked and the call is still restored on resume.
|
|
15113
|
+
*/
|
|
15114
|
+
async #spillToolInputs(candidate) {
|
|
15115
|
+
const sizeOf = /* @__PURE__ */ __name((record3) => Buffer.byteLength(`${JSON.stringify(record3)}
|
|
15116
|
+
`, "utf8"), "sizeOf");
|
|
15117
|
+
if (sizeOf(candidate) <= this.#spillAbove)
|
|
15118
|
+
return candidate;
|
|
15119
|
+
const copy = structuredClone(candidate);
|
|
15120
|
+
const slots = toolInputSlots(copy);
|
|
15121
|
+
const bodies = slots.map(({ holder, key: key5 }) => JSON.stringify(holder[key5]) ?? "null");
|
|
15122
|
+
const order = slots.map((_, i) => i).sort((a, b) => bodies[b].length - bodies[a].length);
|
|
15123
|
+
for (const index of order) {
|
|
15124
|
+
const slot = slots[index];
|
|
15125
|
+
const body = bodies[index];
|
|
15126
|
+
const ref = await this.#spills.write(`input:${String(candidate.id)}:${index}`, "text", body);
|
|
15127
|
+
slot.holder[slot.key] = spilledInput(ref, body);
|
|
15128
|
+
if (sizeOf(copy) <= this.#spillAbove)
|
|
15129
|
+
break;
|
|
15130
|
+
}
|
|
15131
|
+
return copy;
|
|
15132
|
+
}
|
|
15051
15133
|
async #spillStructuredResults(candidate) {
|
|
15052
15134
|
const hasCandidate = candidate.type === "tool_completed" && candidate.structuredResultJson !== void 0;
|
|
15053
15135
|
const settlement = candidate.type === "turn_completed" ? candidate.settlement : void 0;
|
|
@@ -15849,8 +15931,8 @@ var OVERFLOW_BODY_PATTERNS = [
|
|
|
15849
15931
|
// length" — so a pattern anchored on "exceeded" misses it entirely.
|
|
15850
15932
|
/exceeds?\s+(?:the\s+)?(?:model'?s?\s+)?context\s+(?:length|window|size)/i,
|
|
15851
15933
|
/context\s+(?:length|window|size)\s+exceed/i,
|
|
15852
|
-
// The
|
|
15853
|
-
// window". Here it must sit next to a verb that says the request did not
|
|
15934
|
+
// The bare phrase "context
|
|
15935
|
+
// window" is too broad on its own. Here it must sit next to a verb that says the request did not
|
|
15854
15936
|
// fit ("larger than the model context window of N tokens"), so a 400 that
|
|
15855
15937
|
// only names the window ("does not support this parameter with the 1M
|
|
15856
15938
|
// context window beta") stays an invalid request. The same pattern lives in
|
|
@@ -23111,8 +23193,8 @@ var FILE_NAMES = new Set(PROTECTED_FILE_NAMES.map(fold));
|
|
|
23111
23193
|
var NESTED = PROTECTED_NESTED_DIRECTORIES.map((sequence) => sequence.map(fold));
|
|
23112
23194
|
function isProtectedPath(path2) {
|
|
23113
23195
|
const segments = path2.split(/[\\/]+/).map(fold);
|
|
23114
|
-
for (const
|
|
23115
|
-
if (DIRECTORIES.has(
|
|
23196
|
+
for (const segment2 of segments) {
|
|
23197
|
+
if (DIRECTORIES.has(segment2))
|
|
23116
23198
|
return true;
|
|
23117
23199
|
}
|
|
23118
23200
|
for (const sequence of NESTED) {
|
|
@@ -23345,10 +23427,10 @@ function checkTarget(program, args, spelled, word2, scope) {
|
|
|
23345
23427
|
__name(checkTarget, "checkTarget");
|
|
23346
23428
|
function hasParentAfterName(path2) {
|
|
23347
23429
|
let named = false;
|
|
23348
|
-
for (const
|
|
23349
|
-
if (
|
|
23430
|
+
for (const segment2 of path2.split(/[\\/]+/)) {
|
|
23431
|
+
if (segment2 === "" || segment2 === ".")
|
|
23350
23432
|
continue;
|
|
23351
|
-
if (
|
|
23433
|
+
if (segment2 === "..") {
|
|
23352
23434
|
if (named)
|
|
23353
23435
|
return true;
|
|
23354
23436
|
} else
|
|
@@ -26011,6 +26093,298 @@ var Diff = class {
|
|
|
26011
26093
|
}
|
|
26012
26094
|
};
|
|
26013
26095
|
|
|
26096
|
+
// ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/util/string.js
|
|
26097
|
+
function longestCommonPrefix(str1, str2) {
|
|
26098
|
+
let i;
|
|
26099
|
+
for (i = 0; i < str1.length && i < str2.length; i++) {
|
|
26100
|
+
if (str1[i] != str2[i]) {
|
|
26101
|
+
return str1.slice(0, i);
|
|
26102
|
+
}
|
|
26103
|
+
}
|
|
26104
|
+
return str1.slice(0, i);
|
|
26105
|
+
}
|
|
26106
|
+
__name(longestCommonPrefix, "longestCommonPrefix");
|
|
26107
|
+
function longestCommonSuffix(str1, str2) {
|
|
26108
|
+
let i;
|
|
26109
|
+
if (!str1 || !str2 || str1[str1.length - 1] != str2[str2.length - 1]) {
|
|
26110
|
+
return "";
|
|
26111
|
+
}
|
|
26112
|
+
for (i = 0; i < str1.length && i < str2.length; i++) {
|
|
26113
|
+
if (str1[str1.length - (i + 1)] != str2[str2.length - (i + 1)]) {
|
|
26114
|
+
return str1.slice(-i);
|
|
26115
|
+
}
|
|
26116
|
+
}
|
|
26117
|
+
return str1.slice(-i);
|
|
26118
|
+
}
|
|
26119
|
+
__name(longestCommonSuffix, "longestCommonSuffix");
|
|
26120
|
+
function replacePrefix(string, oldPrefix, newPrefix) {
|
|
26121
|
+
if (string.slice(0, oldPrefix.length) != oldPrefix) {
|
|
26122
|
+
throw Error(`string ${JSON.stringify(string)} doesn't start with prefix ${JSON.stringify(oldPrefix)}; this is a bug`);
|
|
26123
|
+
}
|
|
26124
|
+
return newPrefix + string.slice(oldPrefix.length);
|
|
26125
|
+
}
|
|
26126
|
+
__name(replacePrefix, "replacePrefix");
|
|
26127
|
+
function replaceSuffix(string, oldSuffix, newSuffix) {
|
|
26128
|
+
if (!oldSuffix) {
|
|
26129
|
+
return string + newSuffix;
|
|
26130
|
+
}
|
|
26131
|
+
if (string.slice(-oldSuffix.length) != oldSuffix) {
|
|
26132
|
+
throw Error(`string ${JSON.stringify(string)} doesn't end with suffix ${JSON.stringify(oldSuffix)}; this is a bug`);
|
|
26133
|
+
}
|
|
26134
|
+
return string.slice(0, -oldSuffix.length) + newSuffix;
|
|
26135
|
+
}
|
|
26136
|
+
__name(replaceSuffix, "replaceSuffix");
|
|
26137
|
+
function removePrefix(string, oldPrefix) {
|
|
26138
|
+
return replacePrefix(string, oldPrefix, "");
|
|
26139
|
+
}
|
|
26140
|
+
__name(removePrefix, "removePrefix");
|
|
26141
|
+
function removeSuffix(string, oldSuffix) {
|
|
26142
|
+
return replaceSuffix(string, oldSuffix, "");
|
|
26143
|
+
}
|
|
26144
|
+
__name(removeSuffix, "removeSuffix");
|
|
26145
|
+
function maximumOverlap(string1, string2) {
|
|
26146
|
+
return string2.slice(0, overlapCount(string1, string2));
|
|
26147
|
+
}
|
|
26148
|
+
__name(maximumOverlap, "maximumOverlap");
|
|
26149
|
+
function overlapCount(a, b) {
|
|
26150
|
+
let startA = 0;
|
|
26151
|
+
if (a.length > b.length) {
|
|
26152
|
+
startA = a.length - b.length;
|
|
26153
|
+
}
|
|
26154
|
+
let endB = b.length;
|
|
26155
|
+
if (a.length < b.length) {
|
|
26156
|
+
endB = a.length;
|
|
26157
|
+
}
|
|
26158
|
+
const map = Array(endB);
|
|
26159
|
+
let k = 0;
|
|
26160
|
+
map[0] = 0;
|
|
26161
|
+
for (let j = 1; j < endB; j++) {
|
|
26162
|
+
if (b[j] == b[k]) {
|
|
26163
|
+
map[j] = map[k];
|
|
26164
|
+
} else {
|
|
26165
|
+
map[j] = k;
|
|
26166
|
+
}
|
|
26167
|
+
while (k > 0 && b[j] != b[k]) {
|
|
26168
|
+
k = map[k];
|
|
26169
|
+
}
|
|
26170
|
+
if (b[j] == b[k]) {
|
|
26171
|
+
k++;
|
|
26172
|
+
}
|
|
26173
|
+
}
|
|
26174
|
+
k = 0;
|
|
26175
|
+
for (let i = startA; i < a.length; i++) {
|
|
26176
|
+
while (k > 0 && a[i] != b[k]) {
|
|
26177
|
+
k = map[k];
|
|
26178
|
+
}
|
|
26179
|
+
if (a[i] == b[k]) {
|
|
26180
|
+
k++;
|
|
26181
|
+
}
|
|
26182
|
+
}
|
|
26183
|
+
return k;
|
|
26184
|
+
}
|
|
26185
|
+
__name(overlapCount, "overlapCount");
|
|
26186
|
+
function segment(string, segmenter) {
|
|
26187
|
+
const parts = [];
|
|
26188
|
+
for (const segmentObj of Array.from(segmenter.segment(string))) {
|
|
26189
|
+
const segment2 = segmentObj.segment;
|
|
26190
|
+
if (parts.length && /\s/.test(parts[parts.length - 1]) && /\s/.test(segment2)) {
|
|
26191
|
+
parts[parts.length - 1] += segment2;
|
|
26192
|
+
} else {
|
|
26193
|
+
parts.push(segment2);
|
|
26194
|
+
}
|
|
26195
|
+
}
|
|
26196
|
+
return parts;
|
|
26197
|
+
}
|
|
26198
|
+
__name(segment, "segment");
|
|
26199
|
+
function trailingWs(string, segmenter) {
|
|
26200
|
+
if (segmenter) {
|
|
26201
|
+
return leadingAndTrailingWs(string, segmenter)[1];
|
|
26202
|
+
}
|
|
26203
|
+
let i;
|
|
26204
|
+
for (i = string.length - 1; i >= 0; i--) {
|
|
26205
|
+
if (!string[i].match(/\s/)) {
|
|
26206
|
+
break;
|
|
26207
|
+
}
|
|
26208
|
+
}
|
|
26209
|
+
return string.substring(i + 1);
|
|
26210
|
+
}
|
|
26211
|
+
__name(trailingWs, "trailingWs");
|
|
26212
|
+
function leadingWs(string, segmenter) {
|
|
26213
|
+
if (segmenter) {
|
|
26214
|
+
return leadingAndTrailingWs(string, segmenter)[0];
|
|
26215
|
+
}
|
|
26216
|
+
const match2 = string.match(/^\s*/);
|
|
26217
|
+
return match2 ? match2[0] : "";
|
|
26218
|
+
}
|
|
26219
|
+
__name(leadingWs, "leadingWs");
|
|
26220
|
+
function leadingAndTrailingWs(string, segmenter) {
|
|
26221
|
+
if (!segmenter) {
|
|
26222
|
+
return [leadingWs(string), trailingWs(string)];
|
|
26223
|
+
}
|
|
26224
|
+
if (segmenter.resolvedOptions().granularity != "word") {
|
|
26225
|
+
throw new Error('The segmenter passed must have a granularity of "word"');
|
|
26226
|
+
}
|
|
26227
|
+
const segments = segment(string, segmenter);
|
|
26228
|
+
const firstSeg = segments[0];
|
|
26229
|
+
const lastSeg = segments[segments.length - 1];
|
|
26230
|
+
const head2 = /\s/.test(firstSeg) ? firstSeg : "";
|
|
26231
|
+
const tail = /\s/.test(lastSeg) ? lastSeg : "";
|
|
26232
|
+
return [head2, tail];
|
|
26233
|
+
}
|
|
26234
|
+
__name(leadingAndTrailingWs, "leadingAndTrailingWs");
|
|
26235
|
+
|
|
26236
|
+
// ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/word.js
|
|
26237
|
+
var extendedWordChars = "a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";
|
|
26238
|
+
var tokenizeIncludingWhitespace = new RegExp(`[${extendedWordChars}]+|\\s+|[^${extendedWordChars}]`, "ug");
|
|
26239
|
+
var WordDiff = class extends Diff {
|
|
26240
|
+
static {
|
|
26241
|
+
__name(this, "WordDiff");
|
|
26242
|
+
}
|
|
26243
|
+
equals(left, right, options) {
|
|
26244
|
+
if (options.ignoreCase) {
|
|
26245
|
+
left = left.toLowerCase();
|
|
26246
|
+
right = right.toLowerCase();
|
|
26247
|
+
}
|
|
26248
|
+
return left.trim() === right.trim();
|
|
26249
|
+
}
|
|
26250
|
+
tokenize(value, options = {}) {
|
|
26251
|
+
let parts;
|
|
26252
|
+
if (options.intlSegmenter) {
|
|
26253
|
+
const segmenter = options.intlSegmenter;
|
|
26254
|
+
if (segmenter.resolvedOptions().granularity != "word") {
|
|
26255
|
+
throw new Error('The segmenter passed must have a granularity of "word"');
|
|
26256
|
+
}
|
|
26257
|
+
parts = segment(value, segmenter);
|
|
26258
|
+
} else {
|
|
26259
|
+
parts = value.match(tokenizeIncludingWhitespace) || [];
|
|
26260
|
+
}
|
|
26261
|
+
const tokens = [];
|
|
26262
|
+
let prevPart = null;
|
|
26263
|
+
parts.forEach((part2) => {
|
|
26264
|
+
if (/\s/.test(part2)) {
|
|
26265
|
+
if (prevPart == null) {
|
|
26266
|
+
tokens.push(part2);
|
|
26267
|
+
} else {
|
|
26268
|
+
tokens.push(tokens.pop() + part2);
|
|
26269
|
+
}
|
|
26270
|
+
} else if (prevPart != null && /\s/.test(prevPart)) {
|
|
26271
|
+
if (tokens[tokens.length - 1] == prevPart) {
|
|
26272
|
+
tokens.push(tokens.pop() + part2);
|
|
26273
|
+
} else {
|
|
26274
|
+
tokens.push(prevPart + part2);
|
|
26275
|
+
}
|
|
26276
|
+
} else {
|
|
26277
|
+
tokens.push(part2);
|
|
26278
|
+
}
|
|
26279
|
+
prevPart = part2;
|
|
26280
|
+
});
|
|
26281
|
+
return tokens;
|
|
26282
|
+
}
|
|
26283
|
+
join(tokens) {
|
|
26284
|
+
return tokens.map((token, i) => {
|
|
26285
|
+
if (i == 0) {
|
|
26286
|
+
return token;
|
|
26287
|
+
} else {
|
|
26288
|
+
return token.replace(/^\s+/, "");
|
|
26289
|
+
}
|
|
26290
|
+
}).join("");
|
|
26291
|
+
}
|
|
26292
|
+
postProcess(changes, options) {
|
|
26293
|
+
if (!changes || options.oneChangePerToken) {
|
|
26294
|
+
return changes;
|
|
26295
|
+
}
|
|
26296
|
+
let lastKeep = null;
|
|
26297
|
+
let insertion = null;
|
|
26298
|
+
let deletion = null;
|
|
26299
|
+
changes.forEach((change) => {
|
|
26300
|
+
if (change.added) {
|
|
26301
|
+
insertion = change;
|
|
26302
|
+
} else if (change.removed) {
|
|
26303
|
+
deletion = change;
|
|
26304
|
+
} else {
|
|
26305
|
+
if (insertion || deletion) {
|
|
26306
|
+
dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, change, options.intlSegmenter);
|
|
26307
|
+
}
|
|
26308
|
+
lastKeep = change;
|
|
26309
|
+
insertion = null;
|
|
26310
|
+
deletion = null;
|
|
26311
|
+
}
|
|
26312
|
+
});
|
|
26313
|
+
if (insertion || deletion) {
|
|
26314
|
+
dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, null, options.intlSegmenter);
|
|
26315
|
+
}
|
|
26316
|
+
return changes;
|
|
26317
|
+
}
|
|
26318
|
+
};
|
|
26319
|
+
var wordDiff = new WordDiff();
|
|
26320
|
+
function diffWords(oldStr, newStr, options) {
|
|
26321
|
+
if ((options === null || options === void 0 ? void 0 : options.ignoreWhitespace) != null && !options.ignoreWhitespace) {
|
|
26322
|
+
return diffWordsWithSpace(oldStr, newStr, options);
|
|
26323
|
+
}
|
|
26324
|
+
return wordDiff.diff(oldStr, newStr, options);
|
|
26325
|
+
}
|
|
26326
|
+
__name(diffWords, "diffWords");
|
|
26327
|
+
function dedupeWhitespaceInChangeObjects(startKeep, deletion, insertion, endKeep, segmenter) {
|
|
26328
|
+
if (deletion && insertion) {
|
|
26329
|
+
const [oldWsPrefix, oldWsSuffix] = leadingAndTrailingWs(deletion.value, segmenter);
|
|
26330
|
+
const [newWsPrefix, newWsSuffix] = leadingAndTrailingWs(insertion.value, segmenter);
|
|
26331
|
+
if (startKeep) {
|
|
26332
|
+
const commonWsPrefix = longestCommonPrefix(oldWsPrefix, newWsPrefix);
|
|
26333
|
+
startKeep.value = replaceSuffix(startKeep.value, newWsPrefix, commonWsPrefix);
|
|
26334
|
+
deletion.value = removePrefix(deletion.value, commonWsPrefix);
|
|
26335
|
+
insertion.value = removePrefix(insertion.value, commonWsPrefix);
|
|
26336
|
+
}
|
|
26337
|
+
if (endKeep) {
|
|
26338
|
+
const commonWsSuffix = longestCommonSuffix(oldWsSuffix, newWsSuffix);
|
|
26339
|
+
endKeep.value = replacePrefix(endKeep.value, newWsSuffix, commonWsSuffix);
|
|
26340
|
+
deletion.value = removeSuffix(deletion.value, commonWsSuffix);
|
|
26341
|
+
insertion.value = removeSuffix(insertion.value, commonWsSuffix);
|
|
26342
|
+
}
|
|
26343
|
+
} else if (insertion) {
|
|
26344
|
+
if (startKeep) {
|
|
26345
|
+
const ws = leadingWs(insertion.value, segmenter);
|
|
26346
|
+
insertion.value = insertion.value.substring(ws.length);
|
|
26347
|
+
}
|
|
26348
|
+
if (endKeep) {
|
|
26349
|
+
const ws = leadingWs(endKeep.value, segmenter);
|
|
26350
|
+
endKeep.value = endKeep.value.substring(ws.length);
|
|
26351
|
+
}
|
|
26352
|
+
} else if (startKeep && endKeep) {
|
|
26353
|
+
const newWsFull = leadingWs(endKeep.value, segmenter), [delWsStart, delWsEnd] = leadingAndTrailingWs(deletion.value, segmenter);
|
|
26354
|
+
const newWsStart = longestCommonPrefix(newWsFull, delWsStart);
|
|
26355
|
+
deletion.value = removePrefix(deletion.value, newWsStart);
|
|
26356
|
+
const newWsEnd = longestCommonSuffix(removePrefix(newWsFull, newWsStart), delWsEnd);
|
|
26357
|
+
deletion.value = removeSuffix(deletion.value, newWsEnd);
|
|
26358
|
+
endKeep.value = replacePrefix(endKeep.value, newWsFull, newWsEnd);
|
|
26359
|
+
startKeep.value = replaceSuffix(startKeep.value, newWsFull, newWsFull.slice(0, newWsFull.length - newWsEnd.length));
|
|
26360
|
+
} else if (endKeep) {
|
|
26361
|
+
const endKeepWsPrefix = leadingWs(endKeep.value, segmenter);
|
|
26362
|
+
const deletionWsSuffix = trailingWs(deletion.value, segmenter);
|
|
26363
|
+
const overlap = maximumOverlap(deletionWsSuffix, endKeepWsPrefix);
|
|
26364
|
+
deletion.value = removeSuffix(deletion.value, overlap);
|
|
26365
|
+
} else if (startKeep) {
|
|
26366
|
+
const startKeepWsSuffix = trailingWs(startKeep.value, segmenter);
|
|
26367
|
+
const deletionWsPrefix = leadingWs(deletion.value, segmenter);
|
|
26368
|
+
const overlap = maximumOverlap(startKeepWsSuffix, deletionWsPrefix);
|
|
26369
|
+
deletion.value = removePrefix(deletion.value, overlap);
|
|
26370
|
+
}
|
|
26371
|
+
}
|
|
26372
|
+
__name(dedupeWhitespaceInChangeObjects, "dedupeWhitespaceInChangeObjects");
|
|
26373
|
+
var WordsWithSpaceDiff = class extends Diff {
|
|
26374
|
+
static {
|
|
26375
|
+
__name(this, "WordsWithSpaceDiff");
|
|
26376
|
+
}
|
|
26377
|
+
tokenize(value) {
|
|
26378
|
+
const regex = new RegExp(`(\\r?\\n)|[${extendedWordChars}]+|[^\\S\\n\\r]+|[^${extendedWordChars}]`, "ug");
|
|
26379
|
+
return value.match(regex) || [];
|
|
26380
|
+
}
|
|
26381
|
+
};
|
|
26382
|
+
var wordsWithSpaceDiff = new WordsWithSpaceDiff();
|
|
26383
|
+
function diffWordsWithSpace(oldStr, newStr, options) {
|
|
26384
|
+
return wordsWithSpaceDiff.diff(oldStr, newStr, options);
|
|
26385
|
+
}
|
|
26386
|
+
__name(diffWordsWithSpace, "diffWordsWithSpace");
|
|
26387
|
+
|
|
26014
26388
|
// ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/line.js
|
|
26015
26389
|
var LineDiff = class extends Diff {
|
|
26016
26390
|
static {
|
|
@@ -28833,7 +29207,7 @@ function evaluateRule(rule, toolName, toolInput, toolDef, compiledPattern, nameS
|
|
|
28833
29207
|
if (rule.decision === "deny" || rule.decision === "review") {
|
|
28834
29208
|
if (compiledPattern.test(subject))
|
|
28835
29209
|
return rule.decision;
|
|
28836
|
-
if (segments.some((
|
|
29210
|
+
if (segments.some((segment2) => compiledPattern.test(segment2)))
|
|
28837
29211
|
return rule.decision;
|
|
28838
29212
|
if (isUrl)
|
|
28839
29213
|
return null;
|
|
@@ -28841,7 +29215,7 @@ function evaluateRule(rule, toolName, toolInput, toolDef, compiledPattern, nameS
|
|
|
28841
29215
|
}
|
|
28842
29216
|
if (opaque2)
|
|
28843
29217
|
return null;
|
|
28844
|
-
return segments.every((
|
|
29218
|
+
return segments.every((segment2) => compiledPattern.test(segment2)) ? "allow" : null;
|
|
28845
29219
|
}
|
|
28846
29220
|
case "allow_by_tier": {
|
|
28847
29221
|
if (toolDef?.tier && rule.tiers.includes(toolDef.tier)) {
|
|
@@ -32989,7 +33363,8 @@ async function readParks(log, options = {}) {
|
|
|
32989
33363
|
decisionId: r.decisionId,
|
|
32990
33364
|
turnId: r.turnId,
|
|
32991
33365
|
checkpointId: r.checkpointId,
|
|
32992
|
-
|
|
33366
|
+
// A call input too large for a line was spilled; put it back.
|
|
33367
|
+
request: await restoreSpilledRequestInputs(structuredClone(r.request), (ref) => log.readSpill(ref)),
|
|
32993
33368
|
parkedAt: Date.parse(r.ts),
|
|
32994
33369
|
...r.deadlineAt !== void 0 ? { deadlineAt: Date.parse(r.deadlineAt) } : {}
|
|
32995
33370
|
});
|
|
@@ -34029,9 +34404,20 @@ var CompletionInbox = class {
|
|
|
34029
34404
|
* `log` is optional and unresolved until it is actually needed (the
|
|
34030
34405
|
* eviction-warning path in `hold()`), same reason as `LocalTaskScheduler`.
|
|
34031
34406
|
*/
|
|
34032
|
-
constructor(log) {
|
|
34407
|
+
constructor(log, options = {}) {
|
|
34033
34408
|
this.log = log;
|
|
34409
|
+
this.holdsTurnOpen = options.holdsTurnOpen !== false;
|
|
34034
34410
|
}
|
|
34411
|
+
/**
|
|
34412
|
+
* Whether a turn about to end waits here for the tasks still running.
|
|
34413
|
+
*
|
|
34414
|
+
* `true` (the default) is the original contract: the turn parks at its settle
|
|
34415
|
+
* point until the tasks it launched report back, so their results enter the
|
|
34416
|
+
* same turn. `false` lets the turn end with them still running; the host owns
|
|
34417
|
+
* their completion from then on (it keeps them alive and wakes the model when
|
|
34418
|
+
* they end). Completions that have already arrived are delivered either way.
|
|
34419
|
+
*/
|
|
34420
|
+
holdsTurnOpen;
|
|
34035
34421
|
/**
|
|
34036
34422
|
* Start listening.
|
|
34037
34423
|
*
|
|
@@ -34207,6 +34593,14 @@ var CompletionInbox = class {
|
|
|
34207
34593
|
get hasPendingWork() {
|
|
34208
34594
|
return this.unheard.size > 0 || this.outstanding.size > 0;
|
|
34209
34595
|
}
|
|
34596
|
+
/**
|
|
34597
|
+
* Whether the turn has a reason to wait at its settle point: anything
|
|
34598
|
+
* pending when it {@link holdsTurnOpen}, else only a completion already in
|
|
34599
|
+
* hand (waiting for its persistence gate).
|
|
34600
|
+
*/
|
|
34601
|
+
get holdsTurn() {
|
|
34602
|
+
return this.holdsTurnOpen ? this.hasPendingWork : this.unheard.size > 0;
|
|
34603
|
+
}
|
|
34210
34604
|
/**
|
|
34211
34605
|
* Wait for the next completion, deadline or abort, whichever comes first.
|
|
34212
34606
|
* Aborting releases only this waiter; work and undelivered results remain owned.
|
|
@@ -35093,7 +35487,7 @@ function awaitedJobGraceMs(remainingBeforeFinalizeMs) {
|
|
|
35093
35487
|
}
|
|
35094
35488
|
__name(awaitedJobGraceMs, "awaitedJobGraceMs");
|
|
35095
35489
|
async function* holdForOutstandingWork(ctx, iterationNum, hasToolCalls2, deliverInbound) {
|
|
35096
|
-
const inbox = ctx.completionInbox?.
|
|
35490
|
+
const inbox = ctx.completionInbox?.holdsTurn ? ctx.completionInbox : void 0;
|
|
35097
35491
|
const jobs = ctx.awaitedJobs?.hasPendingWork ? ctx.awaitedJobs : void 0;
|
|
35098
35492
|
if (!inbox && !jobs)
|
|
35099
35493
|
return false;
|
|
@@ -35218,7 +35612,12 @@ function settleOutstandingWork(ctx) {
|
|
|
35218
35612
|
__name(settleOutstandingWork, "settleOutstandingWork");
|
|
35219
35613
|
function recordAbandonedWork(ctx) {
|
|
35220
35614
|
const abandoned = ctx.completionInbox?.outstandingTaskIds ?? [];
|
|
35221
|
-
if (abandoned.length > 0) {
|
|
35615
|
+
if (abandoned.length > 0 && ctx.completionInbox?.holdsTurnOpen === false) {
|
|
35616
|
+
ctx.log.info("Turn ended with delegated work left running in the background", {
|
|
35617
|
+
[NAMZU.TURN_ID]: ctx.recorder.turnId,
|
|
35618
|
+
"namzu.runtime.tasks": abandoned
|
|
35619
|
+
});
|
|
35620
|
+
} else if (abandoned.length > 0) {
|
|
35222
35621
|
ctx.log.warn("Turn ended with delegated work still running", {
|
|
35223
35622
|
[NAMZU.TURN_ID]: ctx.recorder.turnId,
|
|
35224
35623
|
"namzu.runtime.tasks": abandoned
|
|
@@ -35357,11 +35756,11 @@ function tokenize2(text9) {
|
|
|
35357
35756
|
out.push(whole);
|
|
35358
35757
|
const segments = raw.split(/[/\\.:\-]+/).filter((s) => s.length > 0);
|
|
35359
35758
|
if (segments.length > 1) {
|
|
35360
|
-
for (const
|
|
35361
|
-
const lower =
|
|
35759
|
+
for (const segment2 of segments) {
|
|
35760
|
+
const lower = segment2.toLowerCase();
|
|
35362
35761
|
if (!STOP_WORDS.has(lower) && lower !== whole)
|
|
35363
35762
|
out.push(lower);
|
|
35364
|
-
for (const part2 of splitIdentifier(
|
|
35763
|
+
for (const part2 of splitIdentifier(segment2))
|
|
35365
35764
|
out.push(part2.toLowerCase());
|
|
35366
35765
|
}
|
|
35367
35766
|
} else {
|
|
@@ -57457,8 +57856,8 @@ var DiskMessageFeedbackStore = class {
|
|
|
57457
57856
|
}
|
|
57458
57857
|
ids.set(messageId4, messageId4);
|
|
57459
57858
|
}
|
|
57460
|
-
for (const
|
|
57461
|
-
const decoded = decodeRevisionFileSegment(
|
|
57859
|
+
for (const segment2 of await records2.scanNames(this.revisionsDir(sessionId5), "")) {
|
|
57860
|
+
const decoded = decodeRevisionFileSegment(segment2);
|
|
57462
57861
|
if (decoded === null)
|
|
57463
57862
|
continue;
|
|
57464
57863
|
const messageId4 = asMessageId(decoded);
|
|
@@ -61741,7 +62140,7 @@ async function resolveMcpEra(input) {
|
|
|
61741
62140
|
__name(resolveMcpEra, "resolveMcpEra");
|
|
61742
62141
|
|
|
61743
62142
|
// ../sdk/dist/version.js
|
|
61744
|
-
var VERSION2 = "
|
|
62143
|
+
var VERSION2 = "53.1.0";
|
|
61745
62144
|
|
|
61746
62145
|
// ../sdk/dist/connector/mcp/client.js
|
|
61747
62146
|
var MAX_LIST_PAGES = 100;
|
|
@@ -64915,8 +65314,6 @@ var PLAN_MODE_DOCTRINE = `## Plan mode
|
|
|
64915
65314
|
You are in plan mode. Read, search and think; do not change anything. \`read\`, \`grep\`, \`glob\` and the other read-only tools work as usual, and you may keep a task list. Any \`edit\`, \`write\` or shell command that changes state will be refused, so do not attempt one.
|
|
64916
65315
|
|
|
64917
65316
|
When you have understood the task, reply with the plan: what you would change, in which files, in what order, and what you would verify. Be concrete \u2014 name files and functions \u2014 and short enough to read in one screen. Then stop and wait; the user will leave plan mode to have the plan carried out, and that switch is their approval.`;
|
|
64918
|
-
var CODING_AGENT_HYPERMODE_DOCTRINE = `### Hypermode
|
|
64919
|
-
This session has hypermode on: treat delegation through \`Agent\` as the default for substantive work, not the exception. Before doing multi-step work yourself, ask whether an independent piece of it \u2014 a lookup, a draft, a check \u2014 could run as its own delegation, and prefer delegating it when the answer is yes. This changes only how eagerly you reach for \`Agent\` on work you would otherwise do inline; it does not mount a roster or start any delegation by itself. Agents in the same phase are launched in the same response, each with \`run_in_background: true\` when you mean to wait for them together; a phase is never started one agent at a time.`;
|
|
64920
65317
|
|
|
64921
65318
|
// ../sdk/dist/manager/resident/learning.js
|
|
64922
65319
|
import { createHash as createHash23 } from "node:crypto";
|
|
@@ -70148,6 +70545,15 @@ var PRELUDE_SOURCE = String.raw`(function (config) {
|
|
|
70148
70545
|
if (t === 'object') return typeof value.then === 'function' ? 'a promise' : 'an object';
|
|
70149
70546
|
return 'a ' + t;
|
|
70150
70547
|
}
|
|
70548
|
+
function overBudget() {
|
|
70549
|
+
return config.tokenLimit !== null && config.tokenLimit > 0 && spent.tokensUsed >= config.tokenLimit;
|
|
70550
|
+
}
|
|
70551
|
+
function budgetError() {
|
|
70552
|
+
var e = new Error('Workflow token budget exceeded (' + spent.tokensUsed.toLocaleString('en-US') + ' / ' + config.tokenLimit.toLocaleString('en-US') + ' output tokens). Stopping further agent() calls. Agents already running will finish and their results are kept.');
|
|
70553
|
+
e.name = 'WorkflowBudgetExceededError';
|
|
70554
|
+
return e;
|
|
70555
|
+
}
|
|
70556
|
+
function isBudgetError(e) { return !!e && e.name === 'WorkflowBudgetExceededError'; }
|
|
70151
70557
|
async function agent(prompt, opts) {
|
|
70152
70558
|
if (typeof prompt !== 'string' || prompt.length === 0) {
|
|
70153
70559
|
throw new TypeError('agent(prompt, options?): the prompt must be a non-empty string, got ' + kind(prompt));
|
|
@@ -70156,6 +70562,7 @@ var PRELUDE_SOURCE = String.raw`(function (config) {
|
|
|
70156
70562
|
if (typeof o !== 'object' || Array.isArray(o)) {
|
|
70157
70563
|
throw new TypeError('agent(prompt, options?): options must be an object, got ' + kind(o));
|
|
70158
70564
|
}
|
|
70565
|
+
if (overBudget()) throw budgetError();
|
|
70159
70566
|
var request = { prompt: prompt, cursor: cursor };
|
|
70160
70567
|
if (o.label != null) request.label = clean(o.label, 120);
|
|
70161
70568
|
if (o.phase != null) request.phase = clean(o.phase, 120);
|
|
@@ -70176,12 +70583,16 @@ var PRELUDE_SOURCE = String.raw`(function (config) {
|
|
|
70176
70583
|
throw new TypeError('parallel(thunks): item ' + (p + 1) + ' must be a function (wrap the work as () => agent(...)), got ' + kind(thunks[p]));
|
|
70177
70584
|
}
|
|
70178
70585
|
}
|
|
70179
|
-
|
|
70586
|
+
var dropped = 0;
|
|
70587
|
+
var results = await Promise.all(thunks.map(function (t, n) {
|
|
70180
70588
|
return Promise.resolve().then(t).catch(function (e) {
|
|
70181
|
-
|
|
70589
|
+
if (isBudgetError(e)) { dropped++; return null; }
|
|
70590
|
+
log('Step ' + (n + 1) + ' stopped: ' + clean(e && e.message ? e.message : e, 300));
|
|
70182
70591
|
return null;
|
|
70183
70592
|
});
|
|
70184
70593
|
}));
|
|
70594
|
+
if (dropped > 0) log('parallel: ' + dropped + (dropped === 1 ? ' item' : ' items') + ' dropped because the token budget is spent.');
|
|
70595
|
+
return results;
|
|
70185
70596
|
}
|
|
70186
70597
|
async function pipeline(items) {
|
|
70187
70598
|
if (!Array.isArray(items)) {
|
|
@@ -70193,21 +70604,31 @@ var PRELUDE_SOURCE = String.raw`(function (config) {
|
|
|
70193
70604
|
throw new TypeError('pipeline(items, ...stages): stage ' + (s + 1) + ' must be a function, got ' + kind(stages[s]));
|
|
70194
70605
|
}
|
|
70195
70606
|
}
|
|
70196
|
-
|
|
70607
|
+
if (items.length > 0 && overBudget()) throw budgetError();
|
|
70608
|
+
var dropped = 0;
|
|
70609
|
+
var results = await Promise.all(items.map(async function (item, index) {
|
|
70197
70610
|
var value = item;
|
|
70198
70611
|
for (var i = 0; i < stages.length; i++) {
|
|
70199
70612
|
try {
|
|
70200
|
-
value = await stages[i](value,
|
|
70613
|
+
value = await stages[i](value, item, index);
|
|
70201
70614
|
} catch (e) {
|
|
70202
|
-
|
|
70615
|
+
if (isBudgetError(e)) { dropped++; return null; }
|
|
70616
|
+
log('Item ' + (index + 1) + ' stopped at step ' + (i + 1) + ': ' + clean(e && e.message ? e.message : e, 300));
|
|
70203
70617
|
return null;
|
|
70204
70618
|
}
|
|
70205
70619
|
if (value === null || value === undefined) return null;
|
|
70206
70620
|
}
|
|
70207
70621
|
return value;
|
|
70208
70622
|
}));
|
|
70623
|
+
if (dropped > 0) log('pipeline: ' + dropped + (dropped === 1 ? ' item' : ' items') + ' dropped because the token budget is spent.');
|
|
70624
|
+
return results;
|
|
70209
70625
|
}
|
|
70210
70626
|
var budget = Object.freeze({
|
|
70627
|
+
get total() { return config.tokenLimit; },
|
|
70628
|
+
spent: function () { return spent.tokensUsed; },
|
|
70629
|
+
remaining: function () {
|
|
70630
|
+
return config.tokenLimit === null ? Infinity : Math.max(0, config.tokenLimit - spent.tokensUsed);
|
|
70631
|
+
},
|
|
70211
70632
|
get tokensUsed() { return spent.tokensUsed; },
|
|
70212
70633
|
get tokenLimit() { return config.tokenLimit === null ? undefined : config.tokenLimit; },
|
|
70213
70634
|
});
|
|
@@ -70386,6 +70807,11 @@ var AGENT_CALL_KEYS = /* @__PURE__ */ new Set([
|
|
|
70386
70807
|
"model",
|
|
70387
70808
|
"effort"
|
|
70388
70809
|
]);
|
|
70810
|
+
function defaultAgentLabel(prompt, index) {
|
|
70811
|
+
const label5 = prompt.slice(0, 60).replace(/\s+/g, " ").trim();
|
|
70812
|
+
return label5.length > 0 ? label5 : `Agent ${index}`;
|
|
70813
|
+
}
|
|
70814
|
+
__name(defaultAgentLabel, "defaultAgentLabel");
|
|
70389
70815
|
function integer4(name2, value, min, max) {
|
|
70390
70816
|
if (!Number.isSafeInteger(value) || value < min || value > max) {
|
|
70391
70817
|
throw new RangeError(`${name2} must be an integer between ${min} and ${max}.`);
|
|
@@ -70394,10 +70820,10 @@ function integer4(name2, value, min, max) {
|
|
|
70394
70820
|
}
|
|
70395
70821
|
__name(integer4, "integer");
|
|
70396
70822
|
function resolveWorkflowLimits(limits = {}) {
|
|
70397
|
-
const defaultConcurrency = Math.min(
|
|
70823
|
+
const defaultConcurrency = Math.min(16, Math.max(2, cpus().length - 2));
|
|
70398
70824
|
return {
|
|
70399
70825
|
maxConcurrency: integer4("maxConcurrency", limits.maxConcurrency ?? defaultConcurrency, 1, 16),
|
|
70400
|
-
maxAgents: integer4("maxAgents", limits.maxAgents ??
|
|
70826
|
+
maxAgents: integer4("maxAgents", limits.maxAgents ?? 1e3, 1, 1e3),
|
|
70401
70827
|
maxSourceBytes: integer4("maxSourceBytes", limits.maxSourceBytes ?? 256 * 1024, 1, 4 * 1024 * 1024),
|
|
70402
70828
|
memoryLimitBytes: integer4("memoryLimitBytes", limits.memoryLimitBytes ?? 64 * 1024 * 1024, 16 * 1024 * 1024, 256 * 1024 * 1024),
|
|
70403
70829
|
maxValueBytes: integer4("maxValueBytes", limits.maxValueBytes ?? 1024 * 1024, 1, 16 * 1024 * 1024),
|
|
@@ -70729,7 +71155,7 @@ var WorkflowRuntime = class {
|
|
|
70729
71155
|
const queuedAt = now();
|
|
70730
71156
|
const agent = {
|
|
70731
71157
|
index,
|
|
70732
|
-
label: call2.label ||
|
|
71158
|
+
label: call2.label || defaultAgentLabel(call2.prompt, index),
|
|
70733
71159
|
prompt: call2.prompt,
|
|
70734
71160
|
...phase ? { phaseIndex: phase.index, phaseTitle: phase.title } : {},
|
|
70735
71161
|
...call2.agentType !== void 0 ? { agentType: call2.agentType } : {},
|
|
@@ -73518,7 +73944,7 @@ function pathOf(toolInput) {
|
|
|
73518
73944
|
return void 0;
|
|
73519
73945
|
}
|
|
73520
73946
|
__name(pathOf, "pathOf");
|
|
73521
|
-
var
|
|
73947
|
+
var PASCAL_EVENT_NAMES = {
|
|
73522
73948
|
user_prompt_submit: "UserPromptSubmit",
|
|
73523
73949
|
session_start: "SessionStart",
|
|
73524
73950
|
session_end: "SessionEnd",
|
|
@@ -73597,7 +74023,7 @@ function readShellHookJson(event, stdout) {
|
|
|
73597
74023
|
if (typeof named !== "string") {
|
|
73598
74024
|
return { invalid: "`hookSpecificOutput` is missing its `hookEventName`" };
|
|
73599
74025
|
}
|
|
73600
|
-
if (named !== event && named !==
|
|
74026
|
+
if (named !== event && named !== PASCAL_EVENT_NAMES[event]) {
|
|
73601
74027
|
return {
|
|
73602
74028
|
invalid: `\`hookSpecificOutput.hookEventName\` is "${named}" but this hook ran for ${event}`
|
|
73603
74029
|
};
|
|
@@ -74206,7 +74632,7 @@ var AgentManager = class {
|
|
|
74206
74632
|
}
|
|
74207
74633
|
/**
|
|
74208
74634
|
* The refusal for a delegation past the depth limit. It tells the model what
|
|
74209
|
-
* to do instead
|
|
74635
|
+
* to do instead: a bare limit leaves it
|
|
74210
74636
|
* retrying the same spawn, while an instruction to do the work itself ends the
|
|
74211
74637
|
* attempt. The limit is `AgentManagerConfig.maxDepth`; there is no env override.
|
|
74212
74638
|
*/
|
|
@@ -77294,17 +77720,17 @@ function planWalk(root, options) {
|
|
|
77294
77720
|
});
|
|
77295
77721
|
});
|
|
77296
77722
|
const sets = matchers.flatMap((matcher) => matcher.set);
|
|
77297
|
-
if (sets.some((set3) => set3.some((
|
|
77723
|
+
if (sets.some((set3) => set3.some((segment2) => segment2 === ".."))) {
|
|
77298
77724
|
throw new Error("Expanded file walk pattern escapes its root");
|
|
77299
77725
|
}
|
|
77300
77726
|
const patternDepth = Math.max(1, ...sets.map((set3) => set3.includes(GLOBSTAR) ? Number.POSITIVE_INFINITY : set3.length));
|
|
77301
77727
|
const maxDepth = Math.min(patternDepth, options.maxDepth === void 0 ? Number.POSITIVE_INFINITY : positiveInteger(options.maxDepth, "maxDepth"));
|
|
77302
77728
|
const prefix = [];
|
|
77303
77729
|
for (let index = 0; sets.length > 0; index += 1) {
|
|
77304
|
-
const
|
|
77305
|
-
if (typeof
|
|
77730
|
+
const segment2 = sets[0]?.[index];
|
|
77731
|
+
if (typeof segment2 !== "string" || !segment2 || segment2 === "." || sets.some((set3) => index >= set3.length - 1 || set3[index] !== segment2))
|
|
77306
77732
|
break;
|
|
77307
|
-
prefix.push(
|
|
77733
|
+
prefix.push(segment2);
|
|
77308
77734
|
}
|
|
77309
77735
|
const expressions = matchers.flatMap((matcher) => {
|
|
77310
77736
|
const expression = matcher.makeRe();
|
|
@@ -77318,7 +77744,7 @@ function planWalk(root, options) {
|
|
|
77318
77744
|
maxEntries: positiveInteger(options.maxEntries, "maxEntries"),
|
|
77319
77745
|
maxVisitedEntries: positiveInteger(options.maxVisitedEntries ?? 2e4, "maxVisitedEntries"),
|
|
77320
77746
|
includeHidden: options.includeHidden ?? false,
|
|
77321
|
-
patterns: sets.map((set3) => set3.map((
|
|
77747
|
+
patterns: sets.map((set3) => set3.map((segment2) => segment2 === GLOBSTAR ? null : typeof segment2 === "string" ? segment2 : { source: segment2.source, flags: segment2.flags }))
|
|
77322
77748
|
};
|
|
77323
77749
|
}
|
|
77324
77750
|
__name(planWalk, "planWalk");
|
|
@@ -77335,11 +77761,11 @@ function directoryMatcher(plan) {
|
|
|
77335
77761
|
for (const name2 of relative10.split("/")) {
|
|
77336
77762
|
const next = /* @__PURE__ */ new Set();
|
|
77337
77763
|
for (const index of states) {
|
|
77338
|
-
const
|
|
77339
|
-
if (
|
|
77764
|
+
const segment2 = pattern[index];
|
|
77765
|
+
if (segment2 === null) {
|
|
77340
77766
|
if (plan.includeHidden || !name2.startsWith("."))
|
|
77341
77767
|
next.add(index);
|
|
77342
|
-
} else if (typeof
|
|
77768
|
+
} else if (typeof segment2 === "string" ? segment2 === name2 : segment2?.test(name2))
|
|
77343
77769
|
next.add(index + 1);
|
|
77344
77770
|
}
|
|
77345
77771
|
states = closure(next);
|
|
@@ -89911,17 +90337,17 @@ import { isAbsolute as isAbsolute13, join as join43, relative as relative8, sep
|
|
|
89911
90337
|
// ../sdk/dist/tools/posix-path.js
|
|
89912
90338
|
function normalizeSegments(path2) {
|
|
89913
90339
|
const out = [];
|
|
89914
|
-
for (const
|
|
89915
|
-
if (
|
|
90340
|
+
for (const segment2 of path2.split("/")) {
|
|
90341
|
+
if (segment2 === "" || segment2 === ".")
|
|
89916
90342
|
continue;
|
|
89917
|
-
if (
|
|
90343
|
+
if (segment2 === "..") {
|
|
89918
90344
|
if (out.length > 0 && out[out.length - 1] !== "..")
|
|
89919
90345
|
out.pop();
|
|
89920
90346
|
else
|
|
89921
90347
|
out.push("..");
|
|
89922
90348
|
continue;
|
|
89923
90349
|
}
|
|
89924
|
-
out.push(
|
|
90350
|
+
out.push(segment2);
|
|
89925
90351
|
}
|
|
89926
90352
|
return out;
|
|
89927
90353
|
}
|
|
@@ -93244,6 +93670,7 @@ export {
|
|
|
93244
93670
|
findPendingCheckpoint,
|
|
93245
93671
|
isTerminalAgentTaskState,
|
|
93246
93672
|
CompletionInbox,
|
|
93673
|
+
formatCompletionNotification,
|
|
93247
93674
|
buildAskUserQuestionTool,
|
|
93248
93675
|
resolveTriggerThreshold,
|
|
93249
93676
|
resolveContextWindow,
|
|
@@ -93276,6 +93703,8 @@ export {
|
|
|
93276
93703
|
InMemorySessionTokenBudgetStore,
|
|
93277
93704
|
DiskSessionCheckpointStore,
|
|
93278
93705
|
createFileReadTracker,
|
|
93706
|
+
diffWords,
|
|
93707
|
+
structuredPatch,
|
|
93279
93708
|
dryRunEdit,
|
|
93280
93709
|
seedObservationLedger,
|
|
93281
93710
|
toolResultInjectionGuardrail,
|
|
@@ -93357,7 +93786,6 @@ export {
|
|
|
93357
93786
|
CODING_AGENT_WORKING_DOCTRINE,
|
|
93358
93787
|
CODING_AGENT_DELEGATION_DOCTRINE,
|
|
93359
93788
|
PLAN_MODE_DOCTRINE,
|
|
93360
|
-
CODING_AGENT_HYPERMODE_DOCTRINE,
|
|
93361
93789
|
projectResidentLearning,
|
|
93362
93790
|
createResidentStepContributions,
|
|
93363
93791
|
createResidentStepContext,
|
|
@@ -93437,4 +93865,4 @@ export {
|
|
|
93437
93865
|
buildResidentToolEvidenceTools,
|
|
93438
93866
|
createPalMessagingTools
|
|
93439
93867
|
};
|
|
93440
|
-
//# sourceMappingURL=chunk-
|
|
93868
|
+
//# sourceMappingURL=chunk-FTZT4UAB.js.map
|