@intentius/chant-lexicon-fountain 0.89.0 → 0.91.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/composites/box.d.ts +166 -0
- package/dist/composites/box.d.ts.map +1 -0
- package/dist/composites/steward.d.ts +63 -1
- package/dist/composites/steward.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/integrity.json +3 -3
- package/dist/manifest.json +1 -1
- package/dist/op/activities/fountain-run.d.ts +77 -6
- package/dist/op/activities/fountain-run.d.ts.map +1 -1
- package/dist/op/activities/index.d.ts +2 -2
- package/dist/op/activities/index.d.ts.map +1 -1
- package/dist/skills/chant-fountain-locked-sandboxes.md +1 -1
- package/package.json +2 -2
- package/src/composites/box.ts +255 -0
- package/src/composites/composites.test.ts +300 -1
- package/src/composites/steward.ts +81 -2
- package/src/index.ts +9 -0
- package/src/op/activities/fountain-apply.test.ts +0 -54
- package/src/op/activities/fountain-run.test.ts +219 -0
- package/src/op/activities/fountain-run.ts +136 -18
- package/src/op/activities/index.ts +8 -2
- package/src/skills/chant-fountain-locked-sandboxes.md +1 -1
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Box — a persistent machine that serves an app repo and its tools (#2705).
|
|
3
|
+
*
|
|
4
|
+
* A box is an `Environment` whose `setup_script` provisions the machine (for
|
|
5
|
+
* an arugula studio box, the studio's `box/provision-template.sh`), an
|
|
6
|
+
* `Agent` on a persistent sandbox provisioned from it, and optionally a
|
|
7
|
+
* `Vault` for the secrets every box of this kind shares. `repo` is optional:
|
|
8
|
+
* when given, the Environment's `repositories` clones it in before setup
|
|
9
|
+
* runs; when omitted (#2759 — a blank-slate app, such as the one hud's
|
|
10
|
+
* `init` makes, has no git remote yet), the Environment holds no
|
|
11
|
+
* `repositories` at all and `setup_script` still runs, against whatever
|
|
12
|
+
* working tree is already on the sandbox (a self-hosted `runner`'s own).
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* export const { environment, agent, vault } = Box({
|
|
16
|
+
* name: "studio-box",
|
|
17
|
+
* repo: { url: "https://github.com/arugula-salad/studio", ref: "main" },
|
|
18
|
+
* setupScript: readFileSync("box/provision-template.sh", "utf8"),
|
|
19
|
+
* permissionPolicy: { default: "auto_allow" },
|
|
20
|
+
* allowedHosts: ["registry.npmjs.org", "github.com"],
|
|
21
|
+
* vault: { secrets: [{ key: "STUDIO_SECRET", value: "${STUDIO_SECRET}" }] },
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* Beside `Steward`: a steward is an environment's one writer, an `acp` agent
|
|
26
|
+
* whose every turn is a chant command line, bound to a teammate with a
|
|
27
|
+
* standing thread and schedules. A box is where people and their agents work
|
|
28
|
+
* on an app: a conversational runtime (`claude` by default), the app repo
|
|
29
|
+
* cloned in (when there is one), the provisioning script run as setup, and
|
|
30
|
+
* one served port. It declares no teammate and no schedule, and nothing here
|
|
31
|
+
* starts a conversation. Starting and reaping a box stays a runtime act, as
|
|
32
|
+
* it is in hud's box runtime.
|
|
33
|
+
*
|
|
34
|
+
* The defaults are the closed ones, as `ConciergeStack`'s are, and loosening
|
|
35
|
+
* one is a visible parameter: networking is `limited` with an empty allowlist
|
|
36
|
+
* until `allowedHosts` names hosts or `unrestrictedNetworking: true` opens it
|
|
37
|
+
* (which FTN011 then warns about); `allowed_vault_ids` holds the box's own
|
|
38
|
+
* vault, or nothing, until `allowedVaults` widens it; `sandbox_provider` is
|
|
39
|
+
* unset (the instance default) until `sandboxProvider` names one of the
|
|
40
|
+
* pinned spec's `sprites`, `e2b`, `daytona` or `runner`. `permission_policy`
|
|
41
|
+
* has no default at all, because fountain's unset policy is `auto_allow` and
|
|
42
|
+
* that should be a choice someone wrote down.
|
|
43
|
+
*
|
|
44
|
+
* ## Credentials
|
|
45
|
+
*
|
|
46
|
+
* A box holds no credential (#2726). What it reaches outside itself
|
|
47
|
+
* (inference, Fountain's own API) goes through a broker, such as a studio's
|
|
48
|
+
* lobby, that holds the key and enforces a scope. Those capabilities are
|
|
49
|
+
* declared in the workspace declaration's `box` block on the member that
|
|
50
|
+
* holds this composite, not here: `chant workspace check` and the read
|
|
51
|
+
* contract read the declaration without running this code. Here, a vault
|
|
52
|
+
* secret's value and an `envVars` value are references (`${VAR}`, `op://`,
|
|
53
|
+
* `bws://`, `infisical://`) that resolve at apply, never a literal, and never
|
|
54
|
+
* `process.env.X`, which writes the secret into the built manifest. `chant
|
|
55
|
+
* workspace check` fails a box member whose files hold one
|
|
56
|
+
* (`box-credential-declared`).
|
|
57
|
+
*
|
|
58
|
+
* ## The port
|
|
59
|
+
*
|
|
60
|
+
* fountain's `Environment` and `Agent` have no field for a served port (the
|
|
61
|
+
* pinned spec, v0.21.0). The port is recorded in the metadata of both, under
|
|
62
|
+
* `box-port`, and returned as `port`, so whatever builds the box's URL reads
|
|
63
|
+
* it from the declaration or from fountain's own record without a guess.
|
|
64
|
+
*
|
|
65
|
+
* ## Allowed vaults in the read contract
|
|
66
|
+
*
|
|
67
|
+
* `sandbox_provider` is a plain `Agent` field, so `chant workspace graph
|
|
68
|
+
* --json` (and `chant graph`) already carry it on the agent's node like any
|
|
69
|
+
* other declared attribute. `allowed_vault_ids` is not as plain to read:
|
|
70
|
+
* fountain's own convention (and this composite's, per `allowedVaults`
|
|
71
|
+
* above) is that an *unset* list means "any vault the tenant owns", so a
|
|
72
|
+
* graph reader can't tell "no vaults declared" from "any vault" just by the
|
|
73
|
+
* key's absence. #2759 — a runtime that creates a vault per box (hud's box
|
|
74
|
+
* runtime) needs to check that the declaration permits it — so the resolved
|
|
75
|
+
* list, or the literal string `"any"`, is also recorded in the agent's
|
|
76
|
+
* metadata under `box-allowed-vault-ids` (`BOX_ALLOWED_VAULTS_METADATA_KEY`).
|
|
77
|
+
* It is read-only bookkeeping, alongside `box-port`: the manifest's real
|
|
78
|
+
* `allowed_vault_ids` field is what fountain applies.
|
|
79
|
+
*/
|
|
80
|
+
import { Agent, Environment, Vault } from "../generated/index.js";
|
|
81
|
+
/** The metadata key a box's served port is recorded under, on its Environment and Agent. */
|
|
82
|
+
export declare const BOX_PORT_METADATA_KEY = "box-port";
|
|
83
|
+
/** The metadata key a box agent's resolved allowed vaults (or `"any"`) are recorded under, for the read contract. */
|
|
84
|
+
export declare const BOX_ALLOWED_VAULTS_METADATA_KEY = "box-allowed-vault-ids";
|
|
85
|
+
/** `Agent.sandbox_provider`'s values at the pinned spec. */
|
|
86
|
+
export declare const BOX_SANDBOX_PROVIDERS: readonly ["sprites", "e2b", "daytona", "runner"];
|
|
87
|
+
/** A sandbox backend, per the pinned spec's `sandbox_provider` enum. */
|
|
88
|
+
export type BoxSandboxProvider = (typeof BOX_SANDBOX_PROVIDERS)[number];
|
|
89
|
+
/** The port a box serves when none is given: the door's. */
|
|
90
|
+
export declare const BOX_DEFAULT_PORT = 8080;
|
|
91
|
+
/** Where the app repo is cloned when no `mountPath` is given. */
|
|
92
|
+
export declare const BOX_DEFAULT_MOUNT_PATH = "/workspace/app";
|
|
93
|
+
/** A permission verdict, or a number of seconds under the `ask_timeout` key. */
|
|
94
|
+
export type BoxPermissionPolicy = Record<string, "ask" | "auto_allow" | "auto_deny" | number>;
|
|
95
|
+
/** The app repo the box serves. Shape of fountain's `Repository`. */
|
|
96
|
+
export interface BoxRepositoryOpts {
|
|
97
|
+
/** https clone url. */
|
|
98
|
+
url: string;
|
|
99
|
+
/** Absolute path the repo is cloned to. Default `/workspace/app`. */
|
|
100
|
+
mountPath?: string;
|
|
101
|
+
/** Branch or tag. The default branch when omitted. */
|
|
102
|
+
ref?: string;
|
|
103
|
+
/** Name of the secret holding a clone token. Required for a private repo. */
|
|
104
|
+
secretKey?: string;
|
|
105
|
+
}
|
|
106
|
+
/** The secrets every box of this kind shares, held in a Vault of the box's own. */
|
|
107
|
+
export interface BoxVaultOpts {
|
|
108
|
+
/** Vault name. Default `<name>-secrets`. */
|
|
109
|
+
name?: string;
|
|
110
|
+
description?: string;
|
|
111
|
+
/** Written at apply. A reference such as `${VAR}` or `op://...` that resolves at apply, never a literal (FTN001, and `box-credential-declared` in `chant workspace check`). */
|
|
112
|
+
secrets?: {
|
|
113
|
+
key: string;
|
|
114
|
+
value: string;
|
|
115
|
+
}[];
|
|
116
|
+
}
|
|
117
|
+
export interface BoxOpts {
|
|
118
|
+
/** The Agent's name. The Environment is `<name>-env`. */
|
|
119
|
+
name: string;
|
|
120
|
+
/** The app repo the box serves, cloned into the sandbox before setup runs. Omit for a blank-slate app with no repo yet: the Environment declares no `repositories`, and `setupScript` runs against whatever working tree the sandbox already has. */
|
|
121
|
+
repo?: BoxRepositoryOpts;
|
|
122
|
+
/** The provisioning script's text, run as the Environment's `setup_script`. */
|
|
123
|
+
setupScript: string;
|
|
124
|
+
/** Setup exec timeout, 1 to 900 seconds (FTN024). fountain's default is 120. */
|
|
125
|
+
setupTimeoutSeconds?: number;
|
|
126
|
+
/** Agent runtime. Default `claude`. */
|
|
127
|
+
runtime?: "claude" | "codex" | "gemini" | "opencode";
|
|
128
|
+
/** Canonical provider/model_id. Omitted, fountain's default for the runtime. */
|
|
129
|
+
model?: string;
|
|
130
|
+
/** 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
|
+
sandboxProvider?: BoxSandboxProvider;
|
|
132
|
+
/** Per-tool permission policy. Required: fountain's unset policy is `auto_allow`. */
|
|
133
|
+
permissionPolicy: BoxPermissionPolicy;
|
|
134
|
+
/** Environment packages, passed through. */
|
|
135
|
+
packages?: Record<string, unknown>;
|
|
136
|
+
/** Environment variables, passed through. Not for secrets: use `vault`. */
|
|
137
|
+
envVars?: Record<string, string>;
|
|
138
|
+
/** Egress allowlist under `limited` networking. Default [], deny-all. */
|
|
139
|
+
allowedHosts?: string[];
|
|
140
|
+
/** Open the sandbox's network. FTN011 warns on it. Refused with `allowedHosts`. */
|
|
141
|
+
unrestrictedNetworking?: boolean;
|
|
142
|
+
/** Declare a Vault for the box's shared secrets. */
|
|
143
|
+
vault?: BoxVaultOpts;
|
|
144
|
+
/**
|
|
145
|
+
* Vaults a conversation may attach. Default: the box's own vault, or none.
|
|
146
|
+
* `"any"` leaves the list unset, which fountain reads as any vault the
|
|
147
|
+
* tenant owns: what a runtime that makes a vault per box (hud's) needs.
|
|
148
|
+
*/
|
|
149
|
+
allowedVaults?: "any" | Array<InstanceType<typeof Vault> | string>;
|
|
150
|
+
/** The port the box serves. Default 8080, the door's. Recorded as `box-port` metadata. */
|
|
151
|
+
port?: number;
|
|
152
|
+
system?: string;
|
|
153
|
+
skills?: Array<Record<string, unknown>>;
|
|
154
|
+
mcpServers?: Record<string, unknown>;
|
|
155
|
+
/** Extra metadata, merged over the ownership marker on every resource the box declares. */
|
|
156
|
+
metadata?: Record<string, unknown>;
|
|
157
|
+
}
|
|
158
|
+
export interface BoxResources {
|
|
159
|
+
environment: InstanceType<typeof Environment>;
|
|
160
|
+
agent: InstanceType<typeof Agent>;
|
|
161
|
+
vault?: InstanceType<typeof Vault>;
|
|
162
|
+
/** The served port, as recorded under `box-port`. */
|
|
163
|
+
port: number;
|
|
164
|
+
}
|
|
165
|
+
export declare function Box(opts: BoxOpts): BoxResources;
|
|
166
|
+
//# sourceMappingURL=box.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../src/composites/box.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;AAEH,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE/D,4FAA4F;AAC5F,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAEhD,qHAAqH;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"}
|
|
@@ -44,7 +44,43 @@
|
|
|
44
44
|
* the server does not keep. And a webhook url FTN022 would reject is refused
|
|
45
45
|
* here rather than at synth, because a composite that constructed it would be
|
|
46
46
|
* handing the author a lint error about a resource they never typed.
|
|
47
|
+
*
|
|
48
|
+
* ## One steward whatever the preset (#2731)
|
|
49
|
+
*
|
|
50
|
+
* The composite also returns `declaration`, the steward as core reads it
|
|
51
|
+
* (`declareSteward` in `@intentius/chant/op`): its name, its Ops and its
|
|
52
|
+
* `form`. A box whose preset has no Fountain in some environment (a docker
|
|
53
|
+
* compose box, a Sprites box) sets `form` so that environment is `local`, and
|
|
54
|
+
* there `chant operator --steward <name>` runs the same Ops on the same crons,
|
|
55
|
+
* one at a time, each under its operator lease and the whole process under the
|
|
56
|
+
* steward's own. `chant operator --steward` refuses an environment whose form
|
|
57
|
+
* is `fountain`, because this Agent and Teammate are the steward there. Export
|
|
58
|
+
* `declaration` from an `*.op.ts` file so the operator and `chant workspace
|
|
59
|
+
* status` find it.
|
|
60
|
+
*
|
|
61
|
+
* ## Credentials (#2726)
|
|
62
|
+
*
|
|
63
|
+
* A box's steward holds no credential. Name the box capabilities its Ops use
|
|
64
|
+
* in `capabilities` (the names the member's `box` block in the workspace
|
|
65
|
+
* declaration gives them) and leave `vault` out: the broker holds the key and
|
|
66
|
+
* enforces the scope. `vault` together with `capabilities` is refused.
|
|
67
|
+
* `chant workspace check` fails a box member whose files hold a literal secret
|
|
68
|
+
* (`box-credential-declared`), and `chant workspace status --json` lists each
|
|
69
|
+
* capability the steward names with the broker the box block gives it.
|
|
70
|
+
*
|
|
71
|
+
* ## The coding agent beside it
|
|
72
|
+
*
|
|
73
|
+
* A box also has a coding agent editing the app. They share the checkout by
|
|
74
|
+
* writing different things. The steward's writes are chant writes: run,
|
|
75
|
+
* converge and gate records on the `chant/lifecycle` branch and lease refs
|
|
76
|
+
* under `refs/chant/lease/`, made with git plumbing that never reads or writes
|
|
77
|
+
* the index or the working tree. The app's files, the index and commits on the
|
|
78
|
+
* working branch are the coding agent's. An Op a steward runs does not edit the
|
|
79
|
+
* app. A change to the checkout that an Op has to make (applying a build, a
|
|
80
|
+
* workspace upgrade) belongs under the work item's lease (ws-055), on a branch
|
|
81
|
+
* of its own, never in the coding agent's working tree.
|
|
47
82
|
*/
|
|
83
|
+
import { type StewardDeclaration, type StewardFormSpec } from "@intentius/chant/op";
|
|
48
84
|
import type { OpConfig, OpResource } from "@intentius/chant/op";
|
|
49
85
|
import { Agent, Environment, Schedule, Teammate, Vault, Webhook } from "../generated/index.js";
|
|
50
86
|
/**
|
|
@@ -71,8 +107,18 @@ export interface StewardOpts {
|
|
|
71
107
|
name: string;
|
|
72
108
|
/** The environment its computer is provisioned from: repo, chant, tooling. */
|
|
73
109
|
environment: InstanceType<typeof Environment>;
|
|
74
|
-
/**
|
|
110
|
+
/**
|
|
111
|
+
* Secrets layered on top, for a steward that isn't behind a broker. Omit it
|
|
112
|
+
* under a broker, which holds them, and name `capabilities` instead.
|
|
113
|
+
*/
|
|
75
114
|
vault?: InstanceType<typeof Vault>;
|
|
115
|
+
/**
|
|
116
|
+
* The box capabilities this steward's Ops reach through the box's broker
|
|
117
|
+
* (#2726), by the names the member's `box` block declares, such as
|
|
118
|
+
* `fountain` or `inference`. Refused together with `vault`: a brokered
|
|
119
|
+
* steward holds no credential.
|
|
120
|
+
*/
|
|
121
|
+
capabilities?: string[];
|
|
76
122
|
/**
|
|
77
123
|
* The ops this steward runs. An op with a `schedule` gets a `Schedule`; one
|
|
78
124
|
* without is still listed, so `chant run <op> --on fountain` knows which
|
|
@@ -82,6 +128,16 @@ export interface StewardOpts {
|
|
|
82
128
|
webhook?: StewardWebhookOpts;
|
|
83
129
|
/** Extra metadata merged over the `managed-by` marker on the Agent. */
|
|
84
130
|
metadata?: Record<string, unknown>;
|
|
131
|
+
/**
|
|
132
|
+
* Where this steward runs (#2731). Default `fountain`: this composite's
|
|
133
|
+
* Agent and Teammate are the steward. A box whose preset has no Fountain in
|
|
134
|
+
* some environment names it here, e.g. `{ default: "fountain", environments:
|
|
135
|
+
* { minimal: "local" } }`, and `chant operator --steward <name> --env minimal`
|
|
136
|
+
* runs the same Ops there. The Fountain resources are declared either way; a
|
|
137
|
+
* form that is `local` everywhere is refused, since it needs none of them
|
|
138
|
+
* (use core's `declareSteward` for that).
|
|
139
|
+
*/
|
|
140
|
+
form?: StewardFormSpec;
|
|
85
141
|
}
|
|
86
142
|
export interface StewardResources {
|
|
87
143
|
agent: InstanceType<typeof Agent>;
|
|
@@ -89,6 +145,12 @@ export interface StewardResources {
|
|
|
89
145
|
/** One per op that carries a `schedule`, in `ops` order. */
|
|
90
146
|
schedules: InstanceType<typeof Schedule>[];
|
|
91
147
|
webhook?: InstanceType<typeof Webhook>;
|
|
148
|
+
/**
|
|
149
|
+
* The steward as core reads it (#2731): name, Ops and form. Export it from
|
|
150
|
+
* an `*.op.ts` file so `chant operator --steward` and `chant workspace
|
|
151
|
+
* status` find it.
|
|
152
|
+
*/
|
|
153
|
+
declaration: StewardDeclaration;
|
|
92
154
|
}
|
|
93
155
|
/** The command an `acp` agent speaks the protocol over (#2125). */
|
|
94
156
|
export declare const STEWARD_RUNTIME_COMMAND = "chant acp";
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFG;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,EAA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cAAc,CAAC;AAiBnD,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,CAuG3D"}
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export { ConciergeStack } from "./composites/concierge-stack.js";
|
|
|
14
14
|
export type { ConciergeStackOpts, ConciergeStackResources } from "./composites/concierge-stack.js";
|
|
15
15
|
export { Steward, stewardForOp, 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";
|
|
18
|
+
export type { BoxOpts, BoxResources, BoxRepositoryOpts, BoxVaultOpts, BoxPermissionPolicy, BoxSandboxProvider } from "./composites/box.js";
|
|
17
19
|
export { acpCommandGroup } from "./acp/index.js";
|
|
18
20
|
export { AcpServer } from "./acp/server.js";
|
|
19
21
|
export type { AcpServerOptions } 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,EAC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,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "f55b301389d73946391200a1788013f3b7f368586b497af230a6813a0acda4e8",
|
|
5
5
|
"meta.json": "3301437a2a56eaf1a5cc8f6eabb18a40767f916e09701b2d9bf20aba4066738c",
|
|
6
6
|
"types/index.d.ts": "cf6b634fe0a8e9e96f1d9d07e3df53838def2683dc93dbe3c7fd971c6d3908ae",
|
|
7
7
|
"rules/ftn001-no-secret-literals.ts": "a417b194cd7039911cca9a0f14c49b042dfa6b1ee48517f7c2e22b16590a8599",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"skills/chant-fountain.md": "906a312756a02c88de634915f63ab4dfe1b1078ff4d8cfb4b6dc97eec14bc237",
|
|
22
22
|
"skills/chant-fountain-secrets.md": "40aa847d62547581bebdde630b54796c4e1cbf498869392e0d396d96a75c0ab6",
|
|
23
23
|
"skills/chant-fountain-ops.md": "4e72f0a0c7477a9e98f85ea45e49ba69e8a699f9c13ba0f0cf1cb20a88151373",
|
|
24
|
-
"skills/chant-fountain-locked-sandboxes.md": "
|
|
24
|
+
"skills/chant-fountain-locked-sandboxes.md": "14def4c68b13c2bd561f75819b188968cec85073a5dd8b59e91708e1af26daae"
|
|
25
25
|
},
|
|
26
|
-
"composite": "
|
|
26
|
+
"composite": "d961f51d2dbd943d5da0fb56f8c82649c3392c02c62222d68c81069b9c9cdefb"
|
|
27
27
|
}
|
package/dist/manifest.json
CHANGED
|
@@ -1,15 +1,62 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* fountainRun — start a conversation from a declared Agent and follow it
|
|
3
|
-
* to
|
|
3
|
+
* to the end of its turn.
|
|
4
4
|
*
|
|
5
5
|
* Conversations are runs, not declarables (the one fountain kind the
|
|
6
6
|
* lexicon deliberately does not model as a resource). This op is the
|
|
7
|
-
* imperative half: resolve the agent by name, POST the conversation,
|
|
8
|
-
* poll until
|
|
9
|
-
*
|
|
7
|
+
* imperative half: resolve the agent by name, POST the conversation, and
|
|
8
|
+
* poll until the turn is done.
|
|
9
|
+
*
|
|
10
|
+
* What "done" means depends on the agent's `sandbox_mode` (#2718). An
|
|
11
|
+
* `ephemeral` conversation's machine is its own and this polls the
|
|
12
|
+
* conversation's own status to `completed | failed | timed_out |
|
|
13
|
+
* terminated` — none of which a running server's conversation status
|
|
14
|
+
* actually reaches on its own, so in practice this waits out `timeoutMs`
|
|
15
|
+
* and terminates, as it always has. A `persistent` agent's conversation
|
|
16
|
+
* (`Steward`, and `Box` from #2705) shares one machine across every
|
|
17
|
+
* conversation on it, and a turn ending there does not tear the sandbox
|
|
18
|
+
* down: the conversation settles on `idle`, not on any of the four
|
|
19
|
+
* statuses above. Waiting for one of those on a persistent agent is the
|
|
20
|
+
* bug this op used to have — it waited out the whole deadline after the
|
|
21
|
+
* turn had already finished, then terminated a machine that was meant to
|
|
22
|
+
* persist. For `idle`, this instead reads the finished turn back
|
|
23
|
+
* (`GET .../turns`) and returns its own outcome (`completed | failed |
|
|
24
|
+
* interrupted` — fountain's `end_turn` block, or an error) without
|
|
25
|
+
* terminating anything.
|
|
26
|
+
*
|
|
27
|
+
* Terminating the conversation's machine on deadline (a hung run should
|
|
28
|
+
* not outlive the op that started it) still happens whenever the turn has
|
|
29
|
+
* not ended — for either sandbox mode. `terminate` makes the choice
|
|
30
|
+
* explicit rather than leaving it implicit in `sandbox_mode`.
|
|
10
31
|
*/
|
|
11
32
|
import { type FountainHttp, type FountainConnectionDeps } from "./fountain-apply.js";
|
|
33
|
+
/**
|
|
34
|
+
* Conversation statuses that end an *ephemeral* agent's run. `completed`
|
|
35
|
+
* and `timed_out` are not values fountain's `Conversation.status` takes
|
|
36
|
+
* today (its enum is `pending | running | idle | failed | terminated`) —
|
|
37
|
+
* they are kept so a server that starts reporting them is handled without
|
|
38
|
+
* a further change here.
|
|
39
|
+
*/
|
|
12
40
|
export declare const TERMINAL_STATUSES: Set<string>;
|
|
41
|
+
/**
|
|
42
|
+
* Conversation statuses that end a *persistent* agent's run: everything
|
|
43
|
+
* {@link TERMINAL_STATUSES} does, plus `idle` — the status a persistent
|
|
44
|
+
* conversation settles on once its turn ends, machine still up (#2718).
|
|
45
|
+
*/
|
|
46
|
+
export declare const PERSISTENT_DONE_STATUSES: Set<string>;
|
|
47
|
+
/**
|
|
48
|
+
* How `fountainRun` treats the conversation's machine once its wait ends
|
|
49
|
+
* (#2718).
|
|
50
|
+
*
|
|
51
|
+
* - `on-deadline` — terminate only when `timeoutMs` is hit with the turn
|
|
52
|
+
* still unfinished, never on a turn that ended cleanly. This was
|
|
53
|
+
* `fountainRun`'s only behavior before this option existed.
|
|
54
|
+
* - `never` — never terminate, even past the deadline; the caller, or
|
|
55
|
+
* fountain's own idle/max-lifetime bounds, is responsible for the machine.
|
|
56
|
+
* - `always` — terminate whenever the wait ends, whether the turn ended
|
|
57
|
+
* cleanly or the deadline fired.
|
|
58
|
+
*/
|
|
59
|
+
export type TerminatePolicy = "never" | "on-deadline" | "always";
|
|
13
60
|
export interface FountainRunArgs {
|
|
14
61
|
/** Agent name (resolved against /api/agents) or a raw agent id. */
|
|
15
62
|
agent: string;
|
|
@@ -26,19 +73,43 @@ export interface FountainRunArgs {
|
|
|
26
73
|
profile?: string;
|
|
27
74
|
/** Project root `chant.config.ts` is read from. Default: process.cwd(). */
|
|
28
75
|
cwd?: string;
|
|
29
|
-
/** Give up
|
|
76
|
+
/** Give up after this long. Default 10 min. */
|
|
30
77
|
timeoutMs?: number;
|
|
31
78
|
/** Poll interval. Default 5s. */
|
|
32
79
|
pollMs?: number;
|
|
80
|
+
/**
|
|
81
|
+
* When to terminate the conversation's machine (#2718). Default follows
|
|
82
|
+
* the agent's `sandbox_mode`: `on-deadline` for `ephemeral` (unchanged),
|
|
83
|
+
* `never` for `persistent` — its machine is a home meant to outlive the
|
|
84
|
+
* conversation, so a run that hits its deadline leaves it be unless this
|
|
85
|
+
* says otherwise.
|
|
86
|
+
*/
|
|
87
|
+
terminate?: TerminatePolicy;
|
|
33
88
|
/** Injectable clock/sleep for tests. */
|
|
34
89
|
sleep?: (ms: number) => Promise<void>;
|
|
35
90
|
}
|
|
36
91
|
export interface FountainRunResult {
|
|
37
92
|
conversationId: string;
|
|
93
|
+
/**
|
|
94
|
+
* The run's outcome. For a persistent agent whose turn ended, this is the
|
|
95
|
+
* turn's own status (`completed | failed | interrupted`); otherwise it is
|
|
96
|
+
* the conversation's status when the wait ended (`terminated` on a
|
|
97
|
+
* deadline).
|
|
98
|
+
*/
|
|
38
99
|
status: string;
|
|
39
|
-
/** True when the
|
|
100
|
+
/** True when the agent's `sandbox_mode` resolved to `persistent`. */
|
|
101
|
+
persistent: boolean;
|
|
102
|
+
/** True when the op hit its deadline with the turn still unfinished. */
|
|
40
103
|
terminatedByDeadline: boolean;
|
|
41
104
|
}
|
|
105
|
+
export interface ResolvedAgent {
|
|
106
|
+
id: string;
|
|
107
|
+
/** `ephemeral` or `persistent`; fountain's own default is `ephemeral`. */
|
|
108
|
+
sandboxMode: string;
|
|
109
|
+
}
|
|
110
|
+
/** Resolve an agent by name or id, along with its `sandbox_mode`. */
|
|
111
|
+
export declare function resolveAgent(http: FountainHttp, agent: string): Promise<ResolvedAgent>;
|
|
112
|
+
/** Agent id only — the common case, and the one call sites outside this file use. */
|
|
42
113
|
export declare function resolveAgentId(http: FountainHttp, agent: string): Promise<string>;
|
|
43
114
|
export declare function fountainRun(args: FountainRunArgs, http?: FountainHttp, deps?: FountainConnectionDeps): Promise<FountainRunResult>;
|
|
44
115
|
//# 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;;;;;;;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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;AAeD,wBAAsB,WAAW,CAC/B,IAAI,EAAE,eAAe,EACrB,IAAI,CAAC,EAAE,YAAY,EACnB,IAAI,CAAC,EAAE,sBAAsB,GAC5B,OAAO,CAAC,iBAAiB,CAAC,CAwD5B"}
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export { fountainApply, resolveEndpoint, resolveToken, resolveConnection, parseManifest, toApplyPayload, isChantOwned, defaultFountainHttp, DEFAULT_FOUNTAIN_BASE_URL, OWNERSHIP_KEY, OWNERSHIP_VALUE, } from "./fountain-apply.js";
|
|
8
8
|
export type { FountainApplyArgs, FountainApplySummary, ManifestResource, FountainHttp, FountainConnectionDeps, } from "./fountain-apply.js";
|
|
9
|
-
export { fountainRun, resolveAgentId, TERMINAL_STATUSES } from "./fountain-run.js";
|
|
10
|
-
export type { FountainRunArgs, FountainRunResult } from "./fountain-run.js";
|
|
9
|
+
export { fountainRun, resolveAgent, resolveAgentId, TERMINAL_STATUSES, PERSISTENT_DONE_STATUSES, } from "./fountain-run.js";
|
|
10
|
+
export type { FountainRunArgs, FountainRunResult, ResolvedAgent, TerminatePolicy } from "./fountain-run.js";
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/op/activities/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,aAAa,EACb,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,yBAAyB,EACzB,aAAa,EACb,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,YAAY,EACZ,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/op/activities/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,aAAa,EACb,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,yBAAyB,EACzB,aAAa,EACb,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,YAAY,EACZ,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,WAAW,EACX,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -31,4 +31,4 @@ The environment's config is the enforcement boundary, so watch it: `chant lifecy
|
|
|
31
31
|
|
|
32
32
|
## Running conversations
|
|
33
33
|
|
|
34
|
-
Conversations are runs, not resources. Use the `fountainRun` activity: resolves the agent by name, starts (optionally with a prompt and an allowlisted vault),
|
|
34
|
+
Conversations are runs, not resources. Use the `fountainRun` activity: resolves the agent by name, starts (optionally with a prompt and an allowlisted vault), and waits for the turn to end. What "end" means, and what happens to the machine, follows the agent's `sandbox_mode`: an `ephemeral` agent's conversation is polled for a terminal status and terminated on deadline, same as before; a `persistent` agent's (a `Steward` or `Box`) conversation settles on `idle` once its turn ends — machine still up for the next turn — so `fountainRun` reads the turn back and returns its outcome (`completed | failed | interrupted`) without terminating anything, by default. Pass `terminate: "on-deadline" | "always"` to opt a persistent agent's run back into ending the machine. Multi-turn interaction (follow-up prompts, interrupt) is fountain's own conversations API — keep chant to the lifecycle edges.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-fountain",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.91.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.91.0",
|
|
54
54
|
"typescript": "^5.9.3",
|
|
55
55
|
"zod": "^4.3.6"
|
|
56
56
|
},
|