@intentic/need-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 +19 -17
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
#
|
|
1
|
+
# need-resolver
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Defines the intent data the SDK records and derives from it the abstract capabilities the deployment needs, before any concrete tool is chosen.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
```mermaid
|
|
6
|
+
flowchart LR
|
|
7
|
+
sdk["sdk<br/>i.have · i.want"] -- "IntentSet" --> need(["need-resolver<br/>resolveNeeds"])
|
|
8
|
+
need -- "Need[]<br/>capability · scope · plane" --> state["state-resolver<br/>catalog picks an option"]
|
|
9
|
+
```
|
|
6
10
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
- It
|
|
11
|
+
- A `Need` is one capability at one scope: `source-control`, `docker-registry` and `infra-control` on the control-plane host, `deployment-target` on every host that runs something, and `domain` on the Cloudflare account.
|
|
12
|
+
- Many apps collapse into one set of needs. The control-plane host is the first declared host with apps (`controlPlaneHostId`).
|
|
13
|
+
- It validates the intent as a whole: apps without Cloudflare, targets on undeclared hosts and workspace tools naming undeclared services all throw here.
|
|
14
|
+
- The intent stays plain data. Handles become resource-id strings, so an `IntentSet` serializes and carries no SDK types.
|
|
10
15
|
|
|
11
16
|
## Key files
|
|
12
17
|
|
|
13
|
-
- [src/intent.ts](src/intent.ts)
|
|
14
|
-
- [src/inputs.ts](src/inputs.ts)
|
|
15
|
-
- [src/needs.ts](src/needs.ts)
|
|
16
|
-
- [src/
|
|
18
|
+
- [src/intent.ts](src/intent.ts) — `IntentSet` and one intent type per declaration kind.
|
|
19
|
+
- [src/inputs.ts](src/inputs.ts) — the author-supplied input shapes (`HostInput`, `EnvironmentInput`, `UpdatePolicy`).
|
|
20
|
+
- [src/needs.ts](src/needs.ts) — `resolveNeeds`, `Capability`, `Plane` and the control-plane host rule.
|
|
21
|
+
- [src/needs.test.ts](src/needs.test.ts) — which intents produce which needs, by example.
|
|
17
22
|
|
|
18
|
-
##
|
|
23
|
+
## Commands
|
|
19
24
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- Needs are intentionally provider-agnostic: keep concrete tech names out of this layer.
|
|
25
|
-
- Each need carries its `Plane`; downstream resolution and ordering rely on it. Co-located tests in [src/needs.test.ts](src/needs.test.ts). See [ARCHITECTURE.md](../../ARCHITECTURE.md).
|
|
25
|
+
```sh
|
|
26
|
+
pnpm --filter @intentic/need-resolver test
|
|
27
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/need-resolver",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.311.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@intentic/graph": "1.
|
|
33
|
+
"@intentic/graph": "1.311.0",
|
|
34
34
|
"tslib": "2.8.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|