@intentic/resources
v1.252.0
Published
The closed list of things that can be deployed: the resource vocabulary, and the single authority on it.
Downloads
11,948
Readme
@intentic/resources
The closed list of things that can be deployed: the resource vocabulary, and the single authority on it.
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.
Responsibilities
- 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, …). - Define
ResolvedNode: aRawNodewhosetypeis constrained to aResourceType. - Catalog
OUTPUTS: the output fields each kind produces, so downstream nodes can ref them with confidence. - It is a vocabulary only: no resolution logic, no reconciliation, no provider code.
Key files
- src/resource-types.ts: the
ResourceTypeunion +ResolvedNode. - src/outputs.ts: the
OUTPUTSmap (kind → produced fields). - src/index.ts: public surface.
How it fits
Sits just above graph. The state-resolver emits ResolvedNodes 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.
Conventions & gotchas
- The union is closed: adding a kind means updating
ResourceType, itsOUTPUTSentry, the emitter instate-resolver, and a provider inproviders, together. - Keep
OUTPUTSaccurate: refs are validated against it, so a missing/typo'd output surfaces as a resolve-time error. See ARCHITECTURE.md.
