@managoat/fountain-sdk 6.0.0 → 6.1.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,12 @@ server releases.
11
11
 
12
12
  ---
13
13
 
14
+ ## [6.1.0] - 2026-09-17
15
+
16
+ ### Added
17
+
18
+ - `client_request_id` on every prompt the client sends, so a caller names its submission and reads that name back off the turn it opened instead of inferring the turn from turn order (#1406). `RunConfig.clientRequestId` on `run`, `SendOptions.clientRequestId` on `resume(id).send`, and the `client_request_id` key on a `runRequest` body. A channel resume repeats the value on the prompts route, which is the request that actually opens the turn. It is a correlation, not an idempotency key: the same value sent twice opens two turns.
19
+
14
20
  ## [6.0.0] - 2026-09-15
15
21
 
16
22
  ### Removed
package/README.md CHANGED
@@ -481,4 +481,26 @@ before HTTP). Use `client.api.request` for promptless or queued creation.
481
481
 
482
482
  With `channel_id`, `runRequest` follows turn 1 when the server creates a
483
483
  conversation, including fresh launches. When the server resumes a channel,
484
- it submits the prompt and images to that conversation and follows the next turn.
484
+ it submits the prompt, its images and its `client_request_id` to that
485
+ conversation and follows the next turn.
486
+
487
+ ### Name your submission
488
+
489
+ `POST .../prompts` answers before the turn exists, so no response can give you
490
+ a turn id. Name the submission instead: the value reaches the turn the prompt
491
+ opens and that turn's `started` stage event, so you read back which turn was
492
+ yours instead of counting turns.
493
+
494
+ ```ts
495
+ await fountain.run("Run the approved plan.", {
496
+ agent: "reposage",
497
+ clientRequestId: "plan-7-step-3",
498
+ });
499
+ await fountain.resume(id).send("And the next step.", {
500
+ clientRequestId: "plan-7-step-4",
501
+ });
502
+ ```
503
+
504
+ It is a correlation, not an idempotency key: the same value sent twice opens
505
+ two turns. A channel resume sends it again on the prompts route, because that
506
+ second request is the one that opens the turn.
package/dist/client.d.ts CHANGED
@@ -28,6 +28,13 @@ export interface RunConfig extends RunOptions {
28
28
  title?: string;
29
29
  /** Images to attach to the first prompt, as the API's `ImageInput` shape. */
30
30
  images?: unknown[];
31
+ /**
32
+ * Your own name for this submission, carried to the turn the prompt opens
33
+ * and onto that turn's `started` event (#1406). Read it back on the turn to
34
+ * find which turn was yours, instead of guessing from turn order. Not an
35
+ * idempotency key: sending the same value twice opens two turns.
36
+ */
37
+ clientRequestId?: string;
31
38
  /**
32
39
  * Bind the conversation to an external channel. A second run with the same
33
40
  * channel, agent and vault continues that conversation instead of opening a
package/dist/client.js CHANGED
@@ -80,6 +80,11 @@ export class Fountain {
80
80
  body.title = config.title;
81
81
  if (config.images?.length)
82
82
  body.images = config.images;
83
+ // Presence, not truthiness: an explicitly empty id is a 422 the caller
84
+ // has to see, not a prompt that quietly runs uncorrelated.
85
+ if (config.clientRequestId !== undefined) {
86
+ body.client_request_id = config.clientRequestId;
87
+ }
83
88
  if (config.channelId)
84
89
  body.channel_id = config.channelId;
85
90
  if (config.fresh)
@@ -118,9 +123,14 @@ export class Fountain {
118
123
  const hasPrompt = typeof body.prompt === "string" && body.prompt.length > 0;
119
124
  const after = hasPrompt ? await this.resume(conversation.id).cursor() : 0;
120
125
  const turnNumber = await this.nextTurnNumber(conversation.id);
126
+ // Every create field that belongs *with* the prompt has to be repeated
127
+ // here: this second request is the one that actually opens the turn.
121
128
  const promptBody = { prompt: body.prompt };
122
129
  if (body.images !== undefined)
123
130
  promptBody.images = body.images;
131
+ if (body.client_request_id !== undefined) {
132
+ promptBody.client_request_id = body.client_request_id;
133
+ }
124
134
  if (hasPrompt) {
125
135
  await this.api.request("POST", `/api/conversations/${conversation.id}/prompts`, {
126
136
  body: promptBody,
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAuC,MAAM,WAAW,CAAC;AAC5E,OAAO,EAAE,aAAa,EAA2C,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,GAAG,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C;IAEO,KAAK,CAAC,cAAc,CAAC,cAAsB;QACjD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAC/B,sBAAsB,cAAc,QAAQ,CAC7C,CAAC;QACF,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;IACpF,CAAC;CACF"}
@@ -5,6 +5,13 @@ import { type StreamOptions } from "./sse.ts";
5
5
  export interface SendOptions extends RunOptions {
6
6
  /** Images to attach to the prompt, as the API's `ImageInput` shape. */
7
7
  images?: unknown[];
8
+ /**
9
+ * Your own name for this submission, carried to the turn the prompt opens
10
+ * and onto that turn's `started` event (#1406). Read it back on the turn to
11
+ * find which turn was yours, instead of guessing from turn order. Not an
12
+ * idempotency key: sending the same value twice opens two turns.
13
+ */
14
+ clientRequestId?: string;
8
15
  }
