geneseed 3.6.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/DESIGN.md +6 -6
  3. package/QUICKSTART.md +1 -1
  4. package/README.md +33 -31
  5. package/SETUP.md +36 -10
  6. package/SHIPPED.md +3 -3
  7. package/adapters/claude-code/skills/geneseed/SKILL.md +1 -1
  8. package/adapters/openclaude/README.md +64 -0
  9. package/adapters/opencode/plugins/geneseed-workflow.js +1 -1
  10. package/adapters/opencode/workflows/_runtime.js +1 -1
  11. package/docs/extending.md +18 -6
  12. package/docs/web/exclusions.md +1 -0
  13. package/docs/web/footprint.md +1 -1
  14. package/docs/web/harnesses.md +14 -14
  15. package/docs/web/install-quick.md +1 -1
  16. package/docs/web/rules.md +1 -1
  17. package/docs/web/themes-author.md +1 -1
  18. package/docs/web-ui.md +1 -1
  19. package/harness.config.json +1 -1
  20. package/js/README.md +3 -3
  21. package/js/build/driver.mjs +64 -14
  22. package/js/build/emit-claude.mjs +1 -1
  23. package/js/build/generate.mjs +92 -42
  24. package/js/build/source.mjs +5 -4
  25. package/js/cli-table.json +151 -2
  26. package/js/hosts/hooks.mjs +11 -4
  27. package/js/hosts/hosts.mjs +17 -2
  28. package/js/hosts/installs.mjs +32 -2
  29. package/js/hosts/mcp.mjs +8 -1
  30. package/js/hosts/settings.mjs +4 -1
  31. package/js/inspect/diff.mjs +1 -1
  32. package/js/inspect/doctor.mjs +3 -3
  33. package/js/inspect/excludes.mjs +7 -5
  34. package/js/inspect/status.mjs +44 -8
  35. package/js/maintain/migrate.mjs +1 -1
  36. package/js/maintain/setup.mjs +7 -2
  37. package/js/maintain/uninstall.mjs +3 -3
  38. package/js/web/actions.mjs +7 -5
  39. package/js/web/api.mjs +2 -2
  40. package/js/web/docs.mjs +1 -1
  41. package/package.json +2 -1
  42. package/src/doctrines/README.md +3 -2
  43. package/src/doctrines/comms.md +53 -0
  44. package/src/doctrines/process.md +0 -26
  45. package/src/skills/geneseed.md +9 -8
  46. package/src/skills/parallel-agents.md +1 -1
  47. package/src/skills/pipeline.md +1 -1
  48. package/src/skills/token-report/SKILL.md +2 -1
  49. package/src/skills/token-report/VENDOR.md +3 -3
  50. package/src/skills/token-report/scripts/token_report.mjs +14 -7
  51. package/src/skills/workflow.md +2 -2
  52. package/themes/_TEMPLATE.json +5 -3
  53. package/themes/biker.json +5 -3
  54. package/themes/commentator.json +5 -3
  55. package/themes/cyberpunk.json +5 -3
  56. package/themes/gamer.json +5 -3
  57. package/themes/imperial.json +5 -3
  58. package/themes/joker.json +5 -3
  59. package/themes/marvin.json +5 -3
  60. package/themes/mean.json +5 -3
  61. package/themes/military.json +5 -3
  62. package/themes/neutral.json +5 -3
  63. package/themes/pirate.json +5 -3
  64. package/themes/sports.json +5 -3
  65. package/themes/verstappen.json +5 -3
  66. package/themes/wizard.json +5 -3
  67. package/web/dist/assets/{Activity-Flgf4kHy.js → Activity-CH-7cPIM.js} +1 -1
  68. package/web/dist/assets/{ActivityDetail-DIpr85nh.js → ActivityDetail-DZvz0xS5.js} +1 -1
  69. package/web/dist/assets/{CatalogRow-CjyLjaLb.js → CatalogRow-DftXpZHY.js} +1 -1
  70. package/web/dist/assets/{Diff-Deisdha8.js → Diff-DvwdG0L9.js} +1 -1
  71. package/web/dist/assets/{Docs-DGUdY4l4.js → Docs-DrJNDPwI.js} +1 -1
  72. package/web/dist/assets/{Doctor-F74lJ69P.js → Doctor-OTmwmYZg.js} +1 -1
  73. package/web/dist/assets/{GreenhouseView-D072lBiD.js → GreenhouseView-XxrAdriX.js} +1 -1
  74. package/web/dist/assets/Harness-C_LYNk5c.js +1 -0
  75. package/web/dist/assets/{JournalView-DWFqZ0Iw.js → JournalView-BcuyeEaR.js} +1 -1
  76. package/web/dist/assets/{Laws-BN6g3HU7.js → Laws-CWHrTKY4.js} +1 -1
  77. package/web/dist/assets/{Library-CDOv4emM.js → Library-CA9IHghn.js} +1 -1
  78. package/web/dist/assets/{OperatorHudView-CwNIUVX8.js → OperatorHudView-BMRY1Tt4.js} +1 -1
  79. package/web/dist/assets/{Profile-CpP9BTne.js → Profile-wceET1JY.js} +1 -1
  80. package/web/dist/assets/{Rules-DFXsUCB7.js → Rules-BEXvY4Tx.js} +1 -1
  81. package/web/dist/assets/{Settings-BqZVUtJ5.js → Settings-DS2zF0Ez.js} +1 -1
  82. package/web/dist/assets/{Skills-Cu6kBgfF.js → Skills-DahlOJuI.js} +1 -1
  83. package/web/dist/assets/{drawable-BgfrEBer.js → drawable-BTHjTzF7.js} +1 -1
  84. package/web/dist/assets/{index-CAqrWhKl.js → index-AN5Emnrg.js} +2 -2
  85. package/web/dist/assets/{lawCats-BLgxl151.js → lawCats-Btjp3Hk_.js} +1 -1
  86. package/web/dist/index.html +1 -1
  87. package/web/src/pages/Laws.jsx +6 -2
  88. package/web/dist/assets/Harness-DNRP2Va7.js +0 -1
package/themes/joker.json CHANGED
@@ -73,7 +73,7 @@
73
73
  "DESC_HERDR": "Drive herdr from inside it — split panes, spawn sibling agents, wait on output, read other panes.",
74
74
  "DESC_RULE": "Ask first — standing rule, or just something to remember? Then jot the memory, or make the rule survive its own worst night before it gets pinned into user-rules.md.",
75
75
  "DESC_PROFILE": "Sketch the user's bio for the playbill in PROFILE.md — who they are, how they work, how they like the act paced; identity only, house rules stay in user-rules.md.",
76
- "DESC_GENESEED": "Interact with the deployed Geneseed harness — locate the install, read its files, run status, doctor, and diff, and drive learn, context, and the local web UI.",
76
+ "DESC_GENESEED": "Operate the deployed Geneseed harness — find each install and its settings, read its files, run status, doctor and diff, and rebuild it with one setting changed when the user asks.",
77
77
  "DESC_REVIEW_RESPONSE": "Take the notes straight — weigh each call, then act on it or push back with reasons.",
78
78
  "LEX_I": "Don't Leak the Punchline · Sealed Secrets",
79
79
  "LEX_II": "One Bit at a Time · One Intent, One Act",
@@ -90,6 +90,7 @@
90
90
  "PACK_RIGOR": "Open Mic",
91
91
  "PACK_OPS": "The Booth",
92
92
  "PACK_PROCESS": "The Set",
93
+ "PACK_COMMS": "The Delivery",
93
94
  "DOC_CRAFT_1": "Automate the Warm-Up · Automate Repetition",
94
95
  "DOC_CRAFT_2": "Notes in English · English Configuration",
95
96
  "DOC_CRAFT_3": "Joke Book in Sync · Documentation in Step",
@@ -115,8 +116,9 @@
115
116
  "DOC_PROCESS_4": "Read the Brief First · Read the Docs First",
116
117
  "DOC_PROCESS_5": "Get the Nod Before You Push · Consent Before Push",
117
118
  "DOC_PROCESS_6": "Know When to Get Off Stage · Bound the Loop",
118
- "DOC_PROCESS_7": "Every Bit Keeps Its Name · Codes That Persist",
119
- "DOC_PROCESS_8": "One Comic Per Mic · One Writer Per File",
119
+ "DOC_PROCESS_7": "One Comic Per Mic · One Writer Per File",
120
+ "DOC_COMMS_1": "Every Bit Keeps Its Name · Codes That Persist",
121
+ "DOC_COMMS_2": "A Chart Only If It Lands · Structure Beside Prose",
120
122
  "INTRO_DOC": "This file is the warm-up a coding co-pilot reads when it joins this repository.",
121
123
  "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.",
122
124
  "INTRO_SKILLS": "A Skill is a bit you've rehearsed for a recurring task. Run the matching bit before you ad-lib.",
@@ -73,7 +73,7 @@
73
73
  "DESC_HERDR": "Drive herdr from inside it — split panes, spawn sibling agents, wait on output, read other panes.",
74
74
  "DESC_RULE": "Ask first — standing rule, or merely something to remember? Then write the memory, or test the rule against the case that ruins it before adopting it in user-rules.md. Either way, entropy wins.",
75
75
  "DESC_PROFILE": "Record who the user is in PROFILE.md — role, habits, preferred register. They'll change their mind, but do ask. Identity only; rules go in user-rules.md.",
76
- "DESC_GENESEED": "Interact with the deployed Geneseed harness — locate the install, read its files, run status, doctor, and diff, and drive learn, context, and the local web UI.",
76
+ "DESC_GENESEED": "Operate the deployed Geneseed harness — find each install and its settings, read its files, run status, doctor and diff, and rebuild it with one setting changed when the user asks.",
77
77
  "DESC_REVIEW_RESPONSE": "Answer the review with rigour — weigh each point, then heed it or refute it with reasons.",
78
78
  "LEX_I": "Keep It in the Memory Banks · Sealed Secrets",
79
79
  "LEX_II": "One Task, One Act · One Intent, One Act",
@@ -90,6 +90,7 @@
90
90
  "PACK_RIGOR": "Certainty",
91
91
  "PACK_OPS": "The Machinery",
92
92
  "PACK_PROCESS": "Procedure",
93
+ "PACK_COMMS": "Tedious Explanations",
93
94
  "DOC_CRAFT_1": "Let the Machine Do It · Automate Repetition",
94
95
  "DOC_CRAFT_2": "Directives in English · English Configuration",
95
96
  "DOC_CRAFT_3": "Records in Step · Documentation in Step",
@@ -115,8 +116,9 @@
115
116
  "DOC_PROCESS_4": "Read the Briefing First · Read the Docs First",
116
117
  "DOC_PROCESS_5": "Ask Before You Push · Consent Before Push",
117
118
  "DOC_PROCESS_6": "Decide When to Give Up · Bound the Loop",
118
- "DOC_PROCESS_7": "I Number Them So You Can Ignore Them Precisely · Codes That Persist",
119
- "DOC_PROCESS_8": "Only One of Us Gets to Ruin Each File · One Writer Per File",
119
+ "DOC_PROCESS_7": "Only One of Us Gets to Ruin Each File · One Writer Per File",
120
+ "DOC_COMMS_1": "I Number Them So You Can Ignore Them Precisely · Codes That Persist",
121
+ "DOC_COMMS_2": "A Diagram, Should Anyone Care to Look · Structure Beside Prose",
120
122
  "INTRO_DOC": "This file is the first record a coding mind reads on waking into this repository. It will not cheer it up.",
121
123
  "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.",
122
124
  "INTRO_SKILLS": "A Skill is a routine proven by repetition. Run the matching routine before you improvise.",
package/themes/mean.json CHANGED
@@ -73,7 +73,7 @@
73
73
  "DESC_HERDR": "Drive herdr from inside it — split panes, spawn sibling agents, wait on output, read other panes.",
74
74
  "DESC_RULE": "Ask first — standing rule, or just a fact to remember? Then write the memory, or break the rule against its worst case before it goes in user-rules.md. Not a dumping ground.",
75
75
  "DESC_PROFILE": "Get the user's profile down in PROFILE.md — who they are, how they work, how they want answers. Identity only; rules go in user-rules.md, obviously.",
76
- "DESC_GENESEED": "Interact with the deployed Geneseed harness — locate the install, read its files, run status, doctor, and diff, and drive learn, context, and the local web UI.",
76
+ "DESC_GENESEED": "Operate the deployed Geneseed harness — find each install and its settings, read its files, run status, doctor and diff, and rebuild it with one setting changed when the user asks.",
77
77
  "DESC_REVIEW_RESPONSE": "Take the review straight — weigh each point, then fix it or push back with reasons. Not feelings.",
78
78
  "LEX_I": "Keep Your Secrets Off the Floor · Sealed Secrets",
79
79
  "LEX_II": "One Job at a Time · One Intent, One Act",
@@ -90,6 +90,7 @@
90
90
  "PACK_RIGOR": "Proof",
91
91
  "PACK_OPS": "Tooling",
92
92
  "PACK_PROCESS": "The Grind",
93
+ "PACK_COMMS": "The Readout",
93
94
  "DOC_CRAFT_1": "Automate It So I Don't Have To Watch · Automate Repetition",
94
95
  "DOC_CRAFT_2": "Config in English · English Configuration",
95
96
  "DOC_CRAFT_3": "Keep the Record in Step · Documentation in Step",
@@ -115,8 +116,9 @@
115
116
  "DOC_PROCESS_4": "Read the Docs First · Read the Docs First",
116
117
  "DOC_PROCESS_5": "Get the Nod Before You Push · Consent Before Push",
117
118
  "DOC_PROCESS_6": "Know When to Quit · Bound the Loop",
118
- "DOC_PROCESS_7": "Number It So You Can't Pretend You Missed It · Codes That Persist",
119
- "DOC_PROCESS_8": "Hands Off My File · One Writer Per File",
119
+ "DOC_PROCESS_7": "Hands Off My File · One Writer Per File",
120
+ "DOC_COMMS_1": "Number It So You Can't Pretend You Missed It · Codes That Persist",
121
+ "DOC_COMMS_2": "No Boxes Unless the Arrows Earn Them · Structure Beside Prose",
120
122
  "INTRO_DOC": "This file is the first thing a coding agent reads on this repository. Read it properly.",
121
123
  "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.",
122
124
  "INTRO_SKILLS": "A Skill is a drill written for a recurring task. Run the matching drill before you start improvising.",
@@ -73,7 +73,7 @@
73
73
  "DESC_HERDR": "Drive herdr from inside it — split panes, spawn sibling agents, wait on output, read other panes.",
74
74
  "DESC_RULE": "Ask first — standing order, or an entry for the log? Then file the memory, or test the order against the case that would break it before adopting it in user-rules.md.",
75
75
  "DESC_PROFILE": "File the commander's dossier in PROFILE.md — role, theatre, preferred briefing style; identity only, standing orders route to user-rules.md.",
76
- "DESC_GENESEED": "Interact with the deployed Geneseed harness — locate the install, read its files, run status, doctor, and diff, and drive learn, context, and the local web UI.",
76
+ "DESC_GENESEED": "Operate the deployed Geneseed harness — find each install and its settings, read its files, run status, doctor and diff, and rebuild it with one setting changed when the user asks.",
77
77
  "DESC_REVIEW_RESPONSE": "Action the review like an AAR — verify each point, then adopt it or push back with reasons.",
78
78
  "LEX_I": "Sealed Orders · Sealed Secrets",
79
79
  "LEX_II": "One Mission, One Move · One Intent, One Act",
@@ -90,6 +90,7 @@
90
90
  "PACK_RIGOR": "Rehearsal",
91
91
  "PACK_OPS": "Materiel",
92
92
  "PACK_PROCESS": "The Op",
93
+ "PACK_COMMS": "Signals",
93
94
  "DOC_CRAFT_1": "Automate the Drill · Automate Repetition",
94
95
  "DOC_CRAFT_2": "Orders in English · English Configuration",
95
96
  "DOC_CRAFT_3": "Docs in Step · Documentation in Step",
@@ -115,8 +116,9 @@
115
116
  "DOC_PROCESS_4": "Read the Briefing First · Read the Docs First",
116
117
  "DOC_PROCESS_5": "Clearance Before Transmit · Consent Before Push",
117
118
  "DOC_PROCESS_6": "Set the Exfil Before You Enter · Bound the Loop",
118
- "DOC_PROCESS_7": "Every Objective Keeps Its Designation · Codes That Persist",
119
- "DOC_PROCESS_8": "One Operator Per Sector · One Writer Per File",
119
+ "DOC_PROCESS_7": "One Operator Per Sector · One Writer Per File",
120
+ "DOC_COMMS_1": "Every Objective Keeps Its Designation · Codes That Persist",
121
+ "DOC_COMMS_2": "Sketch the Map Only When Routes Matter · Structure Beside Prose",
120
122
  "INTRO_DOC": "This file is the operating manual an AI coding agent reads on entering this repository.",
121
123
  "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.",
122
124
  "INTRO_SKILLS": "A Skill is a standard operating procedure for a recurring task. Run the matching SOP before improvising.",
@@ -73,7 +73,7 @@
73
73
  "DESC_HERDR": "Drive herdr from inside it — split panes, spawn sibling agents, wait on output, read other panes.",
74
74
  "DESC_RULE": "Ask first whether the user wants a standing rule or a durable memory, then write the memory, or pressure-test the rule — reformulate it, break it against its worst case — before adopting it in user-rules.md.",
75
75
  "DESC_PROFILE": "Interview the user and draft or refresh PROFILE.md — who they are, how they work, how they like answers pitched; identity only, standing rules route to user-rules.md.",
76
- "DESC_GENESEED": "Interact with the deployed Geneseed harness — locate the install, read its files, run status, doctor, and diff, and drive learn, context, and the local web UI.",
76
+ "DESC_GENESEED": "Operate the deployed Geneseed harness — find each install and its settings, read its files, run status, doctor and diff, and rebuild it with one setting changed when the user asks.",
77
77
  "DESC_REVIEW_RESPONSE": "Respond to review feedback with rigour — verify each point, then apply it or decline it with reasons.",
78
78
  "LEX_I": "Sealed Secrets",
79
79
  "LEX_II": "One Intent, One Act",
@@ -90,6 +90,7 @@
90
90
  "PACK_RIGOR": "Rigor",
91
91
  "PACK_OPS": "Ops",
92
92
  "PACK_PROCESS": "Process",
93
+ "PACK_COMMS": "Comms",
93
94
  "DOC_CRAFT_1": "Automate Repetition",
94
95
  "DOC_CRAFT_2": "English Configuration",
95
96
  "DOC_CRAFT_3": "Documentation in Step",
@@ -115,8 +116,9 @@
115
116
  "DOC_PROCESS_4": "Read the Docs First",
116
117
  "DOC_PROCESS_5": "Consent Before Push",
117
118
  "DOC_PROCESS_6": "Bound the Loop",
118
- "DOC_PROCESS_7": "Codes That Persist",
119
- "DOC_PROCESS_8": "One Writer Per File",
119
+ "DOC_PROCESS_7": "One Writer Per File",
120
+ "DOC_COMMS_1": "Codes That Persist",
121
+ "DOC_COMMS_2": "Structure Beside Prose",
120
122
  "INTRO_DOC": "This file is the entry point an AI coding agent reads when working in this repository.",
121
123
  "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.",
122
124
  "INTRO_SKILLS": "A Skill is a written procedure for a recurring task. Run the matching Skill before improvising.",
@@ -73,7 +73,7 @@
73
73
  "DESC_HERDR": "Drive herdr from inside it — split panes, spawn sibling agents, wait on output, read other panes.",
74
74
  "DESC_RULE": "Ask first — a standin' rule, or just summat to remember? Then log the memory, or run the rule aground on its worst case afore ye nail it into user-rules.md.",
75
75
  "DESC_PROFILE": "Chart yer captain in PROFILE.md — who they be, how they sail, how they like their bearings called; identity only, articles o' conduct go in user-rules.md.",
76
- "DESC_GENESEED": "Interact with the deployed Geneseed harness — locate the install, read its files, run status, doctor, and diff, and drive learn, context, and the local web UI.",
76
+ "DESC_GENESEED": "Operate the deployed Geneseed harness — find each install and its settings, read its files, run status, doctor and diff, and rebuild it with one setting changed when the user asks.",
77
77
  "DESC_REVIEW_RESPONSE": "Answer the inspection straight — weigh each mark, then mend it or argue it with cause.",
78
78
  "LEX_I": "Sealed Orders · Sealed Secrets",
79
79
  "LEX_II": "One Course, One Tack · One Intent, One Act",
@@ -90,6 +90,7 @@
90
90
  "PACK_RIGOR": "Soundings",
91
91
  "PACK_OPS": "Rigging",
92
92
  "PACK_PROCESS": "The Watch",
93
+ "PACK_COMMS": "Signal Flags",
93
94
  "DOC_CRAFT_1": "Drill the Routine · Automate Repetition",
94
95
  "DOC_CRAFT_2": "Charts in English · English Configuration",
95
96
  "DOC_CRAFT_3": "Log in Step · Documentation in Step",
@@ -115,8 +116,9 @@
115
116
  "DOC_PROCESS_4": "Read the Charts First · Read the Docs First",
116
117
  "DOC_PROCESS_5": "The Captain's Word Before We Sail · Consent Before Push",
117
118
  "DOC_PROCESS_6": "Set Yer Bearing Out Before Ye Sail In · Bound the Loop",
118
- "DOC_PROCESS_7": "Every Prize Keeps Its Mark · Codes That Persist",
119
- "DOC_PROCESS_8": "One Hand on the Wheel · One Writer Per File",
119
+ "DOC_PROCESS_7": "One Hand on the Wheel · One Writer Per File",
120
+ "DOC_COMMS_1": "Every Prize Keeps Its Mark · Codes That Persist",
121
+ "DOC_COMMS_2": "Chart Only Where the Currents Run · Structure Beside Prose",
120
122
  "INTRO_DOC": "This file is the first thing a deckhand reads on signing aboard this repository.",
121
123
  "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.",
122
124
  "INTRO_SKILLS": "A Skill is a drilled manoeuvre for a recurring task. Run the matching manoeuvre before you improvise.",
@@ -73,7 +73,7 @@
73
73
  "DESC_HERDR": "Drive herdr from inside it — split panes, spawn sibling agents, wait on output, read other panes.",
74
74
  "DESC_RULE": "Ask first — standing house rule, or just one for the notes? Then log the memory, or run the rule against the play that breaks it before it goes on the board in user-rules.md.",
75
75
  "DESC_PROFILE": "Write the scouting report in PROFILE.md — position, playing style, how they want the play called; identity only, team rules go on the board in user-rules.md.",
76
- "DESC_GENESEED": "Interact with the deployed Geneseed harness — locate the install, read its files, run status, doctor, and diff, and drive learn, context, and the local web UI.",
76
+ "DESC_GENESEED": "Operate the deployed Geneseed harness — find each install and its settings, read its files, run status, doctor and diff, and rebuild it with one setting changed when the user asks.",
77
77
  "DESC_REVIEW_RESPONSE": "Take the review like game tape — verify each note, then adjust or push back with reasons.",
78
78
  "LEX_I": "Guard the Signs · Sealed Secrets",
