pullfrog 0.1.71 → 0.1.73
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 +29278 -14570
- package/dist/cliContract.d.ts +5 -0
- package/dist/configuration.d.ts +45 -0
- package/dist/index.js +216 -217
- package/dist/internal/index.d.ts +3 -0
- package/dist/internal.js +14278 -17
- package/dist/models.d.ts +24 -0
- package/dist/toolState.d.ts +0 -1
- package/dist/utils/buildPullfrogFooter.d.ts +0 -6
- package/dist/utils/oauthWriteback.d.ts +29 -0
- package/dist/utils/runContextData.d.ts +0 -10
- package/package.json +4 -2
package/dist/models.d.ts
CHANGED
|
@@ -145,6 +145,30 @@ export declare function getModelEnvVars(slug: string): string[];
|
|
|
145
145
|
* a manual-paste option in `init` or the AgentSettings env-var button row.
|
|
146
146
|
* see `provider.managedCredentials` and wiki/codex-auth.md. */
|
|
147
147
|
export declare function getModelManagedCredentials(slug: string): string[];
|
|
148
|
+
/**
|
|
149
|
+
* Anthropic credentials that ONLY claude-code can present. opencode's anthropic
|
|
150
|
+
* provider authenticates from `ANTHROPIC_API_KEY` and nothing else (see
|
|
151
|
+
* `packages/llm/src/providers/anthropic.ts` upstream), so holding one of these
|
|
152
|
+
* is not evidence opencode can serve a Claude model.
|
|
153
|
+
*
|
|
154
|
+
* `ANTHROPIC_AUTH_TOKEN` (the gateway variable) is kept out of
|
|
155
|
+
* `providers.anthropic.envVars` entirely. `CLAUDE_CODE_OAUTH_TOKEN` cannot be:
|
|
156
|
+
* the console offers it as a paste target and `credentialFallback` preflights
|
|
157
|
+
* it, both of which read `getModelEnvVars`. So it stays in `envVars` and is
|
|
158
|
+
* subtracted here instead, via `getOpenCodeEnvVars` at every opencode-facing
|
|
159
|
+
* gate. Leaving it un-subtracted let `autoSelectModel` pin
|
|
160
|
+
* `anthropic/claude-opus-5` on a subscription-only account and hand it to
|
|
161
|
+
* opencode, which died with `Model not found` before the first turn.
|
|
162
|
+
*/
|
|
163
|
+
export declare const CLAUDE_CODE_ONLY_CREDENTIALS: string[];
|
|
164
|
+
/**
|
|
165
|
+
* `getModelEnvVars` minus the credentials only claude-code can present — the
|
|
166
|
+
* right question for every opencode-facing gate (auto-select, key validation).
|
|
167
|
+
* `getModelEnvVars` answers "which credentials can serve this model", which is
|
|
168
|
+
* the product's question; this answers "which can serve it UNDER OPENCODE",
|
|
169
|
+
* which is the only one those gates may act on.
|
|
170
|
+
*/
|
|
171
|
+
export declare function getOpenCodeEnvVars(slug: string): string[];
|
|
148
172
|
/**
|
|
149
173
|
* Whether one of `secretNames` can run `model` — the Router opt-out predicate,
|
|
150
174
|
* shared so every caller decides the same way. Auto-tier sentinels and
|
package/dist/toolState.d.ts
CHANGED
|
@@ -146,7 +146,6 @@ export interface ToolState {
|
|
|
146
146
|
from: string;
|
|
147
147
|
reason: "card" | "noRouterPath" | "oss" | "trial";
|
|
148
148
|
} | undefined;
|
|
149
|
-
shaPinned?: boolean | undefined;
|
|
150
149
|
oss?: boolean | undefined;
|
|
151
150
|
todoTracker?: TodoTracker | undefined;
|
|
152
151
|
agentDiagnostic?: AgentDiagnostic | undefined;
|
|
@@ -45,12 +45,6 @@ export interface BuildPullfrogFooterParams {
|
|
|
45
45
|
* than a frontier model.
|
|
46
46
|
*/
|
|
47
47
|
unselectedProxyDefault?: boolean | undefined;
|
|
48
|
-
/**
|
|
49
|
-
* true when the action is pinned to a full commit SHA — the footer leads
|
|
50
|
-
* with a maintenance nudge to switch to the moving `@v0` tag (a SHA pin
|
|
51
|
-
* freezes the post-run cleanup step, which silently fails the workflow).
|
|
52
|
-
*/
|
|
53
|
-
shaPinned?: boolean | undefined;
|
|
54
48
|
/**
|
|
55
49
|
* true when the run's model costs are covered by the Pullfrog for OSS
|
|
56
50
|
* program — the footer renders `Using <model> (free via Pullfrog for OSS)`
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** GHA state key the agent harnesses write their pending write-backs to.
|
|
2
|
+
*
|
|
3
|
+
* `entryPost.ts` gates on the `STATE_oauth_writeback` env var GHA derives from
|
|
4
|
+
* this name, and it spells the key literally rather than importing this
|
|
5
|
+
* constant — importing it would drag this module (and `@actions/core`) into the
|
|
6
|
+
* post-hook's stdlib-only import graph and bring back #815. Keep the two in
|
|
7
|
+
* sync by hand; `entryPost.stdlibOnly.test.ts` guards the reason they differ. */
|
|
8
|
+
export declare const OAUTH_WRITEBACK_STATE = "oauth_writeback";
|
|
9
|
+
/**
|
|
10
|
+
* Persist any OAuth refresh chain the run rotated, back into Pullfrog's own
|
|
11
|
+
* secret store.
|
|
12
|
+
*
|
|
13
|
+
* Runs from the action's `post:` hook, which GitHub executes regardless of how
|
|
14
|
+
* the main step ended — that's the contract this needs: if OpenCode refreshed
|
|
15
|
+
* the Codex auth.json mid-run, the rotated token must land back in Pullfrog
|
|
16
|
+
* even when the main step was cancelled or timed out.
|
|
17
|
+
*
|
|
18
|
+
* THIS IS WHY `CODEX_AUTH_JSON` HAS TO LIVE IN PULLFROG'S OWN SECRET STORE,
|
|
19
|
+
* NOT IN GITHUB ACTIONS SECRETS. The refresh chain rotates on every use; this
|
|
20
|
+
* PUTs the rotated chain back to Pullfrog Postgres so the next run starts from
|
|
21
|
+
* a fresh token. GH Actions secrets are read-only at runtime — there is no API
|
|
22
|
+
* to write them back from inside a job — so a token stashed there silently
|
|
23
|
+
* goes stale on the first refresh and the next run fails. See wiki/codex-auth.md.
|
|
24
|
+
*
|
|
25
|
+
* Best-effort throughout: a missed write-back costs the user one
|
|
26
|
+
* `pullfrog auth codex` re-run, while a throw here would fail a workflow whose
|
|
27
|
+
* agent already succeeded.
|
|
28
|
+
*/
|
|
29
|
+
export declare function runOAuthWriteback(): Promise<void>;
|
|
@@ -34,16 +34,6 @@ interface ResolveRunContextDataParams {
|
|
|
34
34
|
* model override. */
|
|
35
35
|
runType?: string | undefined;
|
|
36
36
|
}
|
|
37
|
-
/**
|
|
38
|
-
* true when the action is pinned to a full commit SHA (vs the moving `@v0`
|
|
39
|
-
* tag or a branch). GitHub runs the action's `post:` hook (and reads
|
|
40
|
-
* `action.yml`) straight from the checked-out action ref, so a SHA pin freezes
|
|
41
|
-
* that checkout forever: the main agent still floats to the latest `^semver`
|
|
42
|
-
* via the npm bootstrap (this code is proof — it ran), but the post-run
|
|
43
|
-
* cleanup step keeps executing the pinned commit's source and never receives
|
|
44
|
-
* fixes. surfaced in the log and PR footers to nudge repos back to `@v0`.
|
|
45
|
-
*/
|
|
46
|
-
export declare function isActionPinnedToSha(): boolean;
|
|
47
37
|
/**
|
|
48
38
|
* initialize run context data: parse context, fetch repo info and settings
|
|
49
39
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pullfrog",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.73",
|
|
4
|
+
"cliContractVersion": "1",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"bin": {
|
|
6
7
|
"pullfrog": "dist/cli.mjs",
|
|
@@ -66,7 +67,8 @@
|
|
|
66
67
|
"typescript": "^5.9.3",
|
|
67
68
|
"undici": "^7.22.0",
|
|
68
69
|
"vitest": "^4.0.17",
|
|
69
|
-
"yaml": "^2.8.2"
|
|
70
|
+
"yaml": "^2.8.2",
|
|
71
|
+
"zod": "4.3.6"
|
|
70
72
|
},
|
|
71
73
|
"repository": {
|
|
72
74
|
"type": "git",
|