9
16
  export interface ReapplyOptions {
10
17
  /** Change the agent; omit to keep the current one. */
@@ -48,6 +48,11 @@ export class Conversation {
48
48
  const body = { prompt };
49
49
  if (options.images?.length)
50
50
  body.images = options.images;
51
+ // Presence, not truthiness: an explicitly empty id is a 422 the caller has
52
+ // to see, not a prompt that quietly runs uncorrelated.
53
+ if (options.clientRequestId !== undefined) {
54
+ body.client_request_id = options.clientRequestId;
55
+ }
51
56
  const run = new Run(this.http, {
52
57
  start: async () => {
53
58
  // The cursor and the turn number both have to be taken *before* the
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.js","sourceRoot":"","sources":["../src/conversation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAmB,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,YAAY,EAAsB,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAgB9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aACd,CAAC,EAAE,CAAC;gBACH,IAAI,OAAO,KAAK,CAAC,EAAE,KAAK,QAAQ,IAAI,KAAK,CAAC,EAAE,GAAG,IAAI;oBAAE,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC;YACvE,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,uEAAuE;YACvE,OAAO,CAAC,CAAC;QACX,CAAC;QACD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
@@ -1834,7 +1834,7 @@ export interface paths {
1834
1834
  post?: never;
1835
1835
  /**
1836
1836
  * Reset a sandbox
1837
- * @description Destroy a persistent sandbox — the agent's home — so the next launch on the same agent, environment and vault builds a clean machine. The conversations on it are kept, idle; each one's next prompt lands on the fresh home. Only a `persistent` sandbox that is not `terminated` or `failed` resets (`422 sandbox_not_resettable`), and not while any conversation on it is mid-turn (`409 sandbox_mid_turn`).
1837
+ * @description Destroy a persistent sandbox — the agent's home — so the next launch on the same agent, environment and vault builds a clean machine. The conversations on it are kept, idle; each one's next prompt lands on the fresh home. Only a `persistent` sandbox that is not `terminated` or `failed` resets (`422 sandbox_not_resettable`), and not while any conversation on it is mid-turn (`409 sandbox_mid_turn`). A reset the provider does not confirm keeps its fence and the sandbox's capacity, and answers `409 sandbox_reset_pending`; retrying it is safe.
1838
1838
  */
1839
1839
  delete: operations["FountainWeb.SandboxController.delete"];
1840
1840
  options?: never;
@@ -2146,7 +2146,7 @@ export interface paths {
2146
2146
  put?: never;
2147
2147
  /**
2148
2148
  * Open a fresh conversation on the teammate's computer
2149
- * @description Retires the teammate's current conversation — it stays in its history, past resuming — and opens a new one on the **same sandbox**: the next message starts a fresh runtime session on the same disk, files and installed tools intact. Nothing is provisioned and nothing is interrupted: 400 `conversation_busy` while a turn is running (interrupt first), 503 `provisioning` while the computer is still starting. When the computer is gone (sandbox terminated or failed, or the conversation already past resuming) a new sandbox is provisioned instead, as `POST /api/team` does. 201 with the teammate and its new conversation; the stream sends `team`. Audited as `team.conversation.rotated`.
2149
+ * @description Retires the teammate's current conversation — it stays in its history, past resuming — and opens a new one on the **same sandbox**: the next message starts a fresh runtime session on the same disk, files and installed tools intact. Nothing is provisioned and nothing is interrupted: 400 `conversation_busy` while a turn is running (interrupt first), 503 `provisioning` while the computer is still starting. The computer's own door is asked before the current conversation is retired, so a refusal costs the teammate nothing and the same call can be repeated: 409 `sandbox_reset_pending` while the computer is being reset or deleted, 503 `sandbox_unavailable` while an operation holds it (retry after `Retry-After`), 422 `sandbox_identity_mismatch` or `sandbox_runtime_mismatch` when the agent's environment, vault or runtime no longer matches the computer it was built for — start a new conversation instead. When the computer is gone (sandbox terminated or failed, or the conversation already past resuming) a new sandbox is provisioned instead, as `POST /api/team` does. 201 with the teammate and its new conversation; the stream sends `team`. Audited as `team.conversation.rotated`.
2150
2150
  */
2151
2151
  post: operations["FountainWeb.TeamController.fresh_conversation"];
2152
2152
  delete?: never;
@@ -2686,13 +2686,13 @@ export interface components {
2686
2686
  metadata?: {
2687
2687
  [key: string]: unknown;
2688
2688
  };
2689
- /** @description Canonical provider/model_id (e.g. anthropic/claude-sonnet-5). The provider must match the runtime — anthropic for claude, openai for codex, google for gemini; opencode accepts any of the three. Other providers are rejected: Fountain has no credentials to export for them. The model id is not checked against a list, so a newly released model works without a Fountain release. The isolated fountain-fixture runtime is the exception: it accepts only fixture/deterministic-v1. Null on the acp runtime, which resolves no inference credential and reads no model. */
2689
+ /** @description Canonical provider/model_id (e.g. anthropic/claude-sonnet-5). The provider must match the runtime — anthropic for claude, openai for codex, google for gemini; opencode accepts any of the three. Other providers are rejected: Fountain has no credentials to export for them. The model id is not checked against a list, so a newly released model works without a Fountain release. Null on the acp runtime, which resolves no inference credential and reads no model. */
2690
2690
  model: string | null;
2691
2691
  name: string;
2692
2692
  /** @description Per-tool permission policy: a map of key to verdict, plus an optional "default" key. A key is matched against the tool card's title first and then ACP's kind (execute, edit, read, fetch, …); prefer a kind, because claude titles a tool call with the command it is about to run. Unset keys fall back to the default, and an unset default is auto_allow — today's behaviour. "ask" holds the tool until a human answers it on the conversation stream, and denies if nobody does before the timeout. A runtime that never asks (opencode) refuses anything stricter than auto_allow with 422 permission_policy_unenforceable. */
2693
2693
  permission_policy?: components["schemas"]["PermissionPolicy"] | null;
2694
2694
  /** @enum {string} */
2695
- runtime: "claude" | "codex" | "gemini" | "opencode" | "acp" | "fountain-fixture";
2695
+ runtime: "claude" | "codex" | "gemini" | "opencode" | "acp";
2696
2696
  /** @description The command the acp runtime launches inside the sandbox, as a shell line resolved there (for example `chant acp`). Required when runtime is acp, and rejected on every other runtime, which resolves its own executable. A free string by design: it runs under the same isolation as an environment's setup script. */
2697
2697
  runtime_command?: string | null;
2698
2698
  /**
@@ -2727,7 +2727,7 @@ export interface components {
2727
2727
  };
2728
2728
  /** AgentRequest */
2729
2729
  AgentRequest: {
2730
- /** @description Environments a conversation may launch this agent under instead of its own. Same shape as allowed_vault_ids: null (default) allows any environment the tenant owns; an empty list forbids overriding; a non-empty list is an allowlist. The agent's own environment always passes. */
2730
+ /** @description Environments a conversation may launch this agent under instead of its own (environment_id on create). Same shape as allowed_vault_ids: null (default) allows any environment the tenant owns; an empty list forbids overriding; a non-empty list is an allowlist. The agent's own environment always passes. */
2731
2731
  allowed_environment_ids?: string[] | null;
2732
2732
  /** @description Credential sets a conversation may launch this agent on instead of the agent's (inference_credential_id on create). Same shape as allowed_vault_ids: null (default) allows any set the tenant owns; an empty list forbids overriding; a non-empty list is an allowlist. The agent's own set always passes. */
2733
2733
  allowed_inference_credential_ids?: string[] | null;
@@ -2752,7 +2752,7 @@ export interface components {
2752
2752
  /** @description Per-tool permission policy: a map of key to verdict, plus an optional "default" key. A key is matched against the tool card's title first and then ACP's kind (execute, edit, read, fetch, …); prefer a kind, because claude titles a tool call with the command it is about to run. Unset keys fall back to the default, and an unset default is auto_allow. "ask" holds the tool until a human answers it on the conversation stream, and denies if nobody does before the timeout. A conversation may narrow this at launch, never widen it. A runtime that never asks (opencode) refuses anything stricter than auto_allow with 422 permission_policy_unenforceable. */
2753
2753
  permission_policy?: components["schemas"]["PermissionPolicy"] | null;
2754
2754
  /** @enum {string} */
2755
- runtime: "claude" | "codex" | "gemini" | "opencode" | "acp" | "fountain-fixture";
2755
+ runtime: "claude" | "codex" | "gemini" | "opencode" | "acp";
2756
2756
  /** @description The command the acp runtime launches inside the sandbox, as a shell line resolved there (for example `chant acp`). Required when runtime is acp, and rejected on every other runtime, which resolves its own executable. A free string by design: it runs under the same isolation as an environment's setup script. */
2757
2757
  runtime_command?: string | null;
2758
2758
  /**
@@ -2809,7 +2809,7 @@ export interface components {
2809
2809
  /** @description Per-tool permission policy: a map of key to verdict, plus an optional "default" key. A key is matched against the tool card's title first and then ACP's kind (execute, edit, read, fetch, …); prefer a kind, because claude titles a tool call with the command it is about to run. Unset keys fall back to the default, and an unset default is auto_allow. "ask" holds the tool until a human answers it on the conversation stream, and denies if nobody does before the timeout. A conversation may narrow this at launch, never widen it. A runtime that never asks (opencode) refuses anything stricter than auto_allow with 422 permission_policy_unenforceable. */
2810
2810
  permission_policy?: components["schemas"]["PermissionPolicy"] | null;
2811
2811
  /** @enum {string} */
2812
- runtime?: "claude" | "codex" | "gemini" | "opencode" | "acp" | "fountain-fixture";
2812
+ runtime?: "claude" | "codex" | "gemini" | "opencode" | "acp";
2813
2813
  /** @description The command the acp runtime launches inside the sandbox, as a shell line resolved there (for example `chant acp`). Required when runtime is acp, and rejected on every other runtime, which resolves its own executable. A free string by design: it runs under the same isolation as an environment's setup script. */
2814
2814
  runtime_command?: string | null;
2815
2815
  /**
@@ -2972,19 +2972,6 @@ export interface components {
2972
2972
  next_cursor?: number | null;
2973
2973
  };
2974
2974
  };
2975
- /**
2976
- * AuthError
2977
- * @description An auth failure with a stable reason code.
2978
- */
2979
- AuthError: {
2980
- /**
2981
- * @description Reason code, e.g. `expired`, `invalid_token`, `invalid_current_password`.
2982
- * @example invalid_token
2983
- */
2984
- error: string;
2985
- /** @description Human-readable detail. */
2986
- message?: string;
2987
- };
2988
2975
  /**
2989
2976
  * AuthMeResponse
2990
2977
  * @description Identity of the account the bearer token belongs to.
@@ -3115,18 +3102,6 @@ export interface components {
3115
3102
  } & {
3116
3103
  [key: string]: unknown;
3117
3104
  };
3118
- /**
3119
- * BrokerUnavailableError
3120
- * @description The egress broker did not answer the request log call.
3121
- */
3122
- BrokerUnavailableError: {
3123
- /** @description Always `broker_unavailable`. */
3124
- error: string;
3125
- /** @description A sentence for a human. */
3126
- message: string;
3127
- /** @description A stable word for a client to branch on: `econnrefused`, `timeout`, `nxdomain`, `api_error_<status>`, or `unknown`. The detail is in the server log, not here. */
3128
- reason: string;
3129
- };
3130
3105
  /**
3131
3106
  * BuzzAccessUpdateRequest
3132
3107
  * @description Change who may @-mention a hosted Buzz agent. Sets buzz-acp's inbound author gate on the identity and restarts its harness. At least one field is required. A later provider deploy from the desktop resends the desktop's record and overwrites this.
@@ -3267,17 +3242,6 @@ export interface components {
3267
3242
  };
3268
3243
  };
3269
3244
  };
3270
- /**
3271
- * ChangesetError
3272
- * @description Validation errors keyed by field, with each value an array of messages, beside the code every Fountain error carries.
3273
- */
3274
- ChangesetError: {
3275
- /** @description `validation_failed`. */
3276
- error?: string;
3277
- errors: {
3278
- [key: string]: string[];
3279
- };
3280
- };
3281
3245
  /**
3282
3246
  * ClaimableUser
3283
3247
  * @description A claimable principal (ADR 0044): the anonymous tenant an application opens for a visitor who has no Fountain account yet. `principal_id` is the tenant every resource it builds belongs to, and it never changes — claiming attaches an owner rather than moving anything.
@@ -3556,12 +3520,12 @@ export interface components {
3556
3520
  last_read_at?: string | null;
3557
3521
  /** Format: uuid */
3558
3522
  parent_conversation_id?: string | null;
3559
- /** @description Permission requests that outlived a turn and are still waiting for an answer (#1635). Served on GET /api/conversations/{id} only; absent from the list and from the create response. */
3523
+ /** @description Permission requests that outlived a turn and are still waiting for an answer (#1635). Only GET /api/conversations/{id} can report one; every other response carrying this schema, including the list and the create response, sends an empty array rather than querying for it. */
3560
3524
  pending_requests?: components["schemas"]["PendingPermissionRequest"][];
3561
3525
  /** @description The per-launch permission override this conversation was started with, or null if it had none. The policy actually in force is this merged with the agent's, taking the stricter of the two per tool. */
3562
3526
  permission_policy?: components["schemas"]["PermissionPolicy"] | null;
3563
3527
  /** @enum {string} */
3564
- runtime: "claude" | "codex" | "gemini" | "opencode" | "acp" | "fountain-fixture";
3528
+ runtime: "claude" | "codex" | "gemini" | "opencode" | "acp";
3565
3529
  runtime_session_id?: string | null;
3566
3530
  sandbox?: (components["schemas"]["Sandbox"] | (null)) | null;
3567
3531
  /**
@@ -3592,6 +3556,8 @@ export interface components {
3592
3556
  agent_id: string;
3593
3557
  /** @description Opaque key for the external channel this conversation is bound to (for example a Buzz channel id). When set, the latest live conversation for the same agent, vault and channel is resumed (200) instead of a new one being opened (201). */
3594
3558
  channel_id?: string | null;
3559
+ /** @description Your own name for the first prompt. Ignored when the request carries no `prompt`, and when `channel_id` resumes a conversation: a resume does not deliver the prompt, so send the value with it on the prompts route. Fountain stores it on the turn the prompt opens and sends it on that turn's `started` stage event, beside the `turn_id`, so a client can bind its work item to the exact turn without inferring it from turn order. Use the event to find a candidate turn and the turn itself to confirm it: the event's copy has been through event redaction, and the turn's is what you sent. It is a correlation and not an idempotency key: a second prompt with the same value opens a second turn that carries it too. Make it unique within the conversation. */
3560
+ client_request_id?: string | null;
3595
3561
  /**
3596
3562
  * Format: uuid
3597
3563
  * @description Optional environment to provision from instead of the agent's own; the conversation stays pinned to it across wakes. Must be owned by the caller (404 otherwise) and satisfy the agent's allowed_environment_ids when that allowlist is set (422 environment_not_allowed). Part of the channel_id resume key.
@@ -3623,7 +3589,7 @@ export interface components {
3623
3589
  sandbox_api_access?: "owner" | "none";
3624
3590
  /**
3625
3591
  * Format: uuid
3626
- * @description Attach the conversation to a sandbox you already have instead of provisioning one (ADR 0023). The sandbox must be yours (404 sandbox_not_found), ready or suspended (409 sandbox_not_attachable), and built for the same agent, environment and vault as this launch (422 sandbox_identity_mismatch; 422 sandbox_runtime_mismatch if the agent's runtime changed since). The conversation opens idle on that machine; a prompt here wakes it. Several conversations then run on one disk at once, except on opencode and gemini, where a second turn is refused with 409 sandbox_at_capacity while one runs.
3592
+ * @description Attach the conversation to a sandbox you already have instead of provisioning one (ADR 0023). The sandbox must be yours (404 sandbox_not_found), ready or suspended (409 sandbox_not_attachable), and built for the same agent, environment and vault as this launch (422 sandbox_identity_mismatch; 422 sandbox_runtime_mismatch if the agent's runtime changed since). The conversation opens idle on that machine; a prompt here wakes it. Several conversations then run on one disk at once, except on opencode and gemini, where a second turn of the same runtime is refused with 409 sandbox_at_capacity while one runs.
3627
3593
  */
3628
3594
  sandbox_id?: string | null;
3629
3595
  /**
@@ -3698,14 +3664,6 @@ export interface components {
3698
3664
  ConversationTreeResponse: {
3699
3665
  data: components["schemas"]["ConversationTreeNode"][];
3700
3666
  };
3701
- /** CredentialSetDeletionError */
3702
- CredentialSetDeletionError: {
3703
- /** @enum {string} */
3704
- error: "credential_set_is_default";
3705
- message: string;
3706
- /** @enum {string} */
3707
- reason: "is_default";
3708
- };
3709
3667
  /**
3710
3668
  * CreditsCheckoutRequest
3711
3669
  * @example {
@@ -3893,9 +3851,30 @@ export interface components {
3893
3851
  /** @description Setup exec timeout in seconds; defaults to 120. The overall provisioning deadline still applies. */
3894
3852
  setup_timeout_seconds?: number;
3895
3853
  };
3896
- /** Error */
3854
+ /**
3855
+ * Error
3856
+ * @description The one body every JSON error status carries (#2324). `error` is the code to branch on; the other keys accompany particular codes and are absent otherwise. A `406` is the exception: content negotiation fails before any controller runs and renders `NegotiationError` instead.
3857
+ */
3897
3858
  Error: {
3859
+ /** @description Sandboxes the account has in use, on `sandbox_quota_exceeded` (429). */
3860
+ active_sandboxes?: number;
3861
+ /**
3862
+ * @description The machine-readable code: `validation_failed`, `not_found`, `insufficient_credits`, `sandbox_quota_exceeded`, `expired`, `invalid_token` and the rest. On the key-authentication and scope refusals it is a sentence and `reason` carries the code.
3863
+ * @example validation_failed
3864
+ */
3898
3865
  error: string;
3866
+ /** @description Field validation messages keyed by field, beside `error: "validation_failed"`, whether the request died at the OpenAPI cast or in a changeset (#1431). */
3867
+ errors?: {
3868
+ [key: string]: string[];
3869
+ };
3870
+ /** @description The account's concurrent-sandbox cap, on `sandbox_quota_exceeded` (429). */
3871
+ limit?: number;
3872
+ /** @description A sentence for a human, when there is one. */
3873
+ message?: string;
3874
+ /** @description A second stable word. On the 401 and 403 refusals from key authentication and scope checks, `error` is prose and this is the code (`api_key_invalid`, `api_key_expired`, `insufficient_scope`). On `broker_unavailable`, `sandbox_not_resettable` and `credential_set_is_default`, `error` is the code and this narrows it (`econnrefused`, `timeout`, `is_default`, ...). */
3875
+ reason?: string;
3876
+ /** @description Where to buy credit, on `insufficient_credits` (402). */
3877
+ upgrade_url?: string;
3899
3878
  };
3900
3879
  /**
3901
3880
  * Export
@@ -4213,12 +4192,16 @@ export interface components {
4213
4192
  }) | null;
4214
4193
  /** PromptRequest */
4215
4194
  PromptRequest: {
4195
+ /** @description Your own name for this prompt. Fountain stores it on the turn the prompt opens and sends it on that turn's `started` stage event, beside the `turn_id`, so a client can bind its work item to the exact turn without inferring it from turn order. Use the event to find a candidate turn and the turn itself to confirm it: the event's copy has been through event redaction, and the turn's is what you sent. It is a correlation and not an idempotency key: a second prompt with the same value opens a second turn that carries it too. Make it unique within the conversation. */
4196
+ client_request_id?: string | null;
4216
4197
  /** @description Optional images to attach to this prompt. */
4217
4198
  images?: components["schemas"]["ImageInput"][] | null;
4218
4199
  prompt: string;
4219
4200
  };
4220
4201
  /** PromptResponse */
4221
4202
  PromptResponse: {
4203
+ /** @description The `client_request_id` the request carried, or null when it carried none. The response cannot name the turn: a conversation that has to be woken is answered before its turn exists. Find the turn by this value instead. */
4204
+ client_request_id?: string | null;
4222
4205
  /** @example queued */
4223
4206
  status: string;
4224
4207
  };
@@ -4372,7 +4355,7 @@ export interface components {
4372
4355
  /** @description True while this conversation is running a turn on the machine. */
4373
4356
  mid_turn: boolean;
4374
4357
  /** @enum {string} */
4375
- runtime?: "claude" | "codex" | "gemini" | "opencode" | "acp" | "fountain-fixture";
4358
+ runtime?: "claude" | "codex" | "gemini" | "opencode" | "acp";
4376
4359
  /** @enum {string} */
4377
4360
  status: "pending" | "running" | "idle" | "failed" | "terminated";
4378
4361
  title?: string | null;
@@ -4707,6 +4690,53 @@ export interface components {
4707
4690
  SecretResponse: {
4708
4691
  data: components["schemas"]["Secret"];
4709
4692
  };
4693
+ /**
4694
+ * StreamLogEvent
4695
+ * @description One frame of the conversation, events or team SSE log stream (#2297). Same fields as `LogEvent` minus `id` — the frame's id travels in the SSE `id:` line, never the JSON body — plus `conversation_id` and `agent_id`, which the REST log feed never sends because its URL or list item already names the conversation.
4696
+ *
4697
+ * Not every stream sends every optional field here; see each property's own description for which of `GET /api/conversations/:id/stream`, `GET /api/events/stream` and `GET /api/team/stream` include it. The events and team streams also send `StreamSignal` frames on the same connection.
4698
+ */
4699
+ StreamLogEvent: {
4700
+ /**
4701
+ * Format: uuid
4702
+ * @description The teammate whose conversation this is. Sent only on `GET /api/team/stream`, to route the event to a roster row.
4703
+ */
4704
+ agent_id?: string;
4705
+ /** @description Only with `?blocks=true`: `data` parsed server-side into the blocks a transcript renders. Empty for non-output events. */
4706
+ blocks?: components["schemas"]["Block"][];
4707
+ /**
4708
+ * Format: uuid
4709
+ * @description Which conversation this event belongs to. Sent on `GET /api/events/stream` and `GET /api/team/stream`; not sent on `GET /api/conversations/:id/stream`, whose URL already names the conversation.
4710
+ */
4711
+ conversation_id?: string;
4712
+ /** @description Output text, or JSON-encoded metadata for stage events. */
4713
+ data?: string;
4714
+ /** @description Sent on `GET /api/events/stream`. Not sent on `GET /api/conversations/:id/stream` or `GET /api/team/stream`. */
4715
+ duration_ms?: number | null;
4716
+ /** @enum {string} */
4717
+ kind: "output" | "stage";
4718
+ /** @description Lifecycle stage name. null on an event that has no stage. */
4719
+ stage?: string | null;
4720
+ /**
4721
+ * @description Lifecycle state of the stage. null on an event that has no state.
4722
+ * @enum {string|null}
4723
+ */
4724
+ state?: "started" | "done" | "failed" | "interrupted" | null;
4725
+ /** @description `stdout` / `stderr` for output events; empty for stage events. */
4726
+ stream?: string;
4727
+ /** Format: date-time */
4728
+ ts: string;
4729
+ /** Format: uuid */
4730
+ turn_id?: string | null;
4731
+ };
4732
+ /**
4733
+ * StreamSignal
4734
+ * @description A change-signal frame on the events or team SSE stream (#2297) — not a log event, and no `conversation_id`/`agent_id`/anything else `StreamLogEvent` declares. The event name says what changed: `conversations` on `GET /api/events/stream` (the caller's conversation list changed — created, titled, read, deleted, finished), `team` on `GET /api/team/stream` (the roster changed) and `schedule` on `GET /api/team/stream` (a team schedule was created, updated, deleted or fired). The client re-lists rather than reading anything from the body.
4735
+ */
4736
+ StreamSignal: {
4737
+ /** @enum {string} */
4738
+ reason: "changed";
4739
+ };
4710
4740
  /**
4711
4741
  * StripeUrlResponse
4712
4742
  * @description A Stripe-hosted URL to open in a browser. Single-use and short-lived.
@@ -4943,6 +4973,8 @@ export interface components {
4943
4973
  * @description One prompt → exit_code cycle within a conversation.
4944
4974
  */
4945
4975
  Turn: {
4976
+ /** @description The `client_request_id` of the prompt that opened this turn (#1406), or null: the caller sent none, or the turn is `autonomous`. Not unique. This is the value the caller sent, byte for byte, and it is the one to compare against: the copy on the turn's `started` stage event has been through event redaction, which rewrites any registered environment value it contains. */
4977
+ client_request_id?: string | null;
4946
4978
  /** Format: date-time */
4947
4979
  ended_at?: string | null;
4948
4980
  exit_code?: number | null;
@@ -4995,17 +5027,6 @@ export interface components {
4995
5027
  input?: number;
4996
5028
  output?: number;
4997
5029
  };
4998
- /**
4999
- * UnprocessableEntityError
5000
- * @description A rejected request. Field validation failures include errors; other refusals carry an error and may include a message.
5001
- */
5002
- UnprocessableEntityError: {
5003
- error: string;
5004
- errors?: {
5005
- [key: string]: string[];
5006
- };
5007
- message?: string;
5008
- };
5009
5030
  /**
5010
5031
  * UsageAccounting
5011
5032
  * @description The adapter's accounting claim, not independently verified billing. Interpret source, version and scope together. Reported does not imply whole-conversation coverage.
@@ -5907,7 +5928,7 @@ export interface operations {
5907
5928
  [name: string]: unknown;
5908
5929
  };
5909
5930
  content: {
5910
- "application/json": components["schemas"]["CredentialSetDeletionError"];
5931
+ "application/json": components["schemas"]["Error"];
5911
5932
  };
5912
5933
  };
5913
5934
  /** @description Too Many Requests */
@@ -6739,6 +6760,15 @@ export interface operations {
6739
6760
  "application/json": components["schemas"]["Error"];
6740
6761
  };
6741
6762
  };
6763
+ /** @description Another teardown holds this machine; retry */
6764
+ 503: {
6765
+ headers: {
6766
+ [name: string]: unknown;
6767
+ };
6768
+ content: {
6769
+ "application/json": components["schemas"]["Error"];
6770
+ };
6771
+ };
6742
6772
  };
6743
6773
  };
6744
6774
  "FountainWeb.AdminController.index_users": {
@@ -7498,7 +7528,7 @@ export interface operations {
7498
7528
  [name: string]: unknown;
7499
7529
  };
7500
7530
  content: {
7501
- "application/json": components["schemas"]["ChangesetError"];
7531
+ "application/json": components["schemas"]["Error"];
7502
7532
  };
7503
7533
  };
7504
7534
  /** @description Too Many Requests */
@@ -7655,7 +7685,7 @@ export interface operations {
7655
7685
  [name: string]: unknown;
7656
7686
  };
7657
7687
  content: {
7658
- "application/json": components["schemas"]["ChangesetError"];
7688
+ "application/json": components["schemas"]["Error"];
7659
7689
  };
7660
7690
  };
7661
7691
  /** @description Too Many Requests */
@@ -7810,7 +7840,7 @@ export interface operations {
7810
7840
  [name: string]: unknown;
7811
7841
  };
7812
7842
  content: {
7813
- "application/json": components["schemas"]["ChangesetError"];
7843
+ "application/json": components["schemas"]["Error"];
7814
7844
  };
7815
7845
  };
7816
7846
  /** @description Too Many Requests */
@@ -8229,7 +8259,7 @@ export interface operations {
8229
8259
  [name: string]: unknown;
8230
8260
  };
8231
8261
  content: {
8232
- "application/json": components["schemas"]["ChangesetError"];
8262
+ "application/json": components["schemas"]["Error"];
8233
8263
  };
8234
8264
  };
8235
8265
  /** @description Too Many Requests */
@@ -8623,7 +8653,7 @@ export interface operations {
8623
8653
  [name: string]: unknown;
8624
8654
  };
8625
8655
  content: {
8626
- "application/json": components["schemas"]["AuthError"];
8656
+ "application/json": components["schemas"]["Error"];
8627
8657
  };
8628
8658
  };
8629
8659
  /** @description No acceptable representation */
@@ -8641,7 +8671,7 @@ export interface operations {
8641
8671
  [name: string]: unknown;
8642
8672
  };
8643
8673
  content: {
8644
- "application/json": components["schemas"]["AuthError"];
8674
+ "application/json": components["schemas"]["Error"];
8645
8675
  };
8646
8676
  };
8647
8677
  /** @description Too Many Requests */
@@ -8693,7 +8723,7 @@ export interface operations {
8693
8723
  [name: string]: unknown;
8694
8724
  };
8695
8725
  content: {
8696
- "application/json": components["schemas"]["AuthError"];
8726
+ "application/json": components["schemas"]["Error"];
8697
8727
  };
8698
8728
  };
8699
8729
  };
@@ -8826,7 +8856,7 @@ export interface operations {
8826
8856
  [name: string]: unknown;
8827
8857
  };
8828
8858
  content: {
8829
- "application/json": components["schemas"]["AuthError"];
8859
+ "application/json": components["schemas"]["Error"];
8830
8860
  };
8831
8861
  };
8832
8862
  /** @description No acceptable representation */
@@ -8844,7 +8874,7 @@ export interface operations {
8844
8874
  [name: string]: unknown;
8845
8875
  };
8846
8876
  content: {
8847
- "application/json": components["schemas"]["AuthError"];
8877
+ "application/json": components["schemas"]["Error"];
8848
8878
  };
8849
8879
  };