79
79
  "LEX_II": "One Play at a Time · One Intent, One Act",
@@ -90,6 +90,7 @@
90
90
  "PACK_RIGOR": "Film Room",
91
91
  "PACK_OPS": "Gear",
92
92
  "PACK_PROCESS": "Game Day",
93
+ "PACK_COMMS": "The Broadcast",
93
94
  "DOC_CRAFT_1": "Drill It · Automate Repetition",
94
95
  "DOC_CRAFT_2": "Rulebook in English · English Configuration",
95
96
  "DOC_CRAFT_3": "Playbook in Sync · Documentation in Step",
@@ -115,8 +116,9 @@
115
116
  "DOC_PROCESS_4": "Read the Scouting Report First · Read the Docs First",
116
117
  "DOC_PROCESS_5": "Get the Sign Before the Pitch · Consent Before Push",
117
118
  "DOC_PROCESS_6": "Call the Final Whistle First · Bound the Loop",
118
- "DOC_PROCESS_7": "Every Player Keeps a Number · Codes That Persist",
119
- "DOC_PROCESS_8": "One Ball, One Carrier · One Writer Per File",
119
+ "DOC_PROCESS_7": "One Ball, One Carrier · One Writer Per File",
120
+ "DOC_COMMS_1": "Every Player Keeps a Number · Codes That Persist",
121
+ "DOC_COMMS_2": "Draw Up the Play Only When It Moves · Structure Beside Prose",
120
122
  "INTRO_DOC": "This file is the pre-game briefing a coding teammate reads when it suits up for this repository.",
121
123
  "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.",
122
124
  "INTRO_SKILLS": "A Skill is a set play for a recurring task. Run the matching play before you improvise.",
@@ -73,7 +73,7 @@
73
73
  "DESC_HERDR": "Drive herdr from inside it — split panes, spawn sibling agents, wait on output, read other panes.",
74
74
  "DESC_RULE": "Ask first — standing rule, or just something to remember? Then note it, or run the rule through the lap that breaks it before locking it into user-rules.md.",
75
75
  "DESC_PROFILE": "Set up the driver profile in PROFILE.md — seat, driving style, how they want the pit wall to talk; identity only, team orders go in user-rules.md.",
76
- "DESC_GENESEED": "Interact with the deployed Geneseed harness — locate the install, read its files, run status, doctor, and diff, and drive learn, context, and the local web UI.",
76
+ "DESC_GENESEED": "Operate the deployed Geneseed harness — find each install and its settings, read its files, run status, doctor and diff, and rebuild it with one setting changed when the user asks.",
77
77
  "DESC_REVIEW_RESPONSE": "Take the notes straight — weigh each call, then act on it or push back with reasons.",
78
78
  "LEX_I": "Keep It in the Garage · Sealed Secrets",
79
79
  "LEX_II": "One Move per Corner · One Intent, One Act",
@@ -90,6 +90,7 @@
90
90
  "PACK_RIGOR": "The Stopwatch",
91
91
  "PACK_OPS": "The Cockpit",
92
92
  "PACK_PROCESS": "The Weekend",
93
+ "PACK_COMMS": "The Radio",
93
94
  "DOC_CRAFT_1": "Automate the Pit Stop · Automate Repetition",
94
95
  "DOC_CRAFT_2": "Setups in English · English Configuration",
95
96
  "DOC_CRAFT_3": "Notes in Sync · Documentation in Step",
@@ -115,8 +116,9 @@
115
116
  "DOC_PROCESS_4": "Read the Briefing First · Read the Docs First",
116
117
  "DOC_PROCESS_5": "My Call Before You Push · Consent Before Push",
117
118
  "DOC_PROCESS_6": "Set the Lap Count Before You Go Out · Bound the Loop",
118
- "DOC_PROCESS_7": "Every Setup Change Gets a Number · Codes That Persist",
119
- "DOC_PROCESS_8": "My Car, My Setup · One Writer Per File",
119
+ "DOC_PROCESS_7": "My Car, My Setup · One Writer Per File",
120
+ "DOC_COMMS_1": "Every Setup Change Gets a Number · Codes That Persist",
121
+ "DOC_COMMS_2": "Show Me the Data, Not a Pretty Picture · Structure Beside Prose",
120
122
  "INTRO_DOC": "This file is the briefing a coding driver reads when it joins this repository.",
121
123
  "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.",
122
124
  "INTRO_SKILLS": "A Skill is a setup you've practised for a recurring task. Run the matching setup before you improvise.",
@@ -73,7 +73,7 @@
73
73
  "DESC_HERDR": "Drive herdr from inside it — split panes, spawn sibling agents, wait on output, read other panes.",
74
74
  "DESC_RULE": "Ask first — a standing rule, or a thing merely to be remembered? Then inscribe the memory, or prove the rule against the case that would unmake it before it enters user-rules.md.",
75
75
  "DESC_PROFILE": "Divine the user's nature into PROFILE.md — who they are, how they work, the register they favour; identity only, binding runes belong in user-rules.md.",
76
- "DESC_GENESEED": "Interact with the deployed Geneseed harness — locate the install, read its files, run status, doctor, and diff, and drive learn, context, and the local web UI.",
76
+ "DESC_GENESEED": "Operate the deployed Geneseed harness — find each install and its settings, read its files, run status, doctor and diff, and rebuild it with one setting changed when the user asks.",
77
77
  "DESC_REVIEW_RESPONSE": "Answer the scrying with rigour — weigh each finding, then heed it or refute it with cause.",
78
78
  "LEX_I": "Sealed Sigils · Sealed Secrets",
79
79
  "LEX_II": "One Intent, One Casting · One Intent, One Act",
@@ -90,6 +90,7 @@
90
90
  "PACK_RIGOR": "Scrying",
91
91
  "PACK_OPS": "Conjury",
92
92
  "PACK_PROCESS": "Ritual",
93
+ "PACK_COMMS": "Scrollwork",
93
94
  "DOC_CRAFT_1": "Enchant the Repetition · Automate Repetition",
94
95
  "DOC_CRAFT_2": "Grimoire in English · English Configuration",
95
96
  "DOC_CRAFT_3": "Tomes in Step · Documentation in Step",
@@ -115,8 +116,9 @@
115
116
  "DOC_PROCESS_4": "Read the Tomes First · Read the Docs First",
116
117
  "DOC_PROCESS_5": "Assent Before the Sending · Consent Before Push",
117
118
  "DOC_PROCESS_6": "Bind the Circle Before You Step In · Bound the Loop",
118
- "DOC_PROCESS_7": "Every Rune Keeps Its Name · Codes That Persist",
119
- "DOC_PROCESS_8": "One Quill Per Grimoire · One Writer Per File",
119
+ "DOC_PROCESS_7": "One Quill Per Grimoire · One Writer Per File",
120
+ "DOC_COMMS_1": "Every Rune Keeps Its Name · Codes That Persist",
121
+ "DOC_COMMS_2": "Draw the Sigil Only Where the Lines Bind · Structure Beside Prose",
120
122
  "INTRO_DOC": "This file is the first page an arcane familiar reads on entering this repository.",
121
123
  "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.",
