@managoat/fountain-sdk 5.2.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -11,6 +11,20 @@ server releases.
11
11
 
12
12
  ---
13
13
 
14
+ ## [6.0.0] - 2026-09-15
15
+
16
+ ### Removed
17
+
18
+ - The generated types for the retired OpenAI-compatible and AG-UI surfaces: `components["schemas"]["ChatCompletion"]`, `["ChatCompletionRequest"]`, `["Model"]`, `["OpenAIError"]` and `["RunAgentInput"]`, with the `POST /v1/chat/completions`, `GET /v1/models`, `GET /v1/models/{model}` and `POST /api/agui/{agent_id}` entries of `paths` and `operations`. The server no longer serves those routes (ADR 0057, #2252).
19
+
20
+ Major because `schemas.ts` re-exports `components` and `paths`, so the keys were part of the published type surface even though no hand-written client method used them. No runtime export, method or option changed, and nothing in this release alters a call the SDK makes: code that does not name those keys compiles and runs unchanged.
21
+
22
+ ## [5.2.1] - 2026-09-15
23
+
24
+ ### Fixed
25
+
26
+ - Share conversation launch handling between the request API and the convenience helper. New channels follow turn one; resumed channels submit the prompt and images once before following the next turn (#2250).
27
+
14
28
  ## [5.2.0] - 2026-09-15
15
29
 
16
30
  ### Added
package/dist/client.d.ts CHANGED
@@ -96,6 +96,7 @@ export declare class Fountain {
96
96
  * options. For a promptless or queued creation, use api.request instead.
97
97
  */
98
98
  runRequest(request: ConversationInput, options?: RunOptions): Run;
99
+ private startConversation;
99
100
  /**
100
101
  * Pick a conversation back up. The sandbox is still there and so is the
101
102
  * agent's session — `send` costs one prompt, not a re-explanation.
package/dist/client.js CHANGED
@@ -90,11 +90,7 @@ export class Fountain {
90
90
  body.sandbox_id = config.sandbox;
91
91
  if (config.sandboxMode)
92
92
  body.sandbox_mode = config.sandboxMode;
93
- const conversation = await this.api.data("POST", "/api/conversations", { body });
94
- // `channel_id` may have resumed an existing conversation, in which
95
- // case this prompt is not turn 1. Ask, rather than assume.
96
- const turnNumber = config.channelId ? await this.nextTurnNumber(conversation.id) : 1;
97
- return { conversation, turnNumber, after: 0 };
93
+ return this.startConversation(body);
98
94
  },
99
95
  }, options);
100
96
  }
@@ -111,26 +107,28 @@ export class Fountain {
111
107
  throw new TypeError("runRequest does not support queued creation; use api.request");
112
108
  }
113
109
  const body = { ...request };
114
- return new Run(this.api, {
115
- start: async () => {
116
- const response = await this.api.request("POST", "/api/conversations", { body });
117
- const conversation = response.data;
118
- if (response.meta?.resumed === true) {
119
- // Resume only binds the channel; it does not submit the launch prompt.
120
- // Capture history before sending, so fast turns cannot be skipped.
121
- const after = await this.resume(conversation.id).cursor();
122
- const turnNumber = await this.nextTurnNumber(conversation.id);
123
- const promptBody = { prompt: body.prompt };
124
- if (body.images !== undefined)
125
- promptBody.images = body.images;
126
- await this.api.request("POST", `/api/conversations/${conversation.id}/prompts`, {
127
- body: promptBody,
128
- });
129
- return { conversation, turnNumber, after };
130
- }
131
- return { conversation, turnNumber: 1, after: 0 };
132
- },
133
- }, options);
110
+ return new Run(this.api, { start: () => this.startConversation(body) }, options);
111
+ }
112
+ async startConversation(body) {
113
+ const response = await this.api.request("POST", "/api/conversations", { body });
114
+ const conversation = response.data;
115
+ if (response.meta?.resumed === true) {
116
+ // Resume only binds the channel; it does not submit the launch prompt.
117
+ // Capture history before sending, so fast turns cannot be skipped.
118
+ const hasPrompt = typeof body.prompt === "string" && body.prompt.length > 0;
119
+ const after = hasPrompt ? await this.resume(conversation.id).cursor() : 0;
120
+ const turnNumber = await this.nextTurnNumber(conversation.id);
121
+ const promptBody = { prompt: body.prompt };
122
+ if (body.images !== undefined)
123
+ promptBody.images = body.images;
124
+ if (hasPrompt) {
125
+ await this.api.request("POST", `/api/conversations/${conversation.id}/prompts`, {
126
+ body: promptBody,
127
+ });
128
+ }
129
+ return { conversation, turnNumber, after };
130
+ }
131
+ return { conversation, turnNumber: 1, after: 0 };
134
132
  }
135
133
  /**
136
134
  * Pick a conversation back up. The sandbox is still there and so is the
@@ -1 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,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"}
@@ -592,30 +592,6 @@ export interface paths {
592
592
  patch?: never;
593
593
  trace?: never;
594
594
  };
595
- "/api/agui/{agent_id}": {
596
- parameters: {
597
- query?: never;
598
- header?: never;
599
- path?: never;
600
- cookie?: never;
601
- };
602
- get?: never;
603
- put?: never;
604
- /**
605
- * Run an agent over AG-UI (SSE)
606
- * @description Answers a `RunAgentInput` with the AG-UI event stream: `RUN_STARTED`, the turn's output as `TEXT_MESSAGE_*` and `THINKING_*` events, then `RUN_FINISHED` or `RUN_ERROR`. Each SSE message is `data: {"type": ...}`, as the reference encoder writes it.
607
- *
608
- * `threadId` binds to a conversation (`agui:<threadId>`): the first run opens one, later runs prompt it. Only the newest user message is sent — the agent's memory lives in its sandbox, not in the replayed transcript.
609
- *
610
- * Errors before the stream opens are ordinary JSON responses (404 for an unknown agent, 402 with no credit); once it is open, failure arrives as `RUN_ERROR`.
611
- */
612
- post: operations["FountainWeb.AguiController.run"];
613
- delete?: never;
614
- options?: never;
615
- head?: never;
616
- patch?: never;
617
- trace?: never;
618
- };
619
595
  "/api/apply": {
620
596
  parameters: {
621
597
  query?: never;
@@ -2519,73 +2495,6 @@ export interface paths {
2519
2495
  patch?: never;
2520
2496
  trace?: never;
2521
2497
  };
2522
- "/v1/chat/completions": {
2523
- parameters: {
2524
- query?: never;
2525
- header?: never;
2526
- path?: never;
2527
- cookie?: never;
2528
- };
2529
- get?: never;
2530
- put?: never;
2531
- /**
2532
- * Chat completions, where the model is an agent (alpha)
2533
- * @description **Alpha, behind the `openai_compat` flag** — 404 with code `openai_compat_not_enabled` when it is off for the account.
2534
- *
2535
- * OpenAI's `POST /v1/chat/completions`, answered by a Fountain agent. Point any gateway or base-URL chat client at `/v1` with an API key as the bearer token.
2536
- *
2537
- * The thread is the conversation: `X-Fountain-Thread` (else `user`, else `safety_identifier`) binds to channel `openai:<key>`. The first request on a key opens a conversation, later ones prompt it, and only the newest user message is sent — the agent's memory lives in its sandbox, not in the replayed transcript. A request with none is refused with 400.
2538
- *
2539
- * `stream: true` answers with SSE `chat.completion.chunk` events (`content` for the reply, `reasoning_content` for thinking, tool use and provisioning stages) and `data: [DONE]`; a turn that fails mid-stream sends an `error` event first. `stream: false` blocks until the turn ends.
2540
- *
2541
- * **Tools.** A request's `tools` are offered to the agent beside its own. When the agent calls one, the completion ends with `finish_reason: "tool_calls"` and the turn stays open; send the next request on the same thread with `role: "tool"` messages that carry the results, and the rest of the turn streams. The sandbox's own tools never come back as tool calls.
2542
- *
2543
- * Errors use OpenAI's `{"error": {...}}` envelope: 404 for an unknown model, 402 with no credit, 409 with `Retry-After` while the thread is already running a turn (`thread_busy`) or waiting on tool results (`tool_calls_pending`).
2544
- */
2545
- post: operations["FountainWeb.OpenAIController.create_chat_completion"];
2546
- delete?: never;
2547
- options?: never;
2548
- head?: never;
2549
- patch?: never;
2550
- trace?: never;
2551
- };
2552
- "/v1/models": {
2553
- parameters: {
2554
- query?: never;
2555
- header?: never;
2556
- path?: never;
2557
- cookie?: never;
2558
- };
2559
- /**
2560
- * The tenant's agents, as models (alpha)
2561
- * @description OpenAI's `GET /v1/models`, so a base-URL client's model picker fills itself. Each agent is a model whose `id` is the agent's name.
2562
- */
2563
- get: operations["FountainWeb.OpenAIController.list_models"];
2564
- put?: never;
2565
- post?: never;
2566
- delete?: never;
2567
- options?: never;
2568
- head?: never;
2569
- patch?: never;
2570
- trace?: never;
2571
- };
2572
- "/v1/models/{model}": {
2573
- parameters: {
2574
- query?: never;
2575
- header?: never;
2576
- path?: never;
2577
- cookie?: never;
2578
- };
2579
- /** One agent, as a model (alpha) */
2580
- get: operations["FountainWeb.OpenAIController.show_model"];
2581
- put?: never;
2582
- post?: never;
2583
- delete?: never;
2584
- options?: never;
2585
- head?: never;
2586
- patch?: never;
2587
- trace?: never;
2588
- };
2589
2498
  }
2590
2499
  export type webhooks = Record<string, never>;
2591
2500
  export interface components {
@@ -3369,64 +3278,6 @@ export interface components {
3369
3278
  [key: string]: string[];
3370
3279
  };
3371
3280
  };
3372
- /** ChatCompletion */
3373
- ChatCompletion: {
3374
- choices?: {
3375
- /** @enum {string} */
3376
- finish_reason?: "stop" | "tool_calls";
3377
- index?: number;
3378
- message?: {
3379
- content?: string;
3380
- /** @description Thinking, tool use and lifecycle stages, if any. */
3381
- reasoning_content?: string;
3382
- /** @enum {string} */
3383
- role?: "assistant";
3384
- /** @description The caller-defined tools the agent is waiting on, when `finish_reason` is `tool_calls`. */
3385
- tool_calls?: Record<string, never>[];
3386
- };
3387
- }[];
3388
- created?: number;
3389
- /** @description Where the turn ran, for a caller that wants the real API next. */
3390
- fountain?: {
3391
- conversation_id?: string;
3392
- thread?: string;
3393
- turn_id?: string | null;
3394
- };
3395
- id?: string;
3396
- /** @description The agent's name. */
3397
- model?: string;
3398
- /** @enum {string} */
3399
- object?: "chat.completion";
3400
- /** @description Always zeros: a turn is billed in seconds, not tokens. */
3401
- usage?: {
3402
- completion_tokens?: number;
3403
- prompt_tokens?: number;
3404
- total_tokens?: number;
3405
- };
3406
- };
3407
- /**
3408
- * ChatCompletionRequest
3409
- * @description The OpenAI chat-completions request. `model`, `messages`, `stream`, `user`, `safety_identifier`, `tools` and `tool_choice` are read; sampling parameters, `n`, `response_format` and the rest are accepted and ignored, because the thing behind the URL is an agent, not a model.
3410
- */
3411
- ChatCompletionRequest: {
3412
- /** @description The chat so far. The newest `user` message becomes the prompt (its `image_url` parts must be `data:` URLs); `system`/`developer` messages become the standing role of a new conversation and are ignored afterwards. When the newest messages are `role: "tool"`, they answer the `tool_calls` the previous completion ended with and the turn resumes. */
3413
- messages: Record<string, never>[];
3414
- /** @description A Fountain agent: its name or its id. Unknown → 404. */
3415
- model: string;
3416
- /** @description The thread key when neither `X-Fountain-Thread` nor `user` is set. An OpenAI safety identifier field supported by LiteLLM. */
3417
- safety_identifier?: string;
3418
- /**
3419
- * @description `true` streams `chat.completion.chunk` events as SSE, ending with `data: [DONE]`.
3420
- * @default false
3421
- */
3422
- stream: boolean;
3423
- /** @description `auto` (default) or `none` (register nothing for this request). `required` and a named tool are refused with 400: Fountain cannot force an agent's next action. */
3424
- tool_choice?: string;
3425
- /** @description Caller-defined function tools, in OpenAI's shape. The agent sees them beside its own; when it calls one the completion ends with `finish_reason: "tool_calls"` and the turn waits for the `role: "tool"` answer on the next request. */
3426
- tools?: Record<string, never>[];
3427
- /** @description The thread key when `X-Fountain-Thread` is not set. */
3428
- user?: string;
3429
- };
3430
3281
  /**
3431
3282
  * ClaimableUser
3432
3283
  * @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.
@@ -4212,20 +4063,6 @@ export interface components {
4212
4063
  MessageResponse: {
4213
4064
  message: string;
4214
4065
  };
4215
- /** Model */
4216
- Model: {
4217
- created?: number;
4218
- fountain?: {
4219
- agent_id?: string;
4220
- model?: string | null;
4221
- runtime?: string;
4222
- };
4223
- /** @description The agent's name. */
4224
- id?: string;
4225
- /** @enum {string} */
4226
- object?: "model";
4227
- owned_by?: string;
4228
- };
4229
4066
  /** NegotiationError */
4230
4067
  NegotiationError: {
4231
4068
  errors: {
@@ -4311,15 +4148,6 @@ export interface components {
4311
4148
  completed_at?: string | null;
4312
4149
  };
4313
4150
  };
4314
- /** OpenAIError */
4315
- OpenAIError: {
4316
- error?: {
4317
- code?: string | null;
4318
- message?: string;
4319
- param?: string | null;
4320
- type?: string;
4321
- };
4322
- };
4323
4151
  /** PasswordChangeRequest */
4324
4152
  PasswordChangeRequest: {
4325
4153
  /** Format: password */
@@ -4435,23 +4263,6 @@ export interface components {
4435
4263
  /** Format: uri */
4436
4264
  url: string;
4437
4265
  };
4438
- /**
4439
- * RunAgentInput
4440
- * @description The AG-UI run envelope, as the protocol defines it. Extra fields are accepted and ignored: only `threadId`, `runId`, `messages` and `tools` are read.
4441
- */
4442
- RunAgentInput: {
4443
- context?: Record<string, never>[];
4444
- forwardedProps?: Record<string, never>;
4445
- /** @description The thread so far. The newest `user` message becomes the prompt; `system`/`developer` messages become the standing role of a new conversation. */
4446
- messages: Record<string, never>[];
4447
- /** @description This run. Echoed in the events. */
4448
- runId: string;
4449
- state?: Record<string, never>;
4450
- /** @description The host's thread. Bound to one Fountain conversation as `agui:<threadId>`. */
4451
- threadId: string;
4452
- /** @description The host's tools (`name`, `description`, `parameters`). Offered to the agent beside its own; a call comes back as `TOOL_CALL_*` events and the run ends, and the next run's `role: "tool"` messages answer it. */
4453
- tools?: Record<string, never>[];
4454
- };
4455
4266
  /**
4456
4267
  * Runner
4457
4268
  * @description A self-hosted runner: a machine of yours running `fountain runner`, serving sandboxes for the `runner` provider (ADR 0022). `online` is live — whether the daemon holds a connection right now.
@@ -8362,112 +8173,6 @@ export interface operations {
8362
8173
  };
8363
8174
  };
8364
8175
  };
8365
- "FountainWeb.AguiController.run": {
8366
- parameters: {
8367
- query?: {
8368
- /** @description `off` streams the reply text only. Default `thinking`: tool use and lifecycle stages are relayed as AG-UI thinking events too, which is also what keeps a host's stall watchdog fed while a sandbox provisions. */
8369
- activity?: string;
8370
- };
8371
- header?: never;
8372
- path: {
8373
- /** @description The agent to run. */
8374
- agent_id: string;
8375
- };
8376
- cookie?: never;
8377
- };
8378
- /** @description AG-UI run input */
8379
- requestBody?: {
8380
- content: {
8381
- "application/json": {
8382
- context?: Record<string, never>[];
8383
- forwardedProps?: Record<string, never>;
8384
- /** @description The thread so far. The newest `user` message becomes the prompt; `system`/`developer` messages become the standing role of a new conversation. */
8385
- messages: Record<string, never>[];
8386
- /** @description This run. Echoed in the events. */
8387
- runId: string;
8388
- state?: Record<string, never>;
8389
- /** @description The host's thread. Bound to one Fountain conversation as `agui:<threadId>`. */
8390
- threadId: string;
8391
- /** @description The host's tools (`name`, `description`, `parameters`). Offered to the agent beside its own; a call comes back as `TOOL_CALL_*` events and the run ends, and the next run's `role: "tool"` messages answer it. */
8392
- tools?: Record<string, never>[];
8393
- };
8394
- };
8395
- };
8396
- responses: {
8397
- /** @description AG-UI event stream */
8398
- 200: {
8399
- headers: {
8400
- [name: string]: unknown;
8401
- };
8402
- content: {
8403
- "text/event-stream": string;
8404
- };
8405
- };
8406
- /** @description Malformed run input */
8407
- 400: {
8408
- headers: {
8409
- [name: string]: unknown;
8410
- };
8411
- content: {
8412
- "application/json": components["schemas"]["Error"];
8413
- };
8414
- };
8415
- /** @description Unauthorized */
8416
- 401: {
8417
- headers: {
8418
- [name: string]: unknown;
8419
- };
8420
- content: {
8421
- "application/json": components["schemas"]["Error"];
8422
- };
8423
- };
8424
- /** @description Forbidden */
8425
- 403: {
8426
- headers: {
8427
- [name: string]: unknown;
8428
- };
8429
- content: {
8430
- "application/json": components["schemas"]["Error"];
8431
- };
8432
- };
8433
- /** @description No such agent */
8434
- 404: {
8435
- headers: {
8436
- [name: string]: unknown;
8437
- };
8438
- content: {
8439
- "application/json": components["schemas"]["Error"];
8440
- };
8441
- };
8442
- /** @description Conflicting state */
8443
- 409: {
8444
- headers: {
8445
- [name: string]: unknown;
8446
- };
8447
- content: {
8448
- "application/json": components["schemas"]["Error"];
8449
- };
8450
- };
8451
- /** @description Saved execution policy refused */
8452
- 422: {
8453
- headers: {
8454
- [name: string]: unknown;
8455
- };
8456
- content: {
8457
- "application/json": components["schemas"]["Error"];
8458
- };
8459
- };
8460
- /** @description Too Many Requests */
8461
- 429: {
8462
- headers: {
8463
- [name: string]: unknown;
8464
- };
8465
- content: {
8466
- "application/json": components["schemas"]["Error"];
8467
- };
8468
- };
8469
- };
8470
- };
8471
8176
  "FountainWeb.ApplyController.create": {
8472
8177
  parameters: {
8473
8178
  query?: never;
@@ -17798,347 +17503,4 @@ export interface operations {
17798
17503
  };
17799
17504
  };
17800
17505
  };
17801
- "FountainWeb.OpenAIController.create_chat_completion": {
17802
- parameters: {
17803
- query?: never;
17804
- header?: {
17805
- /** @description The thread key. Overrides `user` and `safety_identifier`. */
17806
- "x-fountain-thread"?: string;
17807
- };
17808
- path?: never;
17809
- cookie?: never;
17810
- };
17811
- /** @description Chat-completions request */
17812
- requestBody?: {
17813
- content: {
17814
- "application/json": {
17815
- /** @description The chat so far. The newest `user` message becomes the prompt (its `image_url` parts must be `data:` URLs); `system`/`developer` messages become the standing role of a new conversation and are ignored afterwards. When the newest messages are `role: "tool"`, they answer the `tool_calls` the previous completion ended with and the turn resumes. */
17816
- messages: Record<string, never>[];
17817
- /** @description A Fountain agent: its name or its id. Unknown → 404. */
17818
- model: string;
17819
- /** @description The thread key when neither `X-Fountain-Thread` nor `user` is set. An OpenAI safety identifier field supported by LiteLLM. */
17820
- safety_identifier?: string;
17821
- /**
17822
- * @description `true` streams `chat.completion.chunk` events as SSE, ending with `data: [DONE]`.
17823
- * @default false
17824
- */
17825
- stream?: boolean;
17826
- /** @description `auto` (default) or `none` (register nothing for this request). `required` and a named tool are refused with 400: Fountain cannot force an agent's next action. */
17827
- tool_choice?: string;
17828
- /** @description Caller-defined function tools, in OpenAI's shape. The agent sees them beside its own; when it calls one the completion ends with `finish_reason: "tool_calls"` and the turn waits for the `role: "tool"` answer on the next request. */
17829
- tools?: Record<string, never>[];
17830
- /** @description The thread key when `X-Fountain-Thread` is not set. */
17831
- user?: string;
17832
- };
17833
- };
17834
- };
17835
- responses: {
17836
- /** @description The completion (or, with `stream: true`, its SSE stream) */
17837
- 200: {
17838
- headers: {
17839
- [name: string]: unknown;
17840
- };
17841
- content: {
17842
- "application/json": {
17843
- choices?: {
17844
- /** @enum {string} */
17845
- finish_reason?: "stop" | "tool_calls";
17846
- index?: number;
17847
- message?: {
17848
- content?: string;
17849
- /** @description Thinking, tool use and lifecycle stages, if any. */
17850
- reasoning_content?: string;
17851
- /** @enum {string} */
17852
- role?: "assistant";
17853
- /** @description The caller-defined tools the agent is waiting on, when `finish_reason` is `tool_calls`. */
17854
- tool_calls?: Record<string, never>[];
17855
- };
17856
- }[];
17857
- created?: number;
17858
- /** @description Where the turn ran, for a caller that wants the real API next. */
17859
- fountain?: {
17860
- conversation_id?: string;
17861
- thread?: string;
17862
- turn_id?: string | null;
17863
- };
17864
- id?: string;
17865
- /** @description The agent's name. */
17866
- model?: string;
17867
- /** @enum {string} */
17868
- object?: "chat.completion";
17869
- /** @description Always zeros: a turn is billed in seconds, not tokens. */
17870
- usage?: {
17871
- completion_tokens?: number;
17872
- prompt_tokens?: number;
17873
- total_tokens?: number;
17874
- };
17875
- };
17876
- };
17877
- };
17878
- /** @description No thread key, or no user message */
17879
- 400: {
17880
- headers: {
17881
- [name: string]: unknown;
17882
- };
17883
- content: {
17884
- "application/json": {
17885
- error?: {
17886
- code?: string | null;
17887
- message?: string;
17888
- param?: string | null;
17889
- type?: string;
17890
- };
17891
- };
17892
- };
17893
- };
17894
- /** @description Unauthorized */
17895
- 401: {
17896
- headers: {
17897
- [name: string]: unknown;
17898
- };
17899
- content: {
17900
- "application/json": components["schemas"]["Error"];
17901
- };
17902
- };
17903
- /** @description Forbidden */
17904
- 403: {
17905
- headers: {
17906
- [name: string]: unknown;
17907
- };
17908
- content: {
17909
- "application/json": components["schemas"]["Error"];
17910
- };
17911
- };
17912
- /** @description No such model (agent) */
17913
- 404: {
17914
- headers: {
17915
- [name: string]: unknown;
17916
- };
17917
- content: {
17918
- "application/json": {
17919
- error?: {
17920
- code?: string | null;
17921
- message?: string;
17922
- param?: string | null;
17923
- type?: string;
17924
- };
17925
- };
17926
- };
17927
- };
17928
- /** @description The thread is running a turn; retry */
17929
- 409: {
17930
- headers: {
17931
- [name: string]: unknown;
17932
- };
17933
- content: {
17934
- "application/json": {
17935
- error?: {
17936
- code?: string | null;
17937
- message?: string;
17938
- param?: string | null;
17939
- type?: string;
17940
- };
17941
- };
17942
- };
17943
- };
17944
- /** @description Saved execution policy refused */
17945
- 422: {
17946
- headers: {
17947
- [name: string]: unknown;
17948
- };
17949
- content: {
17950
- "application/json": {
17951
- error?: {
17952
- code?: string | null;
17953
- message?: string;
17954
- param?: string | null;
17955
- type?: string;
17956
- };
17957
- };
17958
- };
17959
- };
17960
- /** @description Too Many Requests */
17961
- 429: {
17962
- headers: {
17963
- [name: string]: unknown;
17964
- };
17965
- content: {
17966
- "application/json": components["schemas"]["Error"];
17967
- };
17968
- };
17969
- /** @description Internal error */
17970
- 500: {
17971
- headers: {
17972
- [name: string]: unknown;
17973
- };
17974
- content: {
17975
- "application/json": {
17976
- error?: {
17977
- code?: string | null;
17978
- message?: string;
17979
- param?: string | null;
17980
- type?: string;
17981
- };
17982
- };
17983
- };
17984
- };
17985
- };
17986
- };
17987
- "FountainWeb.OpenAIController.list_models": {
17988
- parameters: {
17989
- query?: never;
17990
- header?: never;
17991
- path?: never;
17992
- cookie?: never;
17993
- };
17994
- requestBody?: never;
17995
- responses: {
17996
- /** @description Model list */
17997
- 200: {
17998
- headers: {
17999
- [name: string]: unknown;
18000
- };
18001
- content: {
18002
- "application/json": {
18003
- data?: {
18004
- created?: number;
18005
- fountain?: {
18006
- agent_id?: string;
18007
- model?: string | null;
18008
- runtime?: string;
18009
- };
18010
- /** @description The agent's name. */
18011
- id?: string;
18012
- /** @enum {string} */
18013
- object?: "model";
18014
- owned_by?: string;
18015
- }[];
18016
- /** @enum {string} */
18017
- object?: "list";
18018
- };
18019
- };
18020
- };
18021
- /** @description Unauthorized */
18022
- 401: {
18023
- headers: {
18024
- [name: string]: unknown;
18025
- };
18026
- content: {
18027
- "application/json": components["schemas"]["Error"];
18028
- };
18029
- };
18030
- /** @description Forbidden */
18031
- 403: {
18032
- headers: {
18033
- [name: string]: unknown;
18034
- };
18035
- content: {
18036
- "application/json": components["schemas"]["Error"];
18037
- };
18038
- };
18039
- /** @description Not found */
18040
- 404: {
18041
- headers: {
18042
- [name: string]: unknown;
18043
- };
18044
- content: {
18045
- "application/json": {
18046
- error?: {
18047
- code?: string | null;
18048
- message?: string;
18049
- param?: string | null;
18050
- type?: string;
18051
- };
18052
- };
18053
- };
18054
- };
18055
- /** @description Too Many Requests */
18056
- 429: {
18057
- headers: {
18058
- [name: string]: unknown;
18059
- };
18060
- content: {
18061
- "application/json": components["schemas"]["Error"];
18062
- };
18063
- };
18064
- };
18065
- };
18066
- "FountainWeb.OpenAIController.show_model": {
18067
- parameters: {
18068
- query?: never;
18069
- header?: never;
18070
- path: {
18071
- /** @description Agent name or id. */
18072
- model: string;
18073
- };
18074
- cookie?: never;
18075
- };
18076
- requestBody?: never;
18077
- responses: {
18078
- /** @description The model */
18079
- 200: {
18080
- headers: {
18081
- [name: string]: unknown;
18082
- };
18083
- content: {
18084
- "application/json": {
18085
- created?: number;
18086
- fountain?: {
18087
- agent_id?: string;
18088
- model?: string | null;
18089
- runtime?: string;
18090
- };
18091
- /** @description The agent's name. */
18092
- id?: string;
18093
- /** @enum {string} */
18094
- object?: "model";
18095
- owned_by?: string;
18096
- };
18097
- };
18098
- };
18099
- /** @description Unauthorized */
18100
- 401: {
18101
- headers: {
18102
- [name: string]: unknown;
18103
- };
18104
- content: {
18105
- "application/json": components["schemas"]["Error"];
18106
- };
18107
- };
18108
- /** @description Forbidden */
18109
- 403: {
18110
- headers: {
18111
- [name: string]: unknown;
18112
- };
18113
- content: {
18114
- "application/json": components["schemas"]["Error"];
18115
- };
18116
- };
18117
- /** @description No such model (agent) */
18118
- 404: {
18119
- headers: {
18120
- [name: string]: unknown;
18121
- };
18122
- content: {
18123
- "application/json": {
18124
- error?: {
18125
- code?: string | null;
18126
- message?: string;
18127
- param?: string | null;
18128
- type?: string;
18129
- };
18130
- };
18131
- };
18132
- };
18133
- /** @description Too Many Requests */
18134
- 429: {
18135
- headers: {
18136
- [name: string]: unknown;
18137
- };
18138
- content: {
18139
- "application/json": components["schemas"]["Error"];
18140
- };
18141
- };
18142
- };
18143
- };
18144
17506
  }
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/5.2.0";
18
+ export declare const USER_AGENT = "fountain-sdk-js/6.0.0";
19
19
  export declare class HttpClient {
20
20
  readonly config: ResolvedConfig;
21
21
  private readonly fetchImpl;
package/dist/http.js CHANGED
@@ -5,7 +5,7 @@ import { AuthError, ConnectionError, FountainError, errorForStatus } from "./err
5
5
  * this string is already what Fountain's request logs are keyed on. The
6
6
  * version half is asserted against `package.json` by a test.
7
7
  */
8
- export const USER_AGENT = "fountain-sdk-js/5.2.0";
8
+ export const USER_AGENT = "fountain-sdk-js/6.0.0";
9
9
  /**
10
10
  * The thin layer everything else is built on: one bearer token, JSON in and
11
11
  * out, and errors that say which call failed. `Fountain#api` exposes it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managoat/fountain-sdk",
3
- "version": "5.2.0",
3
+ "version": "6.0.0",
4
4
  "description": "Run a coding agent on a real computer, with your repos and your credentials, in one call.",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {