pullfrog 0.1.94 → 0.1.96

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/cli.mjs CHANGED
@@ -13774,9 +13774,9 @@ var require_timers = __commonJS({
13774
13774
  }
13775
13775
  }
13776
13776
  var Timeout = class {
13777
- constructor(callback, delay2, opaque) {
13777
+ constructor(callback, delay3, opaque) {
13778
13778
  this.callback = callback;
13779
- this.delay = delay2;
13779
+ this.delay = delay3;
13780
13780
  this.opaque = opaque;
13781
13781
  this.state = -2;
13782
13782
  this.refresh();
@@ -13795,8 +13795,8 @@ var require_timers = __commonJS({
13795
13795
  }
13796
13796
  };
13797
13797
  module.exports = {
13798
- setTimeout(callback, delay2, opaque) {
13799
- return delay2 < 1e3 ? setTimeout(callback, delay2, opaque) : new Timeout(callback, delay2, opaque);
13798
+ setTimeout(callback, delay3, opaque) {
13799
+ return delay3 < 1e3 ? setTimeout(callback, delay3, opaque) : new Timeout(callback, delay3, opaque);
13800
13800
  },
13801
13801
  clearTimeout(timeout) {
13802
13802
  if (timeout instanceof Timeout) {
@@ -16041,7 +16041,7 @@ var require_util2 = __commonJS({
16041
16041
  "use strict";
16042
16042
  var { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require_constants2();
16043
16043
  var { getGlobalOrigin } = require_global();
16044
- var { performance: performance10 } = __require("perf_hooks");
16044
+ var { performance: performance9 } = __require("perf_hooks");
16045
16045
  var { isBlobLike, toUSVString, ReadableStreamFrom } = require_util();
16046
16046
  var assert3 = __require("assert");
16047
16047
  var { isUint8Array } = __require("util/types");
@@ -16204,7 +16204,7 @@ var require_util2 = __commonJS({
16204
16204
  }
16205
16205
  }
16206
16206
  function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) {
16207
- return performance10.now();
16207
+ return performance9.now();
16208
16208
  }
16209
16209
  function createOpaqueTimingInfo(timingInfo) {
16210
16210
  return {
@@ -18076,7 +18076,7 @@ var require_request = __commonJS({
18076
18076
  method,
18077
18077
  body,
18078
18078
  headers,
18079
- query,
18079
+ query: query2,
18080
18080
  idempotent,
18081
18081
  blocking,
18082
18082
  upgrade,
@@ -18153,7 +18153,7 @@ var require_request = __commonJS({
18153
18153
  this.completed = false;
18154
18154
  this.aborted = false;
18155
18155
  this.upgrade = upgrade || null;
18156
- this.path = query ? util2.buildURL(path4, query) : path4;
18156
+ this.path = query2 ? util2.buildURL(path4, query2) : path4;
18157
18157
  this.origin = origin;
18158
18158
  this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
18159
18159
  this.blocking = blocking == null ? false : blocking;
@@ -22867,13 +22867,13 @@ var require_mock_utils = __commonJS({
22867
22867
  }
22868
22868
  }
22869
22869
  function buildKey(opts) {
22870
- const { path: path4, method, body, headers, query } = opts;
22870
+ const { path: path4, method, body, headers, query: query2 } = opts;
22871
22871
  return {
22872
22872
  path: path4,
22873
22873
  method,
22874
22874
  body,
22875
22875
  headers,
22876
- query
22876
+ query: query2
22877
22877
  };
22878
22878
  }
22879
22879
  function generateKeyValues(data) {
@@ -22900,7 +22900,7 @@ var require_mock_utils = __commonJS({
22900
22900
  if (mockDispatch2.data.callback) {
22901
22901
  mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) };
22902
22902
  }
22903
- const { data: { statusCode, data, headers, trailers, error: error49 }, delay: delay2, persist } = mockDispatch2;
22903
+ const { data: { statusCode, data, headers, trailers, error: error49 }, delay: delay3, persist } = mockDispatch2;
22904
22904
  const { timesInvoked, times } = mockDispatch2;
22905
22905
  mockDispatch2.consumed = !persist && timesInvoked >= times;
22906
22906
  mockDispatch2.pending = timesInvoked < times;
@@ -22909,10 +22909,10 @@ var require_mock_utils = __commonJS({
22909
22909
  handler2.onError(error49);
22910
22910
  return true;
22911
22911
  }
22912
- if (typeof delay2 === "number" && delay2 > 0) {
22912
+ if (typeof delay3 === "number" && delay3 > 0) {
22913
22913
  setTimeout(() => {
22914
22914
  handleReply(this[kDispatches]);
22915
- }, delay2);
22915
+ }, delay3);
22916
22916
  } else {
22917
22917
  handleReply(this[kDispatches]);
22918
22918
  }
@@ -38747,8 +38747,8 @@ var require_coerce = __commonJS({
38747
38747
  const minor = match3[3] || "0";
38748
38748
  const patch = match3[4] || "0";
38749
38749
  const prerelease = options.includePrerelease && match3[5] ? `-${match3[5]}` : "";
38750
- const build3 = options.includePrerelease && match3[6] ? `+${match3[6]}` : "";
38751
- return parse6(`${major}.${minor}.${patch}${prerelease}${build3}`, options);
38750
+ const build4 = options.includePrerelease && match3[6] ? `+${match3[6]}` : "";
38751
+ return parse6(`${major}.${minor}.${patch}${prerelease}${build4}`, options);
38752
38752
  };
38753
38753
  module.exports = coerce;
38754
38754
  }
@@ -40581,9 +40581,9 @@ var require_timers2 = __commonJS({
40581
40581
  * before the specified function or code is executed.
40582
40582
  * @param {*} arg
40583
40583
  */
40584
- constructor(callback, delay2, arg10) {
40584
+ constructor(callback, delay3, arg10) {
40585
40585
  this._onTimeout = callback;
40586
- this._idleTimeout = delay2;
40586
+ this._idleTimeout = delay3;
40587
40587
  this._timerArg = arg10;
40588
40588
  this.refresh();
40589
40589
  }
@@ -40628,8 +40628,8 @@ var require_timers2 = __commonJS({
40628
40628
  * when the timer expires.
40629
40629
  * @returns {NodeJS.Timeout|FastTimer}
40630
40630
  */
40631
- setTimeout(callback, delay2, arg10) {
40632
- return delay2 <= RESOLUTION_MS ? setTimeout(callback, delay2, arg10) : new FastTimer(callback, delay2, arg10);
40631
+ setTimeout(callback, delay3, arg10) {
40632
+ return delay3 <= RESOLUTION_MS ? setTimeout(callback, delay3, arg10) : new FastTimer(callback, delay3, arg10);
40633
40633
  },
40634
40634
  /**
40635
40635
  * The clearTimeout method cancels an instantiated Timer previously created
@@ -40655,8 +40655,8 @@ var require_timers2 = __commonJS({
40655
40655
  * when the timer expires.
40656
40656
  * @returns {FastTimer}
40657
40657
  */
40658
- setFastTimeout(callback, delay2, arg10) {
40659
- return new FastTimer(callback, delay2, arg10);
40658
+ setFastTimeout(callback, delay3, arg10) {
40659
+ return new FastTimer(callback, delay3, arg10);
40660
40660
  },
40661
40661
  /**
40662
40662
  * The clearTimeout method cancels an instantiated FastTimer previously
@@ -40682,8 +40682,8 @@ var require_timers2 = __commonJS({
40682
40682
  * @deprecated
40683
40683
  * @param {number} [delay=0] The delay in milliseconds to add to the now value.
40684
40684
  */
40685
- tick(delay2 = 0) {
40686
- fastNow += delay2 - RESOLUTION_MS + 1;
40685
+ tick(delay3 = 0) {
40686
+ fastNow += delay3 - RESOLUTION_MS + 1;
40687
40687
  onTick();
40688
40688
  onTick();
40689
40689
  },
@@ -42507,7 +42507,7 @@ var require_request3 = __commonJS({
42507
42507
  method,
42508
42508
  body,
42509
42509
  headers,
42510
- query,
42510
+ query: query2,
42511
42511
  idempotent,
42512
42512
  blocking,
42513
42513
  upgrade,
@@ -42599,7 +42599,7 @@ var require_request3 = __commonJS({
42599
42599
  this.completed = false;
42600
42600
  this.aborted = false;
42601
42601
  this.upgrade = upgrade || null;
42602
- this.path = query ? serializePathWithQuery(path4, query) : path4;
42602
+ this.path = query2 ? serializePathWithQuery(path4, query2) : path4;
42603
42603
  this.origin = origin;
42604
42604
  this.protocol = getProtocolFromUrlString(origin);
42605
42605
  this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
@@ -45402,7 +45402,7 @@ var require_util9 = __commonJS({
45402
45402
  var { redirectStatusSet, referrerPolicyTokens, badPortsSet } = require_constants9();
45403
45403
  var { getGlobalOrigin } = require_global3();
45404
45404
  var { collectAnHTTPQuotedString, parseMIMEType } = require_data_url();
45405
- var { performance: performance10 } = __require("node:perf_hooks");
45405
+ var { performance: performance9 } = __require("node:perf_hooks");
45406
45406
  var { ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util8();
45407
45407
  var assert3 = __require("node:assert");
45408
45408
  var { isUint8Array } = __require("node:util/types");
@@ -45557,7 +45557,7 @@ var require_util9 = __commonJS({
45557
45557
  };
45558
45558
  }
45559
45559
  function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) {
45560
- return coarsenTime(performance10.now(), crossOriginIsolatedCapability);
45560
+ return coarsenTime(performance9.now(), crossOriginIsolatedCapability);
45561
45561
  }
45562
45562
  function createOpaqueTimingInfo(timingInfo) {
45563
45563
  return {
@@ -47166,21 +47166,21 @@ var require_client_h1 = __commonJS({
47166
47166
  this.connection = "";
47167
47167
  this.maxResponseSize = client2[kMaxResponseSize];
47168
47168
  }
47169
- setTimeout(delay2, type2) {
47170
- if (delay2 !== this.timeoutValue || type2 & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) {
47169
+ setTimeout(delay3, type2) {
47170
+ if (delay3 !== this.timeoutValue || type2 & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) {
47171
47171
  if (this.timeout) {
47172
47172
  timers.clearTimeout(this.timeout);
47173
47173
  this.timeout = null;
47174
47174
  }
47175
- if (delay2) {
47175
+ if (delay3) {
47176
47176
  if (type2 & USE_FAST_TIMER) {
47177
- this.timeout = timers.setFastTimeout(onParserTimeout, delay2, this.timeoutWeakRef);
47177
+ this.timeout = timers.setFastTimeout(onParserTimeout, delay3, this.timeoutWeakRef);
47178
47178
  } else {
47179
- this.timeout = setTimeout(onParserTimeout, delay2, this.timeoutWeakRef);
47179
+ this.timeout = setTimeout(onParserTimeout, delay3, this.timeoutWeakRef);
47180
47180
  this.timeout?.unref();
47181
47181
  }
47182
47182
  }
47183
- this.timeoutValue = delay2;
47183
+ this.timeoutValue = delay3;
47184
47184
  } else if (this.timeout) {
47185
47185
  if (this.timeout.refresh) {
47186
47186
  this.timeout.refresh();
@@ -53174,11 +53174,11 @@ var require_mock_utils2 = __commonJS({
53174
53174
  }
53175
53175
  return true;
53176
53176
  }
53177
- function normalizeSearchParams(query) {
53178
- if (typeof query !== "string") {
53179
- return query;
53177
+ function normalizeSearchParams(query2) {
53178
+ if (typeof query2 !== "string") {
53179
+ return query2;
53180
53180
  }
53181
- const originalQp = new URLSearchParams(query);
53181
+ const originalQp = new URLSearchParams(query2);
53182
53182
  const normalizedQp = new URLSearchParams();
53183
53183
  for (let [key, value2] of originalQp.entries()) {
53184
53184
  key = key.replace("[]", "");
@@ -53286,13 +53286,13 @@ var require_mock_utils2 = __commonJS({
53286
53286
  return path4;
53287
53287
  }
53288
53288
  function buildKey(opts) {
53289
- const { path: path4, method, body, headers, query } = opts;
53289
+ const { path: path4, method, body, headers, query: query2 } = opts;
53290
53290
  return {
53291
53291
  path: path4,
53292
53292
  method,
53293
53293
  body,
53294
53294
  headers,
53295
- query
53295
+ query: query2
53296
53296
  };
53297
53297
  }
53298
53298
  function generateKeyValues(data) {
@@ -53329,7 +53329,7 @@ var require_mock_utils2 = __commonJS({
53329
53329
  if (mockDispatch2.data.callback) {
53330
53330
  mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) };
53331
53331
  }
53332
- const { data: { statusCode, data, headers, trailers, error: error49 }, delay: delay2, persist } = mockDispatch2;
53332
+ const { data: { statusCode, data, headers, trailers, error: error49 }, delay: delay3, persist } = mockDispatch2;
53333
53333
  const { timesInvoked, times } = mockDispatch2;
53334
53334
  mockDispatch2.consumed = !persist && timesInvoked >= times;
53335
53335
  mockDispatch2.pending = timesInvoked < times;
@@ -53352,11 +53352,11 @@ var require_mock_utils2 = __commonJS({
53352
53352
  handler2.onError(err);
53353
53353
  }
53354
53354
  handler2.onConnect?.(abort, null);
53355
- if (typeof delay2 === "number" && delay2 > 0) {
53355
+ if (typeof delay3 === "number" && delay3 > 0) {
53356
53356
  timer = setTimeout(() => {
53357
53357
  timer = null;
53358
53358
  handleReply(this[kDispatches]);
53359
- }, delay2);
53359
+ }, delay3);
53360
53360
  } else {
53361
53361
  handleReply(this[kDispatches]);
53362
53362
  }
@@ -53726,13 +53726,13 @@ var require_mock_call_history = __commonJS({
53726
53726
  function makeFilterCalls(parameterName) {
53727
53727
  return (parameterValue, logs) => {
53728
53728
  if (typeof parameterValue === "string" || parameterValue == null) {
53729
- return logs.filter((log4) => {
53730
- return log4[parameterName] === parameterValue;
53729
+ return logs.filter((log3) => {
53730
+ return log3[parameterName] === parameterValue;
53731
53731
  });
53732
53732
  }
53733
53733
  if (parameterValue instanceof RegExp) {
53734
- return logs.filter((log4) => {
53735
- return parameterValue.test(log4[parameterName]);
53734
+ return logs.filter((log3) => {
53735
+ return parameterValue.test(log3[parameterName]);
53736
53736
  });
53737
53737
  }
53738
53738
  throw new InvalidArgumentError(`${parameterName} parameter should be one of string, regexp, undefined or null`);
@@ -53827,8 +53827,8 @@ var require_mock_call_history = __commonJS({
53827
53827
  return this.logs.filter(criteria);
53828
53828
  }
53829
53829
  if (criteria instanceof RegExp) {
53830
- return this.logs.filter((log4) => {
53831
- return criteria.test(log4.toString());
53830
+ return this.logs.filter((log3) => {
53831
+ return criteria.test(log3.toString());
53832
53832
  });
53833
53833
  }
53834
53834
  if (typeof criteria === "object" && criteria !== null) {
@@ -53878,13 +53878,13 @@ var require_mock_call_history = __commonJS({
53878
53878
  this.logs = [];
53879
53879
  }
53880
53880
  [kMockCallHistoryAddLog](requestInit) {
53881
- const log4 = new MockCallHistoryLog(requestInit);
53882
- this.logs.push(log4);
53883
- return log4;
53881
+ const log3 = new MockCallHistoryLog(requestInit);
53882
+ this.logs.push(log3);
53883
+ return log3;
53884
53884
  }
53885
53885
  *[Symbol.iterator]() {
53886
- for (const log4 of this.calls()) {
53887
- yield log4;
53886
+ for (const log3 of this.calls()) {
53887
+ yield log3;
53888
53888
  }
53889
53889
  }
53890
53890
  };
@@ -56296,18 +56296,18 @@ var require_cache2 = __commonJS({
56296
56296
  }
56297
56297
  }
56298
56298
  }
56299
- function makeDeduplicationKey(cacheKey2, excludeHeaders) {
56299
+ function makeDeduplicationKey(cacheKey3, excludeHeaders) {
56300
56300
  const headers = {};
56301
- if (cacheKey2.headers) {
56302
- const sortedHeaders = Object.keys(cacheKey2.headers).sort();
56301
+ if (cacheKey3.headers) {
56302
+ const sortedHeaders = Object.keys(cacheKey3.headers).sort();
56303
56303
  for (const header of sortedHeaders) {
56304
56304
  if (excludeHeaders?.has(header.toLowerCase())) {
56305
56305
  continue;
56306
56306
  }
56307
- headers[header] = cacheKey2.headers[header];
56307
+ headers[header] = cacheKey3.headers[header];
56308
56308
  }
56309
56309
  }
56310
- return JSON.stringify([cacheKey2.origin, cacheKey2.method, cacheKey2.path, headers]);
56310
+ return JSON.stringify([cacheKey3.origin, cacheKey3.method, cacheKey3.path, headers]);
56311
56311
  }
56312
56312
  module.exports = {
56313
56313
  makeCacheKey,
@@ -56881,7 +56881,7 @@ var require_cache_handler = __commonJS({
56881
56881
  }
56882
56882
  }
56883
56883
  }
56884
- function getSameOriginPath(cacheKey2, location) {
56884
+ function getSameOriginPath(cacheKey3, location) {
56885
56885
  if (typeof location !== "string") {
56886
56886
  return void 0;
56887
56887
  }
@@ -56889,8 +56889,8 @@ var require_cache_handler = __commonJS({
56889
56889
  let requestUrl;
56890
56890
  let locationUrl;
56891
56891
  try {
56892
- originUrl = new URL(cacheKey2.origin);
56893
- requestUrl = new URL(cacheKey2.path, originUrl);
56892
+ originUrl = new URL(cacheKey3.origin);
56893
+ requestUrl = new URL(cacheKey3.path, originUrl);
56894
56894
  locationUrl = new URL(location, requestUrl);
56895
56895
  } catch {
56896
56896
  return void 0;
@@ -56900,38 +56900,38 @@ var require_cache_handler = __commonJS({
56900
56900
  }
56901
56901
  return locationUrl.pathname + locationUrl.search;
56902
56902
  }
56903
- function deleteCachedUri(store, cacheKey2, path4) {
56903
+ function deleteCachedUri(store, cacheKey3, path4) {
56904
56904
  deleteCachedValue(store, {
56905
- ...cacheKey2,
56905
+ ...cacheKey3,
56906
56906
  path: path4
56907
56907
  });
56908
56908
  for (let i2 = 0; i2 < util2.safeHTTPMethods.length; i2++) {
56909
56909
  const method = util2.safeHTTPMethods[i2];
56910
- if (method !== cacheKey2.method) {
56910
+ if (method !== cacheKey3.method) {
56911
56911
  deleteCachedValue(store, {
56912
- ...cacheKey2,
56912
+ ...cacheKey3,
56913
56913
  method,
56914
56914
  path: path4
56915
56915
  });
56916
56916
  }
56917
56917
  }
56918
56918
  }
56919
- function deleteLocationTargets(store, cacheKey2, headerValue) {
56919
+ function deleteLocationTargets(store, cacheKey3, headerValue) {
56920
56920
  if (headerValue === void 0) {
56921
56921
  return;
56922
56922
  }
56923
56923
  const values = Array.isArray(headerValue) ? headerValue : [headerValue];
56924
56924
  for (let i2 = 0; i2 < values.length; i2++) {
56925
- const path4 = getSameOriginPath(cacheKey2, values[i2]);
56925
+ const path4 = getSameOriginPath(cacheKey3, values[i2]);
56926
56926
  if (path4 !== void 0) {
56927
- deleteCachedUri(store, cacheKey2, path4);
56927
+ deleteCachedUri(store, cacheKey3, path4);
56928
56928
  }
56929
56929
  }
56930
56930
  }
56931
- function invalidateUnsafeRequest(store, cacheKey2, resHeaders) {
56932
- deleteCachedUri(store, cacheKey2, cacheKey2.path);
56933
- deleteLocationTargets(store, cacheKey2, resHeaders.location);
56934
- deleteLocationTargets(store, cacheKey2, resHeaders["content-location"]);
56931
+ function invalidateUnsafeRequest(store, cacheKey3, resHeaders) {
56932
+ deleteCachedUri(store, cacheKey3, cacheKey3.path);
56933
+ deleteLocationTargets(store, cacheKey3, resHeaders.location);
56934
+ deleteLocationTargets(store, cacheKey3, resHeaders["content-location"]);
56935
56935
  }
56936
56936
  var CacheHandler = class {
56937
56937
  /**
@@ -56963,11 +56963,11 @@ var require_cache_handler = __commonJS({
56963
56963
  * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey
56964
56964
  * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler
56965
56965
  */
56966
- constructor({ store, type: type2, cacheByDefault }, cacheKey2, handler2) {
56966
+ constructor({ store, type: type2, cacheByDefault }, cacheKey3, handler2) {
56967
56967
  this.#store = store;
56968
56968
  this.#cacheType = type2;
56969
56969
  this.#cacheByDefault = cacheByDefault;
56970
- this.#cacheKey = cacheKey2;
56970
+ this.#cacheKey = cacheKey3;
56971
56971
  this.#handler = handler2;
56972
56972
  }
56973
56973
  onRequestStart(controller, context) {
@@ -57160,15 +57160,15 @@ var require_cache_handler = __commonJS({
57160
57160
  this.#handler.onResponseError?.(controller, err);
57161
57161
  }
57162
57162
  };
57163
- function deleteCachedValue(store, cacheKey2) {
57163
+ function deleteCachedValue(store, cacheKey3) {
57164
57164
  try {
57165
- store.delete(cacheKey2)?.catch?.(noop4);
57165
+ store.delete(cacheKey3)?.catch?.(noop4);
57166
57166
  } catch {
57167
57167
  }
57168
57168
  }
57169
- function deleteCachedValueIfNotModified(statusCode, store, cacheKey2) {
57169
+ function deleteCachedValueIfNotModified(statusCode, store, cacheKey3) {
57170
57170
  if (statusCode === 304) {
57171
- deleteCachedValue(store, cacheKey2);
57171
+ deleteCachedValue(store, cacheKey3);
57172
57172
  }
57173
57173
  }
57174
57174
  function revalidationResponseDisallowsCachedReuse(cacheType, resHeaders, cacheControlDirectives) {
@@ -57734,9 +57734,9 @@ var require_cache3 = __commonJS({
57734
57734
  function revalidationResponseUpdatesCacheControl(headers) {
57735
57735
  return headers["cache-control"] !== void 0;
57736
57736
  }
57737
- function deleteCachedValue(store, cacheKey2) {
57737
+ function deleteCachedValue(store, cacheKey3) {
57738
57738
  try {
57739
- store.delete(cacheKey2)?.catch?.(nop);
57739
+ store.delete(cacheKey3)?.catch?.(nop);
57740
57740
  } catch {
57741
57741
  }
57742
57742
  }
@@ -57788,7 +57788,7 @@ var require_cache3 = __commonJS({
57788
57788
  const staleWhileRevalidateExpiry = result.staleAt + staleWhileRevalidate * 1e3;
57789
57789
  return now <= staleWhileRevalidateExpiry;
57790
57790
  }
57791
- function handleUncachedResponse(dispatch, globalOpts, cacheKey2, handler2, opts, reqCacheControl) {
57791
+ function handleUncachedResponse(dispatch, globalOpts, cacheKey3, handler2, opts, reqCacheControl) {
57792
57792
  if (reqCacheControl?.["only-if-cached"]) {
57793
57793
  let aborted3 = false;
57794
57794
  try {
@@ -57816,7 +57816,7 @@ var require_cache3 = __commonJS({
57816
57816
  }
57817
57817
  return true;
57818
57818
  }
57819
- return dispatch(opts, new CacheHandler(globalOpts, cacheKey2, handler2));
57819
+ return dispatch(opts, new CacheHandler(globalOpts, cacheKey3, handler2));
57820
57820
  }
57821
57821
  function sendCachedValue(handler2, opts, result, age, context, isStale2) {
57822
57822
  const stream = util2.isStream(result.body) ? result.body : Readable2.from(result.body ?? []);
@@ -57872,20 +57872,20 @@ var require_cache3 = __commonJS({
57872
57872
  });
57873
57873
  }
57874
57874
  }
57875
- function handleResult2(dispatch, globalOpts, cacheKey2, handler2, opts, reqCacheControl, result) {
57875
+ function handleResult2(dispatch, globalOpts, cacheKey3, handler2, opts, reqCacheControl, result) {
57876
57876
  if (!result) {
57877
- return handleUncachedResponse(dispatch, globalOpts, cacheKey2, handler2, opts, reqCacheControl);
57877
+ return handleUncachedResponse(dispatch, globalOpts, cacheKey3, handler2, opts, reqCacheControl);
57878
57878
  }
57879
57879
  if (globalOpts.type === "shared" && Object.hasOwn(result.headers, "set-cookie")) {
57880
57880
  if (util2.isStream(result.body)) {
57881
57881
  result.body.on("error", nop).destroy();
57882
57882
  }
57883
- deleteCachedValue(globalOpts.store, cacheKey2);
57884
- return handleUncachedResponse(dispatch, globalOpts, cacheKey2, handler2, opts, reqCacheControl);
57883
+ deleteCachedValue(globalOpts.store, cacheKey3);
57884
+ return handleUncachedResponse(dispatch, globalOpts, cacheKey3, handler2, opts, reqCacheControl);
57885
57885
  }
57886
57886
  const now = Date.now();
57887
57887
  if (now > result.deleteAt) {
57888
- return dispatch(opts, new CacheHandler(globalOpts, cacheKey2, handler2));
57888
+ return dispatch(opts, new CacheHandler(globalOpts, cacheKey3, handler2));
57889
57889
  }
57890
57890
  const age = Math.round((now - result.cachedAt) / 1e3);
57891
57891
  const requestMaxAgeExpired = reqCacheControl?.["max-age"] !== void 0 && age >= reqCacheControl["max-age"];
@@ -57893,7 +57893,7 @@ var require_cache3 = __commonJS({
57893
57893
  const revalidate = requestMaxAgeExpired || needsRevalidation(result, reqCacheControl, opts);
57894
57894
  if (stale || revalidate) {
57895
57895
  if (util2.isStream(opts.body) && util2.bodyLength(opts.body) !== 0) {
57896
- return dispatch(opts, new CacheHandler(globalOpts, cacheKey2, handler2));
57896
+ return dispatch(opts, new CacheHandler(globalOpts, cacheKey3, handler2));
57897
57897
  }
57898
57898
  if (!revalidate && withinStaleWhileRevalidateWindow(result, globalOpts.type)) {
57899
57899
  sendCachedValue(handler2, opts, result, age, null, true);
@@ -57904,7 +57904,7 @@ var require_cache3 = __commonJS({
57904
57904
  ...opts,
57905
57905
  headers: headers2
57906
57906
  },
57907
- new CacheHandler(globalOpts, cacheKey2, {
57907
+ new CacheHandler(globalOpts, cacheKey3, {
57908
57908
  // Silent handler that just updates the cache
57909
57909
  onRequestStart() {
57910
57910
  },
@@ -57944,11 +57944,11 @@ var require_cache3 = __commonJS({
57944
57944
  if (util2.isStream(result.body)) {
57945
57945
  result.body.on("error", nop).destroy();
57946
57946
  }
57947
- deleteCachedValue(globalOpts.store, cacheKey2);
57948
- return dispatch(opts, new CacheHandler(globalOpts, cacheKey2, handler2));
57947
+ deleteCachedValue(globalOpts.store, cacheKey3);
57948
+ return dispatch(opts, new CacheHandler(globalOpts, cacheKey3, handler2));
57949
57949
  }
57950
57950
  if (revalidationResponseUpdatesCacheControl(headers2)) {
57951
- deleteCachedValue(globalOpts.store, cacheKey2);
57951
+ deleteCachedValue(globalOpts.store, cacheKey3);
57952
57952
  }
57953
57953
  }
57954
57954
  sendCachedValue(handler2, opts, result, age, context, stale);
@@ -57956,7 +57956,7 @@ var require_cache3 = __commonJS({
57956
57956
  result.body.on("error", nop).destroy();
57957
57957
  }
57958
57958
  },
57959
- new CacheHandler(globalOpts, cacheKey2, handler2),
57959
+ new CacheHandler(globalOpts, cacheKey3, handler2),
57960
57960
  withinStaleIfErrorThreshold
57961
57961
  )
57962
57962
  );
@@ -58031,16 +58031,16 @@ var require_cache3 = __commonJS({
58031
58031
  if (reqCacheControl?.["no-store"]) {
58032
58032
  return dispatch(opts2, handler2);
58033
58033
  }
58034
- const cacheKey2 = makeCacheKey(opts2);
58034
+ const cacheKey3 = makeCacheKey(opts2);
58035
58035
  if (!arrayIncludes(util2.safeHTTPMethods, opts2.method)) {
58036
- return dispatch(opts2, new CacheHandler(globalOpts, cacheKey2, handler2));
58036
+ return dispatch(opts2, new CacheHandler(globalOpts, cacheKey3, handler2));
58037
58037
  }
58038
- const result = store.get(cacheKey2);
58038
+ const result = store.get(cacheKey3);
58039
58039
  if (result && typeof result.then === "function") {
58040
58040
  return result.then((result2) => handleResult2(
58041
58041
  dispatch,
58042
58042
  globalOpts,
58043
- cacheKey2,
58043
+ cacheKey3,
58044
58044
  handler2,
58045
58045
  opts2,
58046
58046
  reqCacheControl,
@@ -58050,7 +58050,7 @@ var require_cache3 = __commonJS({
58050
58050
  return handleResult2(
58051
58051
  dispatch,
58052
58052
  globalOpts,
58053
- cacheKey2,
58053
+ cacheKey3,
58054
58054
  handler2,
58055
58055
  opts2,
58056
58056
  reqCacheControl,
@@ -58943,8 +58943,8 @@ var require_deduplicate = __commonJS({
58943
58943
  }
58944
58944
  }
58945
58945
  }
58946
- const cacheKey2 = makeCacheKey(opts2);
58947
- const dedupeKey = makeDeduplicationKey(cacheKey2, excludeHeaderNamesSet);
58946
+ const cacheKey3 = makeCacheKey(opts2);
58947
+ const dedupeKey = makeDeduplicationKey(cacheKey3, excludeHeaderNamesSet);
58948
58948
  const pendingHandler = pendingRequests.get(dedupeKey);
58949
58949
  if (pendingHandler) {
58950
58950
  if (pendingHandler.addWaitingHandler(handler2)) {
@@ -75838,7 +75838,7 @@ var require_fast_uri = __commonJS({
75838
75838
  normalizeString(uri, options);
75839
75839
  } else if (typeof uri === "object") {
75840
75840
  uri = /** @type {T} */
75841
- parse6(serialize(uri, options), options);
75841
+ parse6(serialize2(uri, options), options);
75842
75842
  }
75843
75843
  return uri;
75844
75844
  }
@@ -75873,13 +75873,13 @@ var require_fast_uri = __commonJS({
75873
75873
  throw new Error(resolved.error);
75874
75874
  }
75875
75875
  schemelessOptions.skipEscape = true;
75876
- return serialize(resolved, schemelessOptions);
75876
+ return serialize2(resolved, schemelessOptions);
75877
75877
  }
75878
75878
  function resolveComponent(base, relative, options, skipNormalization) {
75879
75879
  const target = {};
75880
75880
  if (!skipNormalization) {
75881
- base = parse6(serialize(base, options), options);
75882
- relative = parse6(serialize(relative, options), options);
75881
+ base = parse6(serialize2(base, options), options);
75882
+ relative = parse6(serialize2(relative, options), options);
75883
75883
  }
75884
75884
  options = options || {};
75885
75885
  if (!options.tolerant && relative.scheme) {
@@ -75933,7 +75933,7 @@ var require_fast_uri = __commonJS({
75933
75933
  const normalizedB = normalizeComparableURI(uriB, options);
75934
75934
  return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA === normalizedB;
75935
75935
  }
75936
- function serialize(cmpts, opts) {
75936
+ function serialize2(cmpts, opts) {
75937
75937
  const component = {
75938
75938
  host: cmpts.host,
75939
75939
  scheme: cmpts.scheme,
@@ -76187,7 +76187,7 @@ var require_fast_uri = __commonJS({
76187
76187
  function normalizeStringWithStatus(uri, opts) {
76188
76188
  const { parsed: parsed2, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = parseWithStatus(uri, opts);
76189
76189
  return {
76190
- normalized: malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? uri : serialize(parsed2, opts),
76190
+ normalized: malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? uri : serialize2(parsed2, opts),
76191
76191
  malformedAuthorityOrPort,
76192
76192
  malformedPercentEncoding,
76193
76193
  malformedSchemeSpecific,
@@ -76201,7 +76201,7 @@ var require_fast_uri = __commonJS({
76201
76201
  }
76202
76202
  let value2;
76203
76203
  try {
76204
- value2 = typeof uri === "string" ? uri : serialize(uri, opts);
76204
+ value2 = typeof uri === "string" ? uri : serialize2(uri, opts);
76205
76205
  } catch {
76206
76206
  return void 0;
76207
76207
  }
@@ -76214,7 +76214,7 @@ var require_fast_uri = __commonJS({
76214
76214
  resolve: resolve3,
76215
76215
  resolveComponent,
76216
76216
  equal,
76217
- serialize,
76217
+ serialize: serialize2,
76218
76218
  parse: parse6
76219
76219
  };
76220
76220
  module.exports = fastUri;
@@ -76549,8 +76549,8 @@ var require_core2 = __commonJS({
76549
76549
  return this;
76550
76550
  }
76551
76551
  case "object": {
76552
- const cacheKey2 = schemaKeyRef;
76553
- this._cache.delete(cacheKey2);
76552
+ const cacheKey3 = schemaKeyRef;
76553
+ this._cache.delete(cacheKey3);
76554
76554
  let id = schemaKeyRef[this.opts.schemaId];
76555
76555
  if (id) {
76556
76556
  id = (0, resolve_1.normalizeId)(id);
@@ -76715,11 +76715,11 @@ var require_core2 = __commonJS({
76715
76715
  Ajv5.ValidationError = validation_error_1.default;
76716
76716
  Ajv5.MissingRefError = ref_error_1.default;
76717
76717
  exports.default = Ajv5;
76718
- function checkOptions(checkOpts, options, msg, log4 = "error") {
76718
+ function checkOptions(checkOpts, options, msg, log3 = "error") {
76719
76719
  for (const key in checkOpts) {
76720
76720
  const opt = key;
76721
76721
  if (opt in options)
76722
- this.logger[log4](`${msg}: option ${key}. ${checkOpts[opt]}`);
76722
+ this.logger[log3](`${msg}: option ${key}. ${checkOpts[opt]}`);
76723
76723
  }
76724
76724
  }
76725
76725
  function getSchEnv(keyRef) {
@@ -79771,384 +79771,6 @@ var init_index_DoHiaFQM = __esm({
79771
79771
  }
79772
79772
  });
79773
79773
 
79774
- // node_modules/.pnpm/object-hash@3.0.0/node_modules/object-hash/index.js
79775
- var require_object_hash = __commonJS({
79776
- "node_modules/.pnpm/object-hash@3.0.0/node_modules/object-hash/index.js"(exports, module) {
79777
- "use strict";
79778
- var crypto5 = __require("crypto");
79779
- exports = module.exports = objectHash;
79780
- function objectHash(object5, options) {
79781
- options = applyDefaults(object5, options);
79782
- return hash3(object5, options);
79783
- }
79784
- exports.sha1 = function(object5) {
79785
- return objectHash(object5);
79786
- };
79787
- exports.keys = function(object5) {
79788
- return objectHash(object5, { excludeValues: true, algorithm: "sha1", encoding: "hex" });
79789
- };
79790
- exports.MD5 = function(object5) {
79791
- return objectHash(object5, { algorithm: "md5", encoding: "hex" });
79792
- };
79793
- exports.keysMD5 = function(object5) {
79794
- return objectHash(object5, { algorithm: "md5", encoding: "hex", excludeValues: true });
79795
- };
79796
- var hashes = crypto5.getHashes ? crypto5.getHashes().slice() : ["sha1", "md5"];
79797
- hashes.push("passthrough");
79798
- var encodings = ["buffer", "hex", "binary", "base64"];
79799
- function applyDefaults(object5, sourceOptions) {
79800
- sourceOptions = sourceOptions || {};
79801
- var options = {};
79802
- options.algorithm = sourceOptions.algorithm || "sha1";
79803
- options.encoding = sourceOptions.encoding || "hex";
79804
- options.excludeValues = sourceOptions.excludeValues ? true : false;
79805
- options.algorithm = options.algorithm.toLowerCase();
79806
- options.encoding = options.encoding.toLowerCase();
79807
- options.ignoreUnknown = sourceOptions.ignoreUnknown !== true ? false : true;
79808
- options.respectType = sourceOptions.respectType === false ? false : true;
79809
- options.respectFunctionNames = sourceOptions.respectFunctionNames === false ? false : true;
79810
- options.respectFunctionProperties = sourceOptions.respectFunctionProperties === false ? false : true;
79811
- options.unorderedArrays = sourceOptions.unorderedArrays !== true ? false : true;
79812
- options.unorderedSets = sourceOptions.unorderedSets === false ? false : true;
79813
- options.unorderedObjects = sourceOptions.unorderedObjects === false ? false : true;
79814
- options.replacer = sourceOptions.replacer || void 0;
79815
- options.excludeKeys = sourceOptions.excludeKeys || void 0;
79816
- if (typeof object5 === "undefined") {
79817
- throw new Error("Object argument required.");
79818
- }
79819
- for (var i2 = 0; i2 < hashes.length; ++i2) {
79820
- if (hashes[i2].toLowerCase() === options.algorithm.toLowerCase()) {
79821
- options.algorithm = hashes[i2];
79822
- }
79823
- }
79824
- if (hashes.indexOf(options.algorithm) === -1) {
79825
- throw new Error('Algorithm "' + options.algorithm + '" not supported. supported values: ' + hashes.join(", "));
79826
- }
79827
- if (encodings.indexOf(options.encoding) === -1 && options.algorithm !== "passthrough") {
79828
- throw new Error('Encoding "' + options.encoding + '" not supported. supported values: ' + encodings.join(", "));
79829
- }
79830
- return options;
79831
- }
79832
- function isNativeFunction(f) {
79833
- if (typeof f !== "function") {
79834
- return false;
79835
- }
79836
- var exp = /^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i;
79837
- return exp.exec(Function.prototype.toString.call(f)) != null;
79838
- }
79839
- function hash3(object5, options) {
79840
- var hashingStream;
79841
- if (options.algorithm !== "passthrough") {
79842
- hashingStream = crypto5.createHash(options.algorithm);
79843
- } else {
79844
- hashingStream = new PassThrough();
79845
- }
79846
- if (typeof hashingStream.write === "undefined") {
79847
- hashingStream.write = hashingStream.update;
79848
- hashingStream.end = hashingStream.update;
79849
- }
79850
- var hasher = typeHasher(options, hashingStream);
79851
- hasher.dispatch(object5);
79852
- if (!hashingStream.update) {
79853
- hashingStream.end("");
79854
- }
79855
- if (hashingStream.digest) {
79856
- return hashingStream.digest(options.encoding === "buffer" ? void 0 : options.encoding);
79857
- }
79858
- var buf = hashingStream.read();
79859
- if (options.encoding === "buffer") {
79860
- return buf;
79861
- }
79862
- return buf.toString(options.encoding);
79863
- }
79864
- exports.writeToStream = function(object5, options, stream) {
79865
- if (typeof stream === "undefined") {
79866
- stream = options;
79867
- options = {};
79868
- }
79869
- options = applyDefaults(object5, options);
79870
- return typeHasher(options, stream).dispatch(object5);
79871
- };
79872
- function typeHasher(options, writeTo, context) {
79873
- context = context || [];
79874
- var write2 = function(str) {
79875
- if (writeTo.update) {
79876
- return writeTo.update(str, "utf8");
79877
- } else {
79878
- return writeTo.write(str, "utf8");
79879
- }
79880
- };
79881
- return {
79882
- dispatch: function(value2) {
79883
- if (options.replacer) {
79884
- value2 = options.replacer(value2);
79885
- }
79886
- var type2 = typeof value2;
79887
- if (value2 === null) {
79888
- type2 = "null";
79889
- }
79890
- return this["_" + type2](value2);
79891
- },
79892
- _object: function(object5) {
79893
- var pattern = /\[object (.*)\]/i;
79894
- var objString = Object.prototype.toString.call(object5);
79895
- var objType = pattern.exec(objString);
79896
- if (!objType) {
79897
- objType = "unknown:[" + objString + "]";
79898
- } else {
79899
- objType = objType[1];
79900
- }
79901
- objType = objType.toLowerCase();
79902
- var objectNumber = null;
79903
- if ((objectNumber = context.indexOf(object5)) >= 0) {
79904
- return this.dispatch("[CIRCULAR:" + objectNumber + "]");
79905
- } else {
79906
- context.push(object5);
79907
- }
79908
- if (typeof Buffer !== "undefined" && Buffer.isBuffer && Buffer.isBuffer(object5)) {
79909
- write2("buffer:");
79910
- return write2(object5);
79911
- }
79912
- if (objType !== "object" && objType !== "function" && objType !== "asyncfunction") {
79913
- if (this["_" + objType]) {
79914
- this["_" + objType](object5);
79915
- } else if (options.ignoreUnknown) {
79916
- return write2("[" + objType + "]");
79917
- } else {
79918
- throw new Error('Unknown object type "' + objType + '"');
79919
- }
79920
- } else {
79921
- var keys = Object.keys(object5);
79922
- if (options.unorderedObjects) {
79923
- keys = keys.sort();
79924
- }
79925
- if (options.respectType !== false && !isNativeFunction(object5)) {
79926
- keys.splice(0, 0, "prototype", "__proto__", "constructor");
79927
- }
79928
- if (options.excludeKeys) {
79929
- keys = keys.filter(function(key) {
79930
- return !options.excludeKeys(key);
79931
- });
79932
- }
79933
- write2("object:" + keys.length + ":");
79934
- var self2 = this;
79935
- return keys.forEach(function(key) {
79936
- self2.dispatch(key);
79937
- write2(":");
79938
- if (!options.excludeValues) {
79939
- self2.dispatch(object5[key]);
79940
- }
79941
- write2(",");
79942
- });
79943
- }
79944
- },
79945
- _array: function(arr, unordered) {
79946
- unordered = typeof unordered !== "undefined" ? unordered : options.unorderedArrays !== false;
79947
- var self2 = this;
79948
- write2("array:" + arr.length + ":");
79949
- if (!unordered || arr.length <= 1) {
79950
- return arr.forEach(function(entry) {
79951
- return self2.dispatch(entry);
79952
- });
79953
- }
79954
- var contextAdditions = [];
79955
- var entries = arr.map(function(entry) {
79956
- var strm = new PassThrough();
79957
- var localContext = context.slice();
79958
- var hasher = typeHasher(options, strm, localContext);
79959
- hasher.dispatch(entry);
79960
- contextAdditions = contextAdditions.concat(localContext.slice(context.length));
79961
- return strm.read().toString();
79962
- });
79963
- context = context.concat(contextAdditions);
79964
- entries.sort();
79965
- return this._array(entries, false);
79966
- },
79967
- _date: function(date6) {
79968
- return write2("date:" + date6.toJSON());
79969
- },
79970
- _symbol: function(sym) {
79971
- return write2("symbol:" + sym.toString());
79972
- },
79973
- _error: function(err) {
79974
- return write2("error:" + err.toString());
79975
- },
79976
- _boolean: function(bool) {
79977
- return write2("bool:" + bool.toString());
79978
- },
79979
- _string: function(string6) {
79980
- write2("string:" + string6.length + ":");
79981
- write2(string6.toString());
79982
- },
79983
- _function: function(fn2) {
79984
- write2("fn:");
79985
- if (isNativeFunction(fn2)) {
79986
- this.dispatch("[native]");
79987
- } else {
79988
- this.dispatch(fn2.toString());
79989
- }
79990
- if (options.respectFunctionNames !== false) {
79991
- this.dispatch("function-name:" + String(fn2.name));
79992
- }
79993
- if (options.respectFunctionProperties) {
79994
- this._object(fn2);
79995
- }
79996
- },
79997
- _number: function(number6) {
79998
- return write2("number:" + number6.toString());
79999
- },
80000
- _xml: function(xml) {
80001
- return write2("xml:" + xml.toString());
80002
- },
80003
- _null: function() {
80004
- return write2("Null");
80005
- },
80006
- _undefined: function() {
80007
- return write2("Undefined");
80008
- },
80009
- _regexp: function(regex4) {
80010
- return write2("regex:" + regex4.toString());
80011
- },
80012
- _uint8array: function(arr) {
80013
- write2("uint8array:");
80014
- return this.dispatch(Array.prototype.slice.call(arr));
80015
- },
80016
- _uint8clampedarray: function(arr) {
80017
- write2("uint8clampedarray:");
80018
- return this.dispatch(Array.prototype.slice.call(arr));
80019
- },
80020
- _int8array: function(arr) {
80021
- write2("int8array:");
80022
- return this.dispatch(Array.prototype.slice.call(arr));
80023
- },
80024
- _uint16array: function(arr) {
80025
- write2("uint16array:");
80026
- return this.dispatch(Array.prototype.slice.call(arr));
80027
- },
80028
- _int16array: function(arr) {
80029
- write2("int16array:");
80030
- return this.dispatch(Array.prototype.slice.call(arr));
80031
- },
80032
- _uint32array: function(arr) {
80033
- write2("uint32array:");
80034
- return this.dispatch(Array.prototype.slice.call(arr));
80035
- },
80036
- _int32array: function(arr) {
80037
- write2("int32array:");
80038
- return this.dispatch(Array.prototype.slice.call(arr));
80039
- },
80040
- _float32array: function(arr) {
80041
- write2("float32array:");
80042
- return this.dispatch(Array.prototype.slice.call(arr));
80043
- },
80044
- _float64array: function(arr) {
80045
- write2("float64array:");
80046
- return this.dispatch(Array.prototype.slice.call(arr));
80047
- },
80048
- _arraybuffer: function(arr) {
80049
- write2("arraybuffer:");
80050
- return this.dispatch(new Uint8Array(arr));
80051
- },
80052
- _url: function(url4) {
80053
- return write2("url:" + url4.toString(), "utf8");
80054
- },
80055
- _map: function(map2) {
80056
- write2("map:");
80057
- var arr = Array.from(map2);
80058
- return this._array(arr, options.unorderedSets !== false);
80059
- },
80060
- _set: function(set2) {
80061
- write2("set:");
80062
- var arr = Array.from(set2);
80063
- return this._array(arr, options.unorderedSets !== false);
80064
- },
80065
- _file: function(file2) {
80066
- write2("file:");
80067
- return this.dispatch([file2.name, file2.size, file2.type, file2.lastModfied]);
80068
- },
80069
- _blob: function() {
80070
- if (options.ignoreUnknown) {
80071
- return write2("[blob]");
80072
- }
80073
- throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n');
80074
- },
80075
- _domwindow: function() {
80076
- return write2("domwindow");
80077
- },
80078
- _bigint: function(number6) {
80079
- return write2("bigint:" + number6.toString());
80080
- },
80081
- /* Node.js standard native objects */
80082
- _process: function() {
80083
- return write2("process");
80084
- },
80085
- _timer: function() {
80086
- return write2("timer");
80087
- },
80088
- _pipe: function() {
80089
- return write2("pipe");
80090
- },
80091
- _tcp: function() {
80092
- return write2("tcp");
80093
- },
80094
- _udp: function() {
80095
- return write2("udp");
80096
- },
80097
- _tty: function() {
80098
- return write2("tty");
80099
- },
80100
- _statwatcher: function() {
80101
- return write2("statwatcher");
80102
- },
80103
- _securecontext: function() {
80104
- return write2("securecontext");
80105
- },
80106
- _connection: function() {
80107
- return write2("connection");
80108
- },
80109
- _zlib: function() {
80110
- return write2("zlib");
80111
- },
80112
- _context: function() {
80113
- return write2("context");
80114
- },
80115
- _nodescript: function() {
80116
- return write2("nodescript");
80117
- },
80118
- _httpparser: function() {
80119
- return write2("httpparser");
80120
- },
80121
- _dataview: function() {
80122
- return write2("dataview");
80123
- },
80124
- _signal: function() {
80125
- return write2("signal");
80126
- },
80127
- _fsevent: function() {
80128
- return write2("fsevent");
80129
- },
80130
- _tlswrap: function() {
80131
- return write2("tlswrap");
80132
- }
80133
- };
80134
- }
80135
- function PassThrough() {
80136
- return {
80137
- buf: "",
80138
- write: function(b) {
80139
- this.buf += b;
80140
- },
80141
- end: function(b) {
80142
- this.buf += b;
80143
- },
80144
- read: function() {
80145
- return this.buf;
80146
- }
80147
- };
80148
- }
80149
- }
80150
- });
80151
-
80152
79774
  // node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/light.js
80153
79775
  var require_light = __commonJS({
80154
79776
  "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/light.js"(exports, module) {
@@ -100365,7 +99987,7 @@ var require_node = __commonJS({
100365
99987
  var tty = __require("tty");
100366
99988
  var util2 = __require("util");
100367
99989
  exports.init = init;
100368
- exports.log = log4;
99990
+ exports.log = log3;
100369
99991
  exports.formatArgs = formatArgs2;
100370
99992
  exports.save = save;
100371
99993
  exports.load = load;
@@ -100500,7 +100122,7 @@ var require_node = __commonJS({
100500
100122
  }
100501
100123
  return (/* @__PURE__ */ new Date()).toISOString() + " ";
100502
100124
  }
100503
- function log4(...args2) {
100125
+ function log3(...args2) {
100504
100126
  return process.stderr.write(util2.formatWithOptions(exports.inspectOpts, ...args2) + "\n");
100505
100127
  }
100506
100128
  function save(namespaces) {
@@ -107341,7 +106963,7 @@ var import_picocolors = __toESM(require_picocolors(), 1);
107341
106963
  // package.json
107342
106964
  var package_default = {
107343
106965
  name: "pullfrog",
107344
- version: "0.1.94",
106966
+ version: "0.1.96",
107345
106967
  cliContractVersion: "1",
107346
106968
  type: "module",
107347
106969
  bin: {
@@ -107407,7 +107029,7 @@ var package_default = {
107407
107029
  undici: "^7.22.0",
107408
107030
  vitest: "^4.0.17",
107409
107031
  yaml: "^2.8.2",
107410
- yes: "0.0.3",
107032
+ yes: "0.2.3",
107411
107033
  zod: "4.3.6"
107412
107034
  },
107413
107035
  repository: {
@@ -107642,10 +107264,10 @@ function targetName(target) {
107642
107264
  async function configurationApi(input) {
107643
107265
  const token = input.token ?? tryGetGhToken();
107644
107266
  if (!token) throw new Error(GH_TOKEN_HELP);
107645
- const query = new URLSearchParams({ owner: input.target.owner });
107646
- if (input.target.repo) query.set("repo", input.target.repo);
107267
+ const query2 = new URLSearchParams({ owner: input.target.owner });
107268
+ if (input.target.repo) query2.set("repo", input.target.repo);
107647
107269
  const response = await pullfrogApi({
107648
- path: `/api/cli/${input.path}?${query}`,
107270
+ path: `/api/cli/${input.path}?${query2}`,
107649
107271
  token,
107650
107272
  method: input.method,
107651
107273
  body: input.body
@@ -110067,6 +109689,17 @@ var providers = {
110067
109689
  // see the big-pickle note above (#1077).
110068
109690
  isFree: true
110069
109691
  },
109692
+ // Zen's FREE stealth preview (listed 2026-10-01), the fifth promo. Zen
109693
+ // has not published its data terms yet, so the description claims none.
109694
+ "fledge-alpha": {
109695
+ displayName: "Fledge Alpha",
109696
+ description: "Stealth preview, free for a limited time",
109697
+ resolve: "opencode/fledge-alpha-free",
109698
+ effort: ["low", "high", "max"],
109699
+ // free to run, still gated on the provider's own OPENCODE_API_KEY —
109700
+ // see the big-pickle note above (#1077).
109701
+ isFree: true
109702
+ },
110070
109703
  // Zen's live free MiMo, and the second free row in a menu that big-pickle
110071
109704
  // was alone in since `mimo-v2-pro-free` lost its model.
110072
109705
  mimo: {
@@ -110129,7 +109762,11 @@ var providers = {
110129
109762
  "glm-flash": {
110130
109763
  displayName: "GLM Flash",
110131
109764
  resolve: "opencode-go/glm-5.3-flash",
110132
- effort: ["low", "high", "max"],
109765
+ // the Go endpoint intermittently rejects reasoning_effort ("native reasoning
109766
+ // control reasoning_effort is not allowed") mid-run, despite models.dev
109767
+ // advertising a ladder — so this route sends none.
109768
+ effort: [],
109769
+ openRouterEffort: ["low", "high", "max"],
110133
109770
  openRouterResolve: "openrouter/z-ai/glm-5.3-flash"
110134
109771
  },
110135
109772
  // legacy alias — the slug pinned a version instead of a brand tier and
@@ -110585,7 +110222,7 @@ var providers = {
110585
110222
  "deepseek-pro": {
110586
110223
  displayName: "DeepSeek Pro",
110587
110224
  resolve: "vercel/deepseek/deepseek-v4-pro-0813",
110588
- effort: ["none", "high", "max"]
110225
+ effort: ["none", "low", "high", "max"]
110589
110226
  },
110590
110227
  // the gateway's bare `deepseek-v4-flash` is the April preview — the same
110591
110228
  // fork trap as OpenRouter, with `deepseek-v4-flash-0731` beside it — so
@@ -110593,7 +110230,7 @@ var providers = {
110593
110230
  "deepseek-flash": {
110594
110231
  displayName: "DeepSeek Flash",
110595
110232
  resolve: "vercel/deepseek/deepseek-v4.1-flash",
110596
- effort: ["none", "high", "max"]
110233
+ effort: ["none", "low", "high", "max"]
110597
110234
  },
110598
110235
  glm: {
110599
110236
  displayName: "GLM",
@@ -110799,13 +110436,13 @@ for (const [name, ladder] of Object.entries({ ...PROVIDER_LADDERS, router: ROUTE
110799
110436
  if (terminal.size < 2) throw new Error(`${name} ladder runs every tier on ${[...terminal][0]}`);
110800
110437
  }
110801
110438
  var OSS_MODEL_ALLOWLIST = [
110802
- "deepseek/deepseek-flash",
110803
- "openai/gpt-luna",
110804
- "openrouter/minimax-m2.5",
110805
110439
  // opt-in: 0.86x the old default on the measured mix, and Meta trains on the
110806
110440
  // traffic — fine for public code on headless runs, the human decided
110807
110441
  // 2026-09-11. unmeasured on a real run; not the default until it is.
110808
- "meta/muse-spark-contributor"
110442
+ "meta/muse-spark-contributor",
110443
+ "deepseek/deepseek-flash",
110444
+ "openai/gpt-luna",
110445
+ "openrouter/minimax-m2.5"
110809
110446
  ];
110810
110447
  var OSS_RECOMMENDED_MODEL = AUTO_TIER_TARGET[AUTO_EFFICIENT];
110811
110448
  function ossFundedModelNames() {
@@ -111805,6 +111442,9 @@ function trackChild(options) {
111805
111442
  function untrackChild(child) {
111806
111443
  activeChildren.delete(child);
111807
111444
  }
111445
+ function isTrackedChild(child) {
111446
+ return activeChildren.has(child);
111447
+ }
111808
111448
  function killTrackedChildren() {
111809
111449
  for (const entry of activeChildren) {
111810
111450
  const child = entry[0];
@@ -111818,6 +111458,7 @@ function killTrackedChildren() {
111818
111458
  }
111819
111459
  child.kill("SIGKILL");
111820
111460
  }
111461
+ activeChildren.clear();
111821
111462
  }
111822
111463
  var handlersInstalled = false;
111823
111464
  function installSignalHandler() {
@@ -112540,7 +112181,7 @@ ${PR_SUMMARY_FORMAT}`
112540
112181
 
112541
112182
  Follow these rules:
112542
112183
  - note: the first create_pull_request_review submission may error with a one-time diff-coverage nudge listing unread TOC regions. retry the same call to proceed \u2014 optionally after reading the listed ranges. the pre-flight will not block again this session.
112543
- - IF NO NEW ISSUES, NON-SUBSTANTIVE CHANGES ONLY (trivial formatting, import reordering, comment tweaks): do NOT submit a review. Instead call \`${t2("report_progress")}\` with a 1-2 sentence note explaining no review was warranted (e.g. "No new issues. Changes since last review are formatting-only."). this leaves a visible signal that the run completed.
112184
+ - IF NO NEW ISSUES, NON-SUBSTANTIVE CHANGES ONLY (trivial formatting, import reordering, comment tweaks): do NOT submit a review. Instead call \`${t2("report_progress")}\` with \`no_review_needed: true\` and a 1-2 sentence note explaining no review was warranted (e.g. "No new issues. Changes since last review are formatting-only."). this leaves a visible signal that the run completed.
112544
112185
  - ELSE IF NEW CRITICAL ISSUES (blocks merge \u2014 bugs, security, data loss, broken core flows): call \`${t2("create_pull_request_review")}\` with \`approved: false\`, all comments, and the review body. body opens with \`> [!CAUTION]\\n> This PR introduces ...\`, followed by the PR summary using the default format below.
112545
112186
  - ELSE IF NEW MUST-ADDRESS NON-CRITICAL FINDINGS (real consequences if shipped \u2014 incorrect behavior, missing validation, regressions the author should fix before merge): call \`${t2("create_pull_request_review")}\` with \`approved: false\`, all comments, and the review body. body opens with \`> [!IMPORTANT]\\n> ...\`, followed by the PR summary using the default format below. Do NOT use this tier for nits, style preferences, or "consider also" suggestions.
112546
112187
  - ELSE IF NEW MINOR SUGGESTIONS ONLY (low-stakes findings, or Nitpicks only): call \`${t2("create_pull_request_review")}\` with \`approved: false\`, all comments, and the review body. body opens with \`> \u2139\uFE0F No critical issues \u2014 minor suggestions inline.\\n\\n\` (vary the wording after \u2139\uFE0F to fit the review), followed by the PR summary using the default format below.
@@ -112701,7 +112342,7 @@ function buildUnsubmittedReviewPrompt(mode) {
112701
112342
  "",
112702
112343
  "do exactly one of:",
112703
112344
  "- if you have findings: call `create_pull_request_review` now with your aggregated review (body + inline comments). the first call may error once with a diff-coverage nudge \u2014 retry the same call to proceed.",
112704
- "- if there are genuinely no actionable findings since the last review (e.g. only formatting / comment / lockfile changes): call `report_progress` with a 1-2 sentence summary explaining that no review was warranted.",
112345
+ "- if there are genuinely no actionable findings since the last review (e.g. only formatting / comment / lockfile changes): call `report_progress` with `no_review_needed: true` and a 1-2 sentence summary explaining that no review was warranted.",
112705
112346
  "",
112706
112347
  "do NOT stop again until one of those tools has been called successfully."
112707
112348
  ].join("\n");
@@ -113682,6 +113323,8 @@ var claude = agent({
113682
113323
  PWD: repoDir
113683
113324
  };
113684
113325
  env2.CLAUDE_CODE_AUTO_COMPACT_WINDOW ||= "500000";
113326
+ env2.CLAUDE_CODE_ENABLE_TODO_TOOLS = "1";
113327
+ env2.CLAUDE_CODE_ENABLE_TASKS = "0";
113685
113328
  if (isBedrockRoute) {
113686
113329
  env2.CLAUDE_CODE_USE_BEDROCK = "1";
113687
113330
  }
@@ -114832,6 +114475,7 @@ var codex = agent({
114832
114475
  // agents/opencode.ts
114833
114476
  import { spawn as nodeSpawn2 } from "node:child_process";
114834
114477
  import { mkdirSync as mkdirSync7, writeFileSync as writeFileSync7 } from "node:fs";
114478
+ import { totalmem } from "node:os";
114835
114479
  import { join as join8 } from "node:path";
114836
114480
  import { performance as performance7 } from "node:perf_hooks";
114837
114481
 
@@ -115109,13 +114753,13 @@ var defaultPathSerializer = ({ path: path4, url: _url3 }) => {
115109
114753
  }
115110
114754
  return url4;
115111
114755
  };
115112
- var getUrl = ({ baseUrl, path: path4, query, querySerializer, url: _url3 }) => {
114756
+ var getUrl = ({ baseUrl, path: path4, query: query2, querySerializer, url: _url3 }) => {
115113
114757
  const pathUrl = _url3.startsWith("/") ? _url3 : `/${_url3}`;
115114
114758
  let url4 = (baseUrl ?? "") + pathUrl;
115115
114759
  if (path4) {
115116
114760
  url4 = defaultPathSerializer({ path: path4, url: url4 });
115117
114761
  }
115118
- let search2 = query ? querySerializer(query) : "";
114762
+ let search2 = query2 ? querySerializer(query2) : "";
115119
114763
  if (search2.startsWith("?")) {
115120
114764
  search2 = search2.substring(1);
115121
114765
  }
@@ -120183,9 +119827,9 @@ function rewrite(request2, values) {
120183
119827
  const value2 = pick2(request2.headers.get(name), key === "directory" ? values.directory : values.workspace, key === "directory" ? encodeURIComponent : void 0);
120184
119828
  if (!value2)
120185
119829
  continue;
120186
- for (const query of url4.pathname.startsWith("/api/") ? [key, `location[${key}]`] : [key]) {
120187
- if (!url4.searchParams.has(query)) {
120188
- url4.searchParams.set(query, value2);
119830
+ for (const query2 of url4.pathname.startsWith("/api/") ? [key, `location[${key}]`] : [key]) {
119831
+ if (!url4.searchParams.has(query2)) {
119832
+ url4.searchParams.set(query2, value2);
120189
119833
  }
120190
119834
  }
120191
119835
  changed = true;
@@ -120705,11 +120349,12 @@ function bootOpencodeServer(params) {
120705
120349
  log2.debug(`[opencode serve] ${text}`);
120706
120350
  });
120707
120351
  let closed = false;
120352
+ let exitCause;
120708
120353
  const close = async () => {
120709
120354
  if (closed) return;
120710
120355
  closed = true;
120711
120356
  untrackChild(proc);
120712
- if (proc.pid && !proc.killed) {
120357
+ if (proc.pid && proc.exitCode === null && proc.signalCode === null) {
120713
120358
  try {
120714
120359
  process.kill(-proc.pid, "SIGTERM");
120715
120360
  } catch {
@@ -120743,7 +120388,7 @@ function bootOpencodeServer(params) {
120743
120388
  if (match3?.[1]) {
120744
120389
  resolved = true;
120745
120390
  log2.info(`\xBB opencode server up: ${match3[1]}`);
120746
- resolve3({ baseUrl: match3[1], proc, close, recentStderr });
120391
+ resolve3({ baseUrl: match3[1], proc, close, recentStderr, exitCause: () => exitCause });
120747
120392
  }
120748
120393
  }
120749
120394
  const lines = text.split("\n");
@@ -120760,6 +120405,11 @@ function bootOpencodeServer(params) {
120760
120405
  reject(new Error(`failed to spawn opencode serve: ${err.message}`));
120761
120406
  }
120762
120407
  });
120408
+ proc.once("exit", (code, signal) => {
120409
+ if (!resolved || !isTrackedChild(proc)) return;
120410
+ exitCause = describeServerExit(code, signal);
120411
+ log2.warning(withServerStderr(`\xBB ${exitCause}`, recentStderr));
120412
+ });
120763
120413
  proc.once("close", (code, signal) => {
120764
120414
  if (!resolved) {
120765
120415
  const tail = recentStderr.slice(-5).join("\n");
@@ -120793,6 +120443,12 @@ function withServerStderr(message, recentStderr) {
120793
120443
  opencode server stderr:
120794
120444
  ${tail}` : message;
120795
120445
  }
120446
+ function describeServerExit(code, signal) {
120447
+ if (signal !== "SIGKILL") return `opencode server exited mid-run (${signal ?? `code ${code}`})`;
120448
+ const limit = process.constrainedMemory();
120449
+ const memoryGb = ((limit > 0 ? Math.min(limit, totalmem()) : totalmem()) / 1024 ** 3).toFixed(1);
120450
+ return `opencode server was killed (SIGKILL) mid-run, usually by the kernel OOM killer \u2014 this runner has ${memoryGb} GB of memory`;
120451
+ }
120796
120452
  function newTurn() {
120797
120453
  return {
120798
120454
  finalText: "",
@@ -121018,7 +120674,8 @@ async function runPromptTurn(ctx, params) {
121018
120674
  costUsd: usage.costUsd
121019
120675
  });
121020
120676
  }
121021
- const diagnosis = ctx.diagnostic.lastProviderError ? ` \u2014 likely cause: ${ctx.diagnostic.lastProviderError}` : "";
120677
+ const cause = ctx.serverExitCause() ?? ctx.diagnostic.lastProviderError;
120678
+ const diagnosis = cause ? ` \u2014 likely cause: ${cause}` : "";
121022
120679
  if (networkError) {
121023
120680
  return {
121024
120681
  success: false,
@@ -121336,6 +120993,7 @@ var opencode = agent({
121336
120993
  loggedToolCallIDs: /* @__PURE__ */ new Set(),
121337
120994
  mcpToolCalls: 0,
121338
120995
  recentStderr: server.recentStderr,
120996
+ serverExitCause: server.exitCause,
121339
120997
  diagnostic: {
121340
120998
  label: "Pullfrog",
121341
120999
  recentStderr: server.recentStderr,
@@ -126766,10 +126424,10 @@ function getMatch(pattern, exp) {
126766
126424
  }
126767
126425
  function parseQuery(pattern, options = {}) {
126768
126426
  return pattern.replace(/\\\|/g, ESCAPED_PIPE).split(OR_TOKEN).map((item) => {
126769
- const query = tokenize(item.replace(/\u0000/g, "|").trim()).filter((item2) => item2 && !!item2.trim());
126427
+ const query2 = tokenize(item.replace(/\u0000/g, "|").trim()).filter((item2) => item2 && !!item2.trim());
126770
126428
  const results = [];
126771
- for (let i2 = 0, len = query.length; i2 < len; i2 += 1) {
126772
- const queryItem = query[i2];
126429
+ for (let i2 = 0, len = query2.length; i2 < len; i2 += 1) {
126430
+ const queryItem = query2[i2];
126773
126431
  let found = false;
126774
126432
  let idx = -1;
126775
126433
  while (!found && ++idx < matchersLen) {
@@ -126817,8 +126475,8 @@ var ExtendedSearch = class {
126817
126475
  return options.useExtendedSearch;
126818
126476
  }
126819
126477
  searchIn(text) {
126820
- const query = this.query;
126821
- if (!query) return {
126478
+ const query2 = this.query;
126479
+ if (!query2) return {
126822
126480
  isMatch: false,
126823
126481
  score: 1
126824
126482
  };
@@ -126829,8 +126487,8 @@ var ExtendedSearch = class {
126829
126487
  const allIndices = [];
126830
126488
  let totalScore = 0;
126831
126489
  let hasInverse = false;
126832
- for (let i2 = 0, qLen = query.length; i2 < qLen; i2 += 1) {
126833
- const searchers = query[i2];
126490
+ for (let i2 = 0, qLen = query2.length; i2 < qLen; i2 += 1) {
126491
+ const searchers = query2[i2];
126834
126492
  allIndices.length = 0;
126835
126493
  numMatches = 0;
126836
126494
  hasInverse = false;
@@ -126886,26 +126544,26 @@ var KeyType = {
126886
126544
  PATH: "$path",
126887
126545
  PATTERN: "$val"
126888
126546
  };
126889
- var isExpression = (query) => !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]);
126890
- var isPath = (query) => !!query[KeyType.PATH];
126891
- var isLeaf = (query) => !isArray2(query) && isObject2(query) && !isExpression(query);
126892
- var convertToExplicit = (query) => ({ [LogicalOperator.AND]: Object.keys(query).map((key) => ({ [key]: query[key] })) });
126893
- function parse3(query, options, { auto = true } = {}) {
126894
- const next2 = (query2) => {
126895
- if (isString(query2)) {
126547
+ var isExpression = (query2) => !!(query2[LogicalOperator.AND] || query2[LogicalOperator.OR]);
126548
+ var isPath = (query2) => !!query2[KeyType.PATH];
126549
+ var isLeaf = (query2) => !isArray2(query2) && isObject2(query2) && !isExpression(query2);
126550
+ var convertToExplicit = (query2) => ({ [LogicalOperator.AND]: Object.keys(query2).map((key) => ({ [key]: query2[key] })) });
126551
+ function parse3(query2, options, { auto = true } = {}) {
126552
+ const next2 = (query3) => {
126553
+ if (isString(query3)) {
126896
126554
  const obj = {
126897
126555
  keyId: null,
126898
- pattern: query2
126556
+ pattern: query3
126899
126557
  };
126900
- if (auto) obj.searcher = createSearcher(query2, options);
126558
+ if (auto) obj.searcher = createSearcher(query3, options);
126901
126559
  return obj;
126902
126560
  }
126903
- const keys = Object.keys(query2);
126904
- const isQueryPath = isPath(query2);
126905
- if (!isQueryPath && keys.length > 1 && !isExpression(query2)) return next2(convertToExplicit(query2));
126906
- if (isLeaf(query2)) {
126907
- const key = isQueryPath ? query2[KeyType.PATH] : keys[0];
126908
- const pattern = isQueryPath ? query2[KeyType.PATTERN] : query2[key];
126561
+ const keys = Object.keys(query3);
126562
+ const isQueryPath = isPath(query3);
126563
+ if (!isQueryPath && keys.length > 1 && !isExpression(query3)) return next2(convertToExplicit(query3));
126564
+ if (isLeaf(query3)) {
126565
+ const key = isQueryPath ? query3[KeyType.PATH] : keys[0];
126566
+ const pattern = isQueryPath ? query3[KeyType.PATTERN] : query3[key];
126909
126567
  if (!isString(pattern)) throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key));
126910
126568
  const obj = {
126911
126569
  keyId: createKeyId(key),
@@ -126919,15 +126577,15 @@ function parse3(query, options, { auto = true } = {}) {
126919
126577
  operator: keys[0]
126920
126578
  };
126921
126579
  keys.forEach((key) => {
126922
- const value2 = query2[key];
126580
+ const value2 = query3[key];
126923
126581
  if (isArray2(value2)) value2.forEach((item) => {
126924
126582
  node2.children.push(next2(item));
126925
126583
  });
126926
126584
  });
126927
126585
  return node2;
126928
126586
  };
126929
- if (!isExpression(query)) query = convertToExplicit(query);
126930
- return next2(query);
126587
+ if (!isExpression(query2)) query2 = convertToExplicit(query2);
126588
+ return next2(query2);
126931
126589
  }
126932
126590
  function computeScoreSingle(matches, { ignoreFieldNorm = Config3.ignoreFieldNorm }) {
126933
126591
  let totalScore = 1;
@@ -127223,13 +126881,13 @@ var Fuse = class {
127223
126881
  this._lastQuery = null;
127224
126882
  this._lastSearcher = null;
127225
126883
  }
127226
- _getSearcher(query) {
127227
- if (this._lastQuery === query) return this._lastSearcher;
127228
- const searcher = createSearcher(query, this._invertedIndex ? {
126884
+ _getSearcher(query2) {
126885
+ if (this._lastQuery === query2) return this._lastSearcher;
126886
+ const searcher = createSearcher(query2, this._invertedIndex ? {
127229
126887
  ...this.options,
127230
126888
  _invertedIndex: this._invertedIndex
127231
126889
  } : this.options);
127232
- this._lastQuery = query;
126890
+ this._lastQuery = query2;
127233
126891
  this._lastSearcher = searcher;
127234
126892
  return searcher;
127235
126893
  }
@@ -127298,10 +126956,10 @@ var Fuse = class {
127298
126956
  _normalizedKeys() {
127299
126957
  return this._myIndex.keys.map((key) => this._keyStore.get(key.id) || key);
127300
126958
  }
127301
- search(query, options) {
126959
+ search(query2, options) {
127302
126960
  const { limit = -1 } = options || {};
127303
126961
  const { includeMatches, includeScore, shouldSort, sortFn, ignoreFieldNorm } = this.options;
127304
- if (isString(query) && !query.trim()) {
126962
+ if (isString(query2) && !query2.trim()) {
127305
126963
  let docs = this._docs.map((item, idx) => ({
127306
126964
  item,
127307
126965
  refIndex: idx
@@ -127309,25 +126967,25 @@ var Fuse = class {
127309
126967
  if (isNumber(limit) && limit > -1) docs = docs.slice(0, limit);
127310
126968
  return docs;
127311
126969
  }
127312
- const useHeap = shouldSort && isNumber(limit) && limit > 0 && isString(query);
126970
+ const useHeap = shouldSort && isNumber(limit) && limit > 0 && isString(query2);
127313
126971
  const comparator = sortFn;
127314
126972
  const stable = (a2, b) => comparator(a2, b) || a2.idx - b.idx;
127315
126973
  let results;
127316
126974
  if (useHeap) {
127317
126975
  const heap = new MaxHeap(limit, stable);
127318
- if (isString(this._docs[0])) this._searchStringList(query, {
126976
+ if (isString(this._docs[0])) this._searchStringList(query2, {
127319
126977
  heap,
127320
126978
  ignoreFieldNorm
127321
126979
  });
127322
- else this._searchObjectList(query, {
126980
+ else this._searchObjectList(query2, {
127323
126981
  heap,
127324
126982
  ignoreFieldNorm
127325
126983
  });
127326
126984
  results = heap.extractSorted();
127327
126985
  } else {
127328
- results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);
126986
+ results = isString(query2) ? isString(this._docs[0]) ? this._searchStringList(query2) : this._searchObjectList(query2) : this._searchLogical(query2);
127329
126987
  computeScore(results, { ignoreFieldNorm });
127330
- if (shouldSort) results.sort(isString(query) ? stable : comparator);
126988
+ if (shouldSort) results.sort(isString(query2) ? stable : comparator);
127331
126989
  if (isNumber(limit) && limit > -1) results = results.slice(0, limit);
127332
126990
  }
127333
126991
  return format(results, this._docs, {
@@ -127335,8 +126993,8 @@ var Fuse = class {
127335
126993
  includeScore
127336
126994
  });
127337
126995
  }
127338
- _searchStringList(query, { heap, ignoreFieldNorm } = {}) {
127339
- const searcher = this._getSearcher(query);
126996
+ _searchStringList(query2, { heap, ignoreFieldNorm } = {}) {
126997
+ const searcher = this._getSearcher(query2);
127340
126998
  const requireAllTokens = this.options.useTokenSearch && this.options.tokenMatch === "all";
127341
126999
  const { records } = this._myIndex;
127342
127000
  const results = heap ? null : [];
@@ -127371,8 +127029,8 @@ var Fuse = class {
127371
127029
  });
127372
127030
  return results;
127373
127031
  }
127374
- _searchLogical(query) {
127375
- const expression = parse3(query, this.options);
127032
+ _searchLogical(query2) {
127033
+ const expression = parse3(query2, this.options);
127376
127034
  const keys = this._normalizedKeys();
127377
127035
  const evaluate = (node2, item, idx) => {
127378
127036
  if (!("children" in node2)) {
@@ -127432,8 +127090,8 @@ var Fuse = class {
127432
127090
  });
127433
127091
  return results;
127434
127092
  }
127435
- _searchObjectList(query, { heap, ignoreFieldNorm } = {}) {
127436
- const searcher = this._getSearcher(query);
127093
+ _searchObjectList(query2, { heap, ignoreFieldNorm } = {}) {
127094
+ const searcher = this._getSearcher(query2);
127437
127095
  const requireAllTokens = this.options.useTokenSearch && this.options.tokenMatch === "all";
127438
127096
  const { records } = this._myIndex;
127439
127097
  const keys = this._normalizedKeys();
@@ -127660,10 +127318,10 @@ var getPattern = (label, next2) => {
127660
127318
  if (label === "*") return "*";
127661
127319
  const match3 = label.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/);
127662
127320
  if (match3) {
127663
- const cacheKey2 = `${label}#${next2}`;
127664
- if (!patternCache[cacheKey2]) {
127665
- if (match3[2]) patternCache[cacheKey2] = next2 && next2[0] !== ":" && next2[0] !== "*" ? [
127666
- cacheKey2,
127321
+ const cacheKey3 = `${label}#${next2}`;
127322
+ if (!patternCache[cacheKey3]) {
127323
+ if (match3[2]) patternCache[cacheKey3] = next2 && next2[0] !== ":" && next2[0] !== "*" ? [
127324
+ cacheKey3,
127667
127325
  match3[1],
127668
127326
  new RegExp(`^${match3[2]}(?=/${next2})`)
127669
127327
  ] : [
@@ -127671,13 +127329,13 @@ var getPattern = (label, next2) => {
127671
127329
  match3[1],
127672
127330
  new RegExp(`^${match3[2]}$`)
127673
127331
  ];
127674
- else patternCache[cacheKey2] = [
127332
+ else patternCache[cacheKey3] = [
127675
127333
  label,
127676
127334
  match3[1],
127677
127335
  true
127678
127336
  ];
127679
127337
  }
127680
- return patternCache[cacheKey2];
127338
+ return patternCache[cacheKey3];
127681
127339
  }
127682
127340
  return null;
127683
127341
  };
@@ -138166,9 +137824,9 @@ var require_schemes2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
138166
137824
  wsComponent.secure = void 0;
138167
137825
  }
138168
137826
  if (wsComponent.resourceName) {
138169
- const [path4, query] = wsComponent.resourceName.split("?");
137827
+ const [path4, query2] = wsComponent.resourceName.split("?");
138170
137828
  wsComponent.path = path4 && path4 !== "/" ? path4 : void 0;
138171
- wsComponent.query = query;
137829
+ wsComponent.query = query2;
138172
137830
  wsComponent.resourceName = void 0;
138173
137831
  }
138174
137832
  wsComponent.fragment = void 0;
@@ -138273,21 +137931,21 @@ var require_fast_uri2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
138273
137931
  const { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils6();
138274
137932
  const { SCHEMES, getSchemeHandler } = require_schemes2();
138275
137933
  function normalize3(uri, options) {
138276
- if (typeof uri === "string") uri = serialize(parse6(uri, options), options);
138277
- else if (typeof uri === "object") uri = parse6(serialize(uri, options), options);
137934
+ if (typeof uri === "string") uri = serialize2(parse6(uri, options), options);
137935
+ else if (typeof uri === "object") uri = parse6(serialize2(uri, options), options);
138278
137936
  return uri;
138279
137937
  }
138280
137938
  function resolve3(baseURI, relativeURI, options) {
138281
137939
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
138282
137940
  const resolved = resolveComponent(parse6(baseURI, schemelessOptions), parse6(relativeURI, schemelessOptions), schemelessOptions, true);
138283
137941
  schemelessOptions.skipEscape = true;
138284
- return serialize(resolved, schemelessOptions);
137942
+ return serialize2(resolved, schemelessOptions);
138285
137943
  }
138286
137944
  function resolveComponent(base, relative, options, skipNormalization) {
138287
137945
  const target = {};
138288
137946
  if (!skipNormalization) {
138289
- base = parse6(serialize(base, options), options);
138290
- relative = parse6(serialize(relative, options), options);
137947
+ base = parse6(serialize2(base, options), options);
137948
+ relative = parse6(serialize2(relative, options), options);
138291
137949
  }
138292
137950
  options = options || {};
138293
137951
  if (!options.tolerant && relative.scheme) {
@@ -138331,27 +137989,27 @@ var require_fast_uri2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
138331
137989
  function equal(uriA, uriB, options) {
138332
137990
  if (typeof uriA === "string") {
138333
137991
  uriA = unescape(uriA);
138334
- uriA = serialize(normalizeComponentEncoding(parse6(uriA, options), true), {
137992
+ uriA = serialize2(normalizeComponentEncoding(parse6(uriA, options), true), {
138335
137993
  ...options,
138336
137994
  skipEscape: true
138337
137995
  });
138338
- } else if (typeof uriA === "object") uriA = serialize(normalizeComponentEncoding(uriA, true), {
137996
+ } else if (typeof uriA === "object") uriA = serialize2(normalizeComponentEncoding(uriA, true), {
138339
137997
  ...options,
138340
137998
  skipEscape: true
138341
137999
  });
138342
138000
  if (typeof uriB === "string") {
138343
138001
  uriB = unescape(uriB);
138344
- uriB = serialize(normalizeComponentEncoding(parse6(uriB, options), true), {
138002
+ uriB = serialize2(normalizeComponentEncoding(parse6(uriB, options), true), {
138345
138003
  ...options,
138346
138004
  skipEscape: true
138347
138005
  });
138348
- } else if (typeof uriB === "object") uriB = serialize(normalizeComponentEncoding(uriB, true), {
138006
+ } else if (typeof uriB === "object") uriB = serialize2(normalizeComponentEncoding(uriB, true), {
138349
138007
  ...options,
138350
138008
  skipEscape: true
138351
138009
  });
138352
138010
  return uriA.toLowerCase() === uriB.toLowerCase();
138353
138011
  }
138354
- function serialize(cmpts, opts) {
138012
+ function serialize2(cmpts, opts) {
138355
138013
  const component = {
138356
138014
  host: cmpts.host,
138357
138015
  scheme: cmpts.scheme,
@@ -138454,7 +138112,7 @@ var require_fast_uri2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
138454
138112
  resolve: resolve3,
138455
138113
  resolveComponent,
138456
138114
  equal,
138457
- serialize,
138115
+ serialize: serialize2,
138458
138116
  parse: parse6
138459
138117
  };
138460
138118
  module.exports = fastUri;
@@ -138783,8 +138441,8 @@ var require_core$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
138783
138441
  return this;
138784
138442
  }
138785
138443
  case "object": {
138786
- const cacheKey2 = schemaKeyRef;
138787
- this._cache.delete(cacheKey2);
138444
+ const cacheKey3 = schemaKeyRef;
138445
+ this._cache.delete(cacheKey3);
138788
138446
  let id = schemaKeyRef[this.opts.schemaId];
138789
138447
  if (id) {
138790
138448
  id = (0, resolve_1.normalizeId)(id);
@@ -138927,10 +138585,10 @@ var require_core$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
138927
138585
  Ajv5.ValidationError = validation_error_1.default;
138928
138586
  Ajv5.MissingRefError = ref_error_1.default;
138929
138587
  exports.default = Ajv5;
138930
- function checkOptions(checkOpts, options, msg, log4 = "error") {
138588
+ function checkOptions(checkOpts, options, msg, log3 = "error") {
138931
138589
  for (const key in checkOpts) {
138932
138590
  const opt = key;
138933
- if (opt in options) this.logger[log4](`${msg}: option ${key}. ${checkOpts[opt]}`);
138591
+ if (opt in options) this.logger[log3](`${msg}: option ${key}. ${checkOpts[opt]}`);
138934
138592
  }
138935
138593
  }
138936
138594
  function getSchEnv(keyRef) {
@@ -152451,9 +152109,9 @@ var require_schemes3 = /* @__PURE__ */ __commonJSMin2(((exports, module) => {
152451
152109
  wsComponent.secure = void 0;
152452
152110
  }
152453
152111
  if (wsComponent.resourceName) {
152454
- const [path4, query] = wsComponent.resourceName.split("?");
152112
+ const [path4, query2] = wsComponent.resourceName.split("?");
152455
152113
  wsComponent.path = path4 && path4 !== "/" ? path4 : void 0;
152456
- wsComponent.query = query;
152114
+ wsComponent.query = query2;
152457
152115
  wsComponent.resourceName = void 0;
152458
152116
  }
152459
152117
  wsComponent.fragment = void 0;
@@ -152558,21 +152216,21 @@ var require_fast_uri3 = /* @__PURE__ */ __commonJSMin2(((exports, module) => {
152558
152216
  const { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils7();
152559
152217
  const { SCHEMES, getSchemeHandler } = require_schemes3();
152560
152218
  function normalize3(uri, options) {
152561
- if (typeof uri === "string") uri = serialize(parse6(uri, options), options);
152562
- else if (typeof uri === "object") uri = parse6(serialize(uri, options), options);
152219
+ if (typeof uri === "string") uri = serialize2(parse6(uri, options), options);
152220
+ else if (typeof uri === "object") uri = parse6(serialize2(uri, options), options);
152563
152221
  return uri;
152564
152222
  }
152565
152223
  function resolve3(baseURI, relativeURI, options) {
152566
152224
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
152567
152225
  const resolved = resolveComponent(parse6(baseURI, schemelessOptions), parse6(relativeURI, schemelessOptions), schemelessOptions, true);
152568
152226
  schemelessOptions.skipEscape = true;
152569
- return serialize(resolved, schemelessOptions);
152227
+ return serialize2(resolved, schemelessOptions);
152570
152228
  }
152571
152229
  function resolveComponent(base, relative, options, skipNormalization) {
152572
152230
  const target = {};
152573
152231
  if (!skipNormalization) {
152574
- base = parse6(serialize(base, options), options);
152575
- relative = parse6(serialize(relative, options), options);
152232
+ base = parse6(serialize2(base, options), options);
152233
+ relative = parse6(serialize2(relative, options), options);
152576
152234
  }
152577
152235
  options = options || {};
152578
152236
  if (!options.tolerant && relative.scheme) {
@@ -152616,27 +152274,27 @@ var require_fast_uri3 = /* @__PURE__ */ __commonJSMin2(((exports, module) => {
152616
152274
  function equal(uriA, uriB, options) {
152617
152275
  if (typeof uriA === "string") {
152618
152276
  uriA = unescape(uriA);
152619
- uriA = serialize(normalizeComponentEncoding(parse6(uriA, options), true), {
152277
+ uriA = serialize2(normalizeComponentEncoding(parse6(uriA, options), true), {
152620
152278
  ...options,
152621
152279
  skipEscape: true
152622
152280
  });
152623
- } else if (typeof uriA === "object") uriA = serialize(normalizeComponentEncoding(uriA, true), {
152281
+ } else if (typeof uriA === "object") uriA = serialize2(normalizeComponentEncoding(uriA, true), {
152624
152282
  ...options,
152625
152283
  skipEscape: true
152626
152284
  });
152627
152285
  if (typeof uriB === "string") {
152628
152286
  uriB = unescape(uriB);
152629
- uriB = serialize(normalizeComponentEncoding(parse6(uriB, options), true), {
152287
+ uriB = serialize2(normalizeComponentEncoding(parse6(uriB, options), true), {
152630
152288
  ...options,
152631
152289
  skipEscape: true
152632
152290
  });
152633
- } else if (typeof uriB === "object") uriB = serialize(normalizeComponentEncoding(uriB, true), {
152291
+ } else if (typeof uriB === "object") uriB = serialize2(normalizeComponentEncoding(uriB, true), {
152634
152292
  ...options,
152635
152293
  skipEscape: true
152636
152294
  });
152637
152295
  return uriA.toLowerCase() === uriB.toLowerCase();
152638
152296
  }
152639
- function serialize(cmpts, opts) {
152297
+ function serialize2(cmpts, opts) {
152640
152298
  const component = {
152641
152299
  host: cmpts.host,
152642
152300
  scheme: cmpts.scheme,
@@ -152739,7 +152397,7 @@ var require_fast_uri3 = /* @__PURE__ */ __commonJSMin2(((exports, module) => {
152739
152397
  resolve: resolve3,
152740
152398
  resolveComponent,
152741
152399
  equal,
152742
- serialize,
152400
+ serialize: serialize2,
152743
152401
  parse: parse6
152744
152402
  };
152745
152403
  module.exports = fastUri;
@@ -153068,8 +152726,8 @@ var require_core$32 = /* @__PURE__ */ __commonJSMin2(((exports) => {
153068
152726
  return this;
153069
152727
  }
153070
152728
  case "object": {
153071
- const cacheKey2 = schemaKeyRef;
153072
- this._cache.delete(cacheKey2);
152729
+ const cacheKey3 = schemaKeyRef;
152730
+ this._cache.delete(cacheKey3);
153073
152731
  let id = schemaKeyRef[this.opts.schemaId];
153074
152732
  if (id) {
153075
152733
  id = (0, resolve_1.normalizeId)(id);
@@ -153212,10 +152870,10 @@ var require_core$32 = /* @__PURE__ */ __commonJSMin2(((exports) => {
153212
152870
  Ajv5.ValidationError = validation_error_1.default;
153213
152871
  Ajv5.MissingRefError = ref_error_1.default;
153214
152872
  exports.default = Ajv5;
153215
- function checkOptions(checkOpts, options, msg, log4 = "error") {
152873
+ function checkOptions(checkOpts, options, msg, log3 = "error") {
153216
152874
  for (const key in checkOpts) {
153217
152875
  const opt = key;
153218
- if (opt in options) this.logger[log4](`${msg}: option ${key}. ${checkOpts[opt]}`);
152876
+ if (opt in options) this.logger[log3](`${msg}: option ${key}. ${checkOpts[opt]}`);
153219
152877
  }
153220
152878
  }
153221
152879
  function getSchEnv(keyRef) {
@@ -163908,7 +163566,7 @@ var require_depd = /* @__PURE__ */ __commonJSMin3(((exports, module) => {
163908
163566
  if (!namespace) throw new TypeError("argument namespace is required");
163909
163567
  var file2 = callSiteLocation(getStack()[1])[0];
163910
163568
  function deprecate$1(message) {
163911
- log4.call(deprecate$1, message);
163569
+ log3.call(deprecate$1, message);
163912
163570
  }
163913
163571
  deprecate$1._file = file2;
163914
163572
  deprecate$1._ignored = isignored(namespace);
@@ -163930,7 +163588,7 @@ var require_depd = /* @__PURE__ */ __commonJSMin3(((exports, module) => {
163930
163588
  if (process.traceDeprecation) return true;
163931
163589
  return containsNamespace(process.env.TRACE_DEPRECATION || "", namespace);
163932
163590
  }
163933
- function log4(message, site) {
163591
+ function log3(message, site) {
163934
163592
  var haslisteners = eehaslisteners(process, "deprecation");
163935
163593
  if (!haslisteners && this._ignored) return;
163936
163594
  var caller;
@@ -164036,7 +163694,7 @@ var require_depd = /* @__PURE__ */ __commonJSMin3(((exports, module) => {
164036
163694
  var args2 = createArgumentsString(fn2.length);
164037
163695
  var site = callSiteLocation(getStack()[1]);
164038
163696
  site.name = fn2.name;
164039
- return new Function("fn", "log", "deprecate", "message", "site", '"use strict"\nreturn function (' + args2 + ") {log.call(deprecate, message, site)\nreturn fn.apply(this, arguments)\n}")(fn2, log4, this, message, site);
163697
+ return new Function("fn", "log", "deprecate", "message", "site", '"use strict"\nreturn function (' + args2 + ") {log.call(deprecate, message, site)\nreturn fn.apply(this, arguments)\n}")(fn2, log3, this, message, site);
164040
163698
  }
164041
163699
  function wrapproperty(obj, prop, message) {
164042
163700
  if (!obj || typeof obj !== "object" && typeof obj !== "function") throw new TypeError("argument obj must be object");
@@ -164050,11 +163708,11 @@ var require_depd = /* @__PURE__ */ __commonJSMin3(((exports, module) => {
164050
163708
  var get2 = descriptor.get;
164051
163709
  var set2 = descriptor.set;
164052
163710
  if (typeof get2 === "function") descriptor.get = function getter() {
164053
- log4.call(deprecate$1, message, site);
163711
+ log3.call(deprecate$1, message, site);
164054
163712
  return get2.apply(this, arguments);
164055
163713
  };
164056
163714
  if (typeof set2 === "function") descriptor.set = function setter() {
164057
- log4.call(deprecate$1, message, site);
163715
+ log3.call(deprecate$1, message, site);
164058
163716
  return set2.apply(this, arguments);
164059
163717
  };
164060
163718
  Object.defineProperty(obj, prop, descriptor);
@@ -175102,7 +174760,7 @@ ${error49 instanceof Error ? error49.stack : JSON.stringify(error49)}`
175102
174760
  );
175103
174761
  }
175104
174762
  };
175105
- const log4 = {
174763
+ const log3 = {
175106
174764
  debug: (message, context) => {
175107
174765
  this.#server.sendLoggingMessage({
175108
174766
  data: {
@@ -175170,7 +174828,7 @@ ${error49 instanceof Error ? error49.stack : JSON.stringify(error49)}`
175170
174828
  client: {
175171
174829
  version: this.#server.getClientVersion()
175172
174830
  },
175173
- log: log4,
174831
+ log: log3,
175174
174832
  reportProgress: reportProgress2,
175175
174833
  requestId: typeof request2.params?._meta?.requestId === "string" ? request2.params._meta.requestId : void 0,
175176
174834
  session: this.#auth,
@@ -178032,8 +177690,8 @@ var createNode = ({ id, kind, inner, meta: meta3, $: $2, ignoreCache }) => {
178032
177690
  let innerJson = {};
178033
177691
  for (const [k2, v] of innerEntries) {
178034
177692
  const keyImpl = impl.keys[k2];
178035
- const serialize = keyImpl.serialize ?? (keyImpl.child ? serializeListableChild : defaultValueSerializer);
178036
- innerJson[k2] = serialize(v);
177693
+ const serialize2 = keyImpl.serialize ?? (keyImpl.child ? serializeListableChild : defaultValueSerializer);
177694
+ innerJson[k2] = serialize2(v);
178037
177695
  if (keyImpl.child === true) {
178038
177696
  const listableNode = v;
178039
177697
  if (isArray(listableNode))
@@ -178255,8 +177913,8 @@ var defaultableMorphCache = {};
178255
177913
  var getDefaultableMorph = (node2) => {
178256
177914
  if (!node2.hasDefault())
178257
177915
  return;
178258
- const cacheKey2 = `{${node2.compiledKey}: ${node2.value.id} = ${defaultValueSerializer(node2.default)}}`;
178259
- return defaultableMorphCache[cacheKey2] ??= computeDefaultValueMorph(node2.key, node2.value, node2.default);
177916
+ const cacheKey3 = `{${node2.compiledKey}: ${node2.value.id} = ${defaultValueSerializer(node2.default)}}`;
177917
+ return defaultableMorphCache[cacheKey3] ??= computeDefaultValueMorph(node2.key, node2.value, node2.default);
178260
177918
  };
178261
177919
  var computeDefaultValueMorph = (key, value2, defaultInput) => {
178262
177920
  if (typeof defaultInput === "function") {
@@ -180429,15 +180087,15 @@ var getDefaultableMorphs = (node2) => {
180429
180087
  if (!node2.defaultables)
180430
180088
  return [];
180431
180089
  const morphs = [];
180432
- let cacheKey2 = "[";
180090
+ let cacheKey3 = "[";
180433
180091
  const lastDefaultableIndex = node2.prefixLength + node2.defaultablesLength - 1;
180434
180092
  for (let i2 = node2.prefixLength; i2 <= lastDefaultableIndex; i2++) {
180435
180093
  const [elementNode, defaultValue] = node2.defaultables[i2 - node2.prefixLength];
180436
180094
  morphs.push(computeDefaultValueMorph(i2, elementNode, defaultValue));
180437
- cacheKey2 += `${i2}: ${elementNode.id} = ${defaultValueSerializer(defaultValue)}, `;
180095
+ cacheKey3 += `${i2}: ${elementNode.id} = ${defaultValueSerializer(defaultValue)}, `;
180438
180096
  }
180439
- cacheKey2 += "]";
180440
- return defaultableMorphsCache[cacheKey2] ??= morphs;
180097
+ cacheKey3 += "]";
180098
+ return defaultableMorphsCache[cacheKey3] ??= morphs;
180441
180099
  };
180442
180100
  var Sequence = {
180443
180101
  implementation: implementation21,
@@ -181127,40 +180785,40 @@ var StructureNode = class extends BaseConstraint {
181127
180785
  };
181128
180786
  var defaultableMorphsCache2 = {};
181129
180787
  var constructStructuralMorphCacheKey = (node2) => {
181130
- let cacheKey2 = "";
180788
+ let cacheKey3 = "";
181131
180789
  for (let i2 = 0; i2 < node2.defaultable.length; i2++)
181132
- cacheKey2 += node2.defaultable[i2].defaultValueMorphRef;
180790
+ cacheKey3 += node2.defaultable[i2].defaultValueMorphRef;
181133
180791
  if (node2.sequence?.defaultValueMorphsReference)
181134
- cacheKey2 += node2.sequence?.defaultValueMorphsReference;
180792
+ cacheKey3 += node2.sequence?.defaultValueMorphsReference;
181135
180793
  if (node2.undeclared === "delete") {
181136
- cacheKey2 += "delete !(";
180794
+ cacheKey3 += "delete !(";
181137
180795
  if (node2.required)
181138
180796
  for (const n3 of node2.required)
181139
- cacheKey2 += n3.compiledKey + " | ";
180797
+ cacheKey3 += n3.compiledKey + " | ";
181140
180798
  if (node2.optional)
181141
180799
  for (const n3 of node2.optional)
181142
- cacheKey2 += n3.compiledKey + " | ";
180800
+ cacheKey3 += n3.compiledKey + " | ";
181143
180801
  if (node2.index)
181144
180802
  for (const index of node2.index)
181145
- cacheKey2 += index.signature.id + " | ";
180803
+ cacheKey3 += index.signature.id + " | ";
181146
180804
  if (node2.sequence) {
181147
180805
  if (node2.sequence.maxLength === null)
181148
- cacheKey2 += intrinsic.nonNegativeIntegerString.id;
180806
+ cacheKey3 += intrinsic.nonNegativeIntegerString.id;
181149
180807
  else {
181150
180808
  for (let i2 = 0; i2 < node2.sequence.tuple.length; i2++)
181151
- cacheKey2 += i2 + " | ";
180809
+ cacheKey3 += i2 + " | ";
181152
180810
  }
181153
180811
  }
181154
- cacheKey2 += ")";
180812
+ cacheKey3 += ")";
181155
180813
  }
181156
- return cacheKey2;
180814
+ return cacheKey3;
181157
180815
  };
181158
180816
  var getPossibleMorph = (node2) => {
181159
- const cacheKey2 = constructStructuralMorphCacheKey(node2);
181160
- if (!cacheKey2)
180817
+ const cacheKey3 = constructStructuralMorphCacheKey(node2);
180818
+ if (!cacheKey3)
181161
180819
  return void 0;
181162
- if (defaultableMorphsCache2[cacheKey2])
181163
- return defaultableMorphsCache2[cacheKey2];
180820
+ if (defaultableMorphsCache2[cacheKey3])
180821
+ return defaultableMorphsCache2[cacheKey3];
181164
180822
  const $arkStructuralMorph = (data, ctx) => {
181165
180823
  for (let i2 = 0; i2 < node2.defaultable.length; i2++) {
181166
180824
  if (!(node2.defaultable[i2].key in data))
@@ -181177,7 +180835,7 @@ var getPossibleMorph = (node2) => {
181177
180835
  }
181178
180836
  return data;
181179
180837
  };
181180
- return defaultableMorphsCache2[cacheKey2] = $arkStructuralMorph;
180838
+ return defaultableMorphsCache2[cacheKey3] = $arkStructuralMorph;
181181
180839
  };
181182
180840
  var precompileMorphs = (js, node2) => {
181183
180841
  const requiresContext = node2.defaultable.some((node3) => node3.defaultValueMorph.length === 2) || node2.sequence?.defaultValueMorphs.some((morph) => morph.length === 2);
@@ -183582,10 +183240,22 @@ var schema = ark.schema;
183582
183240
  var define2 = ark.define;
183583
183241
  var declare = ark.declare;
183584
183242
 
183585
- // node_modules/.pnpm/yes@0.0.3/node_modules/yes/dist/index.js
183586
- import { performance as performance8 } from "node:perf_hooks";
183243
+ // node_modules/.pnpm/yes@0.2.3_typescript@5.9.3/node_modules/yes/dist/index.js
183587
183244
  import { setTimeout as sleep2 } from "node:timers/promises";
183588
183245
 
183246
+ // node_modules/.pnpm/yes@0.2.3_typescript@5.9.3/node_modules/yes/dist/cache/adapter.js
183247
+ var AdapterError = class extends Error {
183248
+ method;
183249
+ /** the full store key, or the op's prefix when the call covered many keys. never the raw input. */
183250
+ key;
183251
+ constructor(method, key, cause) {
183252
+ super(`cache ${method} failed for ${key}: ${cause instanceof Error ? cause.message : String(cause)}`, { cause });
183253
+ this.name = "AdapterError";
183254
+ this.method = method;
183255
+ this.key = key;
183256
+ }
183257
+ };
183258
+
183589
183259
  // node_modules/.pnpm/lru-cache@11.5.3/node_modules/lru-cache/dist/esm/node/index.min.js
183590
183260
  import { tracingChannel as G, channel as P } from "node:diagnostics_channel";
183591
183261
  var S = P("lru-cache:metrics");
@@ -184171,72 +183841,87 @@ var I2 = class d2 {
184171
183841
  }
184172
183842
  };
184173
183843
 
184174
- // node_modules/.pnpm/yes@0.0.3/node_modules/yes/dist/index.js
184175
- var import_object_hash = __toESM(require_object_hash(), 1);
184176
- var VOID_KEY = "~void";
184177
- function getCacheKeyString(value2) {
184178
- if (value2 === void 0)
184179
- return VOID_KEY;
184180
- if (value2 === null) {
184181
- throw new Error("cache key cannot be null");
184182
- }
184183
- try {
184184
- if (typeof value2 === "string")
184185
- return value2;
184186
- return (0, import_object_hash.default)(value2, {
184187
- unorderedObjects: true,
184188
- unorderedArrays: true
184189
- });
184190
- } catch (error49) {
184191
- throw new Error(`cache key cannot be hashed: ${error49 instanceof Error ? error49.message : String(error49)}`);
184192
- }
183844
+ // node_modules/.pnpm/yes@0.2.3_typescript@5.9.3/node_modules/yes/dist/cache/memory.js
183845
+ function memory({ maxItems = 1e3 } = {}) {
183846
+ const store = new I2({ max: maxItems });
183847
+ return {
183848
+ get: (key) => store.get(key),
183849
+ peek: (key) => store.peek(key),
183850
+ // the TTL rides on each entry, so ops with different lifetimes can share one store
183851
+ set: (key, entry, ttlMs) => store.set(key, entry, { ttl: ttlMs }),
183852
+ delete: (keys) => {
183853
+ for (const key of keys)
183854
+ store.delete(key);
183855
+ },
183856
+ // a snapshot, so deleting while iterating is safe
183857
+ list: (prefix) => [...store.entries()].filter(([key]) => key.startsWith(prefix))
183858
+ };
184193
183859
  }
184194
- function jitter(delayMs) {
184195
- const half = delayMs / 2;
184196
- return Math.round(half + Math.random() * half);
183860
+
183861
+ // node_modules/.pnpm/yes@0.2.3_typescript@5.9.3/node_modules/yes/dist/key.js
183862
+ import { hash as hash2 } from "node:crypto";
183863
+ function hashKey(value2) {
183864
+ return hash2("sha1", canonical(value2));
184197
183865
  }
184198
- var DEFAULT_RETRY_AFTER_CAP_MS = 2e4;
184199
- function getErrorResponseHeaders(error49) {
184200
- if (error49 === null || typeof error49 !== "object")
184201
- return void 0;
184202
- const source = error49;
184203
- const headers = source.response?.headers ?? source.headers;
184204
- if (headers === null || typeof headers !== "object")
184205
- return void 0;
184206
- return headers;
183866
+ function canonical(value2) {
183867
+ return serialize(value2, 0);
184207
183868
  }
184208
- function retryAfterMs(error49) {
184209
- const headers = getErrorResponseHeaders(error49);
184210
- if (!headers)
184211
- return void 0;
184212
- const retryAfter = headers["retry-after"];
184213
- if (typeof retryAfter === "string" && retryAfter.trim() !== "") {
184214
- const seconds = Number(retryAfter);
184215
- if (Number.isFinite(seconds))
184216
- return Math.max(0, seconds * 1e3);
184217
- const dateMs = Date.parse(retryAfter);
184218
- if (!Number.isNaN(dateMs))
184219
- return Math.max(0, dateMs - Date.now());
184220
- }
184221
- if (headers["x-ratelimit-remaining"] === "0") {
184222
- const reset = headers["x-ratelimit-reset"];
184223
- if (typeof reset === "string" && reset.trim() !== "") {
184224
- const resetEpoch = Number(reset);
184225
- if (Number.isFinite(resetEpoch))
184226
- return Math.max(0, resetEpoch * 1e3 - Date.now());
184227
- }
183869
+ function cacheKey2(value2) {
183870
+ if (value2 === null)
183871
+ throw new Error("null cannot be part of a cache key");
183872
+ return value2 === void 0 ? "~void" : hashKey(value2);
183873
+ }
183874
+ function serialize(value2, depth) {
183875
+ switch (typeof value2) {
183876
+ case "number":
183877
+ if (Number.isFinite(value2))
183878
+ return String(value2);
183879
+ throw new Error(`${value2} cannot be part of a cache key`);
183880
+ case "string":
183881
+ case "boolean":
183882
+ return JSON.stringify(value2);
183883
+ case "undefined":
183884
+ throw new Error("undefined cannot be part of a cache key, except as an object property");
183885
+ case "object":
183886
+ break;
183887
+ default:
183888
+ throw new Error(`a ${typeof value2} cannot be part of a cache key`);
184228
183889
  }
184229
- return void 0;
183890
+ if (value2 === null)
183891
+ return "null";
183892
+ if (depth++ === 64)
183893
+ throw new Error("an input nested more than 64 levels deep, or circular");
183894
+ if (Array.isArray(value2)) {
183895
+ let out2 = "[";
183896
+ for (let i2 = 0; i2 < value2.length; i2++)
183897
+ out2 += `${i2 ? "," : ""}${serialize(value2[i2], depth)}`;
183898
+ return `${out2}]`;
183899
+ }
183900
+ const proto = Object.getPrototypeOf(value2);
183901
+ if (proto !== Object.prototype && proto !== null) {
183902
+ const name = proto.constructor?.name || "class instance";
183903
+ throw new Error(`a ${name} cannot be part of a cache key: only JSON data can`);
183904
+ }
183905
+ let out = "";
183906
+ for (const key of Object.keys(value2).sort()) {
183907
+ const v = value2[key];
183908
+ if (v !== void 0)
183909
+ out += `${out ? "," : ""}${JSON.stringify(key)}:${serialize(v, depth)}`;
183910
+ }
183911
+ return `{${out}}`;
183912
+ }
183913
+
183914
+ // node_modules/.pnpm/yes@0.2.3_typescript@5.9.3/node_modules/yes/dist/index.js
183915
+ function delay2(schedule, attempt) {
183916
+ const d3 = schedule[attempt - 1];
183917
+ return d3 === void 0 ? -1 : Math.round(d3 / 2 + Math.random() * d3 / 2);
184230
183918
  }
184231
183919
  var ValidationError = class extends Error {
184232
- result;
184233
- issues;
183920
+ name = "ValidationError";
184234
183921
  constructor(result) {
184235
- const message = "message" in result && typeof result.message === "string" ? result.message : `validation failed: ${result.issues.map((i2) => i2.message).join(", ")}`;
184236
- super(message);
184237
- this.name = "ValidationError";
184238
- this.result = result;
184239
- this.issues = result.issues;
183922
+ const { message } = result;
183923
+ super(typeof message === "string" ? message : `validation failed: ${result.issues.map((i2) => i2.message).join(", ")}`);
183924
+ Object.assign(this, { result, issues: result.issues });
184240
183925
  }
184241
183926
  };
184242
183927
  async function assertSchema(schema2, value2) {
@@ -184245,204 +183930,212 @@ async function assertSchema(schema2, value2) {
184245
183930
  throw new ValidationError(result);
184246
183931
  return result.value;
184247
183932
  }
184248
- var log3 = {
184249
- info: (...args2) => console.log(...args2),
184250
- error: (...args2) => console.error(...args2),
184251
- debug: (...args2) => {
184252
- if (process.env.LOG_LEVEL === "debug")
184253
- console.log(...args2);
184254
- },
184255
- prod: (...args2) => {
184256
- if (process.env.NODE_ENV === "production")
184257
- console.log(...args2);
184258
- }
184259
- };
184260
- function op(fnOrOptions, options) {
184261
- if (typeof fnOrOptions === "function") {
184262
- return _op(fnOrOptions, options ?? {});
184263
- }
184264
- const { input: inputSchema, output: outputSchema, run: run4, ...opOptions } = fnOrOptions;
184265
- return _op(run4, opOptions, { input: inputSchema, output: outputSchema });
184266
- }
184267
- function _op(fn2, options, schemas = {}) {
184268
- const shouldCache = options.ttl !== void 0;
184269
- const lruCache = shouldCache ? new I2({
184270
- max: options.maxItems ?? 1e3,
184271
- ttl: options.ttl
184272
- }) : null;
184273
- const keyMap = shouldCache ? new I2({
184274
- max: options.maxItems ?? 1e3,
184275
- ttl: options.ttl
184276
- }) : null;
184277
- const inFlightPromises = /* @__PURE__ */ new Map();
184278
- const namePrefix = options.name ? `[${options.name}] ` : "";
184279
- const defaultCacheHit = options.cacheHit === null ? () => {
184280
- } : options.cacheHit ?? (() => {
184281
- if (options.name && shouldCache)
184282
- log3.prod(`${namePrefix}cache hit`);
184283
- });
184284
- const defaultCacheMiss = options.cacheMiss === null ? () => {
184285
- } : options.cacheMiss ?? (() => {
184286
- if (options.name && shouldCache)
184287
- log3.prod(`${namePrefix}cache miss`);
184288
- });
184289
- const keyInput = (value2) => {
184290
- if (!schemas.input)
184291
- return value2;
184292
- const result = schemas.input["~standard"].validate(value2);
184293
- return result instanceof Promise || result.issues ? value2 : result.value;
184294
- };
184295
- const cachedFn = async (rawInput, ctx) => {
184296
- const input = schemas.input ? await assertSchema(schemas.input, rawInput) : rawInput;
184297
- let key;
183933
+ function op(options) {
183934
+ return build3(options, true);
183935
+ }
183936
+ function build3(options, cacheMethods) {
183937
+ const { name, input: inputSchema, output: outputSchema, run: run4, dedupe, ttl, cache: adapter } = options;
183938
+ const { retry } = options;
183939
+ const delayFor = Array.isArray(retry) ? (_, attempt) => delay2(retry, attempt) : retry;
183940
+ if (ttl !== void 0 && typeof ttl !== "function" && !isLifetime(ttl)) {
183941
+ throw new TypeError(`yes.op: ttl must be a positive number of milliseconds, got ${ttl}`);
183942
+ }
183943
+ const lifetime = typeof ttl === "function" ? ttl : () => ttl;
183944
+ if (adapter && (!name || name.includes(":"))) {
183945
+ throw new TypeError(`yes.op: an op with a cache adapter needs a name without ":", got ${JSON.stringify(name)}`);
183946
+ }
183947
+ if (adapter && ttl === void 0)
183948
+ throw new TypeError(`yes.op: a cache adapter does nothing without a ttl`);
183949
+ const store = ttl === void 0 ? void 0 : adapter ?? memory({ maxItems: options.maxItems });
183950
+ const prefix = adapter ? `yes:${name}:` : "";
183951
+ const label = name ? `[${name}] ` : "";
183952
+ const logCache = (event) => () => {
183953
+ if (name && store && process.env.NODE_ENV === "production")
183954
+ console.log(`${label}cache ${event}`);
183955
+ };
183956
+ const { cacheHit = logCache("hit"), cacheMiss = logCache("miss") } = options;
183957
+ const keyOf = (input) => {
184298
183958
  try {
184299
- key = getCacheKeyString(input);
183959
+ return cacheKey2(input);
184300
183960
  } catch (error49) {
184301
- const errorMessage = error49 instanceof Error ? error49.message : String(error49);
184302
- throw new Error(`failed to create cache key${namePrefix ? ` for ${options.name}` : ""}: ${errorMessage}`);
184303
- }
184304
- const startTime = performance8.now();
184305
- const timestamp = (/* @__PURE__ */ new Date()).toISOString();
184306
- log3.debug(`${namePrefix}[${timestamp}] cache lookup started`, { key });
184307
- if (shouldCache && lruCache) {
184308
- const cached4 = lruCache.get(key);
184309
- if (cached4 !== void 0) {
184310
- if (keyMap?.get(key) === void 0)
184311
- keyMap?.set(key, input);
184312
- const runtime = performance8.now() - startTime;
184313
- log3.debug(`${namePrefix}[${timestamp}] cache hit (from lru)`, {
184314
- key,
184315
- runtime: `${Math.round(runtime)}ms`
184316
- });
184317
- defaultCacheHit(key);
184318
- return cached4;
184319
- }
184320
- }
184321
- const inFlight = inFlightPromises.get(key);
184322
- if (inFlight) {
184323
- log3.debug(`${namePrefix}[${timestamp}] cache hit (in-flight)`, { key });
184324
- defaultCacheHit(key);
184325
- return inFlight;
183961
+ throw new Error(`${label}${error49.message}. dedupe and ttl key the input, and a query always dedupes; a write is yes.mutation, which never keys.`, { cause: error49 });
184326
183962
  }
184327
- log3.debug(`${namePrefix}[${timestamp}] cache miss, executing function`, {
184328
- key
184329
- });
184330
- defaultCacheMiss(key);
184331
- const retries = options.retries ?? [];
184332
- let lastError;
184333
- const execStartTime = performance8.now();
184334
- const promise2 = (async () => {
184335
- for (let attempt = 0; attempt <= retries.length; attempt++) {
184336
- try {
184337
- const returned = await fn2(input, ctx);
184338
- const result = schemas.output ? await assertSchema(schemas.output, returned) : returned;
184339
- const execRuntime2 = performance8.now() - execStartTime;
184340
- const skip = options.skipCache ? options.skipCache(result) : false;
184341
- if (shouldCache && lruCache && result !== null && result !== void 0 && !skip) {
184342
- lruCache.set(key, result);
184343
- keyMap?.set(key, input);
184344
- }
184345
- log3.debug(`${namePrefix}[${timestamp}] function executed successfully`, {
184346
- key,
184347
- runtime: `${Math.round(execRuntime2)}ms`,
184348
- attempt: attempt + 1,
184349
- cached: shouldCache && result !== null && result !== void 0 && !skip
184350
- });
184351
- return result;
184352
- } catch (error49) {
184353
- if (error49 instanceof ValidationError || options.rethrow?.(error49))
184354
- throw error49;
184355
- lastError = error49;
184356
- const isLastAttempt = attempt >= retries.length;
184357
- if (isLastAttempt) {
184358
- if (namePrefix) {
184359
- log3.info(`${namePrefix}attempt ${attempt + 1}/${retries.length + 1} failed, no more retries`);
184360
- log3.info(`${namePrefix}`, { key, error: error49, attempt });
184361
- } else {
184362
- log3.info(`attempt ${attempt + 1}/${retries.length + 1} failed, no more retries`);
184363
- log3.info({ key, error: error49, attempt });
184364
- }
184365
- } else {
184366
- let delay2 = retries[attempt];
184367
- if (options.retryAfter) {
184368
- const extract = options.retryAfter === true ? retryAfterMs : options.retryAfter;
184369
- const hint = extract(error49);
184370
- if (hint !== void 0) {
184371
- const cap = options.retryAfterCap ?? DEFAULT_RETRY_AFTER_CAP_MS;
184372
- delay2 = Math.max(delay2, Math.min(cap, hint));
184373
- }
184374
- }
184375
- delay2 = jitter(delay2);
184376
- if (namePrefix) {
184377
- log3.info(`${namePrefix}attempt ${attempt + 1}/${retries.length + 1} failed, retrying in ${delay2}ms`);
184378
- log3.info(`${namePrefix}`, { key, error: error49, attempt });
184379
- } else {
184380
- log3.info(`attempt ${attempt + 1}/${retries.length + 1} failed, retrying in ${delay2}ms`);
184381
- log3.info({ key, error: error49, attempt });
184382
- }
184383
- await sleep2(delay2);
183963
+ };
183964
+ const report = (attempt, message, error49, key) => {
183965
+ console.log(`${label}attempt ${attempt} ${message}`);
183966
+ const data = key === void 0 ? { error: error49, attempt } : { key, error: error49, attempt };
183967
+ console.log(...label ? [label, data] : [data]);
183968
+ };
183969
+ const attempts = async (input, ctx, key, trace) => {
183970
+ for (let attempt = 1; ; attempt++) {
183971
+ try {
183972
+ const returned = await run4(input, ctx);
183973
+ const result = outputSchema ? await assertSchema(outputSchema, returned) : returned;
183974
+ trace?.(`run resolved on attempt ${attempt}`);
183975
+ return result;
183976
+ } catch (thrown) {
183977
+ let error49 = thrown;
183978
+ let wait = -1;
183979
+ if (delayFor && !(error49 instanceof ValidationError)) {
183980
+ try {
183981
+ wait = delayFor(error49, attempt);
183982
+ } catch (stop2) {
183983
+ error49 = stop2;
184384
183984
  }
184385
183985
  }
183986
+ if (wait >= 0) {
183987
+ report(attempt, `failed, retrying in ${wait}ms`, error49, key);
183988
+ await sleep2(wait);
183989
+ continue;
183990
+ }
183991
+ if (attempt > 1)
183992
+ report(attempt, "failed, not retrying", error49, key);
183993
+ trace?.(`run failed on attempt ${attempt}`, { error: error49 });
183994
+ throw error49;
184386
183995
  }
184387
- const execRuntime = performance8.now() - execStartTime;
184388
- log3.debug(`${namePrefix}[${timestamp}] function failed after all retries`, {
184389
- key,
184390
- runtime: `${Math.round(execRuntime)}ms`,
184391
- attempts: retries.length + 1,
184392
- error: lastError instanceof Error ? lastError.message : lastError
184393
- });
184394
- throw lastError;
184395
- })();
184396
- inFlightPromises.set(key, promise2);
184397
- try {
184398
- return await promise2;
184399
- } finally {
184400
- inFlightPromises.delete(key);
184401
183996
  }
184402
183997
  };
184403
- cachedFn.clear = (key) => {
184404
- if (shouldCache && lruCache) {
184405
- if (key !== void 0) {
184406
- let stringKey;
183998
+ const hit = (key, trace, from, value2) => {
183999
+ trace?.(`cache hit (${from})`);
184000
+ cacheHit?.(key);
184001
+ return value2;
184002
+ };
184003
+ const inFlight = /* @__PURE__ */ new Map();
184004
+ const call = async (rawInput, ctx) => {
184005
+ const input = inputSchema ? await assertSchema(inputSchema, rawInput) : rawInput;
184006
+ if (!dedupe && !store)
184007
+ return attempts(input, ctx, void 0, debugTrace(label));
184008
+ const key = keyOf(input);
184009
+ const trace = debugTrace(label, key);
184010
+ const shared = inFlight.get(key);
184011
+ if (shared)
184012
+ return hit(key, trace, "in-flight", shared);
184013
+ const fullKey = prefix + key;
184014
+ const read2 = store && callAdapter("get", fullKey, () => store.get(fullKey));
184015
+ const entry = freshEntry(read2);
184016
+ if (entry)
184017
+ return hit(key, trace, "from store", entry.value);
184018
+ const promise2 = (async () => {
184019
+ const stored = isThenable(read2) ? freshEntry(await read2) : void 0;
184020
+ if (stored)
184021
+ return hit(key, trace, "from store", stored.value);
184022
+ trace?.("cache miss, running");
184023
+ cacheMiss?.(key);
184024
+ const result = await attempts(input, ctx, key, trace);
184025
+ const ms = store && !options.skipCache?.(result) && result != null && !(result instanceof Error) && lifetime(result);
184026
+ if (store && isLifetime(ms)) {
184027
+ const created = Date.now();
184407
184028
  try {
184408
- stringKey = getCacheKeyString(keyInput(key));
184029
+ await store.set(fullKey, { value: result, created, expires: created + ms, input }, ms);
184409
184030
  } catch (error49) {
184410
- const errorMessage = error49 instanceof Error ? error49.message : String(error49);
184411
- throw new Error(`failed to hash cache key for clear()${namePrefix ? ` in ${options.name}` : ""}: ${errorMessage}`);
184031
+ console.error(`${label}cache write failed, returning the result uncached`, new AdapterError("set", fullKey, error49));
184412
184032
  }
184413
- lruCache.delete(stringKey);
184414
- keyMap.delete(stringKey);
184415
- } else {
184416
- lruCache.clear();
184417
- keyMap.clear();
184418
184033
  }
184034
+ return result;
184035
+ })();
184036
+ if (!dedupe)
184037
+ return promise2;
184038
+ inFlight.set(key, promise2);
184039
+ return promise2.finally(() => inFlight.delete(key));
184040
+ };
184041
+ if (!cacheMethods)
184042
+ return call;
184043
+ const withKey = (input, use) => {
184044
+ const toKey = (result2) => use(prefix + keyOf(result2 && !result2.issues ? result2.value : input));
184045
+ const result = inputSchema?.["~standard"].validate(input);
184046
+ return result instanceof Promise ? result.then(toKey) : toKey(result);
184047
+ };
184048
+ return Object.assign(call, {
184049
+ clear: async (input) => {
184050
+ if (!store)
184051
+ return;
184052
+ if (input === void 0)
184053
+ await sweep(store, prefix, () => true);
184054
+ else
184055
+ await withKey(input, (key) => callAdapter("delete", key, () => store.delete([key])));
184056
+ },
184057
+ // the memory store peeks, so asking whether a key is cached does not change which key is evicted next
184058
+ has: async (input) => !!store && !!freshEntry(await withKey(input, (key) => callAdapter("get", key, () => "peek" in store ? store.peek(key) : store.get(key)))),
184059
+ // not `async`: on the memory store a predicate that throws throws here, not in a promise nobody awaits
184060
+ invalidate: (match3) => {
184061
+ const accepts = typeof match3 === "function" ? match3 : fieldsMatch(match3);
184062
+ return Promise.resolve(store ? sweep(store, prefix, accepts) : 0);
184419
184063
  }
184420
- };
184421
- cachedFn.has = (key) => {
184422
- if (!shouldCache || !lruCache)
184423
- return false;
184424
- try {
184425
- const stringKey = getCacheKeyString(keyInput(key));
184426
- return lruCache.has(stringKey);
184427
- } catch (error49) {
184428
- const errorMessage = error49 instanceof Error ? error49.message : String(error49);
184429
- throw new Error(`failed to hash cache key for has()${namePrefix ? ` in ${options.name}` : ""}: ${errorMessage}`);
184430
- }
184431
- };
184432
- cachedFn.invalidate = (predicate) => {
184433
- if (!shouldCache || !lruCache)
184434
- return 0;
184064
+ });
184065
+ }
184066
+ function query(options) {
184067
+ return op({ ...options, dedupe: true });
184068
+ }
184069
+ function mutation({ dedupe: _dedupe, ttl: _ttl, cache: _cache, ...options }) {
184070
+ return build3(options, false);
184071
+ }
184072
+ function debugTrace(label, key) {
184073
+ if (process.env.LOG_LEVEL !== "debug")
184074
+ return;
184075
+ const prefix = `${label}[${(/* @__PURE__ */ new Date()).toISOString()}]`;
184076
+ const start = performance.now();
184077
+ return (message, data) => console.log(`${prefix} ${message} +${Math.round(performance.now() - start)}ms`, { ...key && { key }, ...data });
184078
+ }
184079
+ var isLifetime = (ms) => typeof ms === "number" && ms > 0 && Number.isFinite(ms);
184080
+ function fieldsMatch(partial3) {
184081
+ const fields = Object.entries(partial3).map(([field, value2]) => [
184082
+ field,
184083
+ value2 === void 0 ? void 0 : canonical(value2)
184084
+ ]);
184085
+ return (input) => typeof input === "object" && input !== null && fields.every(([field, value2]) => {
184086
+ const actual = input[field];
184087
+ return actual === void 0 ? value2 === void 0 : value2 !== void 0 && canonical(actual) === value2;
184088
+ });
184089
+ }
184090
+ var isThenable = (value2) => typeof value2?.then === "function";
184091
+ function freshEntry(value2) {
184092
+ return typeof value2?.expires === "number" && value2.expires > Date.now() && "value" in value2 ? value2 : void 0;
184093
+ }
184094
+ function callAdapter(method, key, run4) {
184095
+ try {
184096
+ const result = run4();
184097
+ if (!isThenable(result))
184098
+ return result;
184099
+ return result.then(void 0, (error49) => {
184100
+ throw new AdapterError(method, key, error49);
184101
+ });
184102
+ } catch (error49) {
184103
+ throw new AdapterError(method, key, error49);
184104
+ }
184105
+ }
184106
+ function sweep(store, prefix, match3) {
184107
+ const purge = (listed2) => {
184108
+ const now = Date.now();
184109
+ const keys = [];
184435
184110
  let count = 0;
184436
- for (const [stringKey, originalKey] of keyMap) {
184437
- if (predicate(originalKey)) {
184438
- lruCache.delete(stringKey);
184439
- keyMap.delete(stringKey);
184111
+ for (const [key, { input, expires }] of listed2) {
184112
+ if (!(expires > now))
184113
+ keys.push(key);
184114
+ else if (match3(input)) {
184115
+ keys.push(key);
184440
184116
  count++;
184441
184117
  }
184442
184118
  }
184443
- return count;
184119
+ const remove = (from) => {
184120
+ if (from >= keys.length)
184121
+ return count;
184122
+ const deleted = callAdapter("delete", prefix, () => store.delete(keys.slice(from, from + 1e3)));
184123
+ return isThenable(deleted) ? Promise.resolve(deleted).then(() => remove(from + 1e3)) : remove(from + 1e3);
184124
+ };
184125
+ return remove(0);
184444
184126
  };
184445
- return cachedFn;
184127
+ const listed = callAdapter("list", prefix, () => {
184128
+ const listed2 = store.list(prefix);
184129
+ if (Array.isArray(listed2))
184130
+ return listed2;
184131
+ return (async () => {
184132
+ const items = [];
184133
+ for await (const item of await listed2)
184134
+ items.push(item);
184135
+ return items;
184136
+ })();
184137
+ });
184138
+ return Array.isArray(listed) ? purge(listed) : listed.then(purge);
184446
184139
  }
184447
184140
 
184448
184141
  // utils/progressComment.ts
@@ -186228,7 +185921,7 @@ function ShellTool(ctx) {
186228
185921
  return tool({
186229
185922
  name: "shell",
186230
185923
  timeoutMs: 12e4,
186231
- description: `Execute shell commands securely. Environment is filtered to remove API keys and secrets.
185924
+ description: `Execute shell commands securely.${ctx.payload.shell === "restricted" ? " Environment is filtered to remove API keys and secrets." : ""}
186232
185925
 
186233
185926
  Example: \`shell({ command: "pnpm test", description: "run the test suite" })\`.
186234
185927
 
@@ -188073,7 +187766,7 @@ async function fetchWrapper(requestOptions) {
188073
187766
  "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing"
188074
187767
  );
188075
187768
  }
188076
- const log4 = requestOptions.request?.log || console;
187769
+ const log3 = requestOptions.request?.log || console;
188077
187770
  const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false;
188078
187771
  const body = isPlainObject8(requestOptions.body) || Array.isArray(requestOptions.body) ? JSONStringify(requestOptions.body) : requestOptions.body;
188079
187772
  const requestHeaders = Object.fromEntries(
@@ -188131,7 +187824,7 @@ async function fetchWrapper(requestOptions) {
188131
187824
  if ("deprecation" in responseHeaders) {
188132
187825
  const matches = responseHeaders.link && responseHeaders.link.match(/<([^<>]+)>; rel="deprecation"/);
188133
187826
  const deprecationLink = matches && matches.pop();
188134
- log4.warn(
187827
+ log3.warn(
188135
187828
  `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${responseHeaders.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
188136
187829
  );
188137
187830
  }
@@ -188269,9 +187962,9 @@ var NON_VARIABLE_OPTIONS = [
188269
187962
  ];
188270
187963
  var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"];
188271
187964
  var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
188272
- function graphql(request2, query, options) {
187965
+ function graphql(request2, query2, options) {
188273
187966
  if (options) {
188274
- if (typeof query === "string" && "query" in options) {
187967
+ if (typeof query2 === "string" && "query" in options) {
188275
187968
  return Promise.reject(
188276
187969
  new Error(`[@octokit/graphql] "query" cannot be used as variable name`)
188277
187970
  );
@@ -188285,7 +187978,7 @@ function graphql(request2, query, options) {
188285
187978
  );
188286
187979
  }
188287
187980
  }
188288
- const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query;
187981
+ const parsedOptions = typeof query2 === "string" ? Object.assign({ query: query2 }, options) : query2;
188289
187982
  const requestOptions = Object.keys(
188290
187983
  parsedOptions
188291
187984
  ).reduce((result, key) => {
@@ -188320,8 +188013,8 @@ function graphql(request2, query, options) {
188320
188013
  }
188321
188014
  function withDefaults3(request2, newDefaults) {
188322
188015
  const newRequest2 = request2.defaults(newDefaults);
188323
- const newApi = (query, options) => {
188324
- return graphql(newRequest2, query, options);
188016
+ const newApi = (query2, options) => {
188017
+ return graphql(newRequest2, query2, options);
188325
188018
  };
188326
188019
  return Object.assign(newApi, {
188327
188020
  defaults: withDefaults3.bind(null, newRequest2),
@@ -191165,16 +190858,17 @@ function translateIdTokenError(error49) {
191165
190858
  if (!status) return error49;
191166
190859
  return new TokenExchangeError(Number(status), error49.message);
191167
190860
  }
191168
- var mintIdToken = op(
191169
- async () => {
190861
+ var mintIdToken = query({
190862
+ run: async () => {
191170
190863
  try {
191171
190864
  return await core4.getIDToken(OIDC_AUDIENCE);
191172
190865
  } catch (error49) {
191173
190866
  throw translateIdTokenError(error49);
191174
190867
  }
191175
190868
  },
191176
- { ttl: 6e4, name: "OIDC ID token" }
191177
- );
190869
+ ttl: 6e4,
190870
+ name: "OIDC ID token"
190871
+ });
191178
190872
  async function acquireTokenViaOIDC(opts) {
191179
190873
  const oidcToken = opts?.oidc ? await fetchIdTokenFromStash(opts.oidc) : await mintIdToken();
191180
190874
  const repos = [...opts?.repos ?? []];
@@ -191332,10 +191026,10 @@ function isTransientTokenError(error49) {
191332
191026
  }
191333
191027
  async function acquireNewToken(opts) {
191334
191028
  if (opts?.oidc || isOIDCAvailable()) {
191335
- return await op(() => acquireTokenViaOIDC(opts), {
191029
+ return await mutation({
191030
+ run: () => acquireTokenViaOIDC(opts),
191336
191031
  name: "token exchange",
191337
- retries: [1e3, 2e3],
191338
- rethrow: (error49) => !isTransientTokenError(error49)
191032
+ retry: (error49, attempt) => isTransientTokenError(error49) ? delay2([1e3, 2e3], attempt) : -1
191339
191033
  })();
191340
191034
  }
191341
191035
  if (process.env.GITHUB_ACTIONS === "true") {
@@ -191669,19 +191363,19 @@ async function pushWithRetry(args2, token, refreshGitToken, cwd = process.cwd())
191669
191363
  if ((kind === "transient" || kind === "transient-auth") && attempt < TRANSIENT_RETRY_DELAYS_MS.length) {
191670
191364
  if (kind === "transient-auth" && refreshGitToken) {
191671
191365
  currentToken = await refreshGitToken(currentToken);
191672
- const delay3 = Math.round(1e3 * (0.75 + Math.random() * 0.5));
191366
+ const delay4 = Math.round(1e3 * (0.75 + Math.random() * 0.5));
191673
191367
  log2.info(
191674
- `push attempt ${attempt + 1} failed (auth), re-minted token, retrying in ${delay3}ms: ${msg.slice(0, 300)}`
191368
+ `push attempt ${attempt + 1} failed (auth), re-minted token, retrying in ${delay4}ms: ${msg.slice(0, 300)}`
191675
191369
  );
191676
- await new Promise((r2) => setTimeout(r2, delay3));
191370
+ await new Promise((r2) => setTimeout(r2, delay4));
191677
191371
  continue;
191678
191372
  }
191679
191373
  const baseDelay = TRANSIENT_RETRY_DELAYS_MS[attempt] ?? 5e3;
191680
- const delay2 = Math.round(baseDelay * (0.75 + Math.random() * 0.5));
191374
+ const delay3 = Math.round(baseDelay * (0.75 + Math.random() * 0.5));
191681
191375
  log2.info(
191682
- `push attempt ${attempt + 1} failed (transient), retrying in ${delay2}ms: ${msg.slice(0, 300)}`
191376
+ `push attempt ${attempt + 1} failed (transient), retrying in ${delay3}ms: ${msg.slice(0, 300)}`
191683
191377
  );
191684
- await new Promise((r2) => setTimeout(r2, delay2));
191378
+ await new Promise((r2) => setTimeout(r2, delay3));
191685
191379
  continue;
191686
191380
  }
191687
191381
  throw err;
@@ -192406,6 +192100,112 @@ function isTransientOctokitError(error49) {
192406
192100
  return isTransientNetworkError(error49);
192407
192101
  }
192408
192102
 
192103
+ // utils/runContext.ts
192104
+ import { randomUUID as randomUUID5 } from "node:crypto";
192105
+ var START_KEY = randomUUID5();
192106
+ var defaultSettings = {
192107
+ model: null,
192108
+ effort: null,
192109
+ modes: [],
192110
+ setupScript: null,
192111
+ postCheckoutScript: null,
192112
+ prepushScript: null,
192113
+ stopScript: null,
192114
+ push: "restricted",
192115
+ shell: "restricted",
192116
+ prApproveEnabled: false,
192117
+ reviewDrafts: false,
192118
+ autoMergeEnabled: false,
192119
+ codexAgent: false,
192120
+ signedCommits: false,
192121
+ repoIntelligence: false,
192122
+ progressComments: true,
192123
+ statusChecks: true,
192124
+ approvalCheck: false,
192125
+ modeInstructions: {},
192126
+ learnings: null,
192127
+ learningsHeadings: [],
192128
+ envAllowlist: null,
192129
+ xrepoBrief: null,
192130
+ xrepoLearnings: null,
192131
+ xrepoLearningsHeadings: []
192132
+ };
192133
+ var defaultRunContext = {
192134
+ settings: defaultSettings,
192135
+ apiToken: "",
192136
+ oss: false,
192137
+ plan: "none"
192138
+ };
192139
+ var unknownSecretsRunContext = {
192140
+ ...defaultRunContext,
192141
+ secretsUnavailable: true
192142
+ };
192143
+ async function fetchRunContext(params) {
192144
+ const timeoutMs = 3e4;
192145
+ const controller = new AbortController();
192146
+ const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
192147
+ try {
192148
+ const headers = {
192149
+ Authorization: `Bearer ${params.token}`,
192150
+ "X-Pullfrog-Credential-Pools": "1"
192151
+ };
192152
+ if (params.oidcToken) {
192153
+ headers["X-GitHub-OIDC-Token"] = params.oidcToken;
192154
+ }
192155
+ const query2 = new URLSearchParams({ start: START_KEY });
192156
+ if (params.runType) query2.set("type", params.runType);
192157
+ if (params.plainPrompt) query2.set("prompt", "plain");
192158
+ if (params.routedTier) query2.set("tier", params.routedTier);
192159
+ const search2 = query2.toString();
192160
+ const response = await apiFetch({
192161
+ path: `/api/repo/${params.repoContext.owner}/${params.repoContext.name}/run-context${search2 ? `?${search2}` : ""}`,
192162
+ headers,
192163
+ signal: controller.signal
192164
+ });
192165
+ clearTimeout(timeoutId);
192166
+ if (response.status === 402) {
192167
+ const body = await response.json().catch(() => null);
192168
+ const reason = typeof body === "object" && body !== null && "reason" in body ? body.reason : null;
192169
+ const commercialRefused = reason === "subscription_unpaid" || reason === "subscription_ended" ? reason : "commercial";
192170
+ return { ...defaultRunContext, commercialRefused };
192171
+ }
192172
+ if (!response.ok) {
192173
+ return response.status >= 500 ? unknownSecretsRunContext : defaultRunContext;
192174
+ }
192175
+ const data = await response.json();
192176
+ if (data === null) {
192177
+ return defaultRunContext;
192178
+ }
192179
+ return {
192180
+ settings: {
192181
+ ...defaultSettings,
192182
+ ...data.settings,
192183
+ modes: data.settings?.modes ?? [],
192184
+ setupScript: data.settings?.setupScript ?? null,
192185
+ postCheckoutScript: data.settings?.postCheckoutScript ?? null,
192186
+ prepushScript: data.settings?.prepushScript ?? null,
192187
+ stopScript: data.settings?.stopScript ?? null,
192188
+ learningsHeadings: data.settings?.learningsHeadings ?? [],
192189
+ xrepoBrief: data.settings?.xrepoBrief ?? null,
192190
+ xrepoLearnings: data.settings?.xrepoLearnings ?? null,
192191
+ xrepoLearningsHeadings: data.settings?.xrepoLearningsHeadings ?? []
192192
+ },
192193
+ apiToken: data.apiToken,
192194
+ oss: data.oss ?? false,
192195
+ plan: data.plan ?? "none",
192196
+ proxyModel: data.proxyModel,
192197
+ dbSecrets: data.dbSecrets,
192198
+ credentialAccess: data.credentialAccess,
192199
+ secretsUnavailable: data.secretsUnavailable,
192200
+ routerUnfunded: data.routerUnfunded,
192201
+ trialFallback: data.trialFallback
192202
+ };
192203
+ } catch {
192204
+ clearTimeout(timeoutId);
192205
+ return unknownSecretsRunContext;
192206
+ }
192207
+ }
192208
+
192409
192209
  // utils/patchWorkflowRunFields.ts
192410
192210
  var STRING_KEYS = [
192411
192211
  "prNodeId",
@@ -192424,6 +192224,7 @@ var NUMBER_KEYS = [
192424
192224
  "cacheWriteTokens",
192425
192225
  "costUsd"
192426
192226
  ];
192227
+ var FLAG_KEYS = ["reviewSkipped"];
192427
192228
  async function patchWorkflowRunFields(ctx, fields) {
192428
192229
  if (ctx.runId === void 0 || !ctx.apiToken) return;
192429
192230
  if (ctx.toolState.workflowRunUnclaimed) return;
@@ -192440,10 +192241,17 @@ async function patchWorkflowRunFields(ctx, fields) {
192440
192241
  body[key] = value2;
192441
192242
  }
192442
192243
  }
192244
+ for (const key of FLAG_KEYS) {
192245
+ if (fields[key]) body[key] = true;
192246
+ }
192247
+ if (fields.succeeded !== void 0) body.succeeded = fields.succeeded;
192443
192248
  if (Object.keys(body).length === 0) return;
192249
+ body.startKey = START_KEY;
192250
+ const runAttempt = Number(process.env.GITHUB_RUN_ATTEMPT);
192251
+ if (Number.isInteger(runAttempt) && runAttempt >= 1) body.runAttempt = runAttempt;
192444
192252
  try {
192445
- await op(
192446
- async () => {
192253
+ await mutation({
192254
+ run: async () => {
192447
192255
  const response = await apiFetch({
192448
192256
  path: `/api/workflow-run/${ctx.runId}`,
192449
192257
  method: "PATCH",
@@ -192454,17 +192262,18 @@ async function patchWorkflowRunFields(ctx, fields) {
192454
192262
  body: JSON.stringify(body),
192455
192263
  signal: AbortSignal.timeout(1e4)
192456
192264
  });
192457
- if (response.status === 404) ctx.toolState.workflowRunUnclaimed = true;
192265
+ if (response.status === 404) {
192266
+ ctx.toolState.workflowRunUnclaimed = true;
192267
+ log2.info(`\xBB Pullfrog has no record of run ${ctx.runId}; skipping run metadata updates`);
192268
+ return;
192269
+ }
192458
192270
  if (!response.ok) throw new Error(`PATCH workflow-run: ${response.status}`);
192459
192271
  },
192460
- {
192461
- retries: [2e3, 4e3],
192462
- name: "patchWorkflowRunFields",
192463
- // only retry transient network errors; explicit HTTP failures throw
192464
- // a status-bearing message and should fail fast.
192465
- rethrow: (error49) => !isTransientNetworkError(error49)
192466
- }
192467
- )();
192272
+ // only retry transient network errors; explicit HTTP failures throw
192273
+ // a status-bearing message and should fail fast.
192274
+ retry: (error49, attempt) => isTransientNetworkError(error49) ? delay2([2e3, 4e3], attempt) : -1,
192275
+ name: "patchWorkflowRunFields"
192276
+ })();
192468
192277
  } catch (error49) {
192469
192278
  log2.warning(`patchWorkflowRunFields failed: ${error49}`);
192470
192279
  }
@@ -192637,6 +192446,9 @@ var ReportProgress = type({
192637
192446
  body: type.string.describe("the progress update content to share"),
192638
192447
  "target_plan_comment?": type("boolean").describe(
192639
192448
  "for revising an existing plan comment ONLY. set to true only when the PlanEdit checklist from select_mode tells you to (i.e. a prior plan comment was found for this issue). NEVER set on the initial plan post \u2014 the initial plan reuses the run's progress comment and is posted by calling report_progress without this flag."
192449
+ ),
192450
+ "no_review_needed?": type("boolean").describe(
192451
+ "IncrementalReview only: true when you judged the new commits need no review, never for a blocker."
192640
192452
  )
192641
192453
  });
192642
192454
  async function reportProgress(ctx, params) {
@@ -192764,6 +192576,9 @@ function ReportProgressTool(ctx) {
192764
192576
  description: 'Share progress on the associated GitHub issue/PR. The first call creates a comment; subsequent calls update it in place. Example: `report_progress({ body: "Implemented the auth check and added tests." })`. Call this at the end of every run with a brief final summary (1-3 sentences) unless the mode guidance instructs otherwise. The current task list is automatically appended in a collapsible section \u2014 do not restate individual steps.',
192765
192577
  parameters: ReportProgress,
192766
192578
  execute: execute(async (params) => {
192579
+ if (params.no_review_needed) {
192580
+ ctx.toolState.noReviewNeededSha = primaryRepoState(ctx.toolState).checkoutSha;
192581
+ }
192767
192582
  if (ctx.toolState.standaloneCommentId !== void 0 && !params.target_plan_comment) {
192768
192583
  ctx.toolState.lastProgressBody = params.body;
192769
192584
  return {
@@ -193295,18 +193110,15 @@ function CreatePullRequestReviewTool(ctx) {
193295
193110
  }
193296
193111
  let result;
193297
193112
  try {
193298
- result = await op(
193299
- () => body ? createAndSubmitWithFooter(ctx, params, {
193113
+ result = await mutation({
193114
+ run: () => body ? createAndSubmitWithFooter(ctx, params, {
193300
193115
  body,
193301
193116
  approved: approved ?? false,
193302
193117
  hasComments: (params.comments?.length ?? 0) > 0
193303
193118
  }) : createReviewWithStrandedRecovery(ctx, params),
193304
- {
193305
- retries: TRANSIENT_REVIEW_RETRY_DELAYS_MS,
193306
- rethrow: (err) => !isTransientReviewError(err),
193307
- name: "review submission"
193308
- }
193309
- )();
193119
+ retry: (error49, attempt) => isTransientReviewError(error49) ? delay2(TRANSIENT_REVIEW_RETRY_DELAYS_MS, attempt) : -1,
193120
+ name: "review submission"
193121
+ })();
193310
193122
  } catch (err) {
193311
193123
  if (ctx.toolState.approval) ctx.toolState.approval.wouldApprove = false;
193312
193124
  if (isTransientReviewError(err)) {
@@ -193979,8 +193791,8 @@ async function checkoutPrBranch(pr, params) {
193979
193791
  if (!alreadyOnBranch) {
193980
193792
  $("git", ["checkout", "-B", pr.baseRef, `origin/${pr.baseRef}`], { log: false });
193981
193793
  log2.debug(`\xBB fetching PR #${pr.number} (${localBranch})...`);
193982
- await op(
193983
- async () => {
193794
+ await mutation({
193795
+ run: async () => {
193984
193796
  try {
193985
193797
  await $gitFetchWithDeepen(
193986
193798
  ["--no-tags", "origin", `+pull/${pr.number}/head:${localBranch}`],
@@ -193995,12 +193807,9 @@ async function checkoutPrBranch(pr, params) {
193995
193807
  throw e;
193996
193808
  }
193997
193809
  },
193998
- {
193999
- retries: PULL_REF_RETRY_DELAYS_MS,
194000
- name: `pull/${pr.number}/head fetch`,
194001
- rethrow: (e) => !PULL_REF_MISSING_PATTERN.test(e instanceof Error ? e.message : String(e))
194002
- }
194003
- )();
193810
+ retry: (error49, attempt) => PULL_REF_MISSING_PATTERN.test(error49 instanceof Error ? error49.message : String(error49)) ? delay2(PULL_REF_RETRY_DELAYS_MS, attempt) : -1,
193811
+ name: `pull/${pr.number}/head fetch`
193812
+ })();
194004
193813
  $("git", ["checkout", localBranch], { log: false });
194005
193814
  log2.debug(`\xBB checked out PR #${pr.number}`);
194006
193815
  repoState.checkoutSha = $("git", ["rev-parse", "HEAD"], { log: false }).trim();
@@ -194677,7 +194486,7 @@ function ReopenCurrentTool(ctx) {
194677
194486
  }
194678
194487
 
194679
194488
  // prep/index.ts
194680
- import { performance as performance9 } from "node:perf_hooks";
194489
+ import { performance as performance8 } from "node:perf_hooks";
194681
194490
 
194682
194491
  // prep/installNodeDependencies.ts
194683
194492
  import { existsSync as existsSync10 } from "node:fs";
@@ -195136,7 +194945,7 @@ var installPythonDependencies = {
195136
194945
  var prepSteps = [installNodeDependencies, installPythonDependencies];
195137
194946
  async function runPrepPhase(options) {
195138
194947
  log2.debug("\xBB starting prep phase...");
195139
- const startTime = performance9.now();
194948
+ const startTime = performance8.now();
195140
194949
  const results = [];
195141
194950
  const preDirty = await dirtyTrackedPaths();
195142
194951
  try {
@@ -195158,7 +194967,7 @@ async function runPrepPhase(options) {
195158
194967
  } finally {
195159
194968
  await restoreDirtiedSince({ before: preDirty, actor: "prep" });
195160
194969
  }
195161
- const totalDurationMs = performance9.now() - startTime;
194970
+ const totalDurationMs = performance8.now() - startTime;
195162
194971
  log2.debug(`\xBB prep phase completed (${Math.round(totalDurationMs)}ms)`);
195163
194972
  return results;
195164
194973
  }
@@ -196346,8 +196155,8 @@ function buildThreadBlocks(threads, filePatchMap, reviewId) {
196346
196155
  }
196347
196156
  return threadBlocks;
196348
196157
  }
196349
- var fetchAllReviewThreads = op(
196350
- async (key, ctx) => {
196158
+ var fetchAllReviewThreads = query({
196159
+ run: async (key, ctx) => {
196351
196160
  const threads = [];
196352
196161
  let cursor3 = null;
196353
196162
  for (let page = 0; page < 50; page += 1) {
@@ -196364,21 +196173,21 @@ var fetchAllReviewThreads = op(
196364
196173
  }
196365
196174
  return threads;
196366
196175
  },
196367
- { ttl: 6e4, name: "reviewThreads" }
196368
- );
196369
- var fetchPrFiles = op(
196370
- async (key, ctx) => ctx.octokit.paginate(ctx.octokit.rest.pulls.listFiles, {
196176
+ ttl: 6e4,
196177
+ name: "reviewThreads"
196178
+ });
196179
+ var fetchPrFiles = query({
196180
+ run: async (key, ctx) => ctx.octokit.paginate(ctx.octokit.rest.pulls.listFiles, {
196371
196181
  owner: key.owner,
196372
196182
  repo: key.name,
196373
196183
  pull_number: key.pullNumber,
196374
196184
  per_page: 100
196375
196185
  }),
196376
- { ttl: 6e4, name: "prFiles" }
196377
- );
196186
+ ttl: 6e4,
196187
+ name: "prFiles"
196188
+ });
196378
196189
  function invalidateReviewThreadCache(repo) {
196379
- fetchAllReviewThreads.invalidate(
196380
- (cached4) => cached4.owner === repo.owner && cached4.name === repo.name
196381
- );
196190
+ fetchAllReviewThreads.invalidate({ owner: repo.owner, name: repo.name });
196382
196191
  }
196383
196192
  async function getReviewThreads(input) {
196384
196193
  const allThreads = structuredClone(
@@ -197105,7 +196914,7 @@ function buildCommonTools(ctx, outputSchema) {
197105
196914
  if (isStandalone || outputSchema) {
197106
196915
  tools.push(SetOutputTool(ctx, outputSchema));
197107
196916
  }
197108
- if (ctx.payload.shell === "restricted") {
196917
+ if (ctx.payload.shell !== "disabled") {
197109
196918
  tools.push(ShellTool(ctx));
197110
196919
  tools.push(KillBackgroundTool(ctx));
197111
196920
  }
@@ -197937,11 +197746,11 @@ function formatBillingErrorSummary(error49, owner) {
197937
197746
  }
197938
197747
  if (error49.code === "router_monthly_limit") {
197939
197748
  return [
197940
- "**Pullfrog Router hit its monthly spend limit.**",
197749
+ "**Pullfrog Router is out of credit, and the monthly spend limit blocks the next auto-reload.**",
197941
197750
  "",
197942
- "Auto-reloads are paused for the rest of this UTC month. Ask your admin to raise the cap, or wait for it to reset at 00:00 UTC on the 1st.",
197751
+ "Top up by hand, ask your admin to raise the cap, or wait for it to reset at 00:00 UTC on the 1st.",
197943
197752
  "",
197944
- `[Adjust limit \u2192](${billingConsoleUrl(owner)})`
197753
+ `[Top up balance \u2192](${billingConsoleUrl(owner)}) \xB7 [Adjust limit \u2192](${billingConsoleUrl(owner)})`
197945
197754
  ].join("\n");
197946
197755
  }
197947
197756
  if (error49.code === "commercial_plan_required") {
@@ -198185,7 +197994,13 @@ var codexUsageSchema = external_exports.object({
198185
197994
  limit_reached: external_exports.boolean(),
198186
197995
  primary_window: codexWindowSchema,
198187
197996
  secondary_window: codexWindowSchema
198188
- }).optional()
197997
+ }).optional(),
197998
+ credits: external_exports.object({
197999
+ has_credits: external_exports.boolean().optional(),
198000
+ unlimited: external_exports.boolean().optional(),
198001
+ overage_limit_reached: external_exports.boolean().optional()
198002
+ }).nullish(),
198003
+ spend_control: external_exports.object({ reached: external_exports.boolean().optional() }).nullish()
198189
198004
  });
198190
198005
  var unknown4 = { status: "unknown" };
198191
198006
  async function readSubscriptionEndpoint(input) {
@@ -198228,9 +198043,12 @@ async function probeSubscription(input) {
198228
198043
  const body = await response.json().catch(() => null);
198229
198044
  if (!codex2) return unknown4;
198230
198045
  const parsed2 = codexUsageSchema.safeParse(body);
198231
- const limit = parsed2.success ? parsed2.data.rate_limit : void 0;
198232
- if (!limit) return unknown4;
198046
+ if (!parsed2.success || !parsed2.data.rate_limit) return unknown4;
198047
+ const limit = parsed2.data.rate_limit;
198233
198048
  if (limit.allowed && !limit.limit_reached) return { status: "usable" };
198049
+ const credits = parsed2.data.credits;
198050
+ if ((credits?.has_credits || credits?.unlimited) && !credits.overage_limit_reached && !parsed2.data.spend_control?.reached)
198051
+ return { status: "usable" };
198234
198052
  const windows = [limit.primary_window, limit.secondary_window];
198235
198053
  const full = windows.filter((window2) => (window2?.used_percent ?? 0) >= 100);
198236
198054
  const resets = (full.length ? full : windows).flatMap(
@@ -198278,15 +198096,24 @@ async function probeInference(input) {
198278
198096
  const error49 = external_exports.object({ error: external_exports.object({ code: external_exports.string() }) }).safeParse(await response.json().catch(() => null));
198279
198097
  return error49.success && error49.data.error.code === "insufficient_quota" ? { status: "exhausted", detail: "refused with 429: insufficient quota", resetAt: void 0 } : unknown4;
198280
198098
  }
198099
+ if (response?.status === 401 || response?.status === 403)
198100
+ return {
198101
+ status: "rejected",
198102
+ detail: `rejected with ${response.status}${await providerReason(response)}`
198103
+ };
198281
198104
  await response?.body?.cancel();
198282
198105
  if (!response) return unknown4;
198283
198106
  if (response.ok) return { status: "usable" };
198284
- if (response.status === 401 || response.status === 403)
198285
- return { status: "rejected", detail: `rejected with ${response.status}` };
198286
198107
  if (response.status === 402)
198287
198108
  return { status: "exhausted", detail: "refused with 402", resetAt: void 0 };
198288
198109
  return unknown4;
198289
198110
  }
198111
+ async function providerReason(response) {
198112
+ const body = external_exports.object({ error: external_exports.union([external_exports.string(), external_exports.object({ message: external_exports.string() })]) }).safeParse(await response.json().catch(() => null));
198113
+ if (!body.success) return "";
198114
+ const error49 = body.data.error;
198115
+ return `: ${(typeof error49 === "string" ? error49 : error49.message).slice(0, 300)}`;
198116
+ }
198290
198117
 
198291
198118
  // utils/credentialPool.ts
198292
198119
  var receipts = {};
@@ -198295,8 +198122,8 @@ function saveReceipts() {
198295
198122
  for (const receipt of Object.values(receipts)) maskSecret(receipt);
198296
198123
  saveSecretState("credential_receipts", JSON.stringify(receipts));
198297
198124
  }
198298
- var select2 = op(
198299
- async (input) => {
198125
+ var select2 = mutation({
198126
+ run: async (input) => {
198300
198127
  const response = await apiFetch({
198301
198128
  path: "/api/runtime/credentials",
198302
198129
  method: "POST",
@@ -198314,11 +198141,8 @@ var select2 = op(
198314
198141
  });
198315
198142
  return selectedCredentialSchema.parse(await response.json());
198316
198143
  },
198317
- {
198318
- retries: [250, 1e3],
198319
- rethrow: (error49) => error49 instanceof Error && typeof error49.cause === "number" && error49.cause >= 400 && error49.cause < 500
198320
- }
198321
- );
198144
+ retry: (error49, attempt) => error49 instanceof Error && typeof error49.cause === "number" && error49.cause >= 400 && error49.cause < 500 ? -1 : delay2([250, 1e3], attempt)
198145
+ });
198322
198146
  function subscriptionForModel(model) {
198323
198147
  if (!model.includes("/")) return null;
198324
198148
  const provider2 = getModelProvider(model);
@@ -198381,12 +198205,14 @@ async function selectConfiguredCredential(input) {
198381
198205
  const subscription = subscriptionForModel(model);
198382
198206
  const names = getModelEnvVars(model).filter((name) => name !== subscription);
198383
198207
  if (subscription) names.unshift(subscription);
198208
+ const opencodePinned = process.env.PULLFROG_AGENT?.trim() === "opencode";
198209
+ const presentable = (name) => canInstallSubscription(name) && !(opencodePinned && CLAUDE_CODE_ONLY_CREDENTIALS.includes(name));
198384
198210
  const candidates = access.candidates.filter(
198385
- (candidate) => names.includes(candidate.name) && canInstallSubscription(candidate.name)
198211
+ (candidate) => names.includes(candidate.name) && presentable(candidate.name)
198386
198212
  );
198387
198213
  if (!candidates.length) return false;
198388
198214
  const options = [
198389
- ...names.filter((name) => workflowCredentials[name] && canInstallSubscription(name)).map((name) => ({ name, candidate: void 0 })),
198215
+ ...names.filter((name) => workflowCredentials[name] && presentable(name)).map((name) => ({ name, candidate: void 0 })),
198390
198216
  ...candidates.map((candidate) => ({ name: candidate.name, candidate }))
198391
198217
  ].sort((a2, b) => Number(b.name === subscription) - Number(a2.name === subscription));
198392
198218
  const refused = [];
@@ -198443,7 +198269,7 @@ function activate(input) {
198443
198269
  }
198444
198270
 
198445
198271
  // utils/gitAuthServer.ts
198446
- import { randomUUID as randomUUID5 } from "node:crypto";
198272
+ import { randomUUID as randomUUID6 } from "node:crypto";
198447
198273
  import { writeFileSync as writeFileSync15 } from "node:fs";
198448
198274
  import { createServer as createServer3 } from "node:http";
198449
198275
  import { join as join25 } from "node:path";
@@ -198501,7 +198327,7 @@ async function startGitAuthServer(tmpdir4) {
198501
198327
  const port = rawAddr.port;
198502
198328
  log2.debug(`git auth server listening on 127.0.0.1:${port}`);
198503
198329
  function register7(token) {
198504
- const code = randomUUID5();
198330
+ const code = randomUUID6();
198505
198331
  codes.set(code, { token, state: "active" });
198506
198332
  return code;
198507
198333
  }
@@ -198513,7 +198339,7 @@ async function startGitAuthServer(tmpdir4) {
198513
198339
  entry.timeout.unref();
198514
198340
  }
198515
198341
  function writeAskpassScript(code) {
198516
- const scriptId = randomUUID5();
198342
+ const scriptId = randomUUID6();
198517
198343
  const scriptName = `askpass-${scriptId}.js`;
198518
198344
  const scriptPath = join25(tmpdir4, scriptName);
198519
198345
  const content = [
@@ -198604,13 +198430,10 @@ function getShellInstructions(shell, t2) {
198604
198430
 
198605
198431
  Shell command execution is DISABLED. Do not attempt to run shell commands.`;
198606
198432
  case "restricted":
198607
- return `### Shell commands
198608
-
198609
- Use the \`${t2("shell")}\` MCP tool for all shell command execution. This tool provides a secure environment with filtered credentials. Do NOT use any native shell tool \u2014 it is disabled for security. For long-running processes (dev servers, watchers), use \`shell({ command, background: true })\`. Use \`${t2("kill_background")}\` to stop background processes.`;
198610
198433
  case "enabled":
198611
198434
  return `### Shell commands
198612
198435
 
198613
- Use your native shell tool for shell command execution.`;
198436
+ Use the \`${t2("shell")}\` MCP tool for all shell command execution.${shell === "restricted" ? " This tool provides a secure environment with filtered credentials. Do NOT use any native shell tool \u2014 it is disabled for security." : ""} For long-running processes (dev servers, watchers), use \`shell({ command, background: true })\`. Use \`${t2("kill_background")}\` to stop background processes.`;
198614
198437
  default: {
198615
198438
  const _exhaustive = shell;
198616
198439
  return _exhaustive;
@@ -199755,8 +199578,8 @@ async function mintProxyKey(ctx) {
199755
199578
  try {
199756
199579
  const headers = await buildProxyTokenHeaders(ctx);
199757
199580
  if (!headers) return null;
199758
- const response = await op(
199759
- async () => {
199581
+ const response = await mutation({
199582
+ run: async () => {
199760
199583
  const r2 = await apiFetch({ path: "/api/proxy-token", method: "POST", headers });
199761
199584
  if (r2.status >= 500) {
199762
199585
  const body = await r2.json().catch(() => null);
@@ -199766,12 +199589,9 @@ async function mintProxyKey(ctx) {
199766
199589
  }
199767
199590
  return r2;
199768
199591
  },
199769
- {
199770
- name: "proxy key mint",
199771
- retries: [1e3, 2e3],
199772
- rethrow: (error49) => !(error49 instanceof TransientError)
199773
- }
199774
- )();
199592
+ name: "proxy key mint",
199593
+ retry: (error49, attempt) => error49 instanceof TransientError ? delay2([1e3, 2e3], attempt) : -1
199594
+ })();
199775
199595
  if (response.status === 402) {
199776
199596
  const body = await response.json().catch(() => null);
199777
199597
  throw new BillingError(body?.error ?? "insufficient balance", {
@@ -199804,10 +199624,10 @@ async function buildProxyTokenHeaders(ctx) {
199804
199624
  const fundingSource = ctx.fundingSource;
199805
199625
  if (ctx.oidcCredentials) {
199806
199626
  const creds = ctx.oidcCredentials;
199807
- const oidcToken = await op(() => fetchIdTokenFromStash(creds), {
199627
+ const oidcToken = await query({
199628
+ run: () => fetchIdTokenFromStash(creds),
199808
199629
  name: "ID token mint",
199809
- retries: [1e3, 2e3],
199810
- rethrow: (error49) => !isTransientTokenError(error49)
199630
+ retry: (error49, attempt) => isTransientTokenError(error49) ? delay2([1e3, 2e3], attempt) : -1
199811
199631
  })();
199812
199632
  return {
199813
199633
  Authorization: `Bearer ${oidcToken}`,
@@ -200054,109 +199874,6 @@ ${collapsible}` : output;
200054
199874
  };
200055
199875
  }
200056
199876
 
200057
- // utils/runContext.ts
200058
- var defaultSettings = {
200059
- model: null,
200060
- effort: null,
200061
- modes: [],
200062
- setupScript: null,
200063
- postCheckoutScript: null,
200064
- prepushScript: null,
200065
- stopScript: null,
200066
- push: "restricted",
200067
- shell: "restricted",
200068
- prApproveEnabled: false,
200069
- reviewDrafts: false,
200070
- autoMergeEnabled: false,
200071
- codexAgent: false,
200072
- signedCommits: false,
200073
- repoIntelligence: false,
200074
- progressComments: true,
200075
- statusChecks: true,
200076
- approvalCheck: false,
200077
- modeInstructions: {},
200078
- learnings: null,
200079
- learningsHeadings: [],
200080
- envAllowlist: null,
200081
- xrepoBrief: null,
200082
- xrepoLearnings: null,
200083
- xrepoLearningsHeadings: []
200084
- };
200085
- var defaultRunContext = {
200086
- settings: defaultSettings,
200087
- apiToken: "",
200088
- oss: false,
200089
- plan: "none"
200090
- };
200091
- var unknownSecretsRunContext = {
200092
- ...defaultRunContext,
200093
- secretsUnavailable: true
200094
- };
200095
- async function fetchRunContext(params) {
200096
- const timeoutMs = 3e4;
200097
- const controller = new AbortController();
200098
- const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
200099
- try {
200100
- const headers = {
200101
- Authorization: `Bearer ${params.token}`,
200102
- "X-Pullfrog-Credential-Pools": "1"
200103
- };
200104
- if (params.oidcToken) {
200105
- headers["X-GitHub-OIDC-Token"] = params.oidcToken;
200106
- }
200107
- const query = new URLSearchParams();
200108
- if (params.runType) query.set("type", params.runType);
200109
- if (params.routedTier) query.set("tier", params.routedTier);
200110
- const search2 = query.toString();
200111
- const response = await apiFetch({
200112
- path: `/api/repo/${params.repoContext.owner}/${params.repoContext.name}/run-context${search2 ? `?${search2}` : ""}`,
200113
- headers,
200114
- signal: controller.signal
200115
- });
200116
- clearTimeout(timeoutId);
200117
- if (response.status === 402) {
200118
- const body = await response.json().catch(() => null);
200119
- const reason = typeof body === "object" && body !== null && "reason" in body ? body.reason : null;
200120
- const commercialRefused = reason === "subscription_unpaid" || reason === "subscription_ended" ? reason : "commercial";
200121
- return { ...defaultRunContext, commercialRefused };
200122
- }
200123
- if (!response.ok) {
200124
- return response.status >= 500 ? unknownSecretsRunContext : defaultRunContext;
200125
- }
200126
- const data = await response.json();
200127
- if (data === null) {
200128
- return defaultRunContext;
200129
- }
200130
- return {
200131
- settings: {
200132
- ...defaultSettings,
200133
- ...data.settings,
200134
- modes: data.settings?.modes ?? [],
200135
- setupScript: data.settings?.setupScript ?? null,
200136
- postCheckoutScript: data.settings?.postCheckoutScript ?? null,
200137
- prepushScript: data.settings?.prepushScript ?? null,
200138
- stopScript: data.settings?.stopScript ?? null,
200139
- learningsHeadings: data.settings?.learningsHeadings ?? [],
200140
- xrepoBrief: data.settings?.xrepoBrief ?? null,
200141
- xrepoLearnings: data.settings?.xrepoLearnings ?? null,
200142
- xrepoLearningsHeadings: data.settings?.xrepoLearningsHeadings ?? []
200143
- },
200144
- apiToken: data.apiToken,
200145
- oss: data.oss ?? false,
200146
- plan: data.plan ?? "none",
200147
- proxyModel: data.proxyModel,
200148
- dbSecrets: data.dbSecrets,
200149
- credentialAccess: data.credentialAccess,
200150
- secretsUnavailable: data.secretsUnavailable,
200151
- routerUnfunded: data.routerUnfunded,
200152
- trialFallback: data.trialFallback
200153
- };
200154
- } catch {
200155
- clearTimeout(timeoutId);
200156
- return unknownSecretsRunContext;
200157
- }
200158
- }
200159
-
200160
199877
  // utils/runContextData.ts
200161
199878
  async function resolveRunContextData(params) {
200162
199879
  const actionRef = process.env.GITHUB_ACTION_REF;
@@ -200166,23 +199883,25 @@ async function resolveRunContextData(params) {
200166
199883
  const repoContext = parseRepoContext();
200167
199884
  let oidcToken;
200168
199885
  try {
200169
- oidcToken = await op(() => mintIdToken(), {
199886
+ oidcToken = await query({
199887
+ run: () => mintIdToken(),
200170
199888
  name: "OIDC mint",
200171
- retries: process.env.ACTIONS_ID_TOKEN_REQUEST_URL ? [200, 1e3] : []
199889
+ retry: process.env.ACTIONS_ID_TOKEN_REQUEST_URL ? [200, 1e3] : []
200172
199890
  })();
200173
199891
  } catch {
200174
199892
  }
200175
199893
  const [repoResponse, runContext] = await Promise.all([
200176
- op(() => params.octokit.repos.get({ owner: repoContext.owner, repo: repoContext.name }), {
199894
+ query({
199895
+ run: () => params.octokit.repos.get({ owner: repoContext.owner, repo: repoContext.name }),
200177
199896
  name: "repos.get",
200178
- retries: [100, 500],
200179
- rethrow: (error49) => !isTransientOctokitError(error49)
199897
+ retry: (error49, attempt) => isTransientOctokitError(error49) ? delay2([100, 500], attempt) : -1
200180
199898
  })(),
200181
199899
  fetchRunContext({
200182
199900
  token: params.token,
200183
199901
  repoContext,
200184
199902
  oidcToken,
200185
199903
  runType: params.runType,
199904
+ plainPrompt: params.plainPrompt,
200186
199905
  routedTier: params.routedTier
200187
199906
  })
200188
199907
  ]);
@@ -200719,17 +200438,14 @@ async function autoMergeAfterApprove(ctx) {
200719
200438
  });
200720
200439
  if (hasBlockingHumanReview(reviews)) return skip("human changes requested");
200721
200440
  try {
200722
- await op(
200723
- () => ctx.octokit.graphql(ENABLE_AUTO_MERGE, {
200441
+ await mutation({
200442
+ run: () => ctx.octokit.graphql(ENABLE_AUTO_MERGE, {
200724
200443
  pullRequestId: pr.data.node_id,
200725
200444
  headSha
200726
200445
  }),
200727
- {
200728
- name: "enablePullRequestAutoMerge",
200729
- retries: [500, 2e3],
200730
- rethrow: (error49) => !isTransientOctokitError(error49)
200731
- }
200732
- )();
200446
+ name: "enablePullRequestAutoMerge",
200447
+ retry: (error49, attempt) => isTransientOctokitError(error49) ? delay2([500, 2e3], attempt) : -1
200448
+ })();
200733
200449
  log2.info(`autoMerge: pr=#${pullNumber} @ ${headSha.slice(0, 7)} \u2192 native auto-merge enabled`);
200734
200450
  await comment(
200735
200451
  "> \u2705 Approved \u2014 auto-merge enabled; GitHub will merge once required checks pass."
@@ -200767,7 +200483,17 @@ async function autoMergeAfterApprove(ctx) {
200767
200483
  var RE_REVIEW_PREAMBLE = "Incrementally re-review the new commits on this pull request. Use the IncrementalReview mode.";
200768
200484
  async function postReviewCleanup(ctx) {
200769
200485
  const review = ctx.toolState.review;
200770
- if (!review) return;
200486
+ if (!review) {
200487
+ const checkoutSha = primaryRepoState(ctx.toolState).checkoutSha;
200488
+ if (ctx.toolState.selectedMode === "IncrementalReview" && checkoutSha) {
200489
+ await patchWorkflowRunFields(ctx, { reviewSkipped: true });
200490
+ await bestEffort(
200491
+ () => dispatchFollowUpReReview(ctx, checkoutSha),
200492
+ "follow-up re-review dispatch"
200493
+ );
200494
+ }
200495
+ return;
200496
+ }
200771
200497
  delete ctx.toolState.review;
200772
200498
  await bestEffort(() => reportReviewNodeId(ctx, { nodeId: review.nodeId }), "reportReviewNodeId");
200773
200499
  if (review.reviewedSha) {
@@ -200820,20 +200546,17 @@ async function dispatchFollowUpReReview(ctx, reviewedSha) {
200820
200546
  eventInstructions: RE_REVIEW_PREAMBLE,
200821
200547
  event
200822
200548
  };
200823
- await op(
200824
- () => ctx.octokit.rest.actions.createWorkflowDispatch({
200549
+ await mutation({
200550
+ run: () => ctx.octokit.rest.actions.createWorkflowDispatch({
200825
200551
  owner: ctx.repo.owner,
200826
200552
  repo: ctx.repo.name,
200827
200553
  workflow_id: getCurrentWorkflowFilename(),
200828
200554
  ref: pr.data.base.repo.default_branch,
200829
200555
  inputs: { prompt: JSON.stringify(payload) }
200830
200556
  }),
200831
- {
200832
- name: "reReviewDispatch",
200833
- retries: [500, 2e3],
200834
- rethrow: (error49) => !isTransientOctokitError(error49)
200835
- }
200836
- )();
200557
+ name: "reReviewDispatch",
200558
+ retry: (error49, attempt) => isTransientOctokitError(error49) ? delay2([500, 2e3], attempt) : -1
200559
+ })();
200837
200560
  }
200838
200561
  function getCurrentWorkflowFilename() {
200839
200562
  const ref = process.env.GITHUB_WORKFLOW_REF ?? "";
@@ -200843,6 +200566,7 @@ function getCurrentWorkflowFilename() {
200843
200566
 
200844
200567
  // utils/runStatusCheck.ts
200845
200568
  var RUN_STATUS_CHECK_NAME = "pullfrog";
200569
+ var GITHUB_ACTIONS_APP_SLUG = "github-actions";
200846
200570
  var APPROVAL_CHECK_NAME = "pullfrog-approval";
200847
200571
  function parseCheckRunId(raw2) {
200848
200572
  if (!raw2?.id) return void 0;
@@ -200896,7 +200620,12 @@ function terminalOutput(params) {
200896
200620
  const review = params.reviewUrl ? `
200897
200621
 
200898
200622
  [View the review Pullfrog posted \u2192](${params.reviewUrl})` : "";
200899
- if (params.conclusion === "success") return { title: base.title, summary: base.summary + review };
200623
+ if (params.conclusion === "success") {
200624
+ const note = params.note ? `
200625
+
200626
+ ${params.note}` : "";
200627
+ return { title: base.title, summary: base.summary + review + note };
200628
+ }
200900
200629
  return {
200901
200630
  title: base.title,
200902
200631
  summary: base.summary + logsLine(params.detailsUrl) + review + disableCheckLine(params.owner, params.repo)
@@ -200914,7 +200643,8 @@ async function finalizeRunStatusCheck(params) {
200914
200643
  owner: params.owner,
200915
200644
  repo: params.repo,
200916
200645
  detailsUrl: params.detailsUrl,
200917
- reviewUrl: params.reviewUrl
200646
+ reviewUrl: params.reviewUrl,
200647
+ note: params.note
200918
200648
  })
200919
200649
  };
200920
200650
  if (params.detailsUrl) updateParams.details_url = params.detailsUrl;
@@ -200933,7 +200663,8 @@ async function createTerminalRunStatusCheck(params) {
200933
200663
  owner: params.owner,
200934
200664
  repo: params.repo,
200935
200665
  detailsUrl: params.detailsUrl,
200936
- reviewUrl: params.reviewUrl
200666
+ reviewUrl: params.reviewUrl,
200667
+ note: params.note
200937
200668
  })
200938
200669
  };
200939
200670
  if (params.detailsUrl) createParams.details_url = params.detailsUrl;
@@ -200949,6 +200680,8 @@ async function reportStatusChecks(ctx, params) {
200949
200680
  if (checkRunId === void 0 && !ctx.payload.runStatusCheck && !ctx.payload.approvalCheck) return;
200950
200681
  const conclusion = params.runSucceeded ? "success" : "failure";
200951
200682
  const detailsUrl = ctx.runId ? `https://github.com/${ctx.repo.owner}/${ctx.repo.name}/actions/runs/${ctx.runId}` : void 0;
200683
+ const approval = ctx.toolState.approval;
200684
+ const note = event.silent && !approval?.url ? ctx.toolState.lastProgressBody : void 0;
200952
200685
  if (checkRunId !== void 0) {
200953
200686
  await finalizeRunStatusCheck({
200954
200687
  octokit: ctx.octokit,
@@ -200957,11 +200690,12 @@ async function reportStatusChecks(ctx, params) {
200957
200690
  checkRunId,
200958
200691
  conclusion,
200959
200692
  detailsUrl,
200960
- reviewUrl: ctx.toolState.approval?.url
200693
+ reviewUrl: approval?.url,
200694
+ note
200961
200695
  }).then(() => log2.info(`\xBB finalized ${RUN_STATUS_CHECK_NAME} check (${conclusion})`)).catch((err) => log2.debug(`status checks: ${RUN_STATUS_CHECK_NAME} finalize failed: ${err}`));
200962
200696
  }
200963
- const approval = ctx.toolState.approval;
200964
- const needsApprovalCheck = ctx.payload.approvalCheck && params.runSucceeded && approval;
200697
+ const carriesApproval = !approval && ctx.toolState.selectedMode === "IncrementalReview";
200698
+ const needsApprovalCheck = ctx.payload.approvalCheck && params.runSucceeded && (approval !== void 0 || carriesApproval);
200965
200699
  const needsFallbackRunCheck = ctx.payload.runStatusCheck && checkRunId === void 0;
200966
200700
  if (!needsApprovalCheck && !needsFallbackRunCheck) return;
200967
200701
  let headSha;
@@ -200984,25 +200718,64 @@ async function reportStatusChecks(ctx, params) {
200984
200718
  headSha: primaryRepoState(ctx.toolState).checkoutSha ?? headSha,
200985
200719
  conclusion,
200986
200720
  detailsUrl,
200987
- reviewUrl: ctx.toolState.approval?.url
200721
+ reviewUrl: approval?.url,
200722
+ note
200988
200723
  }).then(() => log2.info(`\xBB posted ${RUN_STATUS_CHECK_NAME} check (${conclusion})`)).catch((err) => log2.debug(`status checks: ${RUN_STATUS_CHECK_NAME} post failed: ${err}`));
200989
200724
  }
200990
- if (!needsApprovalCheck || !approval) return;
200725
+ if (!needsApprovalCheck) return;
200726
+ const verdict = approval ? { wouldApprove: approval.wouldApprove, sha: approval.sha ?? headSha, carriedLine: "" } : await carriedApproval(ctx, pullNumber).catch((err) => {
200727
+ log2.debug(`status checks: ${APPROVAL_CHECK_NAME} carry-forward failed: ${err}`);
200728
+ return void 0;
200729
+ });
200730
+ if (!verdict) return;
200991
200731
  const createParams = {
200992
200732
  owner: ctx.repo.owner,
200993
200733
  repo: ctx.repo.name,
200994
200734
  name: APPROVAL_CHECK_NAME,
200995
- head_sha: approval.sha ?? headSha,
200735
+ head_sha: verdict.sha,
200996
200736
  status: "completed",
200997
- conclusion: approval.wouldApprove ? "success" : "failure",
200737
+ conclusion: verdict.wouldApprove ? "success" : "failure",
200998
200738
  output: {
200999
- title: approval.wouldApprove ? "Pullfrog would approve" : "Pullfrog would not approve",
201000
- summary: approval.wouldApprove ? "Pullfrog has no outstanding review feedback on this PR." : "Pullfrog has outstanding review feedback or requested changes on this PR."
200739
+ title: verdict.wouldApprove ? "Pullfrog would approve" : "Pullfrog would not approve",
200740
+ summary: (verdict.wouldApprove ? "Pullfrog has no outstanding review feedback on this PR." : "Pullfrog has outstanding review feedback or requested changes on this PR.") + verdict.carriedLine
201001
200741
  }
201002
200742
  };
201003
200743
  if (detailsUrl) createParams.details_url = detailsUrl;
201004
200744
  await ctx.octokit.rest.checks.create(createParams).then(() => log2.info(`\xBB posted ${APPROVAL_CHECK_NAME} check`)).catch((err) => log2.debug(`status checks: ${APPROVAL_CHECK_NAME} post failed: ${err}`));
201005
200745
  }
200746
+ async function carriedApproval(ctx, pullNumber) {
200747
+ const primary = primaryRepoState(ctx.toolState);
200748
+ if (!primary.beforeSha || !primary.checkoutSha) return void 0;
200749
+ if (await latestApprovalConclusion(ctx, primary.checkoutSha) !== void 0) return void 0;
200750
+ const prior = await latestApprovalConclusion(ctx, primary.beforeSha);
200751
+ if (prior === void 0) return void 0;
200752
+ const from = primary.beforeSha.slice(0, 7);
200753
+ if (prior !== "success") {
200754
+ const carriedLine = `
200755
+
200756
+ No review covered this commit, so the verdict on ${from} carries forward.`;
200757
+ return { wouldApprove: false, sha: primary.checkoutSha, carriedLine };
200758
+ }
200759
+ if (ctx.toolState.noReviewNeededSha !== primary.checkoutSha) return void 0;
200760
+ return {
200761
+ wouldApprove: await countOutstandingPullfrogThreads(ctx, pullNumber) === 0,
200762
+ sha: primary.checkoutSha,
200763
+ carriedLine: `
200764
+
200765
+ Pullfrog found nothing to review in the commits since ${from}.`
200766
+ };
200767
+ }
200768
+ async function latestApprovalConclusion(ctx, ref) {
200769
+ const result = await ctx.octokit.rest.checks.listForRef({
200770
+ owner: ctx.repo.owner,
200771
+ repo: ctx.repo.name,
200772
+ ref,
200773
+ check_name: APPROVAL_CHECK_NAME,
200774
+ status: "completed"
200775
+ });
200776
+ const latest = result.data.check_runs.filter((run4) => run4.app?.slug !== GITHUB_ACTIONS_APP_SLUG).sort((a2, b) => (b.completed_at ?? "").localeCompare(a2.completed_at ?? ""))[0];
200777
+ return latest?.conclusion ?? void 0;
200778
+ }
201006
200779
 
201007
200780
  // utils/runLifecycle.ts
201008
200781
  async function persistRunArtifacts(toolContext) {
@@ -201341,6 +201114,7 @@ async function main() {
201341
201114
  octokit: initialOctokit,
201342
201115
  token: jobToken,
201343
201116
  runType: typeof resolvedPromptInput === "string" ? void 0 : resolvedPromptInput.type,
201117
+ plainPrompt: typeof resolvedPromptInput === "string",
201344
201118
  routedTier: typeof resolvedPromptInput === "string" ? void 0 : resolvedPromptInput.routing?.tier
201345
201119
  });
201346
201120
  timer.checkpoint("runContextData");
@@ -201437,7 +201211,7 @@ async function main() {
201437
201211
  oidc: oidcCredentials
201438
201212
  }), true);
201439
201213
  wipeRunnerLeakSurface();
201440
- if (payload.shell === "restricted" && getSandboxMethod() === "none") {
201214
+ if (payload.shell !== "disabled" && process.env.CI === "true" && getSandboxMethod() === "none") {
201441
201215
  payload.shell = "disabled";
201442
201216
  log2.warning(
201443
201217
  "\xBB shell commands are disabled for this run: this runner provides no PID-namespace isolation (unprivileged unshare, sudo unshare and userns-nested unshare all failed). on a self-hosted Kubernetes/ARC runner, allow user-namespace creation in the pod's seccomp profile \u2014 see https://docs.pullfrog.com/security#self-hosted-runners"
@@ -201458,6 +201232,7 @@ async function main() {
201458
201232
  const octokit = createOctokit(tokenRef.mcpToken, getMcpTokenRefresh());
201459
201233
  const runInfo = await resolveRun({ octokit });
201460
201234
  let toolContext;
201235
+ let succeeded = false;
201461
201236
  let progressCallbackDisabled = false;
201462
201237
  let todoTracker;
201463
201238
  let vertexCredentials;
@@ -201875,11 +201650,13 @@ ${instructions.user}` : null,
201875
201650
  );
201876
201651
  }
201877
201652
  await finalizeSuccessRun({ toolContext, toolState, result, repo: runContext.repo });
201878
- return await handleAgentResult({
201653
+ const outcome = await handleAgentResult({
201879
201654
  result,
201880
201655
  toolContext,
201881
201656
  silent: payload.event.silent ?? false
201882
201657
  });
201658
+ succeeded = outcome.success;
201659
+ return outcome;
201883
201660
  } catch (_2) {
201884
201661
  var _error2 = _2, _hasError2 = true;
201885
201662
  } finally {
@@ -201925,9 +201702,8 @@ ${instructions.user}` : null,
201925
201702
  if (toolState.model) patch.model = toolState.model;
201926
201703
  if (toolState.agent) patch.agent = toolState.agent;
201927
201704
  if (toolState.credential) patch.credential = toolState.credential;
201928
- if (Object.keys(patch).length > 0) {
201929
- await patchWorkflowRunFields(toolContext, patch);
201930
- }
201705
+ patch.succeeded = succeeded;
201706
+ await patchWorkflowRunFields(toolContext, patch);
201931
201707
  }
201932
201708
  cleanupVertexCredentials(vertexCredentials);
201933
201709
  }
@@ -202479,7 +202255,7 @@ function resolveTarget2(repo) {
202479
202255
  return { owner: match3[1], repo: match3[2] };
202480
202256
  }
202481
202257
  function cliVersion() {
202482
- const parts = /^(\d+)\.(\d+)\.(\d+)$/.exec("0.1.94");
202258
+ const parts = /^(\d+)\.(\d+)\.(\d+)$/.exec("0.1.96");
202483
202259
  if (!parts) return "0.0.0";
202484
202260
  return `${Number(parts[1])}.${Number(parts[2])}.${Number(parts[3])}`;
202485
202261
  }
@@ -202625,10 +202401,10 @@ async function runCli8(input) {
202625
202401
  if (isTerminal2(error49)) bail(error49.message);
202626
202402
  throw error49;
202627
202403
  }
202628
- const poll = op(pollPrEvents, {
202404
+ const poll = query({
202405
+ run: (input2) => pollPrEvents(input2),
202629
202406
  name: "pr-events poll",
202630
- retries: [1e3, 2e3, 5e3, 1e4, 15e3],
202631
- rethrow: isTerminal2
202407
+ retry: (error49, attempt) => isTerminal2(error49) ? -1 : delay2([1e3, 2e3, 5e3, 1e4, 15e3], attempt)
202632
202408
  });
202633
202409
  for (; ; ) {
202634
202410
  try {
@@ -202646,7 +202422,7 @@ async function runCli8(input) {
202646
202422
  }
202647
202423
 
202648
202424
  // cli.ts
202649
- var VERSION10 = "0.1.94";
202425
+ var VERSION10 = "0.1.96";
202650
202426
  var bin = basename2(process.argv[1] || "");
202651
202427
  var PROG = bin === "pf" || bin === "pullfrog" ? bin : "pullfrog";
202652
202428
  var rawArgs = process.argv.slice(2);