@intentic/sdk 1.310.0 → 1.311.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.
Files changed (2) hide show
  1. package/README.md +21 -18
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,26 +1,29 @@
1
- # @intentic/sdk
1
+ # sdk
2
2
 
3
- The **authoring surface** a user writes their `deploy.config.ts` against. A declaration uses `i.have.host` / `i.have.cloudflare` (the inventory you have) and `i.want.app` (what you want), wiring each app to its host/Cloudflare via `on` / `expose`. The split is lifecycle ownership, not requirements: intentic never creates or destroys a have, and owns a want end-to-end (create, reconcile, prune, destroy); requirements are the input fields, and may point at haves and wants alike. The support stack each app needs (git+CI, deploy orchestrator, runner, tunnel, routes) is *derived* by the resolvers, authors never name it. Depends on [`@intentic/graph`](../graph), [`@intentic/need-resolver`](../need-resolver), and [`@intentic/state-resolver`](../state-resolver).
3
+ 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.
4
4
 
5
- ## Responsibilities
5
+ ```mermaid
6
+ flowchart LR
7
+ config["deploy.config.ts"] -- "defineIntent(i => …)" --> sdk(["sdk<br/>createStack"])
8
+ sdk -- "IntentSet" --> resolve["intentic deploy resolve"]
9
+ sdk -- "defineStack" --> state["state-resolver<br/>one-shot graph"]
10
+ ```
6
11
 
7
- - Provide the fluent `i.have.*` / `i.want.*` builders and capture them into an `IntentSet`.
8
- - `defineIntent`, the authoring entry: declaration → `IntentSet` (what `intentic deploy resolve` consumes).
9
- - `defineStack`, one-shot convenience: declaration → a single compiled `DesiredStateGraph`.
10
- - Export the handle types (`Host`, `Cloudflare`, `App`, `Repo`, `Deployment`, …) used to wire declarations.
12
+ - `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.
13
+ - `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.
14
+ - 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.
15
+ - `defineIntent` is what a config exports. `defineStack` also runs the resolvers, which tests and fixtures use to get a graph without the CLI.
11
16
 
12
17
  ## Key files
13
18
 
14
- - [src/index.ts](src/index.ts): `defineIntent` / `defineStack` (public entry).
15
- - [src/handles.ts](src/handles.ts): the `i.have`/`i.want` builders and handle types.
16
- - [src/stack.ts](src/stack.ts): assembles the `IntentSet` and runs the resolver pipeline.
17
- - [src/\_\_fixtures\_\_](src/__fixtures__): the canonical `deploy.config.ts` + expected graph (snapshot).
19
+ - [src/index.ts](src/index.ts) — `defineIntent` and `defineStack`.
20
+ - [src/handles.ts](src/handles.ts) — the `Have`, `Want` and handle interfaces an author sees.
21
+ - [src/stack.ts](src/stack.ts) — `createStack`, the recorder that turns calls into an `IntentSet`.
22
+ - [src/__fixtures__/deploy.config.ts](src/__fixtures__/deploy.config.ts) — a small config, compiled and asserted against `deploy.graph.ts`.
23
+ - [src/outputs.test.ts](src/outputs.test.ts) — handle output refs must match the `OUTPUTS` table in `resources`.
18
24
 
19
- ## How it fits
25
+ ## Commands
20
26
 
21
- The front door of the pipeline. A `deploy.config.ts` imports this + `@intentic/graph`; `defineIntent` yields an `IntentSet`; `need-resolver` then `state-resolver` turn it into the `DesiredStateGraph` the `engine` reconciles.
22
-
23
- ## Conventions & gotchas
24
-
25
- - Authors import `env` (secret refs) from its true source, [`@intentic/graph`](../graph): **not** re-exported here.
26
- - The fixtures are snapshot-tested ([src/index.test.ts](src/index.test.ts), [src/deploy.config.test.ts](src/deploy.config.test.ts)); changing builder output updates them. See [_tools/examples/deploy.config.ts](../../_tools/examples/deploy.config.ts) and [ARCHITECTURE.md](../../ARCHITECTURE.md).
27
+ ```sh
28
+ pnpm --filter @intentic/sdk test
29
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentic/sdk",
3
- "version": "1.310.0",
3
+ "version": "1.311.0",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -30,10 +30,10 @@
30
30
  }
31
31
  },
32
32
  "dependencies": {
33
- "@intentic/graph": "1.310.0",
34
- "@intentic/need-resolver": "1.310.0",
35
- "@intentic/resources": "1.310.0",
36
- "@intentic/state-resolver": "1.310.0",
33
+ "@intentic/graph": "1.311.0",
34
+ "@intentic/need-resolver": "1.311.0",
35
+ "@intentic/resources": "1.311.0",
36
+ "@intentic/state-resolver": "1.311.0",
37
37
  "tslib": "2.8.1"
38
38
  },
39
39
  "devDependencies": {