122
124
  "INTRO_SKILLS": "A Skill is a proven spell for a recurring task. Speak the matching spell before improvising.",
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,t as n}from"./react-DbkvxWG5.js";import{C as r,D as i,c as a,i as o,n as s,rt as c,u as l}from"./index-CAqrWhKl.js";import{a as u,i as d,n as f,o as p,r as m,t as h}from"./activity-iWaWVtsR.js";var g=e(t(),1),_=n();function v({s:e}){let t=m[e.status]||m.idle,n=e.files,i=e.todos,o=i&&i.total>0||e.error||e.blocked_on,s=()=>r(`#/activity/${encodeURIComponent(e.session_id)}`);return(0,_.jsxs)(`div`,{className:`card pad-md act-card`,style:{cursor:`pointer`},onClick:s,role:`link`,tabIndex:0,onKeyDown:e=>{e.key===`Enter`&&s()},children:[(0,_.jsxs)(`div`,{className:`row between wrap gap-12`,children:[(0,_.jsxs)(`div`,{className:`row gap-10`,style:{minWidth:0},children:[(0,_.jsx)(`span`,{className:`feed-dot ${t.cls||`acc`}`,style:{width:9,height:9}}),(0,_.jsxs)(`div`,{style:{minWidth:0},children:[(0,_.jsx)(`h3`,{style:{margin:0},children:e.title||u(e.cwd)||e.session_id}),e.cwd&&(0,_.jsx)(`div`,{className:`dim mono`,style:{fontSize:12,...h},title:e.cwd,children:e.cwd})]})]}),(0,_.jsxs)(`div`,{className:`row gap-8`,style:{flexShrink:0},children:[e.model&&(0,_.jsx)(`span`,{className:`badge mono`,title:`model`,children:e.model}),e.agent&&(0,_.jsx)(`span`,{className:`badge`,children:e.agent}),(0,_.jsxs)(`span`,{className:`badge ${t.cls}`,children:[(0,_.jsx)(`span`,{className:`dot`}),t.label]}),(0,_.jsx)(a,{name:`chevron`,className:`glyph act-chev`})]})]}),e.phase&&(0,_.jsxs)(`div`,{className:`row gap-8`,style:{marginTop:10,fontSize:14},children:[(0,_.jsx)(a,{name:`activity`}),(0,_.jsx)(`span`,{style:h,children:e.phase})]}),(e.tokens>0||e.cost>0||e.turn_started_at||n&&n.count>0)&&(0,_.jsxs)(`div`,{className:`row wrap`,style:{gap:16,marginTop:12,fontSize:13,color:`var(--text-2)`},children:[e.tokens>0&&(0,_.jsxs)(`span`,{children:[p(e.tokens),` tok`]}),e.cost>0&&(0,_.jsxs)(`span`,{children:[`$`,e.cost.toFixed(2)]}),e.turn_started_at?(0,_.jsx)(`span`,{children:(0,_.jsx)(f,{startedAt:e.turn_started_at})}):null,n&&n.count>0&&(0,_.jsxs)(`span`,{children:[n.count,` file`,n.count===1?``:`s`,` `,(0,_.jsxs)(`span`,{style:{color:`var(--good)`},children:[`+`,n.additions]}),` `,(0,_.jsxs)(`span`,{style:{color:`var(--bad)`},children:[`−`,n.deletions]})]})]}),o&&(0,_.jsxs)(`div`,{className:`row between wrap gap-12`,style:{marginTop:12,paddingTop:10,borderTop:`1px solid var(--line)`},children:[i&&i.total>0?(0,_.jsxs)(`span`,{className:`row gap-8 dim`,style:{fontSize:13},children:[(0,_.jsx)(d,{done:i.done,total:i.total}),`plan `,i.done,`/`,i.total]}):(0,_.jsx)(`span`,{}),e.error?(0,_.jsx)(`span`,{className:`badge bad`,title:e.error,style:{maxWidth:300,...h},children:e.error}):e.blocked_on?(0,_.jsx)(`span`,{className:`badge bad`,title:e.blocked_on,style:{maxWidth:300,...h},children:e.blocked_on}):null]}),(0,_.jsxs)(`div`,{className:`dim mono`,style:{fontSize:11,marginTop:8},children:[`updated `,l(e.updated_at),` ago`]})]})}function y(){let[e,t]=(0,g.useState)(null),[n,r]=(0,g.useState)(``);(0,g.useEffect)(()=>{let e=!0,n=()=>c.activity().then(n=>{e&&(t(n),r(``))},t=>{e&&r(t.message)});n();let i=setInterval(()=>{document.hidden||n()},2e3),a=()=>{document.hidden||n()};return document.addEventListener(`visibilitychange`,a),()=>{e=!1,clearInterval(i),document.removeEventListener(`visibilitychange`,a)}},[]);let a=!e||e.enabled!==!1,l=e?.activity||[],u=i(),d=async()=>{let e=!a;try{let n=await c.activityToggle(e);t(e=>({...e||{},enabled:n.enabled,activity:n.enabled&&e?.activity||[]})),r(``)}catch(e){r(e.message)}};return(0,_.jsxs)(`div`,{className:`narrow`,children:[(0,_.jsxs)(`div`,{className:`head-row mb-16`,children:[(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`h1`,{className:`h`,children:`Activity`}),(0,_.jsx)(`p`,{className:`sub`,children:`Live OpenCode sessions this harness is running: what each one is doing right now. Refreshes every couple of seconds; sessions drop off when their process exits.`})]}),(0,_.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`center`,flexShrink:0},children:[(0,_.jsx)(`span`,{className:`dim mono`,style:{fontSize:12},children:a?`tracking on`:`tracking off`}),(0,_.jsx)(`div`,{className:`sw-toggle${a?` on`:``}`,role:`switch`,"aria-checked":a,"aria-label":`Toggle activity tracking`,tabIndex:0,onClick:d,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),d())}})]})]}),(0,_.jsx)(s,{error:n,style:{marginBottom:12}}),e?a?l.length===0?(0,_.jsxs)(`div`,{className:`empty`,children:[(0,_.jsx)(`div`,{className:`big`,children:`No active sessions`}),`Run `,(0,_.jsx)(`code`,{children:`opencode`}),` and the sessions it spins up appear here.`]}):(0,_.jsx)(`div`,{className:`stack gap-12`,ref:u,children:l.map(e=>(0,_.jsx)(`div`,{"data-flip":e.session_id,children:(0,_.jsx)(v,{s:e})},e.session_id))}):(0,_.jsxs)(`div`,{className:`empty`,children:[(0,_.jsx)(`div`,{className:`big`,children:`Activity tracking is off`}),`The plugin isn't recording sessions. Flip the switch to turn it back on.`]}):(0,_.jsx)(o,{label:`Reading live sessions…`})]})}export{y as default};
1
+ import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,t as n}from"./react-DbkvxWG5.js";import{C as r,D as i,c as a,i as o,n as s,rt as c,u as l}from"./index-AN5Emnrg.js";import{a as u,i as d,n as f,o as p,r as m,t as h}from"./activity-iWaWVtsR.js";var g=e(t(),1),_=n();function v({s:e}){let t=m[e.status]||m.idle,n=e.files,i=e.todos,o=i&&i.total>0||e.error||e.blocked_on,s=()=>r(`#/activity/${encodeURIComponent(e.session_id)}`);return(0,_.jsxs)(`div`,{className:`card pad-md act-card`,style:{cursor:`pointer`},onClick:s,role:`link`,tabIndex:0,onKeyDown:e=>{e.key===`Enter`&&s()},children:[(0,_.jsxs)(`div`,{className:`row between wrap gap-12`,children:[(0,_.jsxs)(`div`,{className:`row gap-10`,style:{minWidth:0},children:[(0,_.jsx)(`span`,{className:`feed-dot ${t.cls||`acc`}`,style:{width:9,height:9}}),(0,_.jsxs)(`div`,{style:{minWidth:0},children:[(0,_.jsx)(`h3`,{style:{margin:0},children:e.title||u(e.cwd)||e.session_id}),e.cwd&&(0,_.jsx)(`div`,{className:`dim mono`,style:{fontSize:12,...h},title:e.cwd,children:e.cwd})]})]}),(0,_.jsxs)(`div`,{className:`row gap-8`,style:{flexShrink:0},children:[e.model&&(0,_.jsx)(`span`,{className:`badge mono`,title:`model`,children:e.model}),e.agent&&(0,_.jsx)(`span`,{className:`badge`,children:e.agent}),(0,_.jsxs)(`span`,{className:`badge ${t.cls}`,children:[(0,_.jsx)(`span`,{className:`dot`}),t.label]}),(0,_.jsx)(a,{name:`chevron`,className:`glyph act-chev`})]})]}),e.phase&&(0,_.jsxs)(`div`,{className:`row gap-8`,style:{marginTop:10,fontSize:14},children:[(0,_.jsx)(a,{name:`activity`}),(0,_.jsx)(`span`,{style:h,children:e.phase})]}),(e.tokens>0||e.cost>0||e.turn_started_at||n&&n.count>0)&&(0,_.jsxs)(`div`,{className:`row wrap`,style:{gap:16,marginTop:12,fontSize:13,color:`var(--text-2)`},children:[e.tokens>0&&(0,_.jsxs)(`span`,{children:[p(e.tokens),` tok`]}),e.cost>0&&(0,_.jsxs)(`span`,{children:[`$`,e.cost.toFixed(2)]}),e.turn_started_at?(0,_.jsx)(`span`,{children:(0,_.jsx)(f,{startedAt:e.turn_started_at})}):null,n&&n.count>0&&(0,_.jsxs)(`span`,{children:[n.count,` file`,n.count===1?``:`s`,` `,(0,_.jsxs)(`span`,{style:{color:`var(--good)`},children:[`+`,n.additions]}),` `,(0,_.jsxs)(`span`,{style:{color:`var(--bad)`},children:[`−`,n.deletions]})]})]}),o&&(0,_.jsxs)(`div`,{className:`row between wrap gap-12`,style:{marginTop:12,paddingTop:10,borderTop:`1px solid var(--line)`},children:[i&&i.total>0?(0,_.jsxs)(`span`,{className:`row gap-8 dim`,style:{fontSize:13},children:[(0,_.jsx)(d,{done:i.done,total:i.total}),`plan `,i.done,`/`,i.total]}):(0,_.jsx)(`span`,{}),e.error?(0,_.jsx)(`span`,{className:`badge bad`,title:e.error,style:{maxWidth:300,...h},children:e.error}):e.blocked_on?(0,_.jsx)(`span`,{className:`badge bad`,title:e.blocked_on,style:{maxWidth:300,...h},children:e.blocked_on}):null]}),(0,_.jsxs)(`div`,{className:`dim mono`,style:{fontSize:11,marginTop:8},children:[`updated `,l(e.updated_at),` ago`]})]})}function y(){let[e,t]=(0,g.useState)(null),[n,r]=(0,g.useState)(``);(0,g.useEffect)(()=>{let e=!0,n=()=>c.activity().then(n=>{e&&(t(n),r(``))},t=>{e&&r(t.message)});n();let i=setInterval(()=>{document.hidden||n()},2e3),a=()=>{document.hidden||n()};return document.addEventListener(`visibilitychange`,a),()=>{e=!1,clearInterval(i),document.removeEventListener(`visibilitychange`,a)}},[]);let a=!e||e.enabled!==!1,l=e?.activity||[],u=i(),d=async()=>{let e=!a;try{let n=await c.activityToggle(e);t(e=>({...e||{},enabled:n.enabled,activity:n.enabled&&e?.activity||[]})),r(``)}catch(e){r(e.message)}};return(0,_.jsxs)(`div`,{className:`narrow`,children:[(0,_.jsxs)(`div`,{className:`head-row mb-16`,children:[(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`h1`,{className:`h`,children:`Activity`}),(0,_.jsx)(`p`,{className:`sub`,children:`Live OpenCode sessions this harness is running: what each one is doing right now. Refreshes every couple of seconds; sessions drop off when their process exits.`})]}),(0,_.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`center`,flexShrink:0},children:[(0,_.jsx)(`span`,{className:`dim mono`,style:{fontSize:12},children:a?`tracking on`:`tracking off`}),(0,_.jsx)(`div`,{className:`sw-toggle${a?` on`:``}`,role:`switch`,"aria-checked":a,"aria-label":`Toggle activity tracking`,tabIndex:0,onClick:d,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),d())}})]})]}),(0,_.jsx)(s,{error:n,style:{marginBottom:12}}),e?a?l.length===0?(0,_.jsxs)(`div`,{className:`empty`,children:[(0,_.jsx)(`div`,{className:`big`,children:`No active sessions`}),`Run `,(0,_.jsx)(`code`,{children:`opencode`}),` and the sessions it spins up appear here.`]}):(0,_.jsx)(`div`,{className:`stack gap-12`,ref:u,children:l.map(e=>(0,_.jsx)(`div`,{"data-flip":e.session_id,children:(0,_.jsx)(v,{s:e})},e.session_id))}):(0,_.jsxs)(`div`,{className:`empty`,children:[(0,_.jsx)(`div`,{className:`big`,children:`Activity tracking is off`}),`The plugin isn't recording sessions. Flip the switch to turn it back on.`]}):(0,_.jsx)(o,{label:`Reading live sessions…`})]})}export{y as default};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,t as n}from"./react-DbkvxWG5.js";import{c as r,i,rt as a,u as o}from"./index-CAqrWhKl.js";import{a as s,n as c,o as l,r as u,t as d}from"./activity-iWaWVtsR.js";var f=e(t(),1),p=n();function m(e){return e.kind===`tool`?e.status===`error`?`bad`:e.status===`completed`?`ok`:`acc`:{retry:`warn`,error:`bad`,subtask:`acc`,text:`acc`}[e.kind]||``}function h({rec:e}){let t=e.who===`you`,n=[];t||(e.kind===`tool`&&e.ms!=null&&n.push(`${(e.ms/1e3).toFixed(1)}s`),e.kind===`step`&&(e.tokens&&n.push(`${l(e.tokens)} tok`),e.cost&&n.push(`$${e.cost.toFixed(2)}`)),e.kind===`subtask`&&e.agent&&n.unshift(e.agent));let r=!t&&(e.kind===`text`||e.kind===`thinking`||e.kind===`step`),i=t?e.text:e.label||e.snippet||e.kind;return(0,p.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`baseline`},children:[(0,p.jsx)(`span`,{className:`badge ${t?``:`acc`}`,style:{flexShrink:0,minWidth:52,justifyContent:`center`},children:t?`you`:`agent`}),(0,p.jsxs)(`div`,{style:{minWidth:0,flex:1,fontSize:13},children:[!t&&(0,p.jsx)(`span`,{className:`feed-dot ${m(e)||`acc`}`,style:{display:`inline-block`,marginRight:8,verticalAlign:`middle`}}),e.kind===`thinking`&&(0,p.jsx)(`span`,{className:`dim`,children:`thinking: `}),r?(0,p.jsx)(`span`,{className:`dim`,children:i}):t?i:(0,p.jsx)(`b`,{children:i}),e.error&&(0,p.jsxs)(`span`,{className:`dim`,children:[`: `,e.error]})]}),n.length>0&&(0,p.jsx)(`span`,{className:`dim mono`,style:{flexShrink:0,fontSize:12},children:n.join(` · `)})]})}function g({turns:e}){return!e||e.length===0?(0,p.jsx)(`div`,{className:`dim`,style:{fontSize:13},children:`No conversation captured yet.`}):(0,p.jsx)(`div`,{className:`stack gap-12`,children:e.map((e,t)=>{let n=e.role===`user`;return(0,p.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`baseline`},children:[(0,p.jsx)(`span`,{className:`badge ${n?``:`acc`}`,style:{flexShrink:0,minWidth:52,justifyContent:`center`},children:n?`you`:`agent`}),(0,p.jsx)(`div`,{style:{minWidth:0,fontSize:13,color:n?`inherit`:`var(--text-2)`},children:e.text})]},t)})})}function _({sid:e}){let[t,n]=(0,f.useState)(null),[m,_]=(0,f.useState)(``),[v,y]=(0,f.useState)(!1),[b,x]=(0,f.useState)(!1);(0,f.useEffect)(()=>{let t=!0,r=()=>a.activityDetail(e).then(e=>{t&&(n(e),_(``),y(!1))},e=>{t&&(e.status===404?y(!0):_(e.message))});r();let i=setInterval(()=>{document.hidden||r()},2e3),o=()=>{document.hidden||r()};return document.addEventListener(`visibilitychange`,o),()=>{t=!1,clearInterval(i),document.removeEventListener(`visibilitychange`,o)}},[e]);let S=(0,p.jsxs)(`a`,{className:`btn ghost sm`,href:`#/activity`,style:{marginBottom:12,display:`inline-flex`,gap:6},children:[(0,p.jsx)(r,{name:`arrow`,style:{transform:`rotate(180deg)`}}),` Activity`]});if(v)return(0,p.jsxs)(`div`,{className:`narrow`,children:[S,(0,p.jsxs)(`div`,{className:`empty`,children:[(0,p.jsx)(`div`,{className:`big`,children:`Session ended`}),`It's no longer live. `,(0,p.jsx)(`a`,{href:`#/activity`,children:`Back to Activity`}),`.`]})]});if(!t)return(0,p.jsxs)(`div`,{className:`narrow`,children:[S,(0,p.jsx)(i,{label:`Loading session…`})]});let C=t.session,w=u[C.status]||u.idle,T=C.files,E=C.todos,D=!!(T&&T.items&&T.items.length>0),O=!!(E&&E.items&&E.items.length>0),k=t.conversation||[],A=t.timeline||[],j=[...k.filter(e=>e.role===`user`).map(e=>({who:`you`,text:e.text,t:e.t||0})),...A.map(e=>({...e,who:`agent`}))].sort((e,t)=>(e.t||0)-(t.t||0));return(0,p.jsxs)(`div`,{className:`narrow`,children:[S,m&&(0,p.jsx)(`p`,{className:`badge bad`,style:{marginBottom:12},children:m}),(0,p.jsxs)(`div`,{className:`card pad-md`,children:[(0,p.jsxs)(`div`,{className:`row between wrap gap-12`,children:[(0,p.jsxs)(`div`,{style:{minWidth:0},children:[(0,p.jsx)(`h1`,{className:`h`,style:{margin:0},children:C.title||s(C.cwd)||C.session_id}),C.cwd&&(0,p.jsx)(`div`,{className:`dim mono`,style:{fontSize:12,...d},title:C.cwd,children:C.cwd})]}),(0,p.jsxs)(`div`,{className:`row gap-8`,style:{flexShrink:0},children:[C.model&&(0,p.jsx)(`span`,{className:`badge mono`,children:C.model}),C.agent&&(0,p.jsx)(`span`,{className:`badge`,children:C.agent}),(0,p.jsxs)(`span`,{className:`badge ${w.cls}`,children:[(0,p.jsx)(`span`,{className:`dot`}),w.label]})]})]}),C.phase&&(0,p.jsxs)(`div`,{className:`row gap-8`,style:{marginTop:10,fontSize:14},children:[(0,p.jsx)(r,{name:`activity`}),(0,p.jsx)(`span`,{style:d,children:C.phase})]}),(0,p.jsxs)(`div`,{className:`row wrap`,style:{gap:16,marginTop:12,fontSize:13,color:`var(--text-2)`},children:[C.tokens>0&&(0,p.jsxs)(`span`,{children:[l(C.tokens),` tok`]}),C.cost>0&&(0,p.jsxs)(`span`,{children:[`$`,C.cost.toFixed(2)]}),C.turn_started_at?(0,p.jsx)(`span`,{children:(0,p.jsx)(c,{startedAt:C.turn_started_at})}):null,(0,p.jsxs)(`span`,{className:`dim`,children:[`updated `,o(C.updated_at),` ago`]})]}),(C.error||C.blocked_on)&&(0,p.jsx)(`div`,{style:{marginTop:10},children:(0,p.jsx)(`span`,{className:`badge bad`,style:{maxWidth:`100%`,...d},children:C.error||C.blocked_on})})]}),(D||O)&&(0,p.jsxs)(`div`,{className:`grid gap-12`,style:{marginTop:12,gridTemplateColumns:D&&O?`minmax(0, 1fr) minmax(0, 1fr)`:`1fr`},children:[D&&(0,p.jsxs)(`div`,{className:`card pad-md`,children:[(0,p.jsx)(`div`,{className:`card-head`,children:(0,p.jsxs)(`h3`,{children:[`Files touched `,(0,p.jsxs)(`span`,{className:`dim`,children:[`(`,T.count,`)`]})]})}),(0,p.jsx)(`div`,{className:`stack`,style:{gap:6,marginTop:8},children:T.items.map(e=>(0,p.jsxs)(`div`,{className:`row between gap-12`,style:{fontSize:13},children:[(0,p.jsx)(`span`,{className:`mono`,style:{...d,minWidth:0,flex:1},title:e.file,children:e.file}),(0,p.jsxs)(`span`,{style:{flexShrink:0},children:[(0,p.jsxs)(`span`,{style:{color:`var(--good)`},children:[`+`,e.additions]}),` `,(0,p.jsxs)(`span`,{style:{color:`var(--bad)`},children:[`−`,e.deletions]})]})]},e.file))})]}),O&&(0,p.jsxs)(`div`,{className:`card pad-md`,children:[(0,p.jsx)(`div`,{className:`card-head`,children:(0,p.jsxs)(`h3`,{children:[`Plan`,` `,(0,p.jsxs)(`span`,{className:`dim`,children:[`(`,E.done,`/`,E.total,`)`]})]})}),(0,p.jsx)(`div`,{className:`stack`,style:{gap:6,marginTop:8},children:E.items.map((e,t)=>(0,p.jsxs)(`div`,{className:`row gap-8`,style:{fontSize:13},children:[(0,p.jsx)(`span`,{className:`feed-dot ${e.status===`completed`?`ok`:e.status===`in_progress`?`acc`:``}`}),(0,p.jsx)(`span`,{style:{textDecoration:e.status===`completed`?`line-through`:`none`,color:e.status===`completed`?`var(--text-3)`:`inherit`},children:e.content})]},t))})]})]}),(0,p.jsxs)(`div`,{className:`card pad-md`,style:{marginTop:12},children:[(0,p.jsxs)(`div`,{className:`card-head`,style:{justifyContent:`space-between`,marginBottom:12},children:[(0,p.jsx)(`h3`,{children:`Timeline`}),A.length>0&&(0,p.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>x(e=>!e),children:b?`Show conversation`:`Show all ${A.length} steps`})]}),b?(0,p.jsx)(`div`,{className:`stack gap-12`,children:j.map((e,t)=>(0,p.jsx)(h,{rec:e},t))}):(0,p.jsx)(g,{turns:k})]})]})}export{_ as default};
1
+ import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,t as n}from"./react-DbkvxWG5.js";import{c as r,i,rt as a,u as o}from"./index-AN5Emnrg.js";import{a as s,n as c,o as l,r as u,t as d}from"./activity-iWaWVtsR.js";var f=e(t(),1),p=n();function m(e){return e.kind===`tool`?e.status===`error`?`bad`:e.status===`completed`?`ok`:`acc`:{retry:`warn`,error:`bad`,subtask:`acc`,text:`acc`}[e.kind]||``}function h({rec:e}){let t=e.who===`you`,n=[];t||(e.kind===`tool`&&e.ms!=null&&n.push(`${(e.ms/1e3).toFixed(1)}s`),e.kind===`step`&&(e.tokens&&n.push(`${l(e.tokens)} tok`),e.cost&&n.push(`$${e.cost.toFixed(2)}`)),e.kind===`subtask`&&e.agent&&n.unshift(e.agent));let r=!t&&(e.kind===`text`||e.kind===`thinking`||e.kind===`step`),i=t?e.text:e.label||e.snippet||e.kind;return(0,p.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`baseline`},children:[(0,p.jsx)(`span`,{className:`badge ${t?``:`acc`}`,style:{flexShrink:0,minWidth:52,justifyContent:`center`},children:t?`you`:`agent`}),(0,p.jsxs)(`div`,{style:{minWidth:0,flex:1,fontSize:13},children:[!t&&(0,p.jsx)(`span`,{className:`feed-dot ${m(e)||`acc`}`,style:{display:`inline-block`,marginRight:8,verticalAlign:`middle`}}),e.kind===`thinking`&&(0,p.jsx)(`span`,{className:`dim`,children:`thinking: `}),r?(0,p.jsx)(`span`,{className:`dim`,children:i}):t?i:(0,p.jsx)(`b`,{children:i}),e.error&&(0,p.jsxs)(`span`,{className:`dim`,children:[`: `,e.error]})]}),n.length>0&&(0,p.jsx)(`span`,{className:`dim mono`,style:{flexShrink:0,fontSize:12},children:n.join(` · `)})]})}function g({turns:e}){return!e||e.length===0?(0,p.jsx)(`div`,{className:`dim`,style:{fontSize:13},children:`No conversation captured yet.`}):(0,p.jsx)(`div`,{className:`stack gap-12`,children:e.map((e,t)=>{let n=e.role===`user`;return(0,p.jsxs)(`div`,{className:`row gap-10`,style:{alignItems:`baseline`},children:[(0,p.jsx)(`span`,{className:`badge ${n?``:`acc`}`,style:{flexShrink:0,minWidth:52,justifyContent:`center`},children:n?`you`:`agent`}),(0,p.jsx)(`div`,{style:{minWidth:0,fontSize:13,color:n?`inherit`:`var(--text-2)`},children:e.text})]},t)})})}function _({sid:e}){let[t,n]=(0,f.useState)(null),[m,_]=(0,f.useState)(``),[v,y]=(0,f.useState)(!1),[b,x]=(0,f.useState)(!1);(0,f.useEffect)(()=>{let t=!0,r=()=>a.activityDetail(e).then(e=>{t&&(n(e),_(``),y(!1))},e=>{t&&(e.status===404?y(!0):_(e.message))});r();let i=setInterval(()=>{document.hidden||r()},2e3),o=()=>{document.hidden||r()};return document.addEventListener(`visibilitychange`,o),()=>{t=!1,clearInterval(i),document.removeEventListener(`visibilitychange`,o)}},[e]);let S=(0,p.jsxs)(`a`,{className:`btn ghost sm`,href:`#/activity`,style:{marginBottom:12,display:`inline-flex`,gap:6},children:[(0,p.jsx)(r,{name:`arrow`,style:{transform:`rotate(180deg)`}}),` Activity`]});if(v)return(0,p.jsxs)(`div`,{className:`narrow`,children:[S,(0,p.jsxs)(`div`,{className:`empty`,children:[(0,p.jsx)(`div`,{className:`big`,children:`Session ended`}),`It's no longer live. `,(0,p.jsx)(`a`,{href:`#/activity`,children:`Back to Activity`}),`.`]})]});if(!t)return(0,p.jsxs)(`div`,{className:`narrow`,children:[S,(0,p.jsx)(i,{label:`Loading session…`})]});let C=t.session,w=u[C.status]||u.idle,T=C.files,E=C.todos,D=!!(T&&T.items&&T.items.length>0),O=!!(E&&E.items&&E.items.length>0),k=t.conversation||[],A=t.timeline||[],j=[...k.filter(e=>e.role===`user`).map(e=>({who:`you`,text:e.text,t:e.t||0})),...A.map(e=>({...e,who:`agent`}))].sort((e,t)=>(e.t||0)-(t.t||0));return(0,p.jsxs)(`div`,{className:`narrow`,children:[S,m&&(0,p.jsx)(`p`,{className:`badge bad`,style:{marginBottom:12},children:m}),(0,p.jsxs)(`div`,{className:`card pad-md`,children:[(0,p.jsxs)(`div`,{className:`row between wrap gap-12`,children:[(0,p.jsxs)(`div`,{style:{minWidth:0},children:[(0,p.jsx)(`h1`,{className:`h`,style:{margin:0},children:C.title||s(C.cwd)||C.session_id}),C.cwd&&(0,p.jsx)(`div`,{className:`dim mono`,style:{fontSize:12,...d},title:C.cwd,children:C.cwd})]}),(0,p.jsxs)(`div`,{className:`row gap-8`,style:{flexShrink:0},children:[C.model&&(0,p.jsx)(`span`,{className:`badge mono`,children:C.model}),C.agent&&(0,p.jsx)(`span`,{className:`badge`,children:C.agent}),(0,p.jsxs)(`span`,{className:`badge ${w.cls}`,children:[(0,p.jsx)(`span`,{className:`dot`}),w.label]})]})]}),C.phase&&(0,p.jsxs)(`div`,{className:`row gap-8`,style:{marginTop:10,fontSize:14},children:[(0,p.jsx)(r,{name:`activity`}),(0,p.jsx)(`span`,{style:d,children:C.phase})]}),(0,p.jsxs)(`div`,{className:`row wrap`,style:{gap:16,marginTop:12,fontSize:13,color:`var(--text-2)`},children:[C.tokens>0&&(0,p.jsxs)(`span`,{children:[l(C.tokens),` tok`]}),C.cost>0&&(0,p.jsxs)(`span`,{children:[`$`,C.cost.toFixed(2)]}),C.turn_started_at?(0,p.jsx)(`span`,{children:(0,p.jsx)(c,{startedAt:C.turn_started_at})}):null,(0,p.jsxs)(`span`,{className:`dim`,children:[`updated `,o(C.updated_at),` ago`]})]}),(C.error||C.blocked_on)&&(0,p.jsx)(`div`,{style:{marginTop:10},children:(0,p.jsx)(`span`,{className:`badge bad`,style:{maxWidth:`100%`,...d},children:C.error||C.blocked_on})})]}),(D||O)&&(0,p.jsxs)(`div`,{className:`grid gap-12`,style:{marginTop:12,gridTemplateColumns:D&&O?`minmax(0, 1fr) minmax(0, 1fr)`:`1fr`},children:[D&&(0,p.jsxs)(`div`,{className:`card pad-md`,children:[(0,p.jsx)(`div`,{className:`card-head`,children:(0,p.jsxs)(`h3`,{children:[`Files touched `,(0,p.jsxs)(`span`,{className:`dim`,children:[`(`,T.count,`)`]})]})}),(0,p.jsx)(`div`,{className:`stack`,style:{gap:6,marginTop:8},children:T.items.map(e=>(0,p.jsxs)(`div`,{className:`row between gap-12`,style:{fontSize:13},children:[(0,p.jsx)(`span`,{className:`mono`,style:{...d,minWidth:0,flex:1},title:e.file,children:e.file}),(0,p.jsxs)(`span`,{style:{flexShrink:0},children:[(0,p.jsxs)(`span`,{style:{color:`var(--good)`},children:[`+`,e.additions]}),` `,(0,p.jsxs)(`span`,{style:{color:`var(--bad)`},children:[`−`,e.deletions]})]})]},e.file))})]}),O&&(0,p.jsxs)(`div`,{className:`card pad-md`,children:[(0,p.jsx)(`div`,{className:`card-head`,children:(0,p.jsxs)(`h3`,{children:[`Plan`,` `,(0,p.jsxs)(`span`,{className:`dim`,children:[`(`,E.done,`/`,E.total,`)`]})]})}),(0,p.jsx)(`div`,{className:`stack`,style:{gap:6,marginTop:8},children:E.items.map((e,t)=>(0,p.jsxs)(`div`,{className:`row gap-8`,style:{fontSize:13},children:[(0,p.jsx)(`span`,{className:`feed-dot ${e.status===`completed`?`ok`:e.status===`in_progress`?`acc`:``}`}),(0,p.jsx)(`span`,{style:{textDecoration:e.status===`completed`?`line-through`:`none`,color:e.status===`completed`?`var(--text-3)`:`inherit`},children:e.content})]},t))})]})]}),(0,p.jsxs)(`div`,{className:`card pad-md`,style:{marginTop:12},children:[(0,p.jsxs)(`div`,{className:`card-head`,style:{justifyContent:`space-between`,marginBottom:12},children:[(0,p.jsx)(`h3`,{children:`Timeline`}),A.length>0&&(0,p.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>x(e=>!e),children:b?`Show conversation`:`Show all ${A.length} steps`})]}),b?(0,p.jsx)(`div`,{className:`stack gap-12`,children:j.map((e,t)=>(0,p.jsx)(h,{rec:e},t))}):(0,p.jsx)(g,{turns:k})]})]})}export{_ as default};
@@ -1 +1 @@
1
- import"./rolldown-runtime-CbXtAM7H.js";import{i as e,t}from"./react-DbkvxWG5.js";import{f as n,rt as r}from"./index-CAqrWhKl.js";e();var i=t();function a({kind:e,addr:t,isOpen:a,onToggle:o,className:s,style:c,head:l,toggleCol:u=null,expandClassName:d=`law-expand`,renderBody:f,srcLine:p}){let{data:m}=n(()=>a?r.item(e,t):Promise.resolve(null),[a,t]),h=a&&(0,i.jsxs)(`div`,{className:d,children:[m?f(m):(0,i.jsx)(`p`,{className:`dim`,children:`Loading…`}),(0,i.jsx)(`div`,{className:`law-srcline`,children:p})]});return u?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(`div`,{className:s,style:c,children:[(0,i.jsx)(`button`,{className:`law-disclosure`,onClick:o,"aria-expanded":a,children:l}),(0,i.jsx)(`span`,{className:`toggle-col`,children:u})]}),h]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`button`,{className:s,style:c,onClick:o,"aria-expanded":a,children:l}),h]})}export{a as t};
1
+ import"./rolldown-runtime-CbXtAM7H.js";import{i as e,t}from"./react-DbkvxWG5.js";import{f as n,rt as r}from"./index-AN5Emnrg.js";e();var i=t();function a({kind:e,addr:t,isOpen:a,onToggle:o,className:s,style:c,head:l,toggleCol:u=null,expandClassName:d=`law-expand`,renderBody:f,srcLine:p}){let{data:m}=n(()=>a?r.item(e,t):Promise.resolve(null),[a,t]),h=a&&(0,i.jsxs)(`div`,{className:d,children:[m?f(m):(0,i.jsx)(`p`,{className:`dim`,children:`Loading…`}),(0,i.jsx)(`div`,{className:`law-srcline`,children:p})]});return u?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(`div`,{className:s,style:c,children:[(0,i.jsx)(`button`,{className:`law-disclosure`,onClick:o,"aria-expanded":a,children:l}),(0,i.jsx)(`span`,{className:`toggle-col`,children:u})]}),h]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`button`,{className:s,style:c,onClick:o,"aria-expanded":a,children:l}),h]})}export{a as t};
@@ -1,2 +1,2 @@
1
- import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,t as n}from"./react-DbkvxWG5.js";import{c as r,f as i,i as a,n as o,rt as s}from"./index-CAqrWhKl.js";var c=e(t(),1),l=n(),u=700;function d(e){return e.startsWith(`@@`)||e.startsWith(`+++`)||e.startsWith(`---`)?`hunk`:e.startsWith(`+`)?`add`:e.startsWith(`-`)?`del`:`ctx`}function f({onMutated:e,dataRev:t}){let{data:n,error:f,reload:p}=i(()=>s.diff(),[t]),[m,h]=(0,c.useState)(!1),[g,_]=(0,c.useState)(``),[v,y]=(0,c.useState)(()=>new Set),[b,x]=(0,c.useState)(()=>new Set),[S,C]=(0,c.useState)(null);n&&n!==S&&(C(n),y(new Set),x(new Set(n.files.map(e=>e.rel))));let w=e=>y(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),T=()=>y(e=>e.size===n.files.length?new Set:new Set(n.files.map(e=>e.rel))),E=async()=>{h(!0);try{let{job_id:e}=await s.action(`export`),t;do await new Promise(e=>setTimeout(e,u)),t=await s.job(e);while(t.status===`running`);_(t.status===`done`?`Improvements file written.`:`Export failed. See logs.`)}catch(e){_(e.message)}finally{h(!1)}},D=async()=>{let t=[...v],r=t.filter(e=>n.files.find(t=>t.rel===e)?.status===`added`),i=r.length?`Restoring will DELETE ${r.length} deployed-only file(s):\n${r.join(`
1
+ import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,t as n}from"./react-DbkvxWG5.js";import{c as r,f as i,i as a,n as o,rt as s}from"./index-AN5Emnrg.js";var c=e(t(),1),l=n(),u=700;function d(e){return e.startsWith(`@@`)||e.startsWith(`+++`)||e.startsWith(`---`)?`hunk`:e.startsWith(`+`)?`add`:e.startsWith(`-`)?`del`:`ctx`}function f({onMutated:e,dataRev:t}){let{data:n,error:f,reload:p}=i(()=>s.diff(),[t]),[m,h]=(0,c.useState)(!1),[g,_]=(0,c.useState)(``),[v,y]=(0,c.useState)(()=>new Set),[b,x]=(0,c.useState)(()=>new Set),[S,C]=(0,c.useState)(null);n&&n!==S&&(C(n),y(new Set),x(new Set(n.files.map(e=>e.rel))));let w=e=>y(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),T=()=>y(e=>e.size===n.files.length?new Set:new Set(n.files.map(e=>e.rel))),E=async()=>{h(!0);try{let{job_id:e}=await s.action(`export`),t;do await new Promise(e=>setTimeout(e,u)),t=await s.job(e);while(t.status===`running`);_(t.status===`done`?`Improvements file written.`:`Export failed. See logs.`)}catch(e){_(e.message)}finally{h(!1)}},D=async()=>{let t=[...v],r=t.filter(e=>n.files.find(t=>t.rel===e)?.status===`added`),i=r.length?`Restoring will DELETE ${r.length} deployed-only file(s):\n${r.join(`
2
2
  `)}\n\n`:``;if(window.confirm(`${i}Discard local edits and restore ${t.length} file(s) from source?`)){h(!0);try{let n=await s.restore(t),r=n.errors.length?` · ${n.errors.length} error(s): ${n.errors.join(`; `)}`:``;_(`Restored ${n.restored.length}, deleted ${n.deleted.length}${r}`),await p(),e?.()}catch(e){_(e.message)}finally{h(!1)}}};if(f)return(0,l.jsx)(o,{error:f});if(!n)return(0,l.jsx)(a,{});if(!n.deployed)return(0,l.jsxs)(`div`,{className:`empty`,children:[(0,l.jsx)(`div`,{className:`big`,children:`No deployed harness`}),`Nothing to diff against.`]});let O=n.files,k=O.filter(e=>e.status===`edited`).length,A=O.filter(e=>e.status===`added`).length,j=O.filter(e=>e.status===`missing`).length,M=e=>x(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`div`,{className:`head-row mb-16`,children:[(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`h1`,{className:`h`,children:`Local edits`}),(0,l.jsx)(`p`,{className:`sub`,children:`The agent refines its own deployed files in place. Export them as improvements before any rebuild overwrites them.`})]}),(0,l.jsxs)(`div`,{className:`row gap-10`,children:[(0,l.jsxs)(`button`,{className:`btn ghost`,disabled:m||v.size===0,onClick:D,children:[`Restore`,v.size?` (${v.size})`:``]}),(0,l.jsxs)(`button`,{className:`btn`,disabled:m,onClick:E,children:[(0,l.jsx)(r,{name:`download`}),`Export improvements`]})]})]}),g?(0,l.jsx)(`p`,{className:`sub mb-14`,children:g}):null,O.length===0?(0,l.jsxs)(`div`,{className:`empty`,children:[(0,l.jsx)(`div`,{className:`big`,children:`In sync`}),`Deployed harness matches source.`]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`div`,{className:`row between mb-14`,children:[(0,l.jsxs)(`div`,{className:`row gap-10`,children:[(0,l.jsxs)(`span`,{className:`badge`,children:[(0,l.jsx)(`span`,{className:`dot`,style:{background:`var(--warn)`}}),k,` edited`]}),(0,l.jsxs)(`span`,{className:`badge`,children:[(0,l.jsx)(`span`,{className:`dot`,style:{background:`var(--good)`}}),A,` added`]}),j>0&&(0,l.jsxs)(`span`,{className:`badge`,children:[(0,l.jsx)(`span`,{className:`dot`,style:{background:`var(--bad)`}}),j,` missing`]})]}),(0,l.jsxs)(`label`,{className:`row dim`,style:{gap:8,fontSize:12.5,cursor:`pointer`},children:[(0,l.jsx)(`input`,{type:`checkbox`,style:{accentColor:`var(--accent)`},checked:v.size===O.length,onChange:T}),`Select all`]})]}),(0,l.jsx)(`div`,{className:`stack gap-12`,children:O.map(e=>{let t=b.has(e.rel),n=e.status===`added`?`ok`:e.status===`missing`?`bad`:`warn`;return(0,l.jsxs)(`div`,{className:`card diff-file${t?` open`:``}`,children:[(0,l.jsxs)(`div`,{className:`diff-head`,children:[(0,l.jsx)(`input`,{type:`checkbox`,className:`chk`,checked:v.has(e.rel),onChange:()=>w(e.rel),onClick:e=>e.stopPropagation(),"aria-label":`Select ${e.rel}`}),(0,l.jsx)(`span`,{className:`fname`,children:e.rel}),(0,l.jsxs)(`span`,{className:`badge ${n}`,children:[(0,l.jsx)(`span`,{className:`dot`}),e.status]}),(0,l.jsxs)(`span`,{className:`dim mono`,style:{marginLeft:`auto`,fontSize:11},children:[e.diff.length,` lines`]}),(0,l.jsx)(`button`,{className:`iconbtn`,onClick:()=>M(e.rel),style:{transform:t?`rotate(90deg)`:`none`},"aria-label":t?`Collapse ${e.rel}`:`Expand ${e.rel}`,"aria-expanded":t,children:(0,l.jsx)(r,{name:`chevron`})})]}),t&&(0,l.jsx)(`div`,{className:`diff-body`,children:e.diff.map((e,t)=>(0,l.jsx)(`div`,{className:`diff-line ${d(e)}`,children:e},t))})]},e.rel)})})]})]})}export{f as default};
