Skip to content

Fountain

The fountain lexicon declares fountain’s workload layer as typed chant resources. fountain runs coding agents in sandboxed VMs; its three declarable kinds are Environment (sandbox baseline), Vault (env-var overrides), and Agent (a runnable agent config).

Types are generated from fountain’s served OpenAPI spec, so they track the real API.

Install it with:

Terminal window
npm install --save-dev @intentius/chant-lexicon-fountain
import { Environment, Agent } from "@intentius/chant-lexicon-fountain";
export const env = new Environment({
name: "team-env",
networking_type: "limited", // FTN010 requires explicit intent
networking_config: { allowed_hosts: ["github.com"] },
metadata: { "managed-by": "chant" }, // enables owned-only reconcile/prune
});
export const helper = new Agent({
name: "helper",
model: "anthropic/claude-sonnet-4-6",
runtime: "claude",
environment: env, // typed ref — dangling name = build error
});
  1. chant build — synthesize and lint. The FTN rules catch open networking, credential literals, and unresolvable ${VAR} references before review.
  2. chant run <apply op> or call fountainApply — reconcile against the API. Idempotent by name.
  3. chant lifecycle diff --live — drift. A UI edit to an owned Environment shows up here.
  4. chant import --from — adopt UI-built resources into typed files.

FOUNTAIN_ENDPOINT (defaults to the hosted instance) and FOUNTAIN_TOKEN. Mint a token via POST /api/auth/token with email and password, or from the account UI. The same code applies to a local mix phx.server fountain by pointing FOUNTAIN_ENDPOINT at it — registration and token mint work headless, so CI needs no browser.

MetricCount
Resources3
Property types1
Services1
Intrinsic functions0
Pseudo-parameters0
Lint rules9

Lexicon version: 0.38.0
Namespace: Fountain