@intentius/behold 0.30.0 → 0.30.1

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.
@@ -4,7 +4,7 @@
4
4
  "pins": [
5
5
  {
6
6
  "package": "@intentius/chant-lexicon-terraform",
7
- "version": "0.124.46"
7
+ "version": "0.124.51"
8
8
  }
9
9
  ],
10
10
  "members": [
@@ -93,7 +93,7 @@ naming both packages, the ranges behold declares, where it looked, and the line
93
93
  that puts them back:
94
94
 
95
95
  ```sh
96
- npm install @intentius/chant-lexicon-terraform@^0.124.38 @cdktn/hcl2json@^0.24.0
96
+ npm install @intentius/chant-lexicon-terraform@^0.124.51 @cdktn/hcl2json@^0.24.0
97
97
  ```
98
98
 
99
99
  The estate is a declared chant workspace, and chant reads a member's kind from
@@ -4,7 +4,7 @@
4
4
  "pins": [
5
5
  {
6
6
  "package": "@intentius/chant-lexicon-terraform",
7
- "version": "0.124.46"
7
+ "version": "0.124.51"
8
8
  }
9
9
  ],
10
10
  "members": [
@@ -6,10 +6,10 @@
6
6
  "": {
7
7
  "name": "behold-example-three-cloud",
8
8
  "dependencies": {
9
- "@intentius/chant": "^0.124.40",
10
- "@intentius/chant-lexicon-aws": "^0.124.40",
11
- "@intentius/chant-lexicon-azure": "^0.124.40",
12
- "@intentius/chant-lexicon-gcp": "^0.124.40"
9
+ "@intentius/chant": "^0.124.51",
10
+ "@intentius/chant-lexicon-aws": "^0.124.51",
11
+ "@intentius/chant-lexicon-azure": "^0.124.51",
12
+ "@intentius/chant-lexicon-gcp": "^0.124.51"
13
13
  }
14
14
  },
15
15
  "node_modules/@dagrejs/dagre": {
@@ -444,9 +444,9 @@
444
444
  }
445
445
  },
446
446
  "node_modules/@intentius/chant": {
447
- "version": "0.124.40",
448
- "resolved": "https://registry.npmjs.org/@intentius/chant/-/chant-0.124.40.tgz",
449
- "integrity": "sha512-ZyhBR+ggbl6FOolf+xCc/Lj8aAO2XCto+QhJOTkx5WS4e82FIWXBLukSJu/rI4ie/6lqTHBFDhtGzsiyodE/Nw==",
447
+ "version": "0.124.51",
448
+ "resolved": "https://registry.npmjs.org/@intentius/chant/-/chant-0.124.51.tgz",
449
+ "integrity": "sha512-68nNpD7jvpqIjsJSTbIeudeyN0SoYr0+pVrXp2Wc2wVtYWdtmam3O7ANDBBDYWRnWT9I0vuo/L/urZB/EBtERg==",
450
450
  "license": "Apache-2.0",
451
451
  "dependencies": {
452
452
  "@dagrejs/dagre": "^3.0.0",
@@ -473,34 +473,34 @@
473
473
  }
474
474
  },
475
475
  "node_modules/@intentius/chant-lexicon-aws": {
476
- "version": "0.124.40",
477
- "resolved": "https://registry.npmjs.org/@intentius/chant-lexicon-aws/-/chant-lexicon-aws-0.124.40.tgz",
478
- "integrity": "sha512-FNUgx40SChU6Gq9NKabAswBklupr2VWvyVAW0g/fWD6lhyYdkwty+egpaMbVHTRTHKhSDR+QoP+YoETNr2z90g==",
476
+ "version": "0.124.51",
477
+ "resolved": "https://registry.npmjs.org/@intentius/chant-lexicon-aws/-/chant-lexicon-aws-0.124.51.tgz",
478
+ "integrity": "sha512-IgiZ7RTTlaVSNocHwhd1JwRc/VYrL6Eylmz9Y0ueedRpnRd/WgQRdpSyII2qE5Qh2NKUUigLJvSc9J0rC9ONeA==",
479
479
  "license": "Apache-2.0",
480
480
  "dependencies": {
481
481
  "fflate": "^0.8.2",
482
482
  "js-yaml": "^4.3.1"
483
483
  },
484
484
  "peerDependencies": {
485
- "@intentius/chant": "^0.124.40"
485
+ "@intentius/chant": "^0.124.51"
486
486
  }
487
487
  },
488
488
  "node_modules/@intentius/chant-lexicon-azure": {
489
- "version": "0.124.40",
490
- "resolved": "https://registry.npmjs.org/@intentius/chant-lexicon-azure/-/chant-lexicon-azure-0.124.40.tgz",
491
- "integrity": "sha512-if0wRta/8M/zip1AcYX3iI/NEOFgu35KkXXCitOTe+YXqw9Dkij6ITxtr/9kp9g4xJfvOKAN/QaH2mZrxp9W2w==",
489
+ "version": "0.124.51",
490
+ "resolved": "https://registry.npmjs.org/@intentius/chant-lexicon-azure/-/chant-lexicon-azure-0.124.51.tgz",
491
+ "integrity": "sha512-+oaLuw08hm0mQw7DdcezUrStY8YgzOTwCF/5n3aoJEJt2n2p70iY9xLa/4UEk4u+mG7pb4B8QPoSHzSn3fi+lA==",
492
492
  "license": "Apache-2.0",
493
493
  "dependencies": {
494
494
  "fflate": "^0.8.2"
495
495
  },
496
496
  "peerDependencies": {
497
- "@intentius/chant": "^0.124.40"
497
+ "@intentius/chant": "^0.124.51"
498
498
  }
499
499
  },
500
500
  "node_modules/@intentius/chant-lexicon-gcp": {
501
- "version": "0.124.40",
502
- "resolved": "https://registry.npmjs.org/@intentius/chant-lexicon-gcp/-/chant-lexicon-gcp-0.124.40.tgz",
503
- "integrity": "sha512-RgsDWwSzoKIclMqVRiUqzsJ7dsMlHhUrFjOTFIpqn+mZq9azQDZFhIwYxR+wX+3qc2EWwl8RlVg6tAVvw6z1DA==",
501
+ "version": "0.124.51",
502
+ "resolved": "https://registry.npmjs.org/@intentius/chant-lexicon-gcp/-/chant-lexicon-gcp-0.124.51.tgz",
503
+ "integrity": "sha512-AthygbSUsL0ZlYQk13UA1tu1SHJ0AoZGZrFdt5NSj8SVWjQx2waszDz2wjxdvgc/Cfw47dJF92Yv3NHGV/JO4Q==",
504
504
  "license": "Apache-2.0",
505
505
  "dependencies": {
506
506
  "@types/js-yaml": "^4.0.9",
@@ -508,7 +508,7 @@
508
508
  "js-yaml": "^4.3.1"
509
509
  },
510
510
  "peerDependencies": {
511
- "@intentius/chant": "^0.124.40"
511
+ "@intentius/chant": "^0.124.51"
512
512
  }
513
513
  },
514
514
  "node_modules/@types/js-yaml": {
@@ -8,9 +8,9 @@
8
8
  "front-door": "tsx scripts/front-door.ts all --out export"
9
9
  },
10
10
  "dependencies": {
11
- "@intentius/chant": "^0.124.40",
12
- "@intentius/chant-lexicon-aws": "^0.124.40",
13
- "@intentius/chant-lexicon-azure": "^0.124.40",
14
- "@intentius/chant-lexicon-gcp": "^0.124.40"
11
+ "@intentius/chant": "^0.124.51",
12
+ "@intentius/chant-lexicon-aws": "^0.124.51",
13
+ "@intentius/chant-lexicon-azure": "^0.124.51",
14
+ "@intentius/chant-lexicon-gcp": "^0.124.51"
15
15
  }
16
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/behold",
3
- "version": "0.30.0",
3
+ "version": "0.30.1",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "description": "behold — a live control plane on chant. See your whole estate (every substrate in one graph), coloured by drift; act through delegated, gated Ops.",
@@ -48,9 +48,9 @@
48
48
  "dependencies": {
49
49
  "@cdktn/hcl2json": "^0.24.0",
50
50
  "@hono/node-server": "^2.0.5",
51
- "@intentius/chant": "^0.124.46",
52
- "@intentius/chant-k8s-client": "^0.124.24",
53
- "@intentius/chant-lexicon-terraform": "^0.124.46",
51
+ "@intentius/chant": "^0.124.51",
52
+ "@intentius/chant-k8s-client": "^0.124.51",
53
+ "@intentius/chant-lexicon-terraform": "^0.124.51",
54
54
  "@intentius/pinhole": "^0.5.0",
55
55
  "@modelcontextprotocol/sdk": "1.30.1",
56
56
  "ajv": "^8.20.0",
@@ -65,7 +65,7 @@
65
65
  }
66
66
  },
