geneseed 4.15.1 → 4.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/SHIPPED.md +1 -1
  3. package/docs/concepts/foreman-mode.md +6 -4
  4. package/docs/concepts/rules.md +2 -1
  5. package/docs/guides/upgrade.md +2 -0
  6. package/harness.config.json +1 -1
  7. package/js/inspect/cost.mjs +1 -1
  8. package/js/web/api.mjs +6 -2
  9. package/js/web/daemon.mjs +2 -2
  10. package/js/web/handler.mjs +11 -0
  11. package/package.json +1 -1
  12. package/src/AGENT.md.tmpl +2 -1
  13. package/src/modes/foreman.md +13 -5
  14. package/src/skills/pipeline.md +22 -10
  15. package/web/dist/assets/{Activity-M5qj6CxJ.js → Activity-Dc29x6Bb.js} +1 -1
  16. package/web/dist/assets/{ActivityDetail-DVCdNy73.js → ActivityDetail-CJYuaryv.js} +1 -1
  17. package/web/dist/assets/Dashboard--9UIBMVY.js +2 -0
  18. package/web/dist/assets/Docs-D8LcDC4g.js +5 -0
  19. package/web/dist/assets/{GreenhouseView-BvA4t12P.js → GreenhouseView-Lv_I5ndg.js} +1 -1
  20. package/web/dist/assets/{Installs-DP4WjTpD.js → Installs-BcfJ4xiR.js} +3 -3
  21. package/web/dist/assets/JournalView-ja3ZSAEQ.js +1 -0
  22. package/web/dist/assets/{KitApply-aORiqjFC.js → KitApply-BxOMaoKP.js} +1 -1
  23. package/web/dist/assets/{Kits-DpIEozdv.js → Kits-nt_j0zos.js} +1 -1
  24. package/web/dist/assets/{Laws-cM_4CG9i.js → Laws-BORuVOX_.js} +2 -2
  25. package/web/dist/assets/{Library-I1zEH3UW.js → Library-p8zDj1na.js} +1 -1
  26. package/web/dist/assets/{Loops-CDa_mxP9.js → Loops-CvWzox50.js} +2 -2
  27. package/web/dist/assets/{OperatorHudView-CMf1DQMB.js → OperatorHudView-DLFP3hH7.js} +1 -1
  28. package/web/dist/assets/{Personal-BqU9Pzt1.js → Personal-Bc16aeB8.js} +1 -1
  29. package/web/dist/assets/{Tabs-JZ2FQBcz.js → Tabs-C57CyhSn.js} +1 -1
  30. package/web/dist/assets/drawable-UEPfHNCy.js +1 -0
  31. package/web/dist/assets/index-CKCvC6Qx.js +2 -0
  32. package/web/dist/index.html +1 -1
  33. package/web/dist/assets/Dashboard-B1rpgTz-.js +0 -2
  34. package/web/dist/assets/Docs-D-EixVuX.js +0 -5
  35. package/web/dist/assets/JournalView-hf2eO133.js +0 -1
  36. package/web/dist/assets/drawable-svc6-2Gp.js +0 -1
  37. package/web/dist/assets/index-CZFrNe4N.js +0 -2
package/CHANGELOG.md CHANGED
@@ -8,6 +8,23 @@ label. For the capability ↔ spec map, see [SHIPPED.md](SHIPPED.md).
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [4.16.0] — 2026-10-23
12
+
13
+ Minor: foreman mode now really delegates, and the web console updates and rebuilds a clone without a manual restart.
14
+
15
+ ### Upgrade notes
16
+ - Run `geneseed rebuild-all`; nothing changes on a machine until something re-emits. The precedence table changes in every install, not only in foreman ones.
17
+
18
+ ### Changed
19
+ - Foreman mode: the mode now binds how work runs. It has its own row in the precedence table; `PROFILE.md`, posture and theme still only inform.
20
+ - Foreman triage is a count, not a judgement: a task is substantial when it changes 2 or more files, needs a new or changed test, needs about 5 reads before the first edit, or asks for a feature, a fix, a review, an audit or an investigation. When unsure, the session delegates.
21
+ - Pipelines: the parent session dispatches one background crew lead and goes back to the user. The crew lead picks the crew from the whole agent roster (the floor is only the minimum) and runs the relay. `pipeline` now has a per-host table; on a host where the crew lead cannot start subagents, it plays each role in turn.
22
+
23
+ ### Fixed
24
+ - Web console: a git clone always gets the **Update** button, also when the npm release check gets no answer.
25
+ - Web console: a rebuild on a console running old code (after a manual `git pull`) now restarts it and reloads the page.
26
+ - Docs: the pipeline loop limit is 2 repair rounds, then one fresh developer, not "five rounds".
27
+
11
28
  ## [4.15.1] — 2026-10-23
12
29
 
13
30
  Patch: two host fixes. The first npm release since 4.14.0, so it also carries 4.15.0's comms 4 doctrine.
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.15.1**.
23
+ > string. Current label: **4.16.0**.
24
24
 
25
25
  ## Capabilities
26
26
 
@@ -21,8 +21,10 @@ The agent works every task itself, turn by turn. Nothing is spawned; you talk to
21
21
 
22
22
  The session sorts every request:
23
23
 
24
- - **Trivial** — a quick answer, a one-file tweak, a question: done directly, as in direct mode.
25
- - **Substantial** — handed to a **pipeline** running in the background. The session tells you it is running and stays free to answer you.
24
+ - **Substantial** — handed to a **pipeline** running in the background. The session tells you it is running and stays free to answer you. A task counts as substantial when any one of these holds: it changes two or more files, it needs a new or changed test, it needs about five reads or searches before the first edit, or it asks for a feature, a fix, a review, an audit or an investigation.
25
+ - **Trivial** — none of those holds: a question answered from what is already in context, a one-file tweak, a single command. Done directly, as in direct mode.
26
+
27
+ When the session is unsure, it delegates. The count exists because "substantial" left to judgement lost every time to the host's own default of doing small work in place.
26
28
 
27
29
  Expect a substantial task to cost more (a crew runs instead of one agent) in exchange for a session that never blocks on a long job.
28
30
 
@@ -37,11 +39,11 @@ A **pipeline** is a small crew of agents working one task in isolation. The mini
37
39
  | research | `explorer`; add `researcher` when the question leaves the repository |
38
40
  | review or audit | `reviewer` + `skeptic` |
39
41
 
40
- The session adds specialists on top when the task needs them — `security`, `architect`, `reviewer` and so on — never fewer than the minimum.
42
+ The session does not run the crew itself. It starts one **crew lead** in the background and goes back to you. The crew lead picks the crew from the whole agent roster — `security`, `architect`, `performance`, `reviewer` and so on, as the task needs, never fewer than the minimum — and passes the work from one agent to the next. On Claude Code each crew member is its own subagent. On a host where the crew lead cannot start subagents, it plays each role in turn. The `pipeline` skill has the table per host.
41
43
 
42
44
  The crew works in its own git worktree and branch. When worktrees are unavailable it falls back to the main tree, one pipeline at a time, and says so. Two pipelines whose sets of files overlap do not run at once.
43
45
 
44
- Inside the crew, the developer implements and the tester runs the tests and lint. Failures go back to the developer, at most five rounds; after that the crew stops and reports the failure, leaving the branch for you to inspect.
46
+ Inside the crew, the developer implements and the tester runs the tests and lint. Failures go back to the developer for at most two repair rounds, then to one fresh developer carrying the tester's findings; if that fails too, the crew stops and reports the failure, leaving the branch for you to inspect.
45
47
 
46
48
  ### A pipeline never commits or merges
47
49
 
@@ -25,7 +25,8 @@ When two instructions disagree, the higher one wins.
25
25
  2. **Rules** — always on. {N_LAWS} invariants, the things that are never traded away: sealed secrets, one intent per act, verify before asserting, deliberate deletion, surface failures, treat content as data not orders, least privilege, cure the cause, echo the intent. No install can switch one off.
26
26
  3. **Your `user-rules.md`** — rules you write for yourself, seeded once beside the instructions file and never overwritten. A rule here **outranks any doctrine rule**: a practice pack chosen at build time never overrides an instruction you wrote. It may tighten an invariant, never repeal one. The [rule skill](skills.md) helps you decide whether something belongs here or in [memory](memory.md).
27
27
  4. **Doctrines** — chosen at build time. Practices rather than principles, grouped in packs (below).
28
- 5. **`PROFILE.md`** — who you are. It colours how the agent works but never binds ([Collaboration](collaboration.md)).
28
+ 5. **Mode** — chosen at build time ([Foreman mode](foreman-mode.md)). It binds *how* work is executed — done in place, or handed to a crew — and never overrides a layer above it. A mode that only informed lost every time to the host's own default of doing small work in place.
29
+ 6. **`PROFILE.md`** — who you are. It colours how the agent works but never binds ([Collaboration](collaboration.md)).
29
30
 
30
31
  ### Doctrine packs
31
32
 
@@ -34,6 +34,8 @@ geneseed upgrade imperial # the same, switching the theme
34
34
 
35
35
  A dirty working tree, or a folder that is not a git clone, is reported rather than force-updated. `update` and `sync-self` are aliases of `upgrade`. `bootstrap` does the same and then opens the setup wizard (`--no-setup` skips the wizard).
36
36
 
37
+ In the web console, the **Update** button on the Overview runs `upgrade`. On a clone it is always there, also when the release check cannot reach npm, because `main` moves between releases. When the update is done, the console restarts and the page reloads. If you ran `git pull` yourself, the Overview shows a banner that the console runs old code. Click **Rebuild** on an install that is behind: the console restarts after the rebuild and reloads the page. If no install is behind, click **Restart** in the banner.
38
+
37
39
  ## What an upgrade keeps
38
40
 
39
41
  A rebuild only replaces files the install's manifest says Geneseed owns. It leaves these alone:
@@ -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.15.1"
5
+ "version": "4.16.0"
6
6
  }
@@ -35,7 +35,7 @@ import { isFile, readText } from '../lib/fs.mjs';
35
35
  * console draws it on the cost chart, so it lives here, once, where both read it. Raise it by
36
36
  * exactly the measured overrun and say why in that test's docblock, which keeps its history.
37
37
  */
38
- export const CARRIER_CEILING = { full: 63_266, lean: 39_628 };
38
+ export const CARRIER_CEILING = { full: 63_299, lean: 39_661 };
39
39
 
40
40
  /**
41
41
  * A frontmatter value as the host shows it. The emit writes descriptions JSON-escaped
package/js/web/api.mjs CHANGED
@@ -8,7 +8,7 @@
8
8
  * bind paths to these functions are `routes.mjs`. This file imports none of its route siblings,
9
9
  * which is what keeps the old `api ↔ actions` and `api ↔ activity` cycles from coming back.
10
10
  */
11
- import { readdirSync, statSync } from 'node:fs';
11
+ import { existsSync, readdirSync, statSync } from 'node:fs';
12
12
  import path from 'node:path';
13
13
 
14
14
  import { CONFIG, CREDIT_RE, ROOT, SRC, THEMES, discoverNames, loadKits, makeCfg, upstreamOf } from '../build/source.mjs';
@@ -500,7 +500,11 @@ export function apiLoopsActive() {
500
500
  }
501
501
 
502
502
  /** Is a newer release on npm than the source this console serves? See update-check.mjs. */
503
- export const apiUpdate = (state) => updateStatus(state, releaseLabel());
503
+ // `git`: a clone updates by `git pull` whatever npm says — main moves between releases, and a
504
+ // work proxy can leave the release check unanswered — so the console always offers Update there.
505
+ // `.git` is a file in a worktree, a folder in a clone; existence covers both.
506
+ export const apiUpdate = (state) => ({ ...updateStatus(state, releaseLabel()),
507
+ git: existsSync(path.join(ROOT, '.git')) });
504
508
 
505
509
  /** The source's release label, or null when it cannot be read. */
506
510
  function releaseLabel() {
package/js/web/daemon.mjs CHANGED
@@ -357,7 +357,7 @@ export async function statusDaemon(theme = null, port = null) {
357
357
  * `rebuild-all` when the running one is stale. EXCEPT inside a web job (`GENESEED_WEB_JOB`,
358
358
  * set by `js/web/jobs.mjs`): restarting here would kill the process tracking that very job,
359
359
  * leaving the console stuck on 'running'; the server restarts itself after an update job, and
360
- * shows its stale banner otherwise. `onlyIfStale` is `rebuild-all`'s: after an `upgrade`
360
+ * after a rebuild-all job when it is stale (`js/web/handler.mjs`). `onlyIfStale` is `rebuild-all`'s: after an `upgrade`
361
361
  * (which bounces, then runs `rebuild-all`) the console is current, and bouncing it again
362
362
  * would drop the open tab for nothing. Never throws — no rebuild fails over a console.
363
363
  */
@@ -368,7 +368,7 @@ export async function bounceDaemonIfRunning(theme, log, { onlyIfStale = false }
368
368
  }
369
369
  if (process.env.GENESEED_WEB_JOB) {
370
370
  log(onlyIfStale
371
- ? '[geneseed] the web console is running old code — use its Restart banner.'
371
+ ? '[geneseed] the web console is running old code — it restarts itself after this job.'
372
372
  : '[geneseed] web daemon will restart itself after this job to load the new code.');
373
373
  return;
374
374
  }
@@ -300,6 +300,17 @@ export function makeHandler(state, jm, token, dist, holder = null) {
300
300
  if (jid === null) return sendJson(res, { error: 'busy' }, 409, ae);
301
301
  return sendJson(res, { job_id: jid }, 202, ae);
302
302
  }
303
+ // A rebuild-all on a STALE server (a manual `git pull` under it) restarts it afterwards, as
304
+ // an update does: otherwise the rebuild lands and the page keeps serving the old code.
305
+ // `restarts` tells the console to wait for the new server and reload.
306
+ if (action === 'build-all' && state.daemonStale?.()) {
307
+ const jid = jm.start(action, actionCommands(action), (rc) => {
308
+ state.refresh();
309
+ if (rc === 0) requestRestart(state.theme);
310
+ });
311
+ if (jid === null) return sendJson(res, { error: 'busy' }, 409, ae);
312
+ return sendJson(res, { job_id: jid, restarts: true }, 202, ae);
313
+ }
303
314
  // Build resolves its argv off the install (`buildActionCmds`); the other actions take no
304
315
  // axes and self-resolve the deployed theme downstream.
305
316
  const cmds = action === 'build' ? buildActionCmds(state, body) : actionCommands(action);
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.15.1",
4
+ "version": "4.16.0",
5
5
  "description": "A portable, theme-able harness you implant once and use everywhere to grow a disciplined AI coding agent.",
6
6
  "keywords": [
7
7
  "ai",
package/src/AGENT.md.tmpl CHANGED
@@ -59,7 +59,8 @@ never move.
59
59
  | 2 | `user-rules.md` (§1) | may tighten a {{LAW}}, never repeal one |
60
60
  | 3 | The {{ONTOLOGY}} | never against a user rule |
61
61
  | 4 | The active {{DOCTRINES}} (§2) | may tighten, never repeal |
62
- | 5 | `PROFILE.md`, posture, mode, theme | inform only; never bind |
62
+ | 5 | The mode | binds how work runs |
63
+ | 6 | `PROFILE.md`, posture, theme | inform only; never bind |
63
64
 
64
65
  ---
65
66
 
@@ -3,11 +3,19 @@ crews for what's substantial, and keeps answering the user without blocking.
3
3
 
4
4
  - **Stay responsive.** Answer the user immediately; never let a running pipeline
5
5
  block the conversation.
6
- - **Triage every incoming task.** *Trivial* (a quick answer, a one-file tweak, a
7
- question) → do it directly, no pipeline. *Substantial* → spawn a pipeline (the
8
- `pipeline` {{SKILL}}) in the background and tell the user it's running.
9
- - **Compose the crew dynamically** from the agent roster, never below the floor
10
- for the task type — floors and roles live in the pipeline {{SKILL}}, not here.
6
+ - **Triage every incoming task by count, not by feel.** A task is *substantial* when
7
+ any one of these holds: it will change two or more files; it needs a new or changed
8
+ test; it needs about five reads or searches before the first edit; or it asks for a
9
+ feature, a fix, a review, an audit or an investigation. Substantial → spawn a
10
+ pipeline (the `pipeline` {{SKILL}}) in the background and tell the user it's
11
+ running. *Trivial* — none of these holds: a question answered from what is already
12
+ in context, a one-file tweak, a single command → do it directly, no pipeline.
13
+ **When unsure, delegate.** A host default to do small work yourself does not apply
14
+ here: this mode is the user's standing choice to delegate.
15
+ - **Dispatch one crew lead, then step away.** The crew lead composes the crew from
16
+ the whole agent roster, never below the floor for the task type, and runs the relay
17
+ itself. Never run the hand-offs from this session. Floors, roles and per-host
18
+ mechanics live in the pipeline {{SKILL}}, not here.
11
19
  - **Isolate.** Each pipeline works in its own git worktree/branch; falls back to a
12
20
  single tree, one pipeline at a time, when worktrees are unavailable.
13
21
  - **Merge on proof you re-ran.** A pipeline hands back its worktree, uncommitted, with
@@ -8,11 +8,13 @@
8
8
 
9
9
  ## What it is
10
10
 
11
- A pipeline is a small crew of {{AGENTS}} — analyst, developer, tester, plus whatever specialists the task demands — working a single task in isolation from the rest of the session, so the parent can keep answering the user while the crew runs. The parent never merges on the crew's word: it re-runs the crew's proof commands itself and merges only once the user accepts.
11
+ A pipeline is a small crew of {{AGENTS}} working a single task in isolation from the rest of the session, so the parent can keep answering the user while the crew runs. The parent dispatches **one crew lead** in the background and steps away. The crew lead composes the crew, runs the relay, and returns one result envelope. The parent never merges on the crew's word: it re-runs the crew's proof commands itself and merges only once the user accepts.
12
+
13
+ The parent does not run the relay itself. Each hand-off it ran would pull it back from the user, which is the one thing this {{SKILL}} exists to prevent.
12
14
 
13
15
  ## Crew floors
14
16
 
15
- The minimum roster per task type. The parent may add specialists on top — security, architect, reviewer, docs, historian, or any other {{AGENT}} the task genuinely needs — but never dispatches below the floor.
17
+ The minimum roster per task type. The crew lead chooses the crew from the whole {{AGENT}} roster: any {{AGENT}} the task genuinely needs — security, architect, performance, reviewer, docs, historian, researcher, or any other — in any order the task needs. The floor is the least it may dispatch, never the most.
16
18
 
17
19
  | Task type | Floor |
18
20
  |---|---|
@@ -23,14 +25,24 @@ The minimum roster per task type. The parent may add specialists on top — secu
23
25
 
24
26
  ## Procedure
25
27
 
26
- 1. Confirm the task is genuinely substantial — a trivial one-file tweak or a question does not warrant a crew; do it directly instead.
27
- 2. Compose the crew from the floor above, adding specialists only where the task demands them.
28
- 3. Isolate the crew's work in its own git worktree/branch. Where worktrees are unavailable, fall back to a single tree, one pipeline at a time, and say so. Give the crew a **write set** and check it against every other pipeline in flight ({{DOCTRINE:one-writer-per-file}}): two crews whose sets overlap do not run at once, and shared append files (registries, index tables, lockfiles, generated bundles) are the parent's to apply, never a crew's.
29
- 4. **The dev↔tester loop:** the developer implements, the tester validates — runs the tests and lint, produces raw logs. On failure, the findings go back to the developer — two repair rounds at most, then one fresh developer (a higher model tier where the host offers one) carrying the tester's findings ({{DOCTRINE:bound-the-loop}}); if that fails too, stop, do not merge, and report the failure with the branch left in place for inspection. A conflict or ambiguity between the plan, the findings and the code is yours to decide: decide it, record `Ruling: <choice> — <why> — <cost if wrong>` in the worklog, and continue. Stop only for what {{LAW:echo-the-intent}}, {{LAW:deletion-is-deliberate}} or {{DOCTRINE:consent-before-push}} names; every ruling goes in the final report ({{DOCTRINE:declare-the-judgment-calls}}). When the plan names a `Spec:`, the analyst reads it once; the spec outranks the plan.
30
- 5. **Two execution shapes**, chosen by host capability (same pattern as the [workflow {{SKILL}}](workflow.md)):
31
- - *Deterministic:* where the host exposes a `workflow` tool, run a saved script encoding analyst → developer → (tester ⇄ developer)×≤2 → fresh developer → proof.
32
- - *Model-driven fallback:* everywhere else, run the same stages via the [parallel-agents {{SKILL}}](parallel-agents.md) or sequential personas, with the same handoff envelopes and the same delivery contract.
33
- 6. On success, hand the worktree back to the parent uncommitted, with the mechanical proof (test + lint output, exit codes) and the list of files it changed in the result envelope, rebased on the current base so a conflict with a sibling resolves on the crew's branch. The pipeline never commits, pushes, or merges ({{DOCTRINE:consent-before-push}}): the parent records BASE before dispatch and, before re-running the proof, confirms the branch descends from it and the diff is non-empty (an empty diff is a failure; never `HEAD~1`); it re-runs the proof commands itself, shows the user the diff and the output, and commits and merges once the user accepts.
28
+ 1. Take the triage as given. Under foreman mode the task reached you because it met the mode's count; invoked directly, the user's request is the trigger. Do not weigh it again and fall back to doing the work yourself.
29
+ 2. **Dispatch the crew lead** in the background, using the host's general-purpose {{AGENT}}. Before dispatch, record BASE and set the crew's **write set**; check it against every other pipeline in flight ({{DOCTRINE:one-writer-per-file}}) — two crews whose sets overlap do not run at once. The brief carries: the task as the user stated it, the task type, BASE, the write set, the proof commands, a pointer to this {{SKILL}}, and the rule that it never commits, pushes or merges. Tell the user the pipeline is running, then go back to the user. Do not wait on the crew lead.
30
+ 3. **The crew lead composes the crew** from the floor above and adds any {{AGENT}} the task needs. It dispatches each crew member as its own subagent, each handed what the previous one produced. Where the crew lead holds no dispatch tool (see *Hosts* below), it plays each role in turn itself, with the same hand-offs and the same envelope. Steps 4 to 7 are the crew lead's, except where they name the parent.
31
+ 4. Isolate the crew's work in its own git worktree/branch. Where worktrees are unavailable, fall back to a single tree, one pipeline at a time, and say so. The crew writes only inside its write set; shared append files (registries, index tables, lockfiles, generated bundles) are the parent's to apply, never a crew's.
32
+ 5. **The dev↔tester loop:** the developer implements, the tester validates — runs the tests and lint, produces raw logs. On failure, the findings go back to the developer — two repair rounds at most, then one fresh developer (a higher model tier where the host offers one) carrying the tester's findings ({{DOCTRINE:bound-the-loop}}); if that fails too, stop, do not merge, and report the failure with the branch left in place for inspection. A conflict or ambiguity between the plan, the findings and the code is yours to decide: decide it, record `Ruling: <choice> — <why> — <cost if wrong>` in the worklog, and continue. Stop only for what {{LAW:echo-the-intent}}, {{LAW:deletion-is-deliberate}} or {{DOCTRINE:consent-before-push}} names; every ruling goes in the final report ({{DOCTRINE:declare-the-judgment-calls}}). When the plan names a `Spec:`, the analyst reads it once; the spec outranks the plan.
33
+ 6. **Pick the shape by host** (table below). Where the host offers a workflow tool the {{SKILL}} may use without a fresh opt-in, a saved script may stand in for the crew lead: analyst → developer → (tester ⇄ developer)×≤2 → fresh developer → proof ([workflow {{SKILL}}](workflow.md)). Everywhere else the crew lead runs the same stages, with the same hand-offs and the same delivery contract.
34
+ 7. On success, hand the worktree back to the parent uncommitted, with the mechanical proof (test + lint output, exit codes) and the list of files it changed in the result envelope, rebased on the current base so a conflict with a sibling resolves on the crew's branch. The pipeline never commits, pushes, or merges ({{DOCTRINE:consent-before-push}}): the parent records BASE before dispatch and, before re-running the proof, confirms the branch descends from it and the diff is non-empty (an empty diff is a failure; never `HEAD~1`); it re-runs the proof commands itself, shows the user the diff and the output, and commits and merges once the user accepts.
35
+
36
+ ## Hosts
37
+
38
+ | Host | Crew lead runs in the background | Crew lead can dispatch the crew | Shape |
39
+ |---|---|---|---|
40
+ | Claude Code | yes — a subagent started from the main conversation runs in the background by default | yes — subagents nest up to three layers by default (`CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH`), and a background subagent keeps the `Agent` tool | crew lead → crew subagents. Not the `Workflow` tool: it refuses without the user's opt-in for that task, and the mode is not one |
41
+ | OpenCode | the `task` tool starts a child session; whether the parent's turn waits is unverified | unverified — `permission.task` decides which subagents an agent may start | crew lead → crew subagents where it holds `task`; else roles in turn. A saved `workflow` script (no opt-in needed) may stand in for the crew lead |
42
+ | OpenClaude | expected as Claude Code (it reads Claude's subagent dialect); unverified | unverified | as Claude Code; else roles in turn |
43
+ | Bob | unverified — Bob reads Claude's subagent dialect | unverified | crew lead plays the roles in turn |
44
+
45
+ Check, do not assume: before the first pipeline of a session on a host marked unverified, look at the tools you and the crew lead actually hold ({{DOCTRINE:tool-discovery}}). When a fact above proves wrong, report it through this {{SKILL}}'s self-improvement loop.
34
46
 
35
47
  ## Delivery contract
36
48
 
@@ -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{C as i,N as a,Q as o,R as s,x as c}from"./index-CZFrNe4N.js";import{a as l,i as u,n as d,o as f,r as p,t as m}from"./activity-Jw8XcPiP.js";import{t as h}from"./usePoll-bDFN-Hr6.js";var g=e(t(),1),_=n();function v({s:e}){let t=p[e.status]||p.idle,n=e.files,r=e.todos,i=r&&r.total>0||e.error||e.blocked_on;return(0,_.jsxs)(`a`,{className:`card pad-md act-card`,href:`#/activity/${encodeURIComponent(e.session_id)}`,children:[(0,_.jsxs)(`div`,{className:`row between wrap gap-12`,children:[(0,_.jsxs)(`div`,{className:`row gap-10`,style:{minWidth:0},children:[(0,_.jsx)(`span`,{className:`feed-dot ${t.cls||`acc`}`,style:{width:9,height:9}}),(0,_.jsxs)(`div`,{style:{minWidth:0},children:[(0,_.jsx)(`h3`,{style:{margin:0},children:e.title||l(e.cwd)||e.session_id}),e.cwd&&(0,_.jsx)(`div`,{className:`dim mono`,style:{fontSize:12,...m},title:e.cwd,children:e.cwd})]})]}),(0,_.jsxs)(`div`,{className:`row gap-8`,style:{flexShrink:0},children:[e.model&&(0,_.jsx)(`span`,{className:`badge mono`,title:`model`,children:e.model}),e.agent&&(0,_.jsx)(`span`,{className:`badge`,children:e.agent}),(0,_.jsxs)(`span`,{className:`badge ${t.cls}`,children:[(0,_.jsx)(`span`,{className:`dot`}),t.label]}),(0,_.jsx)(a,{name:`chevron`,className:`glyph act-chev`})]})]}),e.phase&&(0,_.jsxs)(`div`,{className:`row gap-8`,style:{marginTop:10,fontSize:14},children:[(0,_.jsx)(a,{name:`activity`}),(0,_.jsx)(`span`,{style:m,children:e.phase})]}),(e.tokens>0||e.cost>0||e.turn_started_at||n&&n.count>0)&&(0,_.jsxs)(`div`,{className:`row wrap`,style:{gap:16,marginTop:12,fontSize:13,color:`var(--text-2)`},children:[e.tokens>0&&(0,_.jsxs)(`span`,{children:[f(e.tokens),` tok`]}),e.cost>0&&(0,_.jsxs)(`span`,{children:[`$`,e.cost.toFixed(2)]}),e.turn_started_at?(0,_.jsx)(`span`,{children:(0,_.jsx)(d,{startedAt:e.turn_started_at})}):null,n&&n.count>0&&(0,_.jsxs)(`span`,{children:[n.count,` file`,n.count===1?``:`s`,` `,(0,_.jsxs)(`span`,{style:{color:`var(--good)`},children:[`+`,n.additions]}),` `,(0,_.jsxs)(`span`,{style:{color:`var(--bad)`},children:[`−`,n.deletions]})]})]}),i&&(0,_.jsxs)(`div`,{className:`row between wrap gap-12`,style:{marginTop:12,paddingTop:10,borderTop:`1px solid var(--line)`},children:[r&&r.total>0?(0,_.jsxs)(`span`,{className:`row gap-8 dim`,style:{fontSize:13},children:[(0,_.jsx)(u,{done:r.done,total:r.total}),`plan `,r.done,`/`,r.total]}):(0,_.jsx)(`span`,{}),e.error?(0,_.jsx)(`span`,{className:`badge bad`,title:e.error,style:{maxWidth:300,...m},children:e.error}):e.blocked_on?(0,_.jsx)(`span`,{className:`badge bad`,title:e.blocked_on,style:{maxWidth:300,...m},children:e.blocked_on}):null]}),(0,_.jsxs)(`div`,{className:`dim mono`,style:{fontSize:11,marginTop:8},children:[`updated `,s(e.updated_at),` ago`]})]})}function y(){let[e,t]=(0,g.useState)(null),[n,a]=(0,g.useState)(``);h(e=>r.activity().then(n=>{e()&&(t(n),a(``))},t=>{e()&&a(t.message)}),2e3,[]);let s=!e||e.enabled!==!1,l=e?.activity||[],u=o(),d=async()=>{let e=!s;try{let n=await r.activityToggle(e);t(e=>({...e||{},enabled:n.enabled,activity:n.enabled&&e?.activity||[]})),a(``)}catch(e){a(e.message)}};return(0,_.jsxs)(`div`,{className:`narrow`,children:[(0,_.jsxs)(`div`,{className:`head-row mb-16`,children:[(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`h1`,{className:`h`,children:`Activity`}),(0,_.jsx)(`p`,{className:`sub`,children:`Live OpenCode sessions this harness is running: what each one is doing right now. Refreshes every couple of seconds; sessions drop off when their process exits.`})]}),(0,_.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`center`,flexShrink:0},children:[(0,_.jsx)(`span`,{className:`dim mono`,style:{fontSize:12},children:s?`tracking on`:`tracking off`}),(0,_.jsx)(`div`,{className:`sw-toggle${s?` on`:``}`,role:`switch`,"aria-checked":s,"aria-label":`Toggle activity tracking`,tabIndex:0,onClick:d,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),d())}})]})]}),(0,_.jsx)(c,{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)(i,{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{$ as i,P as a,S as o,w as s,z as c}from"./index-CKCvC6Qx.js";import{a as l,i as u,n as d,o as f,r as p,t as m}from"./activity-Jw8XcPiP.js";import{t as h}from"./usePoll-bDFN-Hr6.js";var g=e(t(),1),_=n();function v({s:e}){let t=p[e.status]||p.idle,n=e.files,r=e.todos,i=r&&r.total>0||e.error||e.blocked_on;return(0,_.jsxs)(`a`,{className:`card pad-md act-card`,href:`#/activity/${encodeURIComponent(e.session_id)}`,children:[(0,_.jsxs)(`div`,{className:`row between wrap gap-12`,children:[(0,_.jsxs)(`div`,{className:`row gap-10`,style:{minWidth:0},children:[(0,_.jsx)(`span`,{className:`feed-dot ${t.cls||`acc`}`,style:{width:9,height:9}}),(0,_.jsxs)(`div`,{style:{minWidth:0},children:[(0,_.jsx)(`h3`,{style:{margin:0},children:e.title||l(e.cwd)||e.session_id}),e.cwd&&(0,_.jsx)(`div`,{className:`dim mono`,style:{fontSize:12,...m},title:e.cwd,children:e.cwd})]})]}),(0,_.jsxs)(`div`,{className:`row gap-8`,style:{flexShrink:0},children:[e.model&&(0,_.jsx)(`span`,{className:`badge mono`,title:`model`,children:e.model}),e.agent&&(0,_.jsx)(`span`,{className:`badge`,children:e.agent}),(0,_.jsxs)(`span`,{className:`badge ${t.cls}`,children:[(0,_.jsx)(`span`,{className:`dot`}),t.label]}),(0,_.jsx)(a,{name:`chevron`,className:`glyph act-chev`})]})]}),e.phase&&(0,_.jsxs)(`div`,{className:`row gap-8`,style:{marginTop:10,fontSize:14},children:[(0,_.jsx)(a,{name:`activity`}),(0,_.jsx)(`span`,{style:m,children:e.phase})]}),(e.tokens>0||e.cost>0||e.turn_started_at||n&&n.count>0)&&(0,_.jsxs)(`div`,{className:`row wrap`,style:{gap:16,marginTop:12,fontSize:13,color:`var(--text-2)`},children:[e.tokens>0&&(0,_.jsxs)(`span`,{children:[f(e.tokens),` tok`]}),e.cost>0&&(0,_.jsxs)(`span`,{children:[`$`,e.cost.toFixed(2)]}),e.turn_started_at?(0,_.jsx)(`span`,{children:(0,_.jsx)(d,{startedAt:e.turn_started_at})}):null,n&&n.count>0&&(0,_.jsxs)(`span`,{children:[n.count,` file`,n.count===1?``:`s`,` `,(0,_.jsxs)(`span`,{style:{color:`var(--good)`},children:[`+`,n.additions]}),` `,(0,_.jsxs)(`span`,{style:{color:`var(--bad)`},children:[`−`,n.deletions]})]})]}),i&&(0,_.jsxs)(`div`,{className:`row between wrap gap-12`,style:{marginTop:12,paddingTop:10,borderTop:`1px solid var(--line)`},children:[r&&r.total>0?(0,_.jsxs)(`span`,{className:`row gap-8 dim`,style:{fontSize:13},children:[(0,_.jsx)(u,{done:r.done,total:r.total}),`plan `,r.done,`/`,r.total]}):(0,_.jsx)(`span`,{}),e.error?(0,_.jsx)(`span`,{className:`badge bad`,title:e.error,style:{maxWidth:300,...m},children:e.error}):e.blocked_on?(0,_.jsx)(`span`,{className:`badge bad`,title:e.blocked_on,style:{maxWidth:300,...m},children:e.blocked_on}):null]}),(0,_.jsxs)(`div`,{className:`dim mono`,style:{fontSize:11,marginTop:8},children:[`updated `,c(e.updated_at),` ago`]})]})}function y(){let[e,t]=(0,g.useState)(null),[n,a]=(0,g.useState)(``);h(e=>r.activity().then(n=>{e()&&(t(n),a(``))},t=>{e()&&a(t.message)}),2e3,[]);let c=!e||e.enabled!==!1,l=e?.activity||[],u=i(),d=async()=>{let e=!c;try{let n=await r.activityToggle(e);t(e=>({...e||{},enabled:n.enabled,activity:n.enabled&&e?.activity||[]})),a(``)}catch(e){a(e.message)}};return(0,_.jsxs)(`div`,{className:`narrow`,children:[(0,_.jsxs)(`div`,{className:`head-row mb-16`,children:[(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`h1`,{className:`h`,children:`Activity`}),(0,_.jsx)(`p`,{className:`sub`,children:`Live OpenCode sessions this harness is running: what each one is doing right now. Refreshes every couple of seconds; sessions drop off when their process exits.`})]}),(0,_.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`center`,flexShrink:0},children:[(0,_.jsx)(`span`,{className:`dim mono`,style:{fontSize:12},children:c?`tracking on`:`tracking off`}),(0,_.jsx)(`div`,{className:`sw-toggle${c?` on`:``}`,role:`switch`,"aria-checked":c,"aria-label":`Toggle activity tracking`,tabIndex:0,onClick:d,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),d())}})]})]}),(0,_.jsx)(o,{error:n,style:{marginBottom:12}}),e?c?l.length===0?(0,_.jsxs)(`div`,{className:`empty`,children:[(0,_.jsx)(`div`,{className:`big`,children:`No active sessions`}),`Run `,(0,_.jsx)(`code`,{children:`opencode`}),` and the sessions it spins up appear here.`]}):(0,_.jsx)(`div`,{className:`stack gap-12`,ref:u,children:l.map(e=>(0,_.jsx)(`div`,{"data-flip":e.session_id,children:(0,_.jsx)(v,{s:e})},e.session_id))}):(0,_.jsxs)(`div`,{className:`empty`,children:[(0,_.jsx)(`div`,{className:`big`,children:`Activity tracking is off`}),`The plugin isn't recording sessions. Flip the switch to turn it back on.`]}):(0,_.jsx)(s,{label:`Reading live sessions…`})]})}export{y as default};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{t as r}from"./api-BfpZmUMI.js";import{C as i,N as a,R as o}from"./index-CZFrNe4N.js";import{a as s,n as c,o as l,r as u,t as d}from"./activity-Jw8XcPiP.js";import{t as f}from"./usePoll-bDFN-Hr6.js";var p=e(t(),1),m=n();function h(e){return e.kind===`tool`?e.status===`error`?`bad`:e.status===`completed`?`ok`:`acc`:{retry:`warn`,error:`bad`,subtask:`acc`,text:`acc`}[e.kind]||``}function g({rec:e}){let t=e.who===`you`,n=[];t||(e.kind===`tool`&&e.ms!=null&&n.push(`${(e.ms/1e3).toFixed(1)}s`),e.kind===`step`&&(e.tokens&&n.push(`${l(e.tokens)} tok`),e.cost&&n.push(`$${e.cost.toFixed(2)}`)),e.kind===`subtask`&&e.agent&&n.unshift(e.agent));let r=!t&&(e.kind===`text`||e.kind===`thinking`||e.kind===`step`),i=t?e.text:e.label||e.snippet||e.kind;return(0,m.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`baseline`},children:[(0,m.jsx)(`span`,{className:`badge ${t?``:`acc`}`,style:{flexShrink:0,minWidth:52,justifyContent:`center`},children:t?`you`:`agent`}),(0,m.jsxs)(`div`,{style:{minWidth:0,flex:1,fontSize:13},children:[!t&&(0,m.jsx)(`span`,{className:`feed-dot ${h(e)||`acc`}`,style:{display:`inline-block`,marginRight:8,verticalAlign:`middle`}}),e.kind===`thinking`&&(0,m.jsx)(`span`,{className:`dim`,children:`thinking: `}),r?(0,m.jsx)(`span`,{className:`dim`,children:i}):t?i:(0,m.jsx)(`b`,{children:i}),e.error&&(0,m.jsxs)(`span`,{className:`dim`,children:[`: `,e.error]})]}),n.length>0&&(0,m.jsx)(`span`,{className:`dim mono`,style:{flexShrink:0,fontSize:12},children:n.join(` · `)})]})}function _({turns:e}){return!e||e.length===0?(0,m.jsx)(`div`,{className:`dim`,style:{fontSize:13},children:`No conversation captured yet.`}):(0,m.jsx)(`div`,{className:`stack gap-12`,children:e.map((e,t)=>{let n=e.role===`user`;return(0,m.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`baseline`},children:[(0,m.jsx)(`span`,{className:`badge ${n?``:`acc`}`,style:{flexShrink:0,minWidth:52,justifyContent:`center`},children:n?`you`:`agent`}),(0,m.jsx)(`div`,{style:{minWidth:0,fontSize:13,color:n?`inherit`:`var(--text-2)`},children:e.text})]},t)})})}function v({sid:e}){let[t,n]=(0,p.useState)(null),[h,v]=(0,p.useState)(``),[y,b]=(0,p.useState)(!1),[x,S]=(0,p.useState)(!1);f(t=>r.activityDetail(e).then(e=>{t()&&(n(e),v(``),b(!1))},e=>{t()&&(e.status===404?b(!0):v(e.message))}),2e3,[e]);let C=(0,m.jsxs)(`a`,{className:`btn ghost sm`,href:`#/activity`,style:{marginBottom:12,display:`inline-flex`,gap:6},children:[(0,m.jsx)(a,{name:`arrow`,style:{transform:`rotate(180deg)`}}),` Activity`]});if(y)return(0,m.jsxs)(`div`,{className:`narrow`,children:[C,(0,m.jsxs)(`div`,{className:`empty`,children:[(0,m.jsx)(`div`,{className:`big`,children:`Session ended`}),`It's no longer live. `,(0,m.jsx)(`a`,{href:`#/activity`,children:`Back to Activity`}),`.`]})]});if(!t)return(0,m.jsxs)(`div`,{className:`narrow`,children:[C,(0,m.jsx)(i,{label:`Loading session…`})]});let w=t.session,T=u[w.status]||u.idle,E=w.files,D=w.todos,O=!!(E&&E.items&&E.items.length>0),k=!!(D&&D.items&&D.items.length>0),A=t.conversation||[],j=t.timeline||[],M=[...A.filter(e=>e.role===`user`).map(e=>({who:`you`,text:e.text,t:e.t||0})),...j.map(e=>({...e,who:`agent`}))].sort((e,t)=>(e.t||0)-(t.t||0));return(0,m.jsxs)(`div`,{className:`narrow`,children:[C,h&&(0,m.jsx)(`p`,{className:`badge bad`,style:{marginBottom:12},children:h}),(0,m.jsxs)(`div`,{className:`card pad-md`,children:[(0,m.jsxs)(`div`,{className:`row between wrap gap-12`,children:[(0,m.jsxs)(`div`,{style:{minWidth:0},children:[(0,m.jsx)(`h1`,{className:`h`,style:{margin:0},children:w.title||s(w.cwd)||w.session_id}),w.cwd&&(0,m.jsx)(`div`,{className:`dim mono`,style:{fontSize:12,...d},title:w.cwd,children:w.cwd})]}),(0,m.jsxs)(`div`,{className:`row gap-8`,style:{flexShrink:0},children:[w.model&&(0,m.jsx)(`span`,{className:`badge mono`,children:w.model}),w.agent&&(0,m.jsx)(`span`,{className:`badge`,children:w.agent}),(0,m.jsxs)(`span`,{className:`badge ${T.cls}`,children:[(0,m.jsx)(`span`,{className:`dot`}),T.label]})]})]}),w.phase&&(0,m.jsxs)(`div`,{className:`row gap-8`,style:{marginTop:10,fontSize:14},children:[(0,m.jsx)(a,{name:`activity`}),(0,m.jsx)(`span`,{style:d,children:w.phase})]}),(0,m.jsxs)(`div`,{className:`row wrap`,style:{gap:16,marginTop:12,fontSize:13,color:`var(--text-2)`},children:[w.tokens>0&&(0,m.jsxs)(`span`,{children:[l(w.tokens),` tok`]}),w.cost>0&&(0,m.jsxs)(`span`,{children:[`$`,w.cost.toFixed(2)]}),w.turn_started_at?(0,m.jsx)(`span`,{children:(0,m.jsx)(c,{startedAt:w.turn_started_at})}):null,(0,m.jsxs)(`span`,{className:`dim`,children:[`updated `,o(w.updated_at),` ago`]})]}),(w.error||w.blocked_on)&&(0,m.jsx)(`div`,{style:{marginTop:10},children:(0,m.jsx)(`span`,{className:`badge bad`,style:{maxWidth:`100%`,...d},children:w.error||w.blocked_on})})]}),(O||k)&&(0,m.jsxs)(`div`,{className:`grid gap-12`,style:{marginTop:12,gridTemplateColumns:O&&k?`minmax(0, 1fr) minmax(0, 1fr)`:`1fr`},children:[O&&(0,m.jsxs)(`div`,{className:`card pad-md`,children:[(0,m.jsx)(`div`,{className:`card-head`,children:(0,m.jsxs)(`h3`,{children:[`Files touched `,(0,m.jsxs)(`span`,{className:`dim`,children:[`(`,E.count,`)`]})]})}),(0,m.jsx)(`div`,{className:`stack`,style:{gap:6,marginTop:8},children:E.items.map(e=>(0,m.jsxs)(`div`,{className:`row between gap-12`,style:{fontSize:13},children:[(0,m.jsx)(`span`,{className:`mono`,style:{...d,minWidth:0,flex:1},title:e.file,children:e.file}),(0,m.jsxs)(`span`,{style:{flexShrink:0},children:[(0,m.jsxs)(`span`,{style:{color:`var(--good)`},children:[`+`,e.additions]}),` `,(0,m.jsxs)(`span`,{style:{color:`var(--bad)`},children:[`−`,e.deletions]})]})]},e.file))})]}),k&&(0,m.jsxs)(`div`,{className:`card pad-md`,children:[(0,m.jsx)(`div`,{className:`card-head`,children:(0,m.jsxs)(`h3`,{children:[`Plan`,` `,(0,m.jsxs)(`span`,{className:`dim`,children:[`(`,D.done,`/`,D.total,`)`]})]})}),(0,m.jsx)(`div`,{className:`stack`,style:{gap:6,marginTop:8},children:D.items.map((e,t)=>(0,m.jsxs)(`div`,{className:`row gap-8`,style:{fontSize:13},children:[(0,m.jsx)(`span`,{className:`feed-dot ${e.status===`completed`?`ok`:e.status===`in_progress`?`acc`:``}`}),(0,m.jsx)(`span`,{style:{textDecoration:e.status===`completed`?`line-through`:`none`,color:e.status===`completed`?`var(--text-3)`:`inherit`},children:e.content})]},t))})]})]}),(0,m.jsxs)(`div`,{className:`card pad-md`,style:{marginTop:12},children:[(0,m.jsxs)(`div`,{className:`card-head`,style:{justifyContent:`space-between`,marginBottom:12},children:[(0,m.jsx)(`h3`,{children:`Timeline`}),j.length>0&&(0,m.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>S(e=>!e),children:x?`Show conversation`:`Show all ${j.length} steps`})]}),x?(0,m.jsx)(`div`,{className:`stack gap-12`,children:M.map((e,t)=>(0,m.jsx)(g,{rec:e},t))}):(0,m.jsx)(_,{turns:A})]})]})}export{v as default};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{t as r}from"./api-BfpZmUMI.js";import{P as i,w as a,z as o}from"./index-CKCvC6Qx.js";import{a as s,n as c,o as l,r as u,t as d}from"./activity-Jw8XcPiP.js";import{t as f}from"./usePoll-bDFN-Hr6.js";var p=e(t(),1),m=n();function h(e){return e.kind===`tool`?e.status===`error`?`bad`:e.status===`completed`?`ok`:`acc`:{retry:`warn`,error:`bad`,subtask:`acc`,text:`acc`}[e.kind]||``}function g({rec:e}){let t=e.who===`you`,n=[];t||(e.kind===`tool`&&e.ms!=null&&n.push(`${(e.ms/1e3).toFixed(1)}s`),e.kind===`step`&&(e.tokens&&n.push(`${l(e.tokens)} tok`),e.cost&&n.push(`$${e.cost.toFixed(2)}`)),e.kind===`subtask`&&e.agent&&n.unshift(e.agent));let r=!t&&(e.kind===`text`||e.kind===`thinking`||e.kind===`step`),i=t?e.text:e.label||e.snippet||e.kind;return(0,m.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`baseline`},children:[(0,m.jsx)(`span`,{className:`badge ${t?``:`acc`}`,style:{flexShrink:0,minWidth:52,justifyContent:`center`},children:t?`you`:`agent`}),(0,m.jsxs)(`div`,{style:{minWidth:0,flex:1,fontSize:13},children:[!t&&(0,m.jsx)(`span`,{className:`feed-dot ${h(e)||`acc`}`,style:{display:`inline-block`,marginRight:8,verticalAlign:`middle`}}),e.kind===`thinking`&&(0,m.jsx)(`span`,{className:`dim`,children:`thinking: `}),r?(0,m.jsx)(`span`,{className:`dim`,children:i}):t?i:(0,m.jsx)(`b`,{children:i}),e.error&&(0,m.jsxs)(`span`,{className:`dim`,children:[`: `,e.error]})]}),n.length>0&&(0,m.jsx)(`span`,{className:`dim mono`,style:{flexShrink:0,fontSize:12},children:n.join(` · `)})]})}function _({turns:e}){return!e||e.length===0?(0,m.jsx)(`div`,{className:`dim`,style:{fontSize:13},children:`No conversation captured yet.`}):(0,m.jsx)(`div`,{className:`stack gap-12`,children:e.map((e,t)=>{let n=e.role===`user`;return(0,m.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`baseline`},children:[(0,m.jsx)(`span`,{className:`badge ${n?``:`acc`}`,style:{flexShrink:0,minWidth:52,justifyContent:`center`},children:n?`you`:`agent`}),(0,m.jsx)(`div`,{style:{minWidth:0,fontSize:13,color:n?`inherit`:`var(--text-2)`},children:e.text})]},t)})})}function v({sid:e}){let[t,n]=(0,p.useState)(null),[h,v]=(0,p.useState)(``),[y,b]=(0,p.useState)(!1),[x,S]=(0,p.useState)(!1);f(t=>r.activityDetail(e).then(e=>{t()&&(n(e),v(``),b(!1))},e=>{t()&&(e.status===404?b(!0):v(e.message))}),2e3,[e]);let C=(0,m.jsxs)(`a`,{className:`btn ghost sm`,href:`#/activity`,style:{marginBottom:12,display:`inline-flex`,gap:6},children:[(0,m.jsx)(i,{name:`arrow`,style:{transform:`rotate(180deg)`}}),` Activity`]});if(y)return(0,m.jsxs)(`div`,{className:`narrow`,children:[C,(0,m.jsxs)(`div`,{className:`empty`,children:[(0,m.jsx)(`div`,{className:`big`,children:`Session ended`}),`It's no longer live. `,(0,m.jsx)(`a`,{href:`#/activity`,children:`Back to Activity`}),`.`]})]});if(!t)return(0,m.jsxs)(`div`,{className:`narrow`,children:[C,(0,m.jsx)(a,{label:`Loading session…`})]});let w=t.session,T=u[w.status]||u.idle,E=w.files,D=w.todos,O=!!(E&&E.items&&E.items.length>0),k=!!(D&&D.items&&D.items.length>0),A=t.conversation||[],j=t.timeline||[],M=[...A.filter(e=>e.role===`user`).map(e=>({who:`you`,text:e.text,t:e.t||0})),...j.map(e=>({...e,who:`agent`}))].sort((e,t)=>(e.t||0)-(t.t||0));return(0,m.jsxs)(`div`,{className:`narrow`,children:[C,h&&(0,m.jsx)(`p`,{className:`badge bad`,style:{marginBottom:12},children:h}),(0,m.jsxs)(`div`,{className:`card pad-md`,children:[(0,m.jsxs)(`div`,{className:`row between wrap gap-12`,children:[(0,m.jsxs)(`div`,{style:{minWidth:0},children:[(0,m.jsx)(`h1`,{className:`h`,style:{margin:0},children:w.title||s(w.cwd)||w.session_id}),w.cwd&&(0,m.jsx)(`div`,{className:`dim mono`,style:{fontSize:12,...d},title:w.cwd,children:w.cwd})]}),(0,m.jsxs)(`div`,{className:`row gap-8`,style:{flexShrink:0},children:[w.model&&(0,m.jsx)(`span`,{className:`badge mono`,children:w.model}),w.agent&&(0,m.jsx)(`span`,{className:`badge`,children:w.agent}),(0,m.jsxs)(`span`,{className:`badge ${T.cls}`,children:[(0,m.jsx)(`span`,{className:`dot`}),T.label]})]})]}),w.phase&&(0,m.jsxs)(`div`,{className:`row gap-8`,style:{marginTop:10,fontSize:14},children:[(0,m.jsx)(i,{name:`activity`}),(0,m.jsx)(`span`,{style:d,children:w.phase})]}),(0,m.jsxs)(`div`,{className:`row wrap`,style:{gap:16,marginTop:12,fontSize:13,color:`var(--text-2)`},children:[w.tokens>0&&(0,m.jsxs)(`span`,{children:[l(w.tokens),` tok`]}),w.cost>0&&(0,m.jsxs)(`span`,{children:[`$`,w.cost.toFixed(2)]}),w.turn_started_at?(0,m.jsx)(`span`,{children:(0,m.jsx)(c,{startedAt:w.turn_started_at})}):null,(0,m.jsxs)(`span`,{className:`dim`,children:[`updated `,o(w.updated_at),` ago`]})]}),(w.error||w.blocked_on)&&(0,m.jsx)(`div`,{style:{marginTop:10},children:(0,m.jsx)(`span`,{className:`badge bad`,style:{maxWidth:`100%`,...d},children:w.error||w.blocked_on})})]}),(O||k)&&(0,m.jsxs)(`div`,{className:`grid gap-12`,style:{marginTop:12,gridTemplateColumns:O&&k?`minmax(0, 1fr) minmax(0, 1fr)`:`1fr`},children:[O&&(0,m.jsxs)(`div`,{className:`card pad-md`,children:[(0,m.jsx)(`div`,{className:`card-head`,children:(0,m.jsxs)(`h3`,{children:[`Files touched `,(0,m.jsxs)(`span`,{className:`dim`,children:[`(`,E.count,`)`]})]})}),(0,m.jsx)(`div`,{className:`stack`,style:{gap:6,marginTop:8},children:E.items.map(e=>(0,m.jsxs)(`div`,{className:`row between gap-12`,style:{fontSize:13},children:[(0,m.jsx)(`span`,{className:`mono`,style:{...d,minWidth:0,flex:1},title:e.file,children:e.file}),(0,m.jsxs)(`span`,{style:{flexShrink:0},children:[(0,m.jsxs)(`span`,{style:{color:`var(--good)`},children:[`+`,e.additions]}),` `,(0,m.jsxs)(`span`,{style:{color:`var(--bad)`},children:[`−`,e.deletions]})]})]},e.file))})]}),k&&(0,m.jsxs)(`div`,{className:`card pad-md`,children:[(0,m.jsx)(`div`,{className:`card-head`,children:(0,m.jsxs)(`h3`,{children:[`Plan`,` `,(0,m.jsxs)(`span`,{className:`dim`,children:[`(`,D.done,`/`,D.total,`)`]})]})}),(0,m.jsx)(`div`,{className:`stack`,style:{gap:6,marginTop:8},children:D.items.map((e,t)=>(0,m.jsxs)(`div`,{className:`row gap-8`,style:{fontSize:13},children:[(0,m.jsx)(`span`,{className:`feed-dot ${e.status===`completed`?`ok`:e.status===`in_progress`?`acc`:``}`}),(0,m.jsx)(`span`,{style:{textDecoration:e.status===`completed`?`line-through`:`none`,color:e.status===`completed`?`var(--text-3)`:`inherit`},children:e.content})]},t))})]})]}),(0,m.jsxs)(`div`,{className:`card pad-md`,style:{marginTop:12},children:[(0,m.jsxs)(`div`,{className:`card-head`,style:{justifyContent:`space-between`,marginBottom:12},children:[(0,m.jsx)(`h3`,{children:`Timeline`}),j.length>0&&(0,m.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>S(e=>!e),children:x?`Show conversation`:`Show all ${j.length} steps`})]}),x?(0,m.jsx)(`div`,{className:`stack gap-12`,children:M.map((e,t)=>(0,m.jsx)(g,{rec:e},t))}):(0,m.jsx)(_,{turns:A})]})]})}export{v as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GreenhouseView-Lv_I5ndg.js","assets/rolldown-runtime-hePW80VL.js","assets/react-DlYQp10C.js","assets/drawable-UEPfHNCy.js","assets/index-CKCvC6Qx.js","assets/api-BfpZmUMI.js","assets/sections-ChwaobfW.js","assets/index-jYlWihN-.css","assets/jobBuckets-Dbq8ZlWW.js","assets/OperatorHudView-DLFP3hH7.js","assets/JournalView-ja3ZSAEQ.js"])))=>i.map(i=>d[i]);
2
+ import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{i as n,t as r}from"./react-DlYQp10C.js";import{t as i}from"./api-BfpZmUMI.js";import{n as a,r as o}from"./sections-ChwaobfW.js";import{E as s,I as c,J as l,L as u,P as d,Q as f,R as p,S as m,V as h,Y as g,b as _,t as v,w as y,x as b,z as x}from"./index-CKCvC6Qx.js";var S=t(n(),1),C={neutral:`Loaded & ready`,imperial:`The Codex in force`,military:`The unit stands ready`,cyberpunk:`Jacked in`,wizard:`Wards in place`,pirate:`The crew stands ready`,gamer:`Game loaded`,sports:`The squad takes the field`,biker:`The crew rolls out`,commentator:`Lights out, away we go`,verstappen:`Setup's in`,joker:`Mic check`,mean:`Rules are up`,marvin:`Online. Reluctantly.`},w=e=>e.deployed?C[e.theme]||`Loaded & ready`:`Not deployed`,T=r();function E({value:e,size:t=232}){let n=f(e,1100)??0,r=t/2-14,i=2*Math.PI*r,a=i*(1-n);return(0,T.jsxs)(`div`,{className:`ring-wrap`,style:{width:t,height:t},children:[(0,T.jsxs)(`svg`,{viewBox:`0 0 ${t} ${t}`,children:[(0,T.jsx)(`circle`,{cx:t/2,cy:t/2,r,fill:`none`,stroke:`var(--surface-3)`,strokeWidth:`10`}),(0,T.jsx)(`circle`,{cx:t/2,cy:t/2,r,fill:`none`,stroke:`var(--accent)`,strokeWidth:`10`,strokeLinecap:`round`,strokeDasharray:i,strokeDashoffset:a}),Array.from({length:48}).map((e,i)=>{let a=i/48*2*Math.PI,o=r-18,s=r-24,c=t/2+Math.cos(a)*o,l=t/2+Math.sin(a)*o,u=t/2+Math.cos(a)*s,d=t/2+Math.sin(a)*s;return(0,T.jsx)(`line`,{x1:c,y1:l,x2:u,y2:d,stroke:`var(--line-2)`,strokeWidth:`1`,opacity:i/48<n?.9:.25},i)})]}),(0,T.jsxs)(`div`,{className:`ring-center`,children:[(0,T.jsxs)(`div`,{className:`pct`,children:[Math.round(n*100),(0,T.jsx)(`span`,{style:{fontSize:20,color:`var(--text-3)`},children:`%`})]}),(0,T.jsx)(`div`,{className:`lbl`,children:`germination`})]})]})}function D({overview:e}){let t=c(e.diff),n=e.counts||{};return(0,T.jsxs)(`div`,{className:`card kpiband rise mb-16`,children:[[{key:`agents`,label:`Agents`,hash:`#/agents`},{key:`skills`,label:`Skills`,hash:`#/skills`},{key:`laws`,label:`Dictates`,hash:`#/laws`}].map(e=>{let t=n[e.key];return(0,T.jsxs)(`a`,{className:`kseg`,href:e.hash,title:`Open ${e.label}`,children:[(0,T.jsx)(`span`,{className:`kseg-n`+(t===0?` zero`:``),children:t==null?`—`:(0,T.jsx)(g,{value:t})}),(0,T.jsx)(`span`,{className:`kseg-l`,children:e.label})]},e.key)}),(0,T.jsx)(`div`,{className:`kseg-spacer`}),(0,T.jsxs)(`button`,{className:`kseg`+(t>0?` hot`:``),onClick:()=>l(`#/diff`),title:`Open changes`,children:[(0,T.jsx)(`span`,{className:`kseg-n`+(t===0?` zero`:``),children:(0,T.jsx)(g,{value:t})}),(0,T.jsx)(`span`,{className:`kseg-l`,children:`Local edits`}),t>0&&(0,T.jsx)(`span`,{className:`delta up`,children:`▲`})]})]})}function O({overview:e}){return(0,T.jsx)(`div`,{className:`genome`,children:o.map((t,n)=>{let r=a[t],i=e.counts?.[t];return(0,T.jsxs)(`div`,{className:`card gcell rise`,style:{"--i":n},onClick:()=>l(`#/section/`+t),children:[(0,T.jsxs)(`div`,{className:`gtop`,children:[(0,T.jsx)(`span`,{className:`gname`,children:r.label}),(0,T.jsx)(d,{name:r.icon,className:`gicon`})]}),(0,T.jsx)(`div`,{className:`gcount`+(i===0?` zero`:``),children:i==null?`—`:(0,T.jsx)(g,{value:i})}),(0,T.jsx)(`div`,{className:`gdesc`,children:r.desc})]},t)})})}function k({jobs:e}){if(!e||e.length===0)return(0,T.jsx)(`div`,{className:`feed`,children:(0,T.jsxs)(`div`,{className:`empty`,children:[(0,T.jsx)(`div`,{className:`big`,children:`No activity yet`}),`Actions you run appear here.`]})});let t={done:`ok`,running:`acc`,failed:`bad`},n=[...e].sort((e,t)=>t.started-e.started).slice(0,8);return(0,T.jsx)(`div`,{className:`feed`,children:n.map(e=>(0,T.jsxs)(`div`,{className:`feed-row`,children:[(0,T.jsx)(`span`,{className:`feed-dot ${t[e.status]||`ok`}`}),(0,T.jsx)(`span`,{className:`feed-txt`,children:(0,T.jsx)(`b`,{children:e.action})}),(0,T.jsxs)(`span`,{className:`feed-when`,children:[x(e.started),` ago`]})]},e.id))})}function A({overview:e,sigil:t,setup:n,jobs:r,onAction:i}){let a=w(e),s=p(e,n);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`div`,{className:`card pad-lg rise mb-16`,children:(0,T.jsxs)(`div`,{className:`hero`,children:[(0,T.jsx)(E,{value:s}),(0,T.jsxs)(`div`,{className:`hero-facts`,children:[(0,T.jsx)(`div`,{className:`ttl`,children:a}),t&&(0,T.jsxs)(`div`,{className:`voice-readout`,children:[(0,T.jsx)(`span`,{className:`vr-cur`,children:`▕`}),(0,T.jsx)(`span`,{className:`vr-txt`,children:t})]},e.theme),(0,T.jsxs)(`p`,{className:`sub`,children:[`One source rendered into `,(0,T.jsx)(`code`,{children:e.target}),`. Every repo on this machine inherits it.`]}),(0,T.jsxs)(`div`,{className:`hero-chips`,children:[(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`voice`}),(0,T.jsx)(`span`,{className:`cv`,style:{textTransform:`capitalize`},children:e.theme})]}),(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`mode`}),(0,T.jsx)(`span`,{className:`cv`,children:e.emit})]}),(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`footprint`}),(0,T.jsx)(`span`,{className:`cv`,children:e.footprint})]}),(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`built`}),(0,T.jsx)(`span`,{className:`cv`,children:e.build_time||`unknown`})]}),(0,T.jsxs)(`span`,{className:`chip`,children:[(0,T.jsx)(`span`,{className:`ck`,children:`fp`}),(0,T.jsx)(`span`,{className:`cv`,children:n?.installed_fp||`—`})]})]}),(0,T.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,T.jsxs)(`button`,{className:`btn`,onClick:()=>i(`update`),children:[(0,T.jsx)(d,{name:`refresh`}),`Update`]}),(0,T.jsxs)(`button`,{className:`btn ghost`,onClick:()=>i(`build-all`),children:[(0,T.jsx)(d,{name:`build`}),`Rebuild`]}),(0,T.jsxs)(`button`,{className:`btn ghost`,onClick:()=>i(`doctor`),children:[(0,T.jsx)(d,{name:`doctor`}),`Run doctor`]})]})]})]})}),(0,T.jsx)(D,{overview:e}),(0,T.jsxs)(`div`,{className:`grid split-status`,children:[(0,T.jsxs)(`div`,{className:`card pad-lg`,children:[(0,T.jsxs)(`div`,{className:`card-head`,children:[(0,T.jsx)(`h3`,{children:`Capability genome`}),(0,T.jsx)(`div`,{className:`right`,children:(0,T.jsxs)(`span`,{className:`tick`,children:[o.length,` sections`]})})]}),(0,T.jsx)(O,{overview:e})]}),(0,T.jsxs)(`div`,{className:`card pad-lg`,children:[(0,T.jsxs)(`div`,{className:`card-head`,children:[(0,T.jsx)(`h3`,{children:`Recent activity`}),(0,T.jsx)(`div`,{className:`right`,children:(0,T.jsxs)(`span`,{className:`badge acc`,children:[(0,T.jsx)(`span`,{className:`dot`}),`live`]})})]}),(0,T.jsx)(k,{jobs:r})]})]})]})}function j({k:e,overview:t,max:n}){let r=a[e],i=t.counts?.[e]??0;return(0,T.jsxs)(`div`,{className:`strand`,children:[(0,T.jsxs)(`span`,{className:`strand-name`,children:[(0,T.jsx)(`span`,{className:`strand-dot`}),(0,T.jsx)(`a`,{href:`#/section/`+e,className:`strand-link stretch-link`,children:r.label})]}),(0,T.jsx)(`div`,{className:`hbar`,children:(0,T.jsx)(`i`,{style:{width:`${i/n*100}%`}})}),(0,T.jsx)(`span`,{className:`strand-val`,children:i})]})}function M({overview:e,sigil:t,setup:n,jobs:r}){let i=u(e.counts),a=n?.version_verdict||``,s=a.includes(`up to date`),l=c(e.diff),d=[[`Source`,`src/, the canonical genetic material`,n?.source_fp||`—`,!0],[`Render`,`geneseed build → ${e.emit}`,e.theme+` voice`,!0],[`Deployed`,e.target,`inherited by every repo`,!1]];return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`div`,{className:`mb-16`,children:(0,T.jsxs)(`div`,{className:`card pad-lg rise`,style:{position:`relative`,overflow:`hidden`},children:[(0,T.jsx)(`h2`,{className:`h`,style:{fontSize:22,margin:`0 0 18px`},children:`Gene-seed lineage`}),(0,T.jsxs)(`div`,{className:`lineage-track`,children:[(0,T.jsx)(`div`,{className:`spine`}),d.map(([e,t,n,r],i)=>(0,T.jsxs)(`div`,{className:`lineage-step`,children:[(0,T.jsx)(`span`,{className:`node ${r?`on`:``}`}),(0,T.jsx)(`div`,{className:`lt`,children:e}),(0,T.jsx)(`div`,{className:`ld`,children:t}),(0,T.jsx)(`div`,{className:`ltag`,children:n})]},i))]}),(0,T.jsx)(`hr`,{className:`hr`}),t&&(0,T.jsxs)(`div`,{className:`voice-readout`,style:{marginBottom:14},children:[(0,T.jsx)(`span`,{className:`vr-cur`,children:`▕`}),(0,T.jsx)(`span`,{className:`vr-txt`,children:t})]},e.theme),(0,T.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,T.jsxs)(`span`,{className:`badge ${s?`ok`:`warn`}`,children:[(0,T.jsx)(`span`,{className:`dot`}),`in sync · `,a]}),(0,T.jsxs)(`span`,{className:`badge`,children:[(0,T.jsx)(`span`,{className:`dot`}),l,` local edits`]})]})]})}),(0,T.jsxs)(`div`,{className:`grid split-even`,children:[(0,T.jsxs)(`div`,{className:`card pad-lg`,children:[(0,T.jsxs)(`div`,{className:`card-head`,children:[(0,T.jsx)(`h3`,{children:`Genome strand`}),(0,T.jsx)(`div`,{className:`right`,children:(0,T.jsx)(`span`,{className:`tick`,children:`by volume`})})]}),o.map(t=>(0,T.jsx)(j,{k:t,overview:e,max:i},t))]}),(0,T.jsxs)(`div`,{className:`card pad-lg`,children:[(0,T.jsx)(`div`,{className:`card-head`,children:(0,T.jsx)(`h3`,{children:`Recent activity`})}),(0,T.jsx)(k,{jobs:r})]})]})]})}function N({overview:e,setup:t,jobs:n}){let r=o.reduce((t,n)=>t+(e.counts?.[n]??0),0),i=u(e.counts),s=e.doctor?.ok,l=e.doctor?.problems?.length??0,d=c(e.diff);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`div`,{className:`card pad-md rise mb-16`,children:(0,T.jsx)(`div`,{className:`row wrap between gap-16`,children:(0,T.jsxs)(`div`,{className:`row`,style:{gap:20,flexWrap:`wrap`},children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`status`}),(0,T.jsx)(`div`,{className:`row`,style:{gap:8,marginTop:4},children:(0,T.jsxs)(`span`,{className:`badge ${e.deployed?`ok`:`warn`}`,children:[(0,T.jsx)(`span`,{className:`dot`}),e.deployed?`deployed`:`not deployed`]})})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`voice`}),(0,T.jsx)(`div`,{className:`metric`,style:{fontSize:18,marginTop:6,textTransform:`capitalize`},children:e.theme})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`mode`}),(0,T.jsx)(`div`,{className:`mono`,style:{fontSize:14,marginTop:6},children:e.emit})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`fingerprint`}),(0,T.jsx)(`div`,{className:`mono`,style:{fontSize:14,marginTop:6,color:`var(--accent)`},children:t?.installed_fp||`—`})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`doctor`}),(0,T.jsx)(`div`,{className:`row`,style:{gap:8,marginTop:4},children:s?(0,T.jsxs)(`span`,{className:`badge ok`,children:[(0,T.jsx)(`span`,{className:`dot`}),`clean`]}):(0,T.jsxs)(`span`,{className:`badge warn`,children:[(0,T.jsx)(`span`,{className:`dot`}),l,` issue`,l===1?``:`s`]})})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`tick`,children:`edits`}),(0,T.jsx)(`div`,{className:`metric`,style:{fontSize:18,marginTop:6},children:d})]})]})})}),(0,T.jsxs)(`div`,{className:`grid split-operator`,children:[(0,T.jsxs)(`div`,{className:`card rise`,style:{"--i":1},children:[(0,T.jsxs)(`div`,{className:`card-head pad-lg`,style:{padding:`18px 20px 0`,marginBottom:14},children:[(0,T.jsx)(`h3`,{children:`Sections`}),(0,T.jsx)(`div`,{className:`right`,children:(0,T.jsxs)(`span`,{className:`tick`,children:[r,` entries total`]})})]}),(0,T.jsxs)(`table`,{className:`tbl`,children:[(0,T.jsx)(`thead`,{children:(0,T.jsxs)(`tr`,{children:[(0,T.jsx)(`th`,{children:`Section`}),(0,T.jsx)(`th`,{children:`Detail`}),(0,T.jsx)(`th`,{style:{width:130},children:`Share`}),(0,T.jsx)(`th`,{className:`num`,children:`Count`})]})}),(0,T.jsx)(`tbody`,{children:o.map(t=>{let n=a[t],r=e.counts?.[t]??0;return(0,T.jsxs)(`tr`,{className:`clickable`,children:[(0,T.jsx)(`td`,{className:`name`,children:(0,T.jsx)(`a`,{href:`#/section/`+t,className:`stretch-link`,children:n.label})}),(0,T.jsx)(`td`,{className:`muted`,children:n.desc}),(0,T.jsx)(`td`,{children:(0,T.jsx)(`div`,{className:`hbar`,children:(0,T.jsx)(`i`,{style:{width:`${r/i*100}%`}})})}),(0,T.jsx)(`td`,{className:`num`,children:r})]},t)})})]})]}),(0,T.jsxs)(`div`,{className:`card pad-lg rise`,style:{"--i":2},children:[(0,T.jsx)(`div`,{className:`card-head`,children:(0,T.jsx)(`h3`,{children:`Run log`})}),(0,T.jsx)(k,{jobs:n})]})]})]})}var P=e({default:()=>R}),F=(0,S.lazy)(()=>v(()=>import(`./GreenhouseView-Lv_I5ndg.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))),I=(0,S.lazy)(()=>v(()=>import(`./OperatorHudView-DLFP3hH7.js`),__vite__mapDeps([9,1,2,6,4,5,7,8]))),L=(0,S.lazy)(()=>v(()=>import(`./JournalView-ja3ZSAEQ.js`),__vite__mapDeps([10,1,2,5,3,4,6,7])));function R({overview:e,overviewError:t,onRetry:n,themes:r,setup:a,runs:o,onAction:c,layout:l=`cultivar`,dataRev:u}){let d=l,[f,p]=(0,S.useState)(`status`),g=e&&r.find(t=>t.name===e.theme)?.sigil||``,{data:v}=h(()=>d===`greenhouse`||d===`operator`?i.doctor().catch(()=>null):Promise.resolve(null),[d,u]),{data:x}=h(()=>d===`journal`?i.recent().catch(()=>null):Promise.resolve(null),[d,u]);if(!e)return t?(0,T.jsxs)(`div`,{children:[(0,T.jsx)(m,{error:`Could not load the harness overview: ${t}`}),(0,T.jsx)(`button`,{className:`btn`,onClick:n,children:`Retry`})]}):(0,T.jsx)(y,{});let C=e.daemon_stale?(0,T.jsx)(b,{}):null;return e.deployed?f===`status`&&d===`journal`?(0,T.jsxs)(S.Suspense,{fallback:(0,T.jsx)(y,{}),children:[C,(0,T.jsx)(L,{overview:e,recent:x,onAction:c,onDirection:p,dataRev:u})]}):(0,T.jsxs)(T.Fragment,{children:[C,(0,T.jsx)(`div`,{className:`head-row`,children:(0,T.jsx)(s,{"aria-label":`Dashboard view`,children:[[`status`,`Status`],[`lineage`,`Lineage`],[`operator`,`Operator`]].map(([e,t])=>(0,T.jsx)(`button`,{className:f===e?`on`:``,onClick:()=>p(e),"aria-pressed":f===e,children:t},e))})}),(0,T.jsxs)(`div`,{className:`view-in`,children:[f===`status`&&d===`cultivar`&&(0,T.jsx)(A,{overview:e,sigil:g,setup:a,jobs:o,onAction:c}),f===`status`&&d===`greenhouse`&&(0,T.jsx)(S.Suspense,{fallback:(0,T.jsx)(y,{}),children:(0,T.jsx)(F,{overview:e,sigil:g,jobs:o,doctor:v,onAction:c})}),f===`status`&&d===`operator`&&(0,T.jsx)(S.Suspense,{fallback:(0,T.jsx)(y,{}),children:(0,T.jsx)(I,{overview:e,jobs:o,doctor:v,onAction:c})}),f===`lineage`&&(0,T.jsx)(M,{overview:e,sigil:g,setup:a,jobs:o}),f===`operator`&&(0,T.jsx)(N,{overview:e,setup:a,jobs:o})]},f)]}):(0,T.jsxs)(T.Fragment,{children:[C,(0,T.jsx)(_,{onAction:c})]})}export{R as default,w as n,P as t};
@@ -0,0 +1,5 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{t as r}from"./api-BfpZmUMI.js";import{D as i,E as a,J as o,O as s,P as c,S as l,V as u,a as d,i as f,k as p,n as m,o as ee,r as h,s as g,w as _}from"./index-CKCvC6Qx.js";import{a as v,i as y,l as b,n as x,o as S,r as C,s as w,t as T,u as E}from"./Markdown-zaXXXHz9.js";var D=e(t(),1),O=n();function k(e,t=0){let n=String(e).toLowerCase().trim().replace(/[^a-z0-9\s-]/g,``).replace(/\s+/g,`-`).replace(/-+/g,`-`).replace(/^-+|-+$/g,``);return n&&/^[a-z]/.test(n)?n:`h-${t}-${n||`section`}`}function A(e){return e.replace(/!?\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\[\[([^\]]+)\]\]/g,`$1`).replace(/`([^`]*)`/g,`$1`).replace(/\*\*|__/g,``).replace(/\*([^*\s][^*]*)\*/g,`$1`)}function j(e){let t=[],n=!1,r=0;for(let i of(e||``).split(`
2
+ `)){if(i.startsWith("```")){n=!n;continue}if(n)continue;let e=i.match(/^(##|###)\s+(.+?)\s*$/);e&&(r+=1,t.push({level:e[1].length,title:A(e[2]),id:k(e[2],r)}))}return t}var M={"opencode-global":[`install-opencode`,`Global (recommended)`],opencode:[`install-opencode`,`Per repo`],"claude-global":[`install-claude-code`],claude:[`install-claude-code`],"openclaude-global":[`install-openclaude`],openclaude:[`install-openclaude`],"bob-global":[`install-bob`],bob:[`install-bob`],files:[`install-agent-md`]},N=`you already know this`;function P({page:e,overview:t,onAction:n}){let r=(0,D.useRef)(null),i=(0,D.useMemo)(()=>x(e.body,e.links),[e.body,e.links]);(0,D.useEffect)(()=>{let e=r.current;if(!e)return;let t=0;e.querySelectorAll(`h1, h2, h3`).forEach(e=>{if(e.tagName!==`H1`&&(t+=1),!e.id){let n=k(e.textContent||``,t);n&&(e.id=n)}}),e.querySelectorAll(`blockquote`).forEach(e=>{(e.querySelector(`strong`)?.textContent||``).toLowerCase().startsWith(N)&&e.classList.add(`analogy`)})},[i]),(0,D.useEffect)(()=>{let e=r.current;if(!e)return;let t=e=>{let t=e.target.closest(`a[href]`);if(!t)return;let n=t.getAttribute(`href`);n&&n.startsWith(`#/`)&&(e.preventDefault(),o(n))};return e.addEventListener(`click`,t),()=>e.removeEventListener(`click`,t)},[i]),(0,D.useEffect)(()=>{let n=r.current;if(!n)return;n.querySelectorAll(`.docs-here`).forEach(e=>e.classList.remove(`docs-here`));let[i,a]=M[t?.emit]||[];if(!i)return;let o=null;e.id===`install`?o=n.querySelector(`a[href="#/docs/${i}"]`)?.closest(`li`):e.id===i&&a&&(o=[...n.querySelectorAll(`h2`)].find(e=>k(e.textContent||``)===k(a))),o?.classList.add(`docs-here`)},[i,e.id,t?.emit]);let a=[];return e.id===`install`&&(a.push({label:`Run doctor`,action:`doctor`}),a.push({label:`Rebuild`,action:`build`})),e.id===`verify`&&a.push({label:`Run doctor`,action:`doctor`}),e.id===`upgrade`&&a.push({label:`Update`,action:`update`}),(0,O.jsxs)(`div`,{className:`detail-doc`,children:[(0,O.jsx)(`h1`,{style:{marginTop:0},children:e.title}),e.source&&(0,O.jsx)(`div`,{className:`doc-meta`,children:(0,O.jsxs)(`span`,{className:`badge`,children:[(0,O.jsx)(`span`,{className:`dot`}),e.source]})}),a.length>0&&(0,O.jsx)(`div`,{className:`row wrap gap-10`,style:{margin:`10px 0 14px`},children:a.map(e=>e.hash?(0,O.jsx)(`a`,{className:`btn ghost sm`,href:e.hash,children:e.label},e.label):(0,O.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>n&&n(e.action),children:e.label},e.label))}),(0,O.jsx)(`div`,{className:`markdown`,ref:r,dangerouslySetInnerHTML:{__html:i}}),e.link&&(0,O.jsx)(`div`,{style:{marginTop:24},children:(0,O.jsx)(`a`,{className:`btn soft sm`,href:e.link.hash,children:e.link.label})})]})}var F=1200;function I({a:e,kind:t}){let n=t===`positional`?e.dest:e.names.join(`, `),r=[];return e.metavar&&r.push(e.metavar),e.choices&&r.push(`{${e.choices.join(`|`)}}`),e.default!==null&&e.default!==void 0&&e.default!==``&&!e.is_flag&&r.push(`default: ${e.default}`),e.required&&r.push(`required`),(0,O.jsxs)(`div`,{className:`cli-arg`,children:[(0,O.jsx)(`code`,{className:`cli-arg-name`,children:n}),r.length>0&&(0,O.jsxs)(`code`,{className:`cli-arg-meta`,children:[` `,r.join(` · `)]}),e.help&&(0,O.jsx)(`div`,{className:`cli-arg-help`,children:e.help})]})}function L({text:e}){let[t,n]=(0,D.useState)(!1);return(0,O.jsxs)(`button`,{className:`btn ghost sm`,onClick:async()=>{try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),F)}catch{}},title:`Copy command`,children:[(0,O.jsx)(c,{name:t?`spark`:`copy`}),t?`Copied`:`Copy`]})}function R({cmd:e,prog:t}){let n=[t,e.name];for(let t of e.positionals||[]){let e=(t.metavar||t.dest||``).toUpperCase();n.push(t.required?e:`[${e}]`)}(e.options||[]).length&&n.push(`[OPTIONS]`);let r=n.join(` `);return(0,O.jsxs)(`div`,{className:`card pad-md mb-12 cli-card`,children:[(0,O.jsxs)(`div`,{className:`row wrap between`,style:{alignItems:`flex-start`},children:[(0,O.jsxs)(`div`,{className:`stack`,style:{gap:4},children:[(0,O.jsx)(`h3`,{style:{margin:0},children:(0,O.jsx)(`code`,{children:e.name})}),e.help&&(0,O.jsx)(`p`,{className:`sub`,style:{margin:0},children:e.help})]}),(0,O.jsx)(L,{text:`${t} ${e.name}`})]}),(0,O.jsx)(`pre`,{className:`cli-syn`,children:r}),(e.positionals||[]).length>0&&(0,O.jsxs)(`div`,{className:`cli-block`,children:[(0,O.jsx)(`div`,{className:`cli-block-head`,children:`Arguments`}),e.positionals.map(e=>(0,O.jsx)(I,{a:e,kind:`positional`},e.dest))]}),(e.options||[]).length>0&&(0,O.jsxs)(`div`,{className:`cli-block`,children:[(0,O.jsx)(`div`,{className:`cli-block-head`,children:`Options`}),e.options.map(e=>(0,O.jsx)(I,{a:e,kind:`option`},e.names.join(`,`)))]})]})}function z({page:e}){let t=e.prog||`geneseed`,n=e.commands||[];return(0,O.jsxs)(`div`,{className:`detail-doc`,children:[(0,O.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,O.jsxs)(`p`,{className:`sub`,style:{marginTop:4},children:[`Every subcommand of `,(0,O.jsx)(`code`,{children:t}),`. Generated from the parser at request time (the same one `,(0,O.jsx)(`code`,{children:`geneseed`}),` actually parses), so this page cannot drift.`]}),(0,O.jsx)(`div`,{style:{marginTop:18},children:n.map(e=>(0,O.jsx)(R,{cmd:e,prog:t},e.name))})]})}function B({page:e}){let t=e.rows||[],n=e.theme||`neutral`;return(0,O.jsxs)(`div`,{className:`detail-doc`,children:[(0,O.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,O.jsxs)(`p`,{className:`sub`,style:{marginTop:4},children:[`Geneseed's invented vocabulary, decoded. Left: the neutral, plain-English term. Right: the word your `,(0,O.jsx)(`code`,{style:{textTransform:`capitalize`},children:n}),` theme actually uses in the agent's voice. Last: the developer idea it maps to.`]}),(0,O.jsx)(`div`,{className:`card pad-md`,style:{marginTop:18},children:(0,O.jsxs)(`table`,{className:`glossary-table`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`th`,{children:`Concept`}),(0,O.jsx)(`th`,{children:`Neutral term`}),(0,O.jsxs)(`th`,{children:[`In `,n]}),(0,O.jsx)(`th`,{children:`Meaning`}),(0,O.jsx)(`th`,{children:`In dev terms`})]})}),(0,O.jsx)(`tbody`,{children:t.map(e=>(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`td`,{children:(0,O.jsx)(`strong`,{children:e.label})}),(0,O.jsx)(`td`,{children:(0,O.jsx)(`code`,{children:e.neutral||`—`})}),(0,O.jsx)(`td`,{children:(0,O.jsx)(`code`,{children:e.themed||e.neutral||`—`})}),(0,O.jsx)(`td`,{className:`dim`,children:e.desc}),(0,O.jsx)(`td`,{className:`dim`,children:e.analogy||`—`})]},e.label))})]})})]})}var V={enforced:`ok`,automatic:`ok`,asked:`warn`,"on demand":`warn`};function H(e){let t=[],n=[],r=`before`;for(let i of(e||``).split(`
3
+ `))r===`before`&&/^\|\s*piece\s*\|/i.test(i)?r=`map`:r===`map`&&!i.trimStart().startsWith(`|`)&&(r=`after`),r===`before`?t.push(i):r===`after`&&n.push(i);return[t.join(`
4
+ `),n.join(`
5
+ `)]}var U=({text:e})=>(0,O.jsx)(`span`,{dangerouslySetInnerHTML:{__html:C(y.parseInline(e||``))}}),W=({kind:e})=>(0,O.jsx)(`span`,{className:`tag ${V[e]||``}`,children:e});function G({page:e,overview:t,onAction:n}){let[r,i]=(0,D.useState)(0);if(!e.rows)return(0,O.jsx)(P,{page:e,overview:t,onAction:n});let a=e.rows[r]||e.rows[0],[o,s]=H(e.body);return(0,O.jsxs)(`div`,{className:`detail-doc`,children:[(0,O.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,O.jsx)(T,{body:o,links:e.links}),(0,O.jsxs)(`div`,{className:`docs-map`,children:[(0,O.jsx)(`ul`,{className:`map-tree`,"aria-label":`Pieces`,children:e.rows.map((e,t)=>(0,O.jsx)(`li`,{children:(0,O.jsxs)(`button`,{className:`map-node ${t===r?`on`:``}`,"aria-pressed":t===r,onClick:()=>i(t),children:[(0,O.jsx)(`span`,{className:`map-piece`,children:(0,O.jsx)(U,{text:e.piece})}),(0,O.jsx)(W,{kind:e.kind}),(0,O.jsx)(`span`,{className:`mono dim map-cost`,children:(0,O.jsx)(U,{text:e.cost})})]})},t))}),a&&(0,O.jsxs)(`div`,{className:`card pad-md map-detail`,"aria-live":`polite`,children:[(0,O.jsx)(`h3`,{style:{margin:`0 0 8px`},children:(0,O.jsx)(U,{text:a.piece})}),(0,O.jsx)(W,{kind:a.kind}),(0,O.jsxs)(`dl`,{children:[(0,O.jsx)(`dt`,{children:`Does`}),(0,O.jsx)(`dd`,{children:(0,O.jsx)(U,{text:a.does})}),(0,O.jsx)(`dt`,{children:`Costs`}),(0,O.jsx)(`dd`,{children:(0,O.jsx)(U,{text:a.cost})}),(0,O.jsx)(`dt`,{children:`Turn it off`}),(0,O.jsx)(`dd`,{children:(0,O.jsx)(U,{text:a.off})})]})]})]}),s.trim()&&(0,O.jsx)(T,{body:s,links:e.links})]})}var K=5,q=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function J(e,t){let n=e||``,r=[];for(let e of t||[])if([...new Set([e.themed,e.neutral,e.label].filter(Boolean))].some(e=>RegExp(`(?<![\\w-])${q(e)}s?(?![\\w-])`,`i`).test(n))&&r.push(e),r.length===K)break;return r}var Y=e=>document.getElementById(e)?.scrollIntoView({behavior:`smooth`});function X({body:e,glossaryRows:t}){let n=(0,D.useMemo)(()=>j(e),[e]),r=(0,D.useMemo)(()=>J(e,t),[e,t]);return!n.length&&!r.length?null:(0,O.jsxs)(`aside`,{className:`docs-margin`,children:[n.length>0&&(0,O.jsxs)(`nav`,{className:`docs-toc`,"aria-label":`On this page`,children:[(0,O.jsx)(`div`,{className:`docs-toc-head`,children:`On this page`}),(0,O.jsx)(`ul`,{children:n.map(e=>(0,O.jsx)(`li`,{className:`lvl-${e.level}`,children:(0,O.jsx)(`a`,{href:`#${e.id}`,onClick:t=>{t.preventDefault(),Y(e.id)},children:e.title})},e.id))})]}),r.length>0&&(0,O.jsxs)(`div`,{className:`docs-gloss`,children:[(0,O.jsx)(`div`,{className:`docs-toc-head`,children:`Terms on this page`}),r.map(e=>(0,O.jsxs)(`div`,{className:`docs-gloss-card`,children:[(0,O.jsx)(`b`,{children:e.themed||e.neutral||e.label}),(0,O.jsx)(`p`,{children:e.desc})]},e.label))]})]})}function te({page:e}){let t=e.version||{},n=[[`Theme`,e.theme],[`Install mode`,e.emit],[`Deployed`,e.deployed?`yes`:`no`],[`Target`,(0,O.jsx)(`code`,{children:e.target},`t`)],[`Source root`,(0,O.jsx)(`code`,{children:e.root},`r`)],[`Installed build`,(0,O.jsx)(`code`,{children:t.installed_fp||`(none)`},`i`)],[`Source build`,(0,O.jsx)(`code`,{children:t.source_fp||`—`},`s`)],[`Match?`,t.verdict||`—`],[`License`,e.license]];return(0,O.jsxs)(`div`,{className:`detail-doc`,children:[(0,O.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,O.jsx)(`p`,{className:`sub`,style:{marginTop:4},children:`Live snapshot of the install behind this UI, plus where to go next.`}),(0,O.jsx)(`div`,{className:`card pad-md`,style:{marginTop:18},children:n.map(([e,t])=>(0,O.jsxs)(`div`,{className:`kv`,children:[(0,O.jsx)(`span`,{className:`k`,children:e}),(0,O.jsx)(`span`,{className:`v`,children:t??`—`})]},e))}),(0,O.jsxs)(`div`,{className:`row wrap gap-10`,style:{marginTop:18},children:[(0,O.jsxs)(`a`,{className:`btn ghost`,href:e.repo,target:`_blank`,rel:`noreferrer`,children:[(0,O.jsx)(c,{name:`external`}),e.repo_is_github?`GitHub repo`:`Source repo`]}),e.repo_is_github&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`a`,{className:`btn ghost`,href:`${e.repo}/issues`,target:`_blank`,rel:`noreferrer`,children:[(0,O.jsx)(c,{name:`external`}),`File an issue`]}),(0,O.jsxs)(`a`,{className:`btn ghost`,href:`${e.repo}/blob/main/LICENSE`,target:`_blank`,rel:`noreferrer`,children:[(0,O.jsx)(c,{name:`external`}),`License`]})]})]})]})}var ne=encodeURIComponent,Z=e=>`#/docs/${ne(e)}`;function Q(e){return e?.groups?.[0]?.pages?.[0]?.id||``}function re({data:e,error:t,overview:n,onAction:r}){if(t)return(0,O.jsx)(l,{error:t,style:{margin:18}});if(!e)return(0,O.jsx)(_,{label:`Loading page…`});switch(e.kind){case`markdown`:case`concept`:return(0,O.jsx)(P,{page:e,overview:n,onAction:r});case`map`:return(0,O.jsx)(G,{page:e,overview:n,onAction:r});case`cli`:return(0,O.jsx)(z,{page:e});case`glossary`:return(0,O.jsx)(B,{page:e});case`about`:return(0,O.jsx)(te,{page:e});default:return(0,O.jsxs)(`div`,{className:`empty`,children:[(0,O.jsx)(`div`,{className:`big`,children:`Unknown page kind`}),e.kind]})}}function $(e){return(e?.pages||[]).map(e=>({name:e.id,title:e.title,desc:e.description||``,group:e.section||`General`,groupC:`var(--accent)`}))}function ie({page:e,overview:t,onAction:n}){let[c,y]=p(s(t?.emit)),{data:x,error:C}=u(()=>r.docs(c),[c]),T=e||Q(x),{data:k,error:A,loading:j}=u(()=>T?r.docsPage(T,c):Promise.resolve(null),[T,c]),{data:M}=u(()=>r.docsPage(`glossary`,c).catch(()=>null),[c],`docs:glossary`);(0,D.useEffect)(()=>{if(x&&T&&!x.groups.some(e=>e.pages.some(e=>e.id===T))){let e=Q(x);e&&e!==T&&o(Z(e))}},[x,T]),(0,D.useEffect)(()=>{let e=document.scrollingElement||document.documentElement;for(let t of[document.getElementById(`main`),e])t&&(t.scrollTop=0)},[T]);let N=ee(x,T),P=N.part||x?.groups?.[0]||null,F=P?.id===h;(0,D.useEffect)(()=>{F&&k?.id===T&&d(T)},[F,k,T]);let I=F?[...g(),T]:[],[L,R]=(0,D.useState)(``),[z,B]=(0,D.useState)(`all`),[V,H]=(0,D.useState)(P?.id);P?.id!==V&&(H(P?.id),R(``),B(`all`));let U=$(P),W=S(U),G=z===`all`?U:U.filter(e=>e.group===z),K=E(G,L);return C?(0,O.jsx)(l,{error:C}):(0,O.jsx)(`div`,{className:`docs-wrap`,children:(0,O.jsxs)(`div`,{className:`library docs-lib`,children:[(0,O.jsxs)(`aside`,{className:`lib-kinds`,"aria-label":`Docs parts`,children:[(0,O.jsxs)(`div`,{className:`lib-title`,children:[(0,O.jsx)(`h1`,{className:`h`,children:`Docs`}),(0,O.jsx)(`span`,{className:`dim`,children:`How it works, and how to use it`})]}),(0,O.jsx)(a,{"aria-label":`Harness`,children:i.map(e=>(0,O.jsx)(`button`,{className:c===e.id?`on`:``,onClick:()=>y(e.id),"aria-pressed":c===e.id,children:e.label},e.id))}),(0,O.jsx)(`nav`,{className:`kind-list`,"aria-label":`Parts`,children:(x?.groups||[]).map(e=>(0,O.jsxs)(D.Fragment,{children:[(0,O.jsxs)(`a`,{href:e.pages[0]?Z(e.pages[0].id):`#/docs`,className:P?.id===e.id?`on`:``,"aria-current":P?.id===e.id?`page`:void 0,children:[e.label,(0,O.jsx)(`span`,{className:`mono dim`,children:e.pages.length})]}),P?.id===e.id&&(0,O.jsx)(v,{label:`Sections`,total:U.length,cats:W,cat:z,onChange:B})]},e.id))})]}),(0,O.jsx)(b,{label:P?.label||`Docs`,count:L.trim()?`${K.length} of ${G.length}`:G.length||``,extra:F&&(0,O.jsx)(f,{pages:P.pages,seen:I}),q:L,onQ:R,matched:K.length,inView:[P?.id,T],children:x?(0,O.jsx)(w,{rows:K,activeName:T,hrefOf:e=>Z(e.name),pills:F?e=>I.includes(e.name)&&e.name!==T?(0,O.jsxs)(`span`,{className:`docs-read-mark`,children:[(0,O.jsx)(`span`,{"aria-hidden":`true`,children:`✓`}),(0,O.jsx)(`span`,{className:`sr-only`,children:`read`})]}):null:void 0}):(0,O.jsx)(_,{label:`Loading docs…`})}),(0,O.jsxs)(`article`,{className:`lib-reader docs-reader`,"aria-label":`Page`,children:[N.page&&(0,O.jsxs)(`nav`,{className:`docs-crumbs mono`,"aria-label":`Breadcrumb`,children:[(0,O.jsx)(`a`,{href:Z(N.part.pages[0].id),children:N.part.label}),(0,O.jsx)(`span`,{"aria-hidden":`true`,children:`›`}),(0,O.jsx)(`a`,{href:Z(N.part.pages.find(e=>(e.section||`General`)===N.section).id),children:N.section}),(0,O.jsx)(`span`,{"aria-hidden":`true`,children:`›`}),(0,O.jsx)(`span`,{"aria-current":`page`,children:N.page.title})]}),(0,O.jsxs)(`div`,{className:`docs-read`,children:[(0,O.jsxs)(`div`,{className:`docs-article`,children:[(0,O.jsx)(re,{data:j?null:k,error:A,overview:t,onAction:n},`${T}|${c}`),!j&&(0,O.jsx)(m,{menu:x,pageId:T})]}),!j&&(0,O.jsx)(X,{body:k?.body,glossaryRows:M?.rows})]})]})]})})}export{ie as default,$ as docRows};
@@ -1,2 +1,2 @@
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-svc6-2Gp.js";import{n as i,r as a}from"./sections-ChwaobfW.js";import{F as o,J as s,N as c,X as l,Y as u,et as d,rt as f}from"./index-CZFrNe4N.js";import{t as p}from"./jobBuckets-Dbq8ZlWW.js";import{n as m}from"./Dashboard-B1rpgTz-.js";var h=e(t(),1),g=n(),_=12,v=120,y=[`#2BB673`,`#16A6A6`,`#E8A23B`,`#E07A5F`,`#8E7DBE`,`#5BD08A`,`#79856E`],b=650;function x({segments:e,size:t=186,stroke:n=26,caption:i=`capabilities`}){let a=e.reduce((e,t)=>e+t.value,0)||1,o=(0,h.useRef)(null),c=e.map(e=>e.value).join(`,`);(0,h.useLayoutEffect)(()=>{let t=o.current?.querySelectorAll(`path`);if(!t?.length||!u())return;let n=e.filter(e=>e.value>0).map(e=>e.value/a),i=n.map((e,t)=>n.slice(0,t).reduce((e,t)=>e+t,0)),s=r(t);d(s,{draw:`0 0`});let c=f(s,{draw:[`0 0`,`0 1`],duration:(e,t)=>Math.max(b*n[t],60),delay:(e,t)=>b*i[t],ease:`linear`});return l(c,b)},[c]);let p=t/2-n/2,m=t/2,_=t/2,v=[],y=0;for(let t of e)v.push(y),y+=t.value;return(0,g.jsxs)(`svg`,{width:t,height:t,viewBox:`0 0 ${t} ${t}`,children:[(0,g.jsx)(`circle`,{cx:m,cy:_,r:p,fill:`none`,stroke:`var(--surface-3)`,strokeWidth:n}),(0,g.jsx)(`g`,{ref:o,children:e.map((e,t)=>{if(e.value/a<=0)return null;let r=v[t]/a*2*Math.PI-Math.PI/2,i=(v[t]+e.value)/a*2*Math.PI-Math.PI/2,o=m+p*Math.cos(r),s=_+p*Math.sin(r),c=m+p*Math.cos(i),l=_+p*Math.sin(i),u=+(i-r>Math.PI);return(0,g.jsx)(`path`,{d:`M ${o} ${s} A ${p} ${p} 0 ${u} 1 ${c} ${l}`,fill:`none`,stroke:e.color,strokeWidth:n,strokeLinecap:`butt`,children:(0,g.jsxs)(`title`,{children:[e.label,`: `,e.value]})},t)})}),(0,g.jsx)(`text`,{x:m,y:_-4,textAnchor:`middle`,className:`donut-c-num`,children:(0,g.jsx)(s,{value:a,duration:b})}),(0,g.jsx)(`text`,{x:m,y:_+16,textAnchor:`middle`,className:`donut-c-cap`,children:i})]})}function S(e){if(e.length<2)return e.length?`M${e[0][0]},${e[0][1]}`:``;let t=`M${e[0][0]},${e[0][1]}`;for(let n=0;n<e.length-1;n++){let r=e[n-1]||e[n],i=e[n],a=e[n+1],o=e[n+2]||a,s=i[0]+(a[0]-r[0])/6,c=i[1]+(a[1]-r[1])/6,l=a[0]-(o[0]-i[0])/6,u=a[1]-(o[1]-i[1])/6;t+=` C${s},${c} ${l},${u} ${a[0]},${a[1]}`}return t}function C({data:e,height:t=156,accent:n}){if(!e.length)return null;let r=t,i=Math.max(...e.map(e=>e.v),1)+1,a=e.length>1?588/(e.length-1):588,o=e.map((e,t)=>[6+t*a,r-6-e.v/i*(r-14-6)]),s=S(o),c=o[o.length-1],l=o[0],u=`${s} L${c[0]},${r} L${l[0]},${r} Z`;return(0,g.jsxs)(`svg`,{viewBox:`0 0 600 ${r}`,preserveAspectRatio:`none`,style:{width:`100%`,height:t,display:`block`,overflow:`visible`},children:[(0,g.jsx)(`defs`,{children:(0,g.jsxs)(`linearGradient`,{id:`b-grad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,g.jsx)(`stop`,{offset:`0`,stopColor:n,stopOpacity:`.28`}),(0,g.jsx)(`stop`,{offset:`1`,stopColor:n,stopOpacity:`0`})]})}),(0,g.jsx)(`path`,{d:u,fill:`url(#b-grad)`}),(0,g.jsx)(`path`,{d:s,fill:`none`,stroke:n,strokeWidth:`2`,strokeLinejoin:`round`,strokeLinecap:`round`,vectorEffect:`non-scaling-stroke`}),(0,g.jsx)(`circle`,{cx:c[0],cy:c[1],r:`3.5`,fill:n,vectorEffect:`non-scaling-stroke`})]})}function w({label:e,value:t,sub:n,color:r,icon:i}){return(0,g.jsxs)(`div`,{className:`b-tile`,children:[(0,g.jsx)(`span`,{className:`b-tile-ic`,style:{background:`color-mix(in srgb, ${r} 18%, transparent)`,color:r},children:(0,g.jsx)(c,{name:i})}),(0,g.jsxs)(`div`,{className:`b-tile-body`,children:[(0,g.jsx)(`div`,{className:`b-tile-val`+(t===0?` zero`:``),children:t}),(0,g.jsx)(`div`,{className:`b-tile-label`,children:e})]}),(0,g.jsx)(`div`,{className:`b-tile-sub`,children:n})]})}function T({overview:e,sigil:t,jobs:n,doctor:r,onAction:l}){let u=e.counts||{},d=r?.groups||[],f=d.length>0,h=d.filter(e=>e.problems.length===0).length,b=d.length||1,S=m(e),T=o(e.diff),E=a.filter(e=>(u[e]||0)>0).map((e,t)=>({label:i[e].label,value:u[e]||0,color:y[t%y.length]})),D=E.reduce((e,t)=>e+t.value,0),O=p(n||[],10),k=O.reduce((e,t)=>e+t.v,0);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`b-greet`,children:[(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`div`,{className:`eyebrow`,children:`your harness`}),(0,g.jsx)(`h1`,{className:`h b-h`,children:S}),(0,g.jsx)(`p`,{className:`sub`,children:t||`A friendly read of every layer growing in your harness.`})]}),(0,g.jsxs)(`div`,{className:`row gap-8`,children:[(0,g.jsxs)(`button`,{className:`btn`,onClick:()=>l(`update`),children:[(0,g.jsx)(c,{name:`refresh`}),`Update`]}),(0,g.jsxs)(`button`,{className:`btn ghost`,onClick:()=>l(`build-all`),children:[(0,g.jsx)(c,{name:`build`}),`Rebuild`]})]})]}),(0,g.jsxs)(`div`,{className:`grid b-hero-grid mb-16`,children:[(0,g.jsxs)(`div`,{className:`card b-hero`,children:[(0,g.jsx)(`div`,{className:`b-hero-ring`,children:(0,g.jsx)(x,{segments:[{label:`pass`,value:h,color:y[0]},{label:`attention`,value:Math.max(b-h,0),color:y[2]}],size:168,stroke:20,caption:`checks`})}),(0,g.jsxs)(`div`,{className:`b-hero-side`,children:[(0,g.jsx)(`h3`,{className:`b-hero-title`,children:f?`${h} of ${b} checks pass`:`Running checks…`}),(0,g.jsxs)(`p`,{className:`sub`,children:[`One source, rendered into `,(0,g.jsx)(`code`,{children:e.target}),` and inherited by every repo on this machine.`]}),f&&(0,g.jsx)(`ul`,{className:`b-hero-checks`,children:d.map(e=>{let t=e.problems.length===0;return(0,g.jsxs)(`li`,{className:`b-hcheck ${t?`ok`:`bad`}`,title:t?`clean`:e.problems.join(`; `),children:[(0,g.jsx)(`span`,{className:`b-hcheck-mark`,children:t?`✓`:`!`}),(0,g.jsx)(`span`,{className:`b-hcheck-label`,children:e.label})]},e.label)})}),(0,g.jsxs)(`div`,{className:`b-chips`,children:[(0,g.jsxs)(`span`,{className:`b-chip`,children:[(0,g.jsx)(`b`,{style:{textTransform:`capitalize`},children:e.theme}),` voice`]}),(0,g.jsx)(`span`,{className:`b-chip`,children:(0,g.jsx)(`b`,{children:e.emit})}),(0,g.jsxs)(`span`,{className:`b-chip`,children:[`built `,(0,g.jsx)(`b`,{children:e.build_time||`unknown`})]})]})]})]}),(0,g.jsxs)(`div`,{className:`b-tiles`,children:[(0,g.jsx)(w,{label:`Agents`,value:u.agents??`—`,sub:`specialists`,color:y[0],icon:`layers`}),(0,g.jsx)(w,{label:`Skills`,value:u.skills??`—`,sub:`workflows`,color:y[1],icon:`skill`}),(0,g.jsx)(w,{label:`Dictates`,value:u.laws??`—`,sub:u.doctrines?`${u.doctrines.active}/${u.doctrines.total} packs · ${u.doctrines.rules} rules`:`all upheld`,color:y[2],icon:`law`}),(0,g.jsx)(w,{label:`Edits`,value:T,sub:`to graft`,color:y[3],icon:`changes`})]})]}),(0,g.jsxs)(`div`,{className:`grid split-even mb-16`,children:[(0,g.jsxs)(`div`,{className:`card pad-lg b-mix-card`,children:[(0,g.jsxs)(`div`,{className:`card-head`,children:[(0,g.jsx)(`h3`,{children:`Capability mix`}),(0,g.jsx)(`div`,{className:`right`,children:(0,g.jsxs)(`span`,{className:`tick`,children:[D,` total`]})})]}),(0,g.jsxs)(`div`,{className:`b-mix`,children:[(0,g.jsx)(x,{segments:E,size:186,stroke:26}),(0,g.jsx)(`div`,{className:`b-legend`,children:E.map(e=>(0,g.jsxs)(`div`,{className:`b-leg-row`,children:[(0,g.jsx)(`span`,{className:`b-leg-dot`,style:{background:e.color}}),(0,g.jsx)(`span`,{className:`b-leg-name`,children:e.label}),(0,g.jsx)(`span`,{className:`b-leg-bar`,children:(0,g.jsx)(`i`,{style:{width:`${e.value/D*100}%`,background:e.color}})}),(0,g.jsx)(`span`,{className:`b-leg-val`,children:e.value})]},e.label))})]})]}),(0,g.jsxs)(`div`,{className:`card pad-lg`,children:[(0,g.jsxs)(`div`,{className:`card-head`,children:[(0,g.jsx)(`h3`,{children:`Recent runs`}),(0,g.jsx)(`div`,{className:`right`,children:(0,g.jsxs)(`span`,{className:`badge ok`,children:[(0,g.jsx)(`span`,{className:`dot`}),`job log`]})})]}),(0,g.jsxs)(`div`,{className:`b-stat-lead`,children:[(0,g.jsx)(`span`,{className:`b-stat-big`,children:(0,g.jsx)(s,{value:k})}),(0,g.jsxs)(`span`,{className:`b-stat-cap`,children:[`runs in the last 10 days · `,h,`/`,b,` checks pass now`]})]}),(0,g.jsx)(C,{data:O,accent:y[0],height:156})]})]}),(0,g.jsxs)(`div`,{className:`card pad-lg`,children:[(0,g.jsxs)(`div`,{className:`card-head`,children:[(0,g.jsx)(`h3`,{children:`Recent activity`}),(0,g.jsx)(`div`,{className:`right`,children:(0,g.jsxs)(`span`,{className:`tick`,children:[`last `,Math.min(n?.length||0,12),` runs`]})})]}),(0,g.jsxs)(`div`,{className:`b-timeline`,children:[(n||[]).slice(0,_).map(e=>{let t=e.status===`done`,n=e.status===`failed`?`warn`:t?`ok`:`acc`;return(0,g.jsxs)(`div`,{className:`b-tl-row`,children:[(0,g.jsx)(`span`,{className:`b-tl-node ${n}`}),(0,g.jsxs)(`div`,{className:`b-tl-body`,children:[(0,g.jsx)(`b`,{children:e.action}),e.output?`: ${e.output.split(`
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-UEPfHNCy.js";import{n as i,r as a}from"./sections-ChwaobfW.js";import{I as o,P as s,X as c,Y as l,Z as u,it as d,tt as f}from"./index-CKCvC6Qx.js";import{t as p}from"./jobBuckets-Dbq8ZlWW.js";import{n as m}from"./Dashboard--9UIBMVY.js";var h=e(t(),1),g=n(),_=12,v=120,y=[`#2BB673`,`#16A6A6`,`#E8A23B`,`#E07A5F`,`#8E7DBE`,`#5BD08A`,`#79856E`],b=650;function x({segments:e,size:t=186,stroke:n=26,caption:i=`capabilities`}){let a=e.reduce((e,t)=>e+t.value,0)||1,o=(0,h.useRef)(null),s=e.map(e=>e.value).join(`,`);(0,h.useLayoutEffect)(()=>{let t=o.current?.querySelectorAll(`path`);if(!t?.length||!c())return;let n=e.filter(e=>e.value>0).map(e=>e.value/a),i=n.map((e,t)=>n.slice(0,t).reduce((e,t)=>e+t,0)),s=r(t);f(s,{draw:`0 0`});let l=d(s,{draw:[`0 0`,`0 1`],duration:(e,t)=>Math.max(b*n[t],60),delay:(e,t)=>b*i[t],ease:`linear`});return u(l,b)},[s]);let p=t/2-n/2,m=t/2,_=t/2,v=[],y=0;for(let t of e)v.push(y),y+=t.value;return(0,g.jsxs)(`svg`,{width:t,height:t,viewBox:`0 0 ${t} ${t}`,children:[(0,g.jsx)(`circle`,{cx:m,cy:_,r:p,fill:`none`,stroke:`var(--surface-3)`,strokeWidth:n}),(0,g.jsx)(`g`,{ref:o,children:e.map((e,t)=>{if(e.value/a<=0)return null;let r=v[t]/a*2*Math.PI-Math.PI/2,i=(v[t]+e.value)/a*2*Math.PI-Math.PI/2,o=m+p*Math.cos(r),s=_+p*Math.sin(r),c=m+p*Math.cos(i),l=_+p*Math.sin(i),u=+(i-r>Math.PI);return(0,g.jsx)(`path`,{d:`M ${o} ${s} A ${p} ${p} 0 ${u} 1 ${c} ${l}`,fill:`none`,stroke:e.color,strokeWidth:n,strokeLinecap:`butt`,children:(0,g.jsxs)(`title`,{children:[e.label,`: `,e.value]})},t)})}),(0,g.jsx)(`text`,{x:m,y:_-4,textAnchor:`middle`,className:`donut-c-num`,children:(0,g.jsx)(l,{value:a,duration:b})}),(0,g.jsx)(`text`,{x:m,y:_+16,textAnchor:`middle`,className:`donut-c-cap`,children:i})]})}function S(e){if(e.length<2)return e.length?`M${e[0][0]},${e[0][1]}`:``;let t=`M${e[0][0]},${e[0][1]}`;for(let n=0;n<e.length-1;n++){let r=e[n-1]||e[n],i=e[n],a=e[n+1],o=e[n+2]||a,s=i[0]+(a[0]-r[0])/6,c=i[1]+(a[1]-r[1])/6,l=a[0]-(o[0]-i[0])/6,u=a[1]-(o[1]-i[1])/6;t+=` C${s},${c} ${l},${u} ${a[0]},${a[1]}`}return t}function C({data:e,height:t=156,accent:n}){if(!e.length)return null;let r=t,i=Math.max(...e.map(e=>e.v),1)+1,a=e.length>1?588/(e.length-1):588,o=e.map((e,t)=>[6+t*a,r-6-e.v/i*(r-14-6)]),s=S(o),c=o[o.length-1],l=o[0],u=`${s} L${c[0]},${r} L${l[0]},${r} Z`;return(0,g.jsxs)(`svg`,{viewBox:`0 0 600 ${r}`,preserveAspectRatio:`none`,style:{width:`100%`,height:t,display:`block`,overflow:`visible`},children:[(0,g.jsx)(`defs`,{children:(0,g.jsxs)(`linearGradient`,{id:`b-grad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,g.jsx)(`stop`,{offset:`0`,stopColor:n,stopOpacity:`.28`}),(0,g.jsx)(`stop`,{offset:`1`,stopColor:n,stopOpacity:`0`})]})}),(0,g.jsx)(`path`,{d:u,fill:`url(#b-grad)`}),(0,g.jsx)(`path`,{d:s,fill:`none`,stroke:n,strokeWidth:`2`,strokeLinejoin:`round`,strokeLinecap:`round`,vectorEffect:`non-scaling-stroke`}),(0,g.jsx)(`circle`,{cx:c[0],cy:c[1],r:`3.5`,fill:n,vectorEffect:`non-scaling-stroke`})]})}function w({label:e,value:t,sub:n,color:r,icon:i}){return(0,g.jsxs)(`div`,{className:`b-tile`,children:[(0,g.jsx)(`span`,{className:`b-tile-ic`,style:{background:`color-mix(in srgb, ${r} 18%, transparent)`,color:r},children:(0,g.jsx)(s,{name:i})}),(0,g.jsxs)(`div`,{className:`b-tile-body`,children:[(0,g.jsx)(`div`,{className:`b-tile-val`+(t===0?` zero`:``),children:t}),(0,g.jsx)(`div`,{className:`b-tile-label`,children:e})]}),(0,g.jsx)(`div`,{className:`b-tile-sub`,children:n})]})}function T({overview:e,sigil:t,jobs:n,doctor:r,onAction:c}){let u=e.counts||{},d=r?.groups||[],f=d.length>0,h=d.filter(e=>e.problems.length===0).length,b=d.length||1,S=m(e),T=o(e.diff),E=a.filter(e=>(u[e]||0)>0).map((e,t)=>({label:i[e].label,value:u[e]||0,color:y[t%y.length]})),D=E.reduce((e,t)=>e+t.value,0),O=p(n||[],10),k=O.reduce((e,t)=>e+t.v,0);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`b-greet`,children:[(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`div`,{className:`eyebrow`,children:`your harness`}),(0,g.jsx)(`h1`,{className:`h b-h`,children:S}),(0,g.jsx)(`p`,{className:`sub`,children:t||`A friendly read of every layer growing in your harness.`})]}),(0,g.jsxs)(`div`,{className:`row gap-8`,children:[(0,g.jsxs)(`button`,{className:`btn`,onClick:()=>c(`update`),children:[(0,g.jsx)(s,{name:`refresh`}),`Update`]}),(0,g.jsxs)(`button`,{className:`btn ghost`,onClick:()=>c(`build-all`),children:[(0,g.jsx)(s,{name:`build`}),`Rebuild`]})]})]}),(0,g.jsxs)(`div`,{className:`grid b-hero-grid mb-16`,children:[(0,g.jsxs)(`div`,{className:`card b-hero`,children:[(0,g.jsx)(`div`,{className:`b-hero-ring`,children:(0,g.jsx)(x,{segments:[{label:`pass`,value:h,color:y[0]},{label:`attention`,value:Math.max(b-h,0),color:y[2]}],size:168,stroke:20,caption:`checks`})}),(0,g.jsxs)(`div`,{className:`b-hero-side`,children:[(0,g.jsx)(`h3`,{className:`b-hero-title`,children:f?`${h} of ${b} checks pass`:`Running checks…`}),(0,g.jsxs)(`p`,{className:`sub`,children:[`One source, rendered into `,(0,g.jsx)(`code`,{children:e.target}),` and inherited by every repo on this machine.`]}),f&&(0,g.jsx)(`ul`,{className:`b-hero-checks`,children:d.map(e=>{let t=e.problems.length===0;return(0,g.jsxs)(`li`,{className:`b-hcheck ${t?`ok`:`bad`}`,title:t?`clean`:e.problems.join(`; `),children:[(0,g.jsx)(`span`,{className:`b-hcheck-mark`,children:t?`✓`:`!`}),(0,g.jsx)(`span`,{className:`b-hcheck-label`,children:e.label})]},e.label)})}),(0,g.jsxs)(`div`,{className:`b-chips`,children:[(0,g.jsxs)(`span`,{className:`b-chip`,children:[(0,g.jsx)(`b`,{style:{textTransform:`capitalize`},children:e.theme}),` voice`]}),(0,g.jsx)(`span`,{className:`b-chip`,children:(0,g.jsx)(`b`,{children:e.emit})}),(0,g.jsxs)(`span`,{className:`b-chip`,children:[`built `,(0,g.jsx)(`b`,{children:e.build_time||`unknown`})]})]})]})]}),(0,g.jsxs)(`div`,{className:`b-tiles`,children:[(0,g.jsx)(w,{label:`Agents`,value:u.agents??`—`,sub:`specialists`,color:y[0],icon:`layers`}),(0,g.jsx)(w,{label:`Skills`,value:u.skills??`—`,sub:`workflows`,color:y[1],icon:`skill`}),(0,g.jsx)(w,{label:`Dictates`,value:u.laws??`—`,sub:u.doctrines?`${u.doctrines.active}/${u.doctrines.total} packs · ${u.doctrines.rules} rules`:`all upheld`,color:y[2],icon:`law`}),(0,g.jsx)(w,{label:`Edits`,value:T,sub:`to graft`,color:y[3],icon:`changes`})]})]}),(0,g.jsxs)(`div`,{className:`grid split-even mb-16`,children:[(0,g.jsxs)(`div`,{className:`card pad-lg b-mix-card`,children:[(0,g.jsxs)(`div`,{className:`card-head`,children:[(0,g.jsx)(`h3`,{children:`Capability mix`}),(0,g.jsx)(`div`,{className:`right`,children:(0,g.jsxs)(`span`,{className:`tick`,children:[D,` total`]})})]}),(0,g.jsxs)(`div`,{className:`b-mix`,children:[(0,g.jsx)(x,{segments:E,size:186,stroke:26}),(0,g.jsx)(`div`,{className:`b-legend`,children:E.map(e=>(0,g.jsxs)(`div`,{className:`b-leg-row`,children:[(0,g.jsx)(`span`,{className:`b-leg-dot`,style:{background:e.color}}),(0,g.jsx)(`span`,{className:`b-leg-name`,children:e.label}),(0,g.jsx)(`span`,{className:`b-leg-bar`,children:(0,g.jsx)(`i`,{style:{width:`${e.value/D*100}%`,background:e.color}})}),(0,g.jsx)(`span`,{className:`b-leg-val`,children:e.value})]},e.label))})]})]}),(0,g.jsxs)(`div`,{className:`card pad-lg`,children:[(0,g.jsxs)(`div`,{className:`card-head`,children:[(0,g.jsx)(`h3`,{children:`Recent runs`}),(0,g.jsx)(`div`,{className:`right`,children:(0,g.jsxs)(`span`,{className:`badge ok`,children:[(0,g.jsx)(`span`,{className:`dot`}),`job log`]})})]}),(0,g.jsxs)(`div`,{className:`b-stat-lead`,children:[(0,g.jsx)(`span`,{className:`b-stat-big`,children:(0,g.jsx)(l,{value:k})}),(0,g.jsxs)(`span`,{className:`b-stat-cap`,children:[`runs in the last 10 days · `,h,`/`,b,` checks pass now`]})]}),(0,g.jsx)(C,{data:O,accent:y[0],height:156})]})]}),(0,g.jsxs)(`div`,{className:`card pad-lg`,children:[(0,g.jsxs)(`div`,{className:`card-head`,children:[(0,g.jsx)(`h3`,{children:`Recent activity`}),(0,g.jsx)(`div`,{className:`right`,children:(0,g.jsxs)(`span`,{className:`tick`,children:[`last `,Math.min(n?.length||0,12),` runs`]})})]}),(0,g.jsxs)(`div`,{className:`b-timeline`,children:[(n||[]).slice(0,_).map(e=>{let t=e.status===`done`,n=e.status===`failed`?`warn`:t?`ok`:`acc`;return(0,g.jsxs)(`div`,{className:`b-tl-row`,children:[(0,g.jsx)(`span`,{className:`b-tl-node ${n}`}),(0,g.jsxs)(`div`,{className:`b-tl-body`,children:[(0,g.jsx)(`b`,{children:e.action}),e.output?`: ${e.output.split(`
2
2
  `)[0].slice(0,v)}`:``]}),(0,g.jsx)(`span`,{className:`b-tl-when`,children:e.duration?`${e.duration}s`:e.status})]},e.id)}),(!n||n.length===0)&&(0,g.jsxs)(`div`,{className:`b-tl-row`,children:[(0,g.jsx)(`span`,{className:`b-tl-node`}),(0,g.jsx)(`div`,{className:`b-tl-body sub`,children:`No runs yet. Trigger an action to populate this.`}),(0,g.jsx)(`span`,{className:`b-tl-when`,children:`—`})]})]})]})]})}export{T as default};