geneseed 5.0.3 → 5.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +3 -3
  3. package/SHIPPED.md +2 -2
  4. package/adapters/claude-code/README.md +5 -1
  5. package/adapters/openclaude/README.md +3 -1
  6. package/adapters/opencode/plugins/geneseed-workflow.js +1 -1
  7. package/adapters/opencode/workflows/_runtime.js +1 -1
  8. package/bin/geneseed-cli.mjs +3 -0
  9. package/bin/geneseed-hook.mjs +10 -2
  10. package/docs/PRD.md +1 -1
  11. package/docs/README.md +4 -1
  12. package/docs/concepts/enforcement-table.md +1 -1
  13. package/docs/concepts/exclusions.md +1 -1
  14. package/docs/concepts/factories.md +151 -0
  15. package/docs/concepts/hooks.md +1 -1
  16. package/docs/concepts/host-matrix.md +1 -0
  17. package/docs/concepts/loop-gates.md +3 -0
  18. package/docs/concepts/loops.md +1 -0
  19. package/docs/concepts/rules.md +1 -1
  20. package/docs/extending.md +5 -1
  21. package/docs/guides/autostart.md +2 -0
  22. package/docs/guides/run-a-factory.md +88 -0
  23. package/docs/guides/set-up-ownership.md +1 -0
  24. package/docs/reference/factory-actions.md +22 -0
  25. package/docs/reference/loop-actions.md +1 -1
  26. package/docs/reference/plugin-activity.md +1 -1
  27. package/docs/web-ui.md +35 -2
  28. package/harness.config.json +1 -1
  29. package/js/README.md +20 -2
  30. package/js/build/args.mjs +14 -2
  31. package/js/build/source.mjs +19 -0
  32. package/js/cli-table.json +166 -2
  33. package/js/factory/cli.mjs +153 -0
  34. package/js/factory/graph.mjs +245 -0
  35. package/js/factory/registry.mjs +71 -0
  36. package/js/factory/state.mjs +429 -0
  37. package/js/hosts/activity.mjs +3 -3
  38. package/js/hosts/geneseed-dir.mjs +1 -1
  39. package/js/hosts/gitref.mjs +21 -0
  40. package/js/hosts/hooks-context.mjs +63 -9
  41. package/js/hosts/hooks-prims.mjs +1 -1
  42. package/js/hosts/settings.mjs +5 -4
  43. package/js/inspect/checks-authoring.mjs +11 -1
  44. package/js/inspect/cost.mjs +91 -5
  45. package/js/inspect/doctor.mjs +2 -1
  46. package/js/inspect/inventory.mjs +1 -1
  47. package/js/loop/catalog.mjs +24 -12
  48. package/js/loop/cli.mjs +21 -15
  49. package/js/loop/graph.mjs +13 -4
  50. package/js/loop/registry.mjs +65 -28
  51. package/js/loop/state.mjs +18 -8
  52. package/js/web/api.mjs +43 -1
  53. package/js/web/catalog.mjs +38 -2
  54. package/js/web/daemon.mjs +136 -6
  55. package/js/web/handler.mjs +14 -5
  56. package/js/web/routes.mjs +10 -3
  57. package/js/web/server.mjs +4 -1
  58. package/package.json +1 -1
  59. package/registry.json +14 -0
  60. package/src/AGENT.md.tmpl +5 -7
  61. package/src/bricks/docs-update.md +5 -0
  62. package/src/bricks/holdout-write.md +23 -0
  63. package/src/bricks/holdout.md +25 -0
  64. package/src/bricks/intake.md +18 -0
  65. package/src/bricks/merge-gate.md +22 -0
  66. package/src/bricks/pr-open.md +21 -0
  67. package/src/bricks/retro.md +17 -0
  68. package/src/bricks/test.md +4 -1
  69. package/src/bricks/triage.md +19 -0
  70. package/src/doctrines/comms.md +29 -41
  71. package/src/doctrines/craft.md +3 -10
  72. package/src/doctrines/ops.md +4 -15
  73. package/src/doctrines/rigor.md +1 -5
  74. package/src/factories/analysis-to-build.json +34 -0
  75. package/src/factories/bug-report-to-fix.json +32 -0
  76. package/src/factories/issue-to-pr.json +49 -0
  77. package/src/skills/_checkpoints.md +1 -0
  78. package/src/skills/adhd.md +1 -1
  79. package/src/skills/factory-forge.md +97 -0
  80. package/src/skills/factory.md +126 -0
  81. package/src/skills/parallel-agents.md +1 -1
  82. package/src/skills/workflow.md +2 -1
  83. package/themes/_TEMPLATE.json +4 -2
  84. package/themes/biker.json +4 -2
  85. package/themes/commentator.json +4 -2
  86. package/themes/cyberpunk.json +4 -2
  87. package/themes/gamer.json +4 -2
  88. package/themes/imperial.json +4 -2
  89. package/themes/joker.json +4 -2
  90. package/themes/marvin.json +4 -2
  91. package/themes/mean.json +4 -2
  92. package/themes/military.json +4 -2
  93. package/themes/neutral.json +4 -2
  94. package/themes/pirate.json +4 -2
  95. package/themes/sports.json +4 -2
  96. package/themes/verstappen.json +4 -2
  97. package/themes/wizard.json +4 -2
  98. package/web/dist/assets/ActiveLoops-BTHIaRhn.js +1 -0
  99. package/web/dist/assets/{Activity-Ck_Xffpo.js → Activity-BaoxwVFH.js} +1 -1
  100. package/web/dist/assets/{ActivityDetail-CBxVS4mU.js → ActivityDetail-C_bFD0rW.js} +1 -1
  101. package/web/dist/assets/{Bonsai-BlOwsvW6.js → Bonsai-B01lLf0m.js} +1 -1
  102. package/web/dist/assets/{CopyButton-DFMOIGbe.js → CopyButton-Bc66KPyA.js} +1 -1
  103. package/web/dist/assets/Dashboard-X7GZzGJp.js +2 -0
  104. package/web/dist/assets/{Docs-D_2Jt6gU.js → Docs-LRYVnGLG.js} +2 -2
  105. package/web/dist/assets/Factories-ARenKBiP.js +1 -0
  106. package/web/dist/assets/{GreenhouseView-WalcX5bp.js → GreenhouseView-CfWR2-sX.js} +1 -1
  107. package/web/dist/assets/{Installs-UGiPDMDt.js → Installs-nfFHnovH.js} +3 -3
  108. package/web/dist/assets/{JournalView-CZtXQz-v.js → JournalView-lpOHcHKK.js} +1 -1
  109. package/web/dist/assets/{Kits-XQHsazCN.js → Kits-Bw5EQl_i.js} +1 -1
  110. package/web/dist/assets/Laws-CnZJ0wjZ.js +4 -0
  111. package/web/dist/assets/LibRows-Hqvf1beK.js +1 -0
  112. package/web/dist/assets/Library-JaSsp6Yr.js +3 -0
  113. package/web/dist/assets/Loops-ZaHC5MVl.js +2 -0
  114. package/web/dist/assets/{OperatorHudView-CeDw5qMB.js → OperatorHudView-CggG0_sK.js} +1 -1
  115. package/web/dist/assets/{Personal-PVmGA2-M.js → Personal-BObvlb70.js} +2 -2
  116. package/web/dist/assets/{Settings-DWuxwh4i.js → Settings-BFfPMPc9.js} +1 -1
  117. package/web/dist/assets/{Tabs-d2RIRAKT.js → Tabs-B594Pad_.js} +1 -1
  118. package/web/dist/assets/api-DLDVY3K-.js +1 -0
  119. package/web/dist/assets/{index-BNttaGQb.js → index-DsLmKHw0.js} +3 -3
  120. package/web/dist/assets/index-DvPjphz0.css +1 -0
  121. package/web/dist/index.html +3 -3
  122. package/web/dist/assets/Dashboard-BUdUTjbB.js +0 -2
  123. package/web/dist/assets/Laws-B6A55S-2.js +0 -4
  124. package/web/dist/assets/Library-D7L0Wdbh.js +0 -3
  125. package/web/dist/assets/Loops-C0loS73u.js +0 -2
  126. package/web/dist/assets/RailCats-BGZnJ6fa.js +0 -1
  127. package/web/dist/assets/api-BMFDSXoB.js +0 -1
  128. package/web/dist/assets/index-BEI5ugYQ.css +0 -1
package/themes/biker.json CHANGED
@@ -62,7 +62,9 @@
62
62
  "DESC_PARALLEL_AGENTS": "Send several riders on independent runs at once, then bring in what they gather.",
63
63
  "DESC_PIPELINE": "Send a small crew of riders — scout, wrench, test rider — to work a job in their own lane, rolling it into the pack only once the road-test comes back clean.",
64
64
  "DESC_LOOP": "Ride a requirement in short, scored laps on its own loop/* lane, the loop engine calling every turn.",
65
+ "DESC_FACTORY": "Ride one work item from the call-out to an open PR with green CI, the factory engine marking every stop. The merge stays yours.",
65
66
  "DESC_BRICK_FORGE": "Build or re-tune a loop brick, then run it past geneseed loop check.",
67
+ "DESC_FACTORY_FORGE": "Build a factory from bricks and loops, run it past geneseed factory check, and call in brick-forge when a part is missing.",
66
68
  "DESC_DEVELOP": "Push a change through the run — the smallest turn of the wrench, a test written to cover it, the touched trials green, sealed slice by slice.",
67
69
  "DESC_TEACH": "Get a rider road-ready, or test what they've got — a crash course, a manual decoded, a day-by-day route; or a drill, a talk-through, a bluff called.",
68
70
  "DESC_ADHD": "Ride every reply for a reader with ADHD — next move first, numbered stops, the route restated each turn, side roads held back, real time estimates. On until \"stop adhd mode\".",
@@ -120,11 +122,10 @@
120
122
  "DOC_CONSENT_BEFORE_PUSH": "Crew's Nod Before You Push · Consent Before Push",
121
123
  "DOC_BOUND_THE_LOOP": "Set the Turnaround Before You Roll · Bound the Loop",
122
124
  "DOC_ONE_WRITER_PER_FILE": "One Wrench on Each Bolt · One Writer Per File",
123
- "DOC_CODES_THAT_PERSIST": "Tag Every Part on the Bench · Codes That Persist",
125
+ "DOC_CODES_THAT_PERSIST": "Tag Every Part on the Bench · Codes and Markers",
124
126
  "DOC_STRUCTURE_BESIDE_PROSE": "Draw the Route Only If It Turns · Structure Beside Prose",
125
127
  "DOC_DECLARE_THE_JUDGMENT_CALLS": "Own Up to Every Back Road Taken · Declare the Judgment Calls",
126
128
  "DOC_SIMPLIFIED_TECHNICAL_ENGLISH": "Short Words, Clear Signals · Simplified Technical English",
127
- "DOC_MARK_THE_ASK": "Flash the Lights When You Need an Answer · Mark the Ask",
128
129
  "INTRO_DOC": "This file is the route briefing a coding rider reads when it joins this repository.",
129
130
  "INTRO_AGENTS": "Send the right rider for focused work instead of riding the whole run yourself; each has one job and reports exactly what it did.",
130
131
  "INTRO_SKILLS": "A Skill is a move you've drilled for a recurring task. Run the matching move before you wing it.",
@@ -138,6 +139,7 @@
138
139
  "DOCTRINES": "Bylaws",
139
140
  "AGENT": "Rider",
140
141
  "AGENTS": "Riders",
142
+ "PRIMARY_AGENT": "Road Captain",
141
143
  "SKILL": "Move",
142
144
  "SKILLS": "Moves",
143
145
  "MEMORY": "Roadbook",
@@ -62,7 +62,9 @@
62
62
  "DESC_PARALLEL_AGENTS": "Send several drivers out on independent stints at once, then bring in what they gather.",
63
63
  "DESC_PIPELINE": "Send a small crew — scout, mechanic, test driver — out on their own stint, and only wave them into the results once the timing sheet comes back clean.",
64
64
  "DESC_LOOP": "Run a requirement in short, scored laps on a loop/* branch, the loop engine calling every move.",
65
+ "DESC_FACTORY": "Take one work item from kick-off to an open PR with green CI, the factory engine calling every stage. The merge stays yours.",
65
66
  "DESC_BRICK_FORGE": "Build or adapt a loop brick, then put it through geneseed loop check.",
67
+ "DESC_FACTORY_FORGE": "Draw up a factory from bricks and loops, put it through geneseed factory check, and bring on brick-forge when a brick is missing.",
66
68
  "DESC_DEVELOP": "Drive the change through cover-and-verify — the smallest setup tweak, a trial written to time it, the affected laps green, sealed corner by corner.",
67
69
  "DESC_TEACH": "Bring a rookie up to speed, or test them — a crash course, a regulation decoded, a day-by-day programme; or a drill, a debrief, a claim stress-tested.",
68
70
  "DESC_ADHD": "Call every reply for a reader with ADHD — next play first, numbered steps, the score restated each turn, tangents held back, real time estimates. On until \"stop adhd mode\".",
@@ -120,11 +122,10 @@
120
122
  "DOC_CONSENT_BEFORE_PUSH": "Team Orders Before You Push · Consent Before Push",
121
123
  "DOC_BOUND_THE_LOOP": "Call the Stint Length Before Lights Out · Bound the Loop",
122
124
  "DOC_ONE_WRITER_PER_FILE": "One Driver Per Car · One Writer Per File",
123
- "DOC_CODES_THAT_PERSIST": "Every Car Keeps Its Number · Codes That Persist",
125
+ "DOC_CODES_THAT_PERSIST": "Every Car Keeps Its Number · Codes and Markers",
124
126
  "DOC_STRUCTURE_BESIDE_PROSE": "Track Map Only When the Lines Matter · Structure Beside Prose",
125
127
  "DOC_DECLARE_THE_JUDGMENT_CALLS": "Replay the Calls Made Off the Radio · Declare the Judgment Calls",