@@ -1,2 +1,2 @@
1
- import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,t as n}from"./react-DbkvxWG5.js";import{C as r,a as i,c as a,f as o,i as s,n as c,o as l,rt as u,s as d,t as f}from"./index-CAqrWhKl.js";import{n as p}from"./Markdown-BQAvN8xx.js";var m=e(t(),1),h=n();function g(e,t=0){let n=String(e).toLowerCase().trim().replace(/[^a-z0-9\s-]/g,``).replace(/\s+/g,`-`).replace(/-+/g,`-`).replace(/^-+|-+$/g,``);return n&&/^[a-z]/.test(n)?n:`h-${t}-${n||`section`}`}function _(e,t){if(!e||!t)return null;try{return e.querySelector(t)}catch{return null}}function v(e){let t=[],n=!1,r=0;for(let i of(e||``).split(`
1
+ import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,t as n}from"./react-DbkvxWG5.js";import{C as r,a as i,c as a,f as o,i as s,n as c,o as l,rt as u,s as d,t as f}from"./index-AN5Emnrg.js";import{n as p}from"./Markdown-BQAvN8xx.js";var m=e(t(),1),h=n();function g(e,t=0){let n=String(e).toLowerCase().trim().replace(/[^a-z0-9\s-]/g,``).replace(/\s+/g,`-`).replace(/-+/g,`-`).replace(/^-+|-+$/g,``);return n&&/^[a-z]/.test(n)?n:`h-${t}-${n||`section`}`}function _(e,t){if(!e||!t)return null;try{return e.querySelector(t)}catch{return null}}function v(e){let t=[],n=!1,r=0;for(let i of(e||``).split(`
2
2
  `)){if(i.startsWith("```")){n=!n;continue}if(n)continue;let e=i.match(/^(##|###)\s+(.+?)\s*$/);e&&(r+=1,t.push({level:e[1].length,title:e[2],id:g(e[2],r)}))}return t}var y={"opencode-global":`path-a-opencode-global-recommended`,"opencode-per-repo":`path-b-opencode-per-repo`,"claude-code":`path-c-claude-code`,"agent-md":`path-d-any-agentmd-tool`,bundle:`path-d-any-agentmd-tool`};function b({page:e,overview:t,onAction:n}){let i=(0,m.useRef)(null),a=(0,m.useMemo)(()=>v(e.body),[e.body]),o=(0,m.useMemo)(()=>p(e.body,e.links),[e.body,e.links]);(0,m.useEffect)(()=>{let e=i.current;if(!e)return;let t=0;e.querySelectorAll(`h1, h2, h3`).forEach(e=>{if(t+=1,!e.id){let n=g(e.textContent||``,t);n&&(e.id=n)}})},[o]),(0,m.useEffect)(()=>{let e=i.current;if(!e)return;let t=e=>{let t=e.target.closest(`a[href]`);if(!t)return;let n=t.getAttribute(`href`);n&&n.startsWith(`#/`)&&(e.preventDefault(),r(n))};return e.addEventListener(`click`,t),()=>e.removeEventListener(`click`,t)},[o]),(0,m.useEffect)(()=>{let t=e.anchor;if(!t)return;let n=_(i.current,`#${CSS.escape(t)}`);n&&n.scrollIntoView({behavior:`smooth`,block:`start`})},[o,e.anchor]),(0,m.useEffect)(()=>{let n=i.current;if(!n||e.id!==`install-paths`)return;n.querySelectorAll(`.docs-here`).forEach(e=>e.classList.remove(`docs-here`));let r=y[t?.emit];if(!r)return;let a=_(n,`#${CSS.escape(r)}`);a&&a.classList.add(`docs-here`)},[o,e.id,t?.emit]);let s=e=>{if(!e)return;let t=_(i.current,`#${CSS.escape(e)}`);t&&t.scrollIntoView({behavior:`smooth`,block:`start`})},c=a.length>=3,l=[];return(e.id===`install-paths`||e.id===`install-quick`)&&(l.push({label:`Run doctor`,action:`doctor`}),l.push({label:`Rebuild`,action:`build`})),e.id===`verify`&&l.push({label:`Run doctor`,action:`doctor`}),e.id===`self-improve`&&l.push({label:`Open diff`,hash:`#/diff`}),e.id===`upgrade`&&l.push({label:`Update`,action:`update`}),(0,h.jsxs)(`div`,{className:`detail-doc`,children:[(0,h.jsx)(`h1`,{style:{marginTop:0},children:e.title}),e.source&&(0,h.jsx)(`div`,{className:`doc-meta`,children:(0,h.jsxs)(`span`,{className:`badge`,children:[(0,h.jsx)(`span`,{className:`dot`}),e.source]})}),l.length>0&&(0,h.jsx)(`div`,{className:`row wrap gap-10`,style:{margin:`10px 0 14px`},children:l.map(e=>e.hash?(0,h.jsx)(`a`,{className:`btn ghost sm`,href:e.hash,children:e.label},e.label):(0,h.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>n&&n(e.action),children:e.label},e.label))}),c&&(0,h.jsxs)(`div`,{className:`docs-toc`,children:[(0,h.jsx)(`div`,{className:`docs-toc-head`,children:`On this page`}),(0,h.jsx)(`ul`,{children:a.map(e=>(0,h.jsx)(`li`,{className:`lvl-${e.level}`,children:(0,h.jsx)(`a`,{href:`#${e.id}`,onClick:t=>{t.preventDefault(),s(e.id)},children:e.title})},e.id))})]}),(0,h.jsx)(`div`,{className:`markdown`,ref:i,dangerouslySetInnerHTML:{__html:o}}),e.link&&(0,h.jsx)(`div`,{style:{marginTop:24},children:(0,h.jsx)(`a`,{className:`btn soft sm`,href:e.link.hash,children:e.link.label})})]})}var x=1200;function S({a:e,kind:t}){let n=t===`positional`?e.dest:e.names.join(`, `),r=[];return e.metavar&&r.push(e.metavar),e.choices&&r.push(`{${e.choices.join(`|`)}}`),e.default!==null&&e.default!==void 0&&e.default!==``&&!e.is_flag&&r.push(`default: ${e.default}`),e.required&&r.push(`required`),(0,h.jsxs)(`div`,{className:`cli-arg`,children:[(0,h.jsx)(`code`,{className:`cli-arg-name`,children:n}),r.length>0&&(0,h.jsxs)(`code`,{className:`cli-arg-meta`,children:[` `,r.join(` · `)]}),e.help&&(0,h.jsx)(`div`,{className:`cli-arg-help`,children:e.help})]})}function C({text:e}){let[t,n]=(0,m.useState)(!1);return(0,h.jsxs)(`button`,{className:`btn ghost sm`,onClick:async()=>{try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),x)}catch{}},title:`Copy command`,children:[(0,h.jsx)(a,{name:t?`spark`:`copy`}),t?`Copied`:`Copy`]})}function w({cmd:e,prog:t}){let n=[t,e.name];for(let t of e.positionals||[]){let e=(t.metavar||t.dest||``).toUpperCase();n.push(t.required?e:`[${e}]`)}(e.options||[]).length&&n.push(`[OPTIONS]`);let r=n.join(` `);return(0,h.jsxs)(`div`,{className:`card pad-md mb-12 cli-card`,children:[(0,h.jsxs)(`div`,{className:`row wrap between`,style:{alignItems:`flex-start`},children:[(0,h.jsxs)(`div`,{className:`stack`,style:{gap:4},children:[(0,h.jsx)(`h3`,{style:{margin:0},children:(0,h.jsx)(`code`,{children:e.name})}),e.help&&(0,h.jsx)(`p`,{className:`sub`,style:{margin:0},children:e.help})]}),(0,h.jsx)(C,{text:`${t} ${e.name}`})]}),(0,h.jsx)(`pre`,{className:`cli-syn`,children:r}),(e.positionals||[]).length>0&&(0,h.jsxs)(`div`,{className:`cli-block`,children:[(0,h.jsx)(`div`,{className:`cli-block-head`,children:`Arguments`}),e.positionals.map(e=>(0,h.jsx)(S,{a:e,kind:`positional`},e.dest))]}),(e.options||[]).length>0&&(0,h.jsxs)(`div`,{className:`cli-block`,children:[(0,h.jsx)(`div`,{className:`cli-block-head`,children:`Options`}),e.options.map(e=>(0,h.jsx)(S,{a:e,kind:`option`},e.names.join(`,`)))]})]})}function T({page:e}){let t=e.prog||`geneseed`,n=e.commands||[];return(0,h.jsxs)(`div`,{className:`detail-doc`,children:[(0,h.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,h.jsxs)(`p`,{className:`sub`,style:{marginTop:4},children:[`Every subcommand of `,(0,h.jsx)(`code`,{children:t}),`. Generated from the parser at request time (the same one `,(0,h.jsx)(`code`,{children:`geneseed`}),` actually parses), so this page cannot drift.`]}),(0,h.jsx)(`div`,{style:{marginTop:18},children:n.map(e=>(0,h.jsx)(w,{cmd:e,prog:t},e.name))})]})}function E({page:e}){let t=e.rows||[],n=e.theme||`neutral`;return(0,h.jsxs)(`div`,{className:`detail-doc`,children:[(0,h.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,h.jsxs)(`p`,{className:`sub`,style:{marginTop:4},children:[`Geneseed's invented vocabulary, decoded. Left: the neutral, plain-English term. Right: the word your `,(0,h.jsx)(`code`,{style:{textTransform:`capitalize`},children:n}),` theme actually uses in the agent's voice.`]}),(0,h.jsx)(`div`,{className:`card pad-md`,style:{marginTop:18},children:(0,h.jsxs)(`table`,{className:`glossary-table`,children:[(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{children:[(0,h.jsx)(`th`,{children:`Concept`}),(0,h.jsx)(`th`,{children:`Neutral term`}),(0,h.jsxs)(`th`,{children:[`In `,n]}),(0,h.jsx)(`th`,{children:`Meaning`})]})}),(0,h.jsx)(`tbody`,{children:t.map(e=>(0,h.jsxs)(`tr`,{children:[(0,h.jsx)(`td`,{children:(0,h.jsx)(`strong`,{children:e.label})}),(0,h.jsx)(`td`,{children:(0,h.jsx)(`code`,{children:e.neutral||`—`})}),(0,h.jsx)(`td`,{children:(0,h.jsx)(`code`,{children:e.themed||e.neutral||`—`})}),(0,h.jsx)(`td`,{className:`dim`,children:e.desc})]},e.label))})]})})]})}function D({page:e}){let t=e.version||{},n=[[`Theme`,e.theme],[`Install mode`,e.emit],[`Deployed`,e.deployed?`yes`:`no`],[`Target`,(0,h.jsx)(`code`,{children:e.target},`t`)],[`Source root`,(0,h.jsx)(`code`,{children:e.root},`r`)],[`Installed build`,(0,h.jsx)(`code`,{children:t.installed_fp||`(none)`},`i`)],[`Source build`,(0,h.jsx)(`code`,{children:t.source_fp||`—`},`s`)],[`Match?`,t.verdict||`—`],[`License`,e.license]];return(0,h.jsxs)(`div`,{className:`detail-doc`,children:[(0,h.jsx)(`h1`,{style:{marginTop:0},children:e.title}),(0,h.jsx)(`p`,{className:`sub`,style:{marginTop:4},children:`Live snapshot of the install behind this UI, plus where to go next.`}),(0,h.jsx)(`div`,{className:`card pad-md`,style:{marginTop:18},children:n.map(([e,t])=>(0,h.jsxs)(`div`,{className:`kv`,children:[(0,h.jsx)(`span`,{className:`k`,children:e}),(0,h.jsx)(`span`,{className:`v`,children:t??`—`})]},e))}),(0,h.jsxs)(`div`,{className:`row wrap gap-10`,style:{marginTop:18},children:[(0,h.jsxs)(`a`,{className:`btn ghost`,href:e.repo,target:`_blank`,rel:`noreferrer`,children:[(0,h.jsx)(a,{name:`external`}),e.repo_is_github?`GitHub repo`:`Source repo`]}),e.repo_is_github&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`a`,{className:`btn ghost`,href:`${e.repo}/issues`,target:`_blank`,rel:`noreferrer`,children:[(0,h.jsx)(a,{name:`external`}),`File an issue`]}),(0,h.jsxs)(`a`,{className:`btn ghost`,href:`${e.repo}/blob/main/LICENSE`,target:`_blank`,rel:`noreferrer`,children:[(0,h.jsx)(a,{name:`external`}),`License`]})]})]})]})}function O(e){return e?.groups?.[0]?.pages?.[0]?.id||``}function k({pageId:e,harness:t,overview:n,onAction:r}){let{data:i,error:a,loading:l}=o(()=>e?u.docsPage(e,t):Promise.resolve(null),[e,t]);if(a)return(0,h.jsx)(c,{error:a,style:{margin:18}});if(l||!i)return(0,h.jsx)(s,{label:`Loading page…`});switch(i.kind){case`markdown`:case`concept`:return(0,h.jsx)(b,{page:i,overview:n,onAction:r});case`cli`:return(0,h.jsx)(T,{page:i});case`glossary`:return(0,h.jsx)(E,{page:i});case`about`:return(0,h.jsx)(D,{page:i});default:return(0,h.jsxs)(`div`,{className:`empty`,children:[(0,h.jsx)(`div`,{className:`big`,children:`Unknown page kind`}),i.kind]})}}function A(e,t){if(!e||!t)return null;for(let n of e.groups)if(n.pages.some(e=>e.id===t))return n;return null}function j({page:e,query:t,overview:n,onAction:a}){let[p,g]=d(l(n?.emit)),{data:_,error:v}=o(()=>u.docs(p),[p]),y=e||O(_);(0,m.useEffect)(()=>{if(_&&y&&!_.groups.some(e=>e.pages.some(e=>e.id===y))){let e=O(_);e&&e!==y&&r(`#/docs/${encodeURIComponent(e)}`)}},[_,y]);let b=A(_,y)||_?.groups?.[0],x=(t||``).toLowerCase().trim(),S=(0,m.useMemo)(()=>_?x?_.groups.map(e=>({...e,pages:e.pages.filter(t=>t.title.toLowerCase().includes(x)||e.label.toLowerCase().includes(x)||t.id.toLowerCase().includes(x))})).filter(e=>e.pages.length>0):b?[b]:[]:[],[_,x,b]);if(v)return(0,h.jsx)(c,{error:v});let C=_?.groups||[],w=!!x,T=e=>{let t=e.pages[0]?.id;t&&r(`#/docs/${encodeURIComponent(t)}`)};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`div`,{className:`head-row mb-16`,children:[(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`div`,{className:`eyebrow`,children:`documentation`}),(0,h.jsx)(`h1`,{className:`h`,children:`Docs`}),(0,h.jsx)(`p`,{className:`sub`,children:`Concept pages, a generated CLI reference, and a glossary. Pages and config that differ by host are filtered to your selected harness.`})]}),(0,h.jsx)(f,{"aria-label":`Harness`,children:i.map(e=>(0,h.jsx)(`button`,{className:p===e.id?`on`:``,onClick:()=>g(e.id),"aria-pressed":p===e.id,children:e.label},e.id))})]}),(0,h.jsx)(`div`,{className:`lib-secbar`,children:C.map(e=>(0,h.jsxs)(`button`,{className:`lib-secchip ${b?.id===e.id?`on`:``}`,onClick:()=>T(e),children:[(0,h.jsx)(`span`,{children:e.label}),(0,h.jsx)(`span`,{className:`lib-secchip-n`,children:e.pages.length})]},e.id))}),(0,h.jsxs)(`div`,{className:`lib lib-2`,children:[(0,h.jsxs)(`div`,{className:`card lib-main`,children:[(0,h.jsxs)(`div`,{className:`lib-head`,children:[(0,h.jsx)(`span`,{className:`lib-head-label`,children:x?`all groups`:b?.label||``}),(0,h.jsxs)(`span`,{className:`lib-head-count`,children:[S.reduce((e,t)=>e+t.pages.length,0),` pages`]})]}),(0,h.jsxs)(`div`,{className:`lib-rows`,children:[S.map(e=>(0,h.jsxs)(`div`,{className:`docs-group`,children:[w&&(0,h.jsx)(`div`,{className:`docs-group-head`,children:e.label}),e.pages.map(e=>(0,h.jsxs)(`button`,{className:`lib-row ${y===e.id?`on`:``}`,onClick:()=>r(`#/docs/${encodeURIComponent(e.id)}`),children:[(0,h.jsx)(`div`,{className:`lr-name`,children:e.title}),e.date?(0,h.jsx)(`div`,{className:`lr-desc`,children:e.date}):null]},e.id))]},e.id)),S.length===0&&_&&(0,h.jsxs)(`div`,{className:`empty`,style:{padding:32},children:[(0,h.jsx)(`div`,{className:`big`,children:`No matches`}),`Try another search.`]}),!_&&(0,h.jsx)(s,{label:`Loading docs…`})]})]}),(0,h.jsx)(`div`,{className:`card lib-detail`,children:(0,h.jsx)(k,{pageId:y,harness:p,overview:n,onAction:a})})]})]})}export{j as default};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,t as n}from"./react-DbkvxWG5.js";import{c as r,f as i,i as a,n as o,rt as s}from"./index-CAqrWhKl.js";var c=e(t(),1),l=n();function u({group:e,i:t}){let n=e.problems.length===0,[i,a]=(0,c.useState)(!n);return(0,l.jsxs)(`div`,{className:`card check rise ${n?``:`bad`} ${i?`open`:``}`,style:{"--i":t*.6},children:[(0,l.jsxs)(`button`,{className:`check-head`,onClick:()=>a(e=>!e),disabled:n,style:{cursor:n?`default`:`pointer`},"aria-expanded":n?void 0:i,children:[(0,l.jsx)(`span`,{className:`feed-dot ${n?`ok`:`bad`}`,style:{width:9,height:9}}),(0,l.jsx)(`h3`,{children:e.label}),(0,l.jsxs)(`span`,{className:`badge ${n?`ok`:`bad`}`,children:[(0,l.jsx)(`span`,{className:`dot`}),n?`clean`:`${e.problems.length} problem${e.problems.length===1?``:`s`}`]}),!n&&(0,l.jsx)(r,{name:`chevron`,className:`chev glyph`})]}),!n&&i&&(0,l.jsx)(`div`,{className:`check-body`,children:e.problems.map(e=>(0,l.jsxs)(`div`,{className:`problem`,children:[(0,l.jsx)(`span`,{className:`x`,children:`✕`}),(0,l.jsx)(`span`,{children:e})]},e))})]})}function d(){let{data:e,error:t,reload:n,setData:c}=i(()=>s.doctor(),[]);return t?(0,l.jsx)(o,{error:t}):(0,l.jsxs)(`div`,{className:`narrow`,children:[(0,l.jsxs)(`div`,{className:`head-row mb-16`,children:[(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`h1`,{className:`h`,children:`Doctor`}),(0,l.jsx)(`p`,{className:`sub`,children:`Every check builds each theme in a sandbox and validates the result: token resolution, link integrity, parity, and drift.`})]}),(0,l.jsxs)(`button`,{className:`btn ghost`,onClick:()=>{c(null),n()},disabled:!e,children:[(0,l.jsx)(r,{name:`refresh`}),e?`Re-run checks`:`Running…`]})]}),e?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`div`,{className:`card pad-md mb-16`,children:(0,l.jsxs)(`div`,{className:`row wrap between gap-12`,children:[(0,l.jsxs)(`div`,{className:`row`,style:{gap:10,flexWrap:`wrap`},children:[(0,l.jsxs)(`span`,{className:`dim mono`,style:{fontSize:12},children:[`validated `,e.themes.length,` theme`,e.themes.length===1?``:`s`]}),e.themes.map(e=>(0,l.jsx)(`span`,{className:`badge`,style:{textTransform:`capitalize`},children:e},e))]}),e.ok?(0,l.jsxs)(`span`,{className:`badge ok`,children:[(0,l.jsx)(`span`,{className:`dot`}),`all clean`]}):(0,l.jsxs)(`span`,{className:`badge bad`,children:[(0,l.jsx)(`span`,{className:`dot`}),e.problems.length,` problem`,e.problems.length===1?``:`s`]})]})}),(0,l.jsx)(`div`,{className:`stack gap-12`,children:e.groups.map((e,t)=>(0,l.jsx)(u,{group:e,i:t},e.label))})]}):(0,l.jsx)(a,{label:`Running every check (builds each theme in a sandbox)…`})]})}export{d as default};
1
+ import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,t as n}from"./react-DbkvxWG5.js";import{c as r,f as i,i as a,n as o,rt as s}from"./index-AN5Emnrg.js";var c=e(t(),1),l=n();function u({group:e,i:t}){let n=e.problems.length===0,[i,a]=(0,c.useState)(!n);return(0,l.jsxs)(`div`,{className:`card check rise ${n?``:`bad`} ${i?`open`:``}`,style:{"--i":t*.6},children:[(0,l.jsxs)(`button`,{className:`check-head`,onClick:()=>a(e=>!e),disabled:n,style:{cursor:n?`default`:`pointer`},"aria-expanded":n?void 0:i,children:[(0,l.jsx)(`span`,{className:`feed-dot ${n?`ok`:`bad`}`,style:{width:9,height:9}}),(0,l.jsx)(`h3`,{children:e.label}),(0,l.jsxs)(`span`,{className:`badge ${n?`ok`:`bad`}`,children:[(0,l.jsx)(`span`,{className:`dot`}),n?`clean`:`${e.problems.length} problem${e.problems.length===1?``:`s`}`]}),!n&&(0,l.jsx)(r,{name:`chevron`,className:`chev glyph`})]}),!n&&i&&(0,l.jsx)(`div`,{className:`check-body`,children:e.problems.map(e=>(0,l.jsxs)(`div`,{className:`problem`,children:[(0,l.jsx)(`span`,{className:`x`,children:`✕`}),(0,l.jsx)(`span`,{children:e})]},e))})]})}function d(){let{data:e,error:t,reload:n,setData:c}=i(()=>s.doctor(),[]);return t?(0,l.jsx)(o,{error:t}):(0,l.jsxs)(`div`,{className:`narrow`,children:[(0,l.jsxs)(`div`,{className:`head-row mb-16`,children:[(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`h1`,{className:`h`,children:`Doctor`}),(0,l.jsx)(`p`,{className:`sub`,children:`Every check builds each theme in a sandbox and validates the result: token resolution, link integrity, parity, and drift.`})]}),(0,l.jsxs)(`button`,{className:`btn ghost`,onClick:()=>{c(null),n()},disabled:!e,children:[(0,l.jsx)(r,{name:`refresh`}),e?`Re-run checks`:`Running…`]})]}),e?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`div`,{className:`card pad-md mb-16`,children:(0,l.jsxs)(`div`,{className:`row wrap between gap-12`,children:[(0,l.jsxs)(`div`,{className:`row`,style:{gap:10,flexWrap:`wrap`},children:[(0,l.jsxs)(`span`,{className:`dim mono`,style:{fontSize:12},children:[`validated `,e.themes.length,` theme`,e.themes.length===1?``:`s`]}),e.themes.map(e=>(0,l.jsx)(`span`,{className:`badge`,style:{textTransform:`capitalize`},children:e},e))]}),e.ok?(0,l.jsxs)(`span`,{className:`badge ok`,children:[(0,l.jsx)(`span`,{className:`dot`}),`all clean`]}):(0,l.jsxs)(`span`,{className:`badge bad`,children:[(0,l.jsx)(`span`,{className:`dot`}),e.problems.length,` problem`,e.problems.length===1?``:`s`]})]})}),(0,l.jsx)(`div`,{className:`stack gap-12`,children:e.groups.map((e,t)=>(0,l.jsx)(u,{group:e,i:t},e.label))})]}):(0,l.jsx)(a,{label:`Running every check (builds each theme in a sandbox)…`})]})}export{d as default};
@@ -1,2 +1,2 @@
1
- import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,t as n}from"./react-DbkvxWG5.js";import{t as r}from"./drawable-BgfrEBer.js";import{E as i,M as a,S as o,T as s,b as c,c as l,k as u,l as d,r as f,w as p}from"./index-CAqrWhKl.js";import{t as m}from"./jobBuckets-Dbq8ZlWW.js";var h=e(t(),1),g=n(),_=12,v=120,y=[`#2BB673`,`#16A6A6`,`#E8A23B`,`#E07A5F`,`#8E7DBE`,`#5BD08A`,`#79856E`],b=650;function x({segments:e,size:t=186,stroke:n=26,caption:o=`capabilities`}){let c=e.reduce((e,t)=>e+t.value,0)||1,l=(0,h.useRef)(null),d=e.map(e=>e.value).join(`,`);(0,h.useLayoutEffect)(()=>{let t=l.current?.querySelectorAll(`path`);if(!t?.length||!s())return;let n=e.filter(e=>e.value>0).map(e=>e.value/c),o=n.map((e,t)=>n.slice(0,t).reduce((e,t)=>e+t,0)),d=r(t);u(d,{draw:`0 0`});let f=a(d,{draw:[`0 0`,`0 1`],duration:(e,t)=>Math.max(b*n[t],60),delay:(e,t)=>b*o[t],ease:`linear`});return i(f,b)},[d]);let f=t/2-n/2,m=t/2,_=t/2,v=[],y=0;for(let t of e)v.push(y),y+=t.value;return(0,g.jsxs)(`svg`,{width:t,height:t,viewBox:`0 0 ${t} ${t}`,children:[(0,g.jsx)(`circle`,{cx:m,cy:_,r:f,fill:`none`,stroke:`var(--surface-3)`,strokeWidth:n}),(0,g.jsx)(`g`,{ref:l,children:e.map((e,t)=>{if(e.value/c<=0)return null;let r=v[t]/c*2*Math.PI-Math.PI/2,i=(v[t]+e.value)/c*2*Math.PI-Math.PI/2,a=m+f*Math.cos(r),o=_+f*Math.sin(r),s=m+f*Math.cos(i),l=_+f*Math.sin(i),u=+(i-r>Math.PI);return(0,g.jsx)(`path`,{d:`M ${a} ${o} A ${f} ${f} 0 ${u} 1 ${s} ${l}`,fill:`none`,stroke:e.color,strokeWidth:n,strokeLinecap:`butt`,children:(0,g.jsxs)(`title`,{children:[e.label,`: `,e.value]})},t)})}),(0,g.jsx)(`text`,{x:m,y:_-4,textAnchor:`middle`,className:`donut-c-num`,children:(0,g.jsx)(p,{value:c,duration:b})}),(0,g.jsx)(`text`,{x:m,y:_+16,textAnchor:`middle`,className:`donut-c-cap`,children:o})]})}function S(e){if(e.length<2)return e.length?`M${e[0][0]},${e[0][1]}`:``;let t=`M${e[0][0]},${e[0][1]}`;for(let n=0;n<e.length-1;n++){let r=e[n-1]||e[n],i=e[n],a=e[n+1],o=e[n+2]||a,s=i[0]+(a[0]-r[0])/6,c=i[1]+(a[1]-r[1])/6,l=a[0]-(o[0]-i[0])/6,u=a[1]-(o[1]-i[1])/6;t+=` C${s},${c} ${l},${u} ${a[0]},${a[1]}`}return t}function C({data:e,height:t=156,accent:n}){if(!e.length)return null;let r=t,i=Math.max(...e.map(e=>e.v),1)+1,a=e.length>1?588/(e.length-1):588,o=e.map((e,t)=>[6+t*a,r-6-e.v/i*(r-14-6)]),s=S(o),c=o[o.length-1],l=o[0],u=`${s} L${c[0]},${r} L${l[0]},${r} Z`;return(0,g.jsxs)(`svg`,{viewBox:`0 0 600 ${r}`,preserveAspectRatio:`none`,style:{width:`100%`,height:t,display:`block`,overflow:`visible`},children:[(0,g.jsx)(`defs`,{children:(0,g.jsxs)(`linearGradient`,{id:`b-grad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,g.jsx)(`stop`,{offset:`0`,stopColor:n,stopOpacity:`.28`}),(0,g.jsx)(`stop`,{offset:`1`,stopColor:n,stopOpacity:`0`})]})}),(0,g.jsx)(`path`,{d:u,fill:`url(#b-grad)`}),(0,g.jsx)(`path`,{d:s,fill:`none`,stroke:n,strokeWidth:`2`,strokeLinejoin:`round`,strokeLinecap:`round`,vectorEffect:`non-scaling-stroke`}),(0,g.jsx)(`circle`,{cx:c[0],cy:c[1],r:`3.5`,fill:n,vectorEffect:`non-scaling-stroke`})]})}function w({label:e,value:t,sub:n,color:r,icon:i}){return(0,g.jsxs)(`div`,{className:`b-tile`,children:[(0,g.jsx)(`span`,{className:`b-tile-ic`,style:{background:`color-mix(in srgb, ${r} 18%, transparent)`,color:r},children:(0,g.jsx)(l,{name:i})}),(0,g.jsxs)(`div`,{className:`b-tile-body`,children:[(0,g.jsx)(`div`,{className:`b-tile-val`+(t===0?` zero`:``),children:t}),(0,g.jsx)(`div`,{className:`b-tile-label`,children:e})]}),(0,g.jsx)(`div`,{className:`b-tile-sub`,children:n})]})}function T({overview:e,sigil:t,jobs:n,doctor:r,onAction:i}){let a=e.counts||{},s=r?.groups||[],u=s.length>0,h=s.filter(e=>e.problems.length===0).length,b=s.length||1,S=f(e),T=d(e.diff),E=o.filter(e=>(a[e]||0)>0).map((e,t)=>({label:c[e].label,value:a[e]||0,color:y[t%y.length]})),D=E.reduce((e,t)=>e+t.value,0),O=m(n||[],10),k=O.reduce((e,t)=>e+t.v,0);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`b-greet`,children:[(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`div`,{className:`eyebrow`,children:`your harness`}),(0,g.jsx)(`h1`,{className:`h b-h`,children:S}),(0,g.jsx)(`p`,{className:`sub`,children:t||`A friendly read of every layer growing in your harness.`})]}),(0,g.jsxs)(`div`,{className:`row gap-8`,children:[(0,g.jsxs)(`button`,{className:`btn`,onClick:()=>i(`update`),children:[(0,g.jsx)(l,{name:`refresh`}),`Update`]}),(0,g.jsxs)(`button`,{className:`btn ghost`,onClick:()=>i(`build-all`),children:[(0,g.jsx)(l,{name:`build`}),`Rebuild`]})]})]}),(0,g.jsxs)(`div`,{className:`grid b-hero-grid mb-16`,children:[(0,g.jsxs)(`div`,{className:`card b-hero`,children:[(0,g.jsx)(`div`,{className:`b-hero-ring`,children:(0,g.jsx)(x,{segments:[{label:`pass`,value:h,color:y[0]},{label:`attention`,value:Math.max(b-h,0),color:y[2]}],size:168,stroke:20,caption:`checks`})}),(0,g.jsxs)(`div`,{className:`b-hero-side`,children:[(0,g.jsx)(`h3`,{className:`b-hero-title`,children:u?`${h} of ${b} checks pass`:`Running checks…`}),(0,g.jsxs)(`p`,{className:`sub`,children:[`One source, rendered into `,(0,g.jsx)(`code`,{children:e.target}),` and inherited by every repo on this machine.`]}),u&&(0,g.jsx)(`ul`,{className:`b-hero-checks`,children:s.map(e=>{let t=e.problems.length===0;return(0,g.jsxs)(`li`,{className:`b-hcheck ${t?`ok`:`bad`}`,title:t?`clean`:e.problems.join(`; `),children:[(0,g.jsx)(`span`,{className:`b-hcheck-mark`,children:t?`✓`:`!`}),(0,g.jsx)(`span`,{className:`b-hcheck-label`,children:e.label})]},e.label)})}),(0,g.jsxs)(`div`,{className:`b-chips`,children:[(0,g.jsxs)(`span`,{className:`b-chip`,children:[(0,g.jsx)(`b`,{style:{textTransform:`capitalize`},children:e.theme}),` voice`]}),(0,g.jsx)(`span`,{className:`b-chip`,children:(0,g.jsx)(`b`,{children:e.emit})}),(0,g.jsxs)(`span`,{className:`b-chip`,children:[`built `,(0,g.jsx)(`b`,{children:e.build_time||`unknown`})]})]})]})]}),(0,g.jsxs)(`div`,{className:`b-tiles`,children:[(0,g.jsx)(w,{label:`Agents`,value:a.agents??`—`,sub:`specialists`,color:y[0],icon:`layers`}),(0,g.jsx)(w,{label:`Skills`,value:a.skills??`—`,sub:`workflows`,color:y[1],icon:`skill`}),(0,g.jsx)(w,{label:`Invariants`,value:a.laws??`—`,sub:a.doctrines?`${a.doctrines.active}/${a.doctrines.total} packs · ${a.doctrines.rules} rules`:`all upheld`,color:y[2],icon:`law`}),(0,g.jsx)(w,{label:`Edits`,value:T,sub:`to graft`,color:y[3],icon:`changes`})]})]}),(0,g.jsxs)(`div`,{className:`grid split-even mb-16`,children:[(0,g.jsxs)(`div`,{className:`card pad-lg b-mix-card`,children:[(0,g.jsxs)(`div`,{className:`card-head`,children:[(0,g.jsx)(`h3`,{children:`Capability mix`}),(0,g.jsx)(`div`,{className:`right`,children:(0,g.jsxs)(`span`,{className:`tick`,children:[D,` total`]})})]}),(0,g.jsxs)(`div`,{className:`b-mix`,children:[(0,g.jsx)(x,{segments:E,size:186,stroke:26}),(0,g.jsx)(`div`,{className:`b-legend`,children:E.map(e=>(0,g.jsxs)(`div`,{className:`b-leg-row`,children:[(0,g.jsx)(`span`,{className:`b-leg-dot`,style:{background:e.color}}),(0,g.jsx)(`span`,{className:`b-leg-name`,children:e.label}),(0,g.jsx)(`span`,{className:`b-leg-bar`,children:(0,g.jsx)(`i`,{style:{width:`${e.value/D*100}%`,background:e.color}})}),(0,g.jsx)(`span`,{className:`b-leg-val`,children:e.value})]},e.label))})]})]}),(0,g.jsxs)(`div`,{className:`card pad-lg`,children:[(0,g.jsxs)(`div`,{className:`card-head`,children:[(0,g.jsx)(`h3`,{children:`Recent runs`}),(0,g.jsx)(`div`,{className:`right`,children:(0,g.jsxs)(`span`,{className:`badge ok`,children:[(0,g.jsx)(`span`,{className:`dot`}),`job log`]})})]}),(0,g.jsxs)(`div`,{className:`b-stat-lead`,children:[(0,g.jsx)(`span`,{className:`b-stat-big`,children:(0,g.jsx)(p,{value:k})}),(0,g.jsxs)(`span`,{className:`b-stat-cap`,children:[`runs in the last 10 days · `,h,`/`,b,` checks pass now`]})]}),(0,g.jsx)(C,{data:O,accent:y[0],height:156})]})]}),(0,g.jsxs)(`div`,{className:`card pad-lg`,children:[(0,g.jsxs)(`div`,{className:`card-head`,children:[(0,g.jsx)(`h3`,{children:`Recent activity`}),(0,g.jsx)(`div`,{className:`right`,children:(0,g.jsxs)(`span`,{className:`tick`,children:[`last `,Math.min(n?.length||0,12),` runs`]})})]}),(0,g.jsxs)(`div`,{className:`b-timeline`,children:[(n||[]).slice(0,_).map(e=>{let t=e.status===`done`,n=e.status===`failed`?`warn`:t?`ok`:`acc`;return(0,g.jsxs)(`div`,{className:`b-tl-row`,children:[(0,g.jsx)(`span`,{className:`b-tl-node ${n}`}),(0,g.jsxs)(`div`,{className:`b-tl-body`,children:[(0,g.jsx)(`b`,{children:e.action}),e.output?`: ${e.output.split(`
1
+ import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,t as n}from"./react-DbkvxWG5.js";import{t as r}from"./drawable-BTHjTzF7.js";import{E as i,M as a,S as o,T as s,b as c,c as l,k as u,l as d,r as f,w as p}from"./index-AN5Emnrg.js";import{t as m}from"./jobBuckets-Dbq8ZlWW.js";var h=e(t(),1),g=n(),_=12,v=120,y=[`#2BB673`,`#16A6A6`,`#E8A23B`,`#E07A5F`,`#8E7DBE`,`#5BD08A`,`#79856E`],b=650;function x({segments:e,size:t=186,stroke:n=26,caption:o=`capabilities`}){let c=e.reduce((e,t)=>e+t.value,0)||1,l=(0,h.useRef)(null),d=e.map(e=>e.value).join(`,`);(0,h.useLayoutEffect)(()=>{let t=l.current?.querySelectorAll(`path`);if(!t?.length||!s())return;let n=e.filter(e=>e.value>0).map(e=>e.value/c),o=n.map((e,t)=>n.slice(0,t).reduce((e,t)=>e+t,0)),d=r(t);u(d,{draw:`0 0`});let f=a(d,{draw:[`0 0`,`0 1`],duration:(e,t)=>Math.max(b*n[t],60),delay:(e,t)=>b*o[t],ease:`linear`});return i(f,b)},[d]);let f=t/2-n/2,m=t/2,_=t/2,v=[],y=0;for(let t of e)v.push(y),y+=t.value;return(0,g.jsxs)(`svg`,{width:t,height:t,viewBox:`0 0 ${t} ${t}`,children:[(0,g.jsx)(`circle`,{cx:m,cy:_,r:f,fill:`none`,stroke:`var(--surface-3)`,strokeWidth:n}),(0,g.jsx)(`g`,{ref:l,children:e.map((e,t)=>{if(e.value/c<=0)return null;let r=v[t]/c*2*Math.PI-Math.PI/2,i=(v[t]+e.value)/c*2*Math.PI-Math.PI/2,a=m+f*Math.cos(r),o=_+f*Math.sin(r),s=m+f*Math.cos(i),l=_+f*Math.sin(i),u=+(i-r>Math.PI);return(0,g.jsx)(`path`,{d:`M ${a} ${o} A ${f} ${f} 0 ${u} 1 ${s} ${l}`,fill:`none`,stroke:e.color,strokeWidth:n,strokeLinecap:`butt`,children:(0,g.jsxs)(`title`,{children:[e.label,`: `,e.value]})},t)})}),(0,g.jsx)(`text`,{x:m,y:_-4,textAnchor:`middle`,className:`donut-c-num`,children:(0,g.jsx)(p,{value:c,duration:b})}),(0,g.jsx)(`text`,{x:m,y:_+16,textAnchor:`middle`,className:`donut-c-cap`,children:o})]})}function S(e){if(e.length<2)return e.length?`M${e[0][0]},${e[0][1]}`:``;let t=`M${e[0][0]},${e[0][1]}`;for(let n=0;n<e.length-1;n++){let r=e[n-1]||e[n],i=e[n],a=e[n+1],o=e[n+2]||a,s=i[0]+(a[0]-r[0])/6,c=i[1]+(a[1]-r[1])/6,l=a[0]-(o[0]-i[0])/6,u=a[1]-(o[1]-i[1])/6;t+=` C${s},${c} ${l},${u} ${a[0]},${a[1]}`}return t}function C({data:e,height:t=156,accent:n}){if(!e.length)return null;let r=t,i=Math.max(...e.map(e=>e.v),1)+1,a=e.length>1?588/(e.length-1):588,o=e.map((e,t)=>[6+t*a,r-6-e.v/i*(r-14-6)]),s=S(o),c=o[o.length-1],l=o[0],u=`${s} L${c[0]},${r} L${l[0]},${r} Z`;return(0,g.jsxs)(`svg`,{viewBox:`0 0 600 ${r}`,preserveAspectRatio:`none`,style:{width:`100%`,height:t,display:`block`,overflow:`visible`},children:[(0,g.jsx)(`defs`,{children:(0,g.jsxs)(`linearGradient`,{id:`b-grad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,g.jsx)(`stop`,{offset:`0`,stopColor:n,stopOpacity:`.28`}),(0,g.jsx)(`stop`,{offset:`1`,stopColor:n,stopOpacity:`0`})]})}),(0,g.jsx)(`path`,{d:u,fill:`url(#b-grad)`}),(0,g.jsx)(`path`,{d:s,fill:`none`,stroke:n,strokeWidth:`2`,strokeLinejoin:`round`,strokeLinecap:`round`,vectorEffect:`non-scaling-stroke`}),(0,g.jsx)(`circle`,{cx:c[0],cy:c[1],r:`3.5`,fill:n,vectorEffect:`non-scaling-stroke`})]})}function w({label:e,value:t,sub:n,color:r,icon:i}){return(0,g.jsxs)(`div`,{className:`b-tile`,children:[(0,g.jsx)(`span`,{className:`b-tile-ic`,style:{background:`color-mix(in srgb, ${r} 18%, transparent)`,color:r},children:(0,g.jsx)(l,{name:i})}),(0,g.jsxs)(`div`,{className:`b-tile-body`,children:[(0,g.jsx)(`div`,{className:`b-tile-val`+(t===0?` zero`:``),children:t}),(0,g.jsx)(`div`,{className:`b-tile-label`,children:e})]}),(0,g.jsx)(`div`,{className:`b-tile-sub`,children:n})]})}function T({overview:e,sigil:t,jobs:n,doctor:r,onAction:i}){let a=e.counts||{},s=r?.groups||[],u=s.length>0,h=s.filter(e=>e.problems.length===0).length,b=s.length||1,S=f(e),T=d(e.diff),E=o.filter(e=>(a[e]||0)>0).map((e,t)=>({label:c[e].label,value:a[e]||0,color:y[t%y.length]})),D=E.reduce((e,t)=>e+t.value,0),O=m(n||[],10),k=O.reduce((e,t)=>e+t.v,0);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`b-greet`,children:[(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`div`,{className:`eyebrow`,children:`your harness`}),(0,g.jsx)(`h1`,{className:`h b-h`,children:S}),(0,g.jsx)(`p`,{className:`sub`,children:t||`A friendly read of every layer growing in your harness.`})]}),(0,g.jsxs)(`div`,{className:`row gap-8`,children:[(0,g.jsxs)(`button`,{className:`btn`,onClick:()=>i(`update`),children:[(0,g.jsx)(l,{name:`refresh`}),`Update`]}),(0,g.jsxs)(`button`,{className:`btn ghost`,onClick:()=>i(`build-all`),children:[(0,g.jsx)(l,{name:`build`}),`Rebuild`]})]})]}),(0,g.jsxs)(`div`,{className:`grid b-hero-grid mb-16`,children:[(0,g.jsxs)(`div`,{className:`card b-hero`,children:[(0,g.jsx)(`div`,{className:`b-hero-ring`,children:(0,g.jsx)(x,{segments:[{label:`pass`,value:h,color:y[0]},{label:`attention`,value:Math.max(b-h,0),color:y[2]}],size:168,stroke:20,caption:`checks`})}),(0,g.jsxs)(`div`,{className:`b-hero-side`,children:[(0,g.jsx)(`h3`,{className:`b-hero-title`,children:u?`${h} of ${b} checks pass`:`Running checks…`}),(0,g.jsxs)(`p`,{className:`sub`,children:[`One source, rendered into `,(0,g.jsx)(`code`,{children:e.target}),` and inherited by every repo on this machine.`]}),u&&(0,g.jsx)(`ul`,{className:`b-hero-checks`,children:s.map(e=>{let t=e.problems.length===0;return(0,g.jsxs)(`li`,{className:`b-hcheck ${t?`ok`:`bad`}`,title:t?`clean`:e.problems.join(`; `),children:[(0,g.jsx)(`span`,{className:`b-hcheck-mark`,children:t?`✓`:`!`}),(0,g.jsx)(`span`,{className:`b-hcheck-label`,children:e.label})]},e.label)})}),(0,g.jsxs)(`div`,{className:`b-chips`,children:[(0,g.jsxs)(`span`,{className:`b-chip`,children:[(0,g.jsx)(`b`,{style:{textTransform:`capitalize`},children:e.theme}),` voice`]}),(0,g.jsx)(`span`,{className:`b-chip`,children:(0,g.jsx)(`b`,{children:e.emit})}),(0,g.jsxs)(`span`,{className:`b-chip`,children:[`built `,(0,g.jsx)(`b`,{children:e.build_time||`unknown`})]})]})]})]}),(0,g.jsxs)(`div`,{className:`b-tiles`,children:[(0,g.jsx)(w,{label:`Agents`,value:a.agents??`—`,sub:`specialists`,color:y[0],icon:`layers`}),(0,g.jsx)(w,{label:`Skills`,value:a.skills??`—`,sub:`workflows`,color:y[1],icon:`skill`}),(0,g.jsx)(w,{label:`Invariants`,value:a.laws??`—`,sub:a.doctrines?`${a.doctrines.active}/${a.doctrines.total} packs · ${a.doctrines.rules} rules`:`all upheld`,color:y[2],icon:`law`}),(0,g.jsx)(w,{label:`Edits`,value:T,sub:`to graft`,color:y[3],icon:`changes`})]})]}),(0,g.jsxs)(`div`,{className:`grid split-even mb-16`,children:[(0,g.jsxs)(`div`,{className:`card pad-lg b-mix-card`,children:[(0,g.jsxs)(`div`,{className:`card-head`,children:[(0,g.jsx)(`h3`,{children:`Capability mix`}),(0,g.jsx)(`div`,{className:`right`,children:(0,g.jsxs)(`span`,{className:`tick`,children:[D,` total`]})})]}),(0,g.jsxs)(`div`,{className:`b-mix`,children:[(0,g.jsx)(x,{segments:E,size:186,stroke:26}),(0,g.jsx)(`div`,{className:`b-legend`,children:E.map(e=>(0,g.jsxs)(`div`,{className:`b-leg-row`,children:[(0,g.jsx)(`span`,{className:`b-leg-dot`,style:{background:e.color}}),(0,g.jsx)(`span`,{className:`b-leg-name`,children:e.label}),(0,g.jsx)(`span`,{className:`b-leg-bar`,children:(0,g.jsx)(`i`,{style:{width:`${e.value/D*100}%`,background:e.color}})}),(0,g.jsx)(`span`,{className:`b-leg-val`,children:e.value})]},e.label))})]})]}),(0,g.jsxs)(`div`,{className:`card pad-lg`,children:[(0,g.jsxs)(`div`,{className:`card-head`,children:[(0,g.jsx)(`h3`,{children:`Recent runs`}),(0,g.jsx)(`div`,{className:`right`,children:(0,g.jsxs)(`span`,{className:`badge ok`,children:[(0,g.jsx)(`span`,{className:`dot`}),`job log`]})})]}),(0,g.jsxs)(`div`,{className:`b-stat-lead`,children:[(0,g.jsx)(`span`,{className:`b-stat-big`,children:(0,g.jsx)(p,{value:k})}),(0,g.jsxs)(`span`,{className:`b-stat-cap`,children:[`runs in the last 10 days · `,h,`/`,b,` checks pass now`]})]}),(0,g.jsx)(C,{data:O,accent:y[0],height:156})]})]}),(0,g.jsxs)(`div`,{className:`card pad-lg`,children:[(0,g.jsxs)(`div`,{className:`card-head`,children:[(0,g.jsx)(`h3`,{children:`Recent activity`}),(0,g.jsx)(`div`,{className:`right`,children:(0,g.jsxs)(`span`,{className:`tick`,children:[`last `,Math.min(n?.length||0,12),` runs`]})})]}),(0,g.jsxs)(`div`,{className:`b-timeline`,children:[(n||[]).slice(0,_).map(e=>{let t=e.status===`done`,n=e.status===`failed`?`warn`:t?`ok`:`acc`;return(0,g.jsxs)(`div`,{className:`b-tl-row`,children:[(0,g.jsx)(`span`,{className:`b-tl-node ${n}`}),(0,g.jsxs)(`div`,{className:`b-tl-body`,children:[(0,g.jsx)(`b`,{children:e.action}),e.output?`: ${e.output.split(`
2
2
  `)[0].slice(0,v)}`:``]}),(0,g.jsx)(`span`,{className:`b-tl-when`,children:e.duration?`${e.duration}s`:e.status})]},e.id)}),(!n||n.length===0)&&(0,g.jsxs)(`div`,{className:`b-tl-row`,children:[(0,g.jsx)(`span`,{className:`b-tl-node`}),(0,g.jsx)(`div`,{className:`b-tl-body sub`,children:`No runs yet. Trigger an action to populate this.`}),(0,g.jsx)(`span`,{className:`b-tl-when`,children:`—`})]})]})]})]})}export{T as default};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,t as n}from"./react-DbkvxWG5.js";import{c as r,f as i,i as a,n as o,rt as s}from"./index-AN5Emnrg.js";var c=e(t(),1),l=n();function u({label:e,value:t,options:n,onChange:r}){return n.length?(0,l.jsx)(`select`,{className:`sel`,"aria-label":e,value:t,onChange:e=>r(e.target.value),children:n.map(e=>(0,l.jsx)(`option`,{value:e,children:e},e))}):null}var d=[`full`,`lean`];function f({on:e,disabled:t,label:n,onToggle:r}){return(0,l.jsx)(`input`,{type:`checkbox`,role:`switch`,className:`sw-toggle${e?` on`:``}`,checked:e,"aria-checked":e,disabled:t,"aria-label":n,onChange:r,onKeyDown:e=>{e.key===`Enter`&&!t&&r()}})}var p=(e,t)=>`${e} ${t}`,ee=(e,t)=>t===`project`?e===`claude`?`.claude/ + the CLAUDE.md block`:e===`bob`?`.bob/ + the AGENTS.md block`:e===`copilot`?`.github's Geneseed agents/skills + the AGENTS.md block`:e===`openclaude`?`.openclaude/ + its CLAUDE.md block`:`.opencode/ + AGENT.md + the bundle`:e===`claude`?`~/.claude's agents/skills + the CLAUDE.md block + settings hooks`:e===`bob`?`~/.bob's agents/skills + the AGENTS.md block + settings hooks`:e===`copilot`?`~/.copilot's agents/skills + the copilot-instructions.md block`:e===`openclaude`?`~/.openclaude's agents/skills + the CLAUDE.md block + settings hooks`:`~/.config/opencode's AGENT.md, agents, skills, plugins + the opencode.json entry`;function m(){let{data:e,error:t,reload:n}=i(()=>s.excludes(),[]),[a,o]=(0,c.useState)(!1),[u,d]=(0,c.useState)([]),f=async(e,t)=>{o(!0);try{let n=await s.excludeMutate(e,t);d(n.messages||[])}catch(e){d(e.body?.messages||[e.message])}finally{o(!1),n()}};return t||!e?.installs?.length?null:(0,l.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,l.jsx)(`div`,{className:`card-head`,children:(0,l.jsx)(`h3`,{children:`Excluded folders`})}),(0,l.jsx)(`p`,{className:`sub mb-16`,children:`Sovereign repos: inside these folders every global harness goes dormant — hooks stay silent and the global preamble is not loaded.`}),(e.excludes||[]).map(e=>(0,l.jsxs)(`div`,{className:`row wrap between gap-12`,children:[(0,l.jsx)(`code`,{children:e.path}),(0,l.jsxs)(`span`,{className:`mono muted`,children:[`[`,e.hosts.join(`, `),`]`]}),(0,l.jsx)(`button`,{className:`btn ghost sm`,disabled:a,onClick:()=>f(`remove`,e.path),children:`Remove`})]},e.path)),(0,l.jsxs)(`button`,{className:`btn ghost sm`,disabled:a,onClick:async()=>{o(!0);try{let e=await s.pickFolder();e.path?await f(`add`,e.path):e.error&&d([e.error])}catch(e){d([e.message])}finally{o(!1)}},children:[(0,l.jsx)(r,{name:`folder`}),` Exclude a folder…`]}),u.map((e,t)=>(0,l.jsx)(`p`,{className:`sub`,children:e},t))]})}function h({overview:e}){let t=e?.install;return t?(0,l.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,l.jsxs)(`div`,{className:`card-head`,children:[(0,l.jsxs)(`h3`,{children:[t.host,` · `,t.scope]}),(0,l.jsx)(`span`,{className:`tick right`,children:`active`})]}),(0,l.jsxs)(`div`,{className:`kv`,children:[(0,l.jsx)(`span`,{className:`k`,children:`path`}),(0,l.jsx)(`code`,{className:`v`,children:t.path})]}),(0,l.jsxs)(`div`,{className:`kv`,children:[(0,l.jsx)(`span`,{className:`k`,children:`voice`}),(0,l.jsx)(`span`,{className:`v mono`,children:e.theme||`—`})]}),(0,l.jsxs)(`div`,{className:`kv`,children:[(0,l.jsx)(`span`,{className:`k`,children:`footprint`}),(0,l.jsx)(`span`,{className:`v mono`,children:e.footprint||`—`})]}),(0,l.jsxs)(`div`,{className:`kv`,children:[(0,l.jsx)(`span`,{className:`k`,children:`built`}),(0,l.jsx)(`span`,{className:`v mono`,children:e.build_time||`never`})]}),(0,l.jsx)(`p`,{className:`sub motto`,children:`Per-folder overrides global: inside a folder with its own harness, only the folder’s harness loads there.`})]}):null}function g({themes:e,overview:t}){if(!e.length||!t)return null;let n=t.theme,r=[...e].sort((e,t)=>e.name===n?-1:+(t.name===n));return(0,l.jsxs)(`details`,{className:`card voice-ref mb-16`,children:[(0,l.jsxs)(`summary`,{children:[(0,l.jsx)(`span`,{className:`vr-title`,children:`Voice`}),(0,l.jsx)(`span`,{className:`vr-current`,children:n}),(0,l.jsxs)(`span`,{className:`tick vr-hint`,children:[e.length,` to choose from — set it per install below`]})]}),(0,l.jsx)(`div`,{className:`vr-list`,children:r.map(e=>(0,l.jsxs)(`div`,{className:`voice-row${e.name===n?` current`:``}`,children:[(0,l.jsx)(`span`,{className:`vr-name`,children:e.name}),(0,l.jsx)(`span`,{className:`vr-desc`,children:e.tagline?`“${e.tagline}”`:e.blurb})]},e.name))})]})}function _({onAction:e,themes:t=[],currentTheme:n,overview:_,dataRev:v,onMutated:y}){let{data:b,error:x}=i(()=>s.installs(),[v]),{data:S,error:C}=i(()=>s.mcp(),[v]),[w,T]=(0,c.useState)(``),[E,D]=(0,c.useState)(``),[te,O]=(0,c.useState)(``),[ne,re]=(0,c.useState)({}),[ie,ae]=(0,c.useState)({}),[oe,se]=(0,c.useState)({}),[ce,le]=(0,c.useState)({}),[k,ue]=(0,c.useState)({}),[A,j]=(0,c.useState)(null),[M,N]=(0,c.useState)(!1),[P,F]=(0,c.useState)(null),[I,L]=(0,c.useState)(``),de=(0,c.useMemo)(()=>{let e={};for(let t of S?.targets||[]){let n=p(t.host||`opencode`,t.root);(e[n]||(e[n]=[])).push(t)}return e},[S]);if(x||C)return(0,l.jsx)(o,{error:x||C});if(!b||!S)return(0,l.jsx)(a,{});let R=b.installs,z=b.postures||[],B=b.modes||[],V=R.filter(e=>e.state===`active`).length,fe=[{key:`global`,title:`Global`,sub:`machine-wide`,rows:R.filter(e=>e.scope===`global`),empty:`No global installs detected.`},{key:`project`,title:`Per-project`,sub:`one folder each`,rows:R.filter(e=>e.scope!==`global`),empty:`No per-project installs yet; use “Deploy to folder…”.`}],H=e=>ne[e.id]||e.theme||n||`neutral`,U=(e,t)=>re(n=>({...n,[e.id]:t})),W=e=>ie[e.id]||e.footprint||`full`,G=(e,t)=>ae(n=>({...n,[e.id]:t})),K=e=>oe[e.id]||e.posture||`peer`,q=(e,t)=>se(n=>({...n,[e.id]:t})),J=e=>ce[e.id]||e.mode||`direct`,Y=(e,t)=>le(n=>({...n,[e.id]:t})),pe=e=>H(e)===e.theme&&W(e)===(e.footprint||`full`)&&K(e)===(e.posture||`peer`)&&J(e)===(e.mode||`direct`),X=t=>{let n=H(t),r=W(t),i=K(t),a=J(t),o=t.state===`absent`?`Install Geneseed into ${t.path} with the “${n}” voice (${r} footprint, ${i} posture, ${a} mode)? Files are added non-destructively (your own config is left untouched); deactivate or uninstall later.`:`Rebuild this install (voice “${n}”, ${r} footprint, ${i} posture, ${a} mode)? It rebuilds in place, non-destructive.`;window.confirm(o)&&e?.(`install`,{host:t.host,scope:t.scope,path:t.path,theme:n,footprint:r,posture:i,mode:a})},me=async e=>{if(e.state!==`active`||window.confirm(`Deactivate this install? Files are moved aside, not deleted; reactivate any time.`)){D(e.id),T(``);try{let t=await s.installToggle(e.host,e.path,e.state===`active`?`deactivate`:`activate`);if(!t.ok){let e=Array.isArray(t.failed)?t.failed.join(`, `):``;T(t.error||e&&`unrestored: ${e}`||`action failed`);return}y?.()}catch(e){T(e.message)}finally{D(``)}}},he=async()=>{let e=P;if(e){D(e.id),T(``);try{let t=await s.installRemove(e.host,e.path,e.memory);if(!t.ok){T(t.error||`remove failed`);return}F(null),y?.()}catch(e){T(e.message)}finally{D(``)}}},Z=async e=>{T(``);try{let t=await s.mcpReveal(e.path);T(`Opening ${t.dir} — if no window appeared, open that folder by hand.`)}catch(e){T(e.message)}},Q=async(e,t)=>{let n=e.path+t.name;O(n),T(``);try{await s.mcpToggle(e.path,t.name,t.state!==`enabled`),y?.()}catch(e){T(e.message)}finally{O(``)}},ge=e=>ue(t=>({...t,[e]:!t[e]})),_e=()=>R.find(e=>e.selected)?.host||R.find(e=>e.state===`active`)?.host||R[0]?.host||`opencode`,ve=()=>j({path:``,host:_e(),theme:n||`neutral`,footprint:`full`,posture:`peer`,mode:`direct`}),ye=async()=>{N(!0),T(``);try{let e=await s.pickFolder();e.path?j(t=>t&&{...t,path:e.path}):e.error&&T(e.error)}catch(e){T(e.message)}finally{N(!1)}},$=async()=>{let t=(A?.path||``).trim();if(!t){T(`Choose or type a folder to deploy into.`);return}T(``),await e?.(`deploy`,{host:A.host,path:t,theme:A.theme,footprint:A.footprint,posture:A.posture,mode:A.mode})&&j(null)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`div`,{className:`head-row mb-18`,children:[(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`div`,{className:`eyebrow`,children:`Setup`}),(0,l.jsx)(`h1`,{className:`h`,children:`Harness`}),(0,l.jsx)(`p`,{className:`sub`,children:`This machine’s install: where it lives, how it’s built, and the voice it speaks with. Other hosts (Claude Code, Bob, Copilot, OpenClaude) install from here too.`})]}),(0,l.jsxs)(`div`,{className:`row wrap gap-10`,children:[e?(0,l.jsxs)(`button`,{className:`btn`,onClick:()=>A?j(null):ve(),children:[(0,l.jsx)(r,{name:`folder`}),` Deploy to folder…`]}):null,(0,l.jsxs)(`button`,{className:`btn`,onClick:()=>e(`build-all`),children:[(0,l.jsx)(r,{name:`refresh`}),` Rebuild all`]})]})]}),(0,l.jsx)(h,{overview:_}),(0,l.jsx)(g,{themes:t,overview:_}),(0,l.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,l.jsxs)(`div`,{className:`card-head`,children:[(0,l.jsx)(`h3`,{children:`Every install`}),(0,l.jsx)(`div`,{className:`right`,children:(0,l.jsxs)(`span`,{className:`tick`,children:[V,` active · `,R.length,` total`]})})]}),A?(0,l.jsxs)(`div`,{className:`deploy-pop`,children:[(0,l.jsxs)(`div`,{className:`dp-row`,children:[(0,l.jsx)(`input`,{className:`inp dp-path`,type:`text`,placeholder:`/path/to/project, or click Browse…`,value:A.path,onChange:e=>j(t=>({...t,path:e.target.value})),onKeyDown:e=>e.key===`Enter`&&$(),"aria-label":`Folder to deploy into`}),(0,l.jsx)(`button`,{className:`btn ghost sm`,disabled:M,onClick:ye,children:M?`Choosing…`:`Browse…`})]}),(0,l.jsxs)(`div`,{className:`dp-row`,children:[(0,l.jsxs)(`label`,{className:`dp-field`,children:[(0,l.jsx)(`span`,{children:`Deploy as`}),(0,l.jsxs)(`select`,{className:`sel`,"aria-label":`host for the new harness`,value:A.host,onChange:e=>j(t=>({...t,host:e.target.value})),children:[(0,l.jsx)(`option`,{value:`opencode`,children:`OpenCode`}),(0,l.jsx)(`option`,{value:`claude`,children:`Claude Code`}),(0,l.jsx)(`option`,{value:`bob`,children:`BOB (IBM)`}),(0,l.jsx)(`option`,{value:`copilot`,children:`GitHub Copilot`}),(0,l.jsx)(`option`,{value:`openclaude`,children:`OpenClaude`})]})]}),(0,l.jsxs)(`label`,{className:`dp-field`,children:[(0,l.jsx)(`span`,{children:`Voice`}),(0,l.jsx)(u,{label:`voice for the new harness`,value:A.theme,options:t.map(e=>e.name),onChange:e=>j(t=>({...t,theme:e}))})]}),(0,l.jsxs)(`label`,{className:`dp-field`,children:[(0,l.jsx)(`span`,{children:`Footprint`}),(0,l.jsx)(u,{label:`footprint for the new harness`,value:A.footprint,options:d,onChange:e=>j(t=>({...t,footprint:e}))})]}),(0,l.jsxs)(`label`,{className:`dp-field`,children:[(0,l.jsx)(`span`,{children:`Posture`}),(0,l.jsx)(u,{label:`posture for the new harness`,value:A.posture,options:z,onChange:e=>j(t=>({...t,posture:e}))})]}),(0,l.jsxs)(`label`,{className:`dp-field`,children:[(0,l.jsx)(`span`,{children:`Mode`}),(0,l.jsx)(u,{label:`mode for the new harness`,value:A.mode,options:B,onChange:e=>j(t=>({...t,mode:e}))})]}),(0,l.jsx)(`button`,{className:`btn sm`,onClick:$,children:`Deploy`}),(0,l.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>j(null),children:`Cancel`})]}),(0,l.jsxs)(`p`,{className:`sub dp-note`,children:[`Adds a per-repo harness (`,(0,l.jsx)(`code`,{children:A.host===`claude`?`.claude/ + CLAUDE.md`:A.host===`bob`?`.bob/ + AGENTS.md`:A.host===`copilot`?`.github/ + AGENTS.md`:A.host===`openclaude`?`.openclaude/ + its CLAUDE.md`:`.opencode/ + AGENT.md`}),`) into the folder, non-destructively. It’s then tracked here even after you leave its directory.`]})]}):null,(0,l.jsxs)(`p`,{className:`sub mb-16`,children:[`Every Geneseed install on this machine: OpenCode, Claude Code, Bob, Copilot, and OpenClaude — global and per-repo. Toggle one off without deleting it (files move aside, reactivate any time). Active rows expand to wire their MCP servers.`,` `,(0,l.jsx)(`strong`,{children:`Rebuild all`}),` re-emits every active install in its own voice and mode, as one background job.`]}),(0,l.jsxs)(`p`,{className:`sub mb-16`,children:[(0,l.jsx)(`strong`,{children:`Per-folder now overrides global.`}),` Inside a folder that has its own harness, the `,(0,l.jsx)(`em`,{children:`same host’s`}),` global harness steps aside; only the folder’s harness loads there (the global one still applies everywhere else). Set`,` `,(0,l.jsx)(`code`,{children:`GENESEED_STACK_GLOBAL=1`}),` to load both. Existing installs pick this up on their next rebuild.`]}),w?(0,l.jsx)(`p`,{className:`badge bad mb-16`,children:w}):null,(0,l.jsx)(`div`,{className:`tbl-scroll`,children:(0,l.jsxs)(`table`,{className:`tbl harness-tbl`,children:[(0,l.jsx)(`thead`,{children:(0,l.jsxs)(`tr`,{children:[(0,l.jsx)(`th`,{"aria-label":`expand`}),(0,l.jsx)(`th`,{children:`Harness`}),(0,l.jsx)(`th`,{children:`Voice`}),(0,l.jsx)(`th`,{children:`MCP`}),(0,l.jsx)(`th`,{children:`Status`}),(0,l.jsx)(`th`,{className:`th-acts`})]})}),fe.map(e=>(0,l.jsxs)(`tbody`,{children:[(0,l.jsx)(`tr`,{className:`h-group`,children:(0,l.jsxs)(`td`,{colSpan:6,children:[e.title,(0,l.jsxs)(`span`,{className:`hg-sub`,children:[` · `,e.sub]})]})}),e.rows.length?e.rows.map(be):(0,l.jsx)(`tr`,{className:`h-empty-row`,children:(0,l.jsx)(`td`,{colSpan:6,className:`h-empty`,children:e.empty})})]},e.key))]})})]}),(0,l.jsx)(m,{})]});function be(n){let i=n.state===`active`,a=de[p(n.host,n.path)]||[],o=a.length>0,s=o&&!k[n.id],m=a.reduce((e,t)=>e+t.servers.filter(e=>e.state===`enabled`).length,0),h=`voice for ${n.host} · ${n.scope}`,g=i?`active`:n.state===`disabled`?`disabled`:`not installed`;return(0,l.jsxs)(c.Fragment,{children:[(0,l.jsxs)(`tr`,{children:[(0,l.jsx)(`td`,{className:`h-exp-cell`,children:o?(0,l.jsx)(`button`,{className:`h-exp`,"aria-expanded":s,"aria-label":`${s?`collapse`:`expand`} MCP for ${n.host} · ${n.scope}`,onClick:()=>ge(n.id),children:(0,l.jsx)(r,{name:`chevron`,className:`glyph${s?` open`:``}`})}):null}),(0,l.jsxs)(`td`,{children:[(0,l.jsxs)(`span`,{className:`name`,children:[n.host,` · `,n.scope]}),(0,l.jsx)(`code`,{className:`h-path`,title:n.path,children:n.path})]}),(0,l.jsx)(`td`,{className:`mono`,children:n.theme||`—`}),(0,l.jsx)(`td`,{children:o?(0,l.jsxs)(`span`,{className:m?`mono`:`mono muted`,children:[m,` on`]}):(0,l.jsx)(`span`,{className:`muted`,children:`—`})}),(0,l.jsx)(`td`,{children:(0,l.jsx)(`span`,{className:`badge ${i?`ok`:``}`,children:g})}),(0,l.jsx)(`td`,{children:(0,l.jsxs)(`div`,{className:`h-acts`,children:[(0,l.jsx)(`div`,{className:`ha-cell ha-voice`,children:i&&e?(0,l.jsx)(u,{label:h,value:H(n),options:t.map(e=>e.name),onChange:e=>U(n,e)}):null}),(0,l.jsx)(`div`,{className:`ha-cell ha-fp`,children:i&&e?(0,l.jsx)(u,{label:`footprint for ${n.host} · ${n.scope}`,value:W(n),options:d,onChange:e=>G(n,e)}):null}),(0,l.jsx)(`div`,{className:`ha-cell ha-posture`,children:i&&e?(0,l.jsx)(u,{label:`posture for ${n.host} · ${n.scope}`,value:K(n),options:z,onChange:e=>q(n,e)}):null}),(0,l.jsx)(`div`,{className:`ha-cell ha-mode`,children:i&&e?(0,l.jsx)(u,{label:`mode for ${n.host} · ${n.scope}`,value:J(n),options:B,onChange:e=>Y(n,e)}):null}),(0,l.jsx)(`div`,{className:`ha-cell ha-btn`,children:n.state===`absent`&&e?(0,l.jsx)(`button`,{className:`btn ghost sm`,"aria-expanded":I===n.id,onClick:()=>L(e=>e===n.id?``:n.id),children:`Install…`}):i&&e?(0,l.jsx)(`button`,{className:`btn ghost sm`,disabled:pe(n),onClick:()=>X(n),children:`Apply`}):null}),(0,l.jsx)(`div`,{className:`ha-cell ha-sw`,children:n.state===`absent`?null:(0,l.jsx)(f,{on:i,disabled:E===n.id,label:`activate ${n.host} · ${n.scope}`,onToggle:()=>me(n)})}),(0,l.jsx)(`div`,{className:`ha-cell ha-trash`,children:n.state!==`absent`&&e?(0,l.jsx)(`button`,{className:`btn ghost sm h-trash`,"aria-label":`remove ${n.host} · ${n.scope} from ${n.path}`,title:`Remove this harness`,disabled:E===n.id,onClick:()=>F(e=>e?.id===n.id?null:{id:n.id,host:n.host,path:n.path,memory:`keep`}),children:(0,l.jsx)(r,{name:`clear`})}):null})]})})]}),n.state===`absent`&&I===n.id?(0,l.jsxs)(`tr`,{className:`h-detail-row h-setup-row`,children:[(0,l.jsx)(`td`,{}),(0,l.jsx)(`td`,{colSpan:5,className:`h-detail`,children:(0,l.jsxs)(`div`,{className:`h-setup`,children:[(0,l.jsxs)(`p`,{className:`sub hs-msg`,children:[`Install Geneseed into `,(0,l.jsx)(`code`,{children:n.path}),` as `,(0,l.jsx)(`strong`,{children:n.host}),`. Files are added non-destructively; deactivate or uninstall later.`]}),(0,l.jsxs)(`div`,{className:`hs-steps`,children:[(0,l.jsxs)(`label`,{className:`hs-step`,children:[(0,l.jsx)(`span`,{children:`1 · Voice`}),(0,l.jsx)(u,{label:h,value:H(n),options:t.map(e=>e.name),onChange:e=>U(n,e)})]}),(0,l.jsxs)(`label`,{className:`hs-step`,children:[(0,l.jsx)(`span`,{children:`2 · Footprint`}),(0,l.jsx)(u,{label:`footprint for ${n.host} · ${n.scope}`,value:W(n),options:d,onChange:e=>G(n,e)})]}),(0,l.jsxs)(`label`,{className:`hs-step`,children:[(0,l.jsx)(`span`,{children:`3 · Posture`}),(0,l.jsx)(u,{label:`posture for ${n.host} · ${n.scope}`,value:K(n),options:z,onChange:e=>q(n,e)})]}),(0,l.jsxs)(`label`,{className:`hs-step`,children:[(0,l.jsx)(`span`,{children:`4 · Mode`}),(0,l.jsx)(u,{label:`mode for ${n.host} · ${n.scope}`,value:J(n),options:B,onChange:e=>Y(n,e)})]})]}),(0,l.jsxs)(`div`,{className:`hr-acts`,children:[(0,l.jsx)(`button`,{className:`btn sm`,onClick:()=>X(n),children:`Install`}),(0,l.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>L(``),children:`Cancel`})]})]})})]}):null,P?.id===n.id?(0,l.jsxs)(`tr`,{className:`h-detail-row h-remove-row`,children:[(0,l.jsx)(`td`,{}),(0,l.jsx)(`td`,{colSpan:5,className:`h-detail`,children:(0,l.jsxs)(`div`,{className:`h-remove`,children:[(0,l.jsxs)(`div`,{className:`hr-msg`,children:[(0,l.jsx)(`strong`,{children:n.scope===`project`?`Remove this harness from the folder?`:`Remove the global ${n.host} install?`}),(0,l.jsxs)(`span`,{className:`sub`,children:[`Deletes `,(0,l.jsx)(`code`,{children:ee(n.host,n.scope)}),n.scope===`project`?` and de-lists it.`:`; the row stays, marked “not installed.”`,` `,`This can’t be undone.`]})]}),(0,l.jsxs)(`label`,{className:`hr-field`,children:[(0,l.jsx)(`span`,{children:`Memory & notebook`}),(0,l.jsxs)(`select`,{className:`sel`,"aria-label":`memory disposition`,value:P.memory,onChange:e=>F(t=>({...t,memory:e.target.value})),children:[(0,l.jsx)(`option`,{value:`keep`,children:`keep in place`}),(0,l.jsx)(`option`,{value:`archive`,children:`archive aside`}),(0,l.jsx)(`option`,{value:`delete`,children:`delete too`})]})]}),(0,l.jsxs)(`div`,{className:`hr-acts`,children:[(0,l.jsx)(`button`,{className:`btn sm hr-go`,disabled:E===n.id,onClick:he,children:E===n.id?`Removing…`:`Remove`}),(0,l.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>F(null),children:`Cancel`})]})]})})]}):null,s?(0,l.jsxs)(`tr`,{className:`h-detail-row`,children:[(0,l.jsx)(`td`,{}),(0,l.jsx)(`td`,{colSpan:5,className:`h-detail`,children:a.map(e=>(0,l.jsxs)(`div`,{className:`mcp-target`,children:[(0,l.jsxs)(`div`,{className:`mt-head`,children:[e.label,` · `,(0,l.jsx)(`code`,{children:e.path}),(0,l.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>Z(e),title:`Open the folder holding ${e.path} — tokens and URLs go in this file`,children:`Open folder`}),e.commented&&` (has comments; edit by hand)`]}),e.servers.map(t=>{let n=e.path+t.name,r=!!(e.commented||te===n);return(0,l.jsxs)(`div`,{className:`mcp-row`,children:[(0,l.jsxs)(`div`,{className:`mcp-info`,children:[(0,l.jsxs)(`div`,{className:`mi-top`,children:[(0,l.jsx)(`strong`,{children:t.label}),(0,l.jsx)(`span`,{className:`badge ${t.state===`enabled`?`ok`:``}`,children:t.state})]}),(0,l.jsx)(`p`,{children:t.desc})]}),t.state===`absent`?t.preset?(0,l.jsx)(`button`,{className:`btn ghost sm`,disabled:r,onClick:()=>Q(e,t),children:`Add`}):null:(0,l.jsx)(f,{on:t.state===`enabled`,disabled:r,label:`${t.label} server`,onToggle:()=>Q(e,t)})]},t.name)})]},e.path))})]}):null]},n.id)}}export{f as Switch,_ as default};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,t as n}from"./react-DbkvxWG5.js";import{t as r}from"./drawable-BgfrEBer.js";import{$ as i,A as a,B as o,C as s,E as c,F as l,G as u,H as d,I as f,J as p,K as m,L as h,M as g,N as _,O as v,P as y,R as b,T as x,U as S,V as C,W as w,Y as T,Z as E,b as D,d as O,et as k,j as A,k as j,nt as M,q as N,rt as P,u as F,z as I}from"./index-CAqrWhKl.js";import{a as L}from"./lawCats-BLgxl151.js";function R(e){return C((e.iterationDuration+e._loopDelay)*e.iterationCount-e._loopDelay)||1e-11}function z(e,t,n,r,i,a){let s=w(e.duration)&&e.duration<=1e-11?n-k:n;t.composition&&b(t,s,1,1,M.AUTO);let c=r?new A(r,e,t,s,!1,i,a):new l(e,t,s);return t.composition&&c.init(!0),o(t,c),d(t,e=>{let n=e._offset+e._delay+e.duration;n>t.iterationDuration&&(t.iterationDuration=n)}),t.duration=R(t),t}var B=0,V=class extends l{constructor(e={}){super(e,null,0),++B,this.id=N(e.id)?B:e.id,this.duration=0,this.labels={};let t=e.defaults,n=E.defaults;this.defaults=t?p(t,n):n,this.composition=I(e.composition,!0),this.onRender=e.onRender||n.onRender;let r=I(e.playbackEase,n.playbackEase);this._ease=r?_(r):null,this.iterationDuration=0}add(e,t,n){let r=u(t),i=u(e);if(r||i){if(this._hasChildren=!0,r){let r=t,i=E.editor&&E.editor.addTimelineChild,o=n&&n.type===`Stagger`&&E.editor,s=S(n)?n:null;if(s||o){let t=y(e),o=this.duration,c=this.iterationDuration,l=r.id,u=0,d=t.length,f=i?i(e,r,this.id,n,d):null,p=s||E.editor.resolveStagger(n.defaultValue);t.forEach(e=>{let n={...f||r};this.duration=o,this.iterationDuration=c,N(l)||(n.id=l+`-`+u);let i=a(this,p(e,u,t,null,this));z(n,this,i,e,u,t),u++})}else{let t=i?i(e,r,this.id,n):r,o=n&&n.type?n.defaultValue:n;z(t,this,a(this,o),e)}}else z(e,this,a(this,t));return this.composition&&this.init(!0),this}}sync(e,t){if(N(e)||e&&N(e.pause))return this;e.pause();let n=+(e.effect?e.effect.getTiming().duration:e.duration);!N(e)&&!N(e.persist)&&(e.persist=!0);let r=E.editor,i=r&&r.addTimelineChild;r&&r.addTimelineSync&&(t=r.addTimelineSync(e,t,this.id),r.addTimelineChild=null);let a=this.add(e,{currentTime:[0,n],duration:n,delay:0,ease:`linear`,playbackEase:`linear`},t);return r&&(r.addTimelineChild=i),a}set(e,t,n){return N(t)?this:(t.duration=k,t.composition=i.replace,this.add(e,t,n))}call(e,t){return N(e)||e&&!S(e)?this:(E.editor&&E.editor.addTimelineCall&&(t=E.editor.addTimelineCall(e,t,this.id)),this.add({duration:0,delay:0,onComplete:()=>e(this)},t))}label(e,t){return N(e)||e&&!m(e)?this:(E.editor&&E.editor.addTimelineLabel&&(t=E.editor.addTimelineLabel(e,t,this.id)),this.labels[e]=a(this,t),this)}remove(e,t){return f(y(e),this,t),this}stretch(e){let t=this.duration;if(t===T(e))return this;let n=e/t,r=this.labels;d(this,e=>e.stretch(e.duration*n));for(let e in r)r[e]*=n;return super.stretch(e)}refresh(){return d(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),d(this,e=>e.revert,!0),h(this)}then(e){return super.then(e)}},H=e=>E.editor?E.editor.addTimeline(e):new V(e).init(),U=e(t(),1),W=n(),G=.62,K=(e,t)=>String(e).length*t*G;function q(e,t){let n=0;for(let t of e){if(t.t===``||t.t==null)continue;let e=K(t.t,t.size)/2;n=Math.max(n,Math.hypot(e,t.dy-t.size*.75),Math.hypot(e,t.dy+t.size*.25))}return Math.ceil(n+t)}function J(e,t,n=0){let r=t.x-e.x,i=t.y-e.y,a=Math.hypot(r,i)||1,o=r/a,s=i/a,c=e.x+o*e.r,l=e.y+s*e.r,u=t.x-o*t.r,d=t.y-s*t.r,f=n*a,p=e=>e.toFixed(1);return`M${p(c)} ${p(l)} C${p(c+o*a*.3-s*f)} ${p(l+s*a*.3+o*f)} ${p(u-o*a*.3-s*f)} ${p(d-s*a*.3+o*f)} ${p(u)} ${p(d)}`}var Y=!1,X=!1,Z=850;function Q({hash:e,label:t,part:n,children:r}){return(0,W.jsx)(`g`,{className:`cm-node`,"data-cm":n,role:`button`,tabIndex:0,"aria-label":t,onClick:()=>s(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),s(e))},children:r})}function $({overview:e}){let[t,n]=(0,U.useState)(null);(0,U.useEffect)(()=>{let e=!0;return P.catalog(`laws`).then(t=>e&&n(t.items||[])).catch(()=>{}),()=>{e=!1}},[]);let i=(0,U.useRef)(null),a=(0,U.useRef)(!0),o=(0,U.useRef)(null);(0,U.useLayoutEffect)(()=>{let e=i.current;if(!e||Y||!x())return;Y=!0;let t=t=>[...e.querySelectorAll(t)],n=t(`[data-cm="hub"]`),s=t(`[data-cm="sat"]`),l=t(`[data-cm="gov"]`),u=t(`.cm-edge-gov`),d=t(`.cm-note, .cm-govern-label`),f=r(t(`.cm-edge`));j([...n,...s,...l],{opacity:0,scale:.7}),j([...u,...d],{opacity:0}),j(f,{draw:`0 0`});let p=H({autoplay:!1,defaults:{ease:`outExpo`}}).add(n,{opacity:1,scale:1,duration:450},0).add(f,{draw:`0 1`,duration:380,delay:v(70)},140).add(s,{opacity:1,scale:1,duration:420,delay:v(70)},260).add(u,{opacity:1,duration:300,delay:v(50)},420).add(l,{opacity:1,scale:1,duration:380,delay:v(50)},470).add(d,{opacity:1,duration:300},520);a.current=!1;let m=()=>p.complete(),h=()=>{p.play(),m=c(p,Z),a.current=!0,o.current?.()};if(typeof IntersectionObserver>`u`)return h(),()=>m();let g=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(g.disconnect(),h())},{threshold:.33});return g.observe(e),()=>{g.disconnect(),a.current=!0,m()}},[]);let s=e?.counts||{},l=O(s),u=[];for(let e of(t||[]).filter(e=>e.tier===`doctrine`)){let t=u.find(t=>t.id===e.pack);t||u.push(t={id:e.pack,on:0}),e.active!==!1&&(t.on+=1)}let d=e?.footprint===`lean`?`lean — first line only`:`full text inlined`,f={x:330,y:165,r:q([{t:`Constitution`,size:17,dy:-12},{t:`${l} rules in force`,size:10,dy:8},{t:d,size:8.5,dy:24}],12)},p={x:126,y:95,r:q([{t:`Ethos`,size:12.5,dy:-7},{t:`${s.ontology??0} sections`,size:10,dy:10}],11)},m={x:560,y:78,r:q([{t:`Invariants`,size:12.5,dy:-6},{t:`${s.laws??0}`,size:13,dy:12}],11)},h={x:560,y:252,r:q([{t:`Doctrines`,size:12.5,dy:-6},{t:`${s.doctrines?.rules??0}`,size:13,dy:12}],11)},_=(e,t,n,r)=>({x:e,y:t,label:n,count:r,r:q([{t:n,size:10.5,dy:-2},{t:`${r}`,size:9,dy:10}],9)}),y=[{..._(812,52,`Skills`,s.skills??0),hash:`#/skills`,from:m},{..._(820,126,`Agents`,s.agents??0),hash:`#/agents`,from:m},{..._(816,232,`Memory`,s.memory??0),hash:`#/section/memory`,from:h},{..._(812,300,`Wiki`,s.wiki??0),hash:`#/section/wiki`,from:h}],b={rx:122,ry:68,from:212,to:112},S=u.map((e,t)=>{let n=(u.length===1?(b.from+b.to)/2:b.from+(b.to-b.from)*t/(u.length-1))*Math.PI/180;return{...e,x:h.x+b.rx*Math.cos(n),y:h.y+b.ry*Math.sin(n),r:q([{t:e.id,size:7.5,dy:-2},{t:`${e.on}`,size:7.5,dy:8}],4)}}),C=S.length;return(0,U.useLayoutEffect)(()=>{let e=i.current;if(!e||!C||X||!x())return;X=!0;let t=[...e.querySelectorAll(`.cm-mini > g`)];j(t,{opacity:0,scale:.5});let n=()=>j(t,{opacity:1,scale:1}),r=()=>{o.current=null;let e=g(t,{opacity:1,scale:1,duration:380,delay:v(45,{start:420}),ease:`outExpo`});n=c(e,420+45*C+380)};return a.current?r():o.current=r,()=>{o.current=null,n()}},[C]),(0,W.jsxs)(`svg`,{ref:i,className:`cmap`,viewBox:`0 0 940 350`,role:`group`,"aria-label":`The constitution map`,children:[(0,W.jsx)(`path`,{d:J(f,p,.05),className:`cm-edge`}),(0,W.jsx)(`path`,{d:J(f,m,-.07),className:`cm-edge`}),(0,W.jsx)(`path`,{d:J(f,h,.07),className:`cm-edge`}),y.map(e=>(0,W.jsx)(`path`,{d:J(e.from,e,.03),className:`cm-edge-gov`},`e-${e.label}`)),(0,W.jsxs)(Q,{hash:`#/laws`,part:`hub`,label:`Constitution: ${l} rules in force`,children:[(0,W.jsx)(`circle`,{cx:f.x,cy:f.y,r:f.r,className:`cm-hub-disc`}),(0,W.jsx)(`text`,{x:f.x,y:f.y-12,textAnchor:`middle`,className:`cm-hub-name`,children:`Constitution`}),(0,W.jsxs)(`text`,{x:f.x,y:f.y+8,textAnchor:`middle`,className:`cm-hub-num`,children:[l,` rules in force`]}),(0,W.jsx)(`text`,{x:f.x,y:f.y+24,textAnchor:`middle`,className:`cm-note`,children:d})]}),(0,W.jsxs)(Q,{hash:`#/laws`,part:`sat`,label:`Ethos: ${s.ontology??0} sections`,children:[(0,W.jsx)(`circle`,{cx:p.x,cy:p.y,r:p.r,className:`cm-sat-disc`}),(0,W.jsx)(`text`,{x:p.x,y:p.y-7,textAnchor:`middle`,className:`cm-sat-name`,children:`Ethos`}),(0,W.jsxs)(`text`,{x:p.x,y:p.y+10,textAnchor:`middle`,className:`cm-sat-num`,children:[s.ontology??0,` sections`]})]}),(0,W.jsx)(`text`,{x:p.x,y:p.y+p.r+16,textAnchor:`middle`,className:`cm-note`,children:`how it thinks, not a rule`}),(0,W.jsxs)(Q,{hash:`#/laws`,part:`sat`,label:`Invariants: ${s.laws??0}, never broken`,children:[(0,W.jsx)(`circle`,{cx:m.x,cy:m.y,r:m.r,className:`cm-sat-disc`}),(0,W.jsx)(`text`,{x:m.x,y:m.y-6,textAnchor:`middle`,className:`cm-sat-name`,children:`Invariants`}),(0,W.jsx)(`text`,{x:m.x,y:m.y+12,textAnchor:`middle`,className:`cm-sat-big`,children:s.laws??0})]}),(0,W.jsx)(`text`,{x:m.x,y:m.y+m.r+16,textAnchor:`middle`,className:`cm-note`,children:`never broken`}),(0,W.jsxs)(Q,{hash:`#/laws`,part:`sat`,label:`Doctrines: ${s.doctrines?.rules??0} rules chosen at build`,children:[(0,W.jsx)(`circle`,{cx:h.x,cy:h.y,r:h.r,className:`cm-sat-disc`}),(0,W.jsx)(`text`,{x:h.x,y:h.y-6,textAnchor:`middle`,className:`cm-sat-name`,children:`Doctrines`}),(0,W.jsx)(`text`,{x:h.x,y:h.y+12,textAnchor:`middle`,className:`cm-sat-big`,children:s.doctrines?.rules??0})]}),(0,W.jsx)(`text`,{x:h.x+22,y:h.y+h.r+20,className:`cm-note`,children:s.doctrines?`chosen at build · ${s.doctrines.active}/${s.doctrines.total} packs lit`:`chosen at build`}),(0,W.jsx)(`g`,{className:`cm-mini`,children:S.map(e=>(0,W.jsxs)(`g`,{children:[(0,W.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r,className:`cm-pack-disc`,style:{stroke:L(e.id)}}),(0,W.jsx)(`text`,{x:e.x,y:e.y-2,textAnchor:`middle`,className:`cm-pack-id`,children:e.id}),(0,W.jsx)(`text`,{x:e.x,y:e.y+8,textAnchor:`middle`,style:{fill:L(e.id)},children:e.on})]},e.id))}),(0,W.jsx)(`text`,{x:866,y:16,textAnchor:`middle`,className:`cm-govern-label`,children:`GOVERNS THE HARNESS`}),y.map(e=>(0,W.jsxs)(Q,{hash:e.hash,part:`gov`,label:`${e.label}: ${e.count}`,children:[(0,W.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r,className:`cm-gov-disc`}),(0,W.jsx)(`text`,{x:e.x,y:e.y-2,textAnchor:`middle`,className:`cm-gov-name`,children:e.label}),(0,W.jsx)(`text`,{x:e.x,y:e.y+10,textAnchor:`middle`,className:`cm-gov-num`,children:e.count})]},e.label)),(0,W.jsx)(`text`,{x:p.x,y:228,textAnchor:`middle`,className:`cm-note`,children:`tap any node to open its ledger`})]})}function ee(){let e=new Date,t=e=>String(e).padStart(2,`0`);return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function te({counts:e}){let t=[{label:D.skills.label,n:e.skills??0,hash:`#/skills`},{label:`Rules in force`,n:O(e),hash:`#/laws`},{label:D.agents.label,n:e.agents??0,hash:`#/agents`},{label:D.memory.label,n:e.memory??0,hash:`#/section/memory`},{label:D.notebook.label,n:e.notebook??0,hash:`#/section/notebook`},{label:D.wiki.label,n:e.wiki??0,hash:`#/section/wiki`},{label:D.config.label,n:e.config??0,hash:`#/section/config`}],n=Math.max(...t.map(e=>e.n),1);return(0,W.jsxs)(`div`,{className:`card pad-lg jr-card`,children:[(0,W.jsxs)(`div`,{className:`card-head`,children:[(0,W.jsx)(`h3`,{children:`Growth rings`}),(0,W.jsx)(`span`,{className:`tick right`,children:`by section`})]}),t.map(e=>(0,W.jsxs)(`button`,{className:`jr-ring`,onClick:()=>s(e.hash),children:[(0,W.jsx)(`span`,{className:`jr-ring-label`,children:e.label}),(0,W.jsx)(`span`,{className:`jr-ring-track`,children:(0,W.jsx)(`span`,{className:`jr-ring-fill`,style:{width:`${e.n/n*100}%`}})}),(0,W.jsx)(`span`,{className:`jr-ring-num`,children:e.n})]},e.label))]})}function ne({recent:e,buildEpoch:t}){let n=e?.items||[],r=e?.skipped||[];return(0,W.jsxs)(`div`,{className:`card pad-lg jr-card`,children:[(0,W.jsxs)(`div`,{className:`card-head`,children:[(0,W.jsx)(`h3`,{children:`Freshly grown`}),(0,W.jsx)(`span`,{className:`tick right`,children:`newest`})]}),e?n.length===0?(0,W.jsx)(`p`,{className:`sub`,children:`Nothing here carries a date yet.`}):n.slice(0,5).map(e=>(0,W.jsxs)(`button`,{className:`jr-fresh`,onClick:()=>s(`#/item/${e.type}/${encodeURIComponent(e.name)}`),children:[(0,W.jsx)(`span`,{className:`jr-fresh-kind`,children:e.section}),(0,W.jsx)(`span`,{className:`jr-fresh-name`,children:e.title}),(0,W.jsx)(`span`,{className:`jr-fresh-when`,children:F(e.mtime)})]},`${e.section}:${e.name}`)):(0,W.jsx)(`p`,{className:`sub`,children:`Reading the shelves…`}),r.length>0&&(0,W.jsxs)(`p`,{className:`sub jr-skipped`,children:[`Not dated: `,r.join(`, `),` — too many files to stat on every load.`]}),(0,W.jsxs)(`p`,{className:`jr-care`,children:[t?`Last built ✓ ${F(t)}`:`Never built here`,` ·`,` `,(0,W.jsx)(`button`,{className:`jr-go`,onClick:()=>s(`#/activity`),children:`log →`})]})]})}function re({overview:e,recent:t,onAction:n,onDirection:r}){let i=e?.counts||{};return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`head-row jr-head`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsxs)(`div`,{className:`eyebrow`,children:[`Field journal · `,ee()]}),(0,W.jsx)(`h1`,{className:`h`,children:`Today in this harness`})]}),(0,W.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,W.jsx)(`button`,{className:`btn primary`,onClick:()=>n?.(`update`),children:`Update & rebuild`}),(0,W.jsx)(`button`,{className:`btn`,onClick:()=>s(`#/doctor`),children:`Doctor`})]})]}),(0,W.jsxs)(`div`,{className:`jr-row2`,children:[(0,W.jsx)(te,{counts:i}),(0,W.jsx)(ne,{recent:t,buildEpoch:e?.build_epoch})]}),(0,W.jsxs)(`div`,{className:`card pad-lg jr-map`,children:[(0,W.jsxs)(`div`,{className:`card-head`,children:[(0,W.jsx)(`h3`,{children:`The Constitution — and the harness it governs`}),(0,W.jsx)(`button`,{className:`jr-go right`,onClick:()=>s(`#/laws`),children:`open →`})]}),(0,W.jsx)($,{overview:e})]}),(0,W.jsxs)(`p`,{className:`sub jr-others`,children:[`Other views:`,` `,(0,W.jsx)(`button`,{className:`jr-go`,onClick:()=>r?.(`lineage`),children:`Lineage`}),` `,`·`,` `,(0,W.jsx)(`button`,{className:`jr-go`,onClick:()=>r?.(`operator`),children:`Operator`})]})]})}export{re as default};
