tianshu-harness 3.26.0 → 3.27.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/README.en.md +8 -4
- package/README.ja.md +8 -4
- package/README.ko.md +8 -4
- package/README.md +8 -0
- package/dist/{account-login-V2C74D3A.js → account-login-KW7KXROU.js} +1 -1
- package/dist/account-status-DK2PETHW.js +1 -1
- package/dist/agent/worker-process/child.js +82 -81
- package/dist/{chain-ULQVMWCK.js → chain-SFW6YTIG.js} +2 -2
- package/dist/{checkpoint-MHV22C3Y.js → checkpoint-EVQWU2AC.js} +2 -2
- package/dist/{chunk-XVJ5IU5T.js → chunk-2CIA45NF.js} +56 -19
- package/dist/{chunk-2XEZTAO7.js → chunk-2FRRZ5K6.js} +7 -7
- package/dist/{chunk-A5MNH4ER.js → chunk-2ZAZTVNZ.js} +30 -1
- package/dist/{chunk-5CKVPSM7.js → chunk-3GN57FKM.js} +1 -1
- package/dist/{chunk-7JOI4AOR.js → chunk-3L6VC5CO.js} +1 -1
- package/dist/{chunk-NHKU72QB.js → chunk-4JI3L5WH.js} +1345 -445
- package/dist/{chunk-RHN27L4N.js → chunk-4TYBQRSL.js} +4 -4
- package/dist/{chunk-3X6C5CWM.js → chunk-5KDRFFYH.js} +1 -1
- package/dist/chunk-6ANPK33S.js +26 -0
- package/dist/{chunk-IMUWOO4U.js → chunk-6TRMNFB6.js} +12 -4
- package/dist/{chunk-ZU7JZCVP.js → chunk-76IBOWQR.js} +17 -67
- package/dist/{chunk-WL6EBC2H.js → chunk-7ZQR5SJ6.js} +1 -1
- package/dist/{chunk-TAMZQGHD.js → chunk-A56IBV6E.js} +2 -2
- package/dist/{chunk-YLSSV5R5.js → chunk-BO5MRC5F.js} +1 -1
- package/dist/{chunk-IGYGKWQZ.js → chunk-BXNWVP45.js} +26 -26
- package/dist/{chunk-Q4IPJKZY.js → chunk-CA4PCUY7.js} +75 -21
- package/dist/{chunk-DLI3XXD7.js → chunk-CM3GNP3F.js} +1 -1
- package/dist/{chunk-RMYAWBZO.js → chunk-CWURIDZI.js} +8 -8
- package/dist/{chunk-4AC4ODED.js → chunk-DRNEQMPD.js} +146 -31
- package/dist/{chunk-RF4XIOKJ.js → chunk-DXY5P57D.js} +1492 -274
- package/dist/{chunk-D2TCGRSX.js → chunk-ESPUVUT4.js} +3 -1
- package/dist/{chunk-ACTXML63.js → chunk-EXKORBKC.js} +124 -5
- package/dist/{chunk-FN4Y6A3Y.js → chunk-FEPR35TK.js} +52 -51
- package/dist/{chunk-SO5OGJSX.js → chunk-FWO5JAWP.js} +75 -21
- package/dist/{chunk-ED5GAGGL.js → chunk-GR2LY3D5.js} +1 -1
- package/dist/{chunk-VEFQEWKZ.js → chunk-H2UK46BU.js} +2 -2
- package/dist/{chunk-CJA4A4VK.js → chunk-IJ6JWKGB.js} +1 -1
- package/dist/{chunk-2FDLEIP5.js → chunk-INACHRXN.js} +290 -463
- package/dist/{chunk-7DN2SGTQ.js → chunk-IPAZZLYS.js} +5 -5
- package/dist/chunk-IRZISA2G.js +74 -0
- package/dist/{chunk-75WLEQMG.js → chunk-IWVLQJIT.js} +3 -3
- package/dist/{chunk-IERO23KC.js → chunk-JCI57APA.js} +7 -7
- package/dist/chunk-KIV4AGPM.js +119 -0
- package/dist/{chunk-5WNQAEKR.js → chunk-N2FYSHGF.js} +1 -1
- package/dist/{chunk-Y52MV6TV.js → chunk-N65LICMZ.js} +94 -12
- package/dist/{chunk-ZAPPIRAR.js → chunk-NSRCNWFI.js} +9 -9
- package/dist/{chunk-RAXBAWRN.js → chunk-P3YG3HEO.js} +1 -1
- package/dist/{chunk-4ZCZHZNS.js → chunk-P6RBPB5S.js} +389 -72
- package/dist/{chunk-JAKBU4WB.js → chunk-PAIHG2UD.js} +6 -6
- package/dist/{chunk-ZU6SKA4R.js → chunk-PI37ALQR.js} +8 -8
- package/dist/{chunk-IGL6KULT.js → chunk-PJWIC4TW.js} +4 -4
- package/dist/{chunk-5IWJYCCI.js → chunk-QBQS7VL6.js} +1 -1
- package/dist/{chunk-WP75DGGE.js → chunk-QL7XQBU6.js} +192 -35
- package/dist/{chunk-HCI6KVJP.js → chunk-RE6DPG2X.js} +1 -1
- package/dist/{chunk-BEUHEDEQ.js → chunk-RU5ST7OA.js} +200 -85
- package/dist/{chunk-INUNFYHR.js → chunk-SADUBMAH.js} +25 -13
- package/dist/{chunk-KX5T6BRB.js → chunk-SDGVJ554.js} +14 -14
- package/dist/{chunk-RIDZZQSL.js → chunk-SEEFGFCZ.js} +1 -1
- package/dist/{chunk-STVUSIGK.js → chunk-SSBOZKER.js} +1 -1
- package/dist/{chunk-ZICENOLP.js → chunk-SUOXBSW3.js} +34 -7
- package/dist/{chunk-HPBNI6UW.js → chunk-SXNZ3VPO.js} +11 -11
- package/dist/{chunk-CB5SLLKR.js → chunk-TP5GXQKN.js} +2 -2
- package/dist/{chunk-5TQ3JYBU.js → chunk-TPFNB6PT.js} +1 -1
- package/dist/{chunk-RHD4TC7J.js → chunk-TYHWWRPA.js} +4 -4
- package/dist/{chunk-P46RYAGV.js → chunk-U7DF3HSB.js} +99 -19
- package/dist/{chunk-TI4GSEL5.js → chunk-UAS2P5YN.js} +1 -1
- package/dist/{chunk-625BTY4K.js → chunk-URRZCCIO.js} +325 -99
- package/dist/{chunk-FPZD277C.js → chunk-VNLKEACR.js} +137 -95
- package/dist/{chunk-3HBJSIN6.js → chunk-WFW7X2XH.js} +4 -4
- package/dist/{chunk-C3UBKKIP.js → chunk-ZKFBH4JM.js} +75 -48
- package/dist/cli/entry.js +1 -1
- package/dist/{connector-LHW64OVN.js → connector-MAZVNKBV.js} +3 -3
- package/dist/{context-G4EHVN6I.js → context-SZWJHKQC.js} +13 -13
- package/dist/{council-convene-BGZBBV7S.js → council-convene-2DU64ADZ.js} +21 -21
- package/dist/{create-agent-config-Q7CHC6YY.js → create-agent-config-ZA3MO2HK.js} +22 -22
- package/dist/{default-registry-7ZHBOOZU.js → default-registry-VLKHDRUT.js} +39 -38
- package/dist/{deliver-task-YSNEWH2V.js → deliver-task-6A3DVXCG.js} +22 -21
- package/dist/{delivery-gate-v2-TKOWBCIW.js → delivery-gate-v2-WE65XQ2L.js} +9 -9
- package/dist/{domain-knowledge-store-DDZ3F4J7.js → domain-knowledge-store-BUSWJNFC.js} +3 -3
- package/dist/{fetch-core-R6XAVA7D.js → fetch-core-KHXET7ZJ.js} +4 -4
- package/dist/{galaxy-VSZAOFXB.js → galaxy-V35QYHDR.js} +49 -48
- package/dist/{goal-criteria-ZGGPZ2CR.js → goal-criteria-D2NLKTJO.js} +14 -14
- package/dist/{goal-persist-XWY2GDQX.js → goal-persist-NRCHF6WM.js} +2 -2
- package/dist/{headless-coordinator-JD3NI75J.js → headless-coordinator-BICCMMUJ.js} +49 -48
- package/dist/{login-flow-XC5XOS6H.js → login-flow-TESFLU3H.js} +6 -6
- package/dist/{loop-72QUTRDE.js → loop-KGLDXEHU.js} +40 -39
- package/dist/main.js +121 -112
- package/dist/{manager-3DPZOS7T.js → manager-KEAMKRUQ.js} +6 -6
- package/dist/{manager-ECG233RJ.js → manager-UASNPP5J.js} +7 -7
- package/dist/{meridian-indexer-ZIW363L7.js → meridian-indexer-2OSWGPLB.js} +2 -2
- package/dist/{path-grants-A3J74VV5.js → path-grants-IMIWG5MJ.js} +2 -2
- package/dist/{plugin-loader-YHPYO4H2.js → plugin-loader-CLSBWW57.js} +5 -5
- package/dist/{project-trust-AWUEO7FF.js → project-trust-VGFYHJL3.js} +2 -2
- package/dist/{provider-cli-KTWOZLWL.js → provider-cli-DNQB5JPG.js} +16 -16
- package/dist/{serve-5FW2MR3R.js → serve-72DJIPUR.js} +79 -76
- package/dist/{serve-agent-5LLMMSDJ.js → serve-agent-RW6S3C3G.js} +229 -107
- package/dist/{session-persist-FG5PBYJL.js → session-persist-EZJZAM4V.js} +4 -3
- package/dist/{spawn-git-65PTOEIB.js → spawn-git-W4MM4RCI.js} +8 -8
- package/dist/{starflow-RS62GDM7.js → starflow-P7ZFXJHD.js} +10 -10
- package/dist/{team-orchestrate-X6CGZZNJ.js → team-orchestrate-2XRCAX76.js} +20 -20
- package/dist/{todo-HTHCAUYF.js → todo-KJBCXBN2.js} +6 -5
- package/dist/{tool-preset-AAKOFDTZ.js → tool-preset-DOFMAXN4.js} +6 -6
- package/dist/{wave-checkpoint-MUNCP4U6.js → wave-checkpoint-DYBNFNBE.js} +8 -8
- package/dist/{web-cli-VZN5JP5W.js → web-cli-IWVBFUNL.js} +3 -3
- package/dist/{web-search-ZEQ63NWS.js → web-search-62XPBLMB.js} +5 -5
- package/dist/{worktree-baseline-O5NCU6M2.js → worktree-baseline-MA35E556.js} +1 -1
- package/package.json +1 -1
- package/dist/chunk-6S5FPUS7.js +0 -21
- package/dist/{chunk-J6ESSM47.js → chunk-37OXTQCP.js} +3 -3
- package/dist/{chunk-BBT73QEI.js → chunk-VUVVHZPO.js} +3 -3
package/README.en.md
CHANGED
|
@@ -27,6 +27,14 @@
|
|
|
27
27
|
<img src="https://img.shields.io/badge/TypeScript-Strict-blue?style=for-the-badge&logo=typescript" alt="TypeScript">
|
|
28
28
|
<img src="https://img.shields.io/badge/Tests-16%2C000%2B%20Passed-green?style=for-the-badge&logo=testinglibrary" alt="Tests">
|
|
29
29
|
<a href="https://discord.gg/XjWTATCHB"><img src="https://img.shields.io/badge/Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Discord"></a>
|
|
30
|
+
<a href="https://atomgit.com/huiliyi37/Tianshu-harness"><img src="https://atomgit.com/huiliyi37/Tianshu-harness/star/badge.svg" alt="AtomGit Star"></a>
|
|
31
|
+
<a href="https://github.com/huiliyi37/Tianshu-harness/releases"><img src="https://img.shields.io/github/downloads/huiliyi37/Tianshu-harness/total?logo=github&label=downloads" alt="GitHub downloads"></a>
|
|
32
|
+
<a href="https://www.npmjs.com/package/tianshu-tui"><img src="https://img.shields.io/npm/dm/tianshu-tui?label=npm%20tianshu-tui" alt="npm tianshu-tui downloads"></a>
|
|
33
|
+
<a href="https://www.npmjs.com/package/tianshu-harness"><img src="https://img.shields.io/npm/dm/tianshu-harness?label=npm%20tianshu-harness" alt="npm tianshu-harness downloads"></a>
|
|
34
|
+
</p>
|
|
35
|
+
|
|
36
|
+
<p align="center">
|
|
37
|
+
<a href="https://trendshift.io/repositories/100440" target="_blank"><img src="https://trendshift.io/api/badge/trendshift/repositories/100440/daily?language=TypeScript" alt="Trendshift: TypeScript repository of the day" width="250" height="55"></a>
|
|
30
38
|
</p>
|
|
31
39
|
|
|
32
40
|
---
|
|
@@ -995,10 +1003,6 @@ Write only the fields you want to override; defaults are deep-merged. Full schem
|
|
|
995
1003
|
"enabled": true,
|
|
996
1004
|
"autoThreshold": 800000 // token threshold that triggers auto-compaction
|
|
997
1005
|
},
|
|
998
|
-
"cache": {
|
|
999
|
-
"enabled": true, // master prefix-cache switch
|
|
1000
|
-
"showHitRate": true // show hit rate in the GlanceBar
|
|
1001
|
-
},
|
|
1002
1006
|
"tools": {
|
|
1003
1007
|
"preset": "frontend" // minimal | frontend (default) | full | taiyi
|
|
1004
1008
|
},
|
package/README.ja.md
CHANGED
|
@@ -31,6 +31,14 @@
|
|
|
31
31
|
<img src="https://img.shields.io/badge/TypeScript-Strict-blue?style=for-the-badge&logo=typescript" alt="TypeScript">
|
|
32
32
|
<img src="https://img.shields.io/badge/Tests-16%2C000%2B%20Passed-green?style=for-the-badge&logo=testinglibrary" alt="Tests">
|
|
33
33
|
<a href="https://discord.gg/XjWTATCHB"><img src="https://img.shields.io/badge/Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Discord"></a>
|
|
34
|
+
<a href="https://atomgit.com/huiliyi37/Tianshu-harness"><img src="https://atomgit.com/huiliyi37/Tianshu-harness/star/badge.svg" alt="AtomGit Star"></a>
|
|
35
|
+
<a href="https://github.com/huiliyi37/Tianshu-harness/releases"><img src="https://img.shields.io/github/downloads/huiliyi37/Tianshu-harness/total?logo=github&label=downloads" alt="GitHub downloads"></a>
|
|
36
|
+
<a href="https://www.npmjs.com/package/tianshu-tui"><img src="https://img.shields.io/npm/dm/tianshu-tui?label=npm%20tianshu-tui" alt="npm tianshu-tui downloads"></a>
|
|
37
|
+
<a href="https://www.npmjs.com/package/tianshu-harness"><img src="https://img.shields.io/npm/dm/tianshu-harness?label=npm%20tianshu-harness" alt="npm tianshu-harness downloads"></a>
|
|
38
|
+
</p>
|
|
39
|
+
|
|
40
|
+
<p align="center">
|
|
41
|
+
<a href="https://trendshift.io/repositories/100440" target="_blank"><img src="https://trendshift.io/api/badge/trendshift/repositories/100440/daily?language=TypeScript" alt="Trendshift: TypeScript repository of the day" width="250" height="55"></a>
|
|
34
42
|
</p>
|
|
35
43
|
|
|
36
44
|
---
|
|
@@ -1104,10 +1112,6 @@ tianshu logs open desktop # sidecar ログディレクトリを開く
|
|
|
1104
1112
|
"enabled": true,
|
|
1105
1113
|
"autoThreshold": 800000 // 自動圧縮をトリガーする token 閾値
|
|
1106
1114
|
},
|
|
1107
|
-
"cache": {
|
|
1108
|
-
"enabled": true, // プレフィックスキャッシュの総合スイッチ
|
|
1109
|
-
"showHitRate": true // GlanceBar にヒット率を表示
|
|
1110
|
-
},
|
|
1111
1115
|
"tools": {
|
|
1112
1116
|
"preset": "frontend" // minimal | frontend(デフォルト)| full | taiyi
|
|
1113
1117
|
},
|
package/README.ko.md
CHANGED
|
@@ -31,6 +31,14 @@
|
|
|
31
31
|
<img src="https://img.shields.io/badge/TypeScript-Strict-blue?style=for-the-badge&logo=typescript" alt="TypeScript">
|
|
32
32
|
<img src="https://img.shields.io/badge/Tests-16%2C000%2B%20Passed-green?style=for-the-badge&logo=testinglibrary" alt="Tests">
|
|
33
33
|
<a href="https://discord.gg/XjWTATCHB"><img src="https://img.shields.io/badge/Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Discord"></a>
|
|
34
|
+
<a href="https://atomgit.com/huiliyi37/Tianshu-harness"><img src="https://atomgit.com/huiliyi37/Tianshu-harness/star/badge.svg" alt="AtomGit Star"></a>
|
|
35
|
+
<a href="https://github.com/huiliyi37/Tianshu-harness/releases"><img src="https://img.shields.io/github/downloads/huiliyi37/Tianshu-harness/total?logo=github&label=downloads" alt="GitHub downloads"></a>
|
|
36
|
+
<a href="https://www.npmjs.com/package/tianshu-tui"><img src="https://img.shields.io/npm/dm/tianshu-tui?label=npm%20tianshu-tui" alt="npm tianshu-tui downloads"></a>
|
|
37
|
+
<a href="https://www.npmjs.com/package/tianshu-harness"><img src="https://img.shields.io/npm/dm/tianshu-harness?label=npm%20tianshu-harness" alt="npm tianshu-harness downloads"></a>
|
|
38
|
+
</p>
|
|
39
|
+
|
|
40
|
+
<p align="center">
|
|
41
|
+
<a href="https://trendshift.io/repositories/100440" target="_blank"><img src="https://trendshift.io/api/badge/trendshift/repositories/100440/daily?language=TypeScript" alt="Trendshift: TypeScript repository of the day" width="250" height="55"></a>
|
|
34
42
|
</p>
|
|
35
43
|
|
|
36
44
|
---
|
|
@@ -1108,10 +1116,6 @@ tianshu logs open desktop # 打开 sidecar 日志目录(GUI 起不
|
|
|
1108
1116
|
"enabled": true,
|
|
1109
1117
|
"autoThreshold": 800000 // 触发自动压缩的 token 阈值
|
|
1110
1118
|
},
|
|
1111
|
-
"cache": {
|
|
1112
|
-
"enabled": true, // 前缀缓存总开关
|
|
1113
|
-
"showHitRate": true // GlanceBar 显示命中率
|
|
1114
|
-
},
|
|
1115
1119
|
"tools": {
|
|
1116
1120
|
"preset": "frontend" // minimal | frontend(默认)| full | taiyi
|
|
1117
1121
|
},
|
package/README.md
CHANGED
|
@@ -31,6 +31,14 @@
|
|
|
31
31
|
<img src="https://img.shields.io/badge/TypeScript-Strict-blue?style=for-the-badge&logo=typescript" alt="TypeScript">
|
|
32
32
|
<img src="https://img.shields.io/badge/Tests-16%2C000%2B%20Passed-green?style=for-the-badge&logo=testinglibrary" alt="Tests">
|
|
33
33
|
<a href="https://discord.gg/XjWTATCHB"><img src="https://img.shields.io/badge/Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Discord"></a>
|
|
34
|
+
<a href="https://atomgit.com/huiliyi37/Tianshu-harness"><img src="https://atomgit.com/huiliyi37/Tianshu-harness/star/badge.svg" alt="AtomGit Star"></a>
|
|
35
|
+
<a href="https://github.com/huiliyi37/Tianshu-harness/releases"><img src="https://img.shields.io/github/downloads/huiliyi37/Tianshu-harness/total?logo=github&label=downloads" alt="GitHub downloads"></a>
|
|
36
|
+
<a href="https://www.npmjs.com/package/tianshu-tui"><img src="https://img.shields.io/npm/dm/tianshu-tui?label=npm%20tianshu-tui" alt="npm tianshu-tui downloads"></a>
|
|
37
|
+
<a href="https://www.npmjs.com/package/tianshu-harness"><img src="https://img.shields.io/npm/dm/tianshu-harness?label=npm%20tianshu-harness" alt="npm tianshu-harness downloads"></a>
|
|
38
|
+
</p>
|
|
39
|
+
|
|
40
|
+
<p align="center">
|
|
41
|
+
<a href="https://trendshift.io/repositories/100440" target="_blank"><img src="https://trendshift.io/api/badge/trendshift/repositories/100440/daily?language=TypeScript" alt="Trendshift: TypeScript repository of the day" width="250" height="55"></a>
|
|
34
42
|
</p>
|
|
35
43
|
|
|
36
44
|
---
|
|
@@ -15,7 +15,7 @@ async function handleAccountLogin(app) {
|
|
|
15
15
|
saveAccountToken,
|
|
16
16
|
isTerminalPollStatus
|
|
17
17
|
} = await import("./account-3FMZDNGA.js");
|
|
18
|
-
const { openInBrowser } = await import("./login-flow-
|
|
18
|
+
const { openInBrowser } = await import("./login-flow-TESFLU3H.js");
|
|
19
19
|
const { rivetHome } = await import("./paths-PZCXDIBR.js");
|
|
20
20
|
app.commitStatic("\u6B63\u5728\u5411\u5929\u67A2\u7533\u8BF7\u8BBE\u5907\u6388\u6743\u2026");
|
|
21
21
|
let created;
|
|
@@ -11,8 +11,8 @@ import "./chunk-AE4JGSIT.js";
|
|
|
11
11
|
import "./chunk-ADIVZ2D5.js";
|
|
12
12
|
import "./chunk-2VYRLULP.js";
|
|
13
13
|
import "./chunk-G4FU2DI5.js";
|
|
14
|
-
import "./chunk-TI5PMDHA.js";
|
|
15
14
|
import "./chunk-P5KJURUR.js";
|
|
15
|
+
import "./chunk-TI5PMDHA.js";
|
|
16
16
|
import "./chunk-JXVN7D4K.js";
|
|
17
17
|
import "./chunk-5GGOGLSN.js";
|
|
18
18
|
export {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire as __rivetCreateRequire } from 'node:module'; const require = __rivetCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
buildModelCards
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-CWURIDZI.js";
|
|
6
6
|
import {
|
|
7
7
|
CHILD_TICK_INTERVAL_MS,
|
|
8
8
|
buildReviewOverrideState,
|
|
@@ -10,146 +10,147 @@ import {
|
|
|
10
10
|
createFrameDecoder,
|
|
11
11
|
createInteractiveToolRegistry,
|
|
12
12
|
encodeFrame
|
|
13
|
-
} from "../../chunk-
|
|
14
|
-
import "../../chunk-DZ6UOJ5D.js";
|
|
15
|
-
import "../../chunk-HPBNI6UW.js";
|
|
16
|
-
import "../../chunk-FN4Y6A3Y.js";
|
|
17
|
-
import "../../chunk-5IWJYCCI.js";
|
|
18
|
-
import "../../chunk-2XN7PM4N.js";
|
|
19
|
-
import "../../chunk-SAXK6LVF.js";
|
|
20
|
-
import "../../chunk-D2TCGRSX.js";
|
|
21
|
-
import "../../chunk-RIDZZQSL.js";
|
|
13
|
+
} from "../../chunk-INACHRXN.js";
|
|
22
14
|
import {
|
|
23
15
|
DomainKnowledgeStore
|
|
24
|
-
} from "../../chunk-
|
|
16
|
+
} from "../../chunk-TPFNB6PT.js";
|
|
25
17
|
import "../../chunk-KX22RD6R.js";
|
|
26
|
-
import "../../chunk-
|
|
18
|
+
import "../../chunk-DZ6UOJ5D.js";
|
|
19
|
+
import "../../chunk-NSRCNWFI.js";
|
|
20
|
+
import "../../chunk-SXNZ3VPO.js";
|
|
21
|
+
import "../../chunk-SDGVJ554.js";
|
|
22
|
+
import "../../chunk-A56IBV6E.js";
|
|
23
|
+
import "../../chunk-FEPR35TK.js";
|
|
24
|
+
import "../../chunk-QBQS7VL6.js";
|
|
25
|
+
import "../../chunk-2XN7PM4N.js";
|
|
26
|
+
import "../../chunk-SAXK6LVF.js";
|
|
27
|
+
import "../../chunk-ESPUVUT4.js";
|
|
28
|
+
import "../../chunk-SEEFGFCZ.js";
|
|
29
|
+
import "../../chunk-RU5ST7OA.js";
|
|
27
30
|
import "../../chunk-DTYYBHDD.js";
|
|
28
|
-
import "../../chunk-
|
|
31
|
+
import "../../chunk-WFW7X2XH.js";
|
|
32
|
+
import "../../chunk-WUF5IOFK.js";
|
|
33
|
+
import "../../chunk-PI37ALQR.js";
|
|
29
34
|
import {
|
|
30
35
|
DelegationCoordinator,
|
|
31
36
|
runWorkerSession
|
|
32
|
-
} from "../../chunk-
|
|
37
|
+
} from "../../chunk-BXNWVP45.js";
|
|
33
38
|
import "../../chunk-2X4QWTJ7.js";
|
|
39
|
+
import "../../chunk-7ZQR5SJ6.js";
|
|
40
|
+
import "../../chunk-AERM3VGP.js";
|
|
34
41
|
import {
|
|
35
42
|
filterToolRegistry
|
|
36
43
|
} from "../../chunk-VAV6JHGO.js";
|
|
37
|
-
import "../../chunk-
|
|
44
|
+
import "../../chunk-JCI57APA.js";
|
|
45
|
+
import "../../chunk-3GN57FKM.js";
|
|
38
46
|
import "../../chunk-ZDIFBJFT.js";
|
|
39
|
-
import "../../chunk-ZAPPIRAR.js";
|
|
40
|
-
import "../../chunk-KX5T6BRB.js";
|
|
41
|
-
import "../../chunk-WL6EBC2H.js";
|
|
42
|
-
import "../../chunk-AERM3VGP.js";
|
|
43
47
|
import "../../chunk-RK3JHWPT.js";
|
|
44
48
|
import "../../chunk-K2JLA7G6.js";
|
|
45
49
|
import "../../chunk-S4K4L6IM.js";
|
|
46
|
-
import "../../chunk-
|
|
47
|
-
import "../../chunk-
|
|
48
|
-
import "../../chunk-
|
|
49
|
-
import "../../chunk-
|
|
50
|
-
import "../../chunk-
|
|
51
|
-
import "../../chunk-
|
|
52
|
-
import "../../chunk-3HBJSIN6.js";
|
|
53
|
-
import "../../chunk-75WLEQMG.js";
|
|
54
|
-
import "../../chunk-WUF5IOFK.js";
|
|
55
|
-
import "../../chunk-2HDP7RMR.js";
|
|
56
|
-
import "../../chunk-NHKU72QB.js";
|
|
57
|
-
import "../../chunk-JAKBU4WB.js";
|
|
58
|
-
import "../../chunk-RAXBAWRN.js";
|
|
59
|
-
import "../../chunk-C3UBKKIP.js";
|
|
50
|
+
import "../../chunk-4JI3L5WH.js";
|
|
51
|
+
import "../../chunk-P3YG3HEO.js";
|
|
52
|
+
import "../../chunk-N2FYSHGF.js";
|
|
53
|
+
import "../../chunk-PAIHG2UD.js";
|
|
54
|
+
import "../../chunk-5KDRFFYH.js";
|
|
55
|
+
import "../../chunk-ZKFBH4JM.js";
|
|
60
56
|
import "../../chunk-BUIMGNDD.js";
|
|
61
|
-
import "../../chunk-
|
|
62
|
-
import "../../chunk-RHN27L4N.js";
|
|
63
|
-
import "../../chunk-5WNQAEKR.js";
|
|
64
|
-
import "../../chunk-3X6C5CWM.js";
|
|
57
|
+
import "../../chunk-IRZISA2G.js";
|
|
65
58
|
import "../../chunk-ZVUCNFTE.js";
|
|
66
59
|
import {
|
|
67
60
|
deriveWorkerSessionId
|
|
68
|
-
} from "../../chunk-
|
|
61
|
+
} from "../../chunk-TYHWWRPA.js";
|
|
69
62
|
import "../../chunk-AE4JGSIT.js";
|
|
63
|
+
import "../../chunk-4TYBQRSL.js";
|
|
64
|
+
import "../../chunk-SADUBMAH.js";
|
|
65
|
+
import {
|
|
66
|
+
PromptEngine
|
|
67
|
+
} from "../../chunk-QL7XQBU6.js";
|
|
68
|
+
import "../../chunk-RV4KPWEU.js";
|
|
69
|
+
import "../../chunk-CA4PCUY7.js";
|
|
70
|
+
import "../../chunk-SSBOZKER.js";
|
|
71
|
+
import {
|
|
72
|
+
profileRegistry
|
|
73
|
+
} from "../../chunk-C4BAI4KE.js";
|
|
74
|
+
import "../../chunk-SUOXBSW3.js";
|
|
70
75
|
import "../../chunk-ZGGCEXDC.js";
|
|
71
76
|
import "../../chunk-ZMZCZNKU.js";
|
|
77
|
+
import "../../chunk-RWA23GMM.js";
|
|
78
|
+
import "../../chunk-JCFWOULR.js";
|
|
79
|
+
import "../../chunk-IPAZZLYS.js";
|
|
80
|
+
import "../../chunk-VUVVHZPO.js";
|
|
72
81
|
import "../../chunk-Z3QE7TZM.js";
|
|
73
82
|
import "../../chunk-V3HROJN4.js";
|
|
83
|
+
import "../../chunk-2HDP7RMR.js";
|
|
84
|
+
import "../../chunk-IWVLQJIT.js";
|
|
85
|
+
import "../../chunk-U7DF3HSB.js";
|
|
74
86
|
import "../../chunk-GHVMWF2I.js";
|
|
75
|
-
import "../../chunk-
|
|
87
|
+
import "../../chunk-4UZYEDDP.js";
|
|
88
|
+
import "../../chunk-UXNLELW6.js";
|
|
89
|
+
import "../../chunk-ADIVZ2D5.js";
|
|
90
|
+
import "../../chunk-37OXTQCP.js";
|
|
76
91
|
import "../../chunk-3C3R7JXY.js";
|
|
77
|
-
import "../../chunk-
|
|
92
|
+
import "../../chunk-7FW3I7WC.js";
|
|
93
|
+
import "../../chunk-722LQO64.js";
|
|
94
|
+
import "../../chunk-UAS2P5YN.js";
|
|
78
95
|
import "../../chunk-OXMIV4WE.js";
|
|
79
|
-
import "../../chunk-INUNFYHR.js";
|
|
80
|
-
import {
|
|
81
|
-
PromptEngine
|
|
82
|
-
} from "../../chunk-WP75DGGE.js";
|
|
83
|
-
import "../../chunk-RV4KPWEU.js";
|
|
84
96
|
import {
|
|
85
97
|
createProviderClient,
|
|
86
98
|
resolveApiKey,
|
|
87
99
|
resolveCapabilities
|
|
88
|
-
} from "../../chunk-
|
|
100
|
+
} from "../../chunk-URRZCCIO.js";
|
|
101
|
+
import "../../chunk-EXKORBKC.js";
|
|
102
|
+
import "../../chunk-7UAZVVUE.js";
|
|
89
103
|
import "../../chunk-ADK6OD5V.js";
|
|
104
|
+
import "../../chunk-2CIA45NF.js";
|
|
105
|
+
import "../../chunk-TP5GXQKN.js";
|
|
90
106
|
import "../../chunk-O5VZQKCB.js";
|
|
91
|
-
import "../../chunk-Q4IPJKZY.js";
|
|
92
|
-
import "../../chunk-STVUSIGK.js";
|
|
93
|
-
import {
|
|
94
|
-
profileRegistry
|
|
95
|
-
} from "../../chunk-C4BAI4KE.js";
|
|
96
|
-
import "../../chunk-RWA23GMM.js";
|
|
97
|
-
import "../../chunk-4UZYEDDP.js";
|
|
98
|
-
import "../../chunk-UXNLELW6.js";
|
|
99
|
-
import "../../chunk-ADIVZ2D5.js";
|
|
100
|
-
import "../../chunk-7FW3I7WC.js";
|
|
101
|
-
import "../../chunk-ACTXML63.js";
|
|
102
|
-
import "../../chunk-7UAZVVUE.js";
|
|
103
|
-
import "../../chunk-XVJ5IU5T.js";
|
|
104
|
-
import "../../chunk-CB5SLLKR.js";
|
|
105
107
|
import "../../chunk-GD4ZNZ7W.js";
|
|
106
|
-
import "../../chunk-
|
|
108
|
+
import "../../chunk-H2UK46BU.js";
|
|
109
|
+
import "../../chunk-DRNEQMPD.js";
|
|
110
|
+
import "../../chunk-76IBOWQR.js";
|
|
111
|
+
import "../../chunk-6ANPK33S.js";
|
|
112
|
+
import "../../chunk-DBSJJWRE.js";
|
|
113
|
+
import "../../chunk-QARAGUXX.js";
|
|
114
|
+
import {
|
|
115
|
+
TodoStore
|
|
116
|
+
} from "../../chunk-FL4CIO5T.js";
|
|
107
117
|
import {
|
|
108
118
|
applyDescriptionMode
|
|
109
119
|
} from "../../chunk-JSXWIWWJ.js";
|
|
110
120
|
import "../../chunk-BSECIPAQ.js";
|
|
111
|
-
import "../../chunk-
|
|
121
|
+
import "../../chunk-BO5MRC5F.js";
|
|
112
122
|
import "../../chunk-35OLL4BN.js";
|
|
113
123
|
import "../../chunk-RMLYK7Q5.js";
|
|
114
|
-
import "../../chunk-
|
|
115
|
-
import "../../chunk-722LQO64.js";
|
|
124
|
+
import "../../chunk-JMDXQTIY.js";
|
|
116
125
|
import {
|
|
117
126
|
createAuthProvider
|
|
118
127
|
} from "../../chunk-B5WBNTBA.js";
|
|
119
128
|
import "../../chunk-EPKTIOED.js";
|
|
120
129
|
import "../../chunk-2VYRLULP.js";
|
|
121
|
-
import "../../chunk-
|
|
130
|
+
import "../../chunk-IJ6JWKGB.js";
|
|
122
131
|
import "../../chunk-2IAXMPTP.js";
|
|
123
132
|
import "../../chunk-JQL6WFIR.js";
|
|
124
|
-
import "../../chunk-
|
|
125
|
-
import "../../chunk-
|
|
133
|
+
import "../../chunk-CM3GNP3F.js";
|
|
134
|
+
import "../../chunk-RE6DPG2X.js";
|
|
126
135
|
import "../../chunk-EXUE5W2F.js";
|
|
127
|
-
import "../../chunk-4AC4ODED.js";
|
|
128
|
-
import "../../chunk-6S5FPUS7.js";
|
|
129
|
-
import "../../chunk-DBSJJWRE.js";
|
|
130
|
-
import "../../chunk-QARAGUXX.js";
|
|
131
|
-
import "../../chunk-JMDXQTIY.js";
|
|
132
|
-
import {
|
|
133
|
-
TodoStore
|
|
134
|
-
} from "../../chunk-FL4CIO5T.js";
|
|
135
136
|
import "../../chunk-ODBM65LR.js";
|
|
136
137
|
import {
|
|
137
138
|
loadConfig,
|
|
138
139
|
subagentPromptBlocks
|
|
139
|
-
} from "../../chunk-
|
|
140
|
+
} from "../../chunk-P6RBPB5S.js";
|
|
140
141
|
import "../../chunk-G4FU2DI5.js";
|
|
141
|
-
import "../../chunk-TI5PMDHA.js";
|
|
142
|
-
import "../../chunk-Y52MV6TV.js";
|
|
143
142
|
import "../../chunk-G3TX7BJQ.js";
|
|
144
143
|
import "../../chunk-P5KJURUR.js";
|
|
145
|
-
import "../../chunk-
|
|
144
|
+
import "../../chunk-TI5PMDHA.js";
|
|
145
|
+
import "../../chunk-N65LICMZ.js";
|
|
146
146
|
import "../../chunk-NYDTN5W4.js";
|
|
147
|
+
import "../../chunk-3L6VC5CO.js";
|
|
148
|
+
import "../../chunk-CI4R6P2B.js";
|
|
149
|
+
import "../../chunk-2ZAZTVNZ.js";
|
|
147
150
|
import "../../chunk-EGEI2RQA.js";
|
|
148
151
|
import "../../chunk-FAYHO63O.js";
|
|
149
152
|
import "../../chunk-GZOQFWMP.js";
|
|
150
153
|
import "../../chunk-ZNC5T65N.js";
|
|
151
|
-
import "../../chunk-7JOI4AOR.js";
|
|
152
|
-
import "../../chunk-A5MNH4ER.js";
|
|
153
154
|
import "../../chunk-JXVN7D4K.js";
|
|
154
155
|
import {
|
|
155
156
|
init_esm_shims
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { createRequire as __rivetCreateRequire } from 'node:module'; const require = __rivetCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
runBackendChain
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-IWVLQJIT.js";
|
|
6
|
+
import "./chunk-N65LICMZ.js";
|
|
7
7
|
import "./chunk-CI4R6P2B.js";
|
|
8
8
|
import "./chunk-5GGOGLSN.js";
|
|
9
9
|
export {
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
recordBashSideEffects,
|
|
14
14
|
removeFromCheckpointIndex,
|
|
15
15
|
rollbackToCheckpoint
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-U7DF3HSB.js";
|
|
17
|
+
import "./chunk-2ZAZTVNZ.js";
|
|
18
18
|
import "./chunk-JXVN7D4K.js";
|
|
19
19
|
import "./chunk-5GGOGLSN.js";
|
|
20
20
|
export {
|
|
@@ -3,10 +3,15 @@ import { createRequire as __rivetCreateRequire } from 'node:module'; const requi
|
|
|
3
3
|
import {
|
|
4
4
|
loadDeclaredVerify,
|
|
5
5
|
spawnHidden
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TP5GXQKN.js";
|
|
7
7
|
import {
|
|
8
8
|
toPosixPath
|
|
9
9
|
} from "./chunk-GD4ZNZ7W.js";
|
|
10
|
+
import {
|
|
11
|
+
CACHE_ANCHOR_MESSAGES,
|
|
12
|
+
KEEP_RECENT_MESSAGES,
|
|
13
|
+
compactThresholds
|
|
14
|
+
} from "./chunk-JMDXQTIY.js";
|
|
10
15
|
import {
|
|
11
16
|
buildUiOutput,
|
|
12
17
|
persistRawOutput
|
|
@@ -16,12 +21,7 @@ import {
|
|
|
16
21
|
} from "./chunk-JQL6WFIR.js";
|
|
17
22
|
import {
|
|
18
23
|
getResolvedEnv
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import {
|
|
21
|
-
CACHE_ANCHOR_MESSAGES,
|
|
22
|
-
KEEP_RECENT_MESSAGES,
|
|
23
|
-
compactThresholds
|
|
24
|
-
} from "./chunk-JMDXQTIY.js";
|
|
24
|
+
} from "./chunk-RE6DPG2X.js";
|
|
25
25
|
import {
|
|
26
26
|
init_esm_shims
|
|
27
27
|
} from "./chunk-5GGOGLSN.js";
|
|
@@ -31,19 +31,55 @@ init_esm_shims();
|
|
|
31
31
|
|
|
32
32
|
// src/tools/process-kill.ts
|
|
33
33
|
init_esm_shims();
|
|
34
|
-
import { spawn
|
|
34
|
+
import { spawn } from "child_process";
|
|
35
35
|
import { existsSync } from "fs";
|
|
36
36
|
import { dirname, join } from "path";
|
|
37
37
|
import { fileURLToPath } from "url";
|
|
38
38
|
function defaultRunTaskkill(args) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
void runTaskkillAsync(args).then((result) => {
|
|
40
|
+
if (result !== "exited") console.warn(`[process-cleanup] status=${result}`);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function runTaskkillAsync(args) {
|
|
44
|
+
return new Promise((resolve) => {
|
|
45
|
+
let done = false;
|
|
46
|
+
let timer;
|
|
47
|
+
const finish = (result) => {
|
|
48
|
+
if (done) return;
|
|
49
|
+
done = true;
|
|
50
|
+
clearTimeout(timer);
|
|
51
|
+
resolve(result);
|
|
52
|
+
};
|
|
53
|
+
try {
|
|
54
|
+
const command = spawn("taskkill", args, { stdio: "ignore", windowsHide: true });
|
|
55
|
+
command.once("error", () => finish("failed"));
|
|
56
|
+
command.once("close", (code) => finish(code === 0 ? "exited" : "failed"));
|
|
57
|
+
timer = setTimeout(() => {
|
|
58
|
+
command.kill();
|
|
59
|
+
finish("unknown");
|
|
60
|
+
}, 5e3);
|
|
61
|
+
} catch {
|
|
62
|
+
finish("failed");
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
async function killProcessTreeAsync(child, signal = "SIGTERM") {
|
|
67
|
+
if (!child.pid || child.exitCode !== null || child.signalCode !== null) return "exited";
|
|
68
|
+
if (process.platform === "win32") return runTaskkillAsync(taskkillArgs(child.pid));
|
|
69
|
+
return new Promise((resolve) => {
|
|
70
|
+
const timer = setTimeout(() => {
|
|
71
|
+
child.removeListener("exit", exited);
|
|
72
|
+
resolve("unknown");
|
|
73
|
+
}, 5e3);
|
|
74
|
+
const force = setTimeout(() => killProcessTree(child, "SIGKILL"), 3e3);
|
|
75
|
+
const exited = () => {
|
|
76
|
+
clearTimeout(timer);
|
|
77
|
+
clearTimeout(force);
|
|
78
|
+
resolve("exited");
|
|
79
|
+
};
|
|
80
|
+
child.once("exit", exited);
|
|
81
|
+
killProcessTree(child, signal);
|
|
82
|
+
});
|
|
47
83
|
}
|
|
48
84
|
function taskkillArgs(pid) {
|
|
49
85
|
return ["/F", "/T", "/PID", String(pid)];
|
|
@@ -1520,13 +1556,13 @@ function estimateOaiMessageTokensUncached(msg) {
|
|
|
1520
1556
|
if (msg.role === "assistant") {
|
|
1521
1557
|
content = (msg.content ?? "") + (msg.tool_calls ? JSON.stringify(msg.tool_calls) : "") + (msg.reasoning_content ?? "");
|
|
1522
1558
|
} else if (msg.role === "user" && Array.isArray(msg.content)) {
|
|
1523
|
-
let
|
|
1559
|
+
let textTokens = 0;
|
|
1524
1560
|
let imageTokens = 0;
|
|
1525
1561
|
for (const part of msg.content) {
|
|
1526
|
-
if (part.type === "text")
|
|
1562
|
+
if (part.type === "text") textTokens += estimateOaiMessageTokens2({ role: "user", content: part.text });
|
|
1527
1563
|
else imageTokens += estimateImageTokens(part.image_url.url);
|
|
1528
1564
|
}
|
|
1529
|
-
return
|
|
1565
|
+
return textTokens + imageTokens;
|
|
1530
1566
|
} else {
|
|
1531
1567
|
content = msg.content;
|
|
1532
1568
|
}
|
|
@@ -1618,6 +1654,7 @@ export {
|
|
|
1618
1654
|
groupIntoRoundsOai,
|
|
1619
1655
|
countRoundsOai,
|
|
1620
1656
|
computeOaiInvariantStatus,
|
|
1657
|
+
killProcessTreeAsync,
|
|
1621
1658
|
killProcessTree,
|
|
1622
1659
|
spawnShell,
|
|
1623
1660
|
track,
|
|
@@ -39,19 +39,19 @@ init_esm_shims();
|
|
|
39
39
|
function createEarlyCliHandlers(cwd = process.cwd()) {
|
|
40
40
|
return {
|
|
41
41
|
config: async (args) => {
|
|
42
|
-
const { runConfigCLI } = await import("./manager-
|
|
42
|
+
const { runConfigCLI } = await import("./manager-KEAMKRUQ.js");
|
|
43
43
|
await runConfigCLI(args);
|
|
44
44
|
},
|
|
45
45
|
provider: async (args) => {
|
|
46
|
-
const { runProviderCLI } = await import("./provider-cli-
|
|
46
|
+
const { runProviderCLI } = await import("./provider-cli-DNQB5JPG.js");
|
|
47
47
|
await runProviderCLI(args);
|
|
48
48
|
},
|
|
49
49
|
serve: async (args) => {
|
|
50
|
-
const { serveCommand } = await import("./serve-
|
|
50
|
+
const { serveCommand } = await import("./serve-72DJIPUR.js");
|
|
51
51
|
await serveCommand(args);
|
|
52
52
|
},
|
|
53
53
|
sessions: async () => {
|
|
54
|
-
const { SessionPersist } = await import("./session-persist-
|
|
54
|
+
const { SessionPersist } = await import("./session-persist-EZJZAM4V.js");
|
|
55
55
|
return SessionPersist.formatSessionList(cwd);
|
|
56
56
|
},
|
|
57
57
|
browser: async (args) => {
|
|
@@ -63,7 +63,7 @@ function createEarlyCliHandlers(cwd = process.cwd()) {
|
|
|
63
63
|
return runLogsCLI(args, { cwd });
|
|
64
64
|
},
|
|
65
65
|
web: async (args) => {
|
|
66
|
-
const { runWebCLI } = await import("./web-cli-
|
|
66
|
+
const { runWebCLI } = await import("./web-cli-IWVBFUNL.js");
|
|
67
67
|
return runWebCLI(args);
|
|
68
68
|
}
|
|
69
69
|
};
|
|
@@ -77,8 +77,8 @@ async function applyEarlyCliEnv(args, hooks = {}) {
|
|
|
77
77
|
const wantTrust = args.includes("--trust");
|
|
78
78
|
const wantUntrust = args.includes("--untrust");
|
|
79
79
|
if (!wantTrust && !wantUntrust) return;
|
|
80
|
-
const trustFn = hooks.trustProject ?? (await import("./project-trust-
|
|
81
|
-
const untrustFn = hooks.untrustProject ?? (await import("./project-trust-
|
|
80
|
+
const trustFn = hooks.trustProject ?? (await import("./project-trust-VGFYHJL3.js")).trustProject;
|
|
81
|
+
const untrustFn = hooks.untrustProject ?? (await import("./project-trust-VGFYHJL3.js")).untrustProject;
|
|
82
82
|
if (wantTrust) trustFn(process.cwd());
|
|
83
83
|
if (wantUntrust) untrustFn(process.cwd());
|
|
84
84
|
}
|
|
@@ -9,7 +9,35 @@ init_esm_shims();
|
|
|
9
9
|
import { writeFileSync, renameSync, unlinkSync, existsSync, mkdirSync, readdirSync, statSync } from "fs";
|
|
10
10
|
import { randomUUID } from "crypto";
|
|
11
11
|
import { dirname, join } from "path";
|
|
12
|
-
import { mkdir, writeFile, rename, unlink } from "fs/promises";
|
|
12
|
+
import { mkdir, writeFile, rename, unlink, open } from "fs/promises";
|
|
13
|
+
async function writeFileAtomicDurableAsync(filePath, data) {
|
|
14
|
+
await mkdir(dirname(filePath), { recursive: true });
|
|
15
|
+
const temporary = atomicTmpPath(filePath);
|
|
16
|
+
try {
|
|
17
|
+
const file = await open(temporary, "wx", 384);
|
|
18
|
+
try {
|
|
19
|
+
await file.writeFile(data);
|
|
20
|
+
await file.sync();
|
|
21
|
+
} finally {
|
|
22
|
+
await file.close();
|
|
23
|
+
}
|
|
24
|
+
await rename(temporary, filePath);
|
|
25
|
+
if (process.platform !== "win32") {
|
|
26
|
+
const directory = await open(dirname(filePath), "r");
|
|
27
|
+
try {
|
|
28
|
+
await directory.sync();
|
|
29
|
+
} finally {
|
|
30
|
+
await directory.close();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
} catch (error) {
|
|
34
|
+
try {
|
|
35
|
+
await unlink(temporary);
|
|
36
|
+
} catch {
|
|
37
|
+
}
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
13
41
|
function atomicTmpPath(filePath) {
|
|
14
42
|
return `${filePath}.rivet-atomic-${randomUUID().slice(0, 8)}.tmp`;
|
|
15
43
|
}
|
|
@@ -73,6 +101,7 @@ function cleanupOrphanedTmpFiles(dirs) {
|
|
|
73
101
|
}
|
|
74
102
|
|
|
75
103
|
export {
|
|
104
|
+
writeFileAtomicDurableAsync,
|
|
76
105
|
writeFileAtomicSync,
|
|
77
106
|
writeFileAtomicAsync,
|
|
78
107
|
cleanupOrphanedTmpFiles
|