@intentic/sdk
v1.317.0
Published
The authoring surface of a `deploy.config.ts`: a typed builder that records what infrastructure you have and what you want as a serializable intent.
Readme
sdk
The authoring surface of a deploy.config.ts: a typed builder that records what infrastructure you have and what you want as a serializable intent.
flowchart LR
config["deploy.config.ts"] -- "defineIntent(i => …)" --> sdk(["sdk<br/>createStack"])
sdk -- "IntentSet" --> resolve["intentic deploy resolve"]
sdk -- "defineStack" --> state["state-resolver<br/>one-shot graph"]i.have.*declares inventory intentic reads but never creates or destroys: hosts over SSH, a Cloudflare account, GitHub or GitLab, a backup target, Discord, Stripe.i.want.*declares what intentic owns end to end: apps with environments, catalog services, backing databases, caches, auth and object storage, users, teams and per-host agent workspaces.- Each call returns a typed handle whose properties are inert refs (
host.internalIp,app.environments.production.url). Passing a handle to another declaration is how wiring happens; nothing is derived here. defineIntentis what a config exports.defineStackalso runs the resolvers, which tests and fixtures use to get a graph without the CLI.
Key files
- src/index.ts —
defineIntentanddefineStack. - src/handles.ts — the
Have,Wantand handle interfaces an author sees. - src/stack.ts —
createStack, the recorder that turns calls into anIntentSet. - src/fixtures/deploy.config.ts — a small config, compiled and asserted against
deploy.graph.ts. - src/outputs.test.ts — handle output refs must match the
OUTPUTStable inresources.
Commands
pnpm --filter @intentic/sdk test