geneseed 3.13.0 → 3.14.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 +39 -0
- package/SHIPPED.md +1 -1
- package/adapters/opencode/plugins/geneseed-learn.js +10 -1
- package/bin/geneseed-cli.mjs +10 -14
- package/bin/geneseed-hook.mjs +22 -15
- package/docs/extending.md +5 -5
- package/harness.config.json +1 -1
- package/js/README.md +19 -10
- package/js/build/args.mjs +374 -0
- package/js/build/driver.mjs +137 -553
- package/js/build/emit-claude.mjs +2 -4
- package/js/build/generate.mjs +6 -3
- package/js/build/render.mjs +5 -9
- package/js/build/source.mjs +3 -11
- package/js/hosts/hooks-context.mjs +431 -0
- package/js/hosts/hooks-learn.mjs +275 -0
- package/js/hosts/hooks-prims.mjs +108 -0
- package/js/hosts/hooks.mjs +50 -977
- package/js/hosts/hosts.mjs +12 -4
- package/js/hosts/installs.mjs +5 -6
- package/js/hosts/mcp.mjs +12 -48
- package/js/hosts/memory-files.mjs +181 -0
- package/js/hosts/settings.mjs +135 -414
- package/js/hosts/shim.mjs +373 -0
- package/js/inspect/checks-authoring.mjs +21 -828
- package/js/inspect/checks-build.mjs +4 -4
- package/js/inspect/checks-constitution.mjs +493 -0
- package/js/inspect/checks-counts.mjs +242 -0
- package/js/inspect/checks-repo.mjs +17 -8
- package/js/inspect/diff.mjs +4 -1
- package/js/inspect/doctor.mjs +2 -2
- package/js/inspect/inventory.mjs +4 -4
- package/js/inspect/scan.mjs +1 -1
- package/js/inspect/status.mjs +1 -1
- package/js/inspect/validate.mjs +48 -35
- package/js/loop/catalog.mjs +5 -3
- package/js/loop/cli.mjs +26 -12
- package/js/loop/graph.mjs +1 -1
- package/js/loop/registry.mjs +10 -15
- package/js/loop/score.mjs +1 -1
- package/js/loop/state.mjs +35 -11
- package/js/maintain/memory.mjs +1 -1
- package/js/maintain/migrate.mjs +18 -30
- package/js/maintain/uninstall.mjs +47 -88
- package/js/ui/cli.mjs +12 -12
- package/js/web/actions.mjs +29 -19
- package/js/web/api.mjs +21 -21
- package/js/web/docs.mjs +29 -72
- package/package.json +1 -1
- package/web/dist/assets/Activity-CjRqZnr-.js +1 -0
- package/web/dist/assets/ActivityDetail-OQTxKBj2.js +1 -0
- package/web/dist/assets/Dashboard-J-xCe_Gk.js +2 -0
- package/web/dist/assets/Docs-CvOZ8akL.js +5 -0
- package/web/dist/assets/FilterInput-CVyqmYWM.js +1 -0
- package/web/dist/assets/GreenhouseView-6KDjX8da.js +2 -0
- package/web/dist/assets/Installs-MWuhNjSm.js +2 -0
- package/web/dist/assets/JournalView-C8MrOz2c.js +1 -0
- package/web/dist/assets/Laws-Du0-Zyp2.js +3 -0
- package/web/dist/assets/Library-DOkO0TtB.js +1 -0
- package/web/dist/assets/Loops-Dv_aLByJ.js +2 -0
- package/web/dist/assets/{Markdown-CdTX0kLe.js → Markdown-X2a3qvOh.js} +11 -11
- package/web/dist/assets/OperatorHudView-BPP1dtLz.js +2 -0
- package/web/dist/assets/Personal-26VPYkK0.js +1 -0
- package/web/dist/assets/Tabs-BzKuFskD.js +1 -0
- package/web/dist/assets/activity-Dr7ZMBI3.js +1 -0
- package/web/dist/assets/{drawable-C_x5xncq.js → drawable-zVVDbsyw.js} +1 -1
- package/web/dist/assets/index-Ctp-4poP.css +1 -0
- package/web/dist/assets/index-KHt3wE_K.js +2 -0
- package/web/dist/assets/{react-Bbzhmq4v.js → react-B9Z_tXRV.js} +1 -1
- package/web/dist/assets/sections-GalMS0Zv.js +1 -0
- package/web/dist/assets/usePoll-DD8VjtSg.js +1 -0
- package/web/dist/index.html +4 -5
- package/web/src/pages/Laws.jsx +0 -1
- package/web/dist/assets/Activity-Ca2Aruu7.js +0 -1
- package/web/dist/assets/ActivityDetail-Bo7v4Z_r.js +0 -1
- package/web/dist/assets/Dashboard-BuMq46aT.js +0 -2
- package/web/dist/assets/Docs-BzccCllG.js +0 -5
- package/web/dist/assets/FilterInput-CBcJBQPI.js +0 -1
- package/web/dist/assets/GreenhouseView-BCIKcnGG.js +0 -2
- package/web/dist/assets/Installs-DMFJvq7s.js +0 -2
- package/web/dist/assets/JournalView-o1rmd1_1.js +0 -1
- package/web/dist/assets/Laws-BANxq_I_.js +0 -3
- package/web/dist/assets/Library-DW4x0fbh.js +0 -1
- package/web/dist/assets/Loops-DEBibbBP.js +0 -2
- package/web/dist/assets/OperatorHudView-CLD0fYaA.js +0 -2
- package/web/dist/assets/Personal-6uMJvyBG.js +0 -1
- package/web/dist/assets/Tabs-BubnyZhF.js +0 -1
- package/web/dist/assets/activity-CObqyxkL.js +0 -1
- package/web/dist/assets/index-CMPgezFm.js +0 -2
- package/web/dist/assets/index-DMsT4Aa6.css +0 -1
- package/web/dist/assets/rolldown-runtime-hePW80VL.js +0 -1
- package/web/dist/assets/sections-Dg23Hel5.js +0 -1
- package/web/dist/assets/usePoll-BOqeunzF.js +0 -1
package/js/web/actions.mjs
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
*/
|
|
28
28
|
import { spawn } from 'node:child_process';
|
|
29
29
|
import {
|
|
30
|
-
accessSync, constants, copyFileSync, mkdirSync, mkdtempSync, rmSync, unlinkSync,
|
|
30
|
+
accessSync, constants, copyFileSync, mkdirSync, mkdtempSync, realpathSync, rmSync, unlinkSync,
|
|
31
31
|
} from 'node:fs';
|
|
32
32
|
import os from 'node:os';
|
|
33
33
|
import path from 'node:path';
|
|
@@ -40,10 +40,10 @@ import { withStdoutSwallowed } from '../inspect/diff.mjs';
|
|
|
40
40
|
import { excludeAdd, excludeRemove } from '../inspect/excludes.mjs';
|
|
41
41
|
import { setupBuildArgs } from '../build/generate.mjs';
|
|
42
42
|
import { DEFAULT_PRESET, PRESETS } from '../loop/score.mjs';
|
|
43
|
-
import { setLoopPreset } from '../loop/registry.mjs';
|
|
44
|
-
import { frontmatter, memoryDropIndex } from '../hosts/
|
|
43
|
+
import { activeLoops, setLoopPreset } from '../loop/registry.mjs';
|
|
44
|
+
import { frontmatter, memoryDropIndex } from '../hosts/memory-files.mjs';
|
|
45
45
|
import {
|
|
46
|
-
HOSTS, bobConfigDir, claudeConfigDir, expanduser, openclaudeConfigDir,
|
|
46
|
+
CLAUDE_STYLE, HOSTS, bobConfigDir, claudeConfigDir, expanduser, openclaudeConfigDir,
|
|
47
47
|
opencodeConfigDir, resolvePath,
|
|
48
48
|
} from '../hosts/hosts.mjs';
|
|
49
49
|
import {
|
|
@@ -57,6 +57,7 @@ import {
|
|
|
57
57
|
import { readText, writeText, isFile, isDir } from '../lib/fs.mjs';
|
|
58
58
|
import { parseJson, formatRepr, formatValue, isTruthy } from '../lib/json.mjs';
|
|
59
59
|
import { NO_WINDOW } from '../lib/proc.mjs';
|
|
60
|
+
import { normcase } from '../lib/paths.mjs';
|
|
60
61
|
import { WHITESPACE, codePointLength, stripWhitespace } from '../lib/text.mjs';
|
|
61
62
|
import { installDeactivate, installReactivate, installUninstall } from '../maintain/uninstall.mjs';
|
|
62
63
|
import { splitLines } from '../lib/udiff.mjs';
|
|
@@ -582,24 +583,30 @@ export function apiExcludesMutate(state, body) {
|
|
|
582
583
|
|
|
583
584
|
/**
|
|
584
585
|
* The Active tab's one write: rewrite a registered worktree's `LOOP.md` `preset` field.
|
|
585
|
-
* `
|
|
586
|
-
* a
|
|
587
|
-
* `
|
|
588
|
-
*
|
|
589
|
-
*
|
|
590
|
-
*
|
|
591
|
-
*
|
|
592
|
-
*
|
|
586
|
+
* `POST /api/loops/preset` makes two refusals — a `preset` outside `PRESETS` and a `root` that is
|
|
587
|
+
* not a running registered loop (no arbitrary path writes) — and both are decided HERE, as the
|
|
588
|
+
* `NotFound` every other mutating route answers in, so the handler's catch (`4xx`, not the 500 a
|
|
589
|
+
* bare `Error` would fall to) covers this route the way it covers `apiRulesMutate`'s unknown id.
|
|
590
|
+
*
|
|
591
|
+
* DECIDED, NOT RECOGNISED. This route used to call `setLoopPreset` and sort its throws by their
|
|
592
|
+
* MESSAGE text, so rewording an error in `js/loop/registry.mjs` would have turned a 404 into a
|
|
593
|
+
* 500 with no test of this file noticing. "Running" is `activeLoops`' word for it — registered,
|
|
594
|
+
* still a directory, `LOOP.md` present (a corrupt one included, so that it reaches the parse and
|
|
595
|
+
* fails there) — matched on the root the registry stores, which is the realpath. The preset is
|
|
596
|
+
* checked first: `activeLoops` may prune the registry, and a refused preset must touch nothing
|
|
597
|
+
* (`tests/unit/web_server.test.mjs` probes this route against the real machine's registry).
|
|
598
|
+
* Anything `setLoopPreset` still throws, a corrupt `LOOP.md` above all, is a 500.
|
|
593
599
|
*/
|
|
594
600
|
export function apiLoopsPresetMutate(state, body) {
|
|
595
601
|
const root = strOr(bget(body, 'root'));
|
|
596
602
|
const preset = strOr(bget(body, 'preset'));
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
} catch (
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
+
if (!Object.hasOwn(PRESETS, preset)) throw new NotFound(`unknown preset ${JSON.stringify(preset)}`);
|
|
604
|
+
let key;
|
|
605
|
+
try { key = realpathSync.native(root); } catch { key = path.resolve(root); }
|
|
606
|
+
const running = root && activeLoops().some((l) => l.status !== 'finished'
|
|
607
|
+
&& normcase(l.root) === normcase(key));
|
|
608
|
+
if (!running) throw new NotFound('unknown loop');
|
|
609
|
+
return { ok: true, loop: setLoopPreset(root, preset) };
|
|
603
610
|
}
|
|
604
611
|
|
|
605
612
|
// ---- MCP ----------------------------------------------------------------------------------
|
|
@@ -670,7 +677,7 @@ export function apiMcpToggle(state, body) {
|
|
|
670
677
|
return { ok: false, error: 'config holds comments — edit it by hand to keep them' };
|
|
671
678
|
}
|
|
672
679
|
let cfg;
|
|
673
|
-
if (
|
|
680
|
+
if (CLAUDE_STYLE.includes(host)) {
|
|
674
681
|
if (isFile(p)) {
|
|
675
682
|
let parsed;
|
|
676
683
|
try {
|
|
@@ -811,6 +818,9 @@ export function apiRestore(state, files) {
|
|
|
811
818
|
// behind it — prompt and boundary disagreeing by a WRITE, the write-side twin of the
|
|
812
819
|
// read-side hole `diffCollect` had (and the reason the panel offered the file at all).
|
|
813
820
|
doctrines: doctrinesForBuild(target),
|
|
821
|
+
// The excluded rules for the same boundary reason: without them a restored AGENT.md
|
|
822
|
+
// re-states a rule whose hook gate the install deliberately left unwired.
|
|
823
|
+
excludeRules: excludedRulesOfDir(target),
|
|
814
824
|
}));
|
|
815
825
|
for (const raw of (isTruthy(files) ? files : [])) {
|
|
816
826
|
const rel = stripWhitespace(formatValue(raw).replace(/\\/g, '/')).replace(/^\/+/, '');
|
package/js/web/api.mjs
CHANGED
|
@@ -18,13 +18,13 @@ import { sourceReleaseVersion } from '../hosts/opencode.mjs';
|
|
|
18
18
|
import { diffCollect } from '../inspect/diff.mjs';
|
|
19
19
|
import { doctorCollect } from '../inspect/doctor.mjs';
|
|
20
20
|
import { excludesSnapshot } from '../inspect/excludes.mjs';
|
|
21
|
-
import { GLOBAL_MANIFEST, HOSTS, opencodeConfigDir, resolvePath } from '../hosts/hosts.mjs';
|
|
21
|
+
import { CLAUDE_STYLE, GLOBAL_MANIFEST, HOSTS, opencodeConfigDir, resolvePath } from '../hosts/hosts.mjs';
|
|
22
22
|
import {
|
|
23
23
|
doctrinesForBuild, excludedRulesOfDir, footprintOfDir, installState, installTargets,
|
|
24
24
|
installedDefaults, modeOfDir, trustOfDir,
|
|
25
25
|
postureOfDir, readJsonMaybe, readMaybe, themeOfDir,
|
|
26
26
|
} from '../hosts/installs.mjs';
|
|
27
|
-
import { frontmatter } from '../hosts/
|
|
27
|
+
import { frontmatter } from '../hosts/memory-files.mjs';
|
|
28
28
|
import { DEFAULT_PRESET, PRESETS } from '../loop/score.mjs';
|
|
29
29
|
import { loadCatalog, catalogProblems } from '../loop/catalog.mjs';
|
|
30
30
|
import { activeLoops } from '../loop/registry.mjs';
|
|
@@ -99,10 +99,15 @@ export function webState(theme = null, target = null) {
|
|
|
99
99
|
st.root = st.target;
|
|
100
100
|
st.theme = theme || themeOfDir(st.target) || 'neutral';
|
|
101
101
|
st.emit = installedDefaults().emit || 'opencode-global';
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
// The install's sigils, each defaulted when its marker is absent (footprint to 'full').
|
|
103
|
+
// Read from the ROOT, where every emit writes them.
|
|
104
|
+
const readMarkers = () => {
|
|
105
|
+
st.footprint = footprintOfDir(st.root);
|
|
106
|
+
st.posture = postureOfDir(st.root) || 'peer';
|
|
107
|
+
st.mode = modeOfDir(st.root) || 'direct';
|
|
108
|
+
st.trust = trustOfDir(st.root) || DEFAULT_PRESET;
|
|
109
|
+
};
|
|
110
|
+
readMarkers();
|
|
106
111
|
|
|
107
112
|
Object.defineProperty(st, 'inventory', {
|
|
108
113
|
get() {
|
|
@@ -156,10 +161,7 @@ export function webState(theme = null, target = null) {
|
|
|
156
161
|
st.root = root || target;
|
|
157
162
|
st.theme = themeOfDir(st.root) || themeOfDir(st.target) || 'neutral';
|
|
158
163
|
st.emit = st.detectEmit();
|
|
159
|
-
|
|
160
|
-
st.posture = postureOfDir(st.root) || 'peer';
|
|
161
|
-
st.mode = modeOfDir(st.root) || 'direct';
|
|
162
|
-
st.trust = trustOfDir(st.root) || DEFAULT_PRESET;
|
|
164
|
+
readMarkers();
|
|
163
165
|
st._inv = null;
|
|
164
166
|
st._doctor = null;
|
|
165
167
|
};
|
|
@@ -168,10 +170,7 @@ export function webState(theme = null, target = null) {
|
|
|
168
170
|
st._doctor = null;
|
|
169
171
|
st.theme = themeOfDir(st.root) || themeOfDir(st.target) || st.theme;
|
|
170
172
|
st.emit = st.detectEmit() || st.emit;
|
|
171
|
-
|
|
172
|
-
st.posture = postureOfDir(st.root) || 'peer';
|
|
173
|
-
st.mode = modeOfDir(st.root) || 'direct';
|
|
174
|
-
st.trust = trustOfDir(st.root) || DEFAULT_PRESET;
|
|
173
|
+
readMarkers();
|
|
175
174
|
};
|
|
176
175
|
return st;
|
|
177
176
|
}
|
|
@@ -732,7 +731,7 @@ export const apiExcludes = () => excludesSnapshot();
|
|
|
732
731
|
* nested-marker host cannot silently read the bare root.
|
|
733
732
|
*/
|
|
734
733
|
export function viewCfg(host, scope, root) {
|
|
735
|
-
if (scope === 'project' &&
|
|
734
|
+
if (scope === 'project' && CLAUDE_STYLE.includes(host)) {
|
|
736
735
|
return path.join(root, HOSTS.find((h) => h.host === host).projectMarker);
|
|
737
736
|
}
|
|
738
737
|
return root;
|
|
@@ -800,13 +799,11 @@ export function apiOverview(state) {
|
|
|
800
799
|
buildEpoch = Math.floor(ms / 1000);
|
|
801
800
|
}
|
|
802
801
|
// Which detected install the current view points at, so the dashboard's footprint hero
|
|
803
|
-
// can re-emit exactly it.
|
|
802
|
+
// can re-emit exactly it.
|
|
804
803
|
let install = null;
|
|
805
804
|
for (const [host, scope, root] of installTargets()) {
|
|
806
|
-
const data = (scope === 'project' && ['claude', 'bob', 'openclaude'].includes(host))
|
|
807
|
-
? path.join(root, HOSTS.find((h) => h.host === host).projectMarker) : root;
|
|
808
805
|
try {
|
|
809
|
-
if (samePath(
|
|
806
|
+
if (samePath(viewCfg(host, scope, root), state.target)) {
|
|
810
807
|
install = { host, scope, path: root, footprint: footprintOfDir(root) };
|
|
811
808
|
break;
|
|
812
809
|
}
|
|
@@ -954,7 +951,9 @@ export function apiRecent(state) {
|
|
|
954
951
|
* layout needs `nodes`, `edges` and `loops` exactly as the engine reads them.
|
|
955
952
|
*/
|
|
956
953
|
export function apiLoops(state) {
|
|
957
|
-
const
|
|
954
|
+
const opts = { projectRoot: state.root };
|
|
955
|
+
const catalog = loadCatalog(opts);
|
|
956
|
+
const { bricks, templates, overridden } = catalog;
|
|
958
957
|
const byName = ([a], [b]) => (a < b ? -1 : 1);
|
|
959
958
|
return {
|
|
960
959
|
templates: [...templates].sort(byName).map(([name, { origin, ...graph }]) => ({
|
|
@@ -965,7 +964,8 @@ export function apiLoops(state) {
|
|
|
965
964
|
// A brick or template the catalogue skipped (bad frontmatter, not JSON, misnamed), and a
|
|
966
965
|
// template that fails the graph rules: the page says so — the same list `loop check`
|
|
967
966
|
// prints — or a team's broken override would just silently not be there.
|
|
968
|
-
|
|
967
|
+
// The catalogue already loaded above, not a second read of every brick and template.
|
|
968
|
+
problems: catalogProblems(opts, catalog),
|
|
969
969
|
};
|
|
970
970
|
}
|
|
971
971
|
|
package/js/web/docs.mjs
CHANGED
|
@@ -291,11 +291,20 @@ function subCounts(state, body) {
|
|
|
291
291
|
/**
|
|
292
292
|
* The Docs selector names a HOST; a tag names a host or a FAMILY. Bob and OpenClaude emit
|
|
293
293
|
* through the Claude engine, so a `claude` tag (page or block) is the Claude family and shows
|
|
294
|
-
* to all three of them, while `bob` / `openclaude` narrow to the one host.
|
|
295
|
-
*
|
|
294
|
+
* to all three of them, while `bob` / `openclaude` narrow to the one host. `name` is how a
|
|
295
|
+
* host-only passage's visible label spells the host. One row per host: the family table, the
|
|
296
|
+
* host list and both marker patterns below are read off it.
|
|
296
297
|
*/
|
|
297
|
-
|
|
298
|
-
|
|
298
|
+
const DOC_HOSTS = {
|
|
299
|
+
opencode: { family: 'opencode', name: 'OpenCode' },
|
|
300
|
+
claude: { family: 'claude', name: 'Claude Code' },
|
|
301
|
+
openclaude: { family: 'claude', name: 'OpenClaude' },
|
|
302
|
+
bob: { family: 'claude', name: 'IBM Bob' },
|
|
303
|
+
};
|
|
304
|
+
export const HOST_FAMILY = Object.fromEntries(
|
|
305
|
+
Object.entries(DOC_HOSTS).map(([id, h]) => [id, h.family]));
|
|
306
|
+
export const HARNESSES = Object.keys(DOC_HOSTS);
|
|
307
|
+
const anyOf = (words) => `(?:${words.join('|')})`;
|
|
299
308
|
/**
|
|
300
309
|
* A page or block tagged `tag` shows to `host`. Untagged content shows to every host. One tag
|
|
301
310
|
* names a host or a family; a LIST names hosts exactly, no family widening, because picking
|
|
@@ -307,7 +316,7 @@ export const harnessShows = (tag, host) => (Array.isArray(tag)
|
|
|
307
316
|
: !tag || tag === host || tag === HOST_FAMILY[host]);
|
|
308
317
|
/** A block's tag: `claude` alone, or `claude,openclaude` — the list, read as above. */
|
|
309
318
|
const harnessTag = (raw) => (raw.includes(',') ? raw.split(/\s*,\s*/) : raw);
|
|
310
|
-
const HOST_ID =
|
|
319
|
+
const HOST_ID = anyOf(HARNESSES);
|
|
311
320
|
const HARNESS_OPEN_RE = new RegExp(String.raw`^\s*<!--\s*harness:(${HOST_ID}(?:\s*,\s*${HOST_ID})*)\s*-->\s*$`);
|
|
312
321
|
const HARNESS_CLOSE_RE = /^\s*<!--\s*\/harness\s*-->\s*$/;
|
|
313
322
|
/**
|
|
@@ -328,9 +337,9 @@ export function normHarness(value, state) {
|
|
|
328
337
|
/**
|
|
329
338
|
* Every open has a matching close, with no nesting.
|
|
330
339
|
*
|
|
331
|
-
* A marker inside a ``` fence is example text, not a marker (the same rule
|
|
332
|
-
* uses). Its purpose is to FAIL OPEN: an unbalanced marker leaves the body untouched,
|
|
333
|
-
* typo can never blank the rest of a page.
|
|
340
|
+
* A marker inside a ``` fence is example text, not a marker (the same rule the frontend's
|
|
341
|
+
* outline uses). Its purpose is to FAIL OPEN: an unbalanced marker leaves the body untouched,
|
|
342
|
+
* so a typo can never blank the rest of a page.
|
|
334
343
|
*
|
|
335
344
|
* EXPORTED FOR THE AUTHORING GATE, in the shape `installAgentEntryOf` established: failing
|
|
336
345
|
* open means a typo is INVISIBLE in the rendered output — the page simply shows everything,
|
|
@@ -359,7 +368,7 @@ export function harnessBlocksBalanced(lines) {
|
|
|
359
368
|
* the marker; the console has already filtered the block to the reader's host, so there the
|
|
360
369
|
* label only repeats what the host selector says, and it goes with the marker.
|
|
361
370
|
*/
|
|
362
|
-
const HOST_NAME =
|
|
371
|
+
const HOST_NAME = anyOf(Object.values(DOC_HOSTS).map((h) => h.name));
|
|
363
372
|
const HOST_LABEL_RE = new RegExp(String.raw`^\s*\*\(${HOST_NAME}(?: and ${HOST_NAME})* only\)\*\s*$`);
|
|
364
373
|
|
|
365
374
|
export function stripHarnessBlocks(body, harnessName) {
|
|
@@ -411,16 +420,14 @@ function visibleGroups(harnessName) {
|
|
|
411
420
|
return groups;
|
|
412
421
|
}
|
|
413
422
|
|
|
414
|
-
// ---- slugs
|
|
423
|
+
// ---- heading slugs -----------------------------------------------------------------------
|
|
415
424
|
|
|
416
425
|
const SLUG_STRIP_RE = new RegExp(`[^a-z0-9${WHITESPACE}-]`, 'g');
|
|
417
426
|
const SLUG_WS_RE = new RegExp(`[${WHITESPACE}]+`, 'g');
|
|
418
427
|
const SLUG_DASH_RE = /-+/g;
|
|
419
|
-
const HEADING_RE = /^(#{1,6})\s+(.+?)\s*$/;
|
|
420
428
|
|
|
421
429
|
/**
|
|
422
|
-
* The same rules the frontend's `slug()` uses
|
|
423
|
-
* heading matches the id the renderer assigns.
|
|
430
|
+
* The same rules the frontend's `slug()` uses for the id it gives a rendered heading.
|
|
424
431
|
*
|
|
425
432
|
* `WHITESPACE` and `stripWhitespace` rather than `\s` and `trim()` — see `WHITESPACE`'s own
|
|
426
433
|
* docblock for the measured set of characters where this matters.
|
|
@@ -431,45 +438,6 @@ export function slugifyHeading(text) {
|
|
|
431
438
|
return s.replace(/^-+|-+$/g, '');
|
|
432
439
|
}
|
|
433
440
|
|
|
434
|
-
/**
|
|
435
|
-
* The body trimmed to one heading's section.
|
|
436
|
-
*
|
|
437
|
-
* Returns `[body, ok]`; `ok === false` (with the ORIGINAL body) when the anchor is
|
|
438
|
-
* missing, so the caller falls back to the whole document. An H1 slice stops at the first
|
|
439
|
-
* H2 — `max(level, 2)` — so it captures an intro paragraph rather than the whole file.
|
|
440
|
-
*/
|
|
441
|
-
export function sliceSection(body, anchor) {
|
|
442
|
-
const lines = splitLines(body);
|
|
443
|
-
let start = -1;
|
|
444
|
-
let startLevel = 0;
|
|
445
|
-
let inFence = false;
|
|
446
|
-
for (let i = 0; i < lines.length; i += 1) {
|
|
447
|
-
const ln = lines[i];
|
|
448
|
-
if (ln.startsWith('```')) { inFence = !inFence; continue; }
|
|
449
|
-
if (inFence) continue;
|
|
450
|
-
const m = HEADING_RE.exec(ln);
|
|
451
|
-
if (!m) continue;
|
|
452
|
-
if (slugifyHeading(m[2]) === anchor) {
|
|
453
|
-
start = i;
|
|
454
|
-
startLevel = Math.max(m[1].length, 2);
|
|
455
|
-
break;
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
if (start < 0) return [body, false];
|
|
459
|
-
const out = [lines[start]];
|
|
460
|
-
inFence = false;
|
|
461
|
-
for (let j = start + 1; j < lines.length; j += 1) {
|
|
462
|
-
const ln = lines[j];
|
|
463
|
-
if (ln.startsWith('```')) { inFence = !inFence; out.push(ln); continue; }
|
|
464
|
-
if (inFence) { out.push(ln); continue; }
|
|
465
|
-
const m = HEADING_RE.exec(ln);
|
|
466
|
-
if (m && m[1].length <= startLevel) break;
|
|
467
|
-
out.push(ln);
|
|
468
|
-
}
|
|
469
|
-
while (out.length && out[out.length - 1].trim() === '') out.pop();
|
|
470
|
-
return [`${out.join('\n')}\n`, true];
|
|
471
|
-
}
|
|
472
|
-
|
|
473
441
|
// ---- the endpoints -----------------------------------------------------------------------
|
|
474
442
|
|
|
475
443
|
function findDocPage(pageId) {
|
|
@@ -523,23 +491,20 @@ function glossary(state, page) {
|
|
|
523
491
|
* what gates the github-shaped deep links in the UI. Both come from `originDisplay()`,
|
|
524
492
|
* which shells out to `git remote get-url` (the `git` row in `ALLOWED_SPAWNS`).
|
|
525
493
|
*
|
|
526
|
-
* `version`
|
|
527
|
-
*
|
|
528
|
-
* the snapshot spells
|
|
529
|
-
* field is `{}`, always, and `sd.version || {}` reproduces the EXPRESSION rather than the
|
|
530
|
-
* constant: if the key ever appears, the page gains it without another edit.
|
|
494
|
+
* `version` carries the status snapshot's fingerprints under the names the About page reads.
|
|
495
|
+
* It used to read a `version` key the snapshot never had, so the page's build rows were
|
|
496
|
+
* always empty; the snapshot spells them `installed_fp` / `source_fp` / `version_verdict`.
|
|
531
497
|
*
|
|
532
498
|
* THERE IS NO INTERPRETER FIELD, and the absence is deliberate — see `apiSetup` in
|
|
533
499
|
* `api.mjs`, which spells the same absence for the same reason.
|
|
534
|
-
*
|
|
535
|
-
* `statusData()` is called for one dead field, and deliberately: this page has always paid that
|
|
536
|
-
* cost, and skipping it would answer faster in a way no gate measures and no user asked for.
|
|
537
500
|
*/
|
|
538
501
|
function about(state) {
|
|
539
502
|
const sd = statusData();
|
|
540
503
|
const od = originDisplay();
|
|
541
504
|
return {
|
|
542
|
-
version:
|
|
505
|
+
version: {
|
|
506
|
+
installed_fp: sd.installed_fp, source_fp: sd.source_fp, verdict: sd.version_verdict,
|
|
507
|
+
},
|
|
543
508
|
theme: state.theme,
|
|
544
509
|
emit: state.emit,
|
|
545
510
|
deployed: deployed(state),
|
|
@@ -590,18 +555,10 @@ export function apiDocsPage(state, pageId, harnessName = null) {
|
|
|
590
555
|
*/
|
|
591
556
|
const KIND_ROUTES = {
|
|
592
557
|
markdown: (state, pageId, page, hn) => {
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
// A successful slice drops the anchor: the heading is already at the top, so the
|
|
596
|
-
// client must not also try to scroll to it.
|
|
597
|
-
if (anchor && page.slice) {
|
|
598
|
-
const [sliced, ok] = sliceSection(body, anchor);
|
|
599
|
-
body = sliced;
|
|
600
|
-
if (ok) anchor = null;
|
|
601
|
-
}
|
|
602
|
-
body = rewriteDocLinks(stripHarnessBlocks(body, hn), page.source, idsByRel());
|
|
558
|
+
const body = rewriteDocLinks(stripHarnessBlocks(readDocSource(page.source), hn),
|
|
559
|
+
page.source, idsByRel());
|
|
603
560
|
return { id: pageId, title: page.title, kind: 'markdown', body,
|
|
604
|
-
source: page.source,
|
|
561
|
+
source: page.source, links: resolveLinks(state, body) };
|
|
605
562
|
},
|
|
606
563
|
concept: (state, pageId, page, hn) => {
|
|
607
564
|
const body = rewriteDocLinks(subCounts(state, stripHarnessBlocks(page.body ?? '', hn)),
|
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": "3.
|
|
4
|
+
"version": "3.14.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",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as e}from"./sections-GalMS0Zv.js";import{i as t,t as n}from"./react-B9Z_tXRV.js";import{t as r}from"./api-D_ixdyEY.js";import{J as i,N as a,k as o,l as s,y as c}from"./index-KHt3wE_K.js";import{a as l,i as u,n as d,o as f,r as p,t as m}from"./activity-Dr7ZMBI3.js";import{t as h}from"./usePoll-DD8VjtSg.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)(o,{name:`chevron`,className:`glyph act-chev`})]})]}),e.phase&&(0,_.jsxs)(`div`,{className:`row gap-8`,style:{marginTop:10,fontSize:14},children:[(0,_.jsx)(o,{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 o=!e||e.enabled!==!1,l=e?.activity||[],u=i(),d=async()=>{let e=!o;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:o?`tracking on`:`tracking off`}),(0,_.jsx)(`div`,{className:`sw-toggle${o?` on`:``}`,role:`switch`,"aria-checked":o,"aria-label":`Toggle activity tracking`,tabIndex:0,onClick:d,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),d())}})]})]}),(0,_.jsx)(s,{error:n,style:{marginBottom:12}}),e?o?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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as e}from"./sections-GalMS0Zv.js";import{i as t,t as n}from"./react-B9Z_tXRV.js";import{t as r}from"./api-D_ixdyEY.js";import{N as i,k as a,y as o}from"./index-KHt3wE_K.js";import{a as s,n as c,o as l,r as u,t as d}from"./activity-Dr7ZMBI3.js";import{t as f}from"./usePoll-DD8VjtSg.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-6KDjX8da.js","assets/sections-GalMS0Zv.js","assets/react-B9Z_tXRV.js","assets/drawable-zVVDbsyw.js","assets/index-KHt3wE_K.js","assets/api-D_ixdyEY.js","assets/index-Ctp-4poP.css","assets/jobBuckets-Dbq8ZlWW.js","assets/OperatorHudView-BPP1dtLz.js","assets/JournalView-C8MrOz2c.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-B9Z_tXRV.js";import{t as o}from"./api-D_ixdyEY.js";import{A as s,F as c,I as l,L as u,M as d,N as f,U as p,W as m,c as h,j as g,k as _,l as v,q as y,t as b,x,y as S}from"./index-KHt3wE_K.js";var C=r(i(),1),w={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.`},T=e=>e.deployed?w[e.theme]||`Loaded & ready`:`Not deployed`,E=a();function D({value:e,size:t=232}){let n=y(e,1100)??0,r=t/2-14,i=2*Math.PI*r,a=i*(1-n);return(0,E.jsxs)(`div`,{className:`ring-wrap`,style:{width:t,height:t},children:[(0,E.jsxs)(`svg`,{viewBox:`0 0 ${t} ${t}`,children:[(0,E.jsx)(`circle`,{cx:t/2,cy:t/2,r,fill:`none`,stroke:`var(--surface-3)`,strokeWidth:`10`}),(0,E.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,E.jsx)(`line`,{x1:c,y1:l,x2:u,y2:d,stroke:`var(--line-2)`,strokeWidth:`1`,opacity:i/48<n?.9:.25},i)})]}),(0,E.jsxs)(`div`,{className:`ring-center`,children:[(0,E.jsxs)(`div`,{className:`pct`,children:[Math.round(n*100),(0,E.jsx)(`span`,{style:{fontSize:20,color:`var(--text-3)`},children:`%`})]}),(0,E.jsx)(`div`,{className:`lbl`,children:`germination`})]})]})}function O({overview:e}){let t=s(e.diff),n=e.counts||{};return(0,E.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,E.jsxs)(`a`,{className:`kseg`,href:e.hash,title:`Open ${e.label}`,children:[(0,E.jsx)(`span`,{className:`kseg-n`+(t===0?` zero`:``),children:t==null?`—`:(0,E.jsx)(m,{value:t})}),(0,E.jsx)(`span`,{className:`kseg-l`,children:e.label})]},e.key)}),(0,E.jsx)(`div`,{className:`kseg-spacer`}),(0,E.jsxs)(`button`,{className:`kseg`+(t>0?` hot`:``),onClick:()=>p(`#/diff`),title:`Open changes`,children:[(0,E.jsx)(`span`,{className:`kseg-n`+(t===0?` zero`:``),children:(0,E.jsx)(m,{value:t})}),(0,E.jsx)(`span`,{className:`kseg-l`,children:`Local edits`}),t>0&&(0,E.jsx)(`span`,{className:`delta up`,children:`▲`})]})]})}function k({overview:t}){return(0,E.jsx)(`div`,{className:`genome`,children:n.map((n,r)=>{let i=e[n],a=t.counts?.[n];return(0,E.jsxs)(`div`,{className:`card gcell rise`,style:{"--i":r},onClick:()=>p(`#/section/`+n),children:[(0,E.jsxs)(`div`,{className:`gtop`,children:[(0,E.jsx)(`span`,{className:`gname`,children:i.label}),(0,E.jsx)(_,{name:i.icon,className:`gicon`})]}),(0,E.jsx)(`div`,{className:`gcount`+(a===0?` zero`:``),children:a==null?`—`:(0,E.jsx)(m,{value:a})}),(0,E.jsx)(`div`,{className:`gdesc`,children:i.desc})]},n)})})}function A({jobs:e}){if(!e||e.length===0)return(0,E.jsx)(`div`,{className:`feed`,children:(0,E.jsxs)(`div`,{className:`empty`,children:[(0,E.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,E.jsx)(`div`,{className:`feed`,children:n.map(e=>(0,E.jsxs)(`div`,{className:`feed-row`,children:[(0,E.jsx)(`span`,{className:`feed-dot ${t[e.status]||`ok`}`}),(0,E.jsx)(`span`,{className:`feed-txt`,children:(0,E.jsx)(`b`,{children:e.action})}),(0,E.jsxs)(`span`,{className:`feed-when`,children:[f(e.started),` ago`]})]},e.id))})}function j({overview:e,sigil:t,setup:r,jobs:i,onAction:a}){let o=T(e),s=d(e,r);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`div`,{className:`card pad-lg rise mb-16`,children:(0,E.jsxs)(`div`,{className:`hero`,children:[(0,E.jsx)(D,{value:s}),(0,E.jsxs)(`div`,{className:`hero-facts`,children:[(0,E.jsx)(`div`,{className:`ttl`,children:o}),t&&(0,E.jsxs)(`div`,{className:`voice-readout`,children:[(0,E.jsx)(`span`,{className:`vr-cur`,children:`▕`}),(0,E.jsx)(`span`,{className:`vr-txt`,children:t})]},e.theme),(0,E.jsxs)(`p`,{className:`sub`,children:[`One source rendered into `,(0,E.jsx)(`code`,{children:e.target}),`. Every repo on this machine inherits it.`]}),(0,E.jsxs)(`div`,{className:`hero-chips`,children:[(0,E.jsxs)(`span`,{className:`chip`,children:[(0,E.jsx)(`span`,{className:`ck`,children:`voice`}),(0,E.jsx)(`span`,{className:`cv`,style:{textTransform:`capitalize`},children:e.theme})]}),(0,E.jsxs)(`span`,{className:`chip`,children:[(0,E.jsx)(`span`,{className:`ck`,children:`mode`}),(0,E.jsx)(`span`,{className:`cv`,children:e.emit})]}),(0,E.jsxs)(`span`,{className:`chip`,children:[(0,E.jsx)(`span`,{className:`ck`,children:`footprint`}),(0,E.jsx)(`span`,{className:`cv`,children:e.footprint})]}),(0,E.jsxs)(`span`,{className:`chip`,children:[(0,E.jsx)(`span`,{className:`ck`,children:`built`}),(0,E.jsx)(`span`,{className:`cv`,children:e.build_time||`unknown`})]}),(0,E.jsxs)(`span`,{className:`chip`,children:[(0,E.jsx)(`span`,{className:`ck`,children:`fp`}),(0,E.jsx)(`span`,{className:`cv`,children:r?.installed_fp||`—`})]})]}),(0,E.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,E.jsxs)(`button`,{className:`btn`,onClick:()=>a(`update`),children:[(0,E.jsx)(_,{name:`refresh`}),`Update`]}),(0,E.jsxs)(`button`,{className:`btn ghost`,onClick:()=>a(`build-all`),children:[(0,E.jsx)(_,{name:`build`}),`Rebuild`]}),(0,E.jsxs)(`button`,{className:`btn ghost`,onClick:()=>a(`doctor`),children:[(0,E.jsx)(_,{name:`doctor`}),`Run doctor`]})]})]})]})}),(0,E.jsx)(O,{overview:e}),(0,E.jsxs)(`div`,{className:`grid split-status`,children:[(0,E.jsxs)(`div`,{className:`card pad-lg`,children:[(0,E.jsxs)(`div`,{className:`card-head`,children:[(0,E.jsx)(`h3`,{children:`Capability genome`}),(0,E.jsx)(`div`,{className:`right`,children:(0,E.jsxs)(`span`,{className:`tick`,children:[n.length,` sections`]})})]}),(0,E.jsx)(k,{overview:e})]}),(0,E.jsxs)(`div`,{className:`card pad-lg`,children:[(0,E.jsxs)(`div`,{className:`card-head`,children:[(0,E.jsx)(`h3`,{children:`Recent activity`}),(0,E.jsx)(`div`,{className:`right`,children:(0,E.jsxs)(`span`,{className:`badge acc`,children:[(0,E.jsx)(`span`,{className:`dot`}),`live`]})})]}),(0,E.jsx)(A,{jobs:i})]})]})]})}function M({k:t,overview:n,max:r}){let i=e[t],a=n.counts?.[t]??0;return(0,E.jsxs)(`div`,{className:`strand`,children:[(0,E.jsxs)(`span`,{className:`strand-name`,children:[(0,E.jsx)(`span`,{className:`strand-dot`}),(0,E.jsx)(`a`,{href:`#/section/`+t,className:`strand-link stretch-link`,children:i.label})]}),(0,E.jsx)(`div`,{className:`hbar`,children:(0,E.jsx)(`i`,{style:{width:`${a/r*100}%`}})}),(0,E.jsx)(`span`,{className:`strand-val`,children:a})]})}function N({overview:e,sigil:t,setup:r,jobs:i}){let a=g(e.counts),o=r?.version_verdict||``,c=o.includes(`up to date`),l=s(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,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`div`,{className:`mb-16`,children:(0,E.jsxs)(`div`,{className:`card pad-lg rise`,style:{position:`relative`,overflow:`hidden`},children:[(0,E.jsx)(`h2`,{className:`h`,style:{fontSize:22,margin:`0 0 18px`},children:`Gene-seed lineage`}),(0,E.jsxs)(`div`,{className:`lineage-track`,children:[(0,E.jsx)(`div`,{className:`spine`}),u.map(([e,t,n,r],i)=>(0,E.jsxs)(`div`,{className:`lineage-step`,children:[(0,E.jsx)(`span`,{className:`node ${r?`on`:``}`}),(0,E.jsx)(`div`,{className:`lt`,children:e}),(0,E.jsx)(`div`,{className:`ld`,children:t}),(0,E.jsx)(`div`,{className:`ltag`,children:n})]},i))]}),(0,E.jsx)(`hr`,{className:`hr`}),t&&(0,E.jsxs)(`div`,{className:`voice-readout`,style:{marginBottom:14},children:[(0,E.jsx)(`span`,{className:`vr-cur`,children:`▕`}),(0,E.jsx)(`span`,{className:`vr-txt`,children:t})]},e.theme),(0,E.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,E.jsxs)(`span`,{className:`badge ${c?`ok`:`warn`}`,children:[(0,E.jsx)(`span`,{className:`dot`}),`in sync · `,o]}),(0,E.jsxs)(`span`,{className:`badge`,children:[(0,E.jsx)(`span`,{className:`dot`}),l,` local edits`]})]})]})}),(0,E.jsxs)(`div`,{className:`grid split-even`,children:[(0,E.jsxs)(`div`,{className:`card pad-lg`,children:[(0,E.jsxs)(`div`,{className:`card-head`,children:[(0,E.jsx)(`h3`,{children:`Genome strand`}),(0,E.jsx)(`div`,{className:`right`,children:(0,E.jsx)(`span`,{className:`tick`,children:`by volume`})})]}),n.map(t=>(0,E.jsx)(M,{k:t,overview:e,max:a},t))]}),(0,E.jsxs)(`div`,{className:`card pad-lg`,children:[(0,E.jsx)(`div`,{className:`card-head`,children:(0,E.jsx)(`h3`,{children:`Recent activity`})}),(0,E.jsx)(A,{jobs:i})]})]})]})}function P({overview:t,setup:r,jobs:i}){let a=n.reduce((e,n)=>e+(t.counts?.[n]??0),0),o=g(t.counts),c=t.doctor?.ok,l=t.doctor?.problems?.length??0,u=s(t.diff);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`div`,{className:`card pad-md rise mb-16`,children:(0,E.jsx)(`div`,{className:`row wrap between gap-16`,children:(0,E.jsxs)(`div`,{className:`row`,style:{gap:20,flexWrap:`wrap`},children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`div`,{className:`tick`,children:`status`}),(0,E.jsx)(`div`,{className:`row`,style:{gap:8,marginTop:4},children:(0,E.jsxs)(`span`,{className:`badge ${t.deployed?`ok`:`warn`}`,children:[(0,E.jsx)(`span`,{className:`dot`}),t.deployed?`deployed`:`not deployed`]})})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`div`,{className:`tick`,children:`voice`}),(0,E.jsx)(`div`,{className:`metric`,style:{fontSize:18,marginTop:6,textTransform:`capitalize`},children:t.theme})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`div`,{className:`tick`,children:`mode`}),(0,E.jsx)(`div`,{className:`mono`,style:{fontSize:14,marginTop:6},children:t.emit})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`div`,{className:`tick`,children:`fingerprint`}),(0,E.jsx)(`div`,{className:`mono`,style:{fontSize:14,marginTop:6,color:`var(--accent)`},children:r?.installed_fp||`—`})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`div`,{className:`tick`,children:`doctor`}),(0,E.jsx)(`div`,{className:`row`,style:{gap:8,marginTop:4},children:c?(0,E.jsxs)(`span`,{className:`badge ok`,children:[(0,E.jsx)(`span`,{className:`dot`}),`clean`]}):(0,E.jsxs)(`span`,{className:`badge warn`,children:[(0,E.jsx)(`span`,{className:`dot`}),l,` issue`,l===1?``:`s`]})})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`div`,{className:`tick`,children:`edits`}),(0,E.jsx)(`div`,{className:`metric`,style:{fontSize:18,marginTop:6},children:u})]})]})})}),(0,E.jsxs)(`div`,{className:`grid split-operator`,children:[(0,E.jsxs)(`div`,{className:`card rise`,style:{"--i":1},children:[(0,E.jsxs)(`div`,{className:`card-head pad-lg`,style:{padding:`18px 20px 0`,marginBottom:14},children:[(0,E.jsx)(`h3`,{children:`Sections`}),(0,E.jsx)(`div`,{className:`right`,children:(0,E.jsxs)(`span`,{className:`tick`,children:[a,` entries total`]})})]}),(0,E.jsxs)(`table`,{className:`tbl`,children:[(0,E.jsx)(`thead`,{children:(0,E.jsxs)(`tr`,{children:[(0,E.jsx)(`th`,{children:`Section`}),(0,E.jsx)(`th`,{children:`Detail`}),(0,E.jsx)(`th`,{style:{width:130},children:`Share`}),(0,E.jsx)(`th`,{className:`num`,children:`Count`})]})}),(0,E.jsx)(`tbody`,{children:n.map(n=>{let r=e[n],i=t.counts?.[n]??0;return(0,E.jsxs)(`tr`,{className:`clickable`,children:[(0,E.jsx)(`td`,{className:`name`,children:(0,E.jsx)(`a`,{href:`#/section/`+n,className:`stretch-link`,children:r.label})}),(0,E.jsx)(`td`,{className:`muted`,children:r.desc}),(0,E.jsx)(`td`,{children:(0,E.jsx)(`div`,{className:`hbar`,children:(0,E.jsx)(`i`,{style:{width:`${i/o*100}%`}})})}),(0,E.jsx)(`td`,{className:`num`,children:i})]},n)})})]})]}),(0,E.jsxs)(`div`,{className:`card pad-lg rise`,style:{"--i":2},children:[(0,E.jsx)(`div`,{className:`card-head`,children:(0,E.jsx)(`h3`,{children:`Run log`})}),(0,E.jsx)(A,{jobs:i})]})]})]})}function F(){let[e,t]=(0,C.useState)(!1);return(0,E.jsxs)(`div`,{className:`stale-banner`,role:`alert`,children:[(0,E.jsx)(`span`,{children:`This console is running code from before your last upgrade.`}),(0,E.jsx)(`button`,{className:`btn sm`,onClick:async()=>{t(!0);try{await o.restart()}catch{}u(l)},disabled:e,children:e?`Restarting…`:`Restart`})]})}var I=t({default:()=>B}),L=(0,C.lazy)(()=>b(()=>import(`./GreenhouseView-6KDjX8da.js`),__vite__mapDeps([0,1,2,3,4,5,6,7]))),R=(0,C.lazy)(()=>b(()=>import(`./OperatorHudView-BPP1dtLz.js`),__vite__mapDeps([8,1,2,4,5,6,7]))),z=(0,C.lazy)(()=>b(()=>import(`./JournalView-C8MrOz2c.js`),__vite__mapDeps([9,1,2,5,3,4,6])));function B({overview:e,overviewError:t,onRetry:n,themes:r,setup:i,runs:a,onAction:s,layout:l=`cultivar`,dataRev:u}){let d=l,[f,p]=(0,C.useState)(`status`),m=e&&r.find(t=>t.name===e.theme)?.sigil||``,{data:g}=c(()=>d===`greenhouse`||d===`operator`?o.doctor().catch(()=>null):Promise.resolve(null),[d,u]),{data:_}=c(()=>d===`journal`?o.recent().catch(()=>null):Promise.resolve(null),[d,u]);if(!e)return t?(0,E.jsxs)(`div`,{children:[(0,E.jsx)(v,{error:`Could not load the harness overview: ${t}`}),(0,E.jsx)(`button`,{className:`btn`,onClick:n,children:`Retry`})]}):(0,E.jsx)(S,{});let y=e.daemon_stale?(0,E.jsx)(F,{}):null;return e.deployed?f===`status`&&d===`journal`?(0,E.jsxs)(C.Suspense,{fallback:(0,E.jsx)(S,{}),children:[y,(0,E.jsx)(z,{overview:e,recent:_,onAction:s,onDirection:p,dataRev:u})]}):(0,E.jsxs)(E.Fragment,{children:[y,(0,E.jsx)(`div`,{className:`head-row`,children:(0,E.jsx)(x,{"aria-label":`Dashboard view`,children:[[`status`,`Status`],[`lineage`,`Lineage`],[`operator`,`Operator`]].map(([e,t])=>(0,E.jsx)(`button`,{className:f===e?`on`:``,onClick:()=>p(e),"aria-pressed":f===e,children:t},e))})}),(0,E.jsxs)(`div`,{className:`view-in`,children:[f===`status`&&d===`cultivar`&&(0,E.jsx)(j,{overview:e,sigil:m,setup:i,jobs:a,onAction:s}),f===`status`&&d===`greenhouse`&&(0,E.jsx)(C.Suspense,{fallback:(0,E.jsx)(S,{}),children:(0,E.jsx)(L,{overview:e,sigil:m,jobs:a,doctor:g,onAction:s})}),f===`status`&&d===`operator`&&(0,E.jsx)(C.Suspense,{fallback:(0,E.jsx)(S,{}),children:(0,E.jsx)(R,{overview:e,jobs:a,doctor:g,onAction:s})}),f===`lineage`&&(0,E.jsx)(N,{overview:e,sigil:m,setup:i,jobs:a}),f===`operator`&&(0,E.jsx)(P,{overview:e,setup:i,jobs:a})]},f)]}):(0,E.jsxs)(E.Fragment,{children:[y,(0,E.jsx)(h,{onAction:s})]})}export{B as default,T as n,I as t};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{s as e}from"./sections-GalMS0Zv.js";import{i as t,t as n}from"./react-B9Z_tXRV.js";import{t as r}from"./api-D_ixdyEY.js";import{C as i,F as a,S as o,U as s,a as c,i as l,k as u,l as d,n as f,o as p,r as m,s as h,w as ee,x as te,y as g}from"./index-KHt3wE_K.js";import{a as _,c as v,i as y,l as b,n as x,o as S,r as C,s as ne,t as w}from"./Markdown-X2a3qvOh.js";var T=e(t(),1),E=n();function D(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 O(e){return e.replace(/!?\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\[\[([^\]]+)\]\]/g,`$1`).replace(/`([^`]*)`/g,`$1`).replace(/\*\*|__/g,``).replace(/\*([^*\s][^*]*)\*/g,`$1`)}function k(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:O(e[2]),id:D(e[2],r)}))}return t}var A={"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`]},j=`you already know this`;function M({page:e,overview:t,onAction:n}){let r=(0,T.useRef)(null),i=(0,T.useMemo)(()=>x(e.body,e.links),[e.body,e.links]);(0,T.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=D(e.textContent||``,t);n&&(e.id=n)}}),e.querySelectorAll(`blockquote`).forEach(e=>{(e.querySelector(`strong`)?.textContent||``).toLowerCase().startsWith(j)&&e.classList.add(`analogy`)})},[i]),(0,T.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,T.useEffect)(()=>{let n=r.current;if(!n)return;n.querySelectorAll(`.docs-here`).forEach(e=>e.classList.remove(`docs-here`));let[i,a]=A[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=>D(e.textContent||``)===D(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,E.jsxs)(`div`,{className:`detail-doc`,children:[(0,E.jsx)(`h1`,{style:{marginTop:0},children:e.title}),e.source&&(0,E.jsx)(`div`,{className:`doc-meta`,children:(0,E.jsxs)(`span`,{className:`badge`,children:[(0,E.jsx)(`span`,{className:`dot`}),e.source]})}),a.length>0&&(0,E.jsx)(`div`,{className:`row wrap gap-10`,style:{margin:`10px 0 14px`},children:a.map(e=>e.hash?(0,E.jsx)(`a`,{className:`btn ghost sm`,href:e.hash,children:e.label},e.label):(0,E.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>n&&n(e.action),children:e.label},e.label))}),(0,E.jsx)(`div`,{className:`markdown`,ref:r,dangerouslySetInnerHTML:{__html:i}}),e.link&&(0,E.jsx)(`div`,{style:{marginTop:24},children:(0,E.jsx)(`a`,{className:`btn soft sm`,href:e.link.hash,children:e.link.label})})]})}var N=1200;function P({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,E.jsxs)(`div`,{className:`cli-arg`,children:[(0,E.jsx)(`code`,{className:`cli-arg-name`,children:n}),r.length>0&&(0,E.jsxs)(`code`,{className:`cli-arg-meta`,children:[` `,r.join(` · `)]}),e.help&&(0,E.jsx)(`div`,{className:`cli-arg-help`,children:e.help})]})}function F({text:e}){let[t,n]=(0,T.useState)(!1);return(0,E.jsxs)(`button`,{className:`btn ghost sm`,onClick:async()=>{try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),N)}catch{}},title:`Copy command`,children:[(0,E.jsx)(u,{name:t?`spark`:`copy`}),t?`Copied`:`Copy`]})}function I({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,E.jsxs)(`div`,{className:`card pad-md mb-12 cli-card`,children:[(0,E.jsxs)(`div`,{className:`row wrap between`,style:{alignItems:`flex-start`},children:[(0,E.jsxs)(`div`,{className:`stack`,style:{gap:4},children:[(0,E.jsx)(`h3`,{style:{margin:0},children:(0,E.jsx)(`code`,{children:e.name})}),e.help&&(0,E.jsx)(`p`,{className:`sub`,style:{margin:0},children:e.help})]}),(0,E.jsx)(F,{text:`${t} ${e.name}`})]}),(0,E.jsx)(`pre`,{className:`cli-syn`,children:r}),(e.positionals||[]).length>0&&(0,E.jsxs)(`div`,{className:`cli-block`,children:[(0,E.jsx)(`div`,{className:`cli-block-head`,children:`Arguments`}),e.positionals.map(e=>(0,E.jsx)(P,{a:e,kind:`positional`},e.dest))]}),(e.options||[]).length>0&&(0,E.jsxs)(`div`,{className:`cli-block`,children:[(0,E.jsx)(`div`,{className:`cli-block-head`,children:`Options`}),e.options.map(e=>(0,E.jsx)(P,{a:e,kind:`option`},e.names.join(`,`)))]})]})}function L({page:e}){let t=e.prog||`geneseed`,n=e.commands||[];return(0,E.jsxs)(`div`,{className:`detail-doc`,children:[(0,E.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,E.jsxs)(`p`,{className:`sub`,style:{marginTop:4},children:[`Every subcommand of `,(0,E.jsx)(`code`,{children:t}),`. Generated from the parser at request time (the same one `,(0,E.jsx)(`code`,{children:`geneseed`}),` actually parses), so this page cannot drift.`]}),(0,E.jsx)(`div`,{style:{marginTop:18},children:n.map(e=>(0,E.jsx)(I,{cmd:e,prog:t},e.name))})]})}function R({page:e}){let t=e.rows||[],n=e.theme||`neutral`;return(0,E.jsxs)(`div`,{className:`detail-doc`,children:[(0,E.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,E.jsxs)(`p`,{className:`sub`,style:{marginTop:4},children:[`Geneseed's invented vocabulary, decoded. Left: the neutral, plain-English term. Right: the word your `,(0,E.jsx)(`code`,{style:{textTransform:`capitalize`},children:n}),` theme actually uses in the agent's voice. Last: the developer idea it maps to.`]}),(0,E.jsx)(`div`,{className:`card pad-md`,style:{marginTop:18},children:(0,E.jsxs)(`table`,{className:`glossary-table`,children:[(0,E.jsx)(`thead`,{children:(0,E.jsxs)(`tr`,{children:[(0,E.jsx)(`th`,{children:`Concept`}),(0,E.jsx)(`th`,{children:`Neutral term`}),(0,E.jsxs)(`th`,{children:[`In `,n]}),(0,E.jsx)(`th`,{children:`Meaning`}),(0,E.jsx)(`th`,{children:`In dev terms`})]})}),(0,E.jsx)(`tbody`,{children:t.map(e=>(0,E.jsxs)(`tr`,{children:[(0,E.jsx)(`td`,{children:(0,E.jsx)(`strong`,{children:e.label})}),(0,E.jsx)(`td`,{children:(0,E.jsx)(`code`,{children:e.neutral||`—`})}),(0,E.jsx)(`td`,{children:(0,E.jsx)(`code`,{children:e.themed||e.neutral||`—`})}),(0,E.jsx)(`td`,{className:`dim`,children:e.desc}),(0,E.jsx)(`td`,{className:`dim`,children:e.analogy||`—`})]},e.label))})]})})]})}var z={enforced:`ok`,automatic:`ok`,asked:`warn`,"on demand":`warn`};function B(e){let t=[],n=[],r=`before`;for(let i of(e||``).split(`
|
|
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
|
+
`),n.join(`
|
|
5
|
+
`)]}var V=({text:e})=>(0,E.jsx)(`span`,{dangerouslySetInnerHTML:{__html:C(y.parseInline(e||``))}}),H=({kind:e})=>(0,E.jsx)(`span`,{className:`tag ${z[e]||``}`,children:e});function U({page:e,overview:t,onAction:n}){let[r,i]=(0,T.useState)(0);if(!e.rows)return(0,E.jsx)(M,{page:e,overview:t,onAction:n});let a=e.rows[r]||e.rows[0],[o,s]=B(e.body);return(0,E.jsxs)(`div`,{className:`detail-doc`,children:[(0,E.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,E.jsx)(w,{body:o,links:e.links}),(0,E.jsxs)(`div`,{className:`docs-map`,children:[(0,E.jsx)(`ul`,{className:`map-tree`,"aria-label":`Pieces`,children:e.rows.map((e,t)=>(0,E.jsx)(`li`,{children:(0,E.jsxs)(`button`,{className:`map-node ${t===r?`on`:``}`,"aria-pressed":t===r,onClick:()=>i(t),children:[(0,E.jsx)(`span`,{className:`map-piece`,children:(0,E.jsx)(V,{text:e.piece})}),(0,E.jsx)(H,{kind:e.kind}),(0,E.jsx)(`span`,{className:`mono dim map-cost`,children:(0,E.jsx)(V,{text:e.cost})})]})},t))}),a&&(0,E.jsxs)(`div`,{className:`card pad-md map-detail`,"aria-live":`polite`,children:[(0,E.jsx)(`h3`,{style:{margin:`0 0 8px`},children:(0,E.jsx)(V,{text:a.piece})}),(0,E.jsx)(H,{kind:a.kind}),(0,E.jsxs)(`dl`,{children:[(0,E.jsx)(`dt`,{children:`Does`}),(0,E.jsx)(`dd`,{children:(0,E.jsx)(V,{text:a.does})}),(0,E.jsx)(`dt`,{children:`Costs`}),(0,E.jsx)(`dd`,{children:(0,E.jsx)(V,{text:a.cost})}),(0,E.jsx)(`dt`,{children:`Turn it off`}),(0,E.jsx)(`dd`,{children:(0,E.jsx)(V,{text:a.off})})]})]})]}),s.trim()&&(0,E.jsx)(w,{body:s,links:e.links})]})}var W=5,G=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function K(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-])${G(e)}s?(?![\\w-])`,`i`).test(n))&&r.push(e),r.length===W)break;return r}var q=e=>document.getElementById(e)?.scrollIntoView({behavior:`smooth`});function J({body:e,glossaryRows:t}){let n=(0,T.useMemo)(()=>k(e),[e]),r=(0,T.useMemo)(()=>K(e,t),[e,t]);return!n.length&&!r.length?null:(0,E.jsxs)(`aside`,{className:`docs-margin`,children:[n.length>0&&(0,E.jsxs)(`nav`,{className:`docs-toc`,"aria-label":`On this page`,children:[(0,E.jsx)(`div`,{className:`docs-toc-head`,children:`On this page`}),(0,E.jsx)(`ul`,{children:n.map(e=>(0,E.jsx)(`li`,{className:`lvl-${e.level}`,children:(0,E.jsx)(`a`,{href:`#${e.id}`,onClick:t=>{t.preventDefault(),q(e.id)},children:e.title})},e.id))})]}),r.length>0&&(0,E.jsxs)(`div`,{className:`docs-gloss`,children:[(0,E.jsx)(`div`,{className:`docs-toc-head`,children:`Terms on this page`}),r.map(e=>(0,E.jsxs)(`div`,{className:`docs-gloss-card`,children:[(0,E.jsx)(`b`,{children:e.themed||e.neutral||e.label}),(0,E.jsx)(`p`,{children:e.desc})]},e.label))]})]})}function Y({page:e}){let t=e.version||{},n=[[`Theme`,e.theme],[`Install mode`,e.emit],[`Deployed`,e.deployed?`yes`:`no`],[`Target`,(0,E.jsx)(`code`,{children:e.target},`t`)],[`Source root`,(0,E.jsx)(`code`,{children:e.root},`r`)],[`Installed build`,(0,E.jsx)(`code`,{children:t.installed_fp||`(none)`},`i`)],[`Source build`,(0,E.jsx)(`code`,{children:t.source_fp||`—`},`s`)],[`Match?`,t.verdict||`—`],[`License`,e.license]];return(0,E.jsxs)(`div`,{className:`detail-doc`,children:[(0,E.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,E.jsx)(`p`,{className:`sub`,style:{marginTop:4},children:`Live snapshot of the install behind this UI, plus where to go next.`}),(0,E.jsx)(`div`,{className:`card pad-md`,style:{marginTop:18},children:n.map(([e,t])=>(0,E.jsxs)(`div`,{className:`kv`,children:[(0,E.jsx)(`span`,{className:`k`,children:e}),(0,E.jsx)(`span`,{className:`v`,children:t??`—`})]},e))}),(0,E.jsxs)(`div`,{className:`row wrap gap-10`,style:{marginTop:18},children:[(0,E.jsxs)(`a`,{className:`btn ghost`,href:e.repo,target:`_blank`,rel:`noreferrer`,children:[(0,E.jsx)(u,{name:`external`}),e.repo_is_github?`GitHub repo`:`Source repo`]}),e.repo_is_github&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`a`,{className:`btn ghost`,href:`${e.repo}/issues`,target:`_blank`,rel:`noreferrer`,children:[(0,E.jsx)(u,{name:`external`}),`File an issue`]}),(0,E.jsxs)(`a`,{className:`btn ghost`,href:`${e.repo}/blob/main/LICENSE`,target:`_blank`,rel:`noreferrer`,children:[(0,E.jsx)(u,{name:`external`}),`License`]})]})]})]})}var X=encodeURIComponent,Z=e=>`#/docs/${X(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,E.jsx)(d,{error:t,style:{margin:18}});if(!e)return(0,E.jsx)(g,{label:`Loading page…`});switch(e.kind){case`markdown`:case`concept`:return(0,E.jsx)(M,{page:e,overview:n,onAction:r});case`map`:return(0,E.jsx)(U,{page:e,overview:n,onAction:r});case`cli`:return(0,E.jsx)(L,{page:e});case`glossary`:return(0,E.jsx)(R,{page:e});case`about`:return(0,E.jsx)(Y,{page:e});default:return(0,E.jsxs)(`div`,{className:`empty`,children:[(0,E.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[u,y]=ee(i(t?.emit)),{data:x,error:C}=a(()=>r.docs(u),[u]),w=e||Q(x),{data:D,error:O,loading:k}=a(()=>w?r.docsPage(w,u):Promise.resolve(null),[w,u]),{data:A}=a(()=>r.docsPage(`glossary`,u).catch(()=>null),[u],`docs:glossary`);(0,T.useEffect)(()=>{if(x&&w&&!x.groups.some(e=>e.pages.some(e=>e.id===w))){let e=Q(x);e&&e!==w&&s(Z(e))}},[x,w]),(0,T.useEffect)(()=>{let e=document.scrollingElement||document.documentElement;for(let t of[document.getElementById(`main`),e])t&&(t.scrollTop=0)},[w]);let j=p(x,w),M=j.part||x?.groups?.[0]||null,N=M?.id===m;(0,T.useEffect)(()=>{N&&D?.id===w&&c(w)},[N,D,w]);let P=N?[...h(),w]:[],[F,I]=(0,T.useState)(``),[L,R]=(0,T.useState)(`all`),[z,B]=(0,T.useState)(M?.id);M?.id!==z&&(B(M?.id),I(``),R(`all`));let V=$(M),H=S(V),U=L===`all`?V:V.filter(e=>e.group===L),W=b(U,F);return C?(0,E.jsx)(d,{error:C}):(0,E.jsx)(`div`,{className:`docs-wrap`,children:(0,E.jsxs)(`div`,{className:`library docs-lib`,children:[(0,E.jsxs)(`aside`,{className:`lib-kinds`,"aria-label":`Docs parts`,children:[(0,E.jsxs)(`div`,{className:`lib-title`,children:[(0,E.jsx)(`h1`,{className:`h`,children:`Docs`}),(0,E.jsx)(`span`,{className:`dim`,children:`How it works, and how to use it`})]}),(0,E.jsx)(te,{"aria-label":`Harness`,children:o.map(e=>(0,E.jsx)(`button`,{className:u===e.id?`on`:``,onClick:()=>y(e.id),"aria-pressed":u===e.id,children:e.label},e.id))}),(0,E.jsx)(`nav`,{className:`kind-list`,"aria-label":`Parts`,children:(x?.groups||[]).map(e=>(0,E.jsxs)(T.Fragment,{children:[(0,E.jsxs)(`a`,{href:e.pages[0]?Z(e.pages[0].id):`#/docs`,className:M?.id===e.id?`on`:``,"aria-current":M?.id===e.id?`page`:void 0,children:[e.label,(0,E.jsx)(`span`,{className:`mono dim`,children:e.pages.length})]}),M?.id===e.id&&(0,E.jsx)(_,{label:`Sections`,total:V.length,cats:H,cat:L,onChange:R})]},e.id))})]}),(0,E.jsx)(v,{label:M?.label||`Docs`,count:F.trim()?`${W.length} of ${U.length}`:U.length||``,extra:N&&(0,E.jsx)(l,{pages:M.pages,seen:P}),q:F,onQ:I,matched:W.length,inView:[M?.id,w],children:x?(0,E.jsx)(ne,{rows:W,activeName:w,hrefOf:e=>Z(e.name),pills:N?e=>P.includes(e.name)&&e.name!==w?(0,E.jsxs)(`span`,{className:`docs-read-mark`,children:[(0,E.jsx)(`span`,{"aria-hidden":`true`,children:`✓`}),(0,E.jsx)(`span`,{className:`sr-only`,children:`read`})]}):null:void 0}):(0,E.jsx)(g,{label:`Loading docs…`})}),(0,E.jsxs)(`article`,{className:`lib-reader docs-reader`,"aria-label":`Page`,children:[j.page&&(0,E.jsxs)(`nav`,{className:`docs-crumbs mono`,"aria-label":`Breadcrumb`,children:[(0,E.jsx)(`a`,{href:Z(j.part.pages[0].id),children:j.part.label}),(0,E.jsx)(`span`,{"aria-hidden":`true`,children:`›`}),(0,E.jsx)(`a`,{href:Z(j.part.pages.find(e=>(e.section||`General`)===j.section).id),children:j.section}),(0,E.jsx)(`span`,{"aria-hidden":`true`,children:`›`}),(0,E.jsx)(`span`,{"aria-current":`page`,children:j.page.title})]}),(0,E.jsxs)(`div`,{className:`docs-read`,children:[(0,E.jsxs)(`div`,{className:`docs-article`,children:[(0,E.jsx)(re,{data:k?null:D,error:O,overview:t,onAction:n},`${w}|${u}`),!k&&(0,E.jsx)(f,{menu:x,pageId:w})]}),!k&&(0,E.jsx)(J,{body:D?.body,glossaryRows:A?.rows})]})]})]})})}export{ie as default,$ as docRows};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./sections-GalMS0Zv.js";import{i as e,t}from"./react-B9Z_tXRV.js";e();var n=t();function r({value:e,onChange:t,label:r,placeholder:i,className:a}){return(0,n.jsx)(`input`,{className:a||`lib-filter`,type:`text`,value:e,onChange:e=>t(e.target.value),placeholder:i,"aria-label":r||i})}export{r as t};
|
|
@@ -0,0 +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-B9Z_tXRV.js";import{t as a}from"./drawable-zVVDbsyw.js";import{$ as o,A as s,G as c,K as l,W as u,X as d,k as f}from"./index-KHt3wE_K.js";import{t as p}from"./jobBuckets-Dbq8ZlWW.js";import{n as m}from"./Dashboard-J-xCe_Gk.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,s=(0,h.useRef)(null),f=e.map(e=>e.value).join(`,`);(0,h.useLayoutEffect)(()=>{let t=s.current?.querySelectorAll(`path`);if(!t?.length||!c())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)),u=a(t);d(u,{draw:`0 0`});let f=o(u,{draw:[`0 0`,`0 1`],duration:(e,t)=>Math.max(b*n[t],60),delay:(e,t)=>b*r[t],ease:`linear`});return l(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:s,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)(u,{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 c=n.counts||{},l=a?.groups||[],d=l.length>0,h=l.filter(e=>e.problems.length===0).length,b=l.length||1,S=m(n),T=s(n.diff),E=t.filter(e=>(c[e]||0)>0).map((t,n)=>({label:e[t].label,value:c[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:d?`${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.`]}),d&&(0,g.jsx)(`ul`,{className:`b-hero-checks`,children:l.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:c.agents??`—`,sub:`specialists`,color:y[0],icon:`layers`}),(0,g.jsx)(w,{label:`Skills`,value:c.skills??`—`,sub:`workflows`,color:y[1],icon:`skill`}),(0,g.jsx)(w,{label:`Invariants`,value:c.laws??`—`,sub:c.doctrines?`${c.doctrines.active}/${c.doctrines.total} packs · ${c.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)(u,{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
|
+
`)[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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{s as e}from"./sections-GalMS0Zv.js";import{i as t,t as n}from"./react-B9Z_tXRV.js";import{t as r}from"./api-D_ixdyEY.js";import{A as i,B as a,D as o,E as s,F as c,I as l,L as u,O as d,R as f,T as p,b as m,k as h,l as g,v as _,x as v,y,z as b}from"./index-KHt3wE_K.js";import{t as x}from"./Tabs-BzKuFskD.js";var S=e(t(),1),C=n();function w({label:e,value:t,options:n,onChange:r}){return n.length?(0,C.jsx)(`select`,{className:`sel`,"aria-label":e,value:t,onChange:e=>r(e.target.value),children:n.map(e=>(0,C.jsx)(`option`,{value:e,children:e},e))}):null}var T=[`full`,`lean`];function E({on:e,disabled:t,label:n,onToggle:r}){return(0,C.jsx)(`input`,{type:`checkbox`,role:`switch`,className:`sw-toggle${e?` on`:``}`,checked:e,"aria-checked":e,disabled:t,"aria-label":n,onChange:r,onKeyDown:e=>{e.key===`Enter`&&!t&&r()}})}var D=[{key:`theme`,name:`voice`,title:`Voice`},{key:`footprint`,name:`footprint`,title:`Footprint`},{key:`posture`,name:`posture`,title:`Posture`},{key:`mode`,name:`mode`,title:`Mode`},{key:`trust`,name:`trust`,title:`Loop trust`}];function O({value:e,options:t,onChange:n,who:r}){return D.map(i=>(0,C.jsxs)(`label`,{className:`dp-field`,children:[(0,C.jsx)(`span`,{children:i.title}),(0,C.jsx)(w,{label:`${i.name} for ${r}`,value:e[i.key],options:t[i.key],onChange:e=>n(i.key,e)})]},i.key))}function k({host:e,theme:t,options:n,onAction:i,onClose:a,onNote:o}){let[c,l]=(0,S.useState)({path:``,host:e,theme:t,footprint:`full`,posture:`peer`,mode:`direct`,trust:`balanced`}),[u,d]=(0,S.useState)(!1),f=(e,t)=>l(n=>({...n,[e]:t})),m=async()=>{d(!0),o(``);try{let e=await r.pickFolder();e.path?f(`path`,e.path):e.error&&o(e.error)}catch(e){o(e.message)}finally{d(!1)}},h=async()=>{let e=c.path.trim();if(!e){o(`Choose or type a folder to deploy into.`);return}o(``),await i?.(`deploy`,{host:c.host,path:e,theme:c.theme,footprint:c.footprint,posture:c.posture,mode:c.mode,trust:c.trust})&&a()};return(0,C.jsxs)(`div`,{className:`deploy-pop`,children:[(0,C.jsxs)(`div`,{className:`dp-row`,children:[(0,C.jsx)(`input`,{className:`inp dp-path`,type:`text`,placeholder:`/path/to/project, or click Browse…`,value:c.path,onChange:e=>f(`path`,e.target.value),onKeyDown:e=>e.key===`Enter`&&h(),"aria-label":`Folder to deploy into`}),(0,C.jsx)(`button`,{className:`btn ghost sm`,disabled:u,onClick:m,children:u?`Choosing…`:`Browse…`})]}),(0,C.jsxs)(`div`,{className:`dp-row`,children:[(0,C.jsxs)(`label`,{className:`dp-field`,children:[(0,C.jsx)(`span`,{children:`Deploy as`}),(0,C.jsx)(`select`,{className:`sel`,"aria-label":`host for the new harness`,value:c.host,onChange:e=>f(`host`,e.target.value),children:p.map(e=>(0,C.jsx)(`option`,{value:e.id,children:e.label},e.id))})]}),(0,C.jsx)(O,{value:c,options:n,onChange:f,who:`the new harness`}),(0,C.jsx)(`button`,{className:`btn sm`,onClick:h,children:`Deploy`}),(0,C.jsx)(`button`,{className:`btn ghost sm`,onClick:a,children:`Cancel`})]}),(0,C.jsxs)(`p`,{className:`sub dp-note`,children:[`Adds a per-repo harness (`,(0,C.jsx)(`code`,{children:s(c.host).deployAdds}),`) into the folder, non-destructively. It’s then tracked here even after you leave its directory.`]})]})}function A(){let{data:e,error:t,reload:n}=c(()=>r.excludes(),[]),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)([]),l=async(e,t)=>{a(!0);try{let n=await r.excludeMutate(e,t);s(n.messages||[])}catch(e){s(e.body?.messages||[e.message])}finally{a(!1),n()}};return t||!e?.installs?.length?null:(0,C.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,C.jsx)(`div`,{className:`card-head`,children:(0,C.jsx)(`h3`,{children:`Excluded folders`})}),(0,C.jsx)(`p`,{className:`sub mb-16`,children:`Sovereign repos: inside these folders every global harness goes dormant — hooks stay silent and the global preamble is not loaded.`}),(e.excludes||[]).map(e=>(0,C.jsxs)(`div`,{className:`row wrap between gap-12`,children:[(0,C.jsx)(`code`,{children:e.path}),(0,C.jsxs)(`span`,{className:`mono muted`,children:[`[`,e.hosts.join(`, `),`]`]}),(0,C.jsx)(`button`,{className:`btn ghost sm`,disabled:i,onClick:()=>l(`remove`,e.path),children:`Remove`})]},e.path)),(0,C.jsxs)(`button`,{className:`btn ghost sm`,disabled:i,onClick:async()=>{a(!0);try{let e=await r.pickFolder();e.path?await l(`add`,e.path):e.error&&s([e.error])}catch(e){s([e.message])}finally{a(!1)}},children:[(0,C.jsx)(h,{name:`folder`}),` Exclude a folder…`]}),o.map((e,t)=>(0,C.jsx)(`p`,{className:`sub`,children:e},t))]})}function j({inst:e,memory:t,busy:n,onMemory:r,onRemove:i,onCancel:a}){return(0,C.jsxs)(`div`,{className:`h-remove`,children:[(0,C.jsxs)(`p`,{className:`hr-msg`,children:[(0,C.jsx)(`strong`,{children:e.scope===`project`?`Remove this harness from the folder?`:`Remove the global ${e.host} install?`}),` `,(0,C.jsxs)(`span`,{className:`sub`,children:[`Deletes `,(0,C.jsx)(`code`,{children:d(e.host,e.scope)}),e.scope===`project`?` and de-lists it.`:`; the row stays, marked “not installed.”`,` `,`This can’t be undone.`]})]}),(0,C.jsxs)(`label`,{className:`field`,children:[(0,C.jsx)(`span`,{children:`Memory and notebook`}),(0,C.jsxs)(`select`,{className:`sel`,"aria-label":`memory disposition`,value:t,onChange:e=>r(e.target.value),children:[(0,C.jsx)(`option`,{value:`keep`,children:`keep in place`}),(0,C.jsx)(`option`,{value:`archive`,children:`archive aside`}),(0,C.jsx)(`option`,{value:`delete`,children:`delete too`})]})]}),(0,C.jsxs)(`div`,{className:`row gap-8`,children:[(0,C.jsx)(`button`,{type:`button`,className:`btn danger`,disabled:n,onClick:i,children:n?`Removing…`:`Remove`}),(0,C.jsx)(`button`,{type:`button`,className:`btn ghost`,onClick:a,children:`Cancel`})]})]})}function M({targets:e,mcpBusy:t,onReveal:n,onToggle:r}){let i=e.flatMap(e=>e.servers),a=i.filter(e=>e.state===`enabled`).length;return(0,C.jsxs)(`div`,{className:`ip-block`,children:[(0,C.jsxs)(`span`,{className:`ip-label`,children:[`MCP servers`,` `,(0,C.jsxs)(`span`,{className:`mono dim`,children:[a,` of `,i.length]})]}),e.map(e=>(0,C.jsxs)(`div`,{className:`mcp-target`,children:[(0,C.jsxs)(`div`,{className:`mt-head`,children:[(0,C.jsx)(`code`,{title:e.path,children:e.label}),(0,C.jsx)(`button`,{type:`button`,className:`btn ghost sm`,onClick:()=>n(e),title:`Open the folder holding ${e.path}: tokens and URLs go in this file`,children:`Open folder`}),e.commented?(0,C.jsx)(`span`,{className:`dim`,children:`has comments; edit by hand`}):null]}),e.servers.map(n=>{let i=e.path+n.name,a=!!(e.commented||t===i);return(0,C.jsxs)(`div`,{className:`mcp-row`,title:n.desc,children:[(0,C.jsx)(`span`,{children:n.label}),n.state===`absent`?n.preset?(0,C.jsx)(`button`,{type:`button`,className:`btn ghost sm`,disabled:a,onClick:()=>r(e,n),children:`Add`}):null:(0,C.jsx)(E,{on:n.state===`enabled`,disabled:a,label:`${n.label} server`,onToggle:()=>r(e,n)})]},n.name)})]},e.path))]})}var N={active:[`Active`,`ok`],disabled:[`Disabled`,`warn`],absent:[`Not installed`,``]};function P({inst:e,targets:t,choice:n,unchanged:r,options:i,onPick:a,canAct:c,busy:l,mcpBusy:u,removing:d,onRemoving:f,onApply:p,onToggleInstall:m,onRemove:h,onRevealMcp:g,onToggleMcp:_}){let v=`${e.host} · ${e.scope}`,[y,b]=N[e.state]||N.absent,x=e.state===`active`,S=e.state===`absent`;return(0,C.jsxs)(`aside`,{className:`install-panel`,"aria-label":`${v} install`,children:[(0,C.jsx)(`span`,{className:`ip-eyebrow`,children:`Selected install`}),(0,C.jsxs)(`div`,{className:`ip-head`,children:[(0,C.jsx)(`h2`,{children:o(e)}),(0,C.jsx)(`span`,{className:`tag ${b}`,children:y})]}),(0,C.jsx)(`span`,{className:`ip-kind`,children:e.scope===`global`?`Global install`:`Per-project install · ${s(e.host).label}`}),(0,C.jsx)(`code`,{className:`ip-path`,children:e.path}),S?(0,C.jsxs)(`p`,{className:`sub`,children:[`Install Geneseed here as `,(0,C.jsx)(`strong`,{children:e.host}),`. Files are added non-destructively; deactivate or uninstall later.`]}):null,(x||S)&&c?(0,C.jsx)(`div`,{className:`ip-picks`,children:(0,C.jsx)(O,{value:n,options:i,onChange:a,who:v})}):null,x&&t.length?(0,C.jsx)(M,{targets:t,mcpBusy:u,onReveal:g,onToggle:_}):null,x&&e.scope===`global`?(0,C.jsx)(A,{}):null,S?null:(0,C.jsxs)(`label`,{className:`ip-switch`,children:[(0,C.jsx)(E,{on:x,disabled:l,label:`activate ${v}`,onToggle:m}),(0,C.jsx)(`span`,{children:x?`Active: loads in every session`:`Disabled: files moved aside`})]}),(0,C.jsx)(`div`,{className:`ip-spacer`}),c?(0,C.jsxs)(`div`,{className:`ip-actions`,children:[S?(0,C.jsx)(`button`,{type:`button`,className:`btn`,onClick:p,children:`Install`}):x?(0,C.jsx)(`button`,{type:`button`,className:`btn`,disabled:r,onClick:p,children:`Apply and rebuild`}):null,S?null:(0,C.jsx)(`button`,{type:`button`,className:`btn ghost danger-line`,"aria-label":`remove ${v} from ${e.path}`,"aria-expanded":!!d,disabled:l,onClick:()=>f(d?null:{memory:`keep`}),children:`Uninstall…`})]}):null,d?(0,C.jsx)(j,{inst:e,memory:d.memory,busy:l,onMemory:e=>f({memory:e}),onRemove:h,onCancel:()=>f(null)}):null]})}var F=(e,t)=>`${e} ${t}`,I={active:[`Active`,`ok`],disabled:[`Disabled`,`warn`]};function L({rows:e,project:t,currentId:n,onPick:r,label:i}){return(0,C.jsx)(`div`,{className:`tbl-scroll`,children:(0,C.jsxs)(`table`,{className:`tbl hosts-tbl`,"aria-label":i,children:[(0,C.jsx)(`thead`,{children:(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`th`,{children:t?`Project`:`Host`}),(0,C.jsx)(`th`,{children:t?`Host`:`Path`}),(0,C.jsx)(`th`,{children:`Voice`}),(0,C.jsx)(`th`,{children:`Footprint`}),(0,C.jsx)(`th`,{children:`State`}),(0,C.jsx)(`th`,{children:(0,C.jsx)(`span`,{className:`sr-only`,children:`Selected`})})]})}),(0,C.jsx)(`tbody`,{children:e.map(e=>{let[i,a]=I[e.state]||[`Not installed`,``],c=n===e.id,l=e.state===`absent`;return(0,C.jsxs)(`tr`,{className:`pickable${c?` on`:``}${l?` quiet`:``}`,onClick:()=>r(e.id),children:[(0,C.jsx)(`td`,{children:(0,C.jsx)(`button`,{type:`button`,className:`row-pick`,"aria-pressed":c,title:e.path,onClick:()=>r(e.id),children:o(e)})}),t?(0,C.jsx)(`td`,{children:s(e.host).label}):(0,C.jsx)(`td`,{className:`mono path-cell`,title:e.path,children:e.path}),(0,C.jsx)(`td`,{children:l?``:e.theme||``}),(0,C.jsx)(`td`,{children:l?``:e.footprint||``}),(0,C.jsx)(`td`,{children:(0,C.jsx)(`span`,{className:`tag ${a}`,children:i})}),(0,C.jsx)(`td`,{className:`pick-mark`,children:c?`Editing ›`:``})]},e.id)})})]})})}function R({themes:e,current:t}){if(!e.length||!t)return null;let n=[...e].sort((e,n)=>e.name===t?-1:+(n.name===t));return(0,C.jsxs)(`details`,{className:`panel voice-ref`,children:[(0,C.jsxs)(`summary`,{children:[(0,C.jsx)(`span`,{className:`vr-title`,children:`Voices`}),(0,C.jsxs)(`span`,{className:`mono dim`,children:[e.length,` to choose from, set per install`]})]}),(0,C.jsx)(`div`,{className:`vr-list`,children:n.map(e=>(0,C.jsxs)(`div`,{className:`voice-row${e.name===t?` current`:``}`,children:[(0,C.jsx)(`span`,{className:`vr-name`,children:e.name}),(0,C.jsx)(`span`,{className:`vr-desc`,children:e.tagline?`“${e.tagline}”`:e.blurb})]},e.name))})]})}function z({setup:e,overview:t}){if(!e)return null;let n=e.installed_fp&&e.installed_fp===e.source_fp;return(0,C.jsxs)(`section`,{className:`panel`,"aria-labelledby":`checkout-h`,children:[(0,C.jsxs)(`div`,{className:`panel-head`,children:[(0,C.jsx)(`h2`,{id:`checkout-h`,children:`This checkout`}),(0,C.jsx)(`span`,{className:`mono ${n?`t-good`:`t-warn`}`,children:e.version_verdict})]}),(0,C.jsxs)(`dl`,{className:`kv-grid`,children:[(0,C.jsx)(`dt`,{children:`Source`}),(0,C.jsx)(`dd`,{className:`mono`,children:e.root}),(0,C.jsx)(`dt`,{children:`Version`}),(0,C.jsx)(`dd`,{className:`mono`,children:t?.version||`unknown`}),(0,C.jsx)(`dt`,{children:`Fingerprint`}),(0,C.jsx)(`dd`,{className:`mono`,children:e.source_fp})]})]})}function B({onAction:e,themes:t=[],currentTheme:n,overview:i,setup:a,dataRev:o,onMutated:s}){let l=_(),{data:u,error:d}=c(()=>r.installs(),[o]),{data:f,error:p}=c(()=>r.mcp(),[o]),[m,v]=(0,S.useState)(``),[b,x]=(0,S.useState)(``),[w,E]=(0,S.useState)(``),[D,O]=(0,S.useState)({}),[A,j]=(0,S.useState)(!1),[M,N]=(0,S.useState)(null),[I,B]=(0,S.useState)(``),V=(0,S.useMemo)(()=>{let e={};for(let t of f?.targets||[]){let n=F(t.host||`opencode`,t.root);(e[n]||(e[n]=[])).push(t)}return e},[f]);if(d||p)return(0,C.jsx)(g,{error:d||p});if(!u||!f)return(0,C.jsx)(y,{});let H={active:0,disabled:1,absent:2},U=[...u.installs].sort((e,t)=>(e.scope===`global`?0:1)-(t.scope===`global`?0:1)||(H[e.state]??3)-(H[t.state]??3)),W=U.find(e=>e.id===I)||U.find(e=>e.selected)||U.find(e=>e.state===`active`)||U[0],G=e=>{let t=D[e.id]||{};return{theme:t.theme||e.theme||n||`neutral`,footprint:t.footprint||e.footprint||`full`,posture:t.posture||e.posture||`peer`,mode:t.mode||e.mode||`direct`,trust:t.trust||e.trust||`balanced`}},K=(e,t,n)=>O(r=>({...r,[e.id]:{...r[e.id],[t]:n}})),q=e=>{let t=G(e);return t.theme===e.theme&&t.footprint===(e.footprint||`full`)&&t.posture===(e.posture||`peer`)&&t.mode===(e.mode||`direct`)&&t.trust===(e.trust||`balanced`)},J={theme:t.map(e=>e.name),footprint:T,posture:u.postures||[],mode:u.modes||[],trust:u.trusts||[]},Y=async t=>{let{theme:n,footprint:r,posture:i,mode:a,trust:o}=G(t),s=t.state===`absent`?`Install Geneseed into ${t.path} with the “${n}” voice (${r} footprint, ${i} posture, ${a} mode)? Files are added non-destructively (your own config is left untouched); deactivate or uninstall later.`:`Rebuild this install (voice “${n}”, ${r} footprint, ${i} posture, ${a} mode)? It rebuilds in place, non-destructive.`;await l(s,{title:t.state===`absent`?`Install Geneseed?`:`Rebuild this install?`,confirmLabel:t.state===`absent`?`Install`:`Rebuild`})&&e?.(`install`,{host:t.host,scope:t.scope,path:t.path,theme:n,footprint:r,posture:i,mode:a,trust:o})},X=async e=>{if(e.state!==`active`||await l(`Deactivate this install? Files are moved aside, not deleted; reactivate any time.`,{title:`Deactivate this install?`,confirmLabel:`Deactivate`})){x(e.id),v(``);try{let t=await r.installToggle(e.host,e.path,e.state===`active`?`deactivate`:`activate`);if(!t.ok){let e=Array.isArray(t.failed)?t.failed.join(`, `):``;v(t.error||e&&`unrestored: ${e}`||`action failed`);return}s?.()}catch(e){v(e.message)}finally{x(``)}}},Z=async()=>{let e=M;if(e){x(e.id),v(``);try{let t=await r.installRemove(e.host,e.path,e.memory);if(!t.ok){v(t.error||`remove failed`);return}N(null),s?.()}catch(e){v(e.message)}finally{x(``)}}},ee=async e=>{v(``);try{let t=await r.mcpReveal(e.path);v(`Opening ${t.dir}. If no window appeared, open that folder by hand.`)}catch(e){v(e.message)}},te=async(e,t)=>{let n=e.path+t.name;E(n),v(``);try{await r.mcpToggle(e.path,t.name,t.state!==`enabled`),s?.()}catch(e){v(e.message)}finally{E(``)}},ne=U.find(e=>e.selected)?.host||U.find(e=>e.state===`active`)?.host||U[0]?.host||`opencode`,re=U.filter(e=>e.scope===`global`),Q=U.filter(e=>e.scope!==`global`),$=e=>{B(e),N(null)};return(0,C.jsxs)(`div`,{className:`hosts`,children:[(0,C.jsxs)(`div`,{className:`hosts-main`,children:[(0,C.jsxs)(`div`,{className:`toolbar`,children:[(0,C.jsxs)(`span`,{className:`dim`,children:[U.filter(e=>e.state===`active`).length,` active of `,U.length,` `,`detected.`]}),e?(0,C.jsx)(`div`,{className:`row gap-8`,children:(0,C.jsxs)(`button`,{type:`button`,className:`btn ghost`,onClick:()=>e(`build-all`),children:[(0,C.jsx)(h,{name:`refresh`}),` Rebuild all`]})}):null]}),m?(0,C.jsx)(`p`,{className:`tag bad note`,role:`status`,children:m}):null,(0,C.jsxs)(`section`,{className:`panel flush`,"aria-labelledby":`inst-global`,children:[(0,C.jsx)(`div`,{className:`inst-head`,children:(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`h2`,{id:`inst-global`,children:`Global installs`}),(0,C.jsx)(`p`,{className:`dim`,children:`One per tool. Loaded in every folder, except excluded ones.`})]})}),(0,C.jsx)(L,{rows:re,currentId:W?.id,onPick:$,label:`Global installs`})]}),(0,C.jsxs)(`section`,{className:`panel flush`,"aria-labelledby":`inst-project`,children:[(0,C.jsxs)(`div`,{className:`inst-head`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`h2`,{id:`inst-project`,children:`Per-project installs`}),(0,C.jsx)(`p`,{className:`dim`,children:`A repo with its own harness. Inside it, only that harness loads.`})]}),e?(0,C.jsxs)(`button`,{type:`button`,className:`btn ghost`,onClick:()=>j(e=>!e),children:[(0,C.jsx)(h,{name:`folder`}),` Deploy to a repo…`]}):null]}),A?(0,C.jsx)(`div`,{className:`inst-deploy`,children:(0,C.jsx)(k,{host:ne,theme:n||`neutral`,options:J,onAction:e,onClose:()=>j(!1),onNote:v})}):null,Q.length?(0,C.jsx)(L,{rows:Q,project:!0,currentId:W?.id,onPick:$,label:`Per-project installs`}):(0,C.jsx)(`div`,{className:`empty inst-empty`,children:`No repo has its own harness yet. Deploy one to give a project its own rules and voice.`})]}),(0,C.jsx)(z,{setup:a,overview:i}),(0,C.jsx)(R,{themes:t,current:i?.theme})]}),W?(0,C.jsx)(P,{inst:W,targets:V[F(W.host,W.path)]||[],choice:G(W),unchanged:q(W),options:J,onPick:(e,t)=>K(W,e,t),canAct:!!e,busy:b===W.id,mcpBusy:w,removing:M?.id===W.id?M:null,onRemoving:e=>N(e&&{id:W.id,host:W.host,path:W.path,memory:e.memory}),onApply:()=>Y(W),onToggleInstall:()=>X(W),onRemove:Z,onRevealMcp:ee,onToggleMcp:te},W.id):null]})}function V(e){return e.startsWith(`@@`)||e.startsWith(`+++`)||e.startsWith(`---`)?`hunk`:e.startsWith(`+`)?`add`:e.startsWith(`-`)?`del`:`ctx`}function H({onMutated:e,onAction:t,dataRev:n}){let i=_(),{data:a,error:o,reload:s}=c(()=>r.diff(),[n]),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(()=>new Set),[v,b]=(0,S.useState)(()=>new Set),[x,w]=(0,S.useState)(null);a&&a!==x&&(w(a),m(new Set),b(new Set(a.files.map(e=>e.rel))));let T=e=>m(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),E=()=>m(e=>e.size===a.files.length?new Set:new Set(a.files.map(e=>e.rel))),D=()=>t?.(`export`),O=async()=>{let t=[...p],n=t.filter(e=>a.files.find(t=>t.rel===e)?.status===`added`),o=n.length?`Restoring will DELETE ${n.length} deployed-only file(s):\n${n.join(`
|
|
2
|
+
`)}\n\n`:``;if(await i(`${o}Discard local edits and restore ${t.length} file(s) from source?`,{title:`Restore from source?`,confirmLabel:`Restore`})){u(!0);try{let n=await r.restore(t),i=n.errors.length?` · ${n.errors.length} error(s): ${n.errors.join(`; `)}`:``;f(`Restored ${n.restored.length}, deleted ${n.deleted.length}${i}`),await s(),e?.()}catch(e){f(e.message)}finally{u(!1)}}};if(o)return(0,C.jsx)(g,{error:o});if(!a)return(0,C.jsx)(y,{});if(!a.deployed)return(0,C.jsxs)(`div`,{className:`empty`,children:[(0,C.jsx)(`div`,{className:`big`,children:`No deployed harness`}),`Nothing to diff against.`]});let k=a.files,A=k.filter(e=>e.status===`edited`).length,j=k.filter(e=>e.status===`added`).length,M=k.filter(e=>e.status===`missing`).length,N=e=>b(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n});return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`div`,{className:`head-row mb-16`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`h2`,{className:`h`,children:`Local edits`}),(0,C.jsx)(`p`,{className:`sub`,children:`The agent refines its own deployed files in place. Export them as improvements before any rebuild overwrites them.`})]}),(0,C.jsxs)(`div`,{className:`row gap-10`,children:[(0,C.jsxs)(`button`,{className:`btn ghost`,disabled:l||p.size===0,onClick:O,children:[`Restore`,p.size?` (${p.size})`:``]}),(0,C.jsxs)(`button`,{className:`btn`,disabled:l,onClick:D,children:[(0,C.jsx)(h,{name:`download`}),`Export improvements`]})]})]}),d?(0,C.jsx)(`p`,{className:`sub mb-14`,children:d}):null,k.length===0?(0,C.jsxs)(`div`,{className:`empty`,children:[(0,C.jsx)(`div`,{className:`big`,children:`In sync`}),`Deployed harness matches source.`]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`div`,{className:`row between mb-14`,children:[(0,C.jsxs)(`div`,{className:`row gap-10`,children:[(0,C.jsxs)(`span`,{className:`badge`,children:[(0,C.jsx)(`span`,{className:`dot`,style:{background:`var(--warn)`}}),A,` edited`]}),(0,C.jsxs)(`span`,{className:`badge`,children:[(0,C.jsx)(`span`,{className:`dot`,style:{background:`var(--good)`}}),j,` added`]}),M>0&&(0,C.jsxs)(`span`,{className:`badge`,children:[(0,C.jsx)(`span`,{className:`dot`,style:{background:`var(--bad)`}}),M,` missing`]})]}),(0,C.jsxs)(`label`,{className:`row dim`,style:{gap:8,fontSize:12.5,cursor:`pointer`},children:[(0,C.jsx)(`input`,{type:`checkbox`,style:{accentColor:`var(--accent)`},checked:p.size===k.length,onChange:E}),`Select all`]})]}),(0,C.jsx)(`div`,{className:`stack gap-12`,children:k.map(e=>{let t=v.has(e.rel),n=e.status===`added`?`ok`:e.status===`missing`?`bad`:`warn`;return(0,C.jsxs)(`div`,{className:`card diff-file${t?` open`:``}`,children:[(0,C.jsxs)(`div`,{className:`diff-head`,children:[(0,C.jsx)(`input`,{type:`checkbox`,className:`chk`,checked:p.has(e.rel),onChange:()=>T(e.rel),onClick:e=>e.stopPropagation(),"aria-label":`Select ${e.rel}`}),(0,C.jsx)(`span`,{className:`fname`,children:e.rel}),(0,C.jsxs)(`span`,{className:`badge ${n}`,children:[(0,C.jsx)(`span`,{className:`dot`}),e.status]}),(0,C.jsxs)(`span`,{className:`dim mono`,style:{marginLeft:`auto`,fontSize:11},children:[e.diff.length,` lines`]}),(0,C.jsx)(`button`,{className:`iconbtn`,onClick:()=>N(e.rel),style:{transform:t?`rotate(90deg)`:`none`},"aria-label":t?`Collapse ${e.rel}`:`Expand ${e.rel}`,"aria-expanded":t,children:(0,C.jsx)(h,{name:`chevron`})})]}),t&&(0,C.jsx)(`div`,{className:`diff-body`,children:e.diff.map((e,t)=>(0,C.jsx)(`div`,{className:`diff-line ${V(e)}`,children:e},t))})]},e.rel)})})]})]})}function U({group:e,i:t}){let n=e.problems.length===0,[r,i]=(0,S.useState)(!n);return(0,C.jsxs)(`div`,{className:`card check rise ${n?``:`bad`} ${r?`open`:``}`,style:{"--i":t*.6},children:[(0,C.jsxs)(`button`,{className:`check-head`,onClick:()=>i(e=>!e),disabled:n,style:{cursor:n?`default`:`pointer`},"aria-expanded":n?void 0:r,children:[(0,C.jsx)(`span`,{className:`feed-dot ${n?`ok`:`bad`}`,style:{width:9,height:9}}),(0,C.jsx)(`h3`,{children:e.label}),(0,C.jsxs)(`span`,{className:`badge ${n?`ok`:`bad`}`,children:[(0,C.jsx)(`span`,{className:`dot`}),n?`clean`:`${e.problems.length} problem${e.problems.length===1?``:`s`}`]}),!n&&(0,C.jsx)(h,{name:`chevron`,className:`chev glyph`})]}),!n&&r&&(0,C.jsx)(`div`,{className:`check-body`,children:e.problems.map(e=>(0,C.jsxs)(`div`,{className:`problem`,children:[(0,C.jsx)(`span`,{className:`x`,children:`✕`}),(0,C.jsx)(`span`,{children:e})]},e))})]})}function W(){let{data:e,error:t,reload:n,setData:i}=c(()=>r.doctor(),[]);return t?(0,C.jsx)(g,{error:t}):(0,C.jsxs)(`div`,{className:`narrow`,children:[(0,C.jsxs)(`div`,{className:`head-row mb-16`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`h2`,{className:`h`,children:`Doctor`}),(0,C.jsx)(`p`,{className:`sub`,children:`Every check builds each theme in a sandbox and validates the result: token resolution, link integrity, parity, and drift.`})]}),(0,C.jsxs)(`button`,{className:`btn ghost`,onClick:()=>{i(null),n()},disabled:!e,children:[(0,C.jsx)(h,{name:`refresh`}),e?`Re-run checks`:`Running…`]})]}),e?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`div`,{className:`card pad-md mb-16`,children:(0,C.jsxs)(`div`,{className:`row wrap between gap-12`,children:[(0,C.jsxs)(`div`,{className:`row`,style:{gap:10,flexWrap:`wrap`},children:[(0,C.jsxs)(`span`,{className:`dim mono`,style:{fontSize:12},children:[`validated `,e.themes.length,` theme`,e.themes.length===1?``:`s`]}),e.themes.map(e=>(0,C.jsx)(`span`,{className:`badge`,style:{textTransform:`capitalize`},children:e},e))]}),e.ok?(0,C.jsxs)(`span`,{className:`badge ok`,children:[(0,C.jsx)(`span`,{className:`dot`}),`all clean`]}):(0,C.jsxs)(`span`,{className:`badge bad`,children:[(0,C.jsx)(`span`,{className:`dot`}),e.problems.length,` problem`,e.problems.length===1?``:`s`]})]})}),(0,C.jsx)(`div`,{className:`stack gap-12`,children:e.groups.map((e,t)=>(0,C.jsx)(U,{group:e,i:t},e.label))})]}):(0,C.jsx)(y,{label:`Running every check (builds each theme in a sandbox)…`})]})}function G(){let e=_(),[t,n]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1);return t?(0,C.jsxs)(`p`,{className:`sub`,children:[`Server stopped. You can close this tab and reopen any time with `,(0,C.jsx)(`code`,{children:`geneseed web`}),`.`]}):(0,C.jsxs)(`div`,{className:`row`,children:[(0,C.jsxs)(`button`,{className:`btn ghost`,onClick:async()=>{if(await e(`Restart the local Geneseed server? The console reconnects in a moment.`,{title:`Restart the server?`,confirmLabel:`Restart`})){a(!0);try{await r.restart()}catch{}u(l)}},disabled:i,children:[(0,C.jsx)(h,{name:`refresh`}),i?`Restarting…`:`Restart server`]}),(0,C.jsxs)(`button`,{className:`btn ghost`,onClick:async()=>{if(await e(`Stop the local Geneseed server? The console goes offline until you start it again.`,{title:`Stop the server?`,confirmLabel:`Stop server`})){try{await r.shutdown()}catch{}n(!0)}},disabled:i,children:[(0,C.jsx)(h,{name:`x`}),`Stop server`]})]})}var K=`https://github.com/Arylmera/Geneseed`,q=`https://github.com/Arylmera`;function J(){let[e,t]=(0,S.useState)(K),[n,i]=(0,S.useState)(!0);return(0,S.useEffect)(()=>{Promise.resolve(r.docsPage?.(`about`)).then(e=>{e?.repo&&(t(e.repo),i(!!e.repo_is_github))}).catch(()=>{})},[]),(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,C.jsx)(`div`,{className:`card-head`,children:(0,C.jsx)(`h3`,{children:`About`})}),(0,C.jsx)(`p`,{className:`sub mb-16`,children:`Geneseed is a portable, theme-able harness you implant once and use everywhere to grow a disciplined AI coding agent. One canonical source, many voices, MIT-licensed.`}),(0,C.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,C.jsxs)(`a`,{className:`btn ghost`,href:e,target:`_blank`,rel:`noreferrer`,children:[(0,C.jsx)(h,{name:`github`}),n?`Source on GitHub`:`Source repo`]}),n&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`a`,{className:`btn ghost`,href:e+`/issues`,target:`_blank`,rel:`noreferrer`,children:[(0,C.jsx)(h,{name:`external`}),`Issues`]}),(0,C.jsxs)(`a`,{className:`btn ghost`,href:e+`/blob/main/LICENSE`,target:`_blank`,rel:`noreferrer`,children:[(0,C.jsx)(h,{name:`external`}),`MIT License`]})]})]})]}),(0,C.jsxs)(`div`,{className:`card pad-lg`,children:[(0,C.jsx)(`div`,{className:`card-head`,children:(0,C.jsx)(`h3`,{children:`Creator`})}),(0,C.jsxs)(`p`,{className:`sub mb-16`,children:[`Geneseed is built by `,(0,C.jsx)(`strong`,{children:`Guillaume Lemer`}),`. It started as a personal, Obsidian-vault-grown agent operating system and was distilled into the repo you are running. Implant it once, and a disciplined agent grows around the same inherited rules, skills, and memory in every repo it follows you into.`]}),(0,C.jsx)(`p`,{className:`sub mb-16`,children:`If you find this useful, a star on the repo or an issue with feedback is the best way to help shape what comes next.`}),(0,C.jsx)(`div`,{className:`row wrap gap-10`,children:(0,C.jsxs)(`a`,{className:`btn ghost`,href:q,target:`_blank`,rel:`noreferrer`,children:[(0,C.jsx)(h,{name:`github`}),`@Arylmera on GitHub`]})})]})]})}function Y({overview:e,onAction:t,flavour:n,onFlavour:r,accentMode:i,onAccentMode:o,layout:s,onLayout:c}){let l=_(),u=e?.install,d=e?.footprint,p=async e=>{u&&e!==d&&await l(`Rebuild ${u.host} · ${u.scope} with the “${e}” footprint? It rebuilds in place, non-destructive.`,{title:`Change the footprint?`,confirmLabel:`Rebuild`})&&t?.(`install`,{...u,footprint:e})};return(0,C.jsxs)(`div`,{className:`narrow-lg`,children:[(0,C.jsx)(`div`,{className:`head-row mb-18`,children:(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`h2`,{className:`h`,children:`Settings`}),(0,C.jsx)(`p`,{className:`sub`,children:`Console appearance, the footprint of the install you are viewing, machine maintenance (including the update), server control, and about. Each install is managed on the Hosts tab.`})]})}),n&&r&&(0,C.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,C.jsx)(`div`,{className:`card-head`,children:(0,C.jsx)(`h3`,{children:`Console direction`})}),(0,C.jsxs)(`p`,{className:`sub mb-16`,children:[a.length,` takes on the same data. Pick a direction; it applies instantly and persists across reloads.`]}),i&&o&&(0,C.jsxs)(`div`,{className:`dir-layout`,children:[(0,C.jsx)(`span`,{className:`tick`,id:`dir-accent-label`,children:`Accent`}),(0,C.jsx)(m,{value:i,onChange:o,labelledBy:`dir-accent-label`}),(0,C.jsx)(`span`,{className:`dir-layout-note sub`,role:`status`,"aria-live":`polite`,children:b(i)})]}),s&&c&&(0,C.jsxs)(`div`,{className:`dir-layout`,children:[(0,C.jsx)(`span`,{className:`tick`,id:`dir-layout-label`,children:`Overview view`}),(0,C.jsx)(v,{"aria-labelledby":`dir-layout-label`,children:f.map(e=>(0,C.jsx)(`button`,{className:s===e.id?`on`:``,onClick:()=>c(e.id),"aria-pressed":s===e.id,title:e.tagline,children:e.short},e.id))}),(0,C.jsx)(`span`,{className:`dir-layout-note sub`,role:`status`,"aria-live":`polite`,children:f.find(e=>e.id===s)?.tagline??``})]}),(0,C.jsx)(`div`,{className:`dir-grid`,children:a.map(e=>(0,C.jsxs)(`button`,{className:`dir-tile dir-${e.id} ${n===e.id?`on`:``}`,onClick:()=>r(e.id),"aria-pressed":n===e.id,children:[(0,C.jsxs)(`span`,{className:`dir-thumb`,"aria-hidden":`true`,children:[(0,C.jsx)(`span`,{className:`dir-thumb-rail`}),(0,C.jsx)(`span`,{className:`dir-thumb-bar`}),(0,C.jsx)(`span`,{className:`dir-thumb-bar`,style:{width:`70%`}}),(0,C.jsx)(`span`,{className:`dir-thumb-bar`,style:{width:`52%`}}),(0,C.jsx)(`span`,{className:`dir-thumb-dot`})]}),(0,C.jsxs)(`span`,{className:`dir-meta`,children:[(0,C.jsxs)(`span`,{className:`dir-name`,children:[e.short,n===e.id&&(0,C.jsx)(`span`,{className:`dir-check`,children:`● active`})]}),(0,C.jsx)(`span`,{className:`dir-tag`,children:e.tagline})]})]},e.id))})]}),u&&d&&(0,C.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,C.jsx)(`div`,{className:`card-head`,children:(0,C.jsx)(`h3`,{children:`Harness footprint`})}),(0,C.jsxs)(`p`,{className:`sub mb-16`,children:[`How much of the Rules `,(0,C.jsx)(`code`,{children:`AGENT.md`}),` carries inline each turn, for the current install (`,(0,C.jsxs)(`code`,{children:[u.host,` · `,u.scope]}),`). A token-cost dial; every Rule stays in force either way. Changing it rebuilds the install in place. `,(0,C.jsx)(`a`,{href:`#/docs/footprint`,children:`Learn more →`})]}),(0,C.jsxs)(`div`,{className:`dir-layout`,children:[(0,C.jsx)(`span`,{className:`tick`,id:`footprint-label`,children:`Footprint`}),(0,C.jsx)(v,{"aria-labelledby":`footprint-label`,children:[`full`,`lean`].map(e=>(0,C.jsx)(`button`,{className:d===e?`on`:``,onClick:()=>p(e),"aria-pressed":d===e,children:e},e))}),(0,C.jsx)(`span`,{className:`dir-layout-note sub`,role:`status`,"aria-live":`polite`,children:d===`lean`?`Lean: terse rule lines + a pointer to the full law file (~40% smaller, lighter context per turn).`:`Full: every Rule’s complete text and rationale inlined (maximum guidance, largest context).`})]})]}),(0,C.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,C.jsx)(`div`,{className:`card-head`,children:(0,C.jsx)(`h3`,{children:`Maintenance`})}),(0,C.jsxs)(`p`,{className:`sub mb-16`,children:[`Put `,(0,C.jsx)(`code`,{children:`geneseed`}),` on your PATH so it runs from any directory, or remove a global install. Your memory store is always kept. Each runs live in the console.`]}),(0,C.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,C.jsxs)(`button`,{className:`btn ghost`,onClick:()=>t(`update`),children:[(0,C.jsx)(h,{name:`download`}),`Update (git pull + rebuild)`]}),(0,C.jsxs)(`button`,{className:`btn ghost`,onClick:()=>t(`link`),children:[(0,C.jsx)(h,{name:`external`}),`Add to PATH`]}),(0,C.jsx)(`button`,{className:`btn ghost`,onClick:()=>t(`unlink`),children:`Remove from PATH`}),(0,C.jsxs)(`button`,{className:`btn ghost`,onClick:async()=>{await l(`Uninstall the global Geneseed harness? Your memory store is kept; everything else this install added is removed.`,{title:`Uninstall Geneseed?`,confirmLabel:`Uninstall`})&&t(`uninstall`)},children:[(0,C.jsx)(h,{name:`clear`}),`Uninstall`]})]})]}),(0,C.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,C.jsx)(`div`,{className:`card-head`,children:(0,C.jsx)(`h3`,{children:`Server`})}),(0,C.jsx)(`p`,{className:`sub mb-16`,children:`The console runs a small local server. Leave it running in the background and reopen any time, or stop it when you are done.`}),(0,C.jsx)(G,{})]}),(0,C.jsx)(J,{})]})}function X({tab:e=`hosts`,overview:t,setup:n,themes:r,onAction:a,onMutated:o,dataRev:s,appearance:c={}}){let l=t?.doctor,u=t?.diff,d={edits:u?i(u)+(u.missing??0):null,doctor:l?l.ok?`clean`:l.problems.length:null};return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`div`,{className:`page-head`,children:(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`h1`,{className:`h`,children:`Installs`}),(0,C.jsx)(`p`,{className:`sub`,children:`Where the harness lives on this machine, and how each copy is built.`})]})}),(0,C.jsx)(x,{page:`installs`,current:e,badges:d,label:`Installs`}),e===`hosts`&&(0,C.jsx)(B,{onAction:a,themes:r,currentTheme:t?.theme,overview:t,setup:n,dataRev:s,onMutated:o}),e===`edits`&&(0,C.jsx)(H,{onMutated:o,onAction:a,dataRev:s}),e===`doctor`&&(0,C.jsx)(W,{}),e===`server`&&(0,C.jsx)(Y,{overview:t,onAction:a,...c})]})}export{X as default};
|