This commit is contained in:
Colin McDonnell
2025-11-21 16:54:03 -08:00
parent 339c0ee276
commit 632fffbfa7
3 changed files with 2288 additions and 1443 deletions
+2039 -1298
View File
File diff suppressed because it is too large Load Diff
+248 -144
View File
@@ -21799,13 +21799,13 @@ var require_mock_call_history = __commonJS({
function makeFilterCalls(parameterName) {
return (parameterValue) => {
if (typeof parameterValue === "string" || parameterValue == null) {
return this.logs.filter((log2) => {
return log2[parameterName] === parameterValue;
return this.logs.filter((log3) => {
return log3[parameterName] === parameterValue;
});
}
if (parameterValue instanceof RegExp) {
return this.logs.filter((log2) => {
return parameterValue.test(log2[parameterName]);
return this.logs.filter((log3) => {
return parameterValue.test(log3[parameterName]);
});
}
throw new InvalidArgumentError(`${parameterName} parameter should be one of string, regexp, undefined or null`);
@@ -21900,8 +21900,8 @@ var require_mock_call_history = __commonJS({
return this.logs.filter(criteria);
}
if (criteria instanceof RegExp) {
return this.logs.filter((log2) => {
return criteria.test(log2.toString());
return this.logs.filter((log3) => {
return criteria.test(log3.toString());
});
}
if (typeof criteria === "object" && criteria !== null) {
@@ -21951,13 +21951,13 @@ var require_mock_call_history = __commonJS({
this.logs = [];
}
[kMockCallHistoryAddLog](requestInit) {
const log2 = new MockCallHistoryLog(requestInit);
this.logs.push(log2);
return log2;
const log3 = new MockCallHistoryLog(requestInit);
this.logs.push(log3);
return log3;
}
*[Symbol.iterator]() {
for (const log2 of this.calls()) {
yield log2;
for (const log3 of this.calls()) {
yield log3;
}
}
};
@@ -65002,7 +65002,7 @@ var require_core = __commonJS({
process.env["PATH"] = `${inputPath}${path.delimiter}${process.env["PATH"]}`;
}
exports.addPath = addPath;
function getInput2(name, options) {
function getInput(name, options) {
const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || "";
if (options && options.required && !val) {
throw new Error(`Input required and not supplied: ${name}`);
@@ -65012,9 +65012,9 @@ var require_core = __commonJS({
}
return val.trim();
}
exports.getInput = getInput2;
exports.getInput = getInput;
function getMultilineInput(name, options) {
const inputs = getInput2(name, options).split("\n").filter((x) => x !== "");
const inputs = getInput(name, options).split("\n").filter((x) => x !== "");
if (options && options.trimWhitespace === false) {
return inputs;
}
@@ -65024,7 +65024,7 @@ var require_core = __commonJS({
function getBooleanInput(name, options) {
const trueValue = ["true", "True", "TRUE"];
const falseValue = ["false", "False", "FALSE"];
const val = getInput2(name, options);
const val = getInput(name, options);
if (trueValue.includes(val))
return true;
if (falseValue.includes(val))
@@ -79113,7 +79113,7 @@ var require_depd = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/depd@2.0.0/
var stack = getStack();
var file = callSiteLocation(stack[1])[0];
function deprecate$1(message) {
log2.call(deprecate$1, message);
log3.call(deprecate$1, message);
}
deprecate$1._file = file;
deprecate$1._ignored = isignored(namespace);
@@ -79137,7 +79137,7 @@ var require_depd = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/depd@2.0.0/
var str = process.env.TRACE_DEPRECATION || "";
return containsNamespace(str, namespace);
}
function log2(message, site) {
function log3(message, site) {
var haslisteners = eehaslisteners(process, "deprecation");
if (!haslisteners && this._ignored) return;
var caller;
@@ -79244,7 +79244,7 @@ var require_depd = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/depd@2.0.0/
var stack = getStack();
var site = callSiteLocation(stack[1]);
site.name = fn2.name;
return new Function("fn", "log", "deprecate", "message", "site", '"use strict"\nreturn function (' + args2 + ") {log.call(deprecate, message, site)\nreturn fn.apply(this, arguments)\n}")(fn2, log2, this, message, site);
return new Function("fn", "log", "deprecate", "message", "site", '"use strict"\nreturn function (' + args2 + ") {log.call(deprecate, message, site)\nreturn fn.apply(this, arguments)\n}")(fn2, log3, this, message, site);
}
function wrapproperty(obj, prop, message) {
if (!obj || typeof obj !== "object" && typeof obj !== "function") throw new TypeError("argument obj must be object");
@@ -79259,11 +79259,11 @@ var require_depd = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/depd@2.0.0/
var get2 = descriptor.get;
var set = descriptor.set;
if (typeof get2 === "function") descriptor.get = function getter() {
log2.call(deprecate$1, message, site);
log3.call(deprecate$1, message, site);
return get2.apply(this, arguments);
};
if (typeof set === "function") descriptor.set = function setter() {
log2.call(deprecate$1, message, site);
log3.call(deprecate$1, message, site);
return set.apply(this, arguments);
};
Object.defineProperty(obj, prop, descriptor);
@@ -95651,7 +95651,7 @@ ${error41 instanceof Error ? error41.stack : JSON.stringify(error41)}`
);
}
};
const log2 = {
const log3 = {
debug: (message, context) => {
this.#server.sendLoggingMessage({
data: {
@@ -95713,7 +95713,7 @@ ${error41 instanceof Error ? error41.stack : JSON.stringify(error41)}`
client: {
version: this.#server.getClientVersion()
},
log: log2,
log: log3,
reportProgress,
requestId: typeof request2.params?._meta?.requestId === "string" ? request2.params._meta.requestId : void 0,
session: this.#auth,
@@ -96178,9 +96178,6 @@ var FastMCP = class extends FastMCPEventEmitter {
}
};
// external.ts
var ghPullfrogMcpName = "gh_pullfrog";
// node_modules/.pnpm/@ark+schema@0.53.0/node_modules/@ark/schema/out/shared/errors.js
var ArkError = class _ArkError extends CastableBase {
[arkKind] = "error";
@@ -96625,7 +96622,7 @@ var BaseNode = class extends Callable {
get shallowMorphs() {
return [];
}
constructor(attachments, $) {
constructor(attachments, $2) {
super((data, pipedFromCtx, onFail = this.onFail) => {
if (pipedFromCtx) {
this.traverseApply(data, pipedFromCtx);
@@ -96634,7 +96631,7 @@ var BaseNode = class extends Callable {
return this.rootApply(data, onFail);
}, { attach: attachments });
this.attachments = attachments;
this.$ = $;
this.$ = $2;
this.onFail = this.meta.onFail ?? this.$.resolvedConfig.onFail;
this.includesTransform = this.hasKind("morph") || this.hasKind("structure") && this.structuralMorph !== void 0 || this.hasKind("sequence") && this.inner.defaultables !== void 0;
this.includesContextualPredicate = this.hasKind("predicate") && this.inner.predicate.length !== 1;
@@ -96852,7 +96849,7 @@ var BaseNode = class extends Callable {
};
}
_transform(mapper, ctx) {
const $ = ctx.bindScope ?? this.$;
const $2 = ctx.bindScope ?? this.$;
if (ctx.seen[this.id])
return this.$.lazilyResolve(ctx.seen[this.id]);
if (ctx.shouldTransform?.(this, ctx) === false)
@@ -96902,7 +96899,7 @@ var BaseNode = class extends Callable {
;
transformedInner.in ??= $ark.intrinsic.unknown;
}
return transformedNode = $.node(this.kind, transformedInner, ctx.parseOptions);
return transformedNode = $2.node(this.kind, transformedInner, ctx.parseOptions);
}
configureReferences(meta, selector = "references") {
const normalized = NodeSelector.normalize(selector);
@@ -97030,13 +97027,13 @@ var writeUnsatisfiableExpressionError = (expression) => `${expression} results i
// node_modules/.pnpm/@ark+schema@0.53.0/node_modules/@ark/schema/out/shared/intersections.js
var intersectionCache = {};
var intersectNodesRoot = (l, r, $) => intersectOrPipeNodes(l, r, {
$,
var intersectNodesRoot = (l, r, $2) => intersectOrPipeNodes(l, r, {
$: $2,
invert: false,
pipe: false
});
var pipeNodesRoot = (l, r, $) => intersectOrPipeNodes(l, r, {
$,
var pipeNodesRoot = (l, r, $2) => intersectOrPipeNodes(l, r, {
$: $2,
invert: false,
pipe: true
});
@@ -97141,8 +97138,8 @@ var _pipeMorphed = (from, to, ctx) => {
// node_modules/.pnpm/@ark+schema@0.53.0/node_modules/@ark/schema/out/constraint.js
var BaseConstraint = class extends BaseNode {
constructor(attachments, $) {
super(attachments, $);
constructor(attachments, $2) {
super(attachments, $2);
Object.defineProperty(this, arkKind, {
value: "constraint",
enumerable: false
@@ -97254,7 +97251,7 @@ var writeInvalidOperandMessage = (kind, expected, actual) => {
};
// node_modules/.pnpm/@ark+schema@0.53.0/node_modules/@ark/schema/out/generic.js
var parseGeneric = (paramDefs, bodyDef, $) => new GenericRoot(paramDefs, bodyDef, $, $, null);
var parseGeneric = (paramDefs, bodyDef, $2) => new GenericRoot(paramDefs, bodyDef, $2, $2, null);
var LazyGenericBody = class extends Callable {
};
var GenericRoot = class extends Callable {
@@ -97266,7 +97263,7 @@ var GenericRoot = class extends Callable {
baseInstantiation;
hkt;
description;
constructor(paramDefs, bodyDef, $, arg$, hkt) {
constructor(paramDefs, bodyDef, $2, arg$, hkt) {
super((...args2) => {
const argNodes = flatMorph(this.names, (i, name) => {
const arg = this.arg$.parse(args2[i]);
@@ -97283,7 +97280,7 @@ var GenericRoot = class extends Callable {
});
this.paramDefs = paramDefs;
this.bodyDef = bodyDef;
this.$ = $;
this.$ = $2;
this.arg$ = arg$;
this.hkt = hkt;
this.description = hkt ? new hkt().description ?? `a generic type for ${hkt.constructor.name}` : "a generic type";
@@ -97678,7 +97675,7 @@ var implementation7 = implementNode({
parse: createLengthRuleParser("maxLength")
}
},
reduce: (inner, $) => inner.rule === 0 ? $.node("exactLength", inner) : void 0,
reduce: (inner, $2) => inner.rule === 0 ? $2.node("exactLength", inner) : void 0,
normalize: createLengthSchemaNormalizer("maxLength"),
defaults: {
description: (node2) => `at most length ${node2.rule}`,
@@ -97943,7 +97940,7 @@ var parseNode = (ctx) => {
});
return node2;
};
var createNode = ({ id, kind, inner, meta, $, ignoreCache }) => {
var createNode = ({ id, kind, inner, meta, $: $2, ignoreCache }) => {
const impl = nodeImplementationsByKind[kind];
const innerEntries = entriesOf(inner);
const children = [];
@@ -97977,8 +97974,8 @@ var createNode = ({ id, kind, inner, meta, $, ignoreCache }) => {
json3 = possiblyCollapse(json3, impl.collapsibleKey, false);
const collapsibleJson = possiblyCollapse(json3, impl.collapsibleKey, true);
const hash = JSON.stringify({ kind, ...json3 });
if ($.nodesByHash[hash] && !ignoreCache)
return $.nodesByHash[hash];
if ($2.nodesByHash[hash] && !ignoreCache)
return $2.nodesByHash[hash];
const attachments = {
id,
kind,
@@ -97999,8 +97996,8 @@ var createNode = ({ id, kind, inner, meta, $, ignoreCache }) => {
if (k !== "in" && k !== "out")
attachments[k] = inner[k];
}
const node2 = new nodeClassesByKind[kind](attachments, $);
return $.nodesByHash[hash] = node2;
const node2 = new nodeClassesByKind[kind](attachments, $2);
return $2.nodesByHash[hash] = node2;
};
var withId = (node2, id) => {
if (node2.id === id)
@@ -98127,10 +98124,10 @@ var implementation11 = implementNode({
}
},
normalize: (schema2) => schema2,
reduce: (inner, $) => {
if ($.resolvedConfig.exactOptionalPropertyTypes === false) {
reduce: (inner, $2) => {
if ($2.resolvedConfig.exactOptionalPropertyTypes === false) {
if (!inner.value.allows(void 0)) {
return $.node("optional", { ...inner, value: inner.value.or(intrinsic.undefined) }, { prereduced: true });
return $2.node("optional", { ...inner, value: inner.value.or(intrinsic.undefined) }, { prereduced: true });
}
}
},
@@ -98219,8 +98216,8 @@ var writeNonPrimitiveNonFunctionDefaultValueMessage = (key) => {
// node_modules/.pnpm/@ark+schema@0.53.0/node_modules/@ark/schema/out/roots/root.js
var BaseRoot = class extends BaseNode {
constructor(attachments, $) {
super(attachments, $);
constructor(attachments, $2) {
super(attachments, $2);
Object.defineProperty(this, arkKind, { value: "root", enumerable: false });
}
// doesn't seem possible to override this at a type-level (e.g. via declare)
@@ -98881,11 +98878,11 @@ var implementation14 = implementNode({
},
// leverage reduction logic from intersection and identity to ensure initial
// parse result is reduced
reduce: (inner, $) => (
reduce: (inner, $2) => (
// we cast union out of the result here since that only occurs when intersecting two sequences
// that cannot occur when reducing a single intersection schema using unknown
intersectIntersections({}, inner, {
$,
$: $2,
invert: false,
pipe: false
})
@@ -99301,13 +99298,13 @@ var implementation17 = implementNode({
}
},
normalize: (schema2) => isArray(schema2) ? { branches: schema2 } : schema2,
reduce: (inner, $) => {
reduce: (inner, $2) => {
const reducedBranches = reduceBranches(inner);
if (reducedBranches.length === 1)
return reducedBranches[0];
if (reducedBranches.length === inner.branches.length)
return;
return $.node("union", {
return $2.node("union", {
...inner,
branches: reducedBranches
}, { prereduced: true });
@@ -99704,11 +99701,11 @@ var viableOrderedCandidates = (candidates, originalBranches) => {
});
return viableCandidates;
};
var discriminantCaseToNode = (caseDiscriminant, path, $) => {
let node2 = caseDiscriminant === "undefined" ? $.node("unit", { unit: void 0 }) : caseDiscriminant === "null" ? $.node("unit", { unit: null }) : caseDiscriminant === "boolean" ? $.units([true, false]) : caseDiscriminant;
var discriminantCaseToNode = (caseDiscriminant, path, $2) => {
let node2 = caseDiscriminant === "undefined" ? $2.node("unit", { unit: void 0 }) : caseDiscriminant === "null" ? $2.node("unit", { unit: null }) : caseDiscriminant === "boolean" ? $2.units([true, false]) : caseDiscriminant;
for (let i = path.length - 1; i >= 0; i--) {
const key = path[i];
node2 = $.node("intersection", typeof key === "number" ? {
node2 = $2.node("intersection", typeof key === "number" ? {
proto: "Array",
// create unknown for preceding elements (could be optimized with safe imports)
sequence: [...range(key).map((_) => ({})), node2]
@@ -100110,7 +100107,7 @@ var implementation21 = implementNode({
}
return { variadic: schema2 };
},
reduce: (raw, $) => {
reduce: (raw, $2) => {
let minVariadicLength = raw.minVariadicLength ?? 0;
const prefix = raw.prefix?.slice() ?? [];
const defaultables = raw.defaultables?.slice() ?? [];
@@ -100137,7 +100134,7 @@ var implementation21 = implementNode({
minVariadicLength !== raw.minVariadicLength || // or any postfix elements were moved to prefix
raw.prefix && raw.prefix.length !== prefix.length
) {
return $.node("sequence", {
return $2.node("sequence", {
...raw,
// empty lists will be omitted during parsing
prefix,
@@ -100452,13 +100449,13 @@ var createStructuralWriter = (childStringProp) => (node2) => {
};
var structuralDescription = createStructuralWriter("description");
var structuralExpression = createStructuralWriter("expression");
var intersectPropsAndIndex = (l, r, $) => {
var intersectPropsAndIndex = (l, r, $2) => {
const kind = l.required ? "required" : "optional";
if (!r.signature.allows(l.key))
return null;
const value2 = intersectNodesRoot(l.value, r.value, $);
const value2 = intersectNodesRoot(l.value, r.value, $2);
if (value2 instanceof Disjoint) {
return kind === "optional" ? $.node("optional", {
return kind === "optional" ? $2.node("optional", {
key: l.key,
value: $ark.intrinsic.never.internal
}) : value2.withPrefixKey(l.key, l.kind);
@@ -100607,7 +100604,7 @@ var implementation22 = implementNode({
return childIntersectionResult;
}
},
reduce: (inner, $) => {
reduce: (inner, $2) => {
if (!inner.required && !inner.optional)
return;
const seen = {};
@@ -100621,7 +100618,7 @@ var implementation22 = implementNode({
seen[requiredProp.key] = true;
if (inner.index) {
for (const index of inner.index) {
const intersection = intersectPropsAndIndex(requiredProp, index, $);
const intersection = intersectPropsAndIndex(requiredProp, index, $2);
if (intersection instanceof Disjoint)
return intersection;
}
@@ -100636,7 +100633,7 @@ var implementation22 = implementNode({
seen[optionalProp.key] = true;
if (inner.index) {
for (const index of inner.index) {
const intersection = intersectPropsAndIndex(optionalProp, index, $);
const intersection = intersectPropsAndIndex(optionalProp, index, $2);
if (intersection instanceof Disjoint)
return intersection;
if (intersection !== null) {
@@ -100648,7 +100645,7 @@ var implementation22 = implementNode({
}
}
if (updated) {
return $.node("structure", { ...inner, optional: newOptionalProps }, { prereduced: true });
return $2.node("structure", { ...inner, optional: newOptionalProps }, { prereduced: true });
}
}
});
@@ -101098,17 +101095,17 @@ var indexerToKey = (indexable) => {
return indexable;
};
var writeNumberIndexMessage = (indexExpression, sequenceExpression) => `${indexExpression} is not allowed as an array index on ${sequenceExpression}. Use the 'nonNegativeIntegerString' keyword instead.`;
var normalizeIndex = (signature, value2, $) => {
var normalizeIndex = (signature, value2, $2) => {
const [enumerableBranches, nonEnumerableBranches] = spliterate(signature.branches, (k) => k.hasKind("unit"));
if (!enumerableBranches.length)
return { index: $.node("index", { signature, value: value2 }) };
return { index: $2.node("index", { signature, value: value2 }) };
const normalized = {};
for (const n of enumerableBranches) {
const prop = $.node("required", { key: n.unit, value: value2 });
const prop = $2.node("required", { key: n.unit, value: value2 });
normalized[prop.kind] = append(normalized[prop.kind], prop);
}
if (nonEnumerableBranches.length) {
normalized.index = $.node("index", {
normalized.index = $2.node("index", {
signature: nonEnumerableBranches,
value: value2
});
@@ -101179,9 +101176,9 @@ var RootModule = class extends DynamicBase {
return "module";
}
};
var bindModule = (module, $) => new RootModule(flatMorph(module, (alias, value2) => [
var bindModule = (module, $2) => new RootModule(flatMorph(module, (alias, value2) => [
alias,
hasArkKind(value2, "module") ? bindModule(value2, $) : $.bindReference(value2)
hasArkKind(value2, "module") ? bindModule(value2, $2) : $2.bindReference(value2)
]));
// node_modules/.pnpm/@ark+schema@0.53.0/node_modules/@ark/schema/out/scope.js
@@ -101312,8 +101309,8 @@ var BaseScope = class {
return def;
}
generic = (...params) => {
const $ = this;
return (def, possibleHkt) => new GenericRoot(params, possibleHkt ? new LazyGenericBody(def) : def, $, $, possibleHkt ?? null);
const $2 = this;
return (def, possibleHkt) => new GenericRoot(params, possibleHkt ? new LazyGenericBody(def) : def, $2, $2, possibleHkt ?? null);
};
units = (values, opts) => {
const uniqueValues = [];
@@ -101571,12 +101568,12 @@ var maybeResolveSubalias = (base, name) => {
};
var schemaScope = (aliases, config2) => new SchemaScope(aliases, config2);
var rootSchemaScope = new SchemaScope({});
var resolutionsOfModule = ($, typeSet) => {
var resolutionsOfModule = ($2, typeSet) => {
const result = {};
for (const k in typeSet) {
const v = typeSet[k];
if (hasArkKind(v, "module")) {
const innerResolutions = resolutionsOfModule($, v);
const innerResolutions = resolutionsOfModule($2, v);
const prefixedResolutions = flatMorph(innerResolutions, (innerK, innerV) => [`${k}.${innerK}`, innerV]);
Object.assign(result, prefixedResolutions);
} else if (hasArkKind(v, "root") || hasArkKind(v, "generic"))
@@ -102164,21 +102161,21 @@ var _parseOptionalConstraint = (scanner, name, result, ctx) => {
// node_modules/.pnpm/arktype@2.1.25/node_modules/arktype/out/fn.js
var InternalFnParser = class extends Callable {
constructor($) {
constructor($2) {
const attach = {
$,
raw: $.fn
$: $2,
raw: $2.fn
};
super((...signature) => {
const returnOperatorIndex = signature.indexOf(":");
const lastParamIndex = returnOperatorIndex === -1 ? signature.length - 1 : returnOperatorIndex - 1;
const paramDefs = signature.slice(0, lastParamIndex + 1);
const paramTuple = $.parse(paramDefs).assertHasKind("intersection");
let returnType = $.intrinsic.unknown;
const paramTuple = $2.parse(paramDefs).assertHasKind("intersection");
let returnType = $2.intrinsic.unknown;
if (returnOperatorIndex !== -1) {
if (returnOperatorIndex !== signature.length - 2)
return throwParseError(badFnReturnTypeMessage);
returnType = $.parse(signature[returnOperatorIndex + 1]);
returnType = $2.parse(signature[returnOperatorIndex + 1]);
}
return (impl) => new InternalTypedFn(impl, paramTuple, returnType);
}, { attach });
@@ -102217,11 +102214,11 @@ fn("string", ":", "number")(s => s.length)`;
// node_modules/.pnpm/arktype@2.1.25/node_modules/arktype/out/match.js
var InternalMatchParser = class extends Callable {
$;
constructor($) {
super((...args2) => new InternalChainedMatchParser($)(...args2), {
bind: $
constructor($2) {
super((...args2) => new InternalChainedMatchParser($2)(...args2), {
bind: $2
});
this.$ = $;
this.$ = $2;
}
in(def) {
return new InternalChainedMatchParser(this.$, def === void 0 ? void 0 : this.$.parse(def));
@@ -102238,9 +102235,9 @@ var InternalChainedMatchParser = class extends Callable {
in;
key;
branches = [];
constructor($, In) {
constructor($2, In) {
super((cases) => this.caseEntries(Object.entries(cases).map(([k, v]) => k === "default" ? [k, v] : [this.$.parse(k), v])));
this.$ = $;
this.$ = $2;
this.in = In;
}
at(key, cases) {
@@ -102616,45 +102613,45 @@ var writeBadDefinitionTypeMessage = (actual) => `Type definitions must be string
// node_modules/.pnpm/arktype@2.1.25/node_modules/arktype/out/type.js
var InternalTypeParser = class extends Callable {
constructor($) {
constructor($2) {
const attach = Object.assign(
{
errors: ArkErrors,
hkt: Hkt,
$,
raw: $.parse,
module: $.constructor.module,
scope: $.constructor.scope,
declare: $.declare,
define: $.define,
match: $.match,
generic: $.generic,
schema: $.schema,
$: $2,
raw: $2.parse,
module: $2.constructor.module,
scope: $2.constructor.scope,
declare: $2.declare,
define: $2.define,
match: $2.match,
generic: $2.generic,
schema: $2.schema,
// this won't be defined during bootstrapping, but externally always will be
keywords: $.ambient,
unit: $.unit,
enumerated: $.enumerated,
instanceOf: $.instanceOf,
valueOf: $.valueOf,
or: $.or,
and: $.and,
merge: $.merge,
pipe: $.pipe,
fn: $.fn
keywords: $2.ambient,
unit: $2.unit,
enumerated: $2.enumerated,
instanceOf: $2.instanceOf,
valueOf: $2.valueOf,
or: $2.or,
and: $2.and,
merge: $2.merge,
pipe: $2.pipe,
fn: $2.fn
},
// also won't be defined during bootstrapping
$.ambientAttachments
$2.ambientAttachments
);
super((...args2) => {
if (args2.length === 1) {
return $.parse(args2[0]);
return $2.parse(args2[0]);
}
if (args2.length === 2 && typeof args2[0] === "string" && args2[0][0] === "<" && args2[0].at(-1) === ">") {
const paramString = args2[0].slice(1, -1);
const params = $.parseGenericParams(paramString, {});
return new GenericRoot(params, args2[1], $, $, null);
const params = $2.parseGenericParams(paramString, {});
return new GenericRoot(params, args2[1], $2, $2, null);
}
return $.parse(args2);
return $2.parse(args2);
}, {
attach
});
@@ -103427,6 +103424,32 @@ var schema = ark.schema;
var define2 = ark.define;
var declare = ark.declare;
// external.ts
var ghPullfrogMcpName = "gh_pullfrog";
var agentsManifest = {
claude: {
displayName: "Claude Code",
apiKeyNames: ["anthropic_api_key"],
url: "https://claude.com/claude-code"
},
codex: {
displayName: "Codex CLI",
apiKeyNames: ["openai_api_key"],
url: "https://platform.openai.com/docs/guides/codex"
},
cursor: {
displayName: "Cursor CLI",
apiKeyNames: ["cursor_api_key"],
url: "https://cursor.com/"
},
gemini: {
displayName: "Gemini CLI",
apiKeyNames: ["google_api_key", "gemini_api_key"],
url: "https://ai.google.dev/gemini-api/docs"
}
};
var AgentName = type.enumerated(...Object.keys(agentsManifest));
// node_modules/.pnpm/universal-user-agent@7.0.3/node_modules/universal-user-agent/index.js
function getUserAgent() {
if (typeof navigator === "object" && "userAgent" in navigator) {
@@ -103921,7 +103944,7 @@ async function fetchWrapper(requestOptions) {
"fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing"
);
}
const log2 = requestOptions.request?.log || console;
const log3 = requestOptions.request?.log || console;
const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false;
const body = isPlainObject3(requestOptions.body) || Array.isArray(requestOptions.body) ? JSON.stringify(requestOptions.body) : requestOptions.body;
const requestHeaders = Object.fromEntries(
@@ -103979,7 +104002,7 @@ async function fetchWrapper(requestOptions) {
if ("deprecation" in responseHeaders) {
const matches = responseHeaders.link && responseHeaders.link.match(/<([^<>]+)>; rel="deprecation"/);
const deprecationLink = matches && matches.pop();
log2.warn(
log3.warn(
`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${responseHeaders.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
);
}
@@ -106856,7 +106879,7 @@ var import_table = __toESM(require_src(), 1);
import { appendFileSync, existsSync } from "node:fs";
import { join } from "node:path";
var isGitHubActions = !!process.env.GITHUB_ACTIONS;
var isDebugEnabled = process.env.LOG_LEVEL === "debug";
var isDebugEnabled = () => process.env.LOG_LEVEL === "debug";
function startGroup2(name) {
if (isGitHubActions) {
core.startGroup(name);
@@ -106901,7 +106924,9 @@ function boxString(text, options) {
}
}
const maxLineLength = Math.max(...wrappedLines.map((line) => line.length));
const boxWidth = maxLineLength + padding * 2;
const contentBoxWidth = maxLineLength + padding * 2;
const titleLineLength = title ? ` ${title} `.length : 0;
const boxWidth = Math.max(contentBoxWidth, titleLineLength);
let result = "";
if (title) {
const titleLine = ` ${title} `;
@@ -107043,7 +107068,7 @@ var log = {
* Print debug message (only if LOG_LEVEL=debug)
*/
debug: (message) => {
if (isDebugEnabled) {
if (isDebugEnabled()) {
if (isGitHubActions) {
core.debug(message);
} else {
@@ -107085,10 +107110,22 @@ var log = {
* End a collapsed group
*/
endGroup: endGroup2,
/**
* Log tool call information to console with formatted output
*/
toolCall: ({ toolName, input }) => {
let output = `\u2192 ${toolName}
`;
const inputFormatted = formatJsonValue(input);
if (inputFormatted !== "{}") {
output += formatIndentedField("input", inputFormatted);
}
log.info(output.trimEnd());
},
/**
* Log MCP tool call information to mcpLog.txt in the temp directory
*/
toolCall: ({
toolCallToFile: ({
toolName,
request: request2,
result,
@@ -107176,7 +107213,20 @@ function parseRepoContext() {
}
// mcp/shared.ts
var getMcpContext = cached(() => {
function getPayload() {
const payloadEnv = process.env.PULLFROG_PAYLOAD;
if (!payloadEnv) {
throw new Error("PULLFROG_PAYLOAD environment variable is required");
}
try {
return JSON.parse(payloadEnv);
} catch (error41) {
throw new Error(
`Failed to parse PULLFROG_PAYLOAD: ${error41 instanceof Error ? error41.message : String(error41)}`
);
}
}
function getMcpContext() {
const githubInstallationToken = process.env.GITHUB_INSTALLATION_TOKEN;
if (!githubInstallationToken) {
throw new Error("GITHUB_INSTALLATION_TOKEN environment variable is required");
@@ -107185,28 +107235,18 @@ var getMcpContext = cached(() => {
...parseRepoContext(),
octokit: new Octokit2({
auth: githubInstallationToken
})
}),
payload: getPayload()
};
});
}
var tool = (toolDef) => {
const toolName = toolDef.name;
const originalExecute = toolDef.execute;
toolDef.execute = async (args2, context) => {
try {
const result = await originalExecute(args2, context);
const isError = result && typeof result === "object" && "isError" in result && result.isError === true;
const resultData = result && typeof result === "object" && "content" in result ? result.content[0]?.text : void 0;
if (isError && resultData) {
log.toolCall({ toolName, request: args2, error: resultData });
} else if (resultData) {
log.toolCall({ toolName, request: args2, result: resultData });
} else {
log.toolCall({ toolName, request: args2 });
}
return result;
} catch (error41) {
const errorMessage = error41 instanceof Error ? error41.message : String(error41);
log.toolCall({ toolName, request: args2, error: errorMessage });
throw error41;
}
};
@@ -107332,6 +107372,33 @@ var GetCheckSuiteLogsTool = tool({
});
// mcp/comment.ts
var PULLFROG_DIVIDER = "<!-- PULLFROG_DIVIDER_DO_NOT_REMOVE_PLZ -->";
function buildCommentFooter(payload) {
const repoContext = parseRepoContext();
const runId = process.env.GITHUB_RUN_ID;
const agentName = payload.agent;
const agentInfo = agentName ? agentsManifest[agentName] : null;
const agentDisplayName = agentInfo?.displayName || "Unknown Agent";
const agentUrl = agentInfo?.url || "https://pullfrog.ai";
const workflowRunUrl = runId ? `https://github.com/${repoContext.owner}/${repoContext.name}/actions/runs/${runId}` : `https://github.com/${repoContext.owner}/${repoContext.name}`;
return `
${PULLFROG_DIVIDER}
---
<sup>\u{1F438} Triggered by [Pullfrog](https://pullfrog.ai) | \u{1F916} [${agentDisplayName}](${agentUrl}) | [View workflow run](${workflowRunUrl}) | [\u{1D54F}](https://x.com/pullfrogai)</sup>`;
}
function stripExistingFooter(body) {
const dividerIndex = body.indexOf(PULLFROG_DIVIDER);
if (dividerIndex === -1) {
return body;
}
return body.substring(0, dividerIndex).trimEnd();
}
function addFooter(body, payload) {
const bodyWithoutFooter = stripExistingFooter(body);
const footer = buildCommentFooter(payload);
return `${bodyWithoutFooter}${footer}`;
}
var Comment = type({
issueNumber: type.number.describe("the issue number to comment on"),
body: type.string.describe("the comment body content")
@@ -107341,11 +107408,12 @@ var CreateCommentTool = tool({
description: "Create a comment on a GitHub issue",
parameters: Comment,
execute: contextualize(async ({ issueNumber, body }, ctx) => {
const bodyWithFooter = addFooter(body, ctx.payload);
const result = await ctx.octokit.rest.issues.createComment({
owner: ctx.owner,
repo: ctx.name,
issue_number: issueNumber,
body
body: bodyWithFooter
});
return {
success: true,
@@ -107364,11 +107432,12 @@ var EditCommentTool = tool({
description: "Edit a GitHub issue comment by its ID",
parameters: EditComment,
execute: contextualize(async ({ commentId, body }, ctx) => {
const bodyWithFooter = addFooter(body, ctx.payload);
const result = await ctx.octokit.rest.issues.updateComment({
owner: ctx.owner,
repo: ctx.name,
comment_id: commentId,
body
body: bodyWithFooter
});
return {
success: true,
@@ -107394,11 +107463,13 @@ var CreateWorkingCommentTool = tool({
if (workingCommentId) {
throw new Error("create_working_comment may not be called multiple times");
}
const body = `${intent} <img src="https://pullfrog.ai/party-parrot.gif" width="14px" height="14px" style="vertical-align: middle; margin-left: 4px;" />`;
const bodyWithFooter = addFooter(body, ctx.payload);
const result = await ctx.octokit.rest.issues.createComment({
owner: ctx.owner,
repo: ctx.name,
issue_number: issueNumber,
body: `${intent} <img src="https://pullfrog.ai/party-parrot.gif" width="14px" height="14px" style="vertical-align: middle; margin-left: 4px;" />`
body: bodyWithFooter
});
workingCommentId = result.data.id;
return {
@@ -107420,11 +107491,12 @@ var UpdateWorkingCommentTool = tool({
if (!workingCommentId) {
throw new Error("create_working_comment must be called before update_working_comment");
}
const bodyWithFooter = addFooter(body, ctx.payload);
const result = await ctx.octokit.rest.issues.updateComment({
owner: ctx.owner,
repo: ctx.name,
comment_id: workingCommentId,
body
body: bodyWithFooter
});
return {
success: true,
@@ -107468,8 +107540,43 @@ var IssueTool = tool({
})
});
// utils/shell.ts
import { spawnSync } from "node:child_process";
function $(cmd, args2, options) {
const encoding = options?.encoding ?? "utf-8";
const result = spawnSync(cmd, args2, {
stdio: ["inherit", "pipe", "pipe"],
encoding,
cwd: options?.cwd
});
const stdout = result.stdout ?? "";
const stderr = result.stderr ?? "";
if (options?.log !== false) {
if (stdout) {
process.stdout.write(stdout);
}
if (stderr) {
process.stderr.write(stderr);
}
}
if (result.status !== 0) {
const errorResult = {
status: result.status ?? -1,
stdout,
stderr
};
if (options?.onError) {
options.onError(errorResult);
return stdout.trim();
}
throw new Error(
`Command failed with exit code ${errorResult.status}: ${stderr || "Unknown error"}`
);
}
return stdout.trim();
}
// mcp/pr.ts
import { execSync } from "node:child_process";
var PullRequest = type({
title: type.string.describe("the title of the pull request"),
body: type.string.describe("the body content of the pull request"),
@@ -107480,9 +107587,7 @@ var PullRequestTool = tool({
description: "Create a pull request from the current branch",
parameters: PullRequest,
execute: contextualize(async ({ title, body, base }, ctx) => {
const currentBranch = execSync("git rev-parse --abbrev-ref HEAD", {
encoding: "utf8"
}).trim();
const currentBranch = $("git", ["rev-parse", "--abbrev-ref", "HEAD"], { log: false });
log.info(`Current branch: ${currentBranch}`);
const result = await ctx.octokit.rest.pulls.create({
owner: ctx.owner,
@@ -107505,7 +107610,6 @@ var PullRequestTool = tool({
});
// mcp/prInfo.ts
import { execSync as execSync2 } from "node:child_process";
var PullRequestInfo = type({
pull_number: type.number.describe("The pull request number to fetch")
});
@@ -107526,11 +107630,11 @@ var PullRequestInfoTool = tool({
throw new Error(`Base branch not found for PR #${pull_number}`);
}
log.info(`Fetching base branch: origin/${baseBranch}`);
execSync2(`git fetch origin ${baseBranch} --depth=20`, { stdio: "inherit" });
$("git", ["fetch", "origin", baseBranch, "--depth=20"]);
log.info(`Fetching PR branch: origin/${headBranch}`);
execSync2(`git fetch origin ${headBranch}`, { stdio: "inherit" });
$("git", ["fetch", "origin", headBranch]);
log.info(`Checking out PR branch: origin/${headBranch}`);
execSync2(`git checkout -B ${headBranch} origin/${headBranch}`, { stdio: "inherit" });
$("git", ["checkout", "-B", headBranch, `origin/${headBranch}`]);
return {
number: data.number,
url: data.html_url,
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@pullfrog/action",
"version": "0.0.111",
"version": "0.0.112",
"type": "module",
"files": [
"index.js",