8850
8880
  /** @description Too Many Requests */
@@ -8887,7 +8917,7 @@ export interface operations {
8887
8917
  [name: string]: unknown;
8888
8918
  };
8889
8919
  content: {
8890
- "application/json": components["schemas"]["AuthError"];
8920
+ "application/json": components["schemas"]["Error"];
8891
8921
  };
8892
8922
  };
8893
8923
  /** @description No acceptable representation */
@@ -8905,7 +8935,7 @@ export interface operations {
8905
8935
  [name: string]: unknown;
8906
8936
  };
8907
8937
  content: {
8908
- "application/json": components["schemas"]["UnprocessableEntityError"];
8938
+ "application/json": components["schemas"]["Error"];
8909
8939
  };
8910
8940
  };
8911
8941
  };
@@ -8982,7 +9012,7 @@ export interface operations {
8982
9012
  [name: string]: unknown;
8983
9013
  };
8984
9014
  content: {
8985
- "application/json": components["schemas"]["AuthError"];
9015
+ "application/json": components["schemas"]["Error"];
8986
9016
  };
8987
9017
  };
8988
9018
  };
@@ -9025,7 +9055,7 @@ export interface operations {
9025
9055
  [name: string]: unknown;
9026
9056
  };
9027
9057
  content: {
9028
- "application/json": components["schemas"]["AuthError"];
9058
+ "application/json": components["schemas"]["Error"];
9029
9059
  };
