@qwen-code/qwen-code 0.21.12 → 0.21.13
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/bundled/qc-helper/docs/configuration/settings.md +7 -5
- package/bundled/qc-helper/docs/features/code-review.md +13 -12
- package/bundled/review/SKILL.md +96 -68
- package/chunks/{MaxSizedBox-ZSJJ2D5S.js → MaxSizedBox-UQALOVVT.js} +41 -41
- package/chunks/{StandaloneSessionPicker-WHUHQXSA.js → StandaloneSessionPicker-KEGXNUG6.js} +62 -62
- package/chunks/{acp-startup-profiler-SVPUHLXV.js → acp-startup-profiler-NMDXYGDN.js} +2 -2
- package/chunks/{acpAgent-7JOAESF5.js → acpAgent-XPES32S7.js} +533 -286
- package/chunks/{agent-E6V3VXQR.js → agent-DPTOZFEM.js} +38 -38
- package/chunks/{agent-headless-OEQNFOMH.js → agent-headless-GJCQMURW.js} +38 -38
- package/chunks/{anthropicContentGenerator-YDT4EOKO.js → anthropicContentGenerator-G7BVXTKN.js} +6 -6
- package/chunks/{artifact-tool-4GCQQDZI.js → artifact-tool-GEXTOPVO.js} +2 -2
- package/chunks/{askUserQuestion-HZJJLR3Z.js → askUserQuestion-B33XRSB7.js} +2 -2
- package/chunks/{bridge-NPBV53UA.js → bridge-YNQBAA4Z.js} +42 -42
- package/chunks/{channel-management-service-OADNGQM3.js → channel-management-service-GWY2GAIC.js} +1 -1
- package/chunks/{channel-settings-store-4ODLJ4X2.js → channel-settings-store-WNWYFHG7.js} +45 -45
- package/chunks/{channel-worker-group-IHBIHQ45.js → channel-worker-group-7LXCMZ77.js} +4 -4
- package/chunks/{channel-worker-manager-GEHYJ5AE.js → channel-worker-manager-RYEME4ZZ.js} +4 -4
- package/chunks/{channel-worker-supervisor-ZJIIWM4I.js → channel-worker-supervisor-OEVWBHGT.js} +2 -2
- package/chunks/{chunk-5RUCD4ED.js → chunk-25EYDK42.js} +3 -3
- package/chunks/{chunk-2ZWH53I4.js → chunk-2B2BF7P7.js} +3 -3
- package/chunks/{chunk-OYWVIXHT.js → chunk-2M55OBEB.js} +1 -1
- package/chunks/{chunk-GZDWTBT3.js → chunk-3EZLLVDF.js} +2 -2
- package/chunks/{chunk-V6OBVAST.js → chunk-3U3VAL47.js} +1 -1
- package/chunks/{chunk-KWX56CHZ.js → chunk-4PKCUT7F.js} +7 -7
- package/chunks/{chunk-EBPLKY6U.js → chunk-4S5337WV.js} +1229 -522
- package/chunks/{chunk-QLTATTPS.js → chunk-5CVO7YES.js} +1 -1
- package/chunks/{chunk-I7BT2MME.js → chunk-5EYKMUUY.js} +1 -1
- package/chunks/{chunk-YIGGWOJE.js → chunk-6HY6IF3Z.js} +1 -1
- package/chunks/{chunk-LCX5B364.js → chunk-6ORZ2EDC.js} +3 -3
- package/chunks/{chunk-OWGRUU7F.js → chunk-6QFDQMQX.js} +1 -1
- package/chunks/{chunk-5AFGJNY6.js → chunk-6YKYPVDV.js} +4 -4
- package/chunks/{chunk-X5SLJOMF.js → chunk-76J3IJ3M.js} +4 -4
- package/chunks/{chunk-YX2RDGAL.js → chunk-7UXUJ5T3.js} +1 -1
- package/chunks/{chunk-3GDBZJD6.js → chunk-A267JX7H.js} +6 -6
- package/chunks/{chunk-DD6O3ZRD.js → chunk-A4MFR4C5.js} +1 -1
- package/chunks/{chunk-LUISTZXI.js → chunk-AA2BEKV3.js} +2 -2
- package/chunks/{chunk-4XA4QIUA.js → chunk-AFSG32D5.js} +1 -1
- package/chunks/{chunk-B4VN3VDH.js → chunk-AS5IN4GK.js} +5 -5
- package/chunks/{chunk-MELQSJOU.js → chunk-AW4TRXOC.js} +1 -1
- package/chunks/{chunk-EJOGLSNJ.js → chunk-AXN7UPYQ.js} +1 -1
- package/chunks/{chunk-CGM3E75C.js → chunk-BHILXOC3.js} +2 -2
- package/chunks/{chunk-7KJPO7YH.js → chunk-BKPPWD33.js} +2 -2
- package/chunks/{chunk-HOSVOUDK.js → chunk-BUQDLC2G.js} +3 -0
- package/chunks/{chunk-2IVYL3IF.js → chunk-BVJS5BSP.js} +1 -1
- package/chunks/{chunk-TMFWI4RC.js → chunk-BZ263IKX.js} +1 -1
- package/chunks/{chunk-G6MUFRNI.js → chunk-CHHABXPE.js} +1 -1
- package/chunks/{chunk-YILJKX2T.js → chunk-CKSJECTU.js} +4 -4
- package/chunks/{chunk-4AOVQPJU.js → chunk-CPHEPGAO.js} +1 -1
- package/chunks/{chunk-OWXFBIB6.js → chunk-CU6GJD55.js} +1 -1
- package/chunks/{chunk-FMIH5KMQ.js → chunk-CZBYX5MY.js} +1 -1
- package/chunks/{chunk-S6TCTH4Z.js → chunk-DGK6P3BQ.js} +12 -12
- package/chunks/{chunk-QPBFRWCP.js → chunk-DGZEMW5R.js} +3 -3
- package/chunks/{chunk-NW2GIPG3.js → chunk-DXIBNLBZ.js} +2 -2
- package/chunks/{chunk-FA5K6YI2.js → chunk-E23IPNGS.js} +25 -2
- package/chunks/{chunk-ULNWG62W.js → chunk-E3DYKPYZ.js} +3 -3
- package/chunks/{chunk-N4SVADAV.js → chunk-EL5SXY3T.js} +4 -3
- package/chunks/{chunk-YCHNAKC5.js → chunk-EZ5RP345.js} +11 -11
- package/chunks/{chunk-D7QGE3RT.js → chunk-FAAUPSY2.js} +1 -1
- package/chunks/{chunk-YBHUXEC6.js → chunk-FDGGZIYW.js} +1 -1
- package/chunks/{chunk-CIDQISGM.js → chunk-GGDBMYGZ.js} +5 -5
- package/chunks/{chunk-DG4IQ6JG.js → chunk-GMIEIY3Y.js} +3 -3
- package/chunks/{chunk-ZQUY3ZJU.js → chunk-GO7STP6N.js} +4 -4
- package/chunks/{chunk-3AEKDXKT.js → chunk-H4A72DE5.js} +1 -1
- package/chunks/{chunk-IRSLAS4M.js → chunk-HUTNYWBG.js} +2 -2
- package/chunks/{chunk-ZBB5EZZV.js → chunk-IA2K2HJE.js} +2 -2
- package/chunks/{chunk-IX4PWUDU.js → chunk-IGGGG5CX.js} +4329 -1586
- package/chunks/{chunk-ZMY2P4L3.js → chunk-IWPYVAO2.js} +4 -4
- package/chunks/{chunk-WCEI6J56.js → chunk-JNDY2MDR.js} +2 -2
- package/chunks/{chunk-3LDGOQXZ.js → chunk-JOOFMXGF.js} +6 -6
- package/chunks/{chunk-RDVNSJQU.js → chunk-JUEPY766.js} +3 -3
- package/chunks/{chunk-QBJYSIQ4.js → chunk-K3LPAED5.js} +53 -12
- package/chunks/{chunk-FRHQQC2Z.js → chunk-KBXKR5R2.js} +1 -1
- package/chunks/{chunk-PTSEETCO.js → chunk-KD5BOPLP.js} +12 -12
- package/chunks/{chunk-CPFFU46D.js → chunk-KV27IEHM.js} +1 -1
- package/chunks/{chunk-6P5EXEBL.js → chunk-LJQAUZMR.js} +207 -146
- package/chunks/{chunk-56HVDG3M.js → chunk-M732YJPW.js} +6 -6
- package/chunks/{chunk-LSRI3ND3.js → chunk-MA2HEDVP.js} +1 -1
- package/chunks/{chunk-XH3KAV2G.js → chunk-MC4TLKEI.js} +2 -2
- package/chunks/{chunk-YBVVOSOH.js → chunk-MIPFDQAF.js} +1 -1
- package/chunks/{chunk-47BGDLJG.js → chunk-MLPXSYXR.js} +31 -18
- package/chunks/{chunk-KRXPRVGL.js → chunk-MLXTMF7H.js} +0 -1
- package/chunks/{chunk-CQ6IPDQW.js → chunk-MRMJCLIY.js} +3 -3
- package/chunks/{chunk-62X3CM7Q.js → chunk-N5YPT6PH.js} +4 -4
- package/chunks/{chunk-OPVF453Q.js → chunk-NEFOOD54.js} +3 -3
- package/chunks/{chunk-DAV4QFD5.js → chunk-NHDR76JX.js} +44 -3
- package/chunks/{chunk-36XKGB7E.js → chunk-NM5V5OVW.js} +3 -3
- package/chunks/{chunk-QSD4UH74.js → chunk-NNHNLJ2X.js} +42 -42
- package/chunks/chunk-NYWWQ437.js +24 -0
- package/chunks/{chunk-MDNUCDKZ.js → chunk-O4D7SPJN.js} +2 -2
- package/chunks/{chunk-HG3UBTJ4.js → chunk-O565M6A4.js} +411 -10
- package/chunks/{chunk-BSR5AXZR.js → chunk-OD2WU5QY.js} +1 -1
- package/chunks/{chunk-DPTMKFIH.js → chunk-OMLJNPBE.js} +42 -12
- package/chunks/{chunk-Q4ZPYNIZ.js → chunk-OOQUVWIG.js} +4 -4
- package/chunks/{chunk-D2RNVVH6.js → chunk-OVZPVYZB.js} +2 -2
- package/chunks/{chunk-3GM5DLBI.js → chunk-OXCMMLED.js} +3 -3
- package/chunks/{chunk-BSSLSQEW.js → chunk-OY5RNSV4.js} +3 -3
- package/chunks/{chunk-PZW46OTB.js → chunk-P7MPQI75.js} +2 -2
- package/chunks/{chunk-6JEIRPLN.js → chunk-PP4FUZNV.js} +2 -2
- package/chunks/{chunk-DFVXU5YM.js → chunk-PQ36L4F5.js} +1 -1
- package/chunks/{chunk-VPV7WBVT.js → chunk-PT4I7NBA.js} +1 -1
- package/chunks/{chunk-VLHR7F4E.js → chunk-QF2NHSPB.js} +28 -28
- package/chunks/{chunk-NLFLYSS4.js → chunk-QFJ5JHQR.js} +1 -1
- package/chunks/{chunk-VIFA5VJD.js → chunk-QIH2HAEN.js} +1 -1
- package/chunks/{chunk-HTYND72J.js → chunk-QNQAPSN2.js} +1 -1
- package/chunks/{chunk-TDESMS7M.js → chunk-QRCNA3SR.js} +4 -4
- package/chunks/{chunk-IH4Z54RJ.js → chunk-QV5YN5YD.js} +5 -5
- package/chunks/{chunk-WI6GIM2M.js → chunk-RIAABG2K.js} +2 -2
- package/chunks/{chunk-UI5UGEF4.js → chunk-RLKC46YT.js} +16 -10
- package/chunks/{chunk-KEC5FHLM.js → chunk-ROIYNTHJ.js} +3 -3
- package/chunks/{chunk-4KM2SYK5.js → chunk-RVOJ2FBP.js} +8 -8
- package/chunks/{chunk-63FNZTWG.js → chunk-RWDNJBWN.js} +2 -2
- package/chunks/{chunk-FQDCO3CJ.js → chunk-S5DWMTHO.js} +5 -0
- package/chunks/{chunk-TTRH3RTQ.js → chunk-SG7ZP5PG.js} +4 -4
- package/chunks/{chunk-TXP5NGG3.js → chunk-SXCOEJO4.js} +1 -1
- package/chunks/{chunk-K34GJQOZ.js → chunk-TIGA2IVL.js} +3 -3
- package/chunks/chunk-TS6625XH.js +488 -0
- package/chunks/{chunk-WM3LUQLO.js → chunk-TUGSVUJB.js} +6 -6
- package/chunks/{chunk-XAFIL4BD.js → chunk-U3VNBPUO.js} +5 -5
- package/chunks/{chunk-WDVDVWJ3.js → chunk-UKMR3CKV.js} +6 -6
- package/chunks/{chunk-DEDESZDL.js → chunk-UPDOZBWO.js} +1 -1
- package/chunks/{chunk-MUNA4QDC.js → chunk-UZPM4XHR.js} +4 -4
- package/chunks/{chunk-6SPD4Z7F.js → chunk-V26NVGAU.js} +1 -1
- package/chunks/{chunk-XDRXOSAD.js → chunk-V57QC6WW.js} +2 -2
- package/chunks/{chunk-NX4A23LY.js → chunk-WFSTRPRO.js} +3 -3
- package/chunks/{chunk-H7TMVHKE.js → chunk-WGHHA7ZH.js} +1 -1
- package/chunks/{chunk-JRIVMPD2.js → chunk-WSH6GRKG.js} +4 -4
- package/chunks/{chunk-OR64CU46.js → chunk-X26JYGTD.js} +1 -1
- package/chunks/{chunk-RQJA2YYO.js → chunk-XHRY7BXD.js} +4 -4
- package/chunks/{chunk-MAKIANMX.js → chunk-XIT3GURH.js} +3 -3
- package/chunks/{chunk-KLOMACIR.js → chunk-XLLKYULU.js} +2 -2
- package/chunks/{chunk-PVXEJB66.js → chunk-XUJNK7Y6.js} +1 -1
- package/chunks/{chunk-AKBFSOC5.js → chunk-Y3YCSWG5.js} +2 -2
- package/chunks/{chunk-6ZKSO6K7.js → chunk-YEYY7TEP.js} +7 -7
- package/chunks/{chunk-TB4YFWXG.js → chunk-YZHRN3CF.js} +2 -2
- package/chunks/{chunk-TQDFSQQF.js → chunk-YZOSNW4R.js} +1 -1
- package/chunks/{chunk-GXTMEATA.js → chunk-ZYBBISBY.js} +7 -7
- package/chunks/{chunk-ROIJYS5K.js → chunk-ZYYTZUI2.js} +3 -3
- package/chunks/{chunk-CZ4OWGQQ.js → chunk-ZZO74WKW.js} +43 -5
- package/chunks/{computer-use-F4URV4TU.js → computer-use-77C5FHMW.js} +38 -38
- package/chunks/{config-utils-Z3OW3IQG.js → config-utils-IVHRSXWI.js} +2 -2
- package/chunks/{contextCommand-IGSS2U5J.js → contextCommand-PJ77GBWL.js} +40 -40
- package/chunks/{core-runtime-H5CZDN3A.js → core-runtime-7VMIKUTG.js} +38 -38
- package/chunks/{create-sub-session-PA7MFTHK.js → create-sub-session-2L5MQRN4.js} +38 -38
- package/chunks/{create-sub-session-XT6DLYOE.js → create-sub-session-KRQULJE6.js} +2 -2
- package/chunks/{cron-create-2JZ2TWTF.js → cron-create-H7UEPDSN.js} +4 -4
- package/chunks/{cron-delete-CTPD2P26.js → cron-delete-6SZK7YFM.js} +4 -4
- package/chunks/{cron-list-V44KHAF6.js → cron-list-H25JIHEZ.js} +4 -4
- package/chunks/{daemon-GED37WOX.js → daemon-2KTG7ZBN.js} +80 -8
- package/chunks/{daemon-git-worktree-guard-LZDCNJGV.js → daemon-git-worktree-guard-DXYIMWFT.js} +38 -38
- package/chunks/{daemon-status-provider-QYM57Z44.js → daemon-status-provider-ZDOYJCU6.js} +46 -46
- package/chunks/{daemon-trust-policy-TSRVEYZR.js → daemon-trust-policy-E67OYUK2.js} +44 -44
- package/chunks/{daemon-trust-policy-monitor-2K2YETMT.js → daemon-trust-policy-monitor-RYYGCQ3J.js} +44 -44
- package/chunks/{deferred-core-runtime-FKJ3OYE7.js → deferred-core-runtime-3SGXFXEQ.js} +38 -38
- package/chunks/discovery-ORA5J7YP.js +27 -0
- package/chunks/{display-image-M2ELAVN4.js → display-image-ON3EYFRD.js} +4 -4
- package/chunks/{earlyInputCapture-WJBSJQUF.js → earlyInputCapture-KJMLFVQV.js} +39 -39
- package/chunks/{edit-X73LA4YO.js → edit-I4LQFAEC.js} +38 -38
- package/chunks/{enter-worktree-CLRQTIVN.js → enter-worktree-YNPOJSRH.js} +38 -38
- package/chunks/{enterPlanMode-6BDYUQ5T.js → enterPlanMode-XCPK62ER.js} +38 -38
- package/chunks/{environment-WOAJXJDJ.js → environment-S7CTIHMX.js} +40 -40
- package/chunks/{errors-7OY5MXYY.js → errors-7HB2AIDS.js} +40 -40
- package/chunks/{exit-worktree-TFFJXCRT.js → exit-worktree-AIIY7SR6.js} +38 -38
- package/chunks/{exitPlanMode-WDURQMIU.js → exitPlanMode-R4JY7V2O.js} +38 -38
- package/chunks/{fast-path-QQLGC37M.js → fast-path-NDJV3ZFJ.js} +2 -2
- package/chunks/{gemini-VHE62IJL.js → gemini-RSUFP5OE.js} +86 -86
- package/chunks/{geminiContentGenerator-VSHIEGAQ.js → geminiContentGenerator-SQ5XBPZ7.js} +6 -6
- package/chunks/{glob-VMEEDDLO.js → glob-J4RUJAHX.js} +38 -38
- package/chunks/{goal-tools-M4UDAZXP.js → goal-tools-VHTNVOKK.js} +56 -12
- package/chunks/{grep-F4UAR7KX.js → grep-VJWPLFOT.js} +38 -38
- package/chunks/{handleAutoUpdate-GN7Z6QAC.js → handleAutoUpdate-POCX2MNB.js} +42 -42
- package/chunks/{i18n-ETW24DHW.js → i18n-RM5YOICI.js} +39 -39
- package/chunks/{image-gen-YPK2AZT4.js → image-gen-EXECB5XM.js} +10 -10
- package/chunks/{initializer-UA6KQ7MS.js → initializer-Z2AFGBNR.js} +45 -45
- package/chunks/{installationInfo-P7OTIR4P.js → installationInfo-4I5FXNMH.js} +39 -39
- package/chunks/{keychain-token-storage-NKKCUHI2.js → keychain-token-storage-3XFJ5ZB2.js} +2 -2
- package/chunks/{list-GRAMIQOT.js → list-ZMBFIGZA.js} +47 -47
- package/chunks/{list-agents-O6WSY4CT.js → list-agents-OSVDFI6S.js} +2 -2
- package/chunks/{loadedSettingsAdapter-5O2TDS3I.js → loadedSettingsAdapter-T6TV4YJ7.js} +44 -44
- package/chunks/{loggingContentGenerator-J2J2AANS.js → loggingContentGenerator-WF4ZOJEZ.js} +63 -39
- package/chunks/{loop-wakeup-GVQRMUKS.js → loop-wakeup-WQS6JYAG.js} +5 -5
- package/chunks/{ls-6W2D7TKU.js → ls-D3HUFHDP.js} +4 -4
- package/chunks/{lsp-NJ4KFBI2.js → lsp-3QDDJTCS.js} +2 -2
- package/chunks/{managed-npm-update-WMV5ITKU.js → managed-npm-update-E7IW6N7V.js} +39 -39
- package/chunks/{mcp-XLP33CAI.js → mcp-6UNYX4HG.js} +44 -44
- package/chunks/{monitor-2MM23VDV.js → monitor-EE2UYMGE.js} +38 -38
- package/chunks/{nonInteractiveCli-KTA5K6FS.js → nonInteractiveCli-WAY237O4.js} +79 -79
- package/chunks/{notebook-edit-QD4TRKLY.js → notebook-edit-NTDY4QDU.js} +38 -38
- package/chunks/{openaiContentGenerator-KLHSPVN2.js → openaiContentGenerator-YNFVJMRJ.js} +23 -23
- package/chunks/{pidfile-RQGZBNXT.js → pidfile-4XSFLYBZ.js} +39 -39
- package/chunks/{processUtils-HZZDA2VV.js → processUtils-WDA2MJFD.js} +2 -2
- package/chunks/proper-lockfile-3LHWIM44.js +8 -0
- package/chunks/{qwenContentGenerator-T75M2Z3B.js → qwenContentGenerator-434M7QKY.js} +43 -43
- package/chunks/{qwenOAuth2-5QZU444W.js → qwenOAuth2-GMYZOO6A.js} +9 -9
- package/chunks/{read-file-LOVUSBJC.js → read-file-TAFBKMNI.js} +11 -11
- package/chunks/{read-mcp-resource-GWCP23WG.js → read-mcp-resource-XD54ZQMC.js} +2 -2
- package/chunks/{record-artifact-IYQDEYMV.js → record-artifact-SEYFJEJF.js} +3 -3
- package/chunks/{resumeHistoryUtils-LVKSSQII.js → resumeHistoryUtils-EVG3WYK2.js} +45 -45
- package/chunks/{ripGrep-ZJSHKB6H.js → ripGrep-WOEK2PXS.js} +38 -38
- package/chunks/{run-qwen-serve-GZW7B4WK.js → run-qwen-serve-3QSGRXAN.js} +411 -209
- package/chunks/{runtime-MYRXEO2E.js → runtime-5MLLZ7DC.js} +47 -47
- package/chunks/{scheduler-DPTPI6FW.js → scheduler-RPBJ63CH.js} +40 -40
- package/chunks/{sdk-exporters-http-NHBYB5FZ.js → sdk-exporters-http-XUVP63H6.js} +2 -2
- package/chunks/{sdk-impl-SK4P5WON.js → sdk-impl-YXUEN2Z2.js} +2 -2
- package/chunks/{send-message-O7FO63UK.js → send-message-VZENRWRH.js} +6 -6
- package/chunks/{serve-XCG4XCDA.js → serve-HS3XLPXU.js} +44 -44
- package/chunks/{server-AWQHKXLG.js → server-TC4A7AAZ.js} +3833 -1618
- package/chunks/{session-P5FKNCNR.js → session-UBOFXVMN.js} +80 -80
- package/chunks/{settings-CSYVIP2R.js → settings-D5644OM5.js} +43 -43
- package/chunks/{shell-EGTSUO2P.js → shell-3PZULQQV.js} +38 -38
- package/chunks/{skill-IFUD72GF.js → skill-PEVVXQ3L.js} +16 -16
- package/chunks/{skill-settings-YOE7LBHE.js → skill-settings-J65JKKES.js} +43 -43
- package/chunks/{spawnChannel-PQSZIOLY.js → spawnChannel-IYGXRHSQ.js} +40 -40
- package/chunks/{standalone-update-RB2EGUSF.js → standalone-update-IFM53PE7.js} +40 -40
- package/chunks/{startInteractiveUI-KMYUJ2MU.js → startInteractiveUI-3AVH7L6H.js} +417 -168
- package/chunks/{syntheticOutput-DVHJMUGV.js → syntheticOutput-7GWFIDXT.js} +3 -3
- package/chunks/{task-create-4NC7PDI4.js → task-create-FCBDX7UH.js} +11 -11
- package/chunks/{task-list-LBSRMOC7.js → task-list-YIYIUFUA.js} +6 -6
- package/chunks/{task-stop-YFNATTIM.js → task-stop-X37KYTKB.js} +2 -2
- package/chunks/{task-update-BPLM52GD.js → task-update-MYPFVOVM.js} +11 -11
- package/chunks/{team-create-B6A6MJBT.js → team-create-ZAIA7KAV.js} +38 -38
- package/chunks/{team-delete-MKYMYBFM.js → team-delete-6UMU4XLS.js} +6 -6
- package/chunks/{team-plan-approval-5WO3CXXU.js → team-plan-approval-UNIUS7OD.js} +38 -38
- package/chunks/{terminal-image-renderer-BTRE2GEU.js → terminal-image-renderer-G343P2RV.js} +40 -40
- package/chunks/{theme-manager-XL2N5SBY.js → theme-manager-Z3RIT7DB.js} +39 -39
- package/chunks/{todoWrite-K5K7NRE5.js → todoWrite-U2R4NVF4.js} +4 -4
- package/chunks/{tool-search-QNBLXUGR.js → tool-search-5R2OE4C7.js} +15 -15
- package/chunks/{total-session-admission-N4E5SFBO.js → total-session-admission-4KBHMQQ2.js} +42 -42
- package/chunks/{trustedFolders-MQS46LIU.js → trustedFolders-LK6T4XC7.js} +39 -39
- package/chunks/{update-relaunch-536KRL33.js → update-relaunch-UBKROIC6.js} +5 -5
- package/chunks/{updateCheck-QJI2SYWF.js → updateCheck-W4Y2GFSD.js} +42 -42
- package/chunks/{useAutoAcceptIndicator-7QASHD46.js → useAutoAcceptIndicator-C7BEICBF.js} +47 -47
- package/chunks/{validateNonInterActiveAuth-ZNRGWBLV.js → validateNonInterActiveAuth-LTEI2TB6.js} +76 -76
- package/chunks/{version-DBEQAFRW.js → version-G5A5DGVS.js} +1 -1
- package/chunks/{web-fetch-MBIVXKPE.js → web-fetch-RTEQTR5Z.js} +15 -15
- package/chunks/{web-search-4LBIN6VF.js → web-search-5OXHEZPV.js} +9 -9
- package/chunks/{workflow-LNMA55HY.js → workflow-ISQJHPG2.js} +39 -39
- package/chunks/{workspace-providers-status-PDDMI6ST.js → workspace-providers-status-2ZPZPUPZ.js} +47 -47
- package/chunks/{workspace-registration-store-BGRKKIYR.js → workspace-registration-store-CYNY6IP6.js} +2 -2
- package/chunks/{workspace-registry-L4NCJ34K.js → workspace-registry-34GTUUHB.js} +44 -43
- package/chunks/{workspace-service-LOXYKYTR.js → workspace-service-XCDQLE2Y.js} +50 -50
- package/chunks/{workspace-skills-status-IJ5FOQI6.js → workspace-skills-status-RS4O7AIJ.js} +45 -45
- package/chunks/{workspace-trust-reconciler-H36TCR2S.js → workspace-trust-reconciler-AYGXC7A3.js} +53 -52
- package/chunks/{write-file-JJAY7JSP.js → write-file-EWXKVVXF.js} +38 -38
- package/chunks/{zoom-image-4MVVVM7E.js → zoom-image-4BFYJ3HG.js} +11 -11
- package/cli.js +13 -13
- package/package.json +3 -3
- package/web-shell/assets/{arc-B-89zHN4.js → arc-CgOpDKvm.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-BkcOncHk.js → architectureDiagram-3BPJPVTR-0Ag_m34F.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-DQ4yboaF.js → blockDiagram-GPEHLZMM-IwTwFau0.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-C_8ZjPDI.js → c4Diagram-AAUBKEIU-DLa5GUv8.js} +1 -1
- package/web-shell/assets/channel-BrGVBa2L.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-naKVe1Bm.js → chunk-2J33WTMH-DcYP-WFG.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-DdoViKT2.js → chunk-4BX2VUAB-C8MVPMiQ.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DUDQZEwU.js → chunk-55IACEB6-BUi4Yfv3.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-BqpDTR5s.js → chunk-727SXJPM-Cy3Su2YY.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-CdmEknkT.js → chunk-AQP2D5EJ-Dp8Teqv6.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-CH7fFTLB.js → chunk-FMBD7UC4-BDTDM-4j.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-ObgSuFKF.js → chunk-ND2GUHAM-7HfDt0r2.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-D9fKdv_s.js → chunk-QZHKN3VN-BIBU0uCF.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-B5TUzJzI.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B5TUzJzI.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-CvzATMx9.js → cose-bilkent-S5V4N54A-DRLdcg9p.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-M_xU21QW.js → dagre-BM42HDAG-DCCgDwqW.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-CNrl9sW1.js → diagram-2AECGRRQ-CsBTBmk3.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-CUweVT6T.js → diagram-5GNKFQAL-C9qjH8Lt.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-D3n6Lxjo.js → diagram-KO2AKTUF-Brjs_lj2.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-0SeFPK4t.js → diagram-LMA3HP47-DtiWCl_F.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-DAgyEwge.js → diagram-OG6HWLK6-DmfKLkBT.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-CzxBBDIK.js → erDiagram-TEJ5UH35-Bve_4deH.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-B0uj0jyo.js → flowDiagram-I6XJVG4X-C2_kXCcV.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-DFzcj5km.js → ganttDiagram-6RSMTGT7-BSBIjiTF.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DylJ_Fc9.js → gitGraphDiagram-PVQCEYII-CyebwI55.js} +1 -1
- package/web-shell/assets/index-CIDsgxTe.js +1792 -0
- package/web-shell/assets/{index-BIGQygTL.css → index-DiQnWi_E.css} +1 -1
- package/web-shell/assets/{index-BKSAnXU9.js → index-d0yfnV1M.js} +1 -1
- package/web-shell/assets/{infoDiagram-5YYISTIA-BYMcJVMI.js → infoDiagram-5YYISTIA-CSDGnWxU.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-t1quI1S3.js → ishikawaDiagram-YF4QCWOH-BK4jU13p.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-YM_QVUJm.js → journeyDiagram-JHISSGLW-D_W6j-oF.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-jw8OddK1.js → kanban-definition-UN3LZRKU-C7xf-SdC.js} +1 -1
- package/web-shell/assets/{linear-Dlr3RVuP.js → linear-DQmzxpxd.js} +1 -1
- package/web-shell/assets/{mermaid.core-CqGKzNzd.js → mermaid.core-9P7AGOLG.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-BqureoOS.js → mindmap-definition-RKZ34NQL-DgcgMyPk.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-Da20HkK1.js → pieDiagram-4H26LBE5-3wWGb9eG.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-BsNlMvJy.js → quadrantDiagram-W4KKPZXB-BeCXnQw9.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-DzVCQCse.js → requirementDiagram-4Y6WPE33-Bi1UOHDz.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BMo16voT.js → sankeyDiagram-5OEKKPKP-lrLUjjbb.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-Bgi-pdHk.js → sequenceDiagram-3UESZ5HK-BFuqKz6Q.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-xaPQXwGk.js → stateDiagram-AJRCARHV-8DemQLhu.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DhM5ixYd.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-C_9RuvKG.js → timeline-definition-PNZ67QCA-uzEuVQXg.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-Bgu6vdla.js → vennDiagram-CIIHVFJN-BQTeZ_-o.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-CFTZ8IrX.js → wardley-L42UT6IY-B6yM5Im7.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BASW9Vmt.js → wardleyDiagram-YWT4CUSO-ChM8bmgn.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6--Nh-CD3F.js → xychartDiagram-2RQKCTM6-oNG6HyB1.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/discovery-XLHITE74.js +0 -220
- package/web-shell/assets/channel-Du2WFns8.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-Zw0HafH6.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Zw0HafH6.js +0 -1
- package/web-shell/assets/index-J7OMTqAN.js +0 -1789
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-D5RqimXD.js +0 -1
- package/chunks/{chunk-SYHXR6WM.js → chunk-4W5U2TUT.js} +3 -3
- /package/chunks/{chunk-OK47XBYH.js → chunk-A4QRWUDE.js} +0 -0
|
@@ -12,9 +12,12 @@ import {
|
|
|
12
12
|
MIN_CHILD_HEAP_MB,
|
|
13
13
|
recommendedChildShareMb
|
|
14
14
|
} from "./chunk-UXEO7E3V.js";
|
|
15
|
+
import {
|
|
16
|
+
isInternalWorkspaceRuntime
|
|
17
|
+
} from "./chunk-NYWWQ437.js";
|
|
15
18
|
import {
|
|
16
19
|
CLIENT_MCP_OVER_WS_CONFIG_FLAG
|
|
17
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-S5DWMTHO.js";
|
|
18
21
|
import {
|
|
19
22
|
MAX_WORKSPACE_PATH_LENGTH,
|
|
20
23
|
translateAndCheckAbsoluteWorkspacePath
|
|
@@ -1880,6 +1883,309 @@ async function createManagedScratchDirectory(root) {
|
|
|
1880
1883
|
}
|
|
1881
1884
|
__name(createManagedScratchDirectory, "createManagedScratchDirectory");
|
|
1882
1885
|
|
|
1886
|
+
// packages/cli/src/serve/conversations/conversation-runtime-errors.ts
|
|
1887
|
+
init_esbuild_shims();
|
|
1888
|
+
var DEFAULT_MESSAGES = {
|
|
1889
|
+
conversation_runtime_in_use: "The Conversations runtime is owned by another daemon.",
|
|
1890
|
+
conversation_runtime_unavailable: "The Conversations runtime is temporarily unavailable.",
|
|
1891
|
+
conversation_root_compromised: "The Conversations root could not be verified.",
|
|
1892
|
+
conversation_runtime_ownership_compromised: "The Conversations runtime ownership state could not be verified."
|
|
1893
|
+
};
|
|
1894
|
+
var ConversationRuntimeOwnershipError = class extends Error {
|
|
1895
|
+
constructor(code, retryable, options) {
|
|
1896
|
+
super(DEFAULT_MESSAGES[code], options);
|
|
1897
|
+
this.code = code;
|
|
1898
|
+
this.retryable = retryable;
|
|
1899
|
+
this.name = "ConversationRuntimeOwnershipError";
|
|
1900
|
+
}
|
|
1901
|
+
static {
|
|
1902
|
+
__name(this, "ConversationRuntimeOwnershipError");
|
|
1903
|
+
}
|
|
1904
|
+
status = 503;
|
|
1905
|
+
};
|
|
1906
|
+
function conversationRuntimeInUseError() {
|
|
1907
|
+
return new ConversationRuntimeOwnershipError(
|
|
1908
|
+
"conversation_runtime_in_use",
|
|
1909
|
+
true
|
|
1910
|
+
);
|
|
1911
|
+
}
|
|
1912
|
+
__name(conversationRuntimeInUseError, "conversationRuntimeInUseError");
|
|
1913
|
+
function conversationRuntimeUnavailableError(cause) {
|
|
1914
|
+
return new ConversationRuntimeOwnershipError(
|
|
1915
|
+
"conversation_runtime_unavailable",
|
|
1916
|
+
true,
|
|
1917
|
+
{ cause }
|
|
1918
|
+
);
|
|
1919
|
+
}
|
|
1920
|
+
__name(conversationRuntimeUnavailableError, "conversationRuntimeUnavailableError");
|
|
1921
|
+
function conversationRuntimeOwnershipCompromisedError(cause) {
|
|
1922
|
+
return new ConversationRuntimeOwnershipError(
|
|
1923
|
+
"conversation_runtime_ownership_compromised",
|
|
1924
|
+
false,
|
|
1925
|
+
{ cause }
|
|
1926
|
+
);
|
|
1927
|
+
}
|
|
1928
|
+
__name(conversationRuntimeOwnershipCompromisedError, "conversationRuntimeOwnershipCompromisedError");
|
|
1929
|
+
function conversationRootCompromisedError(cause) {
|
|
1930
|
+
return new ConversationRuntimeOwnershipError(
|
|
1931
|
+
"conversation_root_compromised",
|
|
1932
|
+
false,
|
|
1933
|
+
{ cause }
|
|
1934
|
+
);
|
|
1935
|
+
}
|
|
1936
|
+
__name(conversationRootCompromisedError, "conversationRootCompromisedError");
|
|
1937
|
+
|
|
1938
|
+
// packages/cli/src/serve/serve-app-lifecycle.ts
|
|
1939
|
+
init_esbuild_shims();
|
|
1940
|
+
var SERVE_APP_LIFECYCLE = Symbol("qwen.serveAppLifecycle");
|
|
1941
|
+
var DEFAULT_CLOSE_TIMEOUT_MS = 5e3;
|
|
1942
|
+
var SECONDARY_CLOSE_TIMEOUT_MS = 2e3;
|
|
1943
|
+
function deferred() {
|
|
1944
|
+
let resolve2;
|
|
1945
|
+
let reject;
|
|
1946
|
+
const promise = new Promise((resolvePromise, rejectPromise) => {
|
|
1947
|
+
resolve2 = resolvePromise;
|
|
1948
|
+
reject = rejectPromise;
|
|
1949
|
+
});
|
|
1950
|
+
void promise.catch(() => void 0);
|
|
1951
|
+
return { promise, resolve: resolve2, reject };
|
|
1952
|
+
}
|
|
1953
|
+
__name(deferred, "deferred");
|
|
1954
|
+
var ServeAppLifecycleController = class {
|
|
1955
|
+
static {
|
|
1956
|
+
__name(this, "ServeAppLifecycleController");
|
|
1957
|
+
}
|
|
1958
|
+
admission = deferred();
|
|
1959
|
+
server;
|
|
1960
|
+
startupReady = true;
|
|
1961
|
+
listenerReady = false;
|
|
1962
|
+
listenerClosed = false;
|
|
1963
|
+
sealed = false;
|
|
1964
|
+
closePending;
|
|
1965
|
+
ownership;
|
|
1966
|
+
appDrain;
|
|
1967
|
+
hostDrain;
|
|
1968
|
+
bootStarter;
|
|
1969
|
+
bootPending;
|
|
1970
|
+
bootStarted = false;
|
|
1971
|
+
bindServer(server, options = {}) {
|
|
1972
|
+
if (this.server || server.listening || this.bootStarted || this.sealed) {
|
|
1973
|
+
throw new Error(
|
|
1974
|
+
"Serve app lifecycle must bind one server before its first listen."
|
|
1975
|
+
);
|
|
1976
|
+
}
|
|
1977
|
+
this.server = server;
|
|
1978
|
+
this.hostDrain = options.drainHost;
|
|
1979
|
+
this.startupReady = options.startupReady === void 0;
|
|
1980
|
+
server.once("listening", () => {
|
|
1981
|
+
this.listenerReady = true;
|
|
1982
|
+
if (this.sealed) {
|
|
1983
|
+
server.close();
|
|
1984
|
+
server.closeAllConnections();
|
|
1985
|
+
return;
|
|
1986
|
+
}
|
|
1987
|
+
this.openAdmissionIfReady();
|
|
1988
|
+
});
|
|
1989
|
+
server.on("close", () => {
|
|
1990
|
+
this.listenerClosed = true;
|
|
1991
|
+
this.seal();
|
|
1992
|
+
void this.close().catch(() => void 0);
|
|
1993
|
+
});
|
|
1994
|
+
server.on("error", (error) => {
|
|
1995
|
+
if (!this.listenerReady && options.startupReady === void 0) {
|
|
1996
|
+
this.seal(error);
|
|
1997
|
+
void this.close().catch(() => void 0);
|
|
1998
|
+
}
|
|
1999
|
+
});
|
|
2000
|
+
if (options.startupReady) {
|
|
2001
|
+
void options.startupReady.then(
|
|
2002
|
+
() => {
|
|
2003
|
+
this.startupReady = true;
|
|
2004
|
+
this.openAdmissionIfReady();
|
|
2005
|
+
},
|
|
2006
|
+
(error) => {
|
|
2007
|
+
this.seal(error instanceof Error ? error : new Error(String(error)));
|
|
2008
|
+
}
|
|
2009
|
+
);
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
close(options = {}) {
|
|
2013
|
+
if (this.closePending) return this.closePending;
|
|
2014
|
+
const pending = this.closeOnce(options);
|
|
2015
|
+
this.closePending = pending;
|
|
2016
|
+
void pending.catch(() => {
|
|
2017
|
+
if (this.closePending === pending) this.closePending = void 0;
|
|
2018
|
+
});
|
|
2019
|
+
return pending;
|
|
2020
|
+
}
|
|
2021
|
+
setOwnership(ownership) {
|
|
2022
|
+
if (this.ownership) {
|
|
2023
|
+
throw new Error("Serve app lifecycle ownership is already configured.");
|
|
2024
|
+
}
|
|
2025
|
+
this.ownership = ownership;
|
|
2026
|
+
}
|
|
2027
|
+
setAppDrain(drain) {
|
|
2028
|
+
this.appDrain = drain;
|
|
2029
|
+
}
|
|
2030
|
+
setBootStarter(starter) {
|
|
2031
|
+
this.bootStarter = starter;
|
|
2032
|
+
this.openAdmissionIfReady();
|
|
2033
|
+
}
|
|
2034
|
+
async awaitBootAdmission() {
|
|
2035
|
+
if (!this.server || this.sealed) {
|
|
2036
|
+
throw conversationRuntimeUnavailableError();
|
|
2037
|
+
}
|
|
2038
|
+
try {
|
|
2039
|
+
await this.admission.promise;
|
|
2040
|
+
} catch (error) {
|
|
2041
|
+
throw conversationRuntimeUnavailableError(error);
|
|
2042
|
+
}
|
|
2043
|
+
if (this.sealed) {
|
|
2044
|
+
throw conversationRuntimeUnavailableError();
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
async startBoot(starter = this.bootStarter) {
|
|
2048
|
+
await this.awaitBootAdmission();
|
|
2049
|
+
await this.beginBoot(starter);
|
|
2050
|
+
}
|
|
2051
|
+
getBootPromise() {
|
|
2052
|
+
return this.bootPending;
|
|
2053
|
+
}
|
|
2054
|
+
isBootStarted() {
|
|
2055
|
+
return this.bootStarted;
|
|
2056
|
+
}
|
|
2057
|
+
sealBoot() {
|
|
2058
|
+
this.seal();
|
|
2059
|
+
}
|
|
2060
|
+
openAdmissionIfReady() {
|
|
2061
|
+
if (this.sealed || !this.server || !this.listenerReady || !this.startupReady) {
|
|
2062
|
+
return;
|
|
2063
|
+
}
|
|
2064
|
+
this.admission.resolve();
|
|
2065
|
+
const bootStarter = this.bootStarter;
|
|
2066
|
+
if (bootStarter && !this.bootStarted) {
|
|
2067
|
+
void this.beginBoot(bootStarter)?.catch(() => void 0);
|
|
2068
|
+
}
|
|
2069
|
+
}
|
|
2070
|
+
beginBoot(starter) {
|
|
2071
|
+
if (!starter) return void 0;
|
|
2072
|
+
if (this.sealed) {
|
|
2073
|
+
return Promise.reject(conversationRuntimeUnavailableError());
|
|
2074
|
+
}
|
|
2075
|
+
if (this.bootPending) return this.bootPending;
|
|
2076
|
+
this.bootStarted = true;
|
|
2077
|
+
const pending = Promise.resolve().then(starter);
|
|
2078
|
+
const tracked = pending.finally(() => {
|
|
2079
|
+
if (this.bootPending === tracked) this.bootPending = void 0;
|
|
2080
|
+
});
|
|
2081
|
+
this.bootPending = tracked;
|
|
2082
|
+
void tracked.catch(() => void 0);
|
|
2083
|
+
return tracked;
|
|
2084
|
+
}
|
|
2085
|
+
seal(error) {
|
|
2086
|
+
if (this.sealed) return;
|
|
2087
|
+
this.sealed = true;
|
|
2088
|
+
this.admission.reject(error ?? conversationRuntimeUnavailableError());
|
|
2089
|
+
}
|
|
2090
|
+
async closeOnce(options) {
|
|
2091
|
+
this.seal();
|
|
2092
|
+
const drains = [
|
|
2093
|
+
this.startDrain(this.appDrain),
|
|
2094
|
+
this.startDrain(this.hostDrain),
|
|
2095
|
+
this.bootPending?.catch(() => void 0)
|
|
2096
|
+
].filter((value) => value !== void 0);
|
|
2097
|
+
const listenerClose = this.closeListener(
|
|
2098
|
+
options.timeoutMs ?? DEFAULT_CLOSE_TIMEOUT_MS
|
|
2099
|
+
);
|
|
2100
|
+
const results = await Promise.allSettled([...drains, listenerClose]);
|
|
2101
|
+
const errors = results.filter(
|
|
2102
|
+
(result) => result.status === "rejected"
|
|
2103
|
+
).map((result) => result.reason);
|
|
2104
|
+
if (errors.length === 1) {
|
|
2105
|
+
throw errors[0];
|
|
2106
|
+
}
|
|
2107
|
+
if (errors.length > 1) {
|
|
2108
|
+
throw new AggregateError(errors, "Serve app shutdown is incomplete.");
|
|
2109
|
+
}
|
|
2110
|
+
await this.ownership?.release();
|
|
2111
|
+
}
|
|
2112
|
+
startDrain(drain) {
|
|
2113
|
+
if (!drain) return void 0;
|
|
2114
|
+
try {
|
|
2115
|
+
return drain();
|
|
2116
|
+
} catch (error) {
|
|
2117
|
+
return Promise.reject(error);
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2120
|
+
closeListener(timeoutMs) {
|
|
2121
|
+
if (!this.server || this.listenerClosed || !this.listenerReady && !this.server.listening) {
|
|
2122
|
+
return Promise.resolve();
|
|
2123
|
+
}
|
|
2124
|
+
const server = this.server;
|
|
2125
|
+
if (!server.listening) {
|
|
2126
|
+
return this.waitForClosingListener(server, timeoutMs);
|
|
2127
|
+
}
|
|
2128
|
+
return new Promise((resolve2, reject) => {
|
|
2129
|
+
let secondaryTimer;
|
|
2130
|
+
const forceTimer = setTimeout(
|
|
2131
|
+
() => {
|
|
2132
|
+
server.closeAllConnections();
|
|
2133
|
+
secondaryTimer = setTimeout(() => {
|
|
2134
|
+
reject(new Error("The serve listener did not confirm shutdown."));
|
|
2135
|
+
}, SECONDARY_CLOSE_TIMEOUT_MS);
|
|
2136
|
+
secondaryTimer.unref();
|
|
2137
|
+
},
|
|
2138
|
+
Math.max(0, timeoutMs)
|
|
2139
|
+
);
|
|
2140
|
+
forceTimer.unref();
|
|
2141
|
+
server.close((error) => {
|
|
2142
|
+
clearTimeout(forceTimer);
|
|
2143
|
+
if (secondaryTimer) clearTimeout(secondaryTimer);
|
|
2144
|
+
if (error) reject(error);
|
|
2145
|
+
else {
|
|
2146
|
+
this.listenerClosed = true;
|
|
2147
|
+
resolve2();
|
|
2148
|
+
}
|
|
2149
|
+
});
|
|
2150
|
+
});
|
|
2151
|
+
}
|
|
2152
|
+
waitForClosingListener(server, timeoutMs) {
|
|
2153
|
+
return new Promise((resolve2, reject) => {
|
|
2154
|
+
let secondaryTimer;
|
|
2155
|
+
const onClose = /* @__PURE__ */ __name(() => {
|
|
2156
|
+
server.off("close", onClose);
|
|
2157
|
+
clearTimeout(forceTimer);
|
|
2158
|
+
if (secondaryTimer) clearTimeout(secondaryTimer);
|
|
2159
|
+
this.listenerClosed = true;
|
|
2160
|
+
resolve2();
|
|
2161
|
+
}, "onClose");
|
|
2162
|
+
const forceTimer = setTimeout(
|
|
2163
|
+
() => {
|
|
2164
|
+
server.closeAllConnections();
|
|
2165
|
+
secondaryTimer = setTimeout(() => {
|
|
2166
|
+
server.off("close", onClose);
|
|
2167
|
+
reject(new Error("The serve listener did not confirm shutdown."));
|
|
2168
|
+
}, SECONDARY_CLOSE_TIMEOUT_MS);
|
|
2169
|
+
secondaryTimer.unref();
|
|
2170
|
+
},
|
|
2171
|
+
Math.max(0, timeoutMs)
|
|
2172
|
+
);
|
|
2173
|
+
forceTimer.unref();
|
|
2174
|
+
server.once("close", onClose);
|
|
2175
|
+
if (this.listenerClosed) onClose();
|
|
2176
|
+
});
|
|
2177
|
+
}
|
|
2178
|
+
};
|
|
2179
|
+
function installServeAppLifecycle(app, lifecycle = new ServeAppLifecycleController()) {
|
|
2180
|
+
const locals = app.locals;
|
|
2181
|
+
if (locals[SERVE_APP_LIFECYCLE]) {
|
|
2182
|
+
throw new Error("Serve app lifecycle is already installed.");
|
|
2183
|
+
}
|
|
2184
|
+
locals[SERVE_APP_LIFECYCLE] = lifecycle;
|
|
2185
|
+
return lifecycle;
|
|
2186
|
+
}
|
|
2187
|
+
__name(installServeAppLifecycle, "installServeAppLifecycle");
|
|
2188
|
+
|
|
1883
2189
|
// packages/cli/src/serve/server/request-helpers.ts
|
|
1884
2190
|
init_esbuild_shims();
|
|
1885
2191
|
function sendJsonBodyParserError(res, err) {
|
|
@@ -2349,6 +2655,70 @@ __name(resolveAcpHttpEnabled, "resolveAcpHttpEnabled");
|
|
|
2349
2655
|
// packages/cli/src/serve/daemon-status.ts
|
|
2350
2656
|
init_esbuild_shims();
|
|
2351
2657
|
|
|
2658
|
+
// packages/cli/src/serve/acp-http/pre-attach-budget.ts
|
|
2659
|
+
init_esbuild_shims();
|
|
2660
|
+
var ACP_PRE_ATTACH_MAX_FRAMES_PER_STREAM = 256;
|
|
2661
|
+
var ACP_PRE_ATTACH_MAX_FRAMES_PER_CONNECTION = 1024;
|
|
2662
|
+
var ACP_PRE_ATTACH_MAX_FRAMES_GLOBAL = 4096;
|
|
2663
|
+
var ACP_PRE_ATTACH_MAX_PAYLOAD_BYTES_PER_CONNECTION = 64 * 1024 * 1024;
|
|
2664
|
+
var ACP_PRE_ATTACH_MAX_PAYLOAD_BYTES_GLOBAL = 256 * 1024 * 1024;
|
|
2665
|
+
var AcpPreAttachBudget = class {
|
|
2666
|
+
constructor(limits = {
|
|
2667
|
+
maxFrames: ACP_PRE_ATTACH_MAX_FRAMES_GLOBAL,
|
|
2668
|
+
maxBytes: ACP_PRE_ATTACH_MAX_PAYLOAD_BYTES_GLOBAL
|
|
2669
|
+
}) {
|
|
2670
|
+
this.limits = limits;
|
|
2671
|
+
}
|
|
2672
|
+
static {
|
|
2673
|
+
__name(this, "AcpPreAttachBudget");
|
|
2674
|
+
}
|
|
2675
|
+
usedFrames = 0;
|
|
2676
|
+
usedBytes = 0;
|
|
2677
|
+
pendingDeliveryFrames = 0;
|
|
2678
|
+
highWaterFrames = 0;
|
|
2679
|
+
highWaterBytes = 0;
|
|
2680
|
+
guardFailures = 0;
|
|
2681
|
+
tryReserve(bytes) {
|
|
2682
|
+
if (this.usedFrames >= this.limits.maxFrames || bytes > this.limits.maxBytes - this.usedBytes) {
|
|
2683
|
+
this.guardFailures += 1;
|
|
2684
|
+
return void 0;
|
|
2685
|
+
}
|
|
2686
|
+
this.usedFrames += 1;
|
|
2687
|
+
this.usedBytes += bytes;
|
|
2688
|
+
this.highWaterFrames = Math.max(this.highWaterFrames, this.usedFrames);
|
|
2689
|
+
this.highWaterBytes = Math.max(this.highWaterBytes, this.usedBytes);
|
|
2690
|
+
let released = false;
|
|
2691
|
+
let pendingDelivery = false;
|
|
2692
|
+
return {
|
|
2693
|
+
markPendingDelivery: /* @__PURE__ */ __name(() => {
|
|
2694
|
+
if (released || pendingDelivery) return;
|
|
2695
|
+
pendingDelivery = true;
|
|
2696
|
+
this.pendingDeliveryFrames += 1;
|
|
2697
|
+
}, "markPendingDelivery"),
|
|
2698
|
+
release: /* @__PURE__ */ __name(() => {
|
|
2699
|
+
if (released) return;
|
|
2700
|
+
released = true;
|
|
2701
|
+
if (pendingDelivery) this.pendingDeliveryFrames -= 1;
|
|
2702
|
+
this.usedFrames -= 1;
|
|
2703
|
+
this.usedBytes -= bytes;
|
|
2704
|
+
}, "release")
|
|
2705
|
+
};
|
|
2706
|
+
}
|
|
2707
|
+
recordGuardFailure() {
|
|
2708
|
+
this.guardFailures += 1;
|
|
2709
|
+
}
|
|
2710
|
+
snapshot() {
|
|
2711
|
+
return {
|
|
2712
|
+
usedFrames: this.usedFrames,
|
|
2713
|
+
usedBytes: this.usedBytes,
|
|
2714
|
+
pendingDeliveryFrames: this.pendingDeliveryFrames,
|
|
2715
|
+
highWaterFrames: this.highWaterFrames,
|
|
2716
|
+
highWaterBytes: this.highWaterBytes,
|
|
2717
|
+
guardFailures: this.guardFailures
|
|
2718
|
+
};
|
|
2719
|
+
}
|
|
2720
|
+
};
|
|
2721
|
+
|
|
2352
2722
|
// packages/cli/src/serve/daemon-memory-pressure.ts
|
|
2353
2723
|
init_esbuild_shims();
|
|
2354
2724
|
import { getHeapStatistics } from "node:v8";
|
|
@@ -2458,8 +2828,10 @@ async function buildDaemonStatusResponse(detail, input) {
|
|
|
2458
2828
|
const bridgeSnapshot = input.bridge.getDaemonStatusSnapshot();
|
|
2459
2829
|
const lastActivity = input.bridge.lastActivityAt ?? null;
|
|
2460
2830
|
const workspaceRuntimes = input.workspaceRegistry?.list();
|
|
2461
|
-
const
|
|
2831
|
+
const aggregateRuntimes = input.workspaceRegistry?.listAll?.() ?? workspaceRuntimes;
|
|
2832
|
+
const workspaceSnapshots = aggregateRuntimes?.map((runtime) => ({
|
|
2462
2833
|
workspaceCwd: runtime.workspaceCwd,
|
|
2834
|
+
internal: isInternalWorkspaceRuntime(runtime),
|
|
2463
2835
|
snapshot: runtime.bridge === input.bridge ? bridgeSnapshot : runtime.bridge.getDaemonStatusSnapshot(),
|
|
2464
2836
|
lastActivity: runtime.bridge === input.bridge ? lastActivity : runtime.bridge.lastActivityAt ?? null
|
|
2465
2837
|
})) ?? [
|
|
@@ -2485,7 +2857,7 @@ async function buildDaemonStatusResponse(detail, input) {
|
|
|
2485
2857
|
if (memoryBudget) {
|
|
2486
2858
|
const managedRuntimes = input.workspaceRegistry?.listManaged();
|
|
2487
2859
|
const activeAcpChildCount = managedRuntimes ? managedRuntimes.filter((runtime) => runtime.bridge.isChannelLive()).length : workspaceSnapshots.filter((item) => item.snapshot.channelLive).length;
|
|
2488
|
-
const registeredWorkspaceCount = input.workspaceRegistry ? input.workspaceRegistry.listEntries().length : workspaceSnapshots.length;
|
|
2860
|
+
const registeredWorkspaceCount = input.workspaceRegistry ? (input.workspaceRegistry.listAllEntries?.() ?? input.workspaceRegistry.listEntries()).length : workspaceSnapshots.length;
|
|
2489
2861
|
let childRssBytesTotal = 0;
|
|
2490
2862
|
let childRssSampled = 0;
|
|
2491
2863
|
let oldestChildReadingAgeMs = null;
|
|
@@ -2558,7 +2930,7 @@ async function buildDaemonStatusResponse(detail, input) {
|
|
|
2558
2930
|
}
|
|
2559
2931
|
derivedQueuedPromptsByWorkspace[index] = derivedQueuedPromptsForWorkspace;
|
|
2560
2932
|
}
|
|
2561
|
-
const queuedPrompts =
|
|
2933
|
+
const queuedPrompts = aggregateRuntimes?.reduce(
|
|
2562
2934
|
(sum, runtime, index) => sum + (runtime.bridge.pendingPromptTotal ?? derivedQueuedPromptsByWorkspace[index] ?? 0),
|
|
2563
2935
|
0
|
|
2564
2936
|
) ?? input.bridge.pendingPromptTotal ?? derivedQueuedPrompts;
|
|
@@ -2616,7 +2988,7 @@ async function buildDaemonStatusResponse(detail, input) {
|
|
|
2616
2988
|
full = await buildFullStatus(
|
|
2617
2989
|
input,
|
|
2618
2990
|
acpAggregate,
|
|
2619
|
-
workspaceSnapshots.flatMap((item) => item.snapshot.sessions)
|
|
2991
|
+
workspaceSnapshots.filter((item) => item.internal !== true).flatMap((item) => item.snapshot.sessions)
|
|
2620
2992
|
);
|
|
2621
2993
|
pushFullIssues(issues, full);
|
|
2622
2994
|
}
|
|
@@ -2668,6 +3040,11 @@ async function buildDaemonStatusResponse(detail, input) {
|
|
|
2668
3040
|
channelIdleTimeoutMs: bridgeSnapshot.limits.channelIdleTimeoutMs,
|
|
2669
3041
|
sessionIdleTimeoutMs: bridgeSnapshot.limits.sessionIdleTimeoutMs,
|
|
2670
3042
|
acpConnectionCap: acpSnapshot?.connectionCap ?? null,
|
|
3043
|
+
acpPreAttachMaxFramesPerStream: acpSnapshot !== void 0 ? ACP_PRE_ATTACH_MAX_FRAMES_PER_STREAM : null,
|
|
3044
|
+
acpPreAttachMaxFramesPerConnection: acpSnapshot !== void 0 ? ACP_PRE_ATTACH_MAX_FRAMES_PER_CONNECTION : null,
|
|
3045
|
+
acpPreAttachMaxFramesGlobal: acpSnapshot !== void 0 ? ACP_PRE_ATTACH_MAX_FRAMES_GLOBAL : null,
|
|
3046
|
+
acpPreAttachMaxPayloadBytesPerConnection: acpSnapshot !== void 0 ? ACP_PRE_ATTACH_MAX_PAYLOAD_BYTES_PER_CONNECTION : null,
|
|
3047
|
+
acpPreAttachMaxPayloadBytesGlobal: acpSnapshot !== void 0 ? ACP_PRE_ATTACH_MAX_PAYLOAD_BYTES_GLOBAL : null,
|
|
2671
3048
|
memory: toDaemonStatusMemoryLimits(
|
|
2672
3049
|
memoryBudget,
|
|
2673
3050
|
input.getChildHeapPolicySnapshot?.(),
|
|
@@ -2712,7 +3089,17 @@ async function buildDaemonStatusResponse(detail, input) {
|
|
|
2712
3089
|
sessionStreams: acpAggregate?.sessionStreams ?? 0,
|
|
2713
3090
|
sseStreams: acpAggregate?.sseStreams ?? 0,
|
|
2714
3091
|
wsStreams: acpAggregate?.wsStreams ?? 0,
|
|
2715
|
-
pendingClientRequests: acpAggregate?.pendingClientRequests ?? 0
|
|
3092
|
+
pendingClientRequests: acpAggregate?.pendingClientRequests ?? 0,
|
|
3093
|
+
preAttach: {
|
|
3094
|
+
bufferedConnectionFrames: acpAggregate?.bufferedConnectionFrames ?? 0,
|
|
3095
|
+
bufferedSessionFrames: acpAggregate?.bufferedSessionFrames ?? 0,
|
|
3096
|
+
pendingDeliveryFrames: acpAggregate?.pendingDeliveryFrames ?? 0,
|
|
3097
|
+
usedFrames: acpAggregate?.preAttach.usedFrames ?? 0,
|
|
3098
|
+
usedBytes: acpAggregate?.preAttach.usedBytes ?? 0,
|
|
3099
|
+
highWaterFrames: acpAggregate?.preAttach.highWaterFrames ?? 0,
|
|
3100
|
+
highWaterBytes: acpAggregate?.preAttach.highWaterBytes ?? 0,
|
|
3101
|
+
guardFailures: acpAggregate?.preAttach.guardFailures ?? 0
|
|
3102
|
+
}
|
|
2716
3103
|
}
|
|
2717
3104
|
},
|
|
2718
3105
|
rateLimit: {
|
|
@@ -2722,7 +3109,7 @@ async function buildDaemonStatusResponse(detail, input) {
|
|
|
2722
3109
|
...input.getPerfSnapshot ? { perf: input.getPerfSnapshot() } : {},
|
|
2723
3110
|
...input.getMetricsSeries ? { metrics: { series: input.getMetricsSeries() } } : {},
|
|
2724
3111
|
activity: {
|
|
2725
|
-
activePrompts:
|
|
3112
|
+
activePrompts: aggregateRuntimes?.reduce(
|
|
2726
3113
|
(sum, runtime) => sum + (runtime.bridge.activePromptCount ?? 0),
|
|
2727
3114
|
0
|
|
2728
3115
|
) ?? input.bridge.activePromptCount ?? 0,
|
|
@@ -2793,6 +3180,7 @@ async function buildFullStatus(input, acpSnapshot, sessions) {
|
|
|
2793
3180
|
]);
|
|
2794
3181
|
return {
|
|
2795
3182
|
sessions,
|
|
3183
|
+
acpMounts: acpSnapshot?.mounts ?? [],
|
|
2796
3184
|
acpConnections: acpSnapshot?.connections ?? [],
|
|
2797
3185
|
workspace: {
|
|
2798
3186
|
mcp,
|
|
@@ -2851,12 +3239,12 @@ async function withTimeout(promise, section, timeoutMs) {
|
|
|
2851
3239
|
}
|
|
2852
3240
|
__name(withTimeout, "withTimeout");
|
|
2853
3241
|
function pushRuntimeIssues(issues, acpSnapshot, acpAggregate, rateLimitHits, input, channelWorker, channelWorkers, totalAdmissionSnapshot, workspaceSnapshots) {
|
|
2854
|
-
for (const { workspaceCwd, snapshot } of workspaceSnapshots) {
|
|
3242
|
+
for (const { workspaceCwd, internal, snapshot } of workspaceSnapshots) {
|
|
2855
3243
|
if (snapshot.limits.maxSessions !== null && snapshot.limits.maxSessions > 0 && snapshot.sessionCount / snapshot.limits.maxSessions >= CAPACITY_WARNING_RATIO) {
|
|
2856
3244
|
issues.push({
|
|
2857
3245
|
code: "session_capacity_high",
|
|
2858
3246
|
severity: "warning",
|
|
2859
|
-
message: workspaceSnapshots.length > 1 ? `Workspace ${workspaceCwd} active sessions are at ${snapshot.sessionCount}/${snapshot.limits.maxSessions}.` : `Active sessions are at ${snapshot.sessionCount}/${snapshot.limits.maxSessions}.`
|
|
3247
|
+
message: workspaceSnapshots.length > 1 ? internal ? `An internal runtime's active sessions are at ${snapshot.sessionCount}/${snapshot.limits.maxSessions}.` : `Workspace ${workspaceCwd} active sessions are at ${snapshot.sessionCount}/${snapshot.limits.maxSessions}.` : `Active sessions are at ${snapshot.sessionCount}/${snapshot.limits.maxSessions}.`
|
|
2860
3248
|
});
|
|
2861
3249
|
}
|
|
2862
3250
|
}
|
|
@@ -2907,7 +3295,7 @@ function pushRuntimeIssues(issues, acpSnapshot, acpAggregate, rateLimitHits, inp
|
|
|
2907
3295
|
issues.push({
|
|
2908
3296
|
code: "acp_channel_down",
|
|
2909
3297
|
severity: "error",
|
|
2910
|
-
message: downWorkspaces.length === 1 ? `Active sessions exist but the ACP channel is not live for ${downWorkspaces[0].workspaceCwd}.` : `Active sessions exist but the ACP channel is not live for ${downWorkspaces.length} workspace(s).`
|
|
3298
|
+
message: downWorkspaces.length === 1 ? downWorkspaces[0].internal ? "Active sessions exist but the ACP channel is not live for an internal runtime." : `Active sessions exist but the ACP channel is not live for ${downWorkspaces[0].workspaceCwd}.` : `Active sessions exist but the ACP channel is not live for ${downWorkspaces.length} workspace(s).`
|
|
2911
3299
|
});
|
|
2912
3300
|
}
|
|
2913
3301
|
if (input.opts.rateLimit === true && sumRateHits(rateLimitHits) > 0) {
|
|
@@ -3510,6 +3898,13 @@ export {
|
|
|
3510
3898
|
isScratchRootCompatible,
|
|
3511
3899
|
prepareManagedScratchRoot,
|
|
3512
3900
|
createManagedScratchDirectory,
|
|
3901
|
+
ConversationRuntimeOwnershipError,
|
|
3902
|
+
conversationRuntimeInUseError,
|
|
3903
|
+
conversationRuntimeUnavailableError,
|
|
3904
|
+
conversationRuntimeOwnershipCompromisedError,
|
|
3905
|
+
conversationRootCompromisedError,
|
|
3906
|
+
ServeAppLifecycleController,
|
|
3907
|
+
installServeAppLifecycle,
|
|
3513
3908
|
sendJsonBodyParserError,
|
|
3514
3909
|
CLIENT_ID_HEADER,
|
|
3515
3910
|
MAX_CLIENT_ID_LENGTH,
|
|
@@ -3534,6 +3929,12 @@ export {
|
|
|
3534
3929
|
setRateLimiter,
|
|
3535
3930
|
getRateLimiter,
|
|
3536
3931
|
resolveAcpHttpEnabled,
|
|
3932
|
+
ACP_PRE_ATTACH_MAX_FRAMES_PER_STREAM,
|
|
3933
|
+
ACP_PRE_ATTACH_MAX_FRAMES_PER_CONNECTION,
|
|
3934
|
+
ACP_PRE_ATTACH_MAX_FRAMES_GLOBAL,
|
|
3935
|
+
ACP_PRE_ATTACH_MAX_PAYLOAD_BYTES_PER_CONNECTION,
|
|
3936
|
+
ACP_PRE_ATTACH_MAX_PAYLOAD_BYTES_GLOBAL,
|
|
3937
|
+
AcpPreAttachBudget,
|
|
3537
3938
|
toDaemonStatusMemoryLimits,
|
|
3538
3939
|
parseDaemonStatusDetail,
|
|
3539
3940
|
buildDaemonStatusResponse,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
runSideQuery
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MA2HEDVP.js";
|
|
6
6
|
import {
|
|
7
7
|
init_esbuild_shims
|
|
8
8
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -21,6 +21,20 @@ var GOAL_CHECKPOINT_CLAIM_MAX_BYTES = 16e3;
|
|
|
21
21
|
var GOAL_CHECKPOINT_SOURCE_REFERENCE_LIMIT = 32;
|
|
22
22
|
var GOAL_EVIDENCE_CATALOG_EXHAUSTED_REASON = "The current Goal revision exceeded the bounded evidence catalog. Automatic retries cannot recover. Edit or replace the Goal before resuming it.";
|
|
23
23
|
var GOAL_CHECKPOINT_REQUEST_TOO_LARGE_REASON = "The current Goal revision exceeded the checkpoint verifier request limit. Automatic retries cannot recover. Edit or replace the Goal before resuming it.";
|
|
24
|
+
function isGoalLimitKind(value) {
|
|
25
|
+
return value === "evidence_catalog" || value === "checkpoint_request";
|
|
26
|
+
}
|
|
27
|
+
__name(isGoalLimitKind, "isGoalLimitKind");
|
|
28
|
+
function goalLimitKindForReason(reason) {
|
|
29
|
+
if (reason === GOAL_EVIDENCE_CATALOG_EXHAUSTED_REASON) {
|
|
30
|
+
return "evidence_catalog";
|
|
31
|
+
}
|
|
32
|
+
if (reason === GOAL_CHECKPOINT_REQUEST_TOO_LARGE_REASON) {
|
|
33
|
+
return "checkpoint_request";
|
|
34
|
+
}
|
|
35
|
+
return void 0;
|
|
36
|
+
}
|
|
37
|
+
__name(goalLimitKindForReason, "goalLimitKindForReason");
|
|
24
38
|
var PAUSED_GOAL_SYSTEM_REMINDER = "<system-reminder>\nThe Goal is paused. Do not continue its objective unless the user resumes it. Treat this message as ordinary conversation.\n</system-reminder>";
|
|
25
39
|
function isGoalEvidenceProofKind(value) {
|
|
26
40
|
return value === "user_input" || value === "delivered_output" || value === "external_fact";
|
|
@@ -92,6 +106,7 @@ var KNOWN_RECORD_SUBTYPES = /* @__PURE__ */ new Set([
|
|
|
92
106
|
"agent_retry",
|
|
93
107
|
"file_history_snapshot",
|
|
94
108
|
"session_source",
|
|
109
|
+
"branch_checkpoint",
|
|
95
110
|
"goal_state",
|
|
96
111
|
"goal_runtime",
|
|
97
112
|
...ARTIFACT_RECORD_SUBTYPES
|
|
@@ -1359,7 +1374,8 @@ function reduceGoalControl(current, transition) {
|
|
|
1359
1374
|
objective: normalizeObjective(request.objective, snapshotOf(current)),
|
|
1360
1375
|
evidenceCursor: copyCursor(transition.cursor),
|
|
1361
1376
|
evidenceCheckpoint: void 0,
|
|
1362
|
-
lastReason: void 0
|
|
1377
|
+
lastReason: void 0,
|
|
1378
|
+
limitKind: void 0
|
|
1363
1379
|
});
|
|
1364
1380
|
}
|
|
1365
1381
|
if (request.action === "pause") {
|
|
@@ -1383,7 +1399,7 @@ function reduceGoalControl(current, transition) {
|
|
|
1383
1399
|
snapshotOf(current)
|
|
1384
1400
|
);
|
|
1385
1401
|
}
|
|
1386
|
-
if (current.status === "usage_limited" && (current
|
|
1402
|
+
if (current.status === "usage_limited" && isEvidenceLimited(current)) {
|
|
1387
1403
|
throw new GoalInvalidTransitionError(
|
|
1388
1404
|
"An evidence-limited Goal cannot be resumed; edit or replace the Goal first",
|
|
1389
1405
|
snapshotOf(current)
|
|
@@ -1485,6 +1501,10 @@ function normalizeObjective(objective, current) {
|
|
|
1485
1501
|
return normalized;
|
|
1486
1502
|
}
|
|
1487
1503
|
__name(normalizeObjective, "normalizeObjective");
|
|
1504
|
+
function isEvidenceLimited(goal) {
|
|
1505
|
+
return goal.limitKind !== void 0 || goal.lastReason !== void 0 && goalLimitKindForReason(goal.lastReason) !== void 0;
|
|
1506
|
+
}
|
|
1507
|
+
__name(isEvidenceLimited, "isEvidenceLimited");
|
|
1488
1508
|
function transitionGoal(goal, now, changes) {
|
|
1489
1509
|
return {
|
|
1490
1510
|
...goal,
|
|
@@ -1514,8 +1534,9 @@ function parseGoalRecord(value) {
|
|
|
1514
1534
|
"createdAt",
|
|
1515
1535
|
"updatedAt",
|
|
1516
1536
|
"evidenceCheckpoint",
|
|
1517
|
-
"lastReason"
|
|
1518
|
-
|
|
1537
|
+
"lastReason",
|
|
1538
|
+
"limitKind"
|
|
1539
|
+
]) || typeof value["goalId"] !== "string" || !value["goalId"] || !isNonNegativeInteger(value["revision"]) || value["revision"] === 0 || typeof value["objective"] !== "string" || !value["objective"].trim() || !isGoalStatus(value["status"]) || !isTranscriptCursor(value["evidenceCursor"]) || !isNonNegativeInteger(value["turnCount"]) || !isNonNegativeNumber(value["activeTimeMs"]) || !isFiniteNumber(value["createdAt"]) || !isFiniteNumber(value["updatedAt"]) || !isGoalEvidenceCheckpoint(value["evidenceCheckpoint"]) || value["lastReason"] !== void 0 && typeof value["lastReason"] !== "string" || value["limitKind"] !== void 0 && (!isGoalLimitKind(value["limitKind"]) || value["status"] !== "usage_limited")) {
|
|
1519
1540
|
return void 0;
|
|
1520
1541
|
}
|
|
1521
1542
|
if (value["evidenceCheckpoint"] && value["evidenceCursor"].recordId !== value["evidenceCheckpoint"].checkpointId) {
|
|
@@ -1534,7 +1555,8 @@ function parseGoalRecord(value) {
|
|
|
1534
1555
|
...value["evidenceCheckpoint"] === void 0 ? {} : {
|
|
1535
1556
|
evidenceCheckpoint: structuredClone(value["evidenceCheckpoint"])
|
|
1536
1557
|
},
|
|
1537
|
-
...value["lastReason"] === void 0 ? {} : { lastReason: value["lastReason"] }
|
|
1558
|
+
...value["lastReason"] === void 0 ? {} : { lastReason: value["lastReason"] },
|
|
1559
|
+
...value["limitKind"] === void 0 ? {} : { limitKind: value["limitKind"] }
|
|
1538
1560
|
};
|
|
1539
1561
|
}
|
|
1540
1562
|
__name(parseGoalRecord, "parseGoalRecord");
|
|
@@ -2332,7 +2354,8 @@ function createGoalRuntime(options) {
|
|
|
2332
2354
|
status: "usage_limited",
|
|
2333
2355
|
activeTimeMs: elapsedActiveTime(snapshot.goal, now),
|
|
2334
2356
|
updatedAt: now,
|
|
2335
|
-
lastReason: outcome.reason
|
|
2357
|
+
lastReason: outcome.reason,
|
|
2358
|
+
...outcome.limitKind === void 0 ? {} : { limitKind: outcome.limitKind }
|
|
2336
2359
|
},
|
|
2337
2360
|
activity: "idle"
|
|
2338
2361
|
};
|
|
@@ -2435,7 +2458,11 @@ function createGoalRuntime(options) {
|
|
|
2435
2458
|
} catch (error) {
|
|
2436
2459
|
if (attempt.controller.signal.aborted) return;
|
|
2437
2460
|
if (error instanceof InvalidGoalEvidenceReferenceError) {
|
|
2438
|
-
outcome = error.code === "catalog_truncated" ? {
|
|
2461
|
+
outcome = error.code === "catalog_truncated" ? {
|
|
2462
|
+
kind: "usage_limited",
|
|
2463
|
+
reason: error.message,
|
|
2464
|
+
limitKind: "evidence_catalog"
|
|
2465
|
+
} : {
|
|
2439
2466
|
kind: "decision",
|
|
2440
2467
|
result: { decision: "reject", reason: error.message }
|
|
2441
2468
|
};
|
|
@@ -2482,7 +2509,7 @@ function createGoalRuntime(options) {
|
|
|
2482
2509
|
}
|
|
2483
2510
|
});
|
|
2484
2511
|
}, "finishCheckpointCheck");
|
|
2485
|
-
const recordCheckpointFailure = /* @__PURE__ */ __name(async (attempt, reason) => {
|
|
2512
|
+
const recordCheckpointFailure = /* @__PURE__ */ __name(async (attempt, reason, limitKind) => {
|
|
2486
2513
|
await enqueue(async () => {
|
|
2487
2514
|
if (!isCurrentCheckpointAttempt(attempt) || !snapshot.goal) return;
|
|
2488
2515
|
const now = Date.now();
|
|
@@ -2493,7 +2520,8 @@ function createGoalRuntime(options) {
|
|
|
2493
2520
|
status: "usage_limited",
|
|
2494
2521
|
activeTimeMs: elapsedActiveTime(snapshot.goal, now),
|
|
2495
2522
|
updatedAt: now,
|
|
2496
|
-
lastReason: reason
|
|
2523
|
+
lastReason: reason,
|
|
2524
|
+
...limitKind === void 0 ? {} : { limitKind }
|
|
2497
2525
|
},
|
|
2498
2526
|
activity: "idle"
|
|
2499
2527
|
};
|
|
@@ -2569,7 +2597,8 @@ function createGoalRuntime(options) {
|
|
|
2569
2597
|
if (window.truncated) {
|
|
2570
2598
|
await recordCheckpointFailure(
|
|
2571
2599
|
attempt,
|
|
2572
|
-
GOAL_EVIDENCE_CATALOG_EXHAUSTED_REASON
|
|
2600
|
+
GOAL_EVIDENCE_CATALOG_EXHAUSTED_REASON,
|
|
2601
|
+
"evidence_catalog"
|
|
2573
2602
|
);
|
|
2574
2603
|
return;
|
|
2575
2604
|
}
|
|
@@ -2604,7 +2633,8 @@ function createGoalRuntime(options) {
|
|
|
2604
2633
|
if (error instanceof GoalCheckpointVerifierInputTooLargeError) {
|
|
2605
2634
|
await recordCheckpointFailure(
|
|
2606
2635
|
attempt,
|
|
2607
|
-
GOAL_CHECKPOINT_REQUEST_TOO_LARGE_REASON
|
|
2636
|
+
GOAL_CHECKPOINT_REQUEST_TOO_LARGE_REASON,
|
|
2637
|
+
"checkpoint_request"
|
|
2608
2638
|
);
|
|
2609
2639
|
return;
|
|
2610
2640
|
}
|