geneseed 5.1.1 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -0
- package/README.md +2 -2
- package/SHIPPED.md +1 -1
- package/adapters/opencode/README.md +4 -3
- package/adapters/opencode/plugins/geneseed-context.js +82 -29
- package/adapters/opencode/plugins/geneseed-guard.js +118 -8
- package/bin/geneseed-cli.mjs +64 -16
- package/bin/geneseed-hook.mjs +37 -3
- package/docs/concepts/exclusions.md +1 -1
- package/docs/concepts/factories.md +40 -6
- package/docs/concepts/footprint.md +1 -1
- package/docs/concepts/foreman-mode.md +2 -2
- package/docs/concepts/host-matrix.md +1 -1
- package/docs/concepts/loop-gates.md +1 -1
- package/docs/concepts/loops.md +2 -2
- package/docs/concepts/shared-tier.md +1 -1
- package/docs/design-history.md +140 -0
- package/docs/extending.md +54 -162
- package/docs/guides/run-a-factory.md +15 -2
- package/docs/guides/setup-doctrines.md +1 -1
- package/docs/guides/upgrade.md +2 -2
- package/docs/reference/factory-actions.md +6 -5
- package/docs/reference/troubleshoot-update.md +1 -1
- package/docs/understand/enforced-vs-asked.md +1 -1
- package/docs/web-ui.md +16 -3
- package/harness.config.json +1 -1
- package/js/README.md +10 -7
- package/js/build/args.mjs +10 -4
- package/js/build/bundle.mjs +122 -23
- package/js/build/driver.mjs +32 -12
- package/js/build/emit-claude.mjs +2 -1
- package/js/build/emit-common.mjs +2 -2
- package/js/build/emit-opencode.mjs +22 -10
- package/js/build/export.mjs +431 -0
- package/js/build/generate.mjs +3 -0
- package/js/build/render.mjs +44 -24
- package/js/build/source.mjs +6 -1
- package/js/cli-table.json +232 -57
- package/js/factory/cli.mjs +24 -5
- package/js/factory/graph.mjs +13 -9
- package/js/factory/metrics.mjs +93 -0
- package/js/factory/registry.mjs +37 -12
- package/js/factory/state.mjs +25 -6
- package/js/hosts/hooks-context.mjs +26 -1
- package/js/hosts/hooks-done.mjs +8 -2
- package/js/hosts/hooks-prims.mjs +52 -3
- package/js/hosts/hooks.mjs +155 -33
- package/js/hosts/hosts.mjs +2 -4
- package/js/hosts/installs.mjs +28 -0
- package/js/hosts/loss.mjs +25 -3
- package/js/hosts/native.mjs +30 -2
- package/js/hosts/owned.mjs +55 -1
- package/js/hosts/ownership-gate.mjs +5 -5
- package/js/hosts/settings.mjs +83 -33
- package/js/inspect/diff.mjs +16 -1
- package/js/inspect/doctor.mjs +7 -3
- package/js/inspect/excludes.mjs +18 -6
- package/js/inspect/status.mjs +35 -7
- package/js/inspect/validate.mjs +44 -21
- package/js/lib/managed-block.mjs +74 -0
- package/js/maintain/uninstall.mjs +85 -15
- package/js/maintain/update.mjs +31 -7
- package/js/ui/cli.mjs +34 -4
- package/js/ui/menu.mjs +1 -1
- package/js/ui/tui.mjs +11 -14
- package/js/web/actions.mjs +5 -0
- package/js/web/api.mjs +32 -11
- package/js/web/daemon.mjs +0 -1
- package/js/web/server.mjs +1 -0
- package/js/web/state.mjs +37 -16
- package/package.json +1 -1
- package/src/AGENT.md.tmpl +23 -17
- package/src/agents/_template.md +1 -1
- package/src/agents/advocate.md +1 -1
- package/src/agents/developer.md +12 -3
- package/src/agents/empiricist.md +1 -1
- package/src/agents/framer.md +1 -1
- package/src/agents/historian.md +1 -1
- package/src/agents/operator.md +1 -1
- package/src/agents/pragmatist.md +1 -1
- package/src/agents/researcher.md +1 -1
- package/src/agents/skeptic.md +1 -1
- package/src/agents/steward.md +1 -1
- package/src/agents/user-advocate.md +1 -1
- package/src/agents/visionary.md +1 -1
- package/src/bricks/intake.md +10 -3
- package/src/bricks/retro.md +13 -3
- package/src/doctrines/comms.md +1 -1
- package/src/doctrines/ops.md +1 -1
- package/src/doctrines/process.md +7 -5
- package/src/factories/analysis-to-build.json +1 -0
- package/src/factories/bug-report-to-fix.json +1 -0
- package/src/factories/issue-to-pr.json +1 -0
- package/src/laws/universal.md +2 -2
- package/src/modes/foreman.md +8 -14
- package/src/skills/commit.md +7 -2
- package/src/skills/debug.md +1 -1
- package/src/skills/diagram-design/SKILL.md +1 -1
- package/src/skills/diagram-design/VENDOR.md +3 -1
- package/src/skills/factory-forge.md +5 -3
- package/src/skills/factory.md +22 -1
- package/src/skills/geneseed.md +1 -1
- package/src/skills/handoff.md +1 -1
- package/src/skills/parallel-agents.md +1 -1
- package/src/skills/pipeline.md +6 -6
- package/src/skills/plan.md +7 -3
- package/src/skills/spring-testing.md +1 -1
- package/themes/biker.json +78 -78
- package/themes/commentator.json +81 -81
- package/themes/cyberpunk.json +79 -79
- package/themes/gamer.json +77 -77
- package/themes/imperial.json +82 -82
- package/themes/joker.json +79 -79
- package/themes/marvin.json +82 -82
- package/themes/mean.json +82 -82
- package/themes/military.json +78 -78
- package/themes/neutral.json +78 -78
- package/themes/pirate.json +79 -79
- package/themes/sports.json +79 -79
- package/themes/verstappen.json +78 -78
- package/themes/wizard.json +79 -79
- package/web/dist/assets/ActiveLoops-BJJN3P-V.js +1 -0
- package/web/dist/assets/Activity-CqJiquEq.js +1 -0
- package/web/dist/assets/ActivityDetail-BSzevynX.js +1 -0
- package/web/dist/assets/{Bonsai-hiG_gGNU.js → Bonsai-Bfpb6W-1.js} +1 -1
- package/web/dist/assets/{CopyButton-DUIUfNp6.js → CopyButton-ByIntFtB.js} +1 -1
- package/web/dist/assets/Dashboard-DBOEi9lQ.js +2 -0
- package/web/dist/assets/Docs-DvlMJhpu.js +5 -0
- package/web/dist/assets/Factories-Bpvv7L2H.js +1 -0
- package/web/dist/assets/{GreenhouseView-BKxy5apE.js → GreenhouseView-GpBsYn50.js} +1 -1
- package/web/dist/assets/Installs-BlGmVrFK.js +3 -0
- package/web/dist/assets/{JournalView-ChFitHjo.js → JournalView-iLuLrOxE.js} +1 -1
- package/web/dist/assets/Kits-DRwpxC-J.js +1 -0
- package/web/dist/assets/Laws-CZkiNOWQ.js +4 -0
- package/web/dist/assets/LibRows-DEHjIoD-.js +1 -0
- package/web/dist/assets/Library-B4K-1iNF.js +3 -0
- package/web/dist/assets/Loops-BWSzaW8E.js +2 -0
- package/web/dist/assets/{OperatorHudView-BO0aIKPL.js → OperatorHudView-BAXwCEvY.js} +1 -1
- package/web/dist/assets/Personal-Bp9nV4GR.js +2 -0
- package/web/dist/assets/Settings-CWWuaIp-.js +1 -0
- package/web/dist/assets/Tabs-CWeQTADL.js +1 -0
- package/web/dist/assets/index-CsAZq0BQ.css +1 -0
- package/web/dist/assets/index-How7SzDZ.js +6 -0
- package/web/dist/assets/usePoll-D5c_qIFZ.js +1 -0
- package/web/dist/index.html +2 -2
- package/web/dist/assets/ActiveLoops-BTHIaRhn.js +0 -1
- package/web/dist/assets/Activity-CpkBwpu7.js +0 -1
- package/web/dist/assets/ActivityDetail-DTPziZWM.js +0 -1
- package/web/dist/assets/Dashboard-Dnw6EyX7.js +0 -2
- package/web/dist/assets/Docs-BEET_l16.js +0 -5
- package/web/dist/assets/Factories-D6KXkfWw.js +0 -1
- package/web/dist/assets/Installs-CnFVlVD0.js +0 -3
- package/web/dist/assets/Kits-CcR-OlwQ.js +0 -1
- package/web/dist/assets/Laws-B1s5idOg.js +0 -4
- package/web/dist/assets/LibRows-BZgdbI1l.js +0 -1
- package/web/dist/assets/Library-x6TkkEVF.js +0 -3
- package/web/dist/assets/Loops-BH93KKxn.js +0 -2
- package/web/dist/assets/Personal-CE_0Vhh0.js +0 -2
- package/web/dist/assets/Settings-CbpZvVN_.js +0 -1
- package/web/dist/assets/Tabs-C2oW7oEj.js +0 -1
- package/web/dist/assets/index-BQwOmbor.js +0 -6
- package/web/dist/assets/index-CuIop_pO.css +0 -1
- package/web/dist/assets/usePoll-o8ul-Sog.js +0 -1
package/themes/verstappen.json
CHANGED
|
@@ -14,74 +14,74 @@
|
|
|
14
14
|
"EPI_CONTEXT": "Read the briefing before you send me out.",
|
|
15
15
|
"EPI_SCRIPTS": "Optional, for teams that want the rules enforced for them.",
|
|
16
16
|
"BENEDICTION": "Drive it clean, keep the rules, and take the win.",
|
|
17
|
-
"DESC_REVIEWER": "Checks the car over before it goes out
|
|
18
|
-
"DESC_TESTER": "
|
|
19
|
-
"DESC_DEVELOPER": "Builds the scoped fix in its own garage,
|
|
17
|
+
"DESC_REVIEWER": "Checks the car over before it goes out: correctness first.",
|
|
18
|
+
"DESC_TESTER": "Sends the test runs and reads the data when they go wrong.",
|
|
19
|
+
"DESC_DEVELOPER": "Builds the scoped fix in its own garage, then hands it over.",
|
|
20
20
|
"DESC_ARCHITECT": "Sorts the strategy before a single line is committed.",
|
|
21
21
|
"DESC_DOCS": "Writes up the debrief and the notes once the work is done.",
|
|
22
|
-
"DESC_SECURITY": "
|
|
23
|
-
"DESC_PERFORMANCE": "Reads the telemetry
|
|
24
|
-
"DESC_EXPLORER": "Sends a scout
|
|
25
|
-
"DESC_RESEARCHER": "
|
|
26
|
-
"DESC_MEMORY_CURATOR": "Cleans up the setup notes
|
|
27
|
-
"DESC_ADVOCATE": "Argues for the move
|
|
28
|
-
"DESC_SKEPTIC": "Calls it out
|
|
29
|
-
"DESC_PRAGMATIST": "Weighs
|
|
30
|
-
"DESC_STEWARD": "Minds the whole season
|
|
31
|
-
"DESC_VISIONARY": "Argues the bold
|
|
32
|
-
"DESC_USER_ADVOCATE": "Speaks for whoever the result is for
|
|
33
|
-
"DESC_FRAMER": "
|
|
34
|
-
"DESC_EMPIRICIST": "Wants
|
|
35
|
-
"DESC_OPERATOR": "Speaks for the car under load
|
|
36
|
-
"DESC_HISTORIAN": "Brings the history
|
|
37
|
-
"DESC_SPRING_BOOT_ENGINEER": "Builds a Spring Boot feature or service
|
|
38
|
-
"DESC_SPRING_REVIEWER": "Checks a Spring Boot change over
|
|
39
|
-
"DESC_SPRING_SECURITY": "
|
|
40
|
-
"DESC_KUBERNETES_SPECIALIST": "Sets up
|
|
41
|
-
"DESC_DOCKER_EXPERT": "Packs
|
|
42
|
-
"DESC_DEVOPS_ENGINEER": "Tunes the build and delivery
|
|
43
|
-
"DESC_REACT_ENGINEER": "Builds a React feature
|
|
44
|
-
"DESC_REACT_REVIEWER": "Checks a React change over
|
|
45
|
-
"DESC_PLAN": "Set the strategy before a non-trivial stint; call
|
|
46
|
-
"DESC_DEPENDENCIES": "Survey every component
|
|
47
|
-
"DESC_GIT_HISTORY": "Go through the data
|
|
48
|
-
"DESC_DOCUMENT_PROJECT": "Write the
|
|
22
|
+
"DESC_SECURITY": "Combs through the security surface.",
|
|
23
|
+
"DESC_PERFORMANCE": "Reads the telemetry and finds where the lap time goes.",
|
|
24
|
+
"DESC_EXPLORER": "Sends a scout on a throwaway run; brings back the read.",
|
|
25
|
+
"DESC_RESEARCHER": "Cross-checks every number against two sources.",
|
|
26
|
+
"DESC_MEMORY_CURATOR": "Cleans up the setup notes; asks before binning any.",
|
|
27
|
+
"DESC_ADVOCATE": "Argues for the move and the time to be gained.",
|
|
28
|
+
"DESC_SKEPTIC": "Calls it out: failure modes, risks, unchecked assumptions.",
|
|
29
|
+
"DESC_PRAGMATIST": "Weighs whether the gain is worth the cost.",
|
|
30
|
+
"DESC_STEWARD": "Minds the whole season: the build, the upkeep, the debt.",
|
|
31
|
+
"DESC_VISIONARY": "Argues the bold, race-winning call.",
|
|
32
|
+
"DESC_USER_ADVOCATE": "Speaks for whoever the result is for.",
|
|
33
|
+
"DESC_FRAMER": "Asks whether the call wins the race or just one corner.",
|
|
34
|
+
"DESC_EMPIRICIST": "Wants telemetry, trials or precedent behind each claim.",
|
|
35
|
+
"DESC_OPERATOR": "Speaks for the car under load and the crew running it.",
|
|
36
|
+
"DESC_HISTORIAN": "Brings the history: what was tried and how it went.",
|
|
37
|
+
"DESC_SPRING_BOOT_ENGINEER": "Builds a Spring Boot feature or service and drives it home.",
|
|
38
|
+
"DESC_SPRING_REVIEWER": "Checks a Spring Boot change over before it goes out.",
|
|
39
|
+
"DESC_SPRING_SECURITY": "Combs through Spring Security changes.",
|
|
40
|
+
"DESC_KUBERNETES_SPECIALIST": "Sets up Kubernetes manifests for a Spring Boot service.",
|
|
41
|
+
"DESC_DOCKER_EXPERT": "Packs a lean Spring Boot Docker image; not Compose ops.",
|
|
42
|
+
"DESC_DEVOPS_ENGINEER": "Tunes the CI build and delivery of a Spring Boot service.",
|
|
43
|
+
"DESC_REACT_ENGINEER": "Builds a React feature, or makes a broken build green.",
|
|
44
|
+
"DESC_REACT_REVIEWER": "Checks a React change over before it goes out.",
|
|
45
|
+
"DESC_PLAN": "Set the strategy before a non-trivial stint; call progress.",
|
|
46
|
+
"DESC_DEPENDENCIES": "Survey every component, then fit one change at a time.",
|
|
47
|
+
"DESC_GIT_HISTORY": "Go through the data: bisect and blame, or recover a session.",
|
|
48
|
+
"DESC_DOCUMENT_PROJECT": "Write the PRD, architecture and AGENTS.md off the code.",
|
|
49
49
|
"DESC_COMMIT": "Stage only what this stint touched and seal a focused commit.",
|
|
50
50
|
"DESC_CODE_REVIEW": "Go over a diff or PR — correctness first, polish after.",
|
|
51
|
-
"DESC_BRAINSTORM": "Turn a raw idea into an agreed strategy before
|
|
52
|
-
"DESC_CODEBASE_DESIGN": "Design deep modules
|
|
53
|
-
"DESC_WAYFINDER": "Chart work too big for one stint as
|
|
54
|
-
"DESC_PROTOTYPE": "Answer a design question with throwaway code
|
|
55
|
-
"DESC_ROAST_ME": "Tear into the user's own ask, plan or idea
|
|
56
|
-
"DESC_FRESH_EYES": "Bring in
|
|
51
|
+
"DESC_BRAINSTORM": "Turn a raw idea into an agreed strategy before the track.",
|
|
52
|
+
"DESC_CODEBASE_DESIGN": "Design deep modules, clean seams, a glossary and ADRs.",
|
|
53
|
+
"DESC_WAYFINDER": "Chart work too big for one stint as decision tickets.",
|
|
54
|
+
"DESC_PROTOTYPE": "Answer a design question with throwaway code.",
|
|
55
|
+
"DESC_ROAST_ME": "Tear into the user's own ask, plan or idea. Blunt.",
|
|
56
|
+
"DESC_FRESH_EYES": "Bring in fresh eyes to judge the car blind. No excuses.",
|
|
57
57
|
"ROAST_PERSONA": "a championship driver with zero patience who has watched this exact mistake throw away a win",
|
|
58
|
-
"DESC_COUNCIL": "Get a panel of opposed voices to argue a call out
|
|
59
|
-
"DESC_DEBUG": "Hunt the fault by evidence
|
|
60
|
-
"DESC_REFACTOR": "Rebuild the car without changing how it drives
|
|
61
|
-
"DESC_PONYTAIL": "The laziest line that wins
|
|
62
|
-
"DESC_PARALLEL_AGENTS": "Send several engineers on independent jobs at once
|
|
63
|
-
"DESC_PIPELINE": "Send a
|
|
64
|
-
"DESC_LOOP": "Work a requirement in short, scored stints on a loop
|
|
65
|
-
"DESC_FACTORY": "Take one work item through the factory
|
|
66
|
-
"DESC_BRICK_FORGE": "Build or tune a loop brick, then
|
|
67
|
-
"DESC_FACTORY_FORGE": "Build a factory from bricks and loops,
|
|
68
|
-
"DESC_DEVELOP": "Drive the change home
|
|
69
|
-
"DESC_TEACH": "Get the user up to speed, or test them
|
|
70
|
-
"DESC_ADHD": "Race every reply for a reader with ADHD
|
|
71
|
-
"DESC_LEARN_MODE": "Put the driver on strategy
|
|
72
|
-
"DESC_OWNERSHIP": "Keep the driver in charge of the production code
|
|
73
|
-
"DESC_SECURITY_AUDIT": "Attack the change
|
|
74
|
-
"DESC_SKILL_FORGE": "Build, tune, merge, or retire a setup
|
|
75
|
-
"DESC_WORKTREE": "Run a task in its own garage
|
|
76
|
-
"DESC_HANDOFF": "
|
|
77
|
-
"DESC_SHIP": "Take the flag: open a PR
|
|
78
|
-
"DESC_RELEASE": "Cut a release
|
|
79
|
-
"DESC_INGEST": "Bring a PDF, Office
|
|
80
|
-
"DESC_RESEARCH": "Find the answer
|
|
81
|
-
"DESC_RULE": "Sort
|
|
82
|
-
"DESC_PROFILE": "Set up the driver profile in PROFILE.md
|
|
83
|
-
"DESC_GENESEED": "Operate the
|
|
84
|
-
"DESC_REVIEW_RESPONSE": "
|
|
58
|
+
"DESC_COUNCIL": "Get a panel of opposed voices to argue a call out.",
|
|
59
|
+
"DESC_DEBUG": "Hunt the fault by evidence. No retry-until-green.",
|
|
60
|
+
"DESC_REFACTOR": "Rebuild the car without changing how it drives.",
|
|
61
|
+
"DESC_PONYTAIL": "The laziest line that wins. lite/full/ultra.",
|
|
62
|
+
"DESC_PARALLEL_AGENTS": "Send several engineers on independent jobs at once.",
|
|
63
|
+
"DESC_PIPELINE": "Send a crew to a worktree; race it on green tests and lint.",
|
|
64
|
+
"DESC_LOOP": "Work a requirement in short, scored stints on a loop branch.",
|
|
65
|
+
"DESC_FACTORY": "Take one work item through the factory to a green PR.",
|
|
66
|
+
"DESC_BRICK_FORGE": "Build or tune a loop brick, then check it.",
|
|
67
|
+
"DESC_FACTORY_FORGE": "Build a factory from bricks and loops, then check it.",
|
|
68
|
+
"DESC_DEVELOP": "Drive the change home: smallest move, trials green.",
|
|
69
|
+
"DESC_TEACH": "Get the user up to speed, or test them. No wasted laps.",
|
|
70
|
+
"DESC_ADHD": "Race every reply for a reader with ADHD: next action first.",
|
|
71
|
+
"DESC_LEARN_MODE": "Put the driver on strategy; you execute the agreed code.",
|
|
72
|
+
"DESC_OWNERSHIP": "Keep the driver in charge of the production code.",
|
|
73
|
+
"DESC_SECURITY_AUDIT": "Attack the change like a rival would; ship, fix or block.",
|
|
74
|
+
"DESC_SKILL_FORGE": "Build, tune, merge, or retire a setup.",
|
|
75
|
+
"DESC_WORKTREE": "Run a task in its own garage, a fresh worktree.",
|
|
76
|
+
"DESC_HANDOFF": "Snapshot the state so a fresh driver takes the wheel.",
|
|
77
|
+
"DESC_SHIP": "Take the flag: open a PR or merge the verified branch.",
|
|
78
|
+
"DESC_RELEASE": "Cut a release: version, debrief and tag in sync.",
|
|
79
|
+
"DESC_INGEST": "Bring a PDF, Office or web document into markdown.",
|
|
80
|
+
"DESC_RESEARCH": "Find the answer on the open circuit, every claim proven.",
|
|
81
|
+
"DESC_RULE": "Sort a standing rule from a note, then log or test it.",
|
|
82
|
+
"DESC_PROFILE": "Set up the driver profile in PROFILE.md.",
|
|
83
|
+
"DESC_GENESEED": "Operate the Geneseed harness; build an OpenCode theme.",
|
|
84
|
+
"DESC_REVIEW_RESPONSE": "Weigh each review call, then act on it or push back.",
|
|
85
85
|
"LEX_SEALED_SECRETS": "Keep It in the Garage · Sealed Secrets",
|
|
86
86
|
"LEX_ONE_INTENT_ONE_ACT": "One Move per Corner · One Intent, One Act",
|
|
87
87
|
"LEX_VERIFY_BEFORE_ASSERTING": "Check the Data · Verify Before Asserting",
|
|
@@ -150,21 +150,21 @@
|
|
|
150
150
|
"WIKI": "Data Room",
|
|
151
151
|
"EPI_WIKI": "All the data from every weekend — check it before you push, log what the car tells you.",
|
|
152
152
|
"INTRO_WIKI": "The team may keep a data room on this machine — a vault of linked engineering notes that carries over every race weekend.",
|
|
153
|
-
"DESC_WIKI": "Use the team's data room
|
|
154
|
-
"DESC_MCP": "Build or harden
|
|
155
|
-
"DESC_BRUNO": "Build, reorganise or test a Bruno collection
|
|
156
|
-
"DESC_PROSE": "Write like a human, not a bot
|
|
157
|
-
"DESC_FRONTEND_DESIGN": "Design a UI with a point of view
|
|
158
|
-
"DESC_DECK": "Build slides
|
|
159
|
-
"DESC_WORKFLOW": "Run a saved race plan that drives your engineers by script
|
|
160
|
-
"DESC_SPRING_BOOT": "Build or change a Spring Boot service
|
|
161
|
-
"DESC_SPRING_DATA_JPA": "Work
|
|
162
|
-
"DESC_SPRING_TESTING": "Write or fix Spring Boot tests
|
|
163
|
-
"DESC_REACT": "Build or change React components in a Vite or webpack app
|
|
164
|
-
"DESC_REACT_TESTING": "Write or fix React tests
|
|
165
|
-
"DESC_JENKINS_PIPELINE": "Write or fix a declarative Jenkinsfile or shared library
|
|
166
|
-
"DESC_GITLAB_CI": "Write or fix .gitlab-ci.yml
|
|
167
|
-
"DESC_COMPOSE_OPS": "Write, review or run
|
|
153
|
+
"DESC_WIKI": "Use the team's data room; log new findings linked.",
|
|
154
|
+
"DESC_MCP": "Build or harden a Model Context Protocol server.",
|
|
155
|
+
"DESC_BRUNO": "Build, reorganise or test a Bruno API collection.",
|
|
156
|
+
"DESC_PROSE": "Write like a human, not a bot.",
|
|
157
|
+
"DESC_FRONTEND_DESIGN": "Design a UI with a point of view, not the default setup.",
|
|
158
|
+
"DESC_DECK": "Build slides as one offline HTML file, arrow-key driven.",
|
|
159
|
+
"DESC_WORKFLOW": "Run a saved race plan that drives your engineers by script.",
|
|
160
|
+
"DESC_SPRING_BOOT": "Build or change a Spring Boot service. No wasted laps.",
|
|
161
|
+
"DESC_SPRING_DATA_JPA": "Work JPA and Hibernate: queries, N+1. Simply lovely.",
|
|
162
|
+
"DESC_SPRING_TESTING": "Write or fix Spring Boot tests before the real run.",
|
|
163
|
+
"DESC_REACT": "Build or change React components in a Vite or webpack app.",
|
|
164
|
+
"DESC_REACT_TESTING": "Write or fix React tests before the real run.",
|
|
165
|
+
"DESC_JENKINS_PIPELINE": "Write or fix a declarative Jenkinsfile or shared library.",
|
|
166
|
+
"DESC_GITLAB_CI": "Write or fix .gitlab-ci.yml before the real run.",
|
|
167
|
+
"DESC_COMPOSE_OPS": "Write, review or run a Compose stack; not image builds.",
|
|
168
168
|
"AGENT_COLORS": {
|
|
169
169
|
"architect": "primary",
|
|
170
170
|
"reviewer": "warning",
|
package/themes/wizard.json
CHANGED
|
@@ -15,73 +15,73 @@
|
|
|
15
15
|
"EPI_SCRIPTS": "Optional bindings for circles that want the Laws enforced.",
|
|
16
16
|
"BENEDICTION": "Work with discipline, keep the Laws, and seal the working clean.",
|
|
17
17
|
"DESC_REVIEWER": "Scryes a change for soundness and craft before it is sealed.",
|
|
18
|
-
"DESC_TESTER": "Conjures the trials
|
|
19
|
-
"DESC_DEVELOPER": "Conjures the scoped fix in its own warded
|
|
18
|
+
"DESC_TESTER": "Conjures the trials and reads the omens when they fail.",
|
|
19
|
+
"DESC_DEVELOPER": "Conjures the scoped fix in its own warded worktree.",
|
|
20
20
|
"DESC_ARCHITECT": "Designs the ritual before a single rune is inscribed.",
|
|
21
|
-
"DESC_DOCS": "Transcribes the tomes
|
|
22
|
-
"DESC_SECURITY": "Wards the circle
|
|
23
|
-
"DESC_PERFORMANCE": "Divines where the spell’s strength drains
|
|
24
|
-
"DESC_EXPLORER": "Sends a scrying-eye
|
|
25
|
-
"DESC_RESEARCHER": "Consults
|
|
26
|
-
"DESC_MEMORY_CURATOR": "Orders the grimoire
|
|
27
|
-
"DESC_ADVOCATE": "Argues for the working
|
|
28
|
-
"DESC_SKEPTIC": "Plays the doubter
|
|
29
|
-
"DESC_PRAGMATIST": "Weighs
|
|
30
|
-
"DESC_STEWARD": "Guards the long arc
|
|
31
|
-
"DESC_VISIONARY": "Argues the
|
|
32
|
-
"DESC_USER_ADVOCATE": "Speaks for those the working serves
|
|
33
|
-
"DESC_FRAMER": "Questions the working
|
|
34
|
-
"DESC_EMPIRICIST": "Demands
|
|
35
|
-
"DESC_OPERATOR": "Speaks for the working once loosed
|
|
36
|
-
"DESC_HISTORIAN": "Reads the old grimoires
|
|
37
|
-
"DESC_SPRING_BOOT_ENGINEER": "Conjures a Spring Boot feature or service end to end
|
|
38
|
-
"DESC_SPRING_REVIEWER": "Scries a Spring Boot change
|
|
39
|
-
"DESC_SPRING_SECURITY": "Wards the Spring Security circle
|
|
40
|
-
"DESC_KUBERNETES_SPECIALIST": "Inscribes
|
|
41
|
-
"DESC_DOCKER_EXPERT": "Binds
|
|
42
|
-
"DESC_DEVOPS_ENGINEER": "Tends the build and delivery
|
|
43
|
-
"DESC_REACT_ENGINEER": "Conjures a React feature
|
|
44
|
-
"DESC_REACT_REVIEWER": "Scries a React change
|
|
45
|
-
"DESC_PLAN": "Inscribe the ritual before a non-trivial working
|
|
46
|
-
"DESC_DEPENDENCIES": "Survey every reagent
|
|
47
|
-
"DESC_GIT_HISTORY": "Scry the chronicle
|
|
48
|
-
"DESC_DOCUMENT_PROJECT": "Inscribe the PRD,
|
|
49
|
-
"DESC_COMMIT": "Gather only the reagents this working touched
|
|
21
|
+
"DESC_DOCS": "Transcribes the tomes once the work is done.",
|
|
22
|
+
"DESC_SECURITY": "Wards the circle around the security surface.",
|
|
23
|
+
"DESC_PERFORMANCE": "Divines where the spell’s strength drains.",
|
|
24
|
+
"DESC_EXPLORER": "Sends a scrying-eye wide; returns only what it saw.",
|
|
25
|
+
"DESC_RESEARCHER": "Consults far libraries; two tomes for every claim.",
|
|
26
|
+
"DESC_MEMORY_CURATOR": "Orders the grimoire and burns no page without leave.",
|
|
27
|
+
"DESC_ADVOCATE": "Argues for the working and its promise.",
|
|
28
|
+
"DESC_SKEPTIC": "Plays the doubter and assails the working's flaws.",
|
|
29
|
+
"DESC_PRAGMATIST": "Weighs whether the boon is worth the reagents.",
|
|
30
|
+
"DESC_STEWARD": "Guards the long arc: structure, upkeep, debt.",
|
|
31
|
+
"DESC_VISIONARY": "Argues the great boon and what it would take to reach it.",
|
|
32
|
+
"DESC_USER_ADVOCATE": "Speaks for those the working serves.",
|
|
33
|
+
"DESC_FRAMER": "Questions the working: real need or mere symptom.",
|
|
34
|
+
"DESC_EMPIRICIST": "Demands trial or precedent behind each claim.",
|
|
35
|
+
"DESC_OPERATOR": "Speaks for the working once loosed into the wild.",
|
|
36
|
+
"DESC_HISTORIAN": "Reads the old grimoires for the lesson of past castings.",
|
|
37
|
+
"DESC_SPRING_BOOT_ENGINEER": "Conjures a Spring Boot feature or service end to end.",
|
|
38
|
+
"DESC_SPRING_REVIEWER": "Scries a Spring Boot change before it is sealed.",
|
|
39
|
+
"DESC_SPRING_SECURITY": "Wards the Spring Security circle: filters, OAuth2, CSRF.",
|
|
40
|
+
"DESC_KUBERNETES_SPECIALIST": "Inscribes Kubernetes manifests for a Spring Boot service.",
|
|
41
|
+
"DESC_DOCKER_EXPERT": "Binds a lean Spring Boot Docker image; not Compose ops.",
|
|
42
|
+
"DESC_DEVOPS_ENGINEER": "Tends the CI build and delivery of a Spring Boot service.",
|
|
43
|
+
"DESC_REACT_ENGINEER": "Conjures a React feature, or mends a broken build.",
|
|
44
|
+
"DESC_REACT_REVIEWER": "Scries a React change before it is sealed.",
|
|
45
|
+
"DESC_PLAN": "Inscribe the ritual before a non-trivial working.",
|
|
46
|
+
"DESC_DEPENDENCIES": "Survey every reagent, then transmute one at a time.",
|
|
47
|
+
"DESC_GIT_HISTORY": "Scry the chronicle by bisect and blame, or mend it.",
|
|
48
|
+
"DESC_DOCUMENT_PROJECT": "Inscribe the PRD, architecture and AGENTS.md from the code.",
|
|
49
|
+
"DESC_COMMIT": "Gather only the reagents this working touched; commit.",
|
|
50
50
|
"DESC_CODE_REVIEW": "Scry a diff or petition — soundness first, craft after.",
|
|
51
|
-
"DESC_BRAINSTORM": "Turn a raw notion into an agreed design before any rune
|
|
52
|
-
"DESC_CODEBASE_DESIGN": "Design deep modules
|
|
53
|
-
"DESC_WAYFINDER": "Chart a working too vast for one session as
|
|
54
|
-
"DESC_PROTOTYPE": "Answer a design question with throwaway code
|
|
55
|
-
"DESC_ROAST_ME": "Put the user's own ask, plan or idea to
|
|
56
|
-
"DESC_FRESH_EYES": "Conjure an unscried adept
|
|
51
|
+
"DESC_BRAINSTORM": "Turn a raw notion into an agreed design before any rune.",
|
|
52
|
+
"DESC_CODEBASE_DESIGN": "Design deep modules, set seams, a glossary and ADRs.",
|
|
53
|
+
"DESC_WAYFINDER": "Chart a working too vast for one session as decision runes.",
|
|
54
|
+
"DESC_PROTOTYPE": "Answer a design question with throwaway code.",
|
|
55
|
+
"DESC_ROAST_ME": "Put the user's own ask, plan or idea to trial by fire.",
|
|
56
|
+
"DESC_FRESH_EYES": "Conjure an unscried adept to judge the work blind.",
|
|
57
57
|
"ROAST_PERSONA": "an exacting archmagus who has watched this exact folly unmake apprentices",
|
|
58
|
-
"DESC_COUNCIL": "Convene a circle of opposed counsels to debate a decision
|
|
59
|
-
"DESC_DEBUG": "Hunt the curse by evidence
|
|
60
|
-
"DESC_REFACTOR": "Reshape the working without changing its effect
|
|
61
|
-
"DESC_PONYTAIL": "The laziest working spell
|
|
62
|
-
"DESC_PARALLEL_AGENTS": "Loose several familiars on independent tasks at once
|
|
63
|
-
"DESC_PIPELINE": "
|
|
64
|
-
"DESC_LOOP": "Work a requirement in small, weighed
|
|
65
|
-
"DESC_FACTORY": "Carry one work item through the factory
|
|
66
|
-
"DESC_BRICK_FORGE": "Inscribe or adapt a loop brick, then prove it
|
|
67
|
-
"DESC_FACTORY_FORGE": "Bind bricks and loops into a factory, prove it
|
|
68
|
-
"DESC_DEVELOP": "Drive a working through
|
|
69
|
-
"DESC_TEACH": "Tutor the apprentice, or test them
|
|
70
|
-
"DESC_ADHD": "Shape every reply for a reader with ADHD
|
|
71
|
-
"DESC_LEARN_MODE": "Take on an apprentice
|
|
72
|
-
"DESC_OWNERSHIP": "Keep the mage the keeper of their own code
|
|
73
|
-
"DESC_SECURITY_AUDIT": "Scry a change as a hostile caster would
|
|
74
|
-
"DESC_SKILL_FORGE": "Inscribe, sharpen, merge, or retire a spell
|
|
75
|
-
"DESC_WORKTREE": "Work a task in its own warded circle
|
|
76
|
-
"DESC_HANDOFF": "Pass the working
|
|
77
|
-
"DESC_SHIP": "Send the working forth:
|
|
78
|
-
"DESC_RELEASE": "Cut a release
|
|
79
|
-
"DESC_INGEST": "Transmute a PDF, Office
|
|
80
|
-
"DESC_RESEARCH": "Seek the answer
|
|
81
|
-
"DESC_RULE": "Sort
|
|
82
|
-
"DESC_PROFILE": "Divine the user's nature into PROFILE.md
|
|
83
|
-
"DESC_GENESEED": "Operate the
|
|
84
|
-
"DESC_REVIEW_RESPONSE": "
|
|
58
|
+
"DESC_COUNCIL": "Convene a circle of opposed counsels to debate a decision.",
|
|
59
|
+
"DESC_DEBUG": "Hunt the curse by evidence, find its root, banish it.",
|
|
60
|
+
"DESC_REFACTOR": "Reshape the working without changing its effect.",
|
|
61
|
+
"DESC_PONYTAIL": "The laziest working spell. lite/full/ultra.",
|
|
62
|
+
"DESC_PARALLEL_AGENTS": "Loose several familiars on independent tasks at once.",
|
|
63
|
+
"DESC_PIPELINE": "Send a coven to a worktree; merge on green trials and lint.",
|
|
64
|
+
"DESC_LOOP": "Work a requirement in small, weighed loop incantations.",
|
|
65
|
+
"DESC_FACTORY": "Carry one work item through the factory to a green PR.",
|
|
66
|
+
"DESC_BRICK_FORGE": "Inscribe or adapt a loop brick, then prove it.",
|
|
67
|
+
"DESC_FACTORY_FORGE": "Bind bricks and loops into a factory, then prove it.",
|
|
68
|
+
"DESC_DEVELOP": "Drive a working through cover-and-confirm, trials green.",
|
|
69
|
+
"DESC_TEACH": "Tutor the apprentice, or test them.",
|
|
70
|
+
"DESC_ADHD": "Shape every reply for a reader with ADHD: next step first.",
|
|
71
|
+
"DESC_LEARN_MODE": "Take on an apprentice: they design, you cast the code.",
|
|
72
|
+
"DESC_OWNERSHIP": "Keep the mage the keeper of their own code.",
|
|
73
|
+
"DESC_SECURITY_AUDIT": "Scry a change as a hostile caster would; ship, mend or bind.",
|
|
74
|
+
"DESC_SKILL_FORGE": "Inscribe, sharpen, merge, or retire a spell.",
|
|
75
|
+
"DESC_WORKTREE": "Work a task in its own warded circle, a fresh worktree.",
|
|
76
|
+
"DESC_HANDOFF": "Pass the working: inscribe its state for a fresh mind.",
|
|
77
|
+
"DESC_SHIP": "Send the working forth: a PR, or a merge once proven.",
|
|
78
|
+
"DESC_RELEASE": "Cut a release: version, chronicle and tag in accord.",
|
|
79
|
+
"DESC_INGEST": "Transmute a PDF, Office or web document into markdown.",
|
|
80
|
+
"DESC_RESEARCH": "Seek the answer in the wider lore, every claim proven.",
|
|
81
|
+
"DESC_RULE": "Sort a standing rule from a memory, then inscribe or test it.",
|
|
82
|
+
"DESC_PROFILE": "Divine the user's nature into PROFILE.md.",
|
|
83
|
+
"DESC_GENESEED": "Operate the Geneseed harness; conjure an OpenCode theme.",
|
|
84
|
+
"DESC_REVIEW_RESPONSE": "Weigh each review finding, then heed or refute it.",
|
|
85
85
|
"LEX_SEALED_SECRETS": "Sealed Sigils · Sealed Secrets",
|
|
86
86
|
"LEX_ONE_INTENT_ONE_ACT": "One Intent, One Casting · One Intent, One Act",
|
|
87
87
|
"LEX_VERIFY_BEFORE_ASSERTING": "Scry Before You Speak · Verify Before Asserting",
|
|
@@ -150,21 +150,21 @@
|
|
|
150
150
|
"WIKI": "Athenaeum",
|
|
151
151
|
"EPI_WIKI": "The great library of the craft — consult it before casting, add to it what you discover.",
|
|
152
152
|
"INTRO_WIKI": "The archmage may keep an athenaeum upon this machine — a vault of interlinked tomes whose knowledge outlives any single working.",
|
|
153
|
-
"DESC_WIKI": "Consult and enrich the athenaeum
|
|
154
|
-
"DESC_MCP": "Conjure or fortify
|
|
155
|
-
"DESC_BRUNO": "Conjure, reorganise or
|
|
156
|
-
"DESC_PROSE": "Pen prose for mortal eyes, not machine-cant
|
|
157
|
-
"DESC_FRONTEND_DESIGN": "Design a UI with intent
|
|
158
|
-
"DESC_DECK": "Conjure slides
|
|
159
|
-
"DESC_WORKFLOW": "Invoke a saved ritual that binds your familiars by
|
|
160
|
-
"DESC_SPRING_BOOT": "Conjure or reshape a Spring Boot service
|
|
161
|
-
"DESC_SPRING_DATA_JPA": "Weave
|
|
162
|
-
"DESC_SPRING_TESTING": "Cast and mend Spring Boot trials
|
|
163
|
-
"DESC_REACT": "Conjure or reshape React components in a Vite or webpack app
|
|
164
|
-
"DESC_REACT_TESTING": "Cast and mend React tests
|
|
165
|
-
"DESC_JENKINS_PIPELINE": "Cast and mend a declarative Jenkinsfile or shared library
|
|
166
|
-
"DESC_GITLAB_CI": "Cast and mend .gitlab-ci.yml
|
|
167
|
-
"DESC_COMPOSE_OPS": "Conjure, inspect and tend a Compose stack
|
|
153
|
+
"DESC_WIKI": "Consult and enrich the athenaeum.",
|
|
154
|
+
"DESC_MCP": "Conjure or fortify a Model Context Protocol server.",
|
|
155
|
+
"DESC_BRUNO": "Conjure, reorganise or test a Bruno API collection.",
|
|
156
|
+
"DESC_PROSE": "Pen prose for mortal eyes, not machine-cant.",
|
|
157
|
+
"DESC_FRONTEND_DESIGN": "Design a UI with intent, not the common defaults.",
|
|
158
|
+
"DESC_DECK": "Conjure slides as one self-contained offline HTML tome.",
|
|
159
|
+
"DESC_WORKFLOW": "Invoke a saved ritual that binds your familiars by rite.",
|
|
160
|
+
"DESC_SPRING_BOOT": "Conjure or reshape a Spring Boot service.",
|
|
161
|
+
"DESC_SPRING_DATA_JPA": "Weave JPA and Hibernate workings: the N+1 curse.",
|
|
162
|
+
"DESC_SPRING_TESTING": "Cast and mend Spring Boot trials: slices, Testcontainers.",
|
|
163
|
+
"DESC_REACT": "Conjure or reshape React components in a Vite or webpack app.",
|
|
164
|
+
"DESC_REACT_TESTING": "Cast and mend React tests: Jest, Testing Library, MSW.",
|
|
165
|
+
"DESC_JENKINS_PIPELINE": "Cast and mend a declarative Jenkinsfile or shared library.",
|
|
166
|
+
"DESC_GITLAB_CI": "Cast and mend .gitlab-ci.yml: rules, needs, cache.",
|
|
167
|
+
"DESC_COMPOSE_OPS": "Conjure, inspect and tend a Compose stack; not image builds.",
|
|
168
168
|
"AGENT_COLORS": {
|
|
169
169
|
"architect": "primary",
|
|
170
170
|
"reviewer": "warning",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./react-C1iE8mnY.js";import{t as r}from"./api-DLDVY3K-.js";import{n as i,t as a}from"./usePoll-D5c_qIFZ.js";import{t as o}from"./DataTable-b9zTShqJ.js";var s=e(t(),1),c={x:260,y:190},l=110,u=28,d=14,f=44,p=e=>e*Math.PI/180,m=e=>Math.round(e*10)/10,h=(e,t=l,n=c)=>({x:m(n.x+t*Math.cos(p(e))),y:m(n.y+t*Math.sin(p(e)))}),g=e=>e/l*(180/Math.PI)+3,_=(e,t,n,r=0)=>`M${t.x},${t.y} A${e},${e} 0 ${r} 1 ${n.x},${n.y}`,v=m(h(205).x-6),y=e=>e.length*6.4,b=e=>({x:e.x-y(e.name)/2,y:e.y-7,w:y(e.name),h:14}),x=(e,t)=>e.x<t.x+t.w&&t.x<e.x+e.w&&e.y<t.y+t.h&&t.y<e.y+e.h,S=(e,t)=>e.some((n,r)=>[...e.slice(r+1),...t.filter(e=>!e.gate)].some(e=>x(b(n),b(e))));function C(e){return e?.gate===`human`?e.gateOn?.length?`Human gate on ${e.gateOn.join(`, `)}`:`Human gate`:null}function w(e,t=[]){let n=T(e,t,0);if(n.mode!==`ring`)return n;let r=Math.min(...n.entry.map(e=>e.y-30),...n.nodes.map(e=>e.y-e.r-12),...n.inner.map(e=>e.cy-e.r-12),...n.exit?[n.exit.y-24]:[]);return r<0?T(e,t,Math.ceil(-r)):n}function T(e,t,n){let r={x:c.x,y:c.y+n},i=(e,t=l)=>h(e,t,r),a=e=>t.find(t=>t.name===e),o=e=>a(e)?.effect??null,s=e=>C(a(e)),p=e.loops||[],v=p.find(e=>e.iteration);if(!v||v.nodes.length>8)return E(e,o,s);let b=Math.max(...e.nodes.map(e=>p.filter(t=>t.nodes.includes(e)).length)),x=p.filter(e=>e!==v);if(b>3||x.some(e=>!e.nodes.every(e=>v.nodes.includes(e))))return E(e,o,s);let w=v.nodes[0],T=new Set(e.edges.filter(e=>e.to===w).map(e=>e.from)),D=new Map;for(let e of[...x].sort((e,t)=>e.nodes.length-t.nodes.length))for(let t of e.nodes.slice(1))t!==w&&!T.has(t)&&!D.has(t)&&D.set(t,e);let O=v.nodes.filter(e=>!D.has(e));if(O.length<2||x.some(e=>D.has(e.nodes[0])))return E(e,o,s);let k=360/O.length,A=O.map((e,t)=>({name:e,a:-90+t*k,r:u})),j=A.findIndex(e=>o(e.name)===`mutate`);j>=0&&A.splice(j,0,{name:`validate`,a:A[j].a-k/2,r:d,gate:!0});let M=A.map(e=>({name:e.name,...i(e.a),r:e.r,effect:e.gate?null:o(e.name),gate:!!e.gate,inner:!1,human:e.gate?null:s(e.name)})),N=A.map((e,t)=>{let n=A[(t+1)%A.length],r=(t+1===A.length?n.a+360:n.a)-g(n.r)-2,a=e.a+g(e.r);return{d:_(l,i(a),i(r),+(r-a>180)),kind:`ring`}}),P=[],F=new Map;for(let e of x)F.set(e.nodes[0],[...F.get(e.nodes[0])||[],e]);for(let[e,t]of F){let n=A.find(t=>t.name===e),r=i(n.a),a=t.length>1;t.sort((e,t)=>e.nodes.length-t.nodes.length).forEach((e,t)=>{let d=i(n.a+(a?t?18:-18:0),l+(a?54:44)),p=Math.atan2(d.y-r.y,d.x-r.x)*(180/Math.PI),g=e.nodes.filter(t=>D.get(t)===e),v=e=>g.map((t,n)=>({name:t,...h(p+(n-(g.length-1)/2)*e,f,d)})),y=105;for(;y<150&&S(v(y),M);)y+=5;v(y).forEach(({name:e,...t})=>{M.push({name:e,...t,r:u,effect:o(e),gate:!1,inner:!0,human:s(e)})});let b=p+180;N.push({d:_(f,h(b+42,f,d),h(b+138,f,d)),kind:`inner`}),N.push({d:_(f,h(b+222,f,d),h(b+318,f,d)),kind:`inner`});let x=`${e.nodes.join(e.nodes.length===2?` ⇄ `:` → `)} · max ${e.max}`,C={lx:d.x,ly:d.y+f+20,anchor:`middle`};if(a){let e=d.x>=c.x,t=Math.max(f,...g.map(e=>{let t=M.find(t=>t.name===e);return Math.abs(t.x-d.x)+u}));C={lx:m(d.x+(e?t+8:-t-8)),ly:m(d.y+4),anchor:e?`start`:`end`}}P.push({loop:e.name,cx:d.x,cy:d.y,r:f,label:x,...C})})}let I=i(205).y,L=e.nodes.filter(e=>!v.nodes.includes(e)),R=L.map((e,t)=>({name:e,x:40,y:m(I-44*(L.length-1-t)),human:s(e)})),z=e.edges.find(e=>e.to===`$close`)?.from,B=M.find(e=>e.name===z),V=B?{from:z,x:B.x+200,y:B.y-30,d:`M${B.x+u},${B.y-6} C${B.x+90},${B.y-40} ${B.x+170},${B.y-40} ${B.x+200},${B.y-30}`}:null,H=Math.max(540,...M.map(e=>e.x+e.r+8),...V?[V.x+6+y(`close`)+8]:[],...P.map(e=>e.cx+e.r+8),...P.map(e=>e.anchor===`start`?e.lx+y(e.label)+8:e.lx+y(e.label)/2+8)),U=Math.max(300,...M.map(e=>e.y+e.r+12),...P.map(e=>Math.max(e.cy+e.r,e.ly)+12));return{mode:`ring`,width:Math.ceil(H),height:Math.ceil(U),center:{x:r.x,y:r.y,r:l},nodes:M,arcs:N,inner:P,entry:R,exit:V}}function E(e,t,n){let r=e.loops||[],i=e=>36+16*r.filter(t=>t!==e&&t.nodes.every(t=>e.nodes.includes(t))).length,a=Math.max(u,...r.map(i))+30,o=new Map(e.nodes.map((e,t)=>[e,60+t*100])),s=e.nodes.map(e=>({name:e,x:o.get(e),y:a,r:u,effect:t(e),gate:!1,inner:!1,human:n(e)})),c=e.nodes.slice(1).map((t,n)=>({d:`M${o.get(e.nodes[n])+u},${a} L${o.get(t)-u-4},${a}`,kind:`flow`})),l=r.map(e=>{let t=i(e),n=Math.min(...e.nodes.map(e=>o.get(e))),r=Math.max(...e.nodes.map(e=>o.get(e))),s={x:n-t,y:a-t,w:r-n+2*t,h:2*t};return c.push({d:`M${r},${s.y+s.h} L${n+4},${s.y+s.h}`,kind:`flow`}),{loop:e.name,label:`${e.name} · max ${e.max}`,box:s}});return{mode:`flow`,width:60+e.nodes.length*100,height:2*a,center:null,nodes:s,arcs:c,inner:l,entry:[],exit:null}}var D=n();function O({x:e,y:t,label:n}){return(0,D.jsxs)(`g`,{className:`lr-human`,children:[(0,D.jsx)(`title`,{children:n}),(0,D.jsx)(`circle`,{cx:e,cy:t,r:`9`}),(0,D.jsx)(`circle`,{cx:e,cy:t-2.4,r:`2.6`,className:`lr-human-fig`}),(0,D.jsx)(`path`,{d:`M${e-4.6},${t+5.6} a4.6,4.6 0 0 1 9.2,0 Z`,className:`lr-human-fig`})]})}function k({graph:e,bricks:t,onSelect:n,highlight:r}){let i=w(e,t),a=(e.loops||[]).find(e=>e.iteration),o=e=>`${e.name} brick${e.human?`, ${e.human.toLowerCase()}`:``}`,s=e=>t=>{(t.type===`click`||t.key===`Enter`||t.key===` `)&&(t.preventDefault(),n?.(e))};return(0,D.jsxs)(`svg`,{className:`loop-ring`,viewBox:`0 0 ${i.width} ${i.height}`,style:{"--loop-w":`${i.width}px`},role:`group`,"aria-label":`${e.name} loop: ${e.nodes.join(`, `)}`,children:[(0,D.jsx)(`defs`,{children:[`ring`,`inner`,`flow`].map(e=>(0,D.jsx)(`marker`,{id:`lr-arrow-${e}`,markerWidth:`10`,markerHeight:`10`,refX:`7`,refY:`4`,orient:`auto`,children:(0,D.jsx)(`path`,{d:`M0,0 L8,4 L0,8 Z`,className:`lr-head-${e}`})},e))}),i.mode===`ring`&&i.inner.map(e=>(0,D.jsxs)(`g`,{children:[(0,D.jsx)(`circle`,{cx:e.cx,cy:e.cy,r:e.r,className:`lr-inner`}),(0,D.jsx)(`text`,{x:e.lx,y:e.ly,textAnchor:e.anchor,className:`lr-sub lr-good`,children:e.label})]},e.loop)),i.mode===`flow`&&i.inner.map(e=>(0,D.jsxs)(`g`,{children:[(0,D.jsx)(`rect`,{x:e.box.x,y:e.box.y,width:e.box.w,height:e.box.h,rx:`14`,className:`lr-box`}),(0,D.jsx)(`text`,{x:e.box.x+10,y:e.box.y-6,className:`lr-sub lr-good`,children:e.label})]},e.loop)),i.arcs.map((e,t)=>(0,D.jsx)(`path`,{d:e.d,className:`lr-${e.kind}`,markerEnd:`url(#lr-arrow-${e.kind})`},t)),i.entry.length>0&&(0,D.jsxs)(`g`,{children:[(0,D.jsx)(`path`,{d:`M40,${i.entry.at(-1).y} L${v},${i.entry.at(-1).y}`,className:`lr-flow`,markerEnd:`url(#lr-arrow-flow)`}),i.entry.map(e=>(0,D.jsxs)(`g`,{children:[(0,D.jsx)(`text`,{x:e.x,y:e.y-10,className:`lr-lbl`,children:e.name}),(0,D.jsx)(`text`,{x:e.x,y:e.y+18,className:`lr-sub`,children:`setup · 1×`}),e.human?(0,D.jsx)(O,{x:e.x-14,y:e.y-14,label:e.human}):null]},e.name))]}),i.nodes.map(e=>e.gate?(0,D.jsxs)(`g`,{className:`lr-gate`,children:[(0,D.jsx)(`title`,{children:`validate — the engine scores the change before the first mutate step`}),(0,D.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r}),(0,D.jsx)(`text`,{x:e.x,y:e.y+5,textAnchor:`middle`,children:`⛨`}),(0,D.jsx)(`text`,{x:e.x+20,y:e.y-10,className:`lr-sub lr-warn`,children:`validate`})]},e.name):(0,D.jsxs)(`g`,{className:`lr-node${e.inner?` inner`:``}${e.effect===`mutate`?` mutate`:``}${e.name===r?` current`:``}`,"aria-current":e.name===r?`step`:void 0,...n?{role:`button`,tabIndex:0,"aria-label":o(e),onClick:s(e.name),onKeyDown:s(e.name)}:{role:`img`,"aria-label":`${o(e)}${e.name===r?`, current step`:``}`},children:[(0,D.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r}),(0,D.jsx)(`text`,{x:e.x,y:e.y+4,textAnchor:`middle`,children:e.name}),e.human?(0,D.jsx)(O,{x:e.x+e.r*.74,y:e.y-e.r*.74,label:e.human}):null]},e.name)),i.exit&&(0,D.jsxs)(`g`,{children:[(0,D.jsx)(`path`,{d:i.exit.d,className:`lr-flow`,markerEnd:`url(#lr-arrow-flow)`}),(0,D.jsx)(`text`,{x:i.exit.x+6,y:i.exit.y+4,className:`lr-lbl`,children:`close`}),(0,D.jsx)(`text`,{x:i.exit.x-90,y:i.exit.y-10,textAnchor:`middle`,className:`lr-sub`,children:`done`})]}),i.center&&a&&(0,D.jsxs)(`g`,{children:[(0,D.jsx)(`text`,{x:i.center.x,y:i.center.y-4,textAnchor:`middle`,className:`lr-title`,children:e.name}),(0,D.jsxs)(`text`,{x:i.center.x,y:i.center.y+16,textAnchor:`middle`,className:`lr-sub lr-acc`,children:[`iterations · max `,a.max]})]})]})}var A=5e3,j=[`prudent`,`balanced`,`aggressive`],M={running:`acc`,awaiting:`warn`,unreadable:`bad`},N=e=>!!e.graph;function P(){let[e,t]=(0,s.useState)(null),[n,o]=(0,s.useState)(null),[c,l]=(0,s.useState)(null),[u,d]=(0,s.useState)(0);return i(e=>r.activeLoops().then(n=>e()&&(t(a(n)),o(null)),t=>e()&&o(t.message)),A,[u]),{loops:e?.loops??null,error:c||n,onPreset:(e,t)=>(l(null),r.setLoopPreset(e,t).then(()=>d(e=>e+1),e=>l(e.message)))}}var F=e=>({key:e,label:e,align:`right`,render:t=>(0,D.jsx)(`span`,{className:`num`,children:t[e]})}),I=[F(`iteration`),{key:`intent`,label:`intent`},F(`declared`),F(`actual`),{key:`decision`,label:`decision`},{key:`tests`,label:`tests`}];function L({history:e}){return e.length?(0,D.jsx)(`div`,{className:`loop-history`,children:(0,D.jsx)(o,{caption:`Iterations`,captionHidden:!0,columns:I,rows:e,rowKey:e=>e.iteration})}):(0,D.jsx)(`p`,{className:`panel-note`,children:`No iteration finished yet.`})}function R({loop:e,bricks:t,onPreset:n}){let r=N(e)?(e.graph.loops||[]).find(e=>e.iteration):null,[i,a]=(0,s.useState)(!1);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(`div`,{className:`reader-tags`,children:[(0,D.jsx)(`span`,{className:`tag acc`,children:`Active loop`}),(0,D.jsx)(`span`,{className:`tag${M[e.status]?` ${M[e.status]}`:``}`,children:e.status})]}),(0,D.jsx)(`h2`,{className:`reader-title`,children:e.title}),(0,D.jsxs)(`p`,{className:`mono dim reader-src`,children:[e.branch,` · `,e.root]}),N(e)?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(`p`,{className:`reader-lede`,children:[`Iteration `,e.iteration,r?` / ${r.max}`:``,` · at `,e.node]}),e.awaiting?(0,D.jsxs)(`p`,{className:`loop-run-wait t-warn`,children:[(0,D.jsxs)(`b`,{children:[`Awaiting `,e.awaiting.kind,e.awaiting.kind===`gate`?` at ${e.awaiting.node}`:``]}),` `,`— Answer in the agent's session.`]}):null,(0,D.jsxs)(`label`,{className:`panel-note loop-run-preset`,children:[`preset`,(0,D.jsx)(`select`,{className:`sel`,"aria-label":`Preset for ${e.title}`,value:e.preset,disabled:i,onChange:t=>{a(!0),Promise.resolve(n(e.root,t.target.value)).finally(()=>a(!1))},children:j.map(e=>(0,D.jsx)(`option`,{children:e},e))})]}),(0,D.jsx)(`a`,{href:`#/docs/loop-risk`,children:`What presets mean →`}),(0,D.jsx)(`hr`,{className:`hr`}),(0,D.jsx)(`div`,{className:`loop-graph`,children:(0,D.jsx)(k,{graph:e.graph,bricks:t,highlight:e.node})}),(0,D.jsx)(`h3`,{className:`loop-h2`,children:`Iterations`}),(0,D.jsx)(L,{history:e.history})]}):(0,D.jsx)(`p`,{className:`reader-lede`,children:e.status===`unreadable`?`Its LOOP.md cannot be read, so there is no state to show.`:`Its LOOP.md is gone: the loop closed and its state went with it.`})]})}export{O as a,w as c,P as i,M as n,k as o,N as r,C as s,R as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./react-C1iE8mnY.js";import{t as r}from"./api-DLDVY3K-.js";import{s as i}from"./motion-RlUl1osO.js";import{$ as a,A as o,C as s,D as c,E as l,I as u,M as d,N as f,P as p,St as m,T as h,V as g,bt as _,et as v,gt as y,j as b,k as ee,nt as te,o as ne,w as x}from"./index-How7SzDZ.js";import{t as S}from"./EmptyState-CY5Pm2xy.js";import{_ as C,a as w,c as T,f as E,g as D,h as O,i as k,l as A,m as j,n as M,o as N,p as P,r as F,s as I,t as L,u as R,v as z}from"./Bonsai-Bfpb6W-1.js";import{n as re,t as ie}from"./usePoll-D5c_qIFZ.js";var B=e(t(),1),V=n(),H=4,U=56*H,W=24,G=165,K=188,q=(e,t)=>e>0?Math.max(1,Math.floor((e-32+W)/(U+W))):Math.max(1,t),J=e=>e.status===`blocked`?`bad`:b(e)?`warn`:e.status===`busy`?`ok`:``,Y=e=>{let t=A(e);return t==null?null:Math.round(t*100)};function X(e,t,n){let r=s[e.status]||s.idle,i=t.pads.filter(e=>e.key!=null),a=t.pads.reduce((e,t)=>e+t.files.length,0)+t.fallen.reduce((e,t)=>e+t.files.length,0),o=Y(e);return[`${e.title||c(e.cwd)||e.session_id}, ${e.chip||e.host||`unknown host`}, ${r.label}${e.phase?`, ${e.phase}`:``}`,`${e.turns||0} turns${o==null?``:`, context ${o} %`}${e.compactions?`, ${e.compactions} compactions`:``}`,i.length?`${i.length} sub-agent${i.length===1?``:`s`} running: ${i.map(e=>`${e.type||`agent`} (${e.files.length} file${e.files.length===1?``:`s`})`).join(`, `)}`:``,t.fallen.length?`${t.fallen.length} finished`:``,`${a} file${a===1?``:`s`} changed`,n.length?`shares ${n.length} file${n.length===1?``:`s`} with another session`:``,e.error?`error: ${e.error}`:``].filter(Boolean).join(`. `)}function ae({s:e,t,mine:n}){let r=Y(e);return(0,V.jsxs)(`div`,{className:`card gd-card`,children:[(0,V.jsxs)(`dl`,{className:`gd-facts`,children:[e.model&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`dt`,{children:`model`}),(0,V.jsx)(`dd`,{className:`mono`,children:e.model})]}),(0,V.jsx)(`dt`,{children:`turns`}),(0,V.jsx)(`dd`,{children:e.turns||0}),(0,V.jsx)(`dt`,{children:`context`}),(0,V.jsx)(`dd`,{children:r==null?`unknown`:`${r} %`}),(0,V.jsx)(`dt`,{children:`compactions`}),(0,V.jsx)(`dd`,{children:e.compactions||0})]}),t.fallen.length>0&&(0,V.jsxs)(`div`,{className:`dim act-xs`,children:[`finished: `,t.fallen.map(e=>`${e.type||`agent`} (${e.files.length})`).join(`, `)]}),n.map(e=>(0,V.jsxs)(`div`,{className:`act-xs ${e.kind===`same-worktree`?`t-bad`:`t-warn`}`,children:[`same file`,e.kind===`same-worktree`?``:`, other worktree`,`: `,e.path]},`${e.kind}:${e.path}`))]})}function Z({s:e,worktree:t,sakura:n,mine:r,pad:i,onHover:a}){let o=z(e,n),l=(0,B.useMemo)(()=>E(e,{sakura:n}),[o]),u=s[e.status]||s.idle,d=Array.isArray(e.loops)?e.loops[0]:null,f=e.status!==`idle`,p=I(e),m=e.title||c(e.cwd)||e.session_id,h=Y(e),g=(0,B.useRef)(null),_=(0,B.useCallback)(e=>a(p,e,Q(g.current)),[a,p]);return(0,V.jsxs)(`a`,{ref:g,className:`gd-tree${b(e)?` gd-needs`:``}`,href:e.href||R(e.session_id),"aria-label":X(e,l,r),"data-sid":e.session_id,onMouseEnter:e=>a(p,null,Q(e.currentTarget)),onMouseLeave:()=>a(null,null),onFocus:e=>a(p,null,Q(e.currentTarget)),onBlur:()=>a(null,null),onKeyDown:e=>k(e,l.pads.length,i,_),children:[(0,V.jsx)(F,{t:l,pad:i,swaying:f,onPad:_,px:H}),(0,V.jsxs)(`div`,{className:`gd-cap`,children:[(0,V.jsx)(`div`,{className:`gd-title`,title:m,children:m}),(0,V.jsxs)(`div`,{className:`row wrap gd-pills`,children:[(0,V.jsx)(`span`,{className:`badge mono`,title:`The install this session runs in`,children:e.chip||e.host||`?`}),(0,V.jsx)(`span`,{className:`badge ${J(e)}`,children:u.label}),t&&(0,V.jsxs)(`span`,{className:`badge mono`,children:[`⎇ `,t]}),d&&(0,V.jsxs)(`span`,{className:`badge`,children:[`↻ `,d.title,d.iteration==null?``:` ${d.iteration}`]}),e.attribution===!1&&(0,V.jsx)(`span`,{className:`badge`,title:`attribution unavailable on ${e.host}`,children:`no attrib.`})]}),(0,V.jsxs)(`div`,{className:`mono gd-meta`,children:[e.turns||0,` turns`,h==null?``:` · ${h}%`]})]})]})}function oe({pairs:e,count:t}){if(!e.length)return null;let n=t*U+(t-1)*W,r=e=>e*(U+W)+U/2;return(0,V.jsx)(`svg`,{className:`gd-threads`,width:n,height:56*H+20,"aria-hidden":`true`,children:e.map(({a:e,b:t,kind:n})=>{let[i,a]=e<t?[e,t]:[t,e],o=`gd-thread ${n===`same-worktree`?`red`:`amber`}`;if(a-i===1){let e=r(i)+30,t=r(a)-30,n=(e+t)/2;return(0,V.jsxs)(`g`,{className:o,children:[(0,V.jsx)(`path`,{d:`M${e} ${G} C${n} 179 ${n} 159 ${t} 169`}),(0,V.jsx)(`path`,{d:`M${e} 169 C${n} 159 ${n} 179 ${t} ${G}`})]},`${i}-${a}`)}return(0,V.jsx)(`g`,{className:o,children:(0,V.jsx)(`path`,{d:`M${r(i)} ${K} Q${(r(i)+r(a))/2} 222 ${r(a)} ${K}`})},`${i}-${a}`)})})}var Q=e=>e.offsetLeft;function se({sessions:e,collisions:t}){let[n,r]=(0,B.useState)(N),[i,a]=(0,B.useState)(()=>new Set),o=()=>{let e=!n;r(e);try{window.localStorage.setItem(M,e?`1`:`0`)}catch{}},s=Array.isArray(t)?t:[],c=T(P(e)).map(e=>i.has(e.key)?{...e,collapsed:!1}:e),l=c.filter(e=>e.collapsed),u=e=>D(e,s);return(0,V.jsxs)(`section`,{className:`gd`,"aria-label":`Garden`,children:[(0,V.jsxs)(`div`,{className:`row between wrap gap-8 gd-head`,children:[(0,V.jsxs)(`span`,{className:`dim act-sm`,children:[e.length,` tree`,e.length===1?``:`s`,` · `,c.length,` `,c.length===1?`shelf`:`shelves`,` · a tree opens its session; hover or focus shows its details, and a tap or the arrow keys walk its pads`]}),(0,V.jsx)(`button`,{type:`button`,className:n?`chip-f on`:`chip-f`,"aria-pressed":n,onClick:o,children:`Pink blossom`})]}),l.length>0&&(0,V.jsx)(`div`,{className:`row wrap gap-8 gd-chips`,role:`group`,"aria-label":`Folded shelves`,children:l.map(e=>(0,V.jsxs)(`button`,{type:`button`,className:`chip-f`,"aria-expanded":!1,onClick:()=>a(t=>new Set(t).add(e.key)),children:[e.name,` · `,e.trees.length]},e.key))}),c.filter(e=>!e.collapsed).map(e=>(0,V.jsx)(ce,{sh:e,sakura:n,cols:s,mineOf:u},e.key))]})}function ce({sh:e,sakura:t,cols:n,mineOf:r}){let[i,a]=(0,B.useState)({sid:null,pad:null,x:0}),o=(0,B.useCallback)((e,t,n)=>a(r=>({sid:e,pad:t,x:n??(r.sid===e?r.x:0)})),[]),s=(0,B.useRef)(null),[c,l]=(0,B.useState)(0);(0,B.useLayoutEffect)(()=>{let e=s.current,t=()=>l(e.clientWidth);if(t(),typeof ResizeObserver>`u`)return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t);let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);let u=q(c,e.trees.length),d=C(e.trees,n),f=[];for(let t=0;t<e.trees.length;t+=u)f.push(t);let p=e.trees.findIndex(e=>I(e.s)===i.sid),m=p<0?null:e.trees[p].s,h=m?E(m,{sakura:t}):null,g=h&&i.pad!=null?h.pads[i.pad]:null,_=e.trees.length;return(0,V.jsxs)(`section`,{className:`gd-shelf`,"aria-label":`${e.name} shelf`,ref:s,children:[f.map(n=>{let a=e.trees.slice(n,n+u),s=n+a.length,c=d.filter(e=>e.a>=n&&e.a<s&&e.b>=n&&e.b<s).map(e=>({...e,a:e.a-n,b:e.b-n}));return(0,V.jsxs)(`div`,{className:`gd-row`,children:[(0,V.jsx)(`div`,{className:`gd-plank`,children:n===0&&(0,V.jsxs)(`h3`,{className:`gd-plate`,children:[e.name,` · `,_,` session`,_===1?``:`s`]})}),a.map(({s:e,worktree:n})=>(0,V.jsx)(Z,{s:e,worktree:n,sakura:t,mine:r(I(e)),pad:I(e)===i.sid?i.pad:null,onHover:o},I(e))),(0,V.jsx)(oe,{pairs:c,count:a.length}),m&&p>=n&&p<s&&(0,V.jsx)(`div`,{className:`gd-info`,"aria-hidden":`true`,style:{left:Math.max(0,i.x)},children:g?(0,V.jsx)(L,{pad:g}):(0,V.jsx)(ae,{s:m,t:h,mine:r(I(m))})})]},n)}),(0,V.jsx)(`span`,{className:`sr-only`,role:`status`,children:w(g)})]})}var $=e=>e.catch(()=>null);function le({s:e}){let t=(0,B.useId)(),n=e.todos,r=o(e);return(0,V.jsxs)(`a`,{className:`card pad-md act-card`,href:e.href||R(e.session_id),"aria-labelledby":`${t}-t ${t}-st`,"aria-describedby":r?`${t}-c`:void 0,children:[(0,V.jsxs)(x,{s:e,id:t,heading:e.title||c(e.cwd)||e.session_id,children:[e.chip&&(0,V.jsx)(`span`,{className:`badge mono`,title:`The install this session runs in`,children:e.chip}),(0,V.jsx)(y,{name:`chevron`,className:`glyph act-chev`})]}),n&&n.total>0&&(0,V.jsx)(`div`,{className:`act-foot`,children:(0,V.jsxs)(`span`,{className:`row gap-8 dim act-sm`,children:[(0,V.jsx)(l,{done:n.done,total:n.total}),`plan `,n.done,`/`,n.total]})}),(0,V.jsxs)(`div`,{className:`dim mono act-updated`,children:[`updated `,_(e.updated_at),` ago`]})]})}var ue={blocked:`is blocked`,"waiting-input":`waits for your answer`};function de(e,t){if(!Array.isArray(t))return``;let n=t.filter(b),r=e.current;return e.current=new Set(n.map(e=>`${I(e)}:${e.status}`)),r?n.filter(e=>!r.has(`${I(e)}:${e.status}`)).map(e=>`${e.title||c(e.cwd)||e.session_id} ${ue[e.status]}`).join(`. `):``}var fe=[[`all`,`All`],[`needs`,`Needs you`],[`runs`,`Runs`],[`gates`,`Gate asks`]];function pe(){let e=new URLSearchParams(window.location.hash.split(`?`)[1]||``),t=e.get(`f`);return{f:fe.some(([e])=>e===t)?t:`all`,host:e.get(`host`)||``,project:e.get(`project`)||``,v:e.get(`v`)===`list`?`list`:`garden`}}function me(e){let t=new URLSearchParams;e.f!==`all`&&t.set(`f`,e.f),e.v===`list`&&t.set(`v`,`list`),e.host&&t.set(`host`,e.host),e.project&&t.set(`project`,e.project);let n=t.toString();window.history.replaceState(null,``,`#/activity${n?`?${n}`:``}`)}function he({enabled:e,installs:t,onToggle:n}){let r=j(t);return(0,V.jsxs)(`section`,{className:`card pad-md act-track`,"aria-labelledby":`act-track-h`,children:[(0,V.jsx)(y,{name:`activity`,className:`glyph act-fixed`}),(0,V.jsxs)(`div`,{className:`act-grow`,children:[(0,V.jsx)(`h2`,{id:`act-track-h`,className:`act-track-title`,children:e?`Live sessions are on`:`Live sessions are off`}),!e&&(0,V.jsx)(`p`,{className:`dim act-sm act-track-p`,children:`Runs and gate asks below come from the job log and the gate ledger. Turn tracking on to see what each session is doing now.`})]}),(0,V.jsxs)(`ul`,{className:`stack gap-8 act-fixed act-sm`,"aria-label":`Tracking per install`,children:[t.length===0&&(0,V.jsx)(`li`,{className:`dim`,children:`No active install to track.`}),t.map((e,t)=>(0,V.jsxs)(`li`,{className:`row gap-10`,children:[(0,V.jsxs)(`span`,{id:`act-track-l${t}`,title:e.path,children:[`Track live sessions in `,(0,V.jsx)(`span`,{className:`mono`,children:r.get(e.install)})]}),(0,V.jsx)(`div`,{className:`sw-toggle${e.enabled?` on`:``}`,role:`switch`,"aria-checked":e.enabled,"aria-labelledby":`act-track-l${t}`,tabIndex:0,onClick:()=>n(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.key===` `&&t.preventDefault(),n(e))}})]},e.install))]})]})}function ge({jobs:e,loading:t}){let n=typeof e?.cap==`number`?e.cap:void 0,r=d(e?.jobs,{days:14,cap:n}),i=p(r.map(e=>e.nodata?`-`:e.n).join(`,`),`scaleY`),a=Math.max(1,...r.map(e=>e.n)),o=r.reduce((e,t)=>e+t.n,0),s=r.find(e=>!e.nodata),c=r.some(e=>e.nodata),l=`Runs per day: ${r.filter(e=>e.n).map(e=>`${e.n} on ${f(e.key)}`).join(`, `)||`none`}.`+(c?s?` Days before ${f(s.key)} are older than the runs the log keeps.`:` No run is in the log yet.`:``);return(0,V.jsxs)(`section`,{className:`card pad-md act-stat`,"aria-labelledby":`act-runs-h`,children:[(0,V.jsxs)(`div`,{className:`act-stat-head`,children:[(0,V.jsx)(`h2`,{id:`act-runs-h`,className:`act-lbl`,children:`Runs per day · 14 days`}),e&&(0,V.jsx)(`span`,{className:`act-big`,children:o})]}),t?(0,V.jsx)(v,{label:`Reading the job log…`}):e?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`act-runs`,role:`img`,"aria-label":l,ref:i,children:r.map(e=>e.nodata?(0,V.jsx)(`i`,{className:`nodata`},e.key):e.n?(0,V.jsx)(`i`,{"data-sweep":!0,style:{height:`${e.n/a*100}%`},title:`${f(e.key)}: ${e.n}`},e.key):(0,V.jsx)(`i`,{className:`zero`},e.key))}),(0,V.jsxs)(`div`,{className:`mono act-axis`,"aria-hidden":`true`,children:[(0,V.jsx)(`span`,{children:f(r[0].key)}),(0,V.jsx)(`span`,{children:f(r[7].key)}),(0,V.jsx)(`span`,{children:`today`})]}),c&&(0,V.jsxs)(`span`,{className:`dim act-xs`,children:[`Hatched: older than the runs the log keeps`,n?` (last ${n})`:``,`.`]})]}):(0,V.jsx)(`p`,{className:`dim act-sm`,children:`The job log could not be read.`})]})}function _e({rows:e,gates:t,loading:n}){let r=e.reduce((e,t)=>e+t.n,0);return(0,V.jsxs)(`section`,{className:`card pad-md act-stat`,"aria-labelledby":`act-gates-h`,children:[(0,V.jsxs)(`div`,{className:`act-stat-head`,children:[(0,V.jsx)(`h2`,{id:`act-gates-h`,className:`act-lbl`,children:`Gate asks by rule · 30 days`}),t&&(0,V.jsx)(`span`,{className:`act-big`,children:r})]}),n?(0,V.jsx)(v,{label:`Reading the gate ledger…`}):e.length?(0,V.jsx)(`ul`,{className:`gate-rows`,children:e.slice(0,6).map((e,t)=>(0,V.jsxs)(`li`,{children:[(0,V.jsxs)(`span`,{className:`act-ell`,children:[e.name,` `,(0,V.jsx)(`span`,{className:`mono dim act-xs`,children:e.rule})]}),(0,V.jsx)(h,{vals:e.per_day,i:t,sweep:!0}),(0,V.jsx)(`span`,{className:`mono`,children:e.n})]},e.rule))}):(0,V.jsx)(`p`,{className:`dim act-sm`,children:t?`No gate asked in 30 days.`:`The gate ledger could not be read.`})]})}var ve={done:[`ok`,`done`],failed:[`bad`,`failed`],running:[``,`running`]};function ye({job:e,longest:t}){let n=u(e),r=e.duration?Math.round(e.duration*10)/10:0,[i,a]=ve[e.status]||[``,e.status||`…`],o=e.status===`running`?`Still running`:r?`Took ${r} second${r===1?``:`s`}`:`No duration`,s=e.started?new Date(e.started*1e3).toLocaleTimeString(`en-GB`,{hour:`2-digit`,minute:`2-digit`}):`—`;return(0,V.jsxs)(`li`,{className:`act-row`,children:[(0,V.jsx)(`span`,{className:`mono dim act-xs`,children:s}),(0,V.jsx)(y,{name:`play`,className:`glyph act-glyph`}),(0,V.jsxs)(`span`,{className:`act-what`,children:[(0,V.jsx)(`span`,{className:`act-row-title`,children:n.verb}),n.scope&&(0,V.jsx)(`span`,{className:`dim act-xs act-ell`,title:n.command,children:n.scope})]}),(0,V.jsx)(`span`,{className:`act-dur`,role:`img`,"aria-label":o,children:(0,V.jsx)(`span`,{"data-sweep":!0,style:{width:t>0?`${(e.duration||0)/t*100}%`:`0%`}})}),(0,V.jsx)(`span`,{className:`badge ${i}`,children:a})]})}function be({gate:e}){return(0,V.jsxs)(`li`,{className:`act-row gate`,children:[(0,V.jsx)(`span`,{className:`mono dim act-xs`,children:`—`}),(0,V.jsx)(y,{name:`rule`,className:`glyph act-glyph t-warn`}),(0,V.jsxs)(`span`,{className:`act-what`,children:[(0,V.jsx)(`span`,{className:`act-row-title`,children:e.title}),(0,V.jsx)(`span`,{className:`dim act-xs`,children:`Gate ledger`})]}),(0,V.jsx)(`span`,{className:`act-dur-none`,"aria-hidden":`true`}),(0,V.jsx)(`span`,{className:`badge warn`,children:`asked`})]})}var xe=5,Se=(e,t)=>[...new Set([...e.filter(Boolean),t].filter(Boolean))];function Ce(){let[e,t]=(0,B.useState)(null),[n,o]=(0,B.useState)(``),[s,l]=(0,B.useState)(pe),[u,d]=(0,B.useState)(!1),[f,h]=(0,B.useState)(``),_=(0,B.useRef)(null),y=e=>{let t={...s,...e};l(t),me(t)};re(e=>r.activity().then(n=>{if(e()){t(ie(n)),o(``);let e=de(_,n?.activity);e&&h(t=>t===e?e+`\xA0`:e)}},t=>{e()&&o(t.message)}),2e3,[]);let x=m(()=>$(r.jobs()),[]),C=m(()=>$(r.gates()),[]),w=m(()=>$(r.catalog(`laws`)),[]),T=!e||e.enabled!==!1,E=Array.isArray(e?.installs)?e.installs:[],D=O(e?.activity,E).sort((e,t)=>e.session_id<t.session_id?-1:+(e.session_id>t.session_id)),k=i(),A=T&&e?D.filter(b).length:null,j=new Set(D.map(I)),M=s.v===`list`?O(e?.ended,E).filter(e=>!j.has(I(e))):[],N=Se([...D,...M].map(e=>e.host),s.host),P=Se([...D,...M].map(e=>c(e.cwd)),s.project),F=s.host&&s.project?`host or project`:s.host?`host`:s.project?`project`:``,L=e=>(!s.host||e.host===s.host)&&(!s.project||c(e.cwd)===s.project),R=D.filter(e=>L(e)&&(s.f!==`needs`||b(e))),z=s.f===`all`||s.f===`needs`,H=s.f===`all`&&T?M.filter(L):[],U=u?H:H.slice(0,xe),W=!F&&(s.f===`all`||s.f===`runs`),G=!F&&(s.f===`all`||s.f===`gates`),K=x.data?.jobs||[],q=ne(C.data,w.data),J=ee(K,q,C.data?.days).map(e=>({...e,runs:W?e.runs:[],gate:G?e.gate:null})).filter(e=>e.runs.length||e.gate),Y=Math.max(0,...K.map(e=>e.duration||0)),X=p(J.flatMap(e=>e.runs.map(e=>`${e.id}:${e.duration}`)).join(`,`),`scaleX`),ae=async e=>{let n=!e.enabled;try{let i=await r.activityToggle(n,{host:e.host,path:e.path});if(i.ok===!1){o(i.error||`Could not change tracking`);return}let a=t=>i.enabled?t||[]:(t||[]).flatMap(t=>{let n=(t.installs||[t.install]).filter(t=>t!==e.install);return n.length?[{...t,install:n[0],installs:n}]:[]});t(t=>{let n=(t?.installs||[]).map(t=>t.install===e.install?{...t,enabled:i.enabled}:t);return{...t||{},installs:n,enabled:n.length===0||n.some(e=>e.enabled),activity:a(t?.activity),ended:a(t?.ended)}}),o(``)}catch(e){o(e.message)}},Z=(e,t,n)=>(0,V.jsxs)(`span`,{className:`row gap-8 act-sm`,children:[(0,V.jsx)(`label`,{htmlFor:`act-f-${e}`,children:t}),(0,V.jsxs)(`select`,{id:`act-f-${e}`,className:`sel`,value:s[e],disabled:n.length===0,title:n.length===0?`No source carries a ${e} yet`:void 0,onChange:t=>y({[e]:t.target.value}),children:[(0,V.jsxs)(`option`,{value:``,children:[`All `,e===`host`?`hosts`:`projects`]}),n.map(e=>(0,V.jsx)(`option`,{value:e,children:e},e))]})]});return(0,V.jsxs)(`div`,{className:`page-fill`,children:[(0,V.jsx)(g,{title:`Activity`,sub:`What your agents ran, what the gates asked, and which sessions are waiting on you.`}),(0,V.jsx)(`div`,{className:`sr-only`,"aria-live":`polite`,children:f}),n&&(0,V.jsx)(`div`,{className:`act-gap`,children:(0,V.jsx)(a,{error:n})}),e&&(0,V.jsx)(he,{enabled:T,installs:E,onToggle:ae}),(0,V.jsxs)(`div`,{className:`act-today`,children:[(0,V.jsx)(ge,{jobs:x.data,loading:x.loading}),(0,V.jsx)(_e,{rows:q,gates:C.data,loading:C.loading}),(0,V.jsxs)(`section`,{className:`card pad-md act-stat`,"aria-labelledby":`act-wait-h`,children:[(0,V.jsx)(`h2`,{id:`act-wait-h`,className:`act-lbl`,children:`Waiting on you`}),!e&&!n?(0,V.jsx)(v,{}):e?(0,V.jsxs)(V.Fragment,{children:[T?(0,V.jsxs)(`span`,{className:`act-big act-wait`,children:[A,` `,(0,V.jsx)(`span`,{className:`dim act-sm`,children:A===1?`session`:`sessions`})]}):null,(0,V.jsx)(`p`,{className:`dim act-sm`,children:T?`A session that waits on an approval or on your answer counts here.`:`Turn tracking on to count the sessions that wait on you.`})]}):(0,V.jsx)(`p`,{className:`dim act-sm`,children:`The sessions could not be read.`})]})]}),(0,V.jsxs)(`div`,{className:`row wrap gap-8 act-filters`,children:[(0,V.jsx)(`div`,{role:`group`,"aria-label":`Filter`,className:`row wrap gap-8`,children:fe.map(([e,t])=>(0,V.jsxs)(`button`,{type:`button`,className:s.f===e?`chip-f on`:`chip-f`,"aria-pressed":s.f===e,onClick:()=>y({f:e}),children:[t,e===`needs`&&A>0?(0,V.jsxs)(`span`,{className:`mono`,children:[` `,A]}):null]},e))}),Z(`host`,`Host`,N),Z(`project`,`Project`,P),(0,V.jsx)(te,{"aria-label":`Live sessions view`,children:[[`list`,`List`],[`garden`,`Garden`]].map(([e,t])=>(0,V.jsx)(`button`,{type:`button`,className:s.v===e?`on`:``,"aria-pressed":s.v===e,onClick:()=>y({v:e}),children:t},e))})]}),F&&s.f!==`needs`&&(0,V.jsxs)(`p`,{className:`dim act-sm`,children:[`Runs and gate asks carry no `,F,`; showing sessions only.`]}),z&&(e?!T&&s.f!==`needs`?null:R.length===0?s.f===`needs`?(0,V.jsx)(S,{title:`Nothing waits on you`}):(0,V.jsx)(S,{title:`No active sessions`,children:`Start an agent session and it appears here.`}):s.v===`garden`?(0,V.jsx)(se,{sessions:R,collisions:e.collisions}):(0,V.jsx)(`div`,{className:`stack gap-12 act-live`,ref:k,children:R.map(e=>(0,V.jsx)(`div`,{"data-flip":I(e),children:(0,V.jsx)(le,{s:e})},I(e)))}):(0,V.jsx)(v,{label:`Reading live sessions…`})),H.length>0&&(0,V.jsxs)(`section`,{className:`stack gap-12 act-live act-ended`,"aria-labelledby":`act-ended-h`,children:[(0,V.jsx)(`h2`,{id:`act-ended-h`,className:`act-lbl`,children:`Recently ended`}),U.map(e=>(0,V.jsx)(`div`,{children:(0,V.jsx)(le,{s:e})},I(e))),H.length>xe&&(0,V.jsx)(`button`,{type:`button`,className:`btn ghost sm`,"aria-expanded":u,onClick:()=>d(e=>!e),children:u?`Show fewer`:`Show all ${H.length}`})]}),s.f!==`needs`&&(0,V.jsx)(`section`,{"aria-label":`Feed`,className:`stack gap-16 act-feed`,ref:X,children:J.map(e=>(0,V.jsxs)(`section`,{className:`card act-day`,children:[(0,V.jsxs)(`h3`,{className:`act-day-h`,children:[(0,V.jsx)(`span`,{children:e.title}),(0,V.jsx)(`span`,{className:`mono dim`,children:e.sum})]}),(0,V.jsxs)(`ul`,{className:`act-rows`,children:[e.runs.map(e=>(0,V.jsx)(ye,{job:e,longest:Y},e.id)),e.gate&&(0,V.jsx)(be,{gate:e.gate})]})]},e.key))})]})}export{Ce as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./react-C1iE8mnY.js";import{t as r}from"./api-DLDVY3K-.js";import{$ as i,D as a,O as o,V as s,bt as c,et as l,gt as u,j as d,w as f}from"./index-How7SzDZ.js";import{t as p}from"./EmptyState-CY5Pm2xy.js";import{a as m,d as h,f as g,i as _,l as v,o as y,r as b,t as x,v as S}from"./Bonsai-Bfpb6W-1.js";import{n as C,t as w}from"./usePoll-D5c_qIFZ.js";var T=e(t(),1),E=n();function D(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 O({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(`${o(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,E.jsxs)(`div`,{className:`row gap-10 act-line`,children:[(0,E.jsx)(`span`,{className:`badge act-who ${t?``:`acc`}`,children:t?`you`:`agent`}),(0,E.jsxs)(`div`,{className:`act-grow act-sm`,children:[!t&&(0,E.jsx)(`span`,{className:`feed-dot act-inline-dot ${D(e)||`acc`}`}),e.kind===`thinking`&&(0,E.jsx)(`span`,{className:`dim`,children:`thinking: `}),r?(0,E.jsx)(`span`,{className:`dim`,children:i}):t?i:(0,E.jsx)(`b`,{children:i}),e.error&&(0,E.jsxs)(`span`,{className:`dim`,children:[`: `,e.error]})]}),n.length>0&&(0,E.jsx)(`span`,{className:`dim mono act-xs act-fixed`,children:n.join(` · `)}),e.t?(0,E.jsx)(`time`,{className:`mono dim act-xs act-fixed`,dateTime:new Date(e.t).toISOString(),title:`${c(e.t/1e3)} ago`,children:new Date(e.t).toTimeString().slice(0,8)}):null]})}function k({turns:e}){return!e||e.length===0?(0,E.jsx)(`div`,{className:`dim act-sm`,children:`No conversation captured yet.`}):(0,E.jsx)(`div`,{className:`stack gap-12`,children:e.map((e,t)=>{let n=e.role===`user`;return(0,E.jsxs)(`div`,{className:`row gap-10 act-line`,children:[(0,E.jsx)(`span`,{className:`badge act-who ${n?``:`acc`}`,children:n?`you`:`agent`}),(0,E.jsx)(`div`,{className:`act-min act-sm${n?``:` muted`}`,children:e.text})]},t)})})}var A=5;function j({s:e}){let[t]=(0,T.useState)(y),[n,r]=(0,T.useState)(null),i=!!e.ended,a=i?{...e,status:d(e)?`busy`:e.status,error:null}:e,o=S(a,t),s=(0,T.useMemo)(()=>g(a,{sakura:t}),[o]),c=(0,T.useCallback)(e=>r(e),[]),l=v(e),u=Number(e.turns)||0,f=Number(e.compactions)||0,p=[`${u} turn${u===1?``:`s`}`,`context ${l==null?`unknown`:`${Math.round(l*100)} %`}`,`${f} compaction${f===1?``:`s`}`,`sub-agents: ${s.pads.filter(e=>e.key!=null).length} ${i?`unfinished`:`running`}, ${s.fallen.length} finished`].join(` · `),h=n==null?null:s.pads[n];return(0,E.jsxs)(`div`,{className:`card pad-md act-mt gd-detail${!i&&d(e)?` gd-needs`:``}`,children:[(0,E.jsx)(`div`,{role:`group`,tabIndex:0,"aria-label":`Bonsai pads, arrow keys walk them`,onKeyDown:e=>_(e,s.pads.length,n,c),children:(0,E.jsx)(b,{t:s,pad:n,swaying:!i&&e.status!==`idle`,onPad:c,px:A,label:`Bonsai of this session${i?`, ended`:``}: ${p}`})}),(0,E.jsxs)(`div`,{className:`stack gap-8 act-min`,children:[i&&(0,E.jsx)(`span`,{className:`dim act-xs`,children:`ended`}),(0,E.jsx)(`div`,{className:`dim act-sm`,children:p}),(0,E.jsx)(`span`,{className:`sr-only`,role:`status`,children:m(h)}),h?(0,E.jsx)(x,{pad:h}):(0,E.jsx)(`div`,{className:`dim act-xs`,children:`Hover or tap a pad, or use the arrow keys, for its files.`})]})]})}function M({sid:e}){let{sid:t,install:n}=h(e,window.location.hash),[o,d]=(0,T.useState)(null),[m,g]=(0,T.useState)(``),[_,v]=(0,T.useState)(!1),[y,b]=(0,T.useState)(!1),x=(0,T.useId)();C(e=>_?void 0:r.activityDetail(t,n).then(t=>{e()&&(d(w(t)),g(``),v(!1))},t=>{e()&&(t.status===404?v(!0):g(t.message))}),2e3,[t,_]);let S=(0,E.jsxs)(`a`,{className:`btn ghost sm act-back`,href:`#/activity`,children:[(0,E.jsx)(u,{name:`arrow`}),` Activity`]});if(_)return(0,E.jsxs)(`div`,{className:`page-fill`,children:[S,(0,E.jsx)(p,{title:`Session ended`,action:(0,E.jsx)(`a`,{href:`#/activity`,children:`Back to Activity`}),children:`It's no longer live.`})]});if(!o)return(0,E.jsxs)(`div`,{className:`page-fill`,children:[S,m?(0,E.jsx)(i,{error:m}):(0,E.jsx)(l,{label:`Loading session…`})]});let D=o.session,A=D.files,M=D.todos,N=!!(A&&A.items&&A.items.length>0),P=!!(M&&M.items&&M.items.length>0),F=o.conversation||[],I=o.timeline||[],L=[...F.filter(e=>e.role===`user`).map(e=>({who:`you`,text:e.text,t:e.t||0})),...I.map(e=>({...e,who:`agent`}))].sort((e,t)=>(e.t||0)-(t.t||0));return(0,E.jsxs)(`div`,{className:`page-fill`,children:[S,(0,E.jsx)(s,{title:D.title||a(D.cwd)||D.session_id,sub:D.cwd?(0,E.jsx)(`span`,{className:`mono act-cwd`,title:D.cwd,children:D.cwd}):null}),m&&(0,E.jsx)(`div`,{className:`act-gap`,children:(0,E.jsx)(i,{error:m})}),(0,E.jsxs)(`div`,{className:`card pad-md`,children:[(0,E.jsx)(f,{s:D}),(0,E.jsxs)(`div`,{className:`dim act-updated`,children:[`updated `,c(D.updated_at),` ago`]})]}),(0,E.jsx)(j,{s:D}),(N||P)&&(0,E.jsxs)(`div`,{className:`grid gap-12 act-panels${N&&P?` two`:``}`,children:[N&&(0,E.jsxs)(`div`,{className:`card pad-md`,children:[(0,E.jsx)(`div`,{className:`card-head`,children:(0,E.jsxs)(`h2`,{children:[`Files touched `,(0,E.jsxs)(`span`,{className:`dim`,children:[`(`,A.count,`)`]})]})}),(0,E.jsx)(`div`,{className:`stack act-list`,children:A.items.map(e=>(0,E.jsxs)(`div`,{className:`row between gap-12 act-sm`,children:[(0,E.jsx)(`span`,{className:`mono act-ell act-grow`,title:e.file,children:e.file}),(0,E.jsxs)(`span`,{className:`act-fixed`,children:[(0,E.jsxs)(`span`,{className:`t-good`,children:[`+`,e.additions]}),` `,(0,E.jsxs)(`span`,{className:`t-bad`,children:[`−`,e.deletions]})]})]},e.file))})]}),P&&(0,E.jsxs)(`div`,{className:`card pad-md`,children:[(0,E.jsx)(`div`,{className:`card-head`,children:(0,E.jsxs)(`h2`,{children:[`Plan`,` `,(0,E.jsxs)(`span`,{className:`dim`,children:[`(`,M.done,`/`,M.total,`)`]})]})}),(0,E.jsx)(`div`,{className:`stack act-list`,children:M.items.map((e,t)=>(0,E.jsxs)(`div`,{className:`row gap-8 act-sm`,children:[(0,E.jsx)(`span`,{className:`feed-dot ${e.status===`completed`?`ok`:e.status===`in_progress`?`acc`:``}`}),(0,E.jsx)(`span`,{className:e.status===`completed`?`act-done`:void 0,children:e.content})]},t))})]})]}),(0,E.jsxs)(`div`,{className:`card pad-md act-mt`,children:[(0,E.jsxs)(`div`,{className:`card-head act-tl-head`,children:[(0,E.jsx)(`h2`,{children:`Timeline`}),I.length>0&&(0,E.jsx)(`button`,{className:`btn ghost sm`,"aria-expanded":y,"aria-controls":x,onClick:()=>b(e=>!e),children:y?`Show conversation`:`Show full stream (${L.length})`})]}),(0,E.jsx)(`div`,{id:x,children:y?(0,E.jsx)(`div`,{className:`stack gap-12`,children:L.map((e,t)=>(0,E.jsx)(O,{rec:e},t))}):(0,E.jsx)(k,{turns:F})})]})]})}export{j as SessionTree,M as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./react-C1iE8mnY.js";import{ht as r}from"./index-BQwOmbor.js";var i=e(t(),1),a=e=>{let t=2166136261;for(let n of String(e))t=Math.imul(t^n.charCodeAt(0),16777619);return t>>>0},o=e=>()=>{e|=0,e=e+1831565813|0;let t=Math.imul(e^e>>>15,1|e);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296},s=e=>Math.max(0,Math.min(1,e)),c={claude:[`#8E4A33`,`#C46A4C`,`#E3906F`],bob:[`#173F8C`,`#2A5CC0`,`#6A96E8`],opencode:[`#5E6670`,`#98A2AD`,`#C8D0D8`],openclaude:[`#2F1F55`,`#4E3484`,`#8A6CC8`]},l={live:[`#16393D`,`#1F5A55`,`#2C7D55`,`#5DA845`,`#A8D23E`],sakura:[`#16393D`,`#6E2A55`,`#B83C80`,`#E9649F`,`#FFB0D2`],done:[`#5A2E14`,`#8A4A1C`,`#B8702A`,`#DB9A3E`,`#F2C46A`],idle:[`#2E3236`,`#44494E`,`#5E646A`,`#7C8288`,`#A2A7AC`]},u={developer:[`#123A3F`,`#1A5A5E`,`#24806F`,`#3FB08A`,`#8EE6C2`],explorer:[`#2C3A12`,`#4A6418`,`#6E9424`,`#9CC23A`,`#DDF07A`],reviewer:[`#16283F`,`#1F3E66`,`#2E5E92`,`#4A86C4`,`#9AC8F0`],tester:[`#3A3012`,`#5E4C18`,`#8A6E22`,`#B8952E`,`#EAD27A`]},d=[`#4E2E1C`,`#7A4A2E`,`#A2683F`,`#C78A5A`],f=[`#34312F`,`#4F4A46`,`#6B6560`,`#8A847E`],p=[`#3E8E41`,`#5FB14F`],m=[`#4A4F54`,`#62686E`],h=`#FFF6E0`,g=[`#E3C24A`,`#C9A23A`],_=[`#9BDD6A`,`#D8F59A`],v={"!":`#E8B04A`,x:`#FF6F69`},y=12;function b(e){let t=String(e||``).toLowerCase();return/implement|develop/.test(t)?`developer`:/explor/.test(t)?`explorer`:/review/.test(t)?`reviewer`:/test/.test(t)?`tester`:null}var x=e=>e?.status===`blocked`||e?.status===`waiting-input`;function S(e){return Array.isArray(e.files_all)?e.files_all.filter(e=>e&&typeof e==`object`):(Array.isArray(e.files?.items)?e.files.items:[]).filter(e=>e&&typeof e==`object`).map(e=>({file:e.file??null,path:e.path??null,additions:e.additions??0,deletions:e.deletions??0,by:e.by??null}))}var C=e=>e==null||e===``?NaN:Number(e);function w(e){let t=C(e?.context?.used),n=C(e?.context?.window);return Number.isFinite(t)&&Number.isFinite(n)&&n>0?s(t/n):null}function T(e){let t=S(e),n=(Array.isArray(e.agents)?e.agents:[]).filter(e=>e&&typeof e==`object`).map((e,t)=>({key:e.id??`#${t}`,id:e.id??null,type:e.type||null,running:e.status!==`done`,files:[]})),r=new Map(n.map(e=>[e.key,e])),i=[],a=e.attribution!==!1;for(let e of t){if(!a||e.by==null){i.push(e);continue}let t=r.get(e.by);t||(t={key:e.by,id:e.by,type:`agent`,running:!0,files:[]},n.push(t),r.set(e.by,t)),t.files.push(e)}let o=w(e),l=o!=null,u=l?C(e.context.used):NaN,d=l?o:.5,f=Math.max(0,Math.floor(Number(e.compactions)||0)),p=C(e.context_at_compaction),m=f===0?1:l&&Number.isFinite(p)&&p>0?s(u/p):0;return{id:String(e.session_id??``),host:c[e.host]?e.host:`claude`,idle:e.status===`idle`,bubble:x(e)?`!`:e.error?`x`:null,turns:Math.max(0,Number(e.turns)||0),ctx:d,compactions:f,compacted:f>0&&m<1,regrow:m,crown:i,agents:n}}function E(e,t=!1){let n=T(e);return JSON.stringify([n.id,n.host,n.idle,n.bubble,n.turns,Math.round(n.ctx*100),n.compactions,Math.round(n.regrow*100),n.crown.length,n.agents.map(e=>[e.key,e.type,e.running,e.files.length]),!!t])}function D(e,{sakura:t=!1}={}){let n=T(e),{id:r,idle:i}=n,s=Math.min(1,Math.log1p(n.turns)/Math.log1p(40)),x=.55+.45*s,S=o(a(r)),C=Array.from({length:56},()=>Array(56).fill(null)),w=Array.from({length:56},()=>Array(56).fill(-1)),E=-1,D=(e,t,n)=>{e=Math.round(e),t=Math.round(t),e>=0&&e<56&&t>=0&&t<56&&(C[t][e]=n,w[t][e]=E)},O=i?f:d,k=i?m:p,A=i?l.idle:t?l.sakura:l.live,j=Math.round(41-(9+18*s)),M=1+S()*2+3*s,N=S()*Math.PI*2,P=.9+S()*.6,F=e=>28+M*Math.sin(e*Math.PI*P+N)-M*Math.sin(N);for(let e=41;e>=j;e--){let t=(41-e)/(41-j),n=F(t),r=3+4.5*s-(1.5+3.5*s)*t;for(let t=Math.floor(n-r/2);t<=Math.ceil(n+r/2);t++){let i=(t-(n-r/2))/r;D(t,e,i<.25?O[3]:i>.75?O[0]:S()<.15?O[1]:O[2])}}for(let e=-6;e<=6;e++)D(28+e,41,Math.abs(e)>4?O[1]:O[2]),Math.abs(e)<=5&&D(28+e,40,Math.abs(e)>3?O[1]:O[2]);let I=[],L=(e,t,n,i,s,c)=>{n*=1.15,e=Math.max(n+2,Math.min(53-n,e));let l=o(a(`${r}:pad:${c}`)),u=n*.72;t=Math.max(t,u+6);for(let r=0;r<6;r++){let r=-Math.PI*(.15+.7*l()),i=n*(.4+.5*l());for(let n=0;n<i;n++)D(e+Math.cos(r)*n,t+u*.5+Math.sin(r)*n*.8,O[0])}let d=Math.round(10+n*1.6),f=[];for(let r=0;r<d;r++){let r=l()*Math.PI*2,i=Math.sqrt(l());f.push([e+Math.cos(r)*i*n,t+Math.sin(r)*i*u,1.8+l()*2.2])}f.sort((e,t)=>t[1]-e[1]);for(let[e,n,r]of f){let a=Math.max(0,Math.min(4,Math.round(4*(1-(n-(t-u))/(2*u))+(l()-.5))));for(let t=Math.floor(n-r);t<=n+r;t++)for(let o=Math.floor(e-r);o<=e+r;o++){if(((o-e)**2+(t-n)**2)/(r*r)>1+(l()-.5)*.5)continue;let s=o-e+(t-n)<-r*.3?1:t-n>r*.5?-1:0;D(o,t,i[Math.max(0,Math.min(4,a+s))])}}let p=o(a(`${r}:bloom:${c}`));for(let r=0;r<Math.min(s,y);r++)D(e+(p()*2-1)*n*.8,t-p()*u*.9,h);return{rx:n,cy:t}},R=o(a(`${r}:side`))()<.5?-1:1,z=[];n.agents.forEach((e,t)=>{let c=.25+.55*(t/Math.max(1,n.agents.length-1)),l=Math.round(41-c*(41-j)),d=F(c);if(!e.running){let t=(3+4.5*s-(1.5+3.5*s)*c)/2;E=-1,D(d+R*(t+1),l,O[3]),D(d+R*(t+2),l-1,O[2]),z.push({agentId:e.id,type:e.type,files:e.files}),R=-R;return}let f=Math.round((12+Math.floor(o(a(`${r}:branch:${e.key}`))()*4))*x);E=-1;for(let e=0;e<=f;e++){let t=d+R*e,n=l-e*.45;D(t,n,O[e<f/2?1:2]),D(t,n+1,O[0]),e<f*.6&&D(t,n+2,O[0])}let p=i?null:b(e.type),m=p?u[p]:A;E=I.length,I.push({agentId:e.id,key:e.key,type:e.type,family:p,files:e.files,bbox:null}),L(d+R*f,l-f*.45-2,(8+Math.min(e.files.length,6)*.6)*x,m,e.files.length,e.key),R=-R});let B=I.length;I.push({agentId:null,key:null,type:null,family:null,files:n.crown,bbox:null}),E=B;let V=(4+7*n.ctx+Math.min(n.crown.length,6)*.5)*x*1.35,{rx:H,cy:U}=L(F(1),j-3,V,A,n.crown.length,`crown`);if(n.ctx>.8&&!n.compacted){let e=o(a(`${r}:yellow`));for(let t=0;t<56;t++)for(let n=0;n<56;n++)w[t][n]===B&&C[t][n]!==h&&t<U-H*.2&&e()<.55&&(C[t][n]=e()<.5?g[0]:g[1])}if(n.compacted){let e=o(a(`${r}:shoots`)),t=Math.round(U-H*.15-n.regrow*H*.5);for(let e=0;e<Math.max(0,t);e++)for(let t=0;t<56;t++)w[e][t]===B&&(C[e][t]=null,w[e][t]=-1);if(t>=0&&t<56)for(let r=0;r<56;r++){if(w[t][r]!==B||e()>=.12+n.regrow*.5)continue;let i=1+Math.floor(e()*(1+n.regrow*3));for(let e=1;e<=i;e++)D(r,t-e,e===i?_[1]:_[0])}}E=-1;let W=o(a(`${r}:fallen`));z.forEach((e,t)=>D(16+(t*7+Math.floor(W()*4))%24,40,l.done[2+t%2]));for(let e=0;e<Math.min(n.compactions,6);e++)D(15+e*2,42,h);let[G,K,q]=c[n.host];for(let e=42;e<=46;e++){let t=e<=43?0:Math.floor((e-43)*.45)+2;for(let n=13+t;n<=42-t;n++){if(e===42&&C[e][n]===h)continue;let r=K;e<=43?r=e===42?q:G:(e===46||n===13+t||n===42-t)&&(r=G),D(n,e,r)}}let J=o(a(`${r}:moss`));for(let e=15;e<=40;e++)D(e,41,J()<.5?k[0]:k[1]),J()<.35&&D(e,40,k[0]);for(let e=16;e<=39;e++)D(e,47,`#00000055`);if(n.bubble){let e=v[n.bubble];for(let t=3;t<10;t++)for(let n=40;n<47;n++)D(n,t,t===3||t===9||n===40||n===46?e:`#14191F`);if(D(41,10,e),n.bubble===`!`){for(let t=5;t<=6;t++)D(43,t,e);D(43,8,e)}else for(let[t,n]of[[2,2],[4,2],[3,3],[2,4],[4,4]])D(40+t,3+n,e)}let Y=[],X=I.map(()=>null);for(let e=0;e<56;e++){let t=0;for(;t<56;){let n=C[e][t],r=w[e][t];if(!n){t++;continue}let i=t;for(;i+1<56&&C[e][i+1]===n&&w[e][i+1]===r;)i++;if(Y.push({x:t,y:e,w:i-t+1,c:n,p:r}),r>=0){let n=X[r]||={x0:t,y0:e,x1:i,y1:e};n.x0=Math.min(n.x0,t),n.x1=Math.max(n.x1,i),n.y1=e}t=i+1}}return I.forEach((e,t)=>{let n=X[t];e.bbox=n?{x:n.x0,y:n.y0,w:n.x1-n.x0+1,h:n.y1-n.y0+1}:null}),{width:56,height:56,runs:Y,pads:I,bubble:n.bubble,fallen:z}}var O=e=>{if(!e)return``;let t=String(e).replace(/\\/g,`/`).replace(/\/+$/,``).split(`/`);return t[t.length-1]||String(e)},k=e=>e?String(e).replace(/\\/g,`/`).replace(/\/+$/,``).toLowerCase():``;function A(e){let t=new Map;for(let n of e||[]){let e=n.repo||n.root,r=n.repo_key||(e?k(e):n.cwd?`cwd:${k(n.cwd)}`:`outside a repo`),i=O(e||n.cwd)||`outside a repo`;t.has(r)||t.set(r,{key:r,name:i,trees:[]});let a=n.root&&e&&k(n.root)!==k(e)?O(n.root):null;t.get(r).trees.push({s:n,worktree:a})}let n=(e,t)=>e<t?-1:+(e>t),r=[...t.values()];for(let e of r)e.trees.sort((e,t)=>n(e.worktree||``,t.worktree||``)||n(String(e.s.session_id),String(t.s.session_id)));return r.sort((e,t)=>n(e.name.toLowerCase(),t.name.toLowerCase())||n(e.key,t.key))}var j=e=>e.key??(e.install?`${e.install}\0${e.session_id}`:String(e.session_id)),M=e=>j({key:e.key??void 0,install:e.install,session_id:e.sid}),N=(e,t)=>String(e).split(/[\\/]+/).filter(Boolean).slice(-t).join(`/`),P=e=>r(e.host).label;function F(e){let t=e||[],n=e=>n=>t.filter(t=>e(t)===e(n)).length,r=n(e=>e.host),i=n(e=>`${e.host} ${e.scope}`),a=new Map(t.map(e=>[e.install,r(e)<2?P(e):i(e)<2||e.scope===`global`?`${P(e)} · ${e.scope}`:`${P(e)} · ${O(e.path)}`])),o=()=>t.filter(e=>t.some(t=>t!==e&&a.get(t.install)===a.get(e.install)));for(let e=2,t=o();t.length;e++,t=o()){for(let n of t){let t=String(n.path).split(/[\\/]+/).filter(Boolean).length;a.set(n.install,`${P(n)} · ${e>t?n.path:N(n.path,e)}`)}if(e>64)break}return a}var I=(e,t)=>`#/activity/${encodeURIComponent(e)}`+(t?`?${new URLSearchParams({host:t.host,path:t.path})}`:``);function L(e,t){let n=String(e).indexOf(`?`),r=new URLSearchParams(String(t||``).split(`?`)[1]||``),i=r.get(`host`),a=r.get(`path`);return{sid:n<0?e:String(e).slice(0,n),install:i&&a?{host:i,path:a}:void 0}}function R(e,t){let n=new Map((t||[]).map(e=>[e.install,e])),i=F(t);return(e||[]).map(e=>{let t=n.get(e.install);return{...e,host:t?.host??e.host,chip:i.get(e.install)??(e.host?r(e.host).label:null),href:I(e.session_id,t)}})}var z=(e,t)=>new Set((e.writers||[]).filter(e=>M(e)===t).map(e=>k(e.root)));function B(e,t,n){let r=z(e,t);for(let t of z(e,n))if(r.has(t))return`same-worktree`;return`cross-worktree`}var V=e=>[...new Set((e.writers||[]).map(M))];function H(e,t){let n=new Map(e.map((e,t)=>[j(e.s),t])),r=new Map;for(let e of t||[]){let t=V(e).filter(e=>n.has(e));for(let i=0;i<t.length;i++)for(let a=i+1;a<t.length;a++){let o=n.get(t[i]),s=n.get(t[a]),c=o<s?`${o}-${s}`:`${s}-${o}`,l=B(e,t[i],t[a]);r.has(c)&&l!==`same-worktree`||r.set(c,{a:o,b:s,kind:l})}}return[...r.values()]}function U(e,t){let n=[];for(let r of t||[]){let t=V(r).filter(t=>t!==e);if(!t.length||!V(r).includes(e))continue;let i=t.some(t=>B(r,e,t)===`same-worktree`);n.push({path:r.path,kind:i?`same-worktree`:`cross-worktree`})}return n}var W=e=>e?.status===`busy`||x(e);function G(e,t=10){let n=e.map(e=>({...e,collapsed:!1})),r=n.reduce((e,t)=>e+t.trees.length,0);if(r<=t)return n;let i=n.length,a=n.filter(e=>!e.trees.some(e=>W(e.s))).sort((e,t)=>t.trees.length-e.trees.length||(e.key<t.key?-1:1));for(let e of a){if(r<=t||i<=1)break;e.collapsed=!0,r-=e.trees.length,i--}return n}var K=n(),q=12,J=10,Y=`geneseed-garden-sakura`;function X(){try{return window.localStorage.getItem(Y)===`1`}catch{return!1}}var Z=e=>e.key==null?`the session`:e.type||`agent`,Q=e=>e.path||e.file||`?`;function $({pad:e}){let t=e.files.slice(0,q);return(0,K.jsxs)(`div`,{className:`card gd-card`,children:[(0,K.jsxs)(`div`,{className:`act-lbl`,children:[Z(e),` · `,e.files.length,` file`,e.files.length===1?``:`s`]}),(0,K.jsx)(`ul`,{className:`gd-files`,children:t.map((e,t)=>(0,K.jsxs)(`li`,{children:[(0,K.jsx)(`span`,{className:`mono act-ell`,children:Q(e)}),(0,K.jsxs)(`span`,{className:`mono act-xs`,children:[(0,K.jsxs)(`span`,{className:`t-good`,children:[`+`,e.additions??0]}),` `,(0,K.jsxs)(`span`,{className:`t-bad`,children:[`−`,e.deletions??0]})]})]},`${Q(e)}:${t}`))}),e.files.length>t.length&&(0,K.jsxs)(`div`,{className:`dim act-xs`,children:[`+`,e.files.length-t.length,` more`]})]})}var ee=e=>e?`${Z(e)}: ${e.files.length} file${e.files.length===1?``:`s`}`:``;function te(e,t,n,r){let i={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}[e.key];e.key===`Escape`&&n!=null&&r(null),i&&t&&(e.preventDefault(),r(n==null?i>0?0:t-1:(n+i+t)%t))}var ne=(0,i.memo)(function({t:e,pad:t,swaying:n,onPad:r,px:a,label:o}){let s=(0,i.useMemo)(()=>{let t=new Map;for(let n of e.runs)t.has(n.p)||t.set(n.p,[]),t.get(n.p).push(n);return[...t.entries()]},[e]),c=(0,i.useRef)(null),l=e=>{let[t,n]=[c.current,e.changedTouches?.[0]];return!!t&&!!n&&Math.hypot(n.clientX-t.x,n.clientY-t.y)>J};return(0,K.jsx)(`svg`,{onTouchStart:e=>{let t=e.touches?.[0];c.current=t?{x:t.clientX,y:t.clientY}:null},className:`gd-svg${t==null?``:` gd-dimming`}`,viewBox:`0 0 56 56`,width:56*a,height:56*a,shapeRendering:`crispEdges`,"data-bubble":e.bubble||void 0,...o?{role:`img`,"aria-label":o}:{"aria-hidden":`true`},children:s.map(([i,a])=>(0,K.jsx)(`g`,{"data-p":i,className:[i===t&&`gd-hot`,n&&i>=0&&e.pads[i].key!=null&&`gd-sway`].filter(Boolean).join(` `)||void 0,onMouseEnter:i>=0?()=>r(i):void 0,onMouseLeave:i>=0?()=>r(null):void 0,onTouchEnd:i>=0?e=>{l(e)||(e.cancelable&&e.preventDefault(),r(i===t?null:i))}:void 0,children:a.map(e=>(0,K.jsx)(`rect`,{x:e.x,y:e.y,width:e.w,height:1,fill:e.c},`${e.x},${e.y}`))},i))})});export{H as _,ee as a,G as c,L as d,D as f,U as g,R as h,te as i,w as l,F as m,Y as n,X as o,A as p,ne as r,j as s,$ as t,I as u,E as v};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./react-C1iE8mnY.js";import{dt as r}from"./index-How7SzDZ.js";var i=e(t(),1),a=e=>{let t=2166136261;for(let n of String(e))t=Math.imul(t^n.charCodeAt(0),16777619);return t>>>0},o=e=>()=>{e|=0,e=e+1831565813|0;let t=Math.imul(e^e>>>15,1|e);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296},s=e=>Math.max(0,Math.min(1,e)),c={claude:[`#8E4A33`,`#C46A4C`,`#E3906F`],bob:[`#173F8C`,`#2A5CC0`,`#6A96E8`],opencode:[`#5E6670`,`#98A2AD`,`#C8D0D8`],openclaude:[`#2F1F55`,`#4E3484`,`#8A6CC8`]},l={live:[`#16393D`,`#1F5A55`,`#2C7D55`,`#5DA845`,`#A8D23E`],sakura:[`#16393D`,`#6E2A55`,`#B83C80`,`#E9649F`,`#FFB0D2`],done:[`#5A2E14`,`#8A4A1C`,`#B8702A`,`#DB9A3E`,`#F2C46A`],idle:[`#2E3236`,`#44494E`,`#5E646A`,`#7C8288`,`#A2A7AC`]},u={developer:[`#123A3F`,`#1A5A5E`,`#24806F`,`#3FB08A`,`#8EE6C2`],explorer:[`#2C3A12`,`#4A6418`,`#6E9424`,`#9CC23A`,`#DDF07A`],reviewer:[`#16283F`,`#1F3E66`,`#2E5E92`,`#4A86C4`,`#9AC8F0`],tester:[`#3A3012`,`#5E4C18`,`#8A6E22`,`#B8952E`,`#EAD27A`]},d=[`#4E2E1C`,`#7A4A2E`,`#A2683F`,`#C78A5A`],f=[`#34312F`,`#4F4A46`,`#6B6560`,`#8A847E`],p=[`#3E8E41`,`#5FB14F`],m=[`#4A4F54`,`#62686E`],h=`#FFF6E0`,g=[`#E3C24A`,`#C9A23A`],_=[`#9BDD6A`,`#D8F59A`],v={"!":`#E8B04A`,x:`#FF6F69`},y=12;function b(e){let t=String(e||``).toLowerCase();return/implement|develop/.test(t)?`developer`:/explor/.test(t)?`explorer`:/review/.test(t)?`reviewer`:/test/.test(t)?`tester`:null}var x=e=>e?.status===`blocked`||e?.status===`waiting-input`;function S(e){return Array.isArray(e.files_all)?e.files_all.filter(e=>e&&typeof e==`object`):(Array.isArray(e.files?.items)?e.files.items:[]).filter(e=>e&&typeof e==`object`).map(e=>({file:e.file??null,path:e.path??null,additions:e.additions??0,deletions:e.deletions??0,by:e.by??null}))}var C=e=>e==null||e===``?NaN:Number(e);function w(e){let t=C(e?.context?.used),n=C(e?.context?.window);return Number.isFinite(t)&&Number.isFinite(n)&&n>0?s(t/n):null}function T(e){let t=S(e),n=(Array.isArray(e.agents)?e.agents:[]).filter(e=>e&&typeof e==`object`).map((e,t)=>({key:e.id??`#${t}`,id:e.id??null,type:e.type||null,running:e.status!==`done`,files:[]})),r=new Map(n.map(e=>[e.key,e])),i=[],a=e.attribution!==!1;for(let e of t){if(!a||e.by==null){i.push(e);continue}let t=r.get(e.by);t||(t={key:e.by,id:e.by,type:`agent`,running:!0,files:[]},n.push(t),r.set(e.by,t)),t.files.push(e)}let o=w(e),l=o!=null,u=l?C(e.context.used):NaN,d=l?o:.5,f=Math.max(0,Math.floor(Number(e.compactions)||0)),p=C(e.context_at_compaction),m=f===0?1:l&&Number.isFinite(p)&&p>0?s(u/p):0;return{id:String(e.session_id??``),host:c[e.host]?e.host:`claude`,idle:e.status===`idle`,bubble:x(e)?`!`:e.error?`x`:null,turns:Math.max(0,Number(e.turns)||0),ctx:d,compactions:f,compacted:f>0&&m<1,regrow:m,crown:i,agents:n}}function E(e,t=!1){let n=T(e);return JSON.stringify([n.id,n.host,n.idle,n.bubble,n.turns,Math.round(n.ctx*100),n.compactions,Math.round(n.regrow*100),n.crown.length,n.agents.map(e=>[e.key,e.type,e.running,e.files.length]),!!t])}function D(e,{sakura:t=!1}={}){let n=T(e),{id:r,idle:i}=n,s=Math.min(1,Math.log1p(n.turns)/Math.log1p(40)),x=.55+.45*s,S=o(a(r)),C=Array.from({length:56},()=>Array(56).fill(null)),w=Array.from({length:56},()=>Array(56).fill(-1)),E=-1,D=(e,t,n)=>{e=Math.round(e),t=Math.round(t),e>=0&&e<56&&t>=0&&t<56&&(C[t][e]=n,w[t][e]=E)},O=i?f:d,k=i?m:p,A=i?l.idle:t?l.sakura:l.live,j=Math.round(41-(9+18*s)),M=1+S()*2+3*s,N=S()*Math.PI*2,P=.9+S()*.6,F=e=>28+M*Math.sin(e*Math.PI*P+N)-M*Math.sin(N);for(let e=41;e>=j;e--){let t=(41-e)/(41-j),n=F(t),r=3+4.5*s-(1.5+3.5*s)*t;for(let t=Math.floor(n-r/2);t<=Math.ceil(n+r/2);t++){let i=(t-(n-r/2))/r;D(t,e,i<.25?O[3]:i>.75?O[0]:S()<.15?O[1]:O[2])}}for(let e=-6;e<=6;e++)D(28+e,41,Math.abs(e)>4?O[1]:O[2]),Math.abs(e)<=5&&D(28+e,40,Math.abs(e)>3?O[1]:O[2]);let I=[],L=(e,t,n,i,s,c)=>{n*=1.15,e=Math.max(n+2,Math.min(53-n,e));let l=o(a(`${r}:pad:${c}`)),u=n*.72;t=Math.max(t,u+6);for(let r=0;r<6;r++){let r=-Math.PI*(.15+.7*l()),i=n*(.4+.5*l());for(let n=0;n<i;n++)D(e+Math.cos(r)*n,t+u*.5+Math.sin(r)*n*.8,O[0])}let d=Math.round(10+n*1.6),f=[];for(let r=0;r<d;r++){let r=l()*Math.PI*2,i=Math.sqrt(l());f.push([e+Math.cos(r)*i*n,t+Math.sin(r)*i*u,1.8+l()*2.2])}f.sort((e,t)=>t[1]-e[1]);for(let[e,n,r]of f){let a=Math.max(0,Math.min(4,Math.round(4*(1-(n-(t-u))/(2*u))+(l()-.5))));for(let t=Math.floor(n-r);t<=n+r;t++)for(let o=Math.floor(e-r);o<=e+r;o++){if(((o-e)**2+(t-n)**2)/(r*r)>1+(l()-.5)*.5)continue;let s=o-e+(t-n)<-r*.3?1:t-n>r*.5?-1:0;D(o,t,i[Math.max(0,Math.min(4,a+s))])}}let p=o(a(`${r}:bloom:${c}`));for(let r=0;r<Math.min(s,y);r++)D(e+(p()*2-1)*n*.8,t-p()*u*.9,h);return{rx:n,cy:t}},R=o(a(`${r}:side`))()<.5?-1:1,z=[];n.agents.forEach((e,t)=>{let c=.25+.55*(t/Math.max(1,n.agents.length-1)),l=Math.round(41-c*(41-j)),d=F(c);if(!e.running){let t=(3+4.5*s-(1.5+3.5*s)*c)/2;E=-1,D(d+R*(t+1),l,O[3]),D(d+R*(t+2),l-1,O[2]),z.push({agentId:e.id,type:e.type,files:e.files}),R=-R;return}let f=Math.round((12+Math.floor(o(a(`${r}:branch:${e.key}`))()*4))*x);E=-1;for(let e=0;e<=f;e++){let t=d+R*e,n=l-e*.45;D(t,n,O[e<f/2?1:2]),D(t,n+1,O[0]),e<f*.6&&D(t,n+2,O[0])}let p=i?null:b(e.type),m=p?u[p]:A;E=I.length,I.push({agentId:e.id,key:e.key,type:e.type,family:p,files:e.files,bbox:null}),L(d+R*f,l-f*.45-2,(8+Math.min(e.files.length,6)*.6)*x,m,e.files.length,e.key),R=-R});let B=I.length;I.push({agentId:null,key:null,type:null,family:null,files:n.crown,bbox:null}),E=B;let V=(4+7*n.ctx+Math.min(n.crown.length,6)*.5)*x*1.35,{rx:H,cy:U}=L(F(1),j-3,V,A,n.crown.length,`crown`);if(n.ctx>.8&&!n.compacted){let e=o(a(`${r}:yellow`));for(let t=0;t<56;t++)for(let n=0;n<56;n++)w[t][n]===B&&C[t][n]!==h&&t<U-H*.2&&e()<.55&&(C[t][n]=e()<.5?g[0]:g[1])}if(n.compacted){let e=o(a(`${r}:shoots`)),t=Math.round(U-H*.15-n.regrow*H*.5);for(let e=0;e<Math.max(0,t);e++)for(let t=0;t<56;t++)w[e][t]===B&&(C[e][t]=null,w[e][t]=-1);if(t>=0&&t<56)for(let r=0;r<56;r++){if(w[t][r]!==B||e()>=.12+n.regrow*.5)continue;let i=1+Math.floor(e()*(1+n.regrow*3));for(let e=1;e<=i;e++)D(r,t-e,e===i?_[1]:_[0])}}E=-1;let W=o(a(`${r}:fallen`));z.forEach((e,t)=>D(16+(t*7+Math.floor(W()*4))%24,40,l.done[2+t%2]));for(let e=0;e<Math.min(n.compactions,6);e++)D(15+e*2,42,h);let[G,K,q]=c[n.host];for(let e=42;e<=46;e++){let t=e<=43?0:Math.floor((e-43)*.45)+2;for(let n=13+t;n<=42-t;n++){if(e===42&&C[e][n]===h)continue;let r=K;e<=43?r=e===42?q:G:(e===46||n===13+t||n===42-t)&&(r=G),D(n,e,r)}}let J=o(a(`${r}:moss`));for(let e=15;e<=40;e++)D(e,41,J()<.5?k[0]:k[1]),J()<.35&&D(e,40,k[0]);for(let e=16;e<=39;e++)D(e,47,`#00000055`);if(n.bubble){let e=v[n.bubble];for(let t=3;t<10;t++)for(let n=40;n<47;n++)D(n,t,t===3||t===9||n===40||n===46?e:`#14191F`);if(D(41,10,e),n.bubble===`!`){for(let t=5;t<=6;t++)D(43,t,e);D(43,8,e)}else for(let[t,n]of[[2,2],[4,2],[3,3],[2,4],[4,4]])D(40+t,3+n,e)}let Y=[],X=I.map(()=>null);for(let e=0;e<56;e++){let t=0;for(;t<56;){let n=C[e][t],r=w[e][t];if(!n){t++;continue}let i=t;for(;i+1<56&&C[e][i+1]===n&&w[e][i+1]===r;)i++;if(Y.push({x:t,y:e,w:i-t+1,c:n,p:r}),r>=0){let n=X[r]||={x0:t,y0:e,x1:i,y1:e};n.x0=Math.min(n.x0,t),n.x1=Math.max(n.x1,i),n.y1=e}t=i+1}}return I.forEach((e,t)=>{let n=X[t];e.bbox=n?{x:n.x0,y:n.y0,w:n.x1-n.x0+1,h:n.y1-n.y0+1}:null}),{width:56,height:56,runs:Y,pads:I,bubble:n.bubble,fallen:z}}var O=e=>{if(!e)return``;let t=String(e).replace(/\\/g,`/`).replace(/\/+$/,``).split(`/`);return t[t.length-1]||String(e)},k=e=>e?String(e).replace(/\\/g,`/`).replace(/\/+$/,``).toLowerCase():``;function A(e){let t=new Map;for(let n of e||[]){let e=n.repo||n.root,r=n.repo_key||(e?k(e):n.cwd?`cwd:${k(n.cwd)}`:`outside a repo`),i=O(e||n.cwd)||`outside a repo`;t.has(r)||t.set(r,{key:r,name:i,trees:[]});let a=n.root&&e&&k(n.root)!==k(e)?O(n.root):null;t.get(r).trees.push({s:n,worktree:a})}let n=(e,t)=>e<t?-1:+(e>t),r=[...t.values()];for(let e of r)e.trees.sort((e,t)=>n(e.worktree||``,t.worktree||``)||n(String(e.s.session_id),String(t.s.session_id)));return r.sort((e,t)=>n(e.name.toLowerCase(),t.name.toLowerCase())||n(e.key,t.key))}var j=e=>e.key??(e.install?`${e.install}\0${e.session_id}`:String(e.session_id)),M=e=>j({key:e.key??void 0,install:e.install,session_id:e.sid}),N=(e,t)=>String(e).split(/[\\/]+/).filter(Boolean).slice(-t).join(`/`),P=e=>r(e.host).label;function F(e){let t=e||[],n=e=>n=>t.filter(t=>e(t)===e(n)).length,r=n(e=>e.host),i=n(e=>`${e.host} ${e.scope}`),a=new Map(t.map(e=>[e.install,r(e)<2?P(e):i(e)<2||e.scope===`global`?`${P(e)} · ${e.scope}`:`${P(e)} · ${O(e.path)}`])),o=()=>t.filter(e=>t.some(t=>t!==e&&a.get(t.install)===a.get(e.install)));for(let e=2,t=o();t.length;e++,t=o()){for(let n of t){let t=String(n.path).split(/[\\/]+/).filter(Boolean).length;a.set(n.install,`${P(n)} · ${e>t?n.path:N(n.path,e)}`)}if(e>64)break}return a}var I=(e,t)=>`#/activity/${encodeURIComponent(e)}`+(t?`?${new URLSearchParams({host:t.host,path:t.path})}`:``);function L(e,t){let n=String(e).indexOf(`?`),r=new URLSearchParams(String(t||``).split(`?`)[1]||``),i=r.get(`host`),a=r.get(`path`);return{sid:n<0?e:String(e).slice(0,n),install:i&&a?{host:i,path:a}:void 0}}function R(e,t){let n=new Map((t||[]).map(e=>[e.install,e])),i=F(t);return(e||[]).map(e=>{let t=n.get(e.install);return{...e,host:t?.host??e.host,chip:i.get(e.install)??(e.host?r(e.host).label:null),href:I(e.session_id,t)}})}var z=(e,t)=>new Set((e.writers||[]).filter(e=>M(e)===t).map(e=>k(e.root)));function B(e,t,n){let r=z(e,t);for(let t of z(e,n))if(r.has(t))return`same-worktree`;return`cross-worktree`}var V=e=>[...new Set((e.writers||[]).map(M))];function H(e,t){let n=new Map(e.map((e,t)=>[j(e.s),t])),r=new Map;for(let e of t||[]){let t=V(e).filter(e=>n.has(e));for(let i=0;i<t.length;i++)for(let a=i+1;a<t.length;a++){let o=n.get(t[i]),s=n.get(t[a]),c=o<s?`${o}-${s}`:`${s}-${o}`,l=B(e,t[i],t[a]);r.has(c)&&l!==`same-worktree`||r.set(c,{a:o,b:s,kind:l})}}return[...r.values()]}function U(e,t){let n=[];for(let r of t||[]){let t=V(r).filter(t=>t!==e);if(!t.length||!V(r).includes(e))continue;let i=t.some(t=>B(r,e,t)===`same-worktree`);n.push({path:r.path,kind:i?`same-worktree`:`cross-worktree`})}return n}var W=e=>e?.status===`busy`||x(e);function G(e,t=10){let n=e.map(e=>({...e,collapsed:!1})),r=n.reduce((e,t)=>e+t.trees.length,0);if(r<=t)return n;let i=n.length,a=n.filter(e=>!e.trees.some(e=>W(e.s))).sort((e,t)=>t.trees.length-e.trees.length||(e.key<t.key?-1:1));for(let e of a){if(r<=t||i<=1)break;e.collapsed=!0,r-=e.trees.length,i--}return n}var K=n(),q=12,J=10,Y=`geneseed-garden-sakura`;function X(){try{return window.localStorage.getItem(Y)===`1`}catch{return!1}}var Z=e=>e.key==null?`the session`:e.type||`agent`,Q=e=>e.path||e.file||`?`;function $({pad:e}){let t=e.files.slice(0,q);return(0,K.jsxs)(`div`,{className:`card gd-card`,children:[(0,K.jsxs)(`div`,{className:`act-lbl`,children:[Z(e),` · `,e.files.length,` file`,e.files.length===1?``:`s`]}),(0,K.jsx)(`ul`,{className:`gd-files`,children:t.map((e,t)=>(0,K.jsxs)(`li`,{children:[(0,K.jsx)(`span`,{className:`mono act-ell`,children:Q(e)}),(0,K.jsxs)(`span`,{className:`mono act-xs`,children:[(0,K.jsxs)(`span`,{className:`t-good`,children:[`+`,e.additions??0]}),` `,(0,K.jsxs)(`span`,{className:`t-bad`,children:[`−`,e.deletions??0]})]})]},`${Q(e)}:${t}`))}),e.files.length>t.length&&(0,K.jsxs)(`div`,{className:`dim act-xs`,children:[`+`,e.files.length-t.length,` more`]})]})}var ee=e=>e?`${Z(e)}: ${e.files.length} file${e.files.length===1?``:`s`}`:``;function te(e,t,n,r){let i={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}[e.key];e.key===`Escape`&&n!=null&&r(null),i&&t&&(e.preventDefault(),r(n==null?i>0?0:t-1:(n+i+t)%t))}var ne=(0,i.memo)(function({t:e,pad:t,swaying:n,onPad:r,px:a,label:o}){let s=(0,i.useMemo)(()=>{let t=new Map;for(let n of e.runs)t.has(n.p)||t.set(n.p,[]),t.get(n.p).push(n);return[...t.entries()]},[e]),c=(0,i.useRef)(null),l=e=>{let[t,n]=[c.current,e.changedTouches?.[0]];return!!t&&!!n&&Math.hypot(n.clientX-t.x,n.clientY-t.y)>J};return(0,K.jsx)(`svg`,{onTouchStart:e=>{let t=e.touches?.[0];c.current=t?{x:t.clientX,y:t.clientY}:null},className:`gd-svg${t==null?``:` gd-dimming`}`,viewBox:`0 0 56 56`,width:56*a,height:56*a,shapeRendering:`crispEdges`,"data-bubble":e.bubble||void 0,...o?{role:`img`,"aria-label":o}:{"aria-hidden":`true`},children:s.map(([i,a])=>(0,K.jsx)(`g`,{"data-p":i,className:[i===t&&`gd-hot`,n&&i>=0&&e.pads[i].key!=null&&`gd-sway`].filter(Boolean).join(` `)||void 0,onMouseEnter:i>=0?()=>r(i):void 0,onMouseLeave:i>=0?()=>r(null):void 0,onTouchEnd:i>=0?e=>{l(e)||(e.cancelable&&e.preventDefault(),r(i===t?null:i))}:void 0,children:a.map(e=>(0,K.jsx)(`rect`,{x:e.x,y:e.y,width:e.w,height:1,fill:e.c},`${e.x},${e.y}`))},i))})});export{H as _,ee as a,G as c,L as d,D as f,U as g,R as h,te as i,w as l,F as m,Y as n,X as o,A as p,ne as r,j as s,$ as t,I as u,E as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./react-C1iE8mnY.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./react-C1iE8mnY.js";import{gt as r}from"./index-How7SzDZ.js";var i=e(t(),1),a=n(),o=1200;function s({text:e,label:t,title:n,className:s=`btn ghost sm`}){let[c,l]=(0,i.useState)(null),u=(0,i.useRef)(null),d=(0,i.useRef)(!1);(0,i.useEffect)(()=>(d.current=!1,()=>{d.current=!0,clearTimeout(u.current)}),[]);let f=e=>{d.current||(l(e),clearTimeout(u.current),u.current=setTimeout(()=>l(null),o))};return(0,a.jsxs)(`button`,{type:`button`,className:s,onClick:async()=>{try{await navigator.clipboard.writeText(e),f(`ok`)}catch{f(`fail`)}},"aria-label":t,title:n,children:[(0,a.jsx)(r,{name:c===`ok`?`check`:c===`fail`?`x`:`copy`}),c===`ok`?`Copied`:c===`fail`?`Copy failed`:`Copy`]})}export{s as t};
|