@managoat/fountain-sdk 5.0.0 → 5.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,31 @@ server releases.
11
11
 
12
12
  ---
13
13
 
14
+ ## [5.2.0] - 2026-09-15
15
+
16
+ ### Added
17
+
18
+ - `runRequest(request, options)` forwards API-shaped conversation inputs, with generated `ConversationInput` types and separate local run options (#2228).
19
+
20
+ ## [5.1.0] — 2026-09-14
21
+
22
+ ### Added
23
+
24
+ - `components["schemas"]["PermissionPolicy"]`. The permission-policy object was
25
+ declared inline in five server schemas; it is now one named component that
26
+ all five reference, so the generated type has a name instead of being
27
+ repeated as an anonymous intersection. The named type includes `null`, which
28
+ is what a policy-less agent or conversation carries.
29
+
30
+ ### Changed
31
+
32
+ - `permission_policy` on `Agent`, `AgentRequest`, `AgentUpdate`, `Conversation`
33
+ and `ConversationCreateRequest` is typed as
34
+ `components["schemas"]["PermissionPolicy"] | null`. It resolves to exactly
35
+ the type 5.0.0 had, so this is a rename and not a new shape: TypeScript is
36
+ structurally typed and existing code keeps compiling. Code that wrote the old
37
+ anonymous type out by hand can use the named one instead.
38
+
14
39
  ## [5.0.0] — 2026-09-14
15
40
 
16
41
  ### Breaking changes
package/README.md CHANGED
@@ -456,3 +456,29 @@ release containing the credit-only server contract (`c3349343`).
456
456
  `insufficient_credits` and a generic HTTP 402 identify the credit gate.
457
457
  `subscription_required` has no special mapping; it follows the HTTP status.
458
458
  The response still exposes its original code and purchase URL.
459
+
460
+ ### API-shaped launches
461
+
462
+ Use `client.runRequest(request, options)` to send any conversation creation
463
+ field using its API name. `ConversationInput` is derived from OpenAPI; new
464
+ fields require regeneration, not a new helper option.
465
+
466
+ ```ts
467
+ await client.runRequest({
468
+ agent_id: agent.id,
469
+ prompt: "Review the repository",
470
+ labels: { source: "nightly" },
471
+ sandbox_api_access: "none",
472
+ }, { timeoutMs: 120_000, collectEvents: true });
473
+ ```
474
+
475
+ This path uses IDs directly and forwards values unchanged, including explicit
476
+ null, false and empty collections. Omitted properties stay omitted. Local run
477
+ options are a separate argument. It does not combine raw fields with the
478
+ name-based options of `run(prompt, config)`; existing `run` calls still work.
479
+ A run needs a non-empty prompt and cannot queue (`queue: true` is refused
480
+ before HTTP). Use `client.api.request` for promptless or queued creation.
481
+
482
+ With `channel_id`, `runRequest` follows turn 1 when the server creates a
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.
package/dist/client.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { ConversationInput } from "./schemas.ts";
1
2
  import { HttpClient, type FetchLike, type RequestOptions } from "./http.ts";
2
3
  import { type ConfigOptions, type ResolvedConfig } from "./config.ts";
3
4
  import { Run, type RunOptions } from "./run.ts";
@@ -89,6 +90,12 @@ export declare class Fountain {
89
90
  * starts either way.
90
91
  */
91
92
  run(prompt: string, config: RunConfig): Run;
93
+ /**
94
+ * Run an API-shaped launch request using IDs, without name resolution.
95
+ * Every request field goes to the server; local execution settings stay in
96
+ * options. For a promptless or queued creation, use api.request instead.
97
+ */
98
+ runRequest(request: ConversationInput, options?: RunOptions): Run;
92
99
  /**
93
100
  * Pick a conversation back up. The sandbox is still there and so is the
94
101
  * agent's session — `send` costs one prompt, not a re-explanation.
package/dist/client.js CHANGED
@@ -98,6 +98,40 @@ export class Fountain {
98
98
  },
99
99
  }, options);
100
100
  }
101
+ /**
102
+ * Run an API-shaped launch request using IDs, without name resolution.
103
+ * Every request field goes to the server; local execution settings stay in
104
+ * options. For a promptless or queued creation, use api.request instead.
105
+ */
106
+ runRequest(request, options = {}) {
107
+ if (typeof request.prompt !== "string" || !request.prompt.trim()) {
108
+ throw new TypeError("runRequest requires a non-empty prompt; use api.request for promptless creation");
109
+ }
110
+ if (request.queue != null && request.queue !== false) {
111
+ throw new TypeError("runRequest does not support queued creation; use api.request");
112
+ }
113
+ 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);
134
+ }
101
135
  /**
102
136
  * Pick a conversation back up. The sandbox is still there and so is the
103
137
  * agent's session — `send` costs one prompt, not a re-explanation.
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,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,EAAmB,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,UAAU,EAAsB,MAAM,UAAU,CAAC;AA4D1D;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,QAAQ;IACnB,gFAAgF;IACvE,GAAG,CAAa;IAChB,MAAM,CAAiB;IAEhC,8CAA8C;IACrC,MAAM,CAAS;IACxB,sCAAsC;IAC7B,YAAY,CAAe;IACpC,gCAA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;IAED,4DAA4D;IAC5D,OAAO;QACL,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;IAED,yEAAyE;IACzE,OAAO,CAAc,MAAc,EAAE,IAAY,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAI,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;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"}
@@ -2781,12 +2781,7 @@ export interface components {
2781
2781
  model: string | null;
2782
2782
  name: string;
2783
2783
  /** @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. */
2784
- permission_policy?: ({
2785
- /** @description Seconds a permission request that outlived its turn waits before it is denied (#1635). Names no tool, so it is the one key whose value is a number rather than a verdict, which is why the value schema below is a union. Absent leaves the global ask timeout. A request may shorten it with `_meta.fountain.timeout` on its own session/request_permission, and may not lengthen it. A launch may only shorten what the agent set, or the global ask timeout where the agent set nothing. Capped at a year, which is where the deadline stops fitting in a timestamp rather than a limit on how long a wait is useful. */
2786
- ask_timeout?: number;
2787
- } & {
2788
- [key: string]: ("auto_allow" | "ask" | "auto_deny") | number;
2789
- }) | null;
2784
+ permission_policy?: components["schemas"]["PermissionPolicy"] | null;
2790
2785
  /** @enum {string} */
2791
2786
  runtime: "claude" | "codex" | "gemini" | "opencode" | "acp" | "fountain-fixture";
2792
2787
  /** @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. */
@@ -2846,12 +2841,7 @@ export interface components {
2846
2841
  model?: string | null;
2847
2842
  name: string;
2848
2843
  /** @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. */
2849
- permission_policy?: ({
2850
- /** @description Seconds a permission request that outlived its turn waits before it is denied (#1635). Names no tool, so it is the one key whose value is a number rather than a verdict, which is why the value schema below is a union. Absent leaves the global ask timeout. A request may shorten it with `_meta.fountain.timeout` on its own session/request_permission, and may not lengthen it. A launch may only shorten what the agent set, or the global ask timeout where the agent set nothing. Capped at a year, which is where the deadline stops fitting in a timestamp rather than a limit on how long a wait is useful. */
2851
- ask_timeout?: number;
2852
- } & {
2853
- [key: string]: ("auto_allow" | "ask" | "auto_deny") | number;
2854
- }) | null;
2844
+ permission_policy?: components["schemas"]["PermissionPolicy"] | null;
2855
2845
  /** @enum {string} */
2856
2846
  runtime: "claude" | "codex" | "gemini" | "opencode" | "acp" | "fountain-fixture";
2857
2847
  /** @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. */
@@ -2908,12 +2898,7 @@ export interface components {
2908
2898
  model?: string | null;
2909
2899
  name?: string;
2910
2900
  /** @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. */
2911
- permission_policy?: ({
2912
- /** @description Seconds a permission request that outlived its turn waits before it is denied (#1635). Names no tool, so it is the one key whose value is a number rather than a verdict, which is why the value schema below is a union. Absent leaves the global ask timeout. A request may shorten it with `_meta.fountain.timeout` on its own session/request_permission, and may not lengthen it. A launch may only shorten what the agent set, or the global ask timeout where the agent set nothing. Capped at a year, which is where the deadline stops fitting in a timestamp rather than a limit on how long a wait is useful. */
2913
- ask_timeout?: number;
2914
- } & {
2915
- [key: string]: ("auto_allow" | "ask" | "auto_deny") | number;
2916
- }) | null;
2901
+ permission_policy?: components["schemas"]["PermissionPolicy"] | null;
2917
2902
  /** @enum {string} */
2918
2903
  runtime?: "claude" | "codex" | "gemini" | "opencode" | "acp" | "fountain-fixture";
2919
2904
  /** @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. */
@@ -3723,16 +3708,11 @@ export interface components {
3723
3708
  /** @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. */
3724
3709
  pending_requests?: components["schemas"]["PendingPermissionRequest"][];
3725
3710
  /** @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. */
3726
- permission_policy?: ({
3727
- /** @description Seconds a permission request that outlived its turn waits before it is denied (#1635). Names no tool, so it is the one key whose value is a number rather than a verdict, which is why the value schema below is a union. Absent leaves the global ask timeout. A request may shorten it with `_meta.fountain.timeout` on its own session/request_permission, and may not lengthen it. A launch may only shorten what the agent set, or the global ask timeout where the agent set nothing. Capped at a year, which is where the deadline stops fitting in a timestamp rather than a limit on how long a wait is useful. */
3728
- ask_timeout?: number;
3729
- } & {
3730
- [key: string]: ("auto_allow" | "ask" | "auto_deny") | number;
3731
- }) | null;
3711
+ permission_policy?: components["schemas"]["PermissionPolicy"] | null;
3732
3712
  /** @enum {string} */
3733
3713
  runtime: "claude" | "codex" | "gemini" | "opencode" | "acp" | "fountain-fixture";
3734
3714
  runtime_session_id?: string | null;
3735
- sandbox?: components["schemas"]["Sandbox"] | null;
3715
+ sandbox?: (components["schemas"]["Sandbox"] | (null)) | null;
3736
3716
  /**
3737
3717
  * @description Immutable sandbox callback credential policy. none never issues a callback token.
3738
3718
  * @enum {string}
@@ -3780,12 +3760,7 @@ export interface components {
3780
3760
  [key: string]: string;
3781
3761
  } | null;
3782
3762
  /** @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. */
3783
- permission_policy?: ({
3784
- /** @description Seconds a permission request that outlived its turn waits before it is denied (#1635). Names no tool, so it is the one key whose value is a number rather than a verdict, which is why the value schema below is a union. Absent leaves the global ask timeout. A request may shorten it with `_meta.fountain.timeout` on its own session/request_permission, and may not lengthen it. A launch may only shorten what the agent set, or the global ask timeout where the agent set nothing. Capped at a year, which is where the deadline stops fitting in a timestamp rather than a limit on how long a wait is useful. */
3785
- ask_timeout?: number;
3786
- } & {
3787
- [key: string]: ("auto_allow" | "ask" | "auto_deny") | number;
3788
- }) | null;
3763
+ permission_policy?: components["schemas"]["PermissionPolicy"] | null;
3789
3764
  /** @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. */
3790
3765
  prompt?: string;
3791
3766
  /** @description When a fresh start reaches the tenant or the fleet concurrency ceiling, wait in the bounded sandbox queue and return 202 with a SandboxRequest instead of 429 or 503 (ADR 0042). Starts carrying images or an explicit sandbox_id are never queued, and a full queue keeps the immediate error. */
@@ -4398,6 +4373,16 @@ export interface components {
4398
4373
  /** @example true */
4399
4374
  ok: boolean;
4400
4375
  };
4376
+ /**
4377
+ * PermissionPolicy
4378
+ * @description The wire shape of a permission policy: a map of key to verdict, plus the optional `ask_timeout` key, whose value is a number rather than a verdict. Every place a policy travels shares this shape and says there what a policy means at that door. Null everywhere a policy is absent.
4379
+ */
4380
+ PermissionPolicy: ({
4381
+ /** @description Seconds a permission request that outlived its turn waits before it is denied (#1635). Names no tool, so it is the one key whose value is a number rather than a verdict, which is why the value schema below is a union. Absent leaves the global ask timeout. A request may shorten it with `_meta.fountain.timeout` on its own session/request_permission, and may not lengthen it. A launch may only shorten what the agent set, or the global ask timeout where the agent set nothing. Capped at a year, which is where the deadline stops fitting in a timestamp rather than a limit on how long a wait is useful. */
4382
+ ask_timeout?: number;
4383
+ } & {
4384
+ [key: string]: ("auto_allow" | "ask" | "auto_deny") | number;
4385
+ }) | null;
4401
4386
  /** PromptRequest */
4402
4387
  PromptRequest: {
4403
4388
  /** @description Optional images to attach to this prompt. */
@@ -5097,7 +5082,7 @@ export interface components {
5097
5082
  prompt?: string;
5098
5083
  status?: string;
5099
5084
  turn_number?: number;
5100
- usage?: components["schemas"]["TurnUsage"] | null;
5085
+ usage?: (components["schemas"]["TurnUsage"] | (null)) | null;
5101
5086
  } | null;
5102
5087
  /** @description What the teammate is called: the conversation's title, else the agent's name. */
5103
5088
  name: string;
@@ -5180,7 +5165,7 @@ export interface components {
5180
5165
  status: "pending" | "running" | "completed" | "failed" | "interrupted";
5181
5166
  turn_number: number;
5182
5167
  /** @description The end-of-turn token figure; null while the turn runs, when the runtime reported none, or on turns that predate the field. */
5183
- usage?: components["schemas"]["TurnUsage"] | null;
5168
+ usage?: (components["schemas"]["TurnUsage"] | (null)) | null;
5184
5169
  /** @description The turn ended with a permission request still open (#1635): the agent answered with stop reason `waiting`, the turn is `completed` and the request is on the conversation as a `pending_requests` entry. */
5185
5170
  waiting?: boolean;
5186
5171
  };
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.0.0";
18
+ export declare const USER_AGENT = "fountain-sdk-js/5.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/5.0.0";
8
+ export const USER_AGENT = "fountain-sdk-js/5.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/dist/schemas.d.ts CHANGED
@@ -31,6 +31,8 @@ export type VaultInput = S["VaultRequest"];
31
31
  export type VaultPatch = S["VaultUpdate"];
32
32
  /** One run of an agent inside a sandbox. */
33
33
  export type ConversationRecord = S["Conversation"];
34
+ /** The API launch body, with wire names and server-owned validation. */
35
+ export type ConversationInput = S["ConversationCreateRequest"];
34
36
  /** A machine, with the conversations on it. */
35
37
  export type SandboxRecord = S["SandboxDetail"];
36
38
  /** One directory on a sandbox, directories first (ADR 0039). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managoat/fountain-sdk",
3
- "version": "5.0.0",
3
+ "version": "5.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": {
@@ -51,7 +51,7 @@
51
51
  "prepublishOnly": "node scripts/ci-publishes.mjs && npm run typecheck && npm test && npm run build"
52
52
  },
53
53
  "devDependencies": {
54
- "@redocly/ajv": "8.11.2",
54
+ "@redocly/ajv": "8.18.3",
55
55
  "@types/node": "^26.4.0",
56
56
  "openapi-typescript": "^7.13.0",
57
57
  "typescript": "^5.7.0"