@managoat/fountain-sdk 5.0.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -11,6 +11,25 @@ server releases.
11
11
 
12
12
  ---
13
13
 
14
+ ## [5.1.0] — 2026-09-14
15
+
16
+ ### Added
17
+
18
+ - `components["schemas"]["PermissionPolicy"]`. The permission-policy object was
19
+ declared inline in five server schemas; it is now one named component that
20
+ all five reference, so the generated type has a name instead of being
21
+ repeated as an anonymous intersection. The named type includes `null`, which
22
+ is what a policy-less agent or conversation carries.
23
+
24
+ ### Changed
25
+
26
+ - `permission_policy` on `Agent`, `AgentRequest`, `AgentUpdate`, `Conversation`
27
+ and `ConversationCreateRequest` is typed as
28
+ `components["schemas"]["PermissionPolicy"] | null`. It resolves to exactly
29
+ the type 5.0.0 had, so this is a rename and not a new shape: TypeScript is
30
+ structurally typed and existing code keeps compiling. Code that wrote the old
31
+ anonymous type out by hand can use the named one instead.
32
+
14
33
  ## [5.0.0] — 2026-09-14
15
34
 
16
35
  ### Breaking changes
@@ -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,12 +3708,7 @@ 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;
@@ -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. */
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.1.0";
19
19
  export declare class HttpClient {
20
20
  readonly config: ResolvedConfig;
21
21
  private readonly fetchImpl;
package/dist/http.js CHANGED
@@ -5,7 +5,7 @@ import { AuthError, ConnectionError, FountainError, errorForStatus } from "./err
5
5
  * this string is already what Fountain's request logs are keyed on. The
6
6
  * version half is asserted against `package.json` by a test.
7
7
  */
8
- export const USER_AGENT = "fountain-sdk-js/5.0.0";
8
+ export const USER_AGENT = "fountain-sdk-js/5.1.0";
9
9
  /**
10
10
  * The thin layer everything else is built on: one bearer token, JSON in and
11
11
  * out, and errors that say which call failed. `Fountain#api` exposes it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managoat/fountain-sdk",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "description": "Run a coding agent on a real computer, with your repos and your credentials, in one call.",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {