@lousy-agents/cli 5.22.7 → 5.22.8

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.
@@ -10,7 +10,7 @@
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.301"
13
+ "version": "v2.1.302"
14
14
  },
15
15
  "ghcr.io/rocker-org/devcontainer-features/apt-packages:1.0.2": {
16
16
  "packages": "yamllint, shellcheck",
@@ -1 +1 @@
1
- 24.21.0
1
+ 24.22.0
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "devDependencies": {
20
20
  "@biomejs/biome": "2.5.15",
21
- "@lousy-agents/mcp": "5.22.6",
21
+ "@lousy-agents/mcp": "5.22.7",
22
22
  "@modelcontextprotocol/server-sequential-thinking": "2026.8.31",
23
23
  "@testcontainers/postgresql": "12.2.1",
24
24
  "@types/node": "24.19.2",
@@ -958,9 +958,9 @@
958
958
  }
959
959
  },
960
960
  "node_modules/@lousy-agents/mcp": {
961
- "version": "5.22.6",
962
- "resolved": "https://registry.npmjs.org/@lousy-agents/mcp/-/mcp-5.22.6.tgz",
963
- "integrity": "sha512-vioGhbpkZ6vw5MhmyRUZkC5nlggXh9FfJWJo2nbDNDbRU6N0AQBcUATzAuDW4Tt4mMS0F0igS3EYmDaON3wqXg==",
961
+ "version": "5.22.7",
962
+ "resolved": "https://registry.npmjs.org/@lousy-agents/mcp/-/mcp-5.22.7.tgz",
963
+ "integrity": "sha512-IRnLKdv9HL6GAmA/DukpVyd04DlS8INrLnOyb/ywP5u0vozKW/7UOuBnHTI7BFzKJp0EdlRQ2ndHJMbarcR3cw==",
964
964
  "dev": true,
965
965
  "license": "BSD-2-Clause-Patent",
966
966
  "dependencies": {
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@biomejs/biome": "2.5.15",
32
- "@lousy-agents/mcp": "5.22.6",
32
+ "@lousy-agents/mcp": "5.22.7",
33
33
  "@modelcontextprotocol/server-sequential-thinking": "2026.8.31",
34
34
  "@testcontainers/postgresql": "12.2.1",
35
35
  "@types/node": "24.19.2",
@@ -10,7 +10,7 @@
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.301"
13
+ "version": "v2.1.302"
14
14
  },
15
15
  "ghcr.io/rocker-org/devcontainer-features/apt-packages:1.0.2": {
16
16
  "packages": "yamllint, shellcheck",
@@ -1 +1 @@
1
- 24.21.0
1
+ 24.22.0
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "devDependencies": {
22
22
  "@biomejs/biome": "2.5.15",
23
- "@lousy-agents/mcp": "5.22.6",
23
+ "@lousy-agents/mcp": "5.22.7",
24
24
  "@modelcontextprotocol/server-sequential-thinking": "2026.8.31",
25
25
  "@types/node": "24.19.2",
26
26
  "chance": "1.1.13",
package/dist/index.js CHANGED
@@ -3212,12 +3212,23 @@ function parseMode(value) {
3212
3212
  function configureFsSafeNative(config) {
3213
3213
  overrideConfig = { ...overrideConfig, ...config };
3214
3214
  }
3215
+ function rejectLegacyMode() {
3216
+ for (const source of ["FS_SAFE_PYTHON_MODE", "OPENCLAW_FS_SAFE_PYTHON_MODE"]) {
3217
+ if (process.env[source] === undefined)
3218
+ continue;
3219
+ const mode = parseMode(process.env[source]) ?? "auto";
3220
+ throw new Error(`${source} has been removed. Set FS_SAFE_NATIVE_MODE=${mode} or ` +
3221
+ `configureFsSafeNative({ mode: "${mode}" }) before using fs-safe, then remove ${source}. ` +
3222
+ "Legacy mode settings no longer select native policy.");
3223
+ }
3224
+ return "auto";
3225
+ }
3215
3226
  function getFsSafeNativeConfig() {
3216
3227
  return {
3217
3228
  mode: overrideConfig.mode ??
3218
3229
  parseMode(process.env.FS_SAFE_NATIVE_MODE) ??
3219
3230
  parseMode(process.env.OPENCLAW_FS_SAFE_NATIVE_MODE) ??
3220
- "auto",
3231
+ rejectLegacyMode(),
3221
3232
  };
3222
3233
  }
3223
3234
  /** Internal provenance; keep the public configuration shape unchanged. */
@@ -3229,13 +3240,13 @@ function getNativeModeSetting() {
3229
3240
  if (mode !== undefined)
3230
3241
  return { mode, source };
3231
3242
  }
3232
- return { mode: "auto", source: "default" };
3243
+ return { mode: rejectLegacyMode(), source: "default" };
3233
3244
  }
3234
3245
  function isFsSafeNativeRequired() {
3235
3246
  return (overrideConfig.mode ??
3236
3247
  parseMode(process.env.FS_SAFE_NATIVE_MODE) ??
3237
3248
  parseMode(process.env.OPENCLAW_FS_SAFE_NATIVE_MODE) ??
3238
- "auto") === "require";
3249
+ rejectLegacyMode()) === "require";
3239
3250
  }
3240
3251
  function __resetFsSafeNativeConfigForTest() {
3241
3252
  overrideConfig = {};
@@ -8075,14 +8086,15 @@ function pathExistsSync(targetPath) {
8075
8086
  function resolvePathViaExistingAncestorSync(targetPath) {
8076
8087
  return resolveExistingAncestor(targetPath, "ordinary");
8077
8088
  }
8078
- function resolveExistingAncestor(targetPath, mode) {
8079
- const exists = mode === "native" ? root_path_existing_pathExists : pathExistsSync;
8080
- const canonicalize = mode === "native" ? realpath_realpathSync.native : realpath_realpathSync;
8089
+ function resolveExistingAncestor(targetPath, mode, preserveRawSegments = false, remainingHops = 64) {
8090
+ const exists = mode === "native" || preserveRawSegments ? root_path_existing_pathExists : pathExistsSync;
8091
+ const canonicalize = realpath_realpathSync.native;
8081
8092
  windows_path_alias_assertNoWindowsPathAlias(targetPath);
8082
8093
  const normalized = windows_path_alias_resolvePathPreservingWindowsRoot(targetPath);
8083
8094
  windows_path_alias_assertNoWindowsPathAlias(normalized);
8084
- let cursor = normalized;
8085
- const filesystemRoot = external_node_path_.parse(normalized).root;
8095
+ const candidate = preserveRawSegments ? absolutePathWithRawSegments(targetPath) : normalized;
8096
+ let cursor = candidate;
8097
+ const filesystemRoot = external_node_path_.parse(candidate).root;
8086
8098
  while (cursor !== filesystemRoot &&
8087
8099
  !exists(cursor)) {
8088
8100
  cursor = external_node_path_.dirname(cursor);
@@ -8094,22 +8106,30 @@ function resolveExistingAncestor(targetPath, mode) {
8094
8106
  try {
8095
8107
  rawResolvedAncestor = canonicalize(windows_path_alias_pathForWindowsFilesystem(cursor));
8096
8108
  }
8097
- catch {
8098
- return normalized;
8109
+ catch (error) {
8110
+ if (!preserveRawSegments)
8111
+ return normalized;
8112
+ if (!path_isNotFoundPathError(error))
8113
+ throw error;
8114
+ rawResolvedAncestor = resolveSymlinkHopPath(cursor, mode, false, remainingHops);
8099
8115
  }
8100
8116
  windows_path_alias_assertNoWindowsPathAlias(rawResolvedAncestor);
8101
8117
  const resolvedAncestor = windows_path_alias_resolvePathPreservingWindowsRoot(rawResolvedAncestor);
8102
8118
  windows_path_alias_assertNoWindowsPathAlias(resolvedAncestor);
8103
8119
  // Keep a leading suffix separator relative to the canonical ancestor.
8104
- const resolved = cursor === normalized
8120
+ const suffix = candidate.slice(cursor.length);
8121
+ if (preserveRawSegments && suffix.split(external_node_path_.sep).includes("..")) {
8122
+ throw new errors_FsSafeError("symlink", "symlink target has an unresolved parent component");
8123
+ }
8124
+ const resolved = cursor === candidate
8105
8125
  ? resolvedAncestor
8106
- : external_node_path_.resolve(resolvedAncestor, `.${external_node_path_.sep}${normalized.slice(cursor.length)}`);
8126
+ : external_node_path_.resolve(resolvedAncestor, `.${external_node_path_.sep}${suffix}`);
8107
8127
  windows_path_alias_assertNoWindowsPathAlias(resolved);
8108
8128
  return resolved;
8109
8129
  }
8110
- function resolveSymlinkHopPath(symlinkPath, mode, rejectUnresolved) {
8130
+ function resolveSymlinkHopPath(symlinkPath, mode, rejectUnresolved, remainingHops = 64) {
8111
8131
  try {
8112
- const canonicalize = mode === "native" ? realpath_realpathSync.native : realpath_realpathSync;
8132
+ const canonicalize = realpath_realpathSync.native;
8113
8133
  const rawRealPath = canonicalize(symlinkPath);
8114
8134
  windows_path_alias_assertNoWindowsPathAlias(rawRealPath, "filesystem", "resolved symlink path uses a Windows filesystem namespace alias");
8115
8135
  const realPath = windows_path_alias_resolvePathPreservingWindowsRoot(rawRealPath);
@@ -8122,11 +8142,16 @@ function resolveSymlinkHopPath(symlinkPath, mode, rejectUnresolved) {
8122
8142
  }
8123
8143
  if (!path_isNotFoundPathError(error))
8124
8144
  throw error;
8145
+ if (remainingHops <= 0)
8146
+ throw new errors_FsSafeError("symlink", "too many unresolved symlink hops");
8125
8147
  const linkTarget = external_node_fs_.readlinkSync(symlinkPath);
8126
8148
  windows_path_alias_assertNoWindowsPathAlias(linkTarget, "filesystem", "symlink target uses a Windows filesystem namespace alias");
8127
8149
  const linkDir = windows_path_alias_resolvePathPreservingWindowsRoot(external_node_path_.dirname(symlinkPath));
8128
- const targetPath = windows_path_alias_resolvePathFromBasePreservingWindowsRoot(linkDir, linkTarget);
8129
- const resolved = resolveExistingAncestor(targetPath, mode);
8150
+ // Keep parent segments until the kernel has resolved the existing prefix.
8151
+ const targetPath = external_node_path_.isAbsolute(linkTarget) ? linkTarget
8152
+ : external_node_path_.parse(linkTarget).root ? windows_path_alias_resolvePathFromBasePreservingWindowsRoot(linkDir, linkTarget)
8153
+ : `${linkDir}${external_node_path_.sep}${linkTarget}`;
8154
+ const resolved = resolveExistingAncestor(targetPath, mode, true, remainingHops - 1);
8130
8155
  windows_path_alias_assertNoWindowsPathAlias(resolved, "filesystem", "resolved symlink path uses a Windows filesystem namespace alias");
8131
8156
  return resolved;
8132
8157
  }
@@ -12115,8 +12140,8 @@ function assertResolvedLinkDirectory(pathname, isLast) {
12115
12140
  const stat = external_node_fs_.statSync(windows_path_alias_pathForWindowsFilesystem(pathname));
12116
12141
  assertDirectoryBeforeMoreSegments(stat, pathname, isLast);
12117
12142
  }
12118
- // Both public APIs use synchronous metadata; only canonicalization and ancestor
12119
- // existence differ. Promise wrappers preserve the asynchronous rejection API.
12143
+ // Both public APIs use kernel canonicalization and synchronous metadata; only
12144
+ // ancestor existence differs. Promise wrappers preserve asynchronous rejection.
12120
12145
  function traverseRootPath(params, { mode = "native", observation: observationOutput, observeRoot, removalReceipts }) {
12121
12146
  const input = captureValidRootPathInputs(params);
12122
12147
  const rawAbsolutePath = absolutePathWithRawSegments(input.absolutePath);
@@ -20106,7 +20131,7 @@ function directoryChangedError(error) {
20106
20131
  return error;
20107
20132
  return new errors_FsSafeError("path-mismatch", "directory changed during operation", errorCauseOptions(error));
20108
20133
  }
20109
- async function assertRootDirectoryObservationGuard(root, guard) {
20134
+ async function assertRootDirectoryObservationGuard(root, guard, backend) {
20110
20135
  if (isNativeDirectoryObservationGuard(guard)) {
20111
20136
  throw new errors_FsSafeError("path-mismatch", "native directory observation cannot be revalidated");
20112
20137
  }
@@ -20115,7 +20140,9 @@ async function assertRootDirectoryObservationGuard(root, guard) {
20115
20140
  identity.dev === root.rootIdentity.dev && identity.ino === root.rootIdentity.ino;
20116
20141
  if (guardPinsRoot) {
20117
20142
  try {
20118
- if ("identity" in guard)
20143
+ if (backend && "identity" in guard)
20144
+ assertReceiptDirectoryGuardSync(root, guard, backend);
20145
+ else if ("identity" in guard)
20119
20146
  assertDirectoryObservationGuardSync(guard);
20120
20147
  else
20121
20148
  await assertAsyncDirectoryGuard(guard);
@@ -20138,7 +20165,9 @@ async function assertRootDirectoryObservationGuard(root, guard) {
20138
20165
  await assertRootIdentityCurrent(root);
20139
20166
  }
20140
20167
  try {
20141
- if ("identity" in guard)
20168
+ if (backend && "identity" in guard)
20169
+ assertReceiptDirectoryGuardSync(root, guard, backend);
20170
+ else if ("identity" in guard)
20142
20171
  assertDirectoryObservationGuardSync(guard);
20143
20172
  else
20144
20173
  await assertAsyncDirectoryGuard(guard);
@@ -20292,12 +20321,15 @@ async function openRootDirectoryListing(root, directory, options, receipt) {
20292
20321
  identity: { dev: admitted.stat.dev, ino: admitted.stat.ino },
20293
20322
  }, admitted.dir, admitted.realPath);
20294
20323
  }
20324
+ // Windows watch listings keep every fence while sharing one handle for its
20325
+ // identity/path queries. POSIX pathname checks are cheaper than this helper.
20326
+ const backend = getNativeDirectoryObservationBackend(options.exactIdentity === true && process.platform === "win32");
20295
20327
  const assertCurrent = async () => {
20296
20328
  options.signal?.throwIfAborted();
20297
20329
  if (receipt)
20298
20330
  assertRootPathObservationReceiptCurrent(root, receipt);
20299
20331
  else
20300
- await assertRootDirectoryObservationGuard(root, guard);
20332
+ await assertRootDirectoryObservationGuard(root, guard, backend);
20301
20333
  options.signal?.throwIfAborted();
20302
20334
  };
20303
20335
  const paths = { directory: guard.realPath, names: new Map() };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lousy-agents/cli",
3
- "version": "5.22.7",
3
+ "version": "5.22.8",
4
4
  "description": "CLI scaffolding tool that sets up projects with structure, instructions, and feedback loops for AI coding assistants",
5
5
  "type": "module",
6
6
  "repository": {
@@ -10,7 +10,7 @@
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.301"
13
+ "version": "v2.1.302"
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",
@@ -1 +1 @@
1
- 24.21.0
1
+ 24.22.0
@@ -23,7 +23,7 @@
23
23
  "devDependencies": {
24
24
  "@biomejs/biome": "2.5.15",
25
25
  "@eslint/eslintrc": "3.3.7",
26
- "@lousy-agents/mcp": "5.22.6",
26
+ "@lousy-agents/mcp": "5.22.7",
27
27
  "@modelcontextprotocol/server-sequential-thinking": "2026.8.31",
28
28
  "@testing-library/jest-dom": "7.0.1",
29
29
  "@testing-library/react": "16.3.3",
@@ -32,9 +32,9 @@
32
32
  "@types/react-dom": "19.3.0",
33
33
  "@vitejs/plugin-react": "6.1.2",
34
34
  "@vitest/ui": "5.0.5",
35
- "eslint": "10.12.0",
35
+ "eslint": "10.13.0",
36
36
  "eslint-config-next": "16.4.2",
37
- "happy-dom": "21.0.1",
37
+ "happy-dom": "21.0.3",
38
38
  "jsdom": "30.1.3",
39
39
  "typescript": "7.0.2",
40
40
  "vitest": "5.0.5",