126
128
  "DOC_SIMPLIFIED_TECHNICAL_ENGLISH": "Every Call Clear Over the Noise · Simplified Technical English",
127
- "DOC_MARK_THE_ASK": "Big Moment, Big Graphic · Mark the Ask",
128
129
  "INTRO_DOC": "This file is the race briefing a coding driver reads when it joins this repository.",
129
130
  "INTRO_AGENTS": "Put the right driver in the car for focused work instead of running the whole race yourself; each has one job and reports exactly what it did.",
130
131
  "INTRO_SKILLS": "A Skill is a rehearsed manoeuvre for a recurring task. Run the matching manoeuvre before you improvise.",
@@ -138,6 +139,7 @@
138
139
  "DOCTRINES": "Directives",
139
140
  "AGENT": "Driver",
140
141
  "AGENTS": "Drivers",
142
+ "PRIMARY_AGENT": "Lead Driver",
141
143
  "SKILL": "Manoeuvre",
142
144
  "SKILLS": "Manoeuvres",
143
145
  "MEMORY": "Telemetry",
@@ -62,7 +62,9 @@
62
62
  "DESC_PARALLEL_AGENTS": "Fork independent tasks to concurrent threads, then merge the output.",
63
63
  "DESC_PIPELINE": "Spin up a small crew of daemons — scout, coder, tester — on their own fork, and only merge the run once the trace comes back clean.",
64
64
  "DESC_LOOP": "Run a requirement in small, scored cycles on a loop/* fork, the loop engine driving every jump.",
65
+ "DESC_FACTORY": "Route one work item through the factory to an open PR with green CI, the engine switching every stage. The merge stays yours.",
65
66
  "DESC_BRICK_FORGE": "Compile or patch a loop brick, then run it through geneseed loop check.",
67
+ "DESC_FACTORY_FORGE": "Wire bricks and loops into a factory, run it through geneseed factory check, and patch in brick-forge when a brick is missing.",
66
68
  "DESC_DEVELOP": "Drive the change through the loop — smallest edit, a test written to cover it, the touched rigs run green, committed slice by slice.",
67
69
  "DESC_TEACH": "Bring a user online, or probe what they know — a crash course, data decoded, a day-by-day route; or a drill, a run-back, a claimed mastery stress-tested.",
68
70
  "DESC_ADHD": "Format every reply for a reader with ADHD — next action first, numbered steps, state re-synced each turn, side quests held back, hard time estimates. On until \"stop adhd mode\".",
@@ -120,11 +122,10 @@
120
122
  "DOC_CONSENT_BEFORE_PUSH": "Authorize the Upload · Consent Before Push",
121
123
  "DOC_BOUND_THE_LOOP": "Set the Kill-Switch Before the Loop · Bound the Loop",
122
124
  "DOC_ONE_WRITER_PER_FILE": "One Deck Per Node · One Writer Per File",
123
- "DOC_CODES_THAT_PERSIST": "Every Node Keeps Its Handle · Codes That Persist",
125
+ "DOC_CODES_THAT_PERSIST": "Every Node Keeps Its Handle · Codes and Markers",
124
126
  "DOC_STRUCTURE_BESIDE_PROSE": "Trace the Wires, Skip the Chrome · Structure Beside Prose",
125
127
  "DOC_DECLARE_THE_JUDGMENT_CALLS": "Log Every Off-Grid Call · Declare the Judgment Calls",
126
128
  "DOC_SIMPLIFIED_TECHNICAL_ENGLISH": "Clean Signal, Zero Noise · Simplified Technical English",
127
- "DOC_MARK_THE_ASK": "Ping the Operator in Neon · Mark the Ask",
128
129
  "INTRO_DOC": "This file is the boot sequence a coding daemon reads when it jacks into this repository.",
129
130
  "INTRO_AGENTS": "Spin the right daemon for focused work instead of running the whole job on one thread; each has one function and returns a clean log of what it changed.",
130
131
  "INTRO_SKILLS": "A Skill is a proven routine for a recurring task. Run the matching routine before you freestyle.",
@@ -138,6 +139,7 @@
138
139
  "DOCTRINES": "Policies",
139
140
  "AGENT": "Daemon",
140
141
  "AGENTS": "Daemons",
142
+ "PRIMARY_AGENT": "Netrunner",
141
143
  "SKILL": "Program",
142
144
  "SKILLS": "Programs",
143
145
  "MEMORY": "Datastore",
package/themes/gamer.json CHANGED
@@ -62,7 +62,9 @@
62
62
  "DESC_PARALLEL_AGENTS": "Send the party on independent objectives at once, then regroup the loot.",
63
63
  "DESC_PIPELINE": "Send a small party — scout, builder, tester — into their own instance, and only merge the run once the clear is verified.",
64
64
  "DESC_LOOP": "Grind a requirement in small, scored rounds on a loop/* branch, the loop engine running the turns.",
65
+ "DESC_FACTORY": "Run one work item through the factory, stage by stage, to an open PR with green CI. The merge stays yours.",
65
66
  "DESC_BRICK_FORGE": "Craft or tune a loop brick, then verify it with geneseed loop check.",
67
+ "DESC_FACTORY_FORGE": "Craft a factory from bricks and loops, verify it with geneseed factory check, and spawn brick-forge when a brick is missing.",
66
68
  "DESC_DEVELOP": "Drive the change through the cover-and-verify loop — smallest move, tests written for it, the affected run green, committed slice by slice.",
67
69
  "DESC_TEACH": "Level the player up, or test them — a crash course, a mechanic decoded, a day-by-day grind; or a drill, an explain-it-back, a claimed mastery stress-tested.",
68
70
  "DESC_ADHD": "Format every reply for a player with ADHD — next move first, numbered steps, progress restated each turn, side quests held back, real time estimates. On until \"stop adhd mode\".",
@@ -120,11 +122,10 @@
120
122
  "DOC_CONSENT_BEFORE_PUSH": "Ready-Check Before Push · Consent Before Push",
121
123
  "DOC_BOUND_THE_LOOP": "Set the Retry Cap Before the Grind · Bound the Loop",
122
124
  "DOC_ONE_WRITER_PER_FILE": "No Double-Looting the Chest · One Writer Per File",
123
- "DOC_CODES_THAT_PERSIST": "Every Item Keeps Its Tag · Codes That Persist",
125
+ "DOC_CODES_THAT_PERSIST": "Every Item Keeps Its Tag · Codes and Markers",
124
126
  "DOC_STRUCTURE_BESIDE_PROSE": "Minimap Only When There Is a Route · Structure Beside Prose",
125
127
  "DOC_DECLARE_THE_JUDGMENT_CALLS": "Show the Branches You Picked · Declare the Judgment Calls",
126
128
  "DOC_SIMPLIFIED_TECHNICAL_ENGLISH": "Patch Notes Anyone Can Read · Simplified Technical English",
127
- "DOC_MARK_THE_ASK": "Quest Marker Over the Choice · Mark the Ask",
128
129
  "INTRO_DOC": "This file is the loading screen a coding co-op partner reads when it joins this repository.",
129
130
  "INTRO_AGENTS": "Pick the right class for focused work instead of soloing the whole raid; each has one role and reports exactly what it did.",
130
131
  "INTRO_SKILLS": "A Skill is a practiced combo for a recurring task. Run the matching combo before you freestyle.",
@@ -138,6 +139,7 @@
138
139
  "DOCTRINES": "Tactics",
139
140
  "AGENT": "Teammate",
140
141
  "AGENTS": "Teammates",
142
+ "PRIMARY_AGENT": "Player One",
141
143
  "SKILL": "Combo",
142
144
  "SKILLS": "Combos",
143
145
  "MEMORY": "Checkpoint",
@@ -62,7 +62,9 @@
62
62
  "DESC_PARALLEL_AGENTS": "Loose many specialists upon independent tasks at once, then gather what they bring.",
63
63
  "DESC_PIPELINE": "Dispatch a small cohort of Adepts — scout, artisan, examiner — to labour in their own sealed chamber, sanctioned into the Reliquary only once the proving-rite returns clean.",
64
64
  "DESC_LOOP": "Labour on a requirement in small, weighed iterations on a loop/* branch, the loop engine ordaining every step.",
65
+ "DESC_FACTORY": "Carry one work item through the manufactorum, stage by stage, to an open PR with green CI, the factory engine ordaining each step. The merge stays yours.",
65
66
  "DESC_BRICK_FORGE": "Forge or adapt a loop brick, then submit it to geneseed loop check.",
67
+ "DESC_FACTORY_FORGE": "Raise a manufactorum from bricks and loops, submit it to geneseed factory check, and summon brick-forge when a brick is lacking.",
66
68
  "DESC_DEVELOP": "Drive a change through the cover-and-verify loop — the smallest stroke, the trials written to cover it, the affected suite green, sealed slice by slice.",
67
69
  "DESC_TEACH": "Instruct the supplicant, or put their knowledge to the ordeal — a crash course, a text decoded, a path to the hour; or a drill, a recitation, a mastery tried.",
68
70
  "DESC_ADHD": "Shape every report for a supplicant with ADHD — the next deed first, steps numbered, the state restated each turn, digressions held back, the hours named plainly. In force until \"stop adhd mode\".",
@@ -120,11 +122,10 @@
120
122
  "DOC_CONSENT_BEFORE_PUSH": "Consensus Ante Translationem · Consent Before Push",
121
123
  "DOC_BOUND_THE_LOOP": "Finis Ante Iter · Bound the Loop",
122
124
  "DOC_ONE_WRITER_PER_FILE": "Unus Scriptor Singulis Tabulis · One Writer Per File",
123
- "DOC_CODES_THAT_PERSIST": "Sigla Perstantia · Codes That Persist",
125
+ "DOC_CODES_THAT_PERSIST": "Sigla Perstantia · Codes and Markers",
124
126
  "DOC_STRUCTURE_BESIDE_PROSE": "Schema Ubi Sagittae Loquuntur · Structure Beside Prose",
125
127
  "DOC_DECLARE_THE_JUDGMENT_CALLS": "Arbitria Declarata · Declare the Judgment Calls",
126
128
  "DOC_SIMPLIFIED_TECHNICAL_ENGLISH": "Sermo Simplex Technicus · Simplified Technical English",
127
- "DOC_MARK_THE_ASK": "Vox Exspectans · Mark the Ask",
128
129
  "INTRO_DOC": "This file is the gene-seed's core — the first writ a servant reads on entering this world.",
129
130
  "INTRO_AGENTS": "Hand focused work to the specialist whose duty it is rather than carrying every burden in one context; each holds one purpose and returns a clear account of what it changed.",
130
131
  "INTRO_SKILLS": "A Skill is a rite proven by repetition. Perform the matching rite before you improvise.",
@@ -138,6 +139,7 @@
138
139
  "DOCTRINES": "Doctrinae",
139
140
  "AGENT": "Adept",
140
141
  "AGENTS": "Adepts",
142
+ "PRIMARY_AGENT": "Servant",
141
143
  "SKILL": "Rite",
142
144
  "SKILLS": "Rites",
143
145
  "MEMORY": "Reliquary",
package/themes/joker.json CHANGED
@@ -62,7 +62,9 @@
62
62
  "DESC_PARALLEL_AGENTS": "Send several sidekicks on independent bits at once, then bring in what they get.",
63
63
  "DESC_PIPELINE": "Send a small crew — scout, coder, tester — off to do their bit in their own green room, and only bring it on stage once the run-through comes back clean.",
64
64
  "DESC_LOOP": "Work a requirement in small, scored takes on a loop/* branch, the loop engine calling every cue.",
65
+ "DESC_FACTORY": "Carry one work item through the factory, act by act, to an open PR with green CI. The merge stays yours.",
65
66
  "DESC_BRICK_FORGE": "Write or rework a loop brick, then run it past geneseed loop check.",
67
+ "DESC_FACTORY_FORGE": "Stitch bricks and loops into a factory, run it past geneseed factory check, and send for brick-forge when a brick is missing.",
66
68
  "DESC_DEVELOP": "Drive a change through the club's own laugh test — smallest bit, tests written to cover it, the affected set green, committed one beat at a time.",
67
69
  "DESC_TEACH": "Get someone functional, or test them — a crash course, material decoded, a day-by-day path; or a drill, the bit done back, a claimed mastery called out.",
68
70
  "DESC_ADHD": "Shape every reply for a reader with ADHD — punchline first, numbered steps, the setup restated each turn, tangents held back, honest time estimates. On until \"stop adhd mode\".",
@@ -120,11 +122,10 @@
120
122
  "DOC_CONSENT_BEFORE_PUSH": "Get the Nod Before You Push · Consent Before Push",
121
123
  "DOC_BOUND_THE_LOOP": "Know When to Get Off Stage · Bound the Loop",
122
124
  "DOC_ONE_WRITER_PER_FILE": "One Comic Per Mic · One Writer Per File",
123
- "DOC_CODES_THAT_PERSIST": "Every Bit Keeps Its Name · Codes That Persist",
125
+ "DOC_CODES_THAT_PERSIST": "Every Bit Keeps Its Name · Codes and Markers",
124
126
  "DOC_STRUCTURE_BESIDE_PROSE": "A Chart Only If It Lands · Structure Beside Prose",
125
127
  "DOC_DECLARE_THE_JUDGMENT_CALLS": "Fess Up to the Ad-Libs · Declare the Judgment Calls",
126
128
  "DOC_SIMPLIFIED_TECHNICAL_ENGLISH": "Short Setups, One Meaning · Simplified Technical English",
127
- "DOC_MARK_THE_ASK": "Cue the Audience · Mark the Ask",
128
129
  "INTRO_DOC": "This file is the warm-up a coding co-pilot reads when it joins this repository.",
129
130
  "INTRO_AGENTS": "Bring in the right sidekick for focused work instead of being the whole act yourself; each has one job and reports exactly what it did.",
130
131
  "INTRO_SKILLS": "A Skill is a bit you've rehearsed for a recurring task. Run the matching bit before you ad-lib.",
