geneseed 4.17.0 → 4.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/SHIPPED.md +1 -1
- package/docs/guides/upgrade.md +17 -1
- package/harness.config.json +1 -1
- package/js/web/api.mjs +22 -8
- package/js/web/handler.mjs +19 -9
- package/js/web/jobs.mjs +63 -6
- package/js/web/server.mjs +2 -0
- package/js/web/update-check.mjs +106 -10
- package/package.json +1 -1
- package/web/dist/assets/{Activity-DMgUkz1y.js → Activity-DNVzYkIY.js} +1 -1
- package/web/dist/assets/{ActivityDetail-0NQav1Ct.js → ActivityDetail-CMBXjmTo.js} +1 -1
- package/web/dist/assets/{Dashboard-BrtpmSc7.js → Dashboard-DFY_FarE.js} +2 -2
- package/web/dist/assets/{Docs-BgSOOv3c.js → Docs-BS0NIsA0.js} +1 -1
- package/web/dist/assets/{GreenhouseView-BCpp3_J7.js → GreenhouseView-M3wWndqG.js} +1 -1
- package/web/dist/assets/{Installs-CJuwb-R_.js → Installs-CvRxZcZc.js} +1 -1
- package/web/dist/assets/{JournalView-DoSufCu0.js → JournalView-BSD-1Z83.js} +1 -1
- package/web/dist/assets/{KitApply-Csb2NKOJ.js → KitApply-_4Ug9pMF.js} +1 -1
- package/web/dist/assets/{Kits-Dtq7aDW7.js → Kits-c5mVesJ9.js} +1 -1
- package/web/dist/assets/{Laws-CV584w6U.js → Laws-Bpn4ZBzL.js} +1 -1
- package/web/dist/assets/{Library-DfXSs4so.js → Library-DWgfAfkV.js} +1 -1
- package/web/dist/assets/{Loops-_D1DPJVK.js → Loops-BqP3c0c-.js} +1 -1
- package/web/dist/assets/{OperatorHudView-Dh5gW8Bt.js → OperatorHudView-DLEGd63S.js} +1 -1
- package/web/dist/assets/{Personal-Bk6kfmgc.js → Personal-B_LeqnDL.js} +1 -1
- package/web/dist/assets/{Tabs-CjSgf4wz.js → Tabs-RdL1pfIT.js} +1 -1
- package/web/dist/assets/{drawable-DlKtGexn.js → drawable-inwWR3uw.js} +1 -1
- package/web/dist/assets/index-BAArp8rX.js +2 -0
- package/web/dist/index.html +1 -1
- package/web/dist/assets/index-DbwBkTjy.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,13 @@ label. For the capability ↔ spec map, see [SHIPPED.md](SHIPPED.md).
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [4.17.1] — 2026-10-23
|
|
12
|
+
|
|
13
|
+
Patch: the web console's Update button works on a global npm install and re-checks for updates while the page is open.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- **The web console's Update button follows the install.** On a clone it runs `upgrade`, as before. On a global npm install it now runs `npm install -g geneseed@latest` and then the new package's `rebuild-all`, where it used to fail with "not a git checkout". On any other copy (an npx cache, a project's `node_modules`, an unzipped folder) it shows the command to run instead of a button. A clone also says whether there is anything to pull ("3 commits to pull", "up to date") from a daily background `git fetch`. An Overview page left open asks again every hour and when its tab comes back into view, so it shows a new release within a day.
|
|
17
|
+
|
|
11
18
|
## [4.17.0] — 2026-10-23
|
|
12
19
|
|
|
13
20
|
Minor: doctrine comms 5 Mark the Ask; a version bump on main now releases itself; two Bob fixes.
|
package/SHIPPED.md
CHANGED
|
@@ -20,7 +20,7 @@ historical references, not files distributed with the repo.
|
|
|
20
20
|
> **On version numbers.** [`harness.config.json`](harness.config.json)'s `version` is a
|
|
21
21
|
> human-readable label only. The canonical identity of an installed harness is the
|
|
22
22
|
> **source fingerprint** stamped in `.geneseed-version` (see `geneseed version`), not the
|
|
23
|
-
> string. Current label: **4.17.
|
|
23
|
+
> string. Current label: **4.17.1**.
|
|
24
24
|
|
|
25
25
|
## Capabilities
|
|
26
26
|
|
package/docs/guides/upgrade.md
CHANGED
|
@@ -34,7 +34,23 @@ geneseed upgrade imperial # the same, switching the theme
|
|
|
34
34
|
|
|
35
35
|
A dirty working tree, or a folder that is not a git clone, is reported rather than force-updated. `update` and `sync-self` are aliases of `upgrade`. `bootstrap` does the same and then opens the setup wizard (`--no-setup` skips the wizard).
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
## The Update button in the web console
|
|
38
|
+
|
|
39
|
+
The **Update** button on the Overview picks its route from how this copy of Geneseed is installed:
|
|
40
|
+
|
|
41
|
+
| Install | What **Update** runs | When the button shows |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| A clone (or a worktree) | `geneseed upgrade` | Always, because `main` moves between releases. |
|
|
44
|
+
| A global npm install (`npm root -g`/geneseed) | `npm install -g geneseed@latest`, then `geneseed rebuild-all` from the new package | When npm has a newer release. |
|
|
45
|
+
| Anything else (an npx cache, a project's `node_modules`, an unzipped copy) | Nothing. The Overview shows the command to run instead. | Never. |
|
|
46
|
+
|
|
47
|
+
On a clone, the Overview also says whether there is anything to pull. Once a day the console runs `git fetch` in the background and counts the commits upstream has that the clone does not: "3 commits to pull", or "up to date". The fetch has the same timeout as `upgrade` (`GENESEED_NET_TIMEOUT`, 120 s by default). If the fetch fails, the Overview shows the release check instead, and the button stays. `GENESEED_NO_UPDATE_CHECK` turns off both the npm check and the fetch.
|
|
48
|
+
|
|
49
|
+
The console asks npm for the latest release once a day. An Overview page that stays open asks the console again every hour, and each time you come back to its tab, so it shows a new release within a day.
|
|
50
|
+
|
|
51
|
+
The npm route never uses `sudo` and never retries. If npm refuses (no permission on the global folder, a proxy, a private registry), the job log shows npm's own output. Fix the cause, or run the two commands yourself.
|
|
52
|
+
|
|
53
|
+
When the update is done, the console restarts and the page reloads. If you ran `git pull` yourself, the Overview shows a banner that the console runs old code. Click **Rebuild** on an install that is behind: the console restarts after the rebuild and reloads the page. If no install is behind, click **Restart** in the banner.
|
|
38
54
|
|
|
39
55
|
## What an upgrade keeps
|
|
40
56
|
|
package/harness.config.json
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
"_comment": "version is a human-readable release label only; the canonical identity of an installed harness is the source fingerprint stamped in .geneseed-version (see `harness version`), not this string.",
|
|
3
3
|
"theme": "neutral",
|
|
4
4
|
"product": "Geneseed",
|
|
5
|
-
"version": "4.17.
|
|
5
|
+
"version": "4.17.1"
|
|
6
6
|
}
|
package/js/web/api.mjs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* bind paths to these functions are `routes.mjs`. This file imports none of its route siblings,
|
|
9
9
|
* which is what keeps the old `api ↔ actions` and `api ↔ activity` cycles from coming back.
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
11
|
+
import { readdirSync, statSync } from 'node:fs';
|
|
12
12
|
import path from 'node:path';
|
|
13
13
|
|
|
14
14
|
import { CONFIG, CREDIT_RE, ROOT, SRC, THEMES, discoverNames, loadKits, makeCfg, upstreamOf } from '../build/source.mjs';
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
configItems, deployed, dget, memoryItems, notebookItems, wikiItems,
|
|
36
36
|
} from './catalog.mjs';
|
|
37
37
|
import { stampMinute, viewCfg } from './state.mjs';
|
|
38
|
-
import { updateStatus } from './update-check.mjs';
|
|
38
|
+
import { MANUAL_UPDATE, gitBehind, installKind, updateStatus } from './update-check.mjs';
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* `js/web/docs.mjs` imports these three from HERE, and that file is outside this split — so
|
|
@@ -499,12 +499,26 @@ export function apiLoopsActive() {
|
|
|
499
499
|
return { loops: activeLoops() };
|
|
500
500
|
}
|
|
501
501
|
|
|
502
|
-
/**
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
502
|
+
/**
|
|
503
|
+
* Is a newer release on npm than the source this console serves, and how would this copy take
|
|
504
|
+
* it? See update-check.mjs.
|
|
505
|
+
*
|
|
506
|
+
* `install` picks the Update route (`git`, `npm-global`, `other`); `git` is kept beside it for a
|
|
507
|
+
* console bundle older than the field. `behind` is a clone's own "up to date": commits upstream
|
|
508
|
+
* holds that it does not, null when unknown — a clone can always pull, since `main` moves between
|
|
509
|
+
* releases and a work proxy can leave the release check unanswered. `command` is what to run by
|
|
510
|
+
* hand when the console cannot update this copy itself.
|
|
511
|
+
*/
|
|
512
|
+
export function apiUpdate(state) {
|
|
513
|
+
const install = installKind();
|
|
514
|
+
return {
|
|
515
|
+
...updateStatus(state, releaseLabel()),
|
|
516
|
+
install,
|
|
517
|
+
git: install === 'git',
|
|
518
|
+
behind: install === 'git' ? gitBehind(state, { busy: Boolean(state.jobBusy?.()) }) : null,
|
|
519
|
+
command: install === 'other' ? MANUAL_UPDATE : null,
|
|
520
|
+
};
|
|
521
|
+
}
|
|
508
522
|
|
|
509
523
|
/** The source's release label, or null when it cannot be read. */
|
|
510
524
|
function releaseLabel() {
|
package/js/web/handler.mjs
CHANGED
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
import { resolvePath } from '../hosts/hosts.mjs';
|
|
14
14
|
import { isTruthy, jsonDumpsCompact } from '../lib/json.mjs';
|
|
15
15
|
import { parseIntStrict, percentDecode } from '../lib/text.mjs';
|
|
16
|
-
import { preflight } from '../maintain/update.mjs';
|
|
17
16
|
import { apiDeployCmd, apiInstallCmd, apiPickFolder, apiRestore, buildActionCmds, mcpTargetPaths } from './actions.mjs';
|
|
18
17
|
import { NotFound } from './catalog.mjs';
|
|
19
18
|
import { openUrl, requestRestart } from './daemon.mjs';
|
|
20
19
|
import { apiDocs, apiDocsPage } from './docs.mjs';
|
|
21
|
-
import { actionCommands } from './jobs.mjs';
|
|
20
|
+
import { actionCommands, updatePlan } from './jobs.mjs';
|
|
22
21
|
import { POST_ROUTES, PREFIX_ROUTES, STATE_ROUTES, readJsonBody } from './routes.mjs';
|
|
22
|
+
import { installKind } from './update-check.mjs';
|
|
23
23
|
import { isFile } from '../lib/fs.mjs';
|
|
24
24
|
import { readFileSync, statSync } from 'node:fs';
|
|
25
25
|
import { basename, dirname, extname, join, sep } from 'node:path';
|
|
@@ -287,16 +287,26 @@ export function makeHandler(state, jm, token, dist, holder = null) {
|
|
|
287
287
|
return startJob(res, 'deploy', [plan.cmd], ae);
|
|
288
288
|
}
|
|
289
289
|
if (action === 'update') {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
290
|
+
// The route follows the install (`updatePlan`); a refusal is the same friendly 422.
|
|
291
|
+
// The daily background `git fetch` still running would hold `.git` locks the update's own
|
|
292
|
+
// fetch needs, and fail it as `fetch_failed`; it ends within GENESEED_NET_TIMEOUT.
|
|
293
|
+
if (state._behind?.inflight) {
|
|
294
|
+
return sendJson(res, { precondition: 'checking', kind: 'info',
|
|
295
|
+
message: 'The console is checking upstream right now. Try Update again in a moment.' },
|
|
296
|
+
422, ae);
|
|
294
297
|
}
|
|
298
|
+
const plan = updatePlan(installKind());
|
|
299
|
+
if (plan.refuse) return sendJson(res, plan.refuse, 422, ae);
|
|
295
300
|
// `requestRestart` declines on a foreground server, which then shows its stale banner.
|
|
296
|
-
const jid = jm.start('update',
|
|
301
|
+
const jid = jm.start('update', plan.cmds, (rc) => {
|
|
297
302
|
state.refresh();
|
|
298
|
-
if (rc === 0)
|
|
299
|
-
|
|
303
|
+
if (rc === 0) {
|
|
304
|
+
// The old answers ("3 commits to pull") are about the code just replaced.
|
|
305
|
+
delete state._behind;
|
|
306
|
+
delete state._update;
|
|
307
|
+
requestRestart(state.theme);
|
|
308
|
+
}
|
|
309
|
+
}, plan.opts);
|
|
300
310
|
if (jid === null) return sendJson(res, { error: 'busy' }, 409, ae);
|
|
301
311
|
return sendJson(res, { job_id: jid }, 202, ae);
|
|
302
312
|
}
|
package/js/web/jobs.mjs
CHANGED
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
import { spawn, spawnSync } from 'node:child_process';
|
|
85
85
|
import { randomBytes } from 'node:crypto';
|
|
86
86
|
import { StringDecoder } from 'node:string_decoder';
|
|
87
|
+
import { homedir } from 'node:os';
|
|
87
88
|
import path from 'node:path';
|
|
88
89
|
|
|
89
90
|
import { ROOT, PACK_ORDER } from '../build/source.mjs';
|
|
@@ -93,6 +94,8 @@ import { isDict } from '../hosts/mcp.mjs';
|
|
|
93
94
|
import { readText, writeText, isFile } from '../lib/fs.mjs';
|
|
94
95
|
import { which } from '../lib/paths.mjs';
|
|
95
96
|
import { jsonDumpsCompact, parseJson, isTruthy } from '../lib/json.mjs';
|
|
97
|
+
import { preflight } from '../maintain/update.mjs';
|
|
98
|
+
import { MANUAL_UPDATE } from './update-check.mjs';
|
|
96
99
|
|
|
97
100
|
/**
|
|
98
101
|
* Terminate a job's WHOLE process tree.
|
|
@@ -255,9 +258,11 @@ export class JobManager {
|
|
|
255
258
|
|
|
256
259
|
/**
|
|
257
260
|
* `cmds` is a LIST OF ARGVS, run in order, stopping at the first failure. `null` when a
|
|
258
|
-
* job is already running, which the HTTP layer maps to 409.
|
|
261
|
+
* job is already running, which the HTTP layer maps to 409. `cwd` defaults to this checkout;
|
|
262
|
+
* the npm update passes another, since npm cannot replace a folder a child sits in on Windows.
|
|
263
|
+
* `winShell` is the npm update's too, and only its: see `_run`.
|
|
259
264
|
*/
|
|
260
|
-
start(action, cmds, onDone = null) {
|
|
265
|
+
start(action, cmds, onDone = null, { cwd = ROOT, winShell = false } = {}) {
|
|
261
266
|
if (this._busy) return null;
|
|
262
267
|
this._busy = true;
|
|
263
268
|
const jid = randomBytes(8).toString('hex');
|
|
@@ -272,7 +277,7 @@ export class JobManager {
|
|
|
272
277
|
});
|
|
273
278
|
// Hand the work to the scheduler and return the id NOW, so the 202 goes out before the
|
|
274
279
|
// child has produced a byte.
|
|
275
|
-
void this._run(jid, cmds, onDone);
|
|
280
|
+
void this._run(jid, cmds, onDone, cwd, winShell);
|
|
276
281
|
return jid;
|
|
277
282
|
}
|
|
278
283
|
|
|
@@ -286,15 +291,22 @@ export class JobManager {
|
|
|
286
291
|
}
|
|
287
292
|
}
|
|
288
293
|
|
|
289
|
-
async _run(jid, cmds, onDone = null) {
|
|
294
|
+
async _run(jid, cmds, onDone = null, cwd = ROOT, winShell = false) {
|
|
290
295
|
let rc = 0;
|
|
291
296
|
let p = null;
|
|
292
297
|
try {
|
|
293
298
|
for (let i = 0; i < cmds.length; i += 1) {
|
|
294
299
|
const cmd = cmds[i];
|
|
295
300
|
this._append(jid, `$ ${cmd.map((c) => String(c)).join(' ')}\n`);
|
|
296
|
-
|
|
297
|
-
|
|
301
|
+
// `npm.cmd` on Windows: Node refuses to spawn a batch file without a shell (the reason
|
|
302
|
+
// `npmBuild` gives in server.mjs). OPT-IN per job, never sniffed off the argv: only the
|
|
303
|
+
// npm update asks, and its argv is constants — `install`/`deploy`/`build` carry
|
|
304
|
+
// body-derived arguments that must never reach cmd.exe.
|
|
305
|
+
const shell = winShell && process.platform === 'win32'
|
|
306
|
+
&& /\.(cmd|bat)$/i.test(String(cmd[0]));
|
|
307
|
+
p = spawn(shell ? `"${cmd[0]}"` : cmd[0], cmd.slice(1), {
|
|
308
|
+
cwd,
|
|
309
|
+
shell,
|
|
298
310
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
299
311
|
// No console window for a child of a windowless daemon.
|
|
300
312
|
windowsHide: true,
|
|
@@ -457,5 +469,50 @@ export function actionCommands(action, opts = {}) {
|
|
|
457
469
|
return Object.hasOwn(table, action) ? table[action] : null;
|
|
458
470
|
}
|
|
459
471
|
|
|
472
|
+
/**
|
|
473
|
+
* The `update` action on a GLOBAL NPM install, which `upgrade` (a git pull) cannot update:
|
|
474
|
+
* `npm install -g geneseed@latest`, then the NEW package's `rebuild-all`. `CLI()` IS the new
|
|
475
|
+
* package: `installKind` only says `npm-global` when ROOT is the folder npm installs into, and the
|
|
476
|
+
* step is a fresh process started after npm replaced it, so it loads the code npm just wrote.
|
|
477
|
+
* Outside the table, whose rows are frozen in tests/unit/web_jobs.test.mjs, because its argv
|
|
478
|
+
* depends on which npm is on this machine.
|
|
479
|
+
*
|
|
480
|
+
* No `sudo`, no elevation, no retry: a permission or proxy refusal is npm's own output in the job
|
|
481
|
+
* log, which is the one place the user can read how to fix it.
|
|
482
|
+
*/
|
|
483
|
+
export function npmUpdateCommands(npm) {
|
|
484
|
+
return [
|
|
485
|
+
[npm, 'install', '-g', 'geneseed@latest'],
|
|
486
|
+
[NODE(), CLI(), 'rebuild-all'],
|
|
487
|
+
];
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* The Update button's job for an install kind (`installKind`, update-check.mjs): `{ cmds, opts }`
|
|
492
|
+
* to start, or `{ refuse }`, the 422 body the console shows as an info popup.
|
|
493
|
+
*
|
|
494
|
+
* THE KIND IS READ BEFORE `preflight`, which asks git and answers `not_git` for every copy that
|
|
495
|
+
* is not a clone, an npm install included. An `other` copy is told what to run instead: `upgrade`
|
|
496
|
+
* there would `git pull` whatever repository the copy happens to sit inside. The npm job runs in
|
|
497
|
+
* the home folder, not ROOT: on Windows npm cannot replace a folder a child's cwd is in.
|
|
498
|
+
* The dependencies are injectable for the tests, which must not spawn git or npm.
|
|
499
|
+
*/
|
|
500
|
+
export function updatePlan(install, {
|
|
501
|
+
pre = preflight, npm = () => which('npm'), home = homedir,
|
|
502
|
+
} = {}) {
|
|
503
|
+
if (install === 'git') {
|
|
504
|
+
const p = pre();
|
|
505
|
+
if (!p.ok) return { refuse: { precondition: p.code, kind: p.kind, message: p.message } };
|
|
506
|
+
return { cmds: actionCommands('update'), opts: undefined };
|
|
507
|
+
}
|
|
508
|
+
const exe = install === 'npm-global' ? npm() : null;
|
|
509
|
+
if (!exe) {
|
|
510
|
+
return { refuse: { precondition: 'manual', kind: 'info',
|
|
511
|
+
message: `The console cannot update this copy. Run \`${MANUAL_UPDATE}\` for a global npm `
|
|
512
|
+
+ 'install, or `git pull` in a clone.' } };
|
|
513
|
+
}
|
|
514
|
+
return { cmds: npmUpdateCommands(exe), opts: { cwd: home(), winShell: true } };
|
|
515
|
+
}
|
|
516
|
+
|
|
460
517
|
/** `actionTable`'s own keys — the table IS the declaration, so this cannot drift from it. */
|
|
461
518
|
export const PORTED_ACTIONS = Object.keys(actionTable());
|
package/js/web/server.mjs
CHANGED
|
@@ -150,6 +150,8 @@ export async function serve({ theme = null, port = 4747, openBrowser = true,
|
|
|
150
150
|
// The console's job list survives a reload and a restart because it is a FILE on disk,
|
|
151
151
|
// not held in process memory.
|
|
152
152
|
const jm = new JobManager(join(home, '.geneseed-web-runs.json'));
|
|
153
|
+
// Read by `/api/update`, whose background `git fetch` must not race a running update's pull.
|
|
154
|
+
state.jobBusy = () => jm.busy;
|
|
153
155
|
const srv = createServer(makeHandler(state, jm, token, dist, holder));
|
|
154
156
|
holder.srv = srv;
|
|
155
157
|
return new Promise((done) => {
|
package/js/web/update-check.mjs
CHANGED
|
@@ -12,7 +12,20 @@
|
|
|
12
12
|
*
|
|
13
13
|
* ponytail: the cache lives on the daemon's state, in memory. A restart costs one more request;
|
|
14
14
|
* a disk cache would be a file to version for a figure that is free to re-ask.
|
|
15
|
+
*
|
|
16
|
+
* THE SAME FILE ANSWERS TWO MORE QUESTIONS the Update button needs: HOW this copy was installed
|
|
17
|
+
* (`installKind`, so the button runs the route that can update it) and, for a clone, whether
|
|
18
|
+
* upstream has anything to pull (`gitBehind`, the clone's own "up to date" — a release label
|
|
19
|
+
* says nothing about `main`, which moves between releases).
|
|
15
20
|
*/
|
|
21
|
+
import { spawnSync } from 'node:child_process';
|
|
22
|
+
import { existsSync, realpathSync } from 'node:fs';
|
|
23
|
+
import path from 'node:path';
|
|
24
|
+
|
|
25
|
+
import { ROOT } from '../build/source.mjs';
|
|
26
|
+
import { measureUpstream } from '../maintain/update.mjs';
|
|
27
|
+
import { normcase, which } from '../lib/paths.mjs';
|
|
28
|
+
|
|
16
29
|
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
17
30
|
/** A failed ask is retried sooner than a good answer is refreshed: a proxy hiccup is not a day. */
|
|
18
31
|
const RETRY_MS = 60 * 60 * 1000;
|
|
@@ -42,20 +55,103 @@ async function npmLatest() {
|
|
|
42
55
|
* must never reach the network.
|
|
43
56
|
*/
|
|
44
57
|
export function updateStatus(state, current, { fetcher = npmLatest, now = Date.now() } = {}) {
|
|
45
|
-
const c = state._update || (state._update = { latest: null, checked_at: null, inflight: false });
|
|
46
|
-
const stale = c.checked_at === null
|
|
47
|
-
|| now - c.checked_at > (c.latest === null ? RETRY_MS : DAY_MS);
|
|
48
58
|
// Under `node --test` (NODE_TEST_CONTEXT) the real registry is never asked: the route probes in
|
|
49
59
|
// tests/unit/web_server.test.mjs reach this handler, and a suite must not depend on the network.
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
60
|
+
const c = daily(state, '_update', fetcher, now,
|
|
61
|
+
fetcher === npmLatest && process.env.NODE_TEST_CONTEXT);
|
|
62
|
+
const available = current && c.value ? semverGreater(c.value, current) : null;
|
|
63
|
+
return { current: current ?? null, latest: c.value, available, checked_at: c.checked_at };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The once-a-day cache both checks share: answer from `state[slot]` at once and, when that is
|
|
68
|
+
* missing or stale, start ONE background ask whose answer the next poll reads. A null answer
|
|
69
|
+
* (every failure) is re-asked after RETRY_MS, a good one after DAY_MS.
|
|
70
|
+
*/
|
|
71
|
+
function daily(state, slot, ask, now, off) {
|
|
72
|
+
const c = state[slot] || (state[slot] = { value: null, checked_at: null, inflight: false });
|
|
73
|
+
const stale = c.checked_at === null
|
|
74
|
+
|| now - c.checked_at > (c.value === null ? RETRY_MS : DAY_MS);
|
|
75
|
+
if (stale && !c.inflight && !off && !process.env.GENESEED_NO_UPDATE_CHECK) {
|
|
53
76
|
c.inflight = true;
|
|
54
77
|
Promise.resolve()
|
|
55
|
-
.then(
|
|
56
|
-
.then((v) => { c.
|
|
78
|
+
.then(ask)
|
|
79
|
+
.then((v) => { c.value = v ?? null; }, () => { c.value = null; })
|
|
57
80
|
.finally(() => { c.checked_at = now; c.inflight = false; });
|
|
58
81
|
}
|
|
59
|
-
|
|
60
|
-
|
|
82
|
+
return c;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** `measureUpstream`'s verdict as a count: 0 up to date, N to pull, null when unknown. */
|
|
86
|
+
async function fetchBehind() {
|
|
87
|
+
const [code, behind] = await measureUpstream();
|
|
88
|
+
if (code === 'uptodate') return 0;
|
|
89
|
+
return code === 'ready' ? behind : null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Commits the clone's upstream holds that it does not: `upgrade`'s own `git fetch` (timeboxed by
|
|
94
|
+
* `GENESEED_NET_TIMEOUT`, 120 s by default) then a count, once a day, in the background. Null
|
|
95
|
+
* until the first answer lands and on every failure — an unreachable remote, no upstream, a
|
|
96
|
+
* branch that diverged — and the console then keeps its "a clone can always pull" button.
|
|
97
|
+
*
|
|
98
|
+
* `busy` skips the ask while a job runs: a fetch beside the update job's own pull would race it
|
|
99
|
+
* for `.git` locks. `measure` and `now` are injectable for the tests.
|
|
100
|
+
*/
|
|
101
|
+
export function gitBehind(state, { measure = fetchBehind, now = Date.now(), busy = false } = {}) {
|
|
102
|
+
return daily(state, '_behind', measure, now,
|
|
103
|
+
busy || (measure === fetchBehind && process.env.NODE_TEST_CONTEXT)).value;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** The command the console shows for a copy it cannot update itself. */
|
|
107
|
+
export const MANUAL_UPDATE = 'npm install -g geneseed@latest';
|
|
108
|
+
|
|
109
|
+
/** `npm root -g`, or null when npm is absent or does not answer. Asked once per daemon. */
|
|
110
|
+
export function npmGlobalRoot() {
|
|
111
|
+
const npm = which('npm');
|
|
112
|
+
if (!npm) return null;
|
|
113
|
+
const win = process.platform === 'win32';
|
|
114
|
+
// `shell` on Windows for the reason `npmBuild` gives (js/web/server.mjs): `npm` resolves to
|
|
115
|
+
// `npm.cmd`, which Node refuses to spawn directly. The argv is a constant.
|
|
116
|
+
const r = spawnSync(win ? `"${npm}"` : npm, ['root', '-g'], {
|
|
117
|
+
encoding: 'utf8', shell: win, timeout: 15000, windowsHide: true,
|
|
118
|
+
});
|
|
119
|
+
const out = r.status === 0 ? String(r.stdout || '').trim() : '';
|
|
120
|
+
return out || null;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/** The real path, so a symlinked prefix and the folder it points at compare equal. */
|
|
124
|
+
const real = (p) => {
|
|
125
|
+
try {
|
|
126
|
+
return normcase(realpathSync.native(p));
|
|
127
|
+
} catch {
|
|
128
|
+
return normcase(path.resolve(p));
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
let kindMemo = null;
|
|
133
|
+
/**
|
|
134
|
+
* `git` (a clone or a worktree: `.git` is a folder in one, a file in the other), `npm-global`
|
|
135
|
+
* (this package IS `<npm root -g>/geneseed`), or `other` — an npx cache, a project's own
|
|
136
|
+
* `node_modules`, a vendored or unzipped copy — which the console cannot update itself.
|
|
137
|
+
*
|
|
138
|
+
* `npm root -g` is asked only when the parent folder is a `node_modules`, so a clone never pays
|
|
139
|
+
* for the spawn, and the answer is kept for the process: `ROOT` never moves under it.
|
|
140
|
+
* `root`/`npmRoot` are injectable for the tests, and an injected call is not kept.
|
|
141
|
+
*/
|
|
142
|
+
export function installKind({ root = ROOT, npmRoot = npmGlobalRoot } = {}) {
|
|
143
|
+
const mine = root === ROOT && npmRoot === npmGlobalRoot;
|
|
144
|
+
if (mine && kindMemo) return kindMemo;
|
|
145
|
+
let kind = 'other';
|
|
146
|
+
let unanswered = false;
|
|
147
|
+
if (existsSync(path.join(root, '.git'))) kind = 'git';
|
|
148
|
+
else if (path.basename(path.dirname(root)).toLowerCase() === 'node_modules') {
|
|
149
|
+
const g = npmRoot();
|
|
150
|
+
unanswered = !g;
|
|
151
|
+
if (g && real(g) === real(path.dirname(root))) kind = 'npm-global';
|
|
152
|
+
}
|
|
153
|
+
// An npm that did not answer (a timeout, npm briefly off PATH) is asked again next poll, so
|
|
154
|
+
// one bad moment does not hide the button until the daemon restarts.
|
|
155
|
+
if (mine && !unanswered) kindMemo = kind;
|
|
156
|
+
return kind;
|
|
61
157
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"//": "Every field here is argued and gated in tests/unit/package_manifest.test.mjs. `files`, `bin` and `engines` each have a test that fails when reality drifts from this file; `version` mirrors harness.config.json and is gated too. Read that docblock before editing this one.",
|
|
3
3
|
"name": "geneseed",
|
|
4
|
-
"version": "4.17.
|
|
4
|
+
"version": "4.17.1",
|
|
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",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{t as r}from"./api-BfpZmUMI.js";import{$ as i,P as a,S as o,w as s,z as c}from"./index-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{t as r}from"./api-BfpZmUMI.js";import{$ as i,P as a,S as o,w as s,z as c}from"./index-BAArp8rX.js";import{a as l,i as u,n as d,o as f,r as p,t as m}from"./activity-Jw8XcPiP.js";import{t as h}from"./usePoll-bDFN-Hr6.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)(a,{name:`chevron`,className:`glyph act-chev`})]})]}),e.phase&&(0,_.jsxs)(`div`,{className:`row gap-8`,style:{marginTop:10,fontSize:14},children:[(0,_.jsx)(a,{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 `,c(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 c=!e||e.enabled!==!1,l=e?.activity||[],u=i(),d=async()=>{let e=!c;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:c?`tracking on`:`tracking off`}),(0,_.jsx)(`div`,{className:`sw-toggle${c?` on`:``}`,role:`switch`,"aria-checked":c,"aria-label":`Toggle activity tracking`,tabIndex:0,onClick:d,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),d())}})]})]}),(0,_.jsx)(o,{error:n,style:{marginBottom:12}}),e?c?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)(s,{label:`Reading live sessions…`})]})}export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{t as r}from"./api-BfpZmUMI.js";import{P as i,w as a,z as o}from"./index-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{t as r}from"./api-BfpZmUMI.js";import{P as i,w as a,z as o}from"./index-BAArp8rX.js";import{a as s,n as c,o as l,r as u,t as d}from"./activity-Jw8XcPiP.js";import{t as f}from"./usePoll-bDFN-Hr6.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)(i,{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)(a,{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)(i,{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 `,o(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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GreenhouseView-
|
|
2
|
-
import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{i as n,t as r}from"./react-DlYQp10C.js";import{t as i}from"./api-BfpZmUMI.js";import{n as a,r as o}from"./sections-ChwaobfW.js";import{E as s,I as c,J as l,L as u,P as d,Q as f,R as p,S as m,V as h,Y as g,b as _,t as v,w as y,x as b,z as x}from"./index-DbwBkTjy.js";var S=t(n(),1),C={neutral:`Loaded & ready`,imperial:`The Codex in force`,military:`The unit stands ready`,cyberpunk:`Jacked in`,wizard:`Wards in place`,pirate:`The crew stands ready`,gamer:`Game loaded`,sports:`The squad takes the field`,biker:`The crew rolls out`,commentator:`Lights out, away we go`,verstappen:`Setup's in`,joker:`Mic check`,mean:`Rules are up`,marvin:`Online. Reluctantly.`},w=e=>e.deployed?C[e.theme]||`Loaded & ready`:`Not deployed`,T=r();function E({value:e,size:t=232}){let n=f(e,1100)??0,r=t/2-14,i=2*Math.PI*r,a=i*(1-n);return(0,T.jsxs)(`div`,{className:`ring-wrap`,style:{width:t,height:t},children:[(0,T.jsxs)(`svg`,{viewBox:`0 0 ${t} ${t}`,children:[(0,T.jsx)(`circle`,{cx:t/2,cy:t/2,r,fill:`none`,stroke:`var(--surface-3)`,strokeWidth:`10`}),(0,T.jsx)(`circle`,{cx:t/2,cy:t/2,r,fill:`none`,stroke:`var(--accent)`,strokeWidth:`10`,strokeLinecap:`round`,strokeDasharray:i,strokeDashoffset:a}),Array.from({length:48}).map((e,i)=>{let a=i/48*2*Math.PI,o=r-18,s=r-24,c=t/2+Math.cos(a)*o,l=t/2+Math.sin(a)*o,u=t/2+Math.cos(a)*s,d=t/2+Math.sin(a)*s;return(0,T.jsx)(`line`,{x1:c,y1:l,x2:u,y2:d,stroke:`var(--line-2)`,strokeWidth:`1`,opacity:i/48<n?.9:.25},i)})]}),(0,T.jsxs)(`div`,{className:`ring-center`,children:[(0,T.jsxs)(`div`,{className:`pct`,children:[Math.round(n*100),(0,T.jsx)(`span`,{style:{fontSize:20,color:`var(--text-3)`},children:`%`})]}),(0,T.jsx)(`div`,{className:`lbl`,children:`germination`})]})]})}function D({overview:e}){let t=c(e.diff),n=e.counts||{};return(0,T.jsxs)(`div`,{className:`card kpiband rise mb-16`,children:[[{key:`agents`,label:`Agents`,hash:`#/agents`},{key:`skills`,label:`Skills`,hash:`#/skills`},{key:`laws`,label:`Dictates`,hash:`#/laws`}].map(e=>{let t=n[e.key];return(0,T.jsxs)(`a`,{className:`kseg`,href:e.hash,title:`Open ${e.label}`,children:[(0,T.jsx)(`span`,{className:`kseg-n`+(t===0?` zero`:``),children:t==null?`—`:(0,T.jsx)(g,{value:t})}),(0,T.jsx)(`span`,{className:`kseg-l`,children:e.label})]},e.key)}),(0,T.jsx)(`div`,{className:`kseg-spacer`}),(0,T.jsxs)(`button`,{className:`kseg`+(t>0?` hot`:``),onClick:()=>l(`#/diff`),title:`Open changes`,children:[(0,T.jsx)(`span`,{className:`kseg-n`+(t===0?` zero`:``),children:(0,T.jsx)(g,{value:t})}),(0,T.jsx)(`span`,{className:`kseg-l`,children:`Local edits`}),t>0&&(0,T.jsx)(`span`,{className:`delta up`,children:`▲`})]})]})}function O({overview:e}){return(0,T.jsx)(`div`,{className:`genome`,children:o.map((t,n)=>{let r=a[t],i=e.counts?.[t];return(0,T.jsxs)(`div`,{className:`card gcell rise`,style:{"--i":n},onClick:()=>l(`#/section/`+t),children:[(0,T.jsxs)(`div`,{className:`gtop`,children:[(0,T.jsx)(`span`,{className:`gname`,children:r.label}),(0,T.jsx)(d,{name:r.icon,className:`gicon`})]}),(0,T.jsx)(`div`,{className:`gcount`+(i===0?` zero`:``),children:i==null?`—`:(0,T.jsx)(g,{value:i})}),(0,T.jsx)(`div`,{className:`gdesc`,children:r.desc})]},t)})})}function k({jobs:e}){if(!e||e.length===0)return(0,T.jsx)(`div`,{className:`feed`,children:(0,T.jsxs)(`div`,{className:`empty`,children:[(0,T.jsx)(`div`,{className:`big`,children:`No activity yet`}),`Actions you run appear here.`]})});let t={done:`ok`,running:`acc`,failed:`bad`},n=[...e].sort((e,t)=>t.started-e.started).slice(0,8);return(0,T.jsx)(`div`,{className:`feed`,children:n.map(e=>(0,T.jsxs)(`div`,{className:`feed-row`,children:[(0,T.jsx)(`span`,{className:`feed-dot ${t[e.status]||`ok`}`}),(0,T.jsx)(`span`,{className:`feed-txt`,children:(0,T.jsx)(`b`,{children:e.action})}),(0,T.jsxs)(`span`,{className:`feed-when`,children:[x(e.started),` ago`]})]},e.id))})}function A({overview:e,sigil:t,setup:n,jobs:r,onAction:i}){let a=w(e),s=p(e,n);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`div`,{className:`card pad-lg rise mb-16`,children:(0,T.jsxs)(`div`,{className:`hero`,children:[(0,T.jsx)(E,{value:s}),(0,T.jsxs)(`div`,{className:`hero-facts`,children:[(0,T.jsx)(`div`,{className:`ttl`,children:a}),t&&(0,T.jsxs)(`div`,{className:`voice-readout`,children:[(0,T.jsx)(`span`,{className:`vr-cur`,children:`▕`}),(0,T.jsx)(`span`,{className:`vr-txt`,children:t})]},e.theme),(0,T.jsxs)(`p`,{className:`sub`,children:[`One source rendered into `,(0,T.jsx)(`code`,{children:e.target}),`. Every repo on this machine inherits it.`]}),(0,T.jsxs)(`div`,{className:`hero-chips`,children:[(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`voice`}),(0,T.jsx)(`span`,{className:`cv`,style:{textTransform:`capitalize`},children:e.theme})]}),(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`mode`}),(0,T.jsx)(`span`,{className:`cv`,children:e.emit})]}),(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`footprint`}),(0,T.jsx)(`span`,{className:`cv`,children:e.footprint})]}),(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`built`}),(0,T.jsx)(`span`,{className:`cv`,children:e.build_time||`unknown`})]}),(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`fp`}),(0,T.jsx)(`span`,{className:`cv`,children:n?.installed_fp||`—`})]})]}),(0,T.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,T.jsxs)(`button`,{className:`btn`,onClick:()=>i(`update`),children:[(0,T.jsx)(d,{name:`refresh`}),`Update`]}),(0,T.jsxs)(`button`,{className:`btn ghost`,onClick:()=>i(`build-all`),children:[(0,T.jsx)(d,{name:`build`}),`Rebuild`]}),(0,T.jsxs)(`button`,{className:`btn ghost`,onClick:()=>i(`doctor`),children:[(0,T.jsx)(d,{name:`doctor`}),`Run doctor`]})]})]})]})}),(0,T.jsx)(D,{overview:e}),(0,T.jsxs)(`div`,{className:`grid split-status`,children:[(0,T.jsxs)(`div`,{className:`card pad-lg`,children:[(0,T.jsxs)(`div`,{className:`card-head`,children:[(0,T.jsx)(`h3`,{children:`Capability genome`}),(0,T.jsx)(`div`,{className:`right`,children:(0,T.jsxs)(`span`,{className:`tick`,children:[o.length,` sections`]})})]}),(0,T.jsx)(O,{overview:e})]}),(0,T.jsxs)(`div`,{className:`card pad-lg`,children:[(0,T.jsxs)(`div`,{className:`card-head`,children:[(0,T.jsx)(`h3`,{children:`Recent activity`}),(0,T.jsx)(`div`,{className:`right`,children:(0,T.jsxs)(`span`,{className:`badge acc`,children:[(0,T.jsx)(`span`,{className:`dot`}),`live`]})})]}),(0,T.jsx)(k,{jobs:r})]})]})]})}function j({k:e,overview:t,max:n}){let r=a[e],i=t.counts?.[e]??0;return(0,T.jsxs)(`div`,{className:`strand`,children:[(0,T.jsxs)(`span`,{className:`strand-name`,children:[(0,T.jsx)(`span`,{className:`strand-dot`}),(0,T.jsx)(`a`,{href:`#/section/`+e,className:`strand-link stretch-link`,children:r.label})]}),(0,T.jsx)(`div`,{className:`hbar`,children:(0,T.jsx)(`i`,{style:{width:`${i/n*100}%`}})}),(0,T.jsx)(`span`,{className:`strand-val`,children:i})]})}function M({overview:e,sigil:t,setup:n,jobs:r}){let i=u(e.counts),a=n?.version_verdict||``,s=a.includes(`up to date`),l=c(e.diff),d=[[`Source`,`src/, the canonical genetic material`,n?.source_fp||`—`,!0],[`Render`,`geneseed build → ${e.emit}`,e.theme+` voice`,!0],[`Deployed`,e.target,`inherited by every repo`,!1]];return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`div`,{className:`mb-16`,children:(0,T.jsxs)(`div`,{className:`card pad-lg rise`,style:{position:`relative`,overflow:`hidden`},children:[(0,T.jsx)(`h2`,{className:`h`,style:{fontSize:22,margin:`0 0 18px`},children:`Gene-seed lineage`}),(0,T.jsxs)(`div`,{className:`lineage-track`,children:[(0,T.jsx)(`div`,{className:`spine`}),d.map(([e,t,n,r],i)=>(0,T.jsxs)(`div`,{className:`lineage-step`,children:[(0,T.jsx)(`span`,{className:`node ${r?`on`:``}`}),(0,T.jsx)(`div`,{className:`lt`,children:e}),(0,T.jsx)(`div`,{className:`ld`,children:t}),(0,T.jsx)(`div`,{className:`ltag`,children:n})]},i))]}),(0,T.jsx)(`hr`,{className:`hr`}),t&&(0,T.jsxs)(`div`,{className:`voice-readout`,style:{marginBottom:14},children:[(0,T.jsx)(`span`,{className:`vr-cur`,children:`▕`}),(0,T.jsx)(`span`,{className:`vr-txt`,children:t})]},e.theme),(0,T.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,T.jsxs)(`span`,{className:`badge ${s?`ok`:`warn`}`,children:[(0,T.jsx)(`span`,{className:`dot`}),`in sync · `,a]}),(0,T.jsxs)(`span`,{className:`badge`,children:[(0,T.jsx)(`span`,{className:`dot`}),l,` local edits`]})]})]})}),(0,T.jsxs)(`div`,{className:`grid split-even`,children:[(0,T.jsxs)(`div`,{className:`card pad-lg`,children:[(0,T.jsxs)(`div`,{className:`card-head`,children:[(0,T.jsx)(`h3`,{children:`Genome strand`}),(0,T.jsx)(`div`,{className:`right`,children:(0,T.jsx)(`span`,{className:`tick`,children:`by volume`})})]}),o.map(t=>(0,T.jsx)(j,{k:t,overview:e,max:i},t))]}),(0,T.jsxs)(`div`,{className:`card pad-lg`,children:[(0,T.jsx)(`div`,{className:`card-head`,children:(0,T.jsx)(`h3`,{children:`Recent activity`})}),(0,T.jsx)(k,{jobs:r})]})]})]})}function N({overview:e,setup:t,jobs:n}){let r=o.reduce((t,n)=>t+(e.counts?.[n]??0),0),i=u(e.counts),s=e.doctor?.ok,l=e.doctor?.problems?.length??0,d=c(e.diff);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`div`,{className:`card pad-md rise mb-16`,children:(0,T.jsx)(`div`,{className:`row wrap between gap-16`,children:(0,T.jsxs)(`div`,{className:`row`,style:{gap:20,flexWrap:`wrap`},children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`status`}),(0,T.jsx)(`div`,{className:`row`,style:{gap:8,marginTop:4},children:(0,T.jsxs)(`span`,{className:`badge ${e.deployed?`ok`:`warn`}`,children:[(0,T.jsx)(`span`,{className:`dot`}),e.deployed?`deployed`:`not deployed`]})})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`voice`}),(0,T.jsx)(`div`,{className:`metric`,style:{fontSize:18,marginTop:6,textTransform:`capitalize`},children:e.theme})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`mode`}),(0,T.jsx)(`div`,{className:`mono`,style:{fontSize:14,marginTop:6},children:e.emit})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`fingerprint`}),(0,T.jsx)(`div`,{className:`mono`,style:{fontSize:14,marginTop:6,color:`var(--accent)`},children:t?.installed_fp||`—`})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`doctor`}),(0,T.jsx)(`div`,{className:`row`,style:{gap:8,marginTop:4},children:s?(0,T.jsxs)(`span`,{className:`badge ok`,children:[(0,T.jsx)(`span`,{className:`dot`}),`clean`]}):(0,T.jsxs)(`span`,{className:`badge warn`,children:[(0,T.jsx)(`span`,{className:`dot`}),l,` issue`,l===1?``:`s`]})})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`edits`}),(0,T.jsx)(`div`,{className:`metric`,style:{fontSize:18,marginTop:6},children:d})]})]})})}),(0,T.jsxs)(`div`,{className:`grid split-operator`,children:[(0,T.jsxs)(`div`,{className:`card rise`,style:{"--i":1},children:[(0,T.jsxs)(`div`,{className:`card-head pad-lg`,style:{padding:`18px 20px 0`,marginBottom:14},children:[(0,T.jsx)(`h3`,{children:`Sections`}),(0,T.jsx)(`div`,{className:`right`,children:(0,T.jsxs)(`span`,{className:`tick`,children:[r,` entries total`]})})]}),(0,T.jsxs)(`table`,{className:`tbl`,children:[(0,T.jsx)(`thead`,{children:(0,T.jsxs)(`tr`,{children:[(0,T.jsx)(`th`,{children:`Section`}),(0,T.jsx)(`th`,{children:`Detail`}),(0,T.jsx)(`th`,{style:{width:130},children:`Share`}),(0,T.jsx)(`th`,{className:`num`,children:`Count`})]})}),(0,T.jsx)(`tbody`,{children:o.map(t=>{let n=a[t],r=e.counts?.[t]??0;return(0,T.jsxs)(`tr`,{className:`clickable`,children:[(0,T.jsx)(`td`,{className:`name`,children:(0,T.jsx)(`a`,{href:`#/section/`+t,className:`stretch-link`,children:n.label})}),(0,T.jsx)(`td`,{className:`muted`,children:n.desc}),(0,T.jsx)(`td`,{children:(0,T.jsx)(`div`,{className:`hbar`,children:(0,T.jsx)(`i`,{style:{width:`${r/i*100}%`}})})}),(0,T.jsx)(`td`,{className:`num`,children:r})]},t)})})]})]}),(0,T.jsxs)(`div`,{className:`card pad-lg rise`,style:{"--i":2},children:[(0,T.jsx)(`div`,{className:`card-head`,children:(0,T.jsx)(`h3`,{children:`Run log`})}),(0,T.jsx)(k,{jobs:n})]})]})]})}var P=e({default:()=>R}),F=(0,S.lazy)(()=>v(()=>import(`./GreenhouseView-BCpp3_J7.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))),I=(0,S.lazy)(()=>v(()=>import(`./OperatorHudView-Dh5gW8Bt.js`),__vite__mapDeps([9,1,2,6,4,5,7,8]))),L=(0,S.lazy)(()=>v(()=>import(`./JournalView-DoSufCu0.js`),__vite__mapDeps([10,1,2,5,3,4,6,7])));function R({overview:e,overviewError:t,onRetry:n,themes:r,setup:a,runs:o,onAction:c,layout:l=`cultivar`,dataRev:u}){let d=l,[f,p]=(0,S.useState)(`status`),g=e&&r.find(t=>t.name===e.theme)?.sigil||``,{data:v}=h(()=>d===`greenhouse`||d===`operator`?i.doctor().catch(()=>null):Promise.resolve(null),[d,u]),{data:x}=h(()=>d===`journal`?i.recent().catch(()=>null):Promise.resolve(null),[d,u]);if(!e)return t?(0,T.jsxs)(`div`,{children:[(0,T.jsx)(m,{error:`Could not load the harness overview: ${t}`}),(0,T.jsx)(`button`,{className:`btn`,onClick:n,children:`Retry`})]}):(0,T.jsx)(y,{});let C=e.daemon_stale?(0,T.jsx)(b,{}):null;return e.deployed?f===`status`&&d===`journal`?(0,T.jsxs)(S.Suspense,{fallback:(0,T.jsx)(y,{}),children:[C,(0,T.jsx)(L,{overview:e,recent:x,onAction:c,onDirection:p,dataRev:u})]}):(0,T.jsxs)(T.Fragment,{children:[C,(0,T.jsx)(`div`,{className:`head-row`,children:(0,T.jsx)(s,{"aria-label":`Dashboard view`,children:[[`status`,`Status`],[`lineage`,`Lineage`],[`operator`,`Operator`]].map(([e,t])=>(0,T.jsx)(`button`,{className:f===e?`on`:``,onClick:()=>p(e),"aria-pressed":f===e,children:t},e))})}),(0,T.jsxs)(`div`,{className:`view-in`,children:[f===`status`&&d===`cultivar`&&(0,T.jsx)(A,{overview:e,sigil:g,setup:a,jobs:o,onAction:c}),f===`status`&&d===`greenhouse`&&(0,T.jsx)(S.Suspense,{fallback:(0,T.jsx)(y,{}),children:(0,T.jsx)(F,{overview:e,sigil:g,jobs:o,doctor:v,onAction:c})}),f===`status`&&d===`operator`&&(0,T.jsx)(S.Suspense,{fallback:(0,T.jsx)(y,{}),children:(0,T.jsx)(I,{overview:e,jobs:o,doctor:v,onAction:c})}),f===`lineage`&&(0,T.jsx)(M,{overview:e,sigil:g,setup:a,jobs:o}),f===`operator`&&(0,T.jsx)(N,{overview:e,setup:a,jobs:o})]},f)]}):(0,T.jsxs)(T.Fragment,{children:[C,(0,T.jsx)(_,{onAction:c})]})}export{R as default,w as n,P as t};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GreenhouseView-M3wWndqG.js","assets/rolldown-runtime-hePW80VL.js","assets/react-DlYQp10C.js","assets/drawable-inwWR3uw.js","assets/index-BAArp8rX.js","assets/api-BfpZmUMI.js","assets/sections-ChwaobfW.js","assets/index-jYlWihN-.css","assets/jobBuckets-Dbq8ZlWW.js","assets/OperatorHudView-DLEGd63S.js","assets/JournalView-BSD-1Z83.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{i as n,t as r}from"./react-DlYQp10C.js";import{t as i}from"./api-BfpZmUMI.js";import{n as a,r as o}from"./sections-ChwaobfW.js";import{E as s,I as c,J as l,L as u,P as d,Q as f,R as p,S as m,V as h,Y as g,b as _,t as v,w as y,x as b,z as x}from"./index-BAArp8rX.js";var S=t(n(),1),C={neutral:`Loaded & ready`,imperial:`The Codex in force`,military:`The unit stands ready`,cyberpunk:`Jacked in`,wizard:`Wards in place`,pirate:`The crew stands ready`,gamer:`Game loaded`,sports:`The squad takes the field`,biker:`The crew rolls out`,commentator:`Lights out, away we go`,verstappen:`Setup's in`,joker:`Mic check`,mean:`Rules are up`,marvin:`Online. Reluctantly.`},w=e=>e.deployed?C[e.theme]||`Loaded & ready`:`Not deployed`,T=r();function E({value:e,size:t=232}){let n=f(e,1100)??0,r=t/2-14,i=2*Math.PI*r,a=i*(1-n);return(0,T.jsxs)(`div`,{className:`ring-wrap`,style:{width:t,height:t},children:[(0,T.jsxs)(`svg`,{viewBox:`0 0 ${t} ${t}`,children:[(0,T.jsx)(`circle`,{cx:t/2,cy:t/2,r,fill:`none`,stroke:`var(--surface-3)`,strokeWidth:`10`}),(0,T.jsx)(`circle`,{cx:t/2,cy:t/2,r,fill:`none`,stroke:`var(--accent)`,strokeWidth:`10`,strokeLinecap:`round`,strokeDasharray:i,strokeDashoffset:a}),Array.from({length:48}).map((e,i)=>{let a=i/48*2*Math.PI,o=r-18,s=r-24,c=t/2+Math.cos(a)*o,l=t/2+Math.sin(a)*o,u=t/2+Math.cos(a)*s,d=t/2+Math.sin(a)*s;return(0,T.jsx)(`line`,{x1:c,y1:l,x2:u,y2:d,stroke:`var(--line-2)`,strokeWidth:`1`,opacity:i/48<n?.9:.25},i)})]}),(0,T.jsxs)(`div`,{className:`ring-center`,children:[(0,T.jsxs)(`div`,{className:`pct`,children:[Math.round(n*100),(0,T.jsx)(`span`,{style:{fontSize:20,color:`var(--text-3)`},children:`%`})]}),(0,T.jsx)(`div`,{className:`lbl`,children:`germination`})]})]})}function D({overview:e}){let t=c(e.diff),n=e.counts||{};return(0,T.jsxs)(`div`,{className:`card kpiband rise mb-16`,children:[[{key:`agents`,label:`Agents`,hash:`#/agents`},{key:`skills`,label:`Skills`,hash:`#/skills`},{key:`laws`,label:`Dictates`,hash:`#/laws`}].map(e=>{let t=n[e.key];return(0,T.jsxs)(`a`,{className:`kseg`,href:e.hash,title:`Open ${e.label}`,children:[(0,T.jsx)(`span`,{className:`kseg-n`+(t===0?` zero`:``),children:t==null?`—`:(0,T.jsx)(g,{value:t})}),(0,T.jsx)(`span`,{className:`kseg-l`,children:e.label})]},e.key)}),(0,T.jsx)(`div`,{className:`kseg-spacer`}),(0,T.jsxs)(`button`,{className:`kseg`+(t>0?` hot`:``),onClick:()=>l(`#/diff`),title:`Open changes`,children:[(0,T.jsx)(`span`,{className:`kseg-n`+(t===0?` zero`:``),children:(0,T.jsx)(g,{value:t})}),(0,T.jsx)(`span`,{className:`kseg-l`,children:`Local edits`}),t>0&&(0,T.jsx)(`span`,{className:`delta up`,children:`▲`})]})]})}function O({overview:e}){return(0,T.jsx)(`div`,{className:`genome`,children:o.map((t,n)=>{let r=a[t],i=e.counts?.[t];return(0,T.jsxs)(`div`,{className:`card gcell rise`,style:{"--i":n},onClick:()=>l(`#/section/`+t),children:[(0,T.jsxs)(`div`,{className:`gtop`,children:[(0,T.jsx)(`span`,{className:`gname`,children:r.label}),(0,T.jsx)(d,{name:r.icon,className:`gicon`})]}),(0,T.jsx)(`div`,{className:`gcount`+(i===0?` zero`:``),children:i==null?`—`:(0,T.jsx)(g,{value:i})}),(0,T.jsx)(`div`,{className:`gdesc`,children:r.desc})]},t)})})}function k({jobs:e}){if(!e||e.length===0)return(0,T.jsx)(`div`,{className:`feed`,children:(0,T.jsxs)(`div`,{className:`empty`,children:[(0,T.jsx)(`div`,{className:`big`,children:`No activity yet`}),`Actions you run appear here.`]})});let t={done:`ok`,running:`acc`,failed:`bad`},n=[...e].sort((e,t)=>t.started-e.started).slice(0,8);return(0,T.jsx)(`div`,{className:`feed`,children:n.map(e=>(0,T.jsxs)(`div`,{className:`feed-row`,children:[(0,T.jsx)(`span`,{className:`feed-dot ${t[e.status]||`ok`}`}),(0,T.jsx)(`span`,{className:`feed-txt`,children:(0,T.jsx)(`b`,{children:e.action})}),(0,T.jsxs)(`span`,{className:`feed-when`,children:[x(e.started),` ago`]})]},e.id))})}function A({overview:e,sigil:t,setup:n,jobs:r,onAction:i}){let a=w(e),s=p(e,n);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`div`,{className:`card pad-lg rise mb-16`,children:(0,T.jsxs)(`div`,{className:`hero`,children:[(0,T.jsx)(E,{value:s}),(0,T.jsxs)(`div`,{className:`hero-facts`,children:[(0,T.jsx)(`div`,{className:`ttl`,children:a}),t&&(0,T.jsxs)(`div`,{className:`voice-readout`,children:[(0,T.jsx)(`span`,{className:`vr-cur`,children:`▕`}),(0,T.jsx)(`span`,{className:`vr-txt`,children:t})]},e.theme),(0,T.jsxs)(`p`,{className:`sub`,children:[`One source rendered into `,(0,T.jsx)(`code`,{children:e.target}),`. Every repo on this machine inherits it.`]}),(0,T.jsxs)(`div`,{className:`hero-chips`,children:[(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`voice`}),(0,T.jsx)(`span`,{className:`cv`,style:{textTransform:`capitalize`},children:e.theme})]}),(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`mode`}),(0,T.jsx)(`span`,{className:`cv`,children:e.emit})]}),(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`footprint`}),(0,T.jsx)(`span`,{className:`cv`,children:e.footprint})]}),(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`built`}),(0,T.jsx)(`span`,{className:`cv`,children:e.build_time||`unknown`})]}),(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`fp`}),(0,T.jsx)(`span`,{className:`cv`,children:n?.installed_fp||`—`})]})]}),(0,T.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,T.jsxs)(`button`,{className:`btn`,onClick:()=>i(`update`),children:[(0,T.jsx)(d,{name:`refresh`}),`Update`]}),(0,T.jsxs)(`button`,{className:`btn ghost`,onClick:()=>i(`build-all`),children:[(0,T.jsx)(d,{name:`build`}),`Rebuild`]}),(0,T.jsxs)(`button`,{className:`btn ghost`,onClick:()=>i(`doctor`),children:[(0,T.jsx)(d,{name:`doctor`}),`Run doctor`]})]})]})]})}),(0,T.jsx)(D,{overview:e}),(0,T.jsxs)(`div`,{className:`grid split-status`,children:[(0,T.jsxs)(`div`,{className:`card pad-lg`,children:[(0,T.jsxs)(`div`,{className:`card-head`,children:[(0,T.jsx)(`h3`,{children:`Capability genome`}),(0,T.jsx)(`div`,{className:`right`,children:(0,T.jsxs)(`span`,{className:`tick`,children:[o.length,` sections`]})})]}),(0,T.jsx)(O,{overview:e})]}),(0,T.jsxs)(`div`,{className:`card pad-lg`,children:[(0,T.jsxs)(`div`,{className:`card-head`,children:[(0,T.jsx)(`h3`,{children:`Recent activity`}),(0,T.jsx)(`div`,{className:`right`,children:(0,T.jsxs)(`span`,{className:`badge acc`,children:[(0,T.jsx)(`span`,{className:`dot`}),`live`]})})]}),(0,T.jsx)(k,{jobs:r})]})]})]})}function j({k:e,overview:t,max:n}){let r=a[e],i=t.counts?.[e]??0;return(0,T.jsxs)(`div`,{className:`strand`,children:[(0,T.jsxs)(`span`,{className:`strand-name`,children:[(0,T.jsx)(`span`,{className:`strand-dot`}),(0,T.jsx)(`a`,{href:`#/section/`+e,className:`strand-link stretch-link`,children:r.label})]}),(0,T.jsx)(`div`,{className:`hbar`,children:(0,T.jsx)(`i`,{style:{width:`${i/n*100}%`}})}),(0,T.jsx)(`span`,{className:`strand-val`,children:i})]})}function M({overview:e,sigil:t,setup:n,jobs:r}){let i=u(e.counts),a=n?.version_verdict||``,s=a.includes(`up to date`),l=c(e.diff),d=[[`Source`,`src/, the canonical genetic material`,n?.source_fp||`—`,!0],[`Render`,`geneseed build → ${e.emit}`,e.theme+` voice`,!0],[`Deployed`,e.target,`inherited by every repo`,!1]];return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`div`,{className:`mb-16`,children:(0,T.jsxs)(`div`,{className:`card pad-lg rise`,style:{position:`relative`,overflow:`hidden`},children:[(0,T.jsx)(`h2`,{className:`h`,style:{fontSize:22,margin:`0 0 18px`},children:`Gene-seed lineage`}),(0,T.jsxs)(`div`,{className:`lineage-track`,children:[(0,T.jsx)(`div`,{className:`spine`}),d.map(([e,t,n,r],i)=>(0,T.jsxs)(`div`,{className:`lineage-step`,children:[(0,T.jsx)(`span`,{className:`node ${r?`on`:``}`}),(0,T.jsx)(`div`,{className:`lt`,children:e}),(0,T.jsx)(`div`,{className:`ld`,children:t}),(0,T.jsx)(`div`,{className:`ltag`,children:n})]},i))]}),(0,T.jsx)(`hr`,{className:`hr`}),t&&(0,T.jsxs)(`div`,{className:`voice-readout`,style:{marginBottom:14},children:[(0,T.jsx)(`span`,{className:`vr-cur`,children:`▕`}),(0,T.jsx)(`span`,{className:`vr-txt`,children:t})]},e.theme),(0,T.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,T.jsxs)(`span`,{className:`badge ${s?`ok`:`warn`}`,children:[(0,T.jsx)(`span`,{className:`dot`}),`in sync · `,a]}),(0,T.jsxs)(`span`,{className:`badge`,children:[(0,T.jsx)(`span`,{className:`dot`}),l,` local edits`]})]})]})}),(0,T.jsxs)(`div`,{className:`grid split-even`,children:[(0,T.jsxs)(`div`,{className:`card pad-lg`,children:[(0,T.jsxs)(`div`,{className:`card-head`,children:[(0,T.jsx)(`h3`,{children:`Genome strand`}),(0,T.jsx)(`div`,{className:`right`,children:(0,T.jsx)(`span`,{className:`tick`,children:`by volume`})})]}),o.map(t=>(0,T.jsx)(j,{k:t,overview:e,max:i},t))]}),(0,T.jsxs)(`div`,{className:`card pad-lg`,children:[(0,T.jsx)(`div`,{className:`card-head`,children:(0,T.jsx)(`h3`,{children:`Recent activity`})}),(0,T.jsx)(k,{jobs:r})]})]})]})}function N({overview:e,setup:t,jobs:n}){let r=o.reduce((t,n)=>t+(e.counts?.[n]??0),0),i=u(e.counts),s=e.doctor?.ok,l=e.doctor?.problems?.length??0,d=c(e.diff);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`div`,{className:`card pad-md rise mb-16`,children:(0,T.jsx)(`div`,{className:`row wrap between gap-16`,children:(0,T.jsxs)(`div`,{className:`row`,style:{gap:20,flexWrap:`wrap`},children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`status`}),(0,T.jsx)(`div`,{className:`row`,style:{gap:8,marginTop:4},children:(0,T.jsxs)(`span`,{className:`badge ${e.deployed?`ok`:`warn`}`,children:[(0,T.jsx)(`span`,{className:`dot`}),e.deployed?`deployed`:`not deployed`]})})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`voice`}),(0,T.jsx)(`div`,{className:`metric`,style:{fontSize:18,marginTop:6,textTransform:`capitalize`},children:e.theme})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`mode`}),(0,T.jsx)(`div`,{className:`mono`,style:{fontSize:14,marginTop:6},children:e.emit})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`fingerprint`}),(0,T.jsx)(`div`,{className:`mono`,style:{fontSize:14,marginTop:6,color:`var(--accent)`},children:t?.installed_fp||`—`})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`doctor`}),(0,T.jsx)(`div`,{className:`row`,style:{gap:8,marginTop:4},children:s?(0,T.jsxs)(`span`,{className:`badge ok`,children:[(0,T.jsx)(`span`,{className:`dot`}),`clean`]}):(0,T.jsxs)(`span`,{className:`badge warn`,children:[(0,T.jsx)(`span`,{className:`dot`}),l,` issue`,l===1?``:`s`]})})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`edits`}),(0,T.jsx)(`div`,{className:`metric`,style:{fontSize:18,marginTop:6},children:d})]})]})})}),(0,T.jsxs)(`div`,{className:`grid split-operator`,children:[(0,T.jsxs)(`div`,{className:`card rise`,style:{"--i":1},children:[(0,T.jsxs)(`div`,{className:`card-head pad-lg`,style:{padding:`18px 20px 0`,marginBottom:14},children:[(0,T.jsx)(`h3`,{children:`Sections`}),(0,T.jsx)(`div`,{className:`right`,children:(0,T.jsxs)(`span`,{className:`tick`,children:[r,` entries total`]})})]}),(0,T.jsxs)(`table`,{className:`tbl`,children:[(0,T.jsx)(`thead`,{children:(0,T.jsxs)(`tr`,{children:[(0,T.jsx)(`th`,{children:`Section`}),(0,T.jsx)(`th`,{children:`Detail`}),(0,T.jsx)(`th`,{style:{width:130},children:`Share`}),(0,T.jsx)(`th`,{className:`num`,children:`Count`})]})}),(0,T.jsx)(`tbody`,{children:o.map(t=>{let n=a[t],r=e.counts?.[t]??0;return(0,T.jsxs)(`tr`,{className:`clickable`,children:[(0,T.jsx)(`td`,{className:`name`,children:(0,T.jsx)(`a`,{href:`#/section/`+t,className:`stretch-link`,children:n.label})}),(0,T.jsx)(`td`,{className:`muted`,children:n.desc}),(0,T.jsx)(`td`,{children:(0,T.jsx)(`div`,{className:`hbar`,children:(0,T.jsx)(`i`,{style:{width:`${r/i*100}%`}})})}),(0,T.jsx)(`td`,{className:`num`,children:r})]},t)})})]})]}),(0,T.jsxs)(`div`,{className:`card pad-lg rise`,style:{"--i":2},children:[(0,T.jsx)(`div`,{className:`card-head`,children:(0,T.jsx)(`h3`,{children:`Run log`})}),(0,T.jsx)(k,{jobs:n})]})]})]})}var P=e({default:()=>R}),F=(0,S.lazy)(()=>v(()=>import(`./GreenhouseView-M3wWndqG.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))),I=(0,S.lazy)(()=>v(()=>import(`./OperatorHudView-DLEGd63S.js`),__vite__mapDeps([9,1,2,6,4,5,7,8]))),L=(0,S.lazy)(()=>v(()=>import(`./JournalView-BSD-1Z83.js`),__vite__mapDeps([10,1,2,5,3,4,6,7])));function R({overview:e,overviewError:t,onRetry:n,themes:r,setup:a,runs:o,onAction:c,layout:l=`cultivar`,dataRev:u}){let d=l,[f,p]=(0,S.useState)(`status`),g=e&&r.find(t=>t.name===e.theme)?.sigil||``,{data:v}=h(()=>d===`greenhouse`||d===`operator`?i.doctor().catch(()=>null):Promise.resolve(null),[d,u]),{data:x}=h(()=>d===`journal`?i.recent().catch(()=>null):Promise.resolve(null),[d,u]);if(!e)return t?(0,T.jsxs)(`div`,{children:[(0,T.jsx)(m,{error:`Could not load the harness overview: ${t}`}),(0,T.jsx)(`button`,{className:`btn`,onClick:n,children:`Retry`})]}):(0,T.jsx)(y,{});let C=e.daemon_stale?(0,T.jsx)(b,{}):null;return e.deployed?f===`status`&&d===`journal`?(0,T.jsxs)(S.Suspense,{fallback:(0,T.jsx)(y,{}),children:[C,(0,T.jsx)(L,{overview:e,recent:x,onAction:c,onDirection:p,dataRev:u})]}):(0,T.jsxs)(T.Fragment,{children:[C,(0,T.jsx)(`div`,{className:`head-row`,children:(0,T.jsx)(s,{"aria-label":`Dashboard view`,children:[[`status`,`Status`],[`lineage`,`Lineage`],[`operator`,`Operator`]].map(([e,t])=>(0,T.jsx)(`button`,{className:f===e?`on`:``,onClick:()=>p(e),"aria-pressed":f===e,children:t},e))})}),(0,T.jsxs)(`div`,{className:`view-in`,children:[f===`status`&&d===`cultivar`&&(0,T.jsx)(A,{overview:e,sigil:g,setup:a,jobs:o,onAction:c}),f===`status`&&d===`greenhouse`&&(0,T.jsx)(S.Suspense,{fallback:(0,T.jsx)(y,{}),children:(0,T.jsx)(F,{overview:e,sigil:g,jobs:o,doctor:v,onAction:c})}),f===`status`&&d===`operator`&&(0,T.jsx)(S.Suspense,{fallback:(0,T.jsx)(y,{}),children:(0,T.jsx)(I,{overview:e,jobs:o,doctor:v,onAction:c})}),f===`lineage`&&(0,T.jsx)(M,{overview:e,sigil:g,setup:a,jobs:o}),f===`operator`&&(0,T.jsx)(N,{overview:e,setup:a,jobs:o})]},f)]}):(0,T.jsxs)(T.Fragment,{children:[C,(0,T.jsx)(_,{onAction:c})]})}export{R as default,w as n,P as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{t as r}from"./api-BfpZmUMI.js";import{D as i,E as a,J as o,O as s,P as c,S as l,V as u,a as d,i as f,k as p,n as m,o as ee,r as h,s as g,w as _}from"./index-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{t as r}from"./api-BfpZmUMI.js";import{D as i,E as a,J as o,O as s,P as c,S as l,V as u,a as d,i as f,k as p,n as m,o as ee,r as h,s as g,w as _}from"./index-BAArp8rX.js";import{a as v,i as y,l as b,n as x,o as S,r as C,s as w,t as T,u as E}from"./Markdown-zaXXXHz9.js";var D=e(t(),1),O=n();function k(e,t=0){let n=String(e).toLowerCase().trim().replace(/[^a-z0-9\s-]/g,``).replace(/\s+/g,`-`).replace(/-+/g,`-`).replace(/^-+|-+$/g,``);return n&&/^[a-z]/.test(n)?n:`h-${t}-${n||`section`}`}function A(e){return e.replace(/!?\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\[\[([^\]]+)\]\]/g,`$1`).replace(/`([^`]*)`/g,`$1`).replace(/\*\*|__/g,``).replace(/\*([^*\s][^*]*)\*/g,`$1`)}function j(e){let t=[],n=!1,r=0;for(let i of(e||``).split(`
|
|
2
2
|
`)){if(i.startsWith("```")){n=!n;continue}if(n)continue;let e=i.match(/^(##|###)\s+(.+?)\s*$/);e&&(r+=1,t.push({level:e[1].length,title:A(e[2]),id:k(e[2],r)}))}return t}var M={"opencode-global":[`install-opencode`,`Global (recommended)`],opencode:[`install-opencode`,`Per repo`],"claude-global":[`install-claude-code`],claude:[`install-claude-code`],"openclaude-global":[`install-openclaude`],openclaude:[`install-openclaude`],"bob-global":[`install-bob`],bob:[`install-bob`],files:[`install-agent-md`]},N=`you already know this`;function P({page:e,overview:t,onAction:n}){let r=(0,D.useRef)(null),i=(0,D.useMemo)(()=>x(e.body,e.links),[e.body,e.links]);(0,D.useEffect)(()=>{let e=r.current;if(!e)return;let t=0;e.querySelectorAll(`h1, h2, h3`).forEach(e=>{if(e.tagName!==`H1`&&(t+=1),!e.id){let n=k(e.textContent||``,t);n&&(e.id=n)}}),e.querySelectorAll(`blockquote`).forEach(e=>{(e.querySelector(`strong`)?.textContent||``).toLowerCase().startsWith(N)&&e.classList.add(`analogy`)})},[i]),(0,D.useEffect)(()=>{let e=r.current;if(!e)return;let t=e=>{let t=e.target.closest(`a[href]`);if(!t)return;let n=t.getAttribute(`href`);n&&n.startsWith(`#/`)&&(e.preventDefault(),o(n))};return e.addEventListener(`click`,t),()=>e.removeEventListener(`click`,t)},[i]),(0,D.useEffect)(()=>{let n=r.current;if(!n)return;n.querySelectorAll(`.docs-here`).forEach(e=>e.classList.remove(`docs-here`));let[i,a]=M[t?.emit]||[];if(!i)return;let o=null;e.id===`install`?o=n.querySelector(`a[href="#/docs/${i}"]`)?.closest(`li`):e.id===i&&a&&(o=[...n.querySelectorAll(`h2`)].find(e=>k(e.textContent||``)===k(a))),o?.classList.add(`docs-here`)},[i,e.id,t?.emit]);let a=[];return e.id===`install`&&(a.push({label:`Run doctor`,action:`doctor`}),a.push({label:`Rebuild`,action:`build`})),e.id===`verify`&&a.push({label:`Run doctor`,action:`doctor`}),e.id===`upgrade`&&a.push({label:`Update`,action:`update`}),(0,O.jsxs)(`div`,{className:`detail-doc`,children:[(0,O.jsx)(`h1`,{style:{marginTop:0},children:e.title}),e.source&&(0,O.jsx)(`div`,{className:`doc-meta`,children:(0,O.jsxs)(`span`,{className:`badge`,children:[(0,O.jsx)(`span`,{className:`dot`}),e.source]})}),a.length>0&&(0,O.jsx)(`div`,{className:`row wrap gap-10`,style:{margin:`10px 0 14px`},children:a.map(e=>e.hash?(0,O.jsx)(`a`,{className:`btn ghost sm`,href:e.hash,children:e.label},e.label):(0,O.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>n&&n(e.action),children:e.label},e.label))}),(0,O.jsx)(`div`,{className:`markdown`,ref:r,dangerouslySetInnerHTML:{__html:i}}),e.link&&(0,O.jsx)(`div`,{style:{marginTop:24},children:(0,O.jsx)(`a`,{className:`btn soft sm`,href:e.link.hash,children:e.link.label})})]})}var F=1200;function I({a:e,kind:t}){let n=t===`positional`?e.dest:e.names.join(`, `),r=[];return e.metavar&&r.push(e.metavar),e.choices&&r.push(`{${e.choices.join(`|`)}}`),e.default!==null&&e.default!==void 0&&e.default!==``&&!e.is_flag&&r.push(`default: ${e.default}`),e.required&&r.push(`required`),(0,O.jsxs)(`div`,{className:`cli-arg`,children:[(0,O.jsx)(`code`,{className:`cli-arg-name`,children:n}),r.length>0&&(0,O.jsxs)(`code`,{className:`cli-arg-meta`,children:[` `,r.join(` · `)]}),e.help&&(0,O.jsx)(`div`,{className:`cli-arg-help`,children:e.help})]})}function L({text:e}){let[t,n]=(0,D.useState)(!1);return(0,O.jsxs)(`button`,{className:`btn ghost sm`,onClick:async()=>{try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),F)}catch{}},title:`Copy command`,children:[(0,O.jsx)(c,{name:t?`spark`:`copy`}),t?`Copied`:`Copy`]})}function R({cmd:e,prog:t}){let n=[t,e.name];for(let t of e.positionals||[]){let e=(t.metavar||t.dest||``).toUpperCase();n.push(t.required?e:`[${e}]`)}(e.options||[]).length&&n.push(`[OPTIONS]`);let r=n.join(` `);return(0,O.jsxs)(`div`,{className:`card pad-md mb-12 cli-card`,children:[(0,O.jsxs)(`div`,{className:`row wrap between`,style:{alignItems:`flex-start`},children:[(0,O.jsxs)(`div`,{className:`stack`,style:{gap:4},children:[(0,O.jsx)(`h3`,{style:{margin:0},children:(0,O.jsx)(`code`,{children:e.name})}),e.help&&(0,O.jsx)(`p`,{className:`sub`,style:{margin:0},children:e.help})]}),(0,O.jsx)(L,{text:`${t} ${e.name}`})]}),(0,O.jsx)(`pre`,{className:`cli-syn`,children:r}),(e.positionals||[]).length>0&&(0,O.jsxs)(`div`,{className:`cli-block`,children:[(0,O.jsx)(`div`,{className:`cli-block-head`,children:`Arguments`}),e.positionals.map(e=>(0,O.jsx)(I,{a:e,kind:`positional`},e.dest))]}),(e.options||[]).length>0&&(0,O.jsxs)(`div`,{className:`cli-block`,children:[(0,O.jsx)(`div`,{className:`cli-block-head`,children:`Options`}),e.options.map(e=>(0,O.jsx)(I,{a:e,kind:`option`},e.names.join(`,`)))]})]})}function z({page:e}){let t=e.prog||`geneseed`,n=e.commands||[];return(0,O.jsxs)(`div`,{className:`detail-doc`,children:[(0,O.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,O.jsxs)(`p`,{className:`sub`,style:{marginTop:4},children:[`Every subcommand of `,(0,O.jsx)(`code`,{children:t}),`. Generated from the parser at request time (the same one `,(0,O.jsx)(`code`,{children:`geneseed`}),` actually parses), so this page cannot drift.`]}),(0,O.jsx)(`div`,{style:{marginTop:18},children:n.map(e=>(0,O.jsx)(R,{cmd:e,prog:t},e.name))})]})}function B({page:e}){let t=e.rows||[],n=e.theme||`neutral`;return(0,O.jsxs)(`div`,{className:`detail-doc`,children:[(0,O.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,O.jsxs)(`p`,{className:`sub`,style:{marginTop:4},children:[`Geneseed's invented vocabulary, decoded. Left: the neutral, plain-English term. Right: the word your `,(0,O.jsx)(`code`,{style:{textTransform:`capitalize`},children:n}),` theme actually uses in the agent's voice. Last: the developer idea it maps to.`]}),(0,O.jsx)(`div`,{className:`card pad-md`,style:{marginTop:18},children:(0,O.jsxs)(`table`,{className:`glossary-table`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`th`,{children:`Concept`}),(0,O.jsx)(`th`,{children:`Neutral term`}),(0,O.jsxs)(`th`,{children:[`In `,n]}),(0,O.jsx)(`th`,{children:`Meaning`}),(0,O.jsx)(`th`,{children:`In dev terms`})]})}),(0,O.jsx)(`tbody`,{children:t.map(e=>(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`td`,{children:(0,O.jsx)(`strong`,{children:e.label})}),(0,O.jsx)(`td`,{children:(0,O.jsx)(`code`,{children:e.neutral||`—`})}),(0,O.jsx)(`td`,{children:(0,O.jsx)(`code`,{children:e.themed||e.neutral||`—`})}),(0,O.jsx)(`td`,{className:`dim`,children:e.desc}),(0,O.jsx)(`td`,{className:`dim`,children:e.analogy||`—`})]},e.label))})]})})]})}var V={enforced:`ok`,automatic:`ok`,asked:`warn`,"on demand":`warn`};function H(e){let t=[],n=[],r=`before`;for(let i of(e||``).split(`
|
|
3
3
|
`))r===`before`&&/^\|\s*piece\s*\|/i.test(i)?r=`map`:r===`map`&&!i.trimStart().startsWith(`|`)&&(r=`after`),r===`before`?t.push(i):r===`after`&&n.push(i);return[t.join(`
|
|
4
4
|
`),n.join(`
|