@intentius/behold 0.6.0 → 0.8.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/AGENTS.md +9 -2
- package/README.md +12 -2
- package/demos.json +8 -0
- package/dist/cli.js +769 -139
- package/example-argo-estate/README.md +46 -0
- package/example-argo-estate/app-a/chant.config.ts +10 -0
- package/example-argo-estate/app-a/manifests/app.yaml +54 -0
- package/example-argo-estate/app-a/package.json +13 -0
- package/example-argo-estate/app-a/src/app.ts +35 -0
- package/example-argo-estate/app-a/tsconfig.json +1 -0
- package/example-argo-estate/app-b/chant.config.ts +9 -0
- package/example-argo-estate/app-b/manifests/app.yaml +54 -0
- package/example-argo-estate/app-b/package.json +13 -0
- package/example-argo-estate/app-b/src/app.ts +34 -0
- package/example-argo-estate/app-b/tsconfig.json +1 -0
- package/example-argo-estate/control-plane/chant.config.ts +14 -0
- package/example-argo-estate/control-plane/package.json +13 -0
- package/example-argo-estate/control-plane/src/argo.ts +69 -0
- package/example-argo-estate/control-plane/tsconfig.json +1 -0
- package/example-argo-estate/package-lock.json +1949 -0
- package/example-argo-estate/package.json +10 -0
- package/example-flux-estate/README.md +13 -8
- package/example-flux-estate/app-a/package.json +3 -3
- package/example-flux-estate/app-b/package.json +3 -3
- package/example-flux-estate/control-plane/package.json +2 -2
- package/example-flux-estate/control-plane/src/flux.ts +6 -0
- package/example-flux-estate/package-lock.json +17 -17
- package/example-k8s/README.md +16 -2
- package/example-k8s/base/deployment.yaml +21 -0
- package/example-k8s/base/kustomization.yaml +3 -0
- package/example-k8s/base/service.yaml +12 -0
- package/example-k8s/chant.config.ts +10 -0
- package/example-k8s/overlays/dev/kustomization.yaml +6 -0
- package/example-k8s/package-lock.json +43 -40
- package/example-k8s/package.json +4 -4
- package/example-writes/package-lock.json +18 -16
- package/example-writes/package.json +3 -3
- package/package.json +3 -2
- package/web/app.js +359 -21
- package/web/icons/cncf/argo.svg +1 -0
- package/web/icons/cncf/flux.svg +1 -0
- package/web/icons/cncf/helm.svg +1 -0
- package/web/icons/k8s/c-role.svg +1 -0
- package/web/icons/k8s/cm.svg +1 -0
- package/web/icons/k8s/crb.svg +1 -0
- package/web/icons/k8s/crd.svg +1 -0
- package/web/icons/k8s/cronjob.svg +1 -0
- package/web/icons/k8s/deploy.svg +1 -0
- package/web/icons/k8s/ds.svg +1 -0
- package/web/icons/k8s/ep.svg +1 -0
- package/web/icons/k8s/group.svg +1 -0
- package/web/icons/k8s/hpa.svg +1 -0
- package/web/icons/k8s/ing.svg +1 -0
- package/web/icons/k8s/job.svg +1 -0
- package/web/icons/k8s/limits.svg +1 -0
- package/web/icons/k8s/netpol.svg +1 -0
- package/web/icons/k8s/ns.svg +1 -0
- package/web/icons/k8s/pod.svg +1 -0
- package/web/icons/k8s/psp.svg +1 -0
- package/web/icons/k8s/pv.svg +1 -0
- package/web/icons/k8s/pvc.svg +1 -0
- package/web/icons/k8s/quota.svg +1 -0
- package/web/icons/k8s/rb.svg +1 -0
- package/web/icons/k8s/role.svg +1 -0
- package/web/icons/k8s/rs.svg +1 -0
- package/web/icons/k8s/sa.svg +1 -0
- package/web/icons/k8s/sc.svg +1 -0
- package/web/icons/k8s/secret.svg +1 -0
- package/web/icons/k8s/sts.svg +1 -0
- package/web/icons/k8s/svc.svg +1 -0
- package/web/icons/k8s/user.svg +1 -0
- package/web/icons/k8s/vol.svg +1 -0
- package/web/index.html +192 -84
- package/web/layout-store.js +118 -0
- package/web/layout-store.test.js +163 -0
- package/web/theme.js +58 -6
package/AGENTS.md
CHANGED
|
@@ -17,7 +17,7 @@ apply creds.
|
|
|
17
17
|
## Getting a server
|
|
18
18
|
|
|
19
19
|
```sh
|
|
20
|
-
npx @intentius/behold serve <chant-project-dir> --port 4600 # or: preview / demo
|
|
20
|
+
npx @intentius/behold serve <chant-project-dir> --port 4600 # or: preview / demo / doctor
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
`behold demo` needs no project at all — it copies the bundled example and serves
|
|
@@ -28,7 +28,14 @@ graph.
|
|
|
28
28
|
## The read loop
|
|
29
29
|
|
|
30
30
|
0. **discover** — GET `/api` lists every route with a one-line description,
|
|
31
|
-
plus the server's version and a link back to this guide.
|
|
31
|
+
plus the server's version and a link back to this guide. Before the server
|
|
32
|
+
exists (or when a route answers with an error you'd have to guess at), run
|
|
33
|
+
`npx @intentius/behold doctor <dir> --json`: a read-only diagnosis of the
|
|
34
|
+
project's kind, its own chant install and version, declared lexicons, the
|
|
35
|
+
envs the picker will infer, the bound kube context versus the ambient one,
|
|
36
|
+
substrate readiness and committed Ops. Each check is
|
|
37
|
+
`{name, status: pass|warn|fail, detail, fix}`; the process exits non-zero
|
|
38
|
+
iff something failed. It starts no server and changes nothing.
|
|
32
39
|
1. **observe** — GET `/api/graph` (JSON: `{ ir, svg, meta }`). The mixed graph
|
|
33
40
|
of the project, every node with `id`/`kind`/`lexicon`/`attrs`/`sourceLoc`. Drift
|
|
34
41
|
status, when present, is `attrs._status` (`good`=managed, `warn`=foreign,
|
package/README.md
CHANGED
|
@@ -30,17 +30,27 @@ npx @intentius/behold demo # copies the example to ./behold-demo, ins
|
|
|
30
30
|
The copied project is yours: edit its source and watch the graph change live.
|
|
31
31
|
There's a whole catalog — `behold demo --list` names the rest (`behold demo
|
|
32
32
|
k8s` stands the same loop up on a throwaway k3d cluster: runtime Pods, field
|
|
33
|
-
ownership
|
|
34
|
-
|
|
33
|
+
ownership; `behold demo argo-estate` needs nothing at all — a three-project
|
|
34
|
+
Argo CD estate, declared only, so it runs where Docker doesn't). Every loaded
|
|
35
|
+
demo lands in the panel's recents, so switching between them is the Scope tab.
|
|
35
36
|
|
|
36
37
|
Already have a chant project?
|
|
37
38
|
|
|
38
39
|
```sh
|
|
39
40
|
cd my-chant-project
|
|
41
|
+
npx @intentius/behold doctor # will this project serve well? (read-only)
|
|
40
42
|
npx @intentius/behold preview # → http://localhost:4600, this project's graph
|
|
41
43
|
npx @intentius/behold serve . --env prod --poll 30 # live drift overlay
|
|
42
44
|
```
|
|
43
45
|
|
|
46
|
+
`behold doctor` is the first thing to run on a project behold hasn't seen: one
|
|
47
|
+
line each for the project's kind, its own chant install and version, declared
|
|
48
|
+
lexicons, the envs the picker will infer, the kube context chant binds versus
|
|
49
|
+
your ambient one, substrate readiness and committed Ops — pass/warn/fail with
|
|
50
|
+
a one-line fix. It starts nothing and changes nothing; it exits non-zero only
|
|
51
|
+
when something would actually stop behold serving the project well, so CI can
|
|
52
|
+
gate on it. `--json` for scripts and agents.
|
|
53
|
+
|
|
44
54
|
Driving it from an agent or script? `GET /api` lists every JSON route;
|
|
45
55
|
[AGENTS.md](./AGENTS.md) (shipped in the package) is the read/act contract.
|
|
46
56
|
|
package/demos.json
CHANGED
|
@@ -26,6 +26,14 @@
|
|
|
26
26
|
"setup": "bash scripts/estate-up.sh",
|
|
27
27
|
"serve": { "env": "local", "dirs": ["control-plane", "app-a", "app-b"] }
|
|
28
28
|
},
|
|
29
|
+
{
|
|
30
|
+
"name": "argo-estate",
|
|
31
|
+
"description": "The Argo CD mirror of flux-estate, declared only: an AppProject plus one Application per app project, served with the two apps as one composed estate — project edges from each Application to the AppProject it names, and each Application's destination namespace drawn as a box holding that app's objects. No cluster, no Argo install, no Docker.",
|
|
32
|
+
"source": "bundled",
|
|
33
|
+
"dir": "example-argo-estate",
|
|
34
|
+
"requires": [],
|
|
35
|
+
"serve": { "dirs": ["control-plane", "app-a", "app-b"] }
|
|
36
|
+
},
|
|
29
37
|
{
|
|
30
38
|
"name": "fountain",
|
|
31
39
|
"description": "The mature estate: self-hosted fountain (a real app) on a throwaway k3d cluster — tiers (try the ha tier picker), seams, drift, runtime Pods. Clones INTENTIUS/fountain-ops; ~5 minutes, mostly image pulls. `just down` in the clone removes the cluster.",
|