@lousy-agents/mcp 5.22.1 → 5.22.3

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.
Files changed (2) hide show
  1. package/dist/mcp-server.js +88 -7
  2. package/package.json +1 -1
@@ -6559,7 +6559,7 @@ function escapeJsonPtr(str) {
6559
6559
 
6560
6560
 
6561
6561
  },
6562
- 4010(__unused_rspack_module, __unused_rspack___webpack_exports__, __webpack_require__) {
6562
+ 7046(__unused_rspack_module, __unused_rspack___webpack_exports__, __webpack_require__) {
6563
6563
  // NAMESPACE OBJECT: ../../node_modules/micromark/lib/constructs.js
6564
6564
  var constructs_namespaceObject = {};
6565
6565
  __webpack_require__.r(constructs_namespaceObject);
@@ -39087,6 +39087,47 @@ function errorCauseOptions(error) {
39087
39087
 
39088
39088
  // EXTERNAL MODULE: external "node:os"
39089
39089
  var external_node_os_ = __webpack_require__(8161);
39090
+ ;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/windows-appcontainer.js
39091
+
39092
+
39093
+ /** The native owner caches immutable primary-token membership across Workers. */
39094
+ function isWindowsAppContainer(binding) {
39095
+ if (!binding.isWindowsAppContainer)
39096
+ return undefined;
39097
+ try {
39098
+ const membership = binding.isWindowsAppContainer();
39099
+ if (typeof membership !== "boolean")
39100
+ throw new Error("Invalid AppContainer membership");
39101
+ return membership;
39102
+ }
39103
+ catch (cause) {
39104
+ throw new errors_FsSafeError("permission-unverified", "Windows process token membership could not be verified", { cause });
39105
+ }
39106
+ }
39107
+ function windows_appcontainer_assertWindowsHelperAllowed() {
39108
+ if (process.platform !== "win32")
39109
+ return;
39110
+ const binding = native_getNativeBinding();
39111
+ if (binding && isWindowsAppContainer(binding)) {
39112
+ // Current libuv can hang while creating child-process pipes in a lowbox.
39113
+ throw new errors_FsSafeError("helper-unavailable", "External Windows security helpers are unavailable inside an AppContainer");
39114
+ }
39115
+ }
39116
+ function assertWindowsAclRemediationAllowed() {
39117
+ if (process.platform !== "win32")
39118
+ return;
39119
+ let binding;
39120
+ try {
39121
+ binding = getNativeBinding();
39122
+ }
39123
+ catch {
39124
+ return;
39125
+ } // Command formatting remains available without an addon.
39126
+ if (binding && isWindowsAppContainer(binding)) {
39127
+ throw new FsSafeError("helper-unavailable", "Windows ACL reset commands are unavailable inside an AppContainer");
39128
+ }
39129
+ }
39130
+
39090
39131
  ;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/realpath.js
39091
39132
 
39092
39133
 
@@ -39094,9 +39135,41 @@ var external_node_os_ = __webpack_require__(8161);
39094
39135
 
39095
39136
 
39096
39137
 
39138
+
39097
39139
  const runtimePlatform = process.versions.bun ? (0,external_node_os_.platform)() : undefined;
39098
39140
  const bunPosix = runtimePlatform === "darwin" || runtimePlatform === "linux" ? runtimePlatform : undefined;
39099
39141
  function realpath_resolve(input, native) {
39142
+ if (native && process.platform === "win32") {
39143
+ try {
39144
+ return external_node_fs_.realpathSync.native(input);
39145
+ }
39146
+ catch (error) {
39147
+ if (error.code !== "EPERM" || error.syscall !== "realpath")
39148
+ throw error;
39149
+ let binding;
39150
+ try {
39151
+ binding = native_getNativeBinding();
39152
+ }
39153
+ catch {
39154
+ binding = undefined;
39155
+ }
39156
+ if (!binding || !isWindowsAppContainer(binding))
39157
+ throw error;
39158
+ if (!binding?.resolveWindowsCanonicalPath) {
39159
+ throw new errors_FsSafeError("helper-unavailable", "Windows canonicalization after a denied DOS-name query requires the native binding", { cause: error });
39160
+ }
39161
+ let resolved;
39162
+ try {
39163
+ resolved = binding.resolveWindowsCanonicalPath(input);
39164
+ }
39165
+ catch (cause) {
39166
+ throw new errors_FsSafeError("path-mismatch", "Windows canonical path cannot be verified safely", { cause });
39167
+ }
39168
+ if (resolved === null)
39169
+ throw error;
39170
+ return resolved;
39171
+ }
39172
+ }
39100
39173
  if (bunPosix) {
39101
39174
  // Bun 1.4.2 normalizes native path components and opens the leaf for reads.
39102
39175
  // The Rust OS resolver preserves permissions, locks and physical spelling.
@@ -40798,6 +40871,7 @@ function shortPath(value) {
40798
40871
 
40799
40872
 
40800
40873
 
40874
+
40801
40875
  const execFileAsync = (0,external_node_util_.promisify)(external_node_child_process_.execFile);
40802
40876
  const DEFAULT_PERMISSION_EXEC_TIMEOUT_MS = 30_000;
40803
40877
  function formatPermissionErrorDetail(value) {
@@ -40975,6 +41049,7 @@ function getPermissionCommandFailure(error, command, durationMs) {
40975
41049
  return { command, durationMs: Math.round(durationMs), ...detail };
40976
41050
  }
40977
41051
  async function executePermissionCommand(command, args, timeoutMs = DEFAULT_PERMISSION_EXEC_TIMEOUT_MS) {
41052
+ assertWindowsHelperAllowed();
40978
41053
  const startedAt = performance.now();
40979
41054
  try {
40980
41055
  return (await execFileAsync(command, args, {
@@ -40998,6 +41073,7 @@ async function executePermissionCommand(command, args, timeoutMs = DEFAULT_PERMI
40998
41073
  ;// CONCATENATED MODULE: ../../node_modules/@openclaw/fs-safe/dist/windows-security-facts.js
40999
41074
 
41000
41075
  const SID_RE = /^s-\d+-\d+(?:-\d+)+$/;
41076
+ const APP_CONTAINER_SID_RE = /^s-1-15-2(?:-\d+){7,}$/;
41001
41077
  const SYSTEM_SID = "s-1-5-18";
41002
41078
  const ADMINISTRATORS_SID = "s-1-5-32-544";
41003
41079
  const WORLD_SIDS = new Set([
@@ -41032,6 +41108,7 @@ function validateAce(value, allowUnknownFlags) {
41032
41108
  function validateDescriptor(value, allowUnknownFlags) {
41033
41109
  if (!windows_security_facts_record(value) || typeof value.ownerSid !== "string" || !SID_RE.test(value.ownerSid) ||
41034
41110
  typeof value.currentUserSid !== "string" || !SID_RE.test(value.currentUserSid) ||
41111
+ (value.currentAppContainerSid != null && (typeof value.currentAppContainerSid !== "string" || !APP_CONTAINER_SID_RE.test(value.currentAppContainerSid))) ||
41035
41112
  typeof value.daclPresent !== "boolean" || typeof value.isLocal !== "boolean" ||
41036
41113
  typeof value.aceListComplete !== "boolean" || !Array.isArray(value.unsupportedAceTypes) ||
41037
41114
  !value.unsupportedAceTypes.every(windows_security_facts_uint32) || !Array.isArray(value.aces) ||
@@ -41057,6 +41134,8 @@ function summarize(facts) {
41057
41134
  let groupReadable = false;
41058
41135
  let groupWritable = false;
41059
41136
  const trusted = new Set([facts.currentUserSid, SYSTEM_SID, ADMINISTRATORS_SID]);
41137
+ if (facts.currentAppContainerSid)
41138
+ trusted.add(facts.currentAppContainerSid);
41060
41139
  for (const ace of facts.aces) {
41061
41140
  if (ace.aceType !== "allow" || ace.flags.inheritOnly || trusted.has(ace.sid))
41062
41141
  continue;
@@ -41125,6 +41204,7 @@ function windows_security_helper_explainWindowsSecurityHelperFailure(error) {
41125
41204
 
41126
41205
 
41127
41206
 
41207
+
41128
41208
  const MAX_OUTPUT_BYTES = 1024 * 1024;
41129
41209
  const TERMINATION_GRACE_MS = 1_000;
41130
41210
  const FULL_IDENTITY = /^[0-9a-f]{16}:[0-9a-f]{32}$/;
@@ -41227,6 +41307,7 @@ function explainHelperFailure(error, file) {
41227
41307
  }
41228
41308
  }
41229
41309
  function executeSync(operation, params) {
41310
+ assertWindowsHelperAllowed();
41230
41311
  const { file, args, env } = windows_security_command_command(operation, params);
41231
41312
  const startedAt = performance.now();
41232
41313
  const result = spawnSync(file, args, {
@@ -41299,6 +41380,7 @@ function hasUnsettledWindowsSecurityCommand(error) {
41299
41380
  }
41300
41381
  function ignoreLateError() { }
41301
41382
  async function execute(operation, params, request) {
41383
+ windows_appcontainer_assertWindowsHelperAllowed();
41302
41384
  const selected = request ?? windows_security_command_command(operation, params);
41303
41385
  const { file, args, env, input, timeoutMs = (/* inlined export .DEFAULT_PERMISSION_EXEC_TIMEOUT_MS */30000), maxOutputBytes = MAX_OUTPUT_BYTES } = selected;
41304
41386
  const startedAt = performance.now();
@@ -42725,7 +42807,7 @@ class AtomicFile {
42725
42807
  }
42726
42808
  *readFile(sizeHint) {
42727
42809
  if (typeof this.resource !== "number")
42728
- return yield* atomic_io_wait(this.resource.readFile());
42810
+ return yield* atomic_io_wait(readFileHandleBounded(this.resource, Infinity));
42729
42811
  if (sizeHint === undefined)
42730
42812
  return this.io.syncFs.readFileSync(this.resource);
42731
42813
  const fd = this.resource;
@@ -53121,6 +53203,7 @@ function publishThroughPlaceholder(params, assertCurrent) {
53121
53203
 
53122
53204
 
53123
53205
 
53206
+
53124
53207
 
53125
53208
 
53126
53209
  async function runPinnedStagedWrite(params, parentPath, parentGuard) {
@@ -53239,7 +53322,7 @@ async function runPinnedStagedWrite(params, parentPath, parentGuard) {
53239
53322
  const expectedHash = sha256Hex(params.input.data, params.input.encoding);
53240
53323
  readHandle = await promises_.open(targetPath, read_open_flags_resolveReadOpenFlags());
53241
53324
  const readHandleStat = external_node_fs_.fstatSync(readHandle.fd, { bigint: true });
53242
- const actualHash = sha256Hex(await readHandle.readFile());
53325
+ const actualHash = sha256Hex(await readFileHandleBounded(readHandle, Infinity));
53243
53326
  if (actualHash !== expectedHash) {
53244
53327
  throw new errors_FsSafeError("path-mismatch", "fallback target changed during write");
53245
53328
  }
@@ -53990,9 +54073,7 @@ async function read_opened_file_readOpenedFileSafely(params) {
53990
54073
  if (maxBytes !== undefined && params.opened.stat.size > maxBytes) {
53991
54074
  throw new errors_FsSafeError("too-large", `file exceeds limit of ${maxBytes} bytes (got ${params.opened.stat.size})`);
53992
54075
  }
53993
- const buffer = maxBytes === undefined
53994
- ? await params.opened.handle.readFile()
53995
- : await readFileHandleBoundedWithSize(params.opened.handle, maxBytes, params.opened.stat.size);
54076
+ const buffer = await readFileHandleBoundedWithSize(params.opened.handle, maxBytes ?? Infinity, params.opened.stat.size);
53996
54077
  return {
53997
54078
  buffer,
53998
54079
  containment: params.opened.containment,
@@ -108598,4 +108679,4 @@ if (installedChunkData !== 0) { // 0 means "already installed".'
108598
108679
  // module factories are used so entry inlining is disabled
108599
108680
  // startup
108600
108681
  // Load entry module and return exports
108601
- var __webpack_exports__ = __webpack_require__(4010);
108682
+ var __webpack_exports__ = __webpack_require__(7046);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lousy-agents/mcp",
3
- "version": "5.22.1",
3
+ "version": "5.22.3",
4
4
  "description": "MCP server for lousy-agents - provides AI coding assistant tools via the Model Context Protocol",
5
5
  "type": "module",
6
6
  "repository": {