9030
9060
  };
9031
9061
  /** @description No acceptable representation */
@@ -9095,7 +9125,7 @@ export interface operations {
9095
9125
  [name: string]: unknown;
9096
9126
  };
9097
9127
  content: {
9098
- "application/json": components["schemas"]["AuthError"];
9128
+ "application/json": components["schemas"]["Error"];
9099
9129
  };
9100
9130
  };
9101
9131
  };
@@ -10794,7 +10824,7 @@ export interface operations {
10794
10824
  [name: string]: unknown;
10795
10825
  };
10796
10826
  content: {
10797
- "application/json": components["schemas"]["ChangesetError"];
10827
+ "application/json": components["schemas"]["Error"];
10798
10828
  };
10799
10829
  };
10800
10830
  /** @description Too Many Requests */
@@ -10873,10 +10903,7 @@ export interface operations {
10873
10903
  [name: string]: unknown;
10874
10904
  };
10875
10905
  content: {
10876
- "application/json": {
10877
- error?: string;
10878
- upgrade_url?: string;
10879
- };
10906
+ "application/json": components["schemas"]["Error"];
10880
10907
  };
10881
10908
  };
10882
10909
  /** @description A sandbox token labelling the conversation a resume landed on */
@@ -10921,7 +10948,7 @@ export interface operations {
10921
10948
  [name: string]: unknown;
10922
10949
  };