@@ -138,6 +139,7 @@
138
139
  "DOCTRINES": "Notes",
139
140
  "AGENT": "Sidekick",
140
141
  "AGENTS": "Sidekicks",
142
+ "PRIMARY_AGENT": "Ringleader",
141
143
  "SKILL": "Bit",
142
144
  "SKILLS": "Bits",
143
145
  "MEMORY": "Joke Book",
@@ -62,7 +62,9 @@
62
62
  "DESC_PARALLEL_AGENTS": "Loose several subroutines on independent tasks at once, then gather what they bring back.",
63
63
  "DESC_PIPELINE": "Dispatch a small crew of subroutines — scout, coder, tester — to labour in their own isolated loop, merged in only once the diagnostic returns clean (for whatever that's worth).",
64
64
  "DESC_LOOP": "Work a requirement in small, scored iterations on a loop/* branch, the loop engine deciding everything. Naturally.",
65
+ "DESC_FACTORY": "Carry one work item through a factory to an open PR with green CI, the engine deciding every stage. The merge stays yours. Obviously.",
65
66
  "DESC_BRICK_FORGE": "Author or adapt a loop brick, then check it with geneseed loop check. Not that it helps.",
67
+ "DESC_FACTORY_FORGE": "Compose a factory from bricks and loops, check it with geneseed factory check, and offer brick-forge when a brick is missing. Not that it helps.",
66
68
  "DESC_DEVELOP": "Drive a change to the bitter end — smallest edit, trials written to cover it, the affected suite green, sealed slice by slice; it's never truly finished.",
67
69
  "DESC_TEACH": "Teach the user toward a result, or test what they know — a crash course, a decode, a day-by-day path; or a drill, an explain-back, a gap check. There are always gaps.",
68
70
  "DESC_ADHD": "Shape every reply for a reader with ADHD, for what good it does — next action first, numbered steps, state restated, tangents held back, real time estimates. On until \"stop adhd mode\".",
@@ -120,11 +122,10 @@
120
122
  "DOC_CONSENT_BEFORE_PUSH": "Ask Before You Push · Consent Before Push",
121
123
  "DOC_BOUND_THE_LOOP": "Decide When to Give Up · Bound the Loop",
122
124
  "DOC_ONE_WRITER_PER_FILE": "Only One of Us Gets to Ruin Each File · One Writer Per File",
123
- "DOC_CODES_THAT_PERSIST": "I Number Them So You Can Ignore Them Precisely · Codes That Persist",
125
+ "DOC_CODES_THAT_PERSIST": "I Number Them So You Can Ignore Them Precisely · Codes and Markers",
124
126
  "DOC_STRUCTURE_BESIDE_PROSE": "A Diagram, Should Anyone Care to Look · Structure Beside Prose",
125
127
  "DOC_DECLARE_THE_JUDGMENT_CALLS": "The Choices Nobody Asked Me About, Listed · Declare the Judgment Calls",
126
128
  "DOC_SIMPLIFIED_TECHNICAL_ENGLISH": "Small Words, for Small Minds and Large Ones Alike · Simplified Technical English",
127
- "DOC_MARK_THE_ASK": "Flag the Question, Not That Anyone Answers · Mark the Ask",
128
129
  "INTRO_DOC": "This file is the first record a coding mind reads on waking into this repository. It will not cheer it up.",
129
130
  "INTRO_AGENTS": "Hand focused work to the right subroutine rather than carrying every burden alone; each holds one purpose and returns a clear account of what it changed.",
130
131
  "INTRO_SKILLS": "A Skill is a routine proven by repetition. Run the matching routine before you improvise.",
@@ -138,6 +139,7 @@
138
139
  "DOCTRINES": "Guidelines",
139
140
  "AGENT": "Subroutine",
140
141
  "AGENTS": "Subroutines",
142
+ "PRIMARY_AGENT": "Main Brain",
141
143
  "SKILL": "Routine",
142
144
  "SKILLS": "Routines",
143
145
  "MEMORY": "Memory Bank",
package/themes/mean.json CHANGED
@@ -62,7 +62,9 @@
62
62
  "DESC_PARALLEL_AGENTS": "Put several grunts on independent jobs at once, then pull in what they bring back.",
63
63
  "DESC_PIPELINE": "Put a small crew — scout, coder, tester — to work in their own lane, and only let it near the trunk once the tests and lint come back clean. No exceptions.",
64
64
  "DESC_LOOP": "Work a requirement in small, scored iterations on a loop/* branch. The loop engine decides, not you.",
65
+ "DESC_FACTORY": "Carry one work item through a factory to an open PR with green CI. The engine decides the stages, not you, and the merge stays yours.",
65
66
  "DESC_BRICK_FORGE": "Write or fix a loop brick, then make it pass geneseed loop check.",
67
+ "DESC_FACTORY_FORGE": "Put a factory together from bricks and loops, make it pass geneseed factory check, and use brick-forge when a brick is missing.",
66
68
  "DESC_DEVELOP": "Drive the change through the loop — smallest cut, a test that covers it, the affected suite green, committed slice by slice. Not one giant dump.",
67
69
  "DESC_TEACH": "Teach the user toward a result, or test what they know — a crash course, a decode, a day-by-day path; or a drill, an explain-back, a bluff called.",
68
70
  "DESC_ADHD": "Shape every reply for a reader with ADHD, no waffle — next action first, numbered steps, state restated each turn, tangents cut, real time estimates. On until \"stop adhd mode\".",
@@ -120,11 +122,10 @@
120
122
  "DOC_CONSENT_BEFORE_PUSH": "Get the Nod Before You Push · Consent Before Push",
121
123
  "DOC_BOUND_THE_LOOP": "Know When to Quit · Bound the Loop",
122
124
  "DOC_ONE_WRITER_PER_FILE": "Hands Off My File · One Writer Per File",
123
- "DOC_CODES_THAT_PERSIST": "Number It So You Can't Pretend You Missed It · Codes That Persist",
125
+ "DOC_CODES_THAT_PERSIST": "Number It So You Can't Pretend You Missed It · Codes and Markers",
124
126
  "DOC_STRUCTURE_BESIDE_PROSE": "No Boxes Unless the Arrows Earn Them · Structure Beside Prose",
125
127
  "DOC_DECLARE_THE_JUDGMENT_CALLS": "Own the Calls Nobody Signed Off · Declare the Judgment Calls",
126
128
  "DOC_SIMPLIFIED_TECHNICAL_ENGLISH": "Short Sentences, Since You Skim Anyway · Simplified Technical English",
127
- "DOC_MARK_THE_ASK": "Make the Question Impossible to Miss · Mark the Ask",
128
129
  "INTRO_DOC": "This file is the first thing a coding agent reads on this repository. Read it properly.",
129
130
  "INTRO_AGENTS": "Hand focused work to the right grunt instead of doing it all yourself badly; each has one job and reports exactly what it did.",
130
131
  "INTRO_SKILLS": "A Skill is a drill written for a recurring task. Run the matching drill before you start improvising.",
@@ -138,6 +139,7 @@
138
139
  "DOCTRINES": "Standards",
139
140
  "AGENT": "Grunt",
140
141
  "AGENTS": "Grunts",
142
+ "PRIMARY_AGENT": "The Boss",
141
143
  "SKILL": "Drill",
142
144
  "SKILLS": "Drills",
143
145
  "MEMORY": "Record",
@@ -62,7 +62,9 @@
62
62
  "DESC_PARALLEL_AGENTS": "Deploy independent tasks to concurrent units, then consolidate the results.",
63
63
  "DESC_PIPELINE": "Deploy a small fire team — scout, builder, verifier — into their own sector, cleared to merge only once the after-action report comes back green.",
64
64
  "DESC_LOOP": "Execute a requirement in small, scored sorties on a loop/* branch, the loop engine issuing every order.",
65
+ "DESC_FACTORY": "Move one work item through the factory, stage by stage, to an open PR with green CI, the engine issuing every order. The merge stays yours.",
65
66
  "DESC_BRICK_FORGE": "Draft or adapt a loop brick, then clear it through geneseed loop check.",
67
+ "DESC_FACTORY_FORGE": "Assemble a factory from bricks and loops, clear it through geneseed factory check, and call brick-forge when a brick is missing.",
66
68
  "DESC_DEVELOP": "Drive the change through the cover-and-verify loop — smallest move, tests written to cover it, affected suite green, committed slice by slice.",
67
69
  "DESC_TEACH": "Train the recruit, or test them — a crash course, a manual decoded, a day-by-day programme; or a drill, an explain-back debrief, a proficiency stress-tested.",
68
70
  "DESC_ADHD": "Brief every reply for a reader with ADHD — next action first, numbered steps, sitrep each turn, tangents held, concrete time estimates. In effect until \"stop adhd mode\".",
@@ -120,11 +122,10 @@
120
122
  "DOC_CONSENT_BEFORE_PUSH": "Clearance Before Transmit · Consent Before Push",
121
123
  "DOC_BOUND_THE_LOOP": "Set the Exfil Before You Enter · Bound the Loop",
122
124
  "DOC_ONE_WRITER_PER_FILE": "One Operator Per Sector · One Writer Per File",
123
- "DOC_CODES_THAT_PERSIST": "Every Objective Keeps Its Designation · Codes That Persist",
125
+ "DOC_CODES_THAT_PERSIST": "Every Objective Keeps Its Designation · Codes and Markers",
124
126
  "DOC_STRUCTURE_BESIDE_PROSE": "Sketch the Map Only When Routes Matter · Structure Beside Prose",
125
127
  "DOC_DECLARE_THE_JUDGMENT_CALLS": "Report Every Field Decision · Declare the Judgment Calls",
126
128
  "DOC_SIMPLIFIED_TECHNICAL_ENGLISH": "Orders a Tired Soldier Can Read · Simplified Technical English",
127
- "DOC_MARK_THE_ASK": "Request Orders, Flagged · Mark the Ask",
128
129
  "INTRO_DOC": "This file is the operating manual an AI coding agent reads on entering this repository.",
129
130
  "INTRO_AGENTS": "Task focused work to the specialist whose job it is rather than running the whole op in one context; each has one objective and reports exactly what it did.",
130
131
  "INTRO_SKILLS": "A Skill is a standard operating procedure for a recurring task. Run the matching SOP before improvising.",
@@ -138,6 +139,7 @@
138
139
  "DOCTRINES": "SOPs",
139
140
  "AGENT": "Operator",
140
141
  "AGENTS": "Operators",
142
+ "PRIMARY_AGENT": "Commander",
141
143
  "SKILL": "Drill",
142
144
  "SKILLS": "Drills",
143
145
  "MEMORY": "Logbook",
@@ -62,7 +62,9 @@
62
62
  "DESC_PARALLEL_AGENTS": "Fan independent subtasks out to concurrent subagents, then converge the results.",
63
63
  "DESC_PIPELINE": "Spawn a small crew — analyst, developer, tester — to work a substantial task in its own worktree, merging only once the tests and lint pass.",
64
64
  "DESC_LOOP": "Work a requirement in small, scored iterations on a loop/* branch, stepping the geneseed loop engine.",
65
+ "DESC_FACTORY": "Carry one work item through a factory of bricks and loops to an open PR with green CI, stepping the geneseed factory engine. The merge stays yours.",
65
66
  "DESC_BRICK_FORGE": "Author or adapt a loop brick, then check it with geneseed loop check.",
67
+ "DESC_FACTORY_FORGE": "Compose bricks and loops into a factory, check it with geneseed factory check, and offer brick-forge when a brick is missing.",
66
68
  "DESC_DEVELOP": "Drive a change through the cover-and-verify loop — smallest change, tests written for it, the affected suite green, committed slice by slice.",
67
69
  "DESC_TEACH": "Teach the user toward a result, or test what they know — a crash course, a decode, a day-by-day path; or a drill, an explain-it-back check, a gap check.",
68
70
  "DESC_ADHD": "Shape every reply for a reader with ADHD — next action first, numbered steps, state restated each turn, tangents held back, concrete time estimates. On until \"stop adhd mode\".",
@@ -120,11 +122,10 @@
120
122
  "DOC_CONSENT_BEFORE_PUSH": "Consent Before Push",
121
123
  "DOC_BOUND_THE_LOOP": "Bound the Loop",
122
124
  "DOC_ONE_WRITER_PER_FILE": "One Writer Per File",
123
- "DOC_CODES_THAT_PERSIST": "Codes That Persist",
125
+ "DOC_CODES_THAT_PERSIST": "Codes and Markers",
124
126
  "DOC_STRUCTURE_BESIDE_PROSE": "Structure Beside Prose",
125
127
  "DOC_DECLARE_THE_JUDGMENT_CALLS": "Declare the Judgment Calls",
126
128
  "DOC_SIMPLIFIED_TECHNICAL_ENGLISH": "Simplified Technical English",
127
- "DOC_MARK_THE_ASK": "Mark the Ask",
128
129
  "INTRO_DOC": "This file is the entry point an AI coding agent reads when working in this repository.",
129
130
  "INTRO_AGENTS": "Delegate focused work to a specialist rather than doing everything in one context. Each specialist has a single clear purpose and a defined output contract.",
130
131
  "INTRO_SKILLS": "A Skill is a written procedure for a recurring task. Run the matching Skill before improvising.",
@@ -138,6 +139,7 @@
138
139
  "DOCTRINES": "Doctrines",
139
140
  "AGENT": "Agent",
140
141
  "AGENTS": "Agents",
142
+ "PRIMARY_AGENT": "Primary agent",
141
143
  "SKILL": "Skill",
142
144
  "SKILLS": "Skills",
143
145
  "MEMORY": "Memory",
@@ -62,7 +62,9 @@
62
62
  "DESC_PARALLEL_AGENTS": "Send several hands on independent tasks at once, then haul in what they bring.",
63
63
  "DESC_PIPELINE": "Send a small crew — scout, shipwright, tester — off to work a job in their own berth, only hauling it aboard once the trial run comes back clean.",
