@intentic/state-resolver 1.309.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.
- package/README.md +24 -19
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,27 +1,32 @@
|
|
|
1
|
-
#
|
|
1
|
+
# state-resolver
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Turns an intent into the desired-state graph: it derives the needs, fills each from a catalog of concrete tools, and emits every resource node the deployment requires.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
```mermaid
|
|
6
|
+
flowchart LR
|
|
7
|
+
intent["IntentSet"] --> needs["need-resolver<br/>resolveNeeds"]
|
|
8
|
+
needs --> state(["state-resolver<br/>resolveState"])
|
|
9
|
+
catalog["catalogFor<br/>Forgejo · GitHub · GitLab stack"] --> state
|
|
10
|
+
state -- "emit → ResolvedNode[]" --> compile["graph<br/>compile"]
|
|
11
|
+
compile --> artifact["DesiredStateGraph"]
|
|
12
|
+
```
|
|
6
13
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
14
|
+
- The catalog follows the intent: `i.have.github` selects the GitHub stack, `i.have.gitlab` the GitLab stack, otherwise self-hosted Forgejo. In all three, Komodo deploys and a Cloudflare tunnel exposes the apps.
|
|
15
|
+
- Each need must map to exactly one catalog option. Zero or several options throw; the resolver makes no choices.
|
|
16
|
+
- `src/resolvers` holds one resolver per concern: the control plane, apps, routes, backings with per-app bindings, catalog services, agent workspaces, users and teams, and scheduled backups.
|
|
17
|
+
- Every derived id and platform domain comes from `src/lib/ids.ts`. The SDK imports the same functions, so a handle's ids match the graph's.
|
|
18
|
+
- It is pure. The Cloudflare `zone` arrives as an argument; the CLI discovers it before calling.
|
|
11
19
|
|
|
12
20
|
## Key files
|
|
13
21
|
|
|
14
|
-
- [src/state.ts](src/state.ts)
|
|
15
|
-
- [src/
|
|
16
|
-
- [src/
|
|
17
|
-
- [src/
|
|
18
|
-
- [src/
|
|
22
|
+
- [src/state.ts](src/state.ts) — `resolveState`: needs, catalog assignment, emit, compile.
|
|
23
|
+
- [src/emit/emit.ts](src/emit/emit.ts) — builds the nodes for one assignment, host by host.
|
|
24
|
+
- [src/lib/catalog.ts](src/lib/catalog.ts) — the three stacks and which capabilities each option provides.
|
|
25
|
+
- [src/lib/ids.ts](src/lib/ids.ts) — every derived resource id and platform domain.
|
|
26
|
+
- [src/resolvers/app.ts](src/resolvers/app.ts) — what one app becomes: repo, CI per environment, deployment, route.
|
|
19
27
|
|
|
20
|
-
##
|
|
28
|
+
## Commands
|
|
21
29
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- Adding a resource kind means emitting it here **and** registering its type/outputs in `resources` and a provider in `providers`.
|
|
27
|
-
- Emitter changes are snapshot-tested ([src/emit/emit.test.ts](src/emit/emit.test.ts), [src/state.test.ts](src/state.test.ts)): update fixtures deliberately. See [ARCHITECTURE.md](../../ARCHITECTURE.md).
|
|
30
|
+
```sh
|
|
31
|
+
pnpm --filter @intentic/state-resolver test
|
|
32
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/state-resolver",
|
|
3
|
-
"version": "1.
|
|
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/constants": "1.
|
|
34
|
-
"@intentic/graph": "1.
|
|
35
|
-
"@intentic/need-resolver": "1.
|
|
36
|
-
"@intentic/resources": "1.
|
|
33
|
+
"@intentic/constants": "1.311.0",
|
|
34
|
+
"@intentic/graph": "1.311.0",
|
|
35
|
+
"@intentic/need-resolver": "1.311.0",
|
|
36
|
+
"@intentic/resources": "1.311.0",
|
|
37
37
|
"tslib": "2.8.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|