@intentic/resources 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 +16 -21
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,27 +1,22 @@
1
- # @intentic/resources
1
+ # resources
2
2
 
3
- The closed list of things that can be deployed: the resource vocabulary, and the single authority on it.
3
+ The closed vocabulary of resource kinds the deploy tool emits and reconciles, with the outputs each kind produces.
4
4
 
5
- Shared by the state resolver (which emits these kinds), the engine (which reconciles them), and the providers (which implement them). The graph IR treats a node's `type` as an opaque string; this package says which kinds exist and what each produces. Depends only on [`@intentic/graph`](../graph).
5
+ ```mermaid
6
+ flowchart LR
7
+ state["state-resolver<br/>emits ResolvedNode"] --> resources(["resources<br/>ResourceType · OUTPUTS"])
8
+ engine["engine<br/>checks produced outputs"] --> resources
9
+ providers["providers<br/>one per kind"] --> resources
10
+ contract["api-contract<br/>plan schemas"] --> resources
11
+ ```
6
12
 
7
- ## Responsibilities
8
-
9
- - Define `ResourceType`: the closed union of every resource kind intentic understands (`host`, `cloudflare`, `forgejo`, `forgejo-runner`, `komodo`, `tunnel`, `cf-route`, `repo`, `ci`, `deployment`, `app`, `backup`, `workspace`, …).
10
- - Define `ResolvedNode`: a `RawNode` whose `type` is constrained to a `ResourceType`.
11
- - Catalog `OUTPUTS`: the output fields each kind produces, so downstream nodes can ref them with confidence.
12
- - It is a vocabulary only: no resolution logic, no reconciliation, no provider code.
13
+ - `ResourceType` lists every kind, from `host` and `cloudflare` through `deployment`, `forgejo-team` and `garage-bucket`. `ResolvedNode` narrows a graph node's `type` to it, so a resolver emitting an unknown kind fails to compile.
14
+ - `OUTPUTS` is the runtime table of which outputs each kind produces. The engine rejects a provider that returns an undeclared output, and `plan` seeds pending values from it. An entry ending in `:` allows a prefix, for per-app keys like `appWebhook:<app>`.
15
+ - The SDK's handle properties mirror `OUTPUTS`; a test in [sdk](../sdk) fails when the two disagree.
16
+ - Types and one table only: no logic, no tests of its own.
13
17
 
14
18
  ## Key files
15
19
 
16
- - [src/resource-types.ts](src/resource-types.ts): the `ResourceType` union + `ResolvedNode`.
17
- - [src/outputs.ts](src/outputs.ts): the `OUTPUTS` map (kind → produced fields).
18
- - [src/index.ts](src/index.ts): public surface.
19
-
20
- ## How it fits
21
-
22
- Sits just above `graph`. The `state-resolver` emits `ResolvedNode`s of these types; the `engine` keys its `ResourceType → Provider` map on them; `providers` implements one provider per kind. Adding a new resource kind starts here.
23
-
24
- ## Conventions & gotchas
25
-
26
- - The union is **closed**: adding a kind means updating `ResourceType`, its `OUTPUTS` entry, the emitter in `state-resolver`, and a provider in `providers`, together.
27
- - Keep `OUTPUTS` accurate: refs are validated against it, so a missing/typo'd output surfaces as a resolve-time error. See [ARCHITECTURE.md](../../ARCHITECTURE.md).
20
+ - [src/resource-types.ts](src/resource-types.ts) — `ResourceType` and `ResolvedNode`.
21
+ - [src/outputs.ts](src/outputs.ts) — `OUTPUTS`, keyed exhaustively over `ResourceType`.
22
+ - [src/index.ts](src/index.ts) — the package's two exports.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentic/resources",
3
- "version": "1.310.0",
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.310.0",
33
+ "@intentic/graph": "1.311.0",
34
34
  "tslib": "2.8.1"
35
35
  },
36
36
  "devDependencies": {