@intentic/resources 1.18.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Artur Kurowski
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # @intentic/resources
2
+
3
+ The closed **resource vocabulary** 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 is the single authority on which kinds exist and what each produces. Depends only on [`@intentic/graph`](../graph).
4
+
5
+ ## Responsibilities
6
+
7
+ - 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`, …).
8
+ - Define `ResolvedNode` — a `RawNode` whose `type` is constrained to a `ResourceType`.
9
+ - Catalog `OUTPUTS` — the output fields each kind produces, so downstream nodes can ref them with confidence.
10
+ - It is a vocabulary only: no resolution logic, no reconciliation, no provider code.
11
+
12
+ ## Key files
13
+
14
+ - [src/resource-types.ts](src/resource-types.ts) — the `ResourceType` union + `ResolvedNode`.
15
+ - [src/outputs.ts](src/outputs.ts) — the `OUTPUTS` map (kind → produced fields).
16
+ - [src/index.ts](src/index.ts) — public surface.
17
+
18
+ ## How it fits
19
+
20
+ 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.
21
+
22
+ ## Conventions & gotchas
23
+
24
+ - The union is **closed** — adding a kind means updating `ResourceType`, its `OUTPUTS` entry, the emitter in `state-resolver`, and a provider in `providers`, together.
25
+ - 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).
@@ -0,0 +1,3 @@
1
+ export { OUTPUTS } from "./outputs.js";
2
+ export type { ResolvedNode, ResourceType } from "./resource-types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { OUTPUTS } from "./outputs.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ResourceType } from "./resource-types.js";
2
+ export declare const OUTPUTS: Readonly<Record<ResourceType, readonly string[]>>;
3
+ //# sourceMappingURL=outputs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outputs.d.ts","sourceRoot":"","sources":["../src/outputs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAOxD,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC,CAuDpE,CAAC"}
@@ -0,0 +1,38 @@
1
+ export const OUTPUTS = Object.freeze({
2
+ host: ["internalIp", "publicIp"],
3
+ cloudflare: ["zoneId", "accountId"],
4
+ discord: ["guildId", "reconcileWebhook", "appWebhook:"],
5
+ "cf-route": ["url"],
6
+ tunnel: ["tunnelId", "cname"],
7
+ forgejo: ["url", "internalUrl", "runnerToken", "gitToken", "packagesToken"],
8
+ "forgejo-user": [],
9
+ "forgejo-org": [],
10
+ "forgejo-team": [],
11
+ repo: ["cloneUrl", "sshUrl"],
12
+ "control-repo": ["cloneUrl", "sshUrl"],
13
+ "forgejo-runner": [],
14
+ komodo: ["url", "internalUrl"],
15
+ "komodo-periphery": [],
16
+ "komodo-server": ["serverName"],
17
+ "komodo-user": [],
18
+ ci: [],
19
+ deployment: ["internalUrl", "url"],
20
+ "forgejo-notify": [],
21
+ "komodo-notify": [],
22
+ signoz: ["url", "internalUrl", "otlpEndpoint"],
23
+ workspace: ["internalUrl", "healthUrl", "previewBase"],
24
+ backup: [],
25
+ postgres: ["internalHost", "port"],
26
+ valkey: ["internalHost", "port"],
27
+ "postgres-database": ["url"],
28
+ "valkey-namespace": ["url"],
29
+ authentik: ["url", "issuerUrl", "internalUrl"],
30
+ "authentik-client": ["issuer", "clientId", "clientSecret"],
31
+ garage: ["internalEndpoint", "endpoint"],
32
+ "garage-bucket": ["endpoint", "accessKey", "secretKey", "bucket"],
33
+ github: ["owner"],
34
+ "gh-repo": ["cloneUrl", "sshUrl"],
35
+ "gh-ci": [],
36
+ "gh-deployment": ["internalUrl", "url"],
37
+ });
38
+ //# sourceMappingURL=outputs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outputs.js","sourceRoot":"","sources":["../src/outputs.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,OAAO,GAAsD,MAAM,CAAC,MAAM,CAAC;IACpF,IAAI,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;IAChC,UAAU,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC;IAGnC,OAAO,EAAE,CAAC,SAAS,EAAE,kBAAkB,EAAE,aAAa,CAAC;IACvD,UAAU,EAAE,CAAC,KAAK,CAAC;IACnB,MAAM,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,OAAO,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,eAAe,CAAC;IAG3E,cAAc,EAAE,EAAE;IAClB,aAAa,EAAE,EAAE;IACjB,cAAc,EAAE,EAAE;IAClB,IAAI,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;IAC5B,cAAc,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;IACtC,gBAAgB,EAAE,EAAE;IACpB,MAAM,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC;IAE9B,kBAAkB,EAAE,EAAE;IAEtB,eAAe,EAAE,CAAC,YAAY,CAAC;IAC/B,aAAa,EAAE,EAAE;IACjB,EAAE,EAAE,EAAE;IACN,UAAU,EAAE,CAAC,aAAa,EAAE,KAAK,CAAC;IAClC,gBAAgB,EAAE,EAAE;IACpB,eAAe,EAAE,EAAE;IACnB,MAAM,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,cAAc,CAAC;IAG9C,SAAS,EAAE,CAAC,aAAa,EAAE,WAAW,EAAE,aAAa,CAAC;IAEtD,MAAM,EAAE,EAAE;IAGV,QAAQ,EAAE,CAAC,cAAc,EAAE,MAAM,CAAC;IAClC,MAAM,EAAE,CAAC,cAAc,EAAE,MAAM,CAAC;IAGhC,mBAAmB,EAAE,CAAC,KAAK,CAAC;IAC5B,kBAAkB,EAAE,CAAC,KAAK,CAAC;IAG3B,SAAS,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,aAAa,CAAC;IAC9C,kBAAkB,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,cAAc,CAAC;IAC1D,MAAM,EAAE,CAAC,kBAAkB,EAAE,UAAU,CAAC;IACxC,eAAe,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,CAAC;IAEjE,MAAM,EAAE,CAAC,OAAO,CAAC;IAEjB,SAAS,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;IAEjC,OAAO,EAAE,EAAE;IAEX,eAAe,EAAE,CAAC,aAAa,EAAE,KAAK,CAAC;CAC1C,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { RawNode } from "@intentic/graph";
2
+ export type ResourceType = "host" | "cloudflare" | "github" | "discord" | "cf-route" | "tunnel" | "forgejo" | "forgejo-user" | "forgejo-org" | "forgejo-team" | "repo" | "control-repo" | "forgejo-runner" | "komodo" | "komodo-periphery" | "komodo-server" | "komodo-user" | "ci" | "deployment" | "forgejo-notify" | "komodo-notify" | "signoz" | "workspace" | "backup" | "postgres" | "postgres-database" | "valkey" | "valkey-namespace" | "authentik" | "authentik-client" | "garage" | "garage-bucket" | "gh-repo" | "gh-ci" | "gh-deployment";
3
+ export type ResolvedNode = Omit<RawNode, "type"> & {
4
+ readonly type: ResourceType;
5
+ };
6
+ //# sourceMappingURL=resource-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-types.d.ts","sourceRoot":"","sources":["../src/resource-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAK/C,MAAM,MAAM,YAAY,GAClB,MAAM,GACN,YAAY,GACZ,QAAQ,GACR,SAAS,GACT,UAAU,GACV,QAAQ,GACR,SAAS,GACT,cAAc,GACd,aAAa,GACb,cAAc,GACd,MAAM,GACN,cAAc,GACd,gBAAgB,GAChB,QAAQ,GACR,kBAAkB,GAClB,eAAe,GACf,aAAa,GACb,IAAI,GACJ,YAAY,GACZ,gBAAgB,GAChB,eAAe,GACf,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,UAAU,GACV,mBAAmB,GACnB,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,kBAAkB,GAClB,QAAQ,GACR,eAAe,GACf,SAAS,GACT,OAAO,GACP,eAAe,CAAC;AAItB,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=resource-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-types.js","sourceRoot":"","sources":["../src/resource-types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@intentic/resources",
3
+ "version": "1.18.0",
4
+ "description": "",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/radarsu/intentic.git",
10
+ "directory": "_libs/resources"
11
+ },
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "publishConfig": {
16
+ "access": "public",
17
+ "registry": "https://registry.npmjs.org/"
18
+ },
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": {
23
+ "@intentic/src": "./src/index.ts",
24
+ "default": "./dist/index.js"
25
+ },
26
+ "require": {
27
+ "@intentic/src": "./src/index.ts",
28
+ "default": "./dist/index.js"
29
+ }
30
+ }
31
+ },
32
+ "dependencies": {
33
+ "tslib": "2.8.1",
34
+ "@intentic/graph": "1.18.0"
35
+ },
36
+ "devDependencies": {
37
+ "typescript": "5.9.3",
38
+ "@intentic/tsconfig": "0.0.0"
39
+ },
40
+ "scripts": {
41
+ "build": "tsc",
42
+ "watch": "tsc --build --watch"
43
+ }
44
+ }