@lousy-agents/cli 5.22.14 → 5.22.16

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.309"
13
+ "version": "v2.1.310"
14
14
  },
15
15
  "ghcr.io/rocker-org/devcontainer-features/apt-packages:1.0.2": {
16
16
  "packages": "yamllint, shellcheck",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "devDependencies": {
20
20
  "@biomejs/biome": "2.5.15",
21
- "@lousy-agents/mcp": "5.22.13",
21
+ "@lousy-agents/mcp": "5.22.15",
22
22
  "@modelcontextprotocol/server-sequential-thinking": "2026.8.31",
23
23
  "@testcontainers/postgresql": "12.2.1",
24
24
  "@types/node": "24.19.2",
@@ -958,15 +958,15 @@
958
958
  }
959
959
  },
960
960
  "node_modules/@lousy-agents/mcp": {
961
- "version": "5.22.13",
962
- "resolved": "https://registry.npmjs.org/@lousy-agents/mcp/-/mcp-5.22.13.tgz",
963
- "integrity": "sha512-3h5dpV9iHouINSDsT8iMZk6OjLOVaJem+AlSwTS4xPqGHkOPwf5dYlGPZuoP13BGaQrXmssxD/4vhaFGiKTnvQ==",
961
+ "version": "5.22.15",
962
+ "resolved": "https://registry.npmjs.org/@lousy-agents/mcp/-/mcp-5.22.15.tgz",
963
+ "integrity": "sha512-ew1NbCMHNaupCB5tpils2bO5XnRS8TvvV5sxkHkZ2v+A8VyVtUWjNQ7uUiWfNAXMEh9MjYtL/A7pGeRnsr39qw==",
964
964
  "dev": true,
965
965
  "license": "BSD-2-Clause-Patent",
966
966
  "dependencies": {
967
967
  "@modelcontextprotocol/sdk": "1.32.2",
968
968
  "yaml": "2.9.1",
969
- "zod": "4.5.2"
969
+ "zod": "4.6.6"
970
970
  },
971
971
  "bin": {
972
972
  "lousy-agents-mcp": "dist/mcp-server.js"
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@biomejs/biome": "2.5.15",
32
- "@lousy-agents/mcp": "5.22.13",
32
+ "@lousy-agents/mcp": "5.22.15",
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.309"
13
+ "version": "v2.1.310"
14
14
  },
15
15
  "ghcr.io/rocker-org/devcontainer-features/apt-packages:1.0.2": {
16
16
  "packages": "yamllint, shellcheck",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "devDependencies": {
22
22
  "@biomejs/biome": "2.5.15",
23
- "@lousy-agents/mcp": "5.22.13",
23
+ "@lousy-agents/mcp": "5.22.15",
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
@@ -3053,7 +3053,7 @@ exports.basename = (path, { windows } = {}) => {
3053
3053
 
3054
3054
 
3055
3055
  },
3056
- 6834(__unused_rspack_module, __unused_rspack___webpack_exports__, __webpack_require__) {
3056
+ 5217(__unused_rspack_module, __unused_rspack___webpack_exports__, __webpack_require__) {
3057
3057
  // NAMESPACE OBJECT: ../../node_modules/micromark/lib/constructs.js
3058
3058
  var constructs_namespaceObject = {};
3059
3059
  __webpack_require__.r(constructs_namespaceObject);
@@ -4540,7 +4540,11 @@ function safeRealpathSync(targetPath, cache) {
4540
4540
  return cached;
4541
4541
  }
4542
4542
  try {
4543
- const resolved = realpathSync(pathForWindowsFilesystem(targetPath));
4543
+ const ordinary = realpathSync(pathForWindowsFilesystem(targetPath));
4544
+ // Ordinary resolution keeps the caller's letter case. Its result has no symlinks or
4545
+ // dot segments left, so native resolution on POSIX only adopts the on-disk spelling
4546
+ // that root admission compares against. Windows root admission reconciles aliases.
4547
+ const resolved = process.platform === "win32" ? ordinary : realpathSync.native(ordinary);
4544
4548
  cache?.set(targetPath, resolved);
4545
4549
  cache?.set(resolved, resolved);
4546
4550
  return resolved;
@@ -6769,6 +6773,7 @@ function validateDescriptor(value, allowUnknownFlags) {
6769
6773
  typeof value.currentUserSid !== "string" || !SID_RE.test(value.currentUserSid) ||
6770
6774
  (value.currentAppContainerSid != null && (typeof value.currentAppContainerSid !== "string" || !APP_CONTAINER_SID_RE.test(value.currentAppContainerSid))) ||
6771
6775
  typeof value.daclPresent !== "boolean" || typeof value.isLocal !== "boolean" ||
6776
+ (value.isVolumeRoot !== undefined && typeof value.isVolumeRoot !== "boolean") ||
6772
6777
  typeof value.aceListComplete !== "boolean" || !Array.isArray(value.unsupportedAceTypes) ||
6773
6778
  !value.unsupportedAceTypes.every(uint32) || !Array.isArray(value.aces) ||
6774
6779
  !value.aces.every(ace => validateAce(ace, allowUnknownFlags))) {
@@ -15167,9 +15172,14 @@ const onCopySourceAdmission = Symbol("onCopySourceAdmission");
15167
15172
 
15168
15173
  ;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/file-sync.js
15169
15174
 
15175
+ function syncFile(handle) {
15176
+ return typeof handle === "number"
15177
+ ? new Promise((resolve, reject) => external_node_fs_.fsync(handle, error => error ? reject(error) : resolve()))
15178
+ : handle.sync();
15179
+ }
15170
15180
  async function syncFileBestEffort(handle) {
15171
15181
  try {
15172
- await handle.sync();
15182
+ await syncFile(handle);
15173
15183
  }
15174
15184
  catch (error) {
15175
15185
  if (error?.code !== "EPERM")
@@ -15875,6 +15885,7 @@ class NativeStagedFile {
15875
15885
  #verifyMode;
15876
15886
  #state = { status: "open", publication: NOT_PUBLISHED };
15877
15887
  #receipt;
15888
+ #publicationFlush;
15878
15889
  #rejectFinalSymlink = false;
15879
15890
  #unsupportedNoReplace;
15880
15891
  #fallbackCleanup;
@@ -15911,8 +15922,7 @@ class NativeStagedFile {
15911
15922
  const env_1 = { stack: [], error: void 0, hasError: false };
15912
15923
  try {
15913
15924
  const exclusive = params.overwrite === false && params.input.kind === "buffer" && params.input.stageBeforePublish === false;
15914
- // This owner never escapes. Only the internal verifier borrows its fd;
15915
- // public descriptor methods remain await-free and cannot race disposal.
15925
+ // This owner never escapes; only the internal verifier borrows its fd.
15916
15926
  const staged = native_staged_file_addDisposableResource(env_1, await NativeStagedFile.create({
15917
15927
  binding, parentFd, closeParentFd, directory, mode: params.mode, sync: params.sync,
15918
15928
  // Public staging uses portable names; existing POSIX writes accept literal names.
@@ -15931,9 +15941,10 @@ class NativeStagedFile {
15931
15941
  }
15932
15942
  let published;
15933
15943
  try {
15934
- published = exclusive
15944
+ const publication = exclusive
15935
15945
  ? staged.#completePublication(params.basename, false, params.onPublished)
15936
- : await staged.publish(params.basename, { overwrite: params.overwrite !== false }, params.onPublished);
15946
+ : staged.publish(params.basename, { overwrite: params.overwrite !== false }, params.onPublished);
15947
+ published = publication instanceof Promise ? await publication : publication;
15937
15948
  }
15938
15949
  catch (error) {
15939
15950
  if (!staged.#unsupportedNoReplace || isFsSafeNativeRequired() ||
@@ -16096,29 +16107,21 @@ class NativeStagedFile {
16096
16107
  restoreCopyMetadata(fd, input.metadata);
16097
16108
  if (this.#verifyMode)
16098
16109
  this.#assertStagePermissions(fd);
16099
- if (this.#owner.sync !== false) {
16100
- if (this.#owner.strictFileSync)
16101
- external_node_fs_.fsyncSync(fd);
16102
- else
16103
- syncFileBestEffortSync(fd);
16104
- }
16110
+ if (this.#owner.sync !== false)
16111
+ await (this.#owner.strictFileSync ? syncFile(fd) : syncFileBestEffort(fd));
16105
16112
  const stat = external_node_fs_.fstatSync(fd, { bigint: true });
16106
16113
  this.#receipt = createStagedFileReceipt(this.#owner.directory, this.#owner.name, stat);
16107
16114
  this.#assertCurrent();
16108
16115
  }
16109
16116
  catch (error) {
16110
16117
  const { receipt: cleanup, error: cleanupError } = this.#finalize();
16111
- if (cleanupError) {
16112
- throw stagedFailure("file", new AggregateError([error, cleanupError], "preparation and cleanup failed"), { phase: "prepare", publication: cleanup.publication, cleanup });
16113
- }
16114
- if (cleanup.status === "preserved") {
16115
- throw stagedFailure("file", error, { phase: "prepare", publication: cleanup.publication, cleanup });
16118
+ if (cleanupError || cleanup.status === "preserved") {
16119
+ throw stagedFailure("file", cleanupError
16120
+ ? new AggregateError([error, cleanupError], "preparation and cleanup failed") : error, { phase: "prepare", publication: cleanup.publication, cleanup });
16116
16121
  }
16117
16122
  throw error;
16118
16123
  }
16119
16124
  }
16120
- // Keep public descriptor work await-free: each call completes its mutations
16121
- // before the next invocation, including closure and cached cleanup failures.
16122
16125
  async assertCurrent() {
16123
16126
  this.#assertCurrent();
16124
16127
  }
@@ -16163,7 +16166,8 @@ class NativeStagedFile {
16163
16166
  }
16164
16167
  throw error;
16165
16168
  }
16166
- return this.#completePublication(basename, overwrite, onPublished);
16169
+ const publication = this.#completePublication(basename, overwrite, onPublished);
16170
+ return publication instanceof Promise ? await publication : publication;
16167
16171
  }
16168
16172
  catch (error) {
16169
16173
  if (isMutationAuthorityError(error))
@@ -16189,17 +16193,21 @@ class NativeStagedFile {
16189
16193
  external_node_fs_.fchmodSync(fd, this.#owner.mode);
16190
16194
  // Content was synced during preparation. A lost chmod leaves 0600, no wider
16191
16195
  // than modes retaining owner rw; restrictive modes still need a durable correction.
16192
- if (this.#owner.sync !== false && ((this.#owner.mode & 0o600) !== 0o600 || (stagedMode & ~this.#owner.mode) !== 0)) {
16193
- if (this.#owner.strictFileSync)
16194
- external_node_fs_.fsyncSync(fd);
16195
- else
16196
- syncFileBestEffortSync(fd);
16197
- }
16198
- if (this.#owner.sync !== false)
16199
- syncFileBestEffortSync(this.#owner.parentFd);
16200
- this.#assertNamed(basename, this.#owner.mode);
16201
- this.#assertDirectory();
16202
- return receipt;
16196
+ const verify = () => {
16197
+ this.#assertNamed(basename, this.#owner.mode);
16198
+ this.#assertDirectory();
16199
+ return receipt;
16200
+ };
16201
+ if (this.#owner.sync === false)
16202
+ return verify();
16203
+ this.#publicationFlush = Promise.resolve().then(async () => {
16204
+ if ((this.#owner.mode & 0o600) !== 0o600 || (stagedMode & ~this.#owner.mode) !== 0) {
16205
+ await (this.#owner.strictFileSync ? syncFile(fd) : syncFileBestEffort(fd));
16206
+ }
16207
+ await syncFileBestEffort(this.#owner.parentFd);
16208
+ return verify();
16209
+ }).finally(() => { this.#publicationFlush = undefined; });
16210
+ return this.#publicationFlush;
16203
16211
  }
16204
16212
  #finalize() {
16205
16213
  if (this.#state.status === "closed") {
@@ -16254,6 +16262,9 @@ class NativeStagedFile {
16254
16262
  return this.#state;
16255
16263
  }
16256
16264
  async cleanup() {
16265
+ // Native descriptors cannot close or be recycled while libuv is synchronizing them.
16266
+ if (this.#publicationFlush)
16267
+ await this.#publicationFlush.catch(() => { });
16257
16268
  const closed = this.#finalize();
16258
16269
  if (closed.error) {
16259
16270
  throw closed.error;
@@ -18740,8 +18751,8 @@ function pinnedWriteModeAssertion(fd, mode, assertBeforeMutation, privateCreatio
18740
18751
 
18741
18752
 
18742
18753
  // Node has no portable no-replace rename. Publish the completed stage by link,
18743
- // then remove its verified temporary name without yielding.
18744
- function publishCopyStage(params) {
18754
+ // then remove its verified temporary name after any descriptor handoff.
18755
+ async function publishCopyStage(params) {
18745
18756
  const { identity, temporaryPath, targetPath } = params;
18746
18757
  const assertCurrent = () => {
18747
18758
  directory_guard_assertSyncDirectoryGuard(params.parentGuard);
@@ -18795,13 +18806,23 @@ function publishCopyStage(params) {
18795
18806
  }
18796
18807
  }
18797
18808
  else {
18798
- const parent = external_node_fs_.lstatSync(external_node_path_.dirname(temporaryPath), { bigint: true });
18799
- const current = external_node_fs_.lstatSync(temporaryPath, { bigint: true });
18800
- if (parent.isSymbolicLink() || !parent.isDirectory() ||
18801
- !file_identity_sameFileIdentityForCleanup(parent, params.parentGuard.stat) ||
18802
- current.isSymbolicLink() || !current.isFile() ||
18803
- !file_identity_sameFileIdentityForCleanup(current, identity)) {
18804
- throw new errors_FsSafeError("path-mismatch", "published copy temporary name changed before cleanup");
18809
+ const verifyPair = () => {
18810
+ directory_guard_assertSyncDirectoryGuard(params.parentGuard);
18811
+ const parent = external_node_fs_.lstatSync(external_node_path_.dirname(temporaryPath), { bigint: true });
18812
+ const current = external_node_fs_.lstatSync(temporaryPath, { bigint: true });
18813
+ const target = external_node_fs_.lstatSync(targetPath, { bigint: true });
18814
+ if (parent.isSymbolicLink() || !parent.isDirectory() ||
18815
+ !file_identity_sameFileIdentityForCleanup(parent, params.parentGuard.stat) ||
18816
+ current.isSymbolicLink() || !current.isFile() || current.nlink !== 2n ||
18817
+ target.isSymbolicLink() || !target.isFile() || target.nlink !== 2n ||
18818
+ !file_identity_sameFileIdentityForCleanup(current, identity) || !file_identity_sameFileIdentityForCleanup(target, identity)) {
18819
+ throw new errors_FsSafeError("path-mismatch", "published copy temporary name changed before cleanup");
18820
+ }
18821
+ };
18822
+ verifyPair();
18823
+ if (params.beforeTemporaryUnlink) {
18824
+ await params.beforeTemporaryUnlink();
18825
+ verifyPair();
18805
18826
  }
18806
18827
  // This removes the stage's name, never the published destination or source.
18807
18828
  external_node_fs_.unlinkSync(temporaryPath);
@@ -18874,6 +18895,40 @@ function publishThroughPlaceholder(params, assertCurrent) {
18874
18895
  }
18875
18896
  }
18876
18897
 
18898
+ ;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/publication-handle.js
18899
+
18900
+
18901
+
18902
+
18903
+
18904
+
18905
+ /** Pin the published name before releasing a descriptor opened through its stage. */
18906
+ async function openPublicationHandle(targetPath, identity) {
18907
+ const flags = read_open_flags_resolveReadOpenFlags();
18908
+ const handle = await promises_.open(targetPath, flags).catch(async (error) => {
18909
+ // Restrictive final modes must not be widened just to inspect publication.
18910
+ if (!hasErrorCode(error, "EACCES") || (process.arch !== "x64" && process.arch !== "arm64"))
18911
+ throw error;
18912
+ const metadataFlag = process.platform === "linux" ? 0x200000 : undefined; // O_PATH
18913
+ if (metadataFlag === undefined)
18914
+ throw error;
18915
+ return promises_.open(targetPath, metadataFlag | external_node_fs_.constants.O_NOFOLLOW);
18916
+ });
18917
+ try {
18918
+ const opened = external_node_fs_.fstatSync(handle.fd, { bigint: true });
18919
+ const named = external_node_fs_.lstatSync(targetPath, { bigint: true });
18920
+ if (!opened.isFile() || !named.isFile() || named.isSymbolicLink() ||
18921
+ !file_identity_sameFileIdentityForCleanup(opened, identity) || !file_identity_sameFileIdentityForCleanup(named, identity)) {
18922
+ throw new errors_FsSafeError("path-mismatch", "publication descriptor handoff identity changed");
18923
+ }
18924
+ return handle;
18925
+ }
18926
+ catch (error) {
18927
+ await handle.close().catch(() => undefined);
18928
+ throw error;
18929
+ }
18930
+ }
18931
+
18877
18932
  ;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/pinned-write-staged.js
18878
18933
 
18879
18934
 
@@ -18895,6 +18950,7 @@ function publishThroughPlaceholder(params, assertCurrent) {
18895
18950
 
18896
18951
 
18897
18952
 
18953
+
18898
18954
 
18899
18955
 
18900
18956
  async function runPinnedStagedWrite(params, parentPath, parentGuard) {
@@ -18912,6 +18968,7 @@ async function runPinnedStagedWrite(params, parentPath, parentGuard) {
18912
18968
  let handle;
18913
18969
  let tempIdentity;
18914
18970
  let readHandle;
18971
+ let handoffCloseFailure;
18915
18972
  let renamed = false;
18916
18973
  const completeCreate = params.overwrite === false && params.input.kind !== "file" && params.input.stageBeforePublish === true;
18917
18974
  let receipt;
@@ -18966,11 +19023,15 @@ async function runPinnedStagedWrite(params, parentPath, parentGuard) {
18966
19023
  }), external_node_path_.basename(tempPath), external_node_fs_.fstatSync(handle.fd, { bigint: true }));
18967
19024
  }
18968
19025
  let verifiedIdentity = expectedTempStat;
19026
+ // Keep unreadable modes supported where Node has no read-free file open.
19027
+ const canHandoff = process.platform !== "win32" &&
19028
+ ((params.mode & 0o400) !== 0 ||
19029
+ (process.platform === "linux" && (process.arch === "x64" || process.arch === "arm64")));
18969
19030
  phase = "publish";
18970
19031
  await withAsyncDirectoryGuards([parentGuard], async () => {
18971
19032
  assertFinalSymlinkRejected(targetPath, params.rejectFinalSymlink);
18972
19033
  if (params.overwrite === false) {
18973
- publishCopyStage({
19034
+ await publishCopyStage({
18974
19035
  temporaryPath: tempPath, targetPath, fd: handle.fd,
18975
19036
  identity: tempIdentity, parentGuard,
18976
19037
  assertBeforeMutation,
@@ -18984,6 +19045,18 @@ async function runPinnedStagedWrite(params, parentPath, parentGuard) {
18984
19045
  publication = Object.freeze({ status: "published", staged: receipt, basename: params.basename, overwrite: false });
18985
19046
  params.onPublished?.(identity);
18986
19047
  },
19048
+ beforeTemporaryUnlink: !canHandoff ? undefined : async () => {
19049
+ readHandle = await openPublicationHandle(targetPath, expectedTempStat);
19050
+ // Keep the destination pinned while closing the stage's NFS dentry.
19051
+ const stagedHandle = handle;
19052
+ handle = undefined;
19053
+ try {
19054
+ await stagedHandle.close();
19055
+ }
19056
+ catch (error) {
19057
+ handoffCloseFailure = { error };
19058
+ }
19059
+ },
18987
19060
  });
18988
19061
  }
18989
19062
  else {
@@ -19011,6 +19084,7 @@ async function runPinnedStagedWrite(params, parentPath, parentGuard) {
19011
19084
  throw new errors_FsSafeError("path-mismatch", "fallback target changed during write");
19012
19085
  }
19013
19086
  const expectedHash = sha256Hex(params.input.data, params.input.encoding);
19087
+ await readHandle?.close();
19014
19088
  readHandle = await promises_.open(targetPath, read_open_flags_resolveReadOpenFlags());
19015
19089
  const readHandleStat = external_node_fs_.fstatSync(readHandle.fd, { bigint: true });
19016
19090
  const actualHash = sha256Hex(await readFileHandleBounded(readHandle, Infinity));
@@ -19049,7 +19123,11 @@ async function runPinnedStagedWrite(params, parentPath, parentGuard) {
19049
19123
  pathname: tempPath, handle, identity: tempIdentity, parentGuard, throwOnCleanupError: true,
19050
19124
  }) : "not-needed";
19051
19125
  },
19052
- close: [async () => { await readHandle?.close(); }, async () => { await handle?.close(); }],
19126
+ close: [async () => { await readHandle?.close(); }, async () => {
19127
+ await handle?.close();
19128
+ if (handoffCloseFailure)
19129
+ throw handoffCloseFailure.error;
19130
+ }],
19053
19131
  });
19054
19132
  }
19055
19133
  else
@@ -112972,4 +113050,4 @@ if (installedChunkData !== 0) { // 0 means "already installed".'
112972
113050
  // module factories are used so entry inlining is disabled
112973
113051
  // startup
112974
113052
  // Load entry module and return exports
112975
- var __webpack_exports__ = __webpack_require__(6834);
113053
+ var __webpack_exports__ = __webpack_require__(5217);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lousy-agents/cli",
3
- "version": "5.22.14",
3
+ "version": "5.22.16",
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.309"
13
+ "version": "v2.1.310"
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",
@@ -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.13",
26
+ "@lousy-agents/mcp": "5.22.15",
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",