10923
10950
  content: {
10924
- "application/json": components["schemas"]["UnprocessableEntityError"];
10951
+ "application/json": components["schemas"]["Error"];
10925
10952
  };
10926
10953
  };
10927
10954
  /** @description Tenant concurrency cap reached */
@@ -11020,7 +11047,7 @@ export interface operations {
11020
11047
  [name: string]: unknown;
11021
11048
  };
11022
11049
  content: {
11023
- "application/json": components["schemas"]["BrokerUnavailableError"];
11050
+ "application/json": components["schemas"]["Error"];
11024
11051
  };
11025
11052
  };
11026
11053
  };
@@ -11260,7 +11287,7 @@ export interface operations {
11260
11287
  [name: string]: unknown;
11261
11288
  };
11262
11289
  content: {
11263
- "application/json": components["schemas"]["UnprocessableEntityError"];
11290
+ "application/json": components["schemas"]["Error"];
11264
11291
  };
11265
11292
  };
11266
11293
  /** @description Too Many Requests */
@@ -11353,6 +11380,15 @@ export interface operations {
11353
11380
  "application/json": components["schemas"]["NegotiationError"];
11354
11381
  };
11355
11382
  };
11383
+ /** @description Sandbox is being reset */
11384
+ 409: {
11385
+ headers: {
11386
+ [name: string]: unknown;
11387
+ };
11388
+ content: {
11389
+ "application/json": components["schemas"]["Error"];
11390
+ };
11391
+ };
11356
11392
  /** @description Conversation is terminal */
