@lousy-agents/agent-shell 5.22.10 → 5.22.12
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/dist/index.js +60 -24
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire as __rspack_createRequire } from "node:module";
|
|
3
3
|
const __rspack_createRequire_require = __rspack_createRequire(import.meta.url);
|
|
4
4
|
var __webpack_modules__ = ({
|
|
5
|
-
|
|
5
|
+
433(__unused_rspack_module, __unused_rspack___webpack_exports__, __webpack_require__) {
|
|
6
6
|
|
|
7
7
|
;// CONCATENATED MODULE: external "node:child_process"
|
|
8
8
|
const external_node_child_process_namespaceObject = __rspack_createRequire_require("node:child_process");
|
|
@@ -1026,6 +1026,39 @@ async function transferFileHandleCore(source, target, sizeHint, maxBytes, target
|
|
|
1026
1026
|
}
|
|
1027
1027
|
}
|
|
1028
1028
|
|
|
1029
|
+
;// CONCATENATED MODULE: external "node:os"
|
|
1030
|
+
const external_node_os_namespaceObject = __rspack_createRequire_require("node:os");
|
|
1031
|
+
;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/error-detail.js
|
|
1032
|
+
|
|
1033
|
+
|
|
1034
|
+
const UNSAFE_ERROR_DETAIL_CHARACTERS = /[\u0000-\u001f\u007f-\u009f\u2028\u2029]/gu;
|
|
1035
|
+
function formatErrorDetail(value) {
|
|
1036
|
+
return value.replace(UNSAFE_ERROR_DETAIL_CHARACTERS, (character) => `\\u${character.charCodeAt(0).toString(16).padStart(4, "0")}`);
|
|
1037
|
+
}
|
|
1038
|
+
function shortPath(value) {
|
|
1039
|
+
const home = external_node_os_namespaceObject.homedir();
|
|
1040
|
+
const prefix = home.endsWith(external_node_path_namespaceObject.sep) ? home : `${home}${external_node_path_namespaceObject.sep}`;
|
|
1041
|
+
const shortened = value === home ? "~"
|
|
1042
|
+
: value.startsWith(prefix) ? `~${external_node_path_namespaceObject.sep}${value.slice(prefix.length)}` : value;
|
|
1043
|
+
return formatErrorDetail(shortened);
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/file-open-error.js
|
|
1047
|
+
|
|
1048
|
+
/** Enrich only an attempted open whose absolute pathname is known by its owner. */
|
|
1049
|
+
function annotateReadOnlyOpenError(error, filePath) {
|
|
1050
|
+
if (!(error instanceof Error) || error.code !== "EROFS")
|
|
1051
|
+
return;
|
|
1052
|
+
// Keep the original error, code and errno, even if a caller froze its diagnostics.
|
|
1053
|
+
try {
|
|
1054
|
+
const failure = error;
|
|
1055
|
+
failure.path = filePath;
|
|
1056
|
+
failure.syscall = "open";
|
|
1057
|
+
failure.message = `EROFS: read-only filesystem, open '${formatErrorDetail(filePath)}'`;
|
|
1058
|
+
}
|
|
1059
|
+
catch { /* Diagnostics must not replace the I/O failure. */ }
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1029
1062
|
;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/copy-file-input.js
|
|
1030
1063
|
|
|
1031
1064
|
|
|
@@ -1034,6 +1067,7 @@ async function transferFileHandleCore(source, target, sizeHint, maxBytes, target
|
|
|
1034
1067
|
|
|
1035
1068
|
|
|
1036
1069
|
|
|
1070
|
+
|
|
1037
1071
|
function resolveFileCopyCloneMode(mode) {
|
|
1038
1072
|
const clone = resolveCopyCloneMode(mode, "never");
|
|
1039
1073
|
if (clone === "always" && !native_getNativeBinding()?.copyFileExclusive) {
|
|
@@ -1056,7 +1090,7 @@ async function writeCopyFileToFd(fd, input, maxBytes, assertBeforeMutation) {
|
|
|
1056
1090
|
maxBytes, sizeHint: input.size, signal: input.signal, assertBeforeMutation,
|
|
1057
1091
|
});
|
|
1058
1092
|
}
|
|
1059
|
-
async function createNativeCopyFile(native, input, parentFd, basename, maxBytes) {
|
|
1093
|
+
async function createNativeCopyFile(native, input, parentFd, basename, maxBytes, targetPath) {
|
|
1060
1094
|
input.signal?.throwIfAborted();
|
|
1061
1095
|
const copier = selectNativeBinding(native, "copyFileExclusive");
|
|
1062
1096
|
if (!copier) {
|
|
@@ -1072,6 +1106,7 @@ async function createNativeCopyFile(native, input, parentFd, basename, maxBytes)
|
|
|
1072
1106
|
return await copier.copyFileExclusive(input.handle.fd, parentFd, basename, input.clone, maxBytes !== undefined && Number.isFinite(maxBytes) ? maxBytes : undefined, nativeSignal);
|
|
1073
1107
|
}
|
|
1074
1108
|
catch (error) {
|
|
1109
|
+
annotateReadOnlyOpenError(error, targetPath);
|
|
1075
1110
|
const code = error?.code;
|
|
1076
1111
|
if (code === "Cancelled" || code === "ABORT_ERR")
|
|
1077
1112
|
input.signal?.throwIfAborted();
|
|
@@ -1773,8 +1808,6 @@ function errorCauseOptions(error) {
|
|
|
1773
1808
|
return { cause: error instanceof Error ? error : undefined };
|
|
1774
1809
|
}
|
|
1775
1810
|
|
|
1776
|
-
;// CONCATENATED MODULE: external "node:os"
|
|
1777
|
-
const external_node_os_namespaceObject = __rspack_createRequire_require("node:os");
|
|
1778
1811
|
;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/windows-appcontainer.js
|
|
1779
1812
|
|
|
1780
1813
|
|
|
@@ -3536,21 +3569,6 @@ function __resetNativeFallbackWarningsForTest() {
|
|
|
3536
3569
|
|
|
3537
3570
|
;// CONCATENATED MODULE: external "node:url"
|
|
3538
3571
|
const external_node_url_namespaceObject = __rspack_createRequire_require("node:url");
|
|
3539
|
-
;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/error-detail.js
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
const UNSAFE_ERROR_DETAIL_CHARACTERS = /[\u0000-\u001f\u007f-\u009f\u2028\u2029]/gu;
|
|
3543
|
-
function formatErrorDetail(value) {
|
|
3544
|
-
return value.replace(UNSAFE_ERROR_DETAIL_CHARACTERS, (character) => `\\u${character.charCodeAt(0).toString(16).padStart(4, "0")}`);
|
|
3545
|
-
}
|
|
3546
|
-
function shortPath(value) {
|
|
3547
|
-
const home = external_node_os_namespaceObject.homedir();
|
|
3548
|
-
const prefix = home.endsWith(external_node_path_namespaceObject.sep) ? home : `${home}${external_node_path_namespaceObject.sep}`;
|
|
3549
|
-
const shortened = value === home ? "~"
|
|
3550
|
-
: value.startsWith(prefix) ? `~${external_node_path_namespaceObject.sep}${value.slice(prefix.length)}` : value;
|
|
3551
|
-
return formatErrorDetail(shortened);
|
|
3552
|
-
}
|
|
3553
|
-
|
|
3554
3572
|
;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/permission-exec.js
|
|
3555
3573
|
|
|
3556
3574
|
|
|
@@ -9748,6 +9766,7 @@ var root_create_native_disposeResources = (undefined && undefined.__disposeResou
|
|
|
9748
9766
|
|
|
9749
9767
|
|
|
9750
9768
|
|
|
9769
|
+
|
|
9751
9770
|
|
|
9752
9771
|
|
|
9753
9772
|
function rootWriteQueueKey(root, relativePath) {
|
|
@@ -10158,6 +10177,7 @@ async function tryOpenCreateRootNative(params) {
|
|
|
10158
10177
|
catch (error) {
|
|
10159
10178
|
if (hasNodeErrorCode(error, "EEXIST") && typeof error === "object" && error !== null)
|
|
10160
10179
|
nativeCreateCollisions.add(error);
|
|
10180
|
+
annotateReadOnlyOpenError(error, params.target);
|
|
10161
10181
|
throw error;
|
|
10162
10182
|
}
|
|
10163
10183
|
let rawOpen = true;
|
|
@@ -12217,6 +12237,7 @@ function syncFileBestEffortSync(fd, fsModule = external_node_fs_namespaceObject)
|
|
|
12217
12237
|
|
|
12218
12238
|
|
|
12219
12239
|
|
|
12240
|
+
|
|
12220
12241
|
function nativeOpenFlags(flags) {
|
|
12221
12242
|
const closeOnExec = external_node_fs_namespaceObject.constants.O_CLOEXEC;
|
|
12222
12243
|
return (flags |
|
|
@@ -12269,6 +12290,7 @@ async function createNativeExclusiveFile(targetPath, mode) {
|
|
|
12269
12290
|
if (process.platform === "win32" && openError.code === "EPERM") {
|
|
12270
12291
|
openError.path = targetPath;
|
|
12271
12292
|
}
|
|
12293
|
+
annotateReadOnlyOpenError(error, targetPath);
|
|
12272
12294
|
throw error;
|
|
12273
12295
|
}
|
|
12274
12296
|
fd = opened.fd;
|
|
@@ -12508,6 +12530,7 @@ async function settleStagedFile(params) {
|
|
|
12508
12530
|
|
|
12509
12531
|
|
|
12510
12532
|
|
|
12533
|
+
|
|
12511
12534
|
|
|
12512
12535
|
|
|
12513
12536
|
function closeWriteFd(closeFd, fd) {
|
|
@@ -12574,7 +12597,7 @@ async function runPinnedWriteWindows(binding, params, root, parentFd, parentGuar
|
|
|
12574
12597
|
tempName = `.fs-safe-${(0,external_node_crypto_namespaceObject.randomUUID)()}.tmp`;
|
|
12575
12598
|
params.assertBeforeMutation?.();
|
|
12576
12599
|
const copied = params.input.kind === "file" && !params.private
|
|
12577
|
-
? await createNativeCopyFile(binding, params.input, parentFd, tempName, params.maxBytes)
|
|
12600
|
+
? await createNativeCopyFile(binding, params.input, parentFd, tempName, params.maxBytes, external_node_path_namespaceObject.join(parentPath, tempName))
|
|
12578
12601
|
: undefined;
|
|
12579
12602
|
if (params.private) {
|
|
12580
12603
|
const parentIdentity = external_node_fs_namespaceObject.fstatSync(parentFd, { bigint: true });
|
|
@@ -12593,7 +12616,13 @@ async function runPinnedWriteWindows(binding, params, root, parentFd, parentGuar
|
|
|
12593
12616
|
tempFd = copied.fd;
|
|
12594
12617
|
}
|
|
12595
12618
|
else {
|
|
12596
|
-
|
|
12619
|
+
try {
|
|
12620
|
+
tempFd = binding.openBeneath(parentFd, tempName, nativeOpenFlags(external_node_fs_namespaceObject.constants.O_WRONLY | external_node_fs_namespaceObject.constants.O_CREAT | external_node_fs_namespaceObject.constants.O_EXCL)).fd;
|
|
12621
|
+
}
|
|
12622
|
+
catch (error) {
|
|
12623
|
+
annotateReadOnlyOpenError(error, external_node_path_namespaceObject.join(parentPath, tempName));
|
|
12624
|
+
throw error;
|
|
12625
|
+
}
|
|
12597
12626
|
}
|
|
12598
12627
|
const verificationIdentity = strict_file_identity_inspectFileIdentitySync(() => external_node_fs_namespaceObject.fstatSync(tempFd, { bigint: true }));
|
|
12599
12628
|
tempIdentity = verificationIdentity;
|
|
@@ -12863,6 +12892,7 @@ var native_staged_file_disposeResources = (undefined && undefined.__disposeResou
|
|
|
12863
12892
|
|
|
12864
12893
|
|
|
12865
12894
|
|
|
12895
|
+
|
|
12866
12896
|
function assertNativeStaging(binding) {
|
|
12867
12897
|
if ([
|
|
12868
12898
|
binding.closeOwnedFd,
|
|
@@ -13072,14 +13102,20 @@ class NativeStagedFile {
|
|
|
13072
13102
|
assertDarwinCreationAcl(this.#owner.parentFd, "file");
|
|
13073
13103
|
// Native copying populates its new file before returning its descriptor.
|
|
13074
13104
|
const copied = input.kind === "file" && !this.#verifyMode
|
|
13075
|
-
? await createNativeCopyFile(this.#owner.binding, input, this.#owner.parentFd, this.#owner.name, maxBytes)
|
|
13105
|
+
? await createNativeCopyFile(this.#owner.binding, input, this.#owner.parentFd, this.#owner.name, maxBytes, external_node_path_namespaceObject.join(this.#owner.directory.realPath, this.#owner.name))
|
|
13076
13106
|
: undefined;
|
|
13077
13107
|
state.fileFd = copied?.fd;
|
|
13078
13108
|
if (state.fileFd === undefined) {
|
|
13079
13109
|
this.#assertBeforeMutation?.();
|
|
13080
13110
|
if (this.#private)
|
|
13081
13111
|
assertDarwinCreationAcl(this.#owner.parentFd, "file");
|
|
13082
|
-
|
|
13112
|
+
try {
|
|
13113
|
+
state.fileFd = this.#owner.binding.createStagedFile(this.#owner.parentFd, this.#owner.name);
|
|
13114
|
+
}
|
|
13115
|
+
catch (error) {
|
|
13116
|
+
annotateReadOnlyOpenError(error, external_node_path_namespaceObject.join(this.#owner.directory.realPath, this.#owner.name));
|
|
13117
|
+
throw error;
|
|
13118
|
+
}
|
|
13083
13119
|
}
|
|
13084
13120
|
const fd = state.fileFd;
|
|
13085
13121
|
if (input.kind === "file")
|
|
@@ -33868,4 +33904,4 @@ if (installedChunkData !== 0) { // 0 means "already installed".'
|
|
|
33868
33904
|
// module factories are used so entry inlining is disabled
|
|
33869
33905
|
// startup
|
|
33870
33906
|
// Load entry module and return exports
|
|
33871
|
-
var __webpack_exports__ = __webpack_require__(
|
|
33907
|
+
var __webpack_exports__ = __webpack_require__(433);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lousy-agents/agent-shell",
|
|
3
|
-
"version": "5.22.
|
|
3
|
+
"version": "5.22.12",
|
|
4
4
|
"description": "A flight recorder for npm script execution",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"typecheck": "tsc --noEmit"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@openclaw/fs-safe": "0.26.
|
|
40
|
+
"@openclaw/fs-safe": "0.26.10",
|
|
41
41
|
"zod": "4.5.2"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@github/copilot-sdk": "1.0.
|
|
44
|
+
"@github/copilot-sdk": "1.0.24"
|
|
45
45
|
},
|
|
46
46
|
"peerDependenciesMeta": {
|
|
47
47
|
"@github/copilot-sdk": {
|