@skillrecordings/cli 0.18.1 → 0.18.2

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/dist/index.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  runPipeline,
21
21
  validate,
22
22
  validateSync
23
- } from "./chunk-ZCWCT4ES.js";
23
+ } from "./chunk-F3WI3BN5.js";
24
24
  import "./chunk-HK3PEWFD.js";
25
25
  import "./chunk-WYKL32C3.js";
26
26
  import {
@@ -40,8 +40,8 @@ import {
40
40
  getApp,
41
41
  getOutcomeHistory,
42
42
  getRedis
43
- } from "./chunk-LV53JZHC.js";
44
- import "./chunk-KEV3QKXP.js";
43
+ } from "./chunk-GNPR4OKX.js";
44
+ import "./chunk-HKRLO2GE.js";
45
45
  import {
46
46
  MemoryService,
47
47
  VotingService,
@@ -827,14 +827,14 @@ var require_url_state_machine = __commonJS({
827
827
  return url.replace(/\u0009|\u000A|\u000D/g, "");
828
828
  }
829
829
  function shortenPath(url) {
830
- const path = url.path;
831
- if (path.length === 0) {
830
+ const path2 = url.path;
831
+ if (path2.length === 0) {
832
832
  return;
833
833
  }
834
- if (url.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) {
834
+ if (url.scheme === "file" && path2.length === 1 && isNormalizedWindowsDriveLetter(path2[0])) {
835
835
  return;
836
836
  }
837
- path.pop();
837
+ path2.pop();
838
838
  }
839
839
  function includesCredentials(url) {
840
840
  return url.username !== "" || url.password !== "";
@@ -8202,14 +8202,14 @@ var require_util = __commonJS({
8202
8202
  }
8203
8203
  const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80;
8204
8204
  let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`;
8205
- let path = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`;
8205
+ let path2 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`;
8206
8206
  if (origin[origin.length - 1] === "/") {
8207
8207
  origin = origin.slice(0, origin.length - 1);
8208
8208
  }
8209
- if (path && path[0] !== "/") {
8210
- path = `/${path}`;
8209
+ if (path2 && path2[0] !== "/") {
8210
+ path2 = `/${path2}`;
8211
8211
  }
8212
- return new URL(`${origin}${path}`);
8212
+ return new URL(`${origin}${path2}`);
8213
8213
  }
8214
8214
  if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) {
8215
8215
  throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`.");
@@ -9016,9 +9016,9 @@ var require_diagnostics = __commonJS({
9016
9016
  "undici:client:sendHeaders",
9017
9017
  (evt) => {
9018
9018
  const {
9019
- request: { method, path, origin }
9019
+ request: { method, path: path2, origin }
9020
9020
  } = evt;
9021
- debugLog("sending request to %s %s%s", method, origin, path);
9021
+ debugLog("sending request to %s %s%s", method, origin, path2);
9022
9022
  }
9023
9023
  );
9024
9024
  }
@@ -9036,14 +9036,14 @@ var require_diagnostics = __commonJS({
9036
9036
  "undici:request:headers",
9037
9037
  (evt) => {
9038
9038
  const {
9039
- request: { method, path, origin },
9039
+ request: { method, path: path2, origin },
9040
9040
  response: { statusCode }
9041
9041
  } = evt;
9042
9042
  debugLog(
9043
9043
  "received response to %s %s%s - HTTP %d",
9044
9044
  method,
9045
9045
  origin,
9046
- path,
9046
+ path2,
9047
9047
  statusCode
9048
9048
  );
9049
9049
  }
@@ -9052,23 +9052,23 @@ var require_diagnostics = __commonJS({
9052
9052
  "undici:request:trailers",
9053
9053
  (evt) => {
9054
9054
  const {
9055
- request: { method, path, origin }
9055
+ request: { method, path: path2, origin }
9056
9056
  } = evt;
9057
- debugLog("trailers received from %s %s%s", method, origin, path);
9057
+ debugLog("trailers received from %s %s%s", method, origin, path2);
9058
9058
  }
9059
9059
  );
9060
9060
  diagnosticsChannel.subscribe(
9061
9061
  "undici:request:error",
9062
9062
  (evt) => {
9063
9063
  const {
9064
- request: { method, path, origin },
9064
+ request: { method, path: path2, origin },
9065
9065
  error
9066
9066
  } = evt;
9067
9067
  debugLog(
9068
9068
  "request to %s %s%s errored - %s",
9069
9069
  method,
9070
9070
  origin,
9071
- path,
9071
+ path2,
9072
9072
  error.message
9073
9073
  );
9074
9074
  }
@@ -9169,7 +9169,7 @@ var require_request = __commonJS({
9169
9169
  var kHandler = /* @__PURE__ */ Symbol("handler");
9170
9170
  var Request3 = class {
9171
9171
  constructor(origin, {
9172
- path,
9172
+ path: path2,
9173
9173
  method,
9174
9174
  body,
9175
9175
  headers,
@@ -9185,11 +9185,11 @@ var require_request = __commonJS({
9185
9185
  throwOnError,
9186
9186
  maxRedirections
9187
9187
  }, handler) {
9188
- if (typeof path !== "string") {
9188
+ if (typeof path2 !== "string") {
9189
9189
  throw new InvalidArgumentError("path must be a string");
9190
- } else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") {
9190
+ } else if (path2[0] !== "/" && !(path2.startsWith("http://") || path2.startsWith("https://")) && method !== "CONNECT") {
9191
9191
  throw new InvalidArgumentError("path must be an absolute URL or start with a slash");
9192
- } else if (invalidPathRegex.test(path)) {
9192
+ } else if (invalidPathRegex.test(path2)) {
9193
9193
  throw new InvalidArgumentError("invalid request path");
9194
9194
  }
9195
9195
  if (typeof method !== "string") {
@@ -9257,7 +9257,7 @@ var require_request = __commonJS({
9257
9257
  this.completed = false;
9258
9258
  this.aborted = false;
9259
9259
  this.upgrade = upgrade || null;
9260
- this.path = query ? serializePathWithQuery(path, query) : path;
9260
+ this.path = query ? serializePathWithQuery(path2, query) : path2;
9261
9261
  this.origin = origin;
9262
9262
  this.protocol = getProtocolFromUrlString(origin);
9263
9263
  this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
@@ -9714,9 +9714,9 @@ var require_dispatcher_base = __commonJS({
9714
9714
  }
9715
9715
  close(callback) {
9716
9716
  if (callback === void 0) {
9717
- return new Promise((resolve9, reject) => {
9717
+ return new Promise((resolve8, reject) => {
9718
9718
  this.close((err, data2) => {
9719
- return err ? reject(err) : resolve9(data2);
9719
+ return err ? reject(err) : resolve8(data2);
9720
9720
  });
9721
9721
  });
9722
9722
  }
@@ -9754,9 +9754,9 @@ var require_dispatcher_base = __commonJS({
9754
9754
  err = null;
9755
9755
  }
9756
9756
  if (callback === void 0) {
9757
- return new Promise((resolve9, reject) => {
9757
+ return new Promise((resolve8, reject) => {
9758
9758
  this.destroy(err, (err2, data2) => {
9759
- return err2 ? reject(err2) : resolve9(data2);
9759
+ return err2 ? reject(err2) : resolve8(data2);
9760
9760
  });
9761
9761
  });
9762
9762
  }
@@ -13248,8 +13248,8 @@ var require_promise = __commonJS({
13248
13248
  function createDeferredPromise() {
13249
13249
  let res;
13250
13250
  let rej;
13251
- const promise = new Promise((resolve9, reject) => {
13252
- res = resolve9;
13251
+ const promise = new Promise((resolve8, reject) => {
13252
+ res = resolve8;
13253
13253
  rej = reject;
13254
13254
  });
13255
13255
  return { promise, resolve: res, reject: rej };
@@ -14299,7 +14299,7 @@ var require_client_h1 = __commonJS({
14299
14299
  return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT";
14300
14300
  }
14301
14301
  function writeH1(client, request) {
14302
- const { method, path, host, upgrade, blocking, reset } = request;
14302
+ const { method, path: path2, host, upgrade, blocking, reset } = request;
14303
14303
  let { body, headers, contentLength } = request;
14304
14304
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH";
14305
14305
  if (util.isFormDataLike(body)) {
@@ -14365,7 +14365,7 @@ var require_client_h1 = __commonJS({
14365
14365
  if (blocking) {
14366
14366
  socket[kBlocking] = true;
14367
14367
  }
14368
- let header = `${method} ${path} HTTP/1.1\r
14368
+ let header = `${method} ${path2} HTTP/1.1\r
14369
14369
  `;
14370
14370
  if (typeof host === "string") {
14371
14371
  header += `host: ${host}\r
@@ -14552,12 +14552,12 @@ upgrade: ${upgrade}\r
14552
14552
  cb();
14553
14553
  }
14554
14554
  }
14555
- const waitForDrain = () => new Promise((resolve9, reject) => {
14555
+ const waitForDrain = () => new Promise((resolve8, reject) => {
14556
14556
  assert(callback === null);
14557
14557
  if (socket[kError]) {
14558
14558
  reject(socket[kError]);
14559
14559
  } else {
14560
- callback = resolve9;
14560
+ callback = resolve8;
14561
14561
  }
14562
14562
  });
14563
14563
  socket.on("close", onDrain).on("drain", onDrain);
@@ -14988,7 +14988,7 @@ var require_client_h2 = __commonJS({
14988
14988
  function writeH2(client, request) {
14989
14989
  const requestTimeout = request.bodyTimeout ?? client[kBodyTimeout];
14990
14990
  const session = client[kHTTP2Session];
14991
- const { method, path, host, upgrade, expectContinue, signal, protocol, headers: reqHeaders } = request;
14991
+ const { method, path: path2, host, upgrade, expectContinue, signal, protocol, headers: reqHeaders } = request;
14992
14992
  let { body } = request;
14993
14993
  if (upgrade != null && upgrade !== "websocket") {
14994
14994
  util.errorRequest(client, request, new InvalidArgumentError(`Custom upgrade "${upgrade}" not supported over HTTP/2`));
@@ -15056,7 +15056,7 @@ var require_client_h2 = __commonJS({
15056
15056
  }
15057
15057
  headers[HTTP2_HEADER_METHOD] = "CONNECT";
15058
15058
  headers[HTTP2_HEADER_PROTOCOL] = "websocket";
15059
- headers[HTTP2_HEADER_PATH] = path;
15059
+ headers[HTTP2_HEADER_PATH] = path2;
15060
15060
  if (protocol === "ws:" || protocol === "wss:") {
15061
15061
  headers[HTTP2_HEADER_SCHEME] = protocol === "ws:" ? "http" : "https";
15062
15062
  } else {
@@ -15097,7 +15097,7 @@ var require_client_h2 = __commonJS({
15097
15097
  stream.setTimeout(requestTimeout);
15098
15098
  return true;
15099
15099
  }
15100
- headers[HTTP2_HEADER_PATH] = path;
15100
+ headers[HTTP2_HEADER_PATH] = path2;
15101
15101
  headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https";
15102
15102
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
15103
15103
  if (body && typeof body.read === "function") {
@@ -15368,12 +15368,12 @@ var require_client_h2 = __commonJS({
15368
15368
  cb();
15369
15369
  }
15370
15370
  }
15371
- const waitForDrain = () => new Promise((resolve9, reject) => {
15371
+ const waitForDrain = () => new Promise((resolve8, reject) => {
15372
15372
  assert(callback === null);
15373
15373
  if (socket[kError]) {
15374
15374
  reject(socket[kError]);
15375
15375
  } else {
15376
- callback = resolve9;
15376
+ callback = resolve8;
15377
15377
  }
15378
15378
  });
15379
15379
  h2stream.on("close", onDrain).on("drain", onDrain);
@@ -15676,16 +15676,16 @@ var require_client = __commonJS({
15676
15676
  return this[kNeedDrain] < 2;
15677
15677
  }
15678
15678
  [kClose]() {
15679
- return new Promise((resolve9) => {
15679
+ return new Promise((resolve8) => {
15680
15680
  if (this[kSize]) {
15681
- this[kClosedResolve] = resolve9;
15681
+ this[kClosedResolve] = resolve8;
15682
15682
  } else {
15683
- resolve9(null);
15683
+ resolve8(null);
15684
15684
  }
15685
15685
  });
15686
15686
  }
15687
15687
  [kDestroy](err) {
15688
- return new Promise((resolve9) => {
15688
+ return new Promise((resolve8) => {
15689
15689
  const requests = this[kQueue].splice(this[kPendingIdx]);
15690
15690
  for (let i = 0; i < requests.length; i++) {
15691
15691
  const request = requests[i];
@@ -15696,7 +15696,7 @@ var require_client = __commonJS({
15696
15696
  this[kClosedResolve]();
15697
15697
  this[kClosedResolve] = null;
15698
15698
  }
15699
- resolve9(null);
15699
+ resolve8(null);
15700
15700
  };
15701
15701
  if (this[kHTTPContext]) {
15702
15702
  this[kHTTPContext].destroy(err, callback);
@@ -16089,8 +16089,8 @@ var require_pool_base = __commonJS({
16089
16089
  }
16090
16090
  return Promise.all(closeAll);
16091
16091
  } else {
16092
- return new Promise((resolve9) => {
16093
- this[kClosedResolve] = resolve9;
16092
+ return new Promise((resolve8) => {
16093
+ this[kClosedResolve] = resolve8;
16094
16094
  });
16095
16095
  }
16096
16096
  }
@@ -16715,10 +16715,10 @@ var require_proxy_agent = __commonJS({
16715
16715
  };
16716
16716
  const {
16717
16717
  origin,
16718
- path = "/",
16718
+ path: path2 = "/",
16719
16719
  headers = {}
16720
16720
  } = opts;
16721
- opts.path = origin + path;
16721
+ opts.path = origin + path2;
16722
16722
  if (!("host" in headers) && !("Host" in headers)) {
16723
16723
  const { host } = new URL(origin);
16724
16724
  headers.host = host;
@@ -17629,7 +17629,7 @@ var require_readable = __commonJS({
17629
17629
  if (this._readableState.closeEmitted) {
17630
17630
  return Promise.resolve(null);
17631
17631
  }
17632
- return new Promise((resolve9, reject) => {
17632
+ return new Promise((resolve8, reject) => {
17633
17633
  if (this[kContentLength] && this[kContentLength] > limit2 || this[kBytesRead] > limit2) {
17634
17634
  this.destroy(new AbortError2());
17635
17635
  }
@@ -17643,11 +17643,11 @@ var require_readable = __commonJS({
17643
17643
  if (signal.aborted) {
17644
17644
  reject(signal.reason ?? new AbortError2());
17645
17645
  } else {
17646
- resolve9(null);
17646
+ resolve8(null);
17647
17647
  }
17648
17648
  });
17649
17649
  } else {
17650
- this.on("close", resolve9);
17650
+ this.on("close", resolve8);
17651
17651
  }
17652
17652
  this.on("error", noop).on("data", () => {
17653
17653
  if (this[kBytesRead] > limit2) {
@@ -17675,7 +17675,7 @@ var require_readable = __commonJS({
17675
17675
  }
17676
17676
  function consume(stream, type) {
17677
17677
  assert(!stream[kConsume]);
17678
- return new Promise((resolve9, reject) => {
17678
+ return new Promise((resolve8, reject) => {
17679
17679
  if (isUnusable(stream)) {
17680
17680
  const rState = stream._readableState;
17681
17681
  if (rState.destroyed && rState.closeEmitted === false) {
@@ -17690,7 +17690,7 @@ var require_readable = __commonJS({
17690
17690
  stream[kConsume] = {
17691
17691
  type,
17692
17692
  stream,
17693
- resolve: resolve9,
17693
+ resolve: resolve8,
17694
17694
  reject,
17695
17695
  length: 0,
17696
17696
  body: []
@@ -17764,18 +17764,18 @@ var require_readable = __commonJS({
17764
17764
  return buffer;
17765
17765
  }
17766
17766
  function consumeEnd(consume2, encoding) {
17767
- const { type, body, resolve: resolve9, stream, length } = consume2;
17767
+ const { type, body, resolve: resolve8, stream, length } = consume2;
17768
17768
  try {
17769
17769
  if (type === "text") {
17770
- resolve9(chunksDecode(body, length, encoding));
17770
+ resolve8(chunksDecode(body, length, encoding));
17771
17771
  } else if (type === "json") {
17772
- resolve9(JSON.parse(chunksDecode(body, length, encoding)));
17772
+ resolve8(JSON.parse(chunksDecode(body, length, encoding)));
17773
17773
  } else if (type === "arrayBuffer") {
17774
- resolve9(chunksConcat(body, length).buffer);
17774
+ resolve8(chunksConcat(body, length).buffer);
17775
17775
  } else if (type === "blob") {
17776
- resolve9(new Blob(body, { type: stream[kContentType] }));
17776
+ resolve8(new Blob(body, { type: stream[kContentType] }));
17777
17777
  } else if (type === "bytes") {
17778
- resolve9(chunksConcat(body, length));
17778
+ resolve8(chunksConcat(body, length));
17779
17779
  }
17780
17780
  consumeFinish(consume2);
17781
17781
  } catch (err) {
@@ -17966,9 +17966,9 @@ var require_api_request = __commonJS({
17966
17966
  };
17967
17967
  function request(opts, callback) {
17968
17968
  if (callback === void 0) {
17969
- return new Promise((resolve9, reject) => {
17969
+ return new Promise((resolve8, reject) => {
17970
17970
  request.call(this, opts, (err, data2) => {
17971
- return err ? reject(err) : resolve9(data2);
17971
+ return err ? reject(err) : resolve8(data2);
17972
17972
  });
17973
17973
  });
17974
17974
  }
@@ -18182,9 +18182,9 @@ var require_api_stream = __commonJS({
18182
18182
  };
18183
18183
  function stream(opts, factory, callback) {
18184
18184
  if (callback === void 0) {
18185
- return new Promise((resolve9, reject) => {
18185
+ return new Promise((resolve8, reject) => {
18186
18186
  stream.call(this, opts, factory, (err, data2) => {
18187
- return err ? reject(err) : resolve9(data2);
18187
+ return err ? reject(err) : resolve8(data2);
18188
18188
  });
18189
18189
  });
18190
18190
  }
@@ -18474,9 +18474,9 @@ var require_api_upgrade = __commonJS({
18474
18474
  };
18475
18475
  function upgrade(opts, callback) {
18476
18476
  if (callback === void 0) {
18477
- return new Promise((resolve9, reject) => {
18477
+ return new Promise((resolve8, reject) => {
18478
18478
  upgrade.call(this, opts, (err, data2) => {
18479
- return err ? reject(err) : resolve9(data2);
18479
+ return err ? reject(err) : resolve8(data2);
18480
18480
  });
18481
18481
  });
18482
18482
  }
@@ -18570,9 +18570,9 @@ var require_api_connect = __commonJS({
18570
18570
  };
18571
18571
  function connect(opts, callback) {
18572
18572
  if (callback === void 0) {
18573
- return new Promise((resolve9, reject) => {
18573
+ return new Promise((resolve8, reject) => {
18574
18574
  connect.call(this, opts, (err, data2) => {
18575
- return err ? reject(err) : resolve9(data2);
18575
+ return err ? reject(err) : resolve8(data2);
18576
18576
  });
18577
18577
  });
18578
18578
  }
@@ -18776,20 +18776,20 @@ var require_mock_utils = __commonJS({
18776
18776
  }
18777
18777
  return normalizedQp;
18778
18778
  }
18779
- function safeUrl(path) {
18780
- if (typeof path !== "string") {
18781
- return path;
18779
+ function safeUrl(path2) {
18780
+ if (typeof path2 !== "string") {
18781
+ return path2;
18782
18782
  }
18783
- const pathSegments = path.split("?", 3);
18783
+ const pathSegments = path2.split("?", 3);
18784
18784
  if (pathSegments.length !== 2) {
18785
- return path;
18785
+ return path2;
18786
18786
  }
18787
18787
  const qp = new URLSearchParams(pathSegments.pop());
18788
18788
  qp.sort();
18789
18789
  return [...pathSegments, qp.toString()].join("?");
18790
18790
  }
18791
- function matchKey(mockDispatch2, { path, method, body, headers }) {
18792
- const pathMatch = matchValue(mockDispatch2.path, path);
18791
+ function matchKey(mockDispatch2, { path: path2, method, body, headers }) {
18792
+ const pathMatch = matchValue(mockDispatch2.path, path2);
18793
18793
  const methodMatch = matchValue(mockDispatch2.method, method);
18794
18794
  const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true;
18795
18795
  const headersMatch = matchHeaders(mockDispatch2, headers);
@@ -18814,8 +18814,8 @@ var require_mock_utils = __commonJS({
18814
18814
  const basePath = key.query ? serializePathWithQuery(key.path, key.query) : key.path;
18815
18815
  const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath;
18816
18816
  const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath);
18817
- let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path, ignoreTrailingSlash }) => {
18818
- return ignoreTrailingSlash ? matchValue(removeTrailingSlash(safeUrl(path)), resolvedPathWithoutTrailingSlash) : matchValue(safeUrl(path), resolvedPath);
18817
+ let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path2, ignoreTrailingSlash }) => {
18818
+ return ignoreTrailingSlash ? matchValue(removeTrailingSlash(safeUrl(path2)), resolvedPathWithoutTrailingSlash) : matchValue(safeUrl(path2), resolvedPath);
18819
18819
  });
18820
18820
  if (matchedMockDispatches.length === 0) {
18821
18821
  throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`);
@@ -18853,19 +18853,19 @@ var require_mock_utils = __commonJS({
18853
18853
  mockDispatches.splice(index2, 1);
18854
18854
  }
18855
18855
  }
18856
- function removeTrailingSlash(path) {
18857
- while (path.endsWith("/")) {
18858
- path = path.slice(0, -1);
18856
+ function removeTrailingSlash(path2) {
18857
+ while (path2.endsWith("/")) {
18858
+ path2 = path2.slice(0, -1);
18859
18859
  }
18860
- if (path.length === 0) {
18861
- path = "/";
18860
+ if (path2.length === 0) {
18861
+ path2 = "/";
18862
18862
  }
18863
- return path;
18863
+ return path2;
18864
18864
  }
18865
18865
  function buildKey(opts) {
18866
- const { path, method, body, headers, query } = opts;
18866
+ const { path: path2, method, body, headers, query } = opts;
18867
18867
  return {
18868
- path,
18868
+ path: path2,
18869
18869
  method,
18870
18870
  body,
18871
18871
  headers,
@@ -19557,10 +19557,10 @@ var require_pending_interceptors_formatter = __commonJS({
19557
19557
  }
19558
19558
  format(pendingInterceptors) {
19559
19559
  const withPrettyHeaders = pendingInterceptors.map(
19560
- ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
19560
+ ({ method, path: path2, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
19561
19561
  Method: method,
19562
19562
  Origin: origin,
19563
- Path: path,
19563
+ Path: path2,
19564
19564
  "Status code": statusCode,
19565
19565
  Persistent: persist ? PERSISTENT : NOT_PERSISTENT,
19566
19566
  Invocations: timesInvoked,
@@ -19643,9 +19643,9 @@ var require_mock_agent = __commonJS({
19643
19643
  const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters];
19644
19644
  const dispatchOpts = { ...opts };
19645
19645
  if (acceptNonStandardSearchParameters && dispatchOpts.path) {
19646
- const [path, searchParams] = dispatchOpts.path.split("?");
19646
+ const [path2, searchParams] = dispatchOpts.path.split("?");
19647
19647
  const normalizedSearchParams = normalizeSearchParams(searchParams, acceptNonStandardSearchParameters);
19648
- dispatchOpts.path = `${path}?${normalizedSearchParams}`;
19648
+ dispatchOpts.path = `${path2}?${normalizedSearchParams}`;
19649
19649
  }
19650
19650
  return this[kAgent].dispatch(dispatchOpts, handler);
19651
19651
  }
@@ -19852,7 +19852,7 @@ var require_snapshot_recorder = __commonJS({
19852
19852
  "use strict";
19853
19853
  init_esm_shims();
19854
19854
  var { writeFile: writeFile9, readFile: readFile10, mkdir: mkdir2 } = __require("fs/promises");
19855
- var { dirname: dirname7, resolve: resolve9 } = __require("path");
19855
+ var { dirname: dirname7, resolve: resolve8 } = __require("path");
19856
19856
  var { setTimeout: setTimeout2, clearTimeout: clearTimeout2 } = __require("timers");
19857
19857
  var { InvalidArgumentError, UndiciError } = require_errors();
19858
19858
  var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils();
@@ -20048,12 +20048,12 @@ var require_snapshot_recorder = __commonJS({
20048
20048
  * @return {Promise<void>} - Resolves when snapshots are loaded
20049
20049
  */
20050
20050
  async loadSnapshots(filePath) {
20051
- const path = filePath || this.#snapshotPath;
20052
- if (!path) {
20051
+ const path2 = filePath || this.#snapshotPath;
20052
+ if (!path2) {
20053
20053
  throw new InvalidArgumentError("Snapshot path is required");
20054
20054
  }
20055
20055
  try {
20056
- const data2 = await readFile10(resolve9(path), "utf8");
20056
+ const data2 = await readFile10(resolve8(path2), "utf8");
20057
20057
  const parsed = JSON.parse(data2);
20058
20058
  if (Array.isArray(parsed)) {
20059
20059
  this.#snapshots.clear();
@@ -20067,7 +20067,7 @@ var require_snapshot_recorder = __commonJS({
20067
20067
  if (error.code === "ENOENT") {
20068
20068
  this.#snapshots.clear();
20069
20069
  } else {
20070
- throw new UndiciError(`Failed to load snapshots from ${path}`, { cause: error });
20070
+ throw new UndiciError(`Failed to load snapshots from ${path2}`, { cause: error });
20071
20071
  }
20072
20072
  }
20073
20073
  }
@@ -20078,11 +20078,11 @@ var require_snapshot_recorder = __commonJS({
20078
20078
  * @returns {Promise<void>} - Resolves when snapshots are saved
20079
20079
  */
20080
20080
  async saveSnapshots(filePath) {
20081
- const path = filePath || this.#snapshotPath;
20082
- if (!path) {
20081
+ const path2 = filePath || this.#snapshotPath;
20082
+ if (!path2) {
20083
20083
  throw new InvalidArgumentError("Snapshot path is required");
20084
20084
  }
20085
- const resolvedPath = resolve9(path);
20085
+ const resolvedPath = resolve8(path2);
20086
20086
  await mkdir2(dirname7(resolvedPath), { recursive: true });
20087
20087
  const data2 = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({
20088
20088
  hash,
@@ -20711,15 +20711,15 @@ var require_redirect_handler = __commonJS({
20711
20711
  return;
20712
20712
  }
20713
20713
  const { origin, pathname, search: search2 } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
20714
- const path = search2 ? `${pathname}${search2}` : pathname;
20715
- const redirectUrlString = `${origin}${path}`;
20714
+ const path2 = search2 ? `${pathname}${search2}` : pathname;
20715
+ const redirectUrlString = `${origin}${path2}`;
20716
20716
  for (const historyUrl of this.history) {
20717
20717
  if (historyUrl.toString() === redirectUrlString) {
20718
20718
  throw new InvalidArgumentError(`Redirect loop detected. Cannot redirect to ${origin}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`);
20719
20719
  }
20720
20720
  }
20721
20721
  this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
20722
- this.opts.path = path;
20722
+ this.opts.path = path2;
20723
20723
  this.opts.origin = origin;
20724
20724
  this.opts.query = null;
20725
20725
  }
@@ -26660,7 +26660,7 @@ var require_fetch = __commonJS({
26660
26660
  function dispatch({ body }) {
26661
26661
  const url = requestCurrentURL(request);
26662
26662
  const agent = fetchParams.controller.dispatcher;
26663
- return new Promise((resolve9, reject) => agent.dispatch(
26663
+ return new Promise((resolve8, reject) => agent.dispatch(
26664
26664
  {
26665
26665
  path: url.pathname + url.search,
26666
26666
  origin: url.origin,
@@ -26740,7 +26740,7 @@ var require_fetch = __commonJS({
26740
26740
  }
26741
26741
  }
26742
26742
  const onError = this.onError.bind(this);
26743
- resolve9({
26743
+ resolve8({
26744
26744
  status,
26745
26745
  statusText,
26746
26746
  headersList,
@@ -26783,7 +26783,7 @@ var require_fetch = __commonJS({
26783
26783
  for (let i = 0; i < rawHeaders.length; i += 2) {
26784
26784
  headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true);
26785
26785
  }
26786
- resolve9({
26786
+ resolve8({
26787
26787
  status,
26788
26788
  statusText: STATUS_CODES2[status],
26789
26789
  headersList,
@@ -27572,9 +27572,9 @@ var require_util4 = __commonJS({
27572
27572
  }
27573
27573
  }
27574
27574
  }
27575
- function validateCookiePath(path) {
27576
- for (let i = 0; i < path.length; ++i) {
27577
- const code = path.charCodeAt(i);
27575
+ function validateCookiePath(path2) {
27576
+ for (let i = 0; i < path2.length; ++i) {
27577
+ const code = path2.charCodeAt(i);
27578
27578
  if (code < 32 || // exclude CTLs (0-31)
27579
27579
  code === 127 || // DEL
27580
27580
  code === 59) {
@@ -30702,11 +30702,11 @@ var require_undici = __commonJS({
30702
30702
  if (typeof opts.path !== "string") {
30703
30703
  throw new InvalidArgumentError("invalid opts.path");
30704
30704
  }
30705
- let path = opts.path;
30705
+ let path2 = opts.path;
30706
30706
  if (!opts.path.startsWith("/")) {
30707
- path = `/${path}`;
30707
+ path2 = `/${path2}`;
30708
30708
  }
30709
- url = new URL(util.parseOrigin(url).origin + path);
30709
+ url = new URL(util.parseOrigin(url).origin + path2);
30710
30710
  } else {
30711
30711
  if (!opts) {
30712
30712
  opts = typeof url === "object" ? url : {};
@@ -60839,11 +60839,11 @@ var require_visitors = __commonJS({
60839
60839
  }
60840
60840
  visitor._verified = true;
60841
60841
  }
60842
- function validateVisitorMethods(path, val2) {
60842
+ function validateVisitorMethods(path2, val2) {
60843
60843
  const fns = [].concat(val2);
60844
60844
  for (const fn of fns) {
60845
60845
  if (typeof fn !== "function") {
60846
- throw new TypeError(`Non-function found defined in ${path} with type ${typeof fn}`);
60846
+ throw new TypeError(`Non-function found defined in ${path2} with type ${typeof fn}`);
60847
60847
  }
60848
60848
  }
60849
60849
  }
@@ -60886,8 +60886,8 @@ var require_visitors = __commonJS({
60886
60886
  fns = fns.map(function(fn) {
60887
60887
  let newFn = fn;
60888
60888
  if (state) {
60889
- newFn = function(path) {
60890
- fn.call(state, path, state);
60889
+ newFn = function(path2) {
60890
+ fn.call(state, path2, state);
60891
60891
  };
60892
60892
  }
60893
60893
  if (wrapper) {
@@ -60920,8 +60920,8 @@ var require_visitors = __commonJS({
60920
60920
  function wrapCheck(nodeType, fn) {
60921
60921
  const fnKey = `is${nodeType}`;
60922
60922
  const validator = virtualTypesValidators[fnKey];
60923
- const newFn = function(path) {
60924
- if (validator.call(path)) {
60923
+ const newFn = function(path2) {
60924
+ if (validator.call(path2)) {
60925
60925
  return fn.apply(this, arguments);
60926
60926
  }
60927
60927
  };
@@ -60946,24 +60946,24 @@ var require_visitors = __commonJS({
60946
60946
  }
60947
60947
  }
60948
60948
  var _environmentVisitor = {
60949
- FunctionParent(path) {
60950
- if (path.isArrowFunctionExpression()) return;
60951
- path.skip();
60952
- if (path.isMethod()) {
60953
- if (!path.requeueComputedKeyAndDecorators) {
60954
- _context.requeueComputedKeyAndDecorators.call(path);
60949
+ FunctionParent(path2) {
60950
+ if (path2.isArrowFunctionExpression()) return;
60951
+ path2.skip();
60952
+ if (path2.isMethod()) {
60953
+ if (!path2.requeueComputedKeyAndDecorators) {
60954
+ _context.requeueComputedKeyAndDecorators.call(path2);
60955
60955
  } else {
60956
- path.requeueComputedKeyAndDecorators();
60956
+ path2.requeueComputedKeyAndDecorators();
60957
60957
  }
60958
60958
  }
60959
60959
  },
60960
- Property(path) {
60961
- if (path.isObjectProperty()) return;
60962
- path.skip();
60963
- if (!path.requeueComputedKeyAndDecorators) {
60964
- _context.requeueComputedKeyAndDecorators.call(path);
60960
+ Property(path2) {
60961
+ if (path2.isObjectProperty()) return;
60962
+ path2.skip();
60963
+ if (!path2.requeueComputedKeyAndDecorators) {
60964
+ _context.requeueComputedKeyAndDecorators.call(path2);
60965
60965
  } else {
60966
- path.requeueComputedKeyAndDecorators();
60966
+ path2.requeueComputedKeyAndDecorators();
60967
60967
  }
60968
60968
  }
60969
60969
  };
@@ -60998,18 +60998,18 @@ var require_renamer = __commonJS({
60998
60998
  node.name = state.newName;
60999
60999
  }
61000
61000
  },
61001
- Scope(path, state) {
61002
- if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {
61003
- path.skip();
61004
- if (path.isMethod()) {
61005
- if (!path.requeueComputedKeyAndDecorators) {
61006
- _context.requeueComputedKeyAndDecorators.call(path);
61001
+ Scope(path2, state) {
61002
+ if (!path2.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {
61003
+ path2.skip();
61004
+ if (path2.isMethod()) {
61005
+ if (!path2.requeueComputedKeyAndDecorators) {
61006
+ _context.requeueComputedKeyAndDecorators.call(path2);
61007
61007
  } else {
61008
- path.requeueComputedKeyAndDecorators();
61008
+ path2.requeueComputedKeyAndDecorators();
61009
61009
  }
61010
61010
  }
61011
- if (path.isSwitchStatement()) {
61012
- path.context.maybeQueue(path.get("discriminant"));
61011
+ if (path2.isSwitchStatement()) {
61012
+ path2.context.maybeQueue(path2.get("discriminant"));
61013
61013
  }
61014
61014
  }
61015
61015
  },
@@ -61026,9 +61026,9 @@ var require_renamer = __commonJS({
61026
61026
  if ((_node$extra = node.extra) != null && _node$extra.shorthand) node.extra.shorthand = false;
61027
61027
  }
61028
61028
  },
61029
- "AssignmentExpression|Declaration|VariableDeclarator"(path, state) {
61030
- if (path.isVariableDeclaration()) return;
61031
- const ids = path.isAssignmentExpression() ? getAssignmentIdentifiers(path.node) : path.getOuterBindingIdentifiers();
61029
+ "AssignmentExpression|Declaration|VariableDeclarator"(path2, state) {
61030
+ if (path2.isVariableDeclaration()) return;
61031
+ const ids = path2.isAssignmentExpression() ? getAssignmentIdentifiers(path2.node) : path2.getOuterBindingIdentifiers();
61032
61032
  for (const name in ids) {
61033
61033
  if (name === state.oldName) ids[name].name = state.newName;
61034
61034
  }
@@ -61058,11 +61058,11 @@ var require_renamer = __commonJS({
61058
61058
  }
61059
61059
  maybeExportDeclar.splitExportDeclaration();
61060
61060
  }
61061
- maybeConvertFromClassFunctionDeclaration(path) {
61062
- return path;
61061
+ maybeConvertFromClassFunctionDeclaration(path2) {
61062
+ return path2;
61063
61063
  }
61064
- maybeConvertFromClassFunctionExpression(path) {
61065
- return path;
61064
+ maybeConvertFromClassFunctionExpression(path2) {
61065
+ return path2;
61066
61066
  }
61067
61067
  rename() {
61068
61068
  const {
@@ -61072,9 +61072,9 @@ var require_renamer = __commonJS({
61072
61072
  } = this;
61073
61073
  const {
61074
61074
  scope,
61075
- path
61075
+ path: path2
61076
61076
  } = binding;
61077
- const parentDeclar = path.find((path2) => path2.isDeclaration() || path2.isFunctionExpression() || path2.isClassExpression());
61077
+ const parentDeclar = path2.find((path3) => path3.isDeclaration() || path3.isFunctionExpression() || path3.isClassExpression());
61078
61078
  if (parentDeclar) {
61079
61079
  const bindingIds = parentDeclar.getOuterBindingIdentifiers();
61080
61080
  if (bindingIds[oldName] === binding.identifier) {
@@ -61100,8 +61100,8 @@ var require_renamer = __commonJS({
61100
61100
  this.binding.identifier.name = newName;
61101
61101
  }
61102
61102
  if (parentDeclar) {
61103
- this.maybeConvertFromClassFunctionDeclaration(path);
61104
- this.maybeConvertFromClassFunctionExpression(path);
61103
+ this.maybeConvertFromClassFunctionDeclaration(path2);
61104
+ this.maybeConvertFromClassFunctionExpression(path2);
61105
61105
  }
61106
61106
  }
61107
61107
  };
@@ -61125,17 +61125,17 @@ var require_traverseForScope = __commonJS({
61125
61125
  var {
61126
61126
  VISITOR_KEYS
61127
61127
  } = _t;
61128
- function traverseForScope(path, visitors, state) {
61128
+ function traverseForScope(path2, visitors, state) {
61129
61129
  const exploded = (0, _visitors.explode)(visitors);
61130
61130
  if (exploded.enter || exploded.exit) {
61131
61131
  throw new Error("Should not be used with enter/exit visitors.");
61132
61132
  }
61133
- _traverse(path.parentPath, path.parent, path.node, path.container, path.key, path.listKey, path.hub, path);
61133
+ _traverse(path2.parentPath, path2.parent, path2.node, path2.container, path2.key, path2.listKey, path2.hub, path2);
61134
61134
  function _traverse(parentPath, parent2, node, container, key, listKey, hub, inPath) {
61135
61135
  if (!node) {
61136
61136
  return;
61137
61137
  }
61138
- const path2 = inPath || _index.NodePath.get({
61138
+ const path3 = inPath || _index.NodePath.get({
61139
61139
  hub,
61140
61140
  parentPath,
61141
61141
  parent: parent2,
@@ -61143,14 +61143,14 @@ var require_traverseForScope = __commonJS({
61143
61143
  listKey,
61144
61144
  key
61145
61145
  });
61146
- _context._forceSetScope.call(path2);
61146
+ _context._forceSetScope.call(path3);
61147
61147
  const visitor = exploded[node.type];
61148
61148
  if (visitor != null && visitor.enter) {
61149
61149
  for (const visit of visitor.enter) {
61150
- visit.call(state, path2, state);
61150
+ visit.call(state, path3, state);
61151
61151
  }
61152
61152
  }
61153
- if (path2.shouldSkip) {
61153
+ if (path3.shouldSkip) {
61154
61154
  return;
61155
61155
  }
61156
61156
  const keys = VISITOR_KEYS[node.type];
@@ -61163,15 +61163,15 @@ var require_traverseForScope = __commonJS({
61163
61163
  if (Array.isArray(prop2)) {
61164
61164
  for (let i = 0; i < prop2.length; i++) {
61165
61165
  const value = prop2[i];
61166
- _traverse(path2, node, value, prop2, i, key2);
61166
+ _traverse(path3, node, value, prop2, i, key2);
61167
61167
  }
61168
61168
  } else {
61169
- _traverse(path2, node, prop2, node, key2, null);
61169
+ _traverse(path3, node, prop2, node, key2, null);
61170
61170
  }
61171
61171
  }
61172
61172
  if (visitor != null && visitor.exit) {
61173
61173
  for (const visit of visitor.exit) {
61174
- visit.call(state, path2, state);
61174
+ visit.call(state, path3, state);
61175
61175
  }
61176
61176
  }
61177
61177
  }
@@ -61192,7 +61192,7 @@ var require_binding = __commonJS({
61192
61192
  constructor({
61193
61193
  identifier,
61194
61194
  scope,
61195
- path,
61195
+ path: path2,
61196
61196
  kind: kind2
61197
61197
  }) {
61198
61198
  this.identifier = void 0;
@@ -61206,10 +61206,10 @@ var require_binding = __commonJS({
61206
61206
  this.references = 0;
61207
61207
  this.identifier = identifier;
61208
61208
  this.scope = scope;
61209
- this.path = path;
61209
+ this.path = path2;
61210
61210
  this.kind = kind2;
61211
- if ((kind2 === "var" || kind2 === "hoisted") && isInitInLoop(path)) {
61212
- this.reassign(path);
61211
+ if ((kind2 === "var" || kind2 === "hoisted") && isInitInLoop(path2)) {
61212
+ this.reassign(path2);
61213
61213
  }
61214
61214
  this.clearValue();
61215
61215
  }
@@ -61227,20 +61227,20 @@ var require_binding = __commonJS({
61227
61227
  this.hasValue = false;
61228
61228
  this.value = null;
61229
61229
  }
61230
- reassign(path) {
61230
+ reassign(path2) {
61231
61231
  this.constant = false;
61232
- if (this.constantViolations.includes(path)) {
61232
+ if (this.constantViolations.includes(path2)) {
61233
61233
  return;
61234
61234
  }
61235
- this.constantViolations.push(path);
61235
+ this.constantViolations.push(path2);
61236
61236
  }
61237
- reference(path) {
61238
- if (this.referencePaths.includes(path)) {
61237
+ reference(path2) {
61238
+ if (this.referencePaths.includes(path2)) {
61239
61239
  return;
61240
61240
  }
61241
61241
  this.referenced = true;
61242
61242
  this.references++;
61243
- this.referencePaths.push(path);
61243
+ this.referencePaths.push(path2);
61244
61244
  }
61245
61245
  dereference() {
61246
61246
  this.references--;
@@ -61248,12 +61248,12 @@ var require_binding = __commonJS({
61248
61248
  }
61249
61249
  };
61250
61250
  exports.default = Binding;
61251
- function isInitInLoop(path) {
61252
- const isFunctionDeclarationOrHasInit = !path.isVariableDeclarator() || path.node.init;
61251
+ function isInitInLoop(path2) {
61252
+ const isFunctionDeclarationOrHasInit = !path2.isVariableDeclarator() || path2.node.init;
61253
61253
  for (let {
61254
61254
  parentPath,
61255
61255
  key
61256
- } = path; parentPath; {
61256
+ } = path2; parentPath; {
61257
61257
  parentPath,
61258
61258
  key
61259
61259
  } = parentPath) {
@@ -61293,11 +61293,11 @@ var require_cache4 = __commonJS({
61293
61293
  function clearScope() {
61294
61294
  exports.scope = scope = /* @__PURE__ */ new WeakMap();
61295
61295
  }
61296
- function getCachedPaths(path) {
61296
+ function getCachedPaths(path2) {
61297
61297
  const {
61298
61298
  parent: parent2,
61299
61299
  parentPath
61300
- } = path;
61300
+ } = path2;
61301
61301
  return pathsCache.get(parent2);
61302
61302
  }
61303
61303
  function getOrCreateCachedPaths(node, parentPath) {
@@ -61574,128 +61574,128 @@ var require_scope = __commonJS({
61574
61574
  scope.bindings = /* @__PURE__ */ Object.create(null);
61575
61575
  scope.globals = /* @__PURE__ */ Object.create(null);
61576
61576
  }
61577
- function isAnonymousFunctionExpression(path) {
61578
- return path.isFunctionExpression() && !path.node.id || path.isArrowFunctionExpression();
61577
+ function isAnonymousFunctionExpression(path2) {
61578
+ return path2.isFunctionExpression() && !path2.node.id || path2.isArrowFunctionExpression();
61579
61579
  }
61580
61580
  var NOT_LOCAL_BINDING = /* @__PURE__ */ Symbol.for("should not be considered a local binding");
61581
61581
  var collectorVisitor = {
61582
- ForStatement(path) {
61583
- const declar = path.get("init");
61582
+ ForStatement(path2) {
61583
+ const declar = path2.get("init");
61584
61584
  if (declar.isVar()) {
61585
61585
  const {
61586
61586
  scope
61587
- } = path;
61587
+ } = path2;
61588
61588
  const parentScope = scope.getFunctionParent() || scope.getProgramParent();
61589
61589
  parentScope.registerBinding("var", declar);
61590
61590
  }
61591
61591
  },
61592
- Declaration(path) {
61593
- if (path.isBlockScoped()) return;
61594
- if (path.isImportDeclaration()) return;
61595
- if (path.isExportDeclaration()) return;
61596
- const parent2 = path.scope.getFunctionParent() || path.scope.getProgramParent();
61597
- parent2.registerDeclaration(path);
61592
+ Declaration(path2) {
61593
+ if (path2.isBlockScoped()) return;
61594
+ if (path2.isImportDeclaration()) return;
61595
+ if (path2.isExportDeclaration()) return;
61596
+ const parent2 = path2.scope.getFunctionParent() || path2.scope.getProgramParent();
61597
+ parent2.registerDeclaration(path2);
61598
61598
  },
61599
- ImportDeclaration(path) {
61600
- const parent2 = path.scope.getBlockParent();
61601
- parent2.registerDeclaration(path);
61599
+ ImportDeclaration(path2) {
61600
+ const parent2 = path2.scope.getBlockParent();
61601
+ parent2.registerDeclaration(path2);
61602
61602
  },
61603
- TSImportEqualsDeclaration(path) {
61604
- const parent2 = path.scope.getBlockParent();
61605
- parent2.registerDeclaration(path);
61603
+ TSImportEqualsDeclaration(path2) {
61604
+ const parent2 = path2.scope.getBlockParent();
61605
+ parent2.registerDeclaration(path2);
61606
61606
  },
61607
- ReferencedIdentifier(path, state) {
61608
- if (t2.isTSQualifiedName(path.parent) && path.parent.right === path.node) {
61607
+ ReferencedIdentifier(path2, state) {
61608
+ if (t2.isTSQualifiedName(path2.parent) && path2.parent.right === path2.node) {
61609
61609
  return;
61610
61610
  }
61611
- if (path.parentPath.isTSImportEqualsDeclaration()) return;
61612
- state.references.push(path);
61611
+ if (path2.parentPath.isTSImportEqualsDeclaration()) return;
61612
+ state.references.push(path2);
61613
61613
  },
61614
- ForXStatement(path, state) {
61615
- const left = path.get("left");
61614
+ ForXStatement(path2, state) {
61615
+ const left = path2.get("left");
61616
61616
  if (left.isPattern() || left.isIdentifier()) {
61617
- state.constantViolations.push(path);
61617
+ state.constantViolations.push(path2);
61618
61618
  } else if (left.isVar()) {
61619
61619
  const {
61620
61620
  scope
61621
- } = path;
61621
+ } = path2;
61622
61622
  const parentScope = scope.getFunctionParent() || scope.getProgramParent();
61623
61623
  parentScope.registerBinding("var", left);
61624
61624
  }
61625
61625
  },
61626
61626
  ExportDeclaration: {
61627
- exit(path) {
61627
+ exit(path2) {
61628
61628
  const {
61629
61629
  node,
61630
61630
  scope
61631
- } = path;
61631
+ } = path2;
61632
61632
  if (isExportAllDeclaration(node)) return;
61633
61633
  const declar = node.declaration;
61634
61634
  if (isClassDeclaration(declar) || isFunctionDeclaration(declar)) {
61635
61635
  const id = declar.id;
61636
61636
  if (!id) return;
61637
61637
  const binding = scope.getBinding(id.name);
61638
- binding == null || binding.reference(path);
61638
+ binding == null || binding.reference(path2);
61639
61639
  } else if (isVariableDeclaration(declar)) {
61640
61640
  for (const decl of declar.declarations) {
61641
61641
  for (const name of Object.keys(getBindingIdentifiers(decl))) {
61642
61642
  const binding = scope.getBinding(name);
61643
- binding == null || binding.reference(path);
61643
+ binding == null || binding.reference(path2);
61644
61644
  }
61645
61645
  }
61646
61646
  }
61647
61647
  }
61648
61648
  },
61649
- LabeledStatement(path) {
61650
- path.scope.getBlockParent().registerDeclaration(path);
61649
+ LabeledStatement(path2) {
61650
+ path2.scope.getBlockParent().registerDeclaration(path2);
61651
61651
  },
61652
- AssignmentExpression(path, state) {
61653
- state.assignments.push(path);
61652
+ AssignmentExpression(path2, state) {
61653
+ state.assignments.push(path2);
61654
61654
  },
61655
- UpdateExpression(path, state) {
61656
- state.constantViolations.push(path);
61655
+ UpdateExpression(path2, state) {
61656
+ state.constantViolations.push(path2);
61657
61657
  },
61658
- UnaryExpression(path, state) {
61659
- if (path.node.operator === "delete") {
61660
- state.constantViolations.push(path);
61658
+ UnaryExpression(path2, state) {
61659
+ if (path2.node.operator === "delete") {
61660
+ state.constantViolations.push(path2);
61661
61661
  }
61662
61662
  },
61663
- BlockScoped(path) {
61664
- let scope = path.scope;
61665
- if (scope.path === path) scope = scope.parent;
61663
+ BlockScoped(path2) {
61664
+ let scope = path2.scope;
61665
+ if (scope.path === path2) scope = scope.parent;
61666
61666
  const parent2 = scope.getBlockParent();
61667
- parent2.registerDeclaration(path);
61668
- if (path.isClassDeclaration() && path.node.id) {
61669
- const id = path.node.id;
61667
+ parent2.registerDeclaration(path2);
61668
+ if (path2.isClassDeclaration() && path2.node.id) {
61669
+ const id = path2.node.id;
61670
61670
  const name = id.name;
61671
- path.scope.bindings[name] = path.scope.parent.getBinding(name);
61671
+ path2.scope.bindings[name] = path2.scope.parent.getBinding(name);
61672
61672
  }
61673
61673
  },
61674
- CatchClause(path) {
61675
- path.scope.registerBinding("let", path);
61674
+ CatchClause(path2) {
61675
+ path2.scope.registerBinding("let", path2);
61676
61676
  },
61677
- Function(path) {
61678
- const params = path.get("params");
61677
+ Function(path2) {
61678
+ const params = path2.get("params");
61679
61679
  for (const param of params) {
61680
- path.scope.registerBinding("param", param);
61680
+ path2.scope.registerBinding("param", param);
61681
61681
  }
61682
- if (path.isFunctionExpression() && path.node.id && !path.node.id[NOT_LOCAL_BINDING]) {
61683
- path.scope.registerBinding("local", path.get("id"), path);
61682
+ if (path2.isFunctionExpression() && path2.node.id && !path2.node.id[NOT_LOCAL_BINDING]) {
61683
+ path2.scope.registerBinding("local", path2.get("id"), path2);
61684
61684
  }
61685
61685
  },
61686
- ClassExpression(path) {
61687
- if (path.node.id && !path.node.id[NOT_LOCAL_BINDING]) {
61688
- path.scope.registerBinding("local", path.get("id"), path);
61686
+ ClassExpression(path2) {
61687
+ if (path2.node.id && !path2.node.id[NOT_LOCAL_BINDING]) {
61688
+ path2.scope.registerBinding("local", path2.get("id"), path2);
61689
61689
  }
61690
61690
  },
61691
- TSTypeAnnotation(path) {
61692
- path.skip();
61691
+ TSTypeAnnotation(path2) {
61692
+ path2.skip();
61693
61693
  }
61694
61694
  };
61695
61695
  var scopeVisitor;
61696
61696
  var uid = 0;
61697
61697
  var Scope = class _Scope {
61698
- constructor(path) {
61698
+ constructor(path2) {
61699
61699
  this.uid = void 0;
61700
61700
  this.path = void 0;
61701
61701
  this.block = void 0;
@@ -61709,15 +61709,15 @@ var require_scope = __commonJS({
61709
61709
  this.crawling = void 0;
61710
61710
  const {
61711
61711
  node
61712
- } = path;
61712
+ } = path2;
61713
61713
  const cached = _cache.scope.get(node);
61714
- if ((cached == null ? void 0 : cached.path) === path) {
61714
+ if ((cached == null ? void 0 : cached.path) === path2) {
61715
61715
  return cached;
61716
61716
  }
61717
61717
  _cache.scope.set(node, this);
61718
61718
  this.uid = uid++;
61719
61719
  this.block = node;
61720
- this.path = path;
61720
+ this.path = path2;
61721
61721
  this.labels = /* @__PURE__ */ new Map();
61722
61722
  this.inited = false;
61723
61723
  Object.defineProperties(this, {
@@ -61737,14 +61737,14 @@ var require_scope = __commonJS({
61737
61737
  }
61738
61738
  get parent() {
61739
61739
  var _parent;
61740
- let parent2, path = this.path;
61740
+ let parent2, path2 = this.path;
61741
61741
  do {
61742
61742
  var _path;
61743
- const shouldSkip = path.key === "key" || path.listKey === "decorators";
61744
- path = path.parentPath;
61745
- if (shouldSkip && path.isMethod()) path = path.parentPath;
61746
- if ((_path = path) != null && _path.isScope()) parent2 = path;
61747
- } while (path && !parent2);
61743
+ const shouldSkip = path2.key === "key" || path2.listKey === "decorators";
61744
+ path2 = path2.parentPath;
61745
+ if (shouldSkip && path2.isMethod()) path2 = path2.parentPath;
61746
+ if ((_path = path2) != null && _path.isScope()) parent2 = path2;
61747
+ } while (path2 && !parent2);
61748
61748
  return (_parent = parent2) == null ? void 0 : _parent.scope;
61749
61749
  }
61750
61750
  get references() {
@@ -61857,62 +61857,62 @@ var require_scope = __commonJS({
61857
61857
  getLabel(name) {
61858
61858
  return this.labels.get(name);
61859
61859
  }
61860
- registerLabel(path) {
61861
- this.labels.set(path.node.label.name, path);
61860
+ registerLabel(path2) {
61861
+ this.labels.set(path2.node.label.name, path2);
61862
61862
  }
61863
- registerDeclaration(path) {
61864
- if (path.isLabeledStatement()) {
61865
- this.registerLabel(path);
61866
- } else if (path.isFunctionDeclaration()) {
61867
- this.registerBinding("hoisted", path.get("id"), path);
61868
- } else if (path.isVariableDeclaration()) {
61869
- const declarations = path.get("declarations");
61863
+ registerDeclaration(path2) {
61864
+ if (path2.isLabeledStatement()) {
61865
+ this.registerLabel(path2);
61866
+ } else if (path2.isFunctionDeclaration()) {
61867
+ this.registerBinding("hoisted", path2.get("id"), path2);
61868
+ } else if (path2.isVariableDeclaration()) {
61869
+ const declarations = path2.get("declarations");
61870
61870
  const {
61871
61871
  kind: kind2
61872
- } = path.node;
61872
+ } = path2.node;
61873
61873
  for (const declar of declarations) {
61874
61874
  this.registerBinding(kind2 === "using" || kind2 === "await using" ? "const" : kind2, declar);
61875
61875
  }
61876
- } else if (path.isClassDeclaration()) {
61877
- if (path.node.declare) return;
61878
- this.registerBinding("let", path);
61879
- } else if (path.isImportDeclaration()) {
61880
- const isTypeDeclaration = path.node.importKind === "type" || path.node.importKind === "typeof";
61881
- const specifiers = path.get("specifiers");
61876
+ } else if (path2.isClassDeclaration()) {
61877
+ if (path2.node.declare) return;
61878
+ this.registerBinding("let", path2);
61879
+ } else if (path2.isImportDeclaration()) {
61880
+ const isTypeDeclaration = path2.node.importKind === "type" || path2.node.importKind === "typeof";
61881
+ const specifiers = path2.get("specifiers");
61882
61882
  for (const specifier of specifiers) {
61883
61883
  const isTypeSpecifier = isTypeDeclaration || specifier.isImportSpecifier() && (specifier.node.importKind === "type" || specifier.node.importKind === "typeof");
61884
61884
  this.registerBinding(isTypeSpecifier ? "unknown" : "module", specifier);
61885
61885
  }
61886
- } else if (path.isExportDeclaration()) {
61887
- const declar = path.get("declaration");
61886
+ } else if (path2.isExportDeclaration()) {
61887
+ const declar = path2.get("declaration");
61888
61888
  if (declar.isClassDeclaration() || declar.isFunctionDeclaration() || declar.isVariableDeclaration()) {
61889
61889
  this.registerDeclaration(declar);
61890
61890
  }
61891
61891
  } else {
61892
- this.registerBinding("unknown", path);
61892
+ this.registerBinding("unknown", path2);
61893
61893
  }
61894
61894
  }
61895
61895
  buildUndefinedNode() {
61896
61896
  return buildUndefinedNode();
61897
61897
  }
61898
- registerConstantViolation(path) {
61899
- const ids = path.getAssignmentIdentifiers();
61898
+ registerConstantViolation(path2) {
61899
+ const ids = path2.getAssignmentIdentifiers();
61900
61900
  for (const name of Object.keys(ids)) {
61901
61901
  var _this$getBinding;
61902
- (_this$getBinding = this.getBinding(name)) == null || _this$getBinding.reassign(path);
61902
+ (_this$getBinding = this.getBinding(name)) == null || _this$getBinding.reassign(path2);
61903
61903
  }
61904
61904
  }
61905
- registerBinding(kind2, path, bindingPath = path) {
61905
+ registerBinding(kind2, path2, bindingPath = path2) {
61906
61906
  if (!kind2) throw new ReferenceError("no `kind`");
61907
- if (path.isVariableDeclaration()) {
61908
- const declarators = path.get("declarations");
61907
+ if (path2.isVariableDeclaration()) {
61908
+ const declarators = path2.get("declarations");
61909
61909
  for (const declar of declarators) {
61910
61910
  this.registerBinding(kind2, declar);
61911
61911
  }
61912
61912
  return;
61913
61913
  }
61914
61914
  const parent2 = this.getProgramParent();
61915
- const ids = path.getOuterBindingIdentifiers(true);
61915
+ const ids = path2.getOuterBindingIdentifiers(true);
61916
61916
  for (const name of Object.keys(ids)) {
61917
61917
  parent2.references[name] = true;
61918
61918
  for (const id of ids[name]) {
@@ -62054,7 +62054,7 @@ var require_scope = __commonJS({
62054
62054
  }
62055
62055
  }
62056
62056
  crawl() {
62057
- const path = this.path;
62057
+ const path2 = this.path;
62058
62058
  resetScope(this);
62059
62059
  this.data = /* @__PURE__ */ Object.create(null);
62060
62060
  let scope = this;
@@ -62072,27 +62072,27 @@ var require_scope = __commonJS({
62072
62072
  };
62073
62073
  this.crawling = true;
62074
62074
  scopeVisitor || (scopeVisitor = _index.default.visitors.merge([{
62075
- Scope(path2) {
62076
- resetScope(path2.scope);
62075
+ Scope(path3) {
62076
+ resetScope(path3.scope);
62077
62077
  }
62078
62078
  }, collectorVisitor]));
62079
- if (path.type !== "Program") {
62080
- const typeVisitors = scopeVisitor[path.type];
62079
+ if (path2.type !== "Program") {
62080
+ const typeVisitors = scopeVisitor[path2.type];
62081
62081
  if (typeVisitors) {
62082
62082
  for (const visit of typeVisitors.enter) {
62083
- visit.call(state, path, state);
62083
+ visit.call(state, path2, state);
62084
62084
  }
62085
62085
  }
62086
62086
  }
62087
- path.traverse(scopeVisitor, state);
62087
+ path2.traverse(scopeVisitor, state);
62088
62088
  this.crawling = false;
62089
- for (const path2 of state.assignments) {
62090
- const ids = path2.getAssignmentIdentifiers();
62089
+ for (const path3 of state.assignments) {
62090
+ const ids = path3.getAssignmentIdentifiers();
62091
62091
  for (const name of Object.keys(ids)) {
62092
- if (path2.scope.getBinding(name)) continue;
62092
+ if (path3.scope.getBinding(name)) continue;
62093
62093
  programParent.addGlobal(ids[name]);
62094
62094
  }
62095
- path2.scope.registerConstantViolation(path2);
62095
+ path3.scope.registerConstantViolation(path3);
62096
62096
  }
62097
62097
  for (const ref of state.references) {
62098
62098
  const binding = ref.scope.getBinding(ref.node.name);
@@ -62102,19 +62102,19 @@ var require_scope = __commonJS({
62102
62102
  programParent.addGlobal(ref.node);
62103
62103
  }
62104
62104
  }
62105
- for (const path2 of state.constantViolations) {
62106
- path2.scope.registerConstantViolation(path2);
62105
+ for (const path3 of state.constantViolations) {
62106
+ path3.scope.registerConstantViolation(path3);
62107
62107
  }
62108
62108
  }
62109
62109
  push(opts) {
62110
- let path = this.path;
62111
- if (path.isPattern()) {
62112
- path = this.getPatternParent().path;
62113
- } else if (!path.isBlockStatement() && !path.isProgram()) {
62114
- path = this.getBlockParent().path;
62110
+ let path2 = this.path;
62111
+ if (path2.isPattern()) {
62112
+ path2 = this.getPatternParent().path;
62113
+ } else if (!path2.isBlockStatement() && !path2.isProgram()) {
62114
+ path2 = this.getBlockParent().path;
62115
62115
  }
62116
- if (path.isSwitchStatement()) {
62117
- path = (this.getFunctionParent() || this.getProgramParent()).path;
62116
+ if (path2.isSwitchStatement()) {
62117
+ path2 = (this.getFunctionParent() || this.getProgramParent()).path;
62118
62118
  }
62119
62119
  const {
62120
62120
  init: init3,
@@ -62122,29 +62122,29 @@ var require_scope = __commonJS({
62122
62122
  kind: kind2 = "var",
62123
62123
  id
62124
62124
  } = opts;
62125
- if (!init3 && !unique && (kind2 === "var" || kind2 === "let") && isAnonymousFunctionExpression(path) && isCallExpression(path.parent, {
62126
- callee: path.node
62127
- }) && path.parent.arguments.length <= path.node.params.length && isIdentifier2(id)) {
62128
- path.pushContainer("params", id);
62129
- path.scope.registerBinding("param", path.get("params")[path.node.params.length - 1]);
62125
+ if (!init3 && !unique && (kind2 === "var" || kind2 === "let") && isAnonymousFunctionExpression(path2) && isCallExpression(path2.parent, {
62126
+ callee: path2.node
62127
+ }) && path2.parent.arguments.length <= path2.node.params.length && isIdentifier2(id)) {
62128
+ path2.pushContainer("params", id);
62129
+ path2.scope.registerBinding("param", path2.get("params")[path2.node.params.length - 1]);
62130
62130
  return;
62131
62131
  }
62132
- if (path.isLoop() || path.isCatchClause() || path.isFunction()) {
62133
- path.ensureBlock();
62134
- path = path.get("body");
62132
+ if (path2.isLoop() || path2.isCatchClause() || path2.isFunction()) {
62133
+ path2.ensureBlock();
62134
+ path2 = path2.get("body");
62135
62135
  }
62136
62136
  const blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist;
62137
62137
  const dataKey = `declaration:${kind2}:${blockHoist}`;
62138
- let declarPath = !unique && path.getData(dataKey);
62138
+ let declarPath = !unique && path2.getData(dataKey);
62139
62139
  if (!declarPath) {
62140
62140
  const declar = variableDeclaration(kind2, []);
62141
62141
  declar._blockHoist = blockHoist;
62142
- [declarPath] = path.unshiftContainer("body", [declar]);
62143
- if (!unique) path.setData(dataKey, declarPath);
62142
+ [declarPath] = path2.unshiftContainer("body", [declar]);
62143
+ if (!unique) path2.setData(dataKey, declarPath);
62144
62144
  }
62145
62145
  const declarator = variableDeclarator(id, init3);
62146
62146
  const len = declarPath.node.declarations.push(declarator);
62147
- path.scope.registerBinding(kind2, declarPath.get("declarations")[len - 1]);
62147
+ path2.scope.registerBinding(kind2, declarPath.get("declarations")[len - 1]);
62148
62148
  }
62149
62149
  getProgramParent() {
62150
62150
  let scope = this;
@@ -62289,15 +62289,15 @@ var require_scope = __commonJS({
62289
62289
  const binding = this.bindings[name];
62290
62290
  if (!binding) continue;
62291
62291
  const {
62292
- path
62292
+ path: path2
62293
62293
  } = binding;
62294
- if (!path.isVariableDeclarator()) continue;
62294
+ if (!path2.isVariableDeclarator()) continue;
62295
62295
  const {
62296
62296
  parent: parent2,
62297
62297
  parentPath
62298
- } = path;
62298
+ } = path2;
62299
62299
  if (parent2.kind !== "var" || seen.has(parent2)) continue;
62300
- seen.add(path.parent);
62300
+ seen.add(path2.parent);
62301
62301
  let firstId;
62302
62302
  const init3 = [];
62303
62303
  for (const decl of parent2.declarations) {
@@ -62906,16 +62906,16 @@ var require_resolve_uri_umd = __commonJS({
62906
62906
  }
62907
62907
  function parseFileUrl(input2) {
62908
62908
  const match = fileRegex.exec(input2);
62909
- const path = match[2];
62910
- return makeUrl("file:", "", match[1] || "", "", isAbsolutePath(path) ? path : "/" + path, match[3] || "", match[4] || "");
62909
+ const path2 = match[2];
62910
+ return makeUrl("file:", "", match[1] || "", "", isAbsolutePath(path2) ? path2 : "/" + path2, match[3] || "", match[4] || "");
62911
62911
  }
62912
- function makeUrl(scheme, user, host, port, path, query, hash) {
62912
+ function makeUrl(scheme, user, host, port, path2, query, hash) {
62913
62913
  return {
62914
62914
  scheme,
62915
62915
  user,
62916
62916
  host,
62917
62917
  port,
62918
- path,
62918
+ path: path2,
62919
62919
  query,
62920
62920
  hash,
62921
62921
  type: 7
@@ -62945,11 +62945,11 @@ var require_resolve_uri_umd = __commonJS({
62945
62945
  url.type = input2 ? input2.startsWith("?") ? 3 : input2.startsWith("#") ? 2 : 4 : 1;
62946
62946
  return url;
62947
62947
  }
62948
- function stripPathFilename(path) {
62949
- if (path.endsWith("/.."))
62950
- return path;
62951
- const index2 = path.lastIndexOf("/");
62952
- return path.slice(0, index2 + 1);
62948
+ function stripPathFilename(path2) {
62949
+ if (path2.endsWith("/.."))
62950
+ return path2;
62951
+ const index2 = path2.lastIndexOf("/");
62952
+ return path2.slice(0, index2 + 1);
62953
62953
  }
62954
62954
  function mergePaths(url, base) {
62955
62955
  normalizePath2(base, base.type);
@@ -62987,16 +62987,16 @@ var require_resolve_uri_umd = __commonJS({
62987
62987
  pieces[pointer++] = piece;
62988
62988
  positive++;
62989
62989
  }
62990
- let path = "";
62990
+ let path2 = "";
62991
62991
  for (let i = 1; i < pointer; i++) {
62992
- path += "/" + pieces[i];
62992
+ path2 += "/" + pieces[i];
62993
62993
  }
62994
- if (!path || addTrailingSlash && !path.endsWith("/..")) {
62995
- path += "/";
62994
+ if (!path2 || addTrailingSlash && !path2.endsWith("/..")) {
62995
+ path2 += "/";
62996
62996
  }
62997
- url.path = path;
62997
+ url.path = path2;
62998
62998
  }
62999
- function resolve9(input2, base) {
62999
+ function resolve8(input2, base) {
63000
63000
  if (!input2 && !base)
63001
63001
  return "";
63002
63002
  const url = parseUrl(input2);
@@ -63035,13 +63035,13 @@ var require_resolve_uri_umd = __commonJS({
63035
63035
  case 3:
63036
63036
  return queryHash;
63037
63037
  case 4: {
63038
- const path = url.path.slice(1);
63039
- if (!path)
63038
+ const path2 = url.path.slice(1);
63039
+ if (!path2)
63040
63040
  return queryHash || ".";
63041
- if (isRelative(base || input2) && !isRelative(path)) {
63042
- return "./" + path + queryHash;
63041
+ if (isRelative(base || input2) && !isRelative(path2)) {
63042
+ return "./" + path2 + queryHash;
63043
63043
  }
63044
- return path + queryHash;
63044
+ return path2 + queryHash;
63045
63045
  }
63046
63046
  case 5:
63047
63047
  return url.path + queryHash;
@@ -63049,7 +63049,7 @@ var require_resolve_uri_umd = __commonJS({
63049
63049
  return url.scheme + "//" + url.user + url.host + url.port + url.path + queryHash;
63050
63050
  }
63051
63051
  }
63052
- return resolve9;
63052
+ return resolve8;
63053
63053
  }));
63054
63054
  }
63055
63055
  });
@@ -63142,10 +63142,10 @@ var require_trace_mapping_umd = __commonJS({
63142
63142
  module2.exports = __toCommonJS(trace_mapping_exports);
63143
63143
  var import_sourcemap_codec = __toESM2(require_sourcemap_codec());
63144
63144
  var import_resolve_uri = __toESM2(require_resolve_uri());
63145
- function stripFilename(path) {
63146
- if (!path) return "";
63147
- const index2 = path.lastIndexOf("/");
63148
- return path.slice(0, index2 + 1);
63145
+ function stripFilename(path2) {
63146
+ if (!path2) return "";
63147
+ const index2 = path2.lastIndexOf("/");
63148
+ return path2.slice(0, index2 + 1);
63149
63149
  }
63150
63150
  function resolver(mapUrl, sourceRoot) {
63151
63151
  const from = stripFilename(mapUrl);
@@ -63396,8 +63396,8 @@ var require_trace_mapping_umd = __commonJS({
63396
63396
  this.sources = sources;
63397
63397
  this.sourcesContent = sourcesContent;
63398
63398
  this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
63399
- const resolve9 = resolver(mapUrl, sourceRoot);
63400
- this.resolvedSources = sources.map(resolve9);
63399
+ const resolve8 = resolver(mapUrl, sourceRoot);
63400
+ this.resolvedSources = sources.map(resolve8);
63401
63401
  const { mappings } = parsed;
63402
63402
  if (typeof mappings === "string") {
63403
63403
  this._encoded = mappings;
@@ -69481,56 +69481,56 @@ var require_ancestry = __commonJS({
69481
69481
  VISITOR_KEYS
69482
69482
  } = _t;
69483
69483
  function findParent(callback) {
69484
- let path = this;
69485
- while (path = path.parentPath) {
69486
- if (callback(path)) return path;
69484
+ let path2 = this;
69485
+ while (path2 = path2.parentPath) {
69486
+ if (callback(path2)) return path2;
69487
69487
  }
69488
69488
  return null;
69489
69489
  }
69490
69490
  function find6(callback) {
69491
- let path = this;
69491
+ let path2 = this;
69492
69492
  do {
69493
- if (callback(path)) return path;
69494
- } while (path = path.parentPath);
69493
+ if (callback(path2)) return path2;
69494
+ } while (path2 = path2.parentPath);
69495
69495
  return null;
69496
69496
  }
69497
69497
  function getFunctionParent() {
69498
69498
  return this.findParent((p) => p.isFunction());
69499
69499
  }
69500
69500
  function getStatementParent() {
69501
- let path = this;
69501
+ let path2 = this;
69502
69502
  do {
69503
- if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
69503
+ if (!path2.parentPath || Array.isArray(path2.container) && path2.isStatement()) {
69504
69504
  break;
69505
69505
  } else {
69506
- path = path.parentPath;
69506
+ path2 = path2.parentPath;
69507
69507
  }
69508
- } while (path);
69509
- if (path && (path.isProgram() || path.isFile())) {
69508
+ } while (path2);
69509
+ if (path2 && (path2.isProgram() || path2.isFile())) {
69510
69510
  throw new Error("File/Program node, we can't possibly find a statement parent to this");
69511
69511
  }
69512
- return path;
69512
+ return path2;
69513
69513
  }
69514
69514
  function getEarliestCommonAncestorFrom(paths) {
69515
69515
  return this.getDeepestCommonAncestorFrom(paths, function(deepest, i, ancestries) {
69516
69516
  let earliest;
69517
69517
  const keys = VISITOR_KEYS[deepest.type];
69518
69518
  for (const ancestry of ancestries) {
69519
- const path = ancestry[i + 1];
69519
+ const path2 = ancestry[i + 1];
69520
69520
  if (!earliest) {
69521
- earliest = path;
69521
+ earliest = path2;
69522
69522
  continue;
69523
69523
  }
69524
- if (path.listKey && earliest.listKey === path.listKey) {
69525
- if (path.key < earliest.key) {
69526
- earliest = path;
69524
+ if (path2.listKey && earliest.listKey === path2.listKey) {
69525
+ if (path2.key < earliest.key) {
69526
+ earliest = path2;
69527
69527
  continue;
69528
69528
  }
69529
69529
  }
69530
69530
  const earliestKeyIndex = keys.indexOf(earliest.parentKey);
69531
- const currentKeyIndex = keys.indexOf(path.parentKey);
69531
+ const currentKeyIndex = keys.indexOf(path2.parentKey);
69532
69532
  if (earliestKeyIndex > currentKeyIndex) {
69533
- earliest = path;
69533
+ earliest = path2;
69534
69534
  }
69535
69535
  }
69536
69536
  return earliest;
@@ -69545,11 +69545,11 @@ var require_ancestry = __commonJS({
69545
69545
  }
69546
69546
  let minDepth = Infinity;
69547
69547
  let lastCommonIndex, lastCommon;
69548
- const ancestries = paths.map((path) => {
69548
+ const ancestries = paths.map((path2) => {
69549
69549
  const ancestry = [];
69550
69550
  do {
69551
- ancestry.unshift(path);
69552
- } while ((path = path.parentPath) && path !== this);
69551
+ ancestry.unshift(path2);
69552
+ } while ((path2 = path2.parentPath) && path2 !== this);
69553
69553
  if (ancestry.length < minDepth) {
69554
69554
  minDepth = ancestry.length;
69555
69555
  }
@@ -69577,11 +69577,11 @@ var require_ancestry = __commonJS({
69577
69577
  }
69578
69578
  }
69579
69579
  function getAncestry() {
69580
- let path = this;
69580
+ let path2 = this;
69581
69581
  const paths = [];
69582
69582
  do {
69583
- paths.push(path);
69584
- } while (path = path.parentPath);
69583
+ paths.push(path2);
69584
+ } while (path2 = path2.parentPath);
69585
69585
  return paths;
69586
69586
  }
69587
69587
  function isAncestor(maybeDescendant) {
@@ -69591,10 +69591,10 @@ var require_ancestry = __commonJS({
69591
69591
  return !!this.findParent((parent2) => parent2 === maybeAncestor);
69592
69592
  }
69593
69593
  function inType(...candidateTypes) {
69594
- let path = this;
69595
- while (path) {
69596
- if (candidateTypes.includes(path.node.type)) return true;
69597
- path = path.parentPath;
69594
+ let path2 = this;
69595
+ while (path2) {
69596
+ if (candidateTypes.includes(path2.node.type)) return true;
69597
+ path2 = path2.parentPath;
69598
69598
  }
69599
69599
  return false;
69600
69600
  }
@@ -69667,14 +69667,14 @@ var require_inferer_reference = __commonJS({
69667
69667
  } else if (node.name === "arguments") {
69668
69668
  }
69669
69669
  }
69670
- function getTypeAnnotationBindingConstantViolations(binding, path, name) {
69670
+ function getTypeAnnotationBindingConstantViolations(binding, path2, name) {
69671
69671
  const types = [];
69672
69672
  const functionConstantViolations = [];
69673
- let constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations);
69674
- const testType = getConditionalAnnotation(binding, path, name);
69673
+ let constantViolations = getConstantViolationsBefore(binding, path2, functionConstantViolations);
69674
+ const testType = getConditionalAnnotation(binding, path2, name);
69675
69675
  if (testType) {
69676
69676
  const testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement);
69677
- constantViolations = constantViolations.filter((path2) => !testConstantViolations.includes(path2));
69677
+ constantViolations = constantViolations.filter((path3) => !testConstantViolations.includes(path3));
69678
69678
  types.push(testType.typeAnnotation);
69679
69679
  }
69680
69680
  if (constantViolations.length) {
@@ -69688,20 +69688,20 @@ var require_inferer_reference = __commonJS({
69688
69688
  }
69689
69689
  return (0, _util.createUnionType)(types);
69690
69690
  }
69691
- function getConstantViolationsBefore(binding, path, functions) {
69691
+ function getConstantViolationsBefore(binding, path2, functions) {
69692
69692
  const violations = binding.constantViolations.slice();
69693
69693
  violations.unshift(binding.path);
69694
69694
  return violations.filter((violation) => {
69695
69695
  violation = violation.resolve();
69696
- const status = violation._guessExecutionStatusRelativeTo(path);
69696
+ const status = violation._guessExecutionStatusRelativeTo(path2);
69697
69697
  if (functions && status === "unknown") functions.push(violation);
69698
69698
  return status === "before";
69699
69699
  });
69700
69700
  }
69701
- function inferAnnotationFromBinaryExpression(name, path) {
69702
- const operator = path.node.operator;
69703
- const right = path.get("right").resolve();
69704
- const left = path.get("left").resolve();
69701
+ function inferAnnotationFromBinaryExpression(name, path2) {
69702
+ const operator = path2.node.operator;
69703
+ const right = path2.get("right").resolve();
69704
+ const left = path2.get("left").resolve();
69705
69705
  let target;
69706
69706
  if (left.isIdentifier({
69707
69707
  name
@@ -69745,11 +69745,11 @@ var require_inferer_reference = __commonJS({
69745
69745
  if (typeof typeValue !== "string") return;
69746
69746
  return createTypeAnnotationBasedOnTypeof(typeValue);
69747
69747
  }
69748
- function getParentConditionalPath(binding, path, name) {
69748
+ function getParentConditionalPath(binding, path2, name) {
69749
69749
  let parentPath;
69750
- while (parentPath = path.parentPath) {
69750
+ while (parentPath = path2.parentPath) {
69751
69751
  if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {
69752
- if (path.key === "test") {
69752
+ if (path2.key === "test") {
69753
69753
  return;
69754
69754
  }
69755
69755
  return parentPath;
@@ -69757,24 +69757,24 @@ var require_inferer_reference = __commonJS({
69757
69757
  if (parentPath.isFunction()) {
69758
69758
  if (name == null || parentPath.parentPath.scope.getBinding(name) !== binding) return;
69759
69759
  }
69760
- path = parentPath;
69760
+ path2 = parentPath;
69761
69761
  }
69762
69762
  }
69763
- function getConditionalAnnotation(binding, path, name) {
69764
- const ifStatement = getParentConditionalPath(binding, path, name);
69763
+ function getConditionalAnnotation(binding, path2, name) {
69764
+ const ifStatement = getParentConditionalPath(binding, path2, name);
69765
69765
  if (!ifStatement) return;
69766
69766
  const test = ifStatement.get("test");
69767
69767
  const paths = [test];
69768
69768
  const types = [];
69769
69769
  for (let i = 0; i < paths.length; i++) {
69770
- const path2 = paths[i];
69771
- if (path2.isLogicalExpression()) {
69772
- if (path2.node.operator === "&&") {
69773
- paths.push(path2.get("left"));
69774
- paths.push(path2.get("right"));
69775
- }
69776
- } else if (path2.isBinaryExpression()) {
69777
- const type = inferAnnotationFromBinaryExpression(name, path2);
69770
+ const path3 = paths[i];
69771
+ if (path3.isLogicalExpression()) {
69772
+ if (path3.node.operator === "&&") {
69773
+ paths.push(path3.get("left"));
69774
+ paths.push(path3.get("right"));
69775
+ }
69776
+ } else if (path3.isBinaryExpression()) {
69777
+ const type = inferAnnotationFromBinaryExpression(name, path3);
69778
69778
  if (type) types.push(type);
69779
69779
  }
69780
69780
  }
@@ -70603,12 +70603,12 @@ var require_hoister = __commonJS({
70603
70603
  variableDeclarator
70604
70604
  } = _t2;
70605
70605
  var referenceVisitor = {
70606
- ReferencedIdentifier(path, state) {
70607
- if (path.isJSXIdentifier() && react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) {
70606
+ ReferencedIdentifier(path2, state) {
70607
+ if (path2.isJSXIdentifier() && react.isCompatTag(path2.node.name) && !path2.parentPath.isJSXMemberExpression()) {
70608
70608
  return;
70609
70609
  }
70610
- if (path.node.name === "this") {
70611
- let scope = path.scope;
70610
+ if (path2.node.name === "this") {
70611
+ let scope = path2.scope;
70612
70612
  do {
70613
70613
  if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) {
70614
70614
  break;
@@ -70616,21 +70616,21 @@ var require_hoister = __commonJS({
70616
70616
  } while (scope = scope.parent);
70617
70617
  if (scope) state.breakOnScopePaths.push(scope.path);
70618
70618
  }
70619
- const binding = path.scope.getBinding(path.node.name);
70619
+ const binding = path2.scope.getBinding(path2.node.name);
70620
70620
  if (!binding) return;
70621
70621
  for (const violation of binding.constantViolations) {
70622
70622
  if (violation.scope !== binding.path.scope) {
70623
70623
  state.mutableBinding = true;
70624
- path.stop();
70624
+ path2.stop();
70625
70625
  return;
70626
70626
  }
70627
70627
  }
70628
- if (binding !== state.scope.getBinding(path.node.name)) return;
70629
- state.bindings[path.node.name] = binding;
70628
+ if (binding !== state.scope.getBinding(path2.node.name)) return;
70629
+ state.bindings[path2.node.name] = binding;
70630
70630
  }
70631
70631
  };
70632
70632
  var PathHoister = class {
70633
- constructor(path, scope) {
70633
+ constructor(path2, scope) {
70634
70634
  this.breakOnScopePaths = void 0;
70635
70635
  this.bindings = void 0;
70636
70636
  this.mutableBinding = void 0;
@@ -70643,7 +70643,7 @@ var require_hoister = __commonJS({
70643
70643
  this.mutableBinding = false;
70644
70644
  this.scopes = [];
70645
70645
  this.scope = scope;
70646
- this.path = path;
70646
+ this.path = path2;
70647
70647
  this.attachAfter = false;
70648
70648
  }
70649
70649
  isCompatibleScope(scope) {
@@ -70669,11 +70669,11 @@ var require_hoister = __commonJS({
70669
70669
  } while (scope = scope.parent);
70670
70670
  }
70671
70671
  getAttachmentPath() {
70672
- let path = this._getAttachmentPath();
70673
- if (!path) return;
70674
- let targetScope = path.scope;
70675
- if (targetScope.path === path) {
70676
- targetScope = path.scope.parent;
70672
+ let path2 = this._getAttachmentPath();
70673
+ if (!path2) return;
70674
+ let targetScope = path2.scope;
70675
+ if (targetScope.path === path2) {
70676
+ targetScope = path2.scope.parent;
70677
70677
  }
70678
70678
  if (targetScope.path.isProgram() || targetScope.path.isFunction()) {
70679
70679
  for (const name of Object.keys(this.bindings)) {
@@ -70683,18 +70683,18 @@ var require_hoister = __commonJS({
70683
70683
  continue;
70684
70684
  }
70685
70685
  const bindingParentPath = this.getAttachmentParentForPath(binding.path);
70686
- if (bindingParentPath.key >= path.key) {
70686
+ if (bindingParentPath.key >= path2.key) {
70687
70687
  this.attachAfter = true;
70688
- path = binding.path;
70688
+ path2 = binding.path;
70689
70689
  for (const violationPath of binding.constantViolations) {
70690
- if (this.getAttachmentParentForPath(violationPath).key > path.key) {
70691
- path = violationPath;
70690
+ if (this.getAttachmentParentForPath(violationPath).key > path2.key) {
70691
+ path2 = violationPath;
70692
70692
  }
70693
70693
  }
70694
70694
  }
70695
70695
  }
70696
70696
  }
70697
- return path;
70697
+ return path2;
70698
70698
  }
70699
70699
  _getAttachmentPath() {
70700
70700
  const scopes = this.scopes;
@@ -70719,13 +70719,13 @@ var require_hoister = __commonJS({
70719
70719
  const scope = this.scopes.pop();
70720
70720
  if (scope) return this.getAttachmentParentForPath(scope.path);
70721
70721
  }
70722
- getAttachmentParentForPath(path) {
70722
+ getAttachmentParentForPath(path2) {
70723
70723
  do {
70724
- if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
70725
- return path;
70724
+ if (!path2.parentPath || Array.isArray(path2.container) && path2.isStatement()) {
70725
+ return path2;
70726
70726
  }
70727
- } while (path = path.parentPath);
70728
- return path;
70727
+ } while (path2 = path2.parentPath);
70728
+ return path2;
70729
70729
  }
70730
70730
  hasOwnParamBindings(scope) {
70731
70731
  for (const name of Object.keys(this.bindings)) {
@@ -70828,18 +70828,18 @@ var require_modification = __commonJS({
70828
70828
  for (let i = 0; i < nodes.length; i++) {
70829
70829
  var _this$context;
70830
70830
  const to = from + i;
70831
- const path = this.getSibling(to);
70832
- paths.push(path);
70831
+ const path2 = this.getSibling(to);
70832
+ paths.push(path2);
70833
70833
  if ((_this$context = this.context) != null && _this$context.queue) {
70834
- _context.pushContext.call(path, this.context);
70834
+ _context.pushContext.call(path2, this.context);
70835
70835
  }
70836
70836
  }
70837
70837
  const contexts = _context._getQueueContexts.call(this);
70838
- for (const path of paths) {
70839
- _context.setScope.call(path);
70840
- path.debug("Inserted.");
70838
+ for (const path2 of paths) {
70839
+ _context.setScope.call(path2);
70840
+ path2.debug("Inserted.");
70841
70841
  for (const context of contexts) {
70842
- context.maybeQueue(path, true);
70842
+ context.maybeQueue(path2, true);
70843
70843
  }
70844
70844
  }
70845
70845
  return paths;
@@ -70851,8 +70851,8 @@ var require_modification = __commonJS({
70851
70851
  return _containerInsert.call(this, this.key + 1, nodes);
70852
70852
  }
70853
70853
  var last2 = (arr) => arr[arr.length - 1];
70854
- function isHiddenInSequenceExpression(path) {
70855
- return isSequenceExpression(path.parent) && (last2(path.parent.expressions) !== path.node || isHiddenInSequenceExpression(path.parentPath));
70854
+ function isHiddenInSequenceExpression(path2) {
70855
+ return isSequenceExpression(path2.parent) && (last2(path2.parent.expressions) !== path2.node || isHiddenInSequenceExpression(path2.parentPath));
70856
70856
  }
70857
70857
  function isAlmostConstantAssignment(node, scope) {
70858
70858
  if (!isAssignmentExpression(node) || !isIdentifier2(node.left)) {
@@ -70926,9 +70926,9 @@ var require_modification = __commonJS({
70926
70926
  if (!this.parent) return;
70927
70927
  const paths = (0, _cache.getCachedPaths)(this);
70928
70928
  if (!paths) return;
70929
- for (const [, path] of paths) {
70930
- if (typeof path.key === "number" && path.container === this.container && path.key >= fromIndex) {
70931
- path.key += incrementBy;
70929
+ for (const [, path2] of paths) {
70930
+ if (typeof path2.key === "number" && path2.container === this.container && path2.key >= fromIndex) {
70931
+ path2.key += incrementBy;
70932
70932
  }
70933
70933
  }
70934
70934
  }
@@ -70962,27 +70962,27 @@ var require_modification = __commonJS({
70962
70962
  _removal._assertUnremoved.call(this);
70963
70963
  const verifiedNodes = _verifyNodeList.call(this, nodes);
70964
70964
  const container = this.node[listKey];
70965
- const path = _index.default.get({
70965
+ const path2 = _index.default.get({
70966
70966
  parentPath: this,
70967
70967
  parent: this.node,
70968
70968
  container,
70969
70969
  listKey,
70970
70970
  key: 0
70971
70971
  }).setContext(this.context);
70972
- return _containerInsertBefore.call(path, verifiedNodes);
70972
+ return _containerInsertBefore.call(path2, verifiedNodes);
70973
70973
  }
70974
70974
  function pushContainer(listKey, nodes) {
70975
70975
  _removal._assertUnremoved.call(this);
70976
70976
  const verifiedNodes = _verifyNodeList.call(this, nodes);
70977
70977
  const container = this.node[listKey];
70978
- const path = _index.default.get({
70978
+ const path2 = _index.default.get({
70979
70979
  parentPath: this,
70980
70980
  parent: this.node,
70981
70981
  container,
70982
70982
  listKey,
70983
70983
  key: container.length
70984
70984
  }).setContext(this.context);
70985
- return path.replaceWithMultiple(verifiedNodes);
70985
+ return path2.replaceWithMultiple(verifiedNodes);
70986
70986
  }
70987
70987
  exports.hoist = function hoist(scope = this.scope) {
70988
70988
  const hoister = new _hoister.default(this, scope);
@@ -71161,9 +71161,9 @@ var require_replacement = __commonJS({
71161
71161
  id
71162
71162
  }));
71163
71163
  const completionRecords = callee.getCompletionRecords();
71164
- for (const path of completionRecords) {
71165
- if (!path.isExpressionStatement()) continue;
71166
- const loop = path.findParent((path2) => path2.isLoop());
71164
+ for (const path2 of completionRecords) {
71165
+ if (!path2.isExpressionStatement()) continue;
71166
+ const loop = path2.findParent((path3) => path3.isLoop());
71167
71167
  if (loop) {
71168
71168
  let uid = loop.getData("expressionReplacementReturnUid");
71169
71169
  if (!uid) {
@@ -71173,9 +71173,9 @@ var require_replacement = __commonJS({
71173
71173
  } else {
71174
71174
  uid = identifier(uid.name);
71175
71175
  }
71176
- path.get("expression").replaceWith(assignmentExpression("=", cloneNode2(uid), path.node.expression));
71176
+ path2.get("expression").replaceWith(assignmentExpression("=", cloneNode2(uid), path2.node.expression));
71177
71177
  } else {
71178
- path.replaceWith(returnStatement(path.node.expression));
71178
+ path2.replaceWith(returnStatement(path2.node.expression));
71179
71179
  }
71180
71180
  }
71181
71181
  callee.arrowFunctionToExpression();
@@ -71285,16 +71285,16 @@ var require_evaluation = __commonJS({
71285
71285
  const res = this.evaluate();
71286
71286
  if (res.confident) return !!res.value;
71287
71287
  }
71288
- function deopt(path, state) {
71288
+ function deopt(path2, state) {
71289
71289
  if (!state.confident) return;
71290
- state.deoptPath = path;
71290
+ state.deoptPath = path2;
71291
71291
  state.confident = false;
71292
71292
  }
71293
71293
  var Globals = /* @__PURE__ */ new Map([["undefined", void 0], ["Infinity", Infinity], ["NaN", NaN]]);
71294
- function evaluateCached(path, state) {
71294
+ function evaluateCached(path2, state) {
71295
71295
  const {
71296
71296
  node
71297
- } = path;
71297
+ } = path2;
71298
71298
  const {
71299
71299
  seen
71300
71300
  } = state;
@@ -71303,7 +71303,7 @@ var require_evaluation = __commonJS({
71303
71303
  if (existing.resolved) {
71304
71304
  return existing.value;
71305
71305
  } else {
71306
- deopt(path, state);
71306
+ deopt(path2, state);
71307
71307
  return;
71308
71308
  }
71309
71309
  } else {
@@ -71311,7 +71311,7 @@ var require_evaluation = __commonJS({
71311
71311
  resolved: false
71312
71312
  };
71313
71313
  seen.set(node, item);
71314
- const val2 = _evaluate(path, state);
71314
+ const val2 = _evaluate(path2, state);
71315
71315
  if (state.confident) {
71316
71316
  item.resolved = true;
71317
71317
  item.value = val2;
@@ -71319,55 +71319,55 @@ var require_evaluation = __commonJS({
71319
71319
  return val2;
71320
71320
  }
71321
71321
  }
71322
- function _evaluate(path, state) {
71322
+ function _evaluate(path2, state) {
71323
71323
  if (!state.confident) return;
71324
- if (path.isSequenceExpression()) {
71325
- const exprs = path.get("expressions");
71324
+ if (path2.isSequenceExpression()) {
71325
+ const exprs = path2.get("expressions");
71326
71326
  return evaluateCached(exprs[exprs.length - 1], state);
71327
71327
  }
71328
- if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) {
71329
- return path.node.value;
71328
+ if (path2.isStringLiteral() || path2.isNumericLiteral() || path2.isBooleanLiteral()) {
71329
+ return path2.node.value;
71330
71330
  }
71331
- if (path.isNullLiteral()) {
71331
+ if (path2.isNullLiteral()) {
71332
71332
  return null;
71333
71333
  }
71334
- if (path.isTemplateLiteral()) {
71335
- return evaluateQuasis(path, path.node.quasis, state);
71334
+ if (path2.isTemplateLiteral()) {
71335
+ return evaluateQuasis(path2, path2.node.quasis, state);
71336
71336
  }
71337
- if (path.isTaggedTemplateExpression() && path.get("tag").isMemberExpression()) {
71338
- const object = path.get("tag.object");
71337
+ if (path2.isTaggedTemplateExpression() && path2.get("tag").isMemberExpression()) {
71338
+ const object = path2.get("tag.object");
71339
71339
  const {
71340
71340
  node: {
71341
71341
  name
71342
71342
  }
71343
71343
  } = object;
71344
- const property = path.get("tag.property");
71345
- if (object.isIdentifier() && name === "String" && !path.scope.getBinding(name) && property.isIdentifier() && property.node.name === "raw") {
71346
- return evaluateQuasis(path, path.node.quasi.quasis, state, true);
71344
+ const property = path2.get("tag.property");
71345
+ if (object.isIdentifier() && name === "String" && !path2.scope.getBinding(name) && property.isIdentifier() && property.node.name === "raw") {
71346
+ return evaluateQuasis(path2, path2.node.quasi.quasis, state, true);
71347
71347
  }
71348
71348
  }
71349
- if (path.isConditionalExpression()) {
71350
- const testResult = evaluateCached(path.get("test"), state);
71349
+ if (path2.isConditionalExpression()) {
71350
+ const testResult = evaluateCached(path2.get("test"), state);
71351
71351
  if (!state.confident) return;
71352
71352
  if (testResult) {
71353
- return evaluateCached(path.get("consequent"), state);
71353
+ return evaluateCached(path2.get("consequent"), state);
71354
71354
  } else {
71355
- return evaluateCached(path.get("alternate"), state);
71355
+ return evaluateCached(path2.get("alternate"), state);
71356
71356
  }
71357
71357
  }
71358
- if (path.isExpressionWrapper()) {
71359
- return evaluateCached(path.get("expression"), state);
71358
+ if (path2.isExpressionWrapper()) {
71359
+ return evaluateCached(path2.get("expression"), state);
71360
71360
  }
71361
- if (path.isMemberExpression() && !path.parentPath.isCallExpression({
71362
- callee: path.node
71361
+ if (path2.isMemberExpression() && !path2.parentPath.isCallExpression({
71362
+ callee: path2.node
71363
71363
  })) {
71364
- const property = path.get("property");
71365
- const object = path.get("object");
71364
+ const property = path2.get("property");
71365
+ const object = path2.get("object");
71366
71366
  if (object.isLiteral()) {
71367
71367
  const value = object.node.value;
71368
71368
  const type = typeof value;
71369
71369
  let key = null;
71370
- if (path.node.computed) {
71370
+ if (path2.node.computed) {
71371
71371
  key = evaluateCached(property, state);
71372
71372
  if (!state.confident) return;
71373
71373
  } else if (property.isIdentifier()) {
@@ -71378,10 +71378,10 @@ var require_evaluation = __commonJS({
71378
71378
  }
71379
71379
  }
71380
71380
  }
71381
- if (path.isReferencedIdentifier()) {
71382
- const binding = path.scope.getBinding(path.node.name);
71381
+ if (path2.isReferencedIdentifier()) {
71382
+ const binding = path2.scope.getBinding(path2.node.name);
71383
71383
  if (binding) {
71384
- if (binding.constantViolations.length > 0 || path.node.start < binding.path.node.end) {
71384
+ if (binding.constantViolations.length > 0 || path2.node.start < binding.path.node.end) {
71385
71385
  deopt(binding.path, state);
71386
71386
  return;
71387
71387
  }
@@ -71390,7 +71390,7 @@ var require_evaluation = __commonJS({
71390
71390
  let hasUnsafeBlock = !bindingPathScope.path.parentPath.isBlockStatement();
71391
71391
  for (let scope = bindingPathScope.parent; scope; scope = scope.parent) {
71392
71392
  var _scope$path$parentPat;
71393
- if (scope === path.scope) {
71393
+ if (scope === path2.scope) {
71394
71394
  if (hasUnsafeBlock) {
71395
71395
  deopt(binding.path, state);
71396
71396
  return;
@@ -71406,7 +71406,7 @@ var require_evaluation = __commonJS({
71406
71406
  return binding.value;
71407
71407
  }
71408
71408
  }
71409
- const name = path.node.name;
71409
+ const name = path2.node.name;
71410
71410
  if (Globals.has(name)) {
71411
71411
  if (!binding) {
71412
71412
  return Globals.get(name);
@@ -71415,7 +71415,7 @@ var require_evaluation = __commonJS({
71415
71415
  return;
71416
71416
  }
71417
71417
  if (!binding) {
71418
- deopt(path, state);
71418
+ deopt(path2, state);
71419
71419
  return;
71420
71420
  }
71421
71421
  const bindingPath = binding.path;
@@ -71431,19 +71431,19 @@ var require_evaluation = __commonJS({
71431
71431
  }
71432
71432
  return value;
71433
71433
  }
71434
- if (path.isUnaryExpression({
71434
+ if (path2.isUnaryExpression({
71435
71435
  prefix: true
71436
71436
  })) {
71437
- if (path.node.operator === "void") {
71437
+ if (path2.node.operator === "void") {
71438
71438
  return void 0;
71439
71439
  }
71440
- const argument = path.get("argument");
71441
- if (path.node.operator === "typeof" && (argument.isFunction() || argument.isClass())) {
71440
+ const argument = path2.get("argument");
71441
+ if (path2.node.operator === "typeof" && (argument.isFunction() || argument.isClass())) {
71442
71442
  return "function";
71443
71443
  }
71444
71444
  const arg = evaluateCached(argument, state);
71445
71445
  if (!state.confident) return;
71446
- switch (path.node.operator) {
71446
+ switch (path2.node.operator) {
71447
71447
  case "!":
71448
71448
  return !arg;
71449
71449
  case "+":
@@ -71456,9 +71456,9 @@ var require_evaluation = __commonJS({
71456
71456
  return typeof arg;
71457
71457
  }
71458
71458
  }
71459
- if (path.isArrayExpression()) {
71459
+ if (path2.isArrayExpression()) {
71460
71460
  const arr = [];
71461
- const elems = path.get("elements");
71461
+ const elems = path2.get("elements");
71462
71462
  for (const elem of elems) {
71463
71463
  const elemValue = elem.evaluate();
71464
71464
  if (elemValue.confident) {
@@ -71470,9 +71470,9 @@ var require_evaluation = __commonJS({
71470
71470
  }
71471
71471
  return arr;
71472
71472
  }
71473
- if (path.isObjectExpression()) {
71473
+ if (path2.isObjectExpression()) {
71474
71474
  const obj = {};
71475
- const props = path.get("properties");
71475
+ const props = path2.get("properties");
71476
71476
  for (const prop2 of props) {
71477
71477
  if (prop2.isObjectMethod() || prop2.isSpreadElement()) {
71478
71478
  deopt(prop2, state);
@@ -71503,14 +71503,14 @@ var require_evaluation = __commonJS({
71503
71503
  }
71504
71504
  return obj;
71505
71505
  }
71506
- if (path.isLogicalExpression()) {
71506
+ if (path2.isLogicalExpression()) {
71507
71507
  const wasConfident = state.confident;
71508
- const left = evaluateCached(path.get("left"), state);
71508
+ const left = evaluateCached(path2.get("left"), state);
71509
71509
  const leftConfident = state.confident;
71510
71510
  state.confident = wasConfident;
71511
- const right = evaluateCached(path.get("right"), state);
71511
+ const right = evaluateCached(path2.get("right"), state);
71512
71512
  const rightConfident = state.confident;
71513
- switch (path.node.operator) {
71513
+ switch (path2.node.operator) {
71514
71514
  case "||":
71515
71515
  state.confident = leftConfident && (!!left || rightConfident);
71516
71516
  if (!state.confident) return;
@@ -71525,12 +71525,12 @@ var require_evaluation = __commonJS({
71525
71525
  return left != null ? left : right;
71526
71526
  }
71527
71527
  }
71528
- if (path.isBinaryExpression()) {
71529
- const left = evaluateCached(path.get("left"), state);
71528
+ if (path2.isBinaryExpression()) {
71529
+ const left = evaluateCached(path2.get("left"), state);
71530
71530
  if (!state.confident) return;
71531
- const right = evaluateCached(path.get("right"), state);
71531
+ const right = evaluateCached(path2.get("right"), state);
71532
71532
  if (!state.confident) return;
71533
- switch (path.node.operator) {
71533
+ switch (path2.node.operator) {
71534
71534
  case "-":
71535
71535
  return left - right;
71536
71536
  case "+":
@@ -71573,11 +71573,11 @@ var require_evaluation = __commonJS({
71573
71573
  return left >>> right;
71574
71574
  }
71575
71575
  }
71576
- if (path.isCallExpression()) {
71577
- const callee = path.get("callee");
71576
+ if (path2.isCallExpression()) {
71577
+ const callee = path2.get("callee");
71578
71578
  let context;
71579
71579
  let func;
71580
- if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name) && (isValidObjectCallee(callee.node.name) || isValidIdentifierCallee(callee.node.name))) {
71580
+ if (callee.isIdentifier() && !path2.scope.getBinding(callee.node.name) && (isValidObjectCallee(callee.node.name) || isValidIdentifierCallee(callee.node.name))) {
71581
71581
  func = global[callee.node.name];
71582
71582
  }
71583
71583
  if (callee.isMemberExpression()) {
@@ -71599,17 +71599,17 @@ var require_evaluation = __commonJS({
71599
71599
  }
71600
71600
  }
71601
71601
  if (func) {
71602
- const args = path.get("arguments").map((arg) => evaluateCached(arg, state));
71602
+ const args = path2.get("arguments").map((arg) => evaluateCached(arg, state));
71603
71603
  if (!state.confident) return;
71604
71604
  return func.apply(context, args);
71605
71605
  }
71606
71606
  }
71607
- deopt(path, state);
71607
+ deopt(path2, state);
71608
71608
  }
71609
- function evaluateQuasis(path, quasis, state, raw = false) {
71609
+ function evaluateQuasis(path2, quasis, state, raw = false) {
71610
71610
  let str2 = "";
71611
71611
  let i = 0;
71612
- const exprs = path.isTemplateLiteral() ? path.get("expressions") : path.get("quasi.expressions");
71612
+ const exprs = path2.isTemplateLiteral() ? path2.get("expressions") : path2.get("quasi.expressions");
71613
71613
  for (const elem of quasis) {
71614
71614
  if (!state.confident) break;
71615
71615
  str2 += raw ? elem.value.raw : elem.value.cooked;
@@ -72412,8 +72412,8 @@ var require_conversion = __commonJS({
72412
72412
  }
72413
72413
  hoistFunctionEnvironment(this);
72414
72414
  }
72415
- function setType(path, type) {
72416
- path.node.type = type;
72415
+ function setType(path2, type) {
72416
+ path2.node.type = type;
72417
72417
  }
72418
72418
  function arrowFunctionToExpression({
72419
72419
  allowInsertArrow = true,
@@ -72828,14 +72828,14 @@ var require_conversion = __commonJS({
72828
72828
  return this;
72829
72829
  }
72830
72830
  var refersOuterBindingVisitor = {
72831
- "ReferencedIdentifier|BindingIdentifier"(path, state) {
72832
- if (path.node.name !== state.name) return;
72831
+ "ReferencedIdentifier|BindingIdentifier"(path2, state) {
72832
+ if (path2.node.name !== state.name) return;
72833
72833
  state.needsRename = true;
72834
- path.stop();
72834
+ path2.stop();
72835
72835
  },
72836
- Scope(path, state) {
72837
- if (path.scope.hasOwnBinding(state.name)) {
72838
- path.skip();
72836
+ Scope(path2, state) {
72837
+ if (path2.scope.hasOwnBinding(state.name)) {
72838
+ path2.skip();
72839
72839
  }
72840
72840
  }
72841
72841
  };
@@ -72931,7 +72931,7 @@ var require_introspection = __commonJS({
72931
72931
  exports.isStatic = isStatic;
72932
72932
  exports.matchesPattern = matchesPattern;
72933
72933
  exports.referencesImport = referencesImport;
72934
- exports.resolve = resolve9;
72934
+ exports.resolve = resolve8;
72935
72935
  exports.willIMaybeExecuteBefore = willIMaybeExecuteBefore;
72936
72936
  var _t = require_lib6();
72937
72937
  var {
@@ -72985,21 +72985,21 @@ var require_introspection = __commonJS({
72985
72985
  return false;
72986
72986
  }
72987
72987
  function isCompletionRecord(allowInsideFunction) {
72988
- let path = this;
72988
+ let path2 = this;
72989
72989
  let first2 = true;
72990
72990
  do {
72991
72991
  const {
72992
72992
  type,
72993
72993
  container
72994
- } = path;
72995
- if (!first2 && (path.isFunction() || type === "StaticBlock")) {
72994
+ } = path2;
72995
+ if (!first2 && (path2.isFunction() || type === "StaticBlock")) {
72996
72996
  return !!allowInsideFunction;
72997
72997
  }
72998
72998
  first2 = false;
72999
- if (Array.isArray(container) && path.key !== container.length - 1) {
72999
+ if (Array.isArray(container) && path2.key !== container.length - 1) {
73000
73000
  return false;
73001
73001
  }
73002
- } while ((path = path.parentPath) && !path.isProgram() && !path.isDoExpression());
73002
+ } while ((path2 = path2.parentPath) && !path2.isProgram() && !path2.isDoExpression());
73003
73003
  return true;
73004
73004
  }
73005
73005
  function isStatementOrBlock() {
@@ -73021,21 +73021,21 @@ var require_introspection = __commonJS({
73021
73021
  }
73022
73022
  const binding = this.scope.getBinding(this.node.name);
73023
73023
  if ((binding == null ? void 0 : binding.kind) !== "module") return false;
73024
- const path = binding.path;
73025
- const parent2 = path.parentPath;
73024
+ const path2 = binding.path;
73025
+ const parent2 = path2.parentPath;
73026
73026
  if (!parent2.isImportDeclaration()) return false;
73027
73027
  if (parent2.node.source.value === moduleSource) {
73028
73028
  if (!importName) return true;
73029
73029
  } else {
73030
73030
  return false;
73031
73031
  }
73032
- if (path.isImportDefaultSpecifier() && importName === "default") {
73032
+ if (path2.isImportDefaultSpecifier() && importName === "default") {
73033
73033
  return true;
73034
73034
  }
73035
- if (path.isImportNamespaceSpecifier() && importName === "*") {
73035
+ if (path2.isImportNamespaceSpecifier() && importName === "*") {
73036
73036
  return true;
73037
73037
  }
73038
- if (path.isImportSpecifier() && isIdentifier2(path.node.imported, {
73038
+ if (path2.isImportSpecifier() && isIdentifier2(path2.node.imported, {
73039
73039
  name: importName
73040
73040
  })) {
73041
73041
  return true;
@@ -73053,8 +73053,8 @@ var require_introspection = __commonJS({
73053
73053
  function willIMaybeExecuteBefore(target) {
73054
73054
  return this._guessExecutionStatusRelativeTo(target) !== "after";
73055
73055
  }
73056
- function getOuterFunction(path) {
73057
- return path.isProgram() ? path : (path.parentPath.scope.getFunctionParent() || path.parentPath.scope.getProgramParent()).path;
73056
+ function getOuterFunction(path2) {
73057
+ return path2.isProgram() ? path2 : (path2.parentPath.scope.getFunctionParent() || path2.parentPath.scope.getProgramParent()).path;
73058
73058
  }
73059
73059
  function isExecutionUncertain(type, key) {
73060
73060
  switch (type) {
@@ -73086,8 +73086,8 @@ var require_introspection = __commonJS({
73086
73086
  }
73087
73087
  function isExecutionUncertainInList(paths, maxIndex) {
73088
73088
  for (let i = 0; i < maxIndex; i++) {
73089
- const path = paths[i];
73090
- if (isExecutionUncertain(path.parent.type, path.parentKey)) {
73089
+ const path2 = paths[i];
73090
+ if (isExecutionUncertain(path2.parent.type, path2.parentKey)) {
73091
73091
  return true;
73092
73092
  }
73093
73093
  }
@@ -73117,10 +73117,10 @@ var require_introspection = __commonJS({
73117
73117
  this: 0
73118
73118
  };
73119
73119
  while (!commonPath && commonIndex.this < paths.this.length) {
73120
- const path = paths.this[commonIndex.this];
73121
- commonIndex.target = paths.target.indexOf(path);
73120
+ const path2 = paths.this[commonIndex.this];
73121
+ commonIndex.target = paths.target.indexOf(path2);
73122
73122
  if (commonIndex.target >= 0) {
73123
- commonPath = path;
73123
+ commonPath = path2;
73124
73124
  } else {
73125
73125
  commonIndex.this++;
73126
73126
  }
@@ -73158,13 +73158,13 @@ var require_introspection = __commonJS({
73158
73158
  if (!binding.references) return "before";
73159
73159
  const referencePaths = binding.referencePaths;
73160
73160
  let allStatus;
73161
- for (const path of referencePaths) {
73162
- const childOfFunction = !!path.find((path2) => path2.node === target.node);
73161
+ for (const path2 of referencePaths) {
73162
+ const childOfFunction = !!path2.find((path3) => path3.node === target.node);
73163
73163
  if (childOfFunction) continue;
73164
- if (path.key !== "callee" || !path.parentPath.isCallExpression()) {
73164
+ if (path2.key !== "callee" || !path2.parentPath.isCallExpression()) {
73165
73165
  return "unknown";
73166
73166
  }
73167
- const status = _guessExecutionStatusRelativeToCached(base, path, cache);
73167
+ const status = _guessExecutionStatusRelativeToCached(base, path2, cache);
73168
73168
  if (allStatus && allStatus !== status) {
73169
73169
  return "unknown";
73170
73170
  } else {
@@ -73189,7 +73189,7 @@ var require_introspection = __commonJS({
73189
73189
  nodeMap.set(target.node, result);
73190
73190
  return result;
73191
73191
  }
73192
- function resolve9(dangerous, resolved) {
73192
+ function resolve8(dangerous, resolved) {
73193
73193
  return _resolve.call(this, dangerous, resolved) || this;
73194
73194
  }
73195
73195
  function _resolve(dangerous, resolved) {
@@ -73282,19 +73282,19 @@ var require_introspection = __commonJS({
73282
73282
  }
73283
73283
  function isInStrictMode() {
73284
73284
  const start = this.isProgram() ? this : this.parentPath;
73285
- const strictParent = start.find((path) => {
73286
- if (path.isProgram({
73285
+ const strictParent = start.find((path2) => {
73286
+ if (path2.isProgram({
73287
73287
  sourceType: "module"
73288
73288
  })) return true;
73289
- if (path.isClass()) return true;
73290
- if (path.isArrowFunctionExpression() && !path.get("body").isBlockStatement()) {
73289
+ if (path2.isClass()) return true;
73290
+ if (path2.isArrowFunctionExpression() && !path2.get("body").isBlockStatement()) {
73291
73291
  return false;
73292
73292
  }
73293
73293
  let body;
73294
- if (path.isFunction()) {
73295
- body = path.node.body;
73296
- } else if (path.isProgram()) {
73297
- body = path.node;
73294
+ if (path2.isFunction()) {
73295
+ body = path2.node.body;
73296
+ } else if (path2.isProgram()) {
73297
+ body = path2.node;
73298
73298
  } else {
73299
73299
  return false;
73300
73300
  }
@@ -73344,16 +73344,16 @@ var require_family = __commonJS({
73344
73344
  } = _t;
73345
73345
  var NORMAL_COMPLETION = 0;
73346
73346
  var BREAK_COMPLETION = 1;
73347
- function NormalCompletion(path) {
73347
+ function NormalCompletion(path2) {
73348
73348
  return {
73349
73349
  type: NORMAL_COMPLETION,
73350
- path
73350
+ path: path2
73351
73351
  };
73352
73352
  }
73353
- function BreakCompletion(path) {
73353
+ function BreakCompletion(path2) {
73354
73354
  return {
73355
73355
  type: BREAK_COMPLETION,
73356
- path
73356
+ path: path2
73357
73357
  };
73358
73358
  }
73359
73359
  function getOpposite() {
@@ -73364,9 +73364,9 @@ var require_family = __commonJS({
73364
73364
  }
73365
73365
  return null;
73366
73366
  }
73367
- function addCompletionRecords(path, records, context) {
73368
- if (path) {
73369
- records.push(..._getCompletionRecords(path, context));
73367
+ function addCompletionRecords(path2, records, context) {
73368
+ if (path2) {
73369
+ records.push(..._getCompletionRecords(path2, context));
73370
73370
  }
73371
73371
  return records;
73372
73372
  }
@@ -73416,16 +73416,16 @@ var require_family = __commonJS({
73416
73416
  if (context.canHaveBreak) {
73417
73417
  let lastNormalCompletions = [];
73418
73418
  for (let i = 0; i < paths.length; i++) {
73419
- const path = paths[i];
73419
+ const path2 = paths[i];
73420
73420
  const newContext = Object.assign({}, context, {
73421
73421
  inCaseClause: false
73422
73422
  });
73423
- if (path.isBlockStatement() && (context.inCaseClause || context.shouldPopulateBreak)) {
73423
+ if (path2.isBlockStatement() && (context.inCaseClause || context.shouldPopulateBreak)) {
73424
73424
  newContext.shouldPopulateBreak = true;
73425
73425
  } else {
73426
73426
  newContext.shouldPopulateBreak = false;
73427
73427
  }
73428
- const statementCompletions = _getCompletionRecords(path, newContext);
73428
+ const statementCompletions = _getCompletionRecords(path2, newContext);
73429
73429
  if (statementCompletions.length > 0 && statementCompletions.every((c) => c.type === BREAK_COMPLETION)) {
73430
73430
  if (lastNormalCompletions.length > 0 && statementCompletions.every((c) => c.path.isBreakStatement({
73431
73431
  label: null
@@ -73475,35 +73475,35 @@ var require_family = __commonJS({
73475
73475
  }
73476
73476
  return completions;
73477
73477
  }
73478
- function _getCompletionRecords(path, context) {
73478
+ function _getCompletionRecords(path2, context) {
73479
73479
  let records = [];
73480
- if (path.isIfStatement()) {
73481
- records = addCompletionRecords(path.get("consequent"), records, context);
73482
- records = addCompletionRecords(path.get("alternate"), records, context);
73483
- } else if (path.isDoExpression() || path.isFor() || path.isWhile() || path.isLabeledStatement()) {
73484
- return addCompletionRecords(path.get("body"), records, context);
73485
- } else if (path.isProgram() || path.isBlockStatement()) {
73486
- return getStatementListCompletion(path.get("body"), context);
73487
- } else if (path.isFunction()) {
73488
- return _getCompletionRecords(path.get("body"), context);
73489
- } else if (path.isTryStatement()) {
73490
- records = addCompletionRecords(path.get("block"), records, context);
73491
- records = addCompletionRecords(path.get("handler"), records, context);
73492
- } else if (path.isCatchClause()) {
73493
- return addCompletionRecords(path.get("body"), records, context);
73494
- } else if (path.isSwitchStatement()) {
73495
- return completionRecordForSwitch(path.get("cases"), records, context);
73496
- } else if (path.isSwitchCase()) {
73497
- return getStatementListCompletion(path.get("consequent"), {
73480
+ if (path2.isIfStatement()) {
73481
+ records = addCompletionRecords(path2.get("consequent"), records, context);
73482
+ records = addCompletionRecords(path2.get("alternate"), records, context);
73483
+ } else if (path2.isDoExpression() || path2.isFor() || path2.isWhile() || path2.isLabeledStatement()) {
73484
+ return addCompletionRecords(path2.get("body"), records, context);
73485
+ } else if (path2.isProgram() || path2.isBlockStatement()) {
73486
+ return getStatementListCompletion(path2.get("body"), context);
73487
+ } else if (path2.isFunction()) {
73488
+ return _getCompletionRecords(path2.get("body"), context);
73489
+ } else if (path2.isTryStatement()) {
73490
+ records = addCompletionRecords(path2.get("block"), records, context);
73491
+ records = addCompletionRecords(path2.get("handler"), records, context);
73492
+ } else if (path2.isCatchClause()) {
73493
+ return addCompletionRecords(path2.get("body"), records, context);
73494
+ } else if (path2.isSwitchStatement()) {
73495
+ return completionRecordForSwitch(path2.get("cases"), records, context);
73496
+ } else if (path2.isSwitchCase()) {
73497
+ return getStatementListCompletion(path2.get("consequent"), {
73498
73498
  canHaveBreak: true,
73499
73499
  shouldPopulateBreak: false,
73500
73500
  inCaseClause: true,
73501
73501
  shouldPreserveBreak: context.shouldPreserveBreak
73502
73502
  });
73503
- } else if (path.isBreakStatement()) {
73504
- records.push(BreakCompletion(path));
73503
+ } else if (path2.isBreakStatement()) {
73504
+ records.push(BreakCompletion(path2));
73505
73505
  } else {
73506
- records.push(NormalCompletion(path));
73506
+ records.push(NormalCompletion(path2));
73507
73507
  }
73508
73508
  return records;
73509
73509
  }
@@ -73583,19 +73583,19 @@ var require_family = __commonJS({
73583
73583
  }
73584
73584
  }
73585
73585
  function _getPattern(parts, context) {
73586
- let path = this;
73586
+ let path2 = this;
73587
73587
  for (const part of parts) {
73588
73588
  if (part === ".") {
73589
- path = path.parentPath;
73589
+ path2 = path2.parentPath;
73590
73590
  } else {
73591
- if (Array.isArray(path)) {
73592
- path = path[part];
73591
+ if (Array.isArray(path2)) {
73592
+ path2 = path2[part];
73593
73593
  } else {
73594
- path = path.get(part, context);
73594
+ path2 = path2.get(part, context);
73595
73595
  }
73596
73596
  }
73597
73597
  }
73598
- return path;
73598
+ return path2;
73599
73599
  }
73600
73600
  function getAssignmentIdentifiers() {
73601
73601
  return _getAssignmentIdentifiers(this.node);
@@ -73607,8 +73607,8 @@ var require_family = __commonJS({
73607
73607
  return _getOuterBindingIdentifiers(this.node, duplicates);
73608
73608
  }
73609
73609
  function getBindingIdentifierPaths(duplicates = false, outerOnly = false) {
73610
- const path = this;
73611
- const search2 = [path];
73610
+ const path2 = this;
73611
+ const search2 = [path2];
73612
73612
  const ids = /* @__PURE__ */ Object.create(null);
73613
73613
  while (search2.length) {
73614
73614
  const id = search2.shift();
@@ -73809,13 +73809,13 @@ var require_path = __commonJS({
73809
73809
  }
73810
73810
  const targetNode = container[key];
73811
73811
  const paths = cache.getOrCreateCachedPaths(parent2, parentPath);
73812
- let path = paths.get(targetNode);
73813
- if (!path) {
73814
- path = new NodePath(hub, parent2);
73815
- if (targetNode) paths.set(targetNode, path);
73812
+ let path2 = paths.get(targetNode);
73813
+ if (!path2) {
73814
+ path2 = new NodePath(hub, parent2);
73815
+ if (targetNode) paths.set(targetNode, path2);
73816
73816
  }
73817
- _context.setup.call(path, parentPath, container, listKey, key);
73818
- return path;
73817
+ _context.setup.call(path2, parentPath, container, listKey, key);
73818
+ return path2;
73819
73819
  }
73820
73820
  getScope(scope) {
73821
73821
  return this.isScope() ? new _index2.default(this) : scope;
@@ -73849,12 +73849,12 @@ var require_path = __commonJS({
73849
73849
  }
73850
73850
  getPathLocation() {
73851
73851
  const parts = [];
73852
- let path = this;
73852
+ let path2 = this;
73853
73853
  do {
73854
- let key = path.key;
73855
- if (path.inList) key = `${path.listKey}[${key}]`;
73854
+ let key = path2.key;
73855
+ if (path2.inList) key = `${path2.listKey}[${key}]`;
73856
73856
  parts.unshift(key);
73857
- } while (path = path.parentPath);
73857
+ } while (path2 = path2.parentPath);
73858
73858
  return parts.join(".");
73859
73859
  }
73860
73860
  debug(message) {
@@ -74088,12 +74088,12 @@ var require_context = __commonJS({
74088
74088
  hub
74089
74089
  });
74090
74090
  }
74091
- maybeQueue(path, notPriority) {
74091
+ maybeQueue(path2, notPriority) {
74092
74092
  if (this.queue) {
74093
74093
  if (notPriority) {
74094
- this.queue.push(path);
74094
+ this.queue.push(path2);
74095
74095
  } else {
74096
- this.priorityQueue.push(path);
74096
+ this.priorityQueue.push(path2);
74097
74097
  }
74098
74098
  }
74099
74099
  }
@@ -74122,19 +74122,19 @@ var require_context = __commonJS({
74122
74122
  let stop = false;
74123
74123
  let visitIndex = 0;
74124
74124
  for (; visitIndex < queue.length; ) {
74125
- const path = queue[visitIndex];
74125
+ const path2 = queue[visitIndex];
74126
74126
  visitIndex++;
74127
- _context.resync.call(path);
74128
- if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
74129
- _context.pushContext.call(path, this);
74127
+ _context.resync.call(path2);
74128
+ if (path2.contexts.length === 0 || path2.contexts[path2.contexts.length - 1] !== this) {
74129
+ _context.pushContext.call(path2, this);
74130
74130
  }
74131
- if (path.key === null) continue;
74131
+ if (path2.key === null) continue;
74132
74132
  const {
74133
74133
  node
74134
- } = path;
74134
+ } = path2;
74135
74135
  if (visited.has(node)) continue;
74136
74136
  if (node) visited.add(node);
74137
- if (path.visit()) {
74137
+ if (path2.visit()) {
74138
74138
  stop = true;
74139
74139
  break;
74140
74140
  }
@@ -74181,13 +74181,13 @@ var require_traverse_node = __commonJS({
74181
74181
  var {
74182
74182
  VISITOR_KEYS
74183
74183
  } = _t;
74184
- function traverseNode(node, opts, scope, state, path, skipKeys, visitSelf) {
74184
+ function traverseNode(node, opts, scope, state, path2, skipKeys, visitSelf) {
74185
74185
  const keys = VISITOR_KEYS[node.type];
74186
74186
  if (!keys) return false;
74187
- const context = new _context.default(scope, opts, state, path);
74187
+ const context = new _context.default(scope, opts, state, path2);
74188
74188
  if (visitSelf) {
74189
- if (skipKeys != null && skipKeys[path.parentKey]) return false;
74190
- return context.visitQueue([path]);
74189
+ if (skipKeys != null && skipKeys[path2.parentKey]) return false;
74190
+ return context.visitQueue([path2]);
74191
74191
  }
74192
74192
  for (const key of keys) {
74193
74193
  if (skipKeys != null && skipKeys[key]) continue;
@@ -74270,11 +74270,11 @@ var require_context2 = __commonJS({
74270
74270
  return denylist == null ? void 0 : denylist.includes(this.node.type);
74271
74271
  }
74272
74272
  exports.isBlacklisted = isDenylisted;
74273
- function restoreContext(path, context) {
74274
- if (path.context !== context) {
74275
- path.context = context;
74276
- path.state = context.state;
74277
- path.opts = context.opts;
74273
+ function restoreContext(path2, context) {
74274
+ if (path2.context !== context) {
74275
+ path2.context = context;
74276
+ path2.state = context.state;
74277
+ path2.opts = context.opts;
74278
74278
  }
74279
74279
  }
74280
74280
  function visit() {
@@ -74314,14 +74314,14 @@ var require_context2 = __commonJS({
74314
74314
  }
74315
74315
  function _forceSetScope() {
74316
74316
  var _this$scope;
74317
- let path = this.parentPath;
74318
- if ((this.key === "key" || this.listKey === "decorators") && path.isMethod() || this.key === "discriminant" && path.isSwitchStatement()) {
74319
- path = path.parentPath;
74317
+ let path2 = this.parentPath;
74318
+ if ((this.key === "key" || this.listKey === "decorators") && path2.isMethod() || this.key === "discriminant" && path2.isSwitchStatement()) {
74319
+ path2 = path2.parentPath;
74320
74320
  }
74321
74321
  let target;
74322
- while (path && !target) {
74323
- target = path.scope;
74324
- path = path.parentPath;
74322
+ while (path2 && !target) {
74323
+ target = path2.scope;
74324
+ path2 = path2.parentPath;
74325
74325
  }
74326
74326
  this.scope = this.getScope(target);
74327
74327
  (_this$scope = this.scope) == null || _this$scope.init();
@@ -74329,16 +74329,16 @@ var require_context2 = __commonJS({
74329
74329
  function setScope() {
74330
74330
  var _this$opts2, _this$scope2;
74331
74331
  if ((_this$opts2 = this.opts) != null && _this$opts2.noScope) return;
74332
- let path = this.parentPath;
74333
- if ((this.key === "key" || this.listKey === "decorators") && path.isMethod() || this.key === "discriminant" && path.isSwitchStatement()) {
74334
- path = path.parentPath;
74332
+ let path2 = this.parentPath;
74333
+ if ((this.key === "key" || this.listKey === "decorators") && path2.isMethod() || this.key === "discriminant" && path2.isSwitchStatement()) {
74334
+ path2 = path2.parentPath;
74335
74335
  }
74336
74336
  let target;
74337
- while (path && !target) {
74337
+ while (path2 && !target) {
74338
74338
  var _path$opts;
74339
- if ((_path$opts = path.opts) != null && _path$opts.noScope) return;
74340
- target = path.scope;
74341
- path = path.parentPath;
74339
+ if ((_path$opts = path2.opts) != null && _path$opts.noScope) return;
74340
+ target = path2.scope;
74341
+ path2 = path2.parentPath;
74342
74342
  }
74343
74343
  this.scope = this.getScope(target);
74344
74344
  (_this$scope2 = this.scope) == null || _this$scope2.init();
@@ -74446,12 +74446,12 @@ var require_context2 = __commonJS({
74446
74446
  }
74447
74447
  }
74448
74448
  function _getQueueContexts() {
74449
- let path = this;
74449
+ let path2 = this;
74450
74450
  let contexts = this.contexts;
74451
74451
  while (!contexts.length) {
74452
- path = path.parentPath;
74453
- if (!path) break;
74454
- contexts = path.contexts;
74452
+ path2 = path2.parentPath;
74453
+ if (!path2) break;
74454
+ contexts = path2.contexts;
74455
74455
  }
74456
74456
  return contexts;
74457
74457
  }
@@ -74523,8 +74523,8 @@ var require_lib10 = __commonJS({
74523
74523
  traverseFast(node, enter);
74524
74524
  return;
74525
74525
  };
74526
- traverse2.node = function(node, opts, scope, state, path, skipKeys) {
74527
- (0, _traverseNode.traverseNode)(node, opts, scope, state, path, skipKeys);
74526
+ traverse2.node = function(node, opts, scope, state, path2, skipKeys) {
74527
+ (0, _traverseNode.traverseNode)(node, opts, scope, state, path2, skipKeys);
74528
74528
  };
74529
74529
  traverse2.clearNode = function(node, opts) {
74530
74530
  removeProperties(node, opts);
@@ -74551,7 +74551,7 @@ var require_lib10 = __commonJS({
74551
74551
 
74552
74552
  // src/index.ts
74553
74553
  init_esm_shims();
74554
- import { resolve as resolve8 } from "path";
74554
+ import { resolve as resolve7 } from "path";
74555
74555
 
74556
74556
  // src/core/config-loader.ts
74557
74557
  init_esm_shims();
@@ -74567,14 +74567,14 @@ import { join } from "path";
74567
74567
  init_esm_shims();
74568
74568
  import { existsSync } from "fs";
74569
74569
  import { cp, mkdir, readFile } from "fs/promises";
74570
- async function ensureDir(path) {
74571
- await mkdir(path, { recursive: true });
74570
+ async function ensureDir(path2) {
74571
+ await mkdir(path2, { recursive: true });
74572
74572
  }
74573
- async function pathExists(path) {
74574
- return existsSync(path);
74573
+ async function pathExists(path2) {
74574
+ return existsSync(path2);
74575
74575
  }
74576
- async function readJson(path) {
74577
- const contents2 = await readFile(path, "utf-8");
74576
+ async function readJson(path2) {
74577
+ const contents2 = await readFile(path2, "utf-8");
74578
74578
  return JSON.parse(contents2);
74579
74579
  }
74580
74580
  async function copy(src, dest) {
@@ -74691,7 +74691,26 @@ async function getAgeKey() {
74691
74691
  }
74692
74692
  return null;
74693
74693
  }
74694
+ async function decryptEnvContent(content) {
74695
+ const ageKey = await getAgeKey();
74696
+ if (!ageKey) return {};
74697
+ try {
74698
+ const { decrypt } = await import("./crypto-MTXIOCYL.js");
74699
+ const decrypted = await decrypt(content, ageKey);
74700
+ return parseEnvContent(decrypted);
74701
+ } catch {
74702
+ return {};
74703
+ }
74704
+ }
74694
74705
  async function loadShippedDefaults(cliRoot2) {
74706
+ try {
74707
+ if (typeof BUILD_ENV_ENCRYPTED !== "undefined" && BUILD_ENV_ENCRYPTED.length > 0) {
74708
+ const content = Buffer.from(BUILD_ENV_ENCRYPTED, "base64");
74709
+ const result = await decryptEnvContent(content);
74710
+ if (Object.keys(result).length > 0) return result;
74711
+ }
74712
+ } catch {
74713
+ }
74695
74714
  const encryptedPath = resolve(cliRoot2, ".env.encrypted");
74696
74715
  try {
74697
74716
  return await decryptEnvFile(encryptedPath);
@@ -75101,9 +75120,9 @@ async function loginAction(ctx, options) {
75101
75120
 
75102
75121
  // src/commands/auth/setup.ts
75103
75122
  init_esm_shims();
75104
- import { existsSync as existsSync3, writeFileSync } from "fs";
75105
- import { resolve as resolve2 } from "path";
75106
- import { confirm, select } from "@inquirer/prompts";
75123
+ import { execSync as execSync2 } from "child_process";
75124
+ import { chmodSync, mkdirSync, writeFileSync } from "fs";
75125
+ import { confirm } from "@inquirer/prompts";
75107
75126
 
75108
75127
  // src/core/errors.ts
75109
75128
  init_esm_shims();
@@ -75176,8 +75195,9 @@ var ONEPASSWORD_ITEM_IDS = {
75176
75195
  serviceAccount: "3e4ip354ps3mhq2wwt6vmtm2zu"
75177
75196
  };
75178
75197
  var ONEPASSWORD_READ_REFS = {
75179
- ageKey: "op://Support/skill-cli-age-key/password",
75180
- serviceAccount: "op://Support/skill-cli-service-account/credential"
75198
+ // Use stable item IDs + explicit field names to avoid breakage from title changes.
75199
+ ageKey: `op://Support/${ONEPASSWORD_ITEM_IDS.ageKey}/private_key`,
75200
+ serviceAccount: `op://Support/${ONEPASSWORD_ITEM_IDS.serviceAccount}/password`
75181
75201
  };
75182
75202
  var shellQuote = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
75183
75203
  var buildOnePasswordItemLink = (itemId) => `${ONEPASSWORD_DEEP_LINK_BASE}&i=${itemId}`;
@@ -75223,6 +75243,7 @@ var openInBrowser = (url) => {
75223
75243
 
75224
75244
  // src/commands/auth/setup.ts
75225
75245
  var AGE_KEY_PREFIX = "AGE-SECRET-KEY-";
75246
+ var DEFAULT_SECRETS_KEY = "skill_support_1password_service_account_token";
75226
75247
  var isValidAgeKey = (value) => value.startsWith(AGE_KEY_PREFIX) && value.length > AGE_KEY_PREFIX.length;
75227
75248
  var missingOpMessage = `\u274C 1Password CLI (op) is required but not found.
75228
75249
 
@@ -75243,8 +75264,8 @@ var writeResult2 = (ctx, options, result) => {
75243
75264
  return;
75244
75265
  }
75245
75266
  ctx.output.success("Secrets configured.");
75246
- if (result.envFile) {
75247
- ctx.output.data(`Saved to ${result.envFile}`);
75267
+ if (result.ageKeyPath) {
75268
+ ctx.output.data(`Saved age key to ${result.ageKeyPath}`);
75248
75269
  }
75249
75270
  };
75250
75271
  var handleAuthError = (ctx, options, error) => {
@@ -75253,7 +75274,9 @@ var handleAuthError = (ctx, options, error) => {
75253
75274
  ctx.output.data({
75254
75275
  success: false,
75255
75276
  tokenConfigured: Boolean(process.env.OP_SERVICE_ACCOUNT_TOKEN),
75256
- ageKeyConfigured: Boolean(process.env.AGE_SECRET_KEY),
75277
+ ageKeyConfigured: Boolean(
75278
+ process.env.SKILL_AGE_KEY || process.env.AGE_SECRET_KEY
75279
+ ),
75257
75280
  error: formatError(error)
75258
75281
  });
75259
75282
  } else {
@@ -75284,11 +75307,46 @@ var resolveOpSecret = async (options) => {
75284
75307
  var formatAccountLabel = (account) => account?.domain ?? account?.url ?? account?.name ?? "unknown";
75285
75308
  var printExportInstructions = (ctx, ageKey, token) => {
75286
75309
  ctx.output.data("\nAdd to your shell profile for persistence:");
75287
- ctx.output.data(` export AGE_SECRET_KEY="${ageKey}"`);
75310
+ ctx.output.data(` export SKILL_AGE_KEY="${ageKey}"`);
75288
75311
  ctx.output.data(` export OP_SERVICE_ACCOUNT_TOKEN="${token}"`);
75289
75312
  ctx.output.data("\nOr use op CLI injection:");
75290
75313
  ctx.output.data(" op run --env-file=.env.op -- skill <command>");
75291
75314
  };
75315
+ var hasSecretsCli = () => {
75316
+ try {
75317
+ execSync2("command -v secrets", {
75318
+ encoding: "utf8",
75319
+ stdio: ["ignore", "pipe", "pipe"]
75320
+ });
75321
+ return true;
75322
+ } catch {
75323
+ return false;
75324
+ }
75325
+ };
75326
+ var shellQuote2 = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
75327
+ var leaseTokenFromSecrets = (keyName) => {
75328
+ if (!hasSecretsCli()) {
75329
+ return null;
75330
+ }
75331
+ try {
75332
+ const token = execSync2(`secrets lease ${shellQuote2(keyName)} --ttl 15m`, {
75333
+ encoding: "utf8",
75334
+ stdio: ["ignore", "pipe", "pipe"]
75335
+ }).trim();
75336
+ return token || null;
75337
+ } catch {
75338
+ return null;
75339
+ }
75340
+ };
75341
+ var persistAgeKeyToConfig = (ageKey) => {
75342
+ const configDir = getUserConfigDir();
75343
+ mkdirSync(configDir, { recursive: true });
75344
+ const ageKeyPath = getAgeKeyPath();
75345
+ writeFileSync(ageKeyPath, `${ageKey}
75346
+ `, { encoding: "utf8", mode: 384 });
75347
+ chmodSync(ageKeyPath, 384);
75348
+ return ageKeyPath;
75349
+ };
75292
75350
  async function authSetupAction(ctx, options = {}) {
75293
75351
  const outputJson = options.json === true || ctx.format === "json";
75294
75352
  const isInteractive2 = Boolean(ctx.stdin.isTTY && ctx.stdout.isTTY);
@@ -75307,27 +75365,42 @@ async function authSetupAction(ctx, options = {}) {
75307
75365
  process.exitCode = EXIT_CODES.auth;
75308
75366
  return;
75309
75367
  }
75310
- if (!isInteractive2 && (!options.token || !options.ageKey) && !outputJson) {
75311
- const error = new AuthError({
75312
- userMessage: "Non-interactive mode requires --token and --age-key to be provided.",
75313
- suggestion: "Re-run with --token and --age-key or use an interactive TTY."
75314
- });
75315
- handleAuthError(ctx, options, error);
75316
- return;
75317
- }
75318
75368
  if (!outputJson) {
75319
75369
  ctx.output.data("\n\u{1F510} Setting up skill-cli secrets...\n");
75320
75370
  ctx.output.data("Checking 1Password CLI...");
75321
75371
  ctx.output.data(` op CLI: \u2705 ${opVersion} found`);
75322
75372
  }
75373
+ const secretsKeyName = options.secretsKey?.trim() || DEFAULT_SECRETS_KEY;
75374
+ let token = options.token;
75375
+ let tokenSource = token ? "flag" : void 0;
75376
+ if (!token && process.env.OP_SERVICE_ACCOUNT_TOKEN) {
75377
+ token = process.env.OP_SERVICE_ACCOUNT_TOKEN;
75378
+ tokenSource = "env";
75379
+ }
75380
+ if (!token) {
75381
+ const leased = leaseTokenFromSecrets(secretsKeyName);
75382
+ if (leased) {
75383
+ token = leased;
75384
+ tokenSource = "secrets";
75385
+ process.env.OP_SERVICE_ACCOUNT_TOKEN = leased;
75386
+ }
75387
+ }
75323
75388
  let whoami;
75324
75389
  try {
75390
+ if (token) {
75391
+ process.env.OP_SERVICE_ACCOUNT_TOKEN = token;
75392
+ }
75325
75393
  whoami = opWhoami();
75326
75394
  } catch (error) {
75395
+ if (token) {
75396
+ delete process.env.OP_SERVICE_ACCOUNT_TOKEN;
75397
+ token = void 0;
75398
+ tokenSource = void 0;
75399
+ }
75327
75400
  if (!isInteractive2) {
75328
75401
  const authError = new AuthError({
75329
75402
  userMessage: "Not signed in to 1Password CLI.",
75330
- suggestion: "Run op signin and try again.",
75403
+ suggestion: "Provide --token, set OP_SERVICE_ACCOUNT_TOKEN, use the secrets CLI, or run op signin.",
75331
75404
  cause: error
75332
75405
  });
75333
75406
  handleAuthError(ctx, options, authError);
@@ -75369,17 +75442,8 @@ async function authSetupAction(ctx, options = {}) {
75369
75442
  if (!outputJson) {
75370
75443
  ctx.output.data("Fetching secrets from 1Password...");
75371
75444
  }
75372
- let ageKey = options.ageKey;
75373
- let token = options.token;
75445
+ let ageKey = options.ageKey || process.env.SKILL_AGE_KEY;
75374
75446
  try {
75375
- if (!ageKey) {
75376
- ageKey = await resolveOpSecret({
75377
- label: "AGE_SECRET_KEY",
75378
- reference: ONEPASSWORD_READ_REFS.ageKey,
75379
- itemId: ONEPASSWORD_ITEM_IDS.ageKey,
75380
- interactive: isInteractive2 && !outputJson
75381
- });
75382
- }
75383
75447
  if (!token) {
75384
75448
  token = await resolveOpSecret({
75385
75449
  label: "OP_SERVICE_ACCOUNT_TOKEN",
@@ -75387,6 +75451,16 @@ async function authSetupAction(ctx, options = {}) {
75387
75451
  itemId: ONEPASSWORD_ITEM_IDS.serviceAccount,
75388
75452
  interactive: isInteractive2 && !outputJson
75389
75453
  });
75454
+ tokenSource = "op";
75455
+ process.env.OP_SERVICE_ACCOUNT_TOKEN = token;
75456
+ }
75457
+ if (!ageKey) {
75458
+ ageKey = await resolveOpSecret({
75459
+ label: "SKILL_AGE_KEY",
75460
+ reference: ONEPASSWORD_READ_REFS.ageKey,
75461
+ itemId: ONEPASSWORD_ITEM_IDS.ageKey,
75462
+ interactive: isInteractive2 && !outputJson
75463
+ });
75390
75464
  }
75391
75465
  } catch (error) {
75392
75466
  const authError = error instanceof AuthError ? error : new AuthError({
@@ -75407,87 +75481,66 @@ async function authSetupAction(ctx, options = {}) {
75407
75481
  }
75408
75482
  if (!isValidAgeKey(ageKey)) {
75409
75483
  const authError = new AuthError({
75410
- userMessage: "AGE_SECRET_KEY format looks invalid.",
75484
+ userMessage: "SKILL_AGE_KEY format looks invalid.",
75411
75485
  suggestion: "Re-run skill auth setup and fetch the correct key."
75412
75486
  });
75413
75487
  handleAuthError(ctx, options, authError);
75414
75488
  return;
75415
75489
  }
75416
75490
  if (!outputJson) {
75417
- ctx.output.data(" AGE_SECRET_KEY: \u2705 fetched");
75491
+ ctx.output.data(" SKILL_AGE_KEY: \u2705 fetched");
75418
75492
  ctx.output.data(" OP_SERVICE_ACCOUNT_TOKEN: \u2705 fetched\n");
75493
+ if (tokenSource === "secrets") {
75494
+ ctx.output.data(` token source: secrets (${secretsKeyName})`);
75495
+ }
75419
75496
  }
75497
+ process.env.SKILL_AGE_KEY = ageKey;
75420
75498
  process.env.AGE_SECRET_KEY = ageKey;
75421
75499
  process.env.OP_SERVICE_ACCOUNT_TOKEN = token;
75422
75500
  if (!outputJson) {
75423
75501
  ctx.output.data("Verifying access...");
75424
- ctx.output.data(" AGE_SECRET_KEY format: \u2705");
75502
+ ctx.output.data(" SKILL_AGE_KEY format: \u2705");
75425
75503
  }
75426
75504
  try {
75427
- const provider = await createSecretsProvider();
75428
- await provider.resolve(SECRET_REFS.DATABASE_URL);
75505
+ opWhoami();
75429
75506
  if (!outputJson) {
75430
- ctx.output.data(" 1Password SDK resolve: \u2705\n");
75507
+ ctx.output.data(" op whoami with token: \u2705\n");
75431
75508
  }
75432
75509
  } catch (error) {
75433
75510
  const authError = new AuthError({
75434
- userMessage: "Unable to resolve secrets with 1Password SDK.",
75435
- suggestion: "Verify OP_SERVICE_ACCOUNT_TOKEN and try again.",
75511
+ userMessage: "Unable to validate OP_SERVICE_ACCOUNT_TOKEN with op CLI.",
75512
+ suggestion: "Verify OP_SERVICE_ACCOUNT_TOKEN and Support vault access, then try again.",
75436
75513
  cause: error
75437
75514
  });
75438
75515
  handleAuthError(ctx, options, authError);
75439
75516
  return;
75440
75517
  }
75441
- let envFile;
75442
- if (isInteractive2 && !outputJson) {
75443
- const persistence = await select({
75444
- message: "Persist secrets for future commands?",
75445
- choices: [
75446
- { name: "Write .env.local", value: "env" },
75447
- { name: "Print shell export commands", value: "exports" },
75448
- { name: "Skip (temporary for this session)", value: "skip" }
75449
- ]
75450
- });
75451
- if (persistence === "env") {
75452
- const envPath = resolve2(process.cwd(), ".env.local");
75453
- if (existsSync3(envPath)) {
75454
- const overwrite = await confirm({
75455
- message: `.env.local already exists at ${envPath}. Overwrite?`,
75456
- default: false
75457
- });
75458
- if (!overwrite) {
75459
- envFile = void 0;
75460
- } else {
75461
- writeFileSync(
75462
- envPath,
75463
- `AGE_SECRET_KEY=${ageKey}
75464
- OP_SERVICE_ACCOUNT_TOKEN=${token}
75465
- `,
75466
- "utf8"
75467
- );
75468
- envFile = envPath;
75469
- }
75470
- } else {
75471
- writeFileSync(
75472
- envPath,
75473
- `AGE_SECRET_KEY=${ageKey}
75474
- OP_SERVICE_ACCOUNT_TOKEN=${token}
75475
- `,
75476
- "utf8"
75477
- );
75478
- envFile = envPath;
75479
- }
75518
+ let ageKeyPath;
75519
+ if (options.persistAgeKey !== false) {
75520
+ ageKeyPath = persistAgeKeyToConfig(ageKey);
75521
+ if (!outputJson) {
75522
+ ctx.output.data(` persisted: \u2705 ${ageKeyPath}`);
75480
75523
  }
75481
75524
  }
75482
75525
  if (!outputJson) {
75483
- ctx.output.data("\u{1F389} All set! Secrets configured.\n");
75484
- printExportInstructions(ctx, ageKey, token);
75526
+ ctx.output.data("\n\u{1F389} All set! Secrets configured.\n");
75527
+ ctx.output.data("Next commands:");
75528
+ ctx.output.data(" skill doctor");
75529
+ ctx.output.data(" skill front inbox --limit 5 --format json");
75530
+ if (options.persistAgeKey === false) {
75531
+ printExportInstructions(ctx, ageKey, token);
75532
+ } else {
75533
+ ctx.output.data(
75534
+ " (Optional) export OP_SERVICE_ACCOUNT_TOKEN for live 1Password reads"
75535
+ );
75536
+ }
75485
75537
  }
75486
75538
  writeResult2(ctx, options, {
75487
75539
  success: true,
75488
75540
  tokenConfigured: true,
75489
75541
  ageKeyConfigured: true,
75490
- envFile
75542
+ ageKeyPath,
75543
+ tokenSource
75491
75544
  });
75492
75545
  }
75493
75546
 
@@ -75702,10 +75755,19 @@ function registerAuthCommands(program3, usageState2) {
75702
75755
  const ctx = await buildContext(command, options.json);
75703
75756
  await whoamiAction(ctx, options);
75704
75757
  });
75705
- auth.command("setup").description("Interactive wizard to configure 1Password secrets").option(
75758
+ auth.command("setup").description(
75759
+ "One-command 1Password setup (headless-friendly, writes ~/.config/skill/age.key)"
75760
+ ).option(
75706
75761
  "--token <token>",
75707
- "Service account token (defaults to 1Password op read)"
75708
- ).option("--age-key <ageKey>", "AGE secret key (defaults to op read)").option("--json", "Output as JSON").action(async (options, command) => {
75762
+ "Service account token (highest priority source)"
75763
+ ).option("--age-key <ageKey>", "SKILL_AGE_KEY (defaults to 1Password read)").option(
75764
+ "--secrets-key <name>",
75765
+ "Local secrets key name for OP token fallback",
75766
+ "skill_support_1password_service_account_token"
75767
+ ).option(
75768
+ "--no-persist-age-key",
75769
+ "Do not write SKILL_AGE_KEY to ~/.config/skill/age.key"
75770
+ ).option("--json", "Output as JSON").action(async (options, command) => {
75709
75771
  const ctx = await buildContext(command, options.json);
75710
75772
  await authSetupAction(ctx, options);
75711
75773
  });
@@ -75847,6 +75909,19 @@ var handleAxiomError = (ctx, error, message, suggestion = "Verify AXIOM_TOKEN an
75847
75909
  ctx.output.error(formatError(cliError));
75848
75910
  process.exitCode = cliError.exitCode;
75849
75911
  };
75912
+ var resolveDatasetOverride = (command, options) => {
75913
+ const fromOptions = options?.dataset?.trim();
75914
+ if (fromOptions) return fromOptions;
75915
+ const parentOpts = typeof command.parent?.opts === "function" ? command.parent.opts() : {};
75916
+ const fromParent = typeof parentOpts?.dataset === "string" ? parentOpts.dataset.trim() : void 0;
75917
+ return fromParent || void 0;
75918
+ };
75919
+ var applyDatasetOverride = (command, options) => {
75920
+ const dataset = resolveDatasetOverride(command, options);
75921
+ if (dataset) {
75922
+ process.env.AXIOM_DATASET = dataset;
75923
+ }
75924
+ };
75850
75925
  function aggVal(bucket, index2) {
75851
75926
  const aggs = bucket?.aggregations;
75852
75927
  return Number(aggs?.[index2]?.value ?? 0);
@@ -76379,7 +76454,11 @@ ${statusIcon} Pipeline Health Dashboard (${options.since ?? "7d"})`
76379
76454
  }
76380
76455
  }
76381
76456
  function registerForensicCommands(axiom) {
76382
- axiom.command("pipeline-trace").description("Full trace for a single conversation (pipeline debugging)").argument("<conversationId>", "Conversation ID to trace").option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "7d").option("--json", "Output as JSON").action(async (conversationId, options, command) => {
76457
+ axiom.command("pipeline-trace").description("Full trace for a single conversation (pipeline debugging)").argument("<conversationId>", "Conversation ID to trace").option(
76458
+ "-d, --dataset <name>",
76459
+ "Axiom dataset override (defaults to AXIOM_DATASET)"
76460
+ ).option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "7d").option("--json", "Output as JSON").action(async (conversationId, options, command) => {
76461
+ applyDatasetOverride(command, options);
76383
76462
  const opts = typeof command.optsWithGlobals === "function" ? command.optsWithGlobals() : {
76384
76463
  ...command.parent?.opts(),
76385
76464
  ...command.opts()
@@ -76391,7 +76470,11 @@ function registerForensicCommands(axiom) {
76391
76470
  });
76392
76471
  await pipelineTrace(ctx, conversationId, options);
76393
76472
  });
76394
- axiom.command("step-timings").description("P50/P95 duration by step name").option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "7d").option("--json", "Output as JSON").action(async (options, command) => {
76473
+ axiom.command("step-timings").description("P50/P95 duration by step name").option(
76474
+ "-d, --dataset <name>",
76475
+ "Axiom dataset override (defaults to AXIOM_DATASET)"
76476
+ ).option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "7d").option("--json", "Output as JSON").action(async (options, command) => {
76477
+ applyDatasetOverride(command, options);
76395
76478
  const opts = typeof command.optsWithGlobals === "function" ? command.optsWithGlobals() : {
76396
76479
  ...command.parent?.opts(),
76397
76480
  ...command.opts()
@@ -76403,7 +76486,11 @@ function registerForensicCommands(axiom) {
76403
76486
  });
76404
76487
  await stepTimings(ctx, options);
76405
76488
  });
76406
- axiom.command("error-rate").description("Failure rate by step over time window").option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "7d").option("--json", "Output as JSON").action(async (options, command) => {
76489
+ axiom.command("error-rate").description("Failure rate by step over time window").option(
76490
+ "-d, --dataset <name>",
76491
+ "Axiom dataset override (defaults to AXIOM_DATASET)"
76492
+ ).option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "7d").option("--json", "Output as JSON").action(async (options, command) => {
76493
+ applyDatasetOverride(command, options);
76407
76494
  const opts = typeof command.optsWithGlobals === "function" ? command.optsWithGlobals() : {
76408
76495
  ...command.parent?.opts(),
76409
76496
  ...command.opts()
@@ -76415,7 +76502,11 @@ function registerForensicCommands(axiom) {
76415
76502
  });
76416
76503
  await errorRate(ctx, options);
76417
76504
  });
76418
- axiom.command("data-flow-check").description("Verify field presence at each pipeline boundary").option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "7d").option("--json", "Output as JSON").action(async (options, command) => {
76505
+ axiom.command("data-flow-check").description("Verify field presence at each pipeline boundary").option(
76506
+ "-d, --dataset <name>",
76507
+ "Axiom dataset override (defaults to AXIOM_DATASET)"
76508
+ ).option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "7d").option("--json", "Output as JSON").action(async (options, command) => {
76509
+ applyDatasetOverride(command, options);
76419
76510
  const opts = typeof command.optsWithGlobals === "function" ? command.optsWithGlobals() : {
76420
76511
  ...command.parent?.opts(),
76421
76512
  ...command.opts()
@@ -76427,7 +76518,11 @@ function registerForensicCommands(axiom) {
76427
76518
  });
76428
76519
  await dataFlowCheck(ctx, options);
76429
76520
  });
76430
- axiom.command("tag-health").description("Tag application success/failure breakdown").option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "7d").option("--json", "Output as JSON").action(async (options, command) => {
76521
+ axiom.command("tag-health").description("Tag application success/failure breakdown").option(
76522
+ "-d, --dataset <name>",
76523
+ "Axiom dataset override (defaults to AXIOM_DATASET)"
76524
+ ).option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "7d").option("--json", "Output as JSON").action(async (options, command) => {
76525
+ applyDatasetOverride(command, options);
76431
76526
  const opts = typeof command.optsWithGlobals === "function" ? command.optsWithGlobals() : {
76432
76527
  ...command.parent?.opts(),
76433
76528
  ...command.opts()
@@ -76439,7 +76534,11 @@ function registerForensicCommands(axiom) {
76439
76534
  });
76440
76535
  await tagHealth(ctx, options);
76441
76536
  });
76442
- axiom.command("approval-stats").description("Auto-approval vs manual review breakdown").option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "7d").option("--json", "Output as JSON").action(async (options, command) => {
76537
+ axiom.command("approval-stats").description("Auto-approval vs manual review breakdown").option(
76538
+ "-d, --dataset <name>",
76539
+ "Axiom dataset override (defaults to AXIOM_DATASET)"
76540
+ ).option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "7d").option("--json", "Output as JSON").action(async (options, command) => {
76541
+ applyDatasetOverride(command, options);
76443
76542
  const opts = typeof command.optsWithGlobals === "function" ? command.optsWithGlobals() : {
76444
76543
  ...command.parent?.opts(),
76445
76544
  ...command.opts()
@@ -76451,7 +76550,11 @@ function registerForensicCommands(axiom) {
76451
76550
  });
76452
76551
  await approvalStats(ctx, options);
76453
76552
  });
76454
- axiom.command("pipeline-health").description("Overall pipeline health dashboard (agent-readable)").option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "7d").option("--json", "Output as JSON").action(async (options, command) => {
76553
+ axiom.command("pipeline-health").description("Overall pipeline health dashboard (agent-readable)").option(
76554
+ "-d, --dataset <name>",
76555
+ "Axiom dataset override (defaults to AXIOM_DATASET)"
76556
+ ).option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "7d").option("--json", "Output as JSON").action(async (options, command) => {
76557
+ applyDatasetOverride(command, options);
76455
76558
  const opts = typeof command.optsWithGlobals === "function" ? command.optsWithGlobals() : {
76456
76559
  ...command.parent?.opts(),
76457
76560
  ...command.opts()
@@ -76475,6 +76578,65 @@ var handleAxiomError2 = (ctx, error, message, suggestion = "Verify AXIOM_TOKEN a
76475
76578
  ctx.output.error(formatError(cliError));
76476
76579
  process.exitCode = cliError.exitCode;
76477
76580
  };
76581
+ var resolveDatasetOverride2 = (command, options) => {
76582
+ const fromOptions = options?.dataset?.trim();
76583
+ if (fromOptions) return fromOptions;
76584
+ const parentOpts = typeof command.parent?.opts === "function" ? command.parent.opts() : {};
76585
+ const fromParent = typeof parentOpts?.dataset === "string" ? parentOpts.dataset.trim() : void 0;
76586
+ return fromParent || void 0;
76587
+ };
76588
+ var applyDatasetOverride2 = (command, options) => {
76589
+ const dataset = resolveDatasetOverride2(command, options);
76590
+ if (dataset) {
76591
+ process.env.AXIOM_DATASET = dataset;
76592
+ }
76593
+ };
76594
+ async function listDatasets(ctx, options = {}) {
76595
+ const client = getAxiomClient();
76596
+ const outputJson = options.json === true || ctx.format === "json";
76597
+ const activeDataset = getDataset();
76598
+ try {
76599
+ const datasets = await withSpinner(
76600
+ "Loading datasets...",
76601
+ () => client.datasets.list()
76602
+ );
76603
+ const sorted = [...datasets].sort((a, b) => a.name.localeCompare(b.name));
76604
+ if (outputJson) {
76605
+ ctx.output.data({
76606
+ activeDataset,
76607
+ total: sorted.length,
76608
+ datasets: sorted
76609
+ });
76610
+ return;
76611
+ }
76612
+ if (sorted.length === 0) {
76613
+ ctx.output.data("No datasets found");
76614
+ return;
76615
+ }
76616
+ ctx.output.data("\nAxiom Datasets");
76617
+ ctx.output.data("=".repeat(100));
76618
+ for (const dataset of sorted) {
76619
+ const marker = dataset.name === activeDataset ? "*" : " ";
76620
+ const region = dataset.region ?? "unknown-region";
76621
+ const created = formatTime(dataset.created);
76622
+ const description = dataset.description ? ` - ${dataset.description}` : "";
76623
+ ctx.output.data(
76624
+ `${marker} ${dataset.name} (${region}, created ${created})${description}`
76625
+ );
76626
+ }
76627
+ ctx.output.data("\n" + "-".repeat(100));
76628
+ ctx.output.data(`Total datasets: ${sorted.length}`);
76629
+ ctx.output.data(`Active dataset: ${activeDataset}`);
76630
+ ctx.output.data("Tip: set AXIOM_DATASET=<dataset-name> to switch context.");
76631
+ } catch (error) {
76632
+ handleAxiomError2(
76633
+ ctx,
76634
+ error,
76635
+ "Failed to list Axiom datasets.",
76636
+ "Verify AXIOM_TOKEN and dataset permissions."
76637
+ );
76638
+ }
76639
+ }
76478
76640
  async function runQuery(ctx, apl, options) {
76479
76641
  const client = getAxiomClient();
76480
76642
  const { startTime, endTime } = parseTimeRange(options.since ?? "24h");
@@ -76585,10 +76747,10 @@ async function listErrors(ctx, options) {
76585
76747
  const limit2 = options.limit ?? 50;
76586
76748
  const { startTime, endTime } = parseTimeRange(options.since ?? "24h");
76587
76749
  const outputJson = options.json === true || ctx.format === "json";
76750
+ const queryLimit = Math.max(limit2 * 4, 200);
76588
76751
  const apl = `['${getDataset()}']
76589
- | where status == 'error' or error != ''
76590
76752
  | sort by _time desc
76591
- | limit ${limit2}`;
76753
+ | limit ${queryLimit}`;
76592
76754
  try {
76593
76755
  const result = await withSpinner(
76594
76756
  "Loading errors...",
@@ -76597,7 +76759,15 @@ async function listErrors(ctx, options) {
76597
76759
  endTime: endTime.toISOString()
76598
76760
  })
76599
76761
  );
76600
- const matches = result.matches ?? [];
76762
+ const matches = (result.matches ?? []).filter((match) => {
76763
+ const d = match.data;
76764
+ const status = String(d.status ?? "").toLowerCase();
76765
+ const level = String(d.level ?? "").toLowerCase();
76766
+ const errorText = [d.error, d.errorStack, d.errorMessage].map(
76767
+ (value) => value === void 0 || value === null ? "" : String(value).trim()
76768
+ ).find((value) => value.length > 0);
76769
+ return status === "error" || level === "error" || Boolean(errorText);
76770
+ }).slice(0, limit2);
76601
76771
  if (outputJson) {
76602
76772
  ctx.output.data(matches.map((m) => m.data));
76603
76773
  return;
@@ -76852,10 +77022,33 @@ async function listApprovals(ctx, options) {
76852
77022
  }
76853
77023
  }
76854
77024
  function registerAxiomCommands(program3) {
76855
- const axiom = program3.command("axiom").description(
77025
+ const axiom = program3.command("axiom").option(
77026
+ "-d, --dataset <name>",
77027
+ "Axiom dataset override (defaults to AXIOM_DATASET)"
77028
+ ).description(
76856
77029
  "Query Axiom logs and traces.\n Environment: AXIOM_TOKEN required. Run `skill doctor` to check."
76857
77030
  );
76858
- axiom.command("query").description("Run a raw APL query").argument("<apl>", "APL query string").option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "24h").option("--json", "Output as JSON").action(async (apl, options, command) => {
77031
+ axiom.command("datasets").description("List datasets available to the current Axiom token").option(
77032
+ "-d, --dataset <name>",
77033
+ "Axiom dataset override (defaults to AXIOM_DATASET)"
77034
+ ).option("--json", "Output as JSON").action(async (options, command) => {
77035
+ applyDatasetOverride2(command, options);
77036
+ const opts = typeof command.optsWithGlobals === "function" ? command.optsWithGlobals() : {
77037
+ ...command.parent?.opts(),
77038
+ ...command.opts()
77039
+ };
77040
+ const ctx = await createContext({
77041
+ format: options.json ? "json" : opts.format,
77042
+ verbose: opts.verbose,
77043
+ quiet: opts.quiet
77044
+ });
77045
+ await listDatasets(ctx, options);
77046
+ });
77047
+ axiom.command("query").description("Run a raw APL query").argument("<apl>", "APL query string").option(
77048
+ "-d, --dataset <name>",
77049
+ "Axiom dataset override (defaults to AXIOM_DATASET)"
77050
+ ).option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "24h").option("--json", "Output as JSON").action(async (apl, options, command) => {
77051
+ applyDatasetOverride2(command, options);
76859
77052
  const opts = typeof command.optsWithGlobals === "function" ? command.optsWithGlobals() : {
76860
77053
  ...command.parent?.opts(),
76861
77054
  ...command.opts()
@@ -76867,7 +77060,11 @@ function registerAxiomCommands(program3) {
76867
77060
  });
76868
77061
  await runQuery(ctx, apl, options);
76869
77062
  });
76870
- axiom.command("agents").description("List recent agent runs").option("-a, --app <slug>", "Filter by app").option("-l, --limit <n>", "Number of results", parseInt).option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "24h").option("--json", "Output as JSON").action(async (options, command) => {
77063
+ axiom.command("agents").description("List recent agent runs").option(
77064
+ "-d, --dataset <name>",
77065
+ "Axiom dataset override (defaults to AXIOM_DATASET)"
77066
+ ).option("-a, --app <slug>", "Filter by app").option("-l, --limit <n>", "Number of results", parseInt).option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "24h").option("--json", "Output as JSON").action(async (options, command) => {
77067
+ applyDatasetOverride2(command, options);
76871
77068
  const opts = typeof command.optsWithGlobals === "function" ? command.optsWithGlobals() : {
76872
77069
  ...command.parent?.opts(),
76873
77070
  ...command.opts()
@@ -76879,7 +77076,11 @@ function registerAxiomCommands(program3) {
76879
77076
  });
76880
77077
  await listAgentRuns(ctx, options);
76881
77078
  });
76882
- axiom.command("errors").description("List recent errors").option("-l, --limit <n>", "Number of results", parseInt).option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "24h").option("--json", "Output as JSON").action(async (options, command) => {
77079
+ axiom.command("errors").description("List recent errors").option(
77080
+ "-d, --dataset <name>",
77081
+ "Axiom dataset override (defaults to AXIOM_DATASET)"
77082
+ ).option("-l, --limit <n>", "Number of results", parseInt).option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "24h").option("--json", "Output as JSON").action(async (options, command) => {
77083
+ applyDatasetOverride2(command, options);
76883
77084
  const opts = typeof command.optsWithGlobals === "function" ? command.optsWithGlobals() : {
76884
77085
  ...command.parent?.opts(),
76885
77086
  ...command.opts()
@@ -76891,7 +77092,11 @@ function registerAxiomCommands(program3) {
76891
77092
  });
76892
77093
  await listErrors(ctx, options);
76893
77094
  });
76894
- axiom.command("conversation").description("Get all events for a conversation").argument("<conversationId>", "Front conversation ID").option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "7d").option("--json", "Output as JSON").action(async (conversationId, options, command) => {
77095
+ axiom.command("conversation").description("Get all events for a conversation").argument("<conversationId>", "Front conversation ID").option(
77096
+ "-d, --dataset <name>",
77097
+ "Axiom dataset override (defaults to AXIOM_DATASET)"
77098
+ ).option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "7d").option("--json", "Output as JSON").action(async (conversationId, options, command) => {
77099
+ applyDatasetOverride2(command, options);
76895
77100
  const opts = typeof command.optsWithGlobals === "function" ? command.optsWithGlobals() : {
76896
77101
  ...command.parent?.opts(),
76897
77102
  ...command.opts()
@@ -76903,7 +77108,11 @@ function registerAxiomCommands(program3) {
76903
77108
  });
76904
77109
  await getConversation(ctx, conversationId, options);
76905
77110
  });
76906
- axiom.command("classifications").description("Show classification distribution").option("-a, --app <slug>", "Filter by app").option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "24h").option("--json", "Output as JSON").action(async (options, command) => {
77111
+ axiom.command("classifications").description("Show classification distribution").option(
77112
+ "-d, --dataset <name>",
77113
+ "Axiom dataset override (defaults to AXIOM_DATASET)"
77114
+ ).option("-a, --app <slug>", "Filter by app").option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "24h").option("--json", "Output as JSON").action(async (options, command) => {
77115
+ applyDatasetOverride2(command, options);
76907
77116
  const opts = typeof command.optsWithGlobals === "function" ? command.optsWithGlobals() : {
76908
77117
  ...command.parent?.opts(),
76909
77118
  ...command.opts()
@@ -76915,7 +77124,11 @@ function registerAxiomCommands(program3) {
76915
77124
  });
76916
77125
  await getClassificationStats(ctx, options);
76917
77126
  });
76918
- axiom.command("workflow-steps").description("List workflow step traces (for debugging timeouts)").option("-w, --workflow <name>", "Filter by workflow name").option("-c, --conversation <id>", "Filter by conversation ID").option("-l, --limit <n>", "Number of results", parseInt).option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "24h").option("--json", "Output as JSON").action(async (options, command) => {
77127
+ axiom.command("workflow-steps").description("List workflow step traces (for debugging timeouts)").option(
77128
+ "-d, --dataset <name>",
77129
+ "Axiom dataset override (defaults to AXIOM_DATASET)"
77130
+ ).option("-w, --workflow <name>", "Filter by workflow name").option("-c, --conversation <id>", "Filter by conversation ID").option("-l, --limit <n>", "Number of results", parseInt).option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "24h").option("--json", "Output as JSON").action(async (options, command) => {
77131
+ applyDatasetOverride2(command, options);
76919
77132
  const opts = typeof command.optsWithGlobals === "function" ? command.optsWithGlobals() : {
76920
77133
  ...command.parent?.opts(),
76921
77134
  ...command.opts()
@@ -76927,7 +77140,11 @@ function registerAxiomCommands(program3) {
76927
77140
  });
76928
77141
  await listWorkflowSteps(ctx, options);
76929
77142
  });
76930
- axiom.command("approvals").description("List approval flow traces (HITL debugging)").option("-l, --limit <n>", "Number of results", parseInt).option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "24h").option("--json", "Output as JSON").action(async (options, command) => {
77143
+ axiom.command("approvals").description("List approval flow traces (HITL debugging)").option(
77144
+ "-d, --dataset <name>",
77145
+ "Axiom dataset override (defaults to AXIOM_DATASET)"
77146
+ ).option("-l, --limit <n>", "Number of results", parseInt).option("-s, --since <time>", "Time range (e.g., 1h, 24h, 7d)", "24h").option("--json", "Output as JSON").action(async (options, command) => {
77147
+ applyDatasetOverride2(command, options);
76931
77148
  const opts = typeof command.optsWithGlobals === "function" ? command.optsWithGlobals() : {
76932
77149
  ...command.parent?.opts(),
76933
77150
  ...command.opts()
@@ -77092,11 +77309,11 @@ Saved to ${options.output}`);
77092
77309
  }
77093
77310
  }
77094
77311
  async function toEvalite(options) {
77095
- const { readFileSync: readFileSync14 } = await import("fs");
77312
+ const { readFileSync: readFileSync15 } = await import("fs");
77096
77313
  const { ctx } = options;
77097
77314
  const outputJson = ctx.format === "json";
77098
77315
  const data2 = JSON.parse(
77099
- readFileSync14(options.input, "utf-8")
77316
+ readFileSync15(options.input, "utf-8")
77100
77317
  );
77101
77318
  const evaliteData = data2.map((d) => ({
77102
77319
  input: d.triggerMessage.body,
@@ -77157,13 +77374,13 @@ init_esm_shims();
77157
77374
 
77158
77375
  // src/commands/config/get.ts
77159
77376
  init_esm_shims();
77160
- import { existsSync as existsSync5, readFileSync as readFileSync3 } from "fs";
77377
+ import { existsSync as existsSync4, readFileSync as readFileSync3 } from "fs";
77161
77378
  import { Decrypter as Decrypter2 } from "age-encryption";
77162
77379
 
77163
77380
  // src/commands/config/set.ts
77164
77381
  init_esm_shims();
77165
- import { existsSync as existsSync4, readFileSync as readFileSync2, writeFileSync as writeFileSync3 } from "fs";
77166
- import { password, select as select2 } from "@inquirer/prompts";
77382
+ import { existsSync as existsSync3, readFileSync as readFileSync2, writeFileSync as writeFileSync3 } from "fs";
77383
+ import { password, select } from "@inquirer/prompts";
77167
77384
  import { Decrypter, Encrypter, identityToRecipient } from "age-encryption";
77168
77385
 
77169
77386
  // src/commands/config/init.ts
@@ -77211,7 +77428,7 @@ function parseKeyValue(input2) {
77211
77428
  return { key, value };
77212
77429
  }
77213
77430
  async function readExistingConfig(identity, configPath) {
77214
- if (!existsSync4(configPath)) {
77431
+ if (!existsSync3(configPath)) {
77215
77432
  return {};
77216
77433
  }
77217
77434
  try {
@@ -77238,7 +77455,7 @@ async function readExistingConfig(identity, configPath) {
77238
77455
  async function configSetAction(ctx, keyValue, options = {}) {
77239
77456
  const outputJson = options.json === true || ctx.format === "json";
77240
77457
  const keyPath = getAgeKeyPath2();
77241
- if (!existsSync4(keyPath)) {
77458
+ if (!existsSync3(keyPath)) {
77242
77459
  const result = {
77243
77460
  success: false,
77244
77461
  error: "Age key not found. Run: skill config init"
@@ -77254,7 +77471,7 @@ async function configSetAction(ctx, keyValue, options = {}) {
77254
77471
  let finalKeyValue = keyValue;
77255
77472
  if (!finalKeyValue && process.stdin.isTTY && !outputJson) {
77256
77473
  try {
77257
- const selectedKey = await select2({
77474
+ const selectedKey = await select({
77258
77475
  message: "Select a secret key to set:",
77259
77476
  choices: Object.keys(SECRET_REFS).map((key) => ({
77260
77477
  name: key,
@@ -77327,7 +77544,7 @@ async function configSetAction(ctx, keyValue, options = {}) {
77327
77544
  // src/commands/config/get.ts
77328
77545
  async function decryptConfig(identity) {
77329
77546
  const configPath = getEncryptedConfigPath();
77330
- if (!existsSync5(configPath)) {
77547
+ if (!existsSync4(configPath)) {
77331
77548
  return {};
77332
77549
  }
77333
77550
  const encrypted = readFileSync3(configPath);
@@ -77412,11 +77629,11 @@ async function configGetAction(ctx, key, options = {}) {
77412
77629
 
77413
77630
  // src/commands/config/list.ts
77414
77631
  init_esm_shims();
77415
- import { existsSync as existsSync6, readFileSync as readFileSync4 } from "fs";
77632
+ import { existsSync as existsSync5, readFileSync as readFileSync4 } from "fs";
77416
77633
  import { Decrypter as Decrypter3 } from "age-encryption";
77417
77634
  async function decryptConfig2(identity) {
77418
77635
  const configPath = getEncryptedConfigPath();
77419
- if (!existsSync6(configPath)) {
77636
+ if (!existsSync5(configPath)) {
77420
77637
  return {};
77421
77638
  }
77422
77639
  const encrypted = readFileSync4(configPath);
@@ -77639,9 +77856,55 @@ var registerDbStatusCommand = (prog) => {
77639
77856
 
77640
77857
  // src/commands/deploys.ts
77641
77858
  init_esm_shims();
77642
- import { execSync as execSync2 } from "child_process";
77859
+ import { execSync as execSync3 } from "child_process";
77860
+ import { existsSync as existsSync6, readFileSync as readFileSync5 } from "fs";
77861
+ import path from "path";
77643
77862
  import "commander";
77644
77863
  var VERCEL_SCOPE = "skillrecordings";
77864
+ function hasWorkspaceVercelDependency(dir) {
77865
+ const packageJsonPath = path.join(dir, "package.json");
77866
+ if (!existsSync6(packageJsonPath)) return false;
77867
+ try {
77868
+ const pkg = JSON.parse(readFileSync5(packageJsonPath, "utf-8"));
77869
+ const hasWorkspaces = Array.isArray(pkg.workspaces);
77870
+ const hasVercel = typeof pkg.devDependencies?.vercel === "string" || typeof pkg.dependencies?.vercel === "string";
77871
+ return hasWorkspaces && hasVercel;
77872
+ } catch {
77873
+ return false;
77874
+ }
77875
+ }
77876
+ function findPreferredNodeModulesBinDir(startDir) {
77877
+ const candidates = [];
77878
+ let dir = startDir;
77879
+ while (true) {
77880
+ const candidate = path.join(dir, "node_modules", ".bin");
77881
+ const vercelBin = process.platform === "win32" ? path.join(candidate, "vercel.cmd") : path.join(candidate, "vercel");
77882
+ if (existsSync6(vercelBin)) {
77883
+ candidates.push(candidate);
77884
+ }
77885
+ const parent2 = path.dirname(dir);
77886
+ if (parent2 === dir) break;
77887
+ dir = parent2;
77888
+ }
77889
+ for (const candidate of candidates) {
77890
+ const rootDir = path.resolve(candidate, "..", "..");
77891
+ if (hasWorkspaceVercelDependency(rootDir)) return candidate;
77892
+ }
77893
+ return candidates.length > 0 ? candidates[candidates.length - 1] : null;
77894
+ }
77895
+ function getVercelEnv() {
77896
+ const env = {
77897
+ ...process.env,
77898
+ FORCE_COLOR: "0",
77899
+ NO_COLOR: "1"
77900
+ };
77901
+ const binDir = findPreferredNodeModulesBinDir(process.cwd());
77902
+ if (binDir) {
77903
+ const currentPath = env.PATH ?? "";
77904
+ env.PATH = `${binDir}${path.delimiter}${currentPath}`;
77905
+ }
77906
+ return env;
77907
+ }
77645
77908
  var APPS = {
77646
77909
  front: {
77647
77910
  vercel: "skill-support-agent-front",
@@ -77657,12 +77920,15 @@ function stripAnsi(str2) {
77657
77920
  }
77658
77921
  function runVercel(args) {
77659
77922
  try {
77660
- const raw = execSync2(`vercel ${args} --scope ${VERCEL_SCOPE} --yes 2>&1`, {
77661
- encoding: "utf-8",
77662
- timeout: 3e4,
77663
- stdio: ["pipe", "pipe", "pipe"],
77664
- env: { ...process.env, FORCE_COLOR: "0", NO_COLOR: "1" }
77665
- }).trim();
77923
+ const raw = execSync3(
77924
+ `vercel ${args} --scope ${VERCEL_SCOPE} --non-interactive 2>&1`,
77925
+ {
77926
+ encoding: "utf-8",
77927
+ timeout: 6e4,
77928
+ stdio: ["pipe", "pipe", "pipe"],
77929
+ env: getVercelEnv()
77930
+ }
77931
+ ).trim();
77666
77932
  return stripAnsi(raw);
77667
77933
  } catch (err) {
77668
77934
  const out = err.stdout?.trim() || err.stderr?.trim() || err.message;
@@ -77756,7 +78022,7 @@ async function deploysLogs(ctx, appName, options) {
77756
78022
  \u{1F4CB} Recent logs for ${name} (${app.vercel})
77757
78023
  `);
77758
78024
  }
77759
- const lsOutput = runVercel(`ls ${app.vercel} --limit 5`);
78025
+ const lsOutput = runVercel(`ls ${app.vercel}`);
77760
78026
  const prodLine = lsOutput.split("\n").find((l) => l.includes("Production") && l.includes("Ready"));
77761
78027
  const urlMatch = prodLine?.match(/https:\/\/\S+/);
77762
78028
  if (!urlMatch) {
@@ -77766,10 +78032,16 @@ async function deploysLogs(ctx, appName, options) {
77766
78032
  });
77767
78033
  }
77768
78034
  const url = urlMatch[0];
78035
+ const limit2 = parseInt(options.lines || "30");
78036
+ const sinceClause = options.since ? ` --since ${options.since}` : "";
77769
78037
  if (outputJson) {
77770
- const logsOutput = execSync2(
77771
- `vercel logs ${url} --scope ${VERCEL_SCOPE} --output short 2>&1 | tail -${options.lines || "30"}`,
77772
- { encoding: "utf-8", timeout: 3e4 }
78038
+ const logsOutput = execSync3(
78039
+ `vercel logs ${url} --no-follow --limit ${limit2} --json${sinceClause} --scope ${VERCEL_SCOPE} --non-interactive 2>&1`,
78040
+ {
78041
+ encoding: "utf-8",
78042
+ timeout: 12e4,
78043
+ env: getVercelEnv()
78044
+ }
77773
78045
  );
77774
78046
  ctx.output.data({ app: name, deployment: url, logs: logsOutput.trim() });
77775
78047
  return;
@@ -77777,9 +78049,13 @@ async function deploysLogs(ctx, appName, options) {
77777
78049
  ctx.output.data(` Deployment: ${url}
77778
78050
  `);
77779
78051
  try {
77780
- const logsOutput = execSync2(
77781
- `vercel logs ${url} --scope ${VERCEL_SCOPE} --output short 2>&1 | tail -${options.lines || "30"}`,
77782
- { encoding: "utf-8", timeout: 3e4 }
78052
+ const logsOutput = execSync3(
78053
+ `vercel logs ${url} --no-follow --limit ${limit2}${sinceClause} --scope ${VERCEL_SCOPE} --non-interactive 2>&1`,
78054
+ {
78055
+ encoding: "utf-8",
78056
+ timeout: 12e4,
78057
+ env: getVercelEnv()
78058
+ }
77783
78059
  );
77784
78060
  ctx.output.data(logsOutput);
77785
78061
  } catch (err) {
@@ -77806,7 +78082,7 @@ async function deploysInspect(ctx, appName, options) {
77806
78082
  });
77807
78083
  }
77808
78084
  const [name, app] = apps[0];
77809
- const lsOutput = runVercel(`ls ${app.vercel} --limit 3`);
78085
+ const lsOutput = runVercel(`ls ${app.vercel}`);
77810
78086
  const prodLine = lsOutput.split("\n").find((l) => l.includes("Production") && l.includes("Ready"));
77811
78087
  const urlMatch = prodLine?.match(/https:\/\/\S+/);
77812
78088
  if (!urlMatch) {
@@ -77844,7 +78120,7 @@ function registerDeployCommands(program3) {
77844
78120
  });
77845
78121
  await deploysStatus(ctx, app, options);
77846
78122
  });
77847
- deploys.command("logs").description("Show recent logs for an app").argument("<app>", "App name (front, slack)").option("-n, --lines <number>", "Number of log lines", "30").option("--json", "JSON output").action(async (app, options, command) => {
78123
+ deploys.command("logs").description("Show recent logs for an app").argument("<app>", "App name (front, slack)").option("-n, --lines <number>", "Number of log lines", "30").option("--since <duration>", "Fetch logs since (e.g. 30m, 1h)").option("--json", "JSON output").action(async (app, options, command) => {
77848
78124
  const ctx = await createContext({
77849
78125
  format: options.json === true ? "json" : typeof command.optsWithGlobals === "function" ? command.optsWithGlobals().format : command.parent?.opts().format,
77850
78126
  verbose: typeof command.optsWithGlobals === "function" ? command.optsWithGlobals().verbose : command.parent?.opts().verbose,
@@ -77872,7 +78148,7 @@ function registerDeployCommands(program3) {
77872
78148
 
77873
78149
  // src/commands/doctor.ts
77874
78150
  init_esm_shims();
77875
- import { execSync as execSync3 } from "child_process";
78151
+ import { execSync as execSync4 } from "child_process";
77876
78152
  import { existsSync as existsSync7 } from "fs";
77877
78153
  import { join as join3 } from "path";
77878
78154
  var REQUIRED_ENV_VARS = [
@@ -77905,23 +78181,26 @@ function checkKeychain() {
77905
78181
  message: opAvailable ? void 0 : "Not installed or not authenticated"
77906
78182
  });
77907
78183
  const opToken = getFromKeychain("op-service-account-token");
78184
+ const opTokenFromEnv = process.env.OP_SERVICE_ACCOUNT_TOKEN;
77908
78185
  checks.push({
77909
- name: "op-service-account-token",
77910
- status: opToken ? "ok" : "warn",
77911
- message: opToken ? void 0 : "Not found in keychain"
78186
+ name: "OP token (env/keychain)",
78187
+ status: opToken || opTokenFromEnv ? "ok" : "warn",
78188
+ message: opToken || opTokenFromEnv ? void 0 : "Missing. Run: skill auth setup"
77912
78189
  });
77913
78190
  const ageKey = getFromKeychain("age-private-key");
78191
+ const ageKeyPath = getAgeKeyPath();
78192
+ const ageKeyFileExists = existsSync7(ageKeyPath);
77914
78193
  checks.push({
77915
- name: "age-private-key",
77916
- status: ageKey ? "ok" : "warn",
77917
- message: ageKey ? void 0 : "Not found in keychain"
78194
+ name: "SKILL_AGE_KEY (file/keychain)",
78195
+ status: ageKey || ageKeyFileExists ? "ok" : "warn",
78196
+ message: ageKey || ageKeyFileExists ? void 0 : `Missing. Expected ${ageKeyPath} or keychain entry`
77918
78197
  });
77919
78198
  return checks;
77920
78199
  }
77921
78200
  function checkTools() {
77922
78201
  const checks = [];
77923
78202
  try {
77924
- execSync3("gh auth status", { stdio: "pipe", timeout: 3e3 });
78203
+ execSync4("gh auth status", { stdio: "pipe", timeout: 3e3 });
77925
78204
  checks.push({
77926
78205
  name: "gh CLI",
77927
78206
  status: "ok"
@@ -77953,7 +78232,7 @@ function runHealthChecks() {
77953
78232
  checks: checkEnvVars()
77954
78233
  },
77955
78234
  {
77956
- category: "Keychain",
78235
+ category: "Credentials",
77957
78236
  checks: checkKeychain()
77958
78237
  },
77959
78238
  {
@@ -78018,7 +78297,7 @@ Overall status: ${results.status.toUpperCase()}`);
78018
78297
  }
78019
78298
  function registerDoctorCommand(program3) {
78020
78299
  program3.command("doctor").description(
78021
- "Run health checks on environment and tools\n\n Checks:\n - Environment variables\n - Keychain secrets\n - CLI tools (gh, op)\n - Workspace setup (.hive)\n\n Examples:\n skill doctor\n skill doctor --json"
78300
+ "Run health checks on environment and tools\n\n Checks:\n - Environment variables\n - Credential sources (env/file/keychain)\n - CLI tools (gh, op)\n - Workspace setup (.hive)\n\n Examples:\n skill doctor\n skill doctor --json"
78022
78301
  ).option("--json", "Output as JSON").action(async (options, command) => {
78023
78302
  const ctx = await createContext({
78024
78303
  format: options.json ? "json" : "text",
@@ -78455,7 +78734,7 @@ async function checkRedis() {
78455
78734
  signal: AbortSignal.timeout(5e3)
78456
78735
  }).catch(() => null);
78457
78736
  const net = await import("net");
78458
- return new Promise((resolve9) => {
78737
+ return new Promise((resolve8) => {
78459
78738
  const socket = new net.Socket();
78460
78739
  socket.setTimeout(5e3);
78461
78740
  socket.on("connect", () => {
@@ -78465,13 +78744,13 @@ async function checkRedis() {
78465
78744
  const response2 = data2.toString();
78466
78745
  socket.destroy();
78467
78746
  if (response2.includes("PONG")) {
78468
- resolve9({
78747
+ resolve8({
78469
78748
  service: "Redis",
78470
78749
  healthy: true,
78471
78750
  message: "Redis responding to PING"
78472
78751
  });
78473
78752
  } else {
78474
- resolve9({
78753
+ resolve8({
78475
78754
  service: "Redis",
78476
78755
  healthy: false,
78477
78756
  message: "Unexpected response"
@@ -78480,7 +78759,7 @@ async function checkRedis() {
78480
78759
  });
78481
78760
  socket.on("timeout", () => {
78482
78761
  socket.destroy();
78483
- resolve9({
78762
+ resolve8({
78484
78763
  service: "Redis",
78485
78764
  healthy: false,
78486
78765
  message: "Connection timeout"
@@ -78488,7 +78767,7 @@ async function checkRedis() {
78488
78767
  });
78489
78768
  socket.on("error", (err) => {
78490
78769
  socket.destroy();
78491
- resolve9({
78770
+ resolve8({
78492
78771
  service: "Redis",
78493
78772
  healthy: false,
78494
78773
  message: err.message
@@ -80377,7 +80656,7 @@ init_esm_shims();
80377
80656
  // src/commands/eval-pipeline/run.ts
80378
80657
  init_esm_shims();
80379
80658
  import { createHash as createHash2 } from "crypto";
80380
- import { existsSync as existsSync8, mkdirSync, readFileSync as readFileSync5, rmSync, writeFileSync as writeFileSync4 } from "fs";
80659
+ import { existsSync as existsSync8, mkdirSync as mkdirSync2, readFileSync as readFileSync6, rmSync, writeFileSync as writeFileSync4 } from "fs";
80381
80660
  import { join as join6 } from "path";
80382
80661
  import { readFile as readFile6 } from "fs/promises";
80383
80662
  import { glob as glob4 } from "glob";
@@ -80794,9 +81073,9 @@ function getClassifySourceHash() {
80794
81073
  join6(process.cwd(), "packages/core/src/pipeline/classify.ts"),
80795
81074
  join6(process.cwd(), "../core/src/pipeline/classify.ts")
80796
81075
  ];
80797
- for (const path of possiblePaths) {
80798
- if (existsSync8(path)) {
80799
- const content = readFileSync5(path, "utf-8");
81076
+ for (const path2 of possiblePaths) {
81077
+ if (existsSync8(path2)) {
81078
+ const content = readFileSync6(path2, "utf-8");
80800
81079
  return createHash2("md5").update(content).digest("hex");
80801
81080
  }
80802
81081
  }
@@ -80808,7 +81087,7 @@ function loadCachedClassify(cacheKey) {
80808
81087
  const cachePath = join6(CACHE_DIR, `${cacheKey}.json`);
80809
81088
  try {
80810
81089
  if (existsSync8(cachePath)) {
80811
- return JSON.parse(readFileSync5(cachePath, "utf-8"));
81090
+ return JSON.parse(readFileSync6(cachePath, "utf-8"));
80812
81091
  }
80813
81092
  } catch {
80814
81093
  }
@@ -80817,7 +81096,7 @@ function loadCachedClassify(cacheKey) {
80817
81096
  function saveCachedClassify(cacheKey, result) {
80818
81097
  try {
80819
81098
  if (!existsSync8(CACHE_DIR)) {
80820
- mkdirSync(CACHE_DIR, { recursive: true });
81099
+ mkdirSync2(CACHE_DIR, { recursive: true });
80821
81100
  }
80822
81101
  const cachePath = join6(CACHE_DIR, `${cacheKey}.json`);
80823
81102
  writeFileSync4(cachePath, JSON.stringify(result));
@@ -81498,7 +81777,7 @@ async function runValidateEval(ctx, scenarios, options) {
81498
81777
  return results;
81499
81778
  }
81500
81779
  async function runE2EEval(ctx, scenarios, options) {
81501
- const { runPipeline: runPipeline2 } = await import("./pipeline-JPI7ITZN.js");
81780
+ const { runPipeline: runPipeline2 } = await import("./pipeline-L72KB4SP.js");
81502
81781
  const concurrency = options.parallel || 1;
81503
81782
  let completed = 0;
81504
81783
  const outputJson = options.outputJson ?? false;
@@ -81818,7 +82097,7 @@ function registerEvalPipelineCommands(program3) {
81818
82097
 
81819
82098
  // src/commands/eval-prompt.ts
81820
82099
  init_esm_shims();
81821
- import { existsSync as existsSync9, readFileSync as readFileSync6, writeFileSync as writeFileSync5 } from "fs";
82100
+ import { existsSync as existsSync9, readFileSync as readFileSync7, writeFileSync as writeFileSync5 } from "fs";
81822
82101
  import { generateText as generateText2, stepCountIs as stepCountIs2, tool as tool4 } from "ai";
81823
82102
  import { z as z5 } from "zod";
81824
82103
  var leakPatterns = [
@@ -82011,7 +82290,7 @@ async function runEval2(ctx, options) {
82011
82290
  suggestion: "Verify the prompt path and try again."
82012
82291
  });
82013
82292
  }
82014
- prompt = readFileSync6(promptPath, "utf-8");
82293
+ prompt = readFileSync7(promptPath, "utf-8");
82015
82294
  if (!outputJson) {
82016
82295
  ctx.output.message(`Using prompt from: ${promptPath}`);
82017
82296
  }
@@ -82025,7 +82304,7 @@ async function runEval2(ctx, options) {
82025
82304
  });
82026
82305
  }
82027
82306
  const dataset = JSON.parse(
82028
- readFileSync6(datasetPath, "utf-8")
82307
+ readFileSync7(datasetPath, "utf-8")
82029
82308
  );
82030
82309
  const samples = dataset.slice(0, limit2);
82031
82310
  if (!outputJson) {
@@ -82128,8 +82407,8 @@ async function comparePrompts(ctx, options) {
82128
82407
  model = "anthropic/claude-haiku-4-5"
82129
82408
  } = options;
82130
82409
  try {
82131
- const baselinePrompt = baseline ? readFileSync6(baseline, "utf-8") : SUPPORT_AGENT_PROMPT;
82132
- const candidatePrompt = readFileSync6(candidate, "utf-8");
82410
+ const baselinePrompt = baseline ? readFileSync7(baseline, "utf-8") : SUPPORT_AGENT_PROMPT;
82411
+ const candidatePrompt = readFileSync7(candidate, "utf-8");
82133
82412
  if (!existsSync9(datasetPath)) {
82134
82413
  throw new CLIError({
82135
82414
  userMessage: `Dataset not found: ${datasetPath}.`,
@@ -82137,7 +82416,7 @@ async function comparePrompts(ctx, options) {
82137
82416
  });
82138
82417
  }
82139
82418
  const dataset = JSON.parse(
82140
- readFileSync6(datasetPath, "utf-8")
82419
+ readFileSync7(datasetPath, "utf-8")
82141
82420
  );
82142
82421
  const samples = dataset.slice(0, limit2);
82143
82422
  if (!outputJson) {
@@ -82278,11 +82557,11 @@ init_esm_shims();
82278
82557
 
82279
82558
  // src/commands/faq/classify.ts
82280
82559
  init_esm_shims();
82281
- import { appendFileSync, existsSync as existsSync10, mkdirSync as mkdirSync2, readFileSync as readFileSync7 } from "fs";
82282
- import { dirname as dirname2, join as join8, resolve as resolve3 } from "path";
82560
+ import { appendFileSync, existsSync as existsSync10, mkdirSync as mkdirSync3, readFileSync as readFileSync8 } from "fs";
82561
+ import { dirname as dirname2, join as join8, resolve as resolve2 } from "path";
82283
82562
  import { generateObject } from "ai";
82284
82563
  import { z as z6 } from "zod";
82285
- var PROJECT_ROOT = resolve3(__dirname, "../../../..");
82564
+ var PROJECT_ROOT = resolve2(__dirname, "../../../..");
82286
82565
  var DEFAULT_PARQUET_PATH = join8(
82287
82566
  PROJECT_ROOT,
82288
82567
  "artifacts/phase-0/embeddings/v2/conversations.parquet"
@@ -82325,7 +82604,7 @@ function createProgressReporter(ctx, total) {
82325
82604
  };
82326
82605
  }
82327
82606
  async function loadConversationsFromParquet(parquetPath) {
82328
- const { execSync: execSync4 } = await import("child_process");
82607
+ const { execSync: execSync5 } = await import("child_process");
82329
82608
  const query = `
82330
82609
  SELECT
82331
82610
  conversation_id,
@@ -82336,7 +82615,7 @@ async function loadConversationsFromParquet(parquetPath) {
82336
82615
  WHERE first_message IS NOT NULL
82337
82616
  ORDER BY conversation_id
82338
82617
  `;
82339
- const result = execSync4(`duckdb -json -c "${query.replace(/"/g, '\\"')}"`, {
82618
+ const result = execSync5(`duckdb -json -c "${query.replace(/"/g, '\\"')}"`, {
82340
82619
  encoding: "utf-8",
82341
82620
  maxBuffer: 100 * 1024 * 1024
82342
82621
  // 100MB buffer for large datasets
@@ -82349,7 +82628,7 @@ function loadExistingClassifications(outputPath) {
82349
82628
  if (!existsSync10(outputPath)) {
82350
82629
  return classifiedIds;
82351
82630
  }
82352
- const content = readFileSync7(outputPath, "utf-8");
82631
+ const content = readFileSync8(outputPath, "utf-8");
82353
82632
  const lines = content.split("\n").filter((line) => line.trim());
82354
82633
  for (const line of lines) {
82355
82634
  try {
@@ -82488,10 +82767,10 @@ async function faqClassify(ctx, options) {
82488
82767
  }
82489
82768
  const outputDir = dirname2(outputPath);
82490
82769
  if (!existsSync10(outputDir)) {
82491
- mkdirSync2(outputDir, { recursive: true });
82770
+ mkdirSync3(outputDir, { recursive: true });
82492
82771
  }
82493
82772
  if (!outputJson) ctx.output.data("\u{1F4DA} Loading taxonomy...");
82494
- const taxonomy = JSON.parse(readFileSync7(taxonomyPath, "utf-8"));
82773
+ const taxonomy = JSON.parse(readFileSync8(taxonomyPath, "utf-8"));
82495
82774
  const validTopicIds = new Set(taxonomy.topics.map((t2) => t2.id));
82496
82775
  validTopicIds.add("unknown");
82497
82776
  if (!outputJson) {
@@ -82657,11 +82936,11 @@ function registerFaqClassifyCommands(program3) {
82657
82936
  // src/commands/faq/cluster.ts
82658
82937
  init_esm_shims();
82659
82938
  import { existsSync as existsSync12 } from "fs";
82660
- import { join as join10, resolve as resolve4 } from "path";
82939
+ import { join as join10, resolve as resolve3 } from "path";
82661
82940
 
82662
82941
  // ../core/src/faq/production-clusterer.ts
82663
82942
  init_esm_shims();
82664
- import { existsSync as existsSync11, mkdirSync as mkdirSync3, readFileSync as readFileSync8, writeFileSync as writeFileSync6 } from "fs";
82943
+ import { existsSync as existsSync11, mkdirSync as mkdirSync4, readFileSync as readFileSync9, writeFileSync as writeFileSync6 } from "fs";
82665
82944
  import { join as join9 } from "path";
82666
82945
  function readPhase0Assignments(phase0Path) {
82667
82946
  const assignmentsPath = join9(phase0Path, "clusters/v1/assignments.json");
@@ -82670,10 +82949,10 @@ function readPhase0Assignments(phase0Path) {
82670
82949
  if (!existsSync11(latestPath)) {
82671
82950
  throw new Error(`Phase 0 assignments not found at ${assignmentsPath}`);
82672
82951
  }
82673
- const content2 = readFileSync8(latestPath, "utf-8");
82952
+ const content2 = readFileSync9(latestPath, "utf-8");
82674
82953
  return JSON.parse(content2);
82675
82954
  }
82676
- const content = readFileSync8(assignmentsPath, "utf-8");
82955
+ const content = readFileSync9(assignmentsPath, "utf-8");
82677
82956
  return JSON.parse(content);
82678
82957
  }
82679
82958
  function readPhase0Labels(phase0Path) {
@@ -82683,11 +82962,11 @@ function readPhase0Labels(phase0Path) {
82683
82962
  if (!existsSync11(latestPath)) {
82684
82963
  throw new Error(`Phase 0 labels not found at ${labelsPath}`);
82685
82964
  }
82686
- const content2 = readFileSync8(latestPath, "utf-8");
82965
+ const content2 = readFileSync9(latestPath, "utf-8");
82687
82966
  const parsed2 = JSON.parse(content2);
82688
82967
  return parsed2.clusters || [];
82689
82968
  }
82690
- const content = readFileSync8(labelsPath, "utf-8");
82969
+ const content = readFileSync9(labelsPath, "utf-8");
82691
82970
  const parsed = JSON.parse(content);
82692
82971
  return parsed.clusters || [];
82693
82972
  }
@@ -82698,9 +82977,9 @@ function readPhase0Metrics(phase0Path) {
82698
82977
  if (!existsSync11(latestPath)) {
82699
82978
  throw new Error(`Phase 0 metrics not found at ${metricsPath}`);
82700
82979
  }
82701
- return JSON.parse(readFileSync8(latestPath, "utf-8"));
82980
+ return JSON.parse(readFileSync9(latestPath, "utf-8"));
82702
82981
  }
82703
- return JSON.parse(readFileSync8(metricsPath, "utf-8"));
82982
+ return JSON.parse(readFileSync9(metricsPath, "utf-8"));
82704
82983
  }
82705
82984
  function calculateConfidence2(distance) {
82706
82985
  if (distance === null) return 0;
@@ -82817,7 +83096,7 @@ async function generateProductionClustering(options) {
82817
83096
  function writeProductionArtifacts(result, outputPath) {
82818
83097
  const versionPath = join9(outputPath, result.version);
82819
83098
  if (!existsSync11(versionPath)) {
82820
- mkdirSync3(versionPath, { recursive: true });
83099
+ mkdirSync4(versionPath, { recursive: true });
82821
83100
  }
82822
83101
  const resultPath = join9(versionPath, "clustering-result.json");
82823
83102
  writeFileSync6(resultPath, JSON.stringify(result, null, 2));
@@ -82859,7 +83138,7 @@ function writeProductionArtifacts(result, outputPath) {
82859
83138
  const { rmSync: rmSync2 } = __require("fs");
82860
83139
  rmSync2(latestPath, { recursive: true, force: true });
82861
83140
  }
82862
- mkdirSync3(latestPath, { recursive: true });
83141
+ mkdirSync4(latestPath, { recursive: true });
82863
83142
  for (const file of [
82864
83143
  "clustering-result.json",
82865
83144
  "assignments.json",
@@ -82868,7 +83147,7 @@ function writeProductionArtifacts(result, outputPath) {
82868
83147
  ]) {
82869
83148
  const src = join9(versionPath, file);
82870
83149
  const dst = join9(latestPath, file);
82871
- writeFileSync6(dst, readFileSync8(src));
83150
+ writeFileSync6(dst, readFileSync9(src));
82872
83151
  }
82873
83152
  console.log(`\u2705 Updated: ${latestPath}`);
82874
83153
  }
@@ -82919,7 +83198,7 @@ function displayClusteringSummary(result) {
82919
83198
  }
82920
83199
 
82921
83200
  // src/commands/faq/cluster.ts
82922
- var PROJECT_ROOT2 = resolve4(__dirname, "../../../..");
83201
+ var PROJECT_ROOT2 = resolve3(__dirname, "../../../..");
82923
83202
  var DEFAULT_PHASE0_PATH = join10(PROJECT_ROOT2, "artifacts/phase-0");
82924
83203
  var DEFAULT_OUTPUT_PATH2 = join10(PROJECT_ROOT2, "artifacts/phase-1/clustering");
82925
83204
  function validatePaths(phase0Path) {
@@ -83020,11 +83299,11 @@ function registerFaqClusterCommands(program3) {
83020
83299
  // src/commands/faq/extract.ts
83021
83300
  init_esm_shims();
83022
83301
  import { existsSync as existsSync14 } from "fs";
83023
- import { join as join12, resolve as resolve5 } from "path";
83302
+ import { join as join12, resolve as resolve4 } from "path";
83024
83303
 
83025
83304
  // ../core/src/faq/extractor.ts
83026
83305
  init_esm_shims();
83027
- import { existsSync as existsSync13, mkdirSync as mkdirSync4, readFileSync as readFileSync9, writeFileSync as writeFileSync7 } from "fs";
83306
+ import { existsSync as existsSync13, mkdirSync as mkdirSync5, readFileSync as readFileSync10, writeFileSync as writeFileSync7 } from "fs";
83028
83307
  import { join as join11 } from "path";
83029
83308
 
83030
83309
  // ../core/src/faq/review.ts
@@ -83406,13 +83685,13 @@ function deduplicateCandidates(candidates, threshold) {
83406
83685
  removedCount: merged.size
83407
83686
  };
83408
83687
  }
83409
- function readClusteringResult(path) {
83410
- const content = readFileSync9(path, "utf-8");
83688
+ function readClusteringResult(path2) {
83689
+ const content = readFileSync10(path2, "utf-8");
83411
83690
  return JSON.parse(content);
83412
83691
  }
83413
- function readGoldenResponses(path) {
83692
+ function readGoldenResponses(path2) {
83414
83693
  try {
83415
- const content = readFileSync9(path, "utf-8");
83694
+ const content = readFileSync10(path2, "utf-8");
83416
83695
  const parsed = JSON.parse(content);
83417
83696
  return parsed.responses || parsed;
83418
83697
  } catch {
@@ -83641,7 +83920,7 @@ async function extractFaqCandidates(options) {
83641
83920
  function writeExtractionArtifacts(result, outputPath) {
83642
83921
  const versionPath = join11(outputPath, result.version);
83643
83922
  if (!existsSync13(versionPath)) {
83644
- mkdirSync4(versionPath, { recursive: true });
83923
+ mkdirSync5(versionPath, { recursive: true });
83645
83924
  }
83646
83925
  const resultPath = join11(versionPath, "extraction-result.json");
83647
83926
  writeFileSync7(resultPath, JSON.stringify(result, null, 2));
@@ -83685,7 +83964,7 @@ function writeExtractionArtifacts(result, outputPath) {
83685
83964
  const { rmSync: rmSync2 } = __require("fs");
83686
83965
  rmSync2(latestPath, { recursive: true, force: true });
83687
83966
  }
83688
- mkdirSync4(latestPath, { recursive: true });
83967
+ mkdirSync5(latestPath, { recursive: true });
83689
83968
  for (const file of [
83690
83969
  "extraction-result.json",
83691
83970
  "candidates.json",
@@ -83694,7 +83973,7 @@ function writeExtractionArtifacts(result, outputPath) {
83694
83973
  const src = join11(versionPath, file);
83695
83974
  const dst = join11(latestPath, file);
83696
83975
  if (existsSync13(src)) {
83697
- writeFileSync7(dst, readFileSync9(src));
83976
+ writeFileSync7(dst, readFileSync10(src));
83698
83977
  }
83699
83978
  }
83700
83979
  console.log(`\u2705 Updated: ${latestPath}`);
@@ -83746,7 +84025,7 @@ ${i + 1}. [${confPct}%]${golden} ${candidate.suggestedCategory}`
83746
84025
  }
83747
84026
 
83748
84027
  // src/commands/faq/extract.ts
83749
- var PROJECT_ROOT3 = resolve5(__dirname, "../../../..");
84028
+ var PROJECT_ROOT3 = resolve4(__dirname, "../../../..");
83750
84029
  var DEFAULT_CLUSTERING_PATH = join12(
83751
84030
  PROJECT_ROOT3,
83752
84031
  "artifacts/phase-1/clustering/v1/clustering-result.json"
@@ -84680,7 +84959,7 @@ function consumeBody() {
84680
84959
  let accum = [];
84681
84960
  let accumBytes = 0;
84682
84961
  let abort = false;
84683
- return new Body.Promise(function(resolve9, reject) {
84962
+ return new Body.Promise(function(resolve8, reject) {
84684
84963
  let resTimeout;
84685
84964
  if (_this4.timeout) {
84686
84965
  resTimeout = setTimeout(function() {
@@ -84714,7 +84993,7 @@ function consumeBody() {
84714
84993
  }
84715
84994
  clearTimeout(resTimeout);
84716
84995
  try {
84717
- resolve9(Buffer.concat(accum, accumBytes));
84996
+ resolve8(Buffer.concat(accum, accumBytes));
84718
84997
  } catch (err) {
84719
84998
  reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, "system", err));
84720
84999
  }
@@ -85389,7 +85668,7 @@ function fetch3(url, opts) {
85389
85668
  throw new Error("native promise missing, set fetch.Promise to your favorite alternative");
85390
85669
  }
85391
85670
  Body.Promise = fetch3.Promise;
85392
- return new fetch3.Promise(function(resolve9, reject) {
85671
+ return new fetch3.Promise(function(resolve8, reject) {
85393
85672
  const request = new Request2(url, opts);
85394
85673
  const options = getNodeRequestOptions(request);
85395
85674
  const send = (options.protocol === "https:" ? https : http).request;
@@ -85522,7 +85801,7 @@ function fetch3(url, opts) {
85522
85801
  requestOpts.body = void 0;
85523
85802
  requestOpts.headers.delete("content-length");
85524
85803
  }
85525
- resolve9(fetch3(new Request2(locationURL, requestOpts)));
85804
+ resolve8(fetch3(new Request2(locationURL, requestOpts)));
85526
85805
  finalize();
85527
85806
  return;
85528
85807
  }
@@ -85543,7 +85822,7 @@ function fetch3(url, opts) {
85543
85822
  const codings = headers.get("Content-Encoding");
85544
85823
  if (!request.compress || request.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) {
85545
85824
  response = new Response2(body, response_options);
85546
- resolve9(response);
85825
+ resolve8(response);
85547
85826
  return;
85548
85827
  }
85549
85828
  const zlibOptions = {
@@ -85553,7 +85832,7 @@ function fetch3(url, opts) {
85553
85832
  if (codings == "gzip" || codings == "x-gzip") {
85554
85833
  body = body.pipe(zlib.createGunzip(zlibOptions));
85555
85834
  response = new Response2(body, response_options);
85556
- resolve9(response);
85835
+ resolve8(response);
85557
85836
  return;
85558
85837
  }
85559
85838
  if (codings == "deflate" || codings == "x-deflate") {
@@ -85565,12 +85844,12 @@ function fetch3(url, opts) {
85565
85844
  body = body.pipe(zlib.createInflateRaw());
85566
85845
  }
85567
85846
  response = new Response2(body, response_options);
85568
- resolve9(response);
85847
+ resolve8(response);
85569
85848
  });
85570
85849
  raw.on("end", function() {
85571
85850
  if (!response) {
85572
85851
  response = new Response2(body, response_options);
85573
- resolve9(response);
85852
+ resolve8(response);
85574
85853
  }
85575
85854
  });
85576
85855
  return;
@@ -85578,11 +85857,11 @@ function fetch3(url, opts) {
85578
85857
  if (codings == "br" && typeof zlib.createBrotliDecompress === "function") {
85579
85858
  body = body.pipe(zlib.createBrotliDecompress());
85580
85859
  response = new Response2(body, response_options);
85581
- resolve9(response);
85860
+ resolve8(response);
85582
85861
  return;
85583
85862
  }
85584
85863
  response = new Response2(body, response_options);
85585
- resolve9(response);
85864
+ resolve8(response);
85586
85865
  });
85587
85866
  writeToStream(req, request);
85588
85867
  });
@@ -85973,13 +86252,13 @@ var MultipartBody = class {
85973
86252
  // ../../node_modules/.bun/openai@4.104.0+c05f8f6c4f18bd47/node_modules/openai/_shims/node-runtime.mjs
85974
86253
  import { ReadableStream as ReadableStream3 } from "stream/web";
85975
86254
  var fileFromPathWarned = false;
85976
- async function fileFromPath2(path, ...args) {
86255
+ async function fileFromPath2(path2, ...args) {
85977
86256
  const { fileFromPath: _fileFromPath } = await import("./fileFromPath-XN7LXIBI.js");
85978
86257
  if (!fileFromPathWarned) {
85979
- console.warn(`fileFromPath is deprecated; use fs.createReadStream(${JSON.stringify(path)}) instead`);
86258
+ console.warn(`fileFromPath is deprecated; use fs.createReadStream(${JSON.stringify(path2)}) instead`);
85980
86259
  fileFromPathWarned = true;
85981
86260
  }
85982
- return await _fileFromPath(path, ...args);
86261
+ return await _fileFromPath(path2, ...args);
85983
86262
  }
85984
86263
  var defaultHttpAgent = new import_agentkeepalive.default({ keepAlive: true, timeout: 5 * 60 * 1e3 });
85985
86264
  var defaultHttpsAgent = new import_agentkeepalive.default.HttpsAgent({ keepAlive: true, timeout: 5 * 60 * 1e3 });
@@ -86664,8 +86943,8 @@ function _addRequestID(value, response) {
86664
86943
  }
86665
86944
  var APIPromise = class _APIPromise extends Promise {
86666
86945
  constructor(responsePromise, parseResponse2 = defaultParseResponse) {
86667
- super((resolve9) => {
86668
- resolve9(null);
86946
+ super((resolve8) => {
86947
+ resolve8(null);
86669
86948
  });
86670
86949
  this.responsePromise = responsePromise;
86671
86950
  this.parseResponse = parseResponse2;
@@ -86767,29 +87046,29 @@ var APIClient = class {
86767
87046
  defaultIdempotencyKey() {
86768
87047
  return `stainless-node-retry-${uuid4()}`;
86769
87048
  }
86770
- get(path, opts) {
86771
- return this.methodRequest("get", path, opts);
87049
+ get(path2, opts) {
87050
+ return this.methodRequest("get", path2, opts);
86772
87051
  }
86773
- post(path, opts) {
86774
- return this.methodRequest("post", path, opts);
87052
+ post(path2, opts) {
87053
+ return this.methodRequest("post", path2, opts);
86775
87054
  }
86776
- patch(path, opts) {
86777
- return this.methodRequest("patch", path, opts);
87055
+ patch(path2, opts) {
87056
+ return this.methodRequest("patch", path2, opts);
86778
87057
  }
86779
- put(path, opts) {
86780
- return this.methodRequest("put", path, opts);
87058
+ put(path2, opts) {
87059
+ return this.methodRequest("put", path2, opts);
86781
87060
  }
86782
- delete(path, opts) {
86783
- return this.methodRequest("delete", path, opts);
87061
+ delete(path2, opts) {
87062
+ return this.methodRequest("delete", path2, opts);
86784
87063
  }
86785
- methodRequest(method, path, opts) {
87064
+ methodRequest(method, path2, opts) {
86786
87065
  return this.request(Promise.resolve(opts).then(async (opts2) => {
86787
87066
  const body = opts2 && isBlobLike(opts2?.body) ? new DataView(await opts2.body.arrayBuffer()) : opts2?.body instanceof DataView ? opts2.body : opts2?.body instanceof ArrayBuffer ? new DataView(opts2.body) : opts2 && ArrayBuffer.isView(opts2?.body) ? new DataView(opts2.body.buffer) : opts2?.body;
86788
- return { method, path, ...opts2, body };
87067
+ return { method, path: path2, ...opts2, body };
86789
87068
  }));
86790
87069
  }
86791
- getAPIList(path, Page2, opts) {
86792
- return this.requestAPIList(Page2, { method: "get", path, ...opts });
87070
+ getAPIList(path2, Page2, opts) {
87071
+ return this.requestAPIList(Page2, { method: "get", path: path2, ...opts });
86793
87072
  }
86794
87073
  calculateContentLength(body) {
86795
87074
  if (typeof body === "string") {
@@ -86808,10 +87087,10 @@ var APIClient = class {
86808
87087
  }
86809
87088
  buildRequest(inputOptions, { retryCount = 0 } = {}) {
86810
87089
  const options = { ...inputOptions };
86811
- const { method, path, query, headers = {} } = options;
87090
+ const { method, path: path2, query, headers = {} } = options;
86812
87091
  const body = ArrayBuffer.isView(options.body) || options.__binaryRequest && typeof options.body === "string" ? options.body : isMultipartBody(options.body) ? options.body.body : options.body ? JSON.stringify(options.body, null, 2) : null;
86813
87092
  const contentLength = this.calculateContentLength(body);
86814
- const url = this.buildURL(path, query);
87093
+ const url = this.buildURL(path2, query);
86815
87094
  if ("timeout" in options)
86816
87095
  validatePositiveInteger("timeout", options.timeout);
86817
87096
  options.timeout = options.timeout ?? this.timeout;
@@ -86927,8 +87206,8 @@ var APIClient = class {
86927
87206
  const request = this.makeRequest(options, null);
86928
87207
  return new PagePromise(this, request, Page2);
86929
87208
  }
86930
- buildURL(path, query) {
86931
- const url = isAbsoluteURL(path) ? new URL(path) : new URL(this.baseURL + (this.baseURL.endsWith("/") && path.startsWith("/") ? path.slice(1) : path));
87209
+ buildURL(path2, query) {
87210
+ const url = isAbsoluteURL(path2) ? new URL(path2) : new URL(this.baseURL + (this.baseURL.endsWith("/") && path2.startsWith("/") ? path2.slice(1) : path2));
86932
87211
  const defaultQuery = this.defaultQuery();
86933
87212
  if (!isEmptyObj(defaultQuery)) {
86934
87213
  query = { ...defaultQuery, ...query };
@@ -87240,7 +87519,7 @@ var startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i;
87240
87519
  var isAbsoluteURL = (url) => {
87241
87520
  return startsWithSchemeRegexp.test(url);
87242
87521
  };
87243
- var sleep = (ms) => new Promise((resolve9) => setTimeout(resolve9, ms));
87522
+ var sleep = (ms) => new Promise((resolve8) => setTimeout(resolve8, ms));
87244
87523
  var validatePositiveInteger = (name, n) => {
87245
87524
  if (typeof n !== "number" || !Number.isInteger(n)) {
87246
87525
  throw new OpenAIError(`${name} must be an integer`);
@@ -87705,12 +87984,12 @@ var EventStream = class {
87705
87984
  _EventStream_errored.set(this, false);
87706
87985
  _EventStream_aborted.set(this, false);
87707
87986
  _EventStream_catchingPromiseCreated.set(this, false);
87708
- __classPrivateFieldSet4(this, _EventStream_connectedPromise, new Promise((resolve9, reject) => {
87709
- __classPrivateFieldSet4(this, _EventStream_resolveConnectedPromise, resolve9, "f");
87987
+ __classPrivateFieldSet4(this, _EventStream_connectedPromise, new Promise((resolve8, reject) => {
87988
+ __classPrivateFieldSet4(this, _EventStream_resolveConnectedPromise, resolve8, "f");
87710
87989
  __classPrivateFieldSet4(this, _EventStream_rejectConnectedPromise, reject, "f");
87711
87990
  }), "f");
87712
- __classPrivateFieldSet4(this, _EventStream_endPromise, new Promise((resolve9, reject) => {
87713
- __classPrivateFieldSet4(this, _EventStream_resolveEndPromise, resolve9, "f");
87991
+ __classPrivateFieldSet4(this, _EventStream_endPromise, new Promise((resolve8, reject) => {
87992
+ __classPrivateFieldSet4(this, _EventStream_resolveEndPromise, resolve8, "f");
87714
87993
  __classPrivateFieldSet4(this, _EventStream_rejectEndPromise, reject, "f");
87715
87994
  }), "f");
87716
87995
  __classPrivateFieldGet5(this, _EventStream_connectedPromise, "f").catch(() => {
@@ -87794,11 +88073,11 @@ var EventStream = class {
87794
88073
  * const message = await stream.emitted('message') // rejects if the stream errors
87795
88074
  */
87796
88075
  emitted(event) {
87797
- return new Promise((resolve9, reject) => {
88076
+ return new Promise((resolve8, reject) => {
87798
88077
  __classPrivateFieldSet4(this, _EventStream_catchingPromiseCreated, true, "f");
87799
88078
  if (event !== "error")
87800
88079
  this.once("error", reject);
87801
- this.once(event, resolve9);
88080
+ this.once(event, resolve8);
87802
88081
  });
87803
88082
  }
87804
88083
  async done() {
@@ -87951,7 +88230,7 @@ var AssistantStream = class _AssistantStream extends EventStream {
87951
88230
  if (done) {
87952
88231
  return { value: void 0, done: true };
87953
88232
  }
87954
- return new Promise((resolve9, reject) => readQueue.push({ resolve: resolve9, reject })).then((chunk2) => chunk2 ? { value: chunk2, done: false } : { value: void 0, done: true });
88233
+ return new Promise((resolve8, reject) => readQueue.push({ resolve: resolve8, reject })).then((chunk2) => chunk2 ? { value: chunk2, done: false } : { value: void 0, done: true });
87955
88234
  }
87956
88235
  const chunk = pushQueue.shift();
87957
88236
  return { value: chunk, done: false };
@@ -89591,7 +89870,7 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl
89591
89870
  if (done) {
89592
89871
  return { value: void 0, done: true };
89593
89872
  }
89594
- return new Promise((resolve9, reject) => readQueue.push({ resolve: resolve9, reject })).then((chunk2) => chunk2 ? { value: chunk2, done: false } : { value: void 0, done: true });
89873
+ return new Promise((resolve8, reject) => readQueue.push({ resolve: resolve8, reject })).then((chunk2) => chunk2 ? { value: chunk2, done: false } : { value: void 0, done: true });
89595
89874
  }
89596
89875
  const chunk = pushQueue.shift();
89597
89876
  return { value: chunk, done: false };
@@ -91301,7 +91580,7 @@ var ResponseStream = class _ResponseStream extends EventStream {
91301
91580
  if (done) {
91302
91581
  return { value: void 0, done: true };
91303
91582
  }
91304
- return new Promise((resolve9, reject) => readQueue.push({ resolve: resolve9, reject })).then((event2) => event2 ? { value: event2, done: false } : { value: void 0, done: true });
91583
+ return new Promise((resolve8, reject) => readQueue.push({ resolve: resolve8, reject })).then((event2) => event2 ? { value: event2, done: false } : { value: void 0, done: true });
91305
91584
  }
91306
91585
  const event = pushQueue.shift();
91307
91586
  return { value: event, done: false };
@@ -92889,10 +93168,10 @@ function registerFaqMineCommands(program3) {
92889
93168
  // src/commands/faq/review.ts
92890
93169
  init_esm_shims();
92891
93170
  import { spawnSync } from "child_process";
92892
- import { existsSync as existsSync15, readFileSync as readFileSync10, unlinkSync, writeFileSync as writeFileSync9 } from "fs";
93171
+ import { existsSync as existsSync15, readFileSync as readFileSync11, unlinkSync, writeFileSync as writeFileSync9 } from "fs";
92893
93172
  import { tmpdir } from "os";
92894
93173
  import { join as join13 } from "path";
92895
- import { confirm as confirm2, select as select3 } from "@inquirer/prompts";
93174
+ import { confirm as confirm2, select as select2 } from "@inquirer/prompts";
92896
93175
  var COLORS2 = {
92897
93176
  reset: "\x1B[0m",
92898
93177
  green: "\x1B[32m",
@@ -92977,7 +93256,7 @@ The sections are separated by "## Question" and "## Answer" headers.
92977
93256
  ctx.output.warn(`${COLORS2.red}Editor exited with error${COLORS2.reset}`);
92978
93257
  return null;
92979
93258
  }
92980
- const edited = readFileSync10(tmpFile, "utf-8");
93259
+ const edited = readFileSync11(tmpFile, "utf-8");
92981
93260
  const questionMatch = edited.match(
92982
93261
  /## Question\s*\n([\s\S]*?)(?=\n## Answer|$)/
92983
93262
  );
@@ -93026,7 +93305,7 @@ ${COLORS2.bold}\u{1F4CB} FAQ Review Session${COLORS2.reset}`);
93026
93305
  for (let i = 0; i < candidates.length; i++) {
93027
93306
  const candidate = candidates[i];
93028
93307
  displayCandidate(ctx, candidate, i, candidates.length);
93029
- const action = await select3({
93308
+ const action = await select2({
93030
93309
  message: "Action:",
93031
93310
  choices: [
93032
93311
  {
@@ -93306,13 +93585,13 @@ var DEFAULT_CACHE_CONFIG = {
93306
93585
  enabled: true
93307
93586
  };
93308
93587
  function stripQueryAndHash(url) {
93309
- const [path] = url.split("?");
93310
- return path?.split("#")[0] ?? url;
93588
+ const [path2] = url.split("?");
93589
+ return path2?.split("#")[0] ?? url;
93311
93590
  }
93312
93591
  function classifyUrl(url) {
93313
- const path = url.startsWith("http") ? new URL(url).pathname : stripQueryAndHash(url);
93314
- if (/^\/inboxes\/?$/.test(path) || /^\/teammates/.test(path)) return "static";
93315
- if (/^\/tags/.test(path)) return "warm";
93592
+ const path2 = url.startsWith("http") ? new URL(url).pathname : stripQueryAndHash(url);
93593
+ if (/^\/inboxes\/?$/.test(path2) || /^\/teammates/.test(path2)) return "static";
93594
+ if (/^\/tags/.test(path2)) return "warm";
93316
93595
  return "hot";
93317
93596
  }
93318
93597
  var FrontResponseCache = class {
@@ -93516,8 +93795,8 @@ var FrontRateLimiter = class {
93516
93795
  )
93517
93796
  );
93518
93797
  }
93519
- return new Promise((resolve9, reject) => {
93520
- const item = { resolve: resolve9, reject, signal };
93798
+ return new Promise((resolve8, reject) => {
93799
+ const item = { resolve: resolve8, reject, signal };
93521
93800
  if (signal) {
93522
93801
  const onAbort = () => {
93523
93802
  this.removeFromQueue(item);
@@ -93578,9 +93857,9 @@ var FrontRateLimiter = class {
93578
93857
  return 0;
93579
93858
  }
93580
93859
  sleep(ms, signal) {
93581
- return new Promise((resolve9, reject) => {
93860
+ return new Promise((resolve8, reject) => {
93582
93861
  if (ms <= 0) {
93583
- resolve9();
93862
+ resolve8();
93584
93863
  return;
93585
93864
  }
93586
93865
  let settled = false;
@@ -93588,7 +93867,7 @@ var FrontRateLimiter = class {
93588
93867
  if (settled) return;
93589
93868
  settled = true;
93590
93869
  if (signal) signal.removeEventListener("abort", onAbort);
93591
- resolve9();
93870
+ resolve8();
93592
93871
  };
93593
93872
  const onAbort = () => {
93594
93873
  if (settled) return;
@@ -93655,12 +93934,12 @@ function extractPath(url) {
93655
93934
  if (url.startsWith("http")) {
93656
93935
  return new URL(url).pathname;
93657
93936
  }
93658
- const [path] = url.split("?");
93659
- return path?.split("#")[0] ?? url;
93937
+ const [path2] = url.split("?");
93938
+ return path2?.split("#")[0] ?? url;
93660
93939
  }
93661
93940
  function extractResourcePath(url) {
93662
- const path = extractPath(url);
93663
- const segments = path.split("/").filter(Boolean);
93941
+ const path2 = extractPath(url);
93942
+ const segments = path2.split("/").filter(Boolean);
93664
93943
  if (segments.length >= 2) return `/${segments[0]}/${segments[1]}`;
93665
93944
  return `/${segments[0] ?? ""}`;
93666
93945
  }
@@ -93685,59 +93964,59 @@ function createCachedInstrumentedFrontClient(config) {
93685
93964
  }
93686
93965
  };
93687
93966
  const cachedBase = {
93688
- get: async (path, schema) => {
93689
- const cached = cache.get(path);
93967
+ get: async (path2, schema) => {
93968
+ const cached = cache.get(path2);
93690
93969
  if (cached !== void 0) {
93691
93970
  rateLimiter.recordCacheHit();
93692
93971
  return cached;
93693
93972
  }
93694
93973
  await rateLimiter.acquire(config.signal);
93695
93974
  warnIfHighUtilization();
93696
- const result = await baseClient.get(path, schema).catch((error) => {
93975
+ const result = await baseClient.get(path2, schema).catch((error) => {
93697
93976
  handleRateLimitError(error);
93698
93977
  throw error;
93699
93978
  });
93700
- cache.set(path, result);
93979
+ cache.set(path2, result);
93701
93980
  return result;
93702
93981
  },
93703
- post: async (path, body, schema) => {
93982
+ post: async (path2, body, schema) => {
93704
93983
  await rateLimiter.acquire(config.signal);
93705
93984
  warnIfHighUtilization();
93706
- const result = await baseClient.post(path, body, schema).catch((error) => {
93985
+ const result = await baseClient.post(path2, body, schema).catch((error) => {
93707
93986
  handleRateLimitError(error);
93708
93987
  throw error;
93709
93988
  });
93710
- cache.invalidate(extractResourcePath(path));
93989
+ cache.invalidate(extractResourcePath(path2));
93711
93990
  return result;
93712
93991
  },
93713
- patch: async (path, body, schema) => {
93992
+ patch: async (path2, body, schema) => {
93714
93993
  await rateLimiter.acquire(config.signal);
93715
93994
  warnIfHighUtilization();
93716
- const result = await baseClient.patch(path, body, schema).catch((error) => {
93995
+ const result = await baseClient.patch(path2, body, schema).catch((error) => {
93717
93996
  handleRateLimitError(error);
93718
93997
  throw error;
93719
93998
  });
93720
- cache.invalidate(extractResourcePath(path));
93999
+ cache.invalidate(extractResourcePath(path2));
93721
94000
  return result;
93722
94001
  },
93723
- put: async (path, body, schema) => {
94002
+ put: async (path2, body, schema) => {
93724
94003
  await rateLimiter.acquire(config.signal);
93725
94004
  warnIfHighUtilization();
93726
- const result = await baseClient.put(path, body, schema).catch((error) => {
94005
+ const result = await baseClient.put(path2, body, schema).catch((error) => {
93727
94006
  handleRateLimitError(error);
93728
94007
  throw error;
93729
94008
  });
93730
- cache.invalidate(extractResourcePath(path));
94009
+ cache.invalidate(extractResourcePath(path2));
93731
94010
  return result;
93732
94011
  },
93733
- delete: async (path, schema) => {
94012
+ delete: async (path2, schema) => {
93734
94013
  await rateLimiter.acquire(config.signal);
93735
94014
  warnIfHighUtilization();
93736
- const result = await baseClient.delete(path, schema).catch((error) => {
94015
+ const result = await baseClient.delete(path2, schema).catch((error) => {
93737
94016
  handleRateLimitError(error);
93738
94017
  throw error;
93739
94018
  });
93740
- cache.invalidate(extractResourcePath(path));
94019
+ cache.invalidate(extractResourcePath(path2));
93741
94020
  return result;
93742
94021
  }
93743
94022
  };
@@ -94027,10 +94306,10 @@ function normalizeMethod(method) {
94027
94306
  }
94028
94307
  return normalized;
94029
94308
  }
94030
- function normalizePath(path) {
94031
- if (path.startsWith("http")) return path;
94032
- if (path.startsWith("/")) return path;
94033
- return `/${path}`;
94309
+ function normalizePath(path2) {
94310
+ if (path2.startsWith("http")) return path2;
94311
+ if (path2.startsWith("/")) return path2;
94312
+ return `/${path2}`;
94034
94313
  }
94035
94314
  function parseData(data2) {
94036
94315
  if (!data2) return void 0;
@@ -94044,11 +94323,11 @@ function parseData(data2) {
94044
94323
  });
94045
94324
  }
94046
94325
  }
94047
- async function runFrontApi(ctx, method, path, options) {
94326
+ async function runFrontApi(ctx, method, path2, options) {
94048
94327
  const outputJson = options.json === true || ctx.format === "json";
94049
94328
  try {
94050
94329
  const normalizedMethod = normalizeMethod(method);
94051
- const normalizedPath = normalizePath(path);
94330
+ const normalizedPath = normalizePath(path2);
94052
94331
  const isDestructive = normalizedMethod !== "GET";
94053
94332
  if (isDestructive && !options.allowDestructive) {
94054
94333
  throw new CLIError({
@@ -94130,9 +94409,9 @@ async function runFrontApi(ctx, method, path, options) {
94130
94409
  }
94131
94410
  function registerApiCommand(front) {
94132
94411
  front.command("api").description("Raw Front API passthrough").argument("<method>", "HTTP method (GET, POST, PATCH, DELETE)").argument("<path>", "API path (e.g., /inboxes)").option("--data <json>", "JSON payload for POST/PATCH/DELETE").option("--allow-destructive", "Allow write requests").option("--dry-run", "Preview a write request without executing").option("--json", "Output as JSON").action(
94133
- async (method, path, options, command) => {
94412
+ async (method, path2, options, command) => {
94134
94413
  const ctx = await contextFromCommand(command, options);
94135
- await runFrontApi(ctx, method, path, options);
94414
+ await runFrontApi(ctx, method, path2, options);
94136
94415
  }
94137
94416
  );
94138
94417
  }
@@ -95699,7 +95978,7 @@ function truncate2(str2, len) {
95699
95978
  return str2.slice(0, len - 3) + "...";
95700
95979
  }
95701
95980
  function sleep2(ms) {
95702
- return new Promise((resolve9) => setTimeout(resolve9, ms));
95981
+ return new Promise((resolve8) => setTimeout(resolve8, ms));
95703
95982
  }
95704
95983
  async function getConversationCount(front, tagId) {
95705
95984
  try {
@@ -97184,10 +97463,10 @@ async function promptForName(ctx) {
97184
97463
  input: ctx.stdin,
97185
97464
  output: ctx.stdout
97186
97465
  });
97187
- return new Promise((resolve9) => {
97466
+ return new Promise((resolve8) => {
97188
97467
  rl.question("App name: ", (answer) => {
97189
97468
  rl.close();
97190
- resolve9(answer.trim() || "my-app");
97469
+ resolve8(answer.trim() || "my-app");
97191
97470
  });
97192
97471
  });
97193
97472
  }
@@ -97323,8 +97602,8 @@ var InngestClient = class {
97323
97602
  /**
97324
97603
  * Internal fetch wrapper with auth and error handling
97325
97604
  */
97326
- async fetch(path, opts) {
97327
- const res = await fetch(`${this.baseUrl}${path}`, {
97605
+ async fetch(path2, opts) {
97606
+ const res = await fetch(`${this.baseUrl}${path2}`, {
97328
97607
  ...opts,
97329
97608
  headers: {
97330
97609
  Authorization: `Bearer ${this.signingKey}`,
@@ -97354,8 +97633,8 @@ var InngestClient = class {
97354
97633
  if (params.limit) query.set("limit", params.limit.toString());
97355
97634
  if (params.cursor) query.set("cursor", params.cursor);
97356
97635
  const queryString = query.toString();
97357
- const path = queryString ? `/v1/events?${queryString}` : "/v1/events";
97358
- const data2 = await this.fetch(path);
97636
+ const path2 = queryString ? `/v1/events?${queryString}` : "/v1/events";
97637
+ const data2 = await this.fetch(path2);
97359
97638
  return ListEventsResponseSchema.parse(data2);
97360
97639
  }
97361
97640
  /**
@@ -98198,7 +98477,7 @@ function registerRunsCommands(inngest) {
98198
98477
 
98199
98478
  // src/commands/inngest/signal.ts
98200
98479
  init_esm_shims();
98201
- import { readFileSync as readFileSync11 } from "fs";
98480
+ import { readFileSync as readFileSync12 } from "fs";
98202
98481
  import "commander";
98203
98482
  async function signalCommand(ctx, signal, options) {
98204
98483
  const { data: dataString, dataFile, dev = false } = options;
@@ -98206,7 +98485,7 @@ async function signalCommand(ctx, signal, options) {
98206
98485
  let data2 = null;
98207
98486
  if (dataFile) {
98208
98487
  try {
98209
- const fileContent = readFileSync11(dataFile, "utf-8");
98488
+ const fileContent = readFileSync12(dataFile, "utf-8");
98210
98489
  data2 = JSON.parse(fileContent);
98211
98490
  } catch (err) {
98212
98491
  const cliError = new CLIError({
@@ -103666,7 +103945,7 @@ var compile3 = wrapCompile(compile2);
103666
103945
  var _compileUnsafe = wrapCompile(compileUnsafe);
103667
103946
  var _compileToken = wrapCompile(compileToken);
103668
103947
  function getSelectorFunc(searchFunc) {
103669
- return function select7(query, elements, options) {
103948
+ return function select6(query, elements, options) {
103670
103949
  const opts = convertOptionFormats(options);
103671
103950
  if (typeof query !== "function") {
103672
103951
  query = compileUnsafe(query, opts, elements);
@@ -103853,7 +104132,7 @@ function filterBySelector(selector, elements, options) {
103853
104132
  }
103854
104133
  return findFilterElements(elements, selector, options, false, elements.length);
103855
104134
  }
103856
- function select4(selector, root2, options = {}, limit2 = Infinity) {
104135
+ function select3(selector, root2, options = {}, limit2 = Infinity) {
103857
104136
  if (typeof selector === "function") {
103858
104137
  return find3(root2, selector);
103859
104138
  }
@@ -103958,7 +104237,7 @@ function _findBySelector(selector, limit2) {
103958
104237
  pseudos: this.options.pseudos,
103959
104238
  quirksMode: this.options.quirksMode
103960
104239
  };
103961
- return this._make(select4(selector, elems, options, limit2));
104240
+ return this._make(select3(selector, elems, options, limit2));
103962
104241
  }
103963
104242
  function _getMatcher(matchMap) {
103964
104243
  return function(fn, ...postFns) {
@@ -113700,8 +113979,8 @@ async function parseTsx(content, appId, options = {}) {
113700
113979
  const extractedContent = [];
113701
113980
  const seenHashes = /* @__PURE__ */ new Set();
113702
113981
  (0, import_traverse.default)(ast, {
113703
- TemplateLiteral(path) {
113704
- const quasis = path.node.quasis;
113982
+ TemplateLiteral(path2) {
113983
+ const quasis = path2.node.quasis;
113705
113984
  if (quasis.length === 1) {
113706
113985
  const raw = quasis[0].value.cooked || quasis[0].value.raw;
113707
113986
  if (raw && raw.length >= minContentLength) {
@@ -113714,8 +113993,8 @@ async function parseTsx(content, appId, options = {}) {
113714
113993
  }
113715
113994
  }
113716
113995
  },
113717
- StringLiteral(path) {
113718
- const value = path.node.value;
113996
+ StringLiteral(path2) {
113997
+ const value = path2.node.value;
113719
113998
  if (value.length >= minContentLength && (value.includes("\n") || value.includes("#"))) {
113720
113999
  const normalized = normalizeContent(value);
113721
114000
  const hash = contentHash(normalized);
@@ -113725,12 +114004,12 @@ async function parseTsx(content, appId, options = {}) {
113725
114004
  }
113726
114005
  }
113727
114006
  },
113728
- ObjectProperty(path) {
113729
- if (t.isIdentifier(path.node.key) && ["content", "description", "answer", "body", "text"].includes(
113730
- path.node.key.name
114007
+ ObjectProperty(path2) {
114008
+ if (t.isIdentifier(path2.node.key) && ["content", "description", "answer", "body", "text"].includes(
114009
+ path2.node.key.name
113731
114010
  )) {
113732
- if (t.isStringLiteral(path.node.value)) {
113733
- const value = path.node.value.value;
114011
+ if (t.isStringLiteral(path2.node.value)) {
114012
+ const value = path2.node.value.value;
113734
114013
  if (value.length >= minContentLength) {
113735
114014
  const normalized = normalizeContent(value);
113736
114015
  const hash = contentHash(normalized);
@@ -113739,8 +114018,8 @@ async function parseTsx(content, appId, options = {}) {
113739
114018
  extractedContent.push(normalized);
113740
114019
  }
113741
114020
  }
113742
- } else if (t.isTemplateLiteral(path.node.value)) {
113743
- const quasis = path.node.value.quasis;
114021
+ } else if (t.isTemplateLiteral(path2.node.value)) {
114022
+ const quasis = path2.node.value.quasis;
113744
114023
  if (quasis.length === 1) {
113745
114024
  const raw = quasis[0].value.cooked || quasis[0].value.raw;
113746
114025
  if (raw && raw.length >= minContentLength) {
@@ -114322,8 +114601,8 @@ function registerKbCommands(program3) {
114322
114601
 
114323
114602
  // src/commands/keys/index.ts
114324
114603
  init_esm_shims();
114325
- import { existsSync as existsSync16, readFileSync as readFileSync12 } from "fs";
114326
- import { password as password2, select as select5 } from "@inquirer/prompts";
114604
+ import { existsSync as existsSync16, readFileSync as readFileSync13 } from "fs";
114605
+ import { password as password2, select as select4 } from "@inquirer/prompts";
114327
114606
  import { Decrypter as Decrypter4 } from "age-encryption";
114328
114607
  var buildContext4 = async (command, json) => {
114329
114608
  const opts = typeof command.optsWithGlobals === "function" ? command.optsWithGlobals() : {
@@ -114343,8 +114622,8 @@ async function getUserConfiguredKeys() {
114343
114622
  return /* @__PURE__ */ new Set();
114344
114623
  }
114345
114624
  try {
114346
- const identity = readFileSync12(keyPath, "utf8").trim();
114347
- const encrypted = readFileSync12(configPath);
114625
+ const identity = readFileSync13(keyPath, "utf8").trim();
114626
+ const encrypted = readFileSync13(configPath);
114348
114627
  const decrypter = new Decrypter4();
114349
114628
  decrypter.addIdentity(identity);
114350
114629
  const decrypted = await decrypter.decrypt(encrypted, "text");
@@ -114416,7 +114695,7 @@ async function interactiveKeySetup(ctx) {
114416
114695
  ctx.output.data("\u2500".repeat(60));
114417
114696
  ctx.output.data("");
114418
114697
  try {
114419
- const action = await select5({
114698
+ const action = await select4({
114420
114699
  message: "What would you like to do?",
114421
114700
  choices: [
114422
114701
  { name: "Add/update a personal API key", value: "add" },
@@ -114437,7 +114716,7 @@ async function interactiveKeySetup(ctx) {
114437
114716
  return;
114438
114717
  }
114439
114718
  if (action === "add") {
114440
- const selectedKey = await select5({
114719
+ const selectedKey = await select4({
114441
114720
  message: "Which key do you want to set?",
114442
114721
  choices: Object.keys(SECRET_REFS).map((key) => ({
114443
114722
  name: key,
@@ -117240,7 +117519,7 @@ Examples:
117240
117519
 
117241
117520
  // src/commands/list.ts
117242
117521
  init_esm_shims();
117243
- import { existsSync as existsSync17, readFileSync as readFileSync13, readdirSync, statSync } from "fs";
117522
+ import { existsSync as existsSync17, readFileSync as readFileSync14, readdirSync, statSync } from "fs";
117244
117523
  import { join as join14 } from "path";
117245
117524
  function discoverSkills(skillsDir) {
117246
117525
  if (!existsSync17(skillsDir)) {
@@ -117255,7 +117534,7 @@ function discoverSkills(skillsDir) {
117255
117534
  if (!stat.isDirectory()) continue;
117256
117535
  const skillPath = join14(entryPath, "SKILL.md");
117257
117536
  if (!existsSync17(skillPath)) continue;
117258
- const content = readFileSync13(skillPath, "utf8");
117537
+ const content = readFileSync14(skillPath, "utf8");
117259
117538
  const description = extractDescription(content);
117260
117539
  skills.push({
117261
117540
  name: entry,
@@ -118351,7 +118630,7 @@ var handlePipelineError = (ctx, error, message, suggestion = "Verify inputs and
118351
118630
  async function runPipelineCommand(ctx, opts) {
118352
118631
  const outputJson = opts.json === true || ctx.format === "json";
118353
118632
  try {
118354
- const { runPipeline: runPipeline2 } = await import("./pipeline-JPI7ITZN.js");
118633
+ const { runPipeline: runPipeline2 } = await import("./pipeline-L72KB4SP.js");
118355
118634
  const result = await runPipeline2({
118356
118635
  message: {
118357
118636
  subject: opts.subject,
@@ -118462,9 +118741,9 @@ function registerPipelineCommands(program3) {
118462
118741
  // src/commands/plugin-sync.ts
118463
118742
  init_esm_shims();
118464
118743
  import { homedir as homedir3 } from "os";
118465
- import { dirname as dirname3, join as join15, resolve as resolve6 } from "path";
118744
+ import { dirname as dirname3, join as join15, resolve as resolve5 } from "path";
118466
118745
  import { fileURLToPath } from "url";
118467
- var PLUGIN_SOURCE_DIR = resolve6(
118746
+ var PLUGIN_SOURCE_DIR = resolve5(
118468
118747
  dirname3(fileURLToPath(import.meta.url)),
118469
118748
  "../../plugin"
118470
118749
  );
@@ -118473,8 +118752,8 @@ var resolveTargetDir = (global2) => {
118473
118752
  const base = join15(homedir3(), ".claude", global2 ? "skills" : "plugins");
118474
118753
  return join15(base, "skill-cli");
118475
118754
  };
118476
- var readManifest = async (path) => {
118477
- const manifest = await readJson(path);
118755
+ var readManifest = async (path2) => {
118756
+ const manifest = await readJson(path2);
118478
118757
  if (!manifest || typeof manifest.version !== "string") {
118479
118758
  throw new CLIError({
118480
118759
  userMessage: "Invalid plugin.json: missing version.",
@@ -119913,16 +120192,16 @@ async function performUpdate(options = {}) {
119913
120192
  const packageManager = resolvePackageManager(options.userAgent);
119914
120193
  const spawnFn = options.spawnFn ?? spawn;
119915
120194
  const [command, args] = packageManager === "bun" ? ["bun", ["add", "-g", packageName]] : ["npm", ["install", "-g", packageName]];
119916
- const exitCode = await new Promise((resolve9) => {
120195
+ const exitCode = await new Promise((resolve8) => {
119917
120196
  try {
119918
120197
  const child = spawnFn(command, args, {
119919
120198
  stdio: "ignore",
119920
120199
  env: process.env
119921
120200
  });
119922
- child.on("error", () => resolve9(1));
119923
- child.on("close", (code) => resolve9(code ?? 1));
120201
+ child.on("error", () => resolve8(1));
120202
+ child.on("close", (code) => resolve8(code ?? 1));
119924
120203
  } catch {
119925
- resolve9(1);
120204
+ resolve8(1);
119926
120205
  }
119927
120206
  });
119928
120207
  if (exitCode === 0) {
@@ -120092,9 +120371,9 @@ var writeHints = (hints, stderr) => {
120092
120371
  init_esm_shims();
120093
120372
  import { lstat, readlink, symlink } from "fs/promises";
120094
120373
  import { homedir as homedir5 } from "os";
120095
- import { dirname as dirname5, join as join17, resolve as resolve7 } from "path";
120374
+ import { dirname as dirname5, join as join17, resolve as resolve6 } from "path";
120096
120375
  import { fileURLToPath as fileURLToPath2 } from "url";
120097
- var SKILL_SOURCE_DIR = resolve7(
120376
+ var SKILL_SOURCE_DIR = resolve6(
120098
120377
  dirname5(fileURLToPath2(import.meta.url)),
120099
120378
  "../../../../.claude/skills/skill-cli"
120100
120379
  );
@@ -120122,7 +120401,7 @@ async function autoLinkSkill() {
120122
120401
  }
120123
120402
  if (stats4.isSymbolicLink()) {
120124
120403
  const linkTarget = await readlink(target);
120125
- const resolvedLinkTarget = resolve7(dirname5(target), linkTarget);
120404
+ const resolvedLinkTarget = resolve6(dirname5(target), linkTarget);
120126
120405
  if (resolvedLinkTarget === source || linkTarget === source) {
120127
120406
  return {
120128
120407
  status: "exists",
@@ -120533,17 +120812,17 @@ var toolHandlers = {
120533
120812
  const query = typeof params.query === "string" ? params.query : "";
120534
120813
  const limit2 = typeof params.limit === "number" ? params.limit : typeof params.limit === "string" ? Number(params.limit) : void 0;
120535
120814
  const encodedQuery = encodeURIComponent(query);
120536
- const path = Number.isFinite(limit2) ? `/conversations/search/${encodedQuery}?limit=${limit2}` : `/conversations/search/${encodedQuery}`;
120537
- await runFrontApi(ctx, "GET", path, {
120815
+ const path2 = Number.isFinite(limit2) ? `/conversations/search/${encodedQuery}?limit=${limit2}` : `/conversations/search/${encodedQuery}`;
120816
+ await runFrontApi(ctx, "GET", path2, {
120538
120817
  json: true
120539
120818
  });
120540
120819
  },
120541
120820
  front_api: async (ctx, params) => {
120542
120821
  const method = typeof params.method === "string" ? params.method : "";
120543
- const path = typeof params.path === "string" ? params.path : "";
120822
+ const path2 = typeof params.path === "string" ? params.path : "";
120544
120823
  const data2 = typeof params.data === "string" ? params.data : void 0;
120545
120824
  const allowDestructive = params.allowDestructive === true;
120546
- await runFrontApi(ctx, method, path, {
120825
+ await runFrontApi(ctx, method, path2, {
120547
120826
  json: true,
120548
120827
  data: data2,
120549
120828
  allowDestructive
@@ -120567,14 +120846,14 @@ async function createToolContext() {
120567
120846
  return ctx;
120568
120847
  }
120569
120848
  function captureOutput(stream) {
120570
- return new Promise((resolve9) => {
120849
+ return new Promise((resolve8) => {
120571
120850
  let buffer = "";
120572
120851
  stream.on("data", (chunk) => {
120573
120852
  buffer += chunk.toString();
120574
120853
  });
120575
- stream.on("end", () => resolve9(buffer));
120576
- stream.on("close", () => resolve9(buffer));
120577
- stream.on("finish", () => resolve9(buffer));
120854
+ stream.on("end", () => resolve8(buffer));
120855
+ stream.on("close", () => resolve8(buffer));
120856
+ stream.on("finish", () => resolve8(buffer));
120578
120857
  });
120579
120858
  }
120580
120859
  function parseJsonOutput(stdout) {
@@ -120806,15 +121085,15 @@ function createMcpServer(options = {}) {
120806
121085
  const onSigterm = () => stop();
120807
121086
  process.once("SIGTERM", onSigterm);
120808
121087
  removeSigterm = () => process.off("SIGTERM", onSigterm);
120809
- return new Promise((resolve9) => {
120810
- resolveStop = resolve9;
121088
+ return new Promise((resolve8) => {
121089
+ resolveStop = resolve8;
120811
121090
  });
120812
121091
  };
120813
121092
  return { start, stop };
120814
121093
  }
120815
121094
 
120816
121095
  // src/index.ts
120817
- var cliRoot = resolve8(import.meta.dirname, "..");
121096
+ var cliRoot = resolve7(import.meta.dirname, "..");
120818
121097
  await initConfig(cliRoot);
120819
121098
  var plaintextEnv = loadPlaintextEnv(cliRoot);
120820
121099
  var envLoaded = false;
@@ -120828,8 +121107,8 @@ if (!envLoaded && !process.env.DATABASE_URL) {
120828
121107
  process.env.SKIP_ENV_VALIDATION = "1";
120829
121108
  }
120830
121109
  var runtimeTarget = `bun-${process.platform}-${process.arch}`;
120831
- var buildVersion = "0.18.1".length > 0 ? "0.18.1" : "0.0.0-dev";
120832
- var buildCommit = "e9e5214".length > 0 ? "e9e5214" : "dev";
121110
+ var buildVersion = "0.18.2".length > 0 ? "0.18.2" : "0.0.0-dev";
121111
+ var buildCommit = "7f72f70".length > 0 ? "7f72f70" : "dev";
120833
121112
  var buildTarget = "node".length > 0 ? "node" : runtimeTarget;
120834
121113
  var isDevBuild = buildVersion.includes("dev") || buildCommit === "dev";
120835
121114
  var versionLabel = `skill v${buildVersion} (${buildCommit}) ${buildTarget}`;
@@ -120886,7 +121165,7 @@ program2.name("skill").description(getRootAdaptiveDescription(usageState)).versi
120886
121165
  );
120887
121166
  program2.addHelpText(
120888
121167
  "after",
120889
- "\n Need help? Start with:\n skill auth setup Set up credentials (1Password)\n skill front inbox See what needs attention\n skill --help This message\n"
121168
+ "\n Need help? Start with:\n skill auth setup 1Password quickstart (secrets optional)\n skill front inbox See what needs attention\n skill --help This message\n"
120890
121169
  );
120891
121170
  program2.hook("preAction", (thisCommand, actionCommand) => {
120892
121171
  const opts = typeof actionCommand.optsWithGlobals === "function" ? actionCommand.optsWithGlobals() : thisCommand.opts();