local-commander-agent-linux-x64 0.3.49 → 0.3.51

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/runtime/agent.mjs CHANGED
@@ -52,9 +52,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
52
52
  mod
53
53
  ));
54
54
 
55
- // node_modules/ws/lib/constants.js
55
+ // ../../node_modules/ws/lib/constants.js
56
56
  var require_constants = __commonJS({
57
- "node_modules/ws/lib/constants.js"(exports, module) {
57
+ "../../node_modules/ws/lib/constants.js"(exports, module) {
58
58
  "use strict";
59
59
  var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
60
60
  var hasBlob = typeof Blob !== "undefined";
@@ -75,9 +75,9 @@ var require_constants = __commonJS({
75
75
  }
76
76
  });
77
77
 
78
- // node_modules/ws/lib/buffer-util.js
78
+ // ../../node_modules/ws/lib/buffer-util.js
79
79
  var require_buffer_util = __commonJS({
80
- "node_modules/ws/lib/buffer-util.js"(exports, module) {
80
+ "../../node_modules/ws/lib/buffer-util.js"(exports, module) {
81
81
  "use strict";
82
82
  var { EMPTY_BUFFER } = require_constants();
83
83
  var FastBuffer = Buffer[Symbol.species];
@@ -150,9 +150,9 @@ var require_buffer_util = __commonJS({
150
150
  }
151
151
  });
152
152
 
153
- // node_modules/ws/lib/limiter.js
153
+ // ../../node_modules/ws/lib/limiter.js
154
154
  var require_limiter = __commonJS({
155
- "node_modules/ws/lib/limiter.js"(exports, module) {
155
+ "../../node_modules/ws/lib/limiter.js"(exports, module) {
156
156
  "use strict";
157
157
  var kDone = /* @__PURE__ */ Symbol("kDone");
158
158
  var kRun = /* @__PURE__ */ Symbol("kRun");
@@ -200,9 +200,9 @@ var require_limiter = __commonJS({
200
200
  }
201
201
  });
202
202
 
203
- // node_modules/ws/lib/permessage-deflate.js
203
+ // ../../node_modules/ws/lib/permessage-deflate.js
204
204
  var require_permessage_deflate = __commonJS({
205
- "node_modules/ws/lib/permessage-deflate.js"(exports, module) {
205
+ "../../node_modules/ws/lib/permessage-deflate.js"(exports, module) {
206
206
  "use strict";
207
207
  var zlib = __require("zlib");
208
208
  var bufferUtil = require_buffer_util();
@@ -583,9 +583,9 @@ var require_permessage_deflate = __commonJS({
583
583
  }
584
584
  });
585
585
 
586
- // node_modules/ws/lib/validation.js
586
+ // ../../node_modules/ws/lib/validation.js
587
587
  var require_validation = __commonJS({
588
- "node_modules/ws/lib/validation.js"(exports, module) {
588
+ "../../node_modules/ws/lib/validation.js"(exports, module) {
589
589
  "use strict";
590
590
  var { isUtf8 } = __require("buffer");
591
591
  var { hasBlob } = require_constants();
@@ -784,9 +784,9 @@ var require_validation = __commonJS({
784
784
  }
785
785
  });
786
786
 
787
- // node_modules/ws/lib/receiver.js
787
+ // ../../node_modules/ws/lib/receiver.js
788
788
  var require_receiver = __commonJS({
789
- "node_modules/ws/lib/receiver.js"(exports, module) {
789
+ "../../node_modules/ws/lib/receiver.js"(exports, module) {
790
790
  "use strict";
791
791
  var { Writable } = __require("stream");
792
792
  var PerMessageDeflate2 = require_permessage_deflate();
@@ -1407,9 +1407,9 @@ var require_receiver = __commonJS({
1407
1407
  }
1408
1408
  });
1409
1409
 
1410
- // node_modules/ws/lib/sender.js
1410
+ // ../../node_modules/ws/lib/sender.js
1411
1411
  var require_sender = __commonJS({
1412
- "node_modules/ws/lib/sender.js"(exports, module) {
1412
+ "../../node_modules/ws/lib/sender.js"(exports, module) {
1413
1413
  "use strict";
1414
1414
  var { Duplex } = __require("stream");
1415
1415
  var { randomFillSync } = __require("crypto");
@@ -1900,9 +1900,9 @@ var require_sender = __commonJS({
1900
1900
  }
1901
1901
  });
1902
1902
 
1903
- // node_modules/ws/lib/event-target.js
1903
+ // ../../node_modules/ws/lib/event-target.js
1904
1904
  var require_event_target = __commonJS({
1905
- "node_modules/ws/lib/event-target.js"(exports, module) {
1905
+ "../../node_modules/ws/lib/event-target.js"(exports, module) {
1906
1906
  "use strict";
1907
1907
  var { kForOnEventAttribute, kListener } = require_constants();
1908
1908
  var kCode = /* @__PURE__ */ Symbol("kCode");
@@ -2129,9 +2129,9 @@ var require_event_target = __commonJS({
2129
2129
  }
2130
2130
  });
2131
2131
 
2132
- // node_modules/ws/lib/extension.js
2132
+ // ../../node_modules/ws/lib/extension.js
2133
2133
  var require_extension = __commonJS({
2134
- "node_modules/ws/lib/extension.js"(exports, module) {
2134
+ "../../node_modules/ws/lib/extension.js"(exports, module) {
2135
2135
  "use strict";
2136
2136
  var { tokenChars } = require_validation();
2137
2137
  function push(dest, name2, elem) {
@@ -2282,9 +2282,9 @@ var require_extension = __commonJS({
2282
2282
  }
2283
2283
  });
2284
2284
 
2285
- // node_modules/ws/lib/websocket.js
2285
+ // ../../node_modules/ws/lib/websocket.js
2286
2286
  var require_websocket = __commonJS({
2287
- "node_modules/ws/lib/websocket.js"(exports, module) {
2287
+ "../../node_modules/ws/lib/websocket.js"(exports, module) {
2288
2288
  "use strict";
2289
2289
  var EventEmitter = __require("events");
2290
2290
  var https2 = __require("https");
@@ -3191,9 +3191,9 @@ var require_websocket = __commonJS({
3191
3191
  }
3192
3192
  });
3193
3193
 
3194
- // node_modules/ws/lib/stream.js
3194
+ // ../../node_modules/ws/lib/stream.js
3195
3195
  var require_stream = __commonJS({
3196
- "node_modules/ws/lib/stream.js"(exports, module) {
3196
+ "../../node_modules/ws/lib/stream.js"(exports, module) {
3197
3197
  "use strict";
3198
3198
  var WebSocket2 = require_websocket();
3199
3199
  var { Duplex } = __require("stream");
@@ -3289,9 +3289,9 @@ var require_stream = __commonJS({
3289
3289
  }
3290
3290
  });
3291
3291
 
3292
- // node_modules/ws/lib/subprotocol.js
3292
+ // ../../node_modules/ws/lib/subprotocol.js
3293
3293
  var require_subprotocol = __commonJS({
3294
- "node_modules/ws/lib/subprotocol.js"(exports, module) {
3294
+ "../../node_modules/ws/lib/subprotocol.js"(exports, module) {
3295
3295
  "use strict";
3296
3296
  var { tokenChars } = require_validation();
3297
3297
  function parse4(header) {
@@ -3334,9 +3334,9 @@ var require_subprotocol = __commonJS({
3334
3334
  }
3335
3335
  });
3336
3336
 
3337
- // node_modules/ws/lib/websocket-server.js
3337
+ // ../../node_modules/ws/lib/websocket-server.js
3338
3338
  var require_websocket_server = __commonJS({
3339
- "node_modules/ws/lib/websocket-server.js"(exports, module) {
3339
+ "../../node_modules/ws/lib/websocket-server.js"(exports, module) {
3340
3340
  "use strict";
3341
3341
  var EventEmitter = __require("events");
3342
3342
  var http2 = __require("http");
@@ -3738,7 +3738,7 @@ var require_websocket_server = __commonJS({
3738
3738
  // agent/src/ai-connectivity/manager.ts
3739
3739
  import { performance } from "node:perf_hooks";
3740
3740
 
3741
- // node_modules/zod/v4/classic/external.js
3741
+ // ../../node_modules/zod/v4/classic/external.js
3742
3742
  var external_exports = {};
3743
3743
  __export(external_exports, {
3744
3744
  $brand: () => $brand,
@@ -4001,7 +4001,7 @@ __export(external_exports, {
4001
4001
  xor: () => xor
4002
4002
  });
4003
4003
 
4004
- // node_modules/zod/v4/core/index.js
4004
+ // ../../node_modules/zod/v4/core/index.js
4005
4005
  var core_exports2 = {};
4006
4006
  __export(core_exports2, {
4007
4007
  $ZodAny: () => $ZodAny,
@@ -4318,7 +4318,7 @@ __export(core_exports2, {
4318
4318
  withParser: () => withParser
4319
4319
  });
4320
4320
 
4321
- // node_modules/zod/v4/core/util.js
4321
+ // ../../node_modules/zod/v4/core/util.js
4322
4322
  var util_exports = {};
4323
4323
  __export(util_exports, {
4324
4324
  BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
@@ -4554,10 +4554,10 @@ function mergeDefs(...defs) {
4554
4554
  function cloneDef(schema) {
4555
4555
  return mergeDefs(schema._zod.def);
4556
4556
  }
4557
- function getElementAtPath(obj, path30) {
4558
- if (!path30)
4557
+ function getElementAtPath(obj, path31) {
4558
+ if (!path31)
4559
4559
  return obj;
4560
- return path30.reduce((acc, key) => acc?.[key], obj);
4560
+ return path31.reduce((acc, key) => acc?.[key], obj);
4561
4561
  }
4562
4562
  function promiseAllObject(promisesObj) {
4563
4563
  const keys = Object.keys(promisesObj);
@@ -4897,11 +4897,11 @@ function explicitlyAborted(x, startIndex = 0) {
4897
4897
  }
4898
4898
  return false;
4899
4899
  }
4900
- function prefixIssues(path30, issues) {
4900
+ function prefixIssues(path31, issues) {
4901
4901
  return issues.map((iss) => {
4902
4902
  var _a3;
4903
4903
  (_a3 = iss).path ?? (_a3.path = []);
4904
- iss.path.unshift(path30);
4904
+ iss.path.unshift(path31);
4905
4905
  return iss;
4906
4906
  });
4907
4907
  }
@@ -5161,7 +5161,7 @@ function constantCatch(value) {
5161
5161
  return fn;
5162
5162
  }
5163
5163
 
5164
- // node_modules/zod/v4/core/core.js
5164
+ // ../../node_modules/zod/v4/core/core.js
5165
5165
  var _a;
5166
5166
  var NEVER = /* @__PURE__ */ Object.freeze({
5167
5167
  status: "aborted"
@@ -5171,8 +5171,8 @@ var _E = "captureStackTrace" in Error ? Error : null;
5171
5171
  function newError(Definition) {
5172
5172
  const E = _E;
5173
5173
  if (E) {
5174
- const saved = E.stackTraceLimit;
5175
- if (typeof saved === "number") {
5174
+ const saved2 = E.stackTraceLimit;
5175
+ if (typeof saved2 === "number") {
5176
5176
  try {
5177
5177
  E.stackTraceLimit = 0;
5178
5178
  } catch {
@@ -5182,7 +5182,7 @@ function newError(Definition) {
5182
5182
  try {
5183
5183
  return new Definition();
5184
5184
  } finally {
5185
- E.stackTraceLimit = saved;
5185
+ E.stackTraceLimit = saved2;
5186
5186
  }
5187
5187
  }
5188
5188
  }
@@ -5283,7 +5283,7 @@ function config(newConfig) {
5283
5283
  return globalConfig;
5284
5284
  }
5285
5285
 
5286
- // node_modules/zod/v4/core/errors.js
5286
+ // ../../node_modules/zod/v4/core/errors.js
5287
5287
  function _getMessage() {
5288
5288
  const internals = this._zod;
5289
5289
  internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
@@ -5351,16 +5351,16 @@ function flattenError(error62, mapper = (issue2) => issue2.message) {
5351
5351
  }
5352
5352
  function formatError(error62, mapper = (issue2) => issue2.message) {
5353
5353
  const fieldErrors = { _errors: [] };
5354
- const processError = (error63, path30 = []) => {
5354
+ const processError = (error63, path31 = []) => {
5355
5355
  for (const issue2 of error63.issues) {
5356
5356
  if (issue2.code === "invalid_union" && issue2.errors.length) {
5357
- issue2.errors.map((issues) => processError({ issues }, [...path30, ...issue2.path]));
5357
+ issue2.errors.map((issues) => processError({ issues }, [...path31, ...issue2.path]));
5358
5358
  } else if (issue2.code === "invalid_key") {
5359
- processError({ issues: issue2.issues }, [...path30, ...issue2.path]);
5359
+ processError({ issues: issue2.issues }, [...path31, ...issue2.path]);
5360
5360
  } else if (issue2.code === "invalid_element") {
5361
- processError({ issues: issue2.issues }, [...path30, ...issue2.path]);
5361
+ processError({ issues: issue2.issues }, [...path31, ...issue2.path]);
5362
5362
  } else {
5363
- const fullpath = [...path30, ...issue2.path];
5363
+ const fullpath = [...path31, ...issue2.path];
5364
5364
  if (fullpath.length === 0) {
5365
5365
  fieldErrors._errors.push(mapper(issue2));
5366
5366
  } else {
@@ -5399,17 +5399,17 @@ function formatError(error62, mapper = (issue2) => issue2.message) {
5399
5399
  }
5400
5400
  function treeifyError(error62, mapper = (issue2) => issue2.message) {
5401
5401
  const result2 = { errors: [] };
5402
- const processError = (error63, path30 = []) => {
5402
+ const processError = (error63, path31 = []) => {
5403
5403
  var _a3;
5404
5404
  for (const issue2 of error63.issues) {
5405
5405
  if (issue2.code === "invalid_union" && issue2.errors.length) {
5406
- issue2.errors.map((issues) => processError({ issues }, [...path30, ...issue2.path]));
5406
+ issue2.errors.map((issues) => processError({ issues }, [...path31, ...issue2.path]));
5407
5407
  } else if (issue2.code === "invalid_key") {
5408
- processError({ issues: issue2.issues }, [...path30, ...issue2.path]);
5408
+ processError({ issues: issue2.issues }, [...path31, ...issue2.path]);
5409
5409
  } else if (issue2.code === "invalid_element") {
5410
- processError({ issues: issue2.issues }, [...path30, ...issue2.path]);
5410
+ processError({ issues: issue2.issues }, [...path31, ...issue2.path]);
5411
5411
  } else {
5412
- const fullpath = [...path30, ...issue2.path];
5412
+ const fullpath = [...path31, ...issue2.path];
5413
5413
  if (fullpath.length === 0) {
5414
5414
  result2.errors.push(mapper(issue2));
5415
5415
  continue;
@@ -5448,8 +5448,8 @@ function treeifyError(error62, mapper = (issue2) => issue2.message) {
5448
5448
  }
5449
5449
  function toDotPath(_path) {
5450
5450
  const segs = [];
5451
- const path30 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
5452
- for (const seg of path30) {
5451
+ const path31 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
5452
+ for (const seg of path31) {
5453
5453
  if (typeof seg === "number")
5454
5454
  segs.push(`[${seg}]`);
5455
5455
  else if (typeof seg === "symbol")
@@ -5475,7 +5475,7 @@ function prettifyError(error62) {
5475
5475
  return lines.join("\n");
5476
5476
  }
5477
5477
 
5478
- // node_modules/zod/v4/core/parse.js
5478
+ // ../../node_modules/zod/v4/core/parse.js
5479
5479
  function finalizeParams(callee, params) {
5480
5480
  return { callee: params?.callee ?? callee, Err: params?.Err };
5481
5481
  }
@@ -5635,7 +5635,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
5635
5635
  };
5636
5636
  var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
5637
5637
 
5638
- // node_modules/zod/v4/core/regexes.js
5638
+ // ../../node_modules/zod/v4/core/regexes.js
5639
5639
  var regexes_exports = {};
5640
5640
  __export(regexes_exports, {
5641
5641
  anyString: () => anyString,
@@ -5807,7 +5807,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
5807
5807
  var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
5808
5808
  var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
5809
5809
 
5810
- // node_modules/zod/v4/core/checks.js
5810
+ // ../../node_modules/zod/v4/core/checks.js
5811
5811
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
5812
5812
  var _a3;
5813
5813
  inst._zod ?? (inst._zod = {});
@@ -6283,7 +6283,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
6283
6283
  };
6284
6284
  });
6285
6285
 
6286
- // node_modules/zod/v4/core/doc.js
6286
+ // ../../node_modules/zod/v4/core/doc.js
6287
6287
  var Doc = class {
6288
6288
  constructor(args = [], closed = {}) {
6289
6289
  this.content = [];
@@ -6324,14 +6324,14 @@ ${content.join("\n")}
6324
6324
  }
6325
6325
  };
6326
6326
 
6327
- // node_modules/zod/v4/core/versions.js
6327
+ // ../../node_modules/zod/v4/core/versions.js
6328
6328
  var version = {
6329
6329
  major: 4,
6330
6330
  minor: 6,
6331
6331
  patch: 5
6332
6332
  };
6333
6333
 
6334
- // node_modules/zod/v4/core/schemas.js
6334
+ // ../../node_modules/zod/v4/core/schemas.js
6335
6335
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
6336
6336
  var _a3;
6337
6337
  inst ?? (inst = {});
@@ -8745,7 +8745,7 @@ function handleRefineResult(result2, payload2, input2, inst) {
8745
8745
  }
8746
8746
  }
8747
8747
 
8748
- // node_modules/zod/v4/core/memoizer.js
8748
+ // ../../node_modules/zod/v4/core/memoizer.js
8749
8749
  var $ZodCyclicError = class extends Error {
8750
8750
  constructor() {
8751
8751
  super(`Cannot parse a reference cycle that closes through a transform`);
@@ -9022,7 +9022,7 @@ function isBackEdge(ctx, value) {
9022
9022
  return backEdges !== void 0 && isRef(value) && backEdges.has(value);
9023
9023
  }
9024
9024
 
9025
- // node_modules/zod/v4/locales/index.js
9025
+ // ../../node_modules/zod/v4/locales/index.js
9026
9026
  var locales_exports = {};
9027
9027
  __export(locales_exports, {
9028
9028
  ar: () => ar_default,
@@ -9090,7 +9090,7 @@ __export(locales_exports, {
9090
9090
  zhTW: () => zh_TW_default
9091
9091
  });
9092
9092
 
9093
- // node_modules/zod/v4/locales/ar.js
9093
+ // ../../node_modules/zod/v4/locales/ar.js
9094
9094
  var error = () => {
9095
9095
  const Sizable = {
9096
9096
  string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
@@ -9202,7 +9202,7 @@ function ar_default() {
9202
9202
  };
9203
9203
  }
9204
9204
 
9205
- // node_modules/zod/v4/locales/az.js
9205
+ // ../../node_modules/zod/v4/locales/az.js
9206
9206
  var error2 = () => {
9207
9207
  const Sizable = {
9208
9208
  string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
@@ -9313,7 +9313,7 @@ function az_default() {
9313
9313
  };
9314
9314
  }
9315
9315
 
9316
- // node_modules/zod/v4/locales/be.js
9316
+ // ../../node_modules/zod/v4/locales/be.js
9317
9317
  function getBelarusianPlural(count3, one, few, many) {
9318
9318
  const absCount = Math.abs(count3);
9319
9319
  const lastDigit = absCount % 10;
@@ -9482,7 +9482,7 @@ function be_default() {
9482
9482
  };
9483
9483
  }
9484
9484
 
9485
- // node_modules/zod/v4/locales/bg.js
9485
+ // ../../node_modules/zod/v4/locales/bg.js
9486
9486
  var error4 = () => {
9487
9487
  const Sizable = {
9488
9488
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
@@ -9608,7 +9608,7 @@ function bg_default() {
9608
9608
  };
9609
9609
  }
9610
9610
 
9611
- // node_modules/zod/v4/locales/bn.js
9611
+ // ../../node_modules/zod/v4/locales/bn.js
9612
9612
  var error5 = () => {
9613
9613
  const Sizable = {
9614
9614
  string: { unit: "\u0985\u0995\u09CD\u09B7\u09B0", verb: "\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7" },
@@ -9722,7 +9722,7 @@ function bn_default() {
9722
9722
  };
9723
9723
  }
9724
9724
 
9725
- // node_modules/zod/v4/locales/ca.js
9725
+ // ../../node_modules/zod/v4/locales/ca.js
9726
9726
  var error6 = () => {
9727
9727
  const Sizable = {
9728
9728
  string: { unit: "car\xE0cters", verb: "contenir" },
@@ -9836,7 +9836,7 @@ function ca_default() {
9836
9836
  };
9837
9837
  }
9838
9838
 
9839
- // node_modules/zod/v4/locales/ckb.js
9839
+ // ../../node_modules/zod/v4/locales/ckb.js
9840
9840
  var error7 = () => {
9841
9841
  const Sizable = {
9842
9842
  string: { unit: "\u067E\u06CC\u062A", verb: "\u0628\u06CE\u062A" },
@@ -9969,7 +9969,7 @@ function ckb_default() {
9969
9969
  };
9970
9970
  }
9971
9971
 
9972
- // node_modules/zod/v4/locales/cs.js
9972
+ // ../../node_modules/zod/v4/locales/cs.js
9973
9973
  var error8 = () => {
9974
9974
  const Sizable = {
9975
9975
  string: { unit: "znak\u016F", verb: "m\xEDt" },
@@ -10086,7 +10086,7 @@ function cs_default() {
10086
10086
  };
10087
10087
  }
10088
10088
 
10089
- // node_modules/zod/v4/locales/da.js
10089
+ // ../../node_modules/zod/v4/locales/da.js
10090
10090
  var error9 = () => {
10091
10091
  const Sizable = {
10092
10092
  string: { unit: "tegn", verb: "havde" },
@@ -10207,7 +10207,7 @@ function da_default() {
10207
10207
  };
10208
10208
  }
10209
10209
 
10210
- // node_modules/zod/v4/locales/de.js
10210
+ // ../../node_modules/zod/v4/locales/de.js
10211
10211
  var error10 = () => {
10212
10212
  const Sizable = {
10213
10213
  string: { unit: "Zeichen", verb: "zu haben" },
@@ -10321,7 +10321,7 @@ function de_default() {
10321
10321
  };
10322
10322
  }
10323
10323
 
10324
- // node_modules/zod/v4/locales/el.js
10324
+ // ../../node_modules/zod/v4/locales/el.js
10325
10325
  var error11 = () => {
10326
10326
  const Sizable = {
10327
10327
  string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
@@ -10434,7 +10434,7 @@ function el_default() {
10434
10434
  };
10435
10435
  }
10436
10436
 
10437
- // node_modules/zod/v4/locales/en.js
10437
+ // ../../node_modules/zod/v4/locales/en.js
10438
10438
  var error12 = () => {
10439
10439
  const Sizable = {
10440
10440
  string: { unit: "characters", verb: "to have" },
@@ -10559,7 +10559,7 @@ function en_default() {
10559
10559
  };
10560
10560
  }
10561
10561
 
10562
- // node_modules/zod/v4/locales/eo.js
10562
+ // ../../node_modules/zod/v4/locales/eo.js
10563
10563
  var error13 = () => {
10564
10564
  const Sizable = {
10565
10565
  string: { unit: "karaktrojn", verb: "havi" },
@@ -10674,7 +10674,7 @@ function eo_default() {
10674
10674
  };
10675
10675
  }
10676
10676
 
10677
- // node_modules/zod/v4/locales/es.js
10677
+ // ../../node_modules/zod/v4/locales/es.js
10678
10678
  var error14 = () => {
10679
10679
  const Sizable = {
10680
10680
  string: { unit: "caracteres", verb: "tener" },
@@ -10811,7 +10811,7 @@ function es_default() {
10811
10811
  };
10812
10812
  }
10813
10813
 
10814
- // node_modules/zod/v4/locales/fa.js
10814
+ // ../../node_modules/zod/v4/locales/fa.js
10815
10815
  var error15 = () => {
10816
10816
  const Sizable = {
10817
10817
  string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
@@ -10931,7 +10931,7 @@ function fa_default() {
10931
10931
  };
10932
10932
  }
10933
10933
 
10934
- // node_modules/zod/v4/locales/fi.js
10934
+ // ../../node_modules/zod/v4/locales/fi.js
10935
10935
  var error16 = () => {
10936
10936
  const Sizable = {
10937
10937
  string: { unit: "merkki\xE4", subject: "merkkijonon" },
@@ -11049,7 +11049,7 @@ function fi_default() {
11049
11049
  };
11050
11050
  }
11051
11051
 
11052
- // node_modules/zod/v4/locales/fr.js
11052
+ // ../../node_modules/zod/v4/locales/fr.js
11053
11053
  var error17 = () => {
11054
11054
  const Sizable = {
11055
11055
  string: { unit: "caract\xE8res", verb: "avoir" },
@@ -11179,7 +11179,7 @@ function fr_default() {
11179
11179
  };
11180
11180
  }
11181
11181
 
11182
- // node_modules/zod/v4/locales/fr-CA.js
11182
+ // ../../node_modules/zod/v4/locales/fr-CA.js
11183
11183
  var error18 = () => {
11184
11184
  const Sizable = {
11185
11185
  string: { unit: "caract\xE8res", verb: "avoir" },
@@ -11292,7 +11292,7 @@ function fr_CA_default() {
11292
11292
  };
11293
11293
  }
11294
11294
 
11295
- // node_modules/zod/v4/locales/gu.js
11295
+ // ../../node_modules/zod/v4/locales/gu.js
11296
11296
  var error19 = () => {
11297
11297
  const Sizable = {
11298
11298
  string: { unit: "\u0A85\u0A95\u0ACD\u0AB7\u0AB0", verb: "\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F" },
@@ -11406,7 +11406,7 @@ function gu_default() {
11406
11406
  };
11407
11407
  }
11408
11408
 
11409
- // node_modules/zod/v4/locales/he.js
11409
+ // ../../node_modules/zod/v4/locales/he.js
11410
11410
  var error20 = () => {
11411
11411
  const TypeNames = {
11412
11412
  string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
@@ -11608,7 +11608,7 @@ function he_default() {
11608
11608
  };
11609
11609
  }
11610
11610
 
11611
- // node_modules/zod/v4/locales/hi.js
11611
+ // ../../node_modules/zod/v4/locales/hi.js
11612
11612
  var error21 = () => {
11613
11613
  const Sizable = {
11614
11614
  string: { unit: "\u0905\u0915\u094D\u0937\u0930", verb: "\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F" },
@@ -11720,7 +11720,7 @@ function hi_default() {
11720
11720
  };
11721
11721
  }
11722
11722
 
11723
- // node_modules/zod/v4/locales/hr.js
11723
+ // ../../node_modules/zod/v4/locales/hr.js
11724
11724
  var error22 = () => {
11725
11725
  const Sizable = {
11726
11726
  string: { unit: "znakova", verb: "imati" },
@@ -11847,7 +11847,7 @@ function hr_default() {
11847
11847
  };
11848
11848
  }
11849
11849
 
11850
- // node_modules/zod/v4/locales/hu.js
11850
+ // ../../node_modules/zod/v4/locales/hu.js
11851
11851
  var error23 = () => {
11852
11852
  const Sizable = {
11853
11853
  string: { unit: "karakter", verb: "legyen" },
@@ -11961,7 +11961,7 @@ function hu_default() {
11961
11961
  };
11962
11962
  }
11963
11963
 
11964
- // node_modules/zod/v4/locales/hy.js
11964
+ // ../../node_modules/zod/v4/locales/hy.js
11965
11965
  function getArmenianPlural(count3, one, many) {
11966
11966
  return Math.abs(count3) === 1 ? one : many;
11967
11967
  }
@@ -12120,7 +12120,7 @@ function hy_default() {
12120
12120
  };
12121
12121
  }
12122
12122
 
12123
- // node_modules/zod/v4/locales/id.js
12123
+ // ../../node_modules/zod/v4/locales/id.js
12124
12124
  var error25 = () => {
12125
12125
  const Sizable = {
12126
12126
  string: { unit: "karakter", verb: "memiliki" },
@@ -12232,7 +12232,7 @@ function id_default() {
12232
12232
  };
12233
12233
  }
12234
12234
 
12235
- // node_modules/zod/v4/locales/is.js
12235
+ // ../../node_modules/zod/v4/locales/is.js
12236
12236
  var error26 = () => {
12237
12237
  const Sizable = {
12238
12238
  string: { unit: "stafi", verb: "a\xF0 hafa" },
@@ -12347,7 +12347,7 @@ function is_default() {
12347
12347
  };
12348
12348
  }
12349
12349
 
12350
- // node_modules/zod/v4/locales/it.js
12350
+ // ../../node_modules/zod/v4/locales/it.js
12351
12351
  var error27 = () => {
12352
12352
  const Sizable = {
12353
12353
  string: { unit: "caratteri", verb: "avere" },
@@ -12461,7 +12461,7 @@ function it_default() {
12461
12461
  };
12462
12462
  }
12463
12463
 
12464
- // node_modules/zod/v4/locales/ja.js
12464
+ // ../../node_modules/zod/v4/locales/ja.js
12465
12465
  var error28 = () => {
12466
12466
  const Sizable = {
12467
12467
  string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
@@ -12574,7 +12574,7 @@ function ja_default() {
12574
12574
  };
12575
12575
  }
12576
12576
 
12577
- // node_modules/zod/v4/locales/ka.js
12577
+ // ../../node_modules/zod/v4/locales/ka.js
12578
12578
  var error29 = () => {
12579
12579
  const Sizable = {
12580
12580
  string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
@@ -12692,7 +12692,7 @@ function ka_default() {
12692
12692
  };
12693
12693
  }
12694
12694
 
12695
- // node_modules/zod/v4/locales/km.js
12695
+ // ../../node_modules/zod/v4/locales/km.js
12696
12696
  var error30 = () => {
12697
12697
  const Sizable = {
12698
12698
  string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
@@ -12808,12 +12808,12 @@ function km_default() {
12808
12808
  };
12809
12809
  }
12810
12810
 
12811
- // node_modules/zod/v4/locales/kh.js
12811
+ // ../../node_modules/zod/v4/locales/kh.js
12812
12812
  function kh_default() {
12813
12813
  return km_default();
12814
12814
  }
12815
12815
 
12816
- // node_modules/zod/v4/locales/kn.js
12816
+ // ../../node_modules/zod/v4/locales/kn.js
12817
12817
  var error31 = () => {
12818
12818
  const Sizable = {
12819
12819
  string: { unit: "\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1", verb: "\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1" },
@@ -12929,7 +12929,7 @@ function kn_default() {
12929
12929
  };
12930
12930
  }
12931
12931
 
12932
- // node_modules/zod/v4/locales/ko.js
12932
+ // ../../node_modules/zod/v4/locales/ko.js
12933
12933
  var error32 = () => {
12934
12934
  const Sizable = {
12935
12935
  string: { unit: "\uBB38\uC790", verb: "to have" },
@@ -13046,7 +13046,7 @@ function ko_default() {
13046
13046
  };
13047
13047
  }
13048
13048
 
13049
- // node_modules/zod/v4/locales/lt.js
13049
+ // ../../node_modules/zod/v4/locales/lt.js
13050
13050
  var capitalizeFirstCharacter = (text3) => {
13051
13051
  return text3.charAt(0).toUpperCase() + text3.slice(1);
13052
13052
  };
@@ -13254,7 +13254,7 @@ function lt_default() {
13254
13254
  };
13255
13255
  }
13256
13256
 
13257
- // node_modules/zod/v4/locales/mk.js
13257
+ // ../../node_modules/zod/v4/locales/mk.js
13258
13258
  var error34 = () => {
13259
13259
  const Sizable = {
13260
13260
  string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
@@ -13369,7 +13369,7 @@ function mk_default() {
13369
13369
  };
13370
13370
  }
13371
13371
 
13372
- // node_modules/zod/v4/locales/ms.js
13372
+ // ../../node_modules/zod/v4/locales/ms.js
13373
13373
  var error35 = () => {
13374
13374
  const Sizable = {
13375
13375
  string: { unit: "aksara", verb: "mempunyai" },
@@ -13482,7 +13482,7 @@ function ms_default() {
13482
13482
  };
13483
13483
  }
13484
13484
 
13485
- // node_modules/zod/v4/locales/ne.js
13485
+ // ../../node_modules/zod/v4/locales/ne.js
13486
13486
  var error36 = () => {
13487
13487
  const Sizable = {
13488
13488
  string: { unit: "\u0905\u0915\u094D\u0937\u0930", verb: "\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B" },
@@ -13594,7 +13594,7 @@ function ne_default() {
13594
13594
  };
13595
13595
  }
13596
13596
 
13597
- // node_modules/zod/v4/locales/nl.js
13597
+ // ../../node_modules/zod/v4/locales/nl.js
13598
13598
  var error37 = () => {
13599
13599
  const Sizable = {
13600
13600
  string: { unit: "tekens", verb: "heeft" },
@@ -13710,7 +13710,7 @@ function nl_default() {
13710
13710
  };
13711
13711
  }
13712
13712
 
13713
- // node_modules/zod/v4/locales/nn.js
13713
+ // ../../node_modules/zod/v4/locales/nn.js
13714
13714
  var error38 = () => {
13715
13715
  const Sizable = {
13716
13716
  string: { unit: "teikn", verb: "\xE5 ha" },
@@ -13824,7 +13824,7 @@ function nn_default() {
13824
13824
  };
13825
13825
  }
13826
13826
 
13827
- // node_modules/zod/v4/locales/no.js
13827
+ // ../../node_modules/zod/v4/locales/no.js
13828
13828
  var error39 = () => {
13829
13829
  const Sizable = {
13830
13830
  string: { unit: "tegn", verb: "\xE5 ha" },
@@ -13938,7 +13938,7 @@ function no_default() {
13938
13938
  };
13939
13939
  }
13940
13940
 
13941
- // node_modules/zod/v4/locales/ota.js
13941
+ // ../../node_modules/zod/v4/locales/ota.js
13942
13942
  var error40 = () => {
13943
13943
  const Sizable = {
13944
13944
  string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
@@ -14053,7 +14053,7 @@ function ota_default() {
14053
14053
  };
14054
14054
  }
14055
14055
 
14056
- // node_modules/zod/v4/locales/ps.js
14056
+ // ../../node_modules/zod/v4/locales/ps.js
14057
14057
  var error41 = () => {
14058
14058
  const Sizable = {
14059
14059
  string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
@@ -14173,7 +14173,7 @@ function ps_default() {
14173
14173
  };
14174
14174
  }
14175
14175
 
14176
- // node_modules/zod/v4/locales/pl.js
14176
+ // ../../node_modules/zod/v4/locales/pl.js
14177
14177
  var error42 = () => {
14178
14178
  const Sizable = {
14179
14179
  string: { unit: "znak\xF3w", verb: "mie\u0107" },
@@ -14288,7 +14288,7 @@ function pl_default() {
14288
14288
  };
14289
14289
  }
14290
14290
 
14291
- // node_modules/zod/v4/locales/pt.js
14291
+ // ../../node_modules/zod/v4/locales/pt.js
14292
14292
  var error43 = () => {
14293
14293
  const Sizable = {
14294
14294
  string: { unit: "caracteres" },
@@ -14432,7 +14432,7 @@ function pt_default() {
14432
14432
  };
14433
14433
  }
14434
14434
 
14435
- // node_modules/zod/v4/locales/pt-BR.js
14435
+ // ../../node_modules/zod/v4/locales/pt-BR.js
14436
14436
  var error44 = () => {
14437
14437
  const Sizable = {
14438
14438
  string: { unit: "caracteres" },
@@ -14577,7 +14577,7 @@ function pt_BR_default() {
14577
14577
  };
14578
14578
  }
14579
14579
 
14580
- // node_modules/zod/v4/locales/ro.js
14580
+ // ../../node_modules/zod/v4/locales/ro.js
14581
14581
  var error45 = () => {
14582
14582
  const Sizable = {
14583
14583
  string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
@@ -14700,7 +14700,7 @@ function ro_default() {
14700
14700
  };
14701
14701
  }
14702
14702
 
14703
- // node_modules/zod/v4/locales/ru.js
14703
+ // ../../node_modules/zod/v4/locales/ru.js
14704
14704
  function getRussianPlural(count3, one, few, many) {
14705
14705
  const absCount = Math.abs(count3);
14706
14706
  const lastDigit = absCount % 10;
@@ -14869,7 +14869,7 @@ function ru_default() {
14869
14869
  };
14870
14870
  }
14871
14871
 
14872
- // node_modules/zod/v4/locales/sk.js
14872
+ // ../../node_modules/zod/v4/locales/sk.js
14873
14873
  var error47 = () => {
14874
14874
  const Sizable = {
14875
14875
  string: { unit: "znakov", verb: "ma\u0165" },
@@ -14986,7 +14986,7 @@ function sk_default() {
14986
14986
  };
14987
14987
  }
14988
14988
 
14989
- // node_modules/zod/v4/locales/sl.js
14989
+ // ../../node_modules/zod/v4/locales/sl.js
14990
14990
  var error48 = () => {
14991
14991
  const Sizable = {
14992
14992
  string: { unit: "znakov", verb: "imeti" },
@@ -15101,7 +15101,7 @@ function sl_default() {
15101
15101
  };
15102
15102
  }
15103
15103
 
15104
- // node_modules/zod/v4/locales/sv.js
15104
+ // ../../node_modules/zod/v4/locales/sv.js
15105
15105
  var error49 = () => {
15106
15106
  const Sizable = {
15107
15107
  string: { unit: "tecken", verb: "att ha" },
@@ -15217,7 +15217,7 @@ function sv_default() {
15217
15217
  };
15218
15218
  }
15219
15219
 
15220
- // node_modules/zod/v4/locales/ta.js
15220
+ // ../../node_modules/zod/v4/locales/ta.js
15221
15221
  var error50 = () => {
15222
15222
  const Sizable = {
15223
15223
  string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
@@ -15333,7 +15333,7 @@ function ta_default() {
15333
15333
  };
15334
15334
  }
15335
15335
 
15336
- // node_modules/zod/v4/locales/tg.js
15336
+ // ../../node_modules/zod/v4/locales/tg.js
15337
15337
  var error51 = () => {
15338
15338
  const Sizable = {
15339
15339
  string: { unit: "\u0430\u043B\u043E\u043C\u0430\u0442", verb: "\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434" },
@@ -15450,7 +15450,7 @@ function tg_default() {
15450
15450
  };
15451
15451
  }
15452
15452
 
15453
- // node_modules/zod/v4/locales/th.js
15453
+ // ../../node_modules/zod/v4/locales/th.js
15454
15454
  var error52 = () => {
15455
15455
  const Sizable = {
15456
15456
  string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
@@ -15566,7 +15566,7 @@ function th_default() {
15566
15566
  };
15567
15567
  }
15568
15568
 
15569
- // node_modules/zod/v4/locales/tk.js
15569
+ // ../../node_modules/zod/v4/locales/tk.js
15570
15570
  var error53 = () => {
15571
15571
  const Sizable = {
15572
15572
  string: { unit: "simwol", verb: "bolmaly" },
@@ -15674,7 +15674,7 @@ function tk_default() {
15674
15674
  };
15675
15675
  }
15676
15676
 
15677
- // node_modules/zod/v4/locales/tr.js
15677
+ // ../../node_modules/zod/v4/locales/tr.js
15678
15678
  var error54 = () => {
15679
15679
  const Sizable = {
15680
15680
  string: { unit: "karakter", verb: "olmal\u0131" },
@@ -15785,7 +15785,7 @@ function tr_default() {
15785
15785
  };
15786
15786
  }
15787
15787
 
15788
- // node_modules/zod/v4/locales/uk.js
15788
+ // ../../node_modules/zod/v4/locales/uk.js
15789
15789
  var error55 = () => {
15790
15790
  const Sizable = {
15791
15791
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
@@ -15899,12 +15899,12 @@ function uk_default() {
15899
15899
  };
15900
15900
  }
15901
15901
 
15902
- // node_modules/zod/v4/locales/ua.js
15902
+ // ../../node_modules/zod/v4/locales/ua.js
15903
15903
  function ua_default() {
15904
15904
  return uk_default();
15905
15905
  }
15906
15906
 
15907
- // node_modules/zod/v4/locales/ur.js
15907
+ // ../../node_modules/zod/v4/locales/ur.js
15908
15908
  var error56 = () => {
15909
15909
  const Sizable = {
15910
15910
  string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
@@ -16020,7 +16020,7 @@ function ur_default() {
16020
16020
  };
16021
16021
  }
16022
16022
 
16023
- // node_modules/zod/v4/locales/uz.js
16023
+ // ../../node_modules/zod/v4/locales/uz.js
16024
16024
  var error57 = () => {
16025
16025
  const Sizable = {
16026
16026
  string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
@@ -16134,7 +16134,7 @@ function uz_default() {
16134
16134
  };
16135
16135
  }
16136
16136
 
16137
- // node_modules/zod/v4/locales/vi.js
16137
+ // ../../node_modules/zod/v4/locales/vi.js
16138
16138
  var error58 = () => {
16139
16139
  const Sizable = {
16140
16140
  string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
@@ -16248,7 +16248,7 @@ function vi_default() {
16248
16248
  };
16249
16249
  }
16250
16250
 
16251
- // node_modules/zod/v4/locales/zh-CN.js
16251
+ // ../../node_modules/zod/v4/locales/zh-CN.js
16252
16252
  var error59 = () => {
16253
16253
  const Sizable = {
16254
16254
  string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
@@ -16363,7 +16363,7 @@ function zh_CN_default() {
16363
16363
  };
16364
16364
  }
16365
16365
 
16366
- // node_modules/zod/v4/locales/zh-TW.js
16366
+ // ../../node_modules/zod/v4/locales/zh-TW.js
16367
16367
  var error60 = () => {
16368
16368
  const Sizable = {
16369
16369
  string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
@@ -16476,7 +16476,7 @@ function zh_TW_default() {
16476
16476
  };
16477
16477
  }
16478
16478
 
16479
- // node_modules/zod/v4/locales/yo.js
16479
+ // ../../node_modules/zod/v4/locales/yo.js
16480
16480
  var error61 = () => {
16481
16481
  const Sizable = {
16482
16482
  string: { unit: "\xE0mi", verb: "n\xED" },
@@ -16589,7 +16589,7 @@ function yo_default() {
16589
16589
  };
16590
16590
  }
16591
16591
 
16592
- // node_modules/zod/v4/core/registries.js
16592
+ // ../../node_modules/zod/v4/core/registries.js
16593
16593
  var _a2;
16594
16594
  var $output = /* @__PURE__ */ Symbol("ZodOutput");
16595
16595
  var $input = /* @__PURE__ */ Symbol("ZodInput");
@@ -16639,7 +16639,7 @@ function registry() {
16639
16639
  (_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
16640
16640
  var globalRegistry = globalThis.__zod_globalRegistry;
16641
16641
 
16642
- // node_modules/zod/v4/core/compile.js
16642
+ // ../../node_modules/zod/v4/core/compile.js
16643
16643
  var INVALID = /* @__PURE__ */ Symbol.for("zod.compile.invalid");
16644
16644
  var FALLBACK_FLAG = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
16645
16645
  var ZodCompileAsyncError = class extends Error {
@@ -18241,7 +18241,7 @@ function generateTransformCheck(doc, ctx, schema, accessor) {
18241
18241
  return accessor;
18242
18242
  }
18243
18243
 
18244
- // node_modules/zod/v4/core/api.js
18244
+ // ../../node_modules/zod/v4/core/api.js
18245
18245
  function snapshotChecks(def) {
18246
18246
  if (def.checks)
18247
18247
  def.checks = [...def.checks];
@@ -19300,7 +19300,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
19300
19300
  return inst;
19301
19301
  }
19302
19302
 
19303
- // node_modules/zod/v4/core/to-json-schema.js
19303
+ // ../../node_modules/zod/v4/core/to-json-schema.js
19304
19304
  function assignProps(target, ...sources) {
19305
19305
  for (const source of sources) {
19306
19306
  for (const key of Reflect.ownKeys(source)) {
@@ -19830,7 +19830,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
19830
19830
  return finalize(ctx, schema);
19831
19831
  };
19832
19832
 
19833
- // node_modules/zod/v4/core/json-schema-processors.js
19833
+ // ../../node_modules/zod/v4/core/json-schema-processors.js
19834
19834
  var narrowMin = (agg, key, value) => {
19835
19835
  if (agg[key] === void 0 || value > agg[key])
19836
19836
  agg[key] = value;
@@ -20578,7 +20578,7 @@ function toJSONSchema(input2, params) {
20578
20578
  return finalize(ctx, input2);
20579
20579
  }
20580
20580
 
20581
- // node_modules/zod/v4/core/json-schema-generator.js
20581
+ // ../../node_modules/zod/v4/core/json-schema-generator.js
20582
20582
  var JSONSchemaGenerator = class {
20583
20583
  /** @deprecated Access via ctx instead */
20584
20584
  get metadataRegistry() {
@@ -20656,10 +20656,10 @@ var JSONSchemaGenerator = class {
20656
20656
  }
20657
20657
  };
20658
20658
 
20659
- // node_modules/zod/v4/core/json-schema.js
20659
+ // ../../node_modules/zod/v4/core/json-schema.js
20660
20660
  var json_schema_exports = {};
20661
20661
 
20662
- // node_modules/zod/v4/classic/schemas.js
20662
+ // ../../node_modules/zod/v4/classic/schemas.js
20663
20663
  var schemas_exports2 = {};
20664
20664
  __export(schemas_exports2, {
20665
20665
  ZodAny: () => ZodAny,
@@ -20840,7 +20840,7 @@ __export(schemas_exports2, {
20840
20840
  xor: () => xor
20841
20841
  });
20842
20842
 
20843
- // node_modules/zod/v4/classic/checks.js
20843
+ // ../../node_modules/zod/v4/classic/checks.js
20844
20844
  var checks_exports2 = {};
20845
20845
  __export(checks_exports2, {
20846
20846
  endsWith: () => _endsWith,
@@ -20875,7 +20875,7 @@ __export(checks_exports2, {
20875
20875
  uppercase: () => _uppercase
20876
20876
  });
20877
20877
 
20878
- // node_modules/zod/v4/classic/errors.js
20878
+ // ../../node_modules/zod/v4/classic/errors.js
20879
20879
  var _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
20880
20880
  function _lazyMethod(proto, key, make) {
20881
20881
  Object.defineProperty(proto, key, {
@@ -20921,7 +20921,7 @@ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, void 0
20921
20921
  Parent: Error
20922
20922
  });
20923
20923
 
20924
- // node_modules/zod/v4/classic/parse.js
20924
+ // ../../node_modules/zod/v4/classic/parse.js
20925
20925
  var parse2 = /* @__PURE__ */ _parse(ZodRealError);
20926
20926
  var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
20927
20927
  var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
@@ -20935,7 +20935,7 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
20935
20935
  var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
20936
20936
  var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
20937
20937
 
20938
- // node_modules/zod/v4/classic/schemas.js
20938
+ // ../../node_modules/zod/v4/classic/schemas.js
20939
20939
  function _ensureDefaultLocale() {
20940
20940
  if (!globalConfig.localeError)
20941
20941
  config(en_default());
@@ -22400,7 +22400,7 @@ function preprocess(fn, schema) {
22400
22400
  });
22401
22401
  }
22402
22402
 
22403
- // node_modules/zod/v4/classic/compat.js
22403
+ // ../../node_modules/zod/v4/classic/compat.js
22404
22404
  var ZodIssueCode = {
22405
22405
  invalid_type: "invalid_type",
22406
22406
  too_big: "too_big",
@@ -22426,7 +22426,7 @@ var ZodFirstPartyTypeKind;
22426
22426
  /* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
22427
22427
  })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
22428
22428
 
22429
- // node_modules/zod/v4/classic/iso.js
22429
+ // ../../node_modules/zod/v4/classic/iso.js
22430
22430
  var iso_exports = {};
22431
22431
  __export(iso_exports, {
22432
22432
  ZodISODate: () => ZodISODate,
@@ -22451,7 +22451,7 @@ function duration2(params) {
22451
22451
  return _isoDuration(ZodISODuration, params);
22452
22452
  }
22453
22453
 
22454
- // node_modules/zod/v4/classic/from-json-schema.js
22454
+ // ../../node_modules/zod/v4/classic/from-json-schema.js
22455
22455
  var z = {
22456
22456
  ...schemas_exports2,
22457
22457
  ...checks_exports2,
@@ -22551,13 +22551,13 @@ function resolveRef(ref, ctx) {
22551
22551
  if (!ref.startsWith("#")) {
22552
22552
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
22553
22553
  }
22554
- const path30 = ref.slice(1).split("/").filter(Boolean);
22555
- if (path30.length === 0) {
22554
+ const path31 = ref.slice(1).split("/").filter(Boolean);
22555
+ if (path31.length === 0) {
22556
22556
  return ctx.rootSchema;
22557
22557
  }
22558
22558
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
22559
- if (path30[0] === defsKey) {
22560
- const key = path30[1] === void 0 ? void 0 : decodeJSONPointerSegment(path30[1]);
22559
+ if (path31[0] === defsKey) {
22560
+ const key = path31[1] === void 0 ? void 0 : decodeJSONPointerSegment(path31[1]);
22561
22561
  if (!key || !ctx.defs[key]) {
22562
22562
  throw new Error(`Reference not found: ${ref}`);
22563
22563
  }
@@ -23184,7 +23184,7 @@ function fromJSONSchema(schema, params) {
23184
23184
  return convertSchema(normalized, ctx);
23185
23185
  }
23186
23186
 
23187
- // node_modules/zod/v4/core/visit.js
23187
+ // ../../node_modules/zod/v4/core/visit.js
23188
23188
  var RESOLVING = /* @__PURE__ */ Symbol("z.visit/resolving");
23189
23189
  function visit(schema, fnOrHandlers) {
23190
23190
  const fn = typeof fnOrHandlers === "function" ? fnOrHandlers : (node2, rewritten) => {
@@ -23339,7 +23339,7 @@ function visit(schema, fnOrHandlers) {
23339
23339
  return run2(schema);
23340
23340
  }
23341
23341
 
23342
- // node_modules/zod/v4/classic/deep-partial.js
23342
+ // ../../node_modules/zod/v4/classic/deep-partial.js
23343
23343
  function deepPartial(schema) {
23344
23344
  return visit(schema, {
23345
23345
  object: (s) => s.partial(),
@@ -23351,7 +23351,7 @@ function deepPartial(schema) {
23351
23351
  });
23352
23352
  }
23353
23353
 
23354
- // node_modules/zod/v4/classic/in-out.js
23354
+ // ../../node_modules/zod/v4/classic/in-out.js
23355
23355
  function withChecks(side, checks) {
23356
23356
  if (!checks?.length)
23357
23357
  return side;
@@ -23381,7 +23381,7 @@ function output(schema) {
23381
23381
  });
23382
23382
  }
23383
23383
 
23384
- // node_modules/zod/v4/classic/coerce.js
23384
+ // ../../node_modules/zod/v4/classic/coerce.js
23385
23385
  var coerce_exports = {};
23386
23386
  __export(coerce_exports, {
23387
23387
  bigint: () => bigint3,
@@ -23819,7 +23819,7 @@ import { createServer } from "node:http";
23819
23819
  import { connect as netConnect } from "node:net";
23820
23820
  import { createHash, randomBytes, timingSafeEqual } from "node:crypto";
23821
23821
 
23822
- // node_modules/ws/wrapper.mjs
23822
+ // ../../node_modules/ws/wrapper.mjs
23823
23823
  var import_stream = __toESM(require_stream(), 1);
23824
23824
  var import_extension = __toESM(require_extension(), 1);
23825
23825
  var import_permessage_deflate = __toESM(require_permessage_deflate(), 1);
@@ -23830,7 +23830,7 @@ var import_websocket = __toESM(require_websocket(), 1);
23830
23830
  var import_websocket_server = __toESM(require_websocket_server(), 1);
23831
23831
  var wrapper_default = import_websocket.default;
23832
23832
 
23833
- // node_modules/jose/dist/webapi/lib/buffer_utils.js
23833
+ // ../../node_modules/jose/dist/webapi/lib/buffer_utils.js
23834
23834
  var encoder = new TextEncoder();
23835
23835
  var decoder = new TextDecoder();
23836
23836
  var strictDecoder = new TextDecoder("utf-8", { fatal: true });
@@ -23881,7 +23881,7 @@ function decodeBase64(encoded, url2 = false) {
23881
23881
  return bytes3;
23882
23882
  }
23883
23883
 
23884
- // node_modules/jose/dist/webapi/util/errors.js
23884
+ // ../../node_modules/jose/dist/webapi/util/errors.js
23885
23885
  var JOSEError = class extends Error {
23886
23886
  static code = "ERR_JOSE_GENERIC";
23887
23887
  code = "ERR_JOSE_GENERIC";
@@ -23933,7 +23933,7 @@ var JWSSignatureVerificationFailed = class extends JOSEError {
23933
23933
  }
23934
23934
  };
23935
23935
 
23936
- // node_modules/jose/dist/webapi/util/base64url.js
23936
+ // ../../node_modules/jose/dist/webapi/util/base64url.js
23937
23937
  var invalid = "The input to be decoded is not correctly encoded.";
23938
23938
  function decode3(input2) {
23939
23939
  try {
@@ -23946,7 +23946,7 @@ function encode4(input2) {
23946
23946
  return encodeBase64(typeof input2 == "string" ? encoder.encode(input2) : input2, true);
23947
23947
  }
23948
23948
 
23949
- // node_modules/jose/dist/webapi/lib/validate.js
23949
+ // ../../node_modules/jose/dist/webapi/lib/validate.js
23950
23950
  function assertUint8Array(input2, label2) {
23951
23951
  if (!(input2 instanceof Uint8Array))
23952
23952
  throw new TypeError(`${label2} must be an instance of Uint8Array`);
@@ -24047,7 +24047,7 @@ function serializeJoseHeader(Err, header) {
24047
24047
  return [parsed, serialized];
24048
24048
  }
24049
24049
 
24050
- // node_modules/jose/dist/webapi/lib/key.js
24050
+ // ../../node_modules/jose/dist/webapi/lib/key.js
24051
24051
  var tag = (key) => key[Symbol.toStringTag];
24052
24052
  var jwkMatchesOp = (entry, key, usage) => {
24053
24053
  const { alg } = entry;
@@ -24178,7 +24178,7 @@ async function rawKey(key, expected, usage, extractable = false) {
24178
24178
  return key instanceof Uint8Array && (key = await crypto.subtle.importKey("raw", key, expected, extractable, [usage])), checkCryptoKey(key, expected, usage), key;
24179
24179
  }
24180
24180
 
24181
- // node_modules/jose/dist/webapi/lib/key_descriptor.js
24181
+ // ../../node_modules/jose/dist/webapi/lib/key_descriptor.js
24182
24182
  function table(entries) {
24183
24183
  const out = { __proto__: null };
24184
24184
  for (const alg in entries)
@@ -24186,7 +24186,7 @@ function table(entries) {
24186
24186
  return out;
24187
24187
  }
24188
24188
 
24189
- // node_modules/jose/dist/webapi/lib/jws_algorithms.js
24189
+ // ../../node_modules/jose/dist/webapi/lib/jws_algorithms.js
24190
24190
  var sig = [["verify"], ["sign"]];
24191
24191
  function hmac(bits) {
24192
24192
  const subtle = { name: "HMAC", hash: `SHA-${bits}` };
@@ -24256,7 +24256,7 @@ function jwsAlgorithm(alg) {
24256
24256
  return entry;
24257
24257
  }
24258
24258
 
24259
- // node_modules/jose/dist/webapi/lib/jws_verify.js
24259
+ // ../../node_modules/jose/dist/webapi/lib/jws_verify.js
24260
24260
  function prepareVerify(options) {
24261
24261
  return [options && validateAlgorithms("algorithms", options.algorithms), options?.crit];
24262
24262
  }
@@ -24308,13 +24308,13 @@ async function verifyCompact(jws, shared, key) {
24308
24308
  return verifySignature({ payload: payload2, protected: protectedHeader, signature }, shared, key, encodeCompactUnencodedPayload);
24309
24309
  }
24310
24310
 
24311
- // node_modules/jose/dist/webapi/jws/compact/verify.js
24311
+ // ../../node_modules/jose/dist/webapi/jws/compact/verify.js
24312
24312
  async function compactVerify(jws, key, options) {
24313
24313
  const [result2] = await verifyCompact(jws, prepareVerify(options), key);
24314
24314
  return result2;
24315
24315
  }
24316
24316
 
24317
- // node_modules/jose/dist/webapi/lib/jwt_claims_set.js
24317
+ // ../../node_modules/jose/dist/webapi/lib/jwt_claims_set.js
24318
24318
  var epoch = (date6) => Math.floor(date6.getTime() / 1e3);
24319
24319
  var multipliers = {
24320
24320
  s: 1,
@@ -24400,7 +24400,7 @@ function validateClaimsSet(protectedHeader, encodedPayload, options = {}) {
24400
24400
  return payload2;
24401
24401
  }
24402
24402
 
24403
- // node_modules/jose/dist/webapi/jwt/verify.js
24403
+ // ../../node_modules/jose/dist/webapi/jwt/verify.js
24404
24404
  async function jwtVerify(jwt2, key, options) {
24405
24405
  const [verified, b64] = await verifyCompact(jwt2, prepareVerify(options), key);
24406
24406
  if (!b64)
@@ -24409,7 +24409,7 @@ async function jwtVerify(jwt2, key, options) {
24409
24409
  return { ...verified, payload: payload2 };
24410
24410
  }
24411
24411
 
24412
- // node_modules/jose/dist/webapi/lib/jws_sign.js
24412
+ // ../../node_modules/jose/dist/webapi/lib/jws_sign.js
24413
24413
  async function createSignature(input2, key, rejectUnencoded) {
24414
24414
  let [payload2, protectedHeader, unprotectedHeader, crit] = input2, protectedHeaderString = "";
24415
24415
  if (protectedHeader !== void 0) {
@@ -24447,7 +24447,7 @@ async function createCompactSignature(payload2, protectedHeader, crit, key, reje
24447
24447
  return `${jws.protected}.${jws.payload}.${jws.signature}`;
24448
24448
  }
24449
24449
 
24450
- // node_modules/jose/dist/webapi/jws/compact/sign.js
24450
+ // ../../node_modules/jose/dist/webapi/jws/compact/sign.js
24451
24451
  var CompactSign = class {
24452
24452
  #payload;
24453
24453
  #protectedHeader;
@@ -24464,7 +24464,7 @@ var CompactSign = class {
24464
24464
  }
24465
24465
  };
24466
24466
 
24467
- // node_modules/jose/dist/webapi/util/decode_jwt.js
24467
+ // ../../node_modules/jose/dist/webapi/util/decode_jwt.js
24468
24468
  function decodeJwt(jwt2) {
24469
24469
  if (typeof jwt2 != "string")
24470
24470
  throw new JWTInvalid("JWTs must use Compact JWS serialization, JWT must be a string");
@@ -24930,14 +24930,14 @@ async function loadProxyModeFlag(dir) {
24930
24930
  }
24931
24931
  }
24932
24932
  async function writeProxyState(dir, state) {
24933
- const file2 = path.join(dir, "proxy.json");
24933
+ const file3 = path.join(dir, "proxy.json");
24934
24934
  try {
24935
24935
  if (!state) {
24936
- await rm(file2, { force: true });
24936
+ await rm(file3, { force: true });
24937
24937
  return;
24938
24938
  }
24939
24939
  await mkdir(dir, { recursive: true });
24940
- await writeFile(file2, JSON.stringify({ ...state, updatedAt: Date.now() }), { mode: 384 });
24940
+ await writeFile(file3, JSON.stringify({ ...state, updatedAt: Date.now() }), { mode: 384 });
24941
24941
  } catch {
24942
24942
  }
24943
24943
  }
@@ -25062,9 +25062,9 @@ async function networkDirectory(stateDirectory) {
25062
25062
  }
25063
25063
  async function networkPrepared(stateDirectory, identity) {
25064
25064
  try {
25065
- const file2 = networkPath(stateDirectory, "network-prepared.json"), stat2 = await fs.lstat(file2);
25065
+ const file3 = networkPath(stateDirectory, "network-prepared.json"), stat2 = await fs.lstat(file3);
25066
25066
  if (!stat2.isFile() || stat2.isSymbolicLink() || stat2.size > 1024) return false;
25067
- const receipt = Receipt.parse(JSON.parse(await fs.readFile(file2, "utf8"))), e = identity.enrollment;
25067
+ const receipt = Receipt.parse(JSON.parse(await fs.readFile(file3, "utf8"))), e = identity.enrollment;
25068
25068
  return !!e && receipt.deviceId === e.deviceId && receipt.tenantId === e.tenantId && receipt.accountId === e.accountId;
25069
25069
  } catch {
25070
25070
  return false;
@@ -25144,10 +25144,10 @@ async function setupNetwork(binaryDirectory, stateDirectory, identity) {
25144
25144
  await elevated(bundle.helper, "setup", requestPath, directory);
25145
25145
  await localNetworkControl(e.deviceId);
25146
25146
  const receipt = Receipt.parse({ version: 1, deviceId: e.deviceId, tenantId: e.tenantId, accountId: e.accountId, bundleId: bundle.bundleId });
25147
- const file2 = path2.join(directory, "network-prepared.json"), temp = file2 + "." + randomUUID2();
25147
+ const file3 = path2.join(directory, "network-prepared.json"), temp = file3 + "." + randomUUID2();
25148
25148
  await fs.writeFile(temp, JSON.stringify(receipt), { flag: "wx", mode: 384 });
25149
25149
  try {
25150
- await fs.rename(temp, file2);
25150
+ await fs.rename(temp, file3);
25151
25151
  } finally {
25152
25152
  await fs.rm(temp, { force: true });
25153
25153
  }
@@ -25177,7 +25177,7 @@ async function openNetworkPanel(binaryDirectory, identity) {
25177
25177
  }
25178
25178
 
25179
25179
  // agent/src/main.ts
25180
- import path29 from "node:path";
25180
+ import path30 from "node:path";
25181
25181
  import os8 from "node:os";
25182
25182
 
25183
25183
  // agent/src/posix-store.ts
@@ -25597,7 +25597,7 @@ async function acquirePosixJournalGuard(directory, helper) {
25597
25597
  }
25598
25598
 
25599
25599
  // agent/src/main.ts
25600
- import { mkdir as mkdir14, open as open13, readFile as readFile12, realpath as realpath10, rm as rm10 } from "node:fs/promises";
25600
+ import { mkdir as mkdir15, open as open13, readFile as readFile13, realpath as realpath10, rm as rm11 } from "node:fs/promises";
25601
25601
  import { fileURLToPath } from "node:url";
25602
25602
 
25603
25603
  // packages/operations/src/crypto.ts
@@ -25734,8 +25734,8 @@ var exec2 = promisify2(execFile2);
25734
25734
  async function darwinSupervisorLiveness(helper, pids, records = []) {
25735
25735
  if (process.platform !== "darwin" || !process.getuid?.() || process.getuid() !== process.geteuid?.()) return null;
25736
25736
  const remaining = new Set(pids), uid = process.getuid(), deadline = Date.now() + 1e4, env = buildChildEnvironment(process.env);
25737
- const run2 = (file2, args) => exec2(
25738
- file2,
25737
+ const run2 = (file3, args) => exec2(
25738
+ file3,
25739
25739
  args,
25740
25740
  { env, timeout: Math.max(1, Math.min(7e3, deadline - Date.now())), maxBuffer: 8192, encoding: "utf8", windowsHide: true }
25741
25741
  );
@@ -26503,6 +26503,7 @@ var NATIVE_STATUS_CAPABILITY = "nativeStatusV1";
26503
26503
  var NativeStatusSchema = NativeCapacitySchema.extend({ type: external_exports.literal("nativeStatus"), active: external_exports.number().int().min(0).max(32), queued: external_exports.number().int().min(0).max(256), paused: external_exports.boolean() }).strict().refine((v) => v.active <= v.safeSlots);
26504
26504
  var TerminalEventSchema = external_exports.object({ type: external_exports.literal("executionResult"), protocolVersion: external_exports.literal(1), requestId: uuid11, tenantId: uuid11, deviceId: uuid11, connectionEpoch: epoch2, binding: ExecutionBindingSchema, state: external_exports.enum(["finished", "failed", "cancelled", "unknown", "rejected"]), resultCode: external_exports.string().regex(/^[A-Z0-9_]{1,40}$/), metrics: TerminalMetricsSchema.optional() }).strict();
26505
26505
  var HeldLeasesFrameSchema = external_exports.object({ type: external_exports.literal("heldLeases"), protocolVersion: external_exports.literal(1), connectionEpoch: epoch2, bindings: external_exports.array(ExecutionBindingSchema).min(1).max(64) }).strict();
26506
+ var FullLogStateSchema = external_exports.object({ type: external_exports.literal("fullLogState"), protocolVersion: external_exports.literal(1), connectionEpoch: epoch2, enabled: external_exports.boolean().nullable() }).strict();
26506
26507
  var TerminalEventAckSchema = external_exports.object({ type: external_exports.literal("executionResultAck"), protocolVersion: external_exports.literal(1), requestId: uuid11, ok: external_exports.boolean() }).strict();
26507
26508
  function canonicalJson(value) {
26508
26509
  function canonical2(v) {
@@ -26798,23 +26799,23 @@ var NativeJournal = class _NativeJournal {
26798
26799
  }
26799
26800
  const dir = await safeDirectory(directory), lockPath = path6.join(dir, "journal.lock"), nonce2 = randomBytes4(16).toString("hex");
26800
26801
  const guard = options.lockHelper ? await acquirePosixJournalGuard(dir, options.lockHelper) : void 0;
26801
- let file2;
26802
+ let file3;
26802
26803
  try {
26803
- file2 = await open3(lockPath, constants2.O_CREAT | constants2.O_EXCL | constants2.O_WRONLY, 384);
26804
+ file3 = await open3(lockPath, constants2.O_CREAT | constants2.O_EXCL | constants2.O_WRONLY, 384);
26804
26805
  } catch (e) {
26805
26806
  await guard?.close();
26806
26807
  if (e.code === "EEXIST") throw failure2("JOURNAL_LOCKED");
26807
26808
  throw e;
26808
26809
  }
26809
- const journal = new _NativeJournal(dir, box, { path: lockPath, nonce: nonce2, file: file2, guard }, { maxEntries, maxBytes, retentionMs, now: options.now ?? (() => /* @__PURE__ */ new Date()) });
26810
+ const journal = new _NativeJournal(dir, box, { path: lockPath, nonce: nonce2, file: file3, guard }, { maxEntries, maxBytes, retentionMs, now: options.now ?? (() => /* @__PURE__ */ new Date()) });
26810
26811
  try {
26811
- await file2.writeFile(JSON.stringify({ pid: process.pid, nonce: nonce2, createdAt: journal.now().toISOString() }));
26812
- await file2.sync();
26812
+ await file3.writeFile(JSON.stringify({ pid: process.pid, nonce: nonce2, createdAt: journal.now().toISOString() }));
26813
+ await file3.sync();
26813
26814
  await journal.load();
26814
26815
  await journal.loadStart(existed);
26815
26816
  return journal;
26816
26817
  } catch (e) {
26817
- await file2.close().catch(() => {
26818
+ await file3.close().catch(() => {
26818
26819
  });
26819
26820
  try {
26820
26821
  const value = JSON.parse(await readFile3(lockPath, "utf8"));
@@ -28781,9 +28782,9 @@ function resolveWindowsLauncher(commandName, env = process.env) {
28781
28782
  const dir = entry.trim().replace(/^"(.*)"$/, "$1");
28782
28783
  if (!path11.win32.isAbsolute(dir)) continue;
28783
28784
  for (const ext of extensions) {
28784
- const file2 = path11.win32.join(dir, commandName + ext);
28785
+ const file3 = path11.win32.join(dir, commandName + ext);
28785
28786
  try {
28786
- if (statSync(file2).isFile()) return { file: file2, shell: ext === ".bat" || ext === ".cmd" };
28787
+ if (statSync(file3).isFile()) return { file: file3, shell: ext === ".bat" || ext === ".cmd" };
28787
28788
  } catch {
28788
28789
  }
28789
28790
  }
@@ -28804,8 +28805,8 @@ var Entry = external_exports.strictObject({
28804
28805
  });
28805
28806
  var State = external_exports.strictObject({ version: external_exports.literal(1), platform: external_exports.string().max(16), entries: external_exports.array(Entry).max(32) });
28806
28807
  var HostMemory = class {
28807
- constructor(file2, allowed, programs) {
28808
- this.file = file2;
28808
+ constructor(file3, allowed, programs) {
28809
+ this.file = file3;
28809
28810
  this.allowed = allowed;
28810
28811
  this.programs = programs;
28811
28812
  }
@@ -28845,9 +28846,9 @@ var HostMemory = class {
28845
28846
  else if (!this.programs && !available) available = (process.env.PATH ?? "").split(path12.delimiter).some((dir) => {
28846
28847
  if (!path12.isAbsolute(dir)) return false;
28847
28848
  try {
28848
- const file2 = path12.join(dir, command);
28849
- accessSync(file2, constants5.X_OK);
28850
- return statSync2(file2).isFile();
28849
+ const file3 = path12.join(dir, command);
28850
+ accessSync(file3, constants5.X_OK);
28851
+ return statSync2(file3).isFile();
28851
28852
  } catch {
28852
28853
  return false;
28853
28854
  }
@@ -28907,13 +28908,13 @@ var HostMemory = class {
28907
28908
  await mkdir5(directory2, { recursive: true, mode: 448 });
28908
28909
  const stat2 = await lstat5(directory2);
28909
28910
  if (!stat2.isDirectory() || stat2.isSymbolicLink()) throw Error("HOST_MEMORY_DIRECTORY_INVALID");
28910
- const file2 = await open5(temp, "wx", 384);
28911
+ const file3 = await open5(temp, "wx", 384);
28911
28912
  try {
28912
- await file2.writeFile(encoded);
28913
- await file2.close();
28913
+ await file3.writeFile(encoded);
28914
+ await file3.close();
28914
28915
  await rename3(temp, this.file);
28915
28916
  } finally {
28916
- await file2.close().catch(() => {
28917
+ await file3.close().catch(() => {
28917
28918
  });
28918
28919
  await rm4(temp, { force: true }).catch(() => {
28919
28920
  });
@@ -29140,11 +29141,11 @@ var PathGuard = class _PathGuard {
29140
29141
  // src/windows-file-read.ts
29141
29142
  import { execFile as execFile3 } from "node:child_process";
29142
29143
  import path14 from "node:path";
29143
- function readWindowsFile(bridge, file2, maxBytes, signal) {
29144
- return invokeRead(bridge, file2, maxBytes, false, signal);
29144
+ function readWindowsFile(bridge, file3, maxBytes, signal) {
29145
+ return invokeRead(bridge, file3, maxBytes, false, signal);
29145
29146
  }
29146
- async function readWindowsFilePrefix(bridge, file2, maxBytes, signal) {
29147
- const output2 = await invokeRead(bridge, file2, maxBytes, true, signal);
29147
+ async function readWindowsFilePrefix(bridge, file3, maxBytes, signal) {
29148
+ const output2 = await invokeRead(bridge, file3, maxBytes, true, signal);
29148
29149
  try {
29149
29150
  const value = JSON.parse(output2.toString("utf8"));
29150
29151
  if (!value || Object.keys(value).length !== 4 || typeof value.data !== "string" || !Number.isSafeInteger(value.size) || value.size < 0 || typeof value.modifiedAt !== "string" || new Date(value.modifiedAt).toISOString() !== value.modifiedAt || value.truncated !== value.size > maxBytes) throw Error();
@@ -29157,7 +29158,7 @@ async function readWindowsFilePrefix(bridge, file2, maxBytes, signal) {
29157
29158
  }
29158
29159
  function readWindowsFiles(bridge, files, maxBytes, maxTotalBytes, signal) {
29159
29160
  const input2 = JSON.stringify({ paths: files });
29160
- if (process.platform !== "win32" || !path14.isAbsolute(bridge) || files.length < 1 || files.length > 64 || files.some((file2) => !path14.isAbsolute(file2)) || Buffer.byteLength(input2) > 3e5 || !Number.isSafeInteger(maxBytes) || maxBytes < 1 || maxBytes > 1048576 || !Number.isSafeInteger(maxTotalBytes) || maxTotalBytes < 1 || maxTotalBytes > 16777216) {
29161
+ if (process.platform !== "win32" || !path14.isAbsolute(bridge) || files.length < 1 || files.length > 64 || files.some((file3) => !path14.isAbsolute(file3)) || Buffer.byteLength(input2) > 3e5 || !Number.isSafeInteger(maxBytes) || maxBytes < 1 || maxBytes > 1048576 || !Number.isSafeInteger(maxTotalBytes) || maxTotalBytes < 1 || maxTotalBytes > 16777216) {
29161
29162
  return Promise.reject(new Error("FILE_READ_ARGUMENT_INVALID"));
29162
29163
  }
29163
29164
  if (signal?.aborted) return Promise.reject(new Error("CANCELLED"));
@@ -29194,8 +29195,8 @@ function readWindowsFiles(bridge, files, maxBytes, maxTotalBytes, signal) {
29194
29195
  child.stdin.end(input2);
29195
29196
  });
29196
29197
  }
29197
- function invokeRead(bridge, file2, maxBytes, prefix, signal) {
29198
- if (process.platform !== "win32" || !path14.isAbsolute(bridge) || !path14.isAbsolute(file2) || !Number.isSafeInteger(maxBytes) || maxBytes < 1 || maxBytes > (prefix ? 16777216 : 1048576)) {
29198
+ function invokeRead(bridge, file3, maxBytes, prefix, signal) {
29199
+ if (process.platform !== "win32" || !path14.isAbsolute(bridge) || !path14.isAbsolute(file3) || !Number.isSafeInteger(maxBytes) || maxBytes < 1 || maxBytes > (prefix ? 16777216 : 1048576)) {
29199
29200
  return Promise.reject(new Error("FILE_READ_ARGUMENT_INVALID"));
29200
29201
  }
29201
29202
  if (signal?.aborted) return Promise.reject(new Error("CANCELLED"));
@@ -29218,7 +29219,7 @@ function invokeRead(bridge, file2, maxBytes, prefix, signal) {
29218
29219
  });
29219
29220
  child.stdin.on("error", () => {
29220
29221
  });
29221
- child.stdin.end(JSON.stringify({ path: file2 }));
29222
+ child.stdin.end(JSON.stringify({ path: file3 }));
29222
29223
  });
29223
29224
  }
29224
29225
 
@@ -29558,11 +29559,11 @@ async function portalScreenshot(socket, uid, token, signal) {
29558
29559
  signal.addEventListener("abort", abort, { once: true });
29559
29560
  connection.on("error", fail7);
29560
29561
  connection.on("close", () => fail7(Error("CLOSED")));
29561
- const call = (destination, path30, iface, member, signature = "", body = () => {
29562
+ const call = (destination, path31, iface, member, signature = "", body = () => {
29562
29563
  }) => new Promise((done, failed) => {
29563
29564
  const payload2 = new Writer();
29564
29565
  body(payload2);
29565
- const header = new Writer(), fields = [[1, "o", path30], [2, "s", iface], [3, "s", member], [6, "s", destination]];
29566
+ const header = new Writer(), fields = [[1, "o", path31], [2, "s", iface], [3, "s", member], [6, "s", destination]];
29566
29567
  if (signature) fields.push([8, "g", signature]);
29567
29568
  header.byte(108);
29568
29569
  header.byte(1);
@@ -30407,10 +30408,10 @@ function jpegSize(data) {
30407
30408
  }
30408
30409
  return null;
30409
30410
  }
30410
- function run(file2, args, signal, maxBuffer = 65536, env = buildChildEnvironment(process.env, process.platform)) {
30411
+ function run(file3, args, signal, maxBuffer = 65536, env = buildChildEnvironment(process.env, process.platform)) {
30411
30412
  return new Promise((resolve, reject) => {
30412
30413
  execFile4(
30413
- file2,
30414
+ file3,
30414
30415
  args,
30415
30416
  { encoding: "buffer", timeout: 15e3, maxBuffer, windowsHide: true, shell: false, env, signal },
30416
30417
  (error62, stdout, stderr) => error62 ? reject(Object.assign(error62, { stdout, stderr })) : resolve({ stdout, stderr })
@@ -30482,10 +30483,10 @@ var SESSION_VALUE = /^[A-Za-z0-9_.:,;=@+/-]{1,256}$/;
30482
30483
  var LINUX_SOURCE_BYTES = 150994944;
30483
30484
  async function linuxTool(name2) {
30484
30485
  for (const directory of ["/usr/bin", "/bin", "/usr/local/bin"]) {
30485
- const file2 = path17.posix.join(directory, name2);
30486
+ const file3 = path17.posix.join(directory, name2);
30486
30487
  try {
30487
- await access3(file2, constants7.X_OK);
30488
- return file2;
30488
+ await access3(file3, constants7.X_OK);
30489
+ return file3;
30489
30490
  } catch {
30490
30491
  }
30491
30492
  }
@@ -30530,8 +30531,8 @@ async function linuxSession(signal) {
30530
30531
  }
30531
30532
  }
30532
30533
  if (session.DISPLAY && !session.XAUTHORITY) {
30533
- const file2 = path17.posix.join(os4.homedir(), ".Xauthority");
30534
- if ((await lstat7(file2).catch(() => null))?.isFile()) take("XAUTHORITY", file2);
30534
+ const file3 = path17.posix.join(os4.homedir(), ".Xauthority");
30535
+ if ((await lstat7(file3).catch(() => null))?.isFile()) take("XAUTHORITY", file3);
30535
30536
  }
30536
30537
  if (session.XDG_RUNTIME_DIR) take("DBUS_SESSION_BUS_ADDRESS", "unix:path=" + session.XDG_RUNTIME_DIR + "/bus");
30537
30538
  const wayland = !!session.WAYLAND_DISPLAY || session.XDG_SESSION_TYPE === "wayland";
@@ -30554,13 +30555,13 @@ async function portalCapture(socket, signal) {
30554
30555
  const { code, uri } = answer;
30555
30556
  if (code === 1) throw new ScreenCaptureError("SCREEN_RECORDING_PERMISSION_REQUIRED");
30556
30557
  if (code !== 0 || !uri?.startsWith("file://")) throw new ScreenCaptureError("SCREEN_UNAVAILABLE");
30557
- const file2 = decodeURIComponent(new URL(uri).pathname), info = await lstat7(file2);
30558
+ const file3 = decodeURIComponent(new URL(uri).pathname), info = await lstat7(file3);
30558
30559
  const fresh = info.isFile() && info.uid === uid && info.mtimeMs >= started - 5e3;
30559
30560
  try {
30560
30561
  if (!fresh || info.size > LINUX_SOURCE_BYTES) throw new ScreenCaptureError("SCREEN_UNAVAILABLE");
30561
- return await readFile6(file2);
30562
+ return await readFile6(file3);
30562
30563
  } finally {
30563
- if (fresh) await unlink2(file2).catch(() => {
30564
+ if (fresh) await unlink2(file3).catch(() => {
30564
30565
  });
30565
30566
  }
30566
30567
  }
@@ -30643,16 +30644,16 @@ function result(body) {
30643
30644
  function stopped(signal) {
30644
30645
  if (signal.aborted) fail3("CANCELLED");
30645
30646
  }
30646
- async function readBoundedFile(file2, maxBytes, bridge, signal) {
30647
- const stat2 = await lstat8(file2);
30647
+ async function readBoundedFile(file3, maxBytes, bridge, signal) {
30648
+ const stat2 = await lstat8(file3);
30648
30649
  if (!stat2.isFile() || stat2.isSymbolicLink() || stat2.size > maxBytes) fail3("FILE_UNSUPPORTED_OR_TOO_LARGE");
30649
30650
  if (process.platform === "win32") {
30650
- if (maxBytes <= 1048576 || stat2.size <= 1048576) return readWindowsFile(bridge, file2, Math.min(maxBytes, 1048576), signal);
30651
- const read = await readWindowsFilePrefix(bridge, file2, maxBytes, signal);
30651
+ if (maxBytes <= 1048576 || stat2.size <= 1048576) return readWindowsFile(bridge, file3, Math.min(maxBytes, 1048576), signal);
30652
+ const read = await readWindowsFilePrefix(bridge, file3, maxBytes, signal);
30652
30653
  if (read.truncated) fail3("FILE_UNSUPPORTED_OR_TOO_LARGE");
30653
30654
  return read.data;
30654
30655
  }
30655
- const handle = await open6(file2, constants8.O_RDONLY | (constants8.O_NOFOLLOW ?? 0));
30656
+ const handle = await open6(file3, constants8.O_RDONLY | (constants8.O_NOFOLLOW ?? 0));
30656
30657
  try {
30657
30658
  const current2 = await handle.stat();
30658
30659
  if (!current2.isFile() || current2.size > maxBytes) fail3("FILE_UNSUPPORTED_OR_TOO_LARGE");
@@ -30708,9 +30709,9 @@ var NativeTools = class {
30708
30709
  }
30709
30710
  options;
30710
30711
  memory;
30711
- async readFile(file2, maxBytes, signal) {
30712
+ async readFile(file3, maxBytes, signal) {
30712
30713
  try {
30713
- return await readBoundedFile(file2, maxBytes, this.options.ownerBridgePath ?? path18.join(path18.dirname(this.options.helperPath), "OwnerBridge.exe"), signal);
30714
+ return await readBoundedFile(file3, maxBytes, this.options.ownerBridgePath ?? path18.join(path18.dirname(this.options.helperPath), "OwnerBridge.exe"), signal);
30714
30715
  } catch (error62) {
30715
30716
  if (error62.code === "ENOENT") throw error62;
30716
30717
  if (error62 instanceof Error && /^[A-Z_]{1,40}$/.test(error62.message)) fail3(error62.message);
@@ -31144,8 +31145,8 @@ var NativeTools = class {
31144
31145
  else if (call.name === "git_diff") {
31145
31146
  argv = ["diff", "--no-ext-diff", "--no-textconv", ...call.args.staged ? ["--cached"] : []];
31146
31147
  if (call.args.file) {
31147
- const file2 = await resolve(path18.resolve(cwd, call.args.file));
31148
- const relative = path18.relative(cwd, file2);
31148
+ const file3 = await resolve(path18.resolve(cwd, call.args.file));
31149
+ const relative = path18.relative(cwd, file3);
31149
31150
  if (relative.startsWith(".." + path18.sep) || relative === ".." || path18.isAbsolute(relative)) fail3("PATH_NOT_ALLOWED");
31150
31151
  argv.push("--", relative);
31151
31152
  } else argv.push("--stat");
@@ -31177,9 +31178,9 @@ var NativeTools = class {
31177
31178
  }
31178
31179
  const contextFile = async (relative, limit, optional2 = false) => {
31179
31180
  try {
31180
- const file2 = await guard.resolveExisting(path18.join(primary, relative));
31181
- guard.assertSafeFile(file2);
31182
- return utf8(await this.readFile(file2, limit, signal));
31181
+ const file3 = await guard.resolveExisting(path18.join(primary, relative));
31182
+ guard.assertSafeFile(file3);
31183
+ return utf8(await this.readFile(file3, limit, signal));
31183
31184
  } catch (error62) {
31184
31185
  if (optional2 && error62.code === "ENOENT") return null;
31185
31186
  throw error62;
@@ -31872,7 +31873,7 @@ function shapeCommandResultForAgentDetailed(input2, result2) {
31872
31873
  if (parsed.state !== "candidate" && result2.exitCode === 0 && !result2.stdoutTruncated && !result2.stderrTruncated && result2.stderr === "") {
31873
31874
  const compact = compactJsonOutput(result2.stdout);
31874
31875
  if (compact !== null) {
31875
- const sent = bytes(compact), saved = originalBytes - sent;
31876
+ const sent = bytes(compact), saved2 = originalBytes - sent;
31876
31877
  return Object.freeze({ result: Object.freeze({ ...result2, stdout: compact }), telemetry: Object.freeze({
31877
31878
  parserId: "json-whitespace",
31878
31879
  parserVersion: "1",
@@ -31881,8 +31882,8 @@ function shapeCommandResultForAgentDetailed(input2, result2) {
31881
31882
  reason: "validated_compact",
31882
31883
  originalStdoutBytes: originalBytes,
31883
31884
  sentStdoutBytes: sent,
31884
- savedStdoutBytes: saved,
31885
- reductionPercent: originalBytes === 0 ? 0 : saved / originalBytes * 100
31885
+ savedStdoutBytes: saved2,
31886
+ reductionPercent: originalBytes === 0 ? 0 : saved2 / originalBytes * 100
31886
31887
  }) });
31887
31888
  }
31888
31889
  }
@@ -32957,7 +32958,7 @@ var LocalDirectClient = class _LocalDirectClient {
32957
32958
  }
32958
32959
  };
32959
32960
 
32960
- // node_modules/@modelcontextprotocol/server/dist/chunk-Br0eD_fh.mjs
32961
+ // ../../node_modules/@modelcontextprotocol/server/dist/chunk-Br0eD_fh.mjs
32961
32962
  var __create2 = Object.create;
32962
32963
  var __defProp2 = Object.defineProperty;
32963
32964
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -32997,7 +32998,7 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__
32997
32998
  enumerable: true
32998
32999
  }) : target, mod));
32999
33000
 
33000
- // node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs
33001
+ // ../../node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs
33001
33002
  var DRAFT_2020_12_URIS = /* @__PURE__ */ new Set(["https://json-schema.org/draft/2020-12/schema", "http://json-schema.org/draft/2020-12/schema"]);
33002
33003
  var DRAFT_2019_09_URIS = /* @__PURE__ */ new Set(["https://json-schema.org/draft/2019-09/schema", "http://json-schema.org/draft/2019-09/schema"]);
33003
33004
  var DRAFT_07_URIS = /* @__PURE__ */ new Set(["https://json-schema.org/draft-07/schema", "http://json-schema.org/draft-07/schema"]);
@@ -33014,7 +33015,7 @@ function declaredDialect(schema, remedy) {
33014
33015
  throw new Error(`JSON Schema declares an unsupported dialect ("$schema": "${schema.$schema.slice(0, 200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${remedy}`);
33015
33016
  }
33016
33017
 
33017
- // node_modules/@modelcontextprotocol/core/dist/auth-CGP0BDVq.mjs
33018
+ // ../../node_modules/@modelcontextprotocol/core/dist/auth-CGP0BDVq.mjs
33018
33019
  var LATEST_PROTOCOL_VERSION = "2025-11-25";
33019
33020
  var SUPPORTED_PROTOCOL_VERSIONS = [
33020
33021
  LATEST_PROTOCOL_VERSION,
@@ -33953,7 +33954,7 @@ var OAuthTokenRevocationRequestSchema = object({
33953
33954
  token_type_hint: string2().optional()
33954
33955
  }).strip();
33955
33956
 
33956
- // node_modules/@modelcontextprotocol/server/dist/src-D-y6h4N7.mjs
33957
+ // ../../node_modules/@modelcontextprotocol/server/dist/src-D-y6h4N7.mjs
33957
33958
  var BRANDS = /* @__PURE__ */ Symbol.for("mcp.sdk.errorBrands");
33958
33959
  function stampErrorBrands(instance, ctor) {
33959
33960
  const brands = /* @__PURE__ */ new Set();
@@ -36587,9 +36588,9 @@ var rev2026Codec = {
36587
36588
  });
36588
36589
  const parsed = buildSchemas2026().RequestMetaEnvelopeSchema.safeParse(meta3);
36589
36590
  if (!parsed.success) for (const issue2 of parsed.error.issues) {
36590
- const path30 = issue2.path.map(String);
36591
- const key = path30.length > 0 ? path30.join(".") : "_meta";
36592
- if (path30.length === 1 && issues.some((existing) => existing.key === key && existing.problem === "missing")) continue;
36591
+ const path31 = issue2.path.map(String);
36592
+ const key = path31.length > 0 ? path31.join(".") : "_meta";
36593
+ if (path31.length === 1 && issues.some((existing) => existing.key === key && existing.problem === "missing")) continue;
36593
36594
  issues.push({
36594
36595
  key,
36595
36596
  problem: issue2.message
@@ -36891,29 +36892,29 @@ var PERMITTED_X_MCP_HEADER_TYPES = /* @__PURE__ */ new Set([
36891
36892
  function scanXMcpHeaderDeclarations(inputSchema) {
36892
36893
  const declarations = [];
36893
36894
  const seenLower = /* @__PURE__ */ new Map();
36894
- const visit2 = (node2, path30, reachable) => {
36895
+ const visit2 = (node2, path31, reachable) => {
36895
36896
  if (node2 === null || typeof node2 !== "object") return void 0;
36896
36897
  const schema = node2;
36897
36898
  if (X_MCP_HEADER_KEY in schema) {
36898
- if (!reachable || path30.length === 0) return `${pathName(path30)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;
36899
+ if (!reachable || path31.length === 0) return `${pathName(path31)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;
36899
36900
  const raw = schema[X_MCP_HEADER_KEY];
36900
- if (typeof raw !== "string" || raw.length === 0) return `${pathName(path30)}: x-mcp-header MUST be a non-empty string`;
36901
- if (!RFC9110_TOKEN.test(raw)) return `${pathName(path30)}: x-mcp-header '${raw}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;
36901
+ if (typeof raw !== "string" || raw.length === 0) return `${pathName(path31)}: x-mcp-header MUST be a non-empty string`;
36902
+ if (!RFC9110_TOKEN.test(raw)) return `${pathName(path31)}: x-mcp-header '${raw}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;
36902
36903
  const type = typeof schema.type === "string" ? schema.type : void 0;
36903
- if (type === void 0 || !PERMITTED_X_MCP_HEADER_TYPES.has(type)) return `${pathName(path30)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${type ?? "<none>"}`;
36904
+ if (type === void 0 || !PERMITTED_X_MCP_HEADER_TYPES.has(type)) return `${pathName(path31)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${type ?? "<none>"}`;
36904
36905
  const lower = raw.toLowerCase();
36905
36906
  const prior = seenLower.get(lower);
36906
36907
  if (prior !== void 0) return `x-mcp-header '${raw}' is not case-insensitively unique (also declared as '${prior}')`;
36907
36908
  seenLower.set(lower, raw);
36908
36909
  declarations.push({
36909
- path: path30,
36910
+ path: path31,
36910
36911
  headerName: raw,
36911
36912
  type
36912
36913
  });
36913
36914
  }
36914
36915
  const properties = schema.properties;
36915
36916
  if (properties !== null && typeof properties === "object") for (const [key, child] of Object.entries(properties)) {
36916
- const fault$1 = visit2(child, [...path30, key], reachable);
36917
+ const fault$1 = visit2(child, [...path31, key], reachable);
36917
36918
  if (fault$1 !== void 0) return fault$1;
36918
36919
  }
36919
36920
  for (const k of NON_REACHABLE_SUBSCHEMA_KEYWORDS) {
@@ -36921,7 +36922,7 @@ function scanXMcpHeaderDeclarations(inputSchema) {
36921
36922
  if (sub === void 0) continue;
36922
36923
  const branches = Array.isArray(sub) ? sub : sub !== null && typeof sub === "object" && OBJECT_VALUED_SUBSCHEMA_KEYWORDS.has(k) ? Object.values(sub) : [sub];
36923
36924
  for (const branch of branches) {
36924
- const fault$1 = visit2(branch, [...path30, `<${k}>`], false);
36925
+ const fault$1 = visit2(branch, [...path31, `<${k}>`], false);
36925
36926
  if (fault$1 !== void 0) return fault$1;
36926
36927
  }
36927
36928
  }
@@ -36961,8 +36962,8 @@ var OBJECT_VALUED_SUBSCHEMA_KEYWORDS = /* @__PURE__ */ new Set([
36961
36962
  "$defs",
36962
36963
  "definitions"
36963
36964
  ]);
36964
- function pathName(path30) {
36965
- return path30.length === 0 ? "<root>" : path30.join(".");
36965
+ function pathName(path31) {
36966
+ return path31.length === 0 ? "<root>" : path31.join(".");
36966
36967
  }
36967
36968
  var HEADER_MISMATCH_ERROR_CODE = -32020;
36968
36969
  var INBOUND_VALIDATION_LADDER = [
@@ -37212,7 +37213,7 @@ var PROPERTY_KEYS_BY_TYPE = {
37212
37213
  array: shapeKeys([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema])
37213
37214
  };
37214
37215
  var SUPPORTED_STRING_FORMATS = new Set(StringSchemaSchema.shape.format.unwrap().options);
37215
- function walkProperty(node2, path30, vendor, unsupported) {
37216
+ function walkProperty(node2, path31, vendor, unsupported) {
37216
37217
  if (!isJsonObject(node2)) return node2;
37217
37218
  const allowedKeys = typeof node2.type === "string" && Object.hasOwn(PROPERTY_KEYS_BY_TYPE, node2.type) ? PROPERTY_KEYS_BY_TYPE[node2.type] : void 0;
37218
37219
  if (allowedKeys === void 0) return node2;
@@ -37220,8 +37221,8 @@ function walkProperty(node2, path30, vendor, unsupported) {
37220
37221
  for (const [key, value] of Object.entries(node2)) if (allowedKeys.has(key) || isAnnotationOnlyJsonSchemaKeyword(key)) pruned[key] = value;
37221
37222
  else if (key === "pattern" && node2.type === "string" && typeof node2.format === "string") {
37222
37223
  if (!SUPPORTED_STRING_FORMATS.has(node2.format)) pruned[key] = value;
37223
- else if (typeof value !== "string" || !isLibraryFormatPattern(node2.format, value, vendor)) unsupported.push(`${path30}.${key}`);
37224
- } else unsupported.push(`${path30}.${key}`);
37224
+ else if (typeof value !== "string" || !isLibraryFormatPattern(node2.format, value, vendor)) unsupported.push(`${path31}.${key}`);
37225
+ } else unsupported.push(`${path31}.${key}`);
37225
37226
  return pruned;
37226
37227
  }
37227
37228
  function walkRequestedSchema(converted, vendor) {
@@ -37238,11 +37239,11 @@ function describeUnsupportedProperties(pruned, fallback) {
37238
37239
  const offenders = Object.entries(pruned.properties).filter(([, node2]) => !parseSchema(PrimitiveSchemaDefinitionSchema, node2).success).map(([name2]) => `properties.${name2}`);
37239
37240
  return offenders.length > 0 ? offenders.join(", ") : fallback;
37240
37241
  }
37241
- function findDroppedConstraintPaths(original, parsed, path30 = "") {
37242
- if (Array.isArray(original) && Array.isArray(parsed)) return original.flatMap((item, index) => findDroppedConstraintPaths(item, parsed[index], `${path30}[${index}]`));
37242
+ function findDroppedConstraintPaths(original, parsed, path31 = "") {
37243
+ if (Array.isArray(original) && Array.isArray(parsed)) return original.flatMap((item, index) => findDroppedConstraintPaths(item, parsed[index], `${path31}[${index}]`));
37243
37244
  if (!isJsonObject(original) || !isJsonObject(parsed)) return [];
37244
37245
  return Object.entries(original).flatMap(([key, value]) => {
37245
- const childPath = path30 ? `${path30}.${key}` : key;
37246
+ const childPath = path31 ? `${path31}.${key}` : key;
37246
37247
  if (!Object.prototype.hasOwnProperty.call(parsed, key)) return isAnnotationOnlyJsonSchemaKeyword(key) ? [] : [childPath];
37247
37248
  return findDroppedConstraintPaths(value, parsed[key], childPath);
37248
37249
  });
@@ -38534,7 +38535,7 @@ function normalizeRawShapeSchema(schema) {
38534
38535
  return schema;
38535
38536
  }
38536
38537
 
38537
- // node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs
38538
+ // ../../node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs
38538
38539
  var require_code$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
38539
38540
  Object.defineProperty(exports, "__esModule", { value: true });
38540
38541
  exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
@@ -41318,8 +41319,8 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41318
41319
  for (let i = 0; i < str.length; i++) if (str[i] === token) ind++;
41319
41320
  return ind;
41320
41321
  }
41321
- function removeDotSegments(path30) {
41322
- let input2 = path30;
41322
+ function removeDotSegments(path31) {
41323
+ let input2 = path31;
41323
41324
  const output2 = [];
41324
41325
  let nextSlash = -1;
41325
41326
  let len = 0;
@@ -41472,8 +41473,8 @@ var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41472
41473
  wsComponent.secure = void 0;
41473
41474
  }
41474
41475
  if (wsComponent.resourceName) {
41475
- const [path30, query] = wsComponent.resourceName.split("?");
41476
- wsComponent.path = path30 && path30 !== "/" ? path30 : void 0;
41476
+ const [path31, query] = wsComponent.resourceName.split("?");
41477
+ wsComponent.path = path31 && path31 !== "/" ? path31 : void 0;
41477
41478
  wsComponent.query = query;
41478
41479
  wsComponent.resourceName = void 0;
41479
41480
  }
@@ -45544,10 +45545,10 @@ var AjvJsonSchemaValidator = class {
45544
45545
  };
45545
45546
  var Ajv = import_ajv.Ajv;
45546
45547
 
45547
- // node_modules/@modelcontextprotocol/server/dist/shimsNode.mjs
45548
+ // ../../node_modules/@modelcontextprotocol/server/dist/shimsNode.mjs
45548
45549
  import process2 from "node:process";
45549
45550
 
45550
- // node_modules/@modelcontextprotocol/server/dist/mcp-Dw2OlZ1f.mjs
45551
+ // ../../node_modules/@modelcontextprotocol/server/dist/mcp-Dw2OlZ1f.mjs
45551
45552
  var COMPLETABLE_SYMBOL = /* @__PURE__ */ Symbol.for("mcp.completable");
45552
45553
  function isCompletable(schema) {
45553
45554
  return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema;
@@ -46923,10 +46924,10 @@ function unwrapOptionalSchema(schema) {
46923
46924
  return schema.def?.innerType ?? schema;
46924
46925
  }
46925
46926
 
46926
- // node_modules/@modelcontextprotocol/server/dist/index.mjs
46927
+ // ../../node_modules/@modelcontextprotocol/server/dist/index.mjs
46927
46928
  var DEFAULT_MAX_REQUEST_BODY_SIZE = 4 * 1024 * 1024;
46928
46929
 
46929
- // node_modules/@modelcontextprotocol/server/dist/stdio.mjs
46930
+ // ../../node_modules/@modelcontextprotocol/server/dist/stdio.mjs
46930
46931
  var swallowsErrorsAfterClose = /* @__PURE__ */ Symbol("swallowsErrorsAfterClose");
46931
46932
  var StdioServerTransport = class {
46932
46933
  _readBuffer;
@@ -47423,9 +47424,9 @@ function waitForMessage(socket, maxBytes, timeoutMs2, timeoutCode) {
47423
47424
  cleanup();
47424
47425
  reject(new RelayClientError(error62.code === "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH" ? "RELAY_FRAME_TOO_LARGE" : "RELAY_SOCKET_FAILED"));
47425
47426
  };
47426
- const onClose = () => {
47427
+ const onClose = (code, reason) => {
47427
47428
  cleanup();
47428
- reject(new RelayClientError("RELAY_SOCKET_CLOSED"));
47429
+ reject(new RelayClientError(code === 1008 && reason.toString("utf8") === "device_quarantined" ? "RELAY_DEVICE_QUARANTINED" : "RELAY_SOCKET_CLOSED"));
47429
47430
  };
47430
47431
  socket.once("message", onMessage);
47431
47432
  socket.once("error", onError);
@@ -47534,7 +47535,8 @@ async function connectOnce(options) {
47534
47535
  deviceId,
47535
47536
  guardIdentity: true,
47536
47537
  ...options.aiConnectivity ? { aiConnectivity: true } : {},
47537
- ...options.onHeldLeases ? { heldLeases: true } : {}
47538
+ ...options.onHeldLeases ? { heldLeases: true } : {},
47539
+ ...options.onFullLogChoice ? { fullLogNotice: true } : {}
47538
47540
  }, maxFrameBytes);
47539
47541
  const challenge = validateChallenge(await waitForMessage(socket, maxFrameBytes, connectTimeoutMs, "RELAY_HANDSHAKE_TIMEOUT"), protocolVersion2);
47540
47542
  const machine = challenge.machineIdentity ? options.machineIdentity?.(deviceId) ?? null : null;
@@ -47637,6 +47639,17 @@ async function connectOnce(options) {
47637
47639
  void (async () => {
47638
47640
  try {
47639
47641
  const frame = parseFrame(data, maxFrameBytes);
47642
+ if (frame.type === "fullLogState") {
47643
+ const state = FullLogStateSchema.safeParse(frame);
47644
+ if (state.success && state.data.connectionEpoch === connectionEpoch) {
47645
+ try {
47646
+ void Promise.resolve(options.onFullLogChoice?.(state.data.enabled)).catch(() => {
47647
+ });
47648
+ } catch {
47649
+ }
47650
+ }
47651
+ return;
47652
+ }
47640
47653
  if (frame.type === "aiConnectivityRevoked") {
47641
47654
  if (connectivity && frame.protocolVersion === 1 && frame.connectionEpoch === connectionEpoch) notifyConnectivityRevoked();
47642
47655
  return;
@@ -47985,8 +47998,8 @@ function canonicalOrigin2(value) {
47985
47998
  fail6("ORIGIN_INVALID");
47986
47999
  }
47987
48000
  }
47988
- function endpoint(origin, path30) {
47989
- return origin + path30;
48001
+ function endpoint(origin, path31) {
48002
+ return origin + path31;
47990
48003
  }
47991
48004
  function uuid21(value, code) {
47992
48005
  if (typeof value !== "string" || !UUID3.test(value)) fail6(code);
@@ -48953,12 +48966,12 @@ var ProductionMonitor = class {
48953
48966
  });
48954
48967
  return this.writing;
48955
48968
  }
48956
- async write(file2, contents) {
48957
- const directory = path23.dirname(file2);
48969
+ async write(file3, contents) {
48970
+ const directory = path23.dirname(file3);
48958
48971
  await mkdir9(directory, { recursive: true, mode: 448 });
48959
48972
  const stat2 = await lstat10(directory);
48960
48973
  if (!stat2.isDirectory() || stat2.isSymbolicLink()) throw Error("MONITOR_DIRECTORY_INVALID");
48961
- const temporary = file2 + "." + this.instanceId + ".tmp";
48974
+ const temporary = file3 + "." + this.instanceId + ".tmp";
48962
48975
  const handle = await open9(temporary, "wx", 384);
48963
48976
  try {
48964
48977
  try {
@@ -48966,7 +48979,7 @@ var ProductionMonitor = class {
48966
48979
  } finally {
48967
48980
  await handle.close();
48968
48981
  }
48969
- await rename6(temporary, file2);
48982
+ await rename6(temporary, file3);
48970
48983
  } finally {
48971
48984
  await rm8(temporary, { force: true });
48972
48985
  }
@@ -48978,6 +48991,108 @@ var ProductionMonitor = class {
48978
48991
  }
48979
48992
  };
48980
48993
 
48994
+ // agent/src/full-log-notice.ts
48995
+ import { execFile as execFile5 } from "node:child_process";
48996
+ import { randomUUID as randomUUID13 } from "node:crypto";
48997
+ import { lstat as lstat11, mkdir as mkdir10, readFile as readFile10, rename as rename7, rm as rm9, writeFile as writeFile4 } from "node:fs/promises";
48998
+ import path24 from "node:path";
48999
+ import { promisify as promisify3 } from "node:util";
49000
+ var exec3 = promisify3(execFile5);
49001
+ var manageUrl = "https://localcmd.app";
49002
+ var noticeDirectory = (directory) => path24.join(directory, "optimization");
49003
+ var file2 = (directory) => path24.join(noticeDirectory(directory), "full-log-notice.json");
49004
+ async function saved(directory, enrollment) {
49005
+ if (!enrollment) return null;
49006
+ try {
49007
+ const parent = await lstat11(noticeDirectory(directory));
49008
+ if (!parent.isDirectory() || parent.isSymbolicLink()) return null;
49009
+ const info = await lstat11(file2(directory));
49010
+ if (!info.isFile() || info.isSymbolicLink() || info.size > 4096) return null;
49011
+ const value = JSON.parse(await readFile10(file2(directory), "utf8"));
49012
+ if (value.tenantId !== enrollment.tenantId || value.deviceId !== enrollment.deviceId || !(value.enabled === null || typeof value.enabled === "boolean") || !(value.lastNotified === null || typeof value.lastNotified === "boolean") || !Number.isInteger(value.pid) || value.pid <= 0 || !Number.isFinite(Date.parse(value.confirmedAt))) return null;
49013
+ return value;
49014
+ } catch {
49015
+ return null;
49016
+ }
49017
+ }
49018
+ async function readFullLogNotice(directory, enrollment) {
49019
+ const value = await saved(directory, enrollment);
49020
+ let live = false;
49021
+ if (value) {
49022
+ try {
49023
+ const processRecord = JSON.parse(await readFile10(path24.join(directory, "agent-process.json"), "utf8"));
49024
+ if (processRecord.pid === value.pid && Date.parse(processRecord.startedAt) <= Date.parse(value.confirmedAt)) {
49025
+ process.kill(value.pid, 0);
49026
+ live = true;
49027
+ }
49028
+ } catch {
49029
+ }
49030
+ }
49031
+ return { enabled: live ? value.enabled : null, confirmedAt: value?.confirmedAt ?? null, manageUrl };
49032
+ }
49033
+ async function showFullLogNotice(enabled) {
49034
+ const title = "Local Commander: full logs " + (enabled ? "enabled" : "disabled");
49035
+ const body = enabled ? "Your account owner enabled full logs for this computer. Tool requests and responses may be stored for up to 7 days. Review the choice at localcmd.app." : "Your account owner disabled full logs for this computer. Review the choice and deletion status at localcmd.app.";
49036
+ const options = { windowsHide: true, timeout: 12e3, maxBuffer: 4096 };
49037
+ if (process.platform === "win32") {
49038
+ const script = `Add-Type -AssemblyName System.Windows.Forms; Add-Type -AssemblyName System.Drawing; $notice=New-Object System.Windows.Forms.NotifyIcon; try { $notice.Icon=[System.Drawing.SystemIcons]::Information; $notice.Visible=$true; $notice.ShowBalloonTip(8000,'${title}','${body}',[System.Windows.Forms.ToolTipIcon]::Info); Start-Sleep -Seconds 8 } finally { $notice.Dispose() }`;
49039
+ await exec3("powershell.exe", ["-NoLogo", "-NoProfile", "-NonInteractive", "-Command", script], options);
49040
+ } else if (process.platform === "darwin") {
49041
+ await exec3("/usr/bin/osascript", ["-e", `display notification "${body}" with title "${title}"`], options);
49042
+ } else if (process.platform === "linux") {
49043
+ await exec3("notify-send", ["--app-name=Local Commander", title, body], options);
49044
+ }
49045
+ }
49046
+ var FullLogNotice = class {
49047
+ constructor(directory, enrollment, notify = showFullLogNotice) {
49048
+ this.directory = directory;
49049
+ this.enrollment = enrollment;
49050
+ this.notify = notify;
49051
+ }
49052
+ directory;
49053
+ enrollment;
49054
+ notify;
49055
+ pending;
49056
+ writing;
49057
+ update(enabled) {
49058
+ this.pending = enabled;
49059
+ return this.writing ??= this.drain().finally(() => {
49060
+ this.writing = void 0;
49061
+ });
49062
+ }
49063
+ async drain() {
49064
+ await mkdir10(noticeDirectory(this.directory), { mode: 448 }).catch((error62) => {
49065
+ if (error62.code !== "EEXIST") throw error62;
49066
+ });
49067
+ const parent = await lstat11(noticeDirectory(this.directory));
49068
+ if (!parent.isDirectory() || parent.isSymbolicLink()) throw Error("FULL_LOG_NOTICE_DIRECTORY_INVALID");
49069
+ let previous = await saved(this.directory, this.enrollment);
49070
+ while (this.pending !== void 0) {
49071
+ const enabled = this.pending;
49072
+ this.pending = void 0;
49073
+ const changed = enabled !== null && enabled !== previous?.lastNotified && (enabled || previous?.lastNotified === true);
49074
+ const next = {
49075
+ ...this.enrollment,
49076
+ enabled,
49077
+ lastNotified: changed ? enabled : previous?.lastNotified ?? null,
49078
+ confirmedAt: (/* @__PURE__ */ new Date()).toISOString(),
49079
+ pid: process.pid
49080
+ };
49081
+ const temporary = file2(this.directory) + "." + randomUUID13() + ".tmp";
49082
+ try {
49083
+ await writeFile4(temporary, JSON.stringify(next) + "\n", { flag: "wx", mode: 384 });
49084
+ await rename7(temporary, file2(this.directory));
49085
+ } finally {
49086
+ await rm9(temporary, { force: true }).catch(() => {
49087
+ });
49088
+ }
49089
+ previous = next;
49090
+ if (changed) void this.notify(enabled).catch(() => {
49091
+ });
49092
+ }
49093
+ }
49094
+ };
49095
+
48981
49096
  // agent/src/native-event-buffer.ts
48982
49097
  import { createHash as createHash18 } from "node:crypto";
48983
49098
  function nativeFingerprint(code, executionId = "") {
@@ -49379,27 +49494,27 @@ var NativeFabricObserver = class {
49379
49494
  };
49380
49495
 
49381
49496
  // agent/src/native-fabric-startup.ts
49382
- import { lstat as lstat12, mkdir as mkdir12, open as open11, readFile as readFile10 } from "node:fs/promises";
49383
- import path26 from "node:path";
49497
+ import { lstat as lstat13, mkdir as mkdir13, open as open11, readFile as readFile11 } from "node:fs/promises";
49498
+ import path27 from "node:path";
49384
49499
 
49385
49500
  // src/agent-fabric-service.ts
49386
- import { lstat as lstat11, mkdir as mkdir11, realpath as realpath9 } from "node:fs/promises";
49501
+ import { lstat as lstat12, mkdir as mkdir12, realpath as realpath9 } from "node:fs/promises";
49387
49502
  import { watch } from "node:fs";
49388
- import path25 from "node:path";
49503
+ import path26 from "node:path";
49389
49504
 
49390
49505
  // src/agent-runtime-identity.ts
49391
- import { createHash as createHash19, randomBytes as randomBytes8, randomUUID as randomUUID14, timingSafeEqual as timingSafeEqual4 } from "node:crypto";
49506
+ import { createHash as createHash19, randomBytes as randomBytes8, randomUUID as randomUUID15, timingSafeEqual as timingSafeEqual4 } from "node:crypto";
49392
49507
 
49393
49508
  // src/agent-fabric-state.ts
49394
- import { randomUUID as randomUUID13 } from "node:crypto";
49395
- import { mkdir as mkdir10, open as open10, rename as rename7, unlink as unlink3 } from "node:fs/promises";
49396
- import path24 from "node:path";
49509
+ import { randomUUID as randomUUID14 } from "node:crypto";
49510
+ import { mkdir as mkdir11, open as open10, rename as rename8, unlink as unlink3 } from "node:fs/promises";
49511
+ import path25 from "node:path";
49397
49512
  var queues = /* @__PURE__ */ new Map();
49398
49513
  var FabricStateFile = class {
49399
- constructor(file2, maxBytes, parse4) {
49514
+ constructor(file3, maxBytes, parse4) {
49400
49515
  this.maxBytes = maxBytes;
49401
49516
  this.parse = parse4;
49402
- this.file = path24.resolve(file2);
49517
+ this.file = path25.resolve(file3);
49403
49518
  }
49404
49519
  maxBytes;
49405
49520
  parse;
@@ -49443,9 +49558,9 @@ var FabricStateFile = class {
49443
49558
  }
49444
49559
  update(fn, create) {
49445
49560
  return this.serial(async () => {
49446
- if (create) await mkdir10(path24.dirname(this.file), { recursive: true });
49561
+ if (create) await mkdir11(path25.dirname(this.file), { recursive: true });
49447
49562
  const lockPath = this.file + ".lock";
49448
- const token = randomUUID13();
49563
+ const token = randomUUID14();
49449
49564
  const lock = await open10(lockPath, "wx", 384).catch((error62) => {
49450
49565
  if (error62.code === "EEXIST") throw Error("FABRIC_STATE_BUSY");
49451
49566
  throw error62;
@@ -49472,7 +49587,7 @@ var FabricStateFile = class {
49472
49587
  } finally {
49473
49588
  await handle.close();
49474
49589
  }
49475
- await rename7(temporary, this.file);
49590
+ await rename8(temporary, this.file);
49476
49591
  } finally {
49477
49592
  await unlink3(temporary).catch((error62) => {
49478
49593
  if (error62.code !== "ENOENT") throw error62;
@@ -49520,9 +49635,9 @@ function validKey(value) {
49520
49635
  return typeof value === "string" && /^[A-Za-z0-9_-]{43}$/.test(value);
49521
49636
  }
49522
49637
  var AgentRuntimeIdentityStore = class {
49523
- constructor(file2, now = Date.now) {
49638
+ constructor(file3, now = Date.now) {
49524
49639
  this.now = now;
49525
- this.state = new FabricStateFile(file2, MAX_BYTES, (value) => {
49640
+ this.state = new FabricStateFile(file3, MAX_BYTES, (value) => {
49526
49641
  const state = StateSchema.parse(value);
49527
49642
  if (new Set(state.bindings.map((item) => item.runtimeId)).size !== state.bindings.length)
49528
49643
  throw Error("RUNTIME_IDENTITY_STATE_CORRUPT");
@@ -49541,7 +49656,7 @@ var AgentRuntimeIdentityStore = class {
49541
49656
  issue() {
49542
49657
  return this.serial((state) => {
49543
49658
  if (state.bindings.length >= MAX_BINDINGS) throw Error("RUNTIME_IDENTITY_LIMIT");
49544
- const runtimeId = "rt-" + randomUUID14();
49659
+ const runtimeId = "rt-" + randomUUID15();
49545
49660
  const runtimeKey = randomBytes8(32).toString("base64url");
49546
49661
  const now = this.now();
49547
49662
  state.bindings.push({ runtimeId, keyHash: encodedDigest(runtimeKey), createdAt: now, lastUsedAt: now, revoked: false });
@@ -49574,10 +49689,10 @@ var AgentRuntimeIdentityStore = class {
49574
49689
  };
49575
49690
 
49576
49691
  // src/agent-fabric-mailbox.ts
49577
- import { randomUUID as randomUUID16 } from "node:crypto";
49692
+ import { randomUUID as randomUUID17 } from "node:crypto";
49578
49693
 
49579
49694
  // src/agent-fabric-timeline.ts
49580
- import { randomUUID as randomUUID15 } from "node:crypto";
49695
+ import { randomUUID as randomUUID16 } from "node:crypto";
49581
49696
  import { performance as performance2 } from "node:perf_hooks";
49582
49697
  var FabricId = external_exports.string().regex(/^[A-Za-z0-9][A-Za-z0-9_.:-]{0,95}$/);
49583
49698
  var FabricUtc = external_exports.string().datetime({ precision: 3 }).refine((value) => new Date(value).toISOString() === value);
@@ -49586,7 +49701,7 @@ var FabricStampSchema = external_exports.strictObject({
49586
49701
  clockId: FabricId,
49587
49702
  monotonicMs: external_exports.number().finite().nonnegative().max(Number.MAX_SAFE_INTEGER)
49588
49703
  });
49589
- var processClockId = "clock-" + randomUUID15();
49704
+ var processClockId = "clock-" + randomUUID16();
49590
49705
  function createFabricClock() {
49591
49706
  return () => ({ atUtc: (/* @__PURE__ */ new Date()).toISOString(), clockId: processClockId, monotonicMs: performance2.now() });
49592
49707
  }
@@ -49772,12 +49887,12 @@ function parseState(value) {
49772
49887
  return state;
49773
49888
  }
49774
49889
  var AgentWorkerMailbox = class {
49775
- constructor(file2, controllerId, identities, clock = createFabricClock(), notify) {
49890
+ constructor(file3, controllerId, identities, clock = createFabricClock(), notify) {
49776
49891
  this.identities = identities;
49777
49892
  this.clock = clock;
49778
49893
  this.notify = notify;
49779
49894
  this.controllerId = FabricId.parse(controllerId);
49780
- this.state = new FabricStateFile(file2, 2 * 1024 * 1024, (value) => {
49895
+ this.state = new FabricStateFile(file3, 2 * 1024 * 1024, (value) => {
49781
49896
  const state = parseState(value);
49782
49897
  if (state.controllerId !== this.controllerId) throw Error("FABRIC_CONTROLLER_MISMATCH");
49783
49898
  return state;
@@ -49843,7 +49958,7 @@ var AgentWorkerMailbox = class {
49843
49958
  const now = this.clock().atUtc;
49844
49959
  const worker = {
49845
49960
  ...registration,
49846
- workerId: randomUUID16(),
49961
+ workerId: randomUUID17(),
49847
49962
  controllerId: this.controllerId,
49848
49963
  runtimeId: null,
49849
49964
  attribution: WorkerAttributionSchema.parse({}),
@@ -49877,7 +49992,7 @@ var AgentWorkerMailbox = class {
49877
49992
  if (state.messages.length >= MAX_MESSAGES) throw Error("FABRIC_MESSAGE_LIMIT");
49878
49993
  const now = this.clock();
49879
49994
  const message2 = {
49880
- messageId: randomUUID16(),
49995
+ messageId: randomUUID17(),
49881
49996
  key: request.key,
49882
49997
  assignmentId: assignment.assignmentId,
49883
49998
  direction,
@@ -49894,7 +50009,7 @@ var AgentWorkerMailbox = class {
49894
50009
  }
49895
50010
  async assign(input2) {
49896
50011
  const request = AssignmentInput.parse(input2);
49897
- const saved = await this.state.update((state) => {
50012
+ const saved2 = await this.state.update((state) => {
49898
50013
  this.worker(state, request.workerId);
49899
50014
  const existing = state.assignments.find((a) => a.runId === request.runId && a.selectedRuntime === request.selectedRuntime);
49900
50015
  if (existing) {
@@ -49907,7 +50022,7 @@ var AgentWorkerMailbox = class {
49907
50022
  const now = this.clock().atUtc;
49908
50023
  const assignment = {
49909
50024
  ...request,
49910
- assignmentId: randomUUID16(),
50025
+ assignmentId: randomUUID17(),
49911
50026
  phase: "assigned",
49912
50027
  createdAt: now,
49913
50028
  updatedAt: now,
@@ -49922,30 +50037,30 @@ var AgentWorkerMailbox = class {
49922
50037
  const { message: message2 } = this.append(state, assignment, "ASSIGN", "controller", { key: "assign", payloadRef: request.payloadRef });
49923
50038
  return { state, assignment, notice: message2 };
49924
50039
  });
49925
- if (saved.notice) this.emit(saved.state, saved.notice);
49926
- return saved.assignment;
50040
+ if (saved2.notice) this.emit(saved2.state, saved2.notice);
50041
+ return saved2.assignment;
49927
50042
  }
49928
50043
  async control(assignmentId, kind, input2) {
49929
50044
  Control.parse(kind);
49930
- const saved = await this.state.update((state) => {
50045
+ const saved2 = await this.state.update((state) => {
49931
50046
  const assignment = this.assignment(state, assignmentId);
49932
50047
  if (!assignmentActive(assignment)) throw Error("FABRIC_ASSIGNMENT_INACTIVE");
49933
50048
  return { state, ...this.append(state, assignment, kind, "controller", input2) };
49934
50049
  });
49935
- if (saved.added) this.emit(saved.state, saved.message);
49936
- return saved.message;
50050
+ if (saved2.added) this.emit(saved2.state, saved2.message);
50051
+ return saved2.message;
49937
50052
  }
49938
50053
  async report(workerId, credential, assignmentId, kind, input2) {
49939
50054
  Report.parse(kind);
49940
50055
  await this.identities.authenticate(credential.runtimeId, credential.runtimeKey);
49941
- const saved = await this.state.update((state) => {
50056
+ const saved2 = await this.state.update((state) => {
49942
50057
  this.bound(state, workerId, credential);
49943
50058
  const assignment = this.assignment(state, assignmentId);
49944
50059
  if (assignment.workerId !== workerId || assignment.phase === "not_started") throw Error("FABRIC_ASSIGNMENT_DENIED");
49945
50060
  return { state, ...this.append(state, assignment, kind, "worker", input2) };
49946
50061
  });
49947
- if (saved.added) this.emit(saved.state, saved.message);
49948
- return saved.message;
50062
+ if (saved2.added) this.emit(saved2.state, saved2.message);
50063
+ return saved2.message;
49949
50064
  }
49950
50065
  pending(state, direction, workerId) {
49951
50066
  const now = this.clock().atUtc;
@@ -49985,12 +50100,12 @@ var AgentWorkerMailbox = class {
49985
50100
  return this.state.update((state) => this.acknowledge(state, messageId, "to_controller"));
49986
50101
  }
49987
50102
  async adapterResult(assignmentId, payloadRef) {
49988
- const saved = await this.state.update((state) => {
50103
+ const saved2 = await this.state.update((state) => {
49989
50104
  const assignment = this.assignment(state, assignmentId);
49990
50105
  if (assignment.phase !== "exited") throw Error("FABRIC_RESULT_UNCONFIRMED");
49991
50106
  return { state, ...this.append(state, assignment, "RESULT", "adapter", { key: "result", payloadRef }) };
49992
50107
  });
49993
- if (saved.added) this.emit(saved.state, saved.message);
50108
+ if (saved2.added) this.emit(saved2.state, saved2.message);
49994
50109
  }
49995
50110
  claimLaunch(assignmentId) {
49996
50111
  return this.state.update((state) => {
@@ -50087,9 +50202,9 @@ var WorkerRequest = external_exports.discriminatedUnion("operation", [
50087
50202
  var AgentFabricService = class _AgentFabricService {
50088
50203
  constructor(directory, controllerId) {
50089
50204
  this.directory = directory;
50090
- this.identities = new AgentRuntimeIdentityStore(path25.join(directory, "identities.json"));
50205
+ this.identities = new AgentRuntimeIdentityStore(path26.join(directory, "identities.json"));
50091
50206
  this.mailbox = new AgentWorkerMailbox(
50092
- path25.join(directory, "mailbox.json"),
50207
+ path26.join(directory, "mailbox.json"),
50093
50208
  controllerId,
50094
50209
  this.identities,
50095
50210
  void 0,
@@ -50104,29 +50219,29 @@ var AgentFabricService = class _AgentFabricService {
50104
50219
  closed = false;
50105
50220
  static async open(directory, controllerId, device = null, initialize = true) {
50106
50221
  const expected = Binding.parse({ version: 1, controllerId, device, initialized: false });
50107
- const absolute2 = path25.resolve(directory);
50108
- for (let current2 = absolute2; ; current2 = path25.dirname(current2)) {
50222
+ const absolute2 = path26.resolve(directory);
50223
+ for (let current2 = absolute2; ; current2 = path26.dirname(current2)) {
50109
50224
  try {
50110
- if ((await lstat11(current2)).isSymbolicLink()) throw Error("FABRIC_DIRECTORY_INVALID");
50225
+ if ((await lstat12(current2)).isSymbolicLink()) throw Error("FABRIC_DIRECTORY_INVALID");
50111
50226
  } catch (error62) {
50112
50227
  if (error62.code !== "ENOENT") throw error62;
50113
50228
  }
50114
- if (path25.dirname(current2) === current2) break;
50229
+ if (path26.dirname(current2) === current2) break;
50115
50230
  }
50116
- if (initialize) await mkdir11(absolute2, { recursive: true, mode: 448 });
50117
- if (!(await lstat11(absolute2)).isDirectory() || (await realpath9(absolute2)).toLowerCase() !== absolute2.toLowerCase())
50231
+ if (initialize) await mkdir12(absolute2, { recursive: true, mode: 448 });
50232
+ if (!(await lstat12(absolute2)).isDirectory() || (await realpath9(absolute2)).toLowerCase() !== absolute2.toLowerCase())
50118
50233
  throw Error("FABRIC_DIRECTORY_INVALID");
50119
50234
  const present = /* @__PURE__ */ new Set();
50120
50235
  for (const name2 of ["binding.json", "mailbox.json", "identities.json"]) {
50121
- const file2 = await lstat11(path25.join(absolute2, name2)).catch((error62) => {
50236
+ const file3 = await lstat12(path26.join(absolute2, name2)).catch((error62) => {
50122
50237
  if (error62.code === "ENOENT") return null;
50123
50238
  throw error62;
50124
50239
  });
50125
- if (file2 && (!file2.isFile() || file2.isSymbolicLink())) throw Error("FABRIC_FILE_INVALID");
50126
- if (file2) present.add(name2);
50240
+ if (file3 && (!file3.isFile() || file3.isSymbolicLink())) throw Error("FABRIC_FILE_INVALID");
50241
+ if (file3) present.add(name2);
50127
50242
  }
50128
50243
  if (!present.has("binding.json") && present.size) throw Error("FABRIC_BINDING_MISSING");
50129
- const binding2 = new FabricStateFile(path25.join(absolute2, "binding.json"), 2048, (value) => Binding.parse(value));
50244
+ const binding2 = new FabricStateFile(path26.join(absolute2, "binding.json"), 2048, (value) => Binding.parse(value));
50130
50245
  const service2 = new _AgentFabricService(absolute2, controllerId);
50131
50246
  await binding2.update(async (state) => {
50132
50247
  if (state.controllerId !== expected.controllerId || JSON.stringify(state.device) !== JSON.stringify(expected.device))
@@ -50141,7 +50256,7 @@ var AgentFabricService = class _AgentFabricService {
50141
50256
  state.initialized = true;
50142
50257
  }
50143
50258
  const snapshot2 = await service2.mailbox.snapshot();
50144
- if (snapshot2.workers.some((worker) => worker.runtimeId !== null)) await lstat11(path25.join(absolute2, "identities.json"));
50259
+ if (snapshot2.workers.some((worker) => worker.runtimeId !== null)) await lstat12(path26.join(absolute2, "identities.json"));
50145
50260
  }, initialize ? () => expected : void 0);
50146
50261
  return service2;
50147
50262
  }
@@ -50158,8 +50273,8 @@ var AgentFabricService = class _AgentFabricService {
50158
50273
  this.listeners.add(callback);
50159
50274
  try {
50160
50275
  if (!this.watcher) {
50161
- this.watcher = watch(this.directory, { persistent: false }, (_event, file2) => {
50162
- if (file2?.toString().toLowerCase() === "mailbox.json") this.changed();
50276
+ this.watcher = watch(this.directory, { persistent: false }, (_event, file3) => {
50277
+ if (file3?.toString().toLowerCase() === "mailbox.json") this.changed();
50163
50278
  });
50164
50279
  this.watcher.on("error", () => {
50165
50280
  this.watcher?.close();
@@ -50228,48 +50343,48 @@ var Delivery = external_exports.strictObject({ capability: external_exports.stri
50228
50343
  async function openNativeFabric(stateDirectory, enrollment, box, initialize = true) {
50229
50344
  const controllerId = "device-" + external_exports.string().uuid().parse(enrollment.deviceId).toLowerCase();
50230
50345
  const tenantId = external_exports.string().uuid().parse(enrollment.tenantId).toLowerCase();
50231
- const parent = path26.join(stateDirectory, ".local-commander"), marker = path26.join(parent, "fabric-established.json");
50346
+ const parent = path27.join(stateDirectory, ".local-commander"), marker = path27.join(parent, "fabric-established.json");
50232
50347
  try {
50233
- await mkdir12(parent, { mode: 448 });
50348
+ await mkdir13(parent, { mode: 448 });
50234
50349
  } catch (error62) {
50235
50350
  if (error62.code !== "EEXIST") throw error62;
50236
50351
  }
50237
- const parentInfo = await lstat12(parent);
50352
+ const parentInfo = await lstat13(parent);
50238
50353
  if (!parentInfo.isDirectory() || parentInfo.isSymbolicLink()) throw Error("FABRIC_DIRECTORY_INVALID");
50239
50354
  const expected = JSON.stringify({ version: 1, controllerId, tenantId });
50240
50355
  let fresh = false;
50241
50356
  try {
50242
- const info = await lstat12(marker);
50243
- if (!info.isFile() || info.isSymbolicLink() || info.size > 2048 || await readFile10(marker, "utf8") !== expected)
50357
+ const info = await lstat13(marker);
50358
+ if (!info.isFile() || info.isSymbolicLink() || info.size > 2048 || await readFile11(marker, "utf8") !== expected)
50244
50359
  throw Error("FABRIC_BINDING_CHANGED");
50245
50360
  } catch (error62) {
50246
50361
  if (error62.code !== "ENOENT" || !initialize) throw error62;
50247
- const file2 = await open11(marker, "wx", 384);
50362
+ const file3 = await open11(marker, "wx", 384);
50248
50363
  try {
50249
- await file2.writeFile(expected);
50250
- await file2.datasync();
50364
+ await file3.writeFile(expected);
50365
+ await file3.datasync();
50251
50366
  } finally {
50252
- await file2.close();
50367
+ await file3.close();
50253
50368
  }
50254
50369
  fresh = true;
50255
50370
  }
50256
50371
  const service2 = await AgentFabricService.open(
50257
- path26.join(stateDirectory, ".local-commander", "fabric"),
50372
+ path27.join(stateDirectory, ".local-commander", "fabric"),
50258
50373
  controllerId,
50259
50374
  { deviceId: enrollment.deviceId.toLowerCase(), enrollmentEvidenceRef: "enrollment-" + tenantId },
50260
50375
  fresh
50261
50376
  );
50262
50377
  const purpose = "native-fabric:" + tenantId + ":" + controllerId;
50263
- const credentialFile = (workerId) => path26.join(service2.directory, external_exports.string().uuid().parse(workerId) + ".capability");
50378
+ const credentialFile = (workerId) => path27.join(service2.directory, external_exports.string().uuid().parse(workerId) + ".capability");
50264
50379
  const decode4 = (value) => {
50265
50380
  const credential = Credential.parse(JSON.parse(box.open(Buffer.from(value, "base64"), purpose).toString("utf8")));
50266
50381
  if (credential.controllerId !== controllerId) throw Error("FABRIC_WORKER_DENIED");
50267
50382
  return credential;
50268
50383
  };
50269
50384
  async function capability(workerId) {
50270
- const file2 = credentialFile(workerId), info = await lstat12(file2);
50385
+ const file3 = credentialFile(workerId), info = await lstat13(file3);
50271
50386
  if (!info.isFile() || info.isSymbolicLink() || info.size > 4096) throw Error("FABRIC_CREDENTIAL_UNKNOWN");
50272
- const encoded = await readFile10(file2, "utf8");
50387
+ const encoded = await readFile11(file3, "utf8");
50273
50388
  if (decode4(encoded).workerId !== workerId) throw Error("FABRIC_WORKER_DENIED");
50274
50389
  return encoded;
50275
50390
  }
@@ -50302,12 +50417,12 @@ async function openNativeFabric(stateDirectory, enrollment, box, initialize = tr
50302
50417
  } else {
50303
50418
  const credential = await service2.identities.issue();
50304
50419
  const encoded = box.seal(Buffer.from(JSON.stringify({ ...credential, workerId: worker.workerId, controllerId })), purpose).toString("base64");
50305
- const file2 = await open11(credentialFile(worker.workerId), "wx", 384);
50420
+ const file3 = await open11(credentialFile(worker.workerId), "wx", 384);
50306
50421
  try {
50307
- await file2.writeFile(encoded);
50308
- await file2.datasync();
50422
+ await file3.writeFile(encoded);
50423
+ await file3.datasync();
50309
50424
  } finally {
50310
- await file2.close();
50425
+ await file3.close();
50311
50426
  }
50312
50427
  await service2.mailbox.bindRuntime(worker.workerId, credential);
50313
50428
  }
@@ -50361,7 +50476,7 @@ async function readFabricRequest(input2 = process.stdin) {
50361
50476
 
50362
50477
  // agent/src/supervisor-liveness.ts
50363
50478
  import { spawn as spawn6 } from "node:child_process";
50364
- import path27 from "node:path";
50479
+ import path28 from "node:path";
50365
50480
  import { setTimeout as delay3 } from "node:timers/promises";
50366
50481
  var ROW = /^"([^"]+)","(\d{1,10})"/;
50367
50482
  function parseTasklist(output2, image) {
@@ -50376,7 +50491,7 @@ function parseTasklist(output2, image) {
50376
50491
  }
50377
50492
  function listProcesses(image, timeoutMs2 = 5e3) {
50378
50493
  if (process.platform !== "win32" || !/^[A-Za-z0-9._-]{1,64}\.exe$/i.test(image)) return Promise.resolve(null);
50379
- const tasklist = path27.join(process.env.SystemRoot || "C:\\Windows", "System32", "tasklist.exe");
50494
+ const tasklist = path28.join(process.env.SystemRoot || "C:\\Windows", "System32", "tasklist.exe");
50380
50495
  return new Promise((resolve) => {
50381
50496
  let output2 = "", settled = false;
50382
50497
  const finish = (value) => {
@@ -50405,8 +50520,8 @@ function listProcesses(image, timeoutMs2 = 5e3) {
50405
50520
  }
50406
50521
  function supervisorLiveness(helperPath, options = {}) {
50407
50522
  if (process.platform === "linux" && !options.list) return linuxSupervisorLiveness;
50408
- if (process.platform === "darwin" && !options.list) return (pids, _linux, darwin) => darwinSupervisorLiveness(path27.join(path27.dirname(helperPath), "posix-host"), pids, darwin);
50409
- const image = path27.basename(helperPath), waitMs = options.waitMs ?? 1e4, pollMs = options.pollMs ?? 500, list = options.list ?? listProcesses;
50523
+ if (process.platform === "darwin" && !options.list) return (pids, _linux, darwin) => darwinSupervisorLiveness(path28.join(path28.dirname(helperPath), "posix-host"), pids, darwin);
50524
+ const image = path28.basename(helperPath), waitMs = options.waitMs ?? 1e4, pollMs = options.pollMs ?? 500, list = options.list ?? listProcesses;
50410
50525
  return async (pids) => {
50411
50526
  const deadline = Date.now() + waitMs;
50412
50527
  for (; ; ) {
@@ -50421,17 +50536,17 @@ function supervisorLiveness(helperPath, options = {}) {
50421
50536
 
50422
50537
  // agent/src/content-audit.ts
50423
50538
  import { createReadStream } from "node:fs";
50424
- import { appendFile, lstat as lstat13, mkdir as mkdir13, open as open12, readdir as readdir6, readFile as readFile11, rename as rename8, rm as rm9, writeFile as writeFile4 } from "node:fs/promises";
50425
- import path28 from "node:path";
50539
+ import { appendFile, lstat as lstat14, mkdir as mkdir14, open as open12, readdir as readdir6, readFile as readFile12, rename as rename9, rm as rm10, writeFile as writeFile5 } from "node:fs/promises";
50540
+ import path29 from "node:path";
50426
50541
  import { performance as performance3 } from "node:perf_hooks";
50427
50542
  import { createInterface as createInterface2 } from "node:readline";
50428
50543
  import { randomBytes as randomBytes10 } from "node:crypto";
50429
50544
 
50430
50545
  // src/audit-crypto.ts
50431
50546
  import { createCipheriv as createCipheriv3, createDecipheriv as createDecipheriv3, createHash as createHash20, randomBytes as randomBytes9 } from "node:crypto";
50432
- import { promisify as promisify3 } from "node:util";
50547
+ import { promisify as promisify4 } from "node:util";
50433
50548
  import { gunzipSync, gzip, gzipSync } from "node:zlib";
50434
- var gzipAsync = promisify3(gzip);
50549
+ var gzipAsync = promisify4(gzip);
50435
50550
  var AUDIT_ENCRYPTION_ALGORITHM = "A256GCM";
50436
50551
  var AUDIT_COMPRESSION = "gzip";
50437
50552
  var AUDIT_RECOVERY_KEY_PREFIX = "lca1_";
@@ -50591,11 +50706,11 @@ var FILE = /^(full|metrics)-(\d{4}-\d{2}-\d{2})\.jsonl$/;
50591
50706
  var PAUSED_FILE = "paused.json";
50592
50707
  var DAY_MS = 864e5;
50593
50708
  function contentAuditDirectory(stateDir) {
50594
- return path28.join(path28.dirname(path28.resolve(stateDir)), "Audit");
50709
+ return path29.join(path29.dirname(path29.resolve(stateDir)), "Audit");
50595
50710
  }
50596
50711
  async function plainDirectory(dir) {
50597
- await mkdir13(dir, { recursive: true, mode: 448 });
50598
- const info = await lstat13(dir);
50712
+ await mkdir14(dir, { recursive: true, mode: 448 });
50713
+ const info = await lstat14(dir);
50599
50714
  if (info.isSymbolicLink() || !info.isDirectory()) throw Error("AUDIT_DIRECTORY_INVALID");
50600
50715
  }
50601
50716
  async function auditFiles(dir) {
@@ -50610,18 +50725,18 @@ async function auditFiles(dir) {
50610
50725
  for (const name2 of names) {
50611
50726
  const match = FILE.exec(name2);
50612
50727
  if (!match) continue;
50613
- const info = await lstat13(path28.join(dir, name2));
50728
+ const info = await lstat14(path29.join(dir, name2));
50614
50729
  if (info.isFile()) files.push({ name: name2, kind: match[1], day: match[2], bytes: info.size });
50615
50730
  }
50616
50731
  return files.sort((a, b) => a.name.localeCompare(b.name));
50617
50732
  }
50618
- async function writeJsonAtomic(file2, value) {
50619
- const temp = `${file2}.${randomBytes10(6).toString("hex")}.tmp`;
50733
+ async function writeJsonAtomic(file3, value) {
50734
+ const temp = `${file3}.${randomBytes10(6).toString("hex")}.tmp`;
50620
50735
  try {
50621
- await writeFile4(temp, JSON.stringify(value) + "\n", { flag: "wx", mode: 384 });
50622
- await rename8(temp, file2);
50736
+ await writeFile5(temp, JSON.stringify(value) + "\n", { flag: "wx", mode: 384 });
50737
+ await rename9(temp, file3);
50623
50738
  } finally {
50624
- await rm9(temp, { force: true }).catch(() => {
50739
+ await rm10(temp, { force: true }).catch(() => {
50625
50740
  });
50626
50741
  }
50627
50742
  }
@@ -50648,7 +50763,7 @@ var ContentAudit = class _ContentAudit {
50648
50763
  skipped = 0;
50649
50764
  closed = false;
50650
50765
  static async open(options) {
50651
- const dir = path28.resolve(options.directory);
50766
+ const dir = path29.resolve(options.directory);
50652
50767
  await plainDirectory(dir);
50653
50768
  const audit = new _ContentAudit(
50654
50769
  dir,
@@ -50657,7 +50772,7 @@ var ContentAudit = class _ContentAudit {
50657
50772
  { retentionDays: options.retentionDays ?? AUDIT_RETENTION_DAYS, maxBytes: options.maxBytes ?? AUDIT_MAX_BYTES },
50658
50773
  options.now ?? (() => /* @__PURE__ */ new Date())
50659
50774
  );
50660
- await rm9(path28.join(dir, PAUSED_FILE), { force: true });
50775
+ await rm10(path29.join(dir, PAUSED_FILE), { force: true });
50661
50776
  await audit.rollover(audit.now());
50662
50777
  if (audit.usedBytes >= audit.limits.maxBytes) await audit.pause("QUOTA_EXCEEDED");
50663
50778
  return audit;
@@ -50727,8 +50842,8 @@ var ContentAudit = class _ContentAudit {
50727
50842
  await this.pause("QUOTA_EXCEEDED");
50728
50843
  return;
50729
50844
  }
50730
- await appendFile(path28.join(this.dir, `full-${day}.jsonl`), line, { mode: 384 });
50731
- await appendFile(path28.join(this.dir, `metrics-${day}.jsonl`), metrics, { mode: 384 });
50845
+ await appendFile(path29.join(this.dir, `full-${day}.jsonl`), line, { mode: 384 });
50846
+ await appendFile(path29.join(this.dir, `metrics-${day}.jsonl`), metrics, { mode: 384 });
50732
50847
  this.usedBytes += bytes3;
50733
50848
  }
50734
50849
  /** Daily retention runs on the first write of a new day; no timer or background scan. */
@@ -50736,16 +50851,16 @@ var ContentAudit = class _ContentAudit {
50736
50851
  this.day = at.toISOString().slice(0, 10);
50737
50852
  const cutoff = new Date(at.getTime() - this.limits.retentionDays * DAY_MS).toISOString().slice(0, 10);
50738
50853
  let used = 0;
50739
- for (const file2 of await auditFiles(this.dir)) {
50740
- if (file2.day <= cutoff) await rm9(path28.join(this.dir, file2.name), { force: true });
50741
- else used += file2.bytes;
50854
+ for (const file3 of await auditFiles(this.dir)) {
50855
+ if (file3.day <= cutoff) await rm10(path29.join(this.dir, file3.name), { force: true });
50856
+ else used += file3.bytes;
50742
50857
  }
50743
50858
  this.usedBytes = used;
50744
50859
  }
50745
50860
  async pause(reason) {
50746
50861
  if (this.paused) return;
50747
50862
  this.paused = reason;
50748
- await writeJsonAtomic(path28.join(this.dir, PAUSED_FILE), { reason, at: this.now().toISOString() });
50863
+ await writeJsonAtomic(path29.join(this.dir, PAUSED_FILE), { reason, at: this.now().toISOString() });
50749
50864
  }
50750
50865
  };
50751
50866
  function percentiles(values) {
@@ -50754,8 +50869,8 @@ function percentiles(values) {
50754
50869
  const at = (fraction) => sorted[Math.min(sorted.length - 1, Math.ceil(fraction * sorted.length) - 1)];
50755
50870
  return { p50: at(0.5), p95: at(0.95), max: sorted[sorted.length - 1] };
50756
50871
  }
50757
- async function* jsonLines(file2) {
50758
- const lines = createInterface2({ input: createReadStream(file2, { encoding: "utf8" }), crlfDelay: Infinity });
50872
+ async function* jsonLines(file3) {
50873
+ const lines = createInterface2({ input: createReadStream(file3, { encoding: "utf8" }), crlfDelay: Infinity });
50759
50874
  for await (const line of lines) {
50760
50875
  if (!line.trim()) continue;
50761
50876
  try {
@@ -50767,17 +50882,17 @@ async function* jsonLines(file2) {
50767
50882
  }
50768
50883
  var count2 = (value) => typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : 0;
50769
50884
  async function summarizeContentAudit(directory, key) {
50770
- const dir = path28.resolve(directory);
50885
+ const dir = path29.resolve(directory);
50771
50886
  const files = await auditFiles(dir);
50772
50887
  const days = /* @__PURE__ */ new Map();
50773
50888
  const sizes = [];
50774
50889
  const timings = [];
50775
- for (const file2 of files.filter((f) => f.kind === "metrics")) {
50776
- for await (const line of jsonLines(path28.join(dir, file2.name))) {
50777
- let day = days.get(file2.day);
50890
+ for (const file3 of files.filter((f) => f.kind === "metrics")) {
50891
+ for await (const line of jsonLines(path29.join(dir, file3.name))) {
50892
+ let day = days.get(file3.day);
50778
50893
  if (!day) {
50779
- day = { day: file2.day, records: 0, failed: 0, rawBytes: 0, sanitizedBytes: 0, compressedBytes: 0, envelopeBytes: 0 };
50780
- days.set(file2.day, day);
50894
+ day = { day: file3.day, records: 0, failed: 0, rawBytes: 0, sanitizedBytes: 0, compressedBytes: 0, envelopeBytes: 0 };
50895
+ days.set(file3.day, day);
50781
50896
  }
50782
50897
  day.records += 1;
50783
50898
  if (line.resultCode !== "SUCCESS") day.failed += 1;
@@ -50793,7 +50908,7 @@ async function summarizeContentAudit(directory, key) {
50793
50908
  }
50794
50909
  let paused = null;
50795
50910
  try {
50796
- const value = JSON.parse(await readFile11(path28.join(dir, PAUSED_FILE), "utf8"));
50911
+ const value = JSON.parse(await readFile12(path29.join(dir, PAUSED_FILE), "utf8"));
50797
50912
  if (typeof value.reason === "string" && typeof value.at === "string") paused = { reason: value.reason.slice(0, 40), at: value.at.slice(0, 40) };
50798
50913
  } catch {
50799
50914
  }
@@ -50801,7 +50916,7 @@ async function summarizeContentAudit(directory, key) {
50801
50916
  const newest = files.filter((f) => f.kind === "full").at(-1);
50802
50917
  if (key && newest) {
50803
50918
  const tail = [];
50804
- for await (const line of jsonLines(path28.join(dir, newest.name))) {
50919
+ for await (const line of jsonLines(path29.join(dir, newest.name))) {
50805
50920
  tail.push(line);
50806
50921
  if (tail.length > 5) tail.shift();
50807
50922
  }
@@ -50819,7 +50934,7 @@ async function summarizeContentAudit(directory, key) {
50819
50934
  const rawBytes = total("rawBytes"), envelopeBytes = total("envelopeBytes");
50820
50935
  return {
50821
50936
  directory: dir,
50822
- fileBytes: files.reduce((sum, file2) => sum + file2.bytes, 0),
50937
+ fileBytes: files.reduce((sum, file3) => sum + file3.bytes, 0),
50823
50938
  paused,
50824
50939
  records: total("records"),
50825
50940
  rawBytes,
@@ -50835,10 +50950,10 @@ async function summarizeContentAudit(directory, key) {
50835
50950
  };
50836
50951
  }
50837
50952
  async function restoreContentAudit(input2, output2, key) {
50838
- const handle = await open12(path28.resolve(output2), "wx", 384);
50953
+ const handle = await open12(path29.resolve(output2), "wx", 384);
50839
50954
  let records = 0, failed = 0;
50840
50955
  try {
50841
- for await (const line of jsonLines(path28.resolve(input2))) {
50956
+ for await (const line of jsonLines(path29.resolve(input2))) {
50842
50957
  try {
50843
50958
  await handle.appendFile(JSON.stringify(decryptAuditRecord(line, key)) + "\n");
50844
50959
  records += 1;
@@ -50853,9 +50968,10 @@ async function restoreContentAudit(input2, output2, key) {
50853
50968
  }
50854
50969
 
50855
50970
  // agent/src/main.ts
50856
- var AGENT_VERSION2 = true ? "0.3.49" : "0.3.2";
50971
+ var AGENT_VERSION2 = true ? "0.3.51" : "0.3.2";
50857
50972
  var NETWORK_PUBLIC_KEY = true ? "-----BEGIN PUBLIC KEY-----\nMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAvmu+81vWtJBQDZNHcAIW\nzCSxpG+R9RBsum2df5mP2cOW+wyUDTpnYquFge1qgI5YYTF96j0xCyXL8B9FeNWs\n939opWNmv53j+CQlS4cEIQhBbZSCu0eC4icsVEzBhvf68MB+E668SOtZBcVTEnyh\n96PTcupxS10rQJBWDinbKBXRC2gvGYeu01rWa/nsrndy4vAYP5t3yQtdOC8e8mr0\n+2Mg2Qhiq+KiTCtDd+L9oXvoLqqJYbzUIveNGha25AWxF1Weblp0gOM87hell5gV\nK7q4ZLUq/wBRGYNmQRdLyV7/WRE1FFPSW21/SBZQ/5aU4UqJU/MjMcrJUrnRKngz\nYKmo0czkxS3N7Q2KVxomgR1AQSuQFKMrboZYKjShADp9RIYUxzs7cYg51Of5PnHh\n6Ax+VevDGfzjMD+yHuyxYZqCtX4OwgolJxz63UQbzKlris+8xb5lLYTbIuz90Pss\nn6HK/F5May25c6oMmS3nh/NsiZopL1OvdtWKTt1L4WlRAgMBAAE=\n-----END PUBLIC KEY-----\n" : "";
50858
50973
  var AI_CONNECTION_SHIPPED = false;
50974
+ var QUARANTINE_RETRY_MS = 6e4;
50859
50975
  function processAlive(pid) {
50860
50976
  if (!Number.isInteger(pid) || pid <= 0) return false;
50861
50977
  try {
@@ -50866,11 +50982,11 @@ function processAlive(pid) {
50866
50982
  }
50867
50983
  }
50868
50984
  async function claimAgentProcess(stateDir, runtimeDir, version2) {
50869
- await mkdir14(stateDir, { recursive: true });
50870
- const file2 = path29.join(stateDir, "agent-process.json");
50985
+ await mkdir15(stateDir, { recursive: true });
50986
+ const file3 = path30.join(stateDir, "agent-process.json");
50871
50987
  for (let attempt = 0; attempt < 2; attempt += 1) {
50872
50988
  try {
50873
- const handle = await open13(file2, "wx", 384);
50989
+ const handle = await open13(file3, "wx", 384);
50874
50990
  try {
50875
50991
  await handle.writeFile(JSON.stringify({ pid: process.pid, runtimeDir, version: version2, startedAt: (/* @__PURE__ */ new Date()).toISOString() }) + "\n", "utf8");
50876
50992
  } finally {
@@ -50878,8 +50994,8 @@ async function claimAgentProcess(stateDir, runtimeDir, version2) {
50878
50994
  }
50879
50995
  return async () => {
50880
50996
  try {
50881
- const current2 = JSON.parse(await readFile12(file2, "utf8"));
50882
- if (current2.pid === process.pid) await rm10(file2, { force: true });
50997
+ const current2 = JSON.parse(await readFile13(file3, "utf8"));
50998
+ if (current2.pid === process.pid) await rm11(file3, { force: true });
50883
50999
  } catch {
50884
51000
  }
50885
51001
  };
@@ -50887,12 +51003,12 @@ async function claimAgentProcess(stateDir, runtimeDir, version2) {
50887
51003
  if (!error62 || typeof error62 !== "object" || !("code" in error62) || error62.code !== "EEXIST") throw error62;
50888
51004
  let stale = true;
50889
51005
  try {
50890
- const current2 = JSON.parse(await readFile12(file2, "utf8"));
51006
+ const current2 = JSON.parse(await readFile13(file3, "utf8"));
50891
51007
  stale = typeof current2.pid !== "number" || !processAlive(current2.pid);
50892
51008
  } catch {
50893
51009
  }
50894
51010
  if (!stale) throw Error("AGENT_ALREADY_RUNNING");
50895
- await rm10(file2, { force: true });
51011
+ await rm11(file3, { force: true });
50896
51012
  }
50897
51013
  }
50898
51014
  throw Error("AGENT_ALREADY_RUNNING");
@@ -51001,7 +51117,7 @@ async function runAgent(options) {
51001
51117
  try {
51002
51118
  while (!options.signal.aborted) {
51003
51119
  computerName = await readComputerName();
51004
- let ready;
51120
+ let ready, wait = delay4;
51005
51121
  const readyPromise = new Promise((resolve) => {
51006
51122
  ready = resolve;
51007
51123
  });
@@ -51015,6 +51131,7 @@ async function runAgent(options) {
51015
51131
  safeSlots: runtime.status().safeSlots,
51016
51132
  status: () => runtime.status(),
51017
51133
  onIncidentAck: (ack) => incidentProducer.ack(ack),
51134
+ onFullLogChoice: options.onFullLogChoice,
51018
51135
  // After bridge.connected, like requests: the journal has recorded this connection first.
51019
51136
  onHeldLeases: (bindings) => {
51020
51137
  void readyPromise.then(() => bridge.heldLeases(bindings)).catch(() => {
@@ -51090,6 +51207,8 @@ async function runAgent(options) {
51090
51207
  ready();
51091
51208
  monitor(() => options.monitor?.connectionFailed(error62));
51092
51209
  if (error62 instanceof RelayClientError && ["RELAY_CONNECT_FAILED", "RELAY_CONNECT_CLOSED", "RELAY_CONNECT_TIMEOUT", "RELAY_HANDSHAKE_TIMEOUT"].includes(error62.code)) {
51210
+ } else if (error62 instanceof RelayClientError && error62.code === "RELAY_DEVICE_QUARANTINED") {
51211
+ wait = Math.max(delay4, QUARANTINE_RETRY_MS);
51093
51212
  } else throw error62;
51094
51213
  } finally {
51095
51214
  connectivity?.close();
@@ -51103,11 +51222,15 @@ async function runAgent(options) {
51103
51222
  incidentProducer.disconnected();
51104
51223
  if (!options.signal.aborted) supervisor.observe({ kind: "disconnected" });
51105
51224
  monitor(() => options.monitor?.setConnection("disconnected"));
51225
+ try {
51226
+ options.onFullLogChoice?.(null);
51227
+ } catch {
51228
+ }
51106
51229
  connection?.close("agent_disconnect");
51107
51230
  await bridge.disconnected();
51108
51231
  connection = null;
51109
51232
  }
51110
- if (!options.signal.aborted) await aborted2(options.signal, delay4);
51233
+ if (!options.signal.aborted) await aborted2(options.signal, wait);
51111
51234
  }
51112
51235
  } finally {
51113
51236
  try {
@@ -51143,10 +51266,10 @@ async function openContentAudit(store, stateDir) {
51143
51266
  async function main() {
51144
51267
  if (!["win32", "linux", "darwin"].includes(process.platform)) throw Error("PLATFORM_UNSUPPORTED");
51145
51268
  const appData = process.env.LC_AGENT_DATA_DIR ?? (process.platform === "win32" ? process.env.LOCALAPPDATA : posixDataHome());
51146
- if (!appData || !path29.isAbsolute(appData)) throw Error("APP_DATA_MISSING");
51147
- const stateDir = process.env.LC_AGENT_STATE_DIR ?? path29.join(appData, "LocalCommander", "Agent");
51148
- const binaryDir = path29.dirname(process.platform === "win32" ? process.execPath : await realpath10(process.execPath));
51149
- const ownerBridgePath = process.env.LC_OWNER_BRIDGE ?? path29.join(binaryDir, process.platform === "win32" ? "OwnerBridge.exe" : "owner-store");
51269
+ if (!appData || !path30.isAbsolute(appData)) throw Error("APP_DATA_MISSING");
51270
+ const stateDir = process.env.LC_AGENT_STATE_DIR ?? path30.join(appData, "LocalCommander", "Agent");
51271
+ const binaryDir = path30.dirname(process.platform === "win32" ? process.execPath : await realpath10(process.execPath));
51272
+ const ownerBridgePath = process.env.LC_OWNER_BRIDGE ?? path30.join(binaryDir, process.platform === "win32" ? "OwnerBridge.exe" : "owner-store");
51150
51273
  const store = await WindowsPrivateStore.open(stateDir, ownerBridgePath);
51151
51274
  const command = process.argv[2] ?? "run";
51152
51275
  if (process.platform !== "win32" && (command.startsWith("guard-") || command.startsWith("network-"))) throw Error("FEATURE_PLATFORM_UNSUPPORTED");
@@ -51165,7 +51288,8 @@ async function main() {
51165
51288
  process.stdout.write(JSON.stringify({
51166
51289
  paired: !!identity?.enrollment,
51167
51290
  accountEmail: identity?.enrollment?.accountEmail ?? null,
51168
- deviceId: identity?.enrollment?.deviceId ?? null
51291
+ deviceId: identity?.enrollment?.deviceId ?? null,
51292
+ fullLogs: await readFullLogNotice(stateDir, identity?.enrollment)
51169
51293
  }) + "\n");
51170
51294
  return;
51171
51295
  }
@@ -51241,7 +51365,7 @@ async function main() {
51241
51365
  }
51242
51366
  if (command === "efficiency-report") {
51243
51367
  if (args.length) throw Error("AGENT_COMMAND_INVALID");
51244
- const ledger = await OptimizationLedger.open(path29.join(stateDir, "optimization"));
51368
+ const ledger = await OptimizationLedger.open(path30.join(stateDir, "optimization"));
51245
51369
  try {
51246
51370
  process.stdout.write(JSON.stringify(await ledger.report(), null, 2) + "\n");
51247
51371
  } finally {
@@ -51251,7 +51375,7 @@ async function main() {
51251
51375
  }
51252
51376
  if (command === "guard-configure") {
51253
51377
  if (args.length !== 1) throw Error("AGENT_COMMAND_INVALID");
51254
- const filename = await (await import("node:fs/promises")).realpath(path29.resolve(args[0]));
51378
+ const filename = await (await import("node:fs/promises")).realpath(path30.resolve(args[0]));
51255
51379
  const input2 = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(await readWindowsFile(ownerBridgePath, filename, 2e5)));
51256
51380
  if (!input2 || typeof input2 !== "object" || Object.keys(input2).sort().join(",") !== "compact,settings") throw Error("GUARD_CONFIGURATION_INVALID");
51257
51381
  await store.configureGuard(input2.settings, input2.compact);
@@ -51270,7 +51394,7 @@ async function main() {
51270
51394
  }
51271
51395
  if (command === "guard-evidence") {
51272
51396
  if (args.length) throw Error("AGENT_COMMAND_INVALID");
51273
- const journal = await NativeJournal.open(path29.join(stateDir, "journal"), new SecretBox({ "1": await store.loadDataKey() }));
51397
+ const journal = await NativeJournal.open(path30.join(stateDir, "journal"), new SecretBox({ "1": await store.loadDataKey() }));
51274
51398
  try {
51275
51399
  process.stdout.write(JSON.stringify(await journal.guardEvidence()) + "\n");
51276
51400
  } finally {
@@ -51282,7 +51406,7 @@ async function main() {
51282
51406
  if (args.length !== (command === "guard-export" ? 0 : 1)) throw Error("AGENT_COMMAND_INVALID");
51283
51407
  const identity = await store.load();
51284
51408
  if (!identity?.enrollment) throw Error("ENROLLMENT_MISSING");
51285
- const journal = await NativeJournal.open(path29.join(stateDir, "journal"), new SecretBox({ "1": await store.loadDataKey() }));
51409
+ const journal = await NativeJournal.open(path30.join(stateDir, "journal"), new SecretBox({ "1": await store.loadDataKey() }));
51286
51410
  try {
51287
51411
  const { tenantId, deviceId } = identity.enrollment;
51288
51412
  const records = (await journal.guardEvidence()).filter((record2) => record2.tenantId === tenantId && record2.deviceId === deviceId);
@@ -51360,33 +51484,39 @@ async function main() {
51360
51484
  if (args.length) throw Error("AGENT_COMMAND_INVALID");
51361
51485
  if (!(await store.load())?.enrollment) throw Error("ENROLLMENT_MISSING");
51362
51486
  const releaseProcess = await claimAgentProcess(stateDir, binaryDir, AGENT_VERSION2);
51363
- const monitor = new ProductionMonitor(path29.join(appData, "LocalCommander", "Monitor"), stateDir, AGENT_VERSION2);
51487
+ const monitor = new ProductionMonitor(path30.join(appData, "LocalCommander", "Monitor"), stateDir, AGENT_VERSION2);
51364
51488
  const publishMonitor = () => monitor.flush().catch(() => {
51365
51489
  process.stderr.write("MONITOR_WRITE_FAILED\n");
51366
51490
  });
51367
51491
  await publishMonitor();
51368
51492
  try {
51369
51493
  const journal = await NativeJournal.open(
51370
- path29.join(stateDir, "journal"),
51494
+ path30.join(stateDir, "journal"),
51371
51495
  new SecretBox({ "1": await store.loadDataKey() }),
51372
- process.platform === "win32" ? {} : { lockHelper: path29.join(binaryDir, "posix-host") }
51496
+ process.platform === "win32" ? {} : { lockHelper: path30.join(binaryDir, "posix-host") }
51373
51497
  );
51374
51498
  const ledgerLoss = () => {
51375
51499
  process.stderr.write("OPTIMIZATION_TELEMETRY_INCOMPLETE\n");
51376
51500
  };
51377
51501
  const efficiencyLedger = await new OptionalWork(ledgerLoss, 1e3, 1).run(
51378
- () => OptimizationLedger.open(path29.join(stateDir, "optimization")),
51502
+ () => OptimizationLedger.open(path30.join(stateDir, "optimization")),
51379
51503
  void 0,
51380
51504
  (ledger) => ledger.close()
51381
51505
  );
51382
51506
  try {
51383
- const helperPath = process.env.LC_JOB_HOST ?? path29.join(binaryDir, process.platform === "win32" ? "JobHost.exe" : "job-host.mjs");
51507
+ const helperPath = process.env.LC_JOB_HOST ?? path30.join(binaryDir, process.platform === "win32" ? "JobHost.exe" : "job-host.mjs");
51384
51508
  const tools = new NativeTools({ stateDirectory: stateDir, helperPath, ownerBridgePath, programs: await store.loadPrograms() });
51385
51509
  const stop = new AbortController();
51386
51510
  process.once("SIGINT", () => stop.abort());
51387
51511
  process.once("SIGTERM", () => stop.abort());
51388
51512
  const guard = await NativeGuard.open(store, journal);
51389
51513
  const enrollment = (await store.load()).enrollment;
51514
+ const fullLogNotice = new FullLogNotice(stateDir, enrollment);
51515
+ const onFullLogChoice = (enabled) => {
51516
+ void fullLogNotice.update(enabled).catch(() => {
51517
+ });
51518
+ };
51519
+ onFullLogChoice(null);
51390
51520
  const fabric = await openNativeFabric(stateDir, enrollment, new SecretBox({ "1": await store.loadDataKey() })).catch(() => {
51391
51521
  process.stderr.write("FABRIC_STARTUP_FAILED\n");
51392
51522
  return void 0;
@@ -51415,6 +51545,7 @@ async function main() {
51415
51545
  guard,
51416
51546
  efficiencyLedger,
51417
51547
  monitor,
51548
+ onFullLogChoice,
51418
51549
  localDirect: { key: localDirectKey(await store.loadDataKey()), directory: localDirectDirectory(appData) },
51419
51550
  supervisorLiveness: supervisorLiveness(helperPath),
51420
51551
  ...proxyMode ? { proxyMode: { providers: proxyMode.providers, publicKeyPem: NETWORK_PUBLIC_KEY, endpoint: proxyEndpoint, onState: onProxyState } } : {},
@@ -51451,7 +51582,7 @@ async function main() {
51451
51582
  await releaseProcess();
51452
51583
  }
51453
51584
  }
51454
- var entrypoint = process.argv[1] && (process.platform === "win32" ? path29.resolve(process.argv[1]) : await realpath10(process.argv[1]).catch(() => null));
51585
+ var entrypoint = process.argv[1] && (process.platform === "win32" ? path30.resolve(process.argv[1]) : await realpath10(process.argv[1]).catch(() => null));
51455
51586
  if (entrypoint === fileURLToPath(import.meta.url)) {
51456
51587
  void main().catch((error62) => {
51457
51588
  const code = error62 instanceof Error && /^[A-Z0-9_]{1,64}$/.test(error62.message) ? error62.message : "AGENT_START_FAILED";