@managoat/fountain-sdk 6.1.0 → 6.2.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.2.0] - 2026-09-26
15
+
16
+ ### Added
17
+
18
+ - `ReapplyOptions.model` on `resume(id).reapply`: run another model from the conversation's next turn, or pass `null` to return to its agent's model (#2511, ADR 0061). The generated types carry the conversation's `model` and the request fields.
19
+
14
20
  ## [6.1.0] - 2026-09-17
15
21
 
16
22
  ### Added
package/README.md CHANGED
@@ -430,7 +430,7 @@ Then update two things `npm version` does not touch, and open a PR as usual:
430
430
  The `SDK release gate` check on the PR fails if either is missing, if the
431
431
  version is already on npm, or if you changed what the package ships without
432
432
  bumping at all. When the PR merges, `Publish SDK` sees a version the registry
433
- does not have, publishes it, and tags the merge commit `sdk-v<version>`.
433
+ does not have, publishes it, and tags the merge commit `sdk-typescript-v<version>`.
434
434
 
435
435
  A PR that touches only tests, examples or the changelog needs no bump; the
436
436
  gate stays quiet, and the publish workflow finds nothing to do. To change the
@@ -20,6 +20,11 @@ export interface ReapplyOptions {
20
20
  environmentId?: string | null;
21
21
  /** Change the vault, pass null to clear it, or omit it to keep it. */
22
22
  vaultId?: string | null;
23
+ /**
24
+ * Run another model from the next turn (`provider/model_id`), pass null to
25
+ * return to the agent's model, or omit it to keep the current one.
26
+ */
27
+ model?: string | null;
23
28
  }
24
29
  /**
25
30
  * A conversation you already have — the sandbox is still there, and so is
@@ -152,6 +152,8 @@ export class Conversation {
152
152
  body.environment_id = options.environmentId;
153
153
  if (options.vaultId !== undefined)
154
154
  body.vault_id = options.vaultId;
155
+ if (options.model !== undefined)
156
+ body.model = options.model;
155
157
  return this.http.data("POST", `/api/conversations/${this.id}/reapply`, { body });
156
158
  }
157
159
  /** Ask the agent to stop the turn it is on. The sandbox stays up. */
@@ -1 +1 @@
1
- {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AAC;IACtF,CAAC;IAED,8EAA8E;IAC9E,KAAK,CAAC,MAAM;QACV,OAAO,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;IACzE,CAAC;IAED;;;;;;;OAOG;IACK,KAAK,CAAC,cAAc;QAC1B,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,IAAI,CAAC;YACH,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE;gBACzD,OAAO,EAAE,OAAO;gBAChB,IAAI,EAAE,KAAK;gBACX,UAAU,EAAE,CAAC;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"}
@@ -63,6 +63,118 @@ export interface paths {
63
63
  patch?: never;
64
64
  trace?: never;
65
65
  };
66
+ "/api/account/chatgpt-subscriptions": {
67
+ parameters: {
68
+ query?: never;
69
+ header?: never;
70
+ path?: never;
71
+ cookie?: never;
72
+ };
73
+ /**
74
+ * List ChatGPT subscriptions
75
+ * @description Every subscription the account holds, by name, with how many it may hold and whether it may link another now. Tokens are never returned.
76
+ */
77
+ get: operations["FountainWeb.ChatGPTSubscriptionController.index"];
78
+ put?: never;
79
+ post?: never;
80
+ delete?: never;
81
+ options?: never;
82
+ head?: never;
83
+ patch?: never;
84
+ trace?: never;
85
+ };
86
+ "/api/account/chatgpt-subscriptions/attempts": {
87
+ parameters: {
88
+ query?: never;
89
+ header?: never;
90
+ path?: never;
91
+ cookie?: never;
92
+ };
93
+ /**
94
+ * List open ChatGPT sign-ins
95
+ * @description The account's pending attempts, oldest first, each with its code: what a client that lost its state reads to pick up where it was.
96
+ */
97
+ get: operations["FountainWeb.ChatGPTSubscriptionController.index_attempts"];
98
+ put?: never;
99
+ /**
100
+ * Start a ChatGPT sign-in
101
+ * @description `name` links a new subscription; `grant_id` reconnects one, which keeps the old credential serving until the new sign-in commits. The answer carries the code to type and the page to type it on. It expires in fifteen minutes. Limited to ten an hour and three open at once, per account.
102
+ */
103
+ post: operations["FountainWeb.ChatGPTSubscriptionController.create_attempt"];
104
+ delete?: never;
105
+ options?: never;
106
+ head?: never;
107
+ patch?: never;
108
+ trace?: never;
109
+ };
110
+ "/api/account/chatgpt-subscriptions/attempts/{id}": {
111
+ parameters: {
112
+ query?: never;
113
+ header?: never;
114
+ path?: never;
115
+ cookie?: never;
116
+ };
117
+ /**
118
+ * Read a ChatGPT sign-in
119
+ * @description The endpoint to poll. It reads a row and contacts nobody. An attempt that ran out of time reads `expired`.
120
+ */
121
+ get: operations["FountainWeb.ChatGPTSubscriptionController.show_attempt"];
122
+ put?: never;
123
+ post?: never;
124
+ /**
125
+ * Cancel a ChatGPT sign-in
126
+ * @description Ends a pending attempt; a sign-in approved afterwards stores nothing. Already cancelled is a 200. An attempt that has completed, failed or expired is a 409 `chatgpt_link_attempt_not_pending` carrying its `state`.
127
+ */
128
+ delete: operations["FountainWeb.ChatGPTSubscriptionController.cancel_attempt"];
129
+ options?: never;
130
+ head?: never;
131
+ patch?: never;
132
+ trace?: never;
133
+ };
134
+ "/api/account/chatgpt-subscriptions/{id}": {
135
+ parameters: {
136
+ query?: never;
137
+ header?: never;
138
+ path?: never;
139
+ cookie?: never;
140
+ };
141
+ get?: never;
142
+ put?: never;
143
+ post?: never;
144
+ /**
145
+ * Remove a disconnected ChatGPT subscription
146
+ * @description Deletes the row, which frees its place under the limit. Refused with 409 `chatgpt_grant_still_connected` until it is disconnected, and with 409 `chatgpt_grant_named_by_sets` while credential sets name it.
147
+ */
148
+ delete: operations["FountainWeb.ChatGPTSubscriptionController.delete"];
149
+ options?: never;
150
+ head?: never;
151
+ /**
152
+ * Rename a ChatGPT subscription
153
+ * @description A name is a label. Renaming changes no credential, and conversations running on the subscription are not disturbed.
154
+ */
155
+ patch: operations["FountainWeb.ChatGPTSubscriptionController.update"];
156
+ trace?: never;
157
+ };
158
+ "/api/account/chatgpt-subscriptions/{id}/disconnect": {
159
+ parameters: {
160
+ query?: never;
161
+ header?: never;
162
+ path?: never;
163
+ cookie?: never;
164
+ };
165
+ get?: never;
166
+ put?: never;
167
+ /**
168
+ * Disconnect a ChatGPT subscription
169
+ * @description Forgets the subscription's tokens and keeps its row. From the moment this returns no sandbox request may use it, inside a connection that was already open too. A credential set that names it keeps naming it, and its codex runs fail by name until the subscription is reconnected or the set is pointed elsewhere; nothing is substituted. Already disconnected is a 200. The token is not revoked at ChatGPT.
170
+ */
171
+ post: operations["FountainWeb.ChatGPTSubscriptionController.disconnect"];
172
+ delete?: never;
173
+ options?: never;
174
+ head?: never;
175
+ patch?: never;
176
+ trace?: never;
177
+ };
66
178
  "/api/account/exports": {
67
179
  parameters: {
68
180
  query?: never;
@@ -166,8 +278,8 @@ export interface paths {
166
278
  options?: never;
167
279
  head?: never;
168
280
  /**
169
- * Rename an inference credential set, or make it the default
170
- * @description Omitting a field leaves it alone. `is_default: false` is refused: a set stops being the default when another becomes it, never on its own, because an account with no default has nothing to read a credential from.
281
+ * Rename an inference credential set, make it the default, or name a ChatGPT subscription
282
+ * @description Omitting a field leaves it alone. `is_default: false` is refused: a set stops being the default when another becomes it, never on its own, because an account with no default has nothing to read a credential from. `chatgpt_grant_id` names one of the account's ChatGPT subscriptions for the set's codex runs, and `null` stops naming one. Naming one ends the set's running codex conversations with `inference_source_changed`: their source is now the subscription. An id that is not one of the account's subscriptions, and a disconnected one, are 422; sending the id the set already names changes nothing.
171
283
  */
172
284
  patch: operations["FountainWeb.InferenceCredentialSetController.update"];
173
285
  trace?: never;
@@ -827,7 +939,7 @@ export interface paths {
827
939
  put?: never;
828
940
  /**
829
941
  * Register an account
830
- * @description Creates the account and sends the verification email. The account cannot mint an API key until it is verified, so a headless bootstrap is register → `POST /api/auth/verify` with the emailed token → `POST /api/auth/token`. Rate-limited to 5 per IP per hour. On an instance with open registration disabled this answers 403 with a reason code.
942
+ * @description Creates the account and sends the verification email. The account cannot mint an API key until it is verified, so a headless bootstrap is register → `POST /api/auth/verify` with the emailed token → `POST /api/auth/token`. Rate-limited to 5 per IP per hour. On an instance with open registration disabled this answers 403 with a reason code; an instance that asks for an access code answers 403 `access_code_required` until `access_code` carries it.
831
943
  */
832
944
  post: operations["FountainWeb.RegistrationController.api_create"];
833
945
  delete?: never;
@@ -1348,8 +1460,10 @@ export interface paths {
1348
1460
  get?: never;
1349
1461
  put?: never;
1350
1462
  /**
1351
- * Reapply a conversation's Agent, Environment and Vault
1352
- * @description Applies a selection to the machine this conversation already runs on, so its files stay where the agent left them. Variables, the system prompt, skills and MCP configuration are rewritten, and the next prompt reads them. An omitted field keeps its current selection; null clears the Environment override or the Vault; an empty object reapplies what is already selected.
1463
+ * Reapply a conversation's Agent, Environment, Vault and model
1464
+ * @description Applies a selection to the machine this conversation already runs on, so its files stay where the agent left them. Variables, the system prompt, skills and MCP configuration are rewritten, and the next prompt reads them. An omitted field keeps its current selection; null clears the Environment override, the Vault or the model override; an empty object reapplies what is already selected.
1465
+ *
1466
+ * `model` changes the model this conversation runs from its next turn (ADR 0061), continuing the same runtime session. It is refused with 422 `model_invalid` when the runtime cannot run it, and with 409 `inference_source_changed` when the conversation's credential does not serve it.
1353
1467
  *
1354
1468
  * Refused with 409 `conversation_busy` while a turn runs, 409 `rebuild_required` when the selection would need the machine built again (the `field` says which one forced it), 503 while the machine is still being built, and 410 once the conversation has ended.
1355
1469
  */
@@ -1891,7 +2005,7 @@ export interface paths {
1891
2005
  };
1892
2006
  /**
1893
2007
  * List a directory on a sandbox
1894
- * @description The entries of one directory, directories first then by name. Without `path`, the agent's working directory. Only a `ready` sandbox answers (`409 sandbox_not_ready`): a parked one is not woken for a read. Full scope.
2008
+ * @description The entries of one directory, directories first then by name. Without `path`, the agent's working directory. Only a `ready` sandbox answers (`409 sandbox_not_ready`): a parked one is not woken for a read. A sandbox being parked or destroyed is `503 sandbox_unavailable`; retry after the `Retry-After`. Full scope.
1895
2009
  */
1896
2010
  get: operations["FountainWeb.SandboxFilesController.index"];
1897
2011
  put?: never;
@@ -2979,6 +3093,8 @@ export interface components {
2979
3093
  AuthMeResponse: {
2980
3094
  /** @description Whether this account's conversations run behind the egress credential broker (ADR 0019): secrets with bindings stay at the broker, a limited environment is enforced there, and /api/conversations/:id/egress has content. Connections availability is separate. Read-only; an operator sets it. */
2981
3095
  brokered?: boolean;
3096
+ /** @description Whether this account may link a new ChatGPT subscription. Listing, renaming, reconnecting, disconnecting and removing the ones it holds never depend on it. */
3097
+ chatgpt_subscriptions_enabled?: boolean;
2982
3098
  /** @description Null when billing is off. */
2983
3099
  comped?: boolean | null;
2984
3100
  /** @description Whether this account may add connections, providers, or credential bindings. Use connections_manageable to show existing credentials and their removal controls. */
@@ -3072,7 +3188,7 @@ export interface components {
3072
3188
  };
3073
3189
  /**
3074
3190
  * Block
3075
- * @description One structured piece of a log event's output — the same parse the web UI renders (`Fountain.Conversations.Blocks`). `kind` decides the other fields: `text`/`thinking` carry `body`; `plan` carries the full ordered checklist in `body` (entries with `content`, `status`, and optional `priority`, `id`, `activeForm`); `tool_use` carries `id`, `name`, `summary`, `body` (the input); `tool_result` carries `tool_id`, `body`, `error` and pairs with the `tool_use` of the same id; `init` carries `summary`, `body`; `result` carries `body`, `raw`; `error` carries `body`; `raw` carries `body`, `summary`; `permission_request` carries `request_id`, `name`, `summary` and `options` — the agent is blocked on it, and a client answers with POST /api/conversations/{id}/requests/{request_id}. Render only the options in `options`; never synthesise one the agent did not offer.
3191
+ * @description One structured piece of a log event's output — the same parse the web UI renders (`Fountain.Conversations.Blocks`). `kind` decides the other fields: `text`/`thinking` carry `body`; `plan` carries the full ordered checklist in `body` (entries with `content`, `status`, and optional `priority`, `id`, `activeForm`); `tool_use` carries `id`, `name`, `summary`, `body` (the input); `tool_result` carries `tool_id`, `body`, `error` and pairs with the `tool_use` of the same id; `init` carries `summary`, `body`; `result` carries `body`, `raw`; `error` carries `body`; `raw` carries `body`, `summary`; `permission_request` carries `request_id`, `name`, `summary` and `options` — the agent is blocked on it, and a client answers with POST /api/conversations/{id}/requests/{request_id}. Render only the options in `options`; never synthesise one the agent did not offer. `prompt` carries `body` — the prompt that opened the turn, which is the one kind not parsed out of a runtime's output. It appears only on a turn's `turn`/`started` stage event, and only when the events feed was asked for it with `blocks=true&prompts=true`.
3076
3192
  */
3077
3193
  Block: {
3078
3194
  body?: (string | null) | ({
@@ -3088,7 +3204,7 @@ export interface components {
3088
3204
  error?: boolean | null;
3089
3205
  id?: string | null;
3090
3206
  /** @enum {string} */
3091
- kind: "text" | "thinking" | "tool_use" | "tool_result" | "init" | "result" | "error" | "raw" | "permission_request" | "plan";
3207
+ kind: "text" | "thinking" | "tool_use" | "tool_result" | "init" | "result" | "error" | "raw" | "permission_request" | "plan" | "prompt";
3092
3208
  name?: string | null;
3093
3209
  /** @description permission_request only: the options the agent offered, in its order. Each carries at least `optionId` and `kind` (allow_once, allow_always, reject_once, reject_always, ...). */
3094
3210
  options?: {
@@ -3242,6 +3358,133 @@ export interface components {
3242
3358
  };
3243
3359
  };
3244
3360
  };
3361
+ /**
3362
+ * ChatGPTLinkAttempt
3363
+ * @description One device-code sign-in, for a new subscription or to reconnect one. Show `user_code` and `verification_url` to the person, then read the attempt again every `poll_interval` seconds until `state` leaves `pending`. The server does the polling of ChatGPT; reading this costs nothing upstream.
3364
+ */
3365
+ ChatGPTLinkAttempt: {
3366
+ /** @description True while a pending attempt's last poll of ChatGPT's sign-in service went unanswered. The attempt is still open and Fountain asks again, less often. */
3367
+ auth_unreachable: boolean;
3368
+ /** Format: date-time */
3369
+ expires_at: string;
3370
+ /** @description Why a `failed` attempt failed. Null otherwise. */
3371
+ failure: {
3372
+ grant: string | null;
3373
+ /** Format: uuid */
3374
+ grant_id: string | null;
3375
+ /**
3376
+ * @description `stale_grant`: the subscription was reconnected or disconnected after this attempt began, and what is there now was left alone. `account_already_linked`: the account holds this ChatGPT account already, as `grant`; reconnect that one instead. `linking_disabled`: linking was turned off for the account while this new link was open.
3377
+ * @enum {string}
3378
+ */
3379
+ reason: "stale_grant" | "account_already_linked" | "grant_limit_reached" | "grant_not_found" | "name_taken" | "owner_ineligible" | "linking_disabled" | "tenant_key_unavailable" | "invalid_sign_in" | "authorization_failed" | "exchange_failed" | "internal_error";
3380
+ } | null;
3381
+ /**
3382
+ * Format: uuid
3383
+ * @description The subscription being reconnected. Null for a new link.
3384
+ */
3385
+ grant_id: string | null;
3386
+ /** Format: uuid */
3387
+ id: string;
3388
+ /** Format: date-time */
3389
+ inserted_at: string;
3390
+ /** @enum {string} */
3391
+ kind: "link" | "reconnect";
3392
+ /** @description The name a new subscription will take. Null for a reconnect. */
3393
+ name: string | null;
3394
+ /** @description Seconds to wait between reads of this attempt. */
3395
+ poll_interval: number;
3396
+ /**
3397
+ * Format: uuid
3398
+ * @description The subscription a completed attempt linked or reconnected.
3399
+ */
3400
+ result_grant_id: string | null;
3401
+ /**
3402
+ * @description `pending`, then exactly one of the other four, which are final.
3403
+ * @enum {string}
3404
+ */
3405
+ state: "pending" | "completed" | "cancelled" | "expired" | "failed";
3406
+ /** Format: date-time */
3407
+ updated_at: string;
3408
+ /** @description The code to type at `verification_url`. Null once the attempt ends. */
3409
+ user_code: string | null;
3410
+ verification_url: string | null;
3411
+ };
3412
+ /**
3413
+ * ChatGPTLinkAttemptCreateRequest
3414
+ * @description Exactly one of the two: `name` links a new subscription under that name, `grant_id` reconnects the one it names.
3415
+ */
3416
+ ChatGPTLinkAttemptCreateRequest: {
3417
+ /** Format: uuid */
3418
+ grant_id?: string;
3419
+ name?: string;
3420
+ };
3421
+ /** ChatGPTLinkAttemptListResponse */
3422
+ ChatGPTLinkAttemptListResponse: {
3423
+ data: components["schemas"]["ChatGPTLinkAttempt"][];
3424
+ };
3425
+ /** ChatGPTLinkAttemptResponse */
3426
+ ChatGPTLinkAttemptResponse: {
3427
+ data: components["schemas"]["ChatGPTLinkAttempt"];
3428
+ };
3429
+ /**
3430
+ * ChatGPTSubscription
3431
+ * @description One ChatGPT subscription linked to the account, for the codex runtime. Fountain holds and renews its tokens; none is ever returned, and neither is the provider's account id. A credential set names one by `id`.
3432
+ */
3433
+ ChatGPTSubscription: {
3434
+ /** Format: date-time */
3435
+ access_expires_at: string | null;
3436
+ /** @description The ChatGPT account's email, shown to its owner and nobody else. */
3437
+ account_email: string | null;
3438
+ /**
3439
+ * Format: date-time
3440
+ * @description When the subscription's Codex usage resets, while that is in the future. Nothing records one for an account's subscription yet.
3441
+ */
3442
+ exhausted_until: string | null;
3443
+ /** Format: uuid */
3444
+ id: string;
3445
+ /** Format: date-time */
3446
+ inserted_at: string;
3447
+ /** Format: date-time */
3448
+ last_refreshed_at: string | null;
3449
+ /** @description Unique within the account. */
3450
+ name: string;
3451
+ plan_type: string | null;
3452
+ /** @description Whether a refresh token is stored. False once disconnected. */
3453
+ refreshable: boolean;
3454
+ /** @description The auth server's reason code when `status` is `revoked`. */
3455
+ revoked_reason: string | null;
3456
+ /**
3457
+ * @description `active` serves runs. `revoked`: the auth server refused the refresh token; reconnect it. `disconnected`: the account disconnected it; the row holds no token, still counts against the limit, and can be reconnected or removed. A set that names a subscription that is not `active` fails its codex runs by name; nothing is substituted.
3458
+ * @enum {string}
3459
+ */
3460
+ status: "active" | "revoked" | "expired" | "disconnected";
3461
+ /** Format: date-time */
3462
+ updated_at: string;
3463
+ };
3464
+ /**
3465
+ * ChatGPTSubscriptionListResponse
3466
+ * @description Every subscription the account holds, by name. Not paginated: it is capped.
3467
+ */
3468
+ ChatGPTSubscriptionListResponse: {
3469
+ /** @description How many the account holds. A disconnected one counts until removed. */
3470
+ count: number;
3471
+ data: components["schemas"]["ChatGPTSubscription"][];
3472
+ /** @description How many it may hold. */
3473
+ limit: number;
3474
+ /** @description Whether this account may link a new subscription now. False leaves every other operation here working. */
3475
+ linking_enabled: boolean;
3476
+ };
3477
+ /** ChatGPTSubscriptionResponse */
3478
+ ChatGPTSubscriptionResponse: {
3479
+ data: components["schemas"]["ChatGPTSubscription"];
3480
+ };
3481
+ /**
3482
+ * ChatGPTSubscriptionUpdateRequest
3483
+ * @description A new name. A name is a label: renaming changes no credential.
3484
+ */
3485
+ ChatGPTSubscriptionUpdateRequest: {
3486
+ name: string;
3487
+ };
3245
3488
  /**
3246
3489
  * ClaimableUser
3247
3490
  * @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.
@@ -3518,6 +3761,8 @@ export interface components {
3518
3761
  * @description Set by `POST /api/conversations/:id/read`. Null if never read.
3519
3762
  */
3520
3763
  last_read_at?: string | null;
3764
+ /** @description This conversation's model override (ADR 0061), set at launch or by reapply; null means it runs the agent's model. Each turn's model_selection records the model that turn actually asked for. */
3765
+ model?: string | null;
3521
3766
  /** Format: uuid */
3522
3767
  parent_conversation_id?: string | null;
3523
3768
  /** @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. */
@@ -3556,7 +3801,7 @@ export interface components {
3556
3801
  agent_id: string;
3557
3802
  /** @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). */
3558
3803
  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. */
3804
+ /** @description Your own name for the first prompt. Ignored when the request carries no `prompt`. An immediate `channel_id` resume does not deliver the prompt; send the value with it on the prompts route. If a queued start resumes a channel bound while it waited, the queue delivers the prompt and value. 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
3805
  client_request_id?: string | null;
3561
3806
  /**
3562
3807
  * Format: uuid
@@ -3569,14 +3814,16 @@ export interface components {
3569
3814
  images?: components["schemas"]["ImageInput"][] | null;
3570
3815
  /**
3571
3816
  * Format: uuid
3572
- * @description Optional credential set to run on instead of the agent's; the conversation stays pinned to it across wakes. Must be owned by the caller (404 inference_credential_not_found otherwise) and satisfy the agent's allowed_inference_credential_ids when that allowlist is set (422 inference_credential_not_allowed). An unusable selected set is 422 inference_credential_unusable. The resolved source and revision stay bound across wakes; replacing or deleting the source returns 409 inference_source_changed. Not part of sandbox identity, but a shared Codex sandbox requires the same resolved source and revision (409 codex_inference_conflict otherwise).
3817
+ * @description Optional credential set to run on instead of the agent's; the conversation stays pinned to it across wakes. Must be owned by the caller (404 inference_credential_not_found otherwise) and satisfy the agent's allowed_inference_credential_ids when that allowlist is set (422 inference_credential_not_allowed). An unusable selected set is 422 inference_credential_unusable. The resolved source and revision stay bound across wakes; replacing or deleting the source returns 409 inference_source_changed. Not part of sandbox identity, but a shared Codex sandbox requires the same resolved source and revision (409 codex_inference_conflict otherwise). The exception is a set that names a ChatGPT subscription: Codex keeps that sign-in in a home of its own, so it shares a sandbox with any other source, unless the sandbox was first bound before Fountain prepared such homes.
3573
3818
  */
3574
3819
  inference_credential_id?: string | null;
3575
3820
  /** @description Key/value strings to stamp on the conversation. At most 32 entries; a key is at most 64 bytes and a value at most 256 bytes, and a 422 names the offending key under `errors.labels`. With channel_id, a resume merges these into the conversation it hands back rather than dropping them. */
3576
3821
  labels?: {
3577
3822
  [key: string]: string;
3578
3823
  } | null;
3579
- /** @description Per-launch permission override (#939). Keys are matched against the tool card's title first and then ACP's kind (execute, edit, read, fetch, …); "default" covers the rest. Prefer a kind: claude titles a tool call with the command it is about to run, so a title matches one invocation only. Merged with the agent's own policy, taking the stricter of the two. It may only narrow: a policy that would loosen any tool is refused with 422 permission_policy_widens rather than silently clamped, and one the runtime never consults is refused with 422 permission_policy_unenforceable. */
3824
+ /** @description Optional model to run instead of the agent's (ADR 0061), in canonical provider/model_id form, for this conversation only. Checked as the agent's own model is: a provider the runtime does not drive, or any model on the acp runtime, is 422 model_invalid. The model id itself is not checked against a catalog. Change it later with POST /api/conversations/{id}/reapply. Not part of the channel_id resume key: a request that resumes a conversation running a different model is 409 conversation_model_differs, before any prompt is sent; reapply the model, or set fresh: true. */
3825
+ model?: string | null;
3826
+ /** @description Per-launch permission override (#939). Keys are matched against the tool card's title first and then ACP's kind (execute, edit, read, fetch, …); "default" covers the rest. Prefer a kind: claude titles a tool call with the command it is about to run, so a title matches one invocation only. Merged with the agent's own policy, taking the stricter of the two. It may only narrow: a policy that would loosen any tool is refused with 422 permission_policy_widens rather than silently clamped, and one the runtime never consults is refused with 422 permission_policy_unenforceable. If a queued request with a prompt and a nonempty policy resumes an existing channel, it fails with permission_policy_requires_fresh_conversation before sending the prompt. Set fresh: true to create a conversation for that policy. */
3580
3827
  permission_policy?: components["schemas"]["PermissionPolicy"] | null;
3581
3828
  /** @description Optional first turn prompt. A launch may open with no prompt at all, but a prompt that is present must carry words: blank and whitespace-only text is refused with 422 invalid_prompt, before the launch reserves a sandbox. */
3582
3829
  prompt?: string;
@@ -3623,7 +3870,7 @@ export interface components {
3623
3870
  };
3624
3871
  /**
3625
3872
  * ConversationReapplyRequest
3626
- * @description A selection of Agent, Environment and Vault to apply to the machine an existing conversation already runs on. An omitted field keeps its current selection. An explicit null clears the Environment override or the Vault. An empty object reapplies the current selection.
3873
+ * @description A selection of Agent, Environment, Vault and model to apply to the machine an existing conversation already runs on. An omitted field keeps its current selection. An explicit null clears the Environment override, the Vault or the model override. An empty object reapplies the current selection.
3627
3874
  */
3628
3875
  ConversationReapplyRequest: {
3629
3876
  /**
@@ -3636,6 +3883,8 @@ export interface components {
3636
3883
  * @description Environment override to use; null returns to the selected Agent's Environment.
3637
3884
  */
3638
3885
  environment_id?: string | null;
3886
+ /** @description Model to run from the next turn (ADR 0061), in canonical provider/model_id form; null returns to the selected Agent's model. Checked against the selected Agent's runtime (422 model_invalid). The conversation keeps its credential: a model that credential does not serve is 409 inference_source_changed and nothing changes. The runtime session is kept, so the next turn continues it on the new model. */
3887
+ model?: string | null;
3639
3888
  /**
3640
3889
  * Format: uuid
3641
3890
  * @description Vault to use; null detaches the current Vault.
@@ -3645,6 +3894,11 @@ export interface components {
3645
3894
  /** ConversationResponse */
3646
3895
  ConversationResponse: {
3647
3896
  data: components["schemas"]["Conversation"];
3897
+ /** @description Present when creating or resuming a conversation. */
3898
+ meta?: {
3899
+ /** @description Whether the channel resumed an existing conversation. */
3900
+ resumed: boolean;
3901
+ };
3648
3902
  };
3649
3903
  /**
3650
3904
  * ConversationTreeNode
@@ -3858,6 +4112,13 @@ export interface components {
3858
4112
  Error: {
3859
4113
  /** @description Sandboxes the account has in use, on `sandbox_quota_exceeded` (429). */
3860
4114
  active_sandboxes?: number;
4115
+ /**
4116
+ * Format: uuid
4117
+ * @description The sign-in already open on that subscription, on `chatgpt_link_attempt_pending` (409): read or cancel that one.
4118
+ */
4119
+ attempt_id?: string;
4120
+ /** @description How many the account has against `limit`, on `chatgpt_grant_limit_reached` and `chatgpt_link_attempts_exceeded` (409). */
4121
+ count?: number;
3861
4122
  /**
3862
4123
  * @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
4124
  * @example validation_failed
@@ -3867,12 +4128,30 @@ export interface components {
3867
4128
  errors?: {
3868
4129
  [key: string]: string[];
3869
4130
  };
3870
- /** @description The account's concurrent-sandbox cap, on `sandbox_quota_exceeded` (429). */
4131
+ /** @description That subscription's name, on `chatgpt_grant_unusable` (409). */
4132
+ grant?: string | null;
4133
+ /**
4134
+ * Format: uuid
4135
+ * @description The ChatGPT subscription the refusal is about, on `chatgpt_grant_unusable` (409).
4136
+ */
4137
+ grant_id?: string;
4138
+ /** @description The account's concurrent-sandbox cap, on `sandbox_quota_exceeded` (429); how many ChatGPT subscriptions it may hold, on `chatgpt_grant_limit_reached` (409); how many sign-ins it may have open, on `chatgpt_link_attempts_exceeded` (409); how many it may start in an hour, on `chatgpt_link_attempts_rate_limited` (429). */
3871
4139
  limit?: number;
3872
4140
  /** @description A sentence for a human, when there is one. */
3873
4141
  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`, ...). */
4142
+ /** @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`, ...). On `chatgpt_grant_unusable` it says why the named subscription cannot serve: `disconnected`, `revoked`, `expired`, `reconnect_required`, `exhausted`, `not_found`, `broker_required` or `owner_ineligible`. */
3875
4143
  reason?: string;
4144
+ /** @description Seconds until another sign-in may be started, on `chatgpt_link_attempts_rate_limited` (429); the `Retry-After` header says the same. */
4145
+ retry_after_seconds?: number;
4146
+ /** @description The credential sets that still name the subscription, by name, on `chatgpt_grant_named_by_sets` (409): point them elsewhere first. */
4147
+ sets?: string[];
4148
+ /** @description What the attempt had already become, on `chatgpt_link_attempt_not_pending` (409). */
4149
+ state?: string;
4150
+ /**
4151
+ * Format: date-time
4152
+ * @description When the subscription's Codex usage resets, on `chatgpt_grant_unusable` with `reason: "exhausted"`; null otherwise.
4153
+ */
4154
+ until?: string | null;
3876
4155
  /** @description Where to buy credit, on `insufficient_credits` (402). */
3877
4156
  upgrade_url?: string;
3878
4157
  };
@@ -3946,6 +4225,19 @@ export interface components {
3946
4225
  * @description One named set of a tenant's inference credentials. An account holds one or more and exactly one is the default; an agent or a launch may name another. Values are never returned — `providers` reports only which of them this set holds.
3947
4226
  */
3948
4227
  InferenceCredentialSet: {
4228
+ /** @description The named subscription's name and status, so a set that will fail says so here. Read-only; the whole subscription is at `/api/account/chatgpt-subscriptions`. */
4229
+ chatgpt_grant: {
4230
+ /** Format: uuid */
4231
+ id: string;
4232
+ name: string;
4233
+ /** @enum {string} */
4234
+ status: "active" | "revoked" | "expired" | "disconnected";
4235
+ } | null;
4236
+ /**
4237
+ * Format: uuid
4238
+ * @description The ChatGPT subscription this set's codex runs use, or null. A named subscription is used or the run fails with 409 `chatgpt_grant_unusable`: nothing falls back to the set's `openai_api_key`, to another subscription or to the platform. Every other OpenAI consumer still needs the key.
4239
+ */
4240
+ chatgpt_grant_id: string | null;
3949
4241
  /** Format: uuid */
3950
4242
  id: string;
3951
4243
  /** Format: date-time */
@@ -3973,9 +4265,14 @@ export interface components {
3973
4265
  };
3974
4266
  /**
3975
4267
  * InferenceCredentialSetUpdateRequest
3976
- * @description Rename a set, make it the default, or both. Omitting a field leaves it alone. `is_default: false` is refused: a set stops being the default when another becomes it, never on its own.
4268
+ * @description Rename a set, make it the default, name a ChatGPT subscription, or any of them. Omitting a field leaves it alone. `is_default: false` is refused: a set stops being the default when another becomes it, never on its own.
3977
4269
  */
3978
4270
  InferenceCredentialSetUpdateRequest: {
4271
+ /**
4272
+ * Format: uuid
4273
+ * @description One of the account's ChatGPT subscriptions, or null to stop naming one. Naming one ends the set's running codex conversations.
4274
+ */
4275
+ chatgpt_grant_id?: string | null;
3979
4276
  is_default?: boolean;
3980
4277
  name?: string;
3981
4278
  };
@@ -4225,6 +4522,8 @@ export interface components {
4225
4522
  };
4226
4523
  /** RegisterRequest */
4227
4524
  RegisterRequest: {
4525
+ /** @description The instance's signup access code. Required only when the operator set one; otherwise ignored. */
4526
+ access_code?: string;
4228
4527
  /** Format: email */
4229
4528
  email: string;
4230
4529
  /** Format: password */
@@ -4498,7 +4797,7 @@ export interface components {
4498
4797
  agent_id: string;
4499
4798
  /**
4500
4799
  * Format: uuid
4501
- * @description The conversation the request became, once it started.
4800
+ * @description The conversation the request started, or the target when a failed request reports prompt_delivery_unknown. Inspect it before resubmitting: after a timeout or connection loss, the prompt may have run or may still execute.
4502
4801
  */
4503
4802
  conversation_id?: string | null;
4504
4803
  error?: string | null;
@@ -4982,6 +5281,24 @@ export interface components {
4982
5281
  id: string;
4983
5282
  /** @description Number of images attached to this turn. */
4984
5283
  image_count?: number;
5284
+ /** @description Which inference source served this turn, recorded once when the turn started and never rewritten: repointing the credential set, reconnecting the subscription or restarting the conversation changes later turns only. Null on a turn that started before the source was recorded. */
5285
+ readonly inference?: {
5286
+ /**
5287
+ * Format: uuid
5288
+ * @description The ChatGPT subscription that served the turn when `scope` is `grant`, as listed by `GET /api/account/chatgpt-subscriptions`; null otherwise. It keeps naming that subscription after the subscription is removed.
5289
+ */
5290
+ chatgpt_grant_id: string | null;
5291
+ /**
5292
+ * @description `own` for a credential of the account's, `platform` for the deployment's.
5293
+ * @enum {string}
5294
+ */
5295
+ origin: "own" | "platform";
5296
+ /**
5297
+ * @description Where the credential came from: the account's credential set (`credential`), an environment or vault value (`tenant_secret`), a ChatGPT subscription the set names (`grant`), the deployment (`platform`), or nowhere because the provider needs none (`none`) or none was found (`missing`).
5298
+ * @enum {string}
5299
+ */
5300
+ scope: "credential" | "tenant_secret" | "grant" | "platform" | "none" | "missing";
5301
+ } | null;
4985
5302
  /** Format: date-time */
4986
5303
  inserted_at?: string;
4987
5304
  /** @description The service-enforced limit that ended this turn, or null. Set independently of exit_code: a runtime that exits zero after its deadline is still an incomplete turn, so a client must read this before treating a turn as successful. */
@@ -5496,6 +5813,589 @@ export interface operations {
5496
5813
  };
5497
5814
  };
5498
5815
  };
5816
+ "FountainWeb.ChatGPTSubscriptionController.index": {
5817
+ parameters: {
5818
+ query?: never;
5819
+ header?: never;
5820
+ path?: never;
5821
+ cookie?: never;
5822
+ };
5823
+ requestBody?: never;
5824
+ responses: {
5825
+ /** @description Subscriptions */
5826
+ 200: {
5827
+ headers: {
5828
+ [name: string]: unknown;
5829
+ };
5830
+ content: {
5831
+ "application/json": components["schemas"]["ChatGPTSubscriptionListResponse"];
5832
+ };
5833
+ };
5834
+ /** @description Unauthorized */
5835
+ 401: {
5836
+ headers: {
5837
+ [name: string]: unknown;
5838
+ };
5839
+ content: {
5840
+ "application/json": components["schemas"]["Error"];
5841
+ };
5842
+ };
5843
+ /** @description Insufficient scope */
5844
+ 403: {
5845
+ headers: {
5846
+ [name: string]: unknown;
5847
+ };
5848
+ content: {
5849
+ "application/json": components["schemas"]["Error"];
5850
+ };
5851
+ };
5852
+ /** @description No acceptable representation */
5853
+ 406: {
5854
+ headers: {
5855
+ [name: string]: unknown;
5856
+ };
5857
+ content: {
5858
+ "application/json": components["schemas"]["NegotiationError"];
5859
+ };
5860
+ };
5861
+ /** @description Too Many Requests */
5862
+ 429: {
5863
+ headers: {
5864
+ [name: string]: unknown;
5865
+ };
5866
+ content: {
5867
+ "application/json": components["schemas"]["Error"];
5868
+ };
5869
+ };
5870
+ };
5871
+ };
5872
+ "FountainWeb.ChatGPTSubscriptionController.index_attempts": {
5873
+ parameters: {
5874
+ query?: never;
5875
+ header?: never;
5876
+ path?: never;
5877
+ cookie?: never;
5878
+ };
5879
+ requestBody?: never;
5880
+ responses: {
5881
+ /** @description Attempts */
5882
+ 200: {
5883
+ headers: {
5884
+ [name: string]: unknown;
5885
+ };
5886
+ content: {
5887
+ "application/json": components["schemas"]["ChatGPTLinkAttemptListResponse"];
5888
+ };
5889
+ };
5890
+ /** @description Unauthorized */
5891
+ 401: {
5892
+ headers: {
5893
+ [name: string]: unknown;
5894
+ };
5895
+ content: {
5896
+ "application/json": components["schemas"]["Error"];
5897
+ };
5898
+ };
5899
+ /** @description Insufficient scope */
5900
+ 403: {
5901
+ headers: {
5902
+ [name: string]: unknown;
5903
+ };
5904
+ content: {
5905
+ "application/json": components["schemas"]["Error"];
5906
+ };
5907
+ };
5908
+ /** @description No acceptable representation */
5909
+ 406: {
5910
+ headers: {
5911
+ [name: string]: unknown;
5912
+ };
5913
+ content: {
5914
+ "application/json": components["schemas"]["NegotiationError"];
5915
+ };
5916
+ };
5917
+ /** @description Too Many Requests */
5918
+ 429: {
5919
+ headers: {
5920
+ [name: string]: unknown;
5921
+ };
5922
+ content: {
5923
+ "application/json": components["schemas"]["Error"];
5924
+ };
5925
+ };
5926
+ };
5927
+ };
5928
+ "FountainWeb.ChatGPTSubscriptionController.create_attempt": {
5929
+ parameters: {
5930
+ query?: never;
5931
+ header?: never;
5932
+ path?: never;
5933
+ cookie?: never;
5934
+ };
5935
+ /** @description What to sign in for */
5936
+ requestBody?: {
5937
+ content: {
5938
+ "application/json": components["schemas"]["ChatGPTLinkAttemptCreateRequest"];
5939
+ };
5940
+ };
5941
+ responses: {
5942
+ /** @description Attempt */
5943
+ 201: {
5944
+ headers: {
5945
+ [name: string]: unknown;
5946
+ };
5947
+ content: {
5948
+ "application/json": components["schemas"]["ChatGPTLinkAttemptResponse"];
5949
+ };
5950
+ };
5951
+ /** @description Unauthorized */
5952
+ 401: {
5953
+ headers: {
5954
+ [name: string]: unknown;
5955
+ };
5956
+ content: {
5957
+ "application/json": components["schemas"]["Error"];
5958
+ };
5959
+ };
5960
+ /** @description Insufficient scope, or `chatgpt_owner_ineligible` */
5961
+ 403: {
5962
+ headers: {
5963
+ [name: string]: unknown;
5964
+ };
5965
+ content: {
5966
+ "application/json": components["schemas"]["Error"];
5967
+ };
5968
+ };
5969
+ /** @description `chatgpt_subscriptions_not_enabled`, or no such subscription to reconnect */
5970
+ 404: {
5971
+ headers: {
5972
+ [name: string]: unknown;
5973
+ };
5974
+ content: {
5975
+ "application/json": components["schemas"]["Error"];
5976
+ };
5977
+ };
5978
+ /** @description No acceptable representation */
5979
+ 406: {
5980
+ headers: {
5981
+ [name: string]: unknown;
5982
+ };
5983
+ content: {
5984
+ "application/json": components["schemas"]["NegotiationError"];
5985
+ };
5986
+ };
5987
+ /** @description `chatgpt_grant_limit_reached`, `chatgpt_link_attempts_exceeded` or `chatgpt_link_attempt_pending` */
5988
+ 409: {
5989
+ headers: {
5990
+ [name: string]: unknown;
5991
+ };
5992
+ content: {
5993
+ "application/json": components["schemas"]["Error"];
5994
+ };
5995
+ };
5996
+ /** @description Invalid or duplicate name */
5997
+ 422: {
5998
+ headers: {
5999
+ [name: string]: unknown;
6000
+ };
6001
+ content: {
6002
+ "application/json": components["schemas"]["Error"];
6003
+ };
6004
+ };
6005
+ /** @description `chatgpt_link_attempts_rate_limited`, with `Retry-After` */
6006
+ 429: {
6007
+ headers: {
6008
+ [name: string]: unknown;
6009
+ };
6010
+ content: {
6011
+ "application/json": components["schemas"]["Error"];
6012
+ };
6013
+ };
6014
+ /** @description `chatgpt_auth_unreachable` */
6015
+ 502: {
6016
+ headers: {
6017
+ [name: string]: unknown;
6018
+ };
6019
+ content: {
6020
+ "application/json": components["schemas"]["Error"];
6021
+ };
6022
+ };
6023
+ /** @description `chatgpt_tenant_key_unavailable` */
6024
+ 503: {
6025
+ headers: {
6026
+ [name: string]: unknown;
6027
+ };
6028
+ content: {
6029
+ "application/json": components["schemas"]["Error"];
6030
+ };
6031
+ };
6032
+ };
6033
+ };
6034
+ "FountainWeb.ChatGPTSubscriptionController.show_attempt": {
6035
+ parameters: {
6036
+ query?: never;
6037
+ header?: never;
6038
+ path: {
6039
+ id: string;
6040
+ };
6041
+ cookie?: never;
6042
+ };
6043
+ requestBody?: never;
6044
+ responses: {
6045
+ /** @description Attempt */
6046
+ 200: {
6047
+ headers: {
6048
+ [name: string]: unknown;
6049
+ };
6050
+ content: {
6051
+ "application/json": components["schemas"]["ChatGPTLinkAttemptResponse"];
6052
+ };
6053
+ };
6054
+ /** @description Unauthorized */
6055
+ 401: {
6056
+ headers: {
6057
+ [name: string]: unknown;
6058
+ };
6059
+ content: {
6060
+ "application/json": components["schemas"]["Error"];
6061
+ };
6062
+ };
6063
+ /** @description Insufficient scope */
6064
+ 403: {
6065
+ headers: {
6066
+ [name: string]: unknown;
6067
+ };
6068
+ content: {
6069
+ "application/json": components["schemas"]["Error"];
6070
+ };
6071
+ };
6072
+ /** @description No such attempt */
6073
+ 404: {
6074
+ headers: {
6075
+ [name: string]: unknown;
6076
+ };
6077
+ content: {
6078
+ "application/json": components["schemas"]["Error"];
6079
+ };
6080
+ };
6081
+ /** @description No acceptable representation */
6082
+ 406: {
6083
+ headers: {
6084
+ [name: string]: unknown;
6085
+ };
6086
+ content: {
6087
+ "application/json": components["schemas"]["NegotiationError"];
6088
+ };
6089
+ };
6090
+ /** @description Too Many Requests */
6091
+ 429: {
6092
+ headers: {
6093
+ [name: string]: unknown;
6094
+ };
6095
+ content: {
6096
+ "application/json": components["schemas"]["Error"];
6097
+ };
6098
+ };
6099
+ };
6100
+ };
6101
+ "FountainWeb.ChatGPTSubscriptionController.cancel_attempt": {
6102
+ parameters: {
6103
+ query?: never;
6104
+ header?: never;
6105
+ path: {
6106
+ id: string;
6107
+ };
6108
+ cookie?: never;
6109
+ };
6110
+ requestBody?: never;
6111
+ responses: {
6112
+ /** @description Attempt */
6113
+ 200: {
6114
+ headers: {
6115
+ [name: string]: unknown;
6116
+ };
6117
+ content: {
6118
+ "application/json": components["schemas"]["ChatGPTLinkAttemptResponse"];
6119
+ };
6120
+ };
6121
+ /** @description Unauthorized */
6122
+ 401: {
6123
+ headers: {
6124
+ [name: string]: unknown;
6125
+ };
6126
+ content: {
6127
+ "application/json": components["schemas"]["Error"];
6128
+ };
6129
+ };
6130
+ /** @description Insufficient scope */
6131
+ 403: {
6132
+ headers: {
6133
+ [name: string]: unknown;
6134
+ };
6135
+ content: {
6136
+ "application/json": components["schemas"]["Error"];
6137
+ };
6138
+ };
6139
+ /** @description No such attempt */
6140
+ 404: {
6141
+ headers: {
6142
+ [name: string]: unknown;
6143
+ };
6144
+ content: {
6145
+ "application/json": components["schemas"]["Error"];
6146
+ };
6147
+ };
6148
+ /** @description No acceptable representation */
6149
+ 406: {
6150
+ headers: {
6151
+ [name: string]: unknown;
6152
+ };
6153
+ content: {
6154
+ "application/json": components["schemas"]["NegotiationError"];
6155
+ };
6156
+ };
6157
+ /** @description `chatgpt_link_attempt_not_pending` */
6158
+ 409: {
6159
+ headers: {
6160
+ [name: string]: unknown;
6161
+ };
6162
+ content: {
6163
+ "application/json": components["schemas"]["Error"];
6164
+ };
6165
+ };
6166
+ /** @description Too Many Requests */
6167
+ 429: {
6168
+ headers: {
6169
+ [name: string]: unknown;
6170
+ };
6171
+ content: {
6172
+ "application/json": components["schemas"]["Error"];
6173
+ };
6174
+ };
6175
+ };
6176
+ };
6177
+ "FountainWeb.ChatGPTSubscriptionController.delete": {
6178
+ parameters: {
6179
+ query?: never;
6180
+ header?: never;
6181
+ path: {
6182
+ id: string;
6183
+ };
6184
+ cookie?: never;
6185
+ };
6186
+ requestBody?: never;
6187
+ responses: {
6188
+ /** @description Removed */
6189
+ 204: {
6190
+ headers: {
6191
+ [name: string]: unknown;
6192
+ };
6193
+ content?: never;
6194
+ };
6195
+ /** @description Unauthorized */
6196
+ 401: {
6197
+ headers: {
6198
+ [name: string]: unknown;
6199
+ };
6200
+ content: {
6201
+ "application/json": components["schemas"]["Error"];
6202
+ };
6203
+ };
6204
+ /** @description Insufficient scope */
6205
+ 403: {
6206
+ headers: {
6207
+ [name: string]: unknown;
6208
+ };
6209
+ content: {
6210
+ "application/json": components["schemas"]["Error"];
6211
+ };
6212
+ };
6213
+ /** @description No such subscription */
6214
+ 404: {
6215
+ headers: {
6216
+ [name: string]: unknown;
6217
+ };
6218
+ content: {
6219
+ "application/json": components["schemas"]["Error"];
6220
+ };
6221
+ };
6222
+ /** @description No acceptable representation */
6223
+ 406: {
6224
+ headers: {
6225
+ [name: string]: unknown;
6226
+ };
6227
+ content: {
6228
+ "application/json": components["schemas"]["NegotiationError"];
6229
+ };
6230
+ };
6231
+ /** @description Still connected, or named by sets */
6232
+ 409: {
6233
+ headers: {
6234
+ [name: string]: unknown;
6235
+ };
6236
+ content: {
6237
+ "application/json": components["schemas"]["Error"];
6238
+ };
6239
+ };
6240
+ /** @description Too Many Requests */
6241
+ 429: {
6242
+ headers: {
6243
+ [name: string]: unknown;
6244
+ };
6245
+ content: {
6246
+ "application/json": components["schemas"]["Error"];
6247
+ };
6248
+ };
6249
+ };
6250
+ };
6251
+ "FountainWeb.ChatGPTSubscriptionController.update": {
6252
+ parameters: {
6253
+ query?: never;
6254
+ header?: never;
6255
+ path: {
6256
+ id: string;
6257
+ };
6258
+ cookie?: never;
6259
+ };
6260
+ /** @description New name */
6261
+ requestBody?: {
6262
+ content: {
6263
+ "application/json": components["schemas"]["ChatGPTSubscriptionUpdateRequest"];
6264
+ };
6265
+ };
6266
+ responses: {
6267
+ /** @description Subscription */
6268
+ 200: {
6269
+ headers: {
6270
+ [name: string]: unknown;
6271
+ };
6272
+ content: {
6273
+ "application/json": components["schemas"]["ChatGPTSubscriptionResponse"];
6274
+ };
6275
+ };
6276
+ /** @description Unauthorized */
6277
+ 401: {
6278
+ headers: {
6279
+ [name: string]: unknown;
6280
+ };
6281
+ content: {
6282
+ "application/json": components["schemas"]["Error"];
6283
+ };
6284
+ };
6285
+ /** @description Insufficient scope, or `chatgpt_owner_ineligible` */
6286
+ 403: {
6287
+ headers: {
6288
+ [name: string]: unknown;
6289
+ };
6290
+ content: {
6291
+ "application/json": components["schemas"]["Error"];
6292
+ };
6293
+ };
6294
+ /** @description No such subscription */
6295
+ 404: {
6296
+ headers: {
6297
+ [name: string]: unknown;
6298
+ };
6299
+ content: {
6300
+ "application/json": components["schemas"]["Error"];
6301
+ };
6302
+ };
6303
+ /** @description No acceptable representation */
6304
+ 406: {
6305
+ headers: {
6306
+ [name: string]: unknown;
6307
+ };
6308
+ content: {
6309
+ "application/json": components["schemas"]["NegotiationError"];
6310
+ };
6311
+ };
6312
+ /** @description Invalid or duplicate name */
6313
+ 422: {
6314
+ headers: {
6315
+ [name: string]: unknown;
6316
+ };
6317
+ content: {
6318
+ "application/json": components["schemas"]["Error"];
6319
+ };
6320
+ };
6321
+ /** @description Too Many Requests */
6322
+ 429: {
6323
+ headers: {
6324
+ [name: string]: unknown;
6325
+ };
6326
+ content: {
6327
+ "application/json": components["schemas"]["Error"];
6328
+ };
6329
+ };
6330
+ };
6331
+ };
6332
+ "FountainWeb.ChatGPTSubscriptionController.disconnect": {
6333
+ parameters: {
6334
+ query?: never;
6335
+ header?: never;
6336
+ path: {
6337
+ id: string;
6338
+ };
6339
+ cookie?: never;
6340
+ };
6341
+ requestBody?: never;
6342
+ responses: {
6343
+ /** @description Subscription */
6344
+ 200: {
6345
+ headers: {
6346
+ [name: string]: unknown;
6347
+ };
6348
+ content: {
6349
+ "application/json": components["schemas"]["ChatGPTSubscriptionResponse"];
6350
+ };
6351
+ };
6352
+ /** @description Unauthorized */
6353
+ 401: {
6354
+ headers: {
6355
+ [name: string]: unknown;
6356
+ };
6357
+ content: {
6358
+ "application/json": components["schemas"]["Error"];
6359
+ };
6360
+ };
6361
+ /** @description Insufficient scope */
6362
+ 403: {
6363
+ headers: {
6364
+ [name: string]: unknown;
6365
+ };
6366
+ content: {
6367
+ "application/json": components["schemas"]["Error"];
6368
+ };
6369
+ };
6370
+ /** @description No such subscription */
6371
+ 404: {
6372
+ headers: {
6373
+ [name: string]: unknown;
6374
+ };
6375
+ content: {
6376
+ "application/json": components["schemas"]["Error"];
6377
+ };
6378
+ };
6379
+ /** @description No acceptable representation */
6380
+ 406: {
6381
+ headers: {
6382
+ [name: string]: unknown;
6383
+ };
6384
+ content: {
6385
+ "application/json": components["schemas"]["NegotiationError"];
6386
+ };
6387
+ };
6388
+ /** @description Too Many Requests */
6389
+ 429: {
6390
+ headers: {
6391
+ [name: string]: unknown;
6392
+ };
6393
+ content: {
6394
+ "application/json": components["schemas"]["Error"];
6395
+ };
6396
+ };
6397
+ };
6398
+ };
5499
6399
  "FountainWeb.AccountDataController.index_exports": {
5500
6400
  parameters: {
5501
6401
  query?: never;
@@ -11063,6 +11963,8 @@ export interface operations {
11063
11963
  limit?: number;
11064
11964
  /** @description Add `blocks` to each event: its `data` parsed server-side into the structured blocks a transcript renders (text, thinking, tool_use, tool_result, init, result, error, raw) — the same parse the web UI uses, so no client re-implements a runtime's dialect. Defaults to false. */
11065
11965
  blocks?: boolean;
11966
+ /** @description With `blocks=true`, fill each turn's `turn`/`started` stage event — whose `blocks` is otherwise always `[]` — with one `prompt` block carrying the prompt that opened that turn. Without it the feed holds only what the runtime wrote, so a client replaying a conversation renders it as a monologue in the agent's voice. No event is added, removed or reordered, so `meta.next_cursor`, `has_more` and the page size are unchanged. A turn whose `origin` is `autonomous` gets no block: nobody typed it. Note that `streams=acp` excludes stage events, and so excludes these prompts with them. Ignored without `blocks=true`. Defaults to false. */
11967
+ prompts?: boolean;
11066
11968
  };
11067
11969
  header?: never;
11068
11970
  path: {
@@ -11380,7 +12282,7 @@ export interface operations {
11380
12282
  "application/json": components["schemas"]["NegotiationError"];
11381
12283
  };
11382
12284
  };
11383
- /** @description Sandbox is being reset */
12285
+ /** @description Sandbox is being reset or deleted */
11384
12286
  409: {
11385
12287
  headers: {
11386
12288
  [name: string]: unknown;
@@ -14044,7 +14946,7 @@ export interface operations {
14044
14946
  "application/json": components["schemas"]["Error"];
14045
14947
  };
14046
14948
  };
14047
- /** @description Sandbox provider unreachable */
14949
+ /** @description Sandbox provider unreachable, or the sandbox is being parked or destroyed (`sandbox_unavailable`, with `Retry-After`) */
14048
14950
  503: {
14049
14951
  headers: {
14050
14952
  [name: string]: unknown;
@@ -14143,7 +15045,7 @@ export interface operations {
14143
15045
  "application/json": components["schemas"]["Error"];
14144
15046
  };
14145
15047
  };
14146
- /** @description Sandbox provider unreachable */
15048
+ /** @description Sandbox provider unreachable, or the sandbox is being parked or destroyed (`sandbox_unavailable`, with `Retry-After`) */
14147
15049
  503: {
14148
15050
  headers: {
14149
15051
  [name: string]: unknown;
@@ -14240,7 +15142,7 @@ export interface operations {
14240
15142
  "application/json": components["schemas"]["Error"];
14241
15143
  };
14242
15144
  };
14243
- /** @description Sandbox provider unreachable */
15145
+ /** @description Sandbox provider unreachable, or the sandbox is being parked or destroyed (`sandbox_unavailable`, with `Retry-After`) */
14244
15146
  503: {
14245
15147
  headers: {
14246
15148
  [name: string]: unknown;
@@ -14339,7 +15241,7 @@ export interface operations {
14339
15241
  "application/json": components["schemas"]["Error"];
14340
15242
  };
14341
15243
  };
14342
- /** @description Sandbox provider unreachable */
15244
+ /** @description Sandbox provider unreachable, or the sandbox is being parked or destroyed (`sandbox_unavailable`, with `Retry-After`) */
14343
15245
  503: {
14344
15246
  headers: {
14345
15247
  [name: string]: unknown;
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.1.0";
18
+ export declare const USER_AGENT = "fountain-sdk-js/6.2.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.1.0";
8
+ export const USER_AGENT = "fountain-sdk-js/6.2.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.1.0",
3
+ "version": "6.2.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": {