pullfrog 0.1.39 → 0.1.41

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.
@@ -37,6 +37,9 @@ export declare function validateAgentApiKey(params: {
37
37
  * ****XXXX is invalid`. anchored to "Your api key: ... is invalid" so it
38
38
  * can't collide with DeepSeek's already-handled `Insufficient balance`
39
39
  * billing shape (which routes to formatProviderBillingExhausted).
40
+ * - org-disabled Claude subscription (#1072): `Your organization has
41
+ * disabled Claude subscription access for Claude Code`, an entitlement
42
+ * denial with its own remedy — see isClaudeSubscriptionDisabledError.
40
43
  */
41
44
  export declare function isApiKeyAuthError(text: string): boolean;
42
45
  /**
@@ -46,8 +49,17 @@ export declare function isApiKeyAuthError(text: string): boolean;
46
49
  * distinct copy for these. Patterns are deliberately narrow:
47
50
  * "authentication token has expired" (not bare "token has expired") so a
48
51
  * GitHub installation-token expiry can't be misread as an LLM key problem.
52
+ * also covers server-side revocation ("authentication token has been
53
+ * invalidated", OpenAI `token_invalidated`, #1041) and the Claude CLI's
54
+ * "OAuth access token has expired" phrasing (#1072) — same remediation.
49
55
  */
50
56
  export declare function isOAuthCredentialExpiredError(text: string): boolean;
57
+ /**
58
+ * Anthropic entitlement denial for Claude Pro/Max subscription auth (#1072):
59
+ * an org admin turned off Claude Code subscription access. no credential the
60
+ * user controls fixes it, so it gets its own copy instead of the re-auth CTA.
61
+ */
62
+ export declare function isClaudeSubscriptionDisabledError(text: string): boolean;
51
63
  /**
52
64
  * Friendly Markdown summary for both the missing-key and invalid-key cases.
53
65
  * Used in the catch / result-failure paths in `main.ts` to overwrite the raw
@@ -16,7 +16,9 @@ export type SubscriptionPreflight = {
16
16
  * per-model ("You've hit your Opus limit"), so a cheaper stand-in could pass
17
17
  * preflight and still leave the run dead on arrival.
18
18
  *
19
- * fail-open by design: only 401 (revoked/expired token) and 429
19
+ * fail-open by design: only 401 (revoked/expired token), 403 (Anthropic
20
+ * `permission_error` — the credential isn't entitled to serve this run, e.g.
21
+ * an org disabled Claude Code subscription access, #1072) and 429
20
22
  * (session/weekly/per-model limit) mark the token unusable. network errors,
21
23
  * 5xx, and request-shape drift (400) all keep today's subscription-first
22
24
  * behavior, so the preflight can never fail a run that would have worked —
@@ -1,3 +1,12 @@
1
+ /**
2
+ * Why the last `opencode models` came back empty, in opencode's own words.
3
+ *
4
+ * An unloadable repo config (`opencode.json`, `.opencode/**`) is the common cause
5
+ * and is fatal — opencode's schema is strict, so every later invocation fails the
6
+ * same way. Without this the empty set reaches `validateAgentApiKey` and the run
7
+ * dies telling the user to go add provider secrets, which is a false lead.
8
+ */
9
+ export declare function getModelsFailure(): string | undefined;
1
10
  /** Snapshot the set of models OpenCode can serve from the current env, BEFORE
2
11
  * Pullfrog-stored credentials are merged in. Call once early in `main.ts`. */
3
12
  export declare function captureBaselineModels(cliPath: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pullfrog",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "pullfrog": "dist/cli.mjs",
@@ -31,7 +31,7 @@
31
31
  "@ark/util": "0.56.0",
32
32
  "@clack/prompts": "^1.2.0",
33
33
  "@modelcontextprotocol/sdk": "^1.26.0",
34
- "@opencode-ai/sdk": "1.16.2",
34
+ "@opencode-ai/sdk": "1.18.5",
35
35
  "@octokit/plugin-throttling": "^11.0.3",
36
36
  "@octokit/rest": "^22.0.0",
37
37
  "@octokit/webhooks-types": "^7.6.1",
@@ -54,7 +54,7 @@
54
54
  "husky": "^9.0.0",
55
55
  "lru-cache": "^11.0.0",
56
56
  "object-hash": "^3.0.0",
57
- "opencode-ai": "1.16.2",
57
+ "opencode-ai": "1.18.5",
58
58
  "package-manager-detector": "^1.6.0",
59
59
  "picocolors": "^1.1.1",
60
60
  "semver": "^7.7.3",