pullfrog 0.1.84 → 0.1.85

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
@@ -96,7 +96,7 @@ var require_arg = __commonJS({
96
96
  Object.setPrototypeOf(this, _ArgError.prototype);
97
97
  }
98
98
  };
99
- function arg9(opts, {
99
+ function arg10(opts, {
100
100
  argv = process.argv.slice(2),
101
101
  permissive = false,
102
102
  stopAtPositional = false
@@ -171,15 +171,15 @@ var require_arg = __commonJS({
171
171
  if (wholeArg.length > 1 && wholeArg[0] === "-") {
172
172
  const separatedArguments = wholeArg[1] === "-" || wholeArg.length === 2 ? [wholeArg] : wholeArg.slice(1).split("").map((a2) => `-${a2}`);
173
173
  for (let j2 = 0; j2 < separatedArguments.length; j2++) {
174
- const arg10 = separatedArguments[j2];
175
- const [originalArgName, argStr] = arg10[1] === "-" ? arg10.split(/=(.*)/, 2) : [arg10, void 0];
174
+ const arg11 = separatedArguments[j2];
175
+ const [originalArgName, argStr] = arg11[1] === "-" ? arg11.split(/=(.*)/, 2) : [arg11, void 0];
176
176
  let argName = originalArgName;
177
177
  while (argName in aliases) {
178
178
  argName = aliases[argName];
179
179
  }
180
180
  if (!(argName in handlers2)) {
181
181
  if (permissive) {
182
- result._.push(arg10);
182
+ result._.push(arg11);
183
183
  continue;
184
184
  } else {
185
185
  throw new ArgError(
@@ -218,13 +218,13 @@ var require_arg = __commonJS({
218
218
  }
219
219
  return result;
220
220
  }
221
- arg9.flag = (fn2) => {
221
+ arg10.flag = (fn2) => {
222
222
  fn2[flagSymbol] = true;
223
223
  return fn2;
224
224
  };
225
- arg9.COUNT = arg9.flag((v, name, existingCount) => (existingCount || 0) + 1);
226
- arg9.ArgError = ArgError;
227
- module.exports = arg9;
225
+ arg10.COUNT = arg10.flag((v, name, existingCount) => (existingCount || 0) + 1);
226
+ arg10.ArgError = ArgError;
227
+ module.exports = arg10;
228
228
  }
229
229
  });
230
230
 
@@ -2094,13 +2094,13 @@ var init_doc = __esm({
2094
2094
  fn2(this);
2095
2095
  this.indent -= 1;
2096
2096
  }
2097
- write(arg9) {
2098
- if (typeof arg9 === "function") {
2099
- arg9(this, { execution: "sync" });
2100
- arg9(this, { execution: "async" });
2097
+ write(arg10) {
2098
+ if (typeof arg10 === "function") {
2099
+ arg10(this, { execution: "sync" });
2100
+ arg10(this, { execution: "async" });
2101
2101
  return;
2102
2102
  }
2103
- const content = arg9;
2103
+ const content = arg10;
2104
2104
  const lines = content.split("\n").filter((x2) => x2);
2105
2105
  const minIndent = Math.min(...lines.map((x2) => x2.length - x2.trimStart().length));
2106
2106
  const dedented = lines.map((x2) => x2.slice(minIndent)).map((x2) => " ".repeat(this.indent * 2) + x2);
@@ -31439,11 +31439,11 @@ var require_toolrunner = __commonJS({
31439
31439
  const upperToolPath = this.toolPath.toUpperCase();
31440
31440
  return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT");
31441
31441
  }
31442
- _windowsQuoteCmdArg(arg9) {
31442
+ _windowsQuoteCmdArg(arg10) {
31443
31443
  if (!this._isCmdFile()) {
31444
- return this._uvQuoteCmdArg(arg9);
31444
+ return this._uvQuoteCmdArg(arg10);
31445
31445
  }
31446
- if (!arg9) {
31446
+ if (!arg10) {
31447
31447
  return '""';
31448
31448
  }
31449
31449
  const cmdSpecialChars = [
@@ -31471,22 +31471,22 @@ var require_toolrunner = __commonJS({
31471
31471
  '"'
31472
31472
  ];
31473
31473
  let needsQuotes = false;
31474
- for (const char of arg9) {
31474
+ for (const char of arg10) {
31475
31475
  if (cmdSpecialChars.some((x2) => x2 === char)) {
31476
31476
  needsQuotes = true;
31477
31477
  break;
31478
31478
  }
31479
31479
  }
31480
31480
  if (!needsQuotes) {
31481
- return arg9;
31481
+ return arg10;
31482
31482
  }
31483
31483
  let reverse = '"';
31484
31484
  let quoteHit = true;
31485
- for (let i2 = arg9.length; i2 > 0; i2--) {
31486
- reverse += arg9[i2 - 1];
31487
- if (quoteHit && arg9[i2 - 1] === "\\") {
31485
+ for (let i2 = arg10.length; i2 > 0; i2--) {
31486
+ reverse += arg10[i2 - 1];
31487
+ if (quoteHit && arg10[i2 - 1] === "\\") {
31488
31488
  reverse += "\\";
31489
- } else if (arg9[i2 - 1] === '"') {
31489
+ } else if (arg10[i2 - 1] === '"') {
31490
31490
  quoteHit = true;
31491
31491
  reverse += '"';
31492
31492
  } else {
@@ -31496,23 +31496,23 @@ var require_toolrunner = __commonJS({
31496
31496
  reverse += '"';
31497
31497
  return reverse.split("").reverse().join("");
31498
31498
  }
31499
- _uvQuoteCmdArg(arg9) {
31500
- if (!arg9) {
31499
+ _uvQuoteCmdArg(arg10) {
31500
+ if (!arg10) {
31501
31501
  return '""';
31502
31502
  }
31503
- if (!arg9.includes(" ") && !arg9.includes(" ") && !arg9.includes('"')) {
31504
- return arg9;
31503
+ if (!arg10.includes(" ") && !arg10.includes(" ") && !arg10.includes('"')) {
31504
+ return arg10;
31505
31505
  }
31506
- if (!arg9.includes('"') && !arg9.includes("\\")) {
31507
- return `"${arg9}"`;
31506
+ if (!arg10.includes('"') && !arg10.includes("\\")) {
31507
+ return `"${arg10}"`;
31508
31508
  }
31509
31509
  let reverse = '"';
31510
31510
  let quoteHit = true;
31511
- for (let i2 = arg9.length; i2 > 0; i2--) {
31512
- reverse += arg9[i2 - 1];
31513
- if (quoteHit && arg9[i2 - 1] === "\\") {
31511
+ for (let i2 = arg10.length; i2 > 0; i2--) {
31512
+ reverse += arg10[i2 - 1];
31513
+ if (quoteHit && arg10[i2 - 1] === "\\") {
31514
31514
  reverse += "\\";
31515
- } else if (arg9[i2 - 1] === '"') {
31515
+ } else if (arg10[i2 - 1] === '"') {
31516
31516
  quoteHit = true;
31517
31517
  reverse += "\\";
31518
31518
  } else {
@@ -31566,8 +31566,8 @@ var require_toolrunner = __commonJS({
31566
31566
  return new Promise((resolve3, reject) => __awaiter(this, void 0, void 0, function* () {
31567
31567
  this._debug(`exec tool: ${this.toolPath}`);
31568
31568
  this._debug("arguments:");
31569
- for (const arg9 of this.args) {
31570
- this._debug(` ${arg9}`);
31569
+ for (const arg10 of this.args) {
31570
+ this._debug(` ${arg10}`);
31571
31571
  }
31572
31572
  const optionsNonNull = this._cloneExecOptions(this.options);
31573
31573
  if (!optionsNonNull.silent && optionsNonNull.outStream) {
@@ -31664,12 +31664,12 @@ var require_toolrunner = __commonJS({
31664
31664
  const args2 = [];
31665
31665
  let inQuotes = false;
31666
31666
  let escaped = false;
31667
- let arg9 = "";
31667
+ let arg10 = "";
31668
31668
  function append2(c2) {
31669
31669
  if (escaped && c2 !== '"') {
31670
- arg9 += "\\";
31670
+ arg10 += "\\";
31671
31671
  }
31672
- arg9 += c2;
31672
+ arg10 += c2;
31673
31673
  escaped = false;
31674
31674
  }
31675
31675
  for (let i2 = 0; i2 < argString.length; i2++) {
@@ -31691,16 +31691,16 @@ var require_toolrunner = __commonJS({
31691
31691
  continue;
31692
31692
  }
31693
31693
  if (c2 === " " && !inQuotes) {
31694
- if (arg9.length > 0) {
31695
- args2.push(arg9);
31696
- arg9 = "";
31694
+ if (arg10.length > 0) {
31695
+ args2.push(arg10);
31696
+ arg10 = "";
31697
31697
  }
31698
31698
  continue;
31699
31699
  }
31700
31700
  append2(c2);
31701
31701
  }
31702
- if (arg9.length > 0) {
31703
- args2.push(arg9.trim());
31702
+ if (arg10.length > 0) {
31703
+ args2.push(arg10.trim());
31704
31704
  }
31705
31705
  return args2;
31706
31706
  }
@@ -40191,20 +40191,20 @@ var require_escape = __commonJS({
40191
40191
  "node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports, module) {
40192
40192
  "use strict";
40193
40193
  var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
40194
- function escapeCommand(arg9) {
40195
- arg9 = arg9.replace(metaCharsRegExp, "^$1");
40196
- return arg9;
40197
- }
40198
- function escapeArgument(arg9, doubleEscapeMetaChars) {
40199
- arg9 = `${arg9}`;
40200
- arg9 = arg9.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
40201
- arg9 = arg9.replace(/(?=(\\+?)?)\1$/, "$1$1");
40202
- arg9 = `"${arg9}"`;
40203
- arg9 = arg9.replace(metaCharsRegExp, "^$1");
40194
+ function escapeCommand(arg10) {
40195
+ arg10 = arg10.replace(metaCharsRegExp, "^$1");
40196
+ return arg10;
40197
+ }
40198
+ function escapeArgument(arg10, doubleEscapeMetaChars) {
40199
+ arg10 = `${arg10}`;
40200
+ arg10 = arg10.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
40201
+ arg10 = arg10.replace(/(?=(\\+?)?)\1$/, "$1$1");
40202
+ arg10 = `"${arg10}"`;
40203
+ arg10 = arg10.replace(metaCharsRegExp, "^$1");
40204
40204
  if (doubleEscapeMetaChars) {
40205
- arg9 = arg9.replace(metaCharsRegExp, "^$1");
40205
+ arg10 = arg10.replace(metaCharsRegExp, "^$1");
40206
40206
  }
40207
- return arg9;
40207
+ return arg10;
40208
40208
  }
40209
40209
  module.exports.command = escapeCommand;
40210
40210
  module.exports.argument = escapeArgument;
@@ -40292,7 +40292,7 @@ var require_parse3 = __commonJS({
40292
40292
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
40293
40293
  parsed2.command = path4.normalize(parsed2.command);
40294
40294
  parsed2.command = escape2.command(parsed2.command);
40295
- parsed2.args = parsed2.args.map((arg9) => escape2.argument(arg9, needsDoubleEscapeMetaChars));
40295
+ parsed2.args = parsed2.args.map((arg10) => escape2.argument(arg10, needsDoubleEscapeMetaChars));
40296
40296
  const shellCommand = [parsed2.command].concat(parsed2.args).join(" ");
40297
40297
  parsed2.args = ["/d", "/s", "/c", `"${shellCommand}"`];
40298
40298
  parsed2.command = process.env.comspec || "cmd.exe";
@@ -40581,10 +40581,10 @@ var require_timers2 = __commonJS({
40581
40581
  * before the specified function or code is executed.
40582
40582
  * @param {*} arg
40583
40583
  */
40584
- constructor(callback, delay2, arg9) {
40584
+ constructor(callback, delay2, arg10) {
40585
40585
  this._onTimeout = callback;
40586
40586
  this._idleTimeout = delay2;
40587
- this._timerArg = arg9;
40587
+ this._timerArg = arg10;
40588
40588
  this.refresh();
40589
40589
  }
40590
40590
  /**
@@ -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, arg9) {
40632
- return delay2 <= RESOLUTION_MS ? setTimeout(callback, delay2, arg9) : new FastTimer(callback, delay2, arg9);
40631
+ setTimeout(callback, delay2, arg10) {
40632
+ return delay2 <= RESOLUTION_MS ? setTimeout(callback, delay2, arg10) : new FastTimer(callback, delay2, 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, arg9) {
40659
- return new FastTimer(callback, delay2, arg9);
40658
+ setFastTimeout(callback, delay2, arg10) {
40659
+ return new FastTimer(callback, delay2, arg10);
40660
40660
  },
40661
40661
  /**
40662
40662
  * The clearTimeout method cancels an instantiated FastTimer previously
@@ -69742,9 +69742,9 @@ var init_types = __esm({
69742
69742
  const { status, ctx } = this._processInputParams(input);
69743
69743
  const effect = this._def.effect || null;
69744
69744
  const checkCtx = {
69745
- addIssue: (arg9) => {
69746
- addIssueToContext(ctx, arg9);
69747
- if (arg9.fatal) {
69745
+ addIssue: (arg10) => {
69746
+ addIssueToContext(ctx, arg10);
69747
+ if (arg10.fatal) {
69748
69748
  status.abort();
69749
69749
  } else {
69750
69750
  status.dirty();
@@ -71911,13 +71911,13 @@ var require_code = __commonJS({
71911
71911
  return new _Code(expr);
71912
71912
  }
71913
71913
  exports.str = str;
71914
- function addCodeArg(code, arg9) {
71915
- if (arg9 instanceof _Code)
71916
- code.push(...arg9._items);
71917
- else if (arg9 instanceof Name)
71918
- code.push(arg9);
71914
+ function addCodeArg(code, arg10) {
71915
+ if (arg10 instanceof _Code)
71916
+ code.push(...arg10._items);
71917
+ else if (arg10 instanceof Name)
71918
+ code.push(arg10);
71919
71919
  else
71920
- code.push(interpolate(arg9));
71920
+ code.push(interpolate(arg10));
71921
71921
  }
71922
71922
  exports.addCodeArg = addCodeArg;
71923
71923
  function optimize(expr) {
@@ -83548,8 +83548,8 @@ var require_select = __commonJS({
83548
83548
  return selectors[":is"](sel);
83549
83549
  },
83550
83550
  ":nth-match": function(param, last) {
83551
- var args2 = param.split(/\s*,\s*/), arg9 = args2.shift(), test = compileGroup(args2.join(","));
83552
- return nth(arg9, test, last);
83551
+ var args2 = param.split(/\s*,\s*/), arg10 = args2.shift(), test = compileGroup(args2.join(","));
83552
+ return nth(arg10, test, last);
83553
83553
  },
83554
83554
  ":nth-last-match": function(param) {
83555
83555
  return selectors[":nth-match"](param, true);
@@ -84177,7 +84177,7 @@ var require_Element = __commonJS({
84177
84177
  var FilteredElementList = require_FilteredElementList();
84178
84178
  var DOMException2 = require_DOMException();
84179
84179
  var DOMTokenList = require_DOMTokenList();
84180
- var select2 = require_select();
84180
+ var select3 = require_select();
84181
84181
  var ContainerNode = require_ContainerNode();
84182
84182
  var ChildNode = require_ChildNode();
84183
84183
  var NonDocumentTypeChildNode = require_NonDocumentTypeChildNode();
@@ -84938,7 +84938,7 @@ var require_Element = __commonJS({
84938
84938
  this.className = v;
84939
84939
  } },
84940
84940
  matches: { value: function(selector) {
84941
- return select2.matches(this, selector);
84941
+ return select3.matches(this, selector);
84942
84942
  } },
84943
84943
  closest: { value: function(selector) {
84944
84944
  var el = this;
@@ -84951,10 +84951,10 @@ var require_Element = __commonJS({
84951
84951
  return null;
84952
84952
  } },
84953
84953
  querySelector: { value: function(selector) {
84954
- return select2(selector, this)[0];
84954
+ return select3(selector, this)[0];
84955
84955
  } },
84956
84956
  querySelectorAll: { value: function(selector) {
84957
- var nodes = select2(selector, this);
84957
+ var nodes = select3(selector, this);
84958
84958
  return nodes.item ? nodes : new NodeList(nodes);
84959
84959
  } }
84960
84960
  });
@@ -85482,7 +85482,7 @@ var require_DocumentFragment = __commonJS({
85482
85482
  var NodeList = require_NodeList();
85483
85483
  var ContainerNode = require_ContainerNode();
85484
85484
  var Element = require_Element();
85485
- var select2 = require_select();
85485
+ var select3 = require_select();
85486
85486
  var utils = require_utils8();
85487
85487
  function DocumentFragment(doc) {
85488
85488
  ContainerNode.call(this);
@@ -85511,7 +85511,7 @@ var require_DocumentFragment = __commonJS({
85511
85511
  context.isHTML = true;
85512
85512
  context.getElementsByTagName = Element.prototype.getElementsByTagName;
85513
85513
  context.nextElement = Object.getOwnPropertyDescriptor(Element.prototype, "firstElementChild").get;
85514
- var nodes = select2(selector, context);
85514
+ var nodes = select3(selector, context);
85515
85515
  return nodes.item ? nodes : new NodeList(nodes);
85516
85516
  } },
85517
85517
  // Utility methods
@@ -88626,7 +88626,7 @@ var require_Document = __commonJS({
88626
88626
  var NodeIterator = require_NodeIterator();
88627
88627
  var NodeFilter = require_NodeFilter();
88628
88628
  var URL2 = require_URL();
88629
- var select2 = require_select();
88629
+ var select3 = require_select();
88630
88630
  var events = require_events3();
88631
88631
  var xml = require_xmlnames();
88632
88632
  var html = require_htmlelts();
@@ -89187,10 +89187,10 @@ var require_Document = __commonJS({
89187
89187
  return this._templateDocCache;
89188
89188
  } },
89189
89189
  querySelector: { value: function(selector) {
89190
- return select2(selector, this)[0];
89190
+ return select3(selector, this)[0];
89191
89191
  } },
89192
89192
  querySelectorAll: { value: function(selector) {
89193
- var nodes = select2(selector, this);
89193
+ var nodes = select3(selector, this);
89194
89194
  return nodes.item ? nodes : new NodeList(nodes);
89195
89195
  } }
89196
89196
  });
@@ -103311,7 +103311,7 @@ var init_file_type = __esm({
103311
103311
  });
103312
103312
 
103313
103313
  // cli.ts
103314
- var import_arg8 = __toESM(require_arg(), 1);
103314
+ var import_arg9 = __toESM(require_arg(), 1);
103315
103315
  var import_picocolors5 = __toESM(require_picocolors(), 1);
103316
103316
  import { basename as basename2 } from "node:path";
103317
103317
 
@@ -104498,7 +104498,7 @@ ${f}
104498
104498
  var i = `${styleText2("gray", S_BAR)} `;
104499
104499
 
104500
104500
  // commands/auth.ts
104501
- var import_arg2 = __toESM(require_arg(), 1);
104501
+ var import_arg3 = __toESM(require_arg(), 1);
104502
104502
  var import_picocolors2 = __toESM(require_picocolors(), 1);
104503
104503
 
104504
104504
  // utils/codexAuth.ts
@@ -105528,8 +105528,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
105528
105528
  inst.nullish = () => optional(nullable(inst));
105529
105529
  inst.nonoptional = (params) => nonoptional(inst, params);
105530
105530
  inst.array = () => array(inst);
105531
- inst.or = (arg9) => union([inst, arg9]);
105532
- inst.and = (arg9) => intersection(inst, arg9);
105531
+ inst.or = (arg10) => union([inst, arg10]);
105532
+ inst.and = (arg10) => intersection(inst, arg10);
105533
105533
  inst.transform = (tx) => pipe(inst, transform(tx));
105534
105534
  inst.default = (def2) => _default2(inst, def2);
105535
105535
  inst.prefault = (def2) => prefault(inst, def2);
@@ -107103,7 +107103,7 @@ var import_picocolors = __toESM(require_picocolors(), 1);
107103
107103
  // package.json
107104
107104
  var package_default = {
107105
107105
  name: "pullfrog",
107106
- version: "0.1.84",
107106
+ version: "0.1.85",
107107
107107
  cliContractVersion: "1",
107108
107108
  type: "module",
107109
107109
  bin: {
@@ -107366,24 +107366,6 @@ async function fetchStatus(ctx) {
107366
107366
  hasRuns: result.data.hasRuns === true
107367
107367
  };
107368
107368
  }
107369
- async function setPullfrogSecret(ctx) {
107370
- const result = await pullfrogApi({
107371
- path: "/api/cli/secrets",
107372
- token: ctx.token,
107373
- method: "POST",
107374
- body: {
107375
- owner: ctx.owner,
107376
- repo: ctx.repo,
107377
- name: ctx.name,
107378
- value: ctx.value,
107379
- scope: ctx.scope
107380
- }
107381
- });
107382
- if (result.ok && result.data.success === true) {
107383
- return { saved: true, error: "" };
107384
- }
107385
- return { saved: false, error: result.data.error || `api returned ${result.status}` };
107386
- }
107387
107369
  function describeSecretTarget(ctx) {
107388
107370
  if (ctx.scope === "account") return `account ${import_picocolors.default.cyan(`@${ctx.owner}`)}`;
107389
107371
  return `repo ${import_picocolors.default.cyan(`${ctx.owner}/${ctx.repo}`)}`;
@@ -107479,8 +107461,125 @@ async function confirmChange(input) {
107479
107461
  }
107480
107462
  }
107481
107463
 
107482
- // commands/secret.ts
107464
+ // commands/_subscriptions.ts
107483
107465
  var import_arg = __toESM(require_arg(), 1);
107466
+
107467
+ // utils/subscriptionCredentials.ts
107468
+ var subscriptionNameSchema = external_exports.enum([
107469
+ "CLAUDE_CODE_OAUTH_TOKEN",
107470
+ "CODEX_AUTH_JSON",
107471
+ "GROK_AUTH_JSON"
107472
+ ]);
107473
+ var subscriptionSchema = external_exports.object({
107474
+ id: external_exports.string(),
107475
+ credentialId: external_exports.string(),
107476
+ name: subscriptionNameSchema,
107477
+ label: external_exports.string(),
107478
+ owner: external_exports.string(),
107479
+ inherited: external_exports.boolean(),
107480
+ shared: external_exports.boolean(),
107481
+ registeredAt: external_exports.string()
107482
+ });
107483
+ var subscriptionListSchema = external_exports.object({
107484
+ subscriptions: external_exports.array(subscriptionSchema),
107485
+ writable: external_exports.boolean()
107486
+ });
107487
+ var subscriptionInputSchema = external_exports.object({
107488
+ name: subscriptionNameSchema,
107489
+ value: external_exports.string().trim().min(1).refine((value2) => Buffer.byteLength(value2, "utf8") <= 49152),
107490
+ replaceId: external_exports.string().optional()
107491
+ });
107492
+ var credentialCandidateSchema = external_exports.object({
107493
+ id: external_exports.string(),
107494
+ name: external_exports.string(),
107495
+ source: external_exports.enum(["repo", "account", "personal"])
107496
+ });
107497
+ var credentialAccessSchema = external_exports.object({
107498
+ token: external_exports.string(),
107499
+ candidates: external_exports.array(credentialCandidateSchema)
107500
+ });
107501
+ var selectedCredentialSchema = external_exports.object({
107502
+ name: external_exports.string(),
107503
+ value: external_exports.string(),
107504
+ receipt: external_exports.string()
107505
+ });
107506
+
107507
+ // commands/_subscriptions.ts
107508
+ async function chooseSubscription(input) {
107509
+ const result = subscriptionListSchema.parse(
107510
+ await configurationApi({ ...input, path: "subscriptions" })
107511
+ );
107512
+ const current = result.subscriptions.filter((row) => row.name === input.name && !row.inherited);
107513
+ if (!current.length) return { replaceId: void 0 };
107514
+ const chosen = await select({
107515
+ message: "Add or replace a subscription?",
107516
+ options: [
107517
+ { value: "add", label: "Add another", hint: "keep existing subscriptions as fallbacks" },
107518
+ ...current.map((row) => ({ value: row.id, label: `Replace ${row.label}` })),
107519
+ { value: "cancel", label: "Cancel" }
107520
+ ]
107521
+ });
107522
+ handleCancel(chosen);
107523
+ if (typeof chosen !== "string" || chosen === "cancel") return null;
107524
+ return { replaceId: chosen === "add" ? void 0 : chosen };
107525
+ }
107526
+ async function saveSubscription(input) {
107527
+ return external_exports.object({ label: external_exports.string(), reconnected: external_exports.boolean() }).parse(
107528
+ await configurationApi({
107529
+ target: input.target,
107530
+ token: input.token,
107531
+ path: "subscriptions",
107532
+ method: "POST",
107533
+ body: { name: input.name, value: input.value, replaceId: input.replaceId }
107534
+ })
107535
+ );
107536
+ }
107537
+ async function manageSubscriptions(input) {
107538
+ const args2 = (0, import_arg.default)({ ...scopeArgs, "--from": String, "--yes": Boolean }, { argv: input.args });
107539
+ if (args2["--help"]) {
107540
+ console.log(
107541
+ "usage: pullfrog auth list|remove|share|unshare [ID] --org OWNER | --repo OWNER/REPO [--from PERSONAL_OWNER] [--yes]"
107542
+ );
107543
+ return;
107544
+ }
107545
+ const target = resolveTarget({ org: args2["--org"], repo: args2["--repo"] });
107546
+ if (input.command === "list") {
107547
+ const result = subscriptionListSchema.parse(
107548
+ await configurationApi({ target, path: "subscriptions" })
107549
+ );
107550
+ console.log("BINDING ID CREDENTIAL ID PROVIDER ACCOUNT");
107551
+ for (const item of result.subscriptions)
107552
+ console.log(
107553
+ `${item.id} ${item.credentialId} ${item.name} ${item.label}${item.inherited ? " (inherited)" : ""}`
107554
+ );
107555
+ return;
107556
+ }
107557
+ const id = args2._[0];
107558
+ if (!id || args2._.length !== 1) throw new Error("specify exactly one ID from pullfrog auth list");
107559
+ if (input.command === "remove") {
107560
+ await confirmChange({
107561
+ message: `Remove subscription ${id} from ${target.owner}${target.repo ? `/${target.repo}` : " and inheriting repositories (removing a personal connection also revokes its shares)"}?`,
107562
+ yes: args2["--yes"] ?? false
107563
+ });
107564
+ await configurationApi({ target, path: "subscriptions", method: "DELETE", body: { id } });
107565
+ return;
107566
+ }
107567
+ const from = args2["--from"];
107568
+ if (!from) throw new Error("--from PERSONAL_OWNER is required");
107569
+ await confirmChange({
107570
+ message: input.command === "share" ? `Allow every authorized run on ${target.owner}${target.repo ? `/${target.repo}` : " and its repositories"} to use personal subscription ${id}?` : `Revoke personal subscription ${id} from this target?`,
107571
+ yes: args2["--yes"] ?? false
107572
+ });
107573
+ await configurationApi({
107574
+ target,
107575
+ path: "subscriptions/share",
107576
+ method: input.command === "share" ? "POST" : "DELETE",
107577
+ body: { from, credentialId: id, ...target, confirmed: true }
107578
+ });
107579
+ }
107580
+
107581
+ // commands/secret.ts
107582
+ var import_arg2 = __toESM(require_arg(), 1);
107484
107583
  var secretNamesSchema = external_exports.object({
107485
107584
  target: external_exports.string(),
107486
107585
  secrets: external_exports.array(external_exports.string()),
@@ -107491,7 +107590,7 @@ var secretNamesSchema = external_exports.object({
107491
107590
  writable: external_exports.boolean()
107492
107591
  });
107493
107592
  async function runCli(input) {
107494
- const args2 = (0, import_arg.default)({ ...scopeArgs, "--file": String, "--yes": Boolean }, { argv: input.args });
107593
+ const args2 = (0, import_arg2.default)({ ...scopeArgs, "--file": String, "--yes": Boolean }, { argv: input.args });
107495
107594
  if (input.showHelp || args2["--help"] || !args2._.length) {
107496
107595
  console.log(`usage: ${input.prog} secret <list|set|delete> [NAME...]
107497
107596
 
@@ -107615,6 +107714,9 @@ function printAuthUsage(params) {
107615
107714
  params.stream(" codex mint a Codex (ChatGPT) subscription credential");
107616
107715
  params.stream(" claude save a Claude Code subscription OAuth token");
107617
107716
  params.stream(" grok mint a Grok (SuperGrok / X Premium) subscription credential");
107717
+ params.stream(" list list subscriptions and their IDs");
107718
+ params.stream(" remove remove a subscription by binding ID");
107719
+ params.stream(" share | unshare grant or revoke personal subscription access (--from OWNER)");
107618
107720
  params.stream("");
107619
107721
  params.stream("options:");
107620
107722
  params.stream(" --org OWNER | --repo OWNER/REPO select the credential scope");
@@ -107647,6 +107749,10 @@ async function runCli2(params) {
107647
107749
  }
107648
107750
  const subcommand = firstArg;
107649
107751
  const rest = params.args.slice(1);
107752
+ if (["list", "remove", "share", "unshare"].includes(subcommand)) {
107753
+ await manageSubscriptions({ command: subcommand, args: rest });
107754
+ return;
107755
+ }
107650
107756
  if (subcommand === "codex") {
107651
107757
  await runCodex({ args: rest, prog: params.prog });
107652
107758
  return;
@@ -107665,7 +107771,7 @@ async function runCli2(params) {
107665
107771
  process.exit(1);
107666
107772
  }
107667
107773
  function parseCodexArgs(args2) {
107668
- return (0, import_arg2.default)(
107774
+ return (0, import_arg3.default)(
107669
107775
  {
107670
107776
  ...scopeArgs
107671
107777
  },
@@ -107690,16 +107796,6 @@ async function runCodex(params) {
107690
107796
  if (parsed2._.length) throw new Error("unexpected auth argument");
107691
107797
  await runCodexAuth(parsed2);
107692
107798
  }
107693
- function refuseWhenRepoCopiesShadow(params) {
107694
- const refusal = shadowRefusal({
107695
- overrides: params.access.overrides,
107696
- owner: params.owner,
107697
- name: params.name
107698
- });
107699
- if (!refusal) return;
107700
- log.warn(refusal);
107701
- bail("nothing saved.");
107702
- }
107703
107799
  async function runCodexAuth(parsed2) {
107704
107800
  intro(import_picocolors2.default.bgGreen(import_picocolors2.default.black(" pullfrog auth codex ")));
107705
107801
  const spin = spinner();
@@ -107740,20 +107836,18 @@ async function runCodexAuth(parsed2) {
107740
107836
  bail(
107741
107837
  scope2 === "repo" ? "repo admin required to change secrets" : "org owner required to change secrets"
107742
107838
  );
107743
- refuseWhenRepoCopiesShadow({ access, owner: remote.owner, name: CODEX_AUTH_SECRET });
107744
- if (access.secrets.includes(CODEX_AUTH_SECRET)) {
107745
- const overwrite = await select({
107746
- message: `${import_picocolors2.default.cyan(CODEX_AUTH_SECRET)} is already configured \u2014 overwrite?`,
107747
- options: [
107748
- { value: true, label: "overwrite", hint: "rotate to a freshly minted credential" },
107749
- { value: false, label: "cancel" }
107750
- ]
107751
- });
107752
- handleCancel(overwrite);
107753
- if (!overwrite) {
107754
- cancel("canceled.");
107755
- return;
107756
- }
107839
+ const subscriptionTarget = {
107840
+ owner: remote.owner,
107841
+ repo: scope2 === "repo" ? remote.repo : void 0
107842
+ };
107843
+ const choice = await chooseSubscription({
107844
+ target: subscriptionTarget,
107845
+ token,
107846
+ name: CODEX_AUTH_SECRET
107847
+ });
107848
+ if (!choice) {
107849
+ cancel("canceled.");
107850
+ return;
107757
107851
  }
107758
107852
  log.info(
107759
107853
  [
@@ -107824,23 +107918,16 @@ async function runCodexAuth(parsed2) {
107824
107918
  }
107825
107919
  const target = describeSecretTarget({ owner: remote.owner, repo: remote.repo, scope: scope2 });
107826
107920
  spin.start(`saving ${import_picocolors2.default.cyan(CODEX_AUTH_SECRET)} to ${target}`);
107827
- const result = await setPullfrogSecret({
107921
+ const result = await saveSubscription({
107828
107922
  token,
107829
- owner: remote.owner,
107830
- repo: remote.repo,
107923
+ target: subscriptionTarget,
107831
107924
  name: CODEX_AUTH_SECRET,
107832
107925
  value: savable.json,
107833
- scope: scope2
107926
+ replaceId: choice.replaceId
107834
107927
  });
107835
- if (!result.saved) {
107836
- spin.stop(import_picocolors2.default.red("could not save secret"));
107837
- log.warn(
107838
- `${result.error}
107839
- ${import_picocolors2.default.dim("set it manually at:")} ${PULLFROG_API_URL}/console/${remote.owner}`
107840
- );
107841
- process.exit(1);
107842
- }
107843
- spin.stop(`saved ${import_picocolors2.default.cyan(CODEX_AUTH_SECRET)} to ${target}`);
107928
+ spin.stop(
107929
+ `${result.reconnected ? "reconnected" : "added"} ${import_picocolors2.default.cyan(result.label)} to ${target}`
107930
+ );
107844
107931
  setActiveSpin(null);
107845
107932
  outro("done.");
107846
107933
  } catch (error49) {
@@ -107852,7 +107939,7 @@ async function runCodexAuth(parsed2) {
107852
107939
  }
107853
107940
  }
107854
107941
  function parseClaudeArgs(args2) {
107855
- return (0, import_arg2.default)(
107942
+ return (0, import_arg3.default)(
107856
107943
  {
107857
107944
  ...scopeArgs
107858
107945
  },
@@ -107917,20 +108004,18 @@ async function runClaudeAuth(parsed2) {
107917
108004
  bail(
107918
108005
  scope2 === "repo" ? "repo admin required to change secrets" : "org owner required to change secrets"
107919
108006
  );
107920
- refuseWhenRepoCopiesShadow({ access, owner: remote.owner, name: CLAUDE_OAUTH_SECRET });
107921
- if (access.secrets.includes(CLAUDE_OAUTH_SECRET)) {
107922
- const overwrite = await select({
107923
- message: `${import_picocolors2.default.cyan(CLAUDE_OAUTH_SECRET)} is already configured \u2014 overwrite?`,
107924
- options: [
107925
- { value: true, label: "overwrite", hint: "replace with a freshly minted token" },
107926
- { value: false, label: "cancel" }
107927
- ]
107928
- });
107929
- handleCancel(overwrite);
107930
- if (!overwrite) {
107931
- cancel("canceled.");
107932
- return;
107933
- }
108007
+ const subscriptionTarget = {
108008
+ owner: remote.owner,
108009
+ repo: scope2 === "repo" ? remote.repo : void 0
108010
+ };
108011
+ const choice = await chooseSubscription({
108012
+ target: subscriptionTarget,
108013
+ token,
108014
+ name: CLAUDE_OAUTH_SECRET
108015
+ });
108016
+ if (!choice) {
108017
+ cancel("canceled.");
108018
+ return;
107934
108019
  }
107935
108020
  log.info(
107936
108021
  [
@@ -107958,23 +108043,16 @@ async function runClaudeAuth(parsed2) {
107958
108043
  }
107959
108044
  const target = describeSecretTarget({ owner: remote.owner, repo: remote.repo, scope: scope2 });
107960
108045
  spin.start(`saving ${import_picocolors2.default.cyan(CLAUDE_OAUTH_SECRET)} to ${target}`);
107961
- const result = await setPullfrogSecret({
108046
+ const result = await saveSubscription({
107962
108047
  token,
107963
- owner: remote.owner,
107964
- repo: remote.repo,
108048
+ target: subscriptionTarget,
107965
108049
  name: CLAUDE_OAUTH_SECRET,
107966
108050
  value: value2,
107967
- scope: scope2
108051
+ replaceId: choice.replaceId
107968
108052
  });
107969
- if (!result.saved) {
107970
- spin.stop(import_picocolors2.default.red("could not save secret"));
107971
- log.warn(
107972
- `${result.error}
107973
- ${import_picocolors2.default.dim("set it manually at:")} ${PULLFROG_API_URL}/console/${remote.owner}`
107974
- );
107975
- process.exit(1);
107976
- }
107977
- spin.stop(`saved ${import_picocolors2.default.cyan(CLAUDE_OAUTH_SECRET)} to ${target}`);
108053
+ spin.stop(
108054
+ `${result.reconnected ? "reconnected" : "added"} ${import_picocolors2.default.cyan(result.label)} to ${target}`
108055
+ );
107978
108056
  setActiveSpin(null);
107979
108057
  outro("done.");
107980
108058
  } catch (error49) {
@@ -108052,20 +108130,18 @@ async function runGrokAuth(parsed2) {
108052
108130
  bail(
108053
108131
  scope2 === "repo" ? "repo admin required to change secrets" : "org owner required to change secrets"
108054
108132
  );
108055
- refuseWhenRepoCopiesShadow({ access, owner: remote.owner, name: GROK_AUTH_SECRET });
108056
- if (access.secrets.includes(GROK_AUTH_SECRET)) {
108057
- const overwrite = await select({
108058
- message: `${import_picocolors2.default.cyan(GROK_AUTH_SECRET)} is already configured \u2014 overwrite?`,
108059
- options: [
108060
- { value: true, label: "overwrite", hint: "replace with a freshly minted credential" },
108061
- { value: false, label: "cancel" }
108062
- ]
108063
- });
108064
- handleCancel(overwrite);
108065
- if (!overwrite) {
108066
- cancel("canceled.");
108067
- return;
108068
- }
108133
+ const subscriptionTarget = {
108134
+ owner: remote.owner,
108135
+ repo: scope2 === "repo" ? remote.repo : void 0
108136
+ };
108137
+ const choice = await chooseSubscription({
108138
+ target: subscriptionTarget,
108139
+ token,
108140
+ name: GROK_AUTH_SECRET
108141
+ });
108142
+ if (!choice) {
108143
+ cancel("canceled.");
108144
+ return;
108069
108145
  }
108070
108146
  spin.start("requesting a device code from xAI");
108071
108147
  const device = await startXaiDeviceAuth();
@@ -108089,23 +108165,16 @@ async function runGrokAuth(parsed2) {
108089
108165
  spin.stop("credential rotated");
108090
108166
  const target = describeSecretTarget({ owner: remote.owner, repo: remote.repo, scope: scope2 });
108091
108167
  spin.start(`saving ${import_picocolors2.default.cyan(GROK_AUTH_SECRET)} to ${target}`);
108092
- const result = await setPullfrogSecret({
108168
+ const result = await saveSubscription({
108093
108169
  token,
108094
- owner: remote.owner,
108095
- repo: remote.repo,
108170
+ target: subscriptionTarget,
108096
108171
  name: GROK_AUTH_SECRET,
108097
108172
  value: stringifyXaiAuthBody(fresh),
108098
- scope: scope2
108173
+ replaceId: choice.replaceId
108099
108174
  });
108100
- if (!result.saved) {
108101
- spin.stop(import_picocolors2.default.red("could not save secret"));
108102
- log.warn(
108103
- `${result.error}
108104
- ${import_picocolors2.default.dim("set it manually at:")} ${PULLFROG_API_URL}/console/${remote.owner}`
108105
- );
108106
- process.exit(1);
108107
- }
108108
- spin.stop(`saved ${import_picocolors2.default.cyan(GROK_AUTH_SECRET)} to ${target}`);
108175
+ spin.stop(
108176
+ `${result.reconnected ? "reconnected" : "added"} ${import_picocolors2.default.cyan(result.label)} to ${target}`
108177
+ );
108109
108178
  setActiveSpin(null);
108110
108179
  outro("done.");
108111
108180
  } catch (error49) {
@@ -108118,7 +108187,7 @@ async function runGrokAuth(parsed2) {
108118
108187
  }
108119
108188
 
108120
108189
  // commands/config.ts
108121
- var import_arg3 = __toESM(require_arg(), 1);
108190
+ var import_arg4 = __toESM(require_arg(), 1);
108122
108191
 
108123
108192
  // configuration.ts
108124
108193
  var defaults = [
@@ -108547,7 +108616,7 @@ function parseValue(field, raw2) {
108547
108616
  return result.data;
108548
108617
  }
108549
108618
  async function runCli3(input) {
108550
- const args2 = (0, import_arg3.default)(
108619
+ const args2 = (0, import_arg4.default)(
108551
108620
  { ...scopeArgs, "--file": String, "--yes": Boolean, "--ack-auto-merge": Boolean },
108552
108621
  { argv: input.args }
108553
108622
  );
@@ -108649,10 +108718,10 @@ write access: ${args2["--org"] !== void 0 ? field.privileged ? "org owner" : "or
108649
108718
  }
108650
108719
 
108651
108720
  // commands/console.ts
108652
- var import_arg4 = __toESM(require_arg(), 1);
108721
+ var import_arg5 = __toESM(require_arg(), 1);
108653
108722
  import { spawnSync } from "node:child_process";
108654
108723
  async function runCli4(input) {
108655
- const args2 = (0, import_arg4.default)({ ...scopeArgs, "--no-browser": Boolean }, { argv: input.args });
108724
+ const args2 = (0, import_arg5.default)({ ...scopeArgs, "--no-browser": Boolean }, { argv: input.args });
108656
108725
  if (input.showHelp || args2["--help"]) {
108657
108726
  console.log(
108658
108727
  `usage: ${input.prog} console [--org OWNER | --repo OWNER/REPO] [--no-browser]
@@ -108679,7 +108748,7 @@ without a terminal, only print its URL.`
108679
108748
 
108680
108749
  // commands/gha.ts
108681
108750
  var core8 = __toESM(require_core(), 1);
108682
- var import_arg5 = __toESM(require_arg(), 1);
108751
+ var import_arg6 = __toESM(require_arg(), 1);
108683
108752
  import { dirname as dirname6 } from "node:path";
108684
108753
 
108685
108754
  // main.ts
@@ -109754,6 +109823,17 @@ var providers = {
109754
109823
  // see the big-pickle note above (#1077).
109755
109824
  isFree: true
109756
109825
  },
109826
+ // Zen's FREE Meituan preview (listed 2026-09-25). Zen's docs: zero
109827
+ // retention, no training. Go lists the same free id, but one key reaches
109828
+ // both, so the promo gets one row, here with the other free ones.
109829
+ "longcat-preview": {
109830
+ displayName: "LongCat Preview",
109831
+ description: "Meituan preview, free for a limited time",
109832
+ resolve: "opencode/longcat-2.5-preview-free",
109833
+ // free to run, still gated on the provider's own OPENCODE_API_KEY —
109834
+ // see the big-pickle note above (#1077).
109835
+ isFree: true
109836
+ },
109757
109837
  // Zen's live free MiMo, and the second free row in a menu that big-pickle
109758
109838
  // was alone in since `mimo-v2-pro-free` lost its model.
109759
109839
  mimo: {
@@ -110367,7 +110447,7 @@ function isAutoTier(slug2) {
110367
110447
  }
110368
110448
  var PROVIDER_LADDERS = {
110369
110449
  anthropic: {
110370
- minimal: "anthropic/claude-haiku",
110450
+ minimal: "anthropic/claude-sonnet",
110371
110451
  light: "anthropic/claude-sonnet",
110372
110452
  standard: "anthropic/claude-opus",
110373
110453
  deep: "anthropic/claude-opus"
@@ -110842,11 +110922,11 @@ function ts() {
110842
110922
  return isDebugEnabled() ? `[${(/* @__PURE__ */ new Date()).toISOString()}] ` : "";
110843
110923
  }
110844
110924
  function formatArgs(args2) {
110845
- return args2.map((arg9) => {
110846
- if (typeof arg9 === "string") return arg9;
110847
- if (arg9 instanceof Error) return `${arg9.message}
110848
- ${arg9.stack}`;
110849
- return JSON.stringify(arg9);
110925
+ return args2.map((arg10) => {
110926
+ if (typeof arg10 === "string") return arg10;
110927
+ if (arg10 instanceof Error) return `${arg10.message}
110928
+ ${arg10.stack}`;
110929
+ return JSON.stringify(arg10);
110850
110930
  }).join(" ");
110851
110931
  }
110852
110932
  function startGroup2(name) {
@@ -113437,6 +113517,18 @@ import { homedir as homedir2, userInfo } from "node:os";
113437
113517
  import { join as join6 } from "node:path";
113438
113518
  var CODEX_AUTH_ENV = "CODEX_AUTH_JSON";
113439
113519
  var XAI_AUTH_ENV = "GROK_AUTH_JSON";
113520
+ var installedSubscriptionPaths = /* @__PURE__ */ new Map();
113521
+ function clearInstalledSubscription(name) {
113522
+ const path4 = installedSubscriptionPaths.get(name);
113523
+ if (!path4 || !existsSync5(path4)) return;
113524
+ const value2 = JSON.parse(readFileSync3(path4, "utf8"));
113525
+ if (!value2 || typeof value2 !== "object") return;
113526
+ if (name === "CODEX_AUTH_JSON" && "openai" in value2) delete value2.openai;
113527
+ if (name === "GROK_AUTH_JSON" && "xai" in value2) delete value2.xai;
113528
+ writeFileSync5(path4, `${JSON.stringify(value2)}
113529
+ `, { mode: 384 });
113530
+ installedSubscriptionPaths.delete(name);
113531
+ }
113440
113532
  var PULLFROG_DATA_DIR = "/var/lib/pullfrog";
113441
113533
  function isRejectedChain(body) {
113442
113534
  if (!body.refresh_rejected_at) return false;
@@ -113472,6 +113564,7 @@ function installCodexAuth() {
113472
113564
  });
113473
113565
  process.env.XDG_DATA_HOME = xdgDataHome;
113474
113566
  log2.info(`\xBB installed Codex auth at ${authPath}`);
113567
+ installedSubscriptionPaths.set(CODEX_AUTH_ENV, authPath);
113475
113568
  return {
113476
113569
  authPath,
113477
113570
  xdgDataHome,
@@ -113523,6 +113616,7 @@ function installXaiAuth() {
113523
113616
  });
113524
113617
  process.env.XDG_DATA_HOME = xdgDataHome;
113525
113618
  log2.info(`\xBB installed Grok auth at ${authPath}`);
113619
+ installedSubscriptionPaths.set(XAI_AUTH_ENV, authPath);
113526
113620
  return { authPath, xdgDataHome, originalRefresh: body.tokens.refresh_token };
113527
113621
  }
113528
113622
  function isXaiRejectedChain(body) {
@@ -113764,14 +113858,18 @@ async function writeBackEntry(apiToken, entry) {
113764
113858
  return;
113765
113859
  }
113766
113860
  try {
113861
+ const poolState = core2.getState("credential_receipts");
113862
+ const receipts2 = external_exports.record(external_exports.string(), external_exports.string()).parse(JSON.parse(poolState || "{}"));
113863
+ const receipt = receipts2[entry.secretName];
113864
+ if (poolState && !receipt) return;
113767
113865
  const response = await apiFetch({
113768
- path: "/api/runtime/secret",
113866
+ path: receipt ? "/api/runtime/credentials" : "/api/runtime/secret",
113769
113867
  method: "PUT",
113770
113868
  headers: {
113771
113869
  authorization: `Bearer ${apiToken}`,
113772
113870
  "content-type": "application/json"
113773
113871
  },
113774
- body: JSON.stringify({ name: entry.secretName, value: refreshed }),
113872
+ body: JSON.stringify({ name: entry.secretName, value: refreshed, receipt }),
113775
113873
  // the workflow is already finished; a hung write-back would hold the
113776
113874
  // runner open for nothing.
113777
113875
  signal: AbortSignal.timeout(3e4)
@@ -115265,7 +115363,7 @@ var buildClientParams = (args2, fields) => {
115265
115363
  };
115266
115364
  const map2 = buildKeyMap(fields);
115267
115365
  let config3;
115268
- for (const [index, arg9] of args2.entries()) {
115366
+ for (const [index, arg10] of args2.entries()) {
115269
115367
  if (fields[index]) {
115270
115368
  config3 = fields[index];
115271
115369
  }
@@ -115278,13 +115376,13 @@ var buildClientParams = (args2, fields) => {
115278
115376
  const name = field.map || config3.key;
115279
115377
  if (field.in) {
115280
115378
  ;
115281
- params[field.in][name] = arg9;
115379
+ params[field.in][name] = arg10;
115282
115380
  }
115283
115381
  } else {
115284
- params.body = arg9;
115382
+ params.body = arg10;
115285
115383
  }
115286
115384
  } else {
115287
- for (const [key, value2] of Object.entries(arg9 ?? {})) {
115385
+ for (const [key, value2] of Object.entries(arg10 ?? {})) {
115288
115386
  const field = map2.get(key);
115289
115387
  if (field) {
115290
115388
  if (field.in) {
@@ -121892,12 +121990,12 @@ var CompiledFunction = class extends CastableBase {
121892
121990
  constructor(...args2) {
121893
121991
  super();
121894
121992
  this.argNames = args2;
121895
- for (const arg9 of args2) {
121896
- if (arg9 in this) {
121897
- throw new Error(`Arg name '${arg9}' would overwrite an existing property on FunctionBody`);
121993
+ for (const arg10 of args2) {
121994
+ if (arg10 in this) {
121995
+ throw new Error(`Arg name '${arg10}' would overwrite an existing property on FunctionBody`);
121898
121996
  }
121899
121997
  ;
121900
- this[arg9] = arg9;
121998
+ this[arg10] = arg10;
121901
121999
  }
121902
122000
  }
121903
122001
  indentation = 0;
@@ -121982,12 +122080,12 @@ var NodeCompiler = class extends CompiledFunction {
121982
122080
  this.optimistic = ctx.optimistic === true;
121983
122081
  }
121984
122082
  invoke(node2, opts) {
121985
- const arg9 = opts?.arg ?? this.data;
122083
+ const arg10 = opts?.arg ?? this.data;
121986
122084
  const requiresContext = typeof node2 === "string" ? true : this.requiresContextFor(node2);
121987
122085
  const id = typeof node2 === "string" ? node2 : node2.id;
121988
122086
  if (requiresContext)
121989
- return `${this.referenceToId(id, opts)}(${arg9}, ${this.ctx})`;
121990
- return `${this.referenceToId(id, opts)}(${arg9})`;
122087
+ return `${this.referenceToId(id, opts)}(${arg10}, ${this.ctx})`;
122088
+ return `${this.referenceToId(id, opts)}(${arg10})`;
121991
122089
  }
121992
122090
  referenceToId(id, opts) {
121993
122091
  const invokedKind = opts?.kind ?? this.traversalKind;
@@ -128152,11 +128250,11 @@ var Context = class {
128152
128250
  }
128153
128251
  return Object.fromEntries(this.#var);
128154
128252
  }
128155
- #newResponse(data, arg9, headers) {
128253
+ #newResponse(data, arg10, headers) {
128156
128254
  let responseHeaders = this.#res ? new Headers(this.#res.headers) : this.#preparedHeaders;
128157
- if (typeof arg9 === "object" && arg9.headers) {
128255
+ if (typeof arg10 === "object" && arg10.headers) {
128158
128256
  responseHeaders ??= new Headers();
128159
- for (const [key, value2] of new Headers(arg9.headers)) {
128257
+ for (const [key, value2] of new Headers(arg10.headers)) {
128160
128258
  if (key === "set-cookie") {
128161
128259
  responseHeaders.append(key, value2);
128162
128260
  } else {
@@ -128188,7 +128286,7 @@ var Context = class {
128188
128286
  }
128189
128287
  }
128190
128288
  }
128191
- const status = typeof arg9 === "number" ? arg9 : arg9?.status ?? this.#status;
128289
+ const status = typeof arg10 === "number" ? arg10 : arg10?.status ?? this.#status;
128192
128290
  return createResponseInstance(data, {
128193
128291
  status,
128194
128292
  headers: responseHeaders ?? headers
@@ -128216,7 +128314,7 @@ var Context = class {
128216
128314
  * })
128217
128315
  * ```
128218
128316
  */
128219
- body = (data, arg9, headers) => this.#newResponse(data, arg9, headers);
128317
+ body = (data, arg10, headers) => this.#newResponse(data, arg10, headers);
128220
128318
  /**
128221
128319
  * `.text()` can render text as `Content-Type:text/plain`.
128222
128320
  *
@@ -128229,10 +128327,10 @@ var Context = class {
128229
128327
  * })
128230
128328
  * ```
128231
128329
  */
128232
- text = (text, arg9, headers) => {
128233
- return !this.#preparedHeaders && !this.#status && !arg9 && !headers && !this.finalized ? new Response(text) : this.#newResponse(
128330
+ text = (text, arg10, headers) => {
128331
+ return !this.#preparedHeaders && !this.#status && !arg10 && !headers && !this.finalized ? new Response(text) : this.#newResponse(
128234
128332
  text,
128235
- arg9,
128333
+ arg10,
128236
128334
  setDefaultContentType(TEXT_PLAIN, headers)
128237
128335
  );
128238
128336
  };
@@ -128248,15 +128346,15 @@ var Context = class {
128248
128346
  * })
128249
128347
  * ```
128250
128348
  */
128251
- json = (object5, arg9, headers) => {
128349
+ json = (object5, arg10, headers) => {
128252
128350
  return this.#newResponse(
128253
128351
  JSON.stringify(object5),
128254
- arg9,
128352
+ arg10,
128255
128353
  setDefaultContentType("application/json", headers)
128256
128354
  );
128257
128355
  };
128258
- html = (html, arg9, headers) => {
128259
- const res = (html2) => this.#newResponse(html2, arg9, setDefaultContentType("text/html; charset=UTF-8", headers));
128356
+ html = (html, arg10, headers) => {
128357
+ const res = (html2) => this.#newResponse(html2, arg10, setDefaultContentType("text/html; charset=UTF-8", headers));
128260
128358
  return typeof html === "object" ? resolveCallback(html, HtmlEscapedCallbackPhase.Stringify, false, {}).then(res) : res(html);
128261
128359
  };
128262
128360
  /**
@@ -135228,10 +135326,10 @@ var require_code$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
135228
135326
  return new _Code(expr);
135229
135327
  }
135230
135328
  exports.str = str;
135231
- function addCodeArg(code, arg9) {
135232
- if (arg9 instanceof _Code) code.push(...arg9._items);
135233
- else if (arg9 instanceof Name) code.push(arg9);
135234
- else code.push(interpolate(arg9));
135329
+ function addCodeArg(code, arg10) {
135330
+ if (arg10 instanceof _Code) code.push(...arg10._items);
135331
+ else if (arg10 instanceof Name) code.push(arg10);
135332
+ else code.push(interpolate(arg10));
135235
135333
  }
135236
135334
  exports.addCodeArg = addCodeArg;
135237
135335
  function optimize(expr) {
@@ -149503,10 +149601,10 @@ var require_code$12 = /* @__PURE__ */ __commonJSMin2(((exports) => {
149503
149601
  return new _Code(expr);
149504
149602
  }
149505
149603
  exports.str = str;
149506
- function addCodeArg(code, arg9) {
149507
- if (arg9 instanceof _Code) code.push(...arg9._items);
149508
- else if (arg9 instanceof Name) code.push(arg9);
149509
- else code.push(interpolate(arg9));
149604
+ function addCodeArg(code, arg10) {
149605
+ if (arg10 instanceof _Code) code.push(...arg10._items);
149606
+ else if (arg10 instanceof Name) code.push(arg10);
149607
+ else code.push(interpolate(arg10));
149510
149608
  }
149511
149609
  exports.addCodeArg = addCodeArg;
149512
149610
  function optimize(expr) {
@@ -157699,13 +157797,13 @@ var Doc2 = class {
157699
157797
  fn2(this);
157700
157798
  this.indent -= 1;
157701
157799
  }
157702
- write(arg9) {
157703
- if (typeof arg9 === "function") {
157704
- arg9(this, { execution: "sync" });
157705
- arg9(this, { execution: "async" });
157800
+ write(arg10) {
157801
+ if (typeof arg10 === "function") {
157802
+ arg10(this, { execution: "sync" });
157803
+ arg10(this, { execution: "async" });
157706
157804
  return;
157707
157805
  }
157708
- const lines = arg9.split("\n").filter((x2) => x2);
157806
+ const lines = arg10.split("\n").filter((x2) => x2);
157709
157807
  const minIndent = Math.min(...lines.map((x2) => x2.length - x2.trimStart().length));
157710
157808
  const dedented = lines.map((x2) => x2.slice(minIndent)).map((x2) => " ".repeat(this.indent * 2) + x2);
157711
157809
  for (const line of dedented) this.content.push(line);
@@ -160514,11 +160612,11 @@ var ZodType3 = /* @__PURE__ */ $constructor2("ZodType", (inst, def) => {
160514
160612
  array() {
160515
160613
  return array2(this);
160516
160614
  },
160517
- or(arg9) {
160518
- return union2([this, arg9]);
160615
+ or(arg10) {
160616
+ return union2([this, arg10]);
160519
160617
  },
160520
- and(arg9) {
160521
- return intersection2(this, arg9);
160618
+ and(arg10) {
160619
+ return intersection2(this, arg10);
160522
160620
  },
160523
160621
  transform(tx) {
160524
160622
  return pipe2(this, transform2(tx));
@@ -164203,14 +164301,14 @@ var require_http_errors = /* @__PURE__ */ __commonJSMin3(((exports, module) => {
164203
164301
  var status$1 = 500;
164204
164302
  var props = {};
164205
164303
  for (var i$3 = 0; i$3 < arguments.length; i$3++) {
164206
- var arg9 = arguments[i$3];
164207
- var type2 = typeof arg9;
164208
- if (type2 === "object" && arg9 instanceof Error) {
164209
- err = arg9;
164304
+ var arg10 = arguments[i$3];
164305
+ var type2 = typeof arg10;
164306
+ if (type2 === "object" && arg10 instanceof Error) {
164307
+ err = arg10;
164210
164308
  status$1 = err.status || err.statusCode || status$1;
164211
- } else if (type2 === "number" && i$3 === 0) status$1 = arg9;
164212
- else if (type2 === "string") msg = arg9;
164213
- else if (type2 === "object") props = arg9;
164309
+ } else if (type2 === "number" && i$3 === 0) status$1 = arg10;
164310
+ else if (type2 === "string") msg = arg10;
164311
+ else if (type2 === "object") props = arg10;
164214
164312
  else throw new TypeError("argument #" + (i$3 + 1) + " unsupported type " + type2);
164215
164313
  }
164216
164314
  if (typeof status$1 === "number" && (status$1 < 400 || status$1 >= 600)) deprecate("non-error status code; use only 4xx or 5xx status codes");
@@ -174752,11 +174850,11 @@ ${error49 instanceof Error ? error49.stack : JSON.stringify(error49)}`
174752
174850
  );
174753
174851
  }
174754
174852
  const args2 = request2.params.arguments;
174755
- for (const arg9 of prompt.arguments ?? []) {
174756
- if (arg9.required && !(args2 && arg9.name in args2)) {
174853
+ for (const arg10 of prompt.arguments ?? []) {
174854
+ if (arg10.required && !(args2 && arg10.name in args2)) {
174757
174855
  throw new McpError(
174758
174856
  ErrorCode.InvalidRequest,
174759
- `Prompt '${request2.params.name}' requires argument '${arg9.name}': ${arg9.description || "No description provided"}`
174857
+ `Prompt '${request2.params.name}' requires argument '${arg10.name}': ${arg10.description || "No description provided"}`
174760
174858
  );
174761
174859
  }
174762
174860
  }
@@ -175982,7 +176080,7 @@ var FastMCP = class extends FastMCPEventEmitter {
175982
176080
  #parseRuntimeConfig(overrides) {
175983
176081
  const args2 = process.argv.slice(2);
175984
176082
  const getArg = (name) => {
175985
- const index = args2.findIndex((arg9) => arg9 === `--${name}`);
176083
+ const index = args2.findIndex((arg10) => arg10 === `--${name}`);
175986
176084
  return index !== -1 && index + 1 < args2.length ? args2[index + 1] : void 0;
175987
176085
  };
175988
176086
  const transportArg = getArg("transport");
@@ -177260,11 +177358,11 @@ var GenericRoot = class extends Callable {
177260
177358
  constructor(paramDefs, bodyDef, $2, arg$, hkt) {
177261
177359
  super((...args2) => {
177262
177360
  const argNodes = flatMorph(this.names, (i2, name) => {
177263
- const arg9 = this.arg$.parse(args2[i2]);
177264
- if (!arg9.extends(this.constraints[i2])) {
177265
- throwParseError(writeUnsatisfiedParameterConstraintMessage(name, this.constraints[i2].expression, arg9.expression));
177361
+ const arg10 = this.arg$.parse(args2[i2]);
177362
+ if (!arg10.extends(this.constraints[i2])) {
177363
+ throwParseError(writeUnsatisfiedParameterConstraintMessage(name, this.constraints[i2].expression, arg10.expression));
177266
177364
  }
177267
- return [name, arg9];
177365
+ return [name, arg10];
177268
177366
  });
177269
177367
  if (this.defIsLazy()) {
177270
177368
  const def = this.bodyDef(argNodes);
@@ -177312,7 +177410,7 @@ var GenericRoot = class extends Callable {
177312
177410
  return this.baseInstantiation.internal.references;
177313
177411
  }
177314
177412
  };
177315
- var writeUnsatisfiedParameterConstraintMessage = (name, constraint, arg9) => `${name} must be assignable to ${constraint} (was ${arg9})`;
177413
+ var writeUnsatisfiedParameterConstraintMessage = (name, constraint, arg10) => `${name} must be assignable to ${constraint} (was ${arg10})`;
177316
177414
 
177317
177415
  // node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/predicate.js
177318
177416
  var implementation = implementNode({
@@ -181810,7 +181908,7 @@ var _parseGenericArgs = (name, g, s, argNodes) => {
181810
181908
  argNodes.push(argState.root);
181811
181909
  if (argState.finalizer === ">") {
181812
181910
  if (argNodes.length !== g.params.length) {
181813
- return s.error(writeInvalidGenericArgCountMessage(name, g.names, argNodes.map((arg9) => arg9.expression)));
181911
+ return s.error(writeInvalidGenericArgCountMessage(name, g.names, argNodes.map((arg10) => arg10.expression)));
181814
181912
  }
181815
181913
  return argNodes;
181816
181914
  }
@@ -181839,10 +181937,10 @@ var parseGenericInstantiation = (name, g, s) => {
181839
181937
  var unenclosedToNode = (s, token) => maybeParseReference(s, token) ?? maybeParseUnenclosedLiteral(s, token) ?? s.error(token === "" ? s.scanner.lookahead === "#" ? writePrefixedPrivateReferenceMessage(s.shiftedBy(1).scanner.shiftUntilLookahead(terminatingChars)) : writeMissingOperandMessage(s) : writeUnresolvableMessage(token));
181840
181938
  var maybeParseReference = (s, token) => {
181841
181939
  if (s.ctx.args?.[token]) {
181842
- const arg9 = s.ctx.args[token];
181843
- if (typeof arg9 !== "string")
181844
- return arg9;
181845
- return s.ctx.$.node("alias", { reference: arg9 }, { prereduced: true });
181940
+ const arg10 = s.ctx.args[token];
181941
+ if (typeof arg10 !== "string")
181942
+ return arg10;
181943
+ return s.ctx.$.node("alias", { reference: arg10 }, { prereduced: true });
181846
181944
  }
181847
181945
  const resolution = s.ctx.$.maybeResolve(token);
181848
181946
  if (hasArkKind(resolution, "root"))
@@ -192012,13 +192110,13 @@ function GitTool(ctx) {
192012
192110
  if (blocked) {
192013
192111
  throw new Error(blocked);
192014
192112
  }
192015
- for (const arg9 of args2) {
192113
+ for (const arg10 of args2) {
192016
192114
  const isBlocked = NOSHELL_BLOCKED_ARGS.some(
192017
- (flag) => arg9 === flag || arg9.startsWith(flag + "=")
192115
+ (flag) => arg10 === flag || arg10.startsWith(flag + "=")
192018
192116
  );
192019
192117
  if (isBlocked) {
192020
192118
  throw new Error(
192021
- `Blocked: '${arg9}' flag can execute arbitrary code and is not allowed.`
192119
+ `Blocked: '${arg10}' flag can execute arbitrary code and is not allowed.`
192022
192120
  );
192023
192121
  }
192024
192122
  }
@@ -193473,14 +193571,29 @@ async function reportReviewNodeId(ctx, params) {
193473
193571
 
193474
193572
  // utils/setup.ts
193475
193573
  import { execFileSync as execFileSync7, execSync as execSync2 } from "node:child_process";
193476
- import { mkdtempSync as mkdtempSync2, readdirSync, realpathSync as realpathSync2, unlinkSync as unlinkSync2 } from "node:fs";
193574
+ import { mkdtempSync as mkdtempSync2, readdirSync, realpathSync as realpathSync2, rmSync as rmSync3, unlinkSync as unlinkSync2 } from "node:fs";
193477
193575
  import { tmpdir as tmpdir3 } from "node:os";
193478
193576
  import { join as join15 } from "node:path";
193479
193577
  function createTempDirectory() {
193480
- const sharedTempDir = mkdtempSync2(join15(tmpdir3(), "pullfrog-"));
193481
- process.env.PULLFROG_TEMP_DIR = sharedTempDir;
193482
- log2.info(`\xBB created temp dir at ${sharedTempDir}`);
193483
- return sharedTempDir;
193578
+ const path4 = mkdtempSync2(join15(tmpdir3(), "pullfrog-"));
193579
+ process.env.PULLFROG_TEMP_DIR = path4;
193580
+ log2.info(`\xBB created temp dir at ${path4}`);
193581
+ return { path: path4, [Symbol.dispose]: () => removeTempDirectory(path4) };
193582
+ }
193583
+ function removeTempDirectory(path4) {
193584
+ try {
193585
+ try {
193586
+ rmSync3(path4, { recursive: true, force: true });
193587
+ } catch {
193588
+ execFileSync7("chmod", ["-R", "u+w", path4]);
193589
+ rmSync3(path4, { recursive: true, force: true });
193590
+ }
193591
+ log2.debug(`\xBB removed temp dir at ${path4}`);
193592
+ } catch (err) {
193593
+ log2.warning(
193594
+ `\xBB could not remove temp dir at ${path4}: ${err instanceof Error ? err.message : String(err)}`
193595
+ );
193596
+ }
193484
193597
  }
193485
193598
  function wipeRunnerLeakSurface() {
193486
193599
  const runnerTemp = process.env.RUNNER_TEMP;
@@ -195226,8 +195339,8 @@ var GhParams = type({
195226
195339
  'gh arguments as an argv array, e.g. ["pr", "list", "--json", "number,title"] or ["api", "graphql", "-f", "query=..."]'
195227
195340
  )
195228
195341
  });
195229
- function shellQuote(arg9) {
195230
- return `'${arg9.replace(/'/g, "'\\''")}'`;
195342
+ function shellQuote(arg10) {
195343
+ return `'${arg10.replace(/'/g, "'\\''")}'`;
195231
195344
  }
195232
195345
  function GhTool(ctx) {
195233
195346
  const permissions = mirrorRolePermissions(ctx.payload.event.authorPermission);
@@ -196824,7 +196937,7 @@ function UploadFileTool(ctx) {
196824
196937
  }
196825
196938
 
196826
196939
  // mcp/xrepo.ts
196827
- import { mkdirSync as mkdirSync10, rmSync as rmSync3 } from "node:fs";
196940
+ import { mkdirSync as mkdirSync10, rmSync as rmSync4 } from "node:fs";
196828
196941
  import { join as join24 } from "node:path";
196829
196942
  function assertValidRepoName(name) {
196830
196943
  if (!/^[A-Za-z0-9._-]+$/.test(name) || name.startsWith("-") || name.includes("..")) {
@@ -196936,7 +197049,7 @@ function CheckoutRepoTool(ctx) {
196936
197049
  return { path: dir, access, defaultBranch };
196937
197050
  } catch (err) {
196938
197051
  ctx.toolState.repos.delete(repoKey(owner, repo));
196939
- rmSync3(dir, { recursive: true, force: true });
197052
+ rmSync4(dir, { recursive: true, force: true });
196940
197053
  throw err;
196941
197054
  }
196942
197055
  })
@@ -197789,35 +197902,25 @@ function billingConsoleUrl(owner) {
197789
197902
  return `https://pullfrog.com/console/${encodeURIComponent(owner)}#billing`;
197790
197903
  }
197791
197904
  function commercialPaywallBody(params) {
197792
- const pitch = "Pro is required on private organization repos like this one: a flat $30/month per organization for unlimited runs, members, and repos.";
197905
+ let action;
197793
197906
  switch (params.reason) {
197794
197907
  case "commercial":
197795
- return [
197796
- `**${params.ownerLogin}'s Pullfrog trial has expired.**`,
197797
- "",
197798
- pitch,
197799
- "",
197800
- `[Upgrade now \u2192](${params.url})`
197801
- ].join("\n");
197908
+ action = "upgrade";
197909
+ break;
197802
197910
  case "subscription_ended":
197803
- return [
197804
- `**${params.ownerLogin}'s Pullfrog Pro subscription has ended.**`,
197805
- "",
197806
- pitch,
197807
- "",
197808
- `[Resubscribe \u2192](${params.url})`
197809
- ].join("\n");
197911
+ action = "resubscribe";
197912
+ break;
197810
197913
  case "subscription_unpaid":
197811
- return [
197812
- `**Pullfrog paused runs on ${params.ownerLogin}: the Pro renewal failed.**`,
197813
- "",
197814
- "Update the card on file to resume runs.",
197815
- "",
197816
- `[Update billing \u2192](${params.url})`
197817
- ].join("\n");
197914
+ action = "update billing";
197915
+ break;
197818
197916
  default:
197819
197917
  return params.reason;
197820
197918
  }
197919
+ return [
197920
+ `**Pullfrog is ${params.freshReply ? "still paused" : "paused"} for ${params.ownerLogin}.**`,
197921
+ "",
197922
+ `An org owner can [${action}](${params.url}) to resume private-repo runs.`
197923
+ ].join("\n");
197821
197924
  }
197822
197925
  function formatCommercialGateSummary(params) {
197823
197926
  return commercialPaywallBody({
@@ -198033,6 +198136,304 @@ async function checkConfiguredCredentials(params) {
198033
198136
  return replacement ? { kind: "fellBack", ...outcome, replacement } : { kind: "dead", ...outcome };
198034
198137
  }
198035
198138
 
198139
+ // utils/normalizeEnv.ts
198140
+ function hasControlCharacter(value2) {
198141
+ return [...value2].some((ch) => {
198142
+ const code = ch.charCodeAt(0);
198143
+ return code < 32 || code === 127;
198144
+ });
198145
+ }
198146
+ function sanitizeSecret(key, value2) {
198147
+ const trimmed = value2.trim();
198148
+ if (trimmed.length === 0) {
198149
+ log2.warning(
198150
+ `\xBB ${key} is whitespace-only \u2014 leaving env var unchanged. check your secret value.`
198151
+ );
198152
+ return null;
198153
+ }
198154
+ if (key.endsWith("_API_KEY") && hasControlCharacter(trimmed)) {
198155
+ log2.warning(
198156
+ `\xBB ${key} contains a line break or control character and cannot be sent as an HTTP header \u2014 leaving env var unchanged. re-save the secret as a single line.`
198157
+ );
198158
+ return null;
198159
+ }
198160
+ if (trimmed !== value2) {
198161
+ log2.warning(
198162
+ `\xBB stripped whitespace from ${key} (whitespace in secret values breaks GitHub Actions log masking)`
198163
+ );
198164
+ }
198165
+ maskSecret(trimmed);
198166
+ return trimmed;
198167
+ }
198168
+ function normalizeEnv() {
198169
+ const upperKeys = /* @__PURE__ */ new Map();
198170
+ for (const key of Object.keys(process.env)) {
198171
+ const upper2 = key.toUpperCase();
198172
+ const existing = upperKeys.get(upper2) || [];
198173
+ existing.push(key);
198174
+ upperKeys.set(upper2, existing);
198175
+ }
198176
+ for (const [upperKey, keys] of upperKeys) {
198177
+ if (keys.length === 1) {
198178
+ const key = keys[0];
198179
+ if (key !== upperKey) {
198180
+ process.env[upperKey] = process.env[key];
198181
+ delete process.env[key];
198182
+ }
198183
+ continue;
198184
+ }
198185
+ const values = keys.map((k2) => process.env[k2]);
198186
+ const uniqueValues = new Set(values);
198187
+ if (uniqueValues.size > 1) {
198188
+ log2.warning(
198189
+ `env var conflict: ${keys.join(", ")} have different values. using uppercase ${upperKey}.`
198190
+ );
198191
+ }
198192
+ const preferredKey = keys.find((k2) => k2 === upperKey) || keys[0];
198193
+ const preferredValue = process.env[preferredKey];
198194
+ for (const key of keys) {
198195
+ delete process.env[key];
198196
+ }
198197
+ process.env[upperKey] = preferredValue;
198198
+ }
198199
+ for (const key of Object.keys(process.env)) {
198200
+ if (!isSensitiveEnvName(key)) continue;
198201
+ const value2 = process.env[key];
198202
+ if (typeof value2 !== "string" || value2.length === 0) continue;
198203
+ const sanitized = sanitizeSecret(key, value2);
198204
+ if (sanitized !== null) process.env[key] = sanitized;
198205
+ }
198206
+ }
198207
+
198208
+ // utils/subscriptionProbe.ts
198209
+ var identitySchema = external_exports.object({
198210
+ email: external_exports.string().email().optional(),
198211
+ sub: external_exports.string().optional(),
198212
+ user_id: external_exports.string().optional(),
198213
+ account_id: external_exports.string().optional(),
198214
+ email_verified: external_exports.boolean().optional()
198215
+ });
198216
+ var codexUsageSchema = external_exports.object({
198217
+ rate_limit: external_exports.object({ allowed: external_exports.boolean(), limit_reached: external_exports.boolean() }).optional()
198218
+ });
198219
+ async function readSubscriptionEndpoint(input) {
198220
+ const headers = new Headers({ authorization: `Bearer ${input.token}` });
198221
+ if (input.accountId) headers.set("ChatGPT-Account-Id", input.accountId);
198222
+ if (input.grokBilling) headers.set("x-xai-token-auth", "xai-grok-cli");
198223
+ return fetch(input.url, {
198224
+ headers,
198225
+ redirect: "error",
198226
+ signal: AbortSignal.timeout(1e4)
198227
+ }).catch(() => null);
198228
+ }
198229
+ async function probeSubscription(input) {
198230
+ if (input.name === "CLAUDE_CODE_OAUTH_TOKEN") {
198231
+ const result = await preflightClaudeSubscription({ token: input.value, model: input.model });
198232
+ return result.usable ? "usable" : "rejected";
198233
+ }
198234
+ const codex2 = input.name === "CODEX_AUTH_JSON" ? parseCodexAuthBody(input.value) : null;
198235
+ const grok = input.name === "GROK_AUTH_JSON" ? parseXaiAuthBody(input.value) : null;
198236
+ const auth2 = codex2 ?? grok;
198237
+ if (!auth2 || auth2.refresh_rejected_at) return "rejected";
198238
+ if (grok && input.model)
198239
+ return probeInference({
198240
+ name: "XAI_API_KEY",
198241
+ value: grok.tokens.access_token,
198242
+ model: input.model
198243
+ });
198244
+ const response = await readSubscriptionEndpoint({
198245
+ url: codex2 ? "https://chatgpt.com/backend-api/wham/usage" : "https://cli-chat-proxy.grok.com/v1/billing?format=credits",
198246
+ token: auth2.tokens.access_token,
198247
+ accountId: codex2?.tokens.account_id,
198248
+ grokBilling: !!grok
198249
+ });
198250
+ if (response?.status === 401) return "rejected";
198251
+ if (!response?.ok) return "unknown";
198252
+ const body = await response.json().catch(() => null);
198253
+ if (codex2) {
198254
+ const parsed2 = codexUsageSchema.safeParse(body);
198255
+ const limit = parsed2.success ? parsed2.data.rate_limit : void 0;
198256
+ if (!limit) return "unknown";
198257
+ return limit.allowed && !limit.limit_reached ? "usable" : "rejected";
198258
+ }
198259
+ return "unknown";
198260
+ }
198261
+ async function probeInference(input) {
198262
+ const anthropic = input.name === "ANTHROPIC_API_KEY";
198263
+ const openai = input.name === "OPENAI_API_KEY";
198264
+ if (!anthropic && !openai && input.name !== "XAI_API_KEY") {
198265
+ const result = await verifyCredential({ envVar: input.name, value: input.value });
198266
+ return result === "dead" ? "rejected" : result === "alive" ? "usable" : "unknown";
198267
+ }
198268
+ const headers = new Headers({ "content-type": "application/json" });
198269
+ if (anthropic) {
198270
+ headers.set("x-api-key", input.value);
198271
+ headers.set("anthropic-version", "2023-06-01");
198272
+ } else headers.set("authorization", `Bearer ${input.value}`);
198273
+ const response = await fetch(
198274
+ anthropic ? "https://api.anthropic.com/v1/messages" : openai ? "https://api.openai.com/v1/responses" : "https://api.x.ai/v1/chat/completions",
198275
+ {
198276
+ method: "POST",
198277
+ headers,
198278
+ body: JSON.stringify(
198279
+ openai ? { model: input.model, input: "Reply OK.", max_output_tokens: 16, store: false } : {
198280
+ model: input.model,
198281
+ messages: [{ role: "user", content: "Reply OK." }],
198282
+ max_tokens: 1
198283
+ }
198284
+ ),
198285
+ redirect: "error",
198286
+ signal: AbortSignal.timeout(1e4)
198287
+ }
198288
+ ).catch(() => null);
198289
+ if (response?.status === 400 && input.name === "XAI_API_KEY") {
198290
+ const error49 = external_exports.object({ error: external_exports.string() }).safeParse(await response.json().catch(() => null));
198291
+ return error49.success && error49.data.error.startsWith("Incorrect API key provided.") ? "rejected" : "unknown";
198292
+ }
198293
+ await response?.body?.cancel();
198294
+ if (!response) return "unknown";
198295
+ if (response.ok) return "usable";
198296
+ return [401, 402, 403, 429].includes(response.status) ? "rejected" : "unknown";
198297
+ }
198298
+
198299
+ // utils/credentialPool.ts
198300
+ var receipts = {};
198301
+ var workflowCredentials = {};
198302
+ function saveReceipts() {
198303
+ for (const receipt of Object.values(receipts)) maskSecret(receipt);
198304
+ saveSecretState("credential_receipts", JSON.stringify(receipts));
198305
+ }
198306
+ var select2 = op(
198307
+ async (input) => {
198308
+ const response = await apiFetch({
198309
+ path: "/api/runtime/credentials",
198310
+ method: "POST",
198311
+ headers: {
198312
+ authorization: `Bearer ${input.access.token}`,
198313
+ "content-type": "application/json"
198314
+ },
198315
+ body: JSON.stringify({ id: input.candidate.id }),
198316
+ signal: AbortSignal.timeout(35e3)
198317
+ });
198318
+ if (response.status === 404) return null;
198319
+ if (!response.ok)
198320
+ throw new Error("could not load a configured credential; no fallback was charged", {
198321
+ cause: response.status
198322
+ });
198323
+ return selectedCredentialSchema.parse(await response.json());
198324
+ },
198325
+ {
198326
+ retries: [250, 1e3],
198327
+ bail: (error49) => error49 instanceof Error && typeof error49.cause === "number" && error49.cause >= 400 && error49.cause < 500
198328
+ }
198329
+ );
198330
+ function subscriptionForModel(model) {
198331
+ if (!model.includes("/")) return null;
198332
+ const provider2 = getModelProvider(model);
198333
+ return provider2 === "anthropic" ? "CLAUDE_CODE_OAUTH_TOKEN" : provider2 === "openai" ? "CODEX_AUTH_JSON" : provider2 === "xai" ? "GROK_AUTH_JSON" : null;
198334
+ }
198335
+ async function initializeCredentialPool(ctx, model) {
198336
+ const access = ctx.credentialAccess;
198337
+ if (!access) return;
198338
+ maskSecret(access.token);
198339
+ const names = /* @__PURE__ */ new Set([
198340
+ ...access.candidates.map((candidate) => candidate.name),
198341
+ ...subscriptionNameSchema.options,
198342
+ "ANTHROPIC_API_KEY",
198343
+ "OPENAI_API_KEY",
198344
+ "XAI_API_KEY"
198345
+ ]);
198346
+ for (const name of names) {
198347
+ const value2 = process.env[name];
198348
+ if (value2) workflowCredentials[name] = value2;
198349
+ }
198350
+ for (const name of subscriptionNameSchema.options) {
198351
+ if (model && subscriptionForModel(model) !== name) continue;
198352
+ if (workflowCredentials[name]) continue;
198353
+ const candidate = access.candidates.find((item) => item.name === name);
198354
+ if (!candidate) continue;
198355
+ const selected = await select2({ access, candidate }).catch(() => {
198356
+ log2.warning(`\xBB could not load ${name} for model discovery; selection will retry if needed`);
198357
+ return null;
198358
+ });
198359
+ if (!selected) continue;
198360
+ const value2 = sanitizeSecret(name, selected.value);
198361
+ if (!value2) continue;
198362
+ process.env[name] = value2;
198363
+ receipts[name] = selected.receipt;
198364
+ }
198365
+ saveReceipts();
198366
+ }
198367
+ function resolvePoolModel(input) {
198368
+ const agent2 = resolveAgent({
198369
+ model: void 0,
198370
+ proxyModel: void 0,
198371
+ codexAgent: input.codexAgent
198372
+ });
198373
+ if (agent2.name === "opencode") return autoSelectModel();
198374
+ const provider2 = agent2.name === "claude" ? "anthropic" : "openai";
198375
+ return modelAliases.find(
198376
+ (alias) => alias.provider === provider2 && alias.preferred && !alias.hidden && !alias.fallback && !alias.routing
198377
+ )?.resolve;
198378
+ }
198379
+ async function selectConfiguredCredential(input) {
198380
+ const access = input.ctx.credentialAccess;
198381
+ const model = input.model;
198382
+ if (!access || !model?.includes("/") || getProviderGatewayUrl(model)) return false;
198383
+ const subscription = subscriptionForModel(model);
198384
+ const names = getModelEnvVars(model).filter((name) => name !== subscription);
198385
+ if (subscription) names.unshift(subscription);
198386
+ const candidates = access.candidates.filter((candidate) => names.includes(candidate.name));
198387
+ const workflow = names.filter((name) => workflowCredentials[name]);
198388
+ if (!candidates.length && !workflow.length) return false;
198389
+ for (const name of workflow) {
198390
+ const value2 = workflowCredentials[name];
198391
+ if (await usable({ name, value: value2, model })) {
198392
+ activate({ names, name, value: value2, receipt: void 0 });
198393
+ return true;
198394
+ }
198395
+ }
198396
+ for (const candidate of candidates) {
198397
+ const selected = await select2({ access, candidate });
198398
+ if (!selected) continue;
198399
+ if (await usable({ ...selected, model })) {
198400
+ activate({ names, ...selected });
198401
+ log2.info(`\xBB selected ${candidate.name} from ${candidate.source} scope`);
198402
+ return true;
198403
+ }
198404
+ log2.info(
198405
+ `\xBB ${candidate.name} from ${candidate.source} scope unavailable; trying the next credential`
198406
+ );
198407
+ }
198408
+ throw new Error(
198409
+ `all configured credentials for ${model} were rejected or exhausted; no other model or provider was selected`
198410
+ );
198411
+ }
198412
+ async function usable(input) {
198413
+ const subscription = subscriptionNameSchema.safeParse(input.name);
198414
+ if (subscription.success)
198415
+ return await probeSubscription({
198416
+ name: subscription.data,
198417
+ value: input.value,
198418
+ model: stripProviderPrefix(input.model)
198419
+ }) !== "rejected";
198420
+ return await probeInference({ ...input, model: stripProviderPrefix(input.model) }) !== "rejected";
198421
+ }
198422
+ function activate(input) {
198423
+ for (const name of input.names) {
198424
+ delete process.env[name];
198425
+ delete receipts[name];
198426
+ if (name === "CODEX_AUTH_JSON" || name === "GROK_AUTH_JSON") clearInstalledSubscription(name);
198427
+ }
198428
+ const value2 = sanitizeSecret(input.name, input.value);
198429
+ if (!value2) throw new Error("configured credential was empty");
198430
+ process.env[input.name] = value2;
198431
+ if (input.receipt) receipts[input.name] = input.receipt;
198432
+ installCodexAuth();
198433
+ installXaiAuth();
198434
+ saveReceipts();
198435
+ }
198436
+
198036
198437
  // utils/gitAuthServer.ts
198037
198438
  import { randomUUID as randomUUID5 } from "node:crypto";
198038
198439
  import { writeFileSync as writeFileSync15 } from "node:fs";
@@ -198736,75 +199137,6 @@ function buildModelAccessError(input) {
198736
199137
  return [headline, "", why, "", cta].join("\n");
198737
199138
  }
198738
199139
 
198739
- // utils/normalizeEnv.ts
198740
- function hasControlCharacter(value2) {
198741
- return [...value2].some((ch) => {
198742
- const code = ch.charCodeAt(0);
198743
- return code < 32 || code === 127;
198744
- });
198745
- }
198746
- function sanitizeSecret(key, value2) {
198747
- const trimmed = value2.trim();
198748
- if (trimmed.length === 0) {
198749
- log2.warning(
198750
- `\xBB ${key} is whitespace-only \u2014 leaving env var unchanged. check your secret value.`
198751
- );
198752
- return null;
198753
- }
198754
- if (key.endsWith("_API_KEY") && hasControlCharacter(trimmed)) {
198755
- log2.warning(
198756
- `\xBB ${key} contains a line break or control character and cannot be sent as an HTTP header \u2014 leaving env var unchanged. re-save the secret as a single line.`
198757
- );
198758
- return null;
198759
- }
198760
- if (trimmed !== value2) {
198761
- log2.warning(
198762
- `\xBB stripped whitespace from ${key} (whitespace in secret values breaks GitHub Actions log masking)`
198763
- );
198764
- }
198765
- maskSecret(trimmed);
198766
- return trimmed;
198767
- }
198768
- function normalizeEnv() {
198769
- const upperKeys = /* @__PURE__ */ new Map();
198770
- for (const key of Object.keys(process.env)) {
198771
- const upper2 = key.toUpperCase();
198772
- const existing = upperKeys.get(upper2) || [];
198773
- existing.push(key);
198774
- upperKeys.set(upper2, existing);
198775
- }
198776
- for (const [upperKey, keys] of upperKeys) {
198777
- if (keys.length === 1) {
198778
- const key = keys[0];
198779
- if (key !== upperKey) {
198780
- process.env[upperKey] = process.env[key];
198781
- delete process.env[key];
198782
- }
198783
- continue;
198784
- }
198785
- const values = keys.map((k2) => process.env[k2]);
198786
- const uniqueValues = new Set(values);
198787
- if (uniqueValues.size > 1) {
198788
- log2.warning(
198789
- `env var conflict: ${keys.join(", ")} have different values. using uppercase ${upperKey}.`
198790
- );
198791
- }
198792
- const preferredKey = keys.find((k2) => k2 === upperKey) || keys[0];
198793
- const preferredValue = process.env[preferredKey];
198794
- for (const key of keys) {
198795
- delete process.env[key];
198796
- }
198797
- process.env[upperKey] = preferredValue;
198798
- }
198799
- for (const key of Object.keys(process.env)) {
198800
- if (!isSensitiveEnvName(key)) continue;
198801
- const value2 = process.env[key];
198802
- if (typeof value2 !== "string" || value2.length === 0) continue;
198803
- const sanitized = sanitizeSecret(key, value2);
198804
- if (sanitized !== null) process.env[key] = sanitized;
198805
- }
198806
- }
198807
-
198808
199140
  // utils/overrides.ts
198809
199141
  var DENIED_OVERRIDE_NAMES = /* @__PURE__ */ new Set([
198810
199142
  "GITHUB_TOKEN",
@@ -199759,7 +200091,8 @@ async function fetchRunContext(params) {
199759
200091
  const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
199760
200092
  try {
199761
200093
  const headers = {
199762
- Authorization: `Bearer ${params.token}`
200094
+ Authorization: `Bearer ${params.token}`,
200095
+ "X-Pullfrog-Credential-Pools": "1"
199763
200096
  };
199764
200097
  if (params.oidcToken) {
199765
200098
  headers["X-GitHub-OIDC-Token"] = params.oidcToken;
@@ -199806,6 +200139,7 @@ async function fetchRunContext(params) {
199806
200139
  plan: data.plan ?? "none",
199807
200140
  proxyModel: data.proxyModel,
199808
200141
  dbSecrets: data.dbSecrets,
200142
+ credentialAccess: data.credentialAccess,
199809
200143
  secretsUnavailable: data.secretsUnavailable,
199810
200144
  routerUnfunded: data.routerUnfunded,
199811
200145
  trialFallback: data.trialFallback
@@ -199857,6 +200191,7 @@ async function resolveRunContextData(params) {
199857
200191
  plan: runContext.plan,
199858
200192
  proxyModel: runContext.proxyModel,
199859
200193
  dbSecrets: runContext.dbSecrets,
200194
+ credentialAccess: runContext.credentialAccess,
199860
200195
  commercialRefused: runContext.commercialRefused,
199861
200196
  // a failed mint on a runner that should have been able to mint is the same
199862
200197
  // outcome as the server-side failure: the run never sees stored secrets.
@@ -201021,11 +201356,13 @@ async function main() {
201021
201356
  _promise2 && await _promise2;
201022
201357
  }
201023
201358
  }
201024
- const tmpdir4 = createTempDirectory();
201359
+ const tempDir = __using(_stack3, createTempDirectory());
201360
+ const tmpdir4 = tempDir.path;
201025
201361
  const repoDir = payload.cwd;
201026
201362
  const preIntrospectionDirty = repoDir ? await dirtyTrackedPaths({ cwd: repoDir }) : null;
201027
201363
  const opencodeCliPath = await agents.opencode.install();
201028
201364
  captureBaselineModels(opencodeCliPath);
201365
+ await initializeCredentialPool(runContext, resolveModel({ slug: payload.model }));
201029
201366
  if (runContext.dbSecrets) {
201030
201367
  for (const [key, value2] of Object.entries(runContext.dbSecrets)) {
201031
201368
  if (!process.env[key]) {
@@ -201109,14 +201446,27 @@ async function main() {
201109
201446
  }
201110
201447
  const gitAuthServer = __using(_stack2, await startGitAuthServer(tmpdir4), true);
201111
201448
  setGitAuthServer(gitAuthServer);
201449
+ let configuredModel = resolveModel({ slug: payload.model });
201450
+ if (!configuredModel && !payload.proxyModel && runContext.credentialAccess?.candidates.length) {
201451
+ configuredModel = resolvePoolModel({
201452
+ codexAgent: runContext.repoSettings.codexAgent || payload.codexArm === true
201453
+ });
201454
+ }
201455
+ let poolSelected = !payload.proxyModel && await selectConfiguredCredential({
201456
+ ctx: runContext,
201457
+ model: configuredModel
201458
+ });
201112
201459
  const access = decideModelAccess({
201113
201460
  modelExplicit: payload.modelExplicit ?? false,
201114
201461
  model: payload.model,
201115
201462
  oss: runContext.oss,
201116
201463
  proxyActive: !!payload.proxyModel,
201117
201464
  subsidyTarget: runContext.proxyModel,
201118
- resolvedModel: resolveModel({ slug: payload.model }),
201119
- authorized: getAuthorizedModels()
201465
+ resolvedModel: configuredModel,
201466
+ authorized: /* @__PURE__ */ new Set([
201467
+ ...getAuthorizedModels(),
201468
+ ...poolSelected && configuredModel ? [configuredModel] : []
201469
+ ])
201120
201470
  });
201121
201471
  if (access.kind === "error") {
201122
201472
  throw new Error(
@@ -201129,12 +201479,25 @@ async function main() {
201129
201479
  );
201130
201480
  }
201131
201481
  if (access.kind === "proxy") payload.proxyModel = access.target;
201132
- if (access.kind === "byok") payload.proxyModel = void 0;
201482
+ if (access.kind === "byok") {
201483
+ payload.proxyModel = void 0;
201484
+ if (!poolSelected)
201485
+ poolSelected = await selectConfiguredCredential({
201486
+ ctx: runContext,
201487
+ model: configuredModel
201488
+ });
201489
+ }
201490
+ if (poolSelected) {
201491
+ const before = repoDir ? await dirtyTrackedPaths({ cwd: repoDir }) : null;
201492
+ captureAuthorizedModels(opencodeCliPath);
201493
+ if (before && repoDir)
201494
+ await restoreDirtiedSince({ before, actor: "model introspection", cwd: repoDir });
201495
+ }
201133
201496
  if (runContext.oss && payload.proxyModel) {
201134
201497
  payload.effort = ossEffortFloor({ payload });
201135
201498
  }
201136
- const configuredModel = payload.proxyModel ? void 0 : resolveModel({ slug: payload.model });
201137
- const credentials = payload.proxyModel ? { kind: "ok" } : await checkConfiguredCredentials({
201499
+ if (payload.proxyModel) configuredModel = void 0;
201500
+ const credentials = payload.proxyModel || poolSelected ? { kind: "ok" } : await checkConfiguredCredentials({
201138
201501
  model: configuredModel,
201139
201502
  authorized: getAuthorizedModels()
201140
201503
  });
@@ -201465,12 +201828,12 @@ ${instructions.user}` : null,
201465
201828
  if (payload.timeout === TIMEOUT_DISABLED) {
201466
201829
  result = await Promise.race([agentPromise, activityTimeout.promise]);
201467
201830
  } else {
201468
- const usable = resolveTimeoutMs(payload.timeout);
201469
- if (payload.timeout && usable === null) {
201831
+ const usable2 = resolveTimeoutMs(payload.timeout);
201832
+ if (payload.timeout && usable2 === null) {
201470
201833
  log2.warning(`invalid timeout "${payload.timeout}" (use --notimeout to disable), using 1h`);
201471
201834
  }
201472
- const timeoutMs = usable ?? 36e5;
201473
- const actualTimeout = usable !== null ? payload.timeout : "1h";
201835
+ const timeoutMs = usable2 ?? 36e5;
201836
+ const actualTimeout = usable2 !== null ? payload.timeout : "1h";
201474
201837
  let timeoutId;
201475
201838
  const timeoutPromise = new Promise((_4, reject) => {
201476
201839
  timeoutId = setTimeout(() => {
@@ -201613,7 +201976,7 @@ function printGhaTokenUsage(params) {
201613
201976
  params.stream(" --post revoke the previously-acquired token (post-step usage only)");
201614
201977
  }
201615
201978
  function parseGhaArgs(args2) {
201616
- return (0, import_arg5.default)(
201979
+ return (0, import_arg6.default)(
201617
201980
  {
201618
201981
  "--help": Boolean,
201619
201982
  "--post": Boolean,
@@ -201626,7 +201989,7 @@ function parseGhaArgs(args2) {
201626
201989
  );
201627
201990
  }
201628
201991
  function parseGhaTokenArgs(args2) {
201629
- return (0, import_arg5.default)(
201992
+ return (0, import_arg6.default)(
201630
201993
  {
201631
201994
  "--help": Boolean,
201632
201995
  "--post": Boolean,
@@ -201717,7 +202080,7 @@ async function run(args2) {
201717
202080
 
201718
202081
  // commands/init.ts
201719
202082
  import { execFileSync as execFileSync8 } from "node:child_process";
201720
- var import_arg6 = __toESM(require_arg(), 1);
202083
+ var import_arg7 = __toESM(require_arg(), 1);
201721
202084
  var import_picocolors3 = __toESM(require_picocolors(), 1);
201722
202085
  function link(text, url4) {
201723
202086
  return `\x1B]8;;${url4}\x07${text}\x1B]8;;\x07`;
@@ -201923,7 +202286,7 @@ function printInitUsage(params) {
201923
202286
  params.stream(" -h, --help show help");
201924
202287
  }
201925
202288
  function parseInitArgs(args2) {
201926
- return (0, import_arg6.default)(
202289
+ return (0, import_arg7.default)(
201927
202290
  {
201928
202291
  "--help": Boolean,
201929
202292
  "-h": "--help"
@@ -202098,7 +202461,7 @@ function resolveTarget2(repo) {
202098
202461
  return { owner: match3[1], repo: match3[2] };
202099
202462
  }
202100
202463
  function cliVersion() {
202101
- const parts = /^(\d+)\.(\d+)\.(\d+)$/.exec("0.1.84");
202464
+ const parts = /^(\d+)\.(\d+)\.(\d+)$/.exec("0.1.85");
202102
202465
  if (!parts) return "0.0.0";
202103
202466
  return `${Number(parts[1])}.${Number(parts[2])}.${Number(parts[3])}`;
202104
202467
  }
@@ -202155,10 +202518,10 @@ async function runCli7(input) {
202155
202518
  }
202156
202519
 
202157
202520
  // commands/watch.ts
202158
- var import_arg7 = __toESM(require_arg(), 1);
202521
+ var import_arg8 = __toESM(require_arg(), 1);
202159
202522
  var import_picocolors4 = __toESM(require_picocolors(), 1);
202160
202523
  function parseWatchArgs(args2) {
202161
- return (0, import_arg7.default)(
202524
+ return (0, import_arg8.default)(
202162
202525
  {
202163
202526
  "--pr": Number,
202164
202527
  "--pretty": Boolean,
@@ -202265,7 +202628,7 @@ async function runCli8(input) {
202265
202628
  }
202266
202629
 
202267
202630
  // cli.ts
202268
- var VERSION10 = "0.1.84";
202631
+ var VERSION10 = "0.1.85";
202269
202632
  var bin = basename2(process.argv[1] || "");
202270
202633
  var PROG = bin === "pf" || bin === "pullfrog" ? bin : "pullfrog";
202271
202634
  var rawArgs = process.argv.slice(2);
@@ -202286,7 +202649,7 @@ function printMainUsage(stream) {
202286
202649
  stream(" -v, --version show version");
202287
202650
  }
202288
202651
  function parseGlobalArgs(args2) {
202289
- return (0, import_arg8.default)(
202652
+ return (0, import_arg9.default)(
202290
202653
  {
202291
202654
  "--help": Boolean,
202292
202655
  "--version": Boolean,