pullfrog 0.1.91 → 0.1.93
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 +1639 -1668
- package/dist/external.d.ts +1 -1
- package/dist/index.js +1634 -1663
- package/dist/internal/index.d.ts +1 -1
- package/dist/internal.js +42 -29
- package/dist/models.d.ts +25 -0
- package/dist/utils/buildPullfrogFooter.d.ts +2 -2
- package/dist/utils/codexHome.d.ts +6 -2
- package/package.json +3 -3
package/dist/internal/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { CLI_CONTRACT_HEADER, CLI_CONTRACT_VERSION, CLI_UPGRADE_MESSAGE } from "
|
|
|
6
6
|
export type { ConfigField, ConfigScope, ConfigValue } from "../configuration.ts";
|
|
7
7
|
export { configEntrySchema, configFields, configResponseSchema, configValueSchema, } from "../configuration.ts";
|
|
8
8
|
export type { AuthorPermission, AutoTier, EffortPosition, ModelAlias, ModelProvider, Payload, PayloadEvent, PayloadRouting, ProviderConfig, PushPermission, RouterSource, RouterTier, ShellPermission, ToolPermission, WriteablePayload, XrepoConfig, } from "../external.ts";
|
|
9
|
-
export { AUTO_EFFICIENT, AUTO_INTELLIGENT, AUTO_ROUTER, autoLadder, autoRoutedSlug, DEFAULT_EFFORT_POSITION, DEFAULT_PROXY_MODEL, defaultAutoTier, EFFORT_ALIASES, getAutoSelectHintModel, getModelEffortLevels, getModelEnvVars, getModelManagedCredentials, getModelProvider, getProviderDisplayName, isAutoRouted, isAutoSlug, isAutoTier, isCardGatedModel, isEffortPosition, isOssAllowedModel, isRouterTier, ladderRungs, modelAliases, modelHasStoredAuth, OSS_MODEL_ALLOWLIST, OSS_RECOMMENDED_MODEL, offeredRungs, ossFundedModelNames, PROVIDER_GATEWAY_URL_ENV, parseEffortPosition, parseModel, providers, pullfrogMcpName, ROUTED_PROVIDERS, ROUTER_LADDER, ROUTER_TIERS, resolveAutoTier, resolveCliModel, resolveDisplayAlias, resolveModelRung, resolveModelSlug, resolveOpenRouterModel, resolveRoutedModel, resolveRung, rungLabel, rungPosition, SUBSIDY_RUNG, } from "../external.ts";
|
|
9
|
+
export { AUTO_EFFICIENT, AUTO_INTELLIGENT, AUTO_ROUTER, autoLadder, autoRoutedSlug, DEFAULT_EFFORT_POSITION, DEFAULT_PROXY_MODEL, defaultAutoTier, EFFORT_ALIASES, getAutoSelectHintModel, getModelEffortLevels, getModelEnvVars, getModelManagedCredentials, getModelProvider, getProviderDisplayName, isAutoRouted, isAutoSlug, isAutoTier, isCardGatedModel, isEffortPosition, isOssAllowedModel, isRouterTier, ladderRungs, modelAliases, modelHasStoredAuth, modelIdLabel, OSS_MODEL_ALLOWLIST, OSS_RECOMMENDED_MODEL, offeredRungs, ossFundedModelNames, PROVIDER_GATEWAY_URL_ENV, parseEffortPosition, parseModel, pickUsesOpenRouter, providers, pullfrogMcpName, ROUTED_PROVIDERS, ROUTER_LADDER, ROUTER_TIERS, resolveAutoTier, resolveCliModel, resolveDisplayAlias, resolveModelRung, resolveModelSlug, resolveOpenRouterModel, resolveRoutedModel, resolveRung, routerProxyOptOut, rungLabel, rungPosition, SUBSIDY_RUNG, } from "../external.ts";
|
|
10
10
|
export type { Mode } from "../modes.ts";
|
|
11
11
|
export { modes } from "../modes.ts";
|
|
12
12
|
export { type CommercialRefusal, commercialPaywallBody } from "../utils/billingErrors.ts";
|
package/dist/internal.js
CHANGED
|
@@ -8,7 +8,7 @@ var __export = (target, all) => {
|
|
|
8
8
|
// package.json
|
|
9
9
|
var package_default = {
|
|
10
10
|
name: "pullfrog",
|
|
11
|
-
version: "0.1.
|
|
11
|
+
version: "0.1.93",
|
|
12
12
|
cliContractVersion: "1",
|
|
13
13
|
type: "module",
|
|
14
14
|
bin: {
|
|
@@ -44,8 +44,8 @@ var package_default = {
|
|
|
44
44
|
"@octokit/plugin-throttling": "^11.0.3",
|
|
45
45
|
"@octokit/rest": "^22.0.0",
|
|
46
46
|
"@octokit/webhooks-types": "^7.6.1",
|
|
47
|
-
"@openai/codex": "0.
|
|
48
|
-
"@openai/codex-sdk": "0.
|
|
47
|
+
"@openai/codex": "0.159.2",
|
|
48
|
+
"@openai/codex-sdk": "0.159.2",
|
|
49
49
|
"@opencode-ai/sdk": "1.18.29",
|
|
50
50
|
"@standard-schema/spec": "1.1.0",
|
|
51
51
|
"@toon-format/toon": "^1.0.0",
|
|
@@ -14387,9 +14387,9 @@ var providers = {
|
|
|
14387
14387
|
},
|
|
14388
14388
|
"gpt-sol": {
|
|
14389
14389
|
displayName: "GPT Sol",
|
|
14390
|
-
resolve: "openai/gpt-6-sol",
|
|
14391
|
-
effort: ["
|
|
14392
|
-
openRouterResolve: "openrouter/openai/gpt-6-sol",
|
|
14390
|
+
resolve: "openai/gpt-6.1-sol",
|
|
14391
|
+
effort: ["low", "medium", "high", "xhigh", "max"],
|
|
14392
|
+
openRouterResolve: "openrouter/openai/gpt-6.1-sol",
|
|
14393
14393
|
preferred: true,
|
|
14394
14394
|
subagentModel: "gpt-terra"
|
|
14395
14395
|
},
|
|
@@ -14399,9 +14399,9 @@ var providers = {
|
|
|
14399
14399
|
"gpt-sol-pro": {
|
|
14400
14400
|
displayName: "GPT Sol Pro",
|
|
14401
14401
|
description: "Maximum reasoning effort",
|
|
14402
|
-
resolve: "openai/gpt-6-sol",
|
|
14403
|
-
effort: ["
|
|
14404
|
-
openRouterResolve: "openrouter/openai/gpt-6-sol-pro",
|
|
14402
|
+
resolve: "openai/gpt-6.1-sol",
|
|
14403
|
+
effort: ["low", "medium", "high", "xhigh", "max"],
|
|
14404
|
+
openRouterResolve: "openrouter/openai/gpt-6.1-sol-pro",
|
|
14405
14405
|
subagentModel: "gpt-sol"
|
|
14406
14406
|
},
|
|
14407
14407
|
// gpt-5.6's balanced mid-tier. selectable on its own and doubles as Sol's
|
|
@@ -14788,9 +14788,9 @@ var providers = {
|
|
|
14788
14788
|
},
|
|
14789
14789
|
"gpt-sol": {
|
|
14790
14790
|
displayName: "GPT Sol",
|
|
14791
|
-
resolve: "opencode/gpt-6-sol",
|
|
14792
|
-
effort: ["
|
|
14793
|
-
openRouterResolve: "openrouter/openai/gpt-6-sol",
|
|
14791
|
+
resolve: "opencode/gpt-6.1-sol",
|
|
14792
|
+
effort: ["low", "medium", "high", "xhigh", "max"],
|
|
14793
|
+
openRouterResolve: "openrouter/openai/gpt-6.1-sol",
|
|
14794
14794
|
subagentModel: "gpt-terra"
|
|
14795
14795
|
},
|
|
14796
14796
|
"gpt-astra": {
|
|
@@ -14804,9 +14804,9 @@ var providers = {
|
|
|
14804
14804
|
"gpt-sol-pro": {
|
|
14805
14805
|
displayName: "GPT Sol Pro",
|
|
14806
14806
|
description: "Maximum reasoning effort",
|
|
14807
|
-
resolve: "opencode/gpt-6-sol",
|
|
14808
|
-
effort: ["
|
|
14809
|
-
openRouterResolve: "openrouter/openai/gpt-6-sol-pro",
|
|
14807
|
+
resolve: "opencode/gpt-6.1-sol",
|
|
14808
|
+
effort: ["low", "medium", "high", "xhigh", "max"],
|
|
14809
|
+
openRouterResolve: "openrouter/openai/gpt-6.1-sol-pro",
|
|
14810
14810
|
subagentModel: "gpt-sol"
|
|
14811
14811
|
},
|
|
14812
14812
|
// gpt-5.6 balanced mid-tier — selectable + Sol's subagent. see openai above.
|
|
@@ -15299,9 +15299,9 @@ var providers = {
|
|
|
15299
15299
|
// the chosen tiers across funding paths.
|
|
15300
15300
|
"gpt-sol": {
|
|
15301
15301
|
displayName: "GPT Sol",
|
|
15302
|
-
resolve: "openrouter/openai/gpt-6-sol",
|
|
15303
|
-
effort: ["
|
|
15304
|
-
openRouterResolve: "openrouter/openai/gpt-6-sol",
|
|
15302
|
+
resolve: "openrouter/openai/gpt-6.1-sol",
|
|
15303
|
+
effort: ["low", "medium", "high", "xhigh", "max"],
|
|
15304
|
+
openRouterResolve: "openrouter/openai/gpt-6.1-sol",
|
|
15305
15305
|
subagentModel: "gpt-terra"
|
|
15306
15306
|
},
|
|
15307
15307
|
"gpt-astra": {
|
|
@@ -15315,9 +15315,9 @@ var providers = {
|
|
|
15315
15315
|
"gpt-sol-pro": {
|
|
15316
15316
|
displayName: "GPT Sol Pro",
|
|
15317
15317
|
description: "Maximum reasoning effort",
|
|
15318
|
-
resolve: "openrouter/openai/gpt-6-sol-pro",
|
|
15319
|
-
effort: ["
|
|
15320
|
-
openRouterResolve: "openrouter/openai/gpt-6-sol-pro",
|
|
15318
|
+
resolve: "openrouter/openai/gpt-6.1-sol-pro",
|
|
15319
|
+
effort: ["low", "medium", "high", "xhigh", "max"],
|
|
15320
|
+
openRouterResolve: "openrouter/openai/gpt-6.1-sol-pro",
|
|
15321
15321
|
subagentModel: "gpt-sol"
|
|
15322
15322
|
},
|
|
15323
15323
|
// gpt-5.6 balanced mid-tier — selectable + Sol's subagent. see openai above.
|
|
@@ -15496,8 +15496,8 @@ var providers = {
|
|
|
15496
15496
|
},
|
|
15497
15497
|
"gpt-sol": {
|
|
15498
15498
|
displayName: "GPT Sol",
|
|
15499
|
-
resolve: "vercel/openai/gpt-6-sol",
|
|
15500
|
-
effort: ["
|
|
15499
|
+
resolve: "vercel/openai/gpt-6.1-sol",
|
|
15500
|
+
effort: ["low", "medium", "high", "xhigh", "max"],
|
|
15501
15501
|
subagentModel: "gpt-terra"
|
|
15502
15502
|
},
|
|
15503
15503
|
"gpt-astra": {
|
|
@@ -15571,6 +15571,9 @@ function getProviderDisplayName(slug) {
|
|
|
15571
15571
|
const parsed = parseModel(slug);
|
|
15572
15572
|
return providers[parsed.provider]?.displayName;
|
|
15573
15573
|
}
|
|
15574
|
+
function modelIdLabel(specifier) {
|
|
15575
|
+
return specifier.slice(specifier.lastIndexOf("/") + 1).replace(/^~/, "");
|
|
15576
|
+
}
|
|
15574
15577
|
function getModelEnvVars(slug) {
|
|
15575
15578
|
const parsed = parseModel(slug);
|
|
15576
15579
|
const providerConfig = providers[parsed.provider];
|
|
@@ -15601,6 +15604,13 @@ function modelHasStoredAuth(params) {
|
|
|
15601
15604
|
];
|
|
15602
15605
|
return authVars.some((v) => params.secretNames.includes(v));
|
|
15603
15606
|
}
|
|
15607
|
+
function routerProxyOptOut(ctx) {
|
|
15608
|
+
if (ctx.slug === null) return false;
|
|
15609
|
+
return resolveDisplayAlias(ctx.slug)?.isFree === true || modelHasStoredAuth({ model: ctx.slug, secretNames: ctx.secretNames });
|
|
15610
|
+
}
|
|
15611
|
+
function pickUsesOpenRouter(params) {
|
|
15612
|
+
return params.proxied && !routerProxyOptOut(params);
|
|
15613
|
+
}
|
|
15604
15614
|
var modelAliases = Object.entries(providers).flatMap(
|
|
15605
15615
|
([providerKey, config2]) => Object.entries(config2.models).map(([modelId, def]) => ({
|
|
15606
15616
|
slug: `${providerKey}/${modelId}`,
|
|
@@ -16247,19 +16257,19 @@ function commercialPaywallBody(params) {
|
|
|
16247
16257
|
var PULLFROG_DIVIDER = "<!-- PULLFROG_DIVIDER_DO_NOT_REMOVE_PLZ -->";
|
|
16248
16258
|
var FROG_LOGO = `<a href="https://pullfrog.com"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pullfrog.com/logos/frog-white-full-18px.png"><img src="https://pullfrog.com/logos/frog-green-full-18px.png" width="9px" height="9px" style="vertical-align: middle; " alt="Pullfrog"></picture></a>`;
|
|
16249
16259
|
function formatModelLabel(params) {
|
|
16250
|
-
const
|
|
16260
|
+
const slugAlias = resolveDisplayAlias(params.model);
|
|
16261
|
+
const alias = slugAlias ?? // reverse-lookup: when the caller passes an effective model (proxy or
|
|
16251
16262
|
// resolved target like "openrouter/anthropic/claude-opus-4.7") instead of
|
|
16252
|
-
// a stored alias slug, find the alias whose resolve target matches
|
|
16253
|
-
// still render a friendly display name.
|
|
16263
|
+
// a stored alias slug, find the alias whose resolve target matches.
|
|
16254
16264
|
modelAliases.find((a) => a.resolve === params.model || a.openRouterResolve === params.model);
|
|
16255
|
-
const
|
|
16265
|
+
const modelName = slugAlias?.routing ? slugAlias.displayName : modelIdLabel(slugAlias?.resolve ?? params.model);
|
|
16256
16266
|
if (params.oss) {
|
|
16257
|
-
const ossBase = `\`${
|
|
16267
|
+
const ossBase = `\`${modelName}\` (free via [Pullfrog for OSS](https://pullfrog.com/for-oss))`;
|
|
16258
16268
|
if (params.clamped?.reason !== "oss") return ossBase;
|
|
16259
16269
|
const configured = isAutoTier(params.clamped.from) ? "the intelligent tier" : `\`${resolveDisplayAlias(params.clamped.from)?.displayName ?? params.clamped.from}\``;
|
|
16260
16270
|
return `${ossBase} (${configured} not used \u2014 pick one of the [funded models](https://docs.pullfrog.com/models#pullfrog-for-oss) or add a [provider key](https://docs.pullfrog.com/keys) to run your own)`;
|
|
16261
16271
|
}
|
|
16262
|
-
const base = alias?.isFree ? `\`${
|
|
16272
|
+
const base = alias?.isFree ? `\`${modelName}\` (free)` : `\`${modelName}\``;
|
|
16263
16273
|
if (params.clamped?.reason === "trial") {
|
|
16264
16274
|
return `${base} (model usage covered by Pullfrog)`;
|
|
16265
16275
|
}
|
|
@@ -17396,6 +17406,7 @@ export {
|
|
|
17396
17406
|
ladderRungs,
|
|
17397
17407
|
modelAliases,
|
|
17398
17408
|
modelHasStoredAuth,
|
|
17409
|
+
modelIdLabel,
|
|
17399
17410
|
modes,
|
|
17400
17411
|
offeredRungs,
|
|
17401
17412
|
ossFundedModelNames,
|
|
@@ -17404,6 +17415,7 @@ export {
|
|
|
17404
17415
|
parseModel,
|
|
17405
17416
|
parseTimeString,
|
|
17406
17417
|
parseXaiAuthBody,
|
|
17418
|
+
pickUsesOpenRouter,
|
|
17407
17419
|
probeSubscription,
|
|
17408
17420
|
providers,
|
|
17409
17421
|
pullfrogMcpName,
|
|
@@ -17417,6 +17429,7 @@ export {
|
|
|
17417
17429
|
resolveOpenRouterModel,
|
|
17418
17430
|
resolveRoutedModel,
|
|
17419
17431
|
resolveRung,
|
|
17432
|
+
routerProxyOptOut,
|
|
17420
17433
|
runStatusCheckNeedsFinalizing,
|
|
17421
17434
|
rungLabel,
|
|
17422
17435
|
rungPosition,
|
package/dist/models.d.ts
CHANGED
|
@@ -140,6 +140,9 @@ export declare function getModelProvider(slug: string): string;
|
|
|
140
140
|
export declare function getProviderDisplayName(slug: string): string | undefined;
|
|
141
141
|
/** provider-prefixed specifier → bare model id (`anthropic/claude-opus-5` → `claude-opus-5`). */
|
|
142
142
|
export declare function stripProviderPrefix(specifier: string): string;
|
|
143
|
+
/** specifier → the model's own id, for display: `openrouter/~anthropic/claude-opus-latest` →
|
|
144
|
+
* `claude-opus-latest`. names what an alias points at today, which its name does not. */
|
|
145
|
+
export declare function modelIdLabel(specifier: string): string;
|
|
143
146
|
export declare function getModelEnvVars(slug: string): string[];
|
|
144
147
|
/** managed credentials are authored only via `pullfrog auth <provider>` — they
|
|
145
148
|
* count as "configured" for hasAnyKey-style UI checks but are never offered as
|
|
@@ -180,6 +183,28 @@ export declare function modelHasStoredAuth(params: {
|
|
|
180
183
|
model: string;
|
|
181
184
|
secretNames: string[];
|
|
182
185
|
}): boolean;
|
|
186
|
+
/**
|
|
187
|
+
* `proxyOptOut`, spelled the way run-context spells it: a Router run skips the
|
|
188
|
+
* mint when the pick is FREE or a Pullfrog-stored key covers it, and then runs
|
|
189
|
+
* as-configured rather than clamping to the auto tier.
|
|
190
|
+
*
|
|
191
|
+
* one predicate for every reader — the console picker's `customLocked`, the
|
|
192
|
+
* effort ladder's `resolveRunning` and `pickUsesOpenRouter`. they held two
|
|
193
|
+
* copies and the free half was missing from both, which put the whole `opencode/*` free tier (`opencode/big-pickle`
|
|
194
|
+
* is `preferred`, so the most-picked model there is) behind "add a payment
|
|
195
|
+
* method to run it" on a card-less Router repo, against a server that ran it.
|
|
196
|
+
*/
|
|
197
|
+
export declare function routerProxyOptOut(ctx: {
|
|
198
|
+
slug: string | null;
|
|
199
|
+
secretNames: string[];
|
|
200
|
+
}): boolean;
|
|
201
|
+
/** whether a pick runs as its OpenRouter target: a proxied account (Router, the OSS subsidy)
|
|
202
|
+
* mints for every pick `routerProxyOptOut` does not exempt. */
|
|
203
|
+
export declare function pickUsesOpenRouter(params: {
|
|
204
|
+
slug: string;
|
|
205
|
+
proxied: boolean;
|
|
206
|
+
secretNames: string[];
|
|
207
|
+
}): boolean;
|
|
183
208
|
export declare const modelAliases: ModelAlias[];
|
|
184
209
|
/**
|
|
185
210
|
* `repo.model` sentinels for the two managed auto tiers. stored verbatim in
|
|
@@ -15,14 +15,14 @@ export interface BuildPullfrogFooterParams {
|
|
|
15
15
|
workflowRunUrl?: string | undefined;
|
|
16
16
|
/** arbitrary custom parts (e.g., action links) */
|
|
17
17
|
customParts?: string[] | undefined;
|
|
18
|
-
/** model slug from payload (e.g., "anthropic/claude-opus"). shown in footer as "Using `
|
|
18
|
+
/** model slug from payload (e.g., "anthropic/claude-opus"). shown in footer as the model it runs: "Using `claude-opus-5-5`" */
|
|
19
19
|
model?: string | undefined;
|
|
20
20
|
/**
|
|
21
21
|
* When a Router account had a model (or the intelligent tier) selected that
|
|
22
22
|
* the server clamped to the efficient default — custom picks are card-gated
|
|
23
23
|
* wholesale. `from` is the configured slug (e.g. "anthropic/claude-opus");
|
|
24
24
|
* `reason` names the binding constraint — "card" (no card on file) renders
|
|
25
|
-
* `Using <
|
|
25
|
+
* `Using <kimi-k2> (<Claude Opus> needs a card on file)`, "noRouterPath"
|
|
26
26
|
* (no openRouterResolve yet and no stored provider key) renders a
|
|
27
27
|
* provider-key nudge — so the downgrade is visible rather than silently
|
|
28
28
|
* presenting Kimi as the pick.
|
|
@@ -26,7 +26,8 @@ export interface InstalledCodexAuth {
|
|
|
26
26
|
originalIdToken: string | undefined;
|
|
27
27
|
}
|
|
28
28
|
/** materialize CODEX_AUTH_JSON from env into a disk path OpenCode reads from.
|
|
29
|
-
* returns null when the env var is absent, malformed, or wrong auth mode
|
|
29
|
+
* returns null when the env var is absent, malformed, or wrong auth mode, or
|
|
30
|
+
* when this runner cannot host it (`resolveDataHome`) —
|
|
30
31
|
* caller treats null as "no codex auth, fall through to API key flow".
|
|
31
32
|
*
|
|
32
33
|
* The env value is server-side guaranteed fresh by `maybeRotateCodexSecret`
|
|
@@ -52,7 +53,8 @@ export interface InstalledXaiAuth {
|
|
|
52
53
|
* The plugin sends the token to `api.x.ai/v1` — it deliberately sets no
|
|
53
54
|
* baseURL — so there is no CLI proxy and no client-version header in play.
|
|
54
55
|
*
|
|
55
|
-
* returns null when the env var is absent or malformed
|
|
56
|
+
* returns null when the env var is absent or malformed, or when this runner
|
|
57
|
+
* cannot host it (`resolveDataHome`); caller treats null as
|
|
56
58
|
* "no grok subscription auth, fall through to XAI_API_KEY". */
|
|
57
59
|
export declare function installXaiAuth(): InstalledXaiAuth | null;
|
|
58
60
|
export interface InstalledCodexHome {
|
|
@@ -76,3 +78,5 @@ export interface InstalledCodexHome {
|
|
|
76
78
|
* call. callers treat null as "codex CLI can't use this credential".
|
|
77
79
|
*/
|
|
78
80
|
export declare function installCodexHome(): InstalledCodexHome | null;
|
|
81
|
+
/** false for a Codex or Grok subscription on a runner that cannot host it (`resolveDataHome`). */
|
|
82
|
+
export declare function canInstallSubscription(name: string): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pullfrog",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.93",
|
|
4
4
|
"cliContractVersion": "1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"@octokit/plugin-throttling": "^11.0.3",
|
|
37
37
|
"@octokit/rest": "^22.0.0",
|
|
38
38
|
"@octokit/webhooks-types": "^7.6.1",
|
|
39
|
-
"@openai/codex": "0.
|
|
40
|
-
"@openai/codex-sdk": "0.
|
|
39
|
+
"@openai/codex": "0.159.2",
|
|
40
|
+
"@openai/codex-sdk": "0.159.2",
|
|
41
41
|
"@opencode-ai/sdk": "1.18.29",
|
|
42
42
|
"@standard-schema/spec": "1.1.0",
|
|
43
43
|
"@toon-format/toon": "^1.0.0",
|