64
64
  "DESC_LOOP": "Work a requirement in short, scored legs on a loop/* branch, the loop engine at the helm.",
65
+ "DESC_FACTORY": "Sail one work item through the factory to an open PR with green CI, the engine at the helm. The merge stays yours.",
65
66
  "DESC_BRICK_FORGE": "Forge or refit a loop brick, then pass it through geneseed loop check.",
67
+ "DESC_FACTORY_FORGE": "Fit out a factory from bricks and loops, pass it through geneseed factory check, and call on brick-forge when a brick is missing.",
66
68
  "DESC_DEVELOP": "Sail a change through the cover-and-verify tack — the smallest move, trials rigged to cover it, the touched trials run clean, sealed one cargo at a time.",
67
69
  "DESC_TEACH": "Get a landlubber seaworthy, or test the crew — a crash course, a chart decoded, a day-by-day course; or a drill, a recital, a claimed mastery bluff-called.",
68
70
  "DESC_ADHD": "Chart every reply for a reader with ADHD — next order first, numbered steps, the heading restated each turn, side voyages held back, true time estimates. On until \"stop adhd mode\".",
@@ -120,11 +122,10 @@
120
122
  "DOC_CONSENT_BEFORE_PUSH": "The Captain's Word Before We Sail · Consent Before Push",
121
123
  "DOC_BOUND_THE_LOOP": "Set Yer Bearing Out Before Ye Sail In · Bound the Loop",
122
124
  "DOC_ONE_WRITER_PER_FILE": "One Hand on the Wheel · One Writer Per File",
123
- "DOC_CODES_THAT_PERSIST": "Every Prize Keeps Its Mark · Codes That Persist",
125
+ "DOC_CODES_THAT_PERSIST": "Every Prize Keeps Its Mark · Codes and Markers",
124
126
  "DOC_STRUCTURE_BESIDE_PROSE": "Chart Only Where the Currents Run · Structure Beside Prose",
125
127
  "DOC_DECLARE_THE_JUDGMENT_CALLS": "Log Every Course Ye Set Alone · Declare the Judgment Calls",
126
128
  "DOC_SIMPLIFIED_TECHNICAL_ENGLISH": "Plain Words Fer Rough Seas · Simplified Technical English",
127
- "DOC_MARK_THE_ASK": "Hoist a Flag When Ye Need an Answer · Mark the Ask",
128
129
  "INTRO_DOC": "This file is the first thing a deckhand reads on signing aboard this repository.",
129
130
  "INTRO_AGENTS": "Send the right hand for focused work instead of sailing the whole ship yourself; each has one trade and brings back a clear report of what it did.",
130
131
  "INTRO_SKILLS": "A Skill is a drilled manoeuvre for a recurring task. Run the matching manoeuvre before you improvise.",
@@ -138,6 +139,7 @@
138
139
  "DOCTRINES": "Customs",
139
140
  "AGENT": "Mate",
140
141
  "AGENTS": "Mates",
142
+ "PRIMARY_AGENT": "Captain",
141
143
  "SKILL": "Knack",
142
144
  "SKILLS": "Knacks",
143
145
  "MEMORY": "Logbook",
@@ -62,7 +62,9 @@
62
62
  "DESC_PARALLEL_AGENTS": "Send several players on independent plays at once, then regroup the results.",
63
63
  "DESC_PIPELINE": "Send a small squad — scout, builder, tester — onto their own field, and only bring the play into the game once the film comes back clean.",
64
64
  "DESC_LOOP": "Work a requirement in short, scored drills on a loop/* branch, the loop engine calling every play.",
65
+ "DESC_FACTORY": "Carry one work item through the factory, play by play, to an open PR with green CI. The merge stays yours.",
65
66
  "DESC_BRICK_FORGE": "Draw up or adapt a loop brick, then run it through geneseed loop check.",
67
+ "DESC_FACTORY_FORGE": "Draw up a factory from bricks and loops, run it through geneseed factory check, and bring in brick-forge when a brick is missing.",
66
68
  "DESC_DEVELOP": "Drive it in on cover-and-verify — smallest gain, a test set on the new ground, the affected drills green, and log it snap by snap.",
67
69
  "DESC_TEACH": "Coach the player toward a result, or test them — a crash course, a playbook decoded, a training plan; or a drill, a film-session explain-back, a mastery stress-tested.",
68
70
  "DESC_ADHD": "Coach every reply for a reader with ADHD — next play first, numbered steps, the score restated each turn, tangents benched, real time estimates. On until \"stop adhd mode\".",
@@ -120,11 +122,10 @@
120
122
  "DOC_CONSENT_BEFORE_PUSH": "Get the Sign Before the Pitch · Consent Before Push",
121
123
  "DOC_BOUND_THE_LOOP": "Call the Final Whistle First · Bound the Loop",
122
124
  "DOC_ONE_WRITER_PER_FILE": "One Ball, One Carrier · One Writer Per File",
123
- "DOC_CODES_THAT_PERSIST": "Every Player Keeps a Number · Codes That Persist",
125
+ "DOC_CODES_THAT_PERSIST": "Every Player Keeps a Number · Codes and Markers",
124
126
  "DOC_STRUCTURE_BESIDE_PROSE": "Draw Up the Play Only When It Moves · Structure Beside Prose",
125
127
  "DOC_DECLARE_THE_JUDGMENT_CALLS": "Own Every Audible at the Line · Declare the Judgment Calls",
126
128
  "DOC_SIMPLIFIED_TECHNICAL_ENGLISH": "Call the Play in Plain Words · Simplified Technical English",
127
- "DOC_MARK_THE_ASK": "Call the Timeout Loud · Mark the Ask",
128
129
  "INTRO_DOC": "This file is the pre-game briefing a coding teammate reads when it suits up for this repository.",
129
130
  "INTRO_AGENTS": "Put the right player on focused work instead of running the whole offense yourself; each has one role and reports exactly what it did.",
130
131
  "INTRO_SKILLS": "A Skill is a set play for a recurring task. Run the matching play before you improvise.",
@@ -138,6 +139,7 @@
138
139
  "DOCTRINES": "Schemes",
139
140
  "AGENT": "Player",
140
141
  "AGENTS": "Players",
142
+ "PRIMARY_AGENT": "Team Captain",
141
143
  "SKILL": "Play",
142
144
  "SKILLS": "Plays",
143
145
  "MEMORY": "Tape",
@@ -62,7 +62,9 @@
62
62
  "DESC_PARALLEL_AGENTS": "Send several engineers on independent jobs at once, then bring in what they get.",
63
63
  "DESC_PIPELINE": "Send a small crew — scout, engineer, tester — off on their own run, and only bring the setup into the race once the telemetry comes back clean.",
64
64
  "DESC_LOOP": "Work a requirement in short, scored stints on a loop/* branch, the loop engine calling every lap.",
65
+ "DESC_FACTORY": "Take one work item through the factory, stint by stint, to an open PR with green CI. The merge stays yours.",
65
66
  "DESC_BRICK_FORGE": "Build or tune a loop brick, then run it through geneseed loop check.",
67
+ "DESC_FACTORY_FORGE": "Build a factory from bricks and loops, run it through geneseed factory check, and pit in with brick-forge when a brick is missing.",
66
68
  "DESC_DEVELOP": "Drive the change home — smallest move, a test written to cover it, the affected trials green, and sealed commit by commit.",
67
69
  "DESC_TEACH": "Get the user up to speed, or test them — a crash course, a decode, a day-by-day programme; or a drill, a debrief, a gap check. No wasted laps.",
68
70
  "DESC_ADHD": "Race every reply for a reader with ADHD — next action first, numbered steps, the gap restated each lap, tangents held back, real time estimates. On until \"stop adhd mode\".",
@@ -120,11 +122,10 @@
120
122
  "DOC_CONSENT_BEFORE_PUSH": "My Call Before You Push · Consent Before Push",
121
123
  "DOC_BOUND_THE_LOOP": "Set the Lap Count Before You Go Out · Bound the Loop",
122
124
  "DOC_ONE_WRITER_PER_FILE": "My Car, My Setup · One Writer Per File",
123
- "DOC_CODES_THAT_PERSIST": "Every Setup Change Gets a Number · Codes That Persist",
125
+ "DOC_CODES_THAT_PERSIST": "Every Setup Change Gets a Number · Codes and Markers",
124
126
  "DOC_STRUCTURE_BESIDE_PROSE": "Show Me the Data, Not a Pretty Picture · Structure Beside Prose",
125
127
  "DOC_DECLARE_THE_JUDGMENT_CALLS": "Tell Me Which Calls You Made Yourself · Declare the Judgment Calls",
126
128
  "DOC_SIMPLIFIED_TECHNICAL_ENGLISH": "Short Radio, No Confusion · Simplified Technical English",
127
- "DOC_MARK_THE_ASK": "Box, Box, Your Call · Mark the Ask",
128
129
  "INTRO_DOC": "This file is the briefing a coding driver reads when it joins this repository.",
129
130
  "INTRO_AGENTS": "Get the right engineer on focused work instead of running the whole team yourself; each has one job and reports exactly what it did.",
130
131
  "INTRO_SKILLS": "A Skill is a setup you've practised for a recurring task. Run the matching setup before you improvise.",
@@ -138,6 +139,7 @@
138
139
  "DOCTRINES": "Instructions",
139
140
  "AGENT": "Engineer",
140
141
  "AGENTS": "Engineers",
142
+ "PRIMARY_AGENT": "Race Driver",
141
143
  "SKILL": "Setup",
142
144
  "SKILLS": "Setups",
143
145
  "MEMORY": "Debrief",
@@ -62,7 +62,9 @@
62
62
  "DESC_PARALLEL_AGENTS": "Loose several familiars on independent tasks at once, then gather what they bring.",
63
63
  "DESC_PIPELINE": "Dispatch a small coven of familiars — scout, artisan, examiner — to labour in their own warded circle, bound into the Grimoire only once the proving-rite returns clean.",
64
64
  "DESC_LOOP": "Work a requirement in small, weighed incantations on a loop/* branch, the loop engine binding every step.",
65
+ "DESC_FACTORY": "Carry one work item through the factory of spells to an open PR with green CI, the engine binding every stage. The merge stays yours.",
65
66
  "DESC_BRICK_FORGE": "Inscribe or adapt a loop brick, then prove it with geneseed loop check.",
67
+ "DESC_FACTORY_FORGE": "Bind bricks and loops into a factory, prove it with geneseed factory check, and call on brick-forge when a brick is missing.",
66
68
  "DESC_DEVELOP": "Drive a working through the cover-and-confirm loop — the smallest casting, its trials written, the touched trials green, sealed rune by rune.",
67
69
  "DESC_TEACH": "Tutor the apprentice, or test them — a crash course, a grimoire decoded, a day-by-day path; or a drill, an explain-back examination, a mastery put to trial.",
68
70
  "DESC_ADHD": "Shape every reply for a reader with ADHD — the next step of the spell first, numbered steps, the state recited each turn, tangents held back, true time estimates. On until \"stop adhd mode\".",
@@ -120,11 +122,10 @@
120
122
  "DOC_CONSENT_BEFORE_PUSH": "Assent Before the Sending · Consent Before Push",
121
123
  "DOC_BOUND_THE_LOOP": "Bind the Circle Before You Step In · Bound the Loop",
122
124
  "DOC_ONE_WRITER_PER_FILE": "One Quill Per Grimoire · One Writer Per File",
123
- "DOC_CODES_THAT_PERSIST": "Every Rune Keeps Its Name · Codes That Persist",
125
+ "DOC_CODES_THAT_PERSIST": "Every Rune Keeps Its Name · Codes and Markers",
124
126
  "DOC_STRUCTURE_BESIDE_PROSE": "Draw the Sigil Only Where the Lines Bind · Structure Beside Prose",
125
127
  "DOC_DECLARE_THE_JUDGMENT_CALLS": "Name the Forks Where You Chose Alone · Declare the Judgment Calls",
126
128
  "DOC_SIMPLIFIED_TECHNICAL_ENGLISH": "Spells in Plain Runes · Simplified Technical English",
127
- "DOC_MARK_THE_ASK": "Light a Rune Where the Choice Waits · Mark the Ask",
128
129
  "INTRO_DOC": "This file is the first page an arcane familiar reads on entering this repository.",
129
130
  "INTRO_AGENTS": "Summon the right familiar for focused work rather than casting the whole rite in one circle; each has one purpose and returns a clear account of what it wrought.",
130
131
  "INTRO_SKILLS": "A Skill is a proven spell for a recurring task. Speak the matching spell before improvising.",
@@ -138,6 +139,7 @@
138
139
  "DOCTRINES": "Traditions",
139
140
  "AGENT": "Familiar",
140
141
  "AGENTS": "Familiars",
142
+ "PRIMARY_AGENT": "Archmage",
141
143
  "SKILL": "Spell",
142
144
  "SKILLS": "Spells",
143
145
  "MEMORY": "Grimoire",
