pullfrog 0.1.4 → 0.1.5
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 +18 -13
- package/dist/index.js +17 -12
- package/dist/internal.js +1 -2
- package/dist/mcp/geminiSanitizer.d.ts +15 -4
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -108238,8 +108238,7 @@ var providers = {
|
|
|
108238
108238
|
"gpt-5-nano": {
|
|
108239
108239
|
displayName: "GPT Nano",
|
|
108240
108240
|
resolve: "opencode/gpt-5-nano",
|
|
108241
|
-
|
|
108242
|
-
isFree: true
|
|
108241
|
+
openRouterResolve: "openrouter/openai/gpt-5-nano"
|
|
108243
108242
|
},
|
|
108244
108243
|
"mimo-v2-pro-free": {
|
|
108245
108244
|
displayName: "MiMo V2 Pro",
|
|
@@ -108468,6 +108467,11 @@ async function apiFetch(options) {
|
|
|
108468
108467
|
if (bypassSecret) {
|
|
108469
108468
|
headers["x-vercel-protection-bypass"] = bypassSecret;
|
|
108470
108469
|
}
|
|
108470
|
+
if (!options.body) {
|
|
108471
|
+
for (const key of Object.keys(headers)) {
|
|
108472
|
+
if (key.toLowerCase() === "content-type") delete headers[key];
|
|
108473
|
+
}
|
|
108474
|
+
}
|
|
108471
108475
|
log.debug(`api fetch: ${options.method ?? "GET"} ${url4.pathname}`);
|
|
108472
108476
|
const init = {
|
|
108473
108477
|
method: options.method ?? "GET",
|
|
@@ -109156,8 +109160,11 @@ function sanitizeToolForGemini(tool2) {
|
|
|
109156
109160
|
}
|
|
109157
109161
|
function isGeminiRouted(ctx) {
|
|
109158
109162
|
const effective = ctx.payload.proxyModel ?? ctx.resolvedModel ?? ctx.payload.model;
|
|
109159
|
-
if (!effective) return
|
|
109160
|
-
|
|
109163
|
+
if (!effective) return true;
|
|
109164
|
+
const normalized = effective.toLowerCase();
|
|
109165
|
+
if (normalized.includes("gemini")) return true;
|
|
109166
|
+
if (!normalized.includes("/")) return true;
|
|
109167
|
+
return false;
|
|
109161
109168
|
}
|
|
109162
109169
|
|
|
109163
109170
|
// mcp/shared.ts
|
|
@@ -142589,7 +142596,7 @@ var import_semver = __toESM(require_semver2(), 1);
|
|
|
142589
142596
|
// package.json
|
|
142590
142597
|
var package_default = {
|
|
142591
142598
|
name: "pullfrog",
|
|
142592
|
-
version: "0.1.
|
|
142599
|
+
version: "0.1.5",
|
|
142593
142600
|
type: "module",
|
|
142594
142601
|
bin: {
|
|
142595
142602
|
pullfrog: "dist/cli.mjs",
|
|
@@ -147478,8 +147485,7 @@ function stripProviderPrefix(specifier) {
|
|
|
147478
147485
|
const slashIndex = specifier.indexOf("/");
|
|
147479
147486
|
return slashIndex > 0 ? specifier.slice(slashIndex + 1) : specifier;
|
|
147480
147487
|
}
|
|
147481
|
-
function resolveEffort(
|
|
147482
|
-
if (model?.includes("opus")) return "max";
|
|
147488
|
+
function resolveEffort(_model) {
|
|
147483
147489
|
return "high";
|
|
147484
147490
|
}
|
|
147485
147491
|
function tailLines(text, maxCodeUnits) {
|
|
@@ -153637,8 +153643,7 @@ async function fetchRunContext(params) {
|
|
|
153637
153643
|
const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
|
|
153638
153644
|
try {
|
|
153639
153645
|
const headers = {
|
|
153640
|
-
Authorization: `Bearer ${params.token}
|
|
153641
|
-
"Content-Type": "application/json"
|
|
153646
|
+
Authorization: `Bearer ${params.token}`
|
|
153642
153647
|
};
|
|
153643
153648
|
if (params.oidcToken) {
|
|
153644
153649
|
headers["X-GitHub-OIDC-Token"] = params.oidcToken;
|
|
@@ -154054,7 +154059,7 @@ function formatBillingErrorSummary(error49, owner) {
|
|
|
154054
154059
|
return [
|
|
154055
154060
|
"**Add a card to start using Pullfrog Router.**",
|
|
154056
154061
|
"",
|
|
154057
|
-
"Router proxies OpenRouter at raw cost \u2014 no platform markup
|
|
154062
|
+
"Router proxies OpenRouter at raw cost \u2014 no platform markup. Add a card and we'll auto-reload your wallet so runs keep flowing.",
|
|
154058
154063
|
"",
|
|
154059
154064
|
`[Add a card \u2192](${billingConsoleUrl(owner, "model-access")})`
|
|
154060
154065
|
].join("\n");
|
|
@@ -154230,12 +154235,12 @@ async function persistLearnings(ctx) {
|
|
|
154230
154235
|
});
|
|
154231
154236
|
if (!response.ok) {
|
|
154232
154237
|
const error49 = await response.text().catch(() => "(no body)");
|
|
154233
|
-
log.
|
|
154238
|
+
log.warning(`learnings persist failed (${response.status}): ${error49}`);
|
|
154234
154239
|
return;
|
|
154235
154240
|
}
|
|
154236
154241
|
log.info("\xBB learnings updated");
|
|
154237
154242
|
} catch (err) {
|
|
154238
|
-
log.
|
|
154243
|
+
log.warning(`learnings persist failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
154239
154244
|
}
|
|
154240
154245
|
}
|
|
154241
154246
|
async function persistSummary(ctx) {
|
|
@@ -156518,7 +156523,7 @@ async function run2() {
|
|
|
156518
156523
|
}
|
|
156519
156524
|
|
|
156520
156525
|
// cli.ts
|
|
156521
|
-
var VERSION10 = "0.1.
|
|
156526
|
+
var VERSION10 = "0.1.5";
|
|
156522
156527
|
var bin = basename2(process.argv[1] || "");
|
|
156523
156528
|
var PROG = bin === "pf" || bin === "pullfrog" ? bin : "pullfrog";
|
|
156524
156529
|
var rawArgs = process.argv.slice(2);
|
package/dist/index.js
CHANGED
|
@@ -107955,8 +107955,7 @@ var providers = {
|
|
|
107955
107955
|
"gpt-5-nano": {
|
|
107956
107956
|
displayName: "GPT Nano",
|
|
107957
107957
|
resolve: "opencode/gpt-5-nano",
|
|
107958
|
-
|
|
107959
|
-
isFree: true
|
|
107958
|
+
openRouterResolve: "openrouter/openai/gpt-5-nano"
|
|
107960
107959
|
},
|
|
107961
107960
|
"mimo-v2-pro-free": {
|
|
107962
107961
|
displayName: "MiMo V2 Pro",
|
|
@@ -108185,6 +108184,11 @@ async function apiFetch(options) {
|
|
|
108185
108184
|
if (bypassSecret) {
|
|
108186
108185
|
headers["x-vercel-protection-bypass"] = bypassSecret;
|
|
108187
108186
|
}
|
|
108187
|
+
if (!options.body) {
|
|
108188
|
+
for (const key of Object.keys(headers)) {
|
|
108189
|
+
if (key.toLowerCase() === "content-type") delete headers[key];
|
|
108190
|
+
}
|
|
108191
|
+
}
|
|
108188
108192
|
log.debug(`api fetch: ${options.method ?? "GET"} ${url4.pathname}`);
|
|
108189
108193
|
const init = {
|
|
108190
108194
|
method: options.method ?? "GET",
|
|
@@ -108873,8 +108877,11 @@ function sanitizeToolForGemini(tool2) {
|
|
|
108873
108877
|
}
|
|
108874
108878
|
function isGeminiRouted(ctx) {
|
|
108875
108879
|
const effective = ctx.payload.proxyModel ?? ctx.resolvedModel ?? ctx.payload.model;
|
|
108876
|
-
if (!effective) return
|
|
108877
|
-
|
|
108880
|
+
if (!effective) return true;
|
|
108881
|
+
const normalized = effective.toLowerCase();
|
|
108882
|
+
if (normalized.includes("gemini")) return true;
|
|
108883
|
+
if (!normalized.includes("/")) return true;
|
|
108884
|
+
return false;
|
|
108878
108885
|
}
|
|
108879
108886
|
|
|
108880
108887
|
// mcp/shared.ts
|
|
@@ -142306,7 +142313,7 @@ var import_semver = __toESM(require_semver2(), 1);
|
|
|
142306
142313
|
// package.json
|
|
142307
142314
|
var package_default = {
|
|
142308
142315
|
name: "pullfrog",
|
|
142309
|
-
version: "0.1.
|
|
142316
|
+
version: "0.1.5",
|
|
142310
142317
|
type: "module",
|
|
142311
142318
|
bin: {
|
|
142312
142319
|
pullfrog: "dist/cli.mjs",
|
|
@@ -147195,8 +147202,7 @@ function stripProviderPrefix(specifier) {
|
|
|
147195
147202
|
const slashIndex = specifier.indexOf("/");
|
|
147196
147203
|
return slashIndex > 0 ? specifier.slice(slashIndex + 1) : specifier;
|
|
147197
147204
|
}
|
|
147198
|
-
function resolveEffort(
|
|
147199
|
-
if (model?.includes("opus")) return "max";
|
|
147205
|
+
function resolveEffort(_model) {
|
|
147200
147206
|
return "high";
|
|
147201
147207
|
}
|
|
147202
147208
|
function tailLines(text, maxCodeUnits) {
|
|
@@ -153354,8 +153360,7 @@ async function fetchRunContext(params) {
|
|
|
153354
153360
|
const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
|
|
153355
153361
|
try {
|
|
153356
153362
|
const headers = {
|
|
153357
|
-
Authorization: `Bearer ${params.token}
|
|
153358
|
-
"Content-Type": "application/json"
|
|
153363
|
+
Authorization: `Bearer ${params.token}`
|
|
153359
153364
|
};
|
|
153360
153365
|
if (params.oidcToken) {
|
|
153361
153366
|
headers["X-GitHub-OIDC-Token"] = params.oidcToken;
|
|
@@ -153771,7 +153776,7 @@ function formatBillingErrorSummary(error49, owner) {
|
|
|
153771
153776
|
return [
|
|
153772
153777
|
"**Add a card to start using Pullfrog Router.**",
|
|
153773
153778
|
"",
|
|
153774
|
-
"Router proxies OpenRouter at raw cost \u2014 no platform markup
|
|
153779
|
+
"Router proxies OpenRouter at raw cost \u2014 no platform markup. Add a card and we'll auto-reload your wallet so runs keep flowing.",
|
|
153775
153780
|
"",
|
|
153776
153781
|
`[Add a card \u2192](${billingConsoleUrl(owner, "model-access")})`
|
|
153777
153782
|
].join("\n");
|
|
@@ -153947,12 +153952,12 @@ async function persistLearnings(ctx) {
|
|
|
153947
153952
|
});
|
|
153948
153953
|
if (!response.ok) {
|
|
153949
153954
|
const error49 = await response.text().catch(() => "(no body)");
|
|
153950
|
-
log.
|
|
153955
|
+
log.warning(`learnings persist failed (${response.status}): ${error49}`);
|
|
153951
153956
|
return;
|
|
153952
153957
|
}
|
|
153953
153958
|
log.info("\xBB learnings updated");
|
|
153954
153959
|
} catch (err) {
|
|
153955
|
-
log.
|
|
153960
|
+
log.warning(`learnings persist failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
153956
153961
|
}
|
|
153957
153962
|
}
|
|
153958
153963
|
async function persistSummary(ctx) {
|
package/dist/internal.js
CHANGED
|
@@ -224,8 +224,7 @@ var providers = {
|
|
|
224
224
|
"gpt-5-nano": {
|
|
225
225
|
displayName: "GPT Nano",
|
|
226
226
|
resolve: "opencode/gpt-5-nano",
|
|
227
|
-
|
|
228
|
-
isFree: true
|
|
227
|
+
openRouterResolve: "openrouter/openai/gpt-5-nano"
|
|
229
228
|
},
|
|
230
229
|
"mimo-v2-pro-free": {
|
|
231
230
|
displayName: "MiMo V2 Pro",
|
|
@@ -9,9 +9,20 @@ export declare function sanitizeForGemini(schema: unknown): unknown;
|
|
|
9
9
|
export declare function wrapSchemaForGemini(schema: StandardSchemaV1<any>): StandardSchemaV1<any>;
|
|
10
10
|
export declare function sanitizeToolForGemini<T extends Tool<any, any>>(tool: T): T;
|
|
11
11
|
/**
|
|
12
|
-
* true when the effective upstream model is
|
|
13
|
-
* language API
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* true when the effective upstream model is — or might become — google
|
|
13
|
+
* generative language API traffic. matches:
|
|
14
|
+
* - direct `google/*`, opencode `opencode/gemini-*`, openrouter
|
|
15
|
+
* `openrouter/google/gemini-*` (slug substring "gemini" wins).
|
|
16
|
+
* - any unresolved specifier: `undefined`, `"auto"`, or a slug that
|
|
17
|
+
* didn't map through the alias registry (no `provider/` prefix).
|
|
18
|
+
* these flow through the agent's own auto-select, which may land
|
|
19
|
+
* on gemini *after* the MCP server has already registered tools —
|
|
20
|
+
* at which point sanitization is too late to apply. erring on the
|
|
21
|
+
* side of sanitizing is safe: cases 1 + 2 are universally
|
|
22
|
+
* compatible JSON-Schema normalizations (enum-only → typed string,
|
|
23
|
+
* collapsible const-unions → string enum); case 3 is gemini-
|
|
24
|
+
* specific but only fires on non-collapsible unions, which arktype
|
|
25
|
+
* does not emit for our current tool schemas. see issue #676 for
|
|
26
|
+
* the prod failure that motivated this widening.
|
|
16
27
|
*/
|
|
17
28
|
export declare function isGeminiRouted(ctx: ToolContext): boolean;
|