67
67
  "devDependencies": {
68
- "@intentius/chant-lexicon-sql": "^0.124.13",
68
+ "@intentius/chant-lexicon-sql": "^0.124.51",
69
69
  "@types/node": "^26.4.1",
70
70
  "esbuild": "^0.28.0",
71
71
  "playwright": "^1.62.1",
package/web/app.js CHANGED
@@ -7230,6 +7230,70 @@ function renderFlagsTab() {
7230
7230
  }
7231
7231
  initFlags();
7232
7232
 
7233
+ // behold#931: the Repos tab of an org-level workspace. One entry per repo
7234
+ // member: its URL and pinned revision, then the members of that repository's
7235
+ // workspace with each one's status and reason, from /api/workspace/repos (one
7236
+ // chant workspace graph). A failed fetch shows chant's reason as given.
7237
+ let orgHost = null;
7238
+ let orgRead = false;
7239
+ async function initOrgRepos() {
7240
+ if (staticMode || publicMode) return; // /api/workspace/* is refused in a public view
7241
+ const project = await apiFetch("/api/project").then((r) => r.json()).catch(() => ({}));
7242
+ if (!project.workspace || !project.workspace.org) return;
7243
+ orgHost = addPanelTab("repos", "Repos", "The repositories this org workspace names, each with its pinned revision and the members of its workspace. Read from chant when you open the tab.");
7244
+ if (!orgHost) return;
7245
+ orgHost.id = "tab-repos";
7246
+ const tab = document.querySelector('#panel-tabs button[data-tab="repos"]');
7247
+ if (tab) tab.addEventListener("click", () => orgRead || loadOrgRepos());
7248
+ if (orgHost.classList.contains("active")) loadOrgRepos();
7249
+ }
7250
+ async function loadOrgRepos() {
7251
+ orgRead = true;
7252
+ const reading = document.createElement("div");
7253
+ reading.className = "tg-legend";
7254
+ reading.textContent = "reading the repositories from chant (it fetches each pinned revision)";
7255
+ orgHost.replaceChildren(reading);
7256
+ const answer = await apiFetch("/api/workspace/repos")
7257
+ .then((r) => r.json())
7258
+ .catch((e) => ({ error: String(e) }));
7259
+ renderOrgRepos(answer);
7260
+ }
7261
+ function renderOrgRepos(answer) {
7262
+ orgHost.replaceChildren();
7263
+ const line = (cls, text, title, host = orgHost) => {
7264
+ const d = document.createElement("div");
7265
+ d.className = cls;
7266
+ d.textContent = text;
7267
+ if (title) d.title = title;
7268
+ host.appendChild(d);
7269
+ return d;
7270
+ };
7271
+ if (answer.error || answer.refusal) {
7272
+ const r = answer.refusal || { error: answer.error, remedy: "" };
7273
+ line("tg-refusal", [r.error, r.remedy].filter(Boolean).join(" "));
7274
+ if (answer.degraded) line("tg-legend", "Without it, " + answer.degraded + ".");
7275
+ return;
7276
+ }
7277
+ line("fl-title", answer.repos.length + " repositor" + (answer.repos.length === 1 ? "y" : "ies") + (answer.repo ? " in " + answer.repo : ""));
7278
+ for (const r of answer.repos) {
7279
+ const box = document.createElement("div");
7280
+ box.className = "fl-flag";
7281
+ line("fl-flag-title", r.name + " · " + r.url + " @ " + r.rev.slice(0, 12), r.rev, box);
7282
+ line("fl-facts", (r.workspaceName ? "workspace " + r.workspaceName + " · " : "") + (r.read ? "read as " + r.read + " · " : "") + r.status, "", box);
7283
+ if (r.reason) line("tg-refusal", r.reason.code + ": " + r.reason.message, "", box);
7284
+ for (const m of r.members) {
7285
+ line("fl-facts", m.name + " (" + m.kind + ") " + m.status + (m.reason ? " · " + m.reason.code + ": " + m.reason.message : ""), "", box);
7286
+ }
7287
+ orgHost.appendChild(box);
7288
+ }
7289
+ if (!staticMode) {
7290
+ const again = button("Read again", "", () => loadOrgRepos());
7291
+ again.title = "Fetch and read every repository's pinned revision again.";
7292
+ orgHost.appendChild(again);
7293
+ }
7294
+ }
7295
+ initOrgRepos();
7296
+
7233
7297
  // --- #684: collision marks, nodes touched by two in-flight work items --------
7234
7298
  // The Collisions tab reads /api/workspace/collisions when it is opened: the
7235
7299
  // in-flight work items chant reports (workspace status overlap, chant#4025),
@@ -10047,11 +10111,11 @@ function ensureZoomControls(host) {
10047
10111
  // the end of every render(), so the graph underneath stays chant's and a
10048
10112
  // delta for a node that left the estate is simply not applied.
10049
10113
  //
10050
- // Two tiers now (#228's second half): localStorage, and the project's own
10051
- // `.behold/layout.json` behind GET/POST /api/layout. On load the server's map
10114
+ // Two tiers now (#228's second half): localStorage, and the server's per-user
10115
+ // layout cache (outside the project, #469) behind GET/POST /api/layout. On load the server's map
10052
10116
  // merges UNDER the local one (`mergeLayouts` — the drag you can see always
10053
10117
  // wins); on a finished gesture the current lens is POSTed, debounced. A server
10054
- // that refuses — a static export, preview mode, a read-only project, an older
10118
+ // that refuses — a static export, preview mode, an unwritable cache, an older
10055
10119
  // behold with no such route — leaves the localStorage tier working exactly as
10056
10120
  // it did before, and says nothing.
10057
10121
  //
@@ -12,9 +12,9 @@
12
12
  // web/layout-store.test.js). app.js owns the pointer work and the SVG.
13
13
  //
14
14
  // Two tiers, and the second one lands here too: `localStorage` (free, per
15
- // browser) and the `.behold/layout.json` sidecar behind `GET/POST /api/layout`
16
- // (shareable, versionable, and what a server-side export bakes in — see
17
- // src/layout.ts). `mergeLayouts` decides who wins when both have an opinion,
15
+ // browser) and the server's per-user layout cache behind `GET/POST /api/layout`
16
+ // (kept outside the project since #469; it survives a cleared browser and is
17
+ // what a server-side export bakes in — see src/layout.ts). `mergeLayouts` decides who wins when both have an opinion,
18
18
  // and every server call degrades to localStorage-only without a word.
19
19
 
20
20
  const PREFIX = "behold.layout";