@lousy-agents/cli 5.14.7 → 5.14.9
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.
|
@@ -11,21 +11,21 @@
|
|
|
11
11
|
"@fastify/cors": "11.2.0",
|
|
12
12
|
"@fastify/sensible": "6.0.4",
|
|
13
13
|
"fastify": "5.8.5",
|
|
14
|
-
"kysely": "0.29.
|
|
14
|
+
"kysely": "0.29.2",
|
|
15
15
|
"pino": "10.3.1",
|
|
16
16
|
"postgres": "3.4.9",
|
|
17
17
|
"zod": "4.4.3"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@biomejs/biome": "2.4.15",
|
|
21
|
-
"@lousy-agents/mcp": "5.14.
|
|
21
|
+
"@lousy-agents/mcp": "5.14.8",
|
|
22
22
|
"@modelcontextprotocol/server-sequential-thinking": "2025.12.18",
|
|
23
23
|
"@testcontainers/postgresql": "11.14.0",
|
|
24
24
|
"@types/node": "24.12.4",
|
|
25
25
|
"@upstash/context7-mcp": "2.2.5",
|
|
26
26
|
"chance": "1.1.13",
|
|
27
27
|
"testcontainers": "11.14.0",
|
|
28
|
-
"tsx": "4.22.
|
|
28
|
+
"tsx": "4.22.1",
|
|
29
29
|
"typescript": "6.0.3",
|
|
30
30
|
"vitest": "4.1.6"
|
|
31
31
|
}
|
|
@@ -956,9 +956,9 @@
|
|
|
956
956
|
}
|
|
957
957
|
},
|
|
958
958
|
"node_modules/@lousy-agents/mcp": {
|
|
959
|
-
"version": "5.14.
|
|
960
|
-
"resolved": "https://registry.npmjs.org/@lousy-agents/mcp/-/mcp-5.14.
|
|
961
|
-
"integrity": "sha512-
|
|
959
|
+
"version": "5.14.8",
|
|
960
|
+
"resolved": "https://registry.npmjs.org/@lousy-agents/mcp/-/mcp-5.14.8.tgz",
|
|
961
|
+
"integrity": "sha512-stW+xTi0Y/fEs/N8oVJ6u3RUi4Xd3dLG8NMdsB7tcP1KIYTQKE/CXHbU9QElLRSuFZwNFPtf15G4Pm4QTes1Pg==",
|
|
962
962
|
"dev": true,
|
|
963
963
|
"license": "BSD-2-Clause-Patent",
|
|
964
964
|
"dependencies": {
|
|
@@ -3627,9 +3627,9 @@
|
|
|
3627
3627
|
"license": "BSD-2-Clause"
|
|
3628
3628
|
},
|
|
3629
3629
|
"node_modules/kysely": {
|
|
3630
|
-
"version": "0.29.
|
|
3631
|
-
"resolved": "https://registry.npmjs.org/kysely/-/kysely-0.29.
|
|
3632
|
-
"integrity": "sha512-
|
|
3630
|
+
"version": "0.29.2",
|
|
3631
|
+
"resolved": "https://registry.npmjs.org/kysely/-/kysely-0.29.2.tgz",
|
|
3632
|
+
"integrity": "sha512-s6WVJyEZrbm6jhBpiKHsGHyePMrVQKJ85wZCFCr9W4QHv6WTjWIrdvTmO9hDEA3bNK0xkrE2DqrHsXMLWuZpQg==",
|
|
3633
3633
|
"license": "MIT",
|
|
3634
3634
|
"engines": {
|
|
3635
3635
|
"node": ">=22.0.0"
|
|
@@ -5423,9 +5423,9 @@
|
|
|
5423
5423
|
"optional": true
|
|
5424
5424
|
},
|
|
5425
5425
|
"node_modules/tsx": {
|
|
5426
|
-
"version": "4.22.
|
|
5427
|
-
"resolved": "https://registry.npmjs.org/tsx/-/tsx-4.22.
|
|
5428
|
-
"integrity": "sha512-
|
|
5426
|
+
"version": "4.22.1",
|
|
5427
|
+
"resolved": "https://registry.npmjs.org/tsx/-/tsx-4.22.1.tgz",
|
|
5428
|
+
"integrity": "sha512-TvncJykhxAzFCk0VQZKBTClall4Pm7qXDSodb6uxi8QFa8X8mT6ABjxxsQ2opDRYxG7AzcRWXaFtruz5HJKuWg==",
|
|
5429
5429
|
"dev": true,
|
|
5430
5430
|
"license": "MIT",
|
|
5431
5431
|
"dependencies": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@fastify/cors": "11.2.0",
|
|
20
20
|
"@fastify/sensible": "6.0.4",
|
|
21
21
|
"fastify": "5.8.5",
|
|
22
|
-
"kysely": "0.29.
|
|
22
|
+
"kysely": "0.29.2",
|
|
23
23
|
"pino": "10.3.1",
|
|
24
24
|
"postgres": "3.4.9",
|
|
25
25
|
"zod": "4.4.3"
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@biomejs/biome": "2.4.15",
|
|
32
|
-
"@lousy-agents/mcp": "5.14.
|
|
32
|
+
"@lousy-agents/mcp": "5.14.8",
|
|
33
33
|
"@modelcontextprotocol/server-sequential-thinking": "2025.12.18",
|
|
34
34
|
"@testcontainers/postgresql": "11.14.0",
|
|
35
35
|
"@types/node": "24.12.4",
|
|
36
36
|
"@upstash/context7-mcp": "2.2.5",
|
|
37
37
|
"chance": "1.1.13",
|
|
38
38
|
"testcontainers": "11.14.0",
|
|
39
|
-
"tsx": "4.22.
|
|
39
|
+
"tsx": "4.22.1",
|
|
40
40
|
"typescript": "6.0.3",
|
|
41
41
|
"vitest": "4.1.6"
|
|
42
42
|
}
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@biomejs/biome": "2.4.15",
|
|
23
|
-
"@lousy-agents/mcp": "5.14.
|
|
23
|
+
"@lousy-agents/mcp": "5.14.8",
|
|
24
24
|
"@modelcontextprotocol/server-sequential-thinking": "2025.12.18",
|
|
25
25
|
"@types/node": "24.12.4",
|
|
26
26
|
"@upstash/context7-mcp": "2.2.5",
|
|
27
27
|
"chance": "1.1.13",
|
|
28
|
-
"tsx": "4.22.
|
|
28
|
+
"tsx": "4.22.1",
|
|
29
29
|
"typescript": "6.0.3",
|
|
30
30
|
"vitest": "4.1.6"
|
|
31
31
|
}
|
package/dist/index.js
CHANGED
|
@@ -2990,7 +2990,7 @@ exports.basename = (path, { windows } = {}) => {
|
|
|
2990
2990
|
|
|
2991
2991
|
|
|
2992
2992
|
},
|
|
2993
|
-
|
|
2993
|
+
1809(__unused_rspack_module, __unused_rspack___webpack_exports__, __webpack_require__) {
|
|
2994
2994
|
// NAMESPACE OBJECT: ../../node_modules/micromark/lib/constructs.js
|
|
2995
2995
|
var constructs_namespaceObject = {};
|
|
2996
2996
|
__webpack_require__.r(constructs_namespaceObject);
|
|
@@ -3275,7 +3275,7 @@ function splitSafeRelativePath(relativePath) {
|
|
|
3275
3275
|
function resolveSafeRelativePath(rootDir, relativePath) {
|
|
3276
3276
|
const root = path.resolve(rootDir);
|
|
3277
3277
|
const target = path.resolve(root, ...splitSafeRelativePath(relativePath));
|
|
3278
|
-
if (
|
|
3278
|
+
if (!path_isPathInside(root, target)) {
|
|
3279
3279
|
throw new FsSafeError("outside-workspace", "relative path escapes root");
|
|
3280
3280
|
}
|
|
3281
3281
|
return target;
|
|
@@ -3610,6 +3610,85 @@ def reject_unsafe_endpoint(st):
|
|
|
3610
3610
|
if stat.S_ISREG(mode) and st.st_nlink > 1:
|
|
3611
3611
|
raise OSError(errno.EPERM, "hardlinked file endpoint is not allowed")
|
|
3612
3612
|
|
|
3613
|
+
def copy_bytes(source_fd, dest_fd):
|
|
3614
|
+
while True:
|
|
3615
|
+
chunk = os.read(source_fd, 65536)
|
|
3616
|
+
if not chunk:
|
|
3617
|
+
break
|
|
3618
|
+
view = memoryview(chunk)
|
|
3619
|
+
while view:
|
|
3620
|
+
written = os.write(dest_fd, view)
|
|
3621
|
+
if written <= 0:
|
|
3622
|
+
raise OSError(errno.EIO, "short write")
|
|
3623
|
+
view = view[written:]
|
|
3624
|
+
|
|
3625
|
+
def write_all(fd, data):
|
|
3626
|
+
view = memoryview(data)
|
|
3627
|
+
while view:
|
|
3628
|
+
written = os.write(fd, view)
|
|
3629
|
+
if written <= 0:
|
|
3630
|
+
raise OSError(errno.EIO, "short write")
|
|
3631
|
+
view = view[written:]
|
|
3632
|
+
|
|
3633
|
+
def link_unsupported(exc):
|
|
3634
|
+
unsupported = (errno.EPERM, errno.EOPNOTSUPP, getattr(errno, "ENOTSUP", errno.EOPNOTSUPP))
|
|
3635
|
+
return getattr(exc, "errno", None) in unsupported
|
|
3636
|
+
|
|
3637
|
+
def link_no_replace(name, new_name, source_fd, target_fd):
|
|
3638
|
+
linked = False
|
|
3639
|
+
try:
|
|
3640
|
+
os.link(name, new_name, src_dir_fd=source_fd, dst_dir_fd=target_fd, follow_symlinks=False)
|
|
3641
|
+
linked = True
|
|
3642
|
+
os.unlink(name, dir_fd=source_fd)
|
|
3643
|
+
except Exception:
|
|
3644
|
+
if linked:
|
|
3645
|
+
try: os.unlink(new_name, dir_fd=target_fd)
|
|
3646
|
+
except FileNotFoundError: pass
|
|
3647
|
+
raise
|
|
3648
|
+
os.fsync(source_fd)
|
|
3649
|
+
if source_fd != target_fd:
|
|
3650
|
+
os.fsync(target_fd)
|
|
3651
|
+
|
|
3652
|
+
def copy_file_no_replace(source_parent_fd, source_name, target_parent_fd, basename, mode, expected=None, unlink_source=False):
|
|
3653
|
+
source_fd = os.open(source_name, READ_FLAGS, dir_fd=source_parent_fd)
|
|
3654
|
+
dest_fd = None
|
|
3655
|
+
success = False
|
|
3656
|
+
try:
|
|
3657
|
+
if expected is not None:
|
|
3658
|
+
source_stat = os.fstat(source_fd)
|
|
3659
|
+
if source_stat.st_dev != expected.st_dev or source_stat.st_ino != expected.st_ino:
|
|
3660
|
+
raise RuntimeError("fs-safe-source-mismatch")
|
|
3661
|
+
dest_fd = os.open(basename, WRITE_FLAGS, mode, dir_fd=target_parent_fd)
|
|
3662
|
+
copy_bytes(source_fd, dest_fd)
|
|
3663
|
+
os.fsync(dest_fd)
|
|
3664
|
+
success = True
|
|
3665
|
+
finally:
|
|
3666
|
+
os.close(source_fd)
|
|
3667
|
+
if dest_fd is not None:
|
|
3668
|
+
os.close(dest_fd)
|
|
3669
|
+
if dest_fd is not None and not success:
|
|
3670
|
+
try: os.unlink(basename, dir_fd=target_parent_fd)
|
|
3671
|
+
except FileNotFoundError: pass
|
|
3672
|
+
if unlink_source:
|
|
3673
|
+
try:
|
|
3674
|
+
os.unlink(source_name, dir_fd=source_parent_fd)
|
|
3675
|
+
except Exception:
|
|
3676
|
+
try: os.unlink(basename, dir_fd=target_parent_fd)
|
|
3677
|
+
except FileNotFoundError: pass
|
|
3678
|
+
raise
|
|
3679
|
+
|
|
3680
|
+
def commit_temp_file(parent_fd, temp_name, basename, overwrite, mode):
|
|
3681
|
+
if overwrite:
|
|
3682
|
+
os.replace(temp_name, basename, src_dir_fd=parent_fd, dst_dir_fd=parent_fd)
|
|
3683
|
+
else:
|
|
3684
|
+
try:
|
|
3685
|
+
os.link(temp_name, basename, src_dir_fd=parent_fd, dst_dir_fd=parent_fd, follow_symlinks=False)
|
|
3686
|
+
os.unlink(temp_name, dir_fd=parent_fd)
|
|
3687
|
+
except OSError as exc:
|
|
3688
|
+
if not link_unsupported(exc):
|
|
3689
|
+
raise
|
|
3690
|
+
copy_file_no_replace(parent_fd, temp_name, parent_fd, basename, mode, unlink_source=True)
|
|
3691
|
+
|
|
3613
3692
|
def stat_path(root_fd, payload):
|
|
3614
3693
|
relative = payload.get("relativePath", "")
|
|
3615
3694
|
segments = split_relative(relative)
|
|
@@ -3684,7 +3763,18 @@ def rename_path(root_fd, payload):
|
|
|
3684
3763
|
try:
|
|
3685
3764
|
from_stat = os.lstat(from_base, dir_fd=from_parent_fd)
|
|
3686
3765
|
reject_unsafe_endpoint(from_stat)
|
|
3687
|
-
|
|
3766
|
+
overwrite = payload.get("overwrite", True)
|
|
3767
|
+
if not overwrite and stat.S_ISREG(from_stat.st_mode):
|
|
3768
|
+
try:
|
|
3769
|
+
link_no_replace(from_base, to_base, from_parent_fd, to_parent_fd)
|
|
3770
|
+
except OSError as exc:
|
|
3771
|
+
if not link_unsupported(exc):
|
|
3772
|
+
raise
|
|
3773
|
+
copy_file_no_replace(from_parent_fd, from_base, to_parent_fd, to_base, stat.S_IMODE(from_stat.st_mode), from_stat, True)
|
|
3774
|
+
return None
|
|
3775
|
+
if not overwrite and stat.S_ISDIR(from_stat.st_mode):
|
|
3776
|
+
raise RuntimeError("fs-safe-directory-noreplace-unsupported")
|
|
3777
|
+
if not overwrite:
|
|
3688
3778
|
try:
|
|
3689
3779
|
os.lstat(to_base, dir_fd=to_parent_fd)
|
|
3690
3780
|
raise FileExistsError(errno.EEXIST, "destination exists", to_base)
|
|
@@ -3729,16 +3819,11 @@ def write_path(root_fd, payload):
|
|
|
3729
3819
|
except FileNotFoundError:
|
|
3730
3820
|
pass
|
|
3731
3821
|
temp_name, temp_fd = create_temp_file(parent_fd, basename, mode)
|
|
3732
|
-
|
|
3733
|
-
while view:
|
|
3734
|
-
written = os.write(temp_fd, view)
|
|
3735
|
-
if written <= 0:
|
|
3736
|
-
raise OSError(errno.EIO, "short write")
|
|
3737
|
-
view = view[written:]
|
|
3822
|
+
write_all(temp_fd, data)
|
|
3738
3823
|
os.fsync(temp_fd)
|
|
3739
3824
|
os.close(temp_fd)
|
|
3740
3825
|
temp_fd = None
|
|
3741
|
-
|
|
3826
|
+
commit_temp_file(parent_fd, temp_name, basename, overwrite, mode)
|
|
3742
3827
|
temp_name = None
|
|
3743
3828
|
os.fsync(parent_fd)
|
|
3744
3829
|
result_stat = os.stat(basename, dir_fd=parent_fd, follow_symlinks=False)
|
|
@@ -3771,12 +3856,6 @@ def copy_path(root_fd, payload):
|
|
|
3771
3856
|
if max_bytes >= 0 and source_stat.st_size > max_bytes:
|
|
3772
3857
|
raise RuntimeError("fs-safe-too-large:%d:%d" % (max_bytes, source_stat.st_size))
|
|
3773
3858
|
parent_fd = walk_dir(root_fd, split_relative(payload.get("relativeParentPath", "")), bool(payload.get("mkdir", True)))
|
|
3774
|
-
if not overwrite:
|
|
3775
|
-
try:
|
|
3776
|
-
os.lstat(basename, dir_fd=parent_fd)
|
|
3777
|
-
raise FileExistsError(errno.EEXIST, "destination exists", basename)
|
|
3778
|
-
except FileNotFoundError:
|
|
3779
|
-
pass
|
|
3780
3859
|
temp_name, temp_fd = create_temp_file(parent_fd, basename, mode)
|
|
3781
3860
|
written_bytes = 0
|
|
3782
3861
|
while True:
|
|
@@ -3795,7 +3874,7 @@ def copy_path(root_fd, payload):
|
|
|
3795
3874
|
os.fsync(temp_fd)
|
|
3796
3875
|
os.close(temp_fd)
|
|
3797
3876
|
temp_fd = None
|
|
3798
|
-
|
|
3877
|
+
commit_temp_file(parent_fd, temp_name, basename, overwrite, mode)
|
|
3799
3878
|
temp_name = None
|
|
3800
3879
|
os.fsync(parent_fd)
|
|
3801
3880
|
result_stat = os.stat(basename, dir_fd=parent_fd, follow_symlinks=False)
|
|
@@ -3919,6 +3998,9 @@ function mapWorkerError(response) {
|
|
|
3919
3998
|
if (message.includes("fs-safe-source-mismatch")) {
|
|
3920
3999
|
return new errors_FsSafeError("path-mismatch", "source path changed during copy");
|
|
3921
4000
|
}
|
|
4001
|
+
if (message.includes("fs-safe-directory-noreplace-unsupported")) {
|
|
4002
|
+
return new errors_FsSafeError("invalid-path", "directory moves require overwrite: true");
|
|
4003
|
+
}
|
|
3922
4004
|
if (code === "FileNotFoundError" || errno === 2) {
|
|
3923
4005
|
return new errors_FsSafeError("not-found", "file not found");
|
|
3924
4006
|
}
|
|
@@ -3936,19 +4018,19 @@ function mapWorkerError(response) {
|
|
|
3936
4018
|
}
|
|
3937
4019
|
return new errors_FsSafeError("helper-failed", message);
|
|
3938
4020
|
}
|
|
3939
|
-
function rejectPending(error) {
|
|
3940
|
-
if (!worker) {
|
|
4021
|
+
function rejectPending(error, targetWorker = worker) {
|
|
4022
|
+
if (!targetWorker || worker !== targetWorker) {
|
|
3941
4023
|
return;
|
|
3942
4024
|
}
|
|
3943
|
-
setWorkerRef(
|
|
3944
|
-
for (const pending of
|
|
4025
|
+
setWorkerRef(targetWorker, false);
|
|
4026
|
+
for (const pending of targetWorker.pending.values()) {
|
|
3945
4027
|
pending.reject(error);
|
|
3946
4028
|
}
|
|
3947
|
-
|
|
4029
|
+
targetWorker.pending.clear();
|
|
3948
4030
|
worker = null;
|
|
3949
4031
|
}
|
|
3950
|
-
function handleWorkerLine(line) {
|
|
3951
|
-
if (
|
|
4032
|
+
function handleWorkerLine(currentWorker, line) {
|
|
4033
|
+
if (worker !== currentWorker || !line.trim()) {
|
|
3952
4034
|
return;
|
|
3953
4035
|
}
|
|
3954
4036
|
let decoded;
|
|
@@ -3956,11 +4038,11 @@ function handleWorkerLine(line) {
|
|
|
3956
4038
|
decoded = JSON.parse(line);
|
|
3957
4039
|
}
|
|
3958
4040
|
catch {
|
|
3959
|
-
rejectPending(new errors_FsSafeError("helper-failed", `pinned helper returned invalid JSON: ${line}`));
|
|
4041
|
+
rejectPending(new errors_FsSafeError("helper-failed", `pinned helper returned invalid JSON: ${line}`), currentWorker);
|
|
3960
4042
|
return;
|
|
3961
4043
|
}
|
|
3962
4044
|
if (typeof decoded !== "object" || decoded === null || !("id" in decoded)) {
|
|
3963
|
-
rejectPending(new errors_FsSafeError("helper-failed", "pinned helper returned invalid response"));
|
|
4045
|
+
rejectPending(new errors_FsSafeError("helper-failed", "pinned helper returned invalid response"), currentWorker);
|
|
3964
4046
|
return;
|
|
3965
4047
|
}
|
|
3966
4048
|
const response = decoded;
|
|
@@ -3968,13 +4050,13 @@ function handleWorkerLine(line) {
|
|
|
3968
4050
|
if (id === undefined) {
|
|
3969
4051
|
return;
|
|
3970
4052
|
}
|
|
3971
|
-
const pending =
|
|
4053
|
+
const pending = currentWorker.pending.get(id);
|
|
3972
4054
|
if (!pending) {
|
|
3973
4055
|
return;
|
|
3974
4056
|
}
|
|
3975
|
-
|
|
3976
|
-
if (
|
|
3977
|
-
setWorkerRef(
|
|
4057
|
+
currentWorker.pending.delete(id);
|
|
4058
|
+
if (currentWorker.pending.size === 0) {
|
|
4059
|
+
setWorkerRef(currentWorker, false);
|
|
3978
4060
|
}
|
|
3979
4061
|
if (response.ok === true) {
|
|
3980
4062
|
pending.resolve(response.result);
|
|
@@ -3990,28 +4072,28 @@ function getWorker() {
|
|
|
3990
4072
|
const child = (0,external_node_child_process_.spawn)(resolvePython(), ["-u", "-c", PINNED_PYTHON_WORKER_SOURCE], {
|
|
3991
4073
|
stdio: ["pipe", "pipe", "pipe"],
|
|
3992
4074
|
});
|
|
3993
|
-
|
|
4075
|
+
const currentWorker = { child, pending: new Map(), stderr: "", stdoutBuffer: "" };
|
|
4076
|
+
worker = currentWorker;
|
|
3994
4077
|
child.stdout.setEncoding("utf8");
|
|
3995
4078
|
child.stderr.setEncoding("utf8");
|
|
3996
4079
|
child.stdout.on("data", (chunk) => {
|
|
3997
|
-
|
|
3998
|
-
if (!current) {
|
|
4080
|
+
if (worker !== currentWorker) {
|
|
3999
4081
|
return;
|
|
4000
4082
|
}
|
|
4001
|
-
|
|
4083
|
+
currentWorker.stdoutBuffer += chunk;
|
|
4002
4084
|
for (;;) {
|
|
4003
|
-
const newline =
|
|
4085
|
+
const newline = currentWorker.stdoutBuffer.indexOf("\n");
|
|
4004
4086
|
if (newline < 0) {
|
|
4005
4087
|
break;
|
|
4006
4088
|
}
|
|
4007
|
-
const line =
|
|
4008
|
-
|
|
4009
|
-
handleWorkerLine(line);
|
|
4089
|
+
const line = currentWorker.stdoutBuffer.slice(0, newline);
|
|
4090
|
+
currentWorker.stdoutBuffer = currentWorker.stdoutBuffer.slice(newline + 1);
|
|
4091
|
+
handleWorkerLine(currentWorker, line);
|
|
4010
4092
|
}
|
|
4011
4093
|
});
|
|
4012
4094
|
child.stderr.on("data", (chunk) => {
|
|
4013
|
-
if (worker) {
|
|
4014
|
-
|
|
4095
|
+
if (worker === currentWorker) {
|
|
4096
|
+
currentWorker.stderr = `${currentWorker.stderr}${chunk}`.slice(-4096);
|
|
4015
4097
|
}
|
|
4016
4098
|
});
|
|
4017
4099
|
child.once("error", (error) => {
|
|
@@ -4020,17 +4102,17 @@ function getWorker() {
|
|
|
4020
4102
|
: error instanceof Error
|
|
4021
4103
|
? error
|
|
4022
4104
|
: new Error(String(error));
|
|
4023
|
-
rejectPending(mapped);
|
|
4105
|
+
rejectPending(mapped, currentWorker);
|
|
4024
4106
|
});
|
|
4025
4107
|
child.once("close", (code, signal) => {
|
|
4026
|
-
const stderr =
|
|
4027
|
-
rejectPending(new errors_FsSafeError("helper-failed", stderr || `pinned helper exited with code ${code ?? "null"} (${signal ?? "?"})`));
|
|
4108
|
+
const stderr = currentWorker.stderr.trim();
|
|
4109
|
+
rejectPending(new errors_FsSafeError("helper-failed", stderr || `pinned helper exited with code ${code ?? "null"} (${signal ?? "?"})`), currentWorker);
|
|
4028
4110
|
});
|
|
4029
4111
|
process.once("exit", () => {
|
|
4030
4112
|
child.kill("SIGTERM");
|
|
4031
4113
|
});
|
|
4032
|
-
setWorkerRef(
|
|
4033
|
-
return
|
|
4114
|
+
setWorkerRef(currentWorker, false);
|
|
4115
|
+
return currentWorker;
|
|
4034
4116
|
}
|
|
4035
4117
|
function setRefable(value, ref) {
|
|
4036
4118
|
if (!value) {
|
|
@@ -5277,6 +5359,15 @@ function __setFsSafeTestHooksForTest(hooks) {
|
|
|
5277
5359
|
test_hooks_fsSafeTestHooks = hooks;
|
|
5278
5360
|
}
|
|
5279
5361
|
|
|
5362
|
+
;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/json-stringify.js
|
|
5363
|
+
function stringifyJsonDocument(value, replacer, space) {
|
|
5364
|
+
const text = JSON.stringify(value, replacer, space);
|
|
5365
|
+
if (typeof text !== "string") {
|
|
5366
|
+
throw new TypeError("value is not representable as a JSON document");
|
|
5367
|
+
}
|
|
5368
|
+
return text;
|
|
5369
|
+
}
|
|
5370
|
+
|
|
5280
5371
|
;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/temp-cleanup.js
|
|
5281
5372
|
|
|
5282
5373
|
const tempCleanupEntries = new Map();
|
|
@@ -5364,6 +5455,7 @@ async function serializePathWrite(key, run) {
|
|
|
5364
5455
|
|
|
5365
5456
|
|
|
5366
5457
|
|
|
5458
|
+
|
|
5367
5459
|
|
|
5368
5460
|
|
|
5369
5461
|
function logWarn(message) {
|
|
@@ -5604,12 +5696,12 @@ class RootHandle {
|
|
|
5604
5696
|
}
|
|
5605
5697
|
async writeJson(relativePath, data, options = {}) {
|
|
5606
5698
|
const { replacer, space, trailingNewline = true, ...writeOptions } = options;
|
|
5607
|
-
const json =
|
|
5699
|
+
const json = stringifyJsonDocument(data, replacer, space);
|
|
5608
5700
|
await this.write(relativePath, trailingNewline ? `${json}\n` : json, writeOptions);
|
|
5609
5701
|
}
|
|
5610
5702
|
async createJson(relativePath, data, options = {}) {
|
|
5611
5703
|
const { replacer, space, trailingNewline = true, ...writeOptions } = options;
|
|
5612
|
-
const json =
|
|
5704
|
+
const json = stringifyJsonDocument(data, replacer, space);
|
|
5613
5705
|
await this.create(relativePath, trailingNewline ? `${json}\n` : json, writeOptions);
|
|
5614
5706
|
}
|
|
5615
5707
|
async copyIn(relativePath, sourcePath, options = {}) {
|
|
@@ -6394,6 +6486,9 @@ async function movePathFallback(root, params) {
|
|
|
6394
6486
|
if (sourceStat.isFile() && sourceStat.nlink > 1) {
|
|
6395
6487
|
throw new errors_FsSafeError("hardlink", "hardlinked path not allowed");
|
|
6396
6488
|
}
|
|
6489
|
+
if (!params.overwrite && sourceStat.isDirectory()) {
|
|
6490
|
+
throw new errors_FsSafeError("invalid-path", "directory moves require overwrite: true");
|
|
6491
|
+
}
|
|
6397
6492
|
if (!params.overwrite) {
|
|
6398
6493
|
try {
|
|
6399
6494
|
await promises_.lstat(target.resolved);
|
|
@@ -59042,4 +59137,4 @@ if (installedChunkData !== 0) { // 0 means "already installed".'
|
|
|
59042
59137
|
// module factories are used so entry inlining is disabled
|
|
59043
59138
|
// startup
|
|
59044
59139
|
// Load entry module and return exports
|
|
59045
|
-
var __webpack_exports__ = __webpack_require__(
|
|
59140
|
+
var __webpack_exports__ = __webpack_require__(1809);
|
package/package.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@biomejs/biome": "2.4.15",
|
|
25
25
|
"@eslint/eslintrc": "3.3.5",
|
|
26
|
-
"@lousy-agents/mcp": "5.14.
|
|
26
|
+
"@lousy-agents/mcp": "5.14.8",
|
|
27
27
|
"@modelcontextprotocol/server-sequential-thinking": "2025.12.18",
|
|
28
28
|
"@testing-library/jest-dom": "6.9.1",
|
|
29
29
|
"@testing-library/react": "16.3.2",
|