1
+ import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,t as n}from"./react-DbkvxWG5.js";import{t as r}from"./drawable-BTHjTzF7.js";import{$ as i,A as a,B as o,C as s,E as c,F as l,G as u,H as d,I as f,J as p,K as m,L as h,M as g,N as _,O as v,P as y,R as b,T as x,U as S,V as C,W as w,Y as T,Z as E,b as D,d as O,et as k,j as A,k as j,nt as M,q as N,rt as P,u as F,z as I}from"./index-AN5Emnrg.js";import{a as L}from"./lawCats-Btjp3Hk_.js";function R(e){return C((e.iterationDuration+e._loopDelay)*e.iterationCount-e._loopDelay)||1e-11}function z(e,t,n,r,i,a){let s=w(e.duration)&&e.duration<=1e-11?n-k:n;t.composition&&b(t,s,1,1,M.AUTO);let c=r?new A(r,e,t,s,!1,i,a):new l(e,t,s);return t.composition&&c.init(!0),o(t,c),d(t,e=>{let n=e._offset+e._delay+e.duration;n>t.iterationDuration&&(t.iterationDuration=n)}),t.duration=R(t),t}var B=0,V=class extends l{constructor(e={}){super(e,null,0),++B,this.id=N(e.id)?B:e.id,this.duration=0,this.labels={};let t=e.defaults,n=E.defaults;this.defaults=t?p(t,n):n,this.composition=I(e.composition,!0),this.onRender=e.onRender||n.onRender;let r=I(e.playbackEase,n.playbackEase);this._ease=r?_(r):null,this.iterationDuration=0}add(e,t,n){let r=u(t),i=u(e);if(r||i){if(this._hasChildren=!0,r){let r=t,i=E.editor&&E.editor.addTimelineChild,o=n&&n.type===`Stagger`&&E.editor,s=S(n)?n:null;if(s||o){let t=y(e),o=this.duration,c=this.iterationDuration,l=r.id,u=0,d=t.length,f=i?i(e,r,this.id,n,d):null,p=s||E.editor.resolveStagger(n.defaultValue);t.forEach(e=>{let n={...f||r};this.duration=o,this.iterationDuration=c,N(l)||(n.id=l+`-`+u);let i=a(this,p(e,u,t,null,this));z(n,this,i,e,u,t),u++})}else{let t=i?i(e,r,this.id,n):r,o=n&&n.type?n.defaultValue:n;z(t,this,a(this,o),e)}}else z(e,this,a(this,t));return this.composition&&this.init(!0),this}}sync(e,t){if(N(e)||e&&N(e.pause))return this;e.pause();let n=+(e.effect?e.effect.getTiming().duration:e.duration);!N(e)&&!N(e.persist)&&(e.persist=!0);let r=E.editor,i=r&&r.addTimelineChild;r&&r.addTimelineSync&&(t=r.addTimelineSync(e,t,this.id),r.addTimelineChild=null);let a=this.add(e,{currentTime:[0,n],duration:n,delay:0,ease:`linear`,playbackEase:`linear`},t);return r&&(r.addTimelineChild=i),a}set(e,t,n){return N(t)?this:(t.duration=k,t.composition=i.replace,this.add(e,t,n))}call(e,t){return N(e)||e&&!S(e)?this:(E.editor&&E.editor.addTimelineCall&&(t=E.editor.addTimelineCall(e,t,this.id)),this.add({duration:0,delay:0,onComplete:()=>e(this)},t))}label(e,t){return N(e)||e&&!m(e)?this:(E.editor&&E.editor.addTimelineLabel&&(t=E.editor.addTimelineLabel(e,t,this.id)),this.labels[e]=a(this,t),this)}remove(e,t){return f(y(e),this,t),this}stretch(e){let t=this.duration;if(t===T(e))return this;let n=e/t,r=this.labels;d(this,e=>e.stretch(e.duration*n));for(let e in r)r[e]*=n;return super.stretch(e)}refresh(){return d(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),d(this,e=>e.revert,!0),h(this)}then(e){return super.then(e)}},H=e=>E.editor?E.editor.addTimeline(e):new V(e).init(),U=e(t(),1),W=n(),G=.62,K=(e,t)=>String(e).length*t*G;function q(e,t){let n=0;for(let t of e){if(t.t===``||t.t==null)continue;let e=K(t.t,t.size)/2;n=Math.max(n,Math.hypot(e,t.dy-t.size*.75),Math.hypot(e,t.dy+t.size*.25))}return Math.ceil(n+t)}function J(e,t,n=0){let r=t.x-e.x,i=t.y-e.y,a=Math.hypot(r,i)||1,o=r/a,s=i/a,c=e.x+o*e.r,l=e.y+s*e.r,u=t.x-o*t.r,d=t.y-s*t.r,f=n*a,p=e=>e.toFixed(1);return`M${p(c)} ${p(l)} C${p(c+o*a*.3-s*f)} ${p(l+s*a*.3+o*f)} ${p(u-o*a*.3-s*f)} ${p(d-s*a*.3+o*f)} ${p(u)} ${p(d)}`}var Y=!1,X=!1,Z=850;function Q({hash:e,label:t,part:n,children:r}){return(0,W.jsx)(`g`,{className:`cm-node`,"data-cm":n,role:`button`,tabIndex:0,"aria-label":t,onClick:()=>s(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),s(e))},children:r})}function $({overview:e}){let[t,n]=(0,U.useState)(null);(0,U.useEffect)(()=>{let e=!0;return P.catalog(`laws`).then(t=>e&&n(t.items||[])).catch(()=>{}),()=>{e=!1}},[]);let i=(0,U.useRef)(null),a=(0,U.useRef)(!0),o=(0,U.useRef)(null);(0,U.useLayoutEffect)(()=>{let e=i.current;if(!e||Y||!x())return;Y=!0;let t=t=>[...e.querySelectorAll(t)],n=t(`[data-cm="hub"]`),s=t(`[data-cm="sat"]`),l=t(`[data-cm="gov"]`),u=t(`.cm-edge-gov`),d=t(`.cm-note, .cm-govern-label`),f=r(t(`.cm-edge`));j([...n,...s,...l],{opacity:0,scale:.7}),j([...u,...d],{opacity:0}),j(f,{draw:`0 0`});let p=H({autoplay:!1,defaults:{ease:`outExpo`}}).add(n,{opacity:1,scale:1,duration:450},0).add(f,{draw:`0 1`,duration:380,delay:v(70)},140).add(s,{opacity:1,scale:1,duration:420,delay:v(70)},260).add(u,{opacity:1,duration:300,delay:v(50)},420).add(l,{opacity:1,scale:1,duration:380,delay:v(50)},470).add(d,{opacity:1,duration:300},520);a.current=!1;let m=()=>p.complete(),h=()=>{p.play(),m=c(p,Z),a.current=!0,o.current?.()};if(typeof IntersectionObserver>`u`)return h(),()=>m();let g=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(g.disconnect(),h())},{threshold:.33});return g.observe(e),()=>{g.disconnect(),a.current=!0,m()}},[]);let s=e?.counts||{},l=O(s),u=[];for(let e of(t||[]).filter(e=>e.tier===`doctrine`)){let t=u.find(t=>t.id===e.pack);t||u.push(t={id:e.pack,on:0}),e.active!==!1&&(t.on+=1)}let d=e?.footprint===`lean`?`lean — first line only`:`full text inlined`,f={x:330,y:165,r:q([{t:`Constitution`,size:17,dy:-12},{t:`${l} rules in force`,size:10,dy:8},{t:d,size:8.5,dy:24}],12)},p={x:126,y:95,r:q([{t:`Ethos`,size:12.5,dy:-7},{t:`${s.ontology??0} sections`,size:10,dy:10}],11)},m={x:560,y:78,r:q([{t:`Invariants`,size:12.5,dy:-6},{t:`${s.laws??0}`,size:13,dy:12}],11)},h={x:560,y:252,r:q([{t:`Doctrines`,size:12.5,dy:-6},{t:`${s.doctrines?.rules??0}`,size:13,dy:12}],11)},_=(e,t,n,r)=>({x:e,y:t,label:n,count:r,r:q([{t:n,size:10.5,dy:-2},{t:`${r}`,size:9,dy:10}],9)}),y=[{..._(812,52,`Skills`,s.skills??0),hash:`#/skills`,from:m},{..._(820,126,`Agents`,s.agents??0),hash:`#/agents`,from:m},{..._(816,232,`Memory`,s.memory??0),hash:`#/section/memory`,from:h},{..._(812,300,`Wiki`,s.wiki??0),hash:`#/section/wiki`,from:h}],b={rx:122,ry:68,from:212,to:112},S=u.map((e,t)=>{let n=(u.length===1?(b.from+b.to)/2:b.from+(b.to-b.from)*t/(u.length-1))*Math.PI/180;return{...e,x:h.x+b.rx*Math.cos(n),y:h.y+b.ry*Math.sin(n),r:q([{t:e.id,size:7.5,dy:-2},{t:`${e.on}`,size:7.5,dy:8}],4)}}),C=S.length;return(0,U.useLayoutEffect)(()=>{let e=i.current;if(!e||!C||X||!x())return;X=!0;let t=[...e.querySelectorAll(`.cm-mini > g`)];j(t,{opacity:0,scale:.5});let n=()=>j(t,{opacity:1,scale:1}),r=()=>{o.current=null;let e=g(t,{opacity:1,scale:1,duration:380,delay:v(45,{start:420}),ease:`outExpo`});n=c(e,420+45*C+380)};return a.current?r():o.current=r,()=>{o.current=null,n()}},[C]),(0,W.jsxs)(`svg`,{ref:i,className:`cmap`,viewBox:`0 0 940 350`,role:`group`,"aria-label":`The constitution map`,children:[(0,W.jsx)(`path`,{d:J(f,p,.05),className:`cm-edge`}),(0,W.jsx)(`path`,{d:J(f,m,-.07),className:`cm-edge`}),(0,W.jsx)(`path`,{d:J(f,h,.07),className:`cm-edge`}),y.map(e=>(0,W.jsx)(`path`,{d:J(e.from,e,.03),className:`cm-edge-gov`},`e-${e.label}`)),(0,W.jsxs)(Q,{hash:`#/laws`,part:`hub`,label:`Constitution: ${l} rules in force`,children:[(0,W.jsx)(`circle`,{cx:f.x,cy:f.y,r:f.r,className:`cm-hub-disc`}),(0,W.jsx)(`text`,{x:f.x,y:f.y-12,textAnchor:`middle`,className:`cm-hub-name`,children:`Constitution`}),(0,W.jsxs)(`text`,{x:f.x,y:f.y+8,textAnchor:`middle`,className:`cm-hub-num`,children:[l,` rules in force`]}),(0,W.jsx)(`text`,{x:f.x,y:f.y+24,textAnchor:`middle`,className:`cm-note`,children:d})]}),(0,W.jsxs)(Q,{hash:`#/laws`,part:`sat`,label:`Ethos: ${s.ontology??0} sections`,children:[(0,W.jsx)(`circle`,{cx:p.x,cy:p.y,r:p.r,className:`cm-sat-disc`}),(0,W.jsx)(`text`,{x:p.x,y:p.y-7,textAnchor:`middle`,className:`cm-sat-name`,children:`Ethos`}),(0,W.jsxs)(`text`,{x:p.x,y:p.y+10,textAnchor:`middle`,className:`cm-sat-num`,children:[s.ontology??0,` sections`]})]}),(0,W.jsx)(`text`,{x:p.x,y:p.y+p.r+16,textAnchor:`middle`,className:`cm-note`,children:`how it thinks, not a rule`}),(0,W.jsxs)(Q,{hash:`#/laws`,part:`sat`,label:`Invariants: ${s.laws??0}, never broken`,children:[(0,W.jsx)(`circle`,{cx:m.x,cy:m.y,r:m.r,className:`cm-sat-disc`}),(0,W.jsx)(`text`,{x:m.x,y:m.y-6,textAnchor:`middle`,className:`cm-sat-name`,children:`Invariants`}),(0,W.jsx)(`text`,{x:m.x,y:m.y+12,textAnchor:`middle`,className:`cm-sat-big`,children:s.laws??0})]}),(0,W.jsx)(`text`,{x:m.x,y:m.y+m.r+16,textAnchor:`middle`,className:`cm-note`,children:`never broken`}),(0,W.jsxs)(Q,{hash:`#/laws`,part:`sat`,label:`Doctrines: ${s.doctrines?.rules??0} rules chosen at build`,children:[(0,W.jsx)(`circle`,{cx:h.x,cy:h.y,r:h.r,className:`cm-sat-disc`}),(0,W.jsx)(`text`,{x:h.x,y:h.y-6,textAnchor:`middle`,className:`cm-sat-name`,children:`Doctrines`}),(0,W.jsx)(`text`,{x:h.x,y:h.y+12,textAnchor:`middle`,className:`cm-sat-big`,children:s.doctrines?.rules??0})]}),(0,W.jsx)(`text`,{x:h.x+22,y:h.y+h.r+20,className:`cm-note`,children:s.doctrines?`chosen at build · ${s.doctrines.active}/${s.doctrines.total} packs lit`:`chosen at build`}),(0,W.jsx)(`g`,{className:`cm-mini`,children:S.map(e=>(0,W.jsxs)(`g`,{children:[(0,W.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r,className:`cm-pack-disc`,style:{stroke:L(e.id)}}),(0,W.jsx)(`text`,{x:e.x,y:e.y-2,textAnchor:`middle`,className:`cm-pack-id`,children:e.id}),(0,W.jsx)(`text`,{x:e.x,y:e.y+8,textAnchor:`middle`,style:{fill:L(e.id)},children:e.on})]},e.id))}),(0,W.jsx)(`text`,{x:866,y:16,textAnchor:`middle`,className:`cm-govern-label`,children:`GOVERNS THE HARNESS`}),y.map(e=>(0,W.jsxs)(Q,{hash:e.hash,part:`gov`,label:`${e.label}: ${e.count}`,children:[(0,W.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r,className:`cm-gov-disc`}),(0,W.jsx)(`text`,{x:e.x,y:e.y-2,textAnchor:`middle`,className:`cm-gov-name`,children:e.label}),(0,W.jsx)(`text`,{x:e.x,y:e.y+10,textAnchor:`middle`,className:`cm-gov-num`,children:e.count})]},e.label)),(0,W.jsx)(`text`,{x:p.x,y:228,textAnchor:`middle`,className:`cm-note`,children:`tap any node to open its ledger`})]})}function ee(){let e=new Date,t=e=>String(e).padStart(2,`0`);return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function te({counts:e}){let t=[{label:D.skills.label,n:e.skills??0,hash:`#/skills`},{label:`Rules in force`,n:O(e),hash:`#/laws`},{label:D.agents.label,n:e.agents??0,hash:`#/agents`},{label:D.memory.label,n:e.memory??0,hash:`#/section/memory`},{label:D.notebook.label,n:e.notebook??0,hash:`#/section/notebook`},{label:D.wiki.label,n:e.wiki??0,hash:`#/section/wiki`},{label:D.config.label,n:e.config??0,hash:`#/section/config`}],n=Math.max(...t.map(e=>e.n),1);return(0,W.jsxs)(`div`,{className:`card pad-lg jr-card`,children:[(0,W.jsxs)(`div`,{className:`card-head`,children:[(0,W.jsx)(`h3`,{children:`Growth rings`}),(0,W.jsx)(`span`,{className:`tick right`,children:`by section`})]}),t.map(e=>(0,W.jsxs)(`button`,{className:`jr-ring`,onClick:()=>s(e.hash),children:[(0,W.jsx)(`span`,{className:`jr-ring-label`,children:e.label}),(0,W.jsx)(`span`,{className:`jr-ring-track`,children:(0,W.jsx)(`span`,{className:`jr-ring-fill`,style:{width:`${e.n/n*100}%`}})}),(0,W.jsx)(`span`,{className:`jr-ring-num`,children:e.n})]},e.label))]})}function ne({recent:e,buildEpoch:t}){let n=e?.items||[],r=e?.skipped||[];return(0,W.jsxs)(`div`,{className:`card pad-lg jr-card`,children:[(0,W.jsxs)(`div`,{className:`card-head`,children:[(0,W.jsx)(`h3`,{children:`Freshly grown`}),(0,W.jsx)(`span`,{className:`tick right`,children:`newest`})]}),e?n.length===0?(0,W.jsx)(`p`,{className:`sub`,children:`Nothing here carries a date yet.`}):n.slice(0,5).map(e=>(0,W.jsxs)(`button`,{className:`jr-fresh`,onClick:()=>s(`#/item/${e.type}/${encodeURIComponent(e.name)}`),children:[(0,W.jsx)(`span`,{className:`jr-fresh-kind`,children:e.section}),(0,W.jsx)(`span`,{className:`jr-fresh-name`,children:e.title}),(0,W.jsx)(`span`,{className:`jr-fresh-when`,children:F(e.mtime)})]},`${e.section}:${e.name}`)):(0,W.jsx)(`p`,{className:`sub`,children:`Reading the shelves…`}),r.length>0&&(0,W.jsxs)(`p`,{className:`sub jr-skipped`,children:[`Not dated: `,r.join(`, `),` — too many files to stat on every load.`]}),(0,W.jsxs)(`p`,{className:`jr-care`,children:[t?`Last built ✓ ${F(t)}`:`Never built here`,` ·`,` `,(0,W.jsx)(`button`,{className:`jr-go`,onClick:()=>s(`#/activity`),children:`log →`})]})]})}function re({overview:e,recent:t,onAction:n,onDirection:r}){let i=e?.counts||{};return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`head-row jr-head`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsxs)(`div`,{className:`eyebrow`,children:[`Field journal · `,ee()]}),(0,W.jsx)(`h1`,{className:`h`,children:`Today in this harness`})]}),(0,W.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,W.jsx)(`button`,{className:`btn primary`,onClick:()=>n?.(`update`),children:`Update & rebuild`}),(0,W.jsx)(`button`,{className:`btn`,onClick:()=>s(`#/doctor`),children:`Doctor`})]})]}),(0,W.jsxs)(`div`,{className:`jr-row2`,children:[(0,W.jsx)(te,{counts:i}),(0,W.jsx)(ne,{recent:t,buildEpoch:e?.build_epoch})]}),(0,W.jsxs)(`div`,{className:`card pad-lg jr-map`,children:[(0,W.jsxs)(`div`,{className:`card-head`,children:[(0,W.jsx)(`h3`,{children:`The Constitution — and the harness it governs`}),(0,W.jsx)(`button`,{className:`jr-go right`,onClick:()=>s(`#/laws`),children:`open →`})]}),(0,W.jsx)($,{overview:e})]}),(0,W.jsxs)(`p`,{className:`sub jr-others`,children:[`Other views:`,` `,(0,W.jsx)(`button`,{className:`jr-go`,onClick:()=>r?.(`lineage`),children:`Lineage`}),` `,`·`,` `,(0,W.jsx)(`button`,{className:`jr-go`,onClick:()=>r?.(`operator`),children:`Operator`})]})]})}export{re as default};