@intentius/chant-lexicon-fountain 0.91.0 → 0.94.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/dist/acp/serve.d.ts +1 -0
- package/dist/acp/serve.d.ts.map +1 -1
- package/dist/composites/box.d.ts +44 -2
- package/dist/composites/box.d.ts.map +1 -1
- package/dist/composites/steward.d.ts +19 -0
- package/dist/composites/steward.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/integrity.json +3 -3
- package/dist/lint/post-synth/ftn016-runtime-model-valid.d.ts.map +1 -1
- package/dist/manifest.json +1 -1
- package/dist/op/activities/fountain-apply.d.ts +18 -2
- package/dist/op/activities/fountain-apply.d.ts.map +1 -1
- package/dist/op/activities/fountain-run.d.ts +35 -2
- package/dist/op/activities/fountain-run.d.ts.map +1 -1
- package/dist/rules/ftn016-runtime-model-valid.ts +21 -4
- package/package.json +2 -2
- package/src/acp/index.ts +16 -4
- package/src/acp/serve.ts +8 -1
- package/src/acp/turn.ts +12 -0
- package/src/composites/box.ts +61 -4
- package/src/composites/composites.test.ts +34 -3
- package/src/composites/steward.ts +24 -1
- package/src/index.ts +4 -1
- package/src/init-templates.test.ts +1 -1
- package/src/lint/post-synth/ftn016-runtime-model-valid.ts +21 -4
- package/src/lint/post-synth/post-synth.test.ts +10 -0
- package/src/op/activities/fountain-apply.test.ts +20 -20
- package/src/op/activities/fountain-apply.ts +28 -2
- package/src/op/activities/fountain-run.test.ts +155 -1
- package/src/op/activities/fountain-run.ts +176 -20
- package/src/op/activities/op-runtime.test.ts +191 -0
package/dist/acp/serve.d.ts
CHANGED
package/dist/acp/serve.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/acp/serve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/acp/serve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAUH,wFAAwF;AACxF,wBAAsB,iBAAiB,CAAC,IAAI,GAAE;IAAE,eAAe,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BjH"}
|
package/dist/composites/box.d.ts
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* name: "studio-box",
|
|
17
17
|
* repo: { url: "https://github.com/arugula-salad/studio", ref: "main" },
|
|
18
18
|
* setupScript: readFileSync("box/provision-template.sh", "utf8"),
|
|
19
|
+
* model: "anthropic/claude-sonnet-4-5",
|
|
19
20
|
* permissionPolicy: { default: "auto_allow" },
|
|
20
21
|
* allowedHosts: ["registry.npmjs.org", "github.com"],
|
|
21
22
|
* vault: { secrets: [{ key: "STUDIO_SECRET", value: "${STUDIO_SECRET}" }] },
|
|
@@ -55,6 +56,21 @@
|
|
|
55
56
|
* workspace check` fails a box member whose files hold one
|
|
56
57
|
* (`box-credential-declared`).
|
|
57
58
|
*
|
|
59
|
+
* One credential reaches the box anyway (#2780). fountain v0.21.0 gives every
|
|
60
|
+
* sandbox a callback token, `FOUNTAIN_TOKEN`, in the environment of each exec
|
|
61
|
+
* it makes into it (the setup script's included), scoped to the owner
|
|
62
|
+
* (`sandbox_api_access: owner`). Its opt-out, `sandbox_api_access: none`, is
|
|
63
|
+
* refused for a persistent sandbox, and a box is always persistent, so no
|
|
64
|
+
* option here can turn it off (managoat/fountain#2497). The composite records
|
|
65
|
+
* it instead: the Agent's metadata carries `box-sandbox-api-access: owner`
|
|
66
|
+
* (`BOX_SANDBOX_API_ACCESS_METADATA_KEY`), and the member's `box` block is
|
|
67
|
+
* expected to declare the capability that stands for it,
|
|
68
|
+
* `BOX_FOUNTAIN_CALLBACK_CAPABILITY`: `fountain-callback`, brokered by fountain
|
|
69
|
+
* itself, with scope `owner`. It is named apart from a `fountain` capability a
|
|
70
|
+
* lobby brokers, which a box may declare as well. `chant workspace check`
|
|
71
|
+
* reports a box member that builds a `Box` and does not declare it
|
|
72
|
+
* (`box-fountain-callback-undeclared`).
|
|
73
|
+
*
|
|
58
74
|
* ## The port
|
|
59
75
|
*
|
|
60
76
|
* fountain's `Environment` and `Agent` have no field for a served port (the
|
|
@@ -82,6 +98,27 @@ import { Agent, Environment, Vault } from "../generated/index.js";
|
|
|
82
98
|
export declare const BOX_PORT_METADATA_KEY = "box-port";
|
|
83
99
|
/** The metadata key a box agent's resolved allowed vaults (or `"any"`) are recorded under, for the read contract. */
|
|
84
100
|
export declare const BOX_ALLOWED_VAULTS_METADATA_KEY = "box-allowed-vault-ids";
|
|
101
|
+
/**
|
|
102
|
+
* The metadata key a box agent's sandbox callback access is recorded under
|
|
103
|
+
* (#2780): `owner`, the scope of the `FOUNTAIN_TOKEN` fountain v0.21.0 gives
|
|
104
|
+
* every persistent sandbox.
|
|
105
|
+
*/
|
|
106
|
+
export declare const BOX_SANDBOX_API_ACCESS_METADATA_KEY = "box-sandbox-api-access";
|
|
107
|
+
/**
|
|
108
|
+
* The sandbox callback access a box has on the pinned spec: `owner`. fountain
|
|
109
|
+
* v0.21.0 accepts `none` only for a fresh ephemeral sandbox (managoat/fountain#2497).
|
|
110
|
+
*/
|
|
111
|
+
export declare const BOX_SANDBOX_API_ACCESS = "owner";
|
|
112
|
+
/**
|
|
113
|
+
* The capability a box member's `box` block declares for fountain's callback
|
|
114
|
+
* token (#2780), as `chant workspace check` expects it: fountain brokers it
|
|
115
|
+
* itself, and its scope is the owner's.
|
|
116
|
+
*/
|
|
117
|
+
export declare const BOX_FOUNTAIN_CALLBACK_CAPABILITY: {
|
|
118
|
+
readonly name: "fountain-callback";
|
|
119
|
+
readonly broker: "fountain";
|
|
120
|
+
readonly scope: readonly ["owner"];
|
|
121
|
+
};
|
|
85
122
|
/** `Agent.sandbox_provider`'s values at the pinned spec. */
|
|
86
123
|
export declare const BOX_SANDBOX_PROVIDERS: readonly ["sprites", "e2b", "daytona", "runner"];
|
|
87
124
|
/** A sandbox backend, per the pinned spec's `sandbox_provider` enum. */
|
|
@@ -125,8 +162,13 @@ export interface BoxOpts {
|
|
|
125
162
|
setupTimeoutSeconds?: number;
|
|
126
163
|
/** Agent runtime. Default `claude`. */
|
|
127
164
|
runtime?: "claude" | "codex" | "gemini" | "opencode";
|
|
128
|
-
/**
|
|
129
|
-
|
|
165
|
+
/**
|
|
166
|
+
* Canonical provider/model_id. Required (#2776): fountain v0.21.0, the
|
|
167
|
+
* pinned spec, refuses an Agent with no model for every runtime but `acp`
|
|
168
|
+
* (`model: can't be blank` at apply), and a Box's runtime is never `acp`.
|
|
169
|
+
* FTN016 flags the same gap on an Agent built any other way.
|
|
170
|
+
*/
|
|
171
|
+
model: string;
|
|
130
172
|
/** Sandbox backend override. Omitted, the instance default (`SANDBOX_PROVIDER`). A plain `Agent.sandbox_provider` field, so it is already visible on the graph node without extra bookkeeping (unlike `allowedVaults`; see "Allowed vaults in the read contract" above). */
|
|
131
173
|
sandboxProvider?: BoxSandboxProvider;
|
|
132
174
|
/** Per-tool permission policy. Required: fountain's unset policy is `auto_allow`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../src/composites/box.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../src/composites/box.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8FG;AAEH,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE/D,4FAA4F;AAC5F,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAEhD,qHAAqH;AACrH,eAAO,MAAM,+BAA+B,0BAA0B,CAAC;A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,CAAC;IACnC,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,GAAG,CAAC,IAAI,EAAE,OAAO,GAAG,YAAY,CA4F/C"}
|
|
@@ -68,6 +68,18 @@
|
|
|
68
68
|
* (`box-credential-declared`), and `chant workspace status --json` lists each
|
|
69
69
|
* capability the steward names with the broker the box block gives it.
|
|
70
70
|
*
|
|
71
|
+
* ## Decision points (chant#2749)
|
|
72
|
+
*
|
|
73
|
+
* The Agent runs `chant acp --steward <name>`, so every turn is this
|
|
74
|
+
* steward's. An Op that asks a decision point during a turn
|
|
75
|
+
* (`askPointInRun` in `@intentius/chant/op`) makes its model call only
|
|
76
|
+
* through a capability named in `capabilities`, and a question that is still
|
|
77
|
+
* open ends the run as `waiting`, as a gate ends it as `gated`. The question
|
|
78
|
+
* stays in the workspace, where `points --open`, `workspace status --json`
|
|
79
|
+
* and hud find it, and a person answers it. It is never asked on this
|
|
80
|
+
* thread, and `points answer` from this session is refused. The Op's next
|
|
81
|
+
* turn reads the answer.
|
|
82
|
+
*
|
|
71
83
|
* ## The coding agent beside it
|
|
72
84
|
*
|
|
73
85
|
* A box also has a coding agent editing the app. They share the checkout by
|
|
@@ -154,6 +166,13 @@ export interface StewardResources {
|
|
|
154
166
|
}
|
|
155
167
|
/** The command an `acp` agent speaks the protocol over (#2125). */
|
|
156
168
|
export declare const STEWARD_RUNTIME_COMMAND = "chant acp";
|
|
169
|
+
/**
|
|
170
|
+
* A steward's Agent command: `chant acp --steward <name>` (chant#2749), so the
|
|
171
|
+
* session knows whose turns it serves. A steward's name is letters, digits,
|
|
172
|
+
* `.`, `_` and `-` (`declareSteward` refuses anything else), so it needs no
|
|
173
|
+
* quoting.
|
|
174
|
+
*/
|
|
175
|
+
export declare function stewardRuntimeCommand(name: string): string;
|
|
157
176
|
/** The teammate an Op runs on, when a `Steward` in this process declared one. */
|
|
158
177
|
export declare function stewardForOp(op: string): string | undefined;
|
|
159
178
|
/** Drop every declaration. Tests only — a process declares each steward once. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steward.d.ts","sourceRoot":"","sources":["../../src/composites/steward.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"steward.d.ts","sourceRoot":"","sources":["../../src/composites/steward.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AAEH,OAAO,EAAkB,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAK5F;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;AAQnE,kFAAkF;AAClF,MAAM,WAAW,kBAAkB;IACjC,8EAA8E;IAC9E,GAAG,EAAE,MAAM,CAAC;IACZ,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,WAAW,EAAE,YAAY,CAAC,OAAO,WAAW,CAAC,CAAC;IAC9C;;;OAGG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC,OAAO,KAAK,CAAC,CAAC;IACnC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;;;OAIG;IACH,GAAG,EAAE,SAAS,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,YAAY,CAAC,OAAO,KAAK,CAAC,CAAC;IAClC,QAAQ,EAAE,YAAY,CAAC,OAAO,QAAQ,CAAC,CAAC;IACxC,4DAA4D;IAC5D,SAAS,EAAE,YAAY,CAAC,OAAO,QAAQ,CAAC,EAAE,CAAC;IAC3C,OAAO,CAAC,EAAE,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC;IACvC;;;;OAIG;IACH,WAAW,EAAE,kBAAkB,CAAC;CACjC;AAED,mEAAmE;AACnE,eAAO,MAAM,uBAAuB,cAAc,CAAC;AAEnD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1D;AAiBD,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE3D;AAED,iFAAiF;AACjF,wBAAgB,uBAAuB,IAAI,IAAI,CAG9C;AA8BD,wBAAgB,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,gBAAgB,CAwG3D"}
|
package/dist/index.d.ts
CHANGED
|
@@ -12,9 +12,9 @@ export { createFountainOpRuntime, defaultFountainSse, DEFAULT_STREAM_IDLE_TIMEOU
|
|
|
12
12
|
export type { FountainOpRuntimeOptions, FountainSse, FountainSseEvent } from "./op/runtime.js";
|
|
13
13
|
export { ConciergeStack } from "./composites/concierge-stack.js";
|
|
14
14
|
export type { ConciergeStackOpts, ConciergeStackResources } from "./composites/concierge-stack.js";
|
|
15
|
-
export { Steward, stewardForOp, STEWARD_RUNTIME_COMMAND } from "./composites/steward.js";
|
|
15
|
+
export { Steward, stewardForOp, stewardRuntimeCommand, STEWARD_RUNTIME_COMMAND } from "./composites/steward.js";
|
|
16
16
|
export type { StewardOp, StewardOpts, StewardResources, StewardWebhookOpts } from "./composites/steward.js";
|
|
17
|
-
export { Box, BOX_PORT_METADATA_KEY, BOX_ALLOWED_VAULTS_METADATA_KEY, BOX_DEFAULT_PORT, BOX_DEFAULT_MOUNT_PATH, BOX_SANDBOX_PROVIDERS, } from "./composites/box.js";
|
|
17
|
+
export { Box, BOX_PORT_METADATA_KEY, BOX_ALLOWED_VAULTS_METADATA_KEY, BOX_SANDBOX_API_ACCESS_METADATA_KEY, BOX_SANDBOX_API_ACCESS, BOX_FOUNTAIN_CALLBACK_CAPABILITY, BOX_DEFAULT_PORT, BOX_DEFAULT_MOUNT_PATH, BOX_SANDBOX_PROVIDERS, } from "./composites/box.js";
|
|
18
18
|
export type { BoxOpts, BoxResources, BoxRepositoryOpts, BoxVaultOpts, BoxPermissionPolicy, BoxSandboxProvider } from "./composites/box.js";
|
|
19
19
|
export { acpCommandGroup } from "./acp/index.js";
|
|
20
20
|
export { AcpServer } from "./acp/server.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAIlD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAC9D,YAAY,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAG9B,cAAc,mBAAmB,CAAC;AAIlC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AACxF,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,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GAC/B,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,wBAAwB,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAG5F,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAChG,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC7G,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACzG,OAAO,EACL,GAAG,EACH,qBAAqB,EACrB,+BAA+B,EAC/B,mCAAmC,EACnC,sBAAsB,EACtB,gCAAgC,EAChC,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAIxI,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/integrity.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "970351631fcfe5ccb8e769f832b459749439e798801bfab83b3154e0b35a9ac0",
|
|
5
5
|
"meta.json": "3301437a2a56eaf1a5cc8f6eabb18a40767f916e09701b2d9bf20aba4066738c",
|
|
6
6
|
"types/index.d.ts": "cf6b634fe0a8e9e96f1d9d07e3df53838def2683dc93dbe3c7fd971c6d3908ae",
|
|
7
7
|
"rules/ftn001-no-secret-literals.ts": "a417b194cd7039911cca9a0f14c49b042dfa6b1ee48517f7c2e22b16590a8599",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"rules/ftn013-substitution-resolvable.ts": "1425ca7de9494725ad4ec0bcb22abc30cff718d3fc3816fb86322897ebcaf451",
|
|
12
12
|
"rules/ftn014-vault-shadowing.ts": "e966a441c52f57fee059e3e4834da2c5f9d12c71e551924beebd7d0740f714e1",
|
|
13
13
|
"rules/ftn015-mcp-secret-env-substitution.ts": "88dc87c8f403a2fe48ee43bc4a4678d95273dba810135c8e74750f1bd62d2564",
|
|
14
|
-
"rules/ftn016-runtime-model-valid.ts": "
|
|
14
|
+
"rules/ftn016-runtime-model-valid.ts": "194c81dcf60c23669aaf8ede3429edba0a4f7f5813ce209c9774f4a70932187e",
|
|
15
15
|
"rules/ftn017-unique-resource-names.ts": "866f3f385083f96b6e8a18fa6f5624bab43752c5d22e7291e95835e62745d26c",
|
|
16
16
|
"rules/ftn020-schedule-cron-syntax.ts": "a4291345035fbfddfa443aeae59c08be4d35f383a28cd19c827bf162b79f7703",
|
|
17
17
|
"rules/ftn021-typed-references-resolve.ts": "1f62b4d1a47707b00634a50960bdd8233c292898a76aac0089ab02de76460d96",
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"skills/chant-fountain-ops.md": "4e72f0a0c7477a9e98f85ea45e49ba69e8a699f9c13ba0f0cf1cb20a88151373",
|
|
24
24
|
"skills/chant-fountain-locked-sandboxes.md": "14def4c68b13c2bd561f75819b188968cec85073a5dd8b59e91708e1af26daae"
|
|
25
25
|
},
|
|
26
|
-
"composite": "
|
|
26
|
+
"composite": "6b8614c6b5944f249d7eab406b76027146953884bb0a9f73def3be52724e49c2"
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ftn016-runtime-model-valid.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/ftn016-runtime-model-valid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"ftn016-runtime-model-valid.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/ftn016-runtime-model-valid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAwB9G,eAAO,MAAM,sBAAsB,EAAE,cA+DpC,CAAC"}
|
package/dist/manifest.json
CHANGED
|
@@ -144,6 +144,22 @@ export { vaultNameRefs };
|
|
|
144
144
|
export declare function isChantOwned(resource: {
|
|
145
145
|
metadata?: unknown;
|
|
146
146
|
}): boolean;
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
/**
|
|
148
|
+
* The fetch-backed client. `signal`, when given, rides on every request, so an
|
|
149
|
+
* aborted Op step (timeout or Ctrl-C) cancels the request in flight.
|
|
150
|
+
*/
|
|
151
|
+
export declare function defaultFountainHttp(endpoint: string, token: string, signal?: AbortSignal): FountainHttp;
|
|
152
|
+
/**
|
|
153
|
+
* `http`, refusing to start a request once `signal` has fired. The fetch-backed
|
|
154
|
+
* client already cancels a request in flight; this also stops an injected
|
|
155
|
+
* client between requests, so an aborted step makes no further call.
|
|
156
|
+
*/
|
|
157
|
+
export declare function abortable(http: FountainHttp, signal?: AbortSignal): FountainHttp;
|
|
158
|
+
/**
|
|
159
|
+
* Apply a fountain manifest. The Op activity contract (`ActivityFn`, #2775):
|
|
160
|
+
* the executor calls `fountainApply(args, signal)`, so the second parameter is
|
|
161
|
+
* the step's `AbortSignal` and nothing else. The HTTP client and connection
|
|
162
|
+
* deps are test seams, after it, as every other lexicon's activities take them.
|
|
163
|
+
*/
|
|
164
|
+
export declare function fountainApply(args: FountainApplyArgs, signal?: AbortSignal, http?: FountainHttp, deps?: FountainConnectionDeps): Promise<FountainApplySummary>;
|
|
149
165
|
//# sourceMappingURL=fountain-apply.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fountain-apply.d.ts","sourceRoot":"","sources":["../../../src/op/activities/fountain-apply.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAIH,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE5E,OAAO,EAA+B,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAElF,eAAO,MAAM,yBAAyB,oCAAoC,CAAC;AAE3E,wDAAwD;AACxD,eAAO,MAAM,aAAa,eAAe,CAAC;AAC1C,eAAO,MAAM,eAAe,UAAU,CAAC;AAmCvC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAC5F;AAED,MAAM,WAAW,iBAAiB;IAChC,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,2EAA2E;AAC3E,MAAM,WAAW,sBAAsB;IACrC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AAa,EAAE,CAAC;AAEzB,qEAAqE;AACrE,wBAAgB,YAAY,CAAC,QAAQ,EAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAItE;AAID;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,YAAY,CAmBvG;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,YAAY,CAMhF;AA4WD;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,iBAAiB,EACvB,MAAM,CAAC,EAAE,WAAW,EACpB,IAAI,CAAC,EAAE,YAAY,EACnB,IAAI,CAAC,EAAE,sBAAsB,GAC5B,OAAO,CAAC,oBAAoB,CAAC,CAgE/B"}
|
|
@@ -24,10 +24,22 @@
|
|
|
24
24
|
* interrupted` — fountain's `end_turn` block, or an error) without
|
|
25
25
|
* terminating anything.
|
|
26
26
|
*
|
|
27
|
+
* A persistent agent launched with no prompt (#2781) runs no turn: fountain
|
|
28
|
+
* provisions the home (or attaches to the one that exists) and the
|
|
29
|
+
* conversation stays `pending`, so it never reaches `idle`. For that launch
|
|
30
|
+
* the run is done once the conversation's sandbox is `ready` or `failed` and
|
|
31
|
+
* no turn is running, and the result is the sandbox's outcome: `provisioned`,
|
|
32
|
+
* or `failed` with the stage that failed.
|
|
33
|
+
*
|
|
27
34
|
* Terminating the conversation's machine on deadline (a hung run should
|
|
28
35
|
* not outlive the op that started it) still happens whenever the turn has
|
|
29
36
|
* not ended — for either sandbox mode. `terminate` makes the choice
|
|
30
37
|
* explicit rather than leaving it implicit in `sandbox_mode`.
|
|
38
|
+
*
|
|
39
|
+
* Under `chant run` the executor calls this as `fountainRun(args, signal)`
|
|
40
|
+
* (#2775). When the signal fires (the step's timeout, or Ctrl-C) polling
|
|
41
|
+
* stops, the terminate policy is applied as it is on the deadline, and the
|
|
42
|
+
* step fails with the abort's reason.
|
|
31
43
|
*/
|
|
32
44
|
import { type FountainHttp, type FountainConnectionDeps } from "./fountain-apply.js";
|
|
33
45
|
/**
|
|
@@ -63,6 +75,20 @@ export interface FountainRunArgs {
|
|
|
63
75
|
prompt?: string;
|
|
64
76
|
/** Optional vault to attach (subject to the agent's allowlist upstream). */
|
|
65
77
|
vaultId?: string;
|
|
78
|
+
/**
|
|
79
|
+
* fountain's `sprite_name`: the suffix of the machine's name, so a box's
|
|
80
|
+
* runtime can predict it. fountain keeps its `fountain-<account>-` prefix;
|
|
81
|
+
* 1 to 40 letters, digits, `-` and `_`, starting with a letter or digit.
|
|
82
|
+
*/
|
|
83
|
+
spriteName?: string;
|
|
84
|
+
/**
|
|
85
|
+
* fountain's `sandbox_api_access` (#2780): `owner`, fountain's default, gives
|
|
86
|
+
* the sandbox a callback token scoped to the owner (`FOUNTAIN_TOKEN` in every
|
|
87
|
+
* exec); `none` mints none. fountain v0.21.0 accepts `none` only for a fresh
|
|
88
|
+
* ephemeral sandbox, so it is refused here for a persistent agent before any
|
|
89
|
+
* conversation starts (managoat/fountain#2497).
|
|
90
|
+
*/
|
|
91
|
+
sandboxApiAccess?: "owner" | "none";
|
|
66
92
|
endpoint?: string;
|
|
67
93
|
token?: string;
|
|
68
94
|
/**
|
|
@@ -94,13 +120,20 @@ export interface FountainRunResult {
|
|
|
94
120
|
* The run's outcome. For a persistent agent whose turn ended, this is the
|
|
95
121
|
* turn's own status (`completed | failed | interrupted`); otherwise it is
|
|
96
122
|
* the conversation's status when the wait ended (`terminated` on a
|
|
97
|
-
* deadline).
|
|
123
|
+
* deadline). For a persistent agent launched with no prompt (#2781), it is
|
|
124
|
+
* the sandbox's outcome: `provisioned` or `failed`.
|
|
98
125
|
*/
|
|
99
126
|
status: string;
|
|
100
127
|
/** True when the agent's `sandbox_mode` resolved to `persistent`. */
|
|
101
128
|
persistent: boolean;
|
|
102
129
|
/** True when the op hit its deadline with the turn still unfinished. */
|
|
103
130
|
terminatedByDeadline: boolean;
|
|
131
|
+
/** The conversation's sandbox, once fountain has reported one. */
|
|
132
|
+
sandboxId?: string;
|
|
133
|
+
/** The sandbox's machine name (fountain's `sandbox.sprite_name`), the name to reach it by. */
|
|
134
|
+
spriteName?: string;
|
|
135
|
+
/** For a no-prompt launch whose sandbox failed (#2781): the provisioning stage that failed, when fountain logged one. */
|
|
136
|
+
failedStage?: string;
|
|
104
137
|
}
|
|
105
138
|
export interface ResolvedAgent {
|
|
106
139
|
id: string;
|
|
@@ -111,5 +144,5 @@ export interface ResolvedAgent {
|
|
|
111
144
|
export declare function resolveAgent(http: FountainHttp, agent: string): Promise<ResolvedAgent>;
|
|
112
145
|
/** Agent id only — the common case, and the one call sites outside this file use. */
|
|
113
146
|
export declare function resolveAgentId(http: FountainHttp, agent: string): Promise<string>;
|
|
114
|
-
export declare function fountainRun(args: FountainRunArgs, http?: FountainHttp, deps?: FountainConnectionDeps): Promise<FountainRunResult>;
|
|
147
|
+
export declare function fountainRun(args: FountainRunArgs, signal?: AbortSignal, http?: FountainHttp, deps?: FountainConnectionDeps): Promise<FountainRunResult>;
|
|
115
148
|
//# sourceMappingURL=fountain-run.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fountain-run.d.ts","sourceRoot":"","sources":["../../../src/op/activities/fountain-run.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fountain-run.d.ts","sourceRoot":"","sources":["../../../src/op/activities/fountain-run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAIL,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC5B,MAAM,kBAAkB,CAAC;AAE1B;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,aAA8D,CAAC;AAE7F;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,aAA0C,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1E,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,qEAAqE;AACrE,wBAAsB,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAe5F;AAED,qFAAqF;AACrF,wBAAsB,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGvF;AAyCD,wBAAsB,WAAW,CAC/B,IAAI,EAAE,eAAe,EACrB,MAAM,CAAC,EAAE,WAAW,EACpB,IAAI,CAAC,EAAE,YAAY,EACnB,IAAI,CAAC,EAAE,sBAAsB,GAC5B,OAAO,CAAC,iBAAiB,CAAC,CAqH5B"}
|
|
@@ -8,11 +8,15 @@ import { propsOf } from "../../entity-props";
|
|
|
8
8
|
* this backstops untyped construction (imported templates, hand-built
|
|
9
9
|
* plans) so a typo fails the build instead of a 422 at apply.
|
|
10
10
|
*
|
|
11
|
+
* Every runtime but `acp` needs a model: fountain v0.21.0, the pinned spec,
|
|
12
|
+
* refuses such an Agent at apply with `model: can't be blank` (#2776), and the
|
|
13
|
+
* generated type leaves `model` optional because `acp` does not take one.
|
|
14
|
+
*
|
|
11
15
|
* `acp` is the exception on the model. The runtime is in the spec since
|
|
12
|
-
* fountain v0.21.0,
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
+
* fountain v0.21.0, and it names a process rather than a hosted model: the
|
|
17
|
+
* model is whatever the command on the other end of the protocol decides to
|
|
18
|
+
* use, so a `model` on an acp agent is a value nothing reads. The command
|
|
19
|
+
* itself is FTN023's business.
|
|
16
20
|
*/
|
|
17
21
|
|
|
18
22
|
const RUNTIMES = new Set(["claude", "codex", "gemini", "opencode", "acp"]);
|
|
@@ -55,6 +59,19 @@ export const runtimeModelValidCheck: PostSynthCheck = {
|
|
|
55
59
|
continue;
|
|
56
60
|
}
|
|
57
61
|
|
|
62
|
+
if (agent.model === undefined || agent.model === null || agent.model === "") {
|
|
63
|
+
diagnostics.push({
|
|
64
|
+
checkId: "FTN016",
|
|
65
|
+
severity: "error",
|
|
66
|
+
message:
|
|
67
|
+
`Agent "${name}" has runtime "${typeof agent.runtime === "string" ? agent.runtime : "(unset)"}" and no model — ` +
|
|
68
|
+
`fountain v0.21.0 refuses it at apply ("model: can't be blank"); every runtime but acp needs a ` +
|
|
69
|
+
`canonical provider/model_id`,
|
|
70
|
+
entity: name,
|
|
71
|
+
lexicon: "fountain",
|
|
72
|
+
});
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
58
75
|
if (typeof agent.model === "string" && !MODEL_RE.test(agent.model)) {
|
|
59
76
|
diagnostics.push({
|
|
60
77
|
checkId: "FTN016",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-fountain",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.94.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Fountain lexicon for chant — sandboxed agent environments, vaults, and agents as typed estate",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"bundle": "tsx src/package-cli.ts"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@intentius/chant": "^0.
|
|
53
|
+
"@intentius/chant": "^0.94.0",
|
|
54
54
|
"typescript": "^5.9.3",
|
|
55
55
|
"zod": "^4.3.6"
|
|
56
56
|
},
|
package/src/acp/index.ts
CHANGED
|
@@ -34,19 +34,31 @@ export function acpCommandGroup(): CommandGroup {
|
|
|
34
34
|
|
|
35
35
|
async function serveHandler(ctx: CommandGroupContext): Promise<number> {
|
|
36
36
|
let durableRequests = false;
|
|
37
|
-
|
|
37
|
+
let steward: string | undefined;
|
|
38
|
+
const args = splitJoinedFlags(ctx.rawArgs, BOOLEAN_FLAGS);
|
|
39
|
+
for (let i = 0; i < args.length; i++) {
|
|
40
|
+
const arg = args[i];
|
|
38
41
|
if (arg === "--durable-requests") durableRequests = true;
|
|
39
|
-
else {
|
|
42
|
+
else if (arg === "--steward") {
|
|
43
|
+
// The Steward composite's Agent runs `chant acp --steward <name>`
|
|
44
|
+
// (chant#2749), so every turn in this session is that steward's.
|
|
45
|
+
const name = args[++i];
|
|
46
|
+
if (!name || name.startsWith("--")) {
|
|
47
|
+
console.error(`"chant acp --steward" takes the steward's name.`);
|
|
48
|
+
return 1;
|
|
49
|
+
}
|
|
50
|
+
steward = name;
|
|
51
|
+
} else {
|
|
40
52
|
// stdout carries the protocol and nothing else, so a usage error goes
|
|
41
53
|
// to stderr — the one place a spawned agent can say anything.
|
|
42
54
|
console.error(
|
|
43
|
-
unknownFlagError(arg, `"chant acp" accepts --durable-requests
|
|
55
|
+
unknownFlagError(arg, `"chant acp" accepts --durable-requests and --steward <name>.`).message,
|
|
44
56
|
);
|
|
45
57
|
return 1;
|
|
46
58
|
}
|
|
47
59
|
}
|
|
48
60
|
|
|
49
61
|
const { serveAcpOverStdio } = await import("./serve");
|
|
50
|
-
await serveAcpOverStdio({ durableRequests });
|
|
62
|
+
await serveAcpOverStdio({ durableRequests, ...(steward ? { steward } : {}) });
|
|
51
63
|
return 0;
|
|
52
64
|
}
|
package/src/acp/serve.ts
CHANGED
|
@@ -11,13 +11,14 @@
|
|
|
11
11
|
|
|
12
12
|
import { readFileSync } from "node:fs";
|
|
13
13
|
import { setGateOrigin } from "@intentius/chant/lifecycle/gate-origin";
|
|
14
|
+
import { setStewardTurn } from "@intentius/chant/op/steward-turn";
|
|
14
15
|
import { dirname, join } from "node:path";
|
|
15
16
|
import { fileURLToPath } from "node:url";
|
|
16
17
|
import { AcpServer } from "./server";
|
|
17
18
|
import { streamTransport } from "./jsonrpc";
|
|
18
19
|
|
|
19
20
|
/** Serve until the client closes stdin, which is how it says the connection is over. */
|
|
20
|
-
export async function serveAcpOverStdio(opts: { durableRequests?: boolean } = {}): Promise<void> {
|
|
21
|
+
export async function serveAcpOverStdio(opts: { durableRequests?: boolean; steward?: string } = {}): Promise<void> {
|
|
21
22
|
// chant#2384 — every prompt this session carries is authored by the model,
|
|
22
23
|
// and `approve` is a verb in chant's registry like any other, so nothing in
|
|
23
24
|
// the transport stops `chant run <op>` being followed by
|
|
@@ -26,6 +27,12 @@ export async function serveAcpOverStdio(opts: { durableRequests?: boolean } = {}
|
|
|
26
27
|
// shell; the same-origin rule then refuses it.
|
|
27
28
|
setGateOrigin("acp");
|
|
28
29
|
|
|
30
|
+
// chant#2749 — the session is a steward's. A decision point an Op asks during
|
|
31
|
+
// a turn names the steward, makes its model call through the steward's
|
|
32
|
+
// brokered capability, and is left open for a person; `points answer` from
|
|
33
|
+
// this session is refused, as the gate's resolution is above.
|
|
34
|
+
if (opts.steward) setStewardTurn({ steward: opts.steward });
|
|
35
|
+
|
|
29
36
|
const server = new AcpServer({
|
|
30
37
|
durableRequests: opts.durableRequests ?? false,
|
|
31
38
|
version: lexiconVersion(),
|
package/src/acp/turn.ts
CHANGED
|
@@ -236,6 +236,18 @@ async function runOpTurn(
|
|
|
236
236
|
return gatedReply(opts, command, status);
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
+
// chant#2749 — an open decision point ends the turn as a gate does. The
|
|
240
|
+
// question is a record in the workspace, where hud asks a person; it is not
|
|
241
|
+
// asked here, because this thread is the steward's and nobody reads it for
|
|
242
|
+
// questions, and the steward never answers one itself.
|
|
243
|
+
const point = status.result?.record.point ?? status.point;
|
|
244
|
+
if (status.state === "waiting" && point) {
|
|
245
|
+
sink.message(
|
|
246
|
+
`Op "${command.op}" is waiting on decision point "${point.point}": question ${point.id} is ${point.state}.\n` +
|
|
247
|
+
`A person answers it through hud or \`chant workspace points answer ${point.id}\`, and the next run reads the answer.\n`,
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
|
|
239
251
|
sink.message(JSON.stringify(status.result?.record ?? status, null, 2) + "\n");
|
|
240
252
|
return { stopReason: "end_turn" };
|
|
241
253
|
}
|
package/src/composites/box.ts
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* name: "studio-box",
|
|
17
17
|
* repo: { url: "https://github.com/arugula-salad/studio", ref: "main" },
|
|
18
18
|
* setupScript: readFileSync("box/provision-template.sh", "utf8"),
|
|
19
|
+
* model: "anthropic/claude-sonnet-4-5",
|
|
19
20
|
* permissionPolicy: { default: "auto_allow" },
|
|
20
21
|
* allowedHosts: ["registry.npmjs.org", "github.com"],
|
|
21
22
|
* vault: { secrets: [{ key: "STUDIO_SECRET", value: "${STUDIO_SECRET}" }] },
|
|
@@ -55,6 +56,21 @@
|
|
|
55
56
|
* workspace check` fails a box member whose files hold one
|
|
56
57
|
* (`box-credential-declared`).
|
|
57
58
|
*
|
|
59
|
+
* One credential reaches the box anyway (#2780). fountain v0.21.0 gives every
|
|
60
|
+
* sandbox a callback token, `FOUNTAIN_TOKEN`, in the environment of each exec
|
|
61
|
+
* it makes into it (the setup script's included), scoped to the owner
|
|
62
|
+
* (`sandbox_api_access: owner`). Its opt-out, `sandbox_api_access: none`, is
|
|
63
|
+
* refused for a persistent sandbox, and a box is always persistent, so no
|
|
64
|
+
* option here can turn it off (managoat/fountain#2497). The composite records
|
|
65
|
+
* it instead: the Agent's metadata carries `box-sandbox-api-access: owner`
|
|
66
|
+
* (`BOX_SANDBOX_API_ACCESS_METADATA_KEY`), and the member's `box` block is
|
|
67
|
+
* expected to declare the capability that stands for it,
|
|
68
|
+
* `BOX_FOUNTAIN_CALLBACK_CAPABILITY`: `fountain-callback`, brokered by fountain
|
|
69
|
+
* itself, with scope `owner`. It is named apart from a `fountain` capability a
|
|
70
|
+
* lobby brokers, which a box may declare as well. `chant workspace check`
|
|
71
|
+
* reports a box member that builds a `Box` and does not declare it
|
|
72
|
+
* (`box-fountain-callback-undeclared`).
|
|
73
|
+
*
|
|
58
74
|
* ## The port
|
|
59
75
|
*
|
|
60
76
|
* fountain's `Environment` and `Agent` have no field for a served port (the
|
|
@@ -86,6 +102,30 @@ export const BOX_PORT_METADATA_KEY = "box-port";
|
|
|
86
102
|
/** The metadata key a box agent's resolved allowed vaults (or `"any"`) are recorded under, for the read contract. */
|
|
87
103
|
export const BOX_ALLOWED_VAULTS_METADATA_KEY = "box-allowed-vault-ids";
|
|
88
104
|
|
|
105
|
+
/**
|
|
106
|
+
* The metadata key a box agent's sandbox callback access is recorded under
|
|
107
|
+
* (#2780): `owner`, the scope of the `FOUNTAIN_TOKEN` fountain v0.21.0 gives
|
|
108
|
+
* every persistent sandbox.
|
|
109
|
+
*/
|
|
110
|
+
export const BOX_SANDBOX_API_ACCESS_METADATA_KEY = "box-sandbox-api-access";
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* The sandbox callback access a box has on the pinned spec: `owner`. fountain
|
|
114
|
+
* v0.21.0 accepts `none` only for a fresh ephemeral sandbox (managoat/fountain#2497).
|
|
115
|
+
*/
|
|
116
|
+
export const BOX_SANDBOX_API_ACCESS = "owner";
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The capability a box member's `box` block declares for fountain's callback
|
|
120
|
+
* token (#2780), as `chant workspace check` expects it: fountain brokers it
|
|
121
|
+
* itself, and its scope is the owner's.
|
|
122
|
+
*/
|
|
123
|
+
export const BOX_FOUNTAIN_CALLBACK_CAPABILITY = {
|
|
124
|
+
name: "fountain-callback",
|
|
125
|
+
broker: "fountain",
|
|
126
|
+
scope: [BOX_SANDBOX_API_ACCESS],
|
|
127
|
+
} as const;
|
|
128
|
+
|
|
89
129
|
/** `Agent.sandbox_provider`'s values at the pinned spec. */
|
|
90
130
|
export const BOX_SANDBOX_PROVIDERS = ["sprites", "e2b", "daytona", "runner"] as const;
|
|
91
131
|
|
|
@@ -133,8 +173,13 @@ export interface BoxOpts {
|
|
|
133
173
|
setupTimeoutSeconds?: number;
|
|
134
174
|
/** Agent runtime. Default `claude`. */
|
|
135
175
|
runtime?: "claude" | "codex" | "gemini" | "opencode";
|
|
136
|
-
/**
|
|
137
|
-
|
|
176
|
+
/**
|
|
177
|
+
* Canonical provider/model_id. Required (#2776): fountain v0.21.0, the
|
|
178
|
+
* pinned spec, refuses an Agent with no model for every runtime but `acp`
|
|
179
|
+
* (`model: can't be blank` at apply), and a Box's runtime is never `acp`.
|
|
180
|
+
* FTN016 flags the same gap on an Agent built any other way.
|
|
181
|
+
*/
|
|
182
|
+
model: string;
|
|
138
183
|
/** Sandbox backend override. Omitted, the instance default (`SANDBOX_PROVIDER`). A plain `Agent.sandbox_provider` field, so it is already visible on the graph node without extra bookkeeping (unlike `allowedVaults`; see "Allowed vaults in the read contract" above). */
|
|
139
184
|
sandboxProvider?: BoxSandboxProvider;
|
|
140
185
|
/** Per-tool permission policy. Required: fountain's unset policy is `auto_allow`. */
|
|
@@ -183,6 +228,14 @@ export function Box(opts: BoxOpts): BoxResources {
|
|
|
183
228
|
`an allowlist means nothing on an open network. Pass one.`,
|
|
184
229
|
);
|
|
185
230
|
}
|
|
231
|
+
// The type requires it; this is for an untyped caller, so it fails at build
|
|
232
|
+
// rather than at fountain's apply.
|
|
233
|
+
if (typeof opts.model !== "string" || !opts.model.trim()) {
|
|
234
|
+
throw new Error(
|
|
235
|
+
`Box "${opts.name}": model is required — fountain v0.21.0 refuses an Agent with no model ` +
|
|
236
|
+
`for the ${opts.runtime ?? "claude"} runtime. Pass a canonical provider/model_id.`,
|
|
237
|
+
);
|
|
238
|
+
}
|
|
186
239
|
if (!opts.setupScript.trim()) {
|
|
187
240
|
throw new Error(`Box "${opts.name}": setupScript is empty — a box is provisioned by its setup script`);
|
|
188
241
|
}
|
|
@@ -234,12 +287,16 @@ export function Box(opts: BoxOpts): BoxResources {
|
|
|
234
287
|
opts.allowedVaults === "any"
|
|
235
288
|
? "any"
|
|
236
289
|
: allowedVaults!.map((v) => (typeof v === "string" ? v : (v as unknown as { props: { name: string } }).props.name));
|
|
237
|
-
const agentMetadata = {
|
|
290
|
+
const agentMetadata = {
|
|
291
|
+
...metadata,
|
|
292
|
+
[BOX_ALLOWED_VAULTS_METADATA_KEY]: allowedVaultsForReadContract,
|
|
293
|
+
[BOX_SANDBOX_API_ACCESS_METADATA_KEY]: BOX_SANDBOX_API_ACCESS,
|
|
294
|
+
};
|
|
238
295
|
|
|
239
296
|
const agent = new Agent({
|
|
240
297
|
name: opts.name,
|
|
241
298
|
runtime: opts.runtime ?? "claude",
|
|
242
|
-
|
|
299
|
+
model: opts.model,
|
|
243
300
|
sandbox_mode: "persistent",
|
|
244
301
|
...(opts.sandboxProvider !== undefined ? { sandbox_provider: opts.sandboxProvider } : {}),
|
|
245
302
|
environment,
|