11357
11393
  410: {
11358
11394
  headers: {
@@ -11708,7 +11744,7 @@ export interface operations {
11708
11744
  [name: string]: unknown;
11709
11745
  };
11710
11746
  content: {
11711
- "text/event-stream": string;
11747
+ "text/event-stream": components["schemas"]["StreamLogEvent"];
11712
11748
  };
11713
11749
  };
11714
11750
  /** @description Unauthorized */
@@ -12262,7 +12298,7 @@ export interface operations {
12262
12298
  [name: string]: unknown;
12263
12299
  };
12264
12300
  content: {
12265
- "application/json": components["schemas"]["ChangesetError"];
12301
+ "application/json": components["schemas"]["Error"];
12266
12302
  };
12267
12303
  };
12268
12304
  /** @description Too Many Requests */
@@ -12410,7 +12446,7 @@ export interface operations {
12410
12446
  [name: string]: unknown;
12411
12447
  };
12412
12448
  content: {
12413
- "application/json": components["schemas"]["ChangesetError"];
12449
+ "application/json": components["schemas"]["Error"];
12414
12450
  };
12415
12451
  };
12416
12452
  /** @description Too Many Requests */
@@ -12625,7 +12661,7 @@ export interface operations {
12625
12661
  [name: string]: unknown;
12626
12662
  };
12627
12663
  content: {
12628
- "application/json": components["schemas"]["ChangesetError"];
12664
+ "application/json": components["schemas"]["Error"];
12629
12665
  };
12630
12666
  };
12631
12667
  /** @description Too Many Requests */
@@ -12780,7 +12816,7 @@ export interface operations {
12780
12816
  [name: string]: unknown;
12781
12817
  };
12782
12818
  content: {
12783
- "application/json": components["schemas"]["ChangesetError"];
12819
+ "application/json": components["schemas"]["Error"];
12784
12820
  };
12785
12821
  };
12786
12822
  /** @description Too Many Requests */
@@ -12817,7 +12853,7 @@ export interface operations {
12817
12853
  [name: string]: unknown;
12818
12854
  };
12819
12855
  content: {
12820
- "text/event-stream": string;
12856
+ "text/event-stream": components["schemas"]["StreamLogEvent"] | components["schemas"]["StreamSignal"];
12821
12857
  };
12822
12858
  };
12823
12859
  /** @description Unauthorized */
@@ -13905,6 +13941,15 @@ export interface operations {
13905
13941
  "application/json": components["schemas"]["Error"];
13906
13942
  };
13907
13943
  };
13944
+ /** @description Another teardown of this sandbox is running */
13945
+ 503: {
13946
+ headers: {
13947
+ [name: string]: unknown;
13948
+ };
13949
+ content: {
13950
+ "application/json": components["schemas"]["Error"];
13951
+ };
13952
+ };
13908
13953
  };
