geneseed 4.4.1 → 4.6.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/CHANGELOG.md +37 -0
- package/README.md +6 -6
- package/SHIPPED.md +1 -1
- package/adapters/opencode/HOW-OPENCODE-LOADS.md +3 -2
- package/adapters/opencode/plugins/geneseed-context.js +195 -52
- package/adapters/opencode/plugins/geneseed-guard.js +42 -29
- package/adapters/opencode/plugins/geneseed-learn.js +1 -1
- package/docs/concepts/enforcement-table.md +9 -3
- package/docs/concepts/hooks.md +3 -0
- package/docs/extending.md +1 -1
- package/docs/guides/install-clone.md +1 -1
- package/docs/guides/install.md +2 -2
- package/docs/reference/plugin-context.md +2 -0
- package/docs/reference/troubleshoot-doctor.md +31 -0
- package/docs/reference/troubleshoot-install.md +5 -5
- package/docs/understand/enforced-vs-asked.md +1 -0
- package/harness.config.json +1 -1
- package/js/README.md +8 -5
- package/js/build/bundle.mjs +11 -2
- package/js/build/driver.mjs +1 -10
- package/js/build/emit-claude.mjs +7 -22
- package/js/build/emit-common.mjs +16 -9
- package/js/build/emit-opencode.mjs +5 -11
- package/js/build/generate.mjs +1 -1
- package/js/cli-table.json +15 -0
- package/js/hosts/hooks-context.mjs +1 -4
- package/js/hosts/hooks-done.mjs +186 -0
- package/js/hosts/hooks-learn.mjs +9 -4
- package/js/hosts/hooks.mjs +27 -8
- package/js/hosts/hosts.mjs +2 -0
- package/js/hosts/installs.mjs +47 -11
- package/js/hosts/native.mjs +5 -13
- package/js/hosts/opencode.mjs +37 -22
- package/js/hosts/owned.mjs +19 -5
- package/js/hosts/settings.mjs +17 -11
- package/js/hosts/shim.mjs +24 -10
- package/js/hosts/usage.mjs +4 -3
- package/js/inspect/checks-authoring.mjs +9 -7
- package/js/inspect/checks-constitution.mjs +2 -2
- package/js/inspect/checks-probe.mjs +292 -0
- package/js/inspect/checks-repo.mjs +13 -54
- package/js/inspect/cost.mjs +5 -6
- package/js/inspect/doctor.mjs +29 -3
- package/js/inspect/scan.mjs +9 -5
- package/js/inspect/scorecard-svg.mjs +3 -3
- package/js/inspect/scorecard-yaml.mjs +407 -0
- package/js/inspect/scorecard.mjs +7 -405
- package/js/inspect/status.mjs +14 -13
- package/js/lib/node-floor.mjs +4 -3
- package/js/maintain/migrate.mjs +2 -3
- package/js/maintain/uninstall.mjs +20 -26
- package/js/web/actions.mjs +2 -2
- package/js/web/api.mjs +36 -24
- package/js/web/gates-api.mjs +5 -8
- package/js/web/usage-api.mjs +14 -17
- package/package.json +2 -2
- package/src/skills/rule.md +11 -2
- package/web/dist/assets/{Activity-BZE6REef.js → Activity-Dj0izJwj.js} +1 -1
- package/web/dist/assets/{ActivityDetail-DCB8Cr2W.js → ActivityDetail-wjq5W02K.js} +1 -1
- package/web/dist/assets/Dashboard-UMbgHbzF.js +2 -0
- package/web/dist/assets/{Docs-D30CiqYy.js → Docs-D3ABE_ds.js} +3 -3
- package/web/dist/assets/{GreenhouseView-Djt-4oO5.js → GreenhouseView-C238LWBD.js} +1 -1
- package/web/dist/assets/{Installs-B3bw5ckh.js → Installs-XSm0a_zQ.js} +2 -2
- package/web/dist/assets/JournalView-BUj4Ff-6.js +1 -0
- package/web/dist/assets/{Laws-B9day2FV.js → Laws-yGBJFKgY.js} +1 -1
- package/web/dist/assets/{Library-BpIrLH-O.js → Library-CkaPVUYU.js} +1 -1
- package/web/dist/assets/{Loops-CxH14kyE.js → Loops-CexwOARr.js} +1 -1
- package/web/dist/assets/{OperatorHudView-otOz6Gha.js → OperatorHudView-D5qTQat0.js} +1 -1
- package/web/dist/assets/{Personal-abL6089y.js → Personal-B_Vx9a7a.js} +1 -1
- package/web/dist/assets/Tabs-YZbGqWPW.js +1 -0
- package/web/dist/assets/drawable-BoQnwVpr.js +1 -0
- package/web/dist/assets/index-BmbWeoTM.js +2 -0
- package/web/dist/assets/{index-CO-9wMJY.css → index-BoG1M8Xy.css} +1 -1
- package/web/dist/index.html +2 -2
- package/web/dist/assets/Dashboard-B4Drq5wp.js +0 -2
- package/web/dist/assets/JournalView-OWhx9YKg.js +0 -1
- package/web/dist/assets/Tabs-DjWN0i7A.js +0 -1
- package/web/dist/assets/drawable-C2ZsBZCv.js +0 -1
- package/web/dist/assets/index-CdpLpPQN.js +0 -2
package/js/web/api.mjs
CHANGED
|
@@ -116,6 +116,37 @@ export function viewCfg(host, scope, root) {
|
|
|
116
116
|
return root;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
120
|
+
|
|
121
|
+
/** The last `n` UTC days ending today, oldest first, as 'YYYY-MM-DD' — the ledger charts' window. */
|
|
122
|
+
export const lastDays = (now, n = 30) => Array.from({ length: n }, (_, i) =>
|
|
123
|
+
new Date(now - (n - 1 - i) * DAY_MS).toISOString().slice(0, 10));
|
|
124
|
+
|
|
125
|
+
/** `[host, scope, root, dir]` for each ACTIVE install in `targets` — where its ledgers live. */
|
|
126
|
+
export function* activeInstalls(targets) {
|
|
127
|
+
for (const [host, scope, root] of targets) {
|
|
128
|
+
if (installState(root, host, scope) === 'active') yield [host, scope, root, viewCfg(host, scope, root)];
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** The edited/added/missing tally of a `diffCollect` file list. */
|
|
133
|
+
const driftCounts = (files) => ({
|
|
134
|
+
edited: files.filter((f) => f.status === 'edited').length,
|
|
135
|
+
added: files.filter((f) => f.status === 'added').length,
|
|
136
|
+
missing: files.filter((f) => f.status === 'missing').length,
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The fields every install row opens with, in this order. Theme is narrowed to this row's own
|
|
141
|
+
* host (host-compat B1): a shared repo otherwise answers every row with whichever host's
|
|
142
|
+
* carrier the host-agnostic scan favours.
|
|
143
|
+
*/
|
|
144
|
+
const installRowBase = (host, scope, root, state) => ({
|
|
145
|
+
id: `${host}:${scope}:${root}`, host, scope, path: root, state,
|
|
146
|
+
theme: themeOfDir(root, host),
|
|
147
|
+
footprint: footprintOfDir(root),
|
|
148
|
+
});
|
|
149
|
+
|
|
119
150
|
/**
|
|
120
151
|
* The row `id` carries the ROOT, not only `host:scope`: two project installs of one host (two
|
|
121
152
|
* repos on Bob, say) are both `bob:project`, and the console keys its selection, its React rows
|
|
@@ -127,12 +158,7 @@ export function apiInstalls(state) {
|
|
|
127
158
|
const out = [];
|
|
128
159
|
for (const [host, scope, root] of installTargets()) {
|
|
129
160
|
out.push({
|
|
130
|
-
|
|
131
|
-
state: installState(root, host, scope),
|
|
132
|
-
// Narrowed to this row's own host (host-compat B1): a shared repo otherwise answers
|
|
133
|
-
// every row with whichever host's carrier the host-agnostic scan favours.
|
|
134
|
-
theme: themeOfDir(root, host),
|
|
135
|
-
footprint: footprintOfDir(root),
|
|
161
|
+
...installRowBase(host, scope, root, installState(root, host, scope)),
|
|
136
162
|
posture: postureOfDir(root, host),
|
|
137
163
|
mode: modeOfDir(root, host),
|
|
138
164
|
trust: trustOfDir(root, host),
|
|
@@ -171,21 +197,13 @@ export function apiFleet(state) {
|
|
|
171
197
|
if (st === 'active') {
|
|
172
198
|
try {
|
|
173
199
|
const { files } = diffCollect({ target: dir });
|
|
174
|
-
if (files !== null)
|
|
175
|
-
drift = {
|
|
176
|
-
edited: files.filter((f) => f.status === 'edited').length,
|
|
177
|
-
added: files.filter((f) => f.status === 'added').length,
|
|
178
|
-
missing: files.filter((f) => f.status === 'missing').length,
|
|
179
|
-
};
|
|
180
|
-
}
|
|
200
|
+
if (files !== null) drift = driftCounts(files);
|
|
181
201
|
} catch { /* an install that cannot be re-rendered reports no drift figure, not zero */ }
|
|
182
202
|
}
|
|
183
203
|
let built = null;
|
|
184
204
|
try { built = Math.floor(statSync(path.join(dir, VERSION_MARKER)).mtimeMs / 1000); } catch { /* never built */ }
|
|
185
205
|
installs.push({
|
|
186
|
-
|
|
187
|
-
theme: themeOfDir(root, host),
|
|
188
|
-
footprint: footprintOfDir(root),
|
|
206
|
+
...installRowBase(host, scope, root, st),
|
|
189
207
|
installed_fp: fp,
|
|
190
208
|
verdict: fp === null ? 'unknown' : fp === sourceFp ? 'synced' : 'behind',
|
|
191
209
|
// A project install has no drift check at all (`diffCollect` answers `files: null`), which
|
|
@@ -208,13 +226,7 @@ export function apiOverview(state) {
|
|
|
208
226
|
if (deployed(state)) {
|
|
209
227
|
const { files } = diffCollect({
|
|
210
228
|
target: state.target, theme: state.theme, emit: state.emit });
|
|
211
|
-
if (files !== null)
|
|
212
|
-
diff = {
|
|
213
|
-
edited: files.filter((f) => f.status === 'edited').length,
|
|
214
|
-
added: files.filter((f) => f.status === 'added').length,
|
|
215
|
-
missing: files.filter((f) => f.status === 'missing').length,
|
|
216
|
-
};
|
|
217
|
-
}
|
|
229
|
+
if (files !== null) diff = driftCounts(files);
|
|
218
230
|
}
|
|
219
231
|
let buildTime = null;
|
|
220
232
|
// The SAME mtime twice, on purpose. `build_time` is the stamp a person reads; `build_epoch`
|
|
@@ -413,10 +425,10 @@ export function apiLoopsActive() {
|
|
|
413
425
|
return { loops: activeLoops() };
|
|
414
426
|
}
|
|
415
427
|
|
|
416
|
-
/** The source's release label, or null when it cannot be read. */
|
|
417
428
|
/** Is a newer release on npm than the source this console serves? See update-check.mjs. */
|
|
418
429
|
export const apiUpdate = (state) => updateStatus(state, releaseLabel());
|
|
419
430
|
|
|
431
|
+
/** The source's release label, or null when it cannot be read. */
|
|
420
432
|
function releaseLabel() {
|
|
421
433
|
const v = sourceReleaseVersion({ config: CONFIG });
|
|
422
434
|
return v && v !== '0.0.0' ? v : null;
|
package/js/web/gates-api.mjs
CHANGED
|
@@ -12,21 +12,18 @@ import { readFileSync } from 'node:fs';
|
|
|
12
12
|
import path from 'node:path';
|
|
13
13
|
|
|
14
14
|
import { GATE_LEDGER } from '../hosts/hosts.mjs';
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
15
|
+
import { installTargets } from '../hosts/installs.mjs';
|
|
16
|
+
import { activeInstalls, lastDays } from './api.mjs';
|
|
17
17
|
|
|
18
|
-
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
19
18
|
const WINDOW = 30;
|
|
20
19
|
|
|
21
20
|
export function gateDays({ now = Date.now(), targets = installTargets() } = {}) {
|
|
22
|
-
const days =
|
|
23
|
-
new Date(now - (WINDOW - 1 - i) * DAY_MS).toISOString().slice(0, 10));
|
|
21
|
+
const days = lastDays(now, WINDOW);
|
|
24
22
|
const index = new Map(days.map((d, i) => [d, i]));
|
|
25
23
|
const by = new Map();
|
|
26
|
-
for (const [
|
|
27
|
-
if (installState(root, host, scope) !== 'active') continue;
|
|
24
|
+
for (const [, , , dir] of activeInstalls(targets)) {
|
|
28
25
|
let raw;
|
|
29
|
-
try { raw = readFileSync(path.join(
|
|
26
|
+
try { raw = readFileSync(path.join(dir, GATE_LEDGER), 'utf8'); } catch { continue; }
|
|
30
27
|
for (const line of raw.split('\n')) {
|
|
31
28
|
let e;
|
|
32
29
|
try { e = JSON.parse(line); } catch { continue; }
|
package/js/web/usage-api.mjs
CHANGED
|
@@ -10,15 +10,16 @@
|
|
|
10
10
|
* is not told every skill is unused. `never` lists installed skills and agents with no call in
|
|
11
11
|
* the window, alias stubs included (an alias that never fires is exactly what to prune).
|
|
12
12
|
*
|
|
13
|
-
* Lines older than 90 days are
|
|
14
|
-
* the
|
|
13
|
+
* Lines older than 90 days are skipped when read, never rewritten: a hook may append at any
|
|
14
|
+
* moment, and a GET that rewrote the file would drop that append (or prune a half-written tail).
|
|
15
|
+
* Garbage lines are skipped, never fatal.
|
|
15
16
|
*/
|
|
16
|
-
import { existsSync, readFileSync, readdirSync
|
|
17
|
+
import { existsSync, readFileSync, readdirSync } from 'node:fs';
|
|
17
18
|
import path from 'node:path';
|
|
18
19
|
|
|
19
20
|
import { USAGE_LEDGER, USAGE_OFF } from '../hosts/usage.mjs';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
21
|
+
import { installTargets } from '../hosts/installs.mjs';
|
|
22
|
+
import { activeInstalls, lastDays } from './api.mjs';
|
|
22
23
|
|
|
23
24
|
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
24
25
|
const WINDOW = 30;
|
|
@@ -27,39 +28,35 @@ const day = (ms) => new Date(ms).toISOString().slice(0, 10);
|
|
|
27
28
|
|
|
28
29
|
const listOr = (dir) => { try { return readdirSync(dir); } catch { return []; } };
|
|
29
30
|
|
|
30
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* The ledger's parsed lines from the last `KEEP_DAYS`. Read-only.
|
|
33
|
+
* shortcut: the file is never pruned and grows ~60 bytes per call; if it ever matters, rotate it on
|
|
34
|
+
* the writer side by atomic rename and read both files here.
|
|
35
|
+
*/
|
|
31
36
|
function readLedger(file, cutoff) {
|
|
32
37
|
let raw;
|
|
33
38
|
try { raw = readFileSync(file, 'utf8'); } catch { return []; }
|
|
34
|
-
const lines = raw.split('\n').filter(Boolean);
|
|
35
|
-
const kept = [];
|
|
36
39
|
const out = [];
|
|
37
|
-
for (const line of
|
|
40
|
+
for (const line of raw.split('\n')) {
|
|
38
41
|
let e;
|
|
39
42
|
try { e = JSON.parse(line); } catch { continue; }
|
|
40
43
|
if (!e || typeof e.ts !== 'string' || typeof e.name !== 'string'
|
|
41
44
|
|| (e.kind !== 'skill' && e.kind !== 'agent')) continue;
|
|
42
45
|
if (e.ts < cutoff) continue;
|
|
43
|
-
kept.push(line);
|
|
44
46
|
out.push(e);
|
|
45
47
|
}
|
|
46
|
-
if (kept.length !== lines.length) {
|
|
47
|
-
try { writeFileSync(file, kept.length ? `${kept.join('\n')}\n` : ''); } catch { /* read-only: keep serving */ }
|
|
48
|
-
}
|
|
49
48
|
return out;
|
|
50
49
|
}
|
|
51
50
|
|
|
52
51
|
export function usageSummary({ now = Date.now(), targets = installTargets() } = {}) {
|
|
53
|
-
const days =
|
|
52
|
+
const days = lastDays(now, WINDOW);
|
|
54
53
|
const first = days[0];
|
|
55
54
|
const perDay = new Array(WINDOW).fill(0);
|
|
56
55
|
const counts = new Map();
|
|
57
56
|
const never = [];
|
|
58
57
|
let since = null;
|
|
59
58
|
let enabled = !process.env.GENESEED_NO_USAGE;
|
|
60
|
-
for (const [host, scope, root] of targets) {
|
|
61
|
-
if (installState(root, host, scope) !== 'active') continue;
|
|
62
|
-
const dir = viewCfg(host, scope, root);
|
|
59
|
+
for (const [host, scope, root, dir] of activeInstalls(targets)) {
|
|
63
60
|
const install = `${host}:${scope}:${root}`;
|
|
64
61
|
if (existsSync(path.join(dir, USAGE_OFF))) enabled = false;
|
|
65
62
|
const entries = readLedger(path.join(dir, USAGE_LEDGER), day(now - KEEP_DAYS * DAY_MS));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"//": "Every field here is argued and gated in tests/unit/package_manifest.test.mjs. `files`, `bin` and `engines` each have a test that fails when reality drifts from this file; `version` mirrors harness.config.json and is gated too. Read that docblock before editing this one.",
|
|
3
3
|
"name": "geneseed",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.6.0",
|
|
5
5
|
"description": "A portable, theme-able harness you implant once and use everywhere to grow a disciplined AI coding agent.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"ai",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"author": "Guillaume Lemer",
|
|
25
25
|
"type": "module",
|
|
26
26
|
"engines": {
|
|
27
|
-
"node": ">=22.
|
|
27
|
+
"node": ">=22.7.0"
|
|
28
28
|
},
|
|
29
29
|
"bin": {
|
|
30
30
|
"geneseed": "bin/geneseed-cli.mjs",
|
package/src/skills/rule.md
CHANGED
|
@@ -73,7 +73,11 @@ re-derived. Then take exactly one branch.
|
|
|
73
73
|
rebuild would have seeded it.
|
|
74
74
|
6. **Draft in the file's own format**: the next free `## R<n> — Title` heading, an
|
|
75
75
|
optional `(scope: user|project | source: …)` metadata line, then the rule in one
|
|
76
|
-
short paragraph, plain and testable. For a
|
|
76
|
+
short paragraph, plain and testable. For a rule the user stated, `source:` keeps
|
|
77
|
+
their own words and the day they said them — `source: user 2026-10-16 "never push
|
|
78
|
+
red"` — one sentence at most: it is what later tells a stale rule from a changed
|
|
79
|
+
mind. The metadata line splits on `|`, so write any `|` inside the quote as `/` and
|
|
80
|
+
say so when you show the draft. For a promotion from {{MEMORY}}, set
|
|
77
81
|
`source:` to the memory's name and add `trial until:` about a month out — a
|
|
78
82
|
promoted rule starts on probation.
|
|
79
83
|
7. Show the exact text to the user and wait for explicit consent ({{LAW:deletion-is-deliberate}}) before
|
|
@@ -90,7 +94,12 @@ the user picks "rule" out of impatience and the set inflates.
|
|
|
90
94
|
**Review flow** (on request, or when a `trial until:` date has passed): for each rule
|
|
91
95
|
due, ask whether it actually fired since adoption — graduate it (drop the trial
|
|
92
96
|
marker), demote it back to a {{MEMORY}} fact, or delete it. Same consent gate as
|
|
93
|
-
adoption.
|
|
97
|
+
adoption. Two more cases are due at any time:
|
|
98
|
+
- **Contradicted.** The user's later words contradict a rule: the rule is the suspect.
|
|
99
|
+
Quote both — its `source:` and the new words — and ask which stands.
|
|
100
|
+
- **Broken while only read.** A rule nothing checks but reading it, broken twice
|
|
101
|
+
anyway, is step 1's mechanical case: propose the hook or check rather than
|
|
102
|
+
rewording it.
|
|
94
103
|
|
|
95
104
|
**Consolidation flow** → read [rule/consolidate.md](rule/consolidate.md) and follow it.
|
|
96
105
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./sections-GalMS0Zv.js";import{i as t,t as n}from"./react-DRhoX0kS.js";import{t as r}from"./api-Bp5eW_6m.js";import{
|
|
1
|
+
import{s as e}from"./sections-GalMS0Zv.js";import{i as t,t as n}from"./react-DRhoX0kS.js";import{t as r}from"./api-Bp5eW_6m.js";import{J as i,P as a,_ as o,k as s,y as c}from"./index-BmbWeoTM.js";import{a as l,i as u,n as d,o as f,r as p,t as m}from"./activity-dcg5vF9j.js";import{t as h}from"./usePoll-BmR631BB.js";var g=e(t(),1),_=n();function v({s:e}){let t=p[e.status]||p.idle,n=e.files,r=e.todos,i=r&&r.total>0||e.error||e.blocked_on;return(0,_.jsxs)(`a`,{className:`card pad-md act-card`,href:`#/activity/${encodeURIComponent(e.session_id)}`,children:[(0,_.jsxs)(`div`,{className:`row between wrap gap-12`,children:[(0,_.jsxs)(`div`,{className:`row gap-10`,style:{minWidth:0},children:[(0,_.jsx)(`span`,{className:`feed-dot ${t.cls||`acc`}`,style:{width:9,height:9}}),(0,_.jsxs)(`div`,{style:{minWidth:0},children:[(0,_.jsx)(`h3`,{style:{margin:0},children:e.title||l(e.cwd)||e.session_id}),e.cwd&&(0,_.jsx)(`div`,{className:`dim mono`,style:{fontSize:12,...m},title:e.cwd,children:e.cwd})]})]}),(0,_.jsxs)(`div`,{className:`row gap-8`,style:{flexShrink:0},children:[e.model&&(0,_.jsx)(`span`,{className:`badge mono`,title:`model`,children:e.model}),e.agent&&(0,_.jsx)(`span`,{className:`badge`,children:e.agent}),(0,_.jsxs)(`span`,{className:`badge ${t.cls}`,children:[(0,_.jsx)(`span`,{className:`dot`}),t.label]}),(0,_.jsx)(s,{name:`chevron`,className:`glyph act-chev`})]})]}),e.phase&&(0,_.jsxs)(`div`,{className:`row gap-8`,style:{marginTop:10,fontSize:14},children:[(0,_.jsx)(s,{name:`activity`}),(0,_.jsx)(`span`,{style:m,children:e.phase})]}),(e.tokens>0||e.cost>0||e.turn_started_at||n&&n.count>0)&&(0,_.jsxs)(`div`,{className:`row wrap`,style:{gap:16,marginTop:12,fontSize:13,color:`var(--text-2)`},children:[e.tokens>0&&(0,_.jsxs)(`span`,{children:[f(e.tokens),` tok`]}),e.cost>0&&(0,_.jsxs)(`span`,{children:[`$`,e.cost.toFixed(2)]}),e.turn_started_at?(0,_.jsx)(`span`,{children:(0,_.jsx)(d,{startedAt:e.turn_started_at})}):null,n&&n.count>0&&(0,_.jsxs)(`span`,{children:[n.count,` file`,n.count===1?``:`s`,` `,(0,_.jsxs)(`span`,{style:{color:`var(--good)`},children:[`+`,n.additions]}),` `,(0,_.jsxs)(`span`,{style:{color:`var(--bad)`},children:[`−`,n.deletions]})]})]}),i&&(0,_.jsxs)(`div`,{className:`row between wrap gap-12`,style:{marginTop:12,paddingTop:10,borderTop:`1px solid var(--line)`},children:[r&&r.total>0?(0,_.jsxs)(`span`,{className:`row gap-8 dim`,style:{fontSize:13},children:[(0,_.jsx)(u,{done:r.done,total:r.total}),`plan `,r.done,`/`,r.total]}):(0,_.jsx)(`span`,{}),e.error?(0,_.jsx)(`span`,{className:`badge bad`,title:e.error,style:{maxWidth:300,...m},children:e.error}):e.blocked_on?(0,_.jsx)(`span`,{className:`badge bad`,title:e.blocked_on,style:{maxWidth:300,...m},children:e.blocked_on}):null]}),(0,_.jsxs)(`div`,{className:`dim mono`,style:{fontSize:11,marginTop:8},children:[`updated `,a(e.updated_at),` ago`]})]})}function y(){let[e,t]=(0,g.useState)(null),[n,a]=(0,g.useState)(``);h(e=>r.activity().then(n=>{e()&&(t(n),a(``))},t=>{e()&&a(t.message)}),2e3,[]);let s=!e||e.enabled!==!1,l=e?.activity||[],u=i(),d=async()=>{let e=!s;try{let n=await r.activityToggle(e);t(e=>({...e||{},enabled:n.enabled,activity:n.enabled&&e?.activity||[]})),a(``)}catch(e){a(e.message)}};return(0,_.jsxs)(`div`,{className:`narrow`,children:[(0,_.jsxs)(`div`,{className:`head-row mb-16`,children:[(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`h1`,{className:`h`,children:`Activity`}),(0,_.jsx)(`p`,{className:`sub`,children:`Live OpenCode sessions this harness is running: what each one is doing right now. Refreshes every couple of seconds; sessions drop off when their process exits.`})]}),(0,_.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`center`,flexShrink:0},children:[(0,_.jsx)(`span`,{className:`dim mono`,style:{fontSize:12},children:s?`tracking on`:`tracking off`}),(0,_.jsx)(`div`,{className:`sw-toggle${s?` on`:``}`,role:`switch`,"aria-checked":s,"aria-label":`Toggle activity tracking`,tabIndex:0,onClick:d,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),d())}})]})]}),(0,_.jsx)(o,{error:n,style:{marginBottom:12}}),e?s?l.length===0?(0,_.jsxs)(`div`,{className:`empty`,children:[(0,_.jsx)(`div`,{className:`big`,children:`No active sessions`}),`Run `,(0,_.jsx)(`code`,{children:`opencode`}),` and the sessions it spins up appear here.`]}):(0,_.jsx)(`div`,{className:`stack gap-12`,ref:u,children:l.map(e=>(0,_.jsx)(`div`,{"data-flip":e.session_id,children:(0,_.jsx)(v,{s:e})},e.session_id))}):(0,_.jsxs)(`div`,{className:`empty`,children:[(0,_.jsx)(`div`,{className:`big`,children:`Activity tracking is off`}),`The plugin isn't recording sessions. Flip the switch to turn it back on.`]}):(0,_.jsx)(c,{label:`Reading live sessions…`})]})}export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./sections-GalMS0Zv.js";import{i as t,t as n}from"./react-DRhoX0kS.js";import{t as r}from"./api-Bp5eW_6m.js";import{
|
|
1
|
+
import{s as e}from"./sections-GalMS0Zv.js";import{i as t,t as n}from"./react-DRhoX0kS.js";import{t as r}from"./api-Bp5eW_6m.js";import{P as i,k as a,y as o}from"./index-BmbWeoTM.js";import{a as s,n as c,o as l,r as u,t as d}from"./activity-dcg5vF9j.js";import{t as f}from"./usePoll-BmR631BB.js";var p=e(t(),1),m=n();function h(e){return e.kind===`tool`?e.status===`error`?`bad`:e.status===`completed`?`ok`:`acc`:{retry:`warn`,error:`bad`,subtask:`acc`,text:`acc`}[e.kind]||``}function g({rec:e}){let t=e.who===`you`,n=[];t||(e.kind===`tool`&&e.ms!=null&&n.push(`${(e.ms/1e3).toFixed(1)}s`),e.kind===`step`&&(e.tokens&&n.push(`${l(e.tokens)} tok`),e.cost&&n.push(`$${e.cost.toFixed(2)}`)),e.kind===`subtask`&&e.agent&&n.unshift(e.agent));let r=!t&&(e.kind===`text`||e.kind===`thinking`||e.kind===`step`),i=t?e.text:e.label||e.snippet||e.kind;return(0,m.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`baseline`},children:[(0,m.jsx)(`span`,{className:`badge ${t?``:`acc`}`,style:{flexShrink:0,minWidth:52,justifyContent:`center`},children:t?`you`:`agent`}),(0,m.jsxs)(`div`,{style:{minWidth:0,flex:1,fontSize:13},children:[!t&&(0,m.jsx)(`span`,{className:`feed-dot ${h(e)||`acc`}`,style:{display:`inline-block`,marginRight:8,verticalAlign:`middle`}}),e.kind===`thinking`&&(0,m.jsx)(`span`,{className:`dim`,children:`thinking: `}),r?(0,m.jsx)(`span`,{className:`dim`,children:i}):t?i:(0,m.jsx)(`b`,{children:i}),e.error&&(0,m.jsxs)(`span`,{className:`dim`,children:[`: `,e.error]})]}),n.length>0&&(0,m.jsx)(`span`,{className:`dim mono`,style:{flexShrink:0,fontSize:12},children:n.join(` · `)})]})}function _({turns:e}){return!e||e.length===0?(0,m.jsx)(`div`,{className:`dim`,style:{fontSize:13},children:`No conversation captured yet.`}):(0,m.jsx)(`div`,{className:`stack gap-12`,children:e.map((e,t)=>{let n=e.role===`user`;return(0,m.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`baseline`},children:[(0,m.jsx)(`span`,{className:`badge ${n?``:`acc`}`,style:{flexShrink:0,minWidth:52,justifyContent:`center`},children:n?`you`:`agent`}),(0,m.jsx)(`div`,{style:{minWidth:0,fontSize:13,color:n?`inherit`:`var(--text-2)`},children:e.text})]},t)})})}function v({sid:e}){let[t,n]=(0,p.useState)(null),[h,v]=(0,p.useState)(``),[y,b]=(0,p.useState)(!1),[x,S]=(0,p.useState)(!1);f(t=>r.activityDetail(e).then(e=>{t()&&(n(e),v(``),b(!1))},e=>{t()&&(e.status===404?b(!0):v(e.message))}),2e3,[e]);let C=(0,m.jsxs)(`a`,{className:`btn ghost sm`,href:`#/activity`,style:{marginBottom:12,display:`inline-flex`,gap:6},children:[(0,m.jsx)(a,{name:`arrow`,style:{transform:`rotate(180deg)`}}),` Activity`]});if(y)return(0,m.jsxs)(`div`,{className:`narrow`,children:[C,(0,m.jsxs)(`div`,{className:`empty`,children:[(0,m.jsx)(`div`,{className:`big`,children:`Session ended`}),`It's no longer live. `,(0,m.jsx)(`a`,{href:`#/activity`,children:`Back to Activity`}),`.`]})]});if(!t)return(0,m.jsxs)(`div`,{className:`narrow`,children:[C,(0,m.jsx)(o,{label:`Loading session…`})]});let w=t.session,T=u[w.status]||u.idle,E=w.files,D=w.todos,O=!!(E&&E.items&&E.items.length>0),k=!!(D&&D.items&&D.items.length>0),A=t.conversation||[],j=t.timeline||[],M=[...A.filter(e=>e.role===`user`).map(e=>({who:`you`,text:e.text,t:e.t||0})),...j.map(e=>({...e,who:`agent`}))].sort((e,t)=>(e.t||0)-(t.t||0));return(0,m.jsxs)(`div`,{className:`narrow`,children:[C,h&&(0,m.jsx)(`p`,{className:`badge bad`,style:{marginBottom:12},children:h}),(0,m.jsxs)(`div`,{className:`card pad-md`,children:[(0,m.jsxs)(`div`,{className:`row between wrap gap-12`,children:[(0,m.jsxs)(`div`,{style:{minWidth:0},children:[(0,m.jsx)(`h1`,{className:`h`,style:{margin:0},children:w.title||s(w.cwd)||w.session_id}),w.cwd&&(0,m.jsx)(`div`,{className:`dim mono`,style:{fontSize:12,...d},title:w.cwd,children:w.cwd})]}),(0,m.jsxs)(`div`,{className:`row gap-8`,style:{flexShrink:0},children:[w.model&&(0,m.jsx)(`span`,{className:`badge mono`,children:w.model}),w.agent&&(0,m.jsx)(`span`,{className:`badge`,children:w.agent}),(0,m.jsxs)(`span`,{className:`badge ${T.cls}`,children:[(0,m.jsx)(`span`,{className:`dot`}),T.label]})]})]}),w.phase&&(0,m.jsxs)(`div`,{className:`row gap-8`,style:{marginTop:10,fontSize:14},children:[(0,m.jsx)(a,{name:`activity`}),(0,m.jsx)(`span`,{style:d,children:w.phase})]}),(0,m.jsxs)(`div`,{className:`row wrap`,style:{gap:16,marginTop:12,fontSize:13,color:`var(--text-2)`},children:[w.tokens>0&&(0,m.jsxs)(`span`,{children:[l(w.tokens),` tok`]}),w.cost>0&&(0,m.jsxs)(`span`,{children:[`$`,w.cost.toFixed(2)]}),w.turn_started_at?(0,m.jsx)(`span`,{children:(0,m.jsx)(c,{startedAt:w.turn_started_at})}):null,(0,m.jsxs)(`span`,{className:`dim`,children:[`updated `,i(w.updated_at),` ago`]})]}),(w.error||w.blocked_on)&&(0,m.jsx)(`div`,{style:{marginTop:10},children:(0,m.jsx)(`span`,{className:`badge bad`,style:{maxWidth:`100%`,...d},children:w.error||w.blocked_on})})]}),(O||k)&&(0,m.jsxs)(`div`,{className:`grid gap-12`,style:{marginTop:12,gridTemplateColumns:O&&k?`minmax(0, 1fr) minmax(0, 1fr)`:`1fr`},children:[O&&(0,m.jsxs)(`div`,{className:`card pad-md`,children:[(0,m.jsx)(`div`,{className:`card-head`,children:(0,m.jsxs)(`h3`,{children:[`Files touched `,(0,m.jsxs)(`span`,{className:`dim`,children:[`(`,E.count,`)`]})]})}),(0,m.jsx)(`div`,{className:`stack`,style:{gap:6,marginTop:8},children:E.items.map(e=>(0,m.jsxs)(`div`,{className:`row between gap-12`,style:{fontSize:13},children:[(0,m.jsx)(`span`,{className:`mono`,style:{...d,minWidth:0,flex:1},title:e.file,children:e.file}),(0,m.jsxs)(`span`,{style:{flexShrink:0},children:[(0,m.jsxs)(`span`,{style:{color:`var(--good)`},children:[`+`,e.additions]}),` `,(0,m.jsxs)(`span`,{style:{color:`var(--bad)`},children:[`−`,e.deletions]})]})]},e.file))})]}),k&&(0,m.jsxs)(`div`,{className:`card pad-md`,children:[(0,m.jsx)(`div`,{className:`card-head`,children:(0,m.jsxs)(`h3`,{children:[`Plan`,` `,(0,m.jsxs)(`span`,{className:`dim`,children:[`(`,D.done,`/`,D.total,`)`]})]})}),(0,m.jsx)(`div`,{className:`stack`,style:{gap:6,marginTop:8},children:D.items.map((e,t)=>(0,m.jsxs)(`div`,{className:`row gap-8`,style:{fontSize:13},children:[(0,m.jsx)(`span`,{className:`feed-dot ${e.status===`completed`?`ok`:e.status===`in_progress`?`acc`:``}`}),(0,m.jsx)(`span`,{style:{textDecoration:e.status===`completed`?`line-through`:`none`,color:e.status===`completed`?`var(--text-3)`:`inherit`},children:e.content})]},t))})]})]}),(0,m.jsxs)(`div`,{className:`card pad-md`,style:{marginTop:12},children:[(0,m.jsxs)(`div`,{className:`card-head`,style:{justifyContent:`space-between`,marginBottom:12},children:[(0,m.jsx)(`h3`,{children:`Timeline`}),j.length>0&&(0,m.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>S(e=>!e),children:x?`Show conversation`:`Show all ${j.length} steps`})]}),x?(0,m.jsx)(`div`,{className:`stack gap-12`,children:M.map((e,t)=>(0,m.jsx)(g,{rec:e},t))}):(0,m.jsx)(_,{turns:A})]})]})}export{v as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GreenhouseView-C238LWBD.js","assets/sections-GalMS0Zv.js","assets/react-DRhoX0kS.js","assets/drawable-BoQnwVpr.js","assets/index-BmbWeoTM.js","assets/api-Bp5eW_6m.js","assets/index-BoG1M8Xy.css","assets/jobBuckets-Dbq8ZlWW.js","assets/OperatorHudView-D5qTQat0.js","assets/JournalView-BUj4Ff-6.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e,o as t,r as n,s as r}from"./sections-GalMS0Zv.js";import{i,t as a}from"./react-DRhoX0kS.js";import{t as o}from"./api-Bp5eW_6m.js";import{I as s,L as c,M as l,N as u,P as d,U as f,W as p,_ as m,g as h,j as g,k as _,q as v,t as y,x as b,y as x}from"./index-BmbWeoTM.js";var S=r(i(),1),C={neutral:`Loaded & ready`,imperial:`The Codex in force`,military:`The unit stands ready`,cyberpunk:`Jacked in`,wizard:`Wards in place`,pirate:`The crew stands ready`,gamer:`Game loaded`,sports:`The squad takes the field`,biker:`The crew rolls out`,commentator:`Lights out, away we go`,verstappen:`Setup's in`,joker:`Mic check`,mean:`Rules are up`,marvin:`Online. Reluctantly.`},w=e=>e.deployed?C[e.theme]||`Loaded & ready`:`Not deployed`,T=a();function E({value:e,size:t=232}){let n=v(e,1100)??0,r=t/2-14,i=2*Math.PI*r,a=i*(1-n);return(0,T.jsxs)(`div`,{className:`ring-wrap`,style:{width:t,height:t},children:[(0,T.jsxs)(`svg`,{viewBox:`0 0 ${t} ${t}`,children:[(0,T.jsx)(`circle`,{cx:t/2,cy:t/2,r,fill:`none`,stroke:`var(--surface-3)`,strokeWidth:`10`}),(0,T.jsx)(`circle`,{cx:t/2,cy:t/2,r,fill:`none`,stroke:`var(--accent)`,strokeWidth:`10`,strokeLinecap:`round`,strokeDasharray:i,strokeDashoffset:a}),Array.from({length:48}).map((e,i)=>{let a=i/48*2*Math.PI,o=r-18,s=r-24,c=t/2+Math.cos(a)*o,l=t/2+Math.sin(a)*o,u=t/2+Math.cos(a)*s,d=t/2+Math.sin(a)*s;return(0,T.jsx)(`line`,{x1:c,y1:l,x2:u,y2:d,stroke:`var(--line-2)`,strokeWidth:`1`,opacity:i/48<n?.9:.25},i)})]}),(0,T.jsxs)(`div`,{className:`ring-center`,children:[(0,T.jsxs)(`div`,{className:`pct`,children:[Math.round(n*100),(0,T.jsx)(`span`,{style:{fontSize:20,color:`var(--text-3)`},children:`%`})]}),(0,T.jsx)(`div`,{className:`lbl`,children:`germination`})]})]})}function D({overview:e}){let t=g(e.diff),n=e.counts||{};return(0,T.jsxs)(`div`,{className:`card kpiband rise mb-16`,children:[[{key:`agents`,label:`Agents`,hash:`#/agents`},{key:`skills`,label:`Skills`,hash:`#/skills`},{key:`laws`,label:`Invariants`,hash:`#/laws`}].map(e=>{let t=n[e.key];return(0,T.jsxs)(`a`,{className:`kseg`,href:e.hash,title:`Open ${e.label}`,children:[(0,T.jsx)(`span`,{className:`kseg-n`+(t===0?` zero`:``),children:t==null?`—`:(0,T.jsx)(p,{value:t})}),(0,T.jsx)(`span`,{className:`kseg-l`,children:e.label})]},e.key)}),(0,T.jsx)(`div`,{className:`kseg-spacer`}),(0,T.jsxs)(`button`,{className:`kseg`+(t>0?` hot`:``),onClick:()=>f(`#/diff`),title:`Open changes`,children:[(0,T.jsx)(`span`,{className:`kseg-n`+(t===0?` zero`:``),children:(0,T.jsx)(p,{value:t})}),(0,T.jsx)(`span`,{className:`kseg-l`,children:`Local edits`}),t>0&&(0,T.jsx)(`span`,{className:`delta up`,children:`▲`})]})]})}function O({overview:t}){return(0,T.jsx)(`div`,{className:`genome`,children:n.map((n,r)=>{let i=e[n],a=t.counts?.[n];return(0,T.jsxs)(`div`,{className:`card gcell rise`,style:{"--i":r},onClick:()=>f(`#/section/`+n),children:[(0,T.jsxs)(`div`,{className:`gtop`,children:[(0,T.jsx)(`span`,{className:`gname`,children:i.label}),(0,T.jsx)(_,{name:i.icon,className:`gicon`})]}),(0,T.jsx)(`div`,{className:`gcount`+(a===0?` zero`:``),children:a==null?`—`:(0,T.jsx)(p,{value:a})}),(0,T.jsx)(`div`,{className:`gdesc`,children:i.desc})]},n)})})}function k({jobs:e}){if(!e||e.length===0)return(0,T.jsx)(`div`,{className:`feed`,children:(0,T.jsxs)(`div`,{className:`empty`,children:[(0,T.jsx)(`div`,{className:`big`,children:`No activity yet`}),`Actions you run appear here.`]})});let t={done:`ok`,running:`acc`,failed:`bad`},n=[...e].sort((e,t)=>t.started-e.started).slice(0,8);return(0,T.jsx)(`div`,{className:`feed`,children:n.map(e=>(0,T.jsxs)(`div`,{className:`feed-row`,children:[(0,T.jsx)(`span`,{className:`feed-dot ${t[e.status]||`ok`}`}),(0,T.jsx)(`span`,{className:`feed-txt`,children:(0,T.jsx)(`b`,{children:e.action})}),(0,T.jsxs)(`span`,{className:`feed-when`,children:[d(e.started),` ago`]})]},e.id))})}function A({overview:e,sigil:t,setup:r,jobs:i,onAction:a}){let o=w(e),s=u(e,r);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`div`,{className:`card pad-lg rise mb-16`,children:(0,T.jsxs)(`div`,{className:`hero`,children:[(0,T.jsx)(E,{value:s}),(0,T.jsxs)(`div`,{className:`hero-facts`,children:[(0,T.jsx)(`div`,{className:`ttl`,children:o}),t&&(0,T.jsxs)(`div`,{className:`voice-readout`,children:[(0,T.jsx)(`span`,{className:`vr-cur`,children:`▕`}),(0,T.jsx)(`span`,{className:`vr-txt`,children:t})]},e.theme),(0,T.jsxs)(`p`,{className:`sub`,children:[`One source rendered into `,(0,T.jsx)(`code`,{children:e.target}),`. Every repo on this machine inherits it.`]}),(0,T.jsxs)(`div`,{className:`hero-chips`,children:[(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`voice`}),(0,T.jsx)(`span`,{className:`cv`,style:{textTransform:`capitalize`},children:e.theme})]}),(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`mode`}),(0,T.jsx)(`span`,{className:`cv`,children:e.emit})]}),(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`footprint`}),(0,T.jsx)(`span`,{className:`cv`,children:e.footprint})]}),(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`built`}),(0,T.jsx)(`span`,{className:`cv`,children:e.build_time||`unknown`})]}),(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`fp`}),(0,T.jsx)(`span`,{className:`cv`,children:r?.installed_fp||`—`})]})]}),(0,T.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,T.jsxs)(`button`,{className:`btn`,onClick:()=>a(`update`),children:[(0,T.jsx)(_,{name:`refresh`}),`Update`]}),(0,T.jsxs)(`button`,{className:`btn ghost`,onClick:()=>a(`build-all`),children:[(0,T.jsx)(_,{name:`build`}),`Rebuild`]}),(0,T.jsxs)(`button`,{className:`btn ghost`,onClick:()=>a(`doctor`),children:[(0,T.jsx)(_,{name:`doctor`}),`Run doctor`]})]})]})]})}),(0,T.jsx)(D,{overview:e}),(0,T.jsxs)(`div`,{className:`grid split-status`,children:[(0,T.jsxs)(`div`,{className:`card pad-lg`,children:[(0,T.jsxs)(`div`,{className:`card-head`,children:[(0,T.jsx)(`h3`,{children:`Capability genome`}),(0,T.jsx)(`div`,{className:`right`,children:(0,T.jsxs)(`span`,{className:`tick`,children:[n.length,` sections`]})})]}),(0,T.jsx)(O,{overview:e})]}),(0,T.jsxs)(`div`,{className:`card pad-lg`,children:[(0,T.jsxs)(`div`,{className:`card-head`,children:[(0,T.jsx)(`h3`,{children:`Recent activity`}),(0,T.jsx)(`div`,{className:`right`,children:(0,T.jsxs)(`span`,{className:`badge acc`,children:[(0,T.jsx)(`span`,{className:`dot`}),`live`]})})]}),(0,T.jsx)(k,{jobs:i})]})]})]})}function j({k:t,overview:n,max:r}){let i=e[t],a=n.counts?.[t]??0;return(0,T.jsxs)(`div`,{className:`strand`,children:[(0,T.jsxs)(`span`,{className:`strand-name`,children:[(0,T.jsx)(`span`,{className:`strand-dot`}),(0,T.jsx)(`a`,{href:`#/section/`+t,className:`strand-link stretch-link`,children:i.label})]}),(0,T.jsx)(`div`,{className:`hbar`,children:(0,T.jsx)(`i`,{style:{width:`${a/r*100}%`}})}),(0,T.jsx)(`span`,{className:`strand-val`,children:a})]})}function M({overview:e,sigil:t,setup:r,jobs:i}){let a=l(e.counts),o=r?.version_verdict||``,s=o.includes(`up to date`),c=g(e.diff),u=[[`Source`,`src/, the canonical genetic material`,r?.source_fp||`—`,!0],[`Render`,`geneseed build → ${e.emit}`,e.theme+` voice`,!0],[`Deployed`,e.target,`inherited by every repo`,!1]];return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`div`,{className:`mb-16`,children:(0,T.jsxs)(`div`,{className:`card pad-lg rise`,style:{position:`relative`,overflow:`hidden`},children:[(0,T.jsx)(`h2`,{className:`h`,style:{fontSize:22,margin:`0 0 18px`},children:`Gene-seed lineage`}),(0,T.jsxs)(`div`,{className:`lineage-track`,children:[(0,T.jsx)(`div`,{className:`spine`}),u.map(([e,t,n,r],i)=>(0,T.jsxs)(`div`,{className:`lineage-step`,children:[(0,T.jsx)(`span`,{className:`node ${r?`on`:``}`}),(0,T.jsx)(`div`,{className:`lt`,children:e}),(0,T.jsx)(`div`,{className:`ld`,children:t}),(0,T.jsx)(`div`,{className:`ltag`,children:n})]},i))]}),(0,T.jsx)(`hr`,{className:`hr`}),t&&(0,T.jsxs)(`div`,{className:`voice-readout`,style:{marginBottom:14},children:[(0,T.jsx)(`span`,{className:`vr-cur`,children:`▕`}),(0,T.jsx)(`span`,{className:`vr-txt`,children:t})]},e.theme),(0,T.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,T.jsxs)(`span`,{className:`badge ${s?`ok`:`warn`}`,children:[(0,T.jsx)(`span`,{className:`dot`}),`in sync · `,o]}),(0,T.jsxs)(`span`,{className:`badge`,children:[(0,T.jsx)(`span`,{className:`dot`}),c,` local edits`]})]})]})}),(0,T.jsxs)(`div`,{className:`grid split-even`,children:[(0,T.jsxs)(`div`,{className:`card pad-lg`,children:[(0,T.jsxs)(`div`,{className:`card-head`,children:[(0,T.jsx)(`h3`,{children:`Genome strand`}),(0,T.jsx)(`div`,{className:`right`,children:(0,T.jsx)(`span`,{className:`tick`,children:`by volume`})})]}),n.map(t=>(0,T.jsx)(j,{k:t,overview:e,max:a},t))]}),(0,T.jsxs)(`div`,{className:`card pad-lg`,children:[(0,T.jsx)(`div`,{className:`card-head`,children:(0,T.jsx)(`h3`,{children:`Recent activity`})}),(0,T.jsx)(k,{jobs:i})]})]})]})}function N({overview:t,setup:r,jobs:i}){let a=n.reduce((e,n)=>e+(t.counts?.[n]??0),0),o=l(t.counts),s=t.doctor?.ok,c=t.doctor?.problems?.length??0,u=g(t.diff);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`div`,{className:`card pad-md rise mb-16`,children:(0,T.jsx)(`div`,{className:`row wrap between gap-16`,children:(0,T.jsxs)(`div`,{className:`row`,style:{gap:20,flexWrap:`wrap`},children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`status`}),(0,T.jsx)(`div`,{className:`row`,style:{gap:8,marginTop:4},children:(0,T.jsxs)(`span`,{className:`badge ${t.deployed?`ok`:`warn`}`,children:[(0,T.jsx)(`span`,{className:`dot`}),t.deployed?`deployed`:`not deployed`]})})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`voice`}),(0,T.jsx)(`div`,{className:`metric`,style:{fontSize:18,marginTop:6,textTransform:`capitalize`},children:t.theme})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`mode`}),(0,T.jsx)(`div`,{className:`mono`,style:{fontSize:14,marginTop:6},children:t.emit})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`fingerprint`}),(0,T.jsx)(`div`,{className:`mono`,style:{fontSize:14,marginTop:6,color:`var(--accent)`},children:r?.installed_fp||`—`})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`doctor`}),(0,T.jsx)(`div`,{className:`row`,style:{gap:8,marginTop:4},children:s?(0,T.jsxs)(`span`,{className:`badge ok`,children:[(0,T.jsx)(`span`,{className:`dot`}),`clean`]}):(0,T.jsxs)(`span`,{className:`badge warn`,children:[(0,T.jsx)(`span`,{className:`dot`}),c,` issue`,c===1?``:`s`]})})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`edits`}),(0,T.jsx)(`div`,{className:`metric`,style:{fontSize:18,marginTop:6},children:u})]})]})})}),(0,T.jsxs)(`div`,{className:`grid split-operator`,children:[(0,T.jsxs)(`div`,{className:`card rise`,style:{"--i":1},children:[(0,T.jsxs)(`div`,{className:`card-head pad-lg`,style:{padding:`18px 20px 0`,marginBottom:14},children:[(0,T.jsx)(`h3`,{children:`Sections`}),(0,T.jsx)(`div`,{className:`right`,children:(0,T.jsxs)(`span`,{className:`tick`,children:[a,` entries total`]})})]}),(0,T.jsxs)(`table`,{className:`tbl`,children:[(0,T.jsx)(`thead`,{children:(0,T.jsxs)(`tr`,{children:[(0,T.jsx)(`th`,{children:`Section`}),(0,T.jsx)(`th`,{children:`Detail`}),(0,T.jsx)(`th`,{style:{width:130},children:`Share`}),(0,T.jsx)(`th`,{className:`num`,children:`Count`})]})}),(0,T.jsx)(`tbody`,{children:n.map(n=>{let r=e[n],i=t.counts?.[n]??0;return(0,T.jsxs)(`tr`,{className:`clickable`,children:[(0,T.jsx)(`td`,{className:`name`,children:(0,T.jsx)(`a`,{href:`#/section/`+n,className:`stretch-link`,children:r.label})}),(0,T.jsx)(`td`,{className:`muted`,children:r.desc}),(0,T.jsx)(`td`,{children:(0,T.jsx)(`div`,{className:`hbar`,children:(0,T.jsx)(`i`,{style:{width:`${i/o*100}%`}})})}),(0,T.jsx)(`td`,{className:`num`,children:i})]},n)})})]})]}),(0,T.jsxs)(`div`,{className:`card pad-lg rise`,style:{"--i":2},children:[(0,T.jsx)(`div`,{className:`card-head`,children:(0,T.jsx)(`h3`,{children:`Run log`})}),(0,T.jsx)(k,{jobs:i})]})]})]})}function P(){let[e,t]=(0,S.useState)(!1),[n,r]=(0,S.useState)(null);return(0,T.jsxs)(`div`,{className:`stale-banner`,role:`alert`,children:[(0,T.jsx)(`span`,{children:n||`This console is running code from before your last upgrade.`}),(0,T.jsx)(`button`,{className:`btn sm`,onClick:async()=>{t(!0),r(null);try{await c()}catch(e){r(e.message),t(!1)}},disabled:e,children:e?`Restarting…`:`Restart`})]})}var F=t({default:()=>z}),I=(0,S.lazy)(()=>y(()=>import(`./GreenhouseView-C238LWBD.js`),__vite__mapDeps([0,1,2,3,4,5,6,7]))),L=(0,S.lazy)(()=>y(()=>import(`./OperatorHudView-D5qTQat0.js`),__vite__mapDeps([8,1,2,4,5,6,7]))),R=(0,S.lazy)(()=>y(()=>import(`./JournalView-BUj4Ff-6.js`),__vite__mapDeps([9,1,2,5,3,4,6])));function z({overview:e,overviewError:t,onRetry:n,themes:r,setup:i,runs:a,onAction:c,layout:l=`cultivar`,dataRev:u}){let d=l,[f,p]=(0,S.useState)(`status`),g=e&&r.find(t=>t.name===e.theme)?.sigil||``,{data:_}=s(()=>d===`greenhouse`||d===`operator`?o.doctor().catch(()=>null):Promise.resolve(null),[d,u]),{data:v}=s(()=>d===`journal`?o.recent().catch(()=>null):Promise.resolve(null),[d,u]);if(!e)return t?(0,T.jsxs)(`div`,{children:[(0,T.jsx)(m,{error:`Could not load the harness overview: ${t}`}),(0,T.jsx)(`button`,{className:`btn`,onClick:n,children:`Retry`})]}):(0,T.jsx)(x,{});let y=e.daemon_stale?(0,T.jsx)(P,{}):null;return e.deployed?f===`status`&&d===`journal`?(0,T.jsxs)(S.Suspense,{fallback:(0,T.jsx)(x,{}),children:[y,(0,T.jsx)(R,{overview:e,recent:v,onAction:c,onDirection:p,dataRev:u})]}):(0,T.jsxs)(T.Fragment,{children:[y,(0,T.jsx)(`div`,{className:`head-row`,children:(0,T.jsx)(b,{"aria-label":`Dashboard view`,children:[[`status`,`Status`],[`lineage`,`Lineage`],[`operator`,`Operator`]].map(([e,t])=>(0,T.jsx)(`button`,{className:f===e?`on`:``,onClick:()=>p(e),"aria-pressed":f===e,children:t},e))})}),(0,T.jsxs)(`div`,{className:`view-in`,children:[f===`status`&&d===`cultivar`&&(0,T.jsx)(A,{overview:e,sigil:g,setup:i,jobs:a,onAction:c}),f===`status`&&d===`greenhouse`&&(0,T.jsx)(S.Suspense,{fallback:(0,T.jsx)(x,{}),children:(0,T.jsx)(I,{overview:e,sigil:g,jobs:a,doctor:_,onAction:c})}),f===`status`&&d===`operator`&&(0,T.jsx)(S.Suspense,{fallback:(0,T.jsx)(x,{}),children:(0,T.jsx)(L,{overview:e,jobs:a,doctor:_,onAction:c})}),f===`lineage`&&(0,T.jsx)(M,{overview:e,sigil:g,setup:i,jobs:a}),f===`operator`&&(0,T.jsx)(N,{overview:e,setup:i,jobs:a})]},f)]}):(0,T.jsxs)(T.Fragment,{children:[y,(0,T.jsx)(h,{onAction:c})]})}export{z as default,w as n,F as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{s as e}from"./sections-GalMS0Zv.js";import{i as t,t as n}from"./react-DRhoX0kS.js";import{t as r}from"./api-Bp5eW_6m.js";import{C as i,
|
|
2
|
-
`)){if(i.startsWith("```")){n=!n;continue}if(n)continue;let e=i.match(/^(##|###)\s+(.+?)\s*$/);e&&(r+=1,t.push({level:e[1].length,title:A(e[2]),id:k(e[2],r)}))}return t}var M={"opencode-global":[`install-opencode`,`Global (recommended)`],opencode:[`install-opencode`,`Per repo`],"claude-global":[`install-claude-code`],claude:[`install-claude-code`],"openclaude-global":[`install-openclaude`],openclaude:[`install-openclaude`],"bob-global":[`install-bob`],bob:[`install-bob`],files:[`install-agent-md`]},N=`you already know this`;function P({page:e,overview:t,onAction:n}){let r=(0,D.useRef)(null),i=(0,D.useMemo)(()=>S(e.body,e.links),[e.body,e.links]);(0,D.useEffect)(()=>{let e=r.current;if(!e)return;let t=0;e.querySelectorAll(`h1, h2, h3`).forEach(e=>{if(e.tagName!==`H1`&&(t+=1),!e.id){let n=k(e.textContent||``,t);n&&(e.id=n)}}),e.querySelectorAll(`blockquote`).forEach(e=>{(e.querySelector(`strong`)?.textContent||``).toLowerCase().startsWith(N)&&e.classList.add(`analogy`)})},[i]),(0,D.useEffect)(()=>{let e=r.current;if(!e)return;let t=e=>{let t=e.target.closest(`a[href]`);if(!t)return;let n=t.getAttribute(`href`);n&&n.startsWith(`#/`)&&(e.preventDefault(),
|
|
1
|
+
import{s as e}from"./sections-GalMS0Zv.js";import{i as t,t as n}from"./react-DRhoX0kS.js";import{t as r}from"./api-Bp5eW_6m.js";import{C as i,I as a,S as o,U as s,_ as c,a as l,i as u,k as d,n as f,o as p,r as m,s as h,w as ee,x as g,y as _}from"./index-BmbWeoTM.js";import{a as v,c as y,i as b,l as x,n as S,o as C,r as w,s as T,t as E}from"./Markdown-DrXLM6TA.js";var D=e(t(),1),O=n();function k(e,t=0){let n=String(e).toLowerCase().trim().replace(/[^a-z0-9\s-]/g,``).replace(/\s+/g,`-`).replace(/-+/g,`-`).replace(/^-+|-+$/g,``);return n&&/^[a-z]/.test(n)?n:`h-${t}-${n||`section`}`}function A(e){return e.replace(/!?\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\[\[([^\]]+)\]\]/g,`$1`).replace(/`([^`]*)`/g,`$1`).replace(/\*\*|__/g,``).replace(/\*([^*\s][^*]*)\*/g,`$1`)}function j(e){let t=[],n=!1,r=0;for(let i of(e||``).split(`
|
|
2
|
+
`)){if(i.startsWith("```")){n=!n;continue}if(n)continue;let e=i.match(/^(##|###)\s+(.+?)\s*$/);e&&(r+=1,t.push({level:e[1].length,title:A(e[2]),id:k(e[2],r)}))}return t}var M={"opencode-global":[`install-opencode`,`Global (recommended)`],opencode:[`install-opencode`,`Per repo`],"claude-global":[`install-claude-code`],claude:[`install-claude-code`],"openclaude-global":[`install-openclaude`],openclaude:[`install-openclaude`],"bob-global":[`install-bob`],bob:[`install-bob`],files:[`install-agent-md`]},N=`you already know this`;function P({page:e,overview:t,onAction:n}){let r=(0,D.useRef)(null),i=(0,D.useMemo)(()=>S(e.body,e.links),[e.body,e.links]);(0,D.useEffect)(()=>{let e=r.current;if(!e)return;let t=0;e.querySelectorAll(`h1, h2, h3`).forEach(e=>{if(e.tagName!==`H1`&&(t+=1),!e.id){let n=k(e.textContent||``,t);n&&(e.id=n)}}),e.querySelectorAll(`blockquote`).forEach(e=>{(e.querySelector(`strong`)?.textContent||``).toLowerCase().startsWith(N)&&e.classList.add(`analogy`)})},[i]),(0,D.useEffect)(()=>{let e=r.current;if(!e)return;let t=e=>{let t=e.target.closest(`a[href]`);if(!t)return;let n=t.getAttribute(`href`);n&&n.startsWith(`#/`)&&(e.preventDefault(),s(n))};return e.addEventListener(`click`,t),()=>e.removeEventListener(`click`,t)},[i]),(0,D.useEffect)(()=>{let n=r.current;if(!n)return;n.querySelectorAll(`.docs-here`).forEach(e=>e.classList.remove(`docs-here`));let[i,a]=M[t?.emit]||[];if(!i)return;let o=null;e.id===`install`?o=n.querySelector(`a[href="#/docs/${i}"]`)?.closest(`li`):e.id===i&&a&&(o=[...n.querySelectorAll(`h2`)].find(e=>k(e.textContent||``)===k(a))),o?.classList.add(`docs-here`)},[i,e.id,t?.emit]);let a=[];return e.id===`install`&&(a.push({label:`Run doctor`,action:`doctor`}),a.push({label:`Rebuild`,action:`build`})),e.id===`verify`&&a.push({label:`Run doctor`,action:`doctor`}),e.id===`upgrade`&&a.push({label:`Update`,action:`update`}),(0,O.jsxs)(`div`,{className:`detail-doc`,children:[(0,O.jsx)(`h1`,{style:{marginTop:0},children:e.title}),e.source&&(0,O.jsx)(`div`,{className:`doc-meta`,children:(0,O.jsxs)(`span`,{className:`badge`,children:[(0,O.jsx)(`span`,{className:`dot`}),e.source]})}),a.length>0&&(0,O.jsx)(`div`,{className:`row wrap gap-10`,style:{margin:`10px 0 14px`},children:a.map(e=>e.hash?(0,O.jsx)(`a`,{className:`btn ghost sm`,href:e.hash,children:e.label},e.label):(0,O.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>n&&n(e.action),children:e.label},e.label))}),(0,O.jsx)(`div`,{className:`markdown`,ref:r,dangerouslySetInnerHTML:{__html:i}}),e.link&&(0,O.jsx)(`div`,{style:{marginTop:24},children:(0,O.jsx)(`a`,{className:`btn soft sm`,href:e.link.hash,children:e.link.label})})]})}var F=1200;function I({a:e,kind:t}){let n=t===`positional`?e.dest:e.names.join(`, `),r=[];return e.metavar&&r.push(e.metavar),e.choices&&r.push(`{${e.choices.join(`|`)}}`),e.default!==null&&e.default!==void 0&&e.default!==``&&!e.is_flag&&r.push(`default: ${e.default}`),e.required&&r.push(`required`),(0,O.jsxs)(`div`,{className:`cli-arg`,children:[(0,O.jsx)(`code`,{className:`cli-arg-name`,children:n}),r.length>0&&(0,O.jsxs)(`code`,{className:`cli-arg-meta`,children:[` `,r.join(` · `)]}),e.help&&(0,O.jsx)(`div`,{className:`cli-arg-help`,children:e.help})]})}function L({text:e}){let[t,n]=(0,D.useState)(!1);return(0,O.jsxs)(`button`,{className:`btn ghost sm`,onClick:async()=>{try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),F)}catch{}},title:`Copy command`,children:[(0,O.jsx)(d,{name:t?`spark`:`copy`}),t?`Copied`:`Copy`]})}function R({cmd:e,prog:t}){let n=[t,e.name];for(let t of e.positionals||[]){let e=(t.metavar||t.dest||``).toUpperCase();n.push(t.required?e:`[${e}]`)}(e.options||[]).length&&n.push(`[OPTIONS]`);let r=n.join(` `);return(0,O.jsxs)(`div`,{className:`card pad-md mb-12 cli-card`,children:[(0,O.jsxs)(`div`,{className:`row wrap between`,style:{alignItems:`flex-start`},children:[(0,O.jsxs)(`div`,{className:`stack`,style:{gap:4},children:[(0,O.jsx)(`h3`,{style:{margin:0},children:(0,O.jsx)(`code`,{children:e.name})}),e.help&&(0,O.jsx)(`p`,{className:`sub`,style:{margin:0},children:e.help})]}),(0,O.jsx)(L,{text:`${t} ${e.name}`})]}),(0,O.jsx)(`pre`,{className:`cli-syn`,children:r}),(e.positionals||[]).length>0&&(0,O.jsxs)(`div`,{className:`cli-block`,children:[(0,O.jsx)(`div`,{className:`cli-block-head`,children:`Arguments`}),e.positionals.map(e=>(0,O.jsx)(I,{a:e,kind:`positional`},e.dest))]}),(e.options||[]).length>0&&(0,O.jsxs)(`div`,{className:`cli-block`,children:[(0,O.jsx)(`div`,{className:`cli-block-head`,children:`Options`}),e.options.map(e=>(0,O.jsx)(I,{a:e,kind:`option`},e.names.join(`,`)))]})]})}function z({page:e}){let t=e.prog||`geneseed`,n=e.commands||[];return(0,O.jsxs)(`div`,{className:`detail-doc`,children:[(0,O.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,O.jsxs)(`p`,{className:`sub`,style:{marginTop:4},children:[`Every subcommand of `,(0,O.jsx)(`code`,{children:t}),`. Generated from the parser at request time (the same one `,(0,O.jsx)(`code`,{children:`geneseed`}),` actually parses), so this page cannot drift.`]}),(0,O.jsx)(`div`,{style:{marginTop:18},children:n.map(e=>(0,O.jsx)(R,{cmd:e,prog:t},e.name))})]})}function B({page:e}){let t=e.rows||[],n=e.theme||`neutral`;return(0,O.jsxs)(`div`,{className:`detail-doc`,children:[(0,O.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,O.jsxs)(`p`,{className:`sub`,style:{marginTop:4},children:[`Geneseed's invented vocabulary, decoded. Left: the neutral, plain-English term. Right: the word your `,(0,O.jsx)(`code`,{style:{textTransform:`capitalize`},children:n}),` theme actually uses in the agent's voice. Last: the developer idea it maps to.`]}),(0,O.jsx)(`div`,{className:`card pad-md`,style:{marginTop:18},children:(0,O.jsxs)(`table`,{className:`glossary-table`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`th`,{children:`Concept`}),(0,O.jsx)(`th`,{children:`Neutral term`}),(0,O.jsxs)(`th`,{children:[`In `,n]}),(0,O.jsx)(`th`,{children:`Meaning`}),(0,O.jsx)(`th`,{children:`In dev terms`})]})}),(0,O.jsx)(`tbody`,{children:t.map(e=>(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`td`,{children:(0,O.jsx)(`strong`,{children:e.label})}),(0,O.jsx)(`td`,{children:(0,O.jsx)(`code`,{children:e.neutral||`—`})}),(0,O.jsx)(`td`,{children:(0,O.jsx)(`code`,{children:e.themed||e.neutral||`—`})}),(0,O.jsx)(`td`,{className:`dim`,children:e.desc}),(0,O.jsx)(`td`,{className:`dim`,children:e.analogy||`—`})]},e.label))})]})})]})}var V={enforced:`ok`,automatic:`ok`,asked:`warn`,"on demand":`warn`};function H(e){let t=[],n=[],r=`before`;for(let i of(e||``).split(`
|
|
3
3
|
`))r===`before`&&/^\|\s*piece\s*\|/i.test(i)?r=`map`:r===`map`&&!i.trimStart().startsWith(`|`)&&(r=`after`),r===`before`?t.push(i):r===`after`&&n.push(i);return[t.join(`
|
|
4
4
|
`),n.join(`
|
|
5
|
-
`)]}var U=({text:e})=>(0,O.jsx)(`span`,{dangerouslySetInnerHTML:{__html:w(b.parseInline(e||``))}}),W=({kind:e})=>(0,O.jsx)(`span`,{className:`tag ${V[e]||``}`,children:e});function G({page:e,overview:t,onAction:n}){let[r,i]=(0,D.useState)(0);if(!e.rows)return(0,O.jsx)(P,{page:e,overview:t,onAction:n});let a=e.rows[r]||e.rows[0],[o,s]=H(e.body);return(0,O.jsxs)(`div`,{className:`detail-doc`,children:[(0,O.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,O.jsx)(E,{body:o,links:e.links}),(0,O.jsxs)(`div`,{className:`docs-map`,children:[(0,O.jsx)(`ul`,{className:`map-tree`,"aria-label":`Pieces`,children:e.rows.map((e,t)=>(0,O.jsx)(`li`,{children:(0,O.jsxs)(`button`,{className:`map-node ${t===r?`on`:``}`,"aria-pressed":t===r,onClick:()=>i(t),children:[(0,O.jsx)(`span`,{className:`map-piece`,children:(0,O.jsx)(U,{text:e.piece})}),(0,O.jsx)(W,{kind:e.kind}),(0,O.jsx)(`span`,{className:`mono dim map-cost`,children:(0,O.jsx)(U,{text:e.cost})})]})},t))}),a&&(0,O.jsxs)(`div`,{className:`card pad-md map-detail`,"aria-live":`polite`,children:[(0,O.jsx)(`h3`,{style:{margin:`0 0 8px`},children:(0,O.jsx)(U,{text:a.piece})}),(0,O.jsx)(W,{kind:a.kind}),(0,O.jsxs)(`dl`,{children:[(0,O.jsx)(`dt`,{children:`Does`}),(0,O.jsx)(`dd`,{children:(0,O.jsx)(U,{text:a.does})}),(0,O.jsx)(`dt`,{children:`Costs`}),(0,O.jsx)(`dd`,{children:(0,O.jsx)(U,{text:a.cost})}),(0,O.jsx)(`dt`,{children:`Turn it off`}),(0,O.jsx)(`dd`,{children:(0,O.jsx)(U,{text:a.off})})]})]})]}),s.trim()&&(0,O.jsx)(E,{body:s,links:e.links})]})}var K=5,q=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function J(e,t){let n=e||``,r=[];for(let e of t||[])if([...new Set([e.themed,e.neutral,e.label].filter(Boolean))].some(e=>RegExp(`(?<![\\w-])${q(e)}s?(?![\\w-])`,`i`).test(n))&&r.push(e),r.length===K)break;return r}var Y=e=>document.getElementById(e)?.scrollIntoView({behavior:`smooth`});function X({body:e,glossaryRows:t}){let n=(0,D.useMemo)(()=>j(e),[e]),r=(0,D.useMemo)(()=>J(e,t),[e,t]);return!n.length&&!r.length?null:(0,O.jsxs)(`aside`,{className:`docs-margin`,children:[n.length>0&&(0,O.jsxs)(`nav`,{className:`docs-toc`,"aria-label":`On this page`,children:[(0,O.jsx)(`div`,{className:`docs-toc-head`,children:`On this page`}),(0,O.jsx)(`ul`,{children:n.map(e=>(0,O.jsx)(`li`,{className:`lvl-${e.level}`,children:(0,O.jsx)(`a`,{href:`#${e.id}`,onClick:t=>{t.preventDefault(),Y(e.id)},children:e.title})},e.id))})]}),r.length>0&&(0,O.jsxs)(`div`,{className:`docs-gloss`,children:[(0,O.jsx)(`div`,{className:`docs-toc-head`,children:`Terms on this page`}),r.map(e=>(0,O.jsxs)(`div`,{className:`docs-gloss-card`,children:[(0,O.jsx)(`b`,{children:e.themed||e.neutral||e.label}),(0,O.jsx)(`p`,{children:e.desc})]},e.label))]})]})}function te({page:e}){let t=e.version||{},n=[[`Theme`,e.theme],[`Install mode`,e.emit],[`Deployed`,e.deployed?`yes`:`no`],[`Target`,(0,O.jsx)(`code`,{children:e.target},`t`)],[`Source root`,(0,O.jsx)(`code`,{children:e.root},`r`)],[`Installed build`,(0,O.jsx)(`code`,{children:t.installed_fp||`(none)`},`i`)],[`Source build`,(0,O.jsx)(`code`,{children:t.source_fp||`—`},`s`)],[`Match?`,t.verdict||`—`],[`License`,e.license]];return(0,O.jsxs)(`div`,{className:`detail-doc`,children:[(0,O.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,O.jsx)(`p`,{className:`sub`,style:{marginTop:4},children:`Live snapshot of the install behind this UI, plus where to go next.`}),(0,O.jsx)(`div`,{className:`card pad-md`,style:{marginTop:18},children:n.map(([e,t])=>(0,O.jsxs)(`div`,{className:`kv`,children:[(0,O.jsx)(`span`,{className:`k`,children:e}),(0,O.jsx)(`span`,{className:`v`,children:t??`—`})]},e))}),(0,O.jsxs)(`div`,{className:`row wrap gap-10`,style:{marginTop:18},children:[(0,O.jsxs)(`a`,{className:`btn ghost`,href:e.repo,target:`_blank`,rel:`noreferrer`,children:[(0,O.jsx)(d,{name:`external`}),e.repo_is_github?`GitHub repo`:`Source repo`]}),e.repo_is_github&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`a`,{className:`btn ghost`,href:`${e.repo}/issues`,target:`_blank`,rel:`noreferrer`,children:[(0,O.jsx)(d,{name:`external`}),`File an issue`]}),(0,O.jsxs)(`a`,{className:`btn ghost`,href:`${e.repo}/blob/main/LICENSE`,target:`_blank`,rel:`noreferrer`,children:[(0,O.jsx)(d,{name:`external`}),`License`]})]})]})]})}var ne=encodeURIComponent,Z=e=>`#/docs/${ne(e)}`;function Q(e){return e?.groups?.[0]?.pages?.[0]?.id||``}function re({data:e,error:t,overview:n,onAction:r}){if(t)return(0,O.jsx)(c,{error:t,style:{margin:18}});if(!e)return(0,O.jsx)(_,{label:`Loading page…`});switch(e.kind){case`markdown`:case`concept`:return(0,O.jsx)(P,{page:e,overview:n,onAction:r});case`map`:return(0,O.jsx)(G,{page:e,overview:n,onAction:r});case`cli`:return(0,O.jsx)(z,{page:e});case`glossary`:return(0,O.jsx)(B,{page:e});case`about`:return(0,O.jsx)(te,{page:e});default:return(0,O.jsxs)(`div`,{className:`empty`,children:[(0,O.jsx)(`div`,{className:`big`,children:`Unknown page kind`}),e.kind]})}}function $(e){return(e?.pages||[]).map(e=>({name:e.id,title:e.title,desc:e.description||``,group:e.section||`General`,groupC:`var(--accent)`}))}function ie({page:e,overview:t,onAction:n}){let[d,b]=ee(i(t?.emit)),{data:S,error:w}=a(()=>r.docs(d),[d]),E=e||Q(S),{data:k,error:A,loading:j}=a(()=>E?r.docsPage(E,d):Promise.resolve(null),[E,d]),{data:M}=a(()=>r.docsPage(`glossary`,d).catch(()=>null),[d],`docs:glossary`);(0,D.useEffect)(()=>{if(S&&E&&!S.groups.some(e=>e.pages.some(e=>e.id===E))){let e=Q(S);e&&e!==E&&
|
|
5
|
+
`)]}var U=({text:e})=>(0,O.jsx)(`span`,{dangerouslySetInnerHTML:{__html:w(b.parseInline(e||``))}}),W=({kind:e})=>(0,O.jsx)(`span`,{className:`tag ${V[e]||``}`,children:e});function G({page:e,overview:t,onAction:n}){let[r,i]=(0,D.useState)(0);if(!e.rows)return(0,O.jsx)(P,{page:e,overview:t,onAction:n});let a=e.rows[r]||e.rows[0],[o,s]=H(e.body);return(0,O.jsxs)(`div`,{className:`detail-doc`,children:[(0,O.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,O.jsx)(E,{body:o,links:e.links}),(0,O.jsxs)(`div`,{className:`docs-map`,children:[(0,O.jsx)(`ul`,{className:`map-tree`,"aria-label":`Pieces`,children:e.rows.map((e,t)=>(0,O.jsx)(`li`,{children:(0,O.jsxs)(`button`,{className:`map-node ${t===r?`on`:``}`,"aria-pressed":t===r,onClick:()=>i(t),children:[(0,O.jsx)(`span`,{className:`map-piece`,children:(0,O.jsx)(U,{text:e.piece})}),(0,O.jsx)(W,{kind:e.kind}),(0,O.jsx)(`span`,{className:`mono dim map-cost`,children:(0,O.jsx)(U,{text:e.cost})})]})},t))}),a&&(0,O.jsxs)(`div`,{className:`card pad-md map-detail`,"aria-live":`polite`,children:[(0,O.jsx)(`h3`,{style:{margin:`0 0 8px`},children:(0,O.jsx)(U,{text:a.piece})}),(0,O.jsx)(W,{kind:a.kind}),(0,O.jsxs)(`dl`,{children:[(0,O.jsx)(`dt`,{children:`Does`}),(0,O.jsx)(`dd`,{children:(0,O.jsx)(U,{text:a.does})}),(0,O.jsx)(`dt`,{children:`Costs`}),(0,O.jsx)(`dd`,{children:(0,O.jsx)(U,{text:a.cost})}),(0,O.jsx)(`dt`,{children:`Turn it off`}),(0,O.jsx)(`dd`,{children:(0,O.jsx)(U,{text:a.off})})]})]})]}),s.trim()&&(0,O.jsx)(E,{body:s,links:e.links})]})}var K=5,q=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function J(e,t){let n=e||``,r=[];for(let e of t||[])if([...new Set([e.themed,e.neutral,e.label].filter(Boolean))].some(e=>RegExp(`(?<![\\w-])${q(e)}s?(?![\\w-])`,`i`).test(n))&&r.push(e),r.length===K)break;return r}var Y=e=>document.getElementById(e)?.scrollIntoView({behavior:`smooth`});function X({body:e,glossaryRows:t}){let n=(0,D.useMemo)(()=>j(e),[e]),r=(0,D.useMemo)(()=>J(e,t),[e,t]);return!n.length&&!r.length?null:(0,O.jsxs)(`aside`,{className:`docs-margin`,children:[n.length>0&&(0,O.jsxs)(`nav`,{className:`docs-toc`,"aria-label":`On this page`,children:[(0,O.jsx)(`div`,{className:`docs-toc-head`,children:`On this page`}),(0,O.jsx)(`ul`,{children:n.map(e=>(0,O.jsx)(`li`,{className:`lvl-${e.level}`,children:(0,O.jsx)(`a`,{href:`#${e.id}`,onClick:t=>{t.preventDefault(),Y(e.id)},children:e.title})},e.id))})]}),r.length>0&&(0,O.jsxs)(`div`,{className:`docs-gloss`,children:[(0,O.jsx)(`div`,{className:`docs-toc-head`,children:`Terms on this page`}),r.map(e=>(0,O.jsxs)(`div`,{className:`docs-gloss-card`,children:[(0,O.jsx)(`b`,{children:e.themed||e.neutral||e.label}),(0,O.jsx)(`p`,{children:e.desc})]},e.label))]})]})}function te({page:e}){let t=e.version||{},n=[[`Theme`,e.theme],[`Install mode`,e.emit],[`Deployed`,e.deployed?`yes`:`no`],[`Target`,(0,O.jsx)(`code`,{children:e.target},`t`)],[`Source root`,(0,O.jsx)(`code`,{children:e.root},`r`)],[`Installed build`,(0,O.jsx)(`code`,{children:t.installed_fp||`(none)`},`i`)],[`Source build`,(0,O.jsx)(`code`,{children:t.source_fp||`—`},`s`)],[`Match?`,t.verdict||`—`],[`License`,e.license]];return(0,O.jsxs)(`div`,{className:`detail-doc`,children:[(0,O.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,O.jsx)(`p`,{className:`sub`,style:{marginTop:4},children:`Live snapshot of the install behind this UI, plus where to go next.`}),(0,O.jsx)(`div`,{className:`card pad-md`,style:{marginTop:18},children:n.map(([e,t])=>(0,O.jsxs)(`div`,{className:`kv`,children:[(0,O.jsx)(`span`,{className:`k`,children:e}),(0,O.jsx)(`span`,{className:`v`,children:t??`—`})]},e))}),(0,O.jsxs)(`div`,{className:`row wrap gap-10`,style:{marginTop:18},children:[(0,O.jsxs)(`a`,{className:`btn ghost`,href:e.repo,target:`_blank`,rel:`noreferrer`,children:[(0,O.jsx)(d,{name:`external`}),e.repo_is_github?`GitHub repo`:`Source repo`]}),e.repo_is_github&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`a`,{className:`btn ghost`,href:`${e.repo}/issues`,target:`_blank`,rel:`noreferrer`,children:[(0,O.jsx)(d,{name:`external`}),`File an issue`]}),(0,O.jsxs)(`a`,{className:`btn ghost`,href:`${e.repo}/blob/main/LICENSE`,target:`_blank`,rel:`noreferrer`,children:[(0,O.jsx)(d,{name:`external`}),`License`]})]})]})]})}var ne=encodeURIComponent,Z=e=>`#/docs/${ne(e)}`;function Q(e){return e?.groups?.[0]?.pages?.[0]?.id||``}function re({data:e,error:t,overview:n,onAction:r}){if(t)return(0,O.jsx)(c,{error:t,style:{margin:18}});if(!e)return(0,O.jsx)(_,{label:`Loading page…`});switch(e.kind){case`markdown`:case`concept`:return(0,O.jsx)(P,{page:e,overview:n,onAction:r});case`map`:return(0,O.jsx)(G,{page:e,overview:n,onAction:r});case`cli`:return(0,O.jsx)(z,{page:e});case`glossary`:return(0,O.jsx)(B,{page:e});case`about`:return(0,O.jsx)(te,{page:e});default:return(0,O.jsxs)(`div`,{className:`empty`,children:[(0,O.jsx)(`div`,{className:`big`,children:`Unknown page kind`}),e.kind]})}}function $(e){return(e?.pages||[]).map(e=>({name:e.id,title:e.title,desc:e.description||``,group:e.section||`General`,groupC:`var(--accent)`}))}function ie({page:e,overview:t,onAction:n}){let[d,b]=ee(i(t?.emit)),{data:S,error:w}=a(()=>r.docs(d),[d]),E=e||Q(S),{data:k,error:A,loading:j}=a(()=>E?r.docsPage(E,d):Promise.resolve(null),[E,d]),{data:M}=a(()=>r.docsPage(`glossary`,d).catch(()=>null),[d],`docs:glossary`);(0,D.useEffect)(()=>{if(S&&E&&!S.groups.some(e=>e.pages.some(e=>e.id===E))){let e=Q(S);e&&e!==E&&s(Z(e))}},[S,E]),(0,D.useEffect)(()=>{let e=document.scrollingElement||document.documentElement;for(let t of[document.getElementById(`main`),e])t&&(t.scrollTop=0)},[E]);let N=p(S,E),P=N.part||S?.groups?.[0]||null,F=P?.id===m;(0,D.useEffect)(()=>{F&&k?.id===E&&l(E)},[F,k,E]);let I=F?[...h(),E]:[],[L,R]=(0,D.useState)(``),[z,B]=(0,D.useState)(`all`),[V,H]=(0,D.useState)(P?.id);P?.id!==V&&(H(P?.id),R(``),B(`all`));let U=$(P),W=C(U),G=z===`all`?U:U.filter(e=>e.group===z),K=x(G,L);return w?(0,O.jsx)(c,{error:w}):(0,O.jsx)(`div`,{className:`docs-wrap`,children:(0,O.jsxs)(`div`,{className:`library docs-lib`,children:[(0,O.jsxs)(`aside`,{className:`lib-kinds`,"aria-label":`Docs parts`,children:[(0,O.jsxs)(`div`,{className:`lib-title`,children:[(0,O.jsx)(`h1`,{className:`h`,children:`Docs`}),(0,O.jsx)(`span`,{className:`dim`,children:`How it works, and how to use it`})]}),(0,O.jsx)(g,{"aria-label":`Harness`,children:o.map(e=>(0,O.jsx)(`button`,{className:d===e.id?`on`:``,onClick:()=>b(e.id),"aria-pressed":d===e.id,children:e.label},e.id))}),(0,O.jsx)(`nav`,{className:`kind-list`,"aria-label":`Parts`,children:(S?.groups||[]).map(e=>(0,O.jsxs)(D.Fragment,{children:[(0,O.jsxs)(`a`,{href:e.pages[0]?Z(e.pages[0].id):`#/docs`,className:P?.id===e.id?`on`:``,"aria-current":P?.id===e.id?`page`:void 0,children:[e.label,(0,O.jsx)(`span`,{className:`mono dim`,children:e.pages.length})]}),P?.id===e.id&&(0,O.jsx)(v,{label:`Sections`,total:U.length,cats:W,cat:z,onChange:B})]},e.id))})]}),(0,O.jsx)(y,{label:P?.label||`Docs`,count:L.trim()?`${K.length} of ${G.length}`:G.length||``,extra:F&&(0,O.jsx)(u,{pages:P.pages,seen:I}),q:L,onQ:R,matched:K.length,inView:[P?.id,E],children:S?(0,O.jsx)(T,{rows:K,activeName:E,hrefOf:e=>Z(e.name),pills:F?e=>I.includes(e.name)&&e.name!==E?(0,O.jsxs)(`span`,{className:`docs-read-mark`,children:[(0,O.jsx)(`span`,{"aria-hidden":`true`,children:`✓`}),(0,O.jsx)(`span`,{className:`sr-only`,children:`read`})]}):null:void 0}):(0,O.jsx)(_,{label:`Loading docs…`})}),(0,O.jsxs)(`article`,{className:`lib-reader docs-reader`,"aria-label":`Page`,children:[N.page&&(0,O.jsxs)(`nav`,{className:`docs-crumbs mono`,"aria-label":`Breadcrumb`,children:[(0,O.jsx)(`a`,{href:Z(N.part.pages[0].id),children:N.part.label}),(0,O.jsx)(`span`,{"aria-hidden":`true`,children:`›`}),(0,O.jsx)(`a`,{href:Z(N.part.pages.find(e=>(e.section||`General`)===N.section).id),children:N.section}),(0,O.jsx)(`span`,{"aria-hidden":`true`,children:`›`}),(0,O.jsx)(`span`,{"aria-current":`page`,children:N.page.title})]}),(0,O.jsxs)(`div`,{className:`docs-read`,children:[(0,O.jsxs)(`div`,{className:`docs-article`,children:[(0,O.jsx)(re,{data:j?null:k,error:A,overview:t,onAction:n},`${E}|${d}`),!j&&(0,O.jsx)(f,{menu:S,pageId:E})]}),!j&&(0,O.jsx)(X,{body:k?.body,glossaryRows:M?.rows})]})]})]})})}export{ie as default,$ as docRows};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,r as t,s as n}from"./sections-GalMS0Zv.js";import{i as r,t as i}from"./react-DRhoX0kS.js";import{t as a}from"./drawable-
|
|
1
|
+
import{n as e,r as t,s as n}from"./sections-GalMS0Zv.js";import{i as r,t as i}from"./react-DRhoX0kS.js";import{t as a}from"./drawable-BoQnwVpr.js";import{$ as o,G as s,K as c,W as l,X as u,j as d,k as f}from"./index-BmbWeoTM.js";import{t as p}from"./jobBuckets-Dbq8ZlWW.js";import{n as m}from"./Dashboard-UMbgHbzF.js";var h=n(r(),1),g=i(),_=12,v=120,y=[`#2BB673`,`#16A6A6`,`#E8A23B`,`#E07A5F`,`#8E7DBE`,`#5BD08A`,`#79856E`],b=650;function x({segments:e,size:t=186,stroke:n=26,caption:r=`capabilities`}){let i=e.reduce((e,t)=>e+t.value,0)||1,d=(0,h.useRef)(null),f=e.map(e=>e.value).join(`,`);(0,h.useLayoutEffect)(()=>{let t=d.current?.querySelectorAll(`path`);if(!t?.length||!s())return;let n=e.filter(e=>e.value>0).map(e=>e.value/i),r=n.map((e,t)=>n.slice(0,t).reduce((e,t)=>e+t,0)),l=a(t);u(l,{draw:`0 0`});let f=o(l,{draw:[`0 0`,`0 1`],duration:(e,t)=>Math.max(b*n[t],60),delay:(e,t)=>b*r[t],ease:`linear`});return c(f,b)},[f]);let p=t/2-n/2,m=t/2,_=t/2,v=[],y=0;for(let t of e)v.push(y),y+=t.value;return(0,g.jsxs)(`svg`,{width:t,height:t,viewBox:`0 0 ${t} ${t}`,children:[(0,g.jsx)(`circle`,{cx:m,cy:_,r:p,fill:`none`,stroke:`var(--surface-3)`,strokeWidth:n}),(0,g.jsx)(`g`,{ref:d,children:e.map((e,t)=>{if(e.value/i<=0)return null;let r=v[t]/i*2*Math.PI-Math.PI/2,a=(v[t]+e.value)/i*2*Math.PI-Math.PI/2,o=m+p*Math.cos(r),s=_+p*Math.sin(r),c=m+p*Math.cos(a),l=_+p*Math.sin(a),u=+(a-r>Math.PI);return(0,g.jsx)(`path`,{d:`M ${o} ${s} A ${p} ${p} 0 ${u} 1 ${c} ${l}`,fill:`none`,stroke:e.color,strokeWidth:n,strokeLinecap:`butt`,children:(0,g.jsxs)(`title`,{children:[e.label,`: `,e.value]})},t)})}),(0,g.jsx)(`text`,{x:m,y:_-4,textAnchor:`middle`,className:`donut-c-num`,children:(0,g.jsx)(l,{value:i,duration:b})}),(0,g.jsx)(`text`,{x:m,y:_+16,textAnchor:`middle`,className:`donut-c-cap`,children:r})]})}function S(e){if(e.length<2)return e.length?`M${e[0][0]},${e[0][1]}`:``;let t=`M${e[0][0]},${e[0][1]}`;for(let n=0;n<e.length-1;n++){let r=e[n-1]||e[n],i=e[n],a=e[n+1],o=e[n+2]||a,s=i[0]+(a[0]-r[0])/6,c=i[1]+(a[1]-r[1])/6,l=a[0]-(o[0]-i[0])/6,u=a[1]-(o[1]-i[1])/6;t+=` C${s},${c} ${l},${u} ${a[0]},${a[1]}`}return t}function C({data:e,height:t=156,accent:n}){if(!e.length)return null;let r=t,i=Math.max(...e.map(e=>e.v),1)+1,a=e.length>1?588/(e.length-1):588,o=e.map((e,t)=>[6+t*a,r-6-e.v/i*(r-14-6)]),s=S(o),c=o[o.length-1],l=o[0],u=`${s} L${c[0]},${r} L${l[0]},${r} Z`;return(0,g.jsxs)(`svg`,{viewBox:`0 0 600 ${r}`,preserveAspectRatio:`none`,style:{width:`100%`,height:t,display:`block`,overflow:`visible`},children:[(0,g.jsx)(`defs`,{children:(0,g.jsxs)(`linearGradient`,{id:`b-grad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,g.jsx)(`stop`,{offset:`0`,stopColor:n,stopOpacity:`.28`}),(0,g.jsx)(`stop`,{offset:`1`,stopColor:n,stopOpacity:`0`})]})}),(0,g.jsx)(`path`,{d:u,fill:`url(#b-grad)`}),(0,g.jsx)(`path`,{d:s,fill:`none`,stroke:n,strokeWidth:`2`,strokeLinejoin:`round`,strokeLinecap:`round`,vectorEffect:`non-scaling-stroke`}),(0,g.jsx)(`circle`,{cx:c[0],cy:c[1],r:`3.5`,fill:n,vectorEffect:`non-scaling-stroke`})]})}function w({label:e,value:t,sub:n,color:r,icon:i}){return(0,g.jsxs)(`div`,{className:`b-tile`,children:[(0,g.jsx)(`span`,{className:`b-tile-ic`,style:{background:`color-mix(in srgb, ${r} 18%, transparent)`,color:r},children:(0,g.jsx)(f,{name:i})}),(0,g.jsxs)(`div`,{className:`b-tile-body`,children:[(0,g.jsx)(`div`,{className:`b-tile-val`+(t===0?` zero`:``),children:t}),(0,g.jsx)(`div`,{className:`b-tile-label`,children:e})]}),(0,g.jsx)(`div`,{className:`b-tile-sub`,children:n})]})}function T({overview:n,sigil:r,jobs:i,doctor:a,onAction:o}){let s=n.counts||{},c=a?.groups||[],u=c.length>0,h=c.filter(e=>e.problems.length===0).length,b=c.length||1,S=m(n),T=d(n.diff),E=t.filter(e=>(s[e]||0)>0).map((t,n)=>({label:e[t].label,value:s[t]||0,color:y[n%y.length]})),D=E.reduce((e,t)=>e+t.value,0),O=p(i||[],10),k=O.reduce((e,t)=>e+t.v,0);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`b-greet`,children:[(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`div`,{className:`eyebrow`,children:`your harness`}),(0,g.jsx)(`h1`,{className:`h b-h`,children:S}),(0,g.jsx)(`p`,{className:`sub`,children:r||`A friendly read of every layer growing in your harness.`})]}),(0,g.jsxs)(`div`,{className:`row gap-8`,children:[(0,g.jsxs)(`button`,{className:`btn`,onClick:()=>o(`update`),children:[(0,g.jsx)(f,{name:`refresh`}),`Update`]}),(0,g.jsxs)(`button`,{className:`btn ghost`,onClick:()=>o(`build-all`),children:[(0,g.jsx)(f,{name:`build`}),`Rebuild`]})]})]}),(0,g.jsxs)(`div`,{className:`grid b-hero-grid mb-16`,children:[(0,g.jsxs)(`div`,{className:`card b-hero`,children:[(0,g.jsx)(`div`,{className:`b-hero-ring`,children:(0,g.jsx)(x,{segments:[{label:`pass`,value:h,color:y[0]},{label:`attention`,value:Math.max(b-h,0),color:y[2]}],size:168,stroke:20,caption:`checks`})}),(0,g.jsxs)(`div`,{className:`b-hero-side`,children:[(0,g.jsx)(`h3`,{className:`b-hero-title`,children:u?`${h} of ${b} checks pass`:`Running checks…`}),(0,g.jsxs)(`p`,{className:`sub`,children:[`One source, rendered into `,(0,g.jsx)(`code`,{children:n.target}),` and inherited by every repo on this machine.`]}),u&&(0,g.jsx)(`ul`,{className:`b-hero-checks`,children:c.map(e=>{let t=e.problems.length===0;return(0,g.jsxs)(`li`,{className:`b-hcheck ${t?`ok`:`bad`}`,title:t?`clean`:e.problems.join(`; `),children:[(0,g.jsx)(`span`,{className:`b-hcheck-mark`,children:t?`✓`:`!`}),(0,g.jsx)(`span`,{className:`b-hcheck-label`,children:e.label})]},e.label)})}),(0,g.jsxs)(`div`,{className:`b-chips`,children:[(0,g.jsxs)(`span`,{className:`b-chip`,children:[(0,g.jsx)(`b`,{style:{textTransform:`capitalize`},children:n.theme}),` voice`]}),(0,g.jsx)(`span`,{className:`b-chip`,children:(0,g.jsx)(`b`,{children:n.emit})}),(0,g.jsxs)(`span`,{className:`b-chip`,children:[`built `,(0,g.jsx)(`b`,{children:n.build_time||`unknown`})]})]})]})]}),(0,g.jsxs)(`div`,{className:`b-tiles`,children:[(0,g.jsx)(w,{label:`Agents`,value:s.agents??`—`,sub:`specialists`,color:y[0],icon:`layers`}),(0,g.jsx)(w,{label:`Skills`,value:s.skills??`—`,sub:`workflows`,color:y[1],icon:`skill`}),(0,g.jsx)(w,{label:`Invariants`,value:s.laws??`—`,sub:s.doctrines?`${s.doctrines.active}/${s.doctrines.total} packs · ${s.doctrines.rules} rules`:`all upheld`,color:y[2],icon:`law`}),(0,g.jsx)(w,{label:`Edits`,value:T,sub:`to graft`,color:y[3],icon:`changes`})]})]}),(0,g.jsxs)(`div`,{className:`grid split-even mb-16`,children:[(0,g.jsxs)(`div`,{className:`card pad-lg b-mix-card`,children:[(0,g.jsxs)(`div`,{className:`card-head`,children:[(0,g.jsx)(`h3`,{children:`Capability mix`}),(0,g.jsx)(`div`,{className:`right`,children:(0,g.jsxs)(`span`,{className:`tick`,children:[D,` total`]})})]}),(0,g.jsxs)(`div`,{className:`b-mix`,children:[(0,g.jsx)(x,{segments:E,size:186,stroke:26}),(0,g.jsx)(`div`,{className:`b-legend`,children:E.map(e=>(0,g.jsxs)(`div`,{className:`b-leg-row`,children:[(0,g.jsx)(`span`,{className:`b-leg-dot`,style:{background:e.color}}),(0,g.jsx)(`span`,{className:`b-leg-name`,children:e.label}),(0,g.jsx)(`span`,{className:`b-leg-bar`,children:(0,g.jsx)(`i`,{style:{width:`${e.value/D*100}%`,background:e.color}})}),(0,g.jsx)(`span`,{className:`b-leg-val`,children:e.value})]},e.label))})]})]}),(0,g.jsxs)(`div`,{className:`card pad-lg`,children:[(0,g.jsxs)(`div`,{className:`card-head`,children:[(0,g.jsx)(`h3`,{children:`Recent runs`}),(0,g.jsx)(`div`,{className:`right`,children:(0,g.jsxs)(`span`,{className:`badge ok`,children:[(0,g.jsx)(`span`,{className:`dot`}),`job log`]})})]}),(0,g.jsxs)(`div`,{className:`b-stat-lead`,children:[(0,g.jsx)(`span`,{className:`b-stat-big`,children:(0,g.jsx)(l,{value:k})}),(0,g.jsxs)(`span`,{className:`b-stat-cap`,children:[`runs in the last 10 days · `,h,`/`,b,` checks pass now`]})]}),(0,g.jsx)(C,{data:O,accent:y[0],height:156})]})]}),(0,g.jsxs)(`div`,{className:`card pad-lg`,children:[(0,g.jsxs)(`div`,{className:`card-head`,children:[(0,g.jsx)(`h3`,{children:`Recent activity`}),(0,g.jsx)(`div`,{className:`right`,children:(0,g.jsxs)(`span`,{className:`tick`,children:[`last `,Math.min(i?.length||0,12),` runs`]})})]}),(0,g.jsxs)(`div`,{className:`b-timeline`,children:[(i||[]).slice(0,_).map(e=>{let t=e.status===`done`,n=e.status===`failed`?`warn`:t?`ok`:`acc`;return(0,g.jsxs)(`div`,{className:`b-tl-row`,children:[(0,g.jsx)(`span`,{className:`b-tl-node ${n}`}),(0,g.jsxs)(`div`,{className:`b-tl-body`,children:[(0,g.jsx)(`b`,{children:e.action}),e.output?`: ${e.output.split(`
|
|
2
2
|
`)[0].slice(0,v)}`:``]}),(0,g.jsx)(`span`,{className:`b-tl-when`,children:e.duration?`${e.duration}s`:e.status})]},e.id)}),(!i||i.length===0)&&(0,g.jsxs)(`div`,{className:`b-tl-row`,children:[(0,g.jsx)(`span`,{className:`b-tl-node`}),(0,g.jsx)(`div`,{className:`b-tl-body sub`,children:`No runs yet. Trigger an action to populate this.`}),(0,g.jsx)(`span`,{className:`b-tl-when`,children:`—`})]})]})]})]})}export{T as default};
|