geneseed 4.18.0 → 4.18.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.
Files changed (27) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/SHIPPED.md +1 -1
  3. package/docs/concepts/footprint.md +1 -1
  4. package/harness.config.json +1 -1
  5. package/js/web/actions.mjs +14 -5
  6. package/package.json +1 -1
  7. package/web/dist/assets/{Activity-D3_bQCUu.js → Activity-CrBz-58G.js} +1 -1
  8. package/web/dist/assets/{ActivityDetail-CF4t4Tfu.js → ActivityDetail-ZgsHrwvj.js} +1 -1
  9. package/web/dist/assets/{Dashboard-CLs-bR_v.js → Dashboard-Ds7_blrK.js} +3 -3
  10. package/web/dist/assets/{Docs-DxUYipLM.js → Docs-f2YJDQah.js} +1 -1
  11. package/web/dist/assets/{GreenhouseView-DYYctWtr.js → GreenhouseView-De8W1BvM.js} +1 -1
  12. package/web/dist/assets/{Installs-sz2MgKXB.js → Installs-BFsJIIti.js} +2 -2
  13. package/web/dist/assets/{JournalView-DFvDimtU.js → JournalView-DZHR1l1P.js} +1 -1
  14. package/web/dist/assets/{KitApply-BllCOBIp.js → KitApply-BYyktcdw.js} +1 -1
  15. package/web/dist/assets/{Kits-Bkujcmd1.js → Kits-Dfch112m.js} +1 -1
  16. package/web/dist/assets/{Laws-B2cyrICK.js → Laws-BztN3C8x.js} +1 -1
  17. package/web/dist/assets/{Library-CsVwkY-2.js → Library-CrZGLGWE.js} +1 -1
  18. package/web/dist/assets/{Loops-Dj50x8qB.js → Loops-BsbkBFl-.js} +1 -1
  19. package/web/dist/assets/{OperatorHudView-DcY3jDhO.js → OperatorHudView-BB8BH5PL.js} +1 -1
  20. package/web/dist/assets/{Personal-RriJXVUS.js → Personal-LRrDvMje.js} +1 -1
  21. package/web/dist/assets/{Tabs-u5wJjzu8.js → Tabs-b-L-ra4k.js} +1 -1
  22. package/web/dist/assets/{drawable-CUtqWN8k.js → drawable-CuQpH-f5.js} +1 -1
  23. package/web/dist/assets/index--3760QWr.js +2 -0
  24. package/web/dist/assets/index-FWb-1Qgz.css +1 -0
  25. package/web/dist/index.html +2 -2
  26. package/web/dist/assets/index-D7KB52Os.js +0 -2
  27. package/web/dist/assets/index-ngEyS9_E.css +0 -1
package/CHANGELOG.md CHANGED
@@ -8,6 +8,16 @@ label. For the capability ↔ spec map, see [SHIPPED.md](SHIPPED.md).
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [4.18.1] — 2026-10-24
12
+
13
+ Patch: the web console's light mode meets WCAG AA, and console installs default to lean.
14
+
15
+ ### Fixed
16
+ - **Light mode meets WCAG AA in every flavour, mode and accent.** Accent and status text use darker text companions (`--accent-text`, `--good-text`, `--warn-text`, `--bad-text`), measured against each flavour's real surfaces; button text is chosen by contrast, so a light cyan, amber or green button now carries dark text; every control shows a 2 px focus ring; the light topbar is solid and light cards keep their flavour; the page behind the console and the browser's theme colour follow the active mode. A warning next to an amber accent turns orange, so it no longer looks like the accent. `contrast.test.js` checks all of it against the real stylesheet.
17
+
18
+ ### Changed
19
+ - **New installs from the web console default to the lean footprint**, like the CLI: a deploy, an install on an absent row and a first-run build. An explicit `full` still works, and an existing install keeps its footprint on rebuild.
20
+
11
21
  ## [4.18.0] — 2026-10-24
12
22
 
13
23
  Minor: the web console's numbers tell the truth (stale vs edited drift, lenses, Constitution, Docs) and it keeps your work (error boundary, draft guard, shared staging).
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.18.0**.
23
+ > string. Current label: **4.18.1**.
24
24
 
25
25
  ## Capabilities
26
26
 
@@ -42,7 +42,7 @@ Footprint is stored in a `.geneseed-footprint` marker in the install and kept ac
42
42
  geneseed setup
43
43
  ```
44
44
 
45
- - **Web console** — the **Footprint** toggle in Settings flips the current install and rebuilds it; on the Harness page, each install has its own dropdown.
45
+ - **Web console** — the **Footprint** toggle in Settings flips the current install and rebuilds it; on the Harness page, each install has its own dropdown. A new install or deploy from the console starts lean, as from the command line.
46
46
  - **Command line** — with the emit target of the install you are changing:
47
47
 
48
48
  ```bash
@@ -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.18.0"
5
+ "version": "4.18.1"
6
6
  }