13909
13954
  };
13910
13955
  "FountainWeb.SandboxFilesController.diff": {
@@ -15167,7 +15212,7 @@ export interface operations {
15167
15212
  [name: string]: unknown;
15168
15213
  };
15169
15214
  content: {
15170
- "text/event-stream": string;
15215
+ "text/event-stream": components["schemas"]["StreamLogEvent"] | components["schemas"]["StreamSignal"];
15171
15216
  };
15172
15217
  };
15173
15218
  /** @description Unauthorized */
@@ -15556,6 +15601,24 @@ export interface operations {
15556
15601
  "application/json": components["schemas"]["NegotiationError"];
15557
15602
  };
15558
15603
  };
15604
+ /** @description The computer is being reset or deleted */
15605
+ 409: {
15606
+ headers: {
15607
+ [name: string]: unknown;
15608
+ };
15609
+ content: {
15610
+ "application/json": components["schemas"]["Error"];
15611
+ };
15612
+ };
15613
+ /** @description The computer no longer matches the agent */
15614
+ 422: {
15615
+ headers: {
15616
+ [name: string]: unknown;
15617
+ };
15618
+ content: {
15619
+ "application/json": components["schemas"]["Error"];
15620
+ };
15621
+ };
15559
15622
  /** @description Too Many Requests */
15560
15623
  429: {
15561
15624
  headers: {
@@ -15565,7 +15628,7 @@ export interface operations {
15565
15628
  "application/json": components["schemas"]["Error"];
15566
15629
  };
15567
15630
  };
15568
- /** @description The computer is still starting */
15631
+ /** @description The computer is still starting, or an operation holds it */
15569
15632
  503: {
15570
15633
  headers: {
15571
15634
  [name: string]: unknown;
@@ -15652,7 +15715,7 @@ export interface operations {
15652
15715
  [name: string]: unknown;
15653
15716
  };
15654
15717
  content: {
15655
- "application/json": components["schemas"]["ChangesetError"];
15718
+ "application/json": components["schemas"]["Error"];
15656
15719
  };
15657
15720
  };
15658
15721
  /** @description Too Many Requests */
@@ -16210,7 +16273,7 @@ export interface operations {
16210
16273
  [name: string]: unknown;
16211
16274
  };
16212
16275
  content: {
16213
- "application/json": components["schemas"]["ChangesetError"];
16276
+ "application/json": components["schemas"]["Error"];
16214
16277
  };
16215
16278
  };
16216
16279
  /** @description Too Many Requests */
@@ -16358,7 +16421,7 @@ export interface operations {
16358
16421
  [name: string]: unknown;
16359
16422
  };
16360
16423
  content: {
16361
- "application/json": components["schemas"]["ChangesetError"];
16424
+ "application/json": components["schemas"]["Error"];
16362
16425
  };
16363
16426
  };
16364
16427
  /** @description Too Many Requests */
@@ -16513,7 +16576,7 @@ export interface operations {
16513
16576
  [name: string]: unknown;
16514
16577
  };
16515
16578
  content: {
16516
- "application/json": components["schemas"]["ChangesetError"];
16579
+ "application/json": components["schemas"]["Error"];
16517
16580
  };
16518
16581
  };
16519
16582
  /** @description Too Many Requests */
@@ -16661,7 +16724,7 @@ export interface operations {
16661
16724
  [name: string]: unknown;
16662
16725
  };
16663
16726
  content: {
16664
- "application/json": components["schemas"]["ChangesetError"];
16727
+ "application/json": components["schemas"]["Error"];
16665
16728
  };
16666
16729
  };
16667
16730
  /** @description Too Many Requests */
@@ -16811,7 +16874,7 @@ export interface operations {
16811
16874
  [name: string]: unknown;
16812
16875
  };
16813
16876
  content: {
16814
- "application/json": components["schemas"]["ChangesetError"];
16877
+ "application/json": components["schemas"]["Error"];
16815
16878
  };
16816
16879
  };
16817
16880
  /** @description Too Many Requests */
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/6.0.0";
18
+ export declare const USER_AGENT = "fountain-sdk-js/6.1.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/6.0.0";
8
+ export const USER_AGENT = "fountain-sdk-js/6.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managoat/fountain-sdk",
3
- "version": "6.0.0",
3
+ "version": "6.1.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": {