pullfrog 0.1.84 → 0.1.86
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 +405 -310
- package/dist/configuration.d.ts +2 -2
- package/dist/external.d.ts +1 -1
- package/dist/index.js +85101 -85079
- package/dist/internal/index.d.ts +2 -0
- package/dist/internal.js +210 -39
- package/dist/utils/billingErrors.d.ts +1 -0
- package/dist/utils/codexHome.d.ts +1 -0
- package/dist/utils/runContext.d.ts +2 -0
- package/dist/utils/runContextData.d.ts +2 -0
- package/dist/utils/setup.d.ts +8 -2
- package/dist/utils/subscriptionCredentials.d.ts +80 -0
- package/dist/utils/subscriptionProbe.d.ts +22 -0
- package/package.json +1 -1
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
|
|
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
|
|
175
|
-
const [originalArgName, argStr] =
|
|
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(
|
|
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
|
-
|
|
221
|
+
arg10.flag = (fn2) => {
|
|
222
222
|
fn2[flagSymbol] = true;
|
|
223
223
|
return fn2;
|
|
224
224
|
};
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
module.exports =
|
|
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(
|
|
2098
|
-
if (typeof
|
|
2099
|
-
|
|
2100
|
-
|
|
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 =
|
|
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(
|
|
31442
|
+
_windowsQuoteCmdArg(arg10) {
|
|
31443
31443
|
if (!this._isCmdFile()) {
|
|
31444
|
-
return this._uvQuoteCmdArg(
|
|
31444
|
+
return this._uvQuoteCmdArg(arg10);
|
|
31445
31445
|
}
|
|
31446
|
-
if (!
|
|
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
|
|
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
|
|
31481
|
+
return arg10;
|
|
31482
31482
|
}
|
|
31483
31483
|
let reverse = '"';
|
|
31484
31484
|
let quoteHit = true;
|
|
31485
|
-
for (let i2 =
|
|
31486
|
-
reverse +=
|
|
31487
|
-
if (quoteHit &&
|
|
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 (
|
|
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(
|
|
31500
|
-
if (!
|
|
31499
|
+
_uvQuoteCmdArg(arg10) {
|
|
31500
|
+
if (!arg10) {
|
|
31501
31501
|
return '""';
|
|
31502
31502
|
}
|
|
31503
|
-
if (!
|
|
31504
|
-
return
|
|
31503
|
+
if (!arg10.includes(" ") && !arg10.includes(" ") && !arg10.includes('"')) {
|
|
31504
|
+
return arg10;
|
|
31505
31505
|
}
|
|
31506
|
-
if (!
|
|
31507
|
-
return `"${
|
|
31506
|
+
if (!arg10.includes('"') && !arg10.includes("\\")) {
|
|
31507
|
+
return `"${arg10}"`;
|
|
31508
31508
|
}
|
|
31509
31509
|
let reverse = '"';
|
|
31510
31510
|
let quoteHit = true;
|
|
31511
|
-
for (let i2 =
|
|
31512
|
-
reverse +=
|
|
31513
|
-
if (quoteHit &&
|
|
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 (
|
|
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
|
|
31570
|
-
this._debug(` ${
|
|
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
|
|
31667
|
+
let arg10 = "";
|
|
31668
31668
|
function append2(c2) {
|
|
31669
31669
|
if (escaped && c2 !== '"') {
|
|
31670
|
-
|
|
31670
|
+
arg10 += "\\";
|
|
31671
31671
|
}
|
|
31672
|
-
|
|
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 (
|
|
31695
|
-
args2.push(
|
|
31696
|
-
|
|
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 (
|
|
31703
|
-
args2.push(
|
|
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(
|
|
40195
|
-
|
|
40196
|
-
return
|
|
40197
|
-
}
|
|
40198
|
-
function escapeArgument(
|
|
40199
|
-
|
|
40200
|
-
|
|
40201
|
-
|
|
40202
|
-
|
|
40203
|
-
|
|
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
|
-
|
|
40205
|
+
arg10 = arg10.replace(metaCharsRegExp, "^$1");
|
|
40206
40206
|
}
|
|
40207
|
-
return
|
|
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((
|
|
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,
|
|
40584
|
+
constructor(callback, delay2, arg10) {
|
|
40585
40585
|
this._onTimeout = callback;
|
|
40586
40586
|
this._idleTimeout = delay2;
|
|
40587
|
-
this._timerArg =
|
|
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,
|
|
40632
|
-
return delay2 <= RESOLUTION_MS ? setTimeout(callback, delay2,
|
|
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,
|
|
40659
|
-
return new FastTimer(callback, delay2,
|
|
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: (
|
|
69746
|
-
addIssueToContext(ctx,
|
|
69747
|
-
if (
|
|
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,
|
|
71915
|
-
if (
|
|
71916
|
-
code.push(...
|
|
71917
|
-
else if (
|
|
71918
|
-
code.push(
|
|
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(
|
|
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*/),
|
|
83552
|
-
return nth(
|
|
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);
|
|
@@ -103311,7 +103311,7 @@ var init_file_type = __esm({
|
|
|
103311
103311
|
});
|
|
103312
103312
|
|
|
103313
103313
|
// cli.ts
|
|
103314
|
-
var
|
|
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
|
|
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 = (
|
|
105532
|
-
inst.and = (
|
|
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.
|
|
107106
|
+
version: "0.1.86",
|
|
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/
|
|
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,
|
|
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,
|
|
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
|
-
|
|
107744
|
-
|
|
107745
|
-
|
|
107746
|
-
|
|
107747
|
-
|
|
107748
|
-
|
|
107749
|
-
|
|
107750
|
-
|
|
107751
|
-
|
|
107752
|
-
|
|
107753
|
-
|
|
107754
|
-
|
|
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
|
|
107921
|
+
const result = await saveSubscription({
|
|
107828
107922
|
token,
|
|
107829
|
-
|
|
107830
|
-
repo: remote.repo,
|
|
107923
|
+
target: subscriptionTarget,
|
|
107831
107924
|
name: CODEX_AUTH_SECRET,
|
|
107832
107925
|
value: savable.json,
|
|
107833
|
-
|
|
107926
|
+
replaceId: choice.replaceId
|
|
107834
107927
|
});
|
|
107835
|
-
|
|
107836
|
-
|
|
107837
|
-
|
|
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,
|
|
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
|
-
|
|
107921
|
-
|
|
107922
|
-
|
|
107923
|
-
|
|
107924
|
-
|
|
107925
|
-
|
|
107926
|
-
|
|
107927
|
-
|
|
107928
|
-
|
|
107929
|
-
|
|
107930
|
-
|
|
107931
|
-
|
|
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
|
|
108046
|
+
const result = await saveSubscription({
|
|
107962
108047
|
token,
|
|
107963
|
-
|
|
107964
|
-
repo: remote.repo,
|
|
108048
|
+
target: subscriptionTarget,
|
|
107965
108049
|
name: CLAUDE_OAUTH_SECRET,
|
|
107966
108050
|
value: value2,
|
|
107967
|
-
|
|
108051
|
+
replaceId: choice.replaceId
|
|
107968
108052
|
});
|
|
107969
|
-
|
|
107970
|
-
|
|
107971
|
-
|
|
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
|
-
|
|
108056
|
-
|
|
108057
|
-
|
|
108058
|
-
|
|
108059
|
-
|
|
108060
|
-
|
|
108061
|
-
|
|
108062
|
-
|
|
108063
|
-
|
|
108064
|
-
|
|
108065
|
-
|
|
108066
|
-
|
|
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
|
|
108168
|
+
const result = await saveSubscription({
|
|
108093
108169
|
token,
|
|
108094
|
-
|
|
108095
|
-
repo: remote.repo,
|
|
108170
|
+
target: subscriptionTarget,
|
|
108096
108171
|
name: GROK_AUTH_SECRET,
|
|
108097
108172
|
value: stringifyXaiAuthBody(fresh),
|
|
108098
|
-
|
|
108173
|
+
replaceId: choice.replaceId
|
|
108099
108174
|
});
|
|
108100
|
-
|
|
108101
|
-
|
|
108102
|
-
|
|
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
|
|
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,
|
|
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
|
|
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,
|
|
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
|
|
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: {
|
|
@@ -110230,8 +110310,8 @@ var providers = {
|
|
|
110230
110310
|
},
|
|
110231
110311
|
"claude-sonnet": {
|
|
110232
110312
|
displayName: "Claude Sonnet",
|
|
110233
|
-
resolve: "vercel/anthropic/claude-sonnet-5",
|
|
110234
|
-
effort: ["
|
|
110313
|
+
resolve: "vercel/anthropic/claude-sonnet-5.5",
|
|
110314
|
+
effort: ["low", "medium", "high", "xhigh", "max"]
|
|
110235
110315
|
},
|
|
110236
110316
|
"claude-haiku": {
|
|
110237
110317
|
displayName: "Claude Haiku",
|
|
@@ -110367,7 +110447,7 @@ function isAutoTier(slug2) {
|
|
|
110367
110447
|
}
|
|
110368
110448
|
var PROVIDER_LADDERS = {
|
|
110369
110449
|
anthropic: {
|
|
110370
|
-
minimal: "anthropic/claude-
|
|
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((
|
|
110846
|
-
if (typeof
|
|
110847
|
-
if (
|
|
110848
|
-
${
|
|
110849
|
-
return JSON.stringify(
|
|
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,7 @@ 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();
|
|
113440
113521
|
var PULLFROG_DATA_DIR = "/var/lib/pullfrog";
|
|
113441
113522
|
function isRejectedChain(body) {
|
|
113442
113523
|
if (!body.refresh_rejected_at) return false;
|
|
@@ -113472,6 +113553,7 @@ function installCodexAuth() {
|
|
|
113472
113553
|
});
|
|
113473
113554
|
process.env.XDG_DATA_HOME = xdgDataHome;
|
|
113474
113555
|
log2.info(`\xBB installed Codex auth at ${authPath}`);
|
|
113556
|
+
installedSubscriptionPaths.set(CODEX_AUTH_ENV, authPath);
|
|
113475
113557
|
return {
|
|
113476
113558
|
authPath,
|
|
113477
113559
|
xdgDataHome,
|
|
@@ -113523,6 +113605,7 @@ function installXaiAuth() {
|
|
|
113523
113605
|
});
|
|
113524
113606
|
process.env.XDG_DATA_HOME = xdgDataHome;
|
|
113525
113607
|
log2.info(`\xBB installed Grok auth at ${authPath}`);
|
|
113608
|
+
installedSubscriptionPaths.set(XAI_AUTH_ENV, authPath);
|
|
113526
113609
|
return { authPath, xdgDataHome, originalRefresh: body.tokens.refresh_token };
|
|
113527
113610
|
}
|
|
113528
113611
|
function isXaiRejectedChain(body) {
|
|
@@ -113764,14 +113847,18 @@ async function writeBackEntry(apiToken, entry) {
|
|
|
113764
113847
|
return;
|
|
113765
113848
|
}
|
|
113766
113849
|
try {
|
|
113850
|
+
const poolState = core2.getState("credential_receipts");
|
|
113851
|
+
const receipts = external_exports.record(external_exports.string(), external_exports.string()).parse(JSON.parse(poolState || "{}"));
|
|
113852
|
+
const receipt = receipts[entry.secretName];
|
|
113853
|
+
if (poolState && !receipt) return;
|
|
113767
113854
|
const response = await apiFetch({
|
|
113768
|
-
path: "/api/runtime/secret",
|
|
113855
|
+
path: receipt ? "/api/runtime/credentials" : "/api/runtime/secret",
|
|
113769
113856
|
method: "PUT",
|
|
113770
113857
|
headers: {
|
|
113771
113858
|
authorization: `Bearer ${apiToken}`,
|
|
113772
113859
|
"content-type": "application/json"
|
|
113773
113860
|
},
|
|
113774
|
-
body: JSON.stringify({ name: entry.secretName, value: refreshed }),
|
|
113861
|
+
body: JSON.stringify({ name: entry.secretName, value: refreshed, receipt }),
|
|
113775
113862
|
// the workflow is already finished; a hung write-back would hold the
|
|
113776
113863
|
// runner open for nothing.
|
|
113777
113864
|
signal: AbortSignal.timeout(3e4)
|
|
@@ -115265,7 +115352,7 @@ var buildClientParams = (args2, fields) => {
|
|
|
115265
115352
|
};
|
|
115266
115353
|
const map2 = buildKeyMap(fields);
|
|
115267
115354
|
let config3;
|
|
115268
|
-
for (const [index,
|
|
115355
|
+
for (const [index, arg10] of args2.entries()) {
|
|
115269
115356
|
if (fields[index]) {
|
|
115270
115357
|
config3 = fields[index];
|
|
115271
115358
|
}
|
|
@@ -115278,13 +115365,13 @@ var buildClientParams = (args2, fields) => {
|
|
|
115278
115365
|
const name = field.map || config3.key;
|
|
115279
115366
|
if (field.in) {
|
|
115280
115367
|
;
|
|
115281
|
-
params[field.in][name] =
|
|
115368
|
+
params[field.in][name] = arg10;
|
|
115282
115369
|
}
|
|
115283
115370
|
} else {
|
|
115284
|
-
params.body =
|
|
115371
|
+
params.body = arg10;
|
|
115285
115372
|
}
|
|
115286
115373
|
} else {
|
|
115287
|
-
for (const [key, value2] of Object.entries(
|
|
115374
|
+
for (const [key, value2] of Object.entries(arg10 ?? {})) {
|
|
115288
115375
|
const field = map2.get(key);
|
|
115289
115376
|
if (field) {
|
|
115290
115377
|
if (field.in) {
|
|
@@ -121892,12 +121979,12 @@ var CompiledFunction = class extends CastableBase {
|
|
|
121892
121979
|
constructor(...args2) {
|
|
121893
121980
|
super();
|
|
121894
121981
|
this.argNames = args2;
|
|
121895
|
-
for (const
|
|
121896
|
-
if (
|
|
121897
|
-
throw new Error(`Arg name '${
|
|
121982
|
+
for (const arg10 of args2) {
|
|
121983
|
+
if (arg10 in this) {
|
|
121984
|
+
throw new Error(`Arg name '${arg10}' would overwrite an existing property on FunctionBody`);
|
|
121898
121985
|
}
|
|
121899
121986
|
;
|
|
121900
|
-
this[
|
|
121987
|
+
this[arg10] = arg10;
|
|
121901
121988
|
}
|
|
121902
121989
|
}
|
|
121903
121990
|
indentation = 0;
|
|
@@ -121982,12 +122069,12 @@ var NodeCompiler = class extends CompiledFunction {
|
|
|
121982
122069
|
this.optimistic = ctx.optimistic === true;
|
|
121983
122070
|
}
|
|
121984
122071
|
invoke(node2, opts) {
|
|
121985
|
-
const
|
|
122072
|
+
const arg10 = opts?.arg ?? this.data;
|
|
121986
122073
|
const requiresContext = typeof node2 === "string" ? true : this.requiresContextFor(node2);
|
|
121987
122074
|
const id = typeof node2 === "string" ? node2 : node2.id;
|
|
121988
122075
|
if (requiresContext)
|
|
121989
|
-
return `${this.referenceToId(id, opts)}(${
|
|
121990
|
-
return `${this.referenceToId(id, opts)}(${
|
|
122076
|
+
return `${this.referenceToId(id, opts)}(${arg10}, ${this.ctx})`;
|
|
122077
|
+
return `${this.referenceToId(id, opts)}(${arg10})`;
|
|
121991
122078
|
}
|
|
121992
122079
|
referenceToId(id, opts) {
|
|
121993
122080
|
const invokedKind = opts?.kind ?? this.traversalKind;
|
|
@@ -128152,11 +128239,11 @@ var Context = class {
|
|
|
128152
128239
|
}
|
|
128153
128240
|
return Object.fromEntries(this.#var);
|
|
128154
128241
|
}
|
|
128155
|
-
#newResponse(data,
|
|
128242
|
+
#newResponse(data, arg10, headers) {
|
|
128156
128243
|
let responseHeaders = this.#res ? new Headers(this.#res.headers) : this.#preparedHeaders;
|
|
128157
|
-
if (typeof
|
|
128244
|
+
if (typeof arg10 === "object" && arg10.headers) {
|
|
128158
128245
|
responseHeaders ??= new Headers();
|
|
128159
|
-
for (const [key, value2] of new Headers(
|
|
128246
|
+
for (const [key, value2] of new Headers(arg10.headers)) {
|
|
128160
128247
|
if (key === "set-cookie") {
|
|
128161
128248
|
responseHeaders.append(key, value2);
|
|
128162
128249
|
} else {
|
|
@@ -128188,7 +128275,7 @@ var Context = class {
|
|
|
128188
128275
|
}
|
|
128189
128276
|
}
|
|
128190
128277
|
}
|
|
128191
|
-
const status = typeof
|
|
128278
|
+
const status = typeof arg10 === "number" ? arg10 : arg10?.status ?? this.#status;
|
|
128192
128279
|
return createResponseInstance(data, {
|
|
128193
128280
|
status,
|
|
128194
128281
|
headers: responseHeaders ?? headers
|
|
@@ -128216,7 +128303,7 @@ var Context = class {
|
|
|
128216
128303
|
* })
|
|
128217
128304
|
* ```
|
|
128218
128305
|
*/
|
|
128219
|
-
body = (data,
|
|
128306
|
+
body = (data, arg10, headers) => this.#newResponse(data, arg10, headers);
|
|
128220
128307
|
/**
|
|
128221
128308
|
* `.text()` can render text as `Content-Type:text/plain`.
|
|
128222
128309
|
*
|
|
@@ -128229,10 +128316,10 @@ var Context = class {
|
|
|
128229
128316
|
* })
|
|
128230
128317
|
* ```
|
|
128231
128318
|
*/
|
|
128232
|
-
text = (text,
|
|
128233
|
-
return !this.#preparedHeaders && !this.#status && !
|
|
128319
|
+
text = (text, arg10, headers) => {
|
|
128320
|
+
return !this.#preparedHeaders && !this.#status && !arg10 && !headers && !this.finalized ? new Response(text) : this.#newResponse(
|
|
128234
128321
|
text,
|
|
128235
|
-
|
|
128322
|
+
arg10,
|
|
128236
128323
|
setDefaultContentType(TEXT_PLAIN, headers)
|
|
128237
128324
|
);
|
|
128238
128325
|
};
|
|
@@ -128248,15 +128335,15 @@ var Context = class {
|
|
|
128248
128335
|
* })
|
|
128249
128336
|
* ```
|
|
128250
128337
|
*/
|
|
128251
|
-
json = (object5,
|
|
128338
|
+
json = (object5, arg10, headers) => {
|
|
128252
128339
|
return this.#newResponse(
|
|
128253
128340
|
JSON.stringify(object5),
|
|
128254
|
-
|
|
128341
|
+
arg10,
|
|
128255
128342
|
setDefaultContentType("application/json", headers)
|
|
128256
128343
|
);
|
|
128257
128344
|
};
|
|
128258
|
-
html = (html,
|
|
128259
|
-
const res = (html2) => this.#newResponse(html2,
|
|
128345
|
+
html = (html, arg10, headers) => {
|
|
128346
|
+
const res = (html2) => this.#newResponse(html2, arg10, setDefaultContentType("text/html; charset=UTF-8", headers));
|
|
128260
128347
|
return typeof html === "object" ? resolveCallback(html, HtmlEscapedCallbackPhase.Stringify, false, {}).then(res) : res(html);
|
|
128261
128348
|
};
|
|
128262
128349
|
/**
|
|
@@ -135228,10 +135315,10 @@ var require_code$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
135228
135315
|
return new _Code(expr);
|
|
135229
135316
|
}
|
|
135230
135317
|
exports.str = str;
|
|
135231
|
-
function addCodeArg(code,
|
|
135232
|
-
if (
|
|
135233
|
-
else if (
|
|
135234
|
-
else code.push(interpolate(
|
|
135318
|
+
function addCodeArg(code, arg10) {
|
|
135319
|
+
if (arg10 instanceof _Code) code.push(...arg10._items);
|
|
135320
|
+
else if (arg10 instanceof Name) code.push(arg10);
|
|
135321
|
+
else code.push(interpolate(arg10));
|
|
135235
135322
|
}
|
|
135236
135323
|
exports.addCodeArg = addCodeArg;
|
|
135237
135324
|
function optimize(expr) {
|
|
@@ -149503,10 +149590,10 @@ var require_code$12 = /* @__PURE__ */ __commonJSMin2(((exports) => {
|
|
|
149503
149590
|
return new _Code(expr);
|
|
149504
149591
|
}
|
|
149505
149592
|
exports.str = str;
|
|
149506
|
-
function addCodeArg(code,
|
|
149507
|
-
if (
|
|
149508
|
-
else if (
|
|
149509
|
-
else code.push(interpolate(
|
|
149593
|
+
function addCodeArg(code, arg10) {
|
|
149594
|
+
if (arg10 instanceof _Code) code.push(...arg10._items);
|
|
149595
|
+
else if (arg10 instanceof Name) code.push(arg10);
|
|
149596
|
+
else code.push(interpolate(arg10));
|
|
149510
149597
|
}
|
|
149511
149598
|
exports.addCodeArg = addCodeArg;
|
|
149512
149599
|
function optimize(expr) {
|
|
@@ -157699,13 +157786,13 @@ var Doc2 = class {
|
|
|
157699
157786
|
fn2(this);
|
|
157700
157787
|
this.indent -= 1;
|
|
157701
157788
|
}
|
|
157702
|
-
write(
|
|
157703
|
-
if (typeof
|
|
157704
|
-
|
|
157705
|
-
|
|
157789
|
+
write(arg10) {
|
|
157790
|
+
if (typeof arg10 === "function") {
|
|
157791
|
+
arg10(this, { execution: "sync" });
|
|
157792
|
+
arg10(this, { execution: "async" });
|
|
157706
157793
|
return;
|
|
157707
157794
|
}
|
|
157708
|
-
const lines =
|
|
157795
|
+
const lines = arg10.split("\n").filter((x2) => x2);
|
|
157709
157796
|
const minIndent = Math.min(...lines.map((x2) => x2.length - x2.trimStart().length));
|
|
157710
157797
|
const dedented = lines.map((x2) => x2.slice(minIndent)).map((x2) => " ".repeat(this.indent * 2) + x2);
|
|
157711
157798
|
for (const line of dedented) this.content.push(line);
|
|
@@ -160514,11 +160601,11 @@ var ZodType3 = /* @__PURE__ */ $constructor2("ZodType", (inst, def) => {
|
|
|
160514
160601
|
array() {
|
|
160515
160602
|
return array2(this);
|
|
160516
160603
|
},
|
|
160517
|
-
or(
|
|
160518
|
-
return union2([this,
|
|
160604
|
+
or(arg10) {
|
|
160605
|
+
return union2([this, arg10]);
|
|
160519
160606
|
},
|
|
160520
|
-
and(
|
|
160521
|
-
return intersection2(this,
|
|
160607
|
+
and(arg10) {
|
|
160608
|
+
return intersection2(this, arg10);
|
|
160522
160609
|
},
|
|
160523
160610
|
transform(tx) {
|
|
160524
160611
|
return pipe2(this, transform2(tx));
|
|
@@ -164203,14 +164290,14 @@ var require_http_errors = /* @__PURE__ */ __commonJSMin3(((exports, module) => {
|
|
|
164203
164290
|
var status$1 = 500;
|
|
164204
164291
|
var props = {};
|
|
164205
164292
|
for (var i$3 = 0; i$3 < arguments.length; i$3++) {
|
|
164206
|
-
var
|
|
164207
|
-
var type2 = typeof
|
|
164208
|
-
if (type2 === "object" &&
|
|
164209
|
-
err =
|
|
164293
|
+
var arg10 = arguments[i$3];
|
|
164294
|
+
var type2 = typeof arg10;
|
|
164295
|
+
if (type2 === "object" && arg10 instanceof Error) {
|
|
164296
|
+
err = arg10;
|
|
164210
164297
|
status$1 = err.status || err.statusCode || status$1;
|
|
164211
|
-
} else if (type2 === "number" && i$3 === 0) status$1 =
|
|
164212
|
-
else if (type2 === "string") msg =
|
|
164213
|
-
else if (type2 === "object") props =
|
|
164298
|
+
} else if (type2 === "number" && i$3 === 0) status$1 = arg10;
|
|
164299
|
+
else if (type2 === "string") msg = arg10;
|
|
164300
|
+
else if (type2 === "object") props = arg10;
|
|
164214
164301
|
else throw new TypeError("argument #" + (i$3 + 1) + " unsupported type " + type2);
|
|
164215
164302
|
}
|
|
164216
164303
|
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 +174839,11 @@ ${error49 instanceof Error ? error49.stack : JSON.stringify(error49)}`
|
|
|
174752
174839
|
);
|
|
174753
174840
|
}
|
|
174754
174841
|
const args2 = request2.params.arguments;
|
|
174755
|
-
for (const
|
|
174756
|
-
if (
|
|
174842
|
+
for (const arg10 of prompt.arguments ?? []) {
|
|
174843
|
+
if (arg10.required && !(args2 && arg10.name in args2)) {
|
|
174757
174844
|
throw new McpError(
|
|
174758
174845
|
ErrorCode.InvalidRequest,
|
|
174759
|
-
`Prompt '${request2.params.name}' requires argument '${
|
|
174846
|
+
`Prompt '${request2.params.name}' requires argument '${arg10.name}': ${arg10.description || "No description provided"}`
|
|
174760
174847
|
);
|
|
174761
174848
|
}
|
|
174762
174849
|
}
|
|
@@ -175982,7 +176069,7 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
175982
176069
|
#parseRuntimeConfig(overrides) {
|
|
175983
176070
|
const args2 = process.argv.slice(2);
|
|
175984
176071
|
const getArg = (name) => {
|
|
175985
|
-
const index = args2.findIndex((
|
|
176072
|
+
const index = args2.findIndex((arg10) => arg10 === `--${name}`);
|
|
175986
176073
|
return index !== -1 && index + 1 < args2.length ? args2[index + 1] : void 0;
|
|
175987
176074
|
};
|
|
175988
176075
|
const transportArg = getArg("transport");
|
|
@@ -177260,11 +177347,11 @@ var GenericRoot = class extends Callable {
|
|
|
177260
177347
|
constructor(paramDefs, bodyDef, $2, arg$, hkt) {
|
|
177261
177348
|
super((...args2) => {
|
|
177262
177349
|
const argNodes = flatMorph(this.names, (i2, name) => {
|
|
177263
|
-
const
|
|
177264
|
-
if (!
|
|
177265
|
-
throwParseError(writeUnsatisfiedParameterConstraintMessage(name, this.constraints[i2].expression,
|
|
177350
|
+
const arg10 = this.arg$.parse(args2[i2]);
|
|
177351
|
+
if (!arg10.extends(this.constraints[i2])) {
|
|
177352
|
+
throwParseError(writeUnsatisfiedParameterConstraintMessage(name, this.constraints[i2].expression, arg10.expression));
|
|
177266
177353
|
}
|
|
177267
|
-
return [name,
|
|
177354
|
+
return [name, arg10];
|
|
177268
177355
|
});
|
|
177269
177356
|
if (this.defIsLazy()) {
|
|
177270
177357
|
const def = this.bodyDef(argNodes);
|
|
@@ -177312,7 +177399,7 @@ var GenericRoot = class extends Callable {
|
|
|
177312
177399
|
return this.baseInstantiation.internal.references;
|
|
177313
177400
|
}
|
|
177314
177401
|
};
|
|
177315
|
-
var writeUnsatisfiedParameterConstraintMessage = (name, constraint,
|
|
177402
|
+
var writeUnsatisfiedParameterConstraintMessage = (name, constraint, arg10) => `${name} must be assignable to ${constraint} (was ${arg10})`;
|
|
177316
177403
|
|
|
177317
177404
|
// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/predicate.js
|
|
177318
177405
|
var implementation = implementNode({
|
|
@@ -181810,7 +181897,7 @@ var _parseGenericArgs = (name, g, s, argNodes) => {
|
|
|
181810
181897
|
argNodes.push(argState.root);
|
|
181811
181898
|
if (argState.finalizer === ">") {
|
|
181812
181899
|
if (argNodes.length !== g.params.length) {
|
|
181813
|
-
return s.error(writeInvalidGenericArgCountMessage(name, g.names, argNodes.map((
|
|
181900
|
+
return s.error(writeInvalidGenericArgCountMessage(name, g.names, argNodes.map((arg10) => arg10.expression)));
|
|
181814
181901
|
}
|
|
181815
181902
|
return argNodes;
|
|
181816
181903
|
}
|
|
@@ -181839,10 +181926,10 @@ var parseGenericInstantiation = (name, g, s) => {
|
|
|
181839
181926
|
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
181927
|
var maybeParseReference = (s, token) => {
|
|
181841
181928
|
if (s.ctx.args?.[token]) {
|
|
181842
|
-
const
|
|
181843
|
-
if (typeof
|
|
181844
|
-
return
|
|
181845
|
-
return s.ctx.$.node("alias", { reference:
|
|
181929
|
+
const arg10 = s.ctx.args[token];
|
|
181930
|
+
if (typeof arg10 !== "string")
|
|
181931
|
+
return arg10;
|
|
181932
|
+
return s.ctx.$.node("alias", { reference: arg10 }, { prereduced: true });
|
|
181846
181933
|
}
|
|
181847
181934
|
const resolution = s.ctx.$.maybeResolve(token);
|
|
181848
181935
|
if (hasArkKind(resolution, "root"))
|
|
@@ -192012,13 +192099,13 @@ function GitTool(ctx) {
|
|
|
192012
192099
|
if (blocked) {
|
|
192013
192100
|
throw new Error(blocked);
|
|
192014
192101
|
}
|
|
192015
|
-
for (const
|
|
192102
|
+
for (const arg10 of args2) {
|
|
192016
192103
|
const isBlocked = NOSHELL_BLOCKED_ARGS.some(
|
|
192017
|
-
(flag) =>
|
|
192104
|
+
(flag) => arg10 === flag || arg10.startsWith(flag + "=")
|
|
192018
192105
|
);
|
|
192019
192106
|
if (isBlocked) {
|
|
192020
192107
|
throw new Error(
|
|
192021
|
-
`Blocked: '${
|
|
192108
|
+
`Blocked: '${arg10}' flag can execute arbitrary code and is not allowed.`
|
|
192022
192109
|
);
|
|
192023
192110
|
}
|
|
192024
192111
|
}
|
|
@@ -193473,14 +193560,29 @@ async function reportReviewNodeId(ctx, params) {
|
|
|
193473
193560
|
|
|
193474
193561
|
// utils/setup.ts
|
|
193475
193562
|
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";
|
|
193563
|
+
import { mkdtempSync as mkdtempSync2, readdirSync, realpathSync as realpathSync2, rmSync as rmSync3, unlinkSync as unlinkSync2 } from "node:fs";
|
|
193477
193564
|
import { tmpdir as tmpdir3 } from "node:os";
|
|
193478
193565
|
import { join as join15 } from "node:path";
|
|
193479
193566
|
function createTempDirectory() {
|
|
193480
|
-
const
|
|
193481
|
-
process.env.PULLFROG_TEMP_DIR =
|
|
193482
|
-
log2.info(`\xBB created temp dir at ${
|
|
193483
|
-
return
|
|
193567
|
+
const path4 = mkdtempSync2(join15(tmpdir3(), "pullfrog-"));
|
|
193568
|
+
process.env.PULLFROG_TEMP_DIR = path4;
|
|
193569
|
+
log2.info(`\xBB created temp dir at ${path4}`);
|
|
193570
|
+
return { path: path4, [Symbol.dispose]: () => removeTempDirectory(path4) };
|
|
193571
|
+
}
|
|
193572
|
+
function removeTempDirectory(path4) {
|
|
193573
|
+
try {
|
|
193574
|
+
try {
|
|
193575
|
+
rmSync3(path4, { recursive: true, force: true });
|
|
193576
|
+
} catch {
|
|
193577
|
+
execFileSync7("chmod", ["-R", "u+w", path4]);
|
|
193578
|
+
rmSync3(path4, { recursive: true, force: true });
|
|
193579
|
+
}
|
|
193580
|
+
log2.debug(`\xBB removed temp dir at ${path4}`);
|
|
193581
|
+
} catch (err) {
|
|
193582
|
+
log2.warning(
|
|
193583
|
+
`\xBB could not remove temp dir at ${path4}: ${err instanceof Error ? err.message : String(err)}`
|
|
193584
|
+
);
|
|
193585
|
+
}
|
|
193484
193586
|
}
|
|
193485
193587
|
function wipeRunnerLeakSurface() {
|
|
193486
193588
|
const runnerTemp = process.env.RUNNER_TEMP;
|
|
@@ -195226,8 +195328,8 @@ var GhParams = type({
|
|
|
195226
195328
|
'gh arguments as an argv array, e.g. ["pr", "list", "--json", "number,title"] or ["api", "graphql", "-f", "query=..."]'
|
|
195227
195329
|
)
|
|
195228
195330
|
});
|
|
195229
|
-
function shellQuote(
|
|
195230
|
-
return `'${
|
|
195331
|
+
function shellQuote(arg10) {
|
|
195332
|
+
return `'${arg10.replace(/'/g, "'\\''")}'`;
|
|
195231
195333
|
}
|
|
195232
195334
|
function GhTool(ctx) {
|
|
195233
195335
|
const permissions = mirrorRolePermissions(ctx.payload.event.authorPermission);
|
|
@@ -196824,7 +196926,7 @@ function UploadFileTool(ctx) {
|
|
|
196824
196926
|
}
|
|
196825
196927
|
|
|
196826
196928
|
// mcp/xrepo.ts
|
|
196827
|
-
import { mkdirSync as mkdirSync10, rmSync as
|
|
196929
|
+
import { mkdirSync as mkdirSync10, rmSync as rmSync4 } from "node:fs";
|
|
196828
196930
|
import { join as join24 } from "node:path";
|
|
196829
196931
|
function assertValidRepoName(name) {
|
|
196830
196932
|
if (!/^[A-Za-z0-9._-]+$/.test(name) || name.startsWith("-") || name.includes("..")) {
|
|
@@ -196936,7 +197038,7 @@ function CheckoutRepoTool(ctx) {
|
|
|
196936
197038
|
return { path: dir, access, defaultBranch };
|
|
196937
197039
|
} catch (err) {
|
|
196938
197040
|
ctx.toolState.repos.delete(repoKey(owner, repo));
|
|
196939
|
-
|
|
197041
|
+
rmSync4(dir, { recursive: true, force: true });
|
|
196940
197042
|
throw err;
|
|
196941
197043
|
}
|
|
196942
197044
|
})
|
|
@@ -197789,35 +197891,25 @@ function billingConsoleUrl(owner) {
|
|
|
197789
197891
|
return `https://pullfrog.com/console/${encodeURIComponent(owner)}#billing`;
|
|
197790
197892
|
}
|
|
197791
197893
|
function commercialPaywallBody(params) {
|
|
197792
|
-
|
|
197894
|
+
let action;
|
|
197793
197895
|
switch (params.reason) {
|
|
197794
197896
|
case "commercial":
|
|
197795
|
-
|
|
197796
|
-
|
|
197797
|
-
"",
|
|
197798
|
-
pitch,
|
|
197799
|
-
"",
|
|
197800
|
-
`[Upgrade now \u2192](${params.url})`
|
|
197801
|
-
].join("\n");
|
|
197897
|
+
action = "upgrade";
|
|
197898
|
+
break;
|
|
197802
197899
|
case "subscription_ended":
|
|
197803
|
-
|
|
197804
|
-
|
|
197805
|
-
"",
|
|
197806
|
-
pitch,
|
|
197807
|
-
"",
|
|
197808
|
-
`[Resubscribe \u2192](${params.url})`
|
|
197809
|
-
].join("\n");
|
|
197900
|
+
action = "resubscribe";
|
|
197901
|
+
break;
|
|
197810
197902
|
case "subscription_unpaid":
|
|
197811
|
-
|
|
197812
|
-
|
|
197813
|
-
"",
|
|
197814
|
-
"Update the card on file to resume runs.",
|
|
197815
|
-
"",
|
|
197816
|
-
`[Update billing \u2192](${params.url})`
|
|
197817
|
-
].join("\n");
|
|
197903
|
+
action = "update billing";
|
|
197904
|
+
break;
|
|
197818
197905
|
default:
|
|
197819
197906
|
return params.reason;
|
|
197820
197907
|
}
|
|
197908
|
+
return [
|
|
197909
|
+
`**Pullfrog is ${params.freshReply ? "still paused" : "paused"} for ${params.ownerLogin}.**`,
|
|
197910
|
+
"",
|
|
197911
|
+
`An org owner can [${action}](${params.url}) to resume private-repo runs.`
|
|
197912
|
+
].join("\n");
|
|
197821
197913
|
}
|
|
197822
197914
|
function formatCommercialGateSummary(params) {
|
|
197823
197915
|
return commercialPaywallBody({
|
|
@@ -199806,6 +199898,7 @@ async function fetchRunContext(params) {
|
|
|
199806
199898
|
plan: data.plan ?? "none",
|
|
199807
199899
|
proxyModel: data.proxyModel,
|
|
199808
199900
|
dbSecrets: data.dbSecrets,
|
|
199901
|
+
credentialAccess: data.credentialAccess,
|
|
199809
199902
|
secretsUnavailable: data.secretsUnavailable,
|
|
199810
199903
|
routerUnfunded: data.routerUnfunded,
|
|
199811
199904
|
trialFallback: data.trialFallback
|
|
@@ -199857,6 +199950,7 @@ async function resolveRunContextData(params) {
|
|
|
199857
199950
|
plan: runContext.plan,
|
|
199858
199951
|
proxyModel: runContext.proxyModel,
|
|
199859
199952
|
dbSecrets: runContext.dbSecrets,
|
|
199953
|
+
credentialAccess: runContext.credentialAccess,
|
|
199860
199954
|
commercialRefused: runContext.commercialRefused,
|
|
199861
199955
|
// a failed mint on a runner that should have been able to mint is the same
|
|
199862
199956
|
// outcome as the server-side failure: the run never sees stored secrets.
|
|
@@ -201021,7 +201115,8 @@ async function main() {
|
|
|
201021
201115
|
_promise2 && await _promise2;
|
|
201022
201116
|
}
|
|
201023
201117
|
}
|
|
201024
|
-
const
|
|
201118
|
+
const tempDir = __using(_stack3, createTempDirectory());
|
|
201119
|
+
const tmpdir4 = tempDir.path;
|
|
201025
201120
|
const repoDir = payload.cwd;
|
|
201026
201121
|
const preIntrospectionDirty = repoDir ? await dirtyTrackedPaths({ cwd: repoDir }) : null;
|
|
201027
201122
|
const opencodeCliPath = await agents.opencode.install();
|
|
@@ -201613,7 +201708,7 @@ function printGhaTokenUsage(params) {
|
|
|
201613
201708
|
params.stream(" --post revoke the previously-acquired token (post-step usage only)");
|
|
201614
201709
|
}
|
|
201615
201710
|
function parseGhaArgs(args2) {
|
|
201616
|
-
return (0,
|
|
201711
|
+
return (0, import_arg6.default)(
|
|
201617
201712
|
{
|
|
201618
201713
|
"--help": Boolean,
|
|
201619
201714
|
"--post": Boolean,
|
|
@@ -201626,7 +201721,7 @@ function parseGhaArgs(args2) {
|
|
|
201626
201721
|
);
|
|
201627
201722
|
}
|
|
201628
201723
|
function parseGhaTokenArgs(args2) {
|
|
201629
|
-
return (0,
|
|
201724
|
+
return (0, import_arg6.default)(
|
|
201630
201725
|
{
|
|
201631
201726
|
"--help": Boolean,
|
|
201632
201727
|
"--post": Boolean,
|
|
@@ -201717,7 +201812,7 @@ async function run(args2) {
|
|
|
201717
201812
|
|
|
201718
201813
|
// commands/init.ts
|
|
201719
201814
|
import { execFileSync as execFileSync8 } from "node:child_process";
|
|
201720
|
-
var
|
|
201815
|
+
var import_arg7 = __toESM(require_arg(), 1);
|
|
201721
201816
|
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
201722
201817
|
function link(text, url4) {
|
|
201723
201818
|
return `\x1B]8;;${url4}\x07${text}\x1B]8;;\x07`;
|
|
@@ -201923,7 +202018,7 @@ function printInitUsage(params) {
|
|
|
201923
202018
|
params.stream(" -h, --help show help");
|
|
201924
202019
|
}
|
|
201925
202020
|
function parseInitArgs(args2) {
|
|
201926
|
-
return (0,
|
|
202021
|
+
return (0, import_arg7.default)(
|
|
201927
202022
|
{
|
|
201928
202023
|
"--help": Boolean,
|
|
201929
202024
|
"-h": "--help"
|
|
@@ -202098,7 +202193,7 @@ function resolveTarget2(repo) {
|
|
|
202098
202193
|
return { owner: match3[1], repo: match3[2] };
|
|
202099
202194
|
}
|
|
202100
202195
|
function cliVersion() {
|
|
202101
|
-
const parts = /^(\d+)\.(\d+)\.(\d+)$/.exec("0.1.
|
|
202196
|
+
const parts = /^(\d+)\.(\d+)\.(\d+)$/.exec("0.1.86");
|
|
202102
202197
|
if (!parts) return "0.0.0";
|
|
202103
202198
|
return `${Number(parts[1])}.${Number(parts[2])}.${Number(parts[3])}`;
|
|
202104
202199
|
}
|
|
@@ -202155,10 +202250,10 @@ async function runCli7(input) {
|
|
|
202155
202250
|
}
|
|
202156
202251
|
|
|
202157
202252
|
// commands/watch.ts
|
|
202158
|
-
var
|
|
202253
|
+
var import_arg8 = __toESM(require_arg(), 1);
|
|
202159
202254
|
var import_picocolors4 = __toESM(require_picocolors(), 1);
|
|
202160
202255
|
function parseWatchArgs(args2) {
|
|
202161
|
-
return (0,
|
|
202256
|
+
return (0, import_arg8.default)(
|
|
202162
202257
|
{
|
|
202163
202258
|
"--pr": Number,
|
|
202164
202259
|
"--pretty": Boolean,
|
|
@@ -202265,7 +202360,7 @@ async function runCli8(input) {
|
|
|
202265
202360
|
}
|
|
202266
202361
|
|
|
202267
202362
|
// cli.ts
|
|
202268
|
-
var VERSION10 = "0.1.
|
|
202363
|
+
var VERSION10 = "0.1.86";
|
|
202269
202364
|
var bin = basename2(process.argv[1] || "");
|
|
202270
202365
|
var PROG = bin === "pf" || bin === "pullfrog" ? bin : "pullfrog";
|
|
202271
202366
|
var rawArgs = process.argv.slice(2);
|
|
@@ -202286,7 +202381,7 @@ function printMainUsage(stream) {
|
|
|
202286
202381
|
stream(" -v, --version show version");
|
|
202287
202382
|
}
|
|
202288
202383
|
function parseGlobalArgs(args2) {
|
|
202289
|
-
return (0,
|
|
202384
|
+
return (0, import_arg9.default)(
|
|
202290
202385
|
{
|
|
202291
202386
|
"--help": Boolean,
|
|
202292
202387
|
"--version": Boolean,
|