@@ -466,7 +466,9 @@ export function buildOverride(state, body) {
466
466
  * deliberately carries none of this install's switches or exclusions — and keeps the defaults it
467
467
  * always had: footprint, posture
468
468
  * and mode off the viewed dir, and ALL packs when unknown — never `harness.config.json`, which
469
- * would drop the consent gate.
469
+ * would drop the consent gate. The one exception is the footprint with NOTHING deployed: the
470
+ * viewed dir then has no footprint of its own (`footprintOfDir`'s no-marker answer is `full`),
471
+ * so a first install takes the CLI's default, lean — see `apiDeployCmd`.
470
472
  */
471
473
  export function buildActionCmds(state, body) {
472
474
  const [theme, emit] = buildOverride(state, body);
@@ -486,7 +488,8 @@ export function buildActionCmds(state, body) {
486
488
  + 'not Build' };
487
489
  }
488
490
  return actionCommands('build', {
489
- theme, emit, footprint: state.footprint, posture: state.posture, mode: state.mode,
491
+ theme, emit, footprint: deployed(state) ? state.footprint : 'lean',
492
+ posture: state.posture, mode: state.mode,
490
493
  trust: state.trust,
491
494
  doctrines: doctrinesForBuild(state.target),
492
495
  });
@@ -673,8 +676,11 @@ export function apiInstallCmd(state, body) {
673
676
  // Every read-back below is narrowed to `host`'s OWN carrier (host-compat B1) — see the
674
677
  // comment at `installProfile` in `js/build/generate.mjs`.
675
678
  // The theme default is THIS install's own, not the viewed one's: the Kits tab acts on any row.
679
+ // An ABSENT row has no footprint of its own (`footprintOfDir` answers its no-marker `full`),
680
+ // so a new install takes the CLI's default, lean — see `apiDeployCmd` below.
676
681
  const { theme, footprint: fp, posture: pos, mode, trust } = bodyAxes(body, {
677
- theme: themeOfDir(root, host) || state.theme, footprint: footprintOfDir(root),
682
+ theme: themeOfDir(root, host) || state.theme,
683
+ footprint: installState(root, host, scope) === 'absent' ? 'lean' : footprintOfDir(root),
678
684
  posture: postureOfDir(root, host) || 'peer',
679
685
  mode: modeOfDir(root, host) || 'direct', trust: trustOfDir(root, host) || DEFAULT_PRESET });
680
686
  // Unspecified means "keep what this install already has", exactly as theme, footprint,
@@ -792,9 +798,12 @@ export function apiDeployCmd(state, body) {
792
798
  return { error: `${root} predates the comms pack (its carrier names 'process 8') — `
793
799
  + 'run `geneseed setup` for it before deploying over it' };
794
800
  }
795
- // A fresh deploy is full, at the default register, mode and trust.
801
+ // A fresh deploy is LEAN, at the default register, mode and trust: the same default as the
802
+ // CLI's `--footprint`, which the user chose (2026-10-24) over the console's old `full` — a
803
+ // console install and a CLI install of the same folder must not differ in always-on text for
804
+ // no reason the user picked. An explicit `full` in the body still wins.
796
805
  const { theme, footprint: fp, posture: pos, mode, trust } = bodyAxes(body, {
797
- theme: state.theme, footprint: 'full', posture: 'peer', mode: 'direct',
806
+ theme: state.theme, footprint: 'lean', posture: 'peer', mode: 'direct',
798
807
  trust: DEFAULT_PRESET });
799
808
  // Same resolution as `apiInstallCmd` above, and for the same reason: the console's Deploy
800
809
  // form sends host/path/theme/footprint/posture/mode and NO pack selection, and nothing stops
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.18.0",
4
+ "version": "4.18.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{D as i,O as a,R as o,U as s,it as c}from"./index-D7KB52Os.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)(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 `,s(e.updated_at),` ago`]})]})}function y(){let[e,t]=(0,g.useState)(null),[n,o]=(0,g.useState)(``);h(e=>r.activity().then(n=>{e()&&(t(n),o(``))},t=>{e()&&o(t.message)}),2e3,[]);let s=!e||e.enabled!==!1,l=e?.activity||[],u=c(),d=async()=>{let e=!s;try{let n=await r.activityToggle(e);t(e=>({...e||{},enabled:n.enabled,activity:n.enabled&&e?.activity||[]})),o(``)}catch(e){o(e.message)}};return(0,_.jsxs)(`div`,{className:`narrow`,children:[(0,_.jsxs)(`div`,{className:`head-row mb-16`,children:[(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`h1`,{className:`h`,children:`Activity`}),(0,_.jsx)(`p`,{className:`sub`,children:`Live OpenCode sessions this harness is running: what each one is doing right now. Refreshes every couple of seconds; sessions drop off when their process exits.`})]}),(0,_.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`center`,flexShrink:0},children:[(0,_.jsx)(`span`,{className:`dim mono`,style:{fontSize:12},children:s?`tracking on`:`tracking off`}),(0,_.jsx)(`div`,{className:`sw-toggle${s?` on`:``}`,role:`switch`,"aria-checked":s,"aria-label":`Toggle activity tracking`,tabIndex:0,onClick:d,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),d())}})]})]}),(0,_.jsx)(i,{error:n,style:{marginBottom:12}}),e?s?l.length===0?(0,_.jsxs)(`div`,{className:`empty`,children:[(0,_.jsx)(`div`,{className:`big`,children:`No active sessions`}),`Run `,(0,_.jsx)(`code`,{children:`opencode`}),` and the sessions it spins up appear here.`]}):(0,_.jsx)(`div`,{className:`stack gap-12`,ref:u,children:l.map(e=>(0,_.jsx)(`div`,{"data-flip":e.session_id,children:(0,_.jsx)(v,{s:e})},e.session_id))}):(0,_.jsxs)(`div`,{className:`empty`,children:[(0,_.jsx)(`div`,{className:`big`,children:`Activity tracking is off`}),`The plugin isn't recording sessions. Flip the switch to turn it back on.`]}):(0,_.jsx)(a,{label:`Reading live sessions…`})]})}export{y as default};
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,O as a,R as o,U as s,it as c}from"./index--3760QWr.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)(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 `,s(e.updated_at),` ago`]})]})}function y(){let[e,t]=(0,g.useState)(null),[n,o]=(0,g.useState)(``);h(e=>r.activity().then(n=>{e()&&(t(n),o(``))},t=>{e()&&o(t.message)}),2e3,[]);let s=!e||e.enabled!==!1,l=e?.activity||[],u=c(),d=async()=>{let e=!s;try{let n=await r.activityToggle(e);t(e=>({...e||{},enabled:n.enabled,activity:n.enabled&&e?.activity||[]})),o(``)}catch(e){o(e.message)}};return(0,_.jsxs)(`div`,{className:`narrow`,children:[(0,_.jsxs)(`div`,{className:`head-row mb-16`,children:[(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`h1`,{className:`h`,children:`Activity`}),(0,_.jsx)(`p`,{className:`sub`,children:`Live OpenCode sessions this harness is running: what each one is doing right now. Refreshes every couple of seconds; sessions drop off when their process exits.`})]}),(0,_.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`center`,flexShrink:0},children:[(0,_.jsx)(`span`,{className:`dim mono`,style:{fontSize:12},children:s?`tracking on`:`tracking off`}),(0,_.jsx)(`div`,{className:`sw-toggle${s?` on`:``}`,role:`switch`,"aria-checked":s,"aria-label":`Toggle activity tracking`,tabIndex:0,onClick:d,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),d())}})]})]}),(0,_.jsx)(i,{error:n,style:{marginBottom:12}}),e?s?l.length===0?(0,_.jsxs)(`div`,{className:`empty`,children:[(0,_.jsx)(`div`,{className:`big`,children:`No active sessions`}),`Run `,(0,_.jsx)(`code`,{children:`opencode`}),` and the sessions it spins up appear here.`]}):(0,_.jsx)(`div`,{className:`stack gap-12`,ref:u,children:l.map(e=>(0,_.jsx)(`div`,{"data-flip":e.session_id,children:(0,_.jsx)(v,{s:e})},e.session_id))}):(0,_.jsxs)(`div`,{className:`empty`,children:[(0,_.jsx)(`div`,{className:`big`,children:`Activity tracking is off`}),`The plugin isn't recording sessions. Flip the switch to turn it back on.`]}):(0,_.jsx)(a,{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{D as i,O as a,R as o,U as s}from"./index-D7KB52Os.js";import{a as c,n as l,o as u,r as d,t as f}from"./activity-Jw8XcPiP.js";import{t as p}from"./usePoll-bDFN-Hr6.js";var m=e(t(),1),h=n();function g(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 _({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(`${u(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,h.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`baseline`},children:[(0,h.jsx)(`span`,{className:`badge ${t?``:`acc`}`,style:{flexShrink:0,minWidth:52,justifyContent:`center`},children:t?`you`:`agent`}),(0,h.jsxs)(`div`,{style:{minWidth:0,flex:1,fontSize:13},children:[!t&&(0,h.jsx)(`span`,{className:`feed-dot ${g(e)||`acc`}`,style:{display:`inline-block`,marginRight:8,verticalAlign:`middle`}}),e.kind===`thinking`&&(0,h.jsx)(`span`,{className:`dim`,children:`thinking: `}),r?(0,h.jsx)(`span`,{className:`dim`,children:i}):t?i:(0,h.jsx)(`b`,{children:i}),e.error&&(0,h.jsxs)(`span`,{className:`dim`,children:[`: `,e.error]})]}),n.length>0&&(0,h.jsx)(`span`,{className:`dim mono`,style:{flexShrink:0,fontSize:12},children:n.join(` · `)})]})}function v({turns:e}){return!e||e.length===0?(0,h.jsx)(`div`,{className:`dim`,style:{fontSize:13},children:`No conversation captured yet.`}):(0,h.jsx)(`div`,{className:`stack gap-12`,children:e.map((e,t)=>{let n=e.role===`user`;return(0,h.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`baseline`},children:[(0,h.jsx)(`span`,{className:`badge ${n?``:`acc`}`,style:{flexShrink:0,minWidth:52,justifyContent:`center`},children:n?`you`:`agent`}),(0,h.jsx)(`div`,{style:{minWidth:0,fontSize:13,color:n?`inherit`:`var(--text-2)`},children:e.text})]},t)})})}function y({sid:e}){let[t,n]=(0,m.useState)(null),[g,y]=(0,m.useState)(``),[b,x]=(0,m.useState)(!1),[S,C]=(0,m.useState)(!1);p(t=>r.activityDetail(e).then(e=>{t()&&(n(e),y(``),x(!1))},e=>{t()&&(e.status===404?x(!0):y(e.message))}),2e3,[e]);let w=(0,h.jsxs)(`a`,{className:`btn ghost sm`,href:`#/activity`,style:{marginBottom:12,display:`inline-flex`,gap:6},children:[(0,h.jsx)(o,{name:`arrow`,style:{transform:`rotate(180deg)`}}),` Activity`]});if(b)return(0,h.jsxs)(`div`,{className:`narrow`,children:[w,(0,h.jsxs)(`div`,{className:`empty`,children:[(0,h.jsx)(`div`,{className:`big`,children:`Session ended`}),`It's no longer live. `,(0,h.jsx)(`a`,{href:`#/activity`,children:`Back to Activity`}),`.`]})]});if(!t)return(0,h.jsxs)(`div`,{className:`narrow`,children:[w,g?(0,h.jsx)(i,{error:g}):(0,h.jsx)(a,{label:`Loading session…`})]});let T=t.session,E=d[T.status]||d.idle,D=T.files,O=T.todos,k=!!(D&&D.items&&D.items.length>0),A=!!(O&&O.items&&O.items.length>0),j=t.conversation||[],M=t.timeline||[],N=[...j.filter(e=>e.role===`user`).map(e=>({who:`you`,text:e.text,t:e.t||0})),...M.map(e=>({...e,who:`agent`}))].sort((e,t)=>(e.t||0)-(t.t||0));return(0,h.jsxs)(`div`,{className:`narrow`,children:[w,g&&(0,h.jsx)(`p`,{className:`badge bad`,style:{marginBottom:12},children:g}),(0,h.jsxs)(`div`,{className:`card pad-md`,children:[(0,h.jsxs)(`div`,{className:`row between wrap gap-12`,children:[(0,h.jsxs)(`div`,{style:{minWidth:0},children:[(0,h.jsx)(`h1`,{className:`h`,style:{margin:0},children:T.title||c(T.cwd)||T.session_id}),T.cwd&&(0,h.jsx)(`div`,{className:`dim mono`,style:{fontSize:12,...f},title:T.cwd,children:T.cwd})]}),(0,h.jsxs)(`div`,{className:`row gap-8`,style:{flexShrink:0},children:[T.model&&(0,h.jsx)(`span`,{className:`badge mono`,children:T.model}),T.agent&&(0,h.jsx)(`span`,{className:`badge`,children:T.agent}),(0,h.jsxs)(`span`,{className:`badge ${E.cls}`,children:[(0,h.jsx)(`span`,{className:`dot`}),E.label]})]})]}),T.phase&&(0,h.jsxs)(`div`,{className:`row gap-8`,style:{marginTop:10,fontSize:14},children:[(0,h.jsx)(o,{name:`activity`}),(0,h.jsx)(`span`,{style:f,children:T.phase})]}),(0,h.jsxs)(`div`,{className:`row wrap`,style:{gap:16,marginTop:12,fontSize:13,color:`var(--text-2)`},children:[T.tokens>0&&(0,h.jsxs)(`span`,{children:[u(T.tokens),` tok`]}),T.cost>0&&(0,h.jsxs)(`span`,{children:[`$`,T.cost.toFixed(2)]}),T.turn_started_at?(0,h.jsx)(`span`,{children:(0,h.jsx)(l,{startedAt:T.turn_started_at})}):null,(0,h.jsxs)(`span`,{className:`dim`,children:[`updated `,s(T.updated_at),` ago`]})]}),(T.error||T.blocked_on)&&(0,h.jsx)(`div`,{style:{marginTop:10},children:(0,h.jsx)(`span`,{className:`badge bad`,style:{maxWidth:`100%`,...f},children:T.error||T.blocked_on})})]}),(k||A)&&(0,h.jsxs)(`div`,{className:`grid gap-12`,style:{marginTop:12,gridTemplateColumns:k&&A?`minmax(0, 1fr) minmax(0, 1fr)`:`1fr`},children:[k&&(0,h.jsxs)(`div`,{className:`card pad-md`,children:[(0,h.jsx)(`div`,{className:`card-head`,children:(0,h.jsxs)(`h3`,{children:[`Files touched `,(0,h.jsxs)(`span`,{className:`dim`,children:[`(`,D.count,`)`]})]})}),(0,h.jsx)(`div`,{className:`stack`,style:{gap:6,marginTop:8},children:D.items.map(e=>(0,h.jsxs)(`div`,{className:`row between gap-12`,style:{fontSize:13},children:[(0,h.jsx)(`span`,{className:`mono`,style:{...f,minWidth:0,flex:1},title:e.file,children:e.file}),(0,h.jsxs)(`span`,{style:{flexShrink:0},children:[(0,h.jsxs)(`span`,{style:{color:`var(--good)`},children:[`+`,e.additions]}),` `,(0,h.jsxs)(`span`,{style:{color:`var(--bad)`},children:[`−`,e.deletions]})]})]},e.file))})]}),A&&(0,h.jsxs)(`div`,{className:`card pad-md`,children:[(0,h.jsx)(`div`,{className:`card-head`,children:(0,h.jsxs)(`h3`,{children:[`Plan`,` `,(0,h.jsxs)(`span`,{className:`dim`,children:[`(`,O.done,`/`,O.total,`)`]})]})}),(0,h.jsx)(`div`,{className:`stack`,style:{gap:6,marginTop:8},children:O.items.map((e,t)=>(0,h.jsxs)(`div`,{className:`row gap-8`,style:{fontSize:13},children:[(0,h.jsx)(`span`,{className:`feed-dot ${e.status===`completed`?`ok`:e.status===`in_progress`?`acc`:``}`}),(0,h.jsx)(`span`,{style:{textDecoration:e.status===`completed`?`line-through`:`none`,color:e.status===`completed`?`var(--text-3)`:`inherit`},children:e.content})]},t))})]})]}),(0,h.jsxs)(`div`,{className:`card pad-md`,style:{marginTop:12},children:[(0,h.jsxs)(`div`,{className:`card-head`,style:{justifyContent:`space-between`,marginBottom:12},children:[(0,h.jsx)(`h3`,{children:`Timeline`}),M.length>0&&(0,h.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>C(e=>!e),children:S?`Show conversation`:`Show all ${M.length} steps`})]}),S?(0,h.jsx)(`div`,{className:`stack gap-12`,children:N.map((e,t)=>(0,h.jsx)(_,{rec:e},t))}):(0,h.jsx)(v,{turns:j})]})]})}export{y as default};
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,O as a,R as o,U as s}from"./index--3760QWr.js";import{a as c,n as l,o as u,r as d,t as f}from"./activity-Jw8XcPiP.js";import{t as p}from"./usePoll-bDFN-Hr6.js";var m=e(t(),1),h=n();function g(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 _({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(`${u(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,h.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`baseline`},children:[(0,h.jsx)(`span`,{className:`badge ${t?``:`acc`}`,style:{flexShrink:0,minWidth:52,justifyContent:`center`},children:t?`you`:`agent`}),(0,h.jsxs)(`div`,{style:{minWidth:0,flex:1,fontSize:13},children:[!t&&(0,h.jsx)(`span`,{className:`feed-dot ${g(e)||`acc`}`,style:{display:`inline-block`,marginRight:8,verticalAlign:`middle`}}),e.kind===`thinking`&&(0,h.jsx)(`span`,{className:`dim`,children:`thinking: `}),r?(0,h.jsx)(`span`,{className:`dim`,children:i}):t?i:(0,h.jsx)(`b`,{children:i}),e.error&&(0,h.jsxs)(`span`,{className:`dim`,children:[`: `,e.error]})]}),n.length>0&&(0,h.jsx)(`span`,{className:`dim mono`,style:{flexShrink:0,fontSize:12},children:n.join(` · `)})]})}function v({turns:e}){return!e||e.length===0?(0,h.jsx)(`div`,{className:`dim`,style:{fontSize:13},children:`No conversation captured yet.`}):(0,h.jsx)(`div`,{className:`stack gap-12`,children:e.map((e,t)=>{let n=e.role===`user`;return(0,h.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`baseline`},children:[(0,h.jsx)(`span`,{className:`badge ${n?``:`acc`}`,style:{flexShrink:0,minWidth:52,justifyContent:`center`},children:n?`you`:`agent`}),(0,h.jsx)(`div`,{style:{minWidth:0,fontSize:13,color:n?`inherit`:`var(--text-2)`},children:e.text})]},t)})})}function y({sid:e}){let[t,n]=(0,m.useState)(null),[g,y]=(0,m.useState)(``),[b,x]=(0,m.useState)(!1),[S,C]=(0,m.useState)(!1);p(t=>r.activityDetail(e).then(e=>{t()&&(n(e),y(``),x(!1))},e=>{t()&&(e.status===404?x(!0):y(e.message))}),2e3,[e]);let w=(0,h.jsxs)(`a`,{className:`btn ghost sm`,href:`#/activity`,style:{marginBottom:12,display:`inline-flex`,gap:6},children:[(0,h.jsx)(o,{name:`arrow`,style:{transform:`rotate(180deg)`}}),` Activity`]});if(b)return(0,h.jsxs)(`div`,{className:`narrow`,children:[w,(0,h.jsxs)(`div`,{className:`empty`,children:[(0,h.jsx)(`div`,{className:`big`,children:`Session ended`}),`It's no longer live. `,(0,h.jsx)(`a`,{href:`#/activity`,children:`Back to Activity`}),`.`]})]});if(!t)return(0,h.jsxs)(`div`,{className:`narrow`,children:[w,g?(0,h.jsx)(i,{error:g}):(0,h.jsx)(a,{label:`Loading session…`})]});let T=t.session,E=d[T.status]||d.idle,D=T.files,O=T.todos,k=!!(D&&D.items&&D.items.length>0),A=!!(O&&O.items&&O.items.length>0),j=t.conversation||[],M=t.timeline||[],N=[...j.filter(e=>e.role===`user`).map(e=>({who:`you`,text:e.text,t:e.t||0})),...M.map(e=>({...e,who:`agent`}))].sort((e,t)=>(e.t||0)-(t.t||0));return(0,h.jsxs)(`div`,{className:`narrow`,children:[w,g&&(0,h.jsx)(`p`,{className:`badge bad`,style:{marginBottom:12},children:g}),(0,h.jsxs)(`div`,{className:`card pad-md`,children:[(0,h.jsxs)(`div`,{className:`row between wrap gap-12`,children:[(0,h.jsxs)(`div`,{style:{minWidth:0},children:[(0,h.jsx)(`h1`,{className:`h`,style:{margin:0},children:T.title||c(T.cwd)||T.session_id}),T.cwd&&(0,h.jsx)(`div`,{className:`dim mono`,style:{fontSize:12,...f},title:T.cwd,children:T.cwd})]}),(0,h.jsxs)(`div`,{className:`row gap-8`,style:{flexShrink:0},children:[T.model&&(0,h.jsx)(`span`,{className:`badge mono`,children:T.model}),T.agent&&(0,h.jsx)(`span`,{className:`badge`,children:T.agent}),(0,h.jsxs)(`span`,{className:`badge ${E.cls}`,children:[(0,h.jsx)(`span`,{className:`dot`}),E.label]})]})]}),T.phase&&(0,h.jsxs)(`div`,{className:`row gap-8`,style:{marginTop:10,fontSize:14},children:[(0,h.jsx)(o,{name:`activity`}),(0,h.jsx)(`span`,{style:f,children:T.phase})]}),(0,h.jsxs)(`div`,{className:`row wrap`,style:{gap:16,marginTop:12,fontSize:13,color:`var(--text-2)`},children:[T.tokens>0&&(0,h.jsxs)(`span`,{children:[u(T.tokens),` tok`]}),T.cost>0&&(0,h.jsxs)(`span`,{children:[`$`,T.cost.toFixed(2)]}),T.turn_started_at?(0,h.jsx)(`span`,{children:(0,h.jsx)(l,{startedAt:T.turn_started_at})}):null,(0,h.jsxs)(`span`,{className:`dim`,children:[`updated `,s(T.updated_at),` ago`]})]}),(T.error||T.blocked_on)&&(0,h.jsx)(`div`,{style:{marginTop:10},children:(0,h.jsx)(`span`,{className:`badge bad`,style:{maxWidth:`100%`,...f},children:T.error||T.blocked_on})})]}),(k||A)&&(0,h.jsxs)(`div`,{className:`grid gap-12`,style:{marginTop:12,gridTemplateColumns:k&&A?`minmax(0, 1fr) minmax(0, 1fr)`:`1fr`},children:[k&&(0,h.jsxs)(`div`,{className:`card pad-md`,children:[(0,h.jsx)(`div`,{className:`card-head`,children:(0,h.jsxs)(`h3`,{children:[`Files touched `,(0,h.jsxs)(`span`,{className:`dim`,children:[`(`,D.count,`)`]})]})}),(0,h.jsx)(`div`,{className:`stack`,style:{gap:6,marginTop:8},children:D.items.map(e=>(0,h.jsxs)(`div`,{className:`row between gap-12`,style:{fontSize:13},children:[(0,h.jsx)(`span`,{className:`mono`,style:{...f,minWidth:0,flex:1},title:e.file,children:e.file}),(0,h.jsxs)(`span`,{style:{flexShrink:0},children:[(0,h.jsxs)(`span`,{style:{color:`var(--good)`},children:[`+`,e.additions]}),` `,(0,h.jsxs)(`span`,{style:{color:`var(--bad)`},children:[`−`,e.deletions]})]})]},e.file))})]}),A&&(0,h.jsxs)(`div`,{className:`card pad-md`,children:[(0,h.jsx)(`div`,{className:`card-head`,children:(0,h.jsxs)(`h3`,{children:[`Plan`,` `,(0,h.jsxs)(`span`,{className:`dim`,children:[`(`,O.done,`/`,O.total,`)`]})]})}),(0,h.jsx)(`div`,{className:`stack`,style:{gap:6,marginTop:8},children:O.items.map((e,t)=>(0,h.jsxs)(`div`,{className:`row gap-8`,style:{fontSize:13},children:[(0,h.jsx)(`span`,{className:`feed-dot ${e.status===`completed`?`ok`:e.status===`in_progress`?`acc`:``}`}),(0,h.jsx)(`span`,{style:{textDecoration:e.status===`completed`?`line-through`:`none`,color:e.status===`completed`?`var(--text-3)`:`inherit`},children:e.content})]},t))})]})]}),(0,h.jsxs)(`div`,{className:`card pad-md`,style:{marginTop:12},children:[(0,h.jsxs)(`div`,{className:`card-head`,style:{justifyContent:`space-between`,marginBottom:12},children:[(0,h.jsx)(`h3`,{children:`Timeline`}),M.length>0&&(0,h.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>C(e=>!e),children:S?`Show conversation`:`Show all ${M.length} steps`})]}),S?(0,h.jsx)(`div`,{className:`stack gap-12`,children:N.map((e,t)=>(0,h.jsx)(_,{rec:e},t))}):(0,h.jsx)(v,{turns:j})]})]})}export{y as default};
@@ -1,3 +1,3 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GreenhouseView-DYYctWtr.js","assets/rolldown-runtime-hePW80VL.js","assets/react-DlYQp10C.js","assets/drawable-CUtqWN8k.js","assets/index-D7KB52Os.js","assets/api-BfpZmUMI.js","assets/sections-ChwaobfW.js","assets/index-ngEyS9_E.css","assets/OperatorHudView-DcY3jDhO.js","assets/JournalView-DFvDimtU.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{A as s,B as c,D as l,E as u,G as d,H as f,O as p,Q as m,R as h,S as g,U as _,V as v,c as y,et as b,rt as x,t as S}from"./index-D7KB52Os.js";var C=t(n(),1),w=r(),T=864e5;function E(e,t=10,n=`today`){let r=Array(t).fill(0).map((e,r)=>({t:r===t-1?n:`${t-1-r}d`,v:0})),i=Date.now();for(let n of e){let e=n.started||n.finished||n.created||n.ts;if(!e)continue;let a=typeof e==`string`?Date.parse(e):e*1e3;if(!Number.isFinite(a))continue;let o=Math.floor((i-a)/T);o<0||o>=t||(r[t-1-o].v+=1)}return r}var D=(e,t)=>[...e||[]].sort((e,t)=>(t.started||0)-(e.started||0)).slice(0,t),O=[`--emit`,`--theme`,`--scope`],k={done:`✓`,failed:`✗`};function A(e){let t=(e.output||``).split(`
3
- `).find(e=>e.startsWith(`$ `))||``,n=t.split(/\s+/),r=[];return n.forEach((e,t)=>{let[i,a]=e.split(`=`),o=a||n[t+1];O.includes(i)&&o&&!o.startsWith(`--`)&&r.push(o)}),{verb:(e.action||`run`).split(/[\s(]/)[0],scope:r.join(` · `),result:k[e.status]||`…`,duration:e.duration?`${e.duration}s`:`—`,command:t}}var j={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.`},M=(e,t)=>e.deployed?t===void 0||t===`good`?j[e.theme]||`Loaded & ready`:`Deployed`:`Not deployed`,N={good:`ok`,warn:`warn`,bad:`bad`};function P({verdict:e}){return e?(0,w.jsxs)(`span`,{className:`badge ${N[e.tone]}`,role:`status`,style:{alignSelf:`flex-start`},children:[(0,w.jsx)(`span`,{className:`dot`}),e.head]}):null}function F({value:e,size:t=232}){let n=x(e,1100)??0,r=t/2-14,i=2*Math.PI*r,a=i*(1-n);return(0,w.jsxs)(`div`,{className:`ring-wrap`,style:{width:t,height:t},children:[(0,w.jsxs)(`svg`,{viewBox:`0 0 ${t} ${t}`,children:[(0,w.jsx)(`circle`,{cx:t/2,cy:t/2,r,fill:`none`,stroke:`var(--surface-3)`,strokeWidth:`10`}),(0,w.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,w.jsx)(`line`,{x1:c,y1:l,x2:u,y2:d,stroke:`var(--line-2)`,strokeWidth:`1`,opacity:i/48<n?.9:.25},i)})]}),(0,w.jsxs)(`div`,{className:`ring-center`,children:[(0,w.jsxs)(`div`,{className:`pct`,children:[Math.round(n*100),(0,w.jsx)(`span`,{style:{fontSize:20,color:`var(--text-3)`},children:`%`})]}),(0,w.jsx)(`div`,{className:`lbl`,children:`germination`})]})]})}function I({overview:e}){let t=c(e.diff),n=e.counts||{};return(0,w.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,w.jsxs)(`a`,{className:`kseg`,href:e.hash,title:`Open ${e.label}`,children:[(0,w.jsx)(`span`,{className:`kseg-n`+(t===0?` zero`:``),children:t==null?`—`:(0,w.jsx)(b,{value:t})}),(0,w.jsx)(`span`,{className:`kseg-l`,children:e.label})]},e.key)}),(0,w.jsx)(`div`,{className:`kseg-spacer`}),(0,w.jsxs)(`button`,{className:`kseg`+(t>0?` hot`:``),onClick:()=>m(`#/diff`),title:`Open changes`,children:[(0,w.jsx)(`span`,{className:`kseg-n`+(t===0?` zero`:``),children:(0,w.jsx)(b,{value:t})}),(0,w.jsx)(`span`,{className:`kseg-l`,children:`Local edits`}),t>0&&(0,w.jsx)(`span`,{className:`delta up`,children:`▲`})]})]})}function L({overview:e}){return(0,w.jsx)(`div`,{className:`genome`,children:o.map((t,n)=>{let r=a[t],i=e.counts?.[t];return(0,w.jsxs)(`div`,{className:`card gcell rise`,style:{"--i":n},onClick:()=>m(`#/section/`+t),children:[(0,w.jsxs)(`div`,{className:`gtop`,children:[(0,w.jsx)(`span`,{className:`gname`,children:r.label}),(0,w.jsx)(h,{name:r.icon,className:`gicon`})]}),(0,w.jsx)(`div`,{className:`gcount`+(i===0?` zero`:``),children:i==null?`—`:(0,w.jsx)(b,{value:i})}),(0,w.jsx)(`div`,{className:`gdesc`,children:r.desc})]},t)})})}function R({jobs:e}){if(!e||e.length===0)return(0,w.jsx)(`div`,{className:`feed`,children:(0,w.jsxs)(`div`,{className:`empty`,children:[(0,w.jsx)(`div`,{className:`big`,children:`No activity yet`}),`Actions you run appear here.`]})});let t={done:`ok`,running:`acc`,failed:`bad`},n=D(e,8);return(0,w.jsx)(`div`,{className:`feed`,children:n.map(e=>(0,w.jsxs)(`div`,{className:`feed-row`,children:[(0,w.jsx)(`span`,{className:`feed-dot ${t[e.status]||`ok`}`}),(0,w.jsx)(`span`,{className:`feed-txt`,children:(0,w.jsx)(`b`,{children:e.action})}),(0,w.jsxs)(`span`,{className:`feed-when`,children:[_(e.started),` ago`]})]},e.id))})}function z({overview:e,sigil:t,setup:n,jobs:r,lens:i,onAction:a}){let s=M(e,i?.tone),c=f(e,n);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`div`,{className:`card pad-lg rise mb-16`,children:(0,w.jsxs)(`div`,{className:`hero`,children:[(0,w.jsx)(F,{value:c}),(0,w.jsxs)(`div`,{className:`hero-facts`,children:[(0,w.jsx)(`div`,{className:`ttl`,children:s}),(0,w.jsx)(P,{verdict:i?.verdict}),t&&(0,w.jsxs)(`div`,{className:`voice-readout`,children:[(0,w.jsx)(`span`,{className:`vr-cur`,children:`▕`}),(0,w.jsx)(`span`,{className:`vr-txt`,children:t})]},e.theme),(0,w.jsxs)(`p`,{className:`sub`,children:[`One source rendered into `,(0,w.jsx)(`code`,{children:e.target}),`. Every repo on this machine inherits it.`]}),(0,w.jsxs)(`div`,{className:`hero-chips`,children:[(0,w.jsxs)(`span`,{className:`chip`,children:[(0,w.jsx)(`span`,{className:`ck`,children:`voice`}),(0,w.jsx)(`span`,{className:`cv`,style:{textTransform:`capitalize`},children:e.theme})]}),(0,w.jsxs)(`span`,{className:`chip`,children:[(0,w.jsx)(`span`,{className:`ck`,children:`mode`}),(0,w.jsx)(`span`,{className:`cv`,children:e.emit})]}),(0,w.jsxs)(`span`,{className:`chip`,children:[(0,w.jsx)(`span`,{className:`ck`,children:`footprint`}),(0,w.jsx)(`span`,{className:`cv`,children:e.footprint})]}),(0,w.jsxs)(`span`,{className:`chip`,children:[(0,w.jsx)(`span`,{className:`ck`,children:`built`}),(0,w.jsx)(`span`,{className:`cv`,children:e.build_time||`unknown`})]}),(0,w.jsxs)(`span`,{className:`chip`,children:[(0,w.jsx)(`span`,{className:`ck`,children:`fp`}),(0,w.jsx)(`span`,{className:`cv`,children:n?.installed_fp||`—`})]})]}),(0,w.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,w.jsxs)(`button`,{className:`btn`,onClick:()=>a(`update`),children:[(0,w.jsx)(h,{name:`refresh`}),`Update`]}),(0,w.jsxs)(`button`,{className:`btn ghost`,onClick:()=>a(`build-all`),children:[(0,w.jsx)(h,{name:`build`}),`Rebuild`]}),(0,w.jsxs)(`button`,{className:`btn ghost`,onClick:()=>a(`doctor`),children:[(0,w.jsx)(h,{name:`doctor`}),`Run doctor`]})]})]})]})}),(0,w.jsx)(I,{overview:e}),(0,w.jsxs)(`div`,{className:`grid split-status`,children:[(0,w.jsxs)(`div`,{className:`card pad-lg`,children:[(0,w.jsxs)(`div`,{className:`card-head`,children:[(0,w.jsx)(`h3`,{children:`Capability genome`}),(0,w.jsx)(`div`,{className:`right`,children:(0,w.jsxs)(`span`,{className:`tick`,children:[o.length,` sections`]})})]}),(0,w.jsx)(L,{overview:e})]}),(0,w.jsxs)(`div`,{className:`card pad-lg`,children:[(0,w.jsxs)(`div`,{className:`card-head`,children:[(0,w.jsx)(`h3`,{children:`Recent activity`}),(0,w.jsx)(`div`,{className:`right`,children:(0,w.jsxs)(`span`,{className:`badge acc`,children:[(0,w.jsx)(`span`,{className:`dot`}),`live`]})})]}),(0,w.jsx)(R,{jobs:r})]})]})]})}function B({k:e,overview:t,max:n}){let r=a[e],i=t.counts?.[e]??0;return(0,w.jsxs)(`div`,{className:`strand`,children:[(0,w.jsxs)(`span`,{className:`strand-name`,children:[(0,w.jsx)(`span`,{className:`strand-dot`}),(0,w.jsx)(`a`,{href:`#/section/`+e,className:`strand-link stretch-link`,children:r.label})]}),(0,w.jsx)(`div`,{className:`hbar`,children:(0,w.jsx)(`i`,{style:{width:`${i/n*100}%`}})}),(0,w.jsx)(`span`,{className:`strand-val`,children:i})]})}function V(e){return e?e.includes(`up to date`)?{label:`in sync`,tone:`ok`}:e.includes(`no Geneseed install`)?{label:`not installed`,tone:``}:{label:`behind source`,tone:`warn`}:null}function H({overview:e,sigil:t,setup:n,jobs:r,lens:i}){let a=v(e.counts),s=n?.version_verdict||``,l=V(s),u=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,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`div`,{className:`mb-16`,children:(0,w.jsxs)(`div`,{className:`card pad-lg rise`,style:{position:`relative`,overflow:`hidden`},children:[(0,w.jsx)(`h2`,{className:`h`,style:{fontSize:22,margin:`0 0 18px`},children:`Gene-seed lineage`}),(0,w.jsxs)(`div`,{className:`lineage-track`,children:[(0,w.jsx)(`div`,{className:`spine`}),d.map(([e,t,n,r],i)=>(0,w.jsxs)(`div`,{className:`lineage-step`,children:[(0,w.jsx)(`span`,{className:`node ${r?`on`:``}`}),(0,w.jsx)(`div`,{className:`lt`,children:e}),(0,w.jsx)(`div`,{className:`ld`,children:t}),(0,w.jsx)(`div`,{className:`ltag`,children:n})]},i))]}),(0,w.jsx)(`hr`,{className:`hr`}),t&&(0,w.jsxs)(`div`,{className:`voice-readout`,style:{marginBottom:14},children:[(0,w.jsx)(`span`,{className:`vr-cur`,children:`▕`}),(0,w.jsx)(`span`,{className:`vr-txt`,children:t})]},e.theme),(0,w.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,w.jsx)(P,{verdict:i?.verdict}),l&&(0,w.jsxs)(`span`,{className:`badge ${l.tone}`,title:s,children:[(0,w.jsx)(`span`,{className:`dot`}),l.label]}),(0,w.jsxs)(`span`,{className:`badge`,children:[(0,w.jsx)(`span`,{className:`dot`}),u,` local edits`]})]})]})}),(0,w.jsxs)(`div`,{className:`grid split-even`,children:[(0,w.jsxs)(`div`,{className:`card pad-lg`,children:[(0,w.jsxs)(`div`,{className:`card-head`,children:[(0,w.jsx)(`h3`,{children:`Genome strand`}),(0,w.jsx)(`div`,{className:`right`,children:(0,w.jsx)(`span`,{className:`tick`,children:`by volume`})})]}),o.map(t=>(0,w.jsx)(B,{k:t,overview:e,max:a},t))]}),(0,w.jsxs)(`div`,{className:`card pad-lg`,children:[(0,w.jsx)(`div`,{className:`card-head`,children:(0,w.jsx)(`h3`,{children:`Recent activity`})}),(0,w.jsx)(R,{jobs:r})]})]})]})}function U({overview:e,setup:t,jobs:n,lens:r}){let i=o.reduce((t,n)=>t+(e.counts?.[n]??0),0),s=v(e.counts),l=e.doctor?.ok,u=e.doctor?.problems?.length??0,d=c(e.diff);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`div`,{className:`card pad-md rise mb-16`,children:(0,w.jsx)(`div`,{className:`row wrap between gap-16`,children:(0,w.jsxs)(`div`,{className:`row`,style:{gap:20,flexWrap:`wrap`},children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`tick`,children:`status`}),(0,w.jsxs)(`div`,{className:`row`,style:{gap:8,marginTop:4},children:[(0,w.jsxs)(`span`,{className:`badge ${e.deployed?`ok`:`warn`}`,children:[(0,w.jsx)(`span`,{className:`dot`}),e.deployed?`deployed`:`not deployed`]}),(0,w.jsx)(P,{verdict:r?.verdict})]})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`tick`,children:`voice`}),(0,w.jsx)(`div`,{className:`metric`,style:{fontSize:18,marginTop:6,textTransform:`capitalize`},children:e.theme})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`tick`,children:`mode`}),(0,w.jsx)(`div`,{className:`mono`,style:{fontSize:14,marginTop:6},children:e.emit})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`tick`,children:`fingerprint`}),(0,w.jsx)(`div`,{className:`mono`,style:{fontSize:14,marginTop:6,color:`var(--accent)`},children:t?.installed_fp||`—`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`tick`,children:`doctor`}),(0,w.jsx)(`div`,{className:`row`,style:{gap:8,marginTop:4},children:l?(0,w.jsxs)(`span`,{className:`badge ok`,children:[(0,w.jsx)(`span`,{className:`dot`}),`clean`]}):(0,w.jsxs)(`span`,{className:`badge warn`,children:[(0,w.jsx)(`span`,{className:`dot`}),u,` issue`,u===1?``:`s`]})})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`tick`,children:`edits`}),(0,w.jsx)(`div`,{className:`metric`,style:{fontSize:18,marginTop:6},children:d})]})]})})}),(0,w.jsxs)(`div`,{className:`grid split-operator`,children:[(0,w.jsxs)(`div`,{className:`card rise`,style:{"--i":1},children:[(0,w.jsxs)(`div`,{className:`card-head pad-lg`,style:{padding:`18px 20px 0`,marginBottom:14},children:[(0,w.jsx)(`h3`,{children:`Sections`}),(0,w.jsx)(`div`,{className:`right`,children:(0,w.jsxs)(`span`,{className:`tick`,children:[i,` entries total`]})})]}),(0,w.jsxs)(`table`,{className:`tbl`,children:[(0,w.jsx)(`thead`,{children:(0,w.jsxs)(`tr`,{children:[(0,w.jsx)(`th`,{children:`Section`}),(0,w.jsx)(`th`,{children:`Detail`}),(0,w.jsx)(`th`,{style:{width:130},children:`Share`}),(0,w.jsx)(`th`,{className:`num`,children:`Count`})]})}),(0,w.jsx)(`tbody`,{children:o.map(t=>{let n=a[t],r=e.counts?.[t]??0;return(0,w.jsxs)(`tr`,{className:`clickable`,children:[(0,w.jsx)(`td`,{className:`name`,children:(0,w.jsx)(`a`,{href:`#/section/`+t,className:`stretch-link`,children:n.label})}),(0,w.jsx)(`td`,{className:`muted`,children:n.desc}),(0,w.jsx)(`td`,{children:(0,w.jsx)(`div`,{className:`hbar`,children:(0,w.jsx)(`i`,{style:{width:`${r/s*100}%`}})})}),(0,w.jsx)(`td`,{className:`num`,children:r})]},t)})})]})]}),(0,w.jsxs)(`div`,{className:`card pad-lg rise`,style:{"--i":2},children:[(0,w.jsx)(`div`,{className:`card-head`,children:(0,w.jsx)(`h3`,{children:`Run log`})}),(0,w.jsx)(R,{jobs:n})]})]})]})}var W=Symbol(`failed`),G=e=>Promise.resolve().then(e).catch(()=>W);function K({dataRev:e,needDoctor:t}){let n=d(()=>G(()=>i.fleet()),[e]),r=d(()=>t?G(()=>i.doctor()):Promise.resolve(null),[t,e]),a=n.data,o=a==null?`loading`:a===W?`failed`:`ok`,s=o===`ok`?a:null,c=s?y(s):null,l=r.data,u=t?l==null?`loading`:l===W?`failed`:`ok`:`idle`;return{fleet:s,fleetState:o,verdict:c,tone:o===`failed`?`failed`:c?.tone,doctor:{state:u,data:u===`ok`?r.data:null}}}var q=e({default:()=>Z}),J=(0,C.lazy)(()=>S(()=>import(`./GreenhouseView-DYYctWtr.js`),__vite__mapDeps([0,1,2,3,4,5,6,7]))),Y=(0,C.lazy)(()=>S(()=>import(`./OperatorHudView-DcY3jDhO.js`),__vite__mapDeps([8,1,2,6,4,5,7]))),X=(0,C.lazy)(()=>S(()=>import(`./JournalView-DFvDimtU.js`),__vite__mapDeps([9,1,2,5,3,4,6,7])));function Z({overview:e,overviewError:t,onRetry:n,themes:r,setup:a,runs:o,onAction:c,layout:f=`cultivar`,dataRev:m}){let h=f,[_,v]=(0,C.useState)(`status`),y=e&&r.find(t=>t.name===e.theme)?.sigil||``,b=K({dataRev:m,needDoctor:h===`greenhouse`||h===`operator`}),{data:x}=d(()=>h===`journal`?i.recent().catch(()=>null):Promise.resolve(null),[h,m]);if(!e)return t?(0,w.jsxs)(`div`,{children:[(0,w.jsx)(l,{error:`Could not load the harness overview: ${t}`}),(0,w.jsx)(`button`,{className:`btn`,onClick:n,children:`Retry`})]}):(0,w.jsx)(p,{});let S=e.daemon_stale?(0,w.jsx)(u,{}):null;return e.deployed?_===`status`&&h===`journal`?(0,w.jsxs)(C.Suspense,{fallback:(0,w.jsx)(p,{}),children:[S,(0,w.jsx)(X,{overview:e,recent:x,lens:b,onAction:c,onDirection:v,dataRev:m})]}):(0,w.jsxs)(w.Fragment,{children:[S,(0,w.jsx)(`div`,{className:`head-row`,children:(0,w.jsx)(s,{"aria-label":`Dashboard view`,children:[[`status`,`Status`],[`lineage`,`Lineage`],[`operator`,`Operator`]].map(([e,t])=>(0,w.jsx)(`button`,{className:_===e?`on`:``,onClick:()=>v(e),"aria-pressed":_===e,children:t},e))})}),(0,w.jsxs)(`div`,{className:`view-in`,children:[_===`status`&&h===`cultivar`&&(0,w.jsx)(z,{overview:e,sigil:y,setup:a,jobs:o,lens:b,onAction:c}),_===`status`&&h===`greenhouse`&&(0,w.jsx)(C.Suspense,{fallback:(0,w.jsx)(p,{}),children:(0,w.jsx)(J,{overview:e,sigil:y,jobs:o,lens:b,onAction:c})}),_===`status`&&h===`operator`&&(0,w.jsx)(C.Suspense,{fallback:(0,w.jsx)(p,{}),children:(0,w.jsx)(Y,{overview:e,jobs:o,lens:b,onAction:c})}),_===`lineage`&&(0,w.jsx)(H,{overview:e,sigil:y,setup:a,jobs:o,lens:b}),_===`operator`&&(0,w.jsx)(U,{overview:e,setup:a,jobs:o,lens:b})]},_)]}):(0,w.jsxs)(w.Fragment,{children:[S,(0,w.jsx)(g,{onAction:c})]})}export{A as a,Z as default,E as i,P as n,D as o,M as r,q as t};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GreenhouseView-De8W1BvM.js","assets/rolldown-runtime-hePW80VL.js","assets/react-DlYQp10C.js","assets/drawable-CuQpH-f5.js","assets/index--3760QWr.js","assets/api-BfpZmUMI.js","assets/sections-ChwaobfW.js","assets/index-FWb-1Qgz.css","assets/OperatorHudView-BB8BH5PL.js","assets/JournalView-DZHR1l1P.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{A as s,B as c,D as l,E as u,G as d,H as f,O as p,Q as m,R as h,S as g,U as _,V as v,c as y,et as b,rt as x,t as S}from"./index--3760QWr.js";var C=t(n(),1),w=r(),T=864e5;function E(e,t=10,n=`today`){let r=Array(t).fill(0).map((e,r)=>({t:r===t-1?n:`${t-1-r}d`,v:0})),i=Date.now();for(let n of e){let e=n.started||n.finished||n.created||n.ts;if(!e)continue;let a=typeof e==`string`?Date.parse(e):e*1e3;if(!Number.isFinite(a))continue;let o=Math.floor((i-a)/T);o<0||o>=t||(r[t-1-o].v+=1)}return r}var D=(e,t)=>[...e||[]].sort((e,t)=>(t.started||0)-(e.started||0)).slice(0,t),O=[`--emit`,`--theme`,`--scope`],k={done:`✓`,failed:`✗`};function A(e){let t=(e.output||``).split(`
3
+ `).find(e=>e.startsWith(`$ `))||``,n=t.split(/\s+/),r=[];return n.forEach((e,t)=>{let[i,a]=e.split(`=`),o=a||n[t+1];O.includes(i)&&o&&!o.startsWith(`--`)&&r.push(o)}),{verb:(e.action||`run`).split(/[\s(]/)[0],scope:r.join(` · `),result:k[e.status]||`…`,duration:e.duration?`${e.duration}s`:`—`,command:t}}var j={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.`},M=(e,t)=>e.deployed?t===void 0||t===`good`?j[e.theme]||`Loaded & ready`:`Deployed`:`Not deployed`,N={good:`ok`,warn:`warn`,bad:`bad`};function P({verdict:e}){return e?(0,w.jsxs)(`span`,{className:`badge ${N[e.tone]}`,role:`status`,style:{alignSelf:`flex-start`},children:[(0,w.jsx)(`span`,{className:`dot`}),e.head]}):null}function F({value:e,size:t=232}){let n=x(e,1100)??0,r=t/2-14,i=2*Math.PI*r,a=i*(1-n);return(0,w.jsxs)(`div`,{className:`ring-wrap`,style:{width:t,height:t},children:[(0,w.jsxs)(`svg`,{viewBox:`0 0 ${t} ${t}`,children:[(0,w.jsx)(`circle`,{cx:t/2,cy:t/2,r,fill:`none`,stroke:`var(--surface-3)`,strokeWidth:`10`}),(0,w.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,w.jsx)(`line`,{x1:c,y1:l,x2:u,y2:d,stroke:`var(--line-2)`,strokeWidth:`1`,opacity:i/48<n?.9:.25},i)})]}),(0,w.jsxs)(`div`,{className:`ring-center`,children:[(0,w.jsxs)(`div`,{className:`pct`,children:[Math.round(n*100),(0,w.jsx)(`span`,{style:{fontSize:20,color:`var(--text-3)`},children:`%`})]}),(0,w.jsx)(`div`,{className:`lbl`,children:`germination`})]})]})}function I({overview:e}){let t=c(e.diff),n=e.counts||{};return(0,w.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,w.jsxs)(`a`,{className:`kseg`,href:e.hash,title:`Open ${e.label}`,children:[(0,w.jsx)(`span`,{className:`kseg-n`+(t===0?` zero`:``),children:t==null?`—`:(0,w.jsx)(b,{value:t})}),(0,w.jsx)(`span`,{className:`kseg-l`,children:e.label})]},e.key)}),(0,w.jsx)(`div`,{className:`kseg-spacer`}),(0,w.jsxs)(`button`,{className:`kseg`+(t>0?` hot`:``),onClick:()=>m(`#/diff`),title:`Open changes`,children:[(0,w.jsx)(`span`,{className:`kseg-n`+(t===0?` zero`:``),children:(0,w.jsx)(b,{value:t})}),(0,w.jsx)(`span`,{className:`kseg-l`,children:`Local edits`}),t>0&&(0,w.jsx)(`span`,{className:`delta up`,children:`▲`})]})]})}function L({overview:e}){return(0,w.jsx)(`div`,{className:`genome`,children:o.map((t,n)=>{let r=a[t],i=e.counts?.[t];return(0,w.jsxs)(`div`,{className:`card gcell rise`,style:{"--i":n},onClick:()=>m(`#/section/`+t),children:[(0,w.jsxs)(`div`,{className:`gtop`,children:[(0,w.jsx)(`span`,{className:`gname`,children:r.label}),(0,w.jsx)(h,{name:r.icon,className:`gicon`})]}),(0,w.jsx)(`div`,{className:`gcount`+(i===0?` zero`:``),children:i==null?`—`:(0,w.jsx)(b,{value:i})}),(0,w.jsx)(`div`,{className:`gdesc`,children:r.desc})]},t)})})}function R({jobs:e}){if(!e||e.length===0)return(0,w.jsx)(`div`,{className:`feed`,children:(0,w.jsxs)(`div`,{className:`empty`,children:[(0,w.jsx)(`div`,{className:`big`,children:`No activity yet`}),`Actions you run appear here.`]})});let t={done:`ok`,running:`acc`,failed:`bad`},n=D(e,8);return(0,w.jsx)(`div`,{className:`feed`,children:n.map(e=>(0,w.jsxs)(`div`,{className:`feed-row`,children:[(0,w.jsx)(`span`,{className:`feed-dot ${t[e.status]||`ok`}`}),(0,w.jsx)(`span`,{className:`feed-txt`,children:(0,w.jsx)(`b`,{children:e.action})}),(0,w.jsxs)(`span`,{className:`feed-when`,children:[_(e.started),` ago`]})]},e.id))})}function z({overview:e,sigil:t,setup:n,jobs:r,lens:i,onAction:a}){let s=M(e,i?.tone),c=f(e,n);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`div`,{className:`card pad-lg rise mb-16`,children:(0,w.jsxs)(`div`,{className:`hero`,children:[(0,w.jsx)(F,{value:c}),(0,w.jsxs)(`div`,{className:`hero-facts`,children:[(0,w.jsx)(`div`,{className:`ttl`,children:s}),(0,w.jsx)(P,{verdict:i?.verdict}),t&&(0,w.jsxs)(`div`,{className:`voice-readout`,children:[(0,w.jsx)(`span`,{className:`vr-cur`,children:`▕`}),(0,w.jsx)(`span`,{className:`vr-txt`,children:t})]},e.theme),(0,w.jsxs)(`p`,{className:`sub`,children:[`One source rendered into `,(0,w.jsx)(`code`,{children:e.target}),`. Every repo on this machine inherits it.`]}),(0,w.jsxs)(`div`,{className:`hero-chips`,children:[(0,w.jsxs)(`span`,{className:`chip`,children:[(0,w.jsx)(`span`,{className:`ck`,children:`voice`}),(0,w.jsx)(`span`,{className:`cv`,style:{textTransform:`capitalize`},children:e.theme})]}),(0,w.jsxs)(`span`,{className:`chip`,children:[(0,w.jsx)(`span`,{className:`ck`,children:`mode`}),(0,w.jsx)(`span`,{className:`cv`,children:e.emit})]}),(0,w.jsxs)(`span`,{className:`chip`,children:[(0,w.jsx)(`span`,{className:`ck`,children:`footprint`}),(0,w.jsx)(`span`,{className:`cv`,children:e.footprint})]}),(0,w.jsxs)(`span`,{className:`chip`,children:[(0,w.jsx)(`span`,{className:`ck`,children:`built`}),(0,w.jsx)(`span`,{className:`cv`,children:e.build_time||`unknown`})]}),(0,w.jsxs)(`span`,{className:`chip`,children:[(0,w.jsx)(`span`,{className:`ck`,children:`fp`}),(0,w.jsx)(`span`,{className:`cv`,children:n?.installed_fp||`—`})]})]}),(0,w.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,w.jsxs)(`button`,{className:`btn`,onClick:()=>a(`update`),children:[(0,w.jsx)(h,{name:`refresh`}),`Update`]}),(0,w.jsxs)(`button`,{className:`btn ghost`,onClick:()=>a(`build-all`),children:[(0,w.jsx)(h,{name:`build`}),`Rebuild`]}),(0,w.jsxs)(`button`,{className:`btn ghost`,onClick:()=>a(`doctor`),children:[(0,w.jsx)(h,{name:`doctor`}),`Run doctor`]})]})]})]})}),(0,w.jsx)(I,{overview:e}),(0,w.jsxs)(`div`,{className:`grid split-status`,children:[(0,w.jsxs)(`div`,{className:`card pad-lg`,children:[(0,w.jsxs)(`div`,{className:`card-head`,children:[(0,w.jsx)(`h3`,{children:`Capability genome`}),(0,w.jsx)(`div`,{className:`right`,children:(0,w.jsxs)(`span`,{className:`tick`,children:[o.length,` sections`]})})]}),(0,w.jsx)(L,{overview:e})]}),(0,w.jsxs)(`div`,{className:`card pad-lg`,children:[(0,w.jsxs)(`div`,{className:`card-head`,children:[(0,w.jsx)(`h3`,{children:`Recent activity`}),(0,w.jsx)(`div`,{className:`right`,children:(0,w.jsxs)(`span`,{className:`badge acc`,children:[(0,w.jsx)(`span`,{className:`dot`}),`live`]})})]}),(0,w.jsx)(R,{jobs:r})]})]})]})}function B({k:e,overview:t,max:n}){let r=a[e],i=t.counts?.[e]??0;return(0,w.jsxs)(`div`,{className:`strand`,children:[(0,w.jsxs)(`span`,{className:`strand-name`,children:[(0,w.jsx)(`span`,{className:`strand-dot`}),(0,w.jsx)(`a`,{href:`#/section/`+e,className:`strand-link stretch-link`,children:r.label})]}),(0,w.jsx)(`div`,{className:`hbar`,children:(0,w.jsx)(`i`,{style:{width:`${i/n*100}%`}})}),(0,w.jsx)(`span`,{className:`strand-val`,children:i})]})}function V(e){return e?e.includes(`up to date`)?{label:`in sync`,tone:`ok`}:e.includes(`no Geneseed install`)?{label:`not installed`,tone:``}:{label:`behind source`,tone:`warn`}:null}function H({overview:e,sigil:t,setup:n,jobs:r,lens:i}){let a=v(e.counts),s=n?.version_verdict||``,l=V(s),u=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,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`div`,{className:`mb-16`,children:(0,w.jsxs)(`div`,{className:`card pad-lg rise`,style:{position:`relative`,overflow:`hidden`},children:[(0,w.jsx)(`h2`,{className:`h`,style:{fontSize:22,margin:`0 0 18px`},children:`Gene-seed lineage`}),(0,w.jsxs)(`div`,{className:`lineage-track`,children:[(0,w.jsx)(`div`,{className:`spine`}),d.map(([e,t,n,r],i)=>(0,w.jsxs)(`div`,{className:`lineage-step`,children:[(0,w.jsx)(`span`,{className:`node ${r?`on`:``}`}),(0,w.jsx)(`div`,{className:`lt`,children:e}),(0,w.jsx)(`div`,{className:`ld`,children:t}),(0,w.jsx)(`div`,{className:`ltag`,children:n})]},i))]}),(0,w.jsx)(`hr`,{className:`hr`}),t&&(0,w.jsxs)(`div`,{className:`voice-readout`,style:{marginBottom:14},children:[(0,w.jsx)(`span`,{className:`vr-cur`,children:`▕`}),(0,w.jsx)(`span`,{className:`vr-txt`,children:t})]},e.theme),(0,w.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,w.jsx)(P,{verdict:i?.verdict}),l&&(0,w.jsxs)(`span`,{className:`badge ${l.tone}`,title:s,children:[(0,w.jsx)(`span`,{className:`dot`}),l.label]}),(0,w.jsxs)(`span`,{className:`badge`,children:[(0,w.jsx)(`span`,{className:`dot`}),u,` local edits`]})]})]})}),(0,w.jsxs)(`div`,{className:`grid split-even`,children:[(0,w.jsxs)(`div`,{className:`card pad-lg`,children:[(0,w.jsxs)(`div`,{className:`card-head`,children:[(0,w.jsx)(`h3`,{children:`Genome strand`}),(0,w.jsx)(`div`,{className:`right`,children:(0,w.jsx)(`span`,{className:`tick`,children:`by volume`})})]}),o.map(t=>(0,w.jsx)(B,{k:t,overview:e,max:a},t))]}),(0,w.jsxs)(`div`,{className:`card pad-lg`,children:[(0,w.jsx)(`div`,{className:`card-head`,children:(0,w.jsx)(`h3`,{children:`Recent activity`})}),(0,w.jsx)(R,{jobs:r})]})]})]})}function U({overview:e,setup:t,jobs:n,lens:r}){let i=o.reduce((t,n)=>t+(e.counts?.[n]??0),0),s=v(e.counts),l=e.doctor?.ok,u=e.doctor?.problems?.length??0,d=c(e.diff);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`div`,{className:`card pad-md rise mb-16`,children:(0,w.jsx)(`div`,{className:`row wrap between gap-16`,children:(0,w.jsxs)(`div`,{className:`row`,style:{gap:20,flexWrap:`wrap`},children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`tick`,children:`status`}),(0,w.jsxs)(`div`,{className:`row`,style:{gap:8,marginTop:4},children:[(0,w.jsxs)(`span`,{className:`badge ${e.deployed?`ok`:`warn`}`,children:[(0,w.jsx)(`span`,{className:`dot`}),e.deployed?`deployed`:`not deployed`]}),(0,w.jsx)(P,{verdict:r?.verdict})]})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`tick`,children:`voice`}),(0,w.jsx)(`div`,{className:`metric`,style:{fontSize:18,marginTop:6,textTransform:`capitalize`},children:e.theme})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`tick`,children:`mode`}),(0,w.jsx)(`div`,{className:`mono`,style:{fontSize:14,marginTop:6},children:e.emit})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`tick`,children:`fingerprint`}),(0,w.jsx)(`div`,{className:`mono`,style:{fontSize:14,marginTop:6,color:`var(--accent)`},children:t?.installed_fp||`—`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`tick`,children:`doctor`}),(0,w.jsx)(`div`,{className:`row`,style:{gap:8,marginTop:4},children:l?(0,w.jsxs)(`span`,{className:`badge ok`,children:[(0,w.jsx)(`span`,{className:`dot`}),`clean`]}):(0,w.jsxs)(`span`,{className:`badge warn`,children:[(0,w.jsx)(`span`,{className:`dot`}),u,` issue`,u===1?``:`s`]})})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`tick`,children:`edits`}),(0,w.jsx)(`div`,{className:`metric`,style:{fontSize:18,marginTop:6},children:d})]})]})})}),(0,w.jsxs)(`div`,{className:`grid split-operator`,children:[(0,w.jsxs)(`div`,{className:`card rise`,style:{"--i":1},children:[(0,w.jsxs)(`div`,{className:`card-head pad-lg`,style:{padding:`18px 20px 0`,marginBottom:14},children:[(0,w.jsx)(`h3`,{children:`Sections`}),(0,w.jsx)(`div`,{className:`right`,children:(0,w.jsxs)(`span`,{className:`tick`,children:[i,` entries total`]})})]}),(0,w.jsxs)(`table`,{className:`tbl`,children:[(0,w.jsx)(`thead`,{children:(0,w.jsxs)(`tr`,{children:[(0,w.jsx)(`th`,{children:`Section`}),(0,w.jsx)(`th`,{children:`Detail`}),(0,w.jsx)(`th`,{style:{width:130},children:`Share`}),(0,w.jsx)(`th`,{className:`num`,children:`Count`})]})}),(0,w.jsx)(`tbody`,{children:o.map(t=>{let n=a[t],r=e.counts?.[t]??0;return(0,w.jsxs)(`tr`,{className:`clickable`,children:[(0,w.jsx)(`td`,{className:`name`,children:(0,w.jsx)(`a`,{href:`#/section/`+t,className:`stretch-link`,children:n.label})}),(0,w.jsx)(`td`,{className:`muted`,children:n.desc}),(0,w.jsx)(`td`,{children:(0,w.jsx)(`div`,{className:`hbar`,children:(0,w.jsx)(`i`,{style:{width:`${r/s*100}%`}})})}),(0,w.jsx)(`td`,{className:`num`,children:r})]},t)})})]})]}),(0,w.jsxs)(`div`,{className:`card pad-lg rise`,style:{"--i":2},children:[(0,w.jsx)(`div`,{className:`card-head`,children:(0,w.jsx)(`h3`,{children:`Run log`})}),(0,w.jsx)(R,{jobs:n})]})]})]})}var W=Symbol(`failed`),G=e=>Promise.resolve().then(e).catch(()=>W);function K({dataRev:e,needDoctor:t}){let n=d(()=>G(()=>i.fleet()),[e]),r=d(()=>t?G(()=>i.doctor()):Promise.resolve(null),[t,e]),a=n.data,o=a==null?`loading`:a===W?`failed`:`ok`,s=o===`ok`?a:null,c=s?y(s):null,l=r.data,u=t?l==null?`loading`:l===W?`failed`:`ok`:`idle`;return{fleet:s,fleetState:o,verdict:c,tone:o===`failed`?`failed`:c?.tone,doctor:{state:u,data:u===`ok`?r.data:null}}}var q=e({default:()=>Z}),J=(0,C.lazy)(()=>S(()=>import(`./GreenhouseView-De8W1BvM.js`),__vite__mapDeps([0,1,2,3,4,5,6,7]))),Y=(0,C.lazy)(()=>S(()=>import(`./OperatorHudView-BB8BH5PL.js`),__vite__mapDeps([8,1,2,6,4,5,7]))),X=(0,C.lazy)(()=>S(()=>import(`./JournalView-DZHR1l1P.js`),__vite__mapDeps([9,1,2,5,3,4,6,7])));function Z({overview:e,overviewError:t,onRetry:n,themes:r,setup:a,runs:o,onAction:c,layout:f=`cultivar`,dataRev:m}){let h=f,[_,v]=(0,C.useState)(`status`),y=e&&r.find(t=>t.name===e.theme)?.sigil||``,b=K({dataRev:m,needDoctor:h===`greenhouse`||h===`operator`}),{data:x}=d(()=>h===`journal`?i.recent().catch(()=>null):Promise.resolve(null),[h,m]);if(!e)return t?(0,w.jsxs)(`div`,{children:[(0,w.jsx)(l,{error:`Could not load the harness overview: ${t}`}),(0,w.jsx)(`button`,{className:`btn`,onClick:n,children:`Retry`})]}):(0,w.jsx)(p,{});let S=e.daemon_stale?(0,w.jsx)(u,{}):null;return e.deployed?_===`status`&&h===`journal`?(0,w.jsxs)(C.Suspense,{fallback:(0,w.jsx)(p,{}),children:[S,(0,w.jsx)(X,{overview:e,recent:x,lens:b,onAction:c,onDirection:v,dataRev:m})]}):(0,w.jsxs)(w.Fragment,{children:[S,(0,w.jsx)(`div`,{className:`head-row`,children:(0,w.jsx)(s,{"aria-label":`Dashboard view`,children:[[`status`,`Status`],[`lineage`,`Lineage`],[`operator`,`Operator`]].map(([e,t])=>(0,w.jsx)(`button`,{className:_===e?`on`:``,onClick:()=>v(e),"aria-pressed":_===e,children:t},e))})}),(0,w.jsxs)(`div`,{className:`view-in`,children:[_===`status`&&h===`cultivar`&&(0,w.jsx)(z,{overview:e,sigil:y,setup:a,jobs:o,lens:b,onAction:c}),_===`status`&&h===`greenhouse`&&(0,w.jsx)(C.Suspense,{fallback:(0,w.jsx)(p,{}),children:(0,w.jsx)(J,{overview:e,sigil:y,jobs:o,lens:b,onAction:c})}),_===`status`&&h===`operator`&&(0,w.jsx)(C.Suspense,{fallback:(0,w.jsx)(p,{}),children:(0,w.jsx)(Y,{overview:e,jobs:o,lens:b,onAction:c})}),_===`lineage`&&(0,w.jsx)(H,{overview:e,sigil:y,setup:a,jobs:o,lens:b}),_===`operator`&&(0,w.jsx)(U,{overview:e,setup:a,jobs:o,lens:b})]},_)]}):(0,w.jsxs)(w.Fragment,{children:[S,(0,w.jsx)(g,{onAction:c})]})}export{A as a,Z as default,E as i,P as n,D as o,M as r,q 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{A as i,D as a,G as o,M as s,N as c,O as l,Q as u,R as d,a as f,i as p,j as m,n as h,o as g,r as _,s as v}from"./index-D7KB52Os.js";import{a as y,n as ee,o as te,r as b,t as x}from"./RailCats-D5RVYEjy.js";import{i as S,n as C,r as w}from"./Markdown-OReRRoEV.js";var T=e(t(),1);function E(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 D(e){let t=[],n=[],r=`before`;for(let i of(e||``).split(`
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{A as i,D as a,G as o,M as s,N as c,O as l,Q as u,R as d,a as f,i as p,j as m,n as h,o as g,r as _,s as v}from"./index--3760QWr.js";import{a as y,n as ee,o as te,r as b,t as x}from"./RailCats-D5RVYEjy.js";import{i as S,n as C,r as w}from"./Markdown-OReRRoEV.js";var T=e(t(),1);function E(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 D(e){let t=[],n=[],r=`before`;for(let i of(e||``).split(`
2
2
  `))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(`
3
3
  `),n.join(`
4
4
  `)]}function O(e,t){let n=document.createElement(`template`);return n.innerHTML=e,n.content.querySelectorAll(`h1, h2, h3`).forEach(e=>{e.tagName!==`H1`&&(t.idx+=1);let n=e.id||E(e.textContent||``,t.idx),r=n;for(let e=2;t.ids.has(r);e++)r=`${n}-${e}`;t.ids.add(r),e.id=r,e.tagName!==`H1`&&t.toc.push({level:Number(e.tagName[1]),title:(e.textContent||``).trim(),id:r})}),n.content.querySelectorAll(`table`).forEach(e=>{let t=document.createElement(`div`);t.className=`table-scroll`,t.setAttribute(`tabindex`,`0`),t.setAttribute(`role`,`region`),t.setAttribute(`aria-label`,`Table`),e.replaceWith(t),t.appendChild(e)}),n.innerHTML}function k(e){let t={ids:new Set,idx:0,toc:[]},n=n=>O(C(n,e?.links),t);if(e?.rows){let[r,i]=D(e.body);return{before:n(r),after:n(i),toc:t.toc}}return{html:n(e?.body),toc:t.toc}}var A=n(),j={"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`]},M=`you already know this`;function N({page:e,overview:t,onAction:n}){let r=(0,T.useRef)(null),i=(0,T.useMemo)(()=>k({body:e.body,links:e.links}).html,[e.body,e.links]);(0,T.useEffect)(()=>{let e=r.current;e&&e.querySelectorAll(`blockquote`).forEach(e=>{(e.querySelector(`strong`)?.textContent||``).toLowerCase().startsWith(M)&&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(),u(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]=j[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=>E(e.textContent||``)===E(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,A.jsxs)(`div`,{className:`detail-doc`,children:[(0,A.jsx)(`h1`,{style:{marginTop:0},children:e.title}),e.source&&(0,A.jsx)(`div`,{className:`doc-meta`,children:(0,A.jsxs)(`span`,{className:`badge`,children:[(0,A.jsx)(`span`,{className:`dot`}),e.source]})}),a.length>0&&(0,A.jsx)(`div`,{className:`row wrap gap-10`,style:{margin:`10px 0 14px`},children:a.map(e=>e.hash?(0,A.jsx)(`a`,{className:`btn ghost sm`,href:e.hash,children:e.label},e.label):(0,A.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>n&&n(e.action),children:e.label},e.label))}),(0,A.jsx)(`div`,{className:`markdown`,ref:r,dangerouslySetInnerHTML:{__html:i}}),e.link&&(0,A.jsx)(`div`,{style:{marginTop:24},children:(0,A.jsx)(`a`,{className:`btn soft sm`,href:e.link.hash,children:e.link.label})})]})}var P=1200;function F({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,A.jsxs)(`div`,{className:`cli-arg`,children:[(0,A.jsx)(`code`,{className:`cli-arg-name`,children:n}),r.length>0&&(0,A.jsxs)(`code`,{className:`cli-arg-meta`,children:[` `,r.join(` · `)]}),e.help&&(0,A.jsx)(`div`,{className:`cli-arg-help`,children:e.help})]})}function I({text:e}){let[t,n]=(0,T.useState)(!1);return(0,A.jsxs)(`button`,{className:`btn ghost sm`,onClick:async()=>{try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),P)}catch{}},title:`Copy command`,children:[(0,A.jsx)(d,{name:t?`spark`:`copy`}),t?`Copied`:`Copy`]})}function L({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,A.jsxs)(`div`,{className:`card pad-md mb-12 cli-card`,children:[(0,A.jsxs)(`div`,{className:`row wrap between`,style:{alignItems:`flex-start`},children:[(0,A.jsxs)(`div`,{className:`stack`,style:{gap:4},children:[(0,A.jsx)(`h3`,{style:{margin:0},children:(0,A.jsx)(`code`,{children:e.name})}),e.help&&(0,A.jsx)(`p`,{className:`sub`,style:{margin:0},children:e.help})]}),(0,A.jsx)(I,{text:`${t} ${e.name}`})]}),(0,A.jsx)(`pre`,{className:`cli-syn`,children:r}),(e.positionals||[]).length>0&&(0,A.jsxs)(`div`,{className:`cli-block`,children:[(0,A.jsx)(`div`,{className:`cli-block-head`,children:`Arguments`}),e.positionals.map(e=>(0,A.jsx)(F,{a:e,kind:`positional`},e.dest))]}),(e.options||[]).length>0&&(0,A.jsxs)(`div`,{className:`cli-block`,children:[(0,A.jsx)(`div`,{className:`cli-block-head`,children:`Options`}),e.options.map(e=>(0,A.jsx)(F,{a:e,kind:`option`},e.names.join(`,`)))]})]})}function R({page:e}){let t=e.prog||`geneseed`,n=e.commands||[];return(0,A.jsxs)(`div`,{className:`detail-doc`,children:[(0,A.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,A.jsxs)(`p`,{className:`sub`,style:{marginTop:4},children:[`Every subcommand of `,(0,A.jsx)(`code`,{children:t}),`. Generated from the parser at request time (the same one `,(0,A.jsx)(`code`,{children:`geneseed`}),` actually parses), so this page cannot drift.`]}),(0,A.jsx)(`div`,{style:{marginTop:18},children:n.map(e=>(0,A.jsx)(L,{cmd:e,prog:t},e.name))})]})}function z({page:e}){let t=e.rows||[],n=e.theme||`neutral`;return(0,A.jsxs)(`div`,{className:`detail-doc`,children:[(0,A.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,A.jsxs)(`p`,{className:`sub`,style:{marginTop:4},children:[`Geneseed's invented vocabulary, decoded. Left: the neutral, plain-English term. Right: the word your `,(0,A.jsx)(`code`,{style:{textTransform:`capitalize`},children:n}),` theme actually uses in the agent's voice. Last: the developer idea it maps to.`]}),(0,A.jsx)(`div`,{className:`card pad-md`,style:{marginTop:18},children:(0,A.jsxs)(`table`,{className:`glossary-table`,children:[(0,A.jsx)(`thead`,{children:(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`th`,{children:`Concept`}),(0,A.jsx)(`th`,{children:`Neutral term`}),(0,A.jsxs)(`th`,{children:[`In `,n]}),(0,A.jsx)(`th`,{children:`Meaning`}),(0,A.jsx)(`th`,{children:`In dev terms`})]})}),(0,A.jsx)(`tbody`,{children:t.map(e=>(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`td`,{children:(0,A.jsx)(`strong`,{children:e.label})}),(0,A.jsx)(`td`,{children:(0,A.jsx)(`code`,{children:e.neutral||`—`})}),(0,A.jsx)(`td`,{children:(0,A.jsx)(`code`,{children:e.themed||e.neutral||`—`})}),(0,A.jsx)(`td`,{className:`dim`,children:e.desc}),(0,A.jsx)(`td`,{className:`dim`,children:e.analogy||`—`})]},e.label))})]})})]})}var B={enforced:`ok`,automatic:`ok`,asked:`warn`,"on demand":`warn`},V=({text:e})=>(0,A.jsx)(`span`,{dangerouslySetInnerHTML:{__html:w(S.parseInline(e||``))}}),H=({kind:e})=>(0,A.jsx)(`span`,{className:`tag ${B[e]||``}`,children:e});function U({page:e,overview:t,onAction:n}){let[r,i]=(0,T.useState)(0),{before:a,after:o}=(0,T.useMemo)(()=>k(e),[e]);if(!e.rows)return(0,A.jsx)(N,{page:e,overview:t,onAction:n});let s=e.rows[r]||e.rows[0];return(0,A.jsxs)(`div`,{className:`detail-doc`,children:[(0,A.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,A.jsx)(`div`,{className:`markdown`,dangerouslySetInnerHTML:{__html:a}}),(0,A.jsxs)(`div`,{className:`docs-map`,children:[(0,A.jsx)(`ul`,{className:`map-tree`,"aria-label":`Pieces`,children:e.rows.map((e,t)=>(0,A.jsx)(`li`,{children:(0,A.jsxs)(`button`,{className:`map-node ${t===r?`on`:``}`,"aria-pressed":t===r,onClick:()=>i(t),children:[(0,A.jsx)(`span`,{className:`map-piece`,children:(0,A.jsx)(V,{text:e.piece})}),(0,A.jsx)(H,{kind:e.kind}),(0,A.jsx)(`span`,{className:`mono dim map-cost`,children:(0,A.jsx)(V,{text:e.cost})})]})},t))}),s&&(0,A.jsxs)(`div`,{className:`card pad-md map-detail`,"aria-live":`polite`,children:[(0,A.jsx)(`h3`,{style:{margin:`0 0 8px`},children:(0,A.jsx)(V,{text:s.piece})}),(0,A.jsx)(H,{kind:s.kind}),(0,A.jsxs)(`dl`,{children:[(0,A.jsx)(`dt`,{children:`Does`}),(0,A.jsx)(`dd`,{children:(0,A.jsx)(V,{text:s.does})}),(0,A.jsx)(`dt`,{children:`Costs`}),(0,A.jsx)(`dd`,{children:(0,A.jsx)(V,{text:s.cost})}),(0,A.jsx)(`dt`,{children:`Turn it off`}),(0,A.jsx)(`dd`,{children:(0,A.jsx)(V,{text:s.off})})]})]})]}),o.trim()&&(0,A.jsx)(`div`,{className:`markdown`,dangerouslySetInnerHTML:{__html:o}})]})}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({page:e,glossaryRows:t}){let n=e?.body,r=(0,T.useMemo)(()=>k(e).toc,[e]),i=(0,T.useMemo)(()=>K(n,t),[n,t]);return!r.length&&!i.length?null:(0,A.jsxs)(`aside`,{className:`docs-margin`,children:[r.length>0&&(0,A.jsxs)(`nav`,{className:`docs-toc`,"aria-label":`On this page`,children:[(0,A.jsx)(`div`,{className:`docs-toc-head`,children:`On this page`}),(0,A.jsx)(`ul`,{children:r.map(e=>(0,A.jsx)(`li`,{className:`lvl-${e.level}`,children:(0,A.jsx)(`a`,{href:`#${e.id}`,onClick:t=>{t.preventDefault(),q(e.id)},children:e.title})},e.id))})]}),i.length>0&&(0,A.jsxs)(`div`,{className:`docs-gloss`,children:[(0,A.jsx)(`div`,{className:`docs-toc-head`,children:`Terms on this page`}),i.map(e=>(0,A.jsxs)(`div`,{className:`docs-gloss-card`,children:[(0,A.jsx)(`b`,{children:e.themed||e.neutral||e.label}),(0,A.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,A.jsx)(`code`,{children:e.target},`t`)],[`Source root`,(0,A.jsx)(`code`,{children:e.root},`r`)],[`Installed build`,(0,A.jsx)(`code`,{children:t.installed_fp||`(none)`},`i`)],[`Source build`,(0,A.jsx)(`code`,{children:t.source_fp||`—`},`s`)],[`Match?`,t.verdict||`—`],[`License`,e.license]];return(0,A.jsxs)(`div`,{className:`detail-doc`,children:[(0,A.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,A.jsx)(`p`,{className:`sub`,style:{marginTop:4},children:`Live snapshot of the install behind this UI, plus where to go next.`}),(0,A.jsx)(`div`,{className:`card pad-md`,style:{marginTop:18},children:n.map(([e,t])=>(0,A.jsxs)(`div`,{className:`kv`,children:[(0,A.jsx)(`span`,{className:`k`,children:e}),(0,A.jsx)(`span`,{className:`v`,children:t??`—`})]},e))}),(0,A.jsxs)(`div`,{className:`row wrap gap-10`,style:{marginTop:18},children:[(0,A.jsxs)(`a`,{className:`btn ghost`,href:e.repo,target:`_blank`,rel:`noreferrer`,children:[(0,A.jsx)(d,{name:`external`}),e.repo_is_github?`GitHub repo`:`Source repo`]}),e.repo_is_github&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`a`,{className:`btn ghost`,href:`${e.repo}/issues`,target:`_blank`,rel:`noreferrer`,children:[(0,A.jsx)(d,{name:`external`}),`File an issue`]}),(0,A.jsxs)(`a`,{className:`btn ghost`,href:`${e.repo}/blob/main/LICENSE`,target:`_blank`,rel:`noreferrer`,children:[(0,A.jsx)(d,{name:`external`}),`License`]})]})]})]})}var X=encodeURIComponent,Z=e=>`#/docs/${X(e)}`;function Q(e){return e?.groups?.[0]?.pages?.[0]?.id||``}function ne({data:e,error:t,overview:n,onAction:r}){if(t)return(0,A.jsx)(a,{error:t,style:{margin:18}});if(!e)return(0,A.jsx)(l,{label:`Loading page…`});switch(e.kind){case`markdown`:case`concept`:return(0,A.jsx)(N,{page:e,overview:n,onAction:r});case`map`:return(0,A.jsx)(U,{page:e,overview:n,onAction:r});case`cli`:return(0,A.jsx)(R,{page:e});case`glossary`:return(0,A.jsx)(z,{page:e});case`about`:return(0,A.jsx)(Y,{page:e});default:return(0,A.jsxs)(`div`,{className:`empty`,children:[(0,A.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 re({page:e,overview:t,onAction:n}){let[u,d]=c(s(t?.emit)),{data:S,error:C}=o(()=>r.docs(u),[u]),w=e||Q(S),{data:E,error:D,loading:O}=o(()=>w?r.docsPage(w,u):Promise.resolve(null),[w,u]),{data:k}=o(()=>r.docsPage(`glossary`,u).catch(()=>null),[u],`docs:glossary`);(0,T.useEffect)(()=>{if(S&&w&&!S.groups.some(e=>e.pages.some(e=>e.id===w))){let e=Q(S);e&&e!==w&&window.location.replace(Z(e))}},[S,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=g(S,w),M=j.part||S?.groups?.[0]||null,N=M?.id===_;(0,T.useEffect)(()=>{N&&E?.id===w&&f(w)},[N,E,w]);let P=N?[...v(),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=ee(V),U=L===`all`?V:V.filter(e=>e.group===L),W=te(U,F);return C?(0,A.jsx)(a,{error:C}):(0,A.jsx)(`div`,{className:`docs-wrap`,children:(0,A.jsxs)(`div`,{className:`library docs-lib`,children:[(0,A.jsxs)(`aside`,{className:`lib-kinds`,"aria-label":`Docs parts`,children:[(0,A.jsxs)(`div`,{className:`lib-title`,children:[(0,A.jsx)(`h1`,{className:`h`,children:`Docs`}),(0,A.jsx)(`span`,{className:`dim`,children:`How it works, and how to use it`})]}),(0,A.jsx)(i,{"aria-label":`Harness`,children:m.map(e=>(0,A.jsx)(`button`,{className:u===e.id?`on`:``,onClick:()=>d(e.id),"aria-pressed":u===e.id,children:e.label},e.id))}),(0,A.jsx)(`nav`,{className:`kind-list`,"aria-label":`Parts`,children:(S?.groups||[]).map(e=>(0,A.jsxs)(T.Fragment,{children:[(0,A.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,A.jsx)(`span`,{className:`mono dim`,children:e.pages.length})]}),M?.id===e.id&&(0,A.jsx)(x,{label:`Sections`,total:V.length,cats:H,cat:L,onChange:R})]},e.id))})]}),(0,A.jsx)(y,{label:M?.label||`Docs`,count:F.trim()?`${W.length} of ${U.length}`:U.length||``,extra:N&&(0,A.jsx)(p,{pages:M.pages,seen:P}),q:F,onQ:I,matched:W.length,inView:[M?.id,w],children:S?(0,A.jsx)(b,{rows:W,activeName:w,hrefOf:e=>Z(e.name),pills:N?e=>P.includes(e.name)&&e.name!==w?(0,A.jsx)(`span`,{className:`docs-read-mark`,role:`img`,"aria-label":`, read`,children:`✓`}):null:void 0}):(0,A.jsx)(l,{label:`Loading docs…`})}),(0,A.jsxs)(`article`,{className:`lib-reader docs-reader`,"aria-label":`Page`,children:[j.page&&(0,A.jsxs)(`nav`,{className:`docs-crumbs mono`,"aria-label":`Breadcrumb`,children:[(0,A.jsx)(`a`,{href:Z(j.part.pages[0].id),children:j.part.label}),(0,A.jsx)(`span`,{"aria-hidden":`true`,children:`›`}),(0,A.jsx)(`a`,{href:Z(j.part.pages.find(e=>(e.section||`General`)===j.section).id),children:j.section}),(0,A.jsx)(`span`,{"aria-hidden":`true`,children:`›`}),(0,A.jsx)(`span`,{"aria-current":`page`,children:j.page.title})]}),(0,A.jsxs)(`div`,{className:`docs-read`,children:[(0,A.jsxs)(`div`,{className:`docs-article`,children:[(0,A.jsx)(ne,{data:O?null:E,error:D,overview:t,onAction:n},`${w}|${u}`),!O&&(0,A.jsx)(h,{menu:S,pageId:w})]}),!O&&(0,A.jsx)(J,{page:E,glossaryRows:k?.rows})]})]})]})})}export{re as default,$ as docRows};
@@ -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"./drawable-CUtqWN8k.js";import{n as i,r as a}from"./sections-ChwaobfW.js";import{B as o,R as s,U as c,et as l,lt as u,nt as d,ot as f,tt as p}from"./index-D7KB52Os.js";import{a as m,i as h,n as g,o as _,r as v}from"./Dashboard-CLs-bR_v.js";var y=e(t(),1),b=n(),x=12,S=[`#2BB673`,`#16A6A6`,`#E8A23B`,`#E07A5F`,`#8E7DBE`,`#5BD08A`,`#79856E`],C=650;function w({segments:e,size:t=186,stroke:n=26,caption:i=`capabilities`}){let a=e.reduce((e,t)=>e+t.value,0),o=a||1,s=(0,y.useRef)(null),c=e.map(e=>e.value).join(`,`);(0,y.useLayoutEffect)(()=>{let t=s.current?.querySelectorAll(`path`);if(!t?.length||!p())return;let n=e.filter(e=>e.value>0).map(e=>e.value/o),i=n.map((e,t)=>n.slice(0,t).reduce((e,t)=>e+t,0)),a=r(t);f(a,{draw:`0 0`});let c=u(a,{draw:[`0 0`,`0 1`],duration:(e,t)=>Math.max(C*n[t],60),delay:(e,t)=>C*i[t],ease:`linear`});return d(c,C)},[c]);let m=t/2-n/2,h=t/2,g=t/2,_=[],v=0;for(let t of e)_.push(v),v+=t.value;return(0,b.jsxs)(`svg`,{width:t,height:t,viewBox:`0 0 ${t} ${t}`,children:[(0,b.jsx)(`circle`,{cx:h,cy:g,r:m,fill:`none`,stroke:`var(--surface-3)`,strokeWidth:n}),(0,b.jsx)(`g`,{ref:s,children:e.map((e,t)=>{let r=e.value/o;if(r<=0)return null;let i=_[t]/o*2*Math.PI-Math.PI/2,a=(_[t]+e.value)/o*2*Math.PI-Math.PI/2,s=h+m*Math.cos(i),c=g+m*Math.sin(i),l=h+m*Math.cos(a),u=g+m*Math.sin(a),d=+(a-i>Math.PI),f=r>=.9999?`M ${s} ${c} A ${m} ${m} 0 1 1 ${2*h-s} ${2*g-c} A ${m} ${m} 0 1 1 ${s} ${c}`:`M ${s} ${c} A ${m} ${m} 0 ${d} 1 ${l} ${u}`;return(0,b.jsx)(`path`,{d:f,fill:`none`,stroke:e.color,strokeWidth:n,strokeLinecap:`butt`,children:(0,b.jsxs)(`title`,{children:[e.label,`: `,e.value]})},t)})}),(0,b.jsx)(`text`,{x:h,y:g-4,textAnchor:`middle`,className:`donut-c-num`,children:(0,b.jsx)(l,{value:a,duration:C})}),(0,b.jsx)(`text`,{x:h,y:g+16,textAnchor:`middle`,className:`donut-c-cap`,children:i})]})}function T(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 E({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=T(o),c=o[o.length-1],l=o[0],u=`${s} L${c[0]},${r} L${l[0]},${r} Z`;return(0,b.jsxs)(`svg`,{viewBox:`0 0 600 ${r}`,preserveAspectRatio:`none`,style:{width:`100%`,height:t,display:`block`,overflow:`visible`},children:[(0,b.jsx)(`defs`,{children:(0,b.jsxs)(`linearGradient`,{id:`b-grad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,b.jsx)(`stop`,{offset:`0`,stopColor:n,stopOpacity:`.28`}),(0,b.jsx)(`stop`,{offset:`1`,stopColor:n,stopOpacity:`0`})]})}),(0,b.jsx)(`path`,{d:u,fill:`url(#b-grad)`}),(0,b.jsx)(`path`,{d:s,fill:`none`,stroke:n,strokeWidth:`2`,strokeLinejoin:`round`,strokeLinecap:`round`,vectorEffect:`non-scaling-stroke`}),(0,b.jsx)(`circle`,{cx:c[0],cy:c[1],r:`3.5`,fill:n,vectorEffect:`non-scaling-stroke`})]})}function D({label:e,value:t,sub:n,color:r,icon:i}){return(0,b.jsxs)(`div`,{className:`b-tile`,children:[(0,b.jsx)(`span`,{className:`b-tile-ic`,style:{background:`color-mix(in srgb, ${r} 18%, transparent)`,color:r},children:(0,b.jsx)(s,{name:i})}),(0,b.jsxs)(`div`,{className:`b-tile-body`,children:[(0,b.jsx)(`div`,{className:`b-tile-val`+(t===0?` zero`:``),children:t}),(0,b.jsx)(`div`,{className:`b-tile-label`,children:e})]}),(0,b.jsx)(`div`,{className:`b-tile-sub`,children:n})]})}function O({overview:e,sigil:t,jobs:n,lens:r,onAction:u}){let d=e.counts||{},f=r?.doctor?.state||`loading`,p=r?.doctor?.data?.groups||[],y=f===`ok`,C=p.filter(e=>e.problems.length===0).length,T=p.length,O=v(e,r?.tone),k=_(n,x),A=o(e.diff),j=a.filter(e=>(d[e]||0)>0).map((e,t)=>({label:i[e].label,value:d[e]||0,color:S[t%S.length]})),M=j.reduce((e,t)=>e+t.value,0),N=h(n||[],10),P=N.reduce((e,t)=>e+t.v,0);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(`div`,{className:`b-greet`,children:[(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`div`,{className:`eyebrow`,children:`your harness`}),(0,b.jsx)(`h1`,{className:`h b-h`,children:O}),(0,b.jsx)(g,{verdict:r?.verdict}),(0,b.jsx)(`p`,{className:`sub`,children:t||`A friendly read of every layer growing in your harness.`})]}),(0,b.jsxs)(`div`,{className:`row gap-8`,children:[(0,b.jsxs)(`button`,{className:`btn`,onClick:()=>u(`update`),children:[(0,b.jsx)(s,{name:`refresh`}),`Update`]}),(0,b.jsxs)(`button`,{className:`btn ghost`,onClick:()=>u(`build-all`),children:[(0,b.jsx)(s,{name:`build`}),`Rebuild`]})]})]}),(0,b.jsxs)(`div`,{className:`grid b-hero-grid mb-16`,children:[(0,b.jsxs)(`div`,{className:`card b-hero`,children:[(0,b.jsx)(`div`,{className:`b-hero-ring`,children:(0,b.jsx)(w,{segments:[{label:`pass`,value:C,color:S[0]},{label:`attention`,value:Math.max(T-C,0),color:S[2]}],size:168,stroke:20,caption:`checks`})}),(0,b.jsxs)(`div`,{className:`b-hero-side`,children:[(0,b.jsx)(`h3`,{className:`b-hero-title`,children:y?`${C} of ${T} checks pass`:f===`failed`?`Doctor did not answer`:`Checking…`}),f===`failed`&&(0,b.jsxs)(`button`,{className:`btn ghost b-hero-retry`,onClick:()=>u(`doctor`),children:[(0,b.jsx)(s,{name:`doctor`}),`Run doctor`]}),(0,b.jsxs)(`p`,{className:`sub`,children:[`One source, rendered into `,(0,b.jsx)(`code`,{children:e.target}),` and inherited by every repo on this machine.`]}),y&&(0,b.jsx)(`ul`,{className:`b-hero-checks`,children:p.map(e=>{let t=e.problems.length===0;return(0,b.jsxs)(`li`,{className:`b-hcheck ${t?`ok`:`bad`}`,title:t?`clean`:e.problems.join(`; `),children:[(0,b.jsx)(`span`,{className:`b-hcheck-mark`,children:t?`✓`:`!`}),(0,b.jsx)(`span`,{className:`b-hcheck-label`,children:e.label})]},e.label)})}),(0,b.jsxs)(`div`,{className:`b-chips`,children:[(0,b.jsxs)(`span`,{className:`b-chip`,children:[(0,b.jsx)(`b`,{style:{textTransform:`capitalize`},children:e.theme}),` voice`]}),(0,b.jsx)(`span`,{className:`b-chip`,children:(0,b.jsx)(`b`,{children:e.emit})}),(0,b.jsxs)(`span`,{className:`b-chip`,children:[`built `,(0,b.jsx)(`b`,{children:e.build_time||`unknown`})]})]})]})]}),(0,b.jsxs)(`div`,{className:`b-tiles`,children:[(0,b.jsx)(D,{label:`Agents`,value:d.agents??`—`,sub:`specialists`,color:S[0],icon:`layers`}),(0,b.jsx)(D,{label:`Skills`,value:d.skills??`—`,sub:`workflows`,color:S[1],icon:`skill`}),(0,b.jsx)(D,{label:`Dictates`,value:d.laws??`—`,sub:d.doctrines?`${d.doctrines.active}/${d.doctrines.total} packs · ${d.doctrines.rules} rules`:`all upheld`,color:S[2],icon:`law`}),(0,b.jsx)(D,{label:`Edits`,value:A,sub:`to graft`,color:S[3],icon:`changes`})]})]}),(0,b.jsxs)(`div`,{className:`grid split-even mb-16`,children:[(0,b.jsxs)(`div`,{className:`card pad-lg b-mix-card`,children:[(0,b.jsxs)(`div`,{className:`card-head`,children:[(0,b.jsx)(`h3`,{children:`Capability mix`}),(0,b.jsx)(`div`,{className:`right`,children:(0,b.jsxs)(`span`,{className:`tick`,children:[M,` total`]})})]}),(0,b.jsxs)(`div`,{className:`b-mix`,children:[(0,b.jsx)(w,{segments:j,size:186,stroke:26}),(0,b.jsx)(`div`,{className:`b-legend`,children:j.map(e=>(0,b.jsxs)(`div`,{className:`b-leg-row`,children:[(0,b.jsx)(`span`,{className:`b-leg-dot`,style:{background:e.color}}),(0,b.jsx)(`span`,{className:`b-leg-name`,children:e.label}),(0,b.jsx)(`span`,{className:`b-leg-bar`,children:(0,b.jsx)(`i`,{style:{width:`${e.value/M*100}%`,background:e.color}})}),(0,b.jsx)(`span`,{className:`b-leg-val`,children:e.value})]},e.label))})]})]}),(0,b.jsxs)(`div`,{className:`card pad-lg`,children:[(0,b.jsxs)(`div`,{className:`card-head`,children:[(0,b.jsx)(`h3`,{children:`Recent runs`}),(0,b.jsx)(`div`,{className:`right`,children:(0,b.jsxs)(`span`,{className:`badge ok`,children:[(0,b.jsx)(`span`,{className:`dot`}),`job log`]})})]}),(0,b.jsxs)(`div`,{className:`b-stat-lead`,children:[(0,b.jsx)(`span`,{className:`b-stat-big`,children:(0,b.jsx)(l,{value:P})}),(0,b.jsxs)(`span`,{className:`b-stat-cap`,children:[`runs in the last 10 days`,y&&T>0&&` · ${C}/${T} checks pass now`]})]}),(0,b.jsx)(E,{data:N,accent:S[0],height:156})]})]}),(0,b.jsxs)(`div`,{className:`card pad-lg`,children:[(0,b.jsxs)(`div`,{className:`card-head`,children:[(0,b.jsx)(`h3`,{children:`Recent activity`}),(0,b.jsx)(`div`,{className:`right`,children:(0,b.jsxs)(`span`,{className:`tick`,children:[`last `,k.length,` runs`]})})]}),(0,b.jsxs)(`div`,{className:`b-timeline`,children:[k.map(e=>{let t=e.status===`done`,n=e.status===`failed`?`warn`:t?`ok`:`acc`,r=m(e);return(0,b.jsxs)(`div`,{className:`b-tl-row`,children:[(0,b.jsx)(`span`,{className:`b-tl-node ${n}`}),(0,b.jsxs)(`div`,{className:`b-tl-body`,title:r.command||void 0,children:[(0,b.jsx)(`b`,{children:r.verb}),[r.scope,r.result,r.duration].map(e=>e?` · ${e}`:``).join(``)]}),(0,b.jsx)(`span`,{className:`b-tl-when`,children:e.started?`${c(e.started)} ago`:`—`})]},e.id)}),(!n||n.length===0)&&(0,b.jsxs)(`div`,{className:`b-tl-row`,children:[(0,b.jsx)(`span`,{className:`b-tl-node`}),(0,b.jsx)(`div`,{className:`b-tl-body sub`,children:`No runs yet. Trigger an action to populate this.`}),(0,b.jsx)(`span`,{className:`b-tl-when`,children:`—`})]})]})]})]})}export{O as default};
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"./drawable-CuQpH-f5.js";import{n as i,r as a}from"./sections-ChwaobfW.js";import{B as o,R as s,U as c,et as l,lt as u,nt as d,ot as f,tt as p}from"./index--3760QWr.js";import{a as m,i as h,n as g,o as _,r as v}from"./Dashboard-Ds7_blrK.js";var y=e(t(),1),b=n(),x=12,S=[`#2BB673`,`#16A6A6`,`#E8A23B`,`#E07A5F`,`#8E7DBE`,`#5BD08A`,`#79856E`],C=650;function w({segments:e,size:t=186,stroke:n=26,caption:i=`capabilities`}){let a=e.reduce((e,t)=>e+t.value,0),o=a||1,s=(0,y.useRef)(null),c=e.map(e=>e.value).join(`,`);(0,y.useLayoutEffect)(()=>{let t=s.current?.querySelectorAll(`path`);if(!t?.length||!p())return;let n=e.filter(e=>e.value>0).map(e=>e.value/o),i=n.map((e,t)=>n.slice(0,t).reduce((e,t)=>e+t,0)),a=r(t);f(a,{draw:`0 0`});let c=u(a,{draw:[`0 0`,`0 1`],duration:(e,t)=>Math.max(C*n[t],60),delay:(e,t)=>C*i[t],ease:`linear`});return d(c,C)},[c]);let m=t/2-n/2,h=t/2,g=t/2,_=[],v=0;for(let t of e)_.push(v),v+=t.value;return(0,b.jsxs)(`svg`,{width:t,height:t,viewBox:`0 0 ${t} ${t}`,children:[(0,b.jsx)(`circle`,{cx:h,cy:g,r:m,fill:`none`,stroke:`var(--surface-3)`,strokeWidth:n}),(0,b.jsx)(`g`,{ref:s,children:e.map((e,t)=>{let r=e.value/o;if(r<=0)return null;let i=_[t]/o*2*Math.PI-Math.PI/2,a=(_[t]+e.value)/o*2*Math.PI-Math.PI/2,s=h+m*Math.cos(i),c=g+m*Math.sin(i),l=h+m*Math.cos(a),u=g+m*Math.sin(a),d=+(a-i>Math.PI),f=r>=.9999?`M ${s} ${c} A ${m} ${m} 0 1 1 ${2*h-s} ${2*g-c} A ${m} ${m} 0 1 1 ${s} ${c}`:`M ${s} ${c} A ${m} ${m} 0 ${d} 1 ${l} ${u}`;return(0,b.jsx)(`path`,{d:f,fill:`none`,stroke:e.color,strokeWidth:n,strokeLinecap:`butt`,children:(0,b.jsxs)(`title`,{children:[e.label,`: `,e.value]})},t)})}),(0,b.jsx)(`text`,{x:h,y:g-4,textAnchor:`middle`,className:`donut-c-num`,children:(0,b.jsx)(l,{value:a,duration:C})}),(0,b.jsx)(`text`,{x:h,y:g+16,textAnchor:`middle`,className:`donut-c-cap`,children:i})]})}function T(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 E({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=T(o),c=o[o.length-1],l=o[0],u=`${s} L${c[0]},${r} L${l[0]},${r} Z`;return(0,b.jsxs)(`svg`,{viewBox:`0 0 600 ${r}`,preserveAspectRatio:`none`,style:{width:`100%`,height:t,display:`block`,overflow:`visible`},children:[(0,b.jsx)(`defs`,{children:(0,b.jsxs)(`linearGradient`,{id:`b-grad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,b.jsx)(`stop`,{offset:`0`,stopColor:n,stopOpacity:`.28`}),(0,b.jsx)(`stop`,{offset:`1`,stopColor:n,stopOpacity:`0`})]})}),(0,b.jsx)(`path`,{d:u,fill:`url(#b-grad)`}),(0,b.jsx)(`path`,{d:s,fill:`none`,stroke:n,strokeWidth:`2`,strokeLinejoin:`round`,strokeLinecap:`round`,vectorEffect:`non-scaling-stroke`}),(0,b.jsx)(`circle`,{cx:c[0],cy:c[1],r:`3.5`,fill:n,vectorEffect:`non-scaling-stroke`})]})}function D({label:e,value:t,sub:n,color:r,icon:i}){return(0,b.jsxs)(`div`,{className:`b-tile`,children:[(0,b.jsx)(`span`,{className:`b-tile-ic`,style:{background:`color-mix(in srgb, ${r} 18%, transparent)`,color:r},children:(0,b.jsx)(s,{name:i})}),(0,b.jsxs)(`div`,{className:`b-tile-body`,children:[(0,b.jsx)(`div`,{className:`b-tile-val`+(t===0?` zero`:``),children:t}),(0,b.jsx)(`div`,{className:`b-tile-label`,children:e})]}),(0,b.jsx)(`div`,{className:`b-tile-sub`,children:n})]})}function O({overview:e,sigil:t,jobs:n,lens:r,onAction:u}){let d=e.counts||{},f=r?.doctor?.state||`loading`,p=r?.doctor?.data?.groups||[],y=f===`ok`,C=p.filter(e=>e.problems.length===0).length,T=p.length,O=v(e,r?.tone),k=_(n,x),A=o(e.diff),j=a.filter(e=>(d[e]||0)>0).map((e,t)=>({label:i[e].label,value:d[e]||0,color:S[t%S.length]})),M=j.reduce((e,t)=>e+t.value,0),N=h(n||[],10),P=N.reduce((e,t)=>e+t.v,0);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(`div`,{className:`b-greet`,children:[(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`div`,{className:`eyebrow`,children:`your harness`}),(0,b.jsx)(`h1`,{className:`h b-h`,children:O}),(0,b.jsx)(g,{verdict:r?.verdict}),(0,b.jsx)(`p`,{className:`sub`,children:t||`A friendly read of every layer growing in your harness.`})]}),(0,b.jsxs)(`div`,{className:`row gap-8`,children:[(0,b.jsxs)(`button`,{className:`btn`,onClick:()=>u(`update`),children:[(0,b.jsx)(s,{name:`refresh`}),`Update`]}),(0,b.jsxs)(`button`,{className:`btn ghost`,onClick:()=>u(`build-all`),children:[(0,b.jsx)(s,{name:`build`}),`Rebuild`]})]})]}),(0,b.jsxs)(`div`,{className:`grid b-hero-grid mb-16`,children:[(0,b.jsxs)(`div`,{className:`card b-hero`,children:[(0,b.jsx)(`div`,{className:`b-hero-ring`,children:(0,b.jsx)(w,{segments:[{label:`pass`,value:C,color:S[0]},{label:`attention`,value:Math.max(T-C,0),color:S[2]}],size:168,stroke:20,caption:`checks`})}),(0,b.jsxs)(`div`,{className:`b-hero-side`,children:[(0,b.jsx)(`h3`,{className:`b-hero-title`,children:y?`${C} of ${T} checks pass`:f===`failed`?`Doctor did not answer`:`Checking…`}),f===`failed`&&(0,b.jsxs)(`button`,{className:`btn ghost b-hero-retry`,onClick:()=>u(`doctor`),children:[(0,b.jsx)(s,{name:`doctor`}),`Run doctor`]}),(0,b.jsxs)(`p`,{className:`sub`,children:[`One source, rendered into `,(0,b.jsx)(`code`,{children:e.target}),` and inherited by every repo on this machine.`]}),y&&(0,b.jsx)(`ul`,{className:`b-hero-checks`,children:p.map(e=>{let t=e.problems.length===0;return(0,b.jsxs)(`li`,{className:`b-hcheck ${t?`ok`:`bad`}`,title:t?`clean`:e.problems.join(`; `),children:[(0,b.jsx)(`span`,{className:`b-hcheck-mark`,children:t?`✓`:`!`}),(0,b.jsx)(`span`,{className:`b-hcheck-label`,children:e.label})]},e.label)})}),(0,b.jsxs)(`div`,{className:`b-chips`,children:[(0,b.jsxs)(`span`,{className:`b-chip`,children:[(0,b.jsx)(`b`,{style:{textTransform:`capitalize`},children:e.theme}),` voice`]}),(0,b.jsx)(`span`,{className:`b-chip`,children:(0,b.jsx)(`b`,{children:e.emit})}),(0,b.jsxs)(`span`,{className:`b-chip`,children:[`built `,(0,b.jsx)(`b`,{children:e.build_time||`unknown`})]})]})]})]}),(0,b.jsxs)(`div`,{className:`b-tiles`,children:[(0,b.jsx)(D,{label:`Agents`,value:d.agents??`—`,sub:`specialists`,color:S[0],icon:`layers`}),(0,b.jsx)(D,{label:`Skills`,value:d.skills??`—`,sub:`workflows`,color:S[1],icon:`skill`}),(0,b.jsx)(D,{label:`Dictates`,value:d.laws??`—`,sub:d.doctrines?`${d.doctrines.active}/${d.doctrines.total} packs · ${d.doctrines.rules} rules`:`all upheld`,color:S[2],icon:`law`}),(0,b.jsx)(D,{label:`Edits`,value:A,sub:`to graft`,color:S[3],icon:`changes`})]})]}),(0,b.jsxs)(`div`,{className:`grid split-even mb-16`,children:[(0,b.jsxs)(`div`,{className:`card pad-lg b-mix-card`,children:[(0,b.jsxs)(`div`,{className:`card-head`,children:[(0,b.jsx)(`h3`,{children:`Capability mix`}),(0,b.jsx)(`div`,{className:`right`,children:(0,b.jsxs)(`span`,{className:`tick`,children:[M,` total`]})})]}),(0,b.jsxs)(`div`,{className:`b-mix`,children:[(0,b.jsx)(w,{segments:j,size:186,stroke:26}),(0,b.jsx)(`div`,{className:`b-legend`,children:j.map(e=>(0,b.jsxs)(`div`,{className:`b-leg-row`,children:[(0,b.jsx)(`span`,{className:`b-leg-dot`,style:{background:e.color}}),(0,b.jsx)(`span`,{className:`b-leg-name`,children:e.label}),(0,b.jsx)(`span`,{className:`b-leg-bar`,children:(0,b.jsx)(`i`,{style:{width:`${e.value/M*100}%`,background:e.color}})}),(0,b.jsx)(`span`,{className:`b-leg-val`,children:e.value})]},e.label))})]})]}),(0,b.jsxs)(`div`,{className:`card pad-lg`,children:[(0,b.jsxs)(`div`,{className:`card-head`,children:[(0,b.jsx)(`h3`,{children:`Recent runs`}),(0,b.jsx)(`div`,{className:`right`,children:(0,b.jsxs)(`span`,{className:`badge ok`,children:[(0,b.jsx)(`span`,{className:`dot`}),`job log`]})})]}),(0,b.jsxs)(`div`,{className:`b-stat-lead`,children:[(0,b.jsx)(`span`,{className:`b-stat-big`,children:(0,b.jsx)(l,{value:P})}),(0,b.jsxs)(`span`,{className:`b-stat-cap`,children:[`runs in the last 10 days`,y&&T>0&&` · ${C}/${T} checks pass now`]})]}),(0,b.jsx)(E,{data:N,accent:S[0],height:156})]})]}),(0,b.jsxs)(`div`,{className:`card pad-lg`,children:[(0,b.jsxs)(`div`,{className:`card-head`,children:[(0,b.jsx)(`h3`,{children:`Recent activity`}),(0,b.jsx)(`div`,{className:`right`,children:(0,b.jsxs)(`span`,{className:`tick`,children:[`last `,k.length,` runs`]})})]}),(0,b.jsxs)(`div`,{className:`b-timeline`,children:[k.map(e=>{let t=e.status===`done`,n=e.status===`failed`?`warn`:t?`ok`:`acc`,r=m(e);return(0,b.jsxs)(`div`,{className:`b-tl-row`,children:[(0,b.jsx)(`span`,{className:`b-tl-node ${n}`}),(0,b.jsxs)(`div`,{className:`b-tl-body`,title:r.command||void 0,children:[(0,b.jsx)(`b`,{children:r.verb}),[r.scope,r.result,r.duration].map(e=>e?` · ${e}`:``).join(``)]}),(0,b.jsx)(`span`,{className:`b-tl-when`,children:e.started?`${c(e.started)} ago`:`—`})]},e.id)}),(!n||n.length===0)&&(0,b.jsxs)(`div`,{className:`b-tl-row`,children:[(0,b.jsx)(`span`,{className:`b-tl-node`}),(0,b.jsx)(`div`,{className:`b-tl-body sub`,children:`No runs yet. Trigger an action to populate this.`}),(0,b.jsx)(`span`,{className:`b-tl-when`,children:`—`})]})]})]})]})}export{O as default};
@@ -1,3 +1,3 @@
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{A as i,D as a,F as o,G as s,I as c,J as l,K as u,L as d,O as f,P as p,R as m,T as h,Y as g,k as _,q as v,z as y}from"./index-D7KB52Os.js";import{t as b}from"./Tabs-u5wJjzu8.js";import{a as x,c as S,n as C,o as w,r as T,s as E,t as D}from"./KitApply-BllCOBIp.js";var O=e(t(),1),k=n();function A({host:e,theme:t,options:n,onAction:i,onClose:a,onNote:s}){let[c,l]=(0,O.useState)({path:``,host:e,theme:t,footprint:`full`,posture:`peer`,mode:`direct`,trust:`balanced`}),[u,d]=(0,O.useState)(!1),f=(e,t)=>l(n=>({...n,[e]:t})),m=async()=>{d(!0),s(``);try{let e=await r.pickFolder();e.path?f(`path`,e.path):e.error&&s(e.error)}catch(e){s(e.message)}finally{d(!1)}},h=async()=>{let e=c.path.trim();if(!e){s(`Choose or type a folder to deploy into.`);return}s(``),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,k.jsxs)(`div`,{className:`deploy-pop`,children:[(0,k.jsxs)(`div`,{className:`dp-row`,children:[(0,k.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,k.jsx)(`button`,{className:`btn ghost sm`,disabled:u,onClick:m,children:u?`Choosing…`:`Browse…`})]}),(0,k.jsxs)(`div`,{className:`dp-row`,children:[(0,k.jsxs)(`label`,{className:`dp-field`,children:[(0,k.jsx)(`span`,{children:`Deploy as`}),(0,k.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,k.jsx)(`option`,{value:e.id,children:e.label},e.id))})]}),(0,k.jsx)(E,{value:c,options:n,onChange:f,who:`the new harness`}),(0,k.jsx)(`button`,{className:`btn sm`,onClick:h,children:`Deploy`}),(0,k.jsx)(`button`,{className:`btn ghost sm`,onClick:a,children:`Cancel`})]}),(0,k.jsxs)(`p`,{className:`sub dp-note`,children:[`Adds a per-repo harness (`,(0,k.jsx)(`code`,{children:o(c.host).deployAdds}),`) into the folder, non-destructively. It’s then tracked here even after you leave its directory.`]})]})}function j(){let{data:e,error:t,reload:n}=s(()=>r.excludes(),[]),[i,a]=(0,O.useState)(!1),[o,c]=(0,O.useState)([]),l=async(e,t)=>{a(!0);try{let n=await r.excludeMutate(e,t);c(n.messages||[])}catch(e){c(e.body?.messages||[e.message])}finally{a(!1),n()}};return t||!e?.installs?.length?null:(0,k.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,k.jsx)(`div`,{className:`card-head`,children:(0,k.jsx)(`h3`,{children:`Excluded folders`})}),(0,k.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,k.jsxs)(`div`,{className:`row wrap between gap-12`,children:[(0,k.jsx)(`code`,{children:e.path}),(0,k.jsxs)(`span`,{className:`mono muted`,children:[`[`,e.hosts.join(`, `),`]`]}),(0,k.jsx)(`button`,{className:`btn ghost sm`,disabled:i,onClick:()=>l(`remove`,e.path),children:`Remove`})]},e.path)),(0,k.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&&c([e.error])}catch(e){c([e.message])}finally{a(!1)}},children:[(0,k.jsx)(m,{name:`folder`}),` Exclude a folder…`]}),o.map((e,t)=>(0,k.jsx)(`p`,{className:`sub`,children:e},t))]})}function M({inst:e,memory:t,busy:n,onMemory:r,onRemove:i,onCancel:a}){return(0,k.jsxs)(`div`,{className:`h-remove`,children:[(0,k.jsxs)(`p`,{className:`hr-msg`,children:[(0,k.jsx)(`strong`,{children:e.scope===`project`?`Remove this harness from the folder?`:`Remove the global ${e.host} install?`}),` `,(0,k.jsxs)(`span`,{className:`sub`,children:[`Deletes `,(0,k.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,k.jsxs)(`label`,{className:`field`,children:[(0,k.jsx)(`span`,{children:`Memory and notebook`}),(0,k.jsxs)(`select`,{className:`sel`,"aria-label":`memory disposition`,value:t,onChange:e=>r(e.target.value),children:[(0,k.jsx)(`option`,{value:`keep`,children:`keep in place`}),(0,k.jsx)(`option`,{value:`archive`,children:`archive aside`}),(0,k.jsx)(`option`,{value:`delete`,children:`delete too`})]})]}),(0,k.jsxs)(`div`,{className:`row gap-8`,children:[(0,k.jsx)(`button`,{type:`button`,className:`btn danger`,disabled:n,onClick:i,children:n?`Removing…`:`Remove`}),(0,k.jsx)(`button`,{type:`button`,className:`btn ghost`,onClick:a,children:`Cancel`})]})]})}function N({targets:e,onReveal:t}){let n=e.flatMap(e=>e.servers);return(0,k.jsxs)(`div`,{className:`ip-block`,children:[(0,k.jsxs)(`span`,{className:`ip-label`,children:[`MCP servers `,(0,k.jsx)(`span`,{className:`mono dim`,children:n.length})]}),e.map(e=>(0,k.jsxs)(`div`,{className:`mcp-target`,children:[(0,k.jsxs)(`div`,{className:`mt-head`,children:[(0,k.jsx)(`code`,{title:e.path,children:e.label}),(0,k.jsx)(`button`,{type:`button`,className:`btn ghost sm`,onClick:()=>t(e),title:`Open the folder holding ${e.path} to edit it`,children:`Open folder`})]}),e.servers.length?e.servers.map(e=>(0,k.jsxs)(`div`,{className:`mcp-row`,children:[(0,k.jsx)(`span`,{className:`mono`,children:e.name}),(0,k.jsx)(`span`,{className:`tag ${e.state===`enabled`?`ok`:`warn`}`,children:e.state===`enabled`?`Enabled`:`Disabled`})]},e.name)):(0,k.jsx)(`p`,{className:`sub`,children:`None configured in this file.`})]},e.path))]})}var P={active:[`Active`,`ok`],disabled:[`Disabled`,`warn`],absent:[`Not installed`,``]};function F({inst:e,targets:t,choice:n,unchanged:r,options:i,onPick:a,canAct:s,busy:l,removing:u,onRemoving:d,onApply:f,onToggleInstall:p,onRemove:m,onRevealMcp:h}){let g=`${e.host} · ${e.scope}`,[_,v]=P[e.state]||P.absent,y=e.state===`active`,b=e.state===`absent`;return(0,k.jsxs)(`aside`,{className:`install-panel`,"aria-label":`${g} install`,children:[(0,k.jsx)(`span`,{className:`ip-eyebrow`,children:`Selected install`}),(0,k.jsxs)(`div`,{className:`ip-head`,children:[(0,k.jsx)(`h2`,{children:c(e)}),(0,k.jsx)(`span`,{className:`tag ${v}`,children:_})]}),(0,k.jsx)(`span`,{className:`ip-kind`,children:e.scope===`global`?`Global install`:`Per-project install · ${o(e.host).label}`}),(0,k.jsx)(`code`,{className:`ip-path`,children:e.path}),b?(0,k.jsxs)(`p`,{className:`sub`,children:[`Install Geneseed here as `,(0,k.jsx)(`strong`,{children:e.host}),`. Files are added non-destructively; deactivate or uninstall later.`]}):null,(y||b)&&s?(0,k.jsx)(`div`,{className:`ip-picks`,children:(0,k.jsx)(E,{value:n,options:i,onChange:a,who:g})}):null,y&&t.length?(0,k.jsx)(N,{targets:t,onReveal:h}):null,y&&e.scope===`global`?(0,k.jsx)(j,{}):null,b?null:(0,k.jsxs)(`label`,{className:`ip-switch`,children:[(0,k.jsx)(S,{on:y,disabled:l,label:`activate ${g}`,onToggle:p}),(0,k.jsx)(`span`,{children:y?`Active: loads in every session`:`Disabled: files moved aside`})]}),(0,k.jsx)(`div`,{className:`ip-spacer`}),s?(0,k.jsxs)(`div`,{className:`ip-actions`,children:[b?(0,k.jsx)(`button`,{type:`button`,className:`btn`,onClick:f,children:`Install`}):y?(0,k.jsx)(`button`,{type:`button`,className:`btn`,disabled:r,onClick:f,children:`Apply and rebuild`}):null,b?null:(0,k.jsx)(`button`,{type:`button`,className:`btn ghost danger-line`,"aria-label":`remove ${g} from ${e.path}`,"aria-expanded":!!u,disabled:l,onClick:()=>d(u?null:{memory:`keep`}),children:`Uninstall…`})]}):null,u?(0,k.jsx)(M,{inst:e,memory:u.memory,busy:l,onMemory:e=>d({memory:e}),onRemove:m,onCancel:()=>d(null)}):null]})}var I=(e,t)=>`${e} ${t}`,L={active:[`Active`,`ok`],disabled:[`Disabled`,`warn`]};function R({rows:e,project:t,currentId:n,onPick:r,label:i}){return(0,k.jsx)(`div`,{className:`tbl-scroll`,children:(0,k.jsxs)(`table`,{className:`tbl hosts-tbl`,"aria-label":i,children:[(0,k.jsx)(`thead`,{children:(0,k.jsxs)(`tr`,{children:[(0,k.jsx)(`th`,{children:t?`Project`:`Host`}),(0,k.jsx)(`th`,{children:t?`Host`:`Path`}),(0,k.jsx)(`th`,{children:`Voice`}),(0,k.jsx)(`th`,{children:`Footprint`}),(0,k.jsx)(`th`,{children:`State`}),(0,k.jsx)(`th`,{children:(0,k.jsx)(`span`,{className:`sr-only`,children:`Selected`})})]})}),(0,k.jsx)(`tbody`,{children:e.map(e=>{let[i,a]=L[e.state]||[`Not installed`,``],s=n===e.id,l=e.state===`absent`;return(0,k.jsxs)(`tr`,{className:`pickable${s?` on`:``}${l?` quiet`:``}`,onClick:()=>r(e.id),children:[(0,k.jsx)(`td`,{children:(0,k.jsx)(`button`,{type:`button`,className:`row-pick`,"aria-pressed":s,title:e.path,onClick:()=>r(e.id),children:c(e)})}),t?(0,k.jsx)(`td`,{children:o(e.host).label}):(0,k.jsx)(`td`,{className:`mono path-cell`,title:e.path,children:e.path}),(0,k.jsx)(`td`,{children:l?``:e.theme||``}),(0,k.jsx)(`td`,{children:l?``:e.footprint||``}),(0,k.jsx)(`td`,{children:(0,k.jsx)(`span`,{className:`tag ${a}`,children:i})}),(0,k.jsx)(`td`,{className:`pick-mark`,children:s?`Editing ›`:``})]},e.id)})})]})})}function z({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,k.jsxs)(`details`,{className:`panel voice-ref`,children:[(0,k.jsxs)(`summary`,{children:[(0,k.jsx)(`span`,{className:`vr-title`,children:`Voices`}),(0,k.jsxs)(`span`,{className:`mono dim`,children:[e.length,` to choose from, set per install`]})]}),(0,k.jsx)(`div`,{className:`vr-list`,children:n.map(e=>(0,k.jsxs)(`div`,{className:`voice-row${e.name===t?` current`:``}`,children:[(0,k.jsx)(`span`,{className:`vr-name`,children:e.name}),(0,k.jsx)(`span`,{className:`vr-desc`,children:e.tagline?`“${e.tagline}”`:e.blurb})]},e.name))})]})}function ee({setup:e,overview:t}){if(!e)return null;let n=e.installed_fp&&e.installed_fp===e.source_fp;return(0,k.jsxs)(`section`,{className:`panel`,"aria-labelledby":`checkout-h`,children:[(0,k.jsxs)(`div`,{className:`panel-head`,children:[(0,k.jsx)(`h2`,{id:`checkout-h`,children:`This checkout`}),(0,k.jsx)(`span`,{className:`mono ${n?`t-good`:`t-warn`}`,children:e.version_verdict})]}),(0,k.jsxs)(`dl`,{className:`kv-grid`,children:[(0,k.jsx)(`dt`,{children:`Source`}),(0,k.jsx)(`dd`,{className:`mono`,children:e.root}),(0,k.jsx)(`dt`,{children:`Version`}),(0,k.jsx)(`dd`,{className:`mono`,children:t?.version||`unknown`}),(0,k.jsx)(`dt`,{children:`Fingerprint`}),(0,k.jsx)(`dd`,{className:`mono`,children:e.source_fp})]})]})}function B({onAction:e,themes:t=[],currentTheme:n,overview:i,setup:o,dataRev:c,onMutated:l}){let u=h(),{data:d,error:p}=s(()=>r.installs(),[c]),{data:g,error:_}=s(()=>r.mcp(),[c]),[v,y]=(0,O.useState)(``),[b,x]=(0,O.useState)(``),[S,C]=(0,O.useState)({}),[T,E]=(0,O.useState)(!1),[D,j]=(0,O.useState)(null),[M,N]=(0,O.useState)(``),P=(0,O.useMemo)(()=>{let e={};for(let t of g?.targets||[]){let n=I(t.host||`opencode`,t.root);(e[n]||(e[n]=[])).push(t)}return e},[g]);if(p||_)return(0,k.jsx)(a,{error:p||_});if(!d||!g)return(0,k.jsx)(f,{});let L={active:0,disabled:1,absent:2},B=[...d.installs].sort((e,t)=>(e.scope===`global`?0:1)-(t.scope===`global`?0:1)||(L[e.state]??3)-(L[t.state]??3)),V=B.find(e=>e.id===M)||B.find(e=>e.selected)||B.find(e=>e.state===`active`)||B[0],H=e=>{let t=S[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`}},U=(e,t,n)=>C(r=>({...r,[e.id]:{...r[e.id],[t]:n}})),W=e=>{let t=H(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`)},G={theme:t.map(e=>e.name),footprint:w,posture:d.postures||[],mode:d.modes||[],trust:d.trusts||[]},K=async t=>{let{theme:n,footprint:r,posture:i,mode:a,trust:o}=H(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 u(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})},q=async e=>{if(e.state!==`active`||await u(`Deactivate this install? Files are moved aside, not deleted; reactivate any time.`,{title:`Deactivate this install?`,confirmLabel:`Deactivate`})){x(e.id),y(``);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(`, `):``;y(t.error||e&&`unrestored: ${e}`||`action failed`);return}l?.()}catch(e){y(e.message)}finally{x(``)}}},J=async()=>{let e=D;if(e){x(e.id),y(``);try{let t=await r.installRemove(e.host,e.path,e.memory);if(!t.ok){y(t.error||`remove failed`);return}j(null),t.kept?.length&&y(`Removed. Kept ${t.kept.length} file(s) you edited: ${t.kept.join(`, `)} — they are yours now (the CLI geneseed uninstall --force deletes edited files too).`),l?.()}catch(e){y(e.message)}finally{x(``)}}},Y=async e=>{y(``);try{let t=await r.mcpReveal(e.path);y(`Opening ${t.dir}. If no window appeared, open that folder by hand.`)}catch(e){y(e.message)}},X=B.find(e=>e.selected)?.host||B.find(e=>e.state===`active`)?.host||B[0]?.host||`opencode`,Z=B.filter(e=>e.scope===`global`),Q=B.filter(e=>e.scope!==`global`),$=e=>{N(e),j(null)};return(0,k.jsxs)(`div`,{className:`hosts`,children:[(0,k.jsxs)(`div`,{className:`hosts-main`,children:[(0,k.jsxs)(`div`,{className:`toolbar`,children:[(0,k.jsxs)(`span`,{className:`dim`,children:[B.filter(e=>e.state===`active`).length,` active of `,B.length,` `,`detected.`]}),e?(0,k.jsx)(`div`,{className:`row gap-8`,children:(0,k.jsxs)(`button`,{type:`button`,className:`btn ghost`,onClick:()=>e(`build-all`),children:[(0,k.jsx)(m,{name:`refresh`}),` Rebuild all`]})}):null]}),v?(0,k.jsx)(`p`,{className:`tag bad note`,role:`status`,children:v}):null,(0,k.jsxs)(`section`,{className:`panel flush`,"aria-labelledby":`inst-global`,children:[(0,k.jsx)(`div`,{className:`inst-head`,children:(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h2`,{id:`inst-global`,children:`Global installs`}),(0,k.jsx)(`p`,{className:`dim`,children:`One per tool. Loaded in every folder, except excluded ones.`})]})}),(0,k.jsx)(R,{rows:Z,currentId:V?.id,onPick:$,label:`Global installs`})]}),(0,k.jsxs)(`section`,{className:`panel flush`,"aria-labelledby":`inst-project`,children:[(0,k.jsxs)(`div`,{className:`inst-head`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h2`,{id:`inst-project`,children:`Per-project installs`}),(0,k.jsx)(`p`,{className:`dim`,children:`A repo with its own harness. Inside it, only that harness loads.`})]}),e?(0,k.jsxs)(`button`,{type:`button`,className:`btn ghost`,onClick:()=>E(e=>!e),children:[(0,k.jsx)(m,{name:`folder`}),` Deploy to a repo…`]}):null]}),T?(0,k.jsx)(`div`,{className:`inst-deploy`,children:(0,k.jsx)(A,{host:X,theme:n||`neutral`,options:G,onAction:e,onClose:()=>E(!1),onNote:y})}):null,Q.length?(0,k.jsx)(R,{rows:Q,project:!0,currentId:V?.id,onPick:$,label:`Per-project installs`}):(0,k.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,k.jsx)(ee,{setup:o,overview:i}),(0,k.jsx)(z,{themes:t,current:i?.theme})]}),V?(0,k.jsx)(F,{inst:V,targets:P[I(V.host,V.path)]||[],choice:H(V),unchanged:W(V),options:G,onPick:(e,t)=>U(V,e,t),canAct:!!e,busy:b===V.id,removing:D?.id===V.id?D:null,onRemoving:e=>j(e&&{id:V.id,host:V.host,path:V.path,memory:e.memory}),onApply:()=>K(V),onToggleInstall:()=>q(V),onRemove:J,onRevealMcp:Y},V.id):null]})}function V({onAction:e,dataRev:t}){let{data:n,error:i}=s(()=>r.kits(),[t]),o=x(n,e);return i||n?.error?(0,k.jsx)(a,{error:i||n.error}):n?n.installs.length?n.kits.length?(0,k.jsx)(`div`,{className:`kits-tab`,children:n.installs.map(e=>{let t=T(e),r=o.setOf(e),i=`${e.host} · ${e.scope}`;return(0,k.jsxs)(`section`,{className:`panel flush`,"aria-label":i,children:[(0,k.jsxs)(`div`,{className:`inst-head`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h2`,{children:i}),(0,k.jsx)(`p`,{className:`dim mono`,children:e.path})]}),(0,k.jsx)(C,{row:e})]}),t&&(0,k.jsx)(`p`,{className:`kit-lock`,children:e.reason||e.error}),(0,k.jsx)(`ul`,{className:`kit-list`,children:n.kits.map(n=>(0,k.jsxs)(`li`,{className:`kit-row`,children:[(0,k.jsxs)(`div`,{className:`kit-main`,children:[(0,k.jsx)(`a`,{className:`kit-name`,href:`#/kits/${encodeURIComponent(n.name)}`,children:n.name}),n.description?(0,k.jsx)(`span`,{className:`kit-desc`,children:n.description}):null,(0,k.jsxs)(`span`,{className:`mono dim`,children:[n.skills.length,` skills · `,n.agents.length,` agents`]})]}),(0,k.jsx)(S,{on:r.has(n.name),disabled:t||o.running(e),label:`${n.name} for ${i}`,onToggle:()=>o.toggle(e,n.name)})]},n.name))}),Object.entries(e.keptKitFiles||{}).map(([e,t])=>(0,k.jsxs)(`p`,{className:`kit-kept mono dim`,children:[`kept from inactive kit `,e,`: `,t.join(`, `),` — delete by hand`]},e)),(0,k.jsx)(D,{row:e,stage:o})]},e.id)})}):(0,k.jsx)(`div`,{className:`empty inst-empty`,children:`This Geneseed ships no kit.`}):(0,k.jsx)(`div`,{className:`empty inst-empty`,children:`No install yet.`}):(0,k.jsx)(f,{})}function H(e){return e.startsWith(`@@`)||e.startsWith(`+++`)||e.startsWith(`---`)?`hunk`:e.startsWith(`+`)?`add`:e.startsWith(`-`)?`del`:`ctx`}function U({onMutated:e,onAction:t,dataRev:n}){let i=h(),{data:o,error:c,reload:l}=s(()=>r.diff(),[n]),[u,d]=(0,O.useState)(!1),[p,g]=(0,O.useState)(``),[_,v]=(0,O.useState)(()=>new Set),[y,b]=(0,O.useState)(()=>new Set),[x,S]=(0,O.useState)(null);o&&o!==x&&(S(o),v(new Set),b(new Set(o.files.map(e=>e.rel))));let C=e=>v(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),w=()=>v(e=>e.size===D.length?new Set:new Set(D.map(e=>e.rel))),T=()=>t?.(`export`),E=async()=>{let t=[..._],n=t.filter(e=>o.files.find(t=>t.rel===e)?.status===`added`),a=n.length?`Restoring will DELETE ${n.length} deployed-only file(s):\n${n.join(`
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{A as i,D as a,F as o,G as s,I as c,J as l,K as u,L as d,O as f,P as p,R as m,T as h,Y as g,k as _,q as v,z as y}from"./index--3760QWr.js";import{t as b}from"./Tabs-b-L-ra4k.js";import{a as x,c as S,n as C,o as w,r as T,s as E,t as D}from"./KitApply-BYyktcdw.js";var O=e(t(),1),k=n();function A({host:e,theme:t,options:n,onAction:i,onClose:a,onNote:s}){let[c,l]=(0,O.useState)({path:``,host:e,theme:t,footprint:`lean`,posture:`peer`,mode:`direct`,trust:`balanced`}),[u,d]=(0,O.useState)(!1),f=(e,t)=>l(n=>({...n,[e]:t})),m=async()=>{d(!0),s(``);try{let e=await r.pickFolder();e.path?f(`path`,e.path):e.error&&s(e.error)}catch(e){s(e.message)}finally{d(!1)}},h=async()=>{let e=c.path.trim();if(!e){s(`Choose or type a folder to deploy into.`);return}s(``),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,k.jsxs)(`div`,{className:`deploy-pop`,children:[(0,k.jsxs)(`div`,{className:`dp-row`,children:[(0,k.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,k.jsx)(`button`,{className:`btn ghost sm`,disabled:u,onClick:m,children:u?`Choosing…`:`Browse…`})]}),(0,k.jsxs)(`div`,{className:`dp-row`,children:[(0,k.jsxs)(`label`,{className:`dp-field`,children:[(0,k.jsx)(`span`,{children:`Deploy as`}),(0,k.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,k.jsx)(`option`,{value:e.id,children:e.label},e.id))})]}),(0,k.jsx)(E,{value:c,options:n,onChange:f,who:`the new harness`}),(0,k.jsx)(`button`,{className:`btn sm`,onClick:h,children:`Deploy`}),(0,k.jsx)(`button`,{className:`btn ghost sm`,onClick:a,children:`Cancel`})]}),(0,k.jsxs)(`p`,{className:`sub dp-note`,children:[`Adds a per-repo harness (`,(0,k.jsx)(`code`,{children:o(c.host).deployAdds}),`) into the folder, non-destructively. It’s then tracked here even after you leave its directory.`]})]})}function j(){let{data:e,error:t,reload:n}=s(()=>r.excludes(),[]),[i,a]=(0,O.useState)(!1),[o,c]=(0,O.useState)([]),l=async(e,t)=>{a(!0);try{let n=await r.excludeMutate(e,t);c(n.messages||[])}catch(e){c(e.body?.messages||[e.message])}finally{a(!1),n()}};return t||!e?.installs?.length?null:(0,k.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,k.jsx)(`div`,{className:`card-head`,children:(0,k.jsx)(`h3`,{children:`Excluded folders`})}),(0,k.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,k.jsxs)(`div`,{className:`row wrap between gap-12`,children:[(0,k.jsx)(`code`,{children:e.path}),(0,k.jsxs)(`span`,{className:`mono muted`,children:[`[`,e.hosts.join(`, `),`]`]}),(0,k.jsx)(`button`,{className:`btn ghost sm`,disabled:i,onClick:()=>l(`remove`,e.path),children:`Remove`})]},e.path)),(0,k.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&&c([e.error])}catch(e){c([e.message])}finally{a(!1)}},children:[(0,k.jsx)(m,{name:`folder`}),` Exclude a folder…`]}),o.map((e,t)=>(0,k.jsx)(`p`,{className:`sub`,children:e},t))]})}function M({inst:e,memory:t,busy:n,onMemory:r,onRemove:i,onCancel:a}){return(0,k.jsxs)(`div`,{className:`h-remove`,children:[(0,k.jsxs)(`p`,{className:`hr-msg`,children:[(0,k.jsx)(`strong`,{children:e.scope===`project`?`Remove this harness from the folder?`:`Remove the global ${e.host} install?`}),` `,(0,k.jsxs)(`span`,{className:`sub`,children:[`Deletes `,(0,k.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,k.jsxs)(`label`,{className:`field`,children:[(0,k.jsx)(`span`,{children:`Memory and notebook`}),(0,k.jsxs)(`select`,{className:`sel`,"aria-label":`memory disposition`,value:t,onChange:e=>r(e.target.value),children:[(0,k.jsx)(`option`,{value:`keep`,children:`keep in place`}),(0,k.jsx)(`option`,{value:`archive`,children:`archive aside`}),(0,k.jsx)(`option`,{value:`delete`,children:`delete too`})]})]}),(0,k.jsxs)(`div`,{className:`row gap-8`,children:[(0,k.jsx)(`button`,{type:`button`,className:`btn danger`,disabled:n,onClick:i,children:n?`Removing…`:`Remove`}),(0,k.jsx)(`button`,{type:`button`,className:`btn ghost`,onClick:a,children:`Cancel`})]})]})}function N({targets:e,onReveal:t}){let n=e.flatMap(e=>e.servers);return(0,k.jsxs)(`div`,{className:`ip-block`,children:[(0,k.jsxs)(`span`,{className:`ip-label`,children:[`MCP servers `,(0,k.jsx)(`span`,{className:`mono dim`,children:n.length})]}),e.map(e=>(0,k.jsxs)(`div`,{className:`mcp-target`,children:[(0,k.jsxs)(`div`,{className:`mt-head`,children:[(0,k.jsx)(`code`,{title:e.path,children:e.label}),(0,k.jsx)(`button`,{type:`button`,className:`btn ghost sm`,onClick:()=>t(e),title:`Open the folder holding ${e.path} to edit it`,children:`Open folder`})]}),e.servers.length?e.servers.map(e=>(0,k.jsxs)(`div`,{className:`mcp-row`,children:[(0,k.jsx)(`span`,{className:`mono`,children:e.name}),(0,k.jsx)(`span`,{className:`tag ${e.state===`enabled`?`ok`:`warn`}`,children:e.state===`enabled`?`Enabled`:`Disabled`})]},e.name)):(0,k.jsx)(`p`,{className:`sub`,children:`None configured in this file.`})]},e.path))]})}var P={active:[`Active`,`ok`],disabled:[`Disabled`,`warn`],absent:[`Not installed`,``]};function F({inst:e,targets:t,choice:n,unchanged:r,options:i,onPick:a,canAct:s,busy:l,removing:u,onRemoving:d,onApply:f,onToggleInstall:p,onRemove:m,onRevealMcp:h}){let g=`${e.host} · ${e.scope}`,[_,v]=P[e.state]||P.absent,y=e.state===`active`,b=e.state===`absent`;return(0,k.jsxs)(`aside`,{className:`install-panel`,"aria-label":`${g} install`,children:[(0,k.jsx)(`span`,{className:`ip-eyebrow`,children:`Selected install`}),(0,k.jsxs)(`div`,{className:`ip-head`,children:[(0,k.jsx)(`h2`,{children:c(e)}),(0,k.jsx)(`span`,{className:`tag ${v}`,children:_})]}),(0,k.jsx)(`span`,{className:`ip-kind`,children:e.scope===`global`?`Global install`:`Per-project install · ${o(e.host).label}`}),(0,k.jsx)(`code`,{className:`ip-path`,children:e.path}),b?(0,k.jsxs)(`p`,{className:`sub`,children:[`Install Geneseed here as `,(0,k.jsx)(`strong`,{children:e.host}),`. Files are added non-destructively; deactivate or uninstall later.`]}):null,(y||b)&&s?(0,k.jsx)(`div`,{className:`ip-picks`,children:(0,k.jsx)(E,{value:n,options:i,onChange:a,who:g})}):null,y&&t.length?(0,k.jsx)(N,{targets:t,onReveal:h}):null,y&&e.scope===`global`?(0,k.jsx)(j,{}):null,b?null:(0,k.jsxs)(`label`,{className:`ip-switch`,children:[(0,k.jsx)(S,{on:y,disabled:l,label:`activate ${g}`,onToggle:p}),(0,k.jsx)(`span`,{children:y?`Active: loads in every session`:`Disabled: files moved aside`})]}),(0,k.jsx)(`div`,{className:`ip-spacer`}),s?(0,k.jsxs)(`div`,{className:`ip-actions`,children:[b?(0,k.jsx)(`button`,{type:`button`,className:`btn`,onClick:f,children:`Install`}):y?(0,k.jsx)(`button`,{type:`button`,className:`btn`,disabled:r,onClick:f,children:`Apply and rebuild`}):null,b?null:(0,k.jsx)(`button`,{type:`button`,className:`btn ghost danger-line`,"aria-label":`remove ${g} from ${e.path}`,"aria-expanded":!!u,disabled:l,onClick:()=>d(u?null:{memory:`keep`}),children:`Uninstall…`})]}):null,u?(0,k.jsx)(M,{inst:e,memory:u.memory,busy:l,onMemory:e=>d({memory:e}),onRemove:m,onCancel:()=>d(null)}):null]})}var I=(e,t)=>`${e} ${t}`,L={active:[`Active`,`ok`],disabled:[`Disabled`,`warn`]};function R({rows:e,project:t,currentId:n,onPick:r,label:i}){return(0,k.jsx)(`div`,{className:`tbl-scroll`,children:(0,k.jsxs)(`table`,{className:`tbl hosts-tbl`,"aria-label":i,children:[(0,k.jsx)(`thead`,{children:(0,k.jsxs)(`tr`,{children:[(0,k.jsx)(`th`,{children:t?`Project`:`Host`}),(0,k.jsx)(`th`,{children:t?`Host`:`Path`}),(0,k.jsx)(`th`,{children:`Voice`}),(0,k.jsx)(`th`,{children:`Footprint`}),(0,k.jsx)(`th`,{children:`State`}),(0,k.jsx)(`th`,{children:(0,k.jsx)(`span`,{className:`sr-only`,children:`Selected`})})]})}),(0,k.jsx)(`tbody`,{children:e.map(e=>{let[i,a]=L[e.state]||[`Not installed`,``],s=n===e.id,l=e.state===`absent`;return(0,k.jsxs)(`tr`,{className:`pickable${s?` on`:``}${l?` quiet`:``}`,onClick:()=>r(e.id),children:[(0,k.jsx)(`td`,{children:(0,k.jsx)(`button`,{type:`button`,className:`row-pick`,"aria-pressed":s,title:e.path,onClick:()=>r(e.id),children:c(e)})}),t?(0,k.jsx)(`td`,{children:o(e.host).label}):(0,k.jsx)(`td`,{className:`mono path-cell`,title:e.path,children:e.path}),(0,k.jsx)(`td`,{children:l?``:e.theme||``}),(0,k.jsx)(`td`,{children:l?``:e.footprint||``}),(0,k.jsx)(`td`,{children:(0,k.jsx)(`span`,{className:`tag ${a}`,children:i})}),(0,k.jsx)(`td`,{className:`pick-mark`,children:s?`Editing ›`:``})]},e.id)})})]})})}function z({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,k.jsxs)(`details`,{className:`panel voice-ref`,children:[(0,k.jsxs)(`summary`,{children:[(0,k.jsx)(`span`,{className:`vr-title`,children:`Voices`}),(0,k.jsxs)(`span`,{className:`mono dim`,children:[e.length,` to choose from, set per install`]})]}),(0,k.jsx)(`div`,{className:`vr-list`,children:n.map(e=>(0,k.jsxs)(`div`,{className:`voice-row${e.name===t?` current`:``}`,children:[(0,k.jsx)(`span`,{className:`vr-name`,children:e.name}),(0,k.jsx)(`span`,{className:`vr-desc`,children:e.tagline?`“${e.tagline}”`:e.blurb})]},e.name))})]})}function ee({setup:e,overview:t}){if(!e)return null;let n=e.installed_fp&&e.installed_fp===e.source_fp;return(0,k.jsxs)(`section`,{className:`panel`,"aria-labelledby":`checkout-h`,children:[(0,k.jsxs)(`div`,{className:`panel-head`,children:[(0,k.jsx)(`h2`,{id:`checkout-h`,children:`This checkout`}),(0,k.jsx)(`span`,{className:`mono ${n?`t-good`:`t-warn`}`,children:e.version_verdict})]}),(0,k.jsxs)(`dl`,{className:`kv-grid`,children:[(0,k.jsx)(`dt`,{children:`Source`}),(0,k.jsx)(`dd`,{className:`mono`,children:e.root}),(0,k.jsx)(`dt`,{children:`Version`}),(0,k.jsx)(`dd`,{className:`mono`,children:t?.version||`unknown`}),(0,k.jsx)(`dt`,{children:`Fingerprint`}),(0,k.jsx)(`dd`,{className:`mono`,children:e.source_fp})]})]})}function B({onAction:e,themes:t=[],currentTheme:n,overview:i,setup:o,dataRev:c,onMutated:l}){let u=h(),{data:d,error:p}=s(()=>r.installs(),[c]),{data:g,error:_}=s(()=>r.mcp(),[c]),[v,y]=(0,O.useState)(``),[b,x]=(0,O.useState)(``),[S,C]=(0,O.useState)({}),[T,E]=(0,O.useState)(!1),[D,j]=(0,O.useState)(null),[M,N]=(0,O.useState)(``),P=(0,O.useMemo)(()=>{let e={};for(let t of g?.targets||[]){let n=I(t.host||`opencode`,t.root);(e[n]||(e[n]=[])).push(t)}return e},[g]);if(p||_)return(0,k.jsx)(a,{error:p||_});if(!d||!g)return(0,k.jsx)(f,{});let L={active:0,disabled:1,absent:2},B=[...d.installs].sort((e,t)=>(e.scope===`global`?0:1)-(t.scope===`global`?0:1)||(L[e.state]??3)-(L[t.state]??3)),V=B.find(e=>e.id===M)||B.find(e=>e.selected)||B.find(e=>e.state===`active`)||B[0],H=e=>{let t=S[e.id]||{};return{theme:t.theme||e.theme||n||`neutral`,footprint:t.footprint||e.state!==`absent`&&e.footprint||`lean`,posture:t.posture||e.posture||`peer`,mode:t.mode||e.mode||`direct`,trust:t.trust||e.trust||`balanced`}},U=(e,t,n)=>C(r=>({...r,[e.id]:{...r[e.id],[t]:n}})),W=e=>{let t=H(e);return t.theme===e.theme&&t.footprint===(e.footprint||`lean`)&&t.posture===(e.posture||`peer`)&&t.mode===(e.mode||`direct`)&&t.trust===(e.trust||`balanced`)},G={theme:t.map(e=>e.name),footprint:w,posture:d.postures||[],mode:d.modes||[],trust:d.trusts||[]},K=async t=>{let{theme:n,footprint:r,posture:i,mode:a,trust:o}=H(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 u(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})},q=async e=>{if(e.state!==`active`||await u(`Deactivate this install? Files are moved aside, not deleted; reactivate any time.`,{title:`Deactivate this install?`,confirmLabel:`Deactivate`})){x(e.id),y(``);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(`, `):``;y(t.error||e&&`unrestored: ${e}`||`action failed`);return}l?.()}catch(e){y(e.message)}finally{x(``)}}},J=async()=>{let e=D;if(e){x(e.id),y(``);try{let t=await r.installRemove(e.host,e.path,e.memory);if(!t.ok){y(t.error||`remove failed`);return}j(null),t.kept?.length&&y(`Removed. Kept ${t.kept.length} file(s) you edited: ${t.kept.join(`, `)} — they are yours now (the CLI geneseed uninstall --force deletes edited files too).`),l?.()}catch(e){y(e.message)}finally{x(``)}}},Y=async e=>{y(``);try{let t=await r.mcpReveal(e.path);y(`Opening ${t.dir}. If no window appeared, open that folder by hand.`)}catch(e){y(e.message)}},X=B.find(e=>e.selected)?.host||B.find(e=>e.state===`active`)?.host||B[0]?.host||`opencode`,Z=B.filter(e=>e.scope===`global`),Q=B.filter(e=>e.scope!==`global`),$=e=>{N(e),j(null)};return(0,k.jsxs)(`div`,{className:`hosts`,children:[(0,k.jsxs)(`div`,{className:`hosts-main`,children:[(0,k.jsxs)(`div`,{className:`toolbar`,children:[(0,k.jsxs)(`span`,{className:`dim`,children:[B.filter(e=>e.state===`active`).length,` active of `,B.length,` `,`detected.`]}),e?(0,k.jsx)(`div`,{className:`row gap-8`,children:(0,k.jsxs)(`button`,{type:`button`,className:`btn ghost`,onClick:()=>e(`build-all`),children:[(0,k.jsx)(m,{name:`refresh`}),` Rebuild all`]})}):null]}),v?(0,k.jsx)(`p`,{className:`tag bad note`,role:`status`,children:v}):null,(0,k.jsxs)(`section`,{className:`panel flush`,"aria-labelledby":`inst-global`,children:[(0,k.jsx)(`div`,{className:`inst-head`,children:(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h2`,{id:`inst-global`,children:`Global installs`}),(0,k.jsx)(`p`,{className:`dim`,children:`One per tool. Loaded in every folder, except excluded ones.`})]})}),(0,k.jsx)(R,{rows:Z,currentId:V?.id,onPick:$,label:`Global installs`})]}),(0,k.jsxs)(`section`,{className:`panel flush`,"aria-labelledby":`inst-project`,children:[(0,k.jsxs)(`div`,{className:`inst-head`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h2`,{id:`inst-project`,children:`Per-project installs`}),(0,k.jsx)(`p`,{className:`dim`,children:`A repo with its own harness. Inside it, only that harness loads.`})]}),e?(0,k.jsxs)(`button`,{type:`button`,className:`btn ghost`,onClick:()=>E(e=>!e),children:[(0,k.jsx)(m,{name:`folder`}),` Deploy to a repo…`]}):null]}),T?(0,k.jsx)(`div`,{className:`inst-deploy`,children:(0,k.jsx)(A,{host:X,theme:n||`neutral`,options:G,onAction:e,onClose:()=>E(!1),onNote:y})}):null,Q.length?(0,k.jsx)(R,{rows:Q,project:!0,currentId:V?.id,onPick:$,label:`Per-project installs`}):(0,k.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,k.jsx)(ee,{setup:o,overview:i}),(0,k.jsx)(z,{themes:t,current:i?.theme})]}),V?(0,k.jsx)(F,{inst:V,targets:P[I(V.host,V.path)]||[],choice:H(V),unchanged:W(V),options:G,onPick:(e,t)=>U(V,e,t),canAct:!!e,busy:b===V.id,removing:D?.id===V.id?D:null,onRemoving:e=>j(e&&{id:V.id,host:V.host,path:V.path,memory:e.memory}),onApply:()=>K(V),onToggleInstall:()=>q(V),onRemove:J,onRevealMcp:Y},V.id):null]})}function V({onAction:e,dataRev:t}){let{data:n,error:i}=s(()=>r.kits(),[t]),o=x(n,e);return i||n?.error?(0,k.jsx)(a,{error:i||n.error}):n?n.installs.length?n.kits.length?(0,k.jsx)(`div`,{className:`kits-tab`,children:n.installs.map(e=>{let t=T(e),r=o.setOf(e),i=`${e.host} · ${e.scope}`;return(0,k.jsxs)(`section`,{className:`panel flush`,"aria-label":i,children:[(0,k.jsxs)(`div`,{className:`inst-head`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h2`,{children:i}),(0,k.jsx)(`p`,{className:`dim mono`,children:e.path})]}),(0,k.jsx)(C,{row:e})]}),t&&(0,k.jsx)(`p`,{className:`kit-lock`,children:e.reason||e.error}),(0,k.jsx)(`ul`,{className:`kit-list`,children:n.kits.map(n=>(0,k.jsxs)(`li`,{className:`kit-row`,children:[(0,k.jsxs)(`div`,{className:`kit-main`,children:[(0,k.jsx)(`a`,{className:`kit-name`,href:`#/kits/${encodeURIComponent(n.name)}`,children:n.name}),n.description?(0,k.jsx)(`span`,{className:`kit-desc`,children:n.description}):null,(0,k.jsxs)(`span`,{className:`mono dim`,children:[n.skills.length,` skills · `,n.agents.length,` agents`]})]}),(0,k.jsx)(S,{on:r.has(n.name),disabled:t||o.running(e),label:`${n.name} for ${i}`,onToggle:()=>o.toggle(e,n.name)})]},n.name))}),Object.entries(e.keptKitFiles||{}).map(([e,t])=>(0,k.jsxs)(`p`,{className:`kit-kept mono dim`,children:[`kept from inactive kit `,e,`: `,t.join(`, `),` — delete by hand`]},e)),(0,k.jsx)(D,{row:e,stage:o})]},e.id)})}):(0,k.jsx)(`div`,{className:`empty inst-empty`,children:`This Geneseed ships no kit.`}):(0,k.jsx)(`div`,{className:`empty inst-empty`,children:`No install yet.`}):(0,k.jsx)(f,{})}function H(e){return e.startsWith(`@@`)||e.startsWith(`+++`)||e.startsWith(`---`)?`hunk`:e.startsWith(`+`)?`add`:e.startsWith(`-`)?`del`:`ctx`}function U({onMutated:e,onAction:t,dataRev:n}){let i=h(),{data:o,error:c,reload:l}=s(()=>r.diff(),[n]),[u,d]=(0,O.useState)(!1),[p,g]=(0,O.useState)(``),[_,v]=(0,O.useState)(()=>new Set),[y,b]=(0,O.useState)(()=>new Set),[x,S]=(0,O.useState)(null);o&&o!==x&&(S(o),v(new Set),b(new Set(o.files.map(e=>e.rel))));let C=e=>v(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),w=()=>v(e=>e.size===D.length?new Set:new Set(D.map(e=>e.rel))),T=()=>t?.(`export`),E=async()=>{let t=[..._],n=t.filter(e=>o.files.find(t=>t.rel===e)?.status===`added`),a=n.length?`Restoring will DELETE ${n.length} deployed-only file(s):\n${n.join(`
2
2
  `)}\n\n`:``;if(await i(`${a}Discard local edits and restore ${t.length} file(s) from source?`,{title:`Restore from source?`,confirmLabel:`Restore`})){d(!0);try{let n=await r.restore(t),i=n.errors.length?` · ${n.errors.length} error(s): ${n.errors.join(`; `)}`:``;g(`Restored ${n.restored.length}, archived ${n.deleted.length}${i}`),await l(),e?.()}catch(e){g(e.message)}finally{d(!1)}}};if(c)return(0,k.jsx)(a,{error:c});if(!o)return(0,k.jsx)(f,{});if(!o.deployed)return(0,k.jsxs)(`div`,{className:`empty`,children:[(0,k.jsx)(`div`,{className:`big`,children:`No deployed harness`}),`Nothing to diff against.`]});if(!o.diffable)return(0,k.jsxs)(`div`,{className:`empty`,children:[(0,k.jsx)(`div`,{className:`big`,children:`No drift check for this install`}),`The drift check covers global installs only.`]});let D=o.files.filter(e=>e.status!==`linked`&&e.status!==`stale`),A=o.files.filter(e=>e.status===`linked`),j=o.files.filter(e=>e.status===`stale`),M=D.filter(e=>e.status===`edited`).length,N=D.filter(e=>e.status===`added`).length,P=D.filter(e=>e.status===`missing`).length,F=e=>b(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n});return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`div`,{className:`head-row mb-16`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h2`,{className:`h`,children:`Local edits`}),M>0?(0,k.jsx)(`p`,{className:`sub`,children:`The agent refines its own deployed files in place. A rebuild keeps an edited file, which then stops receiving source updates — export it, then Restore to take the new source.`}):N+P>0?(0,k.jsx)(`p`,{className:`sub`,children:`These files differ from the source: added in the install, or missing from it.`}):null]}),(0,k.jsxs)(`div`,{className:`row gap-10`,children:[(0,k.jsxs)(`button`,{className:`btn ghost`,disabled:u||_.size===0,onClick:E,children:[`Restore`,_.size?` (${_.size})`:``]}),(0,k.jsxs)(`button`,{className:`btn`,disabled:u,onClick:T,children:[(0,k.jsx)(m,{name:`download`}),`Export improvements`]})]})]}),p?(0,k.jsx)(`p`,{className:`sub mb-14`,children:p}):null,A.length?(0,k.jsxs)(`p`,{className:`sub dim mb-14`,title:A.map(e=>e.rel).join(`
3
- `),children:[A.length,` linked — yours, left alone`]}):null,D.length===0&&j.length===0?(0,k.jsxs)(`div`,{className:`empty`,children:[(0,k.jsx)(`div`,{className:`big`,children:`In sync`}),`Deployed harness matches source.`]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`div`,{className:`row between mb-14`,children:[(0,k.jsxs)(`div`,{className:`row gap-10`,children:[(0,k.jsxs)(`span`,{className:`badge`,children:[(0,k.jsx)(`span`,{className:`dot`,style:{background:`var(--warn)`}}),M,` edited`]}),(0,k.jsxs)(`span`,{className:`badge`,children:[(0,k.jsx)(`span`,{className:`dot`,style:{background:`var(--good)`}}),N,` added`]}),P>0&&(0,k.jsxs)(`span`,{className:`badge`,children:[(0,k.jsx)(`span`,{className:`dot`,style:{background:`var(--bad)`}}),P,` missing`]}),j.length>0&&(0,k.jsxs)(`span`,{className:`badge`,children:[(0,k.jsx)(`span`,{className:`dot`}),j.length,` behind`]})]}),D.length?(0,k.jsxs)(`label`,{className:`row dim`,style:{gap:8,fontSize:12.5,cursor:`pointer`},children:[(0,k.jsx)(`input`,{type:`checkbox`,style:{accentColor:`var(--accent)`},checked:_.size===D.length,onChange:w}),`Select all`]}):null]}),(0,k.jsx)(`div`,{className:`stack gap-12`,children:D.map(e=>I(e,!0))}),j.length?(0,k.jsxs)(`div`,{className:`stack gap-12`,style:{marginTop:24},children:[(0,k.jsx)(`h3`,{style:{margin:0},children:`Behind source`}),(0,k.jsxs)(`div`,{className:`row between`,children:[(0,k.jsx)(`p`,{className:`sub`,style:{margin:0},children:`This install is built from older source — rebuild to bring these files up to date.`}),(0,k.jsx)(`button`,{className:`btn ghost`,disabled:u,onClick:()=>t?.(`build-all`),children:`Rebuild`})]}),j.map(e=>I(e,!1))]}):null]})]});function I(e,t){let n=y.has(e.rel),r=e.status===`stale`?``:e.status===`added`?`ok`:e.status===`missing`?`bad`:`warn`;return(0,k.jsxs)(`div`,{className:`card diff-file${n?` open`:``}`,children:[(0,k.jsxs)(`div`,{className:`diff-head`,children:[t?(0,k.jsx)(`input`,{type:`checkbox`,className:`chk`,checked:_.has(e.rel),onChange:()=>C(e.rel),onClick:e=>e.stopPropagation(),"aria-label":`Select ${e.rel}`}):null,(0,k.jsx)(`span`,{className:`fname`,children:e.rel}),(0,k.jsxs)(`span`,{className:`badge ${r}`,children:[(0,k.jsx)(`span`,{className:`dot`}),e.status===`stale`?`behind source`:e.status]}),(0,k.jsxs)(`span`,{className:`dim mono`,style:{marginLeft:`auto`,fontSize:11},children:[e.diff.length,` lines`]}),(0,k.jsx)(`button`,{className:`iconbtn`,onClick:()=>F(e.rel),style:{transform:n?`rotate(90deg)`:`none`},"aria-label":n?`Collapse ${e.rel}`:`Expand ${e.rel}`,"aria-expanded":n,children:(0,k.jsx)(m,{name:`chevron`})})]}),n&&(0,k.jsx)(`div`,{className:`diff-body`,children:e.diff.map((e,t)=>(0,k.jsx)(`div`,{className:`diff-line ${H(e)}`,children:e},t))})]},e.rel)}}function W({group:e,i:t}){let n=e.problems.length===0,[r,i]=(0,O.useState)(!n);return(0,k.jsxs)(`div`,{className:`card check rise ${n?``:`bad`} ${r?`open`:``}`,style:{"--i":t*.6},children:[(0,k.jsxs)(`button`,{className:`check-head`,onClick:()=>i(e=>!e),disabled:n,style:{cursor:n?`default`:`pointer`},"aria-expanded":n?void 0:r,children:[(0,k.jsx)(`span`,{className:`feed-dot ${n?`ok`:`bad`}`,style:{width:9,height:9}}),(0,k.jsx)(`h3`,{children:e.label}),(0,k.jsxs)(`span`,{className:`badge ${n?`ok`:`bad`}`,children:[(0,k.jsx)(`span`,{className:`dot`}),n?`clean`:`${e.problems.length} problem${e.problems.length===1?``:`s`}`]}),!n&&(0,k.jsx)(m,{name:`chevron`,className:`chev glyph`})]}),!n&&r&&(0,k.jsx)(`div`,{className:`check-body`,children:e.problems.map(e=>(0,k.jsxs)(`div`,{className:`problem`,children:[(0,k.jsx)(`span`,{className:`x`,children:`✕`}),(0,k.jsx)(`span`,{children:e})]},e))})]})}function G(){let e=(0,O.useRef)(!1),{data:t,error:n,reload:i,setData:o}=s(()=>r.doctor(e.current),[]);return n?(0,k.jsx)(a,{error:n}):(0,k.jsxs)(`div`,{className:`narrow`,children:[(0,k.jsxs)(`div`,{className:`head-row mb-16`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h2`,{className:`h`,children:`Doctor`}),(0,k.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,k.jsxs)(`button`,{className:`btn ghost`,onClick:()=>{e.current=!0,o(null),i()},disabled:!t,children:[(0,k.jsx)(m,{name:`refresh`}),t?`Re-run checks`:`Running…`]})]}),t?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`div`,{className:`card pad-md mb-16`,children:(0,k.jsxs)(`div`,{className:`row wrap between gap-12`,children:[(0,k.jsxs)(`div`,{className:`row`,style:{gap:10,flexWrap:`wrap`},children:[(0,k.jsxs)(`span`,{className:`dim mono`,style:{fontSize:12},children:[`validated `,t.themes.length,` theme`,t.themes.length===1?``:`s`]}),t.themes.map(e=>(0,k.jsx)(`span`,{className:`badge`,style:{textTransform:`capitalize`},children:e},e))]}),t.ok?(0,k.jsxs)(`span`,{className:`badge ok`,children:[(0,k.jsx)(`span`,{className:`dot`}),`all clean`]}):(0,k.jsxs)(`span`,{className:`badge bad`,children:[(0,k.jsx)(`span`,{className:`dot`}),t.problems.length,` problem`,t.problems.length===1?``:`s`]})]})}),(0,k.jsx)(`div`,{className:`stack gap-12`,children:t.groups.map((e,t)=>(0,k.jsx)(W,{group:e,i:t},e.label))})]}):(0,k.jsx)(f,{label:`Running every check (builds each theme in a sandbox)…`})]})}function K(){let e=h(),[t,n]=(0,O.useState)(!1),[i,a]=(0,O.useState)(!1),[o,s]=(0,O.useState)(null);return t?(0,k.jsxs)(`p`,{className:`sub`,children:[`Server stopped. You can close this tab and reopen any time with `,(0,k.jsx)(`code`,{children:`geneseed web`}),`.`]}):(0,k.jsxs)(k.Fragment,{children:[o&&(0,k.jsx)(`p`,{className:`sub`,role:`alert`,children:o}),(0,k.jsxs)(`div`,{className:`row`,children:[(0,k.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),s(null);try{await u()}catch(e){s(e.message),a(!1)}}},disabled:i,children:[(0,k.jsx)(m,{name:`refresh`}),i?`Restarting…`:`Restart server`]}),(0,k.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`})){s(null);try{await r.shutdown()}catch(e){if(e.status)return s(e.message)}n(!0)}},disabled:i,children:[(0,k.jsx)(m,{name:`x`}),`Stop server`]})]})]})}var q=`https://github.com/Arylmera/Geneseed`,J=`https://github.com/Arylmera`;function Y(){let[e,t]=(0,O.useState)(q),[n,i]=(0,O.useState)(!0);return(0,O.useEffect)(()=>{Promise.resolve(r.docsPage?.(`about`)).then(e=>{e?.repo&&(t(e.repo),i(!!e.repo_is_github))}).catch(()=>{})},[]),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,k.jsx)(`div`,{className:`card-head`,children:(0,k.jsx)(`h3`,{children:`About`})}),(0,k.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,k.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,k.jsxs)(`a`,{className:`btn ghost`,href:e,target:`_blank`,rel:`noreferrer`,children:[(0,k.jsx)(m,{name:`github`}),n?`Source on GitHub`:`Source repo`]}),n&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`a`,{className:`btn ghost`,href:e+`/issues`,target:`_blank`,rel:`noreferrer`,children:[(0,k.jsx)(m,{name:`external`}),`Issues`]}),(0,k.jsxs)(`a`,{className:`btn ghost`,href:e+`/blob/main/LICENSE`,target:`_blank`,rel:`noreferrer`,children:[(0,k.jsx)(m,{name:`external`}),`MIT License`]})]})]})]}),(0,k.jsxs)(`div`,{className:`card pad-lg`,children:[(0,k.jsx)(`div`,{className:`card-head`,children:(0,k.jsx)(`h3`,{children:`Creator`})}),(0,k.jsxs)(`p`,{className:`sub mb-16`,children:[`Geneseed is built by `,(0,k.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,k.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,k.jsx)(`div`,{className:`row wrap gap-10`,children:(0,k.jsxs)(`a`,{className:`btn ghost`,href:J,target:`_blank`,rel:`noreferrer`,children:[(0,k.jsx)(m,{name:`github`}),`@Arylmera on GitHub`]})})]})]})}function X({overview:e,onAction:t,flavour:n,onFlavour:r,accentMode:a,onAccentMode:o,layout:s,onLayout:c}){let u=h(),d=e?.install,f=e?.footprint,p=async e=>{d&&e!==f&&await u(`Rebuild ${d.host} · ${d.scope} with the “${e}” footprint? It rebuilds in place, non-destructive.`,{title:`Change the footprint?`,confirmLabel:`Rebuild`})&&t?.(`install`,{...d,footprint:e})};return(0,k.jsxs)(`div`,{className:`narrow-lg`,children:[(0,k.jsx)(`div`,{className:`head-row mb-18`,children:(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h2`,{className:`h`,children:`Settings`}),(0,k.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,k.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,k.jsx)(`div`,{className:`card-head`,children:(0,k.jsx)(`h3`,{children:`Console direction`})}),(0,k.jsxs)(`p`,{className:`sub mb-16`,children:[g.length,` takes on the same data. Pick a direction; it applies instantly and persists across reloads.`]}),a&&o&&(0,k.jsxs)(`div`,{className:`dir-layout`,children:[(0,k.jsx)(`span`,{className:`tick`,id:`dir-accent-label`,children:`Accent`}),(0,k.jsx)(_,{value:a,onChange:o,labelledBy:`dir-accent-label`}),(0,k.jsx)(`span`,{className:`dir-layout-note sub`,role:`status`,"aria-live":`polite`,children:l(a)})]}),s&&c&&(0,k.jsxs)(`div`,{className:`dir-layout`,children:[(0,k.jsx)(`span`,{className:`tick`,id:`dir-layout-label`,children:`Overview view`}),(0,k.jsx)(i,{"aria-labelledby":`dir-layout-label`,children:v.map(e=>(0,k.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,k.jsx)(`span`,{className:`dir-layout-note sub`,role:`status`,"aria-live":`polite`,children:v.find(e=>e.id===s)?.tagline??``})]}),(0,k.jsx)(`div`,{className:`dir-grid`,children:g.map(e=>(0,k.jsxs)(`button`,{className:`dir-tile dir-${e.id} ${n===e.id?`on`:``}`,onClick:()=>r(e.id),"aria-pressed":n===e.id,children:[(0,k.jsxs)(`span`,{className:`dir-thumb`,"aria-hidden":`true`,children:[(0,k.jsx)(`span`,{className:`dir-thumb-rail`}),(0,k.jsx)(`span`,{className:`dir-thumb-bar`}),(0,k.jsx)(`span`,{className:`dir-thumb-bar`,style:{width:`70%`}}),(0,k.jsx)(`span`,{className:`dir-thumb-bar`,style:{width:`52%`}}),(0,k.jsx)(`span`,{className:`dir-thumb-dot`})]}),(0,k.jsxs)(`span`,{className:`dir-meta`,children:[(0,k.jsxs)(`span`,{className:`dir-name`,children:[e.short,n===e.id&&(0,k.jsx)(`span`,{className:`dir-check`,children:`● active`})]}),(0,k.jsx)(`span`,{className:`dir-tag`,children:e.tagline})]})]},e.id))})]}),d&&f&&(0,k.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,k.jsx)(`div`,{className:`card-head`,children:(0,k.jsx)(`h3`,{children:`Harness footprint`})}),(0,k.jsxs)(`p`,{className:`sub mb-16`,children:[`How much of the Rules `,(0,k.jsx)(`code`,{children:`AGENT.md`}),` carries inline each turn, for the current install (`,(0,k.jsxs)(`code`,{children:[d.host,` · `,d.scope]}),`). A token-cost dial; every Rule stays in force either way. Changing it rebuilds the install in place. `,(0,k.jsx)(`a`,{href:`#/docs/footprint`,children:`Learn more →`})]}),(0,k.jsxs)(`div`,{className:`dir-layout`,children:[(0,k.jsx)(`span`,{className:`tick`,id:`footprint-label`,children:`Footprint`}),(0,k.jsx)(i,{"aria-labelledby":`footprint-label`,children:[`full`,`lean`].map(e=>(0,k.jsx)(`button`,{className:f===e?`on`:``,onClick:()=>p(e),"aria-pressed":f===e,children:e},e))}),(0,k.jsx)(`span`,{className:`dir-layout-note sub`,role:`status`,"aria-live":`polite`,children:f===`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,k.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,k.jsx)(`div`,{className:`card-head`,children:(0,k.jsx)(`h3`,{children:`Maintenance`})}),(0,k.jsxs)(`p`,{className:`sub mb-16`,children:[`Update this Geneseed copy, or add `,(0,k.jsx)(`code`,{children:`geneseed`}),` to your PATH (or remove it) so it runs from any directory. Each runs live in the console.`]}),(0,k.jsxs)(`p`,{className:`sub mb-16`,children:[`Each install has its own Uninstall in `,(0,k.jsx)(`a`,{href:`#/installs`,children:`Hosts`}),`.`]}),(0,k.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,k.jsxs)(`button`,{className:`btn ghost`,onClick:()=>t(`update`),children:[(0,k.jsx)(m,{name:`download`}),`Update (git pull + rebuild)`]}),(0,k.jsxs)(`button`,{className:`btn ghost`,onClick:()=>t(`link`),children:[(0,k.jsx)(m,{name:`external`}),`Add to PATH`]}),(0,k.jsx)(`button`,{className:`btn ghost`,onClick:()=>t(`unlink`),children:`Remove from PATH`})]})]}),(0,k.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,k.jsx)(`div`,{className:`card-head`,children:(0,k.jsx)(`h3`,{children:`Server`})}),(0,k.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,k.jsx)(K,{})]}),(0,k.jsx)(Y,{})]})}function Z({tab:e=`hosts`,overview:t,setup:n,themes:r,onAction:i,onMutated:a,dataRev:o,appearance:s={}}){let c=t?.doctor,l=t?.diff,u={edits:l?y(l):null,doctor:c?c.ok?`clean`:c.problems.length:null};return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`div`,{className:`page-head`,children:(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h1`,{className:`h`,children:`Installs`}),(0,k.jsx)(`p`,{className:`sub`,children:`Where the harness lives on this machine, and how each copy is built.`})]})}),(0,k.jsx)(b,{page:`installs`,current:e,badges:u,label:`Installs`}),e===`hosts`&&(0,k.jsx)(B,{onAction:i,themes:r,currentTheme:t?.theme,overview:t,setup:n,dataRev:o,onMutated:a}),e===`kits`&&(0,k.jsx)(V,{onAction:i,dataRev:o}),e===`edits`&&(0,k.jsx)(U,{onMutated:a,onAction:i,dataRev:o}),e===`doctor`&&(0,k.jsx)(G,{}),e===`server`&&(0,k.jsx)(X,{overview:t,onAction:i,...s})]})}export{Z as default};
3
+ `),children:[A.length,` linked — yours, left alone`]}):null,D.length===0&&j.length===0?(0,k.jsxs)(`div`,{className:`empty`,children:[(0,k.jsx)(`div`,{className:`big`,children:`In sync`}),`Deployed harness matches source.`]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`div`,{className:`row between mb-14`,children:[(0,k.jsxs)(`div`,{className:`row gap-10`,children:[(0,k.jsxs)(`span`,{className:`badge`,children:[(0,k.jsx)(`span`,{className:`dot`,style:{background:`var(--warn)`}}),M,` edited`]}),(0,k.jsxs)(`span`,{className:`badge`,children:[(0,k.jsx)(`span`,{className:`dot`,style:{background:`var(--good)`}}),N,` added`]}),P>0&&(0,k.jsxs)(`span`,{className:`badge`,children:[(0,k.jsx)(`span`,{className:`dot`,style:{background:`var(--bad)`}}),P,` missing`]}),j.length>0&&(0,k.jsxs)(`span`,{className:`badge`,children:[(0,k.jsx)(`span`,{className:`dot`}),j.length,` behind`]})]}),D.length?(0,k.jsxs)(`label`,{className:`row dim`,style:{gap:8,fontSize:12.5,cursor:`pointer`},children:[(0,k.jsx)(`input`,{type:`checkbox`,style:{accentColor:`var(--accent)`},checked:_.size===D.length,onChange:w}),`Select all`]}):null]}),(0,k.jsx)(`div`,{className:`stack gap-12`,children:D.map(e=>I(e,!0))}),j.length?(0,k.jsxs)(`div`,{className:`stack gap-12`,style:{marginTop:24},children:[(0,k.jsx)(`h3`,{style:{margin:0},children:`Behind source`}),(0,k.jsxs)(`div`,{className:`row between`,children:[(0,k.jsx)(`p`,{className:`sub`,style:{margin:0},children:`This install is built from older source — rebuild to bring these files up to date.`}),(0,k.jsx)(`button`,{className:`btn ghost`,disabled:u,onClick:()=>t?.(`build-all`),children:`Rebuild`})]}),j.map(e=>I(e,!1))]}):null]})]});function I(e,t){let n=y.has(e.rel),r=e.status===`stale`?``:e.status===`added`?`ok`:e.status===`missing`?`bad`:`warn`;return(0,k.jsxs)(`div`,{className:`card diff-file${n?` open`:``}`,children:[(0,k.jsxs)(`div`,{className:`diff-head`,children:[t?(0,k.jsx)(`input`,{type:`checkbox`,className:`chk`,checked:_.has(e.rel),onChange:()=>C(e.rel),onClick:e=>e.stopPropagation(),"aria-label":`Select ${e.rel}`}):null,(0,k.jsx)(`span`,{className:`fname`,children:e.rel}),(0,k.jsxs)(`span`,{className:`badge ${r}`,children:[(0,k.jsx)(`span`,{className:`dot`}),e.status===`stale`?`behind source`:e.status]}),(0,k.jsxs)(`span`,{className:`dim mono`,style:{marginLeft:`auto`,fontSize:11},children:[e.diff.length,` lines`]}),(0,k.jsx)(`button`,{className:`iconbtn`,onClick:()=>F(e.rel),style:{transform:n?`rotate(90deg)`:`none`},"aria-label":n?`Collapse ${e.rel}`:`Expand ${e.rel}`,"aria-expanded":n,children:(0,k.jsx)(m,{name:`chevron`})})]}),n&&(0,k.jsx)(`div`,{className:`diff-body`,children:e.diff.map((e,t)=>(0,k.jsx)(`div`,{className:`diff-line ${H(e)}`,children:e},t))})]},e.rel)}}function W({group:e,i:t}){let n=e.problems.length===0,[r,i]=(0,O.useState)(!n);return(0,k.jsxs)(`div`,{className:`card check rise ${n?``:`bad`} ${r?`open`:``}`,style:{"--i":t*.6},children:[(0,k.jsxs)(`button`,{className:`check-head`,onClick:()=>i(e=>!e),disabled:n,style:{cursor:n?`default`:`pointer`},"aria-expanded":n?void 0:r,children:[(0,k.jsx)(`span`,{className:`feed-dot ${n?`ok`:`bad`}`,style:{width:9,height:9}}),(0,k.jsx)(`h3`,{children:e.label}),(0,k.jsxs)(`span`,{className:`badge ${n?`ok`:`bad`}`,children:[(0,k.jsx)(`span`,{className:`dot`}),n?`clean`:`${e.problems.length} problem${e.problems.length===1?``:`s`}`]}),!n&&(0,k.jsx)(m,{name:`chevron`,className:`chev glyph`})]}),!n&&r&&(0,k.jsx)(`div`,{className:`check-body`,children:e.problems.map(e=>(0,k.jsxs)(`div`,{className:`problem`,children:[(0,k.jsx)(`span`,{className:`x`,children:`✕`}),(0,k.jsx)(`span`,{children:e})]},e))})]})}function G(){let e=(0,O.useRef)(!1),{data:t,error:n,reload:i,setData:o}=s(()=>r.doctor(e.current),[]);return n?(0,k.jsx)(a,{error:n}):(0,k.jsxs)(`div`,{className:`narrow`,children:[(0,k.jsxs)(`div`,{className:`head-row mb-16`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h2`,{className:`h`,children:`Doctor`}),(0,k.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,k.jsxs)(`button`,{className:`btn ghost`,onClick:()=>{e.current=!0,o(null),i()},disabled:!t,children:[(0,k.jsx)(m,{name:`refresh`}),t?`Re-run checks`:`Running…`]})]}),t?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`div`,{className:`card pad-md mb-16`,children:(0,k.jsxs)(`div`,{className:`row wrap between gap-12`,children:[(0,k.jsxs)(`div`,{className:`row`,style:{gap:10,flexWrap:`wrap`},children:[(0,k.jsxs)(`span`,{className:`dim mono`,style:{fontSize:12},children:[`validated `,t.themes.length,` theme`,t.themes.length===1?``:`s`]}),t.themes.map(e=>(0,k.jsx)(`span`,{className:`badge`,style:{textTransform:`capitalize`},children:e},e))]}),t.ok?(0,k.jsxs)(`span`,{className:`badge ok`,children:[(0,k.jsx)(`span`,{className:`dot`}),`all clean`]}):(0,k.jsxs)(`span`,{className:`badge bad`,children:[(0,k.jsx)(`span`,{className:`dot`}),t.problems.length,` problem`,t.problems.length===1?``:`s`]})]})}),(0,k.jsx)(`div`,{className:`stack gap-12`,children:t.groups.map((e,t)=>(0,k.jsx)(W,{group:e,i:t},e.label))})]}):(0,k.jsx)(f,{label:`Running every check (builds each theme in a sandbox)…`})]})}function K(){let e=h(),[t,n]=(0,O.useState)(!1),[i,a]=(0,O.useState)(!1),[o,s]=(0,O.useState)(null);return t?(0,k.jsxs)(`p`,{className:`sub`,children:[`Server stopped. You can close this tab and reopen any time with `,(0,k.jsx)(`code`,{children:`geneseed web`}),`.`]}):(0,k.jsxs)(k.Fragment,{children:[o&&(0,k.jsx)(`p`,{className:`sub`,role:`alert`,children:o}),(0,k.jsxs)(`div`,{className:`row`,children:[(0,k.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),s(null);try{await u()}catch(e){s(e.message),a(!1)}}},disabled:i,children:[(0,k.jsx)(m,{name:`refresh`}),i?`Restarting…`:`Restart server`]}),(0,k.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`})){s(null);try{await r.shutdown()}catch(e){if(e.status)return s(e.message)}n(!0)}},disabled:i,children:[(0,k.jsx)(m,{name:`x`}),`Stop server`]})]})]})}var q=`https://github.com/Arylmera/Geneseed`,J=`https://github.com/Arylmera`;function Y(){let[e,t]=(0,O.useState)(q),[n,i]=(0,O.useState)(!0);return(0,O.useEffect)(()=>{Promise.resolve(r.docsPage?.(`about`)).then(e=>{e?.repo&&(t(e.repo),i(!!e.repo_is_github))}).catch(()=>{})},[]),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,k.jsx)(`div`,{className:`card-head`,children:(0,k.jsx)(`h3`,{children:`About`})}),(0,k.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,k.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,k.jsxs)(`a`,{className:`btn ghost`,href:e,target:`_blank`,rel:`noreferrer`,children:[(0,k.jsx)(m,{name:`github`}),n?`Source on GitHub`:`Source repo`]}),n&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`a`,{className:`btn ghost`,href:e+`/issues`,target:`_blank`,rel:`noreferrer`,children:[(0,k.jsx)(m,{name:`external`}),`Issues`]}),(0,k.jsxs)(`a`,{className:`btn ghost`,href:e+`/blob/main/LICENSE`,target:`_blank`,rel:`noreferrer`,children:[(0,k.jsx)(m,{name:`external`}),`MIT License`]})]})]})]}),(0,k.jsxs)(`div`,{className:`card pad-lg`,children:[(0,k.jsx)(`div`,{className:`card-head`,children:(0,k.jsx)(`h3`,{children:`Creator`})}),(0,k.jsxs)(`p`,{className:`sub mb-16`,children:[`Geneseed is built by `,(0,k.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,k.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,k.jsx)(`div`,{className:`row wrap gap-10`,children:(0,k.jsxs)(`a`,{className:`btn ghost`,href:J,target:`_blank`,rel:`noreferrer`,children:[(0,k.jsx)(m,{name:`github`}),`@Arylmera on GitHub`]})})]})]})}function X({overview:e,onAction:t,flavour:n,onFlavour:r,accentMode:a,onAccentMode:o,layout:s,onLayout:c}){let u=h(),d=e?.install,f=e?.footprint,p=async e=>{d&&e!==f&&await u(`Rebuild ${d.host} · ${d.scope} with the “${e}” footprint? It rebuilds in place, non-destructive.`,{title:`Change the footprint?`,confirmLabel:`Rebuild`})&&t?.(`install`,{...d,footprint:e})};return(0,k.jsxs)(`div`,{className:`narrow-lg`,children:[(0,k.jsx)(`div`,{className:`head-row mb-18`,children:(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h2`,{className:`h`,children:`Settings`}),(0,k.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,k.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,k.jsx)(`div`,{className:`card-head`,children:(0,k.jsx)(`h3`,{children:`Console direction`})}),(0,k.jsxs)(`p`,{className:`sub mb-16`,children:[g.length,` takes on the same data. Pick a direction; it applies instantly and persists across reloads.`]}),a&&o&&(0,k.jsxs)(`div`,{className:`dir-layout`,children:[(0,k.jsx)(`span`,{className:`tick`,id:`dir-accent-label`,children:`Accent`}),(0,k.jsx)(_,{value:a,onChange:o,labelledBy:`dir-accent-label`}),(0,k.jsx)(`span`,{className:`dir-layout-note sub`,role:`status`,"aria-live":`polite`,children:l(a)})]}),s&&c&&(0,k.jsxs)(`div`,{className:`dir-layout`,children:[(0,k.jsx)(`span`,{className:`tick`,id:`dir-layout-label`,children:`Overview view`}),(0,k.jsx)(i,{"aria-labelledby":`dir-layout-label`,children:v.map(e=>(0,k.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,k.jsx)(`span`,{className:`dir-layout-note sub`,role:`status`,"aria-live":`polite`,children:v.find(e=>e.id===s)?.tagline??``})]}),(0,k.jsx)(`div`,{className:`dir-grid`,children:g.map(e=>(0,k.jsxs)(`button`,{className:`dir-tile dir-${e.id} ${n===e.id?`on`:``}`,onClick:()=>r(e.id),"aria-pressed":n===e.id,children:[(0,k.jsxs)(`span`,{className:`dir-thumb`,"aria-hidden":`true`,children:[(0,k.jsx)(`span`,{className:`dir-thumb-rail`}),(0,k.jsx)(`span`,{className:`dir-thumb-bar`}),(0,k.jsx)(`span`,{className:`dir-thumb-bar`,style:{width:`70%`}}),(0,k.jsx)(`span`,{className:`dir-thumb-bar`,style:{width:`52%`}}),(0,k.jsx)(`span`,{className:`dir-thumb-dot`})]}),(0,k.jsxs)(`span`,{className:`dir-meta`,children:[(0,k.jsxs)(`span`,{className:`dir-name`,children:[e.short,n===e.id&&(0,k.jsx)(`span`,{className:`dir-check`,children:`● active`})]}),(0,k.jsx)(`span`,{className:`dir-tag`,children:e.tagline})]})]},e.id))})]}),d&&f&&(0,k.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,k.jsx)(`div`,{className:`card-head`,children:(0,k.jsx)(`h3`,{children:`Harness footprint`})}),(0,k.jsxs)(`p`,{className:`sub mb-16`,children:[`How much of the Rules `,(0,k.jsx)(`code`,{children:`AGENT.md`}),` carries inline each turn, for the current install (`,(0,k.jsxs)(`code`,{children:[d.host,` · `,d.scope]}),`). A token-cost dial; every Rule stays in force either way. Changing it rebuilds the install in place. `,(0,k.jsx)(`a`,{href:`#/docs/footprint`,children:`Learn more →`})]}),(0,k.jsxs)(`div`,{className:`dir-layout`,children:[(0,k.jsx)(`span`,{className:`tick`,id:`footprint-label`,children:`Footprint`}),(0,k.jsx)(i,{"aria-labelledby":`footprint-label`,children:[`lean`,`full`].map(e=>(0,k.jsx)(`button`,{className:f===e?`on`:``,onClick:()=>p(e),"aria-pressed":f===e,children:e},e))}),(0,k.jsx)(`span`,{className:`dir-layout-note sub`,role:`status`,"aria-live":`polite`,children:f===`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,k.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,k.jsx)(`div`,{className:`card-head`,children:(0,k.jsx)(`h3`,{children:`Maintenance`})}),(0,k.jsxs)(`p`,{className:`sub mb-16`,children:[`Update this Geneseed copy, or add `,(0,k.jsx)(`code`,{children:`geneseed`}),` to your PATH (or remove it) so it runs from any directory. Each runs live in the console.`]}),(0,k.jsxs)(`p`,{className:`sub mb-16`,children:[`Each install has its own Uninstall in `,(0,k.jsx)(`a`,{href:`#/installs`,children:`Hosts`}),`.`]}),(0,k.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,k.jsxs)(`button`,{className:`btn ghost`,onClick:()=>t(`update`),children:[(0,k.jsx)(m,{name:`download`}),`Update (git pull + rebuild)`]}),(0,k.jsxs)(`button`,{className:`btn ghost`,onClick:()=>t(`link`),children:[(0,k.jsx)(m,{name:`external`}),`Add to PATH`]}),(0,k.jsx)(`button`,{className:`btn ghost`,onClick:()=>t(`unlink`),children:`Remove from PATH`})]})]}),(0,k.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,k.jsx)(`div`,{className:`card-head`,children:(0,k.jsx)(`h3`,{children:`Server`})}),(0,k.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,k.jsx)(K,{})]}),(0,k.jsx)(Y,{})]})}function Z({tab:e=`hosts`,overview:t,setup:n,themes:r,onAction:i,onMutated:a,dataRev:o,appearance:s={}}){let c=t?.doctor,l=t?.diff,u={edits:l?y(l):null,doctor:c?c.ok?`clean`:c.problems.length:null};return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`div`,{className:`page-head`,children:(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h1`,{className:`h`,children:`Installs`}),(0,k.jsx)(`p`,{className:`sub`,children:`Where the harness lives on this machine, and how each copy is built.`})]})}),(0,k.jsx)(b,{page:`installs`,current:e,badges:u,label:`Installs`}),e===`hosts`&&(0,k.jsx)(B,{onAction:i,themes:r,currentTheme:t?.theme,overview:t,setup:n,dataRev:o,onMutated:a}),e===`kits`&&(0,k.jsx)(V,{onAction:i,dataRev:o}),e===`edits`&&(0,k.jsx)(U,{onMutated:a,onAction:i,dataRev:o}),e===`doctor`&&(0,k.jsx)(G,{}),e===`server`&&(0,k.jsx)(X,{overview:t,onAction:i,...s})]})}export{Z 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{t as i}from"./drawable-CUtqWN8k.js";import{n as a}from"./sections-ChwaobfW.js";import{At as o,Ct as s,Et as c,G as l,Nt as u,Ot as d,Q as f,St as p,Tt as m,U as h,W as g,_t as _,at as v,bt as y,ct as b,dt as x,ft as S,gt as C,ht as w,jt as T,lt as E,mt as D,nt as O,ot as k,pt as A,st as j,tt as M,ut as N,vt as P,wt as F,xt as I,y as L,yt as R}from"./index-D7KB52Os.js";import{n as z}from"./Dashboard-CLs-bR_v.js";function B(e){return P((e.iterationDuration+e._loopDelay)*e.iterationCount-e._loopDelay)||1e-11}function V(e,t,n,r,i,a){let o=I(e.duration)&&e.duration<=1e-11?n-T:n;t.composition&&w(t,o,1,1,u.AUTO);let s=r?new b(r,e,t,o,!1,i,a):new S(e,t,o);return t.composition&&s.init(!0),_(t,s),R(t,e=>{let n=e._offset+e._delay+e.duration;n>t.iterationDuration&&(t.iterationDuration=n)}),t.duration=B(t),t}var H=0,U=class extends S{constructor(e={}){super(e,null,0),++H,this.id=F(e.id)?H:e.id,this.duration=0,this.labels={};let t=e.defaults,n=d.defaults;this.defaults=t?m(t,n):n,this.composition=C(e.composition,!0),this.onRender=e.onRender||n.onRender;let r=C(e.playbackEase,n.playbackEase);this._ease=r?N(r):null,this.iterationDuration=0}add(e,t,n){let r=p(t),i=p(e);if(r||i){if(this._hasChildren=!0,r){let r=t,i=d.editor&&d.editor.addTimelineChild,a=n&&n.type===`Stagger`&&d.editor,o=y(n)?n:null;if(o||a){let t=x(e),a=this.duration,s=this.iterationDuration,c=r.id,l=0,u=t.length,f=i?i(e,r,this.id,n,u):null,p=o||d.editor.resolveStagger(n.defaultValue);t.forEach(e=>{let n={...f||r};this.duration=a,this.iterationDuration=s,F(c)||(n.id=c+`-`+l);let i=j(this,p(e,l,t,null,this));V(n,this,i,e,l,t),l++})}else{let t=i?i(e,r,this.id,n):r,a=n&&n.type?n.defaultValue:n;V(t,this,j(this,a),e)}}else V(e,this,j(this,t));return this.composition&&this.init(!0),this}}sync(e,t){if(F(e)||e&&F(e.pause))return this;e.pause();let n=+(e.effect?e.effect.getTiming().duration:e.duration);!F(e)&&!F(e.persist)&&(e.persist=!0);let r=d.editor,i=r&&r.addTimelineChild;r&&r.addTimelineSync&&(t=r.addTimelineSync(e,t,this.id),r.addTimelineChild=null);let a=this.add(e,{currentTime:[0,n],duration:n,delay:0,ease:`linear`,playbackEase:`linear`},t);return r&&(r.addTimelineChild=i),a}set(e,t,n){return F(t)?this:(t.duration=T,t.composition=o.replace,this.add(e,t,n))}call(e,t){return F(e)||e&&!y(e)?this:(d.editor&&d.editor.addTimelineCall&&(t=d.editor.addTimelineCall(e,t,this.id)),this.add({duration:0,delay:0,onComplete:()=>e(this)},t))}label(e,t){return F(e)||e&&!s(e)?this:(d.editor&&d.editor.addTimelineLabel&&(t=d.editor.addTimelineLabel(e,t,this.id)),this.labels[e]=j(this,t),this)}remove(e,t){return A(x(e),this,t),this}stretch(e){let t=this.duration;if(t===c(e))return this;let n=e/t,r=this.labels;R(this,e=>e.stretch(e.duration*n));for(let e in r)r[e]*=n;return super.stretch(e)}refresh(){return R(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),R(this,e=>e.revert,!0),D(this)}then(e){return super.then(e)}},W=e=>d.editor?d.editor.addTimeline(e):new U(e).init(),G=e(t(),1),K=n(),q=.62,J=(e,t)=>String(e).length*t*q;function Y(e,t){let n=0;for(let t of e){if(t.t===``||t.t==null)continue;let e=J(t.t,t.size)/2;n=Math.max(n,Math.hypot(e,t.dy-t.size*.75),Math.hypot(e,t.dy+t.size*.25))}return Math.ceil(n+t)}function X(e,t,n=0){let r=t.x-e.x,i=t.y-e.y,a=Math.hypot(r,i)||1,o=r/a,s=i/a,c=e.x+o*e.r,l=e.y+s*e.r,u=t.x-o*t.r,d=t.y-s*t.r,f=n*a,p=e=>e.toFixed(1);return`M${p(c)} ${p(l)} C${p(c+o*a*.3-s*f)} ${p(l+s*a*.3+o*f)} ${p(u-o*a*.3-s*f)} ${p(d-s*a*.3+o*f)} ${p(u)} ${p(d)}`}var Z=!1,Q=!1,ee=850;function $({hash:e,label:t,part:n,children:r}){return(0,K.jsx)(`g`,{className:`cm-node`,"data-cm":n,role:`button`,tabIndex:0,"aria-label":t,onClick:()=>f(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),f(e))},children:r})}function te({overview:e,dataRev:t}){let{data:n}=l(()=>r.catalog(`laws`),[t],`catalog:laws`),a=n?.items??null,o=(0,G.useRef)(null),s=(0,G.useRef)(!0),c=(0,G.useRef)(null);(0,G.useLayoutEffect)(()=>{let e=o.current;if(!e||Z||!M())return;Z=!0;let t=t=>[...e.querySelectorAll(t)],n=t(`[data-cm="hub"]`),r=t(`[data-cm="sat"]`),a=t(`[data-cm="gov"]`),l=t(`.cm-edge-gov`),u=t(`.cm-note, .cm-govern-label`),d=i(t(`.cm-edge`));k([...n,...r,...a],{opacity:0,scale:.7}),k([...l,...u],{opacity:0}),k(d,{draw:`0 0`});let f=W({autoplay:!1,defaults:{ease:`outExpo`}}).add(n,{opacity:1,scale:1,duration:450},0).add(d,{draw:`0 1`,duration:380,delay:v(70)},140).add(r,{opacity:1,scale:1,duration:420,delay:v(70)},260).add(l,{opacity:1,duration:300,delay:v(50)},420).add(a,{opacity:1,scale:1,duration:380,delay:v(50)},470).add(u,{opacity:1,duration:300},520);s.current=!1;let p=()=>f.complete(),m=()=>{f.play(),p=O(f,ee),s.current=!0,c.current?.()};if(typeof IntersectionObserver>`u`)return m(),()=>p();let h=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(h.disconnect(),m())},{threshold:.33});return h.observe(e),()=>{h.disconnect(),s.current=!0,p()}},[]);let u=e?.counts||{},d=g(u),f=[];for(let e of(a||[]).filter(e=>e.tier===`doctrine`)){let t=f.find(t=>t.id===e.pack);t||f.push(t={id:e.pack,on:0}),e.active!==!1&&(t.on+=1)}let p=e?.footprint===`lean`?`lean — first line only`:`full text inlined`,m={x:330,y:165,r:Y([{t:`Constitution`,size:17,dy:-12},{t:`${d} rules in force`,size:10,dy:8},{t:p,size:8.5,dy:24}],12)},h={x:126,y:95,r:Y([{t:`Ethos`,size:12.5,dy:-7},{t:`${u.ontology??0} sections`,size:10,dy:10}],11)},_={x:560,y:78,r:Y([{t:`Dictates`,size:12.5,dy:-6},{t:`${u.laws??0}`,size:13,dy:12}],11)},y={x:560,y:252,r:Y([{t:`Doctrines`,size:12.5,dy:-6},{t:`${u.doctrines?.rules??0}`,size:13,dy:12}],11)},b=(e,t,n,r)=>({x:e,y:t,label:n,count:r,r:Y([{t:n,size:10.5,dy:-2},{t:`${r}`,size:9,dy:10}],9)}),x=[{...b(812,52,`Skills`,u.skills??0),hash:`#/skills`,from:_},{...b(820,126,`Agents`,u.agents??0),hash:`#/agents`,from:_},{...b(816,232,`Memory`,u.memory??0),hash:`#/section/memory`,from:y},{...b(812,300,`Wiki`,u.wiki??0),hash:`#/section/wiki`,from:y}],S={rx:122,ry:68,from:212,to:112},C=f.map((e,t)=>{let n=(f.length===1?(S.from+S.to)/2:S.from+(S.to-S.from)*t/(f.length-1))*Math.PI/180;return{...e,x:y.x+S.rx*Math.cos(n),y:y.y+S.ry*Math.sin(n),r:Y([{t:e.id,size:7.5,dy:-2},{t:`${e.on}`,size:7.5,dy:8}],4)}}),w=C.length;return(0,G.useLayoutEffect)(()=>{let e=o.current;if(!e||!w||Q||!M())return;Q=!0;let t=[...e.querySelectorAll(`.cm-mini > g`)];k(t,{opacity:0,scale:.5});let n=()=>k(t,{opacity:1,scale:1}),r=()=>{c.current=null;let e=E(t,{opacity:1,scale:1,duration:380,delay:v(45,{start:420}),ease:`outExpo`});n=O(e,420+45*w+380)};return s.current?r():c.current=r,()=>{c.current=null,n()}},[w]),(0,K.jsxs)(`svg`,{ref:o,className:`cmap`,viewBox:`0 0 940 350`,role:`group`,"aria-label":`The constitution map`,children:[(0,K.jsx)(`path`,{d:X(m,h,.05),className:`cm-edge`}),(0,K.jsx)(`path`,{d:X(m,_,-.07),className:`cm-edge`}),(0,K.jsx)(`path`,{d:X(m,y,.07),className:`cm-edge`}),x.map(e=>(0,K.jsx)(`path`,{d:X(e.from,e,.03),className:`cm-edge-gov`},`e-${e.label}`)),(0,K.jsxs)($,{hash:`#/laws`,part:`hub`,label:`Constitution: ${d} rules in force`,children:[(0,K.jsx)(`circle`,{cx:m.x,cy:m.y,r:m.r,className:`cm-hub-disc`}),(0,K.jsx)(`text`,{x:m.x,y:m.y-12,textAnchor:`middle`,className:`cm-hub-name`,children:`Constitution`}),(0,K.jsxs)(`text`,{x:m.x,y:m.y+8,textAnchor:`middle`,className:`cm-hub-num`,children:[d,` rules in force`]}),(0,K.jsx)(`text`,{x:m.x,y:m.y+24,textAnchor:`middle`,className:`cm-note`,children:p})]}),(0,K.jsxs)($,{hash:`#/laws`,part:`sat`,label:`Ethos: ${u.ontology??0} sections`,children:[(0,K.jsx)(`circle`,{cx:h.x,cy:h.y,r:h.r,className:`cm-sat-disc`}),(0,K.jsx)(`text`,{x:h.x,y:h.y-7,textAnchor:`middle`,className:`cm-sat-name`,children:`Ethos`}),(0,K.jsxs)(`text`,{x:h.x,y:h.y+10,textAnchor:`middle`,className:`cm-sat-num`,children:[u.ontology??0,` sections`]})]}),(0,K.jsx)(`text`,{x:h.x,y:h.y+h.r+16,textAnchor:`middle`,className:`cm-note`,children:`how it thinks, not a rule`}),(0,K.jsxs)($,{hash:`#/laws`,part:`sat`,label:`Dictates: ${u.laws??0}, never broken`,children:[(0,K.jsx)(`circle`,{cx:_.x,cy:_.y,r:_.r,className:`cm-sat-disc`}),(0,K.jsx)(`text`,{x:_.x,y:_.y-6,textAnchor:`middle`,className:`cm-sat-name`,children:`Dictates`}),(0,K.jsx)(`text`,{x:_.x,y:_.y+12,textAnchor:`middle`,className:`cm-sat-big`,children:u.laws??0})]}),(0,K.jsx)(`text`,{x:_.x,y:_.y+_.r+16,textAnchor:`middle`,className:`cm-note`,children:`never broken`}),(0,K.jsxs)($,{hash:`#/laws`,part:`sat`,label:`Doctrines: ${u.doctrines?.rules??0} rules chosen at build`,children:[(0,K.jsx)(`circle`,{cx:y.x,cy:y.y,r:y.r,className:`cm-sat-disc`}),(0,K.jsx)(`text`,{x:y.x,y:y.y-6,textAnchor:`middle`,className:`cm-sat-name`,children:`Doctrines`}),(0,K.jsx)(`text`,{x:y.x,y:y.y+12,textAnchor:`middle`,className:`cm-sat-big`,children:u.doctrines?.rules??0})]}),(0,K.jsx)(`text`,{x:y.x+22,y:y.y+y.r+20,className:`cm-note`,children:u.doctrines?`chosen at build · ${u.doctrines.active}/${u.doctrines.total} packs lit`:`chosen at build`}),(0,K.jsx)(`g`,{className:`cm-mini`,children:C.map(e=>(0,K.jsxs)(`g`,{children:[(0,K.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r,className:`cm-pack-disc`,style:{stroke:L(e.id)}}),(0,K.jsx)(`text`,{x:e.x,y:e.y-2,textAnchor:`middle`,className:`cm-pack-id`,children:e.id}),(0,K.jsx)(`text`,{x:e.x,y:e.y+8,textAnchor:`middle`,style:{fill:L(e.id)},children:e.on})]},e.id))}),(0,K.jsx)(`text`,{x:866,y:16,textAnchor:`middle`,className:`cm-govern-label`,children:`GOVERNS THE HARNESS`}),x.map(e=>(0,K.jsxs)($,{hash:e.hash,part:`gov`,label:`${e.label}: ${e.count}`,children:[(0,K.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r,className:`cm-gov-disc`}),(0,K.jsx)(`text`,{x:e.x,y:e.y-2,textAnchor:`middle`,className:`cm-gov-name`,children:e.label}),(0,K.jsx)(`text`,{x:e.x,y:e.y+10,textAnchor:`middle`,className:`cm-gov-num`,children:e.count})]},e.label)),(0,K.jsx)(`text`,{x:h.x,y:228,textAnchor:`middle`,className:`cm-note`,children:`tap any node to open its ledger`})]})}function ne(){let e=new Date,t=e=>String(e).padStart(2,`0`);return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function re({counts:e}){let t=[{label:a.skills.label,n:e.skills??0,hash:`#/skills`},{label:`Rules in force`,n:g(e),hash:`#/laws`},{label:a.agents.label,n:e.agents??0,hash:`#/agents`},{label:a.memory.label,n:e.memory??0,hash:`#/section/memory`},{label:a.notebook.label,n:e.notebook??0,hash:`#/section/notebook`},{label:a.wiki.label,n:e.wiki??0,hash:`#/section/wiki`},{label:a.config.label,n:e.config??0,hash:`#/section/config`}],n=Math.max(...t.map(e=>e.n),1);return(0,K.jsxs)(`div`,{className:`card pad-lg jr-card`,children:[(0,K.jsxs)(`div`,{className:`card-head`,children:[(0,K.jsx)(`h3`,{children:`Growth rings`}),(0,K.jsx)(`span`,{className:`tick right`,children:`by section`})]}),t.map(e=>(0,K.jsxs)(`button`,{className:`jr-ring`,onClick:()=>f(e.hash),children:[(0,K.jsx)(`span`,{className:`jr-ring-label`,children:e.label}),(0,K.jsx)(`span`,{className:`jr-ring-track`,children:(0,K.jsx)(`span`,{className:`jr-ring-fill`,style:{width:`${e.n/n*100}%`}})}),(0,K.jsx)(`span`,{className:`jr-ring-num`,children:e.n})]},e.label))]})}function ie({recent:e,buildEpoch:t}){let n=e?.items||[],r=e?.skipped||[];return(0,K.jsxs)(`div`,{className:`card pad-lg jr-card`,children:[(0,K.jsxs)(`div`,{className:`card-head`,children:[(0,K.jsx)(`h3`,{children:`Freshly grown`}),(0,K.jsx)(`span`,{className:`tick right`,children:`newest`})]}),e?n.length===0?(0,K.jsx)(`p`,{className:`sub`,children:`Nothing here carries a date yet.`}):n.slice(0,5).map(e=>(0,K.jsxs)(`button`,{className:`jr-fresh`,onClick:()=>f(`#/item/${e.type}/${encodeURIComponent(e.name)}`),children:[(0,K.jsx)(`span`,{className:`jr-fresh-kind`,children:e.section}),(0,K.jsx)(`span`,{className:`jr-fresh-name`,children:e.title}),(0,K.jsx)(`span`,{className:`jr-fresh-when`,children:h(e.mtime)})]},`${e.section}:${e.name}`)):(0,K.jsx)(`p`,{className:`sub`,children:`Reading the shelves…`}),r.length>0&&(0,K.jsxs)(`p`,{className:`sub jr-skipped`,children:[`Not dated: `,r.join(`, `),` — too many files to stat on every load.`]}),(0,K.jsxs)(`p`,{className:`jr-care`,children:[t?`Last built ✓ ${h(t)}`:`Never built here`,` ·`,` `,(0,K.jsx)(`button`,{className:`jr-go`,onClick:()=>f(`#/activity`),children:`log →`})]})]})}function ae({overview:e,recent:t,lens:n,onAction:r,onDirection:i,dataRev:a}){let o=e?.counts||{};return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`head-row jr-head`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`eyebrow`,children:[`Field journal · `,ne()]}),(0,K.jsx)(`h1`,{className:`h`,children:`Today in this harness`}),(0,K.jsx)(z,{verdict:n?.verdict})]}),(0,K.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,K.jsx)(`button`,{className:`btn primary`,onClick:()=>r?.(`update`),children:`Update & rebuild`}),(0,K.jsx)(`button`,{className:`btn`,onClick:()=>f(`#/doctor`),children:`Doctor`})]})]}),(0,K.jsxs)(`div`,{className:`jr-row2`,children:[(0,K.jsx)(re,{counts:o}),(0,K.jsx)(ie,{recent:t,buildEpoch:e?.build_epoch})]}),(0,K.jsxs)(`div`,{className:`card pad-lg jr-map`,children:[(0,K.jsxs)(`div`,{className:`card-head`,children:[(0,K.jsx)(`h3`,{children:`The Constitution — and the harness it governs`}),(0,K.jsx)(`button`,{className:`jr-go right`,onClick:()=>f(`#/laws`),children:`open →`})]}),(0,K.jsx)(te,{overview:e,dataRev:a})]}),(0,K.jsxs)(`p`,{className:`sub jr-others`,children:[`Other views:`,` `,(0,K.jsx)(`button`,{className:`jr-go`,onClick:()=>i?.(`lineage`),children:`Lineage`}),` `,`·`,` `,(0,K.jsx)(`button`,{className:`jr-go`,onClick:()=>i?.(`operator`),children:`Operator`})]})]})}export{ae as default};
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{t as i}from"./drawable-CuQpH-f5.js";import{n as a}from"./sections-ChwaobfW.js";import{At as o,Ct as s,Et as c,G as l,Nt as u,Ot as d,Q as f,St as p,Tt as m,U as h,W as g,_t as _,at as v,bt as y,ct as b,dt as x,ft as S,gt as C,ht as w,jt as T,lt as E,mt as D,nt as O,ot as k,pt as A,st as j,tt as M,ut as N,vt as P,wt as F,xt as I,y as L,yt as R}from"./index--3760QWr.js";import{n as z}from"./Dashboard-Ds7_blrK.js";function B(e){return P((e.iterationDuration+e._loopDelay)*e.iterationCount-e._loopDelay)||1e-11}function V(e,t,n,r,i,a){let o=I(e.duration)&&e.duration<=1e-11?n-T:n;t.composition&&w(t,o,1,1,u.AUTO);let s=r?new b(r,e,t,o,!1,i,a):new S(e,t,o);return t.composition&&s.init(!0),_(t,s),R(t,e=>{let n=e._offset+e._delay+e.duration;n>t.iterationDuration&&(t.iterationDuration=n)}),t.duration=B(t),t}var H=0,U=class extends S{constructor(e={}){super(e,null,0),++H,this.id=F(e.id)?H:e.id,this.duration=0,this.labels={};let t=e.defaults,n=d.defaults;this.defaults=t?m(t,n):n,this.composition=C(e.composition,!0),this.onRender=e.onRender||n.onRender;let r=C(e.playbackEase,n.playbackEase);this._ease=r?N(r):null,this.iterationDuration=0}add(e,t,n){let r=p(t),i=p(e);if(r||i){if(this._hasChildren=!0,r){let r=t,i=d.editor&&d.editor.addTimelineChild,a=n&&n.type===`Stagger`&&d.editor,o=y(n)?n:null;if(o||a){let t=x(e),a=this.duration,s=this.iterationDuration,c=r.id,l=0,u=t.length,f=i?i(e,r,this.id,n,u):null,p=o||d.editor.resolveStagger(n.defaultValue);t.forEach(e=>{let n={...f||r};this.duration=a,this.iterationDuration=s,F(c)||(n.id=c+`-`+l);let i=j(this,p(e,l,t,null,this));V(n,this,i,e,l,t),l++})}else{let t=i?i(e,r,this.id,n):r,a=n&&n.type?n.defaultValue:n;V(t,this,j(this,a),e)}}else V(e,this,j(this,t));return this.composition&&this.init(!0),this}}sync(e,t){if(F(e)||e&&F(e.pause))return this;e.pause();let n=+(e.effect?e.effect.getTiming().duration:e.duration);!F(e)&&!F(e.persist)&&(e.persist=!0);let r=d.editor,i=r&&r.addTimelineChild;r&&r.addTimelineSync&&(t=r.addTimelineSync(e,t,this.id),r.addTimelineChild=null);let a=this.add(e,{currentTime:[0,n],duration:n,delay:0,ease:`linear`,playbackEase:`linear`},t);return r&&(r.addTimelineChild=i),a}set(e,t,n){return F(t)?this:(t.duration=T,t.composition=o.replace,this.add(e,t,n))}call(e,t){return F(e)||e&&!y(e)?this:(d.editor&&d.editor.addTimelineCall&&(t=d.editor.addTimelineCall(e,t,this.id)),this.add({duration:0,delay:0,onComplete:()=>e(this)},t))}label(e,t){return F(e)||e&&!s(e)?this:(d.editor&&d.editor.addTimelineLabel&&(t=d.editor.addTimelineLabel(e,t,this.id)),this.labels[e]=j(this,t),this)}remove(e,t){return A(x(e),this,t),this}stretch(e){let t=this.duration;if(t===c(e))return this;let n=e/t,r=this.labels;R(this,e=>e.stretch(e.duration*n));for(let e in r)r[e]*=n;return super.stretch(e)}refresh(){return R(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),R(this,e=>e.revert,!0),D(this)}then(e){return super.then(e)}},W=e=>d.editor?d.editor.addTimeline(e):new U(e).init(),G=e(t(),1),K=n(),q=.62,J=(e,t)=>String(e).length*t*q;function Y(e,t){let n=0;for(let t of e){if(t.t===``||t.t==null)continue;let e=J(t.t,t.size)/2;n=Math.max(n,Math.hypot(e,t.dy-t.size*.75),Math.hypot(e,t.dy+t.size*.25))}return Math.ceil(n+t)}function X(e,t,n=0){let r=t.x-e.x,i=t.y-e.y,a=Math.hypot(r,i)||1,o=r/a,s=i/a,c=e.x+o*e.r,l=e.y+s*e.r,u=t.x-o*t.r,d=t.y-s*t.r,f=n*a,p=e=>e.toFixed(1);return`M${p(c)} ${p(l)} C${p(c+o*a*.3-s*f)} ${p(l+s*a*.3+o*f)} ${p(u-o*a*.3-s*f)} ${p(d-s*a*.3+o*f)} ${p(u)} ${p(d)}`}var Z=!1,Q=!1,ee=850;function $({hash:e,label:t,part:n,children:r}){return(0,K.jsx)(`g`,{className:`cm-node`,"data-cm":n,role:`button`,tabIndex:0,"aria-label":t,onClick:()=>f(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),f(e))},children:r})}function te({overview:e,dataRev:t}){let{data:n}=l(()=>r.catalog(`laws`),[t],`catalog:laws`),a=n?.items??null,o=(0,G.useRef)(null),s=(0,G.useRef)(!0),c=(0,G.useRef)(null);(0,G.useLayoutEffect)(()=>{let e=o.current;if(!e||Z||!M())return;Z=!0;let t=t=>[...e.querySelectorAll(t)],n=t(`[data-cm="hub"]`),r=t(`[data-cm="sat"]`),a=t(`[data-cm="gov"]`),l=t(`.cm-edge-gov`),u=t(`.cm-note, .cm-govern-label`),d=i(t(`.cm-edge`));k([...n,...r,...a],{opacity:0,scale:.7}),k([...l,...u],{opacity:0}),k(d,{draw:`0 0`});let f=W({autoplay:!1,defaults:{ease:`outExpo`}}).add(n,{opacity:1,scale:1,duration:450},0).add(d,{draw:`0 1`,duration:380,delay:v(70)},140).add(r,{opacity:1,scale:1,duration:420,delay:v(70)},260).add(l,{opacity:1,duration:300,delay:v(50)},420).add(a,{opacity:1,scale:1,duration:380,delay:v(50)},470).add(u,{opacity:1,duration:300},520);s.current=!1;let p=()=>f.complete(),m=()=>{f.play(),p=O(f,ee),s.current=!0,c.current?.()};if(typeof IntersectionObserver>`u`)return m(),()=>p();let h=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(h.disconnect(),m())},{threshold:.33});return h.observe(e),()=>{h.disconnect(),s.current=!0,p()}},[]);let u=e?.counts||{},d=g(u),f=[];for(let e of(a||[]).filter(e=>e.tier===`doctrine`)){let t=f.find(t=>t.id===e.pack);t||f.push(t={id:e.pack,on:0}),e.active!==!1&&(t.on+=1)}let p=e?.footprint===`lean`?`lean — first line only`:`full text inlined`,m={x:330,y:165,r:Y([{t:`Constitution`,size:17,dy:-12},{t:`${d} rules in force`,size:10,dy:8},{t:p,size:8.5,dy:24}],12)},h={x:126,y:95,r:Y([{t:`Ethos`,size:12.5,dy:-7},{t:`${u.ontology??0} sections`,size:10,dy:10}],11)},_={x:560,y:78,r:Y([{t:`Dictates`,size:12.5,dy:-6},{t:`${u.laws??0}`,size:13,dy:12}],11)},y={x:560,y:252,r:Y([{t:`Doctrines`,size:12.5,dy:-6},{t:`${u.doctrines?.rules??0}`,size:13,dy:12}],11)},b=(e,t,n,r)=>({x:e,y:t,label:n,count:r,r:Y([{t:n,size:10.5,dy:-2},{t:`${r}`,size:9,dy:10}],9)}),x=[{...b(812,52,`Skills`,u.skills??0),hash:`#/skills`,from:_},{...b(820,126,`Agents`,u.agents??0),hash:`#/agents`,from:_},{...b(816,232,`Memory`,u.memory??0),hash:`#/section/memory`,from:y},{...b(812,300,`Wiki`,u.wiki??0),hash:`#/section/wiki`,from:y}],S={rx:122,ry:68,from:212,to:112},C=f.map((e,t)=>{let n=(f.length===1?(S.from+S.to)/2:S.from+(S.to-S.from)*t/(f.length-1))*Math.PI/180;return{...e,x:y.x+S.rx*Math.cos(n),y:y.y+S.ry*Math.sin(n),r:Y([{t:e.id,size:7.5,dy:-2},{t:`${e.on}`,size:7.5,dy:8}],4)}}),w=C.length;return(0,G.useLayoutEffect)(()=>{let e=o.current;if(!e||!w||Q||!M())return;Q=!0;let t=[...e.querySelectorAll(`.cm-mini > g`)];k(t,{opacity:0,scale:.5});let n=()=>k(t,{opacity:1,scale:1}),r=()=>{c.current=null;let e=E(t,{opacity:1,scale:1,duration:380,delay:v(45,{start:420}),ease:`outExpo`});n=O(e,420+45*w+380)};return s.current?r():c.current=r,()=>{c.current=null,n()}},[w]),(0,K.jsxs)(`svg`,{ref:o,className:`cmap`,viewBox:`0 0 940 350`,role:`group`,"aria-label":`The constitution map`,children:[(0,K.jsx)(`path`,{d:X(m,h,.05),className:`cm-edge`}),(0,K.jsx)(`path`,{d:X(m,_,-.07),className:`cm-edge`}),(0,K.jsx)(`path`,{d:X(m,y,.07),className:`cm-edge`}),x.map(e=>(0,K.jsx)(`path`,{d:X(e.from,e,.03),className:`cm-edge-gov`},`e-${e.label}`)),(0,K.jsxs)($,{hash:`#/laws`,part:`hub`,label:`Constitution: ${d} rules in force`,children:[(0,K.jsx)(`circle`,{cx:m.x,cy:m.y,r:m.r,className:`cm-hub-disc`}),(0,K.jsx)(`text`,{x:m.x,y:m.y-12,textAnchor:`middle`,className:`cm-hub-name`,children:`Constitution`}),(0,K.jsxs)(`text`,{x:m.x,y:m.y+8,textAnchor:`middle`,className:`cm-hub-num`,children:[d,` rules in force`]}),(0,K.jsx)(`text`,{x:m.x,y:m.y+24,textAnchor:`middle`,className:`cm-note`,children:p})]}),(0,K.jsxs)($,{hash:`#/laws`,part:`sat`,label:`Ethos: ${u.ontology??0} sections`,children:[(0,K.jsx)(`circle`,{cx:h.x,cy:h.y,r:h.r,className:`cm-sat-disc`}),(0,K.jsx)(`text`,{x:h.x,y:h.y-7,textAnchor:`middle`,className:`cm-sat-name`,children:`Ethos`}),(0,K.jsxs)(`text`,{x:h.x,y:h.y+10,textAnchor:`middle`,className:`cm-sat-num`,children:[u.ontology??0,` sections`]})]}),(0,K.jsx)(`text`,{x:h.x,y:h.y+h.r+16,textAnchor:`middle`,className:`cm-note`,children:`how it thinks, not a rule`}),(0,K.jsxs)($,{hash:`#/laws`,part:`sat`,label:`Dictates: ${u.laws??0}, never broken`,children:[(0,K.jsx)(`circle`,{cx:_.x,cy:_.y,r:_.r,className:`cm-sat-disc`}),(0,K.jsx)(`text`,{x:_.x,y:_.y-6,textAnchor:`middle`,className:`cm-sat-name`,children:`Dictates`}),(0,K.jsx)(`text`,{x:_.x,y:_.y+12,textAnchor:`middle`,className:`cm-sat-big`,children:u.laws??0})]}),(0,K.jsx)(`text`,{x:_.x,y:_.y+_.r+16,textAnchor:`middle`,className:`cm-note`,children:`never broken`}),(0,K.jsxs)($,{hash:`#/laws`,part:`sat`,label:`Doctrines: ${u.doctrines?.rules??0} rules chosen at build`,children:[(0,K.jsx)(`circle`,{cx:y.x,cy:y.y,r:y.r,className:`cm-sat-disc`}),(0,K.jsx)(`text`,{x:y.x,y:y.y-6,textAnchor:`middle`,className:`cm-sat-name`,children:`Doctrines`}),(0,K.jsx)(`text`,{x:y.x,y:y.y+12,textAnchor:`middle`,className:`cm-sat-big`,children:u.doctrines?.rules??0})]}),(0,K.jsx)(`text`,{x:y.x+22,y:y.y+y.r+20,className:`cm-note`,children:u.doctrines?`chosen at build · ${u.doctrines.active}/${u.doctrines.total} packs lit`:`chosen at build`}),(0,K.jsx)(`g`,{className:`cm-mini`,children:C.map(e=>(0,K.jsxs)(`g`,{children:[(0,K.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r,className:`cm-pack-disc`,style:{stroke:L(e.id)}}),(0,K.jsx)(`text`,{x:e.x,y:e.y-2,textAnchor:`middle`,className:`cm-pack-id`,children:e.id}),(0,K.jsx)(`text`,{x:e.x,y:e.y+8,textAnchor:`middle`,style:{fill:L(e.id)},children:e.on})]},e.id))}),(0,K.jsx)(`text`,{x:866,y:16,textAnchor:`middle`,className:`cm-govern-label`,children:`GOVERNS THE HARNESS`}),x.map(e=>(0,K.jsxs)($,{hash:e.hash,part:`gov`,label:`${e.label}: ${e.count}`,children:[(0,K.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r,className:`cm-gov-disc`}),(0,K.jsx)(`text`,{x:e.x,y:e.y-2,textAnchor:`middle`,className:`cm-gov-name`,children:e.label}),(0,K.jsx)(`text`,{x:e.x,y:e.y+10,textAnchor:`middle`,className:`cm-gov-num`,children:e.count})]},e.label)),(0,K.jsx)(`text`,{x:h.x,y:228,textAnchor:`middle`,className:`cm-note`,children:`tap any node to open its ledger`})]})}function ne(){let e=new Date,t=e=>String(e).padStart(2,`0`);return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function re({counts:e}){let t=[{label:a.skills.label,n:e.skills??0,hash:`#/skills`},{label:`Rules in force`,n:g(e),hash:`#/laws`},{label:a.agents.label,n:e.agents??0,hash:`#/agents`},{label:a.memory.label,n:e.memory??0,hash:`#/section/memory`},{label:a.notebook.label,n:e.notebook??0,hash:`#/section/notebook`},{label:a.wiki.label,n:e.wiki??0,hash:`#/section/wiki`},{label:a.config.label,n:e.config??0,hash:`#/section/config`}],n=Math.max(...t.map(e=>e.n),1);return(0,K.jsxs)(`div`,{className:`card pad-lg jr-card`,children:[(0,K.jsxs)(`div`,{className:`card-head`,children:[(0,K.jsx)(`h3`,{children:`Growth rings`}),(0,K.jsx)(`span`,{className:`tick right`,children:`by section`})]}),t.map(e=>(0,K.jsxs)(`button`,{className:`jr-ring`,onClick:()=>f(e.hash),children:[(0,K.jsx)(`span`,{className:`jr-ring-label`,children:e.label}),(0,K.jsx)(`span`,{className:`jr-ring-track`,children:(0,K.jsx)(`span`,{className:`jr-ring-fill`,style:{width:`${e.n/n*100}%`}})}),(0,K.jsx)(`span`,{className:`jr-ring-num`,children:e.n})]},e.label))]})}function ie({recent:e,buildEpoch:t}){let n=e?.items||[],r=e?.skipped||[];return(0,K.jsxs)(`div`,{className:`card pad-lg jr-card`,children:[(0,K.jsxs)(`div`,{className:`card-head`,children:[(0,K.jsx)(`h3`,{children:`Freshly grown`}),(0,K.jsx)(`span`,{className:`tick right`,children:`newest`})]}),e?n.length===0?(0,K.jsx)(`p`,{className:`sub`,children:`Nothing here carries a date yet.`}):n.slice(0,5).map(e=>(0,K.jsxs)(`button`,{className:`jr-fresh`,onClick:()=>f(`#/item/${e.type}/${encodeURIComponent(e.name)}`),children:[(0,K.jsx)(`span`,{className:`jr-fresh-kind`,children:e.section}),(0,K.jsx)(`span`,{className:`jr-fresh-name`,children:e.title}),(0,K.jsx)(`span`,{className:`jr-fresh-when`,children:h(e.mtime)})]},`${e.section}:${e.name}`)):(0,K.jsx)(`p`,{className:`sub`,children:`Reading the shelves…`}),r.length>0&&(0,K.jsxs)(`p`,{className:`sub jr-skipped`,children:[`Not dated: `,r.join(`, `),` — too many files to stat on every load.`]}),(0,K.jsxs)(`p`,{className:`jr-care`,children:[t?`Last built ✓ ${h(t)}`:`Never built here`,` ·`,` `,(0,K.jsx)(`button`,{className:`jr-go`,onClick:()=>f(`#/activity`),children:`log →`})]})]})}function ae({overview:e,recent:t,lens:n,onAction:r,onDirection:i,dataRev:a}){let o=e?.counts||{};return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`head-row jr-head`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`eyebrow`,children:[`Field journal · `,ne()]}),(0,K.jsx)(`h1`,{className:`h`,children:`Today in this harness`}),(0,K.jsx)(z,{verdict:n?.verdict})]}),(0,K.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,K.jsx)(`button`,{className:`btn primary`,onClick:()=>r?.(`update`),children:`Update & rebuild`}),(0,K.jsx)(`button`,{className:`btn`,onClick:()=>f(`#/doctor`),children:`Doctor`})]})]}),(0,K.jsxs)(`div`,{className:`jr-row2`,children:[(0,K.jsx)(re,{counts:o}),(0,K.jsx)(ie,{recent:t,buildEpoch:e?.build_epoch})]}),(0,K.jsxs)(`div`,{className:`card pad-lg jr-map`,children:[(0,K.jsxs)(`div`,{className:`card-head`,children:[(0,K.jsx)(`h3`,{children:`The Constitution — and the harness it governs`}),(0,K.jsx)(`button`,{className:`jr-go right`,onClick:()=>f(`#/laws`),children:`open →`})]}),(0,K.jsx)(te,{overview:e,dataRev:a})]}),(0,K.jsxs)(`p`,{className:`sub jr-others`,children:[`Other views:`,` `,(0,K.jsx)(`button`,{className:`jr-go`,onClick:()=>i?.(`lineage`),children:`Lineage`}),` `,`·`,` `,(0,K.jsx)(`button`,{className:`jr-go`,onClick:()=>i?.(`operator`),children:`Operator`})]})]})}export{ae as default};