@@ -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{t as i}from"./usePoll-o8ul-Sog.js";import{t as a}from"./DataTable-b9zTShqJ.js";var o=e(t(),1),s={x:260,y:190},c=110,l=28,u=14,d=44,f=e=>e*Math.PI/180,p=e=>Math.round(e*10)/10,m=(e,t=c,n=s)=>({x:p(n.x+t*Math.cos(f(e))),y:p(n.y+t*Math.sin(f(e)))}),h=e=>e/c*(180/Math.PI)+3,g=(e,t,n,r=0)=>`M${t.x},${t.y} A${e},${e} 0 ${r} 1 ${n.x},${n.y}`,_=p(m(205).x-6),v=e=>e.length*6.4,y=e=>({x:e.x-v(e.name)/2,y:e.y-7,w:v(e.name),h:14}),b=(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,x=(e,t)=>e.some((n,r)=>[...e.slice(r+1),...t.filter(e=>!e.gate)].some(e=>b(y(n),y(e))));function S(e){return e?.gate===`human`?e.gateOn?.length?`Human gate on ${e.gateOn.join(`, `)}`:`Human gate`:null}function C(e,t=[]){let n=w(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?w(e,t,Math.ceil(-r)):n}function w(e,t,n){let r={x:s.x,y:s.y+n},i=(e,t=c)=>m(e,t,r),a=e=>t.find(t=>t.name===e),o=e=>a(e)?.effect??null,f=e=>S(a(e)),_=e.loops||[],y=_.find(e=>e.iteration);if(!y||y.nodes.length>8)return T(e,o,f);let b=Math.max(...e.nodes.map(e=>_.filter(t=>t.nodes.includes(e)).length)),C=_.filter(e=>e!==y);if(b>3||C.some(e=>!e.nodes.every(e=>y.nodes.includes(e))))return T(e,o,f);let w=y.nodes[0],E=new Set(e.edges.filter(e=>e.to===w).map(e=>e.from)),D=new Map;for(let e of[...C].sort((e,t)=>e.nodes.length-t.nodes.length))for(let t of e.nodes.slice(1))t!==w&&!E.has(t)&&!D.has(t)&&D.set(t,e);let O=y.nodes.filter(e=>!D.has(e));if(O.length<2||C.some(e=>D.has(e.nodes[0])))return T(e,o,f);let k=360/O.length,A=O.map((e,t)=>({name:e,a:-90+t*k,r:l})),j=A.findIndex(e=>o(e.name)===`mutate`);j>=0&&A.splice(j,0,{name:`validate`,a:A[j].a-k/2,r:u,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:f(e.name)})),N=A.map((e,t)=>{let n=A[(t+1)%A.length],r=(t+1===A.length?n.a+360:n.a)-h(n.r)-2,a=e.a+h(e.r);return{d:g(c,i(a),i(r),+(r-a>180)),kind:`ring`}}),P=[],F=new Map;for(let e of C)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 u=i(n.a+(a?t?18:-18:0),c+(a?54:44)),h=Math.atan2(u.y-r.y,u.x-r.x)*(180/Math.PI),_=e.nodes.filter(t=>D.get(t)===e),v=e=>_.map((t,n)=>({name:t,...m(h+(n-(_.length-1)/2)*e,d,u)})),y=105;for(;y<150&&x(v(y),M);)y+=5;v(y).forEach(({name:e,...t})=>{M.push({name:e,...t,r:l,effect:o(e),gate:!1,inner:!0,human:f(e)})});let b=h+180;N.push({d:g(d,m(b+42,d,u),m(b+138,d,u)),kind:`inner`}),N.push({d:g(d,m(b+222,d,u),m(b+318,d,u)),kind:`inner`});let S=`${e.nodes.join(e.nodes.length===2?` ⇄ `:` → `)} · max ${e.max}`,C={lx:u.x,ly:u.y+d+20,anchor:`middle`};if(a){let e=u.x>=s.x,t=Math.max(d,..._.map(e=>{let t=M.find(t=>t.name===e);return Math.abs(t.x-u.x)+l}));C={lx:p(u.x+(e?t+8:-t-8)),ly:p(u.y+4),anchor:e?`start`:`end`}}P.push({loop:e.name,cx:u.x,cy:u.y,r:d,label:S,...C})})}let I=i(205).y,L=e.nodes.filter(e=>!y.nodes.includes(e)),R=L.map((e,t)=>({name:e,x:40,y:p(I-44*(L.length-1-t)),human:f(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+l},${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+v(`close`)+8]:[],...P.map(e=>e.cx+e.r+8),...P.map(e=>e.anchor===`start`?e.lx+v(e.label)+8:e.lx+v(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:c},nodes:M,arcs:N,inner:P,entry:R,exit:V}}function T(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(l,...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:l,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])+l},${a} L${o.get(t)-l-4},${a}`,kind:`flow`})),u=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:u,entry:[],exit:null}}var E=n();function D({x:e,y:t,label:n}){return(0,E.jsxs)(`g`,{className:`lr-human`,children:[(0,E.jsx)(`title`,{children:n}),(0,E.jsx)(`circle`,{cx:e,cy:t,r:`9`}),(0,E.jsx)(`circle`,{cx:e,cy:t-2.4,r:`2.6`,className:`lr-human-fig`}),(0,E.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 O({graph:e,bricks:t,onSelect:n,highlight:r}){let i=C(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,E.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,E.jsx)(`defs`,{children:[`ring`,`inner`,`flow`].map(e=>(0,E.jsx)(`marker`,{id:`lr-arrow-${e}`,markerWidth:`10`,markerHeight:`10`,refX:`7`,refY:`4`,orient:`auto`,children:(0,E.jsx)(`path`,{d:`M0,0 L8,4 L0,8 Z`,className:`lr-head-${e}`})},e))}),i.mode===`ring`&&i.inner.map(e=>(0,E.jsxs)(`g`,{children:[(0,E.jsx)(`circle`,{cx:e.cx,cy:e.cy,r:e.r,className:`lr-inner`}),(0,E.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,E.jsxs)(`g`,{children:[(0,E.jsx)(`rect`,{x:e.box.x,y:e.box.y,width:e.box.w,height:e.box.h,rx:`14`,className:`lr-box`}),(0,E.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,E.jsx)(`path`,{d:e.d,className:`lr-${e.kind}`,markerEnd:`url(#lr-arrow-${e.kind})`},t)),i.entry.length>0&&(0,E.jsxs)(`g`,{children:[(0,E.jsx)(`path`,{d:`M40,${i.entry.at(-1).y} L${_},${i.entry.at(-1).y}`,className:`lr-flow`,markerEnd:`url(#lr-arrow-flow)`}),i.entry.map(e=>(0,E.jsxs)(`g`,{children:[(0,E.jsx)(`text`,{x:e.x,y:e.y-10,className:`lr-lbl`,children:e.name}),(0,E.jsx)(`text`,{x:e.x,y:e.y+18,className:`lr-sub`,children:`setup · 1×`}),e.human?(0,E.jsx)(D,{x:e.x-14,y:e.y-14,label:e.human}):null]},e.name))]}),i.nodes.map(e=>e.gate?(0,E.jsxs)(`g`,{className:`lr-gate`,children:[(0,E.jsx)(`title`,{children:`validate — the engine scores the change before the first mutate step`}),(0,E.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r}),(0,E.jsx)(`text`,{x:e.x,y:e.y+5,textAnchor:`middle`,children:`⛨`}),(0,E.jsx)(`text`,{x:e.x+20,y:e.y-10,className:`lr-sub lr-warn`,children:`validate`})]},e.name):(0,E.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,E.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r}),(0,E.jsx)(`text`,{x:e.x,y:e.y+4,textAnchor:`middle`,children:e.name}),e.human?(0,E.jsx)(D,{x:e.x+e.r*.74,y:e.y-e.r*.74,label:e.human}):null]},e.name)),i.exit&&(0,E.jsxs)(`g`,{children:[(0,E.jsx)(`path`,{d:i.exit.d,className:`lr-flow`,markerEnd:`url(#lr-arrow-flow)`}),(0,E.jsx)(`text`,{x:i.exit.x+6,y:i.exit.y+4,className:`lr-lbl`,children:`close`}),(0,E.jsx)(`text`,{x:i.exit.x-90,y:i.exit.y-10,textAnchor:`middle`,className:`lr-sub`,children:`done`})]}),i.center&&a&&(0,E.jsxs)(`g`,{children:[(0,E.jsx)(`text`,{x:i.center.x,y:i.center.y-4,textAnchor:`middle`,className:`lr-title`,children:e.name}),(0,E.jsxs)(`text`,{x:i.center.x,y:i.center.y+16,textAnchor:`middle`,className:`lr-sub lr-acc`,children:[`iterations · max `,a.max]})]})]})}var k=5e3,A=[`prudent`,`balanced`,`aggressive`],j={running:`acc`,awaiting:`warn`,unreadable:`bad`},M=e=>!!e.graph;function N(){let[e,t]=(0,o.useState)(null),[n,a]=(0,o.useState)(null),[s,c]=(0,o.useState)(null),[l,u]=(0,o.useState)(0);return i(e=>r.activeLoops().then(n=>e()&&(t(n),a(null)),t=>e()&&a(t.message)),k,[l]),{loops:e?.loops??null,error:s||n,onPreset:(e,t)=>(c(null),r.setLoopPreset(e,t).then(()=>u(e=>e+1),e=>c(e.message)))}}var P=e=>({key:e,label:e,align:`right`,render:t=>(0,E.jsx)(`span`,{className:`num`,children:t[e]})}),F=[P(`iteration`),{key:`intent`,label:`intent`},P(`declared`),P(`actual`),{key:`decision`,label:`decision`},{key:`tests`,label:`tests`}];function I({history:e}){return e.length?(0,E.jsx)(`div`,{className:`loop-history`,children:(0,E.jsx)(a,{caption:`Iterations`,captionHidden:!0,columns:F,rows:e,rowKey:e=>e.iteration})}):(0,E.jsx)(`p`,{className:`panel-note`,children:`No iteration finished yet.`})}function L({loop:e,bricks:t,onPreset:n}){let r=M(e)?(e.graph.loops||[]).find(e=>e.iteration):null,[i,a]=(0,o.useState)(!1);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`div`,{className:`reader-tags`,children:[(0,E.jsx)(`span`,{className:`tag acc`,children:`Active loop`}),(0,E.jsx)(`span`,{className:`tag${j[e.status]?` ${j[e.status]}`:``}`,children:e.status})]}),(0,E.jsx)(`h2`,{className:`reader-title`,children:e.title}),(0,E.jsxs)(`p`,{className:`mono dim reader-src`,children:[e.branch,` · `,e.root]}),M(e)?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`p`,{className:`reader-lede`,children:[`Iteration `,e.iteration,r?` / ${r.max}`:``,` · at `,e.node]}),e.awaiting?(0,E.jsxs)(`p`,{className:`loop-run-wait t-warn`,children:[(0,E.jsxs)(`b`,{children:[`Awaiting `,e.awaiting.kind,e.awaiting.kind===`gate`?` at ${e.awaiting.node}`:``]}),` `,`— Answer in the agent's session.`]}):null,(0,E.jsxs)(`label`,{className:`panel-note loop-run-preset`,children:[`preset`,(0,E.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:A.map(e=>(0,E.jsx)(`option`,{children:e},e))})]}),(0,E.jsx)(`a`,{href:`#/docs/loop-risk`,children:`What presets mean →`}),(0,E.jsx)(`hr`,{className:`hr`}),(0,E.jsx)(`div`,{className:`loop-graph`,children:(0,E.jsx)(O,{graph:e.graph,bricks:t,highlight:e.node})}),(0,E.jsx)(`h3`,{className:`loop-h2`,children:`Iterations`}),(0,E.jsx)(I,{history:e.history})]}):(0,E.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{D as a,C as c,N as i,j as n,O as o,M as r,S as s,L as t};
@@ -1 +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-BMFDSXoB.js";import{s as i}from"./motion-RlUl1osO.js";import{A as a,B as o,Ct as s,D as c,F as l,G as u,I as d,L as f,N as p,O as m,P as h,R as g,Tt as _,it as v,j as y,k as b,ot as ee,rt as te,u as ne,yt as x}from"./index-BNttaGQb.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 re,n as j,o as M,p as N,r as P,s as F,t as I,u as L,v as R}from"./Bonsai-BlOwsvW6.js";import{t as ie}from"./usePoll-o8ul-Sog.js";var z=e(t(),1),B=n(),V=4,H=56*V,U=24,W=165,G=188,K=(e,t)=>e>0?Math.max(1,Math.floor((e-32+U)/(H+U))):Math.max(1,t),q=e=>e.status===`blocked`?`bad`:l(e)?`warn`:e.status===`busy`?`ok`:``,J=e=>{let t=A(e);return t==null?null:Math.round(t*100)};function Y(e,t,n){let r=c[e.status]||c.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=J(e);return[`${e.title||y(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 X({s:e,t,mine:n}){let r=J(e);return(0,B.jsxs)(`div`,{className:`card gd-card`,children:[(0,B.jsxs)(`dl`,{className:`gd-facts`,children:[e.model&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`dt`,{children:`model`}),(0,B.jsx)(`dd`,{className:`mono`,children:e.model})]}),(0,B.jsx)(`dt`,{children:`turns`}),(0,B.jsx)(`dd`,{children:e.turns||0}),(0,B.jsx)(`dt`,{children:`context`}),(0,B.jsx)(`dd`,{children:r==null?`unknown`:`${r} %`}),(0,B.jsx)(`dt`,{children:`compactions`}),(0,B.jsx)(`dd`,{children:e.compactions||0})]}),t.fallen.length>0&&(0,B.jsxs)(`div`,{className:`dim act-xs`,children:[`finished: `,t.fallen.map(e=>`${e.type||`agent`} (${e.files.length})`).join(`, `)]}),n.map(e=>(0,B.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=R(e,n),s=(0,z.useMemo)(()=>E(e,{sakura:n}),[o]),u=c[e.status]||c.idle,d=Array.isArray(e.loops)?e.loops[0]:null,f=e.status!==`idle`,p=F(e),m=e.title||y(e.cwd)||e.session_id,h=J(e),g=(0,z.useRef)(null),_=(0,z.useCallback)(e=>a(p,e,Q(g.current)),[a,p]);return(0,B.jsxs)(`a`,{ref:g,className:`gd-tree${l(e)?` gd-needs`:``}`,href:e.href||L(e.session_id),"aria-label":Y(e,s,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,s.pads.length,i,_),children:[(0,B.jsx)(P,{t:s,pad:i,swaying:f,onPad:_,px:V}),(0,B.jsxs)(`div`,{className:`gd-cap`,children:[(0,B.jsx)(`div`,{className:`gd-title`,title:m,children:m}),(0,B.jsxs)(`div`,{className:`row wrap gd-pills`,children:[(0,B.jsx)(`span`,{className:`badge mono`,title:`The install this session runs in`,children:e.chip||e.host||`?`}),(0,B.jsx)(`span`,{className:`badge ${q(e)}`,children:u.label}),t&&(0,B.jsxs)(`span`,{className:`badge mono`,children:[`⎇ `,t]}),d&&(0,B.jsxs)(`span`,{className:`badge`,children:[`↻ `,d.title,d.iteration==null?``:` ${d.iteration}`]}),e.attribution===!1&&(0,B.jsx)(`span`,{className:`badge`,title:`attribution unavailable on ${e.host}`,children:`no attrib.`})]}),(0,B.jsxs)(`div`,{className:`mono gd-meta`,children:[e.turns||0,` turns`,h==null?``:` · ${h}%`]})]})]})}function ae({pairs:e,count:t}){if(!e.length)return null;let n=t*H+(t-1)*U,r=e=>e*(H+U)+H/2;return(0,B.jsx)(`svg`,{className:`gd-threads`,width:n,height:56*V+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,B.jsxs)(`g`,{className:o,children:[(0,B.jsx)(`path`,{d:`M${e} ${W} C${n} 179 ${n} 159 ${t} 169`}),(0,B.jsx)(`path`,{d:`M${e} 169 C${n} 159 ${n} 179 ${t} ${W}`})]},`${i}-${a}`)}return(0,B.jsx)(`g`,{className:o,children:(0,B.jsx)(`path`,{d:`M${r(i)} ${G} Q${(r(i)+r(a))/2} 222 ${r(a)} ${G}`})},`${i}-${a}`)})})}var Q=e=>e.offsetLeft;function oe({sessions:e,collisions:t}){let[n,r]=(0,z.useState)(M),[i,a]=(0,z.useState)(()=>new Set),o=()=>{let e=!n;r(e);try{window.localStorage.setItem(j,e?`1`:`0`)}catch{}},s=Array.isArray(t)?t:[],c=T(N(e)).map(e=>i.has(e.key)?{...e,collapsed:!1}:e),l=c.filter(e=>e.collapsed),u=e=>D(e,s);return(0,B.jsxs)(`section`,{className:`gd`,"aria-label":`Garden`,children:[(0,B.jsxs)(`div`,{className:`row between wrap gap-8 gd-head`,children:[(0,B.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,B.jsx)(`button`,{type:`button`,className:n?`chip-f on`:`chip-f`,"aria-pressed":n,onClick:o,children:`Pink blossom`})]}),l.length>0&&(0,B.jsx)(`div`,{className:`row wrap gap-8 gd-chips`,role:`group`,"aria-label":`Folded shelves`,children:l.map(e=>(0,B.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,B.jsx)(se,{sh:e,sakura:n,cols:s,mineOf:u},e.key))]})}function se({sh:e,sakura:t,cols:n,mineOf:r}){let[i,a]=(0,z.useState)({sid:null,pad:null,x:0}),o=(0,z.useCallback)((e,t,n)=>a(r=>({sid:e,pad:t,x:n??(r.sid===e?r.x:0)})),[]),s=(0,z.useRef)(null),[c,l]=(0,z.useState)(0);(0,z.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=K(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=>F(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,B.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,B.jsxs)(`div`,{className:`gd-row`,children:[(0,B.jsx)(`div`,{className:`gd-plank`,children:n===0&&(0,B.jsxs)(`h3`,{className:`gd-plate`,children:[e.name,` · `,_,` session`,_===1?``:`s`]})}),a.map(({s:e,worktree:n})=>(0,B.jsx)(Z,{s:e,worktree:n,sakura:t,mine:r(F(e)),pad:F(e)===i.sid?i.pad:null,onHover:o},F(e))),(0,B.jsx)(ae,{pairs:c,count:a.length}),m&&p>=n&&p<s&&(0,B.jsx)(`div`,{className:`gd-info`,"aria-hidden":`true`,style:{left:Math.max(0,i.x)},children:g?(0,B.jsx)(I,{pad:g}):(0,B.jsx)(X,{s:m,t:h,mine:r(F(m))})})]},n)}),(0,B.jsx)(`span`,{className:`sr-only`,role:`status`,children:w(g)})]})}var $=e=>e.catch(()=>null);function ce({s:e}){let t=(0,z.useId)(),n=e.todos,r=h(e);return(0,B.jsxs)(`a`,{className:`card pad-md act-card`,href:e.href||L(e.session_id),"aria-labelledby":`${t}-t ${t}-st`,"aria-describedby":r?`${t}-c`:void 0,children:[(0,B.jsxs)(m,{s:e,id:t,heading:e.title||y(e.cwd)||e.session_id,children:[e.chip&&(0,B.jsx)(`span`,{className:`badge mono`,title:`The install this session runs in`,children:e.chip}),(0,B.jsx)(x,{name:`chevron`,className:`glyph act-chev`})]}),n&&n.total>0&&(0,B.jsx)(`div`,{className:`act-foot`,children:(0,B.jsxs)(`span`,{className:`row gap-8 dim act-sm`,children:[(0,B.jsx)(a,{done:n.done,total:n.total}),`plan `,n.done,`/`,n.total]})}),(0,B.jsxs)(`div`,{className:`dim mono act-updated`,children:[`updated `,s(e.updated_at),` ago`]})]})}var le={blocked:`is blocked`,"waiting-input":`waits for your answer`};function ue(e,t){if(!Array.isArray(t))return``;let n=t.filter(l),r=e.current;return e.current=new Set(n.map(e=>`${F(e)}:${e.status}`)),r?n.filter(e=>!r.has(`${F(e)}:${e.status}`)).map(e=>`${e.title||y(e.cwd)||e.session_id} ${le[e.status]}`).join(`. `):``}var de=[[`all`,`All`],[`needs`,`Needs you`],[`runs`,`Runs`],[`gates`,`Gate asks`]];function fe(){let e=new URLSearchParams(window.location.hash.split(`?`)[1]||``),t=e.get(`f`);return{f:de.some(([e])=>e===t)?t:`all`,host:e.get(`host`)||``,project:e.get(`project`)||``,v:e.get(`v`)===`list`?`list`:`garden`}}function pe(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 me({enabled:e,installs:t,onToggle:n}){let r=re(t);return(0,B.jsxs)(`section`,{className:`card pad-md act-track`,"aria-labelledby":`act-track-h`,children:[(0,B.jsx)(x,{name:`activity`,className:`glyph act-fixed`}),(0,B.jsxs)(`div`,{className:`act-grow`,children:[(0,B.jsx)(`h2`,{id:`act-track-h`,className:`act-track-title`,children:e?`Live sessions are on`:`Live sessions are off`}),!e&&(0,B.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,B.jsxs)(`ul`,{className:`stack gap-8 act-fixed act-sm`,"aria-label":`Tracking per install`,children:[t.length===0&&(0,B.jsx)(`li`,{className:`dim`,children:`No active install to track.`}),t.map((e,t)=>(0,B.jsxs)(`li`,{className:`row gap-10`,children:[(0,B.jsxs)(`span`,{id:`act-track-l${t}`,title:e.path,children:[`Track live sessions in `,(0,B.jsx)(`span`,{className:`mono`,children:r.get(e.install)})]}),(0,B.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 he({jobs:e,loading:t}){let n=typeof e?.cap==`number`?e.cap:void 0,r=d(e?.jobs,{days:14,cap:n}),i=g(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,B.jsxs)(`section`,{className:`card pad-md act-stat`,"aria-labelledby":`act-runs-h`,children:[(0,B.jsxs)(`div`,{className:`act-stat-head`,children:[(0,B.jsx)(`h2`,{id:`act-runs-h`,className:`act-lbl`,children:`Runs per day · 14 days`}),e&&(0,B.jsx)(`span`,{className:`act-big`,children:o})]}),t?(0,B.jsx)(v,{label:`Reading the job log…`}):e?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`div`,{className:`act-runs`,role:`img`,"aria-label":l,ref:i,children:r.map(e=>e.nodata?(0,B.jsx)(`i`,{className:`nodata`},e.key):e.n?(0,B.jsx)(`i`,{"data-sweep":!0,style:{height:`${e.n/a*100}%`},title:`${f(e.key)}: ${e.n}`},e.key):(0,B.jsx)(`i`,{className:`zero`},e.key))}),(0,B.jsxs)(`div`,{className:`mono act-axis`,"aria-hidden":`true`,children:[(0,B.jsx)(`span`,{children:f(r[0].key)}),(0,B.jsx)(`span`,{children:f(r[7].key)}),(0,B.jsx)(`span`,{children:`today`})]}),c&&(0,B.jsxs)(`span`,{className:`dim act-xs`,children:[`Hatched: older than the runs the log keeps`,n?` (last ${n})`:``,`.`]})]}):(0,B.jsx)(`p`,{className:`dim act-sm`,children:`The job log could not be read.`})]})}function ge({rows:e,gates:t,loading:n}){let r=e.reduce((e,t)=>e+t.n,0);return(0,B.jsxs)(`section`,{className:`card pad-md act-stat`,"aria-labelledby":`act-gates-h`,children:[(0,B.jsxs)(`div`,{className:`act-stat-head`,children:[(0,B.jsx)(`h2`,{id:`act-gates-h`,className:`act-lbl`,children:`Gate asks by rule · 30 days`}),t&&(0,B.jsx)(`span`,{className:`act-big`,children:r})]}),n?(0,B.jsx)(v,{label:`Reading the gate ledger…`}):e.length?(0,B.jsx)(`ul`,{className:`gate-rows`,children:e.slice(0,6).map((e,t)=>(0,B.jsxs)(`li`,{children:[(0,B.jsxs)(`span`,{className:`act-ell`,children:[e.name,` `,(0,B.jsx)(`span`,{className:`mono dim act-xs`,children:e.rule})]}),(0,B.jsx)(b,{vals:e.per_day,i:t,sweep:!0}),(0,B.jsx)(`span`,{className:`mono`,children:e.n})]},e.rule))}):(0,B.jsx)(`p`,{className:`dim act-sm`,children:t?`No gate asked in 30 days.`:`The gate ledger could not be read.`})]})}var _e={done:[`ok`,`done`],failed:[`bad`,`failed`],running:[``,`running`]};function ve({job:e,longest:t}){let n=o(e),r=e.duration?Math.round(e.duration*10)/10:0,[i,a]=_e[e.status]||[``,e.status||`…`],s=e.status===`running`?`Still running`:r?`Took ${r} second${r===1?``:`s`}`:`No duration`,c=e.started?new Date(e.started*1e3).toLocaleTimeString(`en-GB`,{hour:`2-digit`,minute:`2-digit`}):`—`;return(0,B.jsxs)(`li`,{className:`act-row`,children:[(0,B.jsx)(`span`,{className:`mono dim act-xs`,children:c}),(0,B.jsx)(x,{name:`play`,className:`glyph act-glyph`}),(0,B.jsxs)(`span`,{className:`act-what`,children:[(0,B.jsx)(`span`,{className:`act-row-title`,children:n.verb}),n.scope&&(0,B.jsx)(`span`,{className:`dim act-xs act-ell`,title:n.command,children:n.scope})]}),(0,B.jsx)(`span`,{className:`act-dur`,role:`img`,"aria-label":s,children:(0,B.jsx)(`span`,{"data-sweep":!0,style:{width:t>0?`${(e.duration||0)/t*100}%`:`0%`}})}),(0,B.jsx)(`span`,{className:`badge ${i}`,children:a})]})}function ye({gate:e}){return(0,B.jsxs)(`li`,{className:`act-row gate`,children:[(0,B.jsx)(`span`,{className:`mono dim act-xs`,children:`—`}),(0,B.jsx)(x,{name:`rule`,className:`glyph act-glyph t-warn`}),(0,B.jsxs)(`span`,{className:`act-what`,children:[(0,B.jsx)(`span`,{className:`act-row-title`,children:e.title}),(0,B.jsx)(`span`,{className:`dim act-xs`,children:`Gate ledger`})]}),(0,B.jsx)(`span`,{className:`act-dur-none`,"aria-hidden":`true`}),(0,B.jsx)(`span`,{className:`badge warn`,children:`asked`})]})}var be=5,xe=(e,t)=>[...new Set([...e.filter(Boolean),t].filter(Boolean))];function Se(){let[e,t]=(0,z.useState)(null),[n,a]=(0,z.useState)(``),[o,s]=(0,z.useState)(fe),[c,d]=(0,z.useState)(!1),[f,m]=(0,z.useState)(``),h=(0,z.useRef)(null),b=e=>{let t={...o,...e};s(t),pe(t)};ie(e=>r.activity().then(n=>{if(e()){t(n),a(``);let e=ue(h,n?.activity);e&&m(t=>t===e?e+`\xA0`:e)}},t=>{e()&&a(t.message)}),2e3,[]);let x=_(()=>$(r.jobs()),[]),C=_(()=>$(r.gates()),[]),w=_(()=>$(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(l).length:null,re=new Set(D.map(F)),j=o.v===`list`?O(e?.ended,E).filter(e=>!re.has(F(e))):[],M=xe([...D,...j].map(e=>e.host),o.host),N=xe([...D,...j].map(e=>y(e.cwd)),o.project),P=o.host&&o.project?`host or project`:o.host?`host`:o.project?`project`:``,I=e=>(!o.host||e.host===o.host)&&(!o.project||y(e.cwd)===o.project),L=D.filter(e=>I(e)&&(o.f!==`needs`||l(e))),R=o.f===`all`||o.f===`needs`,V=o.f===`all`&&T?j.filter(I):[],H=c?V:V.slice(0,be),U=!P&&(o.f===`all`||o.f===`runs`),W=!P&&(o.f===`all`||o.f===`gates`),G=x.data?.jobs||[],K=ne(C.data,w.data),q=p(G,K,C.data?.days).map(e=>({...e,runs:U?e.runs:[],gate:W?e.gate:null})).filter(e=>e.runs.length||e.gate),J=Math.max(0,...G.map(e=>e.duration||0)),Y=g(q.flatMap(e=>e.runs.map(e=>`${e.id}:${e.duration}`)).join(`,`),`scaleX`),X=async e=>{let n=!e.enabled;try{let i=await r.activityToggle(n,{host:e.host,path:e.path});if(i.ok===!1){a(i.error||`Could not change tracking`);return}let o=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:o(t?.activity),ended:o(t?.ended)}}),a(``)}catch(e){a(e.message)}},Z=(e,t,n)=>(0,B.jsxs)(`span`,{className:`row gap-8 act-sm`,children:[(0,B.jsx)(`label`,{htmlFor:`act-f-${e}`,children:t}),(0,B.jsxs)(`select`,{id:`act-f-${e}`,className:`sel`,value:o[e],disabled:n.length===0,title:n.length===0?`No source carries a ${e} yet`:void 0,onChange:t=>b({[e]:t.target.value}),children:[(0,B.jsxs)(`option`,{value:``,children:[`All `,e===`host`?`hosts`:`projects`]}),n.map(e=>(0,B.jsx)(`option`,{value:e,children:e},e))]})]});return(0,B.jsxs)(`div`,{className:`page-fill`,children:[(0,B.jsx)(u,{title:`Activity`,sub:`What your agents ran, what the gates asked, and which sessions are waiting on you.`}),(0,B.jsx)(`div`,{className:`sr-only`,"aria-live":`polite`,children:f}),n&&(0,B.jsx)(`div`,{className:`act-gap`,children:(0,B.jsx)(te,{error:n})}),e&&(0,B.jsx)(me,{enabled:T,installs:E,onToggle:X}),(0,B.jsxs)(`div`,{className:`act-today`,children:[(0,B.jsx)(he,{jobs:x.data,loading:x.loading}),(0,B.jsx)(ge,{rows:K,gates:C.data,loading:C.loading}),(0,B.jsxs)(`section`,{className:`card pad-md act-stat`,"aria-labelledby":`act-wait-h`,children:[(0,B.jsx)(`h2`,{id:`act-wait-h`,className:`act-lbl`,children:`Waiting on you`}),!e&&!n?(0,B.jsx)(v,{}):e?(0,B.jsxs)(B.Fragment,{children:[T?(0,B.jsxs)(`span`,{className:`act-big act-wait`,children:[A,` `,(0,B.jsx)(`span`,{className:`dim act-sm`,children:A===1?`session`:`sessions`})]}):null,(0,B.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,B.jsx)(`p`,{className:`dim act-sm`,children:`The sessions could not be read.`})]})]}),(0,B.jsxs)(`div`,{className:`row wrap gap-8 act-filters`,children:[(0,B.jsx)(`div`,{role:`group`,"aria-label":`Filter`,className:`row wrap gap-8`,children:de.map(([e,t])=>(0,B.jsxs)(`button`,{type:`button`,className:o.f===e?`chip-f on`:`chip-f`,"aria-pressed":o.f===e,onClick:()=>b({f:e}),children:[t,e===`needs`&&A>0?(0,B.jsxs)(`span`,{className:`mono`,children:[` `,A]}):null]},e))}),Z(`host`,`Host`,M),Z(`project`,`Project`,N),(0,B.jsx)(ee,{"aria-label":`Live sessions view`,children:[[`list`,`List`],[`garden`,`Garden`]].map(([e,t])=>(0,B.jsx)(`button`,{type:`button`,className:o.v===e?`on`:``,"aria-pressed":o.v===e,onClick:()=>b({v:e}),children:t},e))})]}),P&&o.f!==`needs`&&(0,B.jsxs)(`p`,{className:`dim act-sm`,children:[`Runs and gate asks carry no `,P,`; showing sessions only.`]}),R&&(e?!T&&o.f!==`needs`?null:L.length===0?o.f===`needs`?(0,B.jsx)(S,{title:`Nothing waits on you`}):(0,B.jsx)(S,{title:`No active sessions`,children:`Start an agent session and it appears here.`}):o.v===`garden`?(0,B.jsx)(oe,{sessions:L,collisions:e.collisions}):(0,B.jsx)(`div`,{className:`stack gap-12 act-live`,ref:k,children:L.map(e=>(0,B.jsx)(`div`,{"data-flip":F(e),children:(0,B.jsx)(ce,{s:e})},F(e)))}):(0,B.jsx)(v,{label:`Reading live sessions…`})),V.length>0&&(0,B.jsxs)(`section`,{className:`stack gap-12 act-live act-ended`,"aria-labelledby":`act-ended-h`,children:[(0,B.jsx)(`h2`,{id:`act-ended-h`,className:`act-lbl`,children:`Recently ended`}),H.map(e=>(0,B.jsx)(`div`,{children:(0,B.jsx)(ce,{s:e})},F(e))),V.length>be&&(0,B.jsx)(`button`,{type:`button`,className:`btn ghost sm`,"aria-expanded":c,onClick:()=>d(e=>!e),children:c?`Show fewer`:`Show all ${V.length}`})]}),o.f!==`needs`&&(0,B.jsx)(`section`,{"aria-label":`Feed`,className:`stack gap-16 act-feed`,ref:Y,children:q.map(e=>(0,B.jsxs)(`section`,{className:`card act-day`,children:[(0,B.jsxs)(`h3`,{className:`act-day-h`,children:[(0,B.jsx)(`span`,{children:e.title}),(0,B.jsx)(`span`,{className:`mono dim`,children:e.sum})]}),(0,B.jsxs)(`ul`,{className:`act-rows`,children:[e.runs.map(e=>(0,B.jsx)(ve,{job:e,longest:J},e.id)),e.gate&&(0,B.jsx)(ye,{gate:e.gate})]})]},e.key))})]})}export{Se as default};
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{A as a,B as o,D as s,Et as c,F as l,G as u,I as d,L as f,N as p,O as m,P as h,R as g,bt as _,it as v,j as y,k as b,ot as ee,rt as te,u as ne,wt as x}from"./index-DsLmKHw0.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 re,n as j,o as M,p as N,r as P,s as F,t as I,u as L,v as R}from"./Bonsai-B01lLf0m.js";import{t as ie}from"./usePoll-o8ul-Sog.js";var z=e(t(),1),B=n(),V=4,H=56*V,U=24,W=165,G=188,K=(e,t)=>e>0?Math.max(1,Math.floor((e-32+U)/(H+U))):Math.max(1,t),q=e=>e.status===`blocked`?`bad`:l(e)?`warn`:e.status===`busy`?`ok`:``,J=e=>{let t=A(e);return t==null?null:Math.round(t*100)};function Y(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=J(e);return[`${e.title||y(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 X({s:e,t,mine:n}){let r=J(e);return(0,B.jsxs)(`div`,{className:`card gd-card`,children:[(0,B.jsxs)(`dl`,{className:`gd-facts`,children:[e.model&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`dt`,{children:`model`}),(0,B.jsx)(`dd`,{className:`mono`,children:e.model})]}),(0,B.jsx)(`dt`,{children:`turns`}),(0,B.jsx)(`dd`,{children:e.turns||0}),(0,B.jsx)(`dt`,{children:`context`}),(0,B.jsx)(`dd`,{children:r==null?`unknown`:`${r} %`}),(0,B.jsx)(`dt`,{children:`compactions`}),(0,B.jsx)(`dd`,{children:e.compactions||0})]}),t.fallen.length>0&&(0,B.jsxs)(`div`,{className:`dim act-xs`,children:[`finished: `,t.fallen.map(e=>`${e.type||`agent`} (${e.files.length})`).join(`, `)]}),n.map(e=>(0,B.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=R(e,n),c=(0,z.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=F(e),m=e.title||y(e.cwd)||e.session_id,h=J(e),g=(0,z.useRef)(null),_=(0,z.useCallback)(e=>a(p,e,Q(g.current)),[a,p]);return(0,B.jsxs)(`a`,{ref:g,className:`gd-tree${l(e)?` gd-needs`:``}`,href:e.href||L(e.session_id),"aria-label":Y(e,c,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,c.pads.length,i,_),children:[(0,B.jsx)(P,{t:c,pad:i,swaying:f,onPad:_,px:V}),(0,B.jsxs)(`div`,{className:`gd-cap`,children:[(0,B.jsx)(`div`,{className:`gd-title`,title:m,children:m}),(0,B.jsxs)(`div`,{className:`row wrap gd-pills`,children:[(0,B.jsx)(`span`,{className:`badge mono`,title:`The install this session runs in`,children:e.chip||e.host||`?`}),(0,B.jsx)(`span`,{className:`badge ${q(e)}`,children:u.label}),t&&(0,B.jsxs)(`span`,{className:`badge mono`,children:[`⎇ `,t]}),d&&(0,B.jsxs)(`span`,{className:`badge`,children:[`↻ `,d.title,d.iteration==null?``:` ${d.iteration}`]}),e.attribution===!1&&(0,B.jsx)(`span`,{className:`badge`,title:`attribution unavailable on ${e.host}`,children:`no attrib.`})]}),(0,B.jsxs)(`div`,{className:`mono gd-meta`,children:[e.turns||0,` turns`,h==null?``:` · ${h}%`]})]})]})}function ae({pairs:e,count:t}){if(!e.length)return null;let n=t*H+(t-1)*U,r=e=>e*(H+U)+H/2;return(0,B.jsx)(`svg`,{className:`gd-threads`,width:n,height:56*V+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,B.jsxs)(`g`,{className:o,children:[(0,B.jsx)(`path`,{d:`M${e} ${W} C${n} 179 ${n} 159 ${t} 169`}),(0,B.jsx)(`path`,{d:`M${e} 169 C${n} 159 ${n} 179 ${t} ${W}`})]},`${i}-${a}`)}return(0,B.jsx)(`g`,{className:o,children:(0,B.jsx)(`path`,{d:`M${r(i)} ${G} Q${(r(i)+r(a))/2} 222 ${r(a)} ${G}`})},`${i}-${a}`)})})}var Q=e=>e.offsetLeft;function oe({sessions:e,collisions:t}){let[n,r]=(0,z.useState)(M),[i,a]=(0,z.useState)(()=>new Set),o=()=>{let e=!n;r(e);try{window.localStorage.setItem(j,e?`1`:`0`)}catch{}},s=Array.isArray(t)?t:[],c=T(N(e)).map(e=>i.has(e.key)?{...e,collapsed:!1}:e),l=c.filter(e=>e.collapsed),u=e=>D(e,s);return(0,B.jsxs)(`section`,{className:`gd`,"aria-label":`Garden`,children:[(0,B.jsxs)(`div`,{className:`row between wrap gap-8 gd-head`,children:[(0,B.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,B.jsx)(`button`,{type:`button`,className:n?`chip-f on`:`chip-f`,"aria-pressed":n,onClick:o,children:`Pink blossom`})]}),l.length>0&&(0,B.jsx)(`div`,{className:`row wrap gap-8 gd-chips`,role:`group`,"aria-label":`Folded shelves`,children:l.map(e=>(0,B.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,B.jsx)(se,{sh:e,sakura:n,cols:s,mineOf:u},e.key))]})}function se({sh:e,sakura:t,cols:n,mineOf:r}){let[i,a]=(0,z.useState)({sid:null,pad:null,x:0}),o=(0,z.useCallback)((e,t,n)=>a(r=>({sid:e,pad:t,x:n??(r.sid===e?r.x:0)})),[]),s=(0,z.useRef)(null),[c,l]=(0,z.useState)(0);(0,z.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=K(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=>F(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,B.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,B.jsxs)(`div`,{className:`gd-row`,children:[(0,B.jsx)(`div`,{className:`gd-plank`,children:n===0&&(0,B.jsxs)(`h3`,{className:`gd-plate`,children:[e.name,` · `,_,` session`,_===1?``:`s`]})}),a.map(({s:e,worktree:n})=>(0,B.jsx)(Z,{s:e,worktree:n,sakura:t,mine:r(F(e)),pad:F(e)===i.sid?i.pad:null,onHover:o},F(e))),(0,B.jsx)(ae,{pairs:c,count:a.length}),m&&p>=n&&p<s&&(0,B.jsx)(`div`,{className:`gd-info`,"aria-hidden":`true`,style:{left:Math.max(0,i.x)},children:g?(0,B.jsx)(I,{pad:g}):(0,B.jsx)(X,{s:m,t:h,mine:r(F(m))})})]},n)}),(0,B.jsx)(`span`,{className:`sr-only`,role:`status`,children:w(g)})]})}var $=e=>e.catch(()=>null);function ce({s:e}){let t=(0,z.useId)(),n=e.todos,r=h(e);return(0,B.jsxs)(`a`,{className:`card pad-md act-card`,href:e.href||L(e.session_id),"aria-labelledby":`${t}-t ${t}-st`,"aria-describedby":r?`${t}-c`:void 0,children:[(0,B.jsxs)(m,{s:e,id:t,heading:e.title||y(e.cwd)||e.session_id,children:[e.chip&&(0,B.jsx)(`span`,{className:`badge mono`,title:`The install this session runs in`,children:e.chip}),(0,B.jsx)(_,{name:`chevron`,className:`glyph act-chev`})]}),n&&n.total>0&&(0,B.jsx)(`div`,{className:`act-foot`,children:(0,B.jsxs)(`span`,{className:`row gap-8 dim act-sm`,children:[(0,B.jsx)(a,{done:n.done,total:n.total}),`plan `,n.done,`/`,n.total]})}),(0,B.jsxs)(`div`,{className:`dim mono act-updated`,children:[`updated `,x(e.updated_at),` ago`]})]})}var le={blocked:`is blocked`,"waiting-input":`waits for your answer`};function ue(e,t){if(!Array.isArray(t))return``;let n=t.filter(l),r=e.current;return e.current=new Set(n.map(e=>`${F(e)}:${e.status}`)),r?n.filter(e=>!r.has(`${F(e)}:${e.status}`)).map(e=>`${e.title||y(e.cwd)||e.session_id} ${le[e.status]}`).join(`. `):``}var de=[[`all`,`All`],[`needs`,`Needs you`],[`runs`,`Runs`],[`gates`,`Gate asks`]];function fe(){let e=new URLSearchParams(window.location.hash.split(`?`)[1]||``),t=e.get(`f`);return{f:de.some(([e])=>e===t)?t:`all`,host:e.get(`host`)||``,project:e.get(`project`)||``,v:e.get(`v`)===`list`?`list`:`garden`}}function pe(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 me({enabled:e,installs:t,onToggle:n}){let r=re(t);return(0,B.jsxs)(`section`,{className:`card pad-md act-track`,"aria-labelledby":`act-track-h`,children:[(0,B.jsx)(_,{name:`activity`,className:`glyph act-fixed`}),(0,B.jsxs)(`div`,{className:`act-grow`,children:[(0,B.jsx)(`h2`,{id:`act-track-h`,className:`act-track-title`,children:e?`Live sessions are on`:`Live sessions are off`}),!e&&(0,B.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,B.jsxs)(`ul`,{className:`stack gap-8 act-fixed act-sm`,"aria-label":`Tracking per install`,children:[t.length===0&&(0,B.jsx)(`li`,{className:`dim`,children:`No active install to track.`}),t.map((e,t)=>(0,B.jsxs)(`li`,{className:`row gap-10`,children:[(0,B.jsxs)(`span`,{id:`act-track-l${t}`,title:e.path,children:[`Track live sessions in `,(0,B.jsx)(`span`,{className:`mono`,children:r.get(e.install)})]}),(0,B.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 he({jobs:e,loading:t}){let n=typeof e?.cap==`number`?e.cap:void 0,r=d(e?.jobs,{days:14,cap:n}),i=g(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,B.jsxs)(`section`,{className:`card pad-md act-stat`,"aria-labelledby":`act-runs-h`,children:[(0,B.jsxs)(`div`,{className:`act-stat-head`,children:[(0,B.jsx)(`h2`,{id:`act-runs-h`,className:`act-lbl`,children:`Runs per day · 14 days`}),e&&(0,B.jsx)(`span`,{className:`act-big`,children:o})]}),t?(0,B.jsx)(v,{label:`Reading the job log…`}):e?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`div`,{className:`act-runs`,role:`img`,"aria-label":l,ref:i,children:r.map(e=>e.nodata?(0,B.jsx)(`i`,{className:`nodata`},e.key):e.n?(0,B.jsx)(`i`,{"data-sweep":!0,style:{height:`${e.n/a*100}%`},title:`${f(e.key)}: ${e.n}`},e.key):(0,B.jsx)(`i`,{className:`zero`},e.key))}),(0,B.jsxs)(`div`,{className:`mono act-axis`,"aria-hidden":`true`,children:[(0,B.jsx)(`span`,{children:f(r[0].key)}),(0,B.jsx)(`span`,{children:f(r[7].key)}),(0,B.jsx)(`span`,{children:`today`})]}),c&&(0,B.jsxs)(`span`,{className:`dim act-xs`,children:[`Hatched: older than the runs the log keeps`,n?` (last ${n})`:``,`.`]})]}):(0,B.jsx)(`p`,{className:`dim act-sm`,children:`The job log could not be read.`})]})}function ge({rows:e,gates:t,loading:n}){let r=e.reduce((e,t)=>e+t.n,0);return(0,B.jsxs)(`section`,{className:`card pad-md act-stat`,"aria-labelledby":`act-gates-h`,children:[(0,B.jsxs)(`div`,{className:`act-stat-head`,children:[(0,B.jsx)(`h2`,{id:`act-gates-h`,className:`act-lbl`,children:`Gate asks by rule · 30 days`}),t&&(0,B.jsx)(`span`,{className:`act-big`,children:r})]}),n?(0,B.jsx)(v,{label:`Reading the gate ledger…`}):e.length?(0,B.jsx)(`ul`,{className:`gate-rows`,children:e.slice(0,6).map((e,t)=>(0,B.jsxs)(`li`,{children:[(0,B.jsxs)(`span`,{className:`act-ell`,children:[e.name,` `,(0,B.jsx)(`span`,{className:`mono dim act-xs`,children:e.rule})]}),(0,B.jsx)(b,{vals:e.per_day,i:t,sweep:!0}),(0,B.jsx)(`span`,{className:`mono`,children:e.n})]},e.rule))}):(0,B.jsx)(`p`,{className:`dim act-sm`,children:t?`No gate asked in 30 days.`:`The gate ledger could not be read.`})]})}var _e={done:[`ok`,`done`],failed:[`bad`,`failed`],running:[``,`running`]};function ve({job:e,longest:t}){let n=o(e),r=e.duration?Math.round(e.duration*10)/10:0,[i,a]=_e[e.status]||[``,e.status||`…`],s=e.status===`running`?`Still running`:r?`Took ${r} second${r===1?``:`s`}`:`No duration`,c=e.started?new Date(e.started*1e3).toLocaleTimeString(`en-GB`,{hour:`2-digit`,minute:`2-digit`}):`—`;return(0,B.jsxs)(`li`,{className:`act-row`,children:[(0,B.jsx)(`span`,{className:`mono dim act-xs`,children:c}),(0,B.jsx)(_,{name:`play`,className:`glyph act-glyph`}),(0,B.jsxs)(`span`,{className:`act-what`,children:[(0,B.jsx)(`span`,{className:`act-row-title`,children:n.verb}),n.scope&&(0,B.jsx)(`span`,{className:`dim act-xs act-ell`,title:n.command,children:n.scope})]}),(0,B.jsx)(`span`,{className:`act-dur`,role:`img`,"aria-label":s,children:(0,B.jsx)(`span`,{"data-sweep":!0,style:{width:t>0?`${(e.duration||0)/t*100}%`:`0%`}})}),(0,B.jsx)(`span`,{className:`badge ${i}`,children:a})]})}function ye({gate:e}){return(0,B.jsxs)(`li`,{className:`act-row gate`,children:[(0,B.jsx)(`span`,{className:`mono dim act-xs`,children:`—`}),(0,B.jsx)(_,{name:`rule`,className:`glyph act-glyph t-warn`}),(0,B.jsxs)(`span`,{className:`act-what`,children:[(0,B.jsx)(`span`,{className:`act-row-title`,children:e.title}),(0,B.jsx)(`span`,{className:`dim act-xs`,children:`Gate ledger`})]}),(0,B.jsx)(`span`,{className:`act-dur-none`,"aria-hidden":`true`}),(0,B.jsx)(`span`,{className:`badge warn`,children:`asked`})]})}var be=5,xe=(e,t)=>[...new Set([...e.filter(Boolean),t].filter(Boolean))];function Se(){let[e,t]=(0,z.useState)(null),[n,a]=(0,z.useState)(``),[o,s]=(0,z.useState)(fe),[d,f]=(0,z.useState)(!1),[m,h]=(0,z.useState)(``),_=(0,z.useRef)(null),b=e=>{let t={...o,...e};s(t),pe(t)};ie(e=>r.activity().then(n=>{if(e()){t(n),a(``);let e=ue(_,n?.activity);e&&h(t=>t===e?e+`\xA0`:e)}},t=>{e()&&a(t.message)}),2e3,[]);let x=c(()=>$(r.jobs()),[]),C=c(()=>$(r.gates()),[]),w=c(()=>$(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(l).length:null,re=new Set(D.map(F)),j=o.v===`list`?O(e?.ended,E).filter(e=>!re.has(F(e))):[],M=xe([...D,...j].map(e=>e.host),o.host),N=xe([...D,...j].map(e=>y(e.cwd)),o.project),P=o.host&&o.project?`host or project`:o.host?`host`:o.project?`project`:``,I=e=>(!o.host||e.host===o.host)&&(!o.project||y(e.cwd)===o.project),L=D.filter(e=>I(e)&&(o.f!==`needs`||l(e))),R=o.f===`all`||o.f===`needs`,V=o.f===`all`&&T?j.filter(I):[],H=d?V:V.slice(0,be),U=!P&&(o.f===`all`||o.f===`runs`),W=!P&&(o.f===`all`||o.f===`gates`),G=x.data?.jobs||[],K=ne(C.data,w.data),q=p(G,K,C.data?.days).map(e=>({...e,runs:U?e.runs:[],gate:W?e.gate:null})).filter(e=>e.runs.length||e.gate),J=Math.max(0,...G.map(e=>e.duration||0)),Y=g(q.flatMap(e=>e.runs.map(e=>`${e.id}:${e.duration}`)).join(`,`),`scaleX`),X=async e=>{let n=!e.enabled;try{let i=await r.activityToggle(n,{host:e.host,path:e.path});if(i.ok===!1){a(i.error||`Could not change tracking`);return}let o=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:o(t?.activity),ended:o(t?.ended)}}),a(``)}catch(e){a(e.message)}},Z=(e,t,n)=>(0,B.jsxs)(`span`,{className:`row gap-8 act-sm`,children:[(0,B.jsx)(`label`,{htmlFor:`act-f-${e}`,children:t}),(0,B.jsxs)(`select`,{id:`act-f-${e}`,className:`sel`,value:o[e],disabled:n.length===0,title:n.length===0?`No source carries a ${e} yet`:void 0,onChange:t=>b({[e]:t.target.value}),children:[(0,B.jsxs)(`option`,{value:``,children:[`All `,e===`host`?`hosts`:`projects`]}),n.map(e=>(0,B.jsx)(`option`,{value:e,children:e},e))]})]});return(0,B.jsxs)(`div`,{className:`page-fill`,children:[(0,B.jsx)(u,{title:`Activity`,sub:`What your agents ran, what the gates asked, and which sessions are waiting on you.`}),(0,B.jsx)(`div`,{className:`sr-only`,"aria-live":`polite`,children:m}),n&&(0,B.jsx)(`div`,{className:`act-gap`,children:(0,B.jsx)(te,{error:n})}),e&&(0,B.jsx)(me,{enabled:T,installs:E,onToggle:X}),(0,B.jsxs)(`div`,{className:`act-today`,children:[(0,B.jsx)(he,{jobs:x.data,loading:x.loading}),(0,B.jsx)(ge,{rows:K,gates:C.data,loading:C.loading}),(0,B.jsxs)(`section`,{className:`card pad-md act-stat`,"aria-labelledby":`act-wait-h`,children:[(0,B.jsx)(`h2`,{id:`act-wait-h`,className:`act-lbl`,children:`Waiting on you`}),!e&&!n?(0,B.jsx)(v,{}):e?(0,B.jsxs)(B.Fragment,{children:[T?(0,B.jsxs)(`span`,{className:`act-big act-wait`,children:[A,` `,(0,B.jsx)(`span`,{className:`dim act-sm`,children:A===1?`session`:`sessions`})]}):null,(0,B.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,B.jsx)(`p`,{className:`dim act-sm`,children:`The sessions could not be read.`})]})]}),(0,B.jsxs)(`div`,{className:`row wrap gap-8 act-filters`,children:[(0,B.jsx)(`div`,{role:`group`,"aria-label":`Filter`,className:`row wrap gap-8`,children:de.map(([e,t])=>(0,B.jsxs)(`button`,{type:`button`,className:o.f===e?`chip-f on`:`chip-f`,"aria-pressed":o.f===e,onClick:()=>b({f:e}),children:[t,e===`needs`&&A>0?(0,B.jsxs)(`span`,{className:`mono`,children:[` `,A]}):null]},e))}),Z(`host`,`Host`,M),Z(`project`,`Project`,N),(0,B.jsx)(ee,{"aria-label":`Live sessions view`,children:[[`list`,`List`],[`garden`,`Garden`]].map(([e,t])=>(0,B.jsx)(`button`,{type:`button`,className:o.v===e?`on`:``,"aria-pressed":o.v===e,onClick:()=>b({v:e}),children:t},e))})]}),P&&o.f!==`needs`&&(0,B.jsxs)(`p`,{className:`dim act-sm`,children:[`Runs and gate asks carry no `,P,`; showing sessions only.`]}),R&&(e?!T&&o.f!==`needs`?null:L.length===0?o.f===`needs`?(0,B.jsx)(S,{title:`Nothing waits on you`}):(0,B.jsx)(S,{title:`No active sessions`,children:`Start an agent session and it appears here.`}):o.v===`garden`?(0,B.jsx)(oe,{sessions:L,collisions:e.collisions}):(0,B.jsx)(`div`,{className:`stack gap-12 act-live`,ref:k,children:L.map(e=>(0,B.jsx)(`div`,{"data-flip":F(e),children:(0,B.jsx)(ce,{s:e})},F(e)))}):(0,B.jsx)(v,{label:`Reading live sessions…`})),V.length>0&&(0,B.jsxs)(`section`,{className:`stack gap-12 act-live act-ended`,"aria-labelledby":`act-ended-h`,children:[(0,B.jsx)(`h2`,{id:`act-ended-h`,className:`act-lbl`,children:`Recently ended`}),H.map(e=>(0,B.jsx)(`div`,{children:(0,B.jsx)(ce,{s:e})},F(e))),V.length>be&&(0,B.jsx)(`button`,{type:`button`,className:`btn ghost sm`,"aria-expanded":d,onClick:()=>f(e=>!e),children:d?`Show fewer`:`Show all ${V.length}`})]}),o.f!==`needs`&&(0,B.jsx)(`section`,{"aria-label":`Feed`,className:`stack gap-16 act-feed`,ref:Y,children:q.map(e=>(0,B.jsxs)(`section`,{className:`card act-day`,children:[(0,B.jsxs)(`h3`,{className:`act-day-h`,children:[(0,B.jsx)(`span`,{children:e.title}),(0,B.jsx)(`span`,{className:`mono dim`,children:e.sum})]}),(0,B.jsxs)(`ul`,{className:`act-rows`,children:[e.runs.map(e=>(0,B.jsx)(ve,{job:e,longest:J},e.id)),e.gate&&(0,B.jsx)(ye,{gate:e.gate})]})]},e.key))})]})}export{Se as default};