@managoat/fountain-sdk 1.32.0 → 2.0.0

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/CHANGELOG.md CHANGED
@@ -11,6 +11,21 @@ server releases.
11
11
 
12
12
  ---
13
13
 
14
+ ## [2.0.0] - 2026-09-13
15
+
16
+ ### Breaking changes
17
+
18
+ Replace `SubscriptionRequiredError` imports and `instanceof` checks with
19
+ `InsufficientCreditsError`. The old export is removed. Read `error.upgradeUrl`
20
+ to offer the credit-purchase page; do not retry a 402 without adding credit.
21
+
22
+ For billing error handling, use Fountain v0.13.0 or newer.
23
+ [v0.13.0](https://github.com/managoat/fountain/releases/tag/v0.13.0) is the first
24
+ release containing the credit-only server contract (`c3349343`).
25
+ `insufficient_credits` and a generic HTTP 402 identify the credit gate.
26
+ `subscription_required` has no special mapping; it follows the HTTP status.
27
+ The response still exposes its original code and purchase URL.
28
+
14
29
  ## [1.32.0] - 2026-09-13
15
30
 
16
31
  ### Removed
package/README.md CHANGED
@@ -296,7 +296,7 @@ Every error carries `status`, `code`, `body`, `retryAfter` and `retryable`.
296
296
  | class | when |
297
297
  |---|---|
298
298
  | `AuthError` | 401, or no key configured at all |
299
- | `SubscriptionRequiredError` | 402 — carries `upgradeUrl` |
299
+ | `InsufficientCreditsError` | 402 — carries `upgradeUrl` |
300
300
  | `NotFoundError` | 404 — wrong id, or it belongs to another account |
301
301
  | `ValidationError` | 422 — read `fieldErrors` |
302
302
  | `RateLimitError` | 429 |
@@ -443,3 +443,16 @@ published surface deliberately without releasing, label the PR
443
443
  AGPL-3.0-or-later, and the clients — this SDK and the CLI — are Apache-2.0 on
444
444
  purpose. Talking to the API, or shipping this SDK inside a proprietary
445
445
  application, puts no licence obligation on your code.
446
+
447
+ ## Credit error migration (2.0.0)
448
+
449
+ Replace `SubscriptionRequiredError` imports and `instanceof` checks with
450
+ `InsufficientCreditsError`. The old export is removed. Read `error.upgradeUrl`
451
+ to offer the credit-purchase page; do not retry a 402 without adding credit.
452
+
453
+ For billing error handling, use Fountain v0.13.0 or newer.
454
+ [v0.13.0](https://github.com/managoat/fountain/releases/tag/v0.13.0) is the first
455
+ release containing the credit-only server contract (`c3349343`).
456
+ `insufficient_credits` and a generic HTTP 402 identify the credit gate.
457
+ `subscription_required` has no special mapping; it follows the HTTP status.
458
+ The response still exposes its original code and purchase URL.
package/dist/errors.d.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  * secondary one, and the conditions worth retrying say so themselves.
9
9
  */
10
10
  /** The `error` strings the API sends. Open — a new one is a string, not a break. */
11
- export type FountainErrorCode = "conversation_busy" | "provisioning" | "sprite_probe_failed" | "sandbox_quota_exceeded" | "sandbox_at_capacity" | "sandbox_not_found" | "sandbox_not_attachable" | "sandbox_identity_mismatch" | "sandbox_runtime_mismatch" | "insufficient_credits" | "fleet_full" | "subscription_required" | "rate_limited" | "account_suspended" | "environment_not_allowed" | "environment_not_found" | "vault_not_allowed" | "parent_conversation_not_found" | "not_found" | "unauthorized" | (string & {});
11
+ export type FountainErrorCode = "conversation_busy" | "provisioning" | "sprite_probe_failed" | "sandbox_quota_exceeded" | "sandbox_at_capacity" | "sandbox_not_found" | "sandbox_not_attachable" | "sandbox_identity_mismatch" | "sandbox_runtime_mismatch" | "insufficient_credits" | "fleet_full" | "rate_limited" | "account_suspended" | "environment_not_allowed" | "environment_not_found" | "vault_not_allowed" | "parent_conversation_not_found" | "not_found" | "unauthorized" | (string & {});
12
12
  export interface FountainErrorInit {
13
13
  status?: number;
14
14
  code?: FountainErrorCode;
@@ -41,10 +41,9 @@ export declare class AuthError extends FountainError {
41
41
  }
42
42
  /**
43
43
  * The account is out of credit (`insufficient_credits`, 402). `upgradeUrl` is
44
- * the billing page, where credit is bought. The class keeps its old name so
45
- * callers written against the subscription era still catch it.
44
+ * the billing page, where credit is bought. A bare HTTP 402 uses this class too.
46
45
  */
47
- export declare class SubscriptionRequiredError extends FountainError {
46
+ export declare class InsufficientCreditsError extends FountainError {
48
47
  get upgradeUrl(): string | undefined;
49
48
  }
50
49
  /** Wrong id, or it belongs to another account — Fountain does not distinguish (404). */
package/dist/errors.js CHANGED
@@ -64,10 +64,9 @@ export class AuthError extends FountainError {
64
64
  }
65
65
  /**
66
66
  * The account is out of credit (`insufficient_credits`, 402). `upgradeUrl` is
67
- * the billing page, where credit is bought. The class keeps its old name so
68
- * callers written against the subscription era still catch it.
67
+ * the billing page, where credit is bought. A bare HTTP 402 uses this class too.
69
68
  */
70
- export class SubscriptionRequiredError extends FountainError {
69
+ export class InsufficientCreditsError extends FountainError {
71
70
  get upgradeUrl() {
72
71
  const url = this.body?.upgrade_url;
73
72
  return typeof url === "string" ? url : undefined;
@@ -170,9 +169,8 @@ export function errorForStatus(status, body, method, url, headers) {
170
169
  return new NotReadyError(message, init);
171
170
  case "sandbox_quota_exceeded":
172
171
  return new QuotaExceededError(message, init);
173
- case "subscription_required":
174
172
  case "insufficient_credits":
175
- return new SubscriptionRequiredError(message, init);
173
+ return new InsufficientCreditsError(message, init);
176
174
  case "fleet_full":
177
175
  return new NotReadyError(message, init);
178
176
  }
@@ -180,7 +178,7 @@ export function errorForStatus(status, body, method, url, headers) {
180
178
  case 401:
181
179
  return new AuthError(message, init);
182
180
  case 402:
183
- return new SubscriptionRequiredError(message, init);
181
+ return new InsufficientCreditsError(message, init);
184
182
  case 404:
185
183
  return new NotFoundError(message, init);
186
184
  case 422:
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAmCH,MAAM,OAAO,aAAc,SAAQ,KAAK;IACtC,uDAAuD;IAC9C,MAAM,CAAS;IACxB,gDAAgD;IACvC,IAAI,CAAgC;IAC7C,uDAAuD;IAC9C,IAAI,CAAU;IACvB,6DAA6D;IACpD,UAAU,CAAgB;IAEnC,YAAY,OAAe,EAAE,OAA0B,EAAE;QACvD,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC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,EAAE,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,GAAG;YACN,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACtC,KAAK,GAAG;YACN,OAAO,IAAI,wBAAwB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACrD,KAAK,GAAG;YACN,OAAO,IAAI,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC1C,KAAK,GAAG;YACN,OAAO,IAAI,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC5C,KAAK,GAAG;YACN,OAAO,IAAI,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC3C;YACE,OAAO,IAAI,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5C,CAAC;AACH,CAAC;AAED,SAAS,UAAU,CAAC,IAAa,EAAE,GAAW;IAC5C,MAAM,KAAK,GAAI,IAAuC,EAAE,CAAC,GAAG,CAAC,CAAC;IAC9D,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC"}
@@ -1093,7 +1093,7 @@ export interface paths {
1093
1093
  };
1094
1094
  /**
1095
1095
  * List connections
1096
- * @description Every provider account the tenant has connected, active or revoked. Only for accounts the egress broker is on for (ADR 0019); 404 otherwise.
1096
+ * @description Every provider account the tenant has connected, active or revoked. Only on a deployment that runs the egress broker (ADR 0019); 404 otherwise.
1097
1097
  */
1098
1098
  get: operations["FountainWeb.ConnectionController.index"];
1099
1099
  put?: never;
@@ -1157,7 +1157,7 @@ export interface paths {
1157
1157
  put?: never;
1158
1158
  /**
1159
1159
  * Start a conversation
1160
- * @description Creates a sandbox + conversation pair, starts the runtime in a fresh sprite, and (if `prompt` is supplied) sends it as turn 1. With `channel_id`, resumes the latest live conversation already bound to that channel for the same agent and vault (200, `meta.resumed: true`) instead of opening a new one (201). `labels` (#1637) are stamped on the new conversation; with `channel_id`, a resume merges them into the conversation it hands back, and a sandbox callback token resuming a conversation it was not minted for is refused with 403. Pass `X-Fountain-Parent-Conversation-Id` header to record which conversation spawned this one. Legacy `X-AoD-Parent-Conversation-Id` is still accepted for sprites provisioned before the rename.
1160
+ * @description Creates a sandbox + conversation pair, starts the runtime in a fresh sprite, and (if `prompt` is supplied) sends it as turn 1. With `channel_id`, resumes the latest live conversation already bound to that channel for the same agent and vault (200, `meta.resumed: true`) instead of opening a new one (201). `labels` (#1637) are stamped on the new conversation; with `channel_id`, a resume merges them into the conversation it hands back, and a sandbox callback token resuming a conversation it was not minted for is refused with 403. Pass `X-Fountain-Parent-Conversation-Id` header to record which conversation spawned this one.
1161
1161
  */
1162
1162
  post: operations["FountainWeb.ConversationController.create"];
1163
1163
  delete?: never;
@@ -1905,7 +1905,7 @@ export interface paths {
1905
1905
  };
1906
1906
  /**
1907
1907
  * List secret bindings
1908
- * @description Every binding on the account: a secret name, the host it is attached to at the egress broker, and the auth shape. A secret with at least one enabled binding reaches the sandbox as a placeholder; one with none reaches it in the clear. Only for accounts the broker is on for (ADR 0019); 404 otherwise.
1908
+ * @description Every binding on the account: a secret name, the host it is attached to at the egress broker, and the auth shape. A secret with at least one enabled binding reaches the sandbox as a placeholder; one with none reaches it in the clear. Only on a deployment that runs the broker (ADR 0019); 404 otherwise.
1909
1909
  */
1910
1910
  get: operations["FountainWeb.SecretBindingController.index"];
1911
1911
  put?: never;
@@ -3507,7 +3507,7 @@ export interface components {
3507
3507
  };
3508
3508
  /**
3509
3509
  * Connection
3510
- * @description A provider account the tenant signed in to once, whose credential Fountain holds (#1178). Agents get the capability, never the token: an agent's `mcp_servers` names the connection (`{"gmail": {"connection": "<id>"}}`) and Fountain serves the Gmail tools; and the access token is brokered under `env_key` for an MCP server the tenant runs. Only for accounts the egress broker is on for.
3510
+ * @description A provider account the tenant signed in to once, whose credential Fountain holds (#1178). Agents get the capability, never the token: an agent's `mcp_servers` names the connection (`{"gmail": {"connection": "<id>"}}`) and Fountain serves the Gmail tools; and the access token is brokered under `env_key` for an MCP server the tenant runs. Only on a deployment that runs the egress broker.
3511
3511
  */
3512
3512
  Connection: {
3513
3513
  /** @description The connected account: an address, or the label the provider gave. */
package/dist/http.d.ts CHANGED
@@ -15,7 +15,7 @@ export interface RequestOptions {
15
15
  * this string is already what Fountain's request logs are keyed on. The
16
16
  * version half is asserted against `package.json` by a test.
17
17
  */
18
- export declare const USER_AGENT = "fountain-sdk-js/1.32.0";
18
+ export declare const USER_AGENT = "fountain-sdk-js/2.0.0";
19
19
  export declare class HttpClient {
20
20
  readonly config: ResolvedConfig;
21
21
  private readonly fetchImpl;
package/dist/http.js CHANGED
@@ -5,7 +5,7 @@ import { AuthError, ConnectionError, FountainError, errorForStatus } from "./err
5
5
  * this string is already what Fountain's request logs are keyed on. The
6
6
  * version half is asserted against `package.json` by a test.
7
7
  */
8
- export const USER_AGENT = "fountain-sdk-js/1.32.0";
8
+ export const USER_AGENT = "fountain-sdk-js/2.0.0";
9
9
  /**
10
10
  * The thin layer everything else is built on: one bearer token, JSON in and
11
11
  * out, and errors that say which call failed. `Fountain#api` exposes it
package/dist/http.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAexF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,wBAAwB,CAAC;AAEnD;;;;GAIG;AACH,sGAAsG;AACtG,SAAS,SAAS;IAChB,OAAO,OAAQ,UAAqC,CAAC,QAAQ,KAAK,WAAW,CAAC;AAChF,CAAC;AAED,MAAM,OAAO,UAAU;IACZ,MAAM,CAAiB;IACf,SAAS,CAAY;IACrB,gBAAgB,CAAS;IAE1C,YAAY,MAAsB,EAAE,OAAkD,EAAE;QACtF,IA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AAC;IAC/C,OAAO,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AAC/D,CAAC"}
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ export { Team, TeamSchedules, type MessageOptions } from "./team.ts";
7
7
  export { resolveConfig, conversationUrl, DEFAULT_BASE_URL, DEFAULT_APP_URL, type ConfigOptions, type ResolvedConfig, } from "./config.ts";
8
8
  export { streamEvents, streamPath, parseSse, type StreamOptions, type SseMessage } from "./sse.ts";
9
9
  export { TurnFollower } from "./turn.ts";
10
- export { FountainError, AuthError, SubscriptionRequiredError, NotFoundError, ValidationError, RateLimitError, ConversationBusyError, NotReadyError, QuotaExceededError, ConnectionError, TimeoutError, ResolutionError, type FountainErrorCode, } from "./errors.ts";
10
+ export { FountainError, AuthError, InsufficientCreditsError, NotFoundError, ValidationError, RateLimitError, ConversationBusyError, NotReadyError, QuotaExceededError, ConnectionError, TimeoutError, ResolutionError, type FountainErrorCode, } from "./errors.ts";
11
11
  export type * from "./schemas.ts";
12
12
  export type { Agent, AgentInput, Block, ConversationRecord, ConversationStatus, Environment, EnvironmentInput, LogEvent, NamedResource, PermissionOption, PermissionRequest, Stream, TeamEvent, Repository, Runtime, RunEvent, RunResult, SandboxChange, SandboxDiff, SandboxEntry, SandboxFile, SandboxListing, SandboxProvider, SandboxRecord, SandboxStatus, Secret, SkillInput, Turn, TurnState, Vault, VaultInput, VaultSecretMetadataPatch, } from "./types.ts";
13
13
  import { Fountain } from "./client.ts";
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ export { Team, TeamSchedules } from "./team.js";
7
7
  export { resolveConfig, conversationUrl, DEFAULT_BASE_URL, DEFAULT_APP_URL, } from "./config.js";
8
8
  export { streamEvents, streamPath, parseSse } from "./sse.js";
9
9
  export { TurnFollower } from "./turn.js";
10
- export { FountainError, AuthError, SubscriptionRequiredError, NotFoundError, ValidationError, RateLimitError, ConversationBusyError, NotReadyError, QuotaExceededError, ConnectionError, TimeoutError, ResolutionError, } from "./errors.js";
10
+ export { FountainError, AuthError, InsufficientCreditsError, NotFoundError, ValidationError, RateLimitError, ConversationBusyError, NotReadyError, QuotaExceededError, ConnectionError, TimeoutError, ResolutionError, } from "./errors.js";
11
11
  import { Fountain } from "./client.js";
12
12
  export default Fountain;
13
13
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAwC,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,GAAG,EAAmB,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,YAAY,EAAyC,MAAM,mBAAmB,CAAC;AACxF,OAAO,EAAE,UAAU,EAAuC,MAAM,WAAW,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAE,IAAI,EAAE,aAAa,EAAuB,MAAM,WAAW,CAAC;AACrE,OAAO,EACL,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,eAAe,GAGhB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAuC,MAAM,UAAU,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACL,aAAa,EACb,SAAS,EACT,yBAAyB,EACzB,aAAa,EACb,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,eAAe,GAEhB,MAAM,aAAa,CAAC;AAqCrB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAwC,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,GAAG,EAAmB,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,YAAY,EAAyC,MAAM,mBAAmB,CAAC;AACxF,OAAO,EAAE,UAAU,EAAuC,MAAM,WAAW,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAE,IAAI,EAAE,aAAa,EAAuB,MAAM,WAAW,CAAC;AACrE,OAAO,EACL,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,eAAe,GAGhB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAuC,MAAM,UAAU,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACL,aAAa,EACb,SAAS,EACT,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,eAAe,GAEhB,MAAM,aAAa,CAAC;AAqCrB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,eAAe,QAAQ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managoat/fountain-sdk",
3
- "version": "1.32.0",
3
+ "version": "2.0.0",
4
4
  "description": "Run a coding agent on a real computer, with your repos and your credentials, in one call.",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {