@lousy-agents/cli 5.15.3 → 5.15.5
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/api/copilot-with-fastify/.devcontainer/devcontainer.json +2 -2
- package/api/copilot-with-fastify/.github/workflows/ci.yml +4 -4
- package/api/copilot-with-fastify/.nvmrc +1 -1
- package/api/copilot-with-fastify/biome.template.json +1 -1
- package/api/copilot-with-fastify/package-lock.json +398 -410
- package/api/copilot-with-fastify/package.json +7 -7
- package/cli/copilot-with-citty/.devcontainer/devcontainer.json +2 -2
- package/cli/copilot-with-citty/.github/workflows/ci.yml +3 -3
- package/cli/copilot-with-citty/.nvmrc +1 -1
- package/cli/copilot-with-citty/biome.template.json +1 -1
- package/cli/copilot-with-citty/package.json +5 -5
- package/dist/index.js +270 -51
- package/package.json +1 -1
- package/ui/copilot-with-react/.devcontainer/devcontainer.json +2 -2
- package/ui/copilot-with-react/.github/workflows/ci.yml +3 -3
- package/ui/copilot-with-react/.nvmrc +1 -1
- package/ui/copilot-with-react/biome.template.json +1 -1
- package/ui/copilot-with-react/package.json +10 -10
|
@@ -28,16 +28,16 @@
|
|
|
28
28
|
"zod": "4.4.3"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@biomejs/biome": "2.
|
|
32
|
-
"@lousy-agents/mcp": "5.15.
|
|
31
|
+
"@biomejs/biome": "2.5.0",
|
|
32
|
+
"@lousy-agents/mcp": "5.15.4",
|
|
33
33
|
"@modelcontextprotocol/server-sequential-thinking": "2025.12.18",
|
|
34
|
-
"@testcontainers/postgresql": "12.0.
|
|
35
|
-
"@types/node": "24.13.
|
|
36
|
-
"@upstash/context7-mcp": "3.1
|
|
34
|
+
"@testcontainers/postgresql": "12.0.3",
|
|
35
|
+
"@types/node": "24.13.2",
|
|
36
|
+
"@upstash/context7-mcp": "3.2.1",
|
|
37
37
|
"chance": "1.1.13",
|
|
38
|
-
"testcontainers": "12.0.
|
|
38
|
+
"testcontainers": "12.0.3",
|
|
39
39
|
"tsx": "4.22.4",
|
|
40
40
|
"typescript": "6.0.3",
|
|
41
|
-
"vitest": "4.1.
|
|
41
|
+
"vitest": "4.1.9"
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04@sha256:4bcb1b466771b1ba1ea110e2a27daea2f6093f9527fb75ee59703ec89b5561cb",
|
|
4
4
|
"features": {
|
|
5
5
|
"ghcr.io/devcontainers/features/node:1.7.1": {
|
|
6
|
-
"version": "24.
|
|
6
|
+
"version": "24.17.0"
|
|
7
7
|
},
|
|
8
8
|
"ghcr.io/devcontainers/features/github-cli:1.1.0": {
|
|
9
9
|
"version": "latest"
|
|
10
10
|
},
|
|
11
11
|
"ghcr.io/devcontainers/features/copilot-cli:1.0.0": {},
|
|
12
12
|
"ghcr.io/anthropics/devcontainer-features/claude-code:1": {
|
|
13
|
-
"version": "v2.1.
|
|
13
|
+
"version": "v2.1.181"
|
|
14
14
|
},
|
|
15
15
|
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1.0.2": {
|
|
16
16
|
"packages": "yamllint, shellcheck",
|
|
@@ -15,7 +15,7 @@ jobs:
|
|
|
15
15
|
runs-on: ubuntu-latest
|
|
16
16
|
steps:
|
|
17
17
|
- name: Checkout
|
|
18
|
-
uses: actions/checkout@
|
|
18
|
+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
19
19
|
|
|
20
20
|
- name: Setup Node.js
|
|
21
21
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
@@ -33,7 +33,7 @@ jobs:
|
|
|
33
33
|
runs-on: ubuntu-latest
|
|
34
34
|
steps:
|
|
35
35
|
- name: Checkout
|
|
36
|
-
uses: actions/checkout@
|
|
36
|
+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
37
37
|
|
|
38
38
|
- name: Setup Node.js
|
|
39
39
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
@@ -52,7 +52,7 @@ jobs:
|
|
|
52
52
|
needs: [lint, test]
|
|
53
53
|
steps:
|
|
54
54
|
- name: Checkout
|
|
55
|
-
uses: actions/checkout@
|
|
55
|
+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
56
56
|
|
|
57
57
|
- name: Setup Node.js
|
|
58
58
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
24.
|
|
1
|
+
24.17.0
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"zod": "4.4.3"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@biomejs/biome": "2.
|
|
23
|
-
"@lousy-agents/mcp": "5.15.
|
|
22
|
+
"@biomejs/biome": "2.5.0",
|
|
23
|
+
"@lousy-agents/mcp": "5.15.4",
|
|
24
24
|
"@modelcontextprotocol/server-sequential-thinking": "2025.12.18",
|
|
25
|
-
"@types/node": "24.13.
|
|
26
|
-
"@upstash/context7-mcp": "3.1
|
|
25
|
+
"@types/node": "24.13.2",
|
|
26
|
+
"@upstash/context7-mcp": "3.2.1",
|
|
27
27
|
"chance": "1.1.13",
|
|
28
28
|
"tsx": "4.22.4",
|
|
29
29
|
"typescript": "6.0.3",
|
|
30
|
-
"vitest": "4.1.
|
|
30
|
+
"vitest": "4.1.9"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/dist/index.js
CHANGED
|
@@ -2990,7 +2990,7 @@ exports.basename = (path, { windows } = {}) => {
|
|
|
2990
2990
|
|
|
2991
2991
|
|
|
2992
2992
|
},
|
|
2993
|
-
|
|
2993
|
+
455(__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);
|
|
@@ -3157,6 +3157,7 @@ function hasNonEmptyString(value) {
|
|
|
3157
3157
|
|
|
3158
3158
|
|
|
3159
3159
|
|
|
3160
|
+
|
|
3160
3161
|
const NOT_FOUND_CODES = new Set(["ENOENT", "ENOTDIR"]);
|
|
3161
3162
|
const SYMLINK_OPEN_CODES = new Set(["ELOOP", "EINVAL", "ENOTSUP"]);
|
|
3162
3163
|
const POSIX_SEPARATOR_CHAR_CODE = 0x2f;
|
|
@@ -3356,6 +3357,29 @@ function directory_guard_createNearestExistingSyncDirectoryGuard(rootReal, targe
|
|
|
3356
3357
|
return directory_guard_createSyncDirectoryGuard(root);
|
|
3357
3358
|
}
|
|
3358
3359
|
|
|
3360
|
+
;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/fsync.js
|
|
3361
|
+
|
|
3362
|
+
|
|
3363
|
+
async function syncDirectoryBestEffort(dirPath) {
|
|
3364
|
+
if (process.platform === "win32") {
|
|
3365
|
+
return;
|
|
3366
|
+
}
|
|
3367
|
+
let handle;
|
|
3368
|
+
try {
|
|
3369
|
+
const flags = external_node_fs_.constants.O_RDONLY |
|
|
3370
|
+
("O_DIRECTORY" in external_node_fs_.constants ? external_node_fs_.constants.O_DIRECTORY : 0) |
|
|
3371
|
+
("O_NOFOLLOW" in external_node_fs_.constants ? external_node_fs_.constants.O_NOFOLLOW : 0);
|
|
3372
|
+
handle = await promises_.open(dirPath, flags);
|
|
3373
|
+
await handle.sync();
|
|
3374
|
+
}
|
|
3375
|
+
catch {
|
|
3376
|
+
// Some filesystems reject directory handles; keep the write usable there.
|
|
3377
|
+
}
|
|
3378
|
+
finally {
|
|
3379
|
+
await handle?.close().catch(() => undefined);
|
|
3380
|
+
}
|
|
3381
|
+
}
|
|
3382
|
+
|
|
3359
3383
|
;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js
|
|
3360
3384
|
|
|
3361
3385
|
|
|
@@ -4454,6 +4478,7 @@ async function runPinnedPathHelper(params) {
|
|
|
4454
4478
|
|
|
4455
4479
|
|
|
4456
4480
|
|
|
4481
|
+
|
|
4457
4482
|
function pinned_write_byteLength(input, encoding) {
|
|
4458
4483
|
return typeof input === "string"
|
|
4459
4484
|
? Buffer.byteLength(input, encoding ?? "utf8")
|
|
@@ -4646,11 +4671,13 @@ async function runPinnedWriteFallback(params) {
|
|
|
4646
4671
|
throw new errors_FsSafeError("path-mismatch", "fallback temp path changed during write");
|
|
4647
4672
|
}
|
|
4648
4673
|
const expectedTempStat = tempStat;
|
|
4674
|
+
await handle.sync();
|
|
4649
4675
|
await handle.close().catch(() => undefined);
|
|
4650
4676
|
handle = undefined;
|
|
4651
4677
|
await withAsyncDirectoryGuards([parentGuard], async () => {
|
|
4652
4678
|
await promises_.rename(tempPath, targetPath);
|
|
4653
4679
|
renamed = true;
|
|
4680
|
+
await syncDirectoryBestEffort(parentPath);
|
|
4654
4681
|
targetStat = await promises_.lstat(targetPath);
|
|
4655
4682
|
if (targetStat.isSymbolicLink() || !file_identity_sameFileIdentity(targetStat, expectedTempStat)) {
|
|
4656
4683
|
throw new errors_FsSafeError("path-mismatch", "fallback target changed during write");
|
|
@@ -5324,6 +5351,197 @@ function path_policy_shortPath(value) {
|
|
|
5324
5351
|
return value;
|
|
5325
5352
|
}
|
|
5326
5353
|
|
|
5354
|
+
// EXTERNAL MODULE: external "node:url"
|
|
5355
|
+
var external_node_url_ = __webpack_require__(3136);
|
|
5356
|
+
;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/local-file-access.js
|
|
5357
|
+
|
|
5358
|
+
|
|
5359
|
+
|
|
5360
|
+
const ENCODED_FILE_URL_SEPARATOR_RE = /%(?:2f|5c)/i;
|
|
5361
|
+
function isLocalFileUrlHost(hostname) {
|
|
5362
|
+
const normalized = normalizeLowercaseStringOrEmpty(hostname);
|
|
5363
|
+
return normalized === "" || normalized === "localhost";
|
|
5364
|
+
}
|
|
5365
|
+
function hasEncodedFileUrlSeparator(pathname) {
|
|
5366
|
+
return ENCODED_FILE_URL_SEPARATOR_RE.test(pathname);
|
|
5367
|
+
}
|
|
5368
|
+
function isWindowsNetworkPath(filePath, platform = process.platform) {
|
|
5369
|
+
if (platform !== "win32") {
|
|
5370
|
+
return false;
|
|
5371
|
+
}
|
|
5372
|
+
const normalized = filePath.replace(/\//g, "\\");
|
|
5373
|
+
return normalized.startsWith("\\\\?\\UNC\\") || normalized.startsWith("\\\\");
|
|
5374
|
+
}
|
|
5375
|
+
function isWindowsDriveLetterPath(filePath, platform = process.platform) {
|
|
5376
|
+
return platform === "win32" && /^[A-Za-z]:[\\/]/.test(filePath);
|
|
5377
|
+
}
|
|
5378
|
+
function assertNoWindowsNetworkPath(filePath, label = "Path") {
|
|
5379
|
+
if (isWindowsNetworkPath(filePath)) {
|
|
5380
|
+
throw new Error(`${label} cannot use Windows network paths: ${filePath}`);
|
|
5381
|
+
}
|
|
5382
|
+
}
|
|
5383
|
+
function safeFileURLToPath(fileUrl) {
|
|
5384
|
+
let parsed;
|
|
5385
|
+
try {
|
|
5386
|
+
parsed = new external_node_url_.URL(fileUrl);
|
|
5387
|
+
}
|
|
5388
|
+
catch {
|
|
5389
|
+
throw new Error(`Invalid file:// URL: ${fileUrl}`);
|
|
5390
|
+
}
|
|
5391
|
+
if (parsed.protocol !== "file:") {
|
|
5392
|
+
throw new Error(`Invalid file:// URL: ${fileUrl}`);
|
|
5393
|
+
}
|
|
5394
|
+
if (!isLocalFileUrlHost(parsed.hostname)) {
|
|
5395
|
+
throw new Error(`file:// URLs with remote hosts are not allowed: ${fileUrl}`);
|
|
5396
|
+
}
|
|
5397
|
+
if (hasEncodedFileUrlSeparator(parsed.pathname)) {
|
|
5398
|
+
throw new Error(`file:// URLs cannot encode path separators: ${fileUrl}`);
|
|
5399
|
+
}
|
|
5400
|
+
const filePath = (0,external_node_url_.fileURLToPath)(parsed);
|
|
5401
|
+
assertNoWindowsNetworkPath(filePath, "Local file URL");
|
|
5402
|
+
return filePath;
|
|
5403
|
+
}
|
|
5404
|
+
function trySafeFileURLToPath(fileUrl) {
|
|
5405
|
+
try {
|
|
5406
|
+
return safeFileURLToPath(fileUrl);
|
|
5407
|
+
}
|
|
5408
|
+
catch {
|
|
5409
|
+
return undefined;
|
|
5410
|
+
}
|
|
5411
|
+
}
|
|
5412
|
+
function basenameFromMediaSource(source) {
|
|
5413
|
+
if (!source) {
|
|
5414
|
+
return undefined;
|
|
5415
|
+
}
|
|
5416
|
+
if (source.startsWith("file://")) {
|
|
5417
|
+
const filePath = trySafeFileURLToPath(source);
|
|
5418
|
+
return filePath ? path.basename(filePath) || undefined : undefined;
|
|
5419
|
+
}
|
|
5420
|
+
if (/^https?:\/\//i.test(source)) {
|
|
5421
|
+
try {
|
|
5422
|
+
return path.basename(new URL(source).pathname) || undefined;
|
|
5423
|
+
}
|
|
5424
|
+
catch {
|
|
5425
|
+
return undefined;
|
|
5426
|
+
}
|
|
5427
|
+
}
|
|
5428
|
+
return path.basename(source) || undefined;
|
|
5429
|
+
}
|
|
5430
|
+
|
|
5431
|
+
;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/device-path.js
|
|
5432
|
+
|
|
5433
|
+
|
|
5434
|
+
|
|
5435
|
+
const POSIX_BLOCKED_DEVICE_PATHS = new Set([
|
|
5436
|
+
"/dev/zero",
|
|
5437
|
+
"/dev/random",
|
|
5438
|
+
"/dev/urandom",
|
|
5439
|
+
"/dev/full",
|
|
5440
|
+
"/dev/stdin",
|
|
5441
|
+
"/dev/stdout",
|
|
5442
|
+
"/dev/stderr",
|
|
5443
|
+
"/dev/tty",
|
|
5444
|
+
"/dev/console",
|
|
5445
|
+
]);
|
|
5446
|
+
const WINDOWS_RESERVED_DEVICE_NAMES = new Set([
|
|
5447
|
+
"CON",
|
|
5448
|
+
"PRN",
|
|
5449
|
+
"AUX",
|
|
5450
|
+
"NUL",
|
|
5451
|
+
"CLOCK$",
|
|
5452
|
+
"CONIN$",
|
|
5453
|
+
"CONOUT$",
|
|
5454
|
+
"COM1",
|
|
5455
|
+
"COM2",
|
|
5456
|
+
"COM3",
|
|
5457
|
+
"COM4",
|
|
5458
|
+
"COM5",
|
|
5459
|
+
"COM6",
|
|
5460
|
+
"COM7",
|
|
5461
|
+
"COM8",
|
|
5462
|
+
"COM9",
|
|
5463
|
+
"COM¹",
|
|
5464
|
+
"COM²",
|
|
5465
|
+
"COM³",
|
|
5466
|
+
"LPT1",
|
|
5467
|
+
"LPT2",
|
|
5468
|
+
"LPT3",
|
|
5469
|
+
"LPT4",
|
|
5470
|
+
"LPT5",
|
|
5471
|
+
"LPT6",
|
|
5472
|
+
"LPT7",
|
|
5473
|
+
"LPT8",
|
|
5474
|
+
"LPT9",
|
|
5475
|
+
"LPT¹",
|
|
5476
|
+
"LPT²",
|
|
5477
|
+
"LPT³",
|
|
5478
|
+
]);
|
|
5479
|
+
function candidateReadPaths(filePath) {
|
|
5480
|
+
if (!filePath.startsWith("file://")) {
|
|
5481
|
+
return [filePath];
|
|
5482
|
+
}
|
|
5483
|
+
const parsed = trySafeFileURLToPath(filePath);
|
|
5484
|
+
return parsed === undefined ? [filePath] : [filePath, parsed];
|
|
5485
|
+
}
|
|
5486
|
+
function normalizePosixPath(filePath, cwd) {
|
|
5487
|
+
if (external_node_path_.posix.isAbsolute(filePath)) {
|
|
5488
|
+
return external_node_path_.posix.normalize(filePath);
|
|
5489
|
+
}
|
|
5490
|
+
const base = cwd && external_node_path_.posix.isAbsolute(cwd) ? cwd : process.cwd();
|
|
5491
|
+
return external_node_path_.posix.resolve(base, filePath);
|
|
5492
|
+
}
|
|
5493
|
+
function matchPosixDeviceReadPath(filePath, cwd) {
|
|
5494
|
+
const normalized = normalizePosixPath(filePath, cwd);
|
|
5495
|
+
if (POSIX_BLOCKED_DEVICE_PATHS.has(normalized)) {
|
|
5496
|
+
return { path: normalized, reason: "posix-device" };
|
|
5497
|
+
}
|
|
5498
|
+
if (normalized === "/dev/fd" || normalized.startsWith("/dev/fd/")) {
|
|
5499
|
+
return { path: normalized, reason: "posix-fd" };
|
|
5500
|
+
}
|
|
5501
|
+
if (/^\/proc\/(?:self|thread-self|\d+)\/fd(?:\/|$)/.test(normalized)) {
|
|
5502
|
+
return { path: normalized, reason: "posix-fd" };
|
|
5503
|
+
}
|
|
5504
|
+
return undefined;
|
|
5505
|
+
}
|
|
5506
|
+
function normalizeWindowsDeviceBaseName(filePath) {
|
|
5507
|
+
const normalized = filePath.replace(/\//g, "\\").replace(/[\\]+$/g, "");
|
|
5508
|
+
const lastSegment = normalized.split("\\").filter(Boolean).at(-1) ?? normalized;
|
|
5509
|
+
const withoutStream = lastSegment.split(":")[0] ?? lastSegment;
|
|
5510
|
+
const withoutTrailingIgnoredChars = withoutStream.replace(/[ .]+$/g, "");
|
|
5511
|
+
return (withoutTrailingIgnoredChars.split(".")[0] ?? withoutTrailingIgnoredChars).toUpperCase();
|
|
5512
|
+
}
|
|
5513
|
+
function matchWindowsDeviceReadPath(filePath) {
|
|
5514
|
+
const normalized = filePath.replace(/\//g, "\\");
|
|
5515
|
+
if (/^\\\\\.\\/.test(normalized) || /^\\\\\?\\GLOBALROOT\\Device\\/i.test(normalized)) {
|
|
5516
|
+
return { path: normalized, reason: "windows-device" };
|
|
5517
|
+
}
|
|
5518
|
+
const baseName = normalizeWindowsDeviceBaseName(filePath);
|
|
5519
|
+
if (WINDOWS_RESERVED_DEVICE_NAMES.has(baseName)) {
|
|
5520
|
+
return { path: normalized, reason: "windows-device" };
|
|
5521
|
+
}
|
|
5522
|
+
return undefined;
|
|
5523
|
+
}
|
|
5524
|
+
function matchUnsafeDeviceReadPath(filePath, options = {}) {
|
|
5525
|
+
const platform = options.platform ?? process.platform;
|
|
5526
|
+
for (const candidate of candidateReadPaths(filePath)) {
|
|
5527
|
+
const match = platform === "win32"
|
|
5528
|
+
? matchWindowsDeviceReadPath(candidate)
|
|
5529
|
+
: matchPosixDeviceReadPath(candidate, options.cwd);
|
|
5530
|
+
if (match) {
|
|
5531
|
+
return match;
|
|
5532
|
+
}
|
|
5533
|
+
}
|
|
5534
|
+
return undefined;
|
|
5535
|
+
}
|
|
5536
|
+
function isUnsafeDeviceReadPath(filePath, options) {
|
|
5537
|
+
return matchUnsafeDeviceReadPath(filePath, options) !== undefined;
|
|
5538
|
+
}
|
|
5539
|
+
function assertNoUnsafeDeviceReadPath(filePath, options) {
|
|
5540
|
+
if (matchUnsafeDeviceReadPath(filePath, options)) {
|
|
5541
|
+
throw new errors_FsSafeError("device-path", `file reads from unsafe device paths are not allowed: ${filePath}`);
|
|
5542
|
+
}
|
|
5543
|
+
}
|
|
5544
|
+
|
|
5327
5545
|
;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/read-opened-file.js
|
|
5328
5546
|
|
|
5329
5547
|
async function read_opened_file_readOpenedFileSafely(params) {
|
|
@@ -5675,6 +5893,7 @@ async function serializePathWrite(key, run) {
|
|
|
5675
5893
|
|
|
5676
5894
|
|
|
5677
5895
|
|
|
5896
|
+
|
|
5678
5897
|
|
|
5679
5898
|
|
|
5680
5899
|
function logWarn(message) {
|
|
@@ -5700,20 +5919,16 @@ const OPEN_APPEND_CREATE_FLAGS = external_node_fs_.constants.O_RDWR |
|
|
|
5700
5919
|
external_node_fs_.constants.O_EXCL |
|
|
5701
5920
|
(SUPPORTS_NOFOLLOW ? external_node_fs_.constants.O_NOFOLLOW : 0);
|
|
5702
5921
|
const DEFAULT_ROOT_MAX_BYTES = 16 * 1024 * 1024;
|
|
5703
|
-
function closeHandleForDispose(handle) {
|
|
5704
|
-
return handle.close().catch(() => undefined);
|
|
5705
|
-
}
|
|
5706
5922
|
function openResult(params) {
|
|
5707
5923
|
return {
|
|
5708
5924
|
handle: params.handle,
|
|
5709
5925
|
realPath: params.realPath,
|
|
5710
5926
|
stat: params.stat,
|
|
5711
|
-
[Symbol.asyncDispose]:
|
|
5712
|
-
await closeHandleForDispose(params.handle);
|
|
5713
|
-
},
|
|
5927
|
+
[Symbol.asyncDispose]: () => params.handle.close().catch(() => undefined),
|
|
5714
5928
|
};
|
|
5715
5929
|
}
|
|
5716
5930
|
async function openVerifiedLocalFile(filePath, options) {
|
|
5931
|
+
assertNoUnsafeDeviceReadPath(filePath);
|
|
5717
5932
|
const fsSafeTestHooks = getFsSafeTestHooks();
|
|
5718
5933
|
// Reject directories before opening so we never surface EISDIR to callers (e.g. tool
|
|
5719
5934
|
// results that get sent to messaging channels). See openclaw/openclaw#31186.
|
|
@@ -6238,9 +6453,7 @@ async function openWritableFileInRoot(root, params) {
|
|
|
6238
6453
|
createdForWrite,
|
|
6239
6454
|
realPath,
|
|
6240
6455
|
stat,
|
|
6241
|
-
[Symbol.asyncDispose]:
|
|
6242
|
-
await closeHandleForDispose(handle);
|
|
6243
|
-
},
|
|
6456
|
+
[Symbol.asyncDispose]: () => handle.close().catch(() => undefined),
|
|
6244
6457
|
};
|
|
6245
6458
|
}
|
|
6246
6459
|
catch (err) {
|
|
@@ -6277,10 +6490,15 @@ async function appendFileInRoot(root, params) {
|
|
|
6277
6490
|
}
|
|
6278
6491
|
if (typeof params.data === "string") {
|
|
6279
6492
|
await target.handle.appendFile(`${prefix}${params.data}`, params.encoding ?? "utf8");
|
|
6280
|
-
return;
|
|
6281
6493
|
}
|
|
6282
|
-
|
|
6283
|
-
|
|
6494
|
+
else {
|
|
6495
|
+
const payload = prefix.length > 0 ? Buffer.concat([Buffer.from(prefix, "utf8"), params.data]) : params.data;
|
|
6496
|
+
await target.handle.appendFile(payload);
|
|
6497
|
+
}
|
|
6498
|
+
await target.handle.sync();
|
|
6499
|
+
if (target.createdForWrite) {
|
|
6500
|
+
await syncDirectoryBestEffort(external_node_path_.dirname(target.realPath));
|
|
6501
|
+
}
|
|
6284
6502
|
}
|
|
6285
6503
|
finally {
|
|
6286
6504
|
await target.handle.close().catch(() => { });
|
|
@@ -6337,42 +6555,45 @@ async function writeFileInRoot(root, params) {
|
|
|
6337
6555
|
}
|
|
6338
6556
|
const pinned = await resolvePinnedWriteTargetInRoot(root, params.relativePath, params.mode, params.denyMutations);
|
|
6339
6557
|
await serializePathWrite(pinned.targetPath, async () => {
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
throw
|
|
6363
|
-
|
|
6364
|
-
try {
|
|
6365
|
-
await verifyAtomicWriteResult({
|
|
6366
|
-
root,
|
|
6367
|
-
targetPath: pinned.targetPath,
|
|
6368
|
-
expectedIdentity: identity,
|
|
6558
|
+
await commitPinnedWriteInRoot(root, pinned, params);
|
|
6559
|
+
});
|
|
6560
|
+
}
|
|
6561
|
+
async function commitPinnedWriteInRoot(root, pinned, params) {
|
|
6562
|
+
let identity;
|
|
6563
|
+
try {
|
|
6564
|
+
identity = await runPinnedWriteHelper({
|
|
6565
|
+
rootPath: pinned.rootReal,
|
|
6566
|
+
relativeParentPath: pinned.relativeParentPath,
|
|
6567
|
+
basename: pinned.basename,
|
|
6568
|
+
mkdir: params.mkdir !== false,
|
|
6569
|
+
mode: params.mode ?? pinned.mode,
|
|
6570
|
+
overwrite: params.overwrite,
|
|
6571
|
+
input: {
|
|
6572
|
+
kind: "buffer",
|
|
6573
|
+
data: params.data,
|
|
6574
|
+
encoding: params.encoding,
|
|
6575
|
+
},
|
|
6576
|
+
});
|
|
6577
|
+
}
|
|
6578
|
+
catch (error) {
|
|
6579
|
+
if (params.overwrite === false && isAlreadyExistsError(error)) {
|
|
6580
|
+
throw new errors_FsSafeError("already-exists", "file already exists", {
|
|
6581
|
+
cause: error instanceof Error ? error : undefined,
|
|
6369
6582
|
});
|
|
6370
6583
|
}
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6584
|
+
throw normalizePinnedWriteError(error);
|
|
6585
|
+
}
|
|
6586
|
+
try {
|
|
6587
|
+
await verifyAtomicWriteResult({
|
|
6588
|
+
root,
|
|
6589
|
+
targetPath: pinned.targetPath,
|
|
6590
|
+
expectedIdentity: identity,
|
|
6591
|
+
});
|
|
6592
|
+
}
|
|
6593
|
+
catch (err) {
|
|
6594
|
+
emitWriteBoundaryWarning(`post-write verification failed: ${String(err)}`);
|
|
6595
|
+
throw err;
|
|
6596
|
+
}
|
|
6376
6597
|
}
|
|
6377
6598
|
async function copyFileInRoot(root, params) {
|
|
6378
6599
|
assertValidRootRelativePath(params.relativePath);
|
|
@@ -7537,7 +7758,7 @@ const regexes_base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0
|
|
|
7537
7758
|
const regexes_base64url = /^[A-Za-z0-9_-]*$/;
|
|
7538
7759
|
// based on https://stackoverflow.com/questions/106179/regular-expression-to-match-dns-hostname-or-ip-address
|
|
7539
7760
|
// export const hostname: RegExp = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;
|
|
7540
|
-
const
|
|
7761
|
+
const regexes_hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
|
|
7541
7762
|
const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
7542
7763
|
const httpProtocol = /^https?$/;
|
|
7543
7764
|
// https://blog.stevenlevithan.com/archives/validate-phone-number#r4-3 (regex sans spaces)
|
|
@@ -18465,8 +18686,6 @@ const pathe_M_eThtNZ_path = (/* unused pure expression or super */ null && ({
|
|
|
18465
18686
|
|
|
18466
18687
|
// EXTERNAL MODULE: ../../node_modules/dotenv/lib/main.js
|
|
18467
18688
|
var lib_main = __webpack_require__(5599);
|
|
18468
|
-
// EXTERNAL MODULE: external "node:url"
|
|
18469
|
-
var external_node_url_ = __webpack_require__(3136);
|
|
18470
18689
|
// EXTERNAL MODULE: external "node:assert"
|
|
18471
18690
|
var external_node_assert_ = __webpack_require__(4589);
|
|
18472
18691
|
// EXTERNAL MODULE: external "node:v8"
|
|
@@ -59381,4 +59600,4 @@ if (installedChunkData !== 0) { // 0 means "already installed".'
|
|
|
59381
59600
|
// module factories are used so entry inlining is disabled
|
|
59382
59601
|
// startup
|
|
59383
59602
|
// Load entry module and return exports
|
|
59384
|
-
var __webpack_exports__ = __webpack_require__(
|
|
59603
|
+
var __webpack_exports__ = __webpack_require__(455);
|
package/package.json
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04@sha256:4bcb1b466771b1ba1ea110e2a27daea2f6093f9527fb75ee59703ec89b5561cb",
|
|
4
4
|
"features": {
|
|
5
5
|
"ghcr.io/devcontainers/features/node:1.7.1": {
|
|
6
|
-
"version": "24.
|
|
6
|
+
"version": "24.17.0"
|
|
7
7
|
},
|
|
8
8
|
"ghcr.io/devcontainers/features/github-cli:1.1.0": {
|
|
9
9
|
"version": "latest"
|
|
10
10
|
},
|
|
11
11
|
"ghcr.io/devcontainers/features/copilot-cli:1.0.0": {},
|
|
12
12
|
"ghcr.io/anthropics/devcontainer-features/claude-code:1": {
|
|
13
|
-
"version": "v2.1.
|
|
13
|
+
"version": "v2.1.181"
|
|
14
14
|
},
|
|
15
15
|
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1.0.2": {
|
|
16
16
|
"packages": "libnss3, libnspr4, libatk1.0-0t64, libatk-bridge2.0-0t64, libcups2t64, libdrm2, libdbus-1-3, libatspi2.0-0t64, libxcomposite1, libxdamage1, libxfixes3, libxrandr2, libgbm1, libxkbcommon0, libasound2t64, yamllint, shellcheck",
|
|
@@ -15,7 +15,7 @@ jobs:
|
|
|
15
15
|
runs-on: ubuntu-latest
|
|
16
16
|
steps:
|
|
17
17
|
- name: Checkout
|
|
18
|
-
uses: actions/checkout@
|
|
18
|
+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
19
19
|
|
|
20
20
|
- name: Setup Node.js
|
|
21
21
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
@@ -33,7 +33,7 @@ jobs:
|
|
|
33
33
|
runs-on: ubuntu-latest
|
|
34
34
|
steps:
|
|
35
35
|
- name: Checkout
|
|
36
|
-
uses: actions/checkout@
|
|
36
|
+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
37
37
|
|
|
38
38
|
- name: Setup Node.js
|
|
39
39
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
@@ -52,7 +52,7 @@ jobs:
|
|
|
52
52
|
needs: [lint, test]
|
|
53
53
|
steps:
|
|
54
54
|
- name: Checkout
|
|
55
|
-
uses: actions/checkout@
|
|
55
|
+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
56
56
|
|
|
57
57
|
- name: Setup Node.js
|
|
58
58
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
24.
|
|
1
|
+
24.17.0
|
|
@@ -14,31 +14,31 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@emotion/server": "11.11.0",
|
|
17
|
-
"@mui/material": "9.1.
|
|
18
|
-
"@mui/material-nextjs": "9.1.
|
|
17
|
+
"@mui/material": "9.1.1",
|
|
18
|
+
"@mui/material-nextjs": "9.1.1",
|
|
19
19
|
"next": "16.2.9",
|
|
20
20
|
"react": "19.2.7",
|
|
21
21
|
"react-dom": "19.2.7"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@biomejs/biome": "2.
|
|
24
|
+
"@biomejs/biome": "2.5.0",
|
|
25
25
|
"@eslint/eslintrc": "3.3.5",
|
|
26
|
-
"@lousy-agents/mcp": "5.15.
|
|
26
|
+
"@lousy-agents/mcp": "5.15.4",
|
|
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",
|
|
30
|
-
"@types/node": "24.13.
|
|
30
|
+
"@types/node": "24.13.2",
|
|
31
31
|
"@types/react": "19.2.17",
|
|
32
32
|
"@types/react-dom": "19.2.3",
|
|
33
|
-
"@upstash/context7-mcp": "3.1
|
|
33
|
+
"@upstash/context7-mcp": "3.2.1",
|
|
34
34
|
"@vitejs/plugin-react": "6.0.2",
|
|
35
|
-
"@vitest/ui": "4.1.
|
|
36
|
-
"eslint": "10.
|
|
35
|
+
"@vitest/ui": "4.1.9",
|
|
36
|
+
"eslint": "10.5.0",
|
|
37
37
|
"eslint-config-next": "16.2.9",
|
|
38
|
-
"happy-dom": "20.10.
|
|
38
|
+
"happy-dom": "20.10.6",
|
|
39
39
|
"jsdom": "29.1.1",
|
|
40
40
|
"typescript": "6.0.3",
|
|
41
|
-
"vitest": "4.1.
|
|
41
|
+
"vitest": "4.1.9",
|
|
42
42
|
"whatwg-fetch": "3.6.20"
|
|
43
43
|
}
|
|
44
44
|
}
|