pullfrog 0.1.94 → 0.1.95

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
@@ -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 {
@@ -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 {
@@ -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;
@@ -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) {
@@ -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.95",
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.1.0",
107411
107033
  zod: "4.3.6"
107412
107034
  },
107413
107035
  repository: {
@@ -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: {
@@ -138273,21 +137906,21 @@ var require_fast_uri2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
138273
137906
  const { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils6();
138274
137907
  const { SCHEMES, getSchemeHandler } = require_schemes2();
138275
137908
  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);
137909
+ if (typeof uri === "string") uri = serialize2(parse6(uri, options), options);
137910
+ else if (typeof uri === "object") uri = parse6(serialize2(uri, options), options);
138278
137911
  return uri;
138279
137912
  }
138280
137913
  function resolve3(baseURI, relativeURI, options) {
138281
137914
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
138282
137915
  const resolved = resolveComponent(parse6(baseURI, schemelessOptions), parse6(relativeURI, schemelessOptions), schemelessOptions, true);
138283
137916
  schemelessOptions.skipEscape = true;
138284
- return serialize(resolved, schemelessOptions);
137917
+ return serialize2(resolved, schemelessOptions);
138285
137918
  }
138286
137919
  function resolveComponent(base, relative, options, skipNormalization) {
138287
137920
  const target = {};
138288
137921
  if (!skipNormalization) {
138289
- base = parse6(serialize(base, options), options);
138290
- relative = parse6(serialize(relative, options), options);
137922
+ base = parse6(serialize2(base, options), options);
137923
+ relative = parse6(serialize2(relative, options), options);
138291
137924
  }
138292
137925
  options = options || {};
138293
137926
  if (!options.tolerant && relative.scheme) {
@@ -138331,27 +137964,27 @@ var require_fast_uri2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
138331
137964
  function equal(uriA, uriB, options) {
138332
137965
  if (typeof uriA === "string") {
138333
137966
  uriA = unescape(uriA);
138334
- uriA = serialize(normalizeComponentEncoding(parse6(uriA, options), true), {
137967
+ uriA = serialize2(normalizeComponentEncoding(parse6(uriA, options), true), {
138335
137968
  ...options,
138336
137969
  skipEscape: true
138337
137970
  });
138338
- } else if (typeof uriA === "object") uriA = serialize(normalizeComponentEncoding(uriA, true), {
137971
+ } else if (typeof uriA === "object") uriA = serialize2(normalizeComponentEncoding(uriA, true), {
138339
137972
  ...options,
138340
137973
  skipEscape: true
138341
137974
  });
138342
137975
  if (typeof uriB === "string") {
138343
137976
  uriB = unescape(uriB);
138344
- uriB = serialize(normalizeComponentEncoding(parse6(uriB, options), true), {
137977
+ uriB = serialize2(normalizeComponentEncoding(parse6(uriB, options), true), {
138345
137978
  ...options,
138346
137979
  skipEscape: true
138347
137980
  });
138348
- } else if (typeof uriB === "object") uriB = serialize(normalizeComponentEncoding(uriB, true), {
137981
+ } else if (typeof uriB === "object") uriB = serialize2(normalizeComponentEncoding(uriB, true), {
138349
137982
  ...options,
138350
137983
  skipEscape: true
138351
137984
  });
138352
137985
  return uriA.toLowerCase() === uriB.toLowerCase();
138353
137986
  }
138354
- function serialize(cmpts, opts) {
137987
+ function serialize2(cmpts, opts) {
138355
137988
  const component = {
138356
137989
  host: cmpts.host,
138357
137990
  scheme: cmpts.scheme,
@@ -138454,7 +138087,7 @@ var require_fast_uri2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
138454
138087
  resolve: resolve3,
138455
138088
  resolveComponent,
138456
138089
  equal,
138457
- serialize,
138090
+ serialize: serialize2,
138458
138091
  parse: parse6
138459
138092
  };
138460
138093
  module.exports = fastUri;
@@ -152558,21 +152191,21 @@ var require_fast_uri3 = /* @__PURE__ */ __commonJSMin2(((exports, module) => {
152558
152191
  const { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils7();
152559
152192
  const { SCHEMES, getSchemeHandler } = require_schemes3();
152560
152193
  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);
152194
+ if (typeof uri === "string") uri = serialize2(parse6(uri, options), options);
152195
+ else if (typeof uri === "object") uri = parse6(serialize2(uri, options), options);
152563
152196
  return uri;
152564
152197
  }
152565
152198
  function resolve3(baseURI, relativeURI, options) {
152566
152199
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
152567
152200
  const resolved = resolveComponent(parse6(baseURI, schemelessOptions), parse6(relativeURI, schemelessOptions), schemelessOptions, true);
152568
152201
  schemelessOptions.skipEscape = true;
152569
- return serialize(resolved, schemelessOptions);
152202
+ return serialize2(resolved, schemelessOptions);
152570
152203
  }
152571
152204
  function resolveComponent(base, relative, options, skipNormalization) {
152572
152205
  const target = {};
152573
152206
  if (!skipNormalization) {
152574
- base = parse6(serialize(base, options), options);
152575
- relative = parse6(serialize(relative, options), options);
152207
+ base = parse6(serialize2(base, options), options);
152208
+ relative = parse6(serialize2(relative, options), options);
152576
152209
  }
152577
152210
  options = options || {};
152578
152211
  if (!options.tolerant && relative.scheme) {
@@ -152616,27 +152249,27 @@ var require_fast_uri3 = /* @__PURE__ */ __commonJSMin2(((exports, module) => {
152616
152249
  function equal(uriA, uriB, options) {
152617
152250
  if (typeof uriA === "string") {
152618
152251
  uriA = unescape(uriA);
152619
- uriA = serialize(normalizeComponentEncoding(parse6(uriA, options), true), {
152252
+ uriA = serialize2(normalizeComponentEncoding(parse6(uriA, options), true), {
152620
152253
  ...options,
152621
152254
  skipEscape: true
152622
152255
  });
152623
- } else if (typeof uriA === "object") uriA = serialize(normalizeComponentEncoding(uriA, true), {
152256
+ } else if (typeof uriA === "object") uriA = serialize2(normalizeComponentEncoding(uriA, true), {
152624
152257
  ...options,
152625
152258
  skipEscape: true
152626
152259
  });
152627
152260
  if (typeof uriB === "string") {
152628
152261
  uriB = unescape(uriB);
152629
- uriB = serialize(normalizeComponentEncoding(parse6(uriB, options), true), {
152262
+ uriB = serialize2(normalizeComponentEncoding(parse6(uriB, options), true), {
152630
152263
  ...options,
152631
152264
  skipEscape: true
152632
152265
  });
152633
- } else if (typeof uriB === "object") uriB = serialize(normalizeComponentEncoding(uriB, true), {
152266
+ } else if (typeof uriB === "object") uriB = serialize2(normalizeComponentEncoding(uriB, true), {
152634
152267
  ...options,
152635
152268
  skipEscape: true
152636
152269
  });
152637
152270
  return uriA.toLowerCase() === uriB.toLowerCase();
152638
152271
  }
152639
- function serialize(cmpts, opts) {
152272
+ function serialize2(cmpts, opts) {
152640
152273
  const component = {
152641
152274
  host: cmpts.host,
152642
152275
  scheme: cmpts.scheme,
@@ -152739,7 +152372,7 @@ var require_fast_uri3 = /* @__PURE__ */ __commonJSMin2(((exports, module) => {
152739
152372
  resolve: resolve3,
152740
152373
  resolveComponent,
152741
152374
  equal,
152742
- serialize,
152375
+ serialize: serialize2,
152743
152376
  parse: parse6
152744
152377
  };
152745
152378
  module.exports = fastUri;
@@ -178032,8 +177665,8 @@ var createNode = ({ id, kind, inner, meta: meta3, $: $2, ignoreCache }) => {
178032
177665
  let innerJson = {};
178033
177666
  for (const [k2, v] of innerEntries) {
178034
177667
  const keyImpl = impl.keys[k2];
178035
- const serialize = keyImpl.serialize ?? (keyImpl.child ? serializeListableChild : defaultValueSerializer);
178036
- innerJson[k2] = serialize(v);
177668
+ const serialize2 = keyImpl.serialize ?? (keyImpl.child ? serializeListableChild : defaultValueSerializer);
177669
+ innerJson[k2] = serialize2(v);
178037
177670
  if (keyImpl.child === true) {
178038
177671
  const listableNode = v;
178039
177672
  if (isArray(listableNode))
@@ -183582,10 +183215,22 @@ var schema = ark.schema;
183582
183215
  var define2 = ark.define;
183583
183216
  var declare = ark.declare;
183584
183217
 
183585
- // node_modules/.pnpm/yes@0.0.3/node_modules/yes/dist/index.js
183586
- import { performance as performance8 } from "node:perf_hooks";
183218
+ // node_modules/.pnpm/yes@0.1.0/node_modules/yes/dist/index.js
183587
183219
  import { setTimeout as sleep2 } from "node:timers/promises";
183588
183220
 
183221
+ // node_modules/.pnpm/yes@0.1.0/node_modules/yes/dist/cache/adapter.js
183222
+ var AdapterError = class extends Error {
183223
+ method;
183224
+ /** the full store key, or the op's prefix when the call covered many keys. never the raw input. */
183225
+ key;
183226
+ constructor(method, key, cause) {
183227
+ super(`cache ${method} failed for ${key}: ${cause instanceof Error ? cause.message : String(cause)}`, { cause });
183228
+ this.name = "AdapterError";
183229
+ this.method = method;
183230
+ this.key = key;
183231
+ }
183232
+ };
183233
+
183589
183234
  // node_modules/.pnpm/lru-cache@11.5.3/node_modules/lru-cache/dist/esm/node/index.min.js
183590
183235
  import { tracingChannel as G, channel as P } from "node:diagnostics_channel";
183591
183236
  var S = P("lru-cache:metrics");
@@ -184171,8 +183816,78 @@ var I2 = class d2 {
184171
183816
  }
184172
183817
  };
184173
183818
 
184174
- // node_modules/.pnpm/yes@0.0.3/node_modules/yes/dist/index.js
184175
- var import_object_hash = __toESM(require_object_hash(), 1);
183819
+ // node_modules/.pnpm/yes@0.1.0/node_modules/yes/dist/cache/memory.js
183820
+ function memory(options = {}) {
183821
+ const store = new I2({ max: options.maxItems ?? 1e3 });
183822
+ return {
183823
+ get: (key) => store.get(key),
183824
+ peek: (key) => store.peek(key),
183825
+ // the TTL rides on each entry rather than the whole cache, so ops with
183826
+ // different lifetimes can share one store
183827
+ set: (key, entry, ttlMs) => {
183828
+ store.set(key, entry, { ttl: ttlMs });
183829
+ },
183830
+ delete: (keys) => {
183831
+ for (const key of keys)
183832
+ store.delete(key);
183833
+ },
183834
+ // a snapshot, so deleting while iterating is safe. lru-cache skips expired
183835
+ // entries itself.
183836
+ list: (prefix) => [...store.entries()].filter(([key]) => key.startsWith(prefix))
183837
+ };
183838
+ }
183839
+
183840
+ // node_modules/.pnpm/yes@0.1.0/node_modules/yes/dist/key.js
183841
+ import { hash as hash2 } from "node:crypto";
183842
+ function hashKey(value2) {
183843
+ return hash2("sha1", serialize(value2, 0));
183844
+ }
183845
+ var MAX_DEPTH = 64;
183846
+ function serialize(value2, depth) {
183847
+ switch (typeof value2) {
183848
+ case "string":
183849
+ return JSON.stringify(value2);
183850
+ case "number":
183851
+ if (!Number.isFinite(value2))
183852
+ throw new Error(`${value2} cannot be part of a cache key`);
183853
+ return String(value2);
183854
+ case "boolean":
183855
+ return value2 ? "true" : "false";
183856
+ case "undefined":
183857
+ throw new Error("undefined cannot be part of a cache key, except as an object property");
183858
+ case "object":
183859
+ break;
183860
+ default:
183861
+ throw new Error(`a ${typeof value2} cannot be part of a cache key`);
183862
+ }
183863
+ if (value2 === null)
183864
+ return "null";
183865
+ if (depth === MAX_DEPTH)
183866
+ throw new Error(`an input nested more than ${MAX_DEPTH} levels deep, or circular`);
183867
+ depth++;
183868
+ if (Array.isArray(value2)) {
183869
+ let out2 = "[";
183870
+ for (let i2 = 0; i2 < value2.length; i2++)
183871
+ out2 += `${i2 ? "," : ""}${serialize(value2[i2], depth)}`;
183872
+ return `${out2}]`;
183873
+ }
183874
+ const proto = Object.getPrototypeOf(value2);
183875
+ if (proto !== Object.prototype && proto !== null) {
183876
+ const name = proto.constructor?.name || "class instance";
183877
+ throw new Error(`a ${name} cannot be part of a cache key: only JSON data can`);
183878
+ }
183879
+ const record3 = value2;
183880
+ const keys = Object.keys(record3).sort();
183881
+ let out = "";
183882
+ for (const key of keys) {
183883
+ const v = record3[key];
183884
+ if (v !== void 0)
183885
+ out += `${out ? "," : ""}${JSON.stringify(key)}:${serialize(v, depth)}`;
183886
+ }
183887
+ return `{${out}}`;
183888
+ }
183889
+
183890
+ // node_modules/.pnpm/yes@0.1.0/node_modules/yes/dist/index.js
184176
183891
  var VOID_KEY = "~void";
184177
183892
  function getCacheKeyString(value2) {
184178
183893
  if (value2 === void 0)
@@ -184181,12 +183896,7 @@ function getCacheKeyString(value2) {
184181
183896
  throw new Error("cache key cannot be null");
184182
183897
  }
184183
183898
  try {
184184
- if (typeof value2 === "string")
184185
- return value2;
184186
- return (0, import_object_hash.default)(value2, {
184187
- unorderedObjects: true,
184188
- unorderedArrays: true
184189
- });
183899
+ return hashKey(value2);
184190
183900
  } catch (error49) {
184191
183901
  throw new Error(`cache key cannot be hashed: ${error49 instanceof Error ? error49.message : String(error49)}`);
184192
183902
  }
@@ -184248,15 +183958,21 @@ async function assertSchema(schema2, value2) {
184248
183958
  var log3 = {
184249
183959
  info: (...args2) => console.log(...args2),
184250
183960
  error: (...args2) => console.error(...args2),
184251
- debug: (...args2) => {
184252
- if (process.env.LOG_LEVEL === "debug")
184253
- console.log(...args2);
184254
- },
184255
183961
  prod: (...args2) => {
184256
183962
  if (process.env.NODE_ENV === "production")
184257
183963
  console.log(...args2);
184258
183964
  }
184259
183965
  };
183966
+ function debugTrace(namePrefix, key) {
183967
+ if (process.env.LOG_LEVEL !== "debug")
183968
+ return void 0;
183969
+ const prefix = `${namePrefix}[${(/* @__PURE__ */ new Date()).toISOString()}]`;
183970
+ return {
183971
+ start: performance.now(),
183972
+ log: (message, data) => console.log(`${prefix} ${message}`, { key, ...data }),
183973
+ since: (start) => `${Math.round(performance.now() - start)}ms`
183974
+ };
183975
+ }
184260
183976
  function op(fnOrOptions, options) {
184261
183977
  if (typeof fnOrOptions === "function") {
184262
183978
  return _op(fnOrOptions, options ?? {});
@@ -184264,16 +183980,110 @@ function op(fnOrOptions, options) {
184264
183980
  const { input: inputSchema, output: outputSchema, run: run4, ...opOptions } = fnOrOptions;
184265
183981
  return _op(run4, opOptions, { input: inputSchema, output: outputSchema });
184266
183982
  }
183983
+ var isThenable = (value2) => typeof value2?.then === "function";
183984
+ function freshEntry(value2) {
183985
+ if (value2 === null || typeof value2 !== "object" || !("value" in value2))
183986
+ return void 0;
183987
+ const expires = value2.expires;
183988
+ return typeof expires === "number" && expires > Date.now() ? value2 : void 0;
183989
+ }
183990
+ var adapterMethods = ["get", "set", "delete", "list"];
183991
+ function callAdapter(method, key, run4) {
183992
+ let result;
183993
+ try {
183994
+ result = run4();
183995
+ } catch (error49) {
183996
+ throw new AdapterError(method, key, error49);
183997
+ }
183998
+ if (!isThenable(result))
183999
+ return result;
184000
+ return result.then(void 0, (error49) => {
184001
+ throw new AdapterError(method, key, error49);
184002
+ });
184003
+ }
184004
+ var DELETE_BATCH = 1e3;
184005
+ function sweep(store, prefix, match3) {
184006
+ const now = Date.now();
184007
+ const keys = [];
184008
+ let count = 0;
184009
+ let matchError;
184010
+ const take = ([key, entry]) => {
184011
+ if (!(entry.expires > now))
184012
+ return void keys.push(key);
184013
+ let matched;
184014
+ try {
184015
+ matched = match3(entry.input);
184016
+ } catch (error49) {
184017
+ matchError = { error: error49 };
184018
+ throw error49;
184019
+ }
184020
+ if (matched) {
184021
+ keys.push(key);
184022
+ count++;
184023
+ }
184024
+ };
184025
+ const fail2 = (error49) => {
184026
+ throw matchError ? matchError.error : new AdapterError("list", prefix, error49);
184027
+ };
184028
+ const deleteFrom = (from) => {
184029
+ for (let i2 = from; i2 < keys.length; i2 += DELETE_BATCH) {
184030
+ const batch = keys.slice(i2, i2 + DELETE_BATCH);
184031
+ const deleted = callAdapter("delete", prefix, () => store.delete(batch));
184032
+ if (isThenable(deleted))
184033
+ return Promise.resolve(deleted).then(() => deleteFrom(i2 + DELETE_BATCH));
184034
+ }
184035
+ return count;
184036
+ };
184037
+ let listed;
184038
+ try {
184039
+ listed = store.list(prefix);
184040
+ } catch (error49) {
184041
+ return fail2(error49);
184042
+ }
184043
+ if (!isThenable(listed) && Symbol.iterator in Object(listed)) {
184044
+ try {
184045
+ for (const item of listed)
184046
+ take(item);
184047
+ } catch (error49) {
184048
+ fail2(error49);
184049
+ }
184050
+ return deleteFrom(0);
184051
+ }
184052
+ return (async () => {
184053
+ try {
184054
+ for await (const item of await listed)
184055
+ take(item);
184056
+ } catch (error49) {
184057
+ fail2(error49);
184058
+ }
184059
+ return deleteFrom(0);
184060
+ })();
184061
+ }
184267
184062
  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;
184063
+ const { ttl, cache: adapter } = options;
184064
+ const shouldCache = ttl !== void 0;
184065
+ if (shouldCache && !(ttl > 0 && Number.isFinite(ttl))) {
184066
+ throw new Error(`ttl must be a positive number of milliseconds, got ${ttl}`);
184067
+ }
184068
+ if (adapter) {
184069
+ if (!options.name)
184070
+ throw new Error(`an op with a cache adapter needs a name: its keys are "yes:<name>:<hash>"`);
184071
+ if (options.name.includes(":")) {
184072
+ throw new Error(`op name "${options.name}" cannot contain ":" with a cache adapter: its keys would overlap another op's`);
184073
+ }
184074
+ if (!shouldCache)
184075
+ throw new Error(`${options.name}: a cache adapter does nothing without a ttl`);
184076
+ if (options.maxItems !== void 0) {
184077
+ throw new Error(`${options.name}: maxItems sizes the default memory store; size the adapter instead`);
184078
+ }
184079
+ const missing = adapterMethods.filter((method) => typeof adapter[method] !== "function");
184080
+ if (missing.length) {
184081
+ throw new Error(`${options.name}: cache is missing ${missing.join(", ")}; an adapter has get, set, delete and list (a Map or a Keyv is not one)`);
184082
+ }
184083
+ }
184084
+ const defaultStore = shouldCache && !adapter ? memory({ maxItems: options.maxItems }) : void 0;
184085
+ const store = adapter ?? defaultStore;
184086
+ const prefix = adapter ? `yes:${options.name}:` : "";
184277
184087
  const inFlightPromises = /* @__PURE__ */ new Map();
184278
184088
  const namePrefix = options.name ? `[${options.name}] ` : "";
184279
184089
  const defaultCacheHit = options.cacheHit === null ? () => {
@@ -184286,11 +184096,21 @@ function _op(fn2, options, schemas = {}) {
184286
184096
  if (options.name && shouldCache)
184287
184097
  log3.prod(`${namePrefix}cache miss`);
184288
184098
  });
184289
- const keyInput = (value2) => {
184099
+ const methodKey = (value2, method) => {
184100
+ const toKey = (input) => {
184101
+ try {
184102
+ return prefix + getCacheKeyString(input);
184103
+ } catch (error49) {
184104
+ const errorMessage = error49 instanceof Error ? error49.message : String(error49);
184105
+ throw new Error(`failed to hash cache key for ${method}()${namePrefix ? ` in ${options.name}` : ""}: ${errorMessage}`);
184106
+ }
184107
+ };
184290
184108
  if (!schemas.input)
184291
- return value2;
184109
+ return toKey(value2);
184292
184110
  const result = schemas.input["~standard"].validate(value2);
184293
- return result instanceof Promise || result.issues ? value2 : result.value;
184111
+ if (result instanceof Promise)
184112
+ return result.then((r2) => toKey(r2.issues ? value2 : r2.value));
184113
+ return toKey(result.issues ? value2 : result.value);
184294
184114
  };
184295
184115
  const cachedFn = async (rawInput, ctx) => {
184296
184116
  const input = schemas.input ? await assertSchema(schemas.input, rawInput) : rawInput;
@@ -184301,54 +184121,57 @@ function _op(fn2, options, schemas = {}) {
184301
184121
  const errorMessage = error49 instanceof Error ? error49.message : String(error49);
184302
184122
  throw new Error(`failed to create cache key${namePrefix ? ` for ${options.name}` : ""}: ${errorMessage}`);
184303
184123
  }
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
- }
184124
+ const trace = debugTrace(namePrefix, key);
184125
+ trace?.log("cache lookup started");
184321
184126
  const inFlight = inFlightPromises.get(key);
184322
184127
  if (inFlight) {
184323
- log3.debug(`${namePrefix}[${timestamp}] cache hit (in-flight)`, { key });
184128
+ trace?.log("cache hit (in-flight)");
184324
184129
  defaultCacheHit(key);
184325
184130
  return inFlight;
184326
184131
  }
184327
- log3.debug(`${namePrefix}[${timestamp}] cache miss, executing function`, {
184328
- key
184329
- });
184330
- defaultCacheMiss(key);
184132
+ const fullKey = store ? prefix + key : "";
184133
+ let pendingRead;
184134
+ if (store) {
184135
+ let read2;
184136
+ try {
184137
+ read2 = store.get(fullKey);
184138
+ } catch (error49) {
184139
+ throw new AdapterError("get", fullKey, error49);
184140
+ }
184141
+ if (isThenable(read2)) {
184142
+ pendingRead = read2.then(void 0, (error49) => {
184143
+ throw new AdapterError("get", fullKey, error49);
184144
+ });
184145
+ } else {
184146
+ const entry = store === defaultStore ? read2 : freshEntry(read2);
184147
+ if (entry) {
184148
+ trace?.log("cache hit (from store)", { runtime: trace.since(trace.start) });
184149
+ defaultCacheHit(key);
184150
+ return entry.value;
184151
+ }
184152
+ }
184153
+ }
184331
184154
  const retries = options.retries ?? [];
184332
- let lastError;
184333
- const execStartTime = performance8.now();
184155
+ const execStart = trace ? performance.now() : 0;
184334
184156
  const promise2 = (async () => {
184335
- for (let attempt = 0; attempt <= retries.length; attempt++) {
184157
+ if (pendingRead) {
184158
+ const entry = freshEntry(await pendingRead);
184159
+ if (entry) {
184160
+ trace?.log("cache hit (from store)", { runtime: trace.since(trace.start) });
184161
+ defaultCacheHit(key);
184162
+ return entry.value;
184163
+ }
184164
+ }
184165
+ trace?.log("cache miss, executing function");
184166
+ defaultCacheMiss(key);
184167
+ let result;
184168
+ let lastError;
184169
+ let attempt = 0;
184170
+ for (; attempt <= retries.length; attempt++) {
184336
184171
  try {
184337
184172
  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;
184173
+ result = schemas.output ? await assertSchema(schemas.output, returned) : returned;
184174
+ break;
184352
184175
  } catch (error49) {
184353
184176
  if (error49 instanceof ValidationError || options.rethrow?.(error49))
184354
184177
  throw error49;
@@ -184384,14 +184207,31 @@ function _op(fn2, options, schemas = {}) {
184384
184207
  }
184385
184208
  }
184386
184209
  }
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;
184210
+ if (attempt > retries.length) {
184211
+ trace?.log("function failed after all retries", {
184212
+ runtime: trace.since(execStart),
184213
+ attempts: retries.length + 1,
184214
+ error: lastError instanceof Error ? lastError.message : lastError
184215
+ });
184216
+ throw lastError;
184217
+ }
184218
+ const skip = options.skipCache ? options.skipCache(result) : false;
184219
+ const storable = store !== void 0 && result !== null && result !== void 0 && !(result instanceof Error) && !skip;
184220
+ let cached4 = false;
184221
+ if (storable) {
184222
+ const created = Date.now();
184223
+ const entry = { value: result, created, expires: created + ttl, input };
184224
+ try {
184225
+ const written = callAdapter("set", fullKey, () => store.set(fullKey, entry, ttl));
184226
+ if (isThenable(written))
184227
+ await written;
184228
+ cached4 = true;
184229
+ } catch (error49) {
184230
+ log3.error(`${namePrefix}cache write failed, returning the result uncached`, error49);
184231
+ }
184232
+ }
184233
+ trace?.log("function executed successfully", { runtime: trace.since(execStart), attempt: attempt + 1, cached: cached4 });
184234
+ return result;
184395
184235
  })();
184396
184236
  inFlightPromises.set(key, promise2);
184397
184237
  try {
@@ -184400,47 +184240,35 @@ function _op(fn2, options, schemas = {}) {
184400
184240
  inFlightPromises.delete(key);
184401
184241
  }
184402
184242
  };
184403
- cachedFn.clear = (key) => {
184404
- if (shouldCache && lruCache) {
184405
- if (key !== void 0) {
184406
- let stringKey;
184407
- try {
184408
- stringKey = getCacheKeyString(keyInput(key));
184409
- } 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}`);
184412
- }
184413
- lruCache.delete(stringKey);
184414
- keyMap.delete(stringKey);
184415
- } else {
184416
- lruCache.clear();
184417
- keyMap.clear();
184418
- }
184243
+ cachedFn.clear = async (key) => {
184244
+ if (!store)
184245
+ return;
184246
+ if (key === void 0) {
184247
+ await sweep(store, prefix, () => true);
184248
+ return;
184419
184249
  }
184250
+ let fullKey = methodKey(key, "clear");
184251
+ if (typeof fullKey !== "string")
184252
+ fullKey = await fullKey;
184253
+ const target = fullKey;
184254
+ await callAdapter("delete", target, () => store.delete([target]));
184420
184255
  };
184421
- cachedFn.has = (key) => {
184422
- if (!shouldCache || !lruCache)
184256
+ cachedFn.has = async (key) => {
184257
+ if (!store)
184423
184258
  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
- }
184259
+ let fullKey = methodKey(key, "has");
184260
+ if (typeof fullKey !== "string")
184261
+ fullKey = await fullKey;
184262
+ const target = fullKey;
184263
+ const memoryStore = store;
184264
+ const read2 = callAdapter("get", target, () => memoryStore.peek ? memoryStore.peek(target) : store.get(target));
184265
+ return freshEntry(await read2) !== void 0;
184431
184266
  };
184432
184267
  cachedFn.invalidate = (predicate) => {
184433
- if (!shouldCache || !lruCache)
184434
- return 0;
184435
- let count = 0;
184436
- for (const [stringKey, originalKey] of keyMap) {
184437
- if (predicate(originalKey)) {
184438
- lruCache.delete(stringKey);
184439
- keyMap.delete(stringKey);
184440
- count++;
184441
- }
184442
- }
184443
- return count;
184268
+ if (!store)
184269
+ return Promise.resolve(0);
184270
+ const count = sweep(store, prefix, predicate);
184271
+ return typeof count === "number" ? Promise.resolve(count) : count;
184444
184272
  };
184445
184273
  return cachedFn;
184446
184274
  }
@@ -194677,7 +194505,7 @@ function ReopenCurrentTool(ctx) {
194677
194505
  }
194678
194506
 
194679
194507
  // prep/index.ts
194680
- import { performance as performance9 } from "node:perf_hooks";
194508
+ import { performance as performance8 } from "node:perf_hooks";
194681
194509
 
194682
194510
  // prep/installNodeDependencies.ts
194683
194511
  import { existsSync as existsSync10 } from "node:fs";
@@ -195136,7 +194964,7 @@ var installPythonDependencies = {
195136
194964
  var prepSteps = [installNodeDependencies, installPythonDependencies];
195137
194965
  async function runPrepPhase(options) {
195138
194966
  log2.debug("\xBB starting prep phase...");
195139
- const startTime = performance9.now();
194967
+ const startTime = performance8.now();
195140
194968
  const results = [];
195141
194969
  const preDirty = await dirtyTrackedPaths();
195142
194970
  try {
@@ -195158,7 +194986,7 @@ async function runPrepPhase(options) {
195158
194986
  } finally {
195159
194987
  await restoreDirtiedSince({ before: preDirty, actor: "prep" });
195160
194988
  }
195161
- const totalDurationMs = performance9.now() - startTime;
194989
+ const totalDurationMs = performance8.now() - startTime;
195162
194990
  log2.debug(`\xBB prep phase completed (${Math.round(totalDurationMs)}ms)`);
195163
194991
  return results;
195164
194992
  }
@@ -202479,7 +202307,7 @@ function resolveTarget2(repo) {
202479
202307
  return { owner: match3[1], repo: match3[2] };
202480
202308
  }
202481
202309
  function cliVersion() {
202482
- const parts = /^(\d+)\.(\d+)\.(\d+)$/.exec("0.1.94");
202310
+ const parts = /^(\d+)\.(\d+)\.(\d+)$/.exec("0.1.95");
202483
202311
  if (!parts) return "0.0.0";
202484
202312
  return `${Number(parts[1])}.${Number(parts[2])}.${Number(parts[3])}`;
202485
202313
  }
@@ -202646,7 +202474,7 @@ async function runCli8(input) {
202646
202474
  }
202647
202475
 
202648
202476
  // cli.ts
202649
- var VERSION10 = "0.1.94";
202477
+ var VERSION10 = "0.1.95";
202650
202478
  var bin = basename2(process.argv[1] || "");
202651
202479
  var PROG = bin === "pf" || bin === "pullfrog" ? bin : "pullfrog";
202652
202480
  var rawArgs = process.argv.slice(2);