geneseed 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/CHANGELOG.md +110 -0
  2. package/README.md +22 -12
  3. package/SETUP.md +38 -7
  4. package/SHIPPED.md +6 -5
  5. package/adapters/bob/README.md +40 -10
  6. package/adapters/claude-code/README.md +5 -0
  7. package/adapters/claude-code/settings.json +8 -1
  8. package/adapters/copilot/README.md +50 -24
  9. package/adapters/opencode/README.md +5 -1
  10. package/adapters/opencode/plugins/geneseed-guard.js +40 -6
  11. package/bin/build-driver.mjs +16 -10
  12. package/bin/geneseed-cli.mjs +55 -56
  13. package/bin/geneseed-hook.mjs +21 -14
  14. package/docs/candidate-hosts.md +74 -0
  15. package/docs/extending.md +6 -5
  16. package/docs/token-footprint.md +32 -21
  17. package/docs/web-ui.md +5 -13
  18. package/harness.config.json +1 -1
  19. package/js/README.md +5 -6
  20. package/js/build/emit-claude.mjs +22 -7
  21. package/js/build/render.mjs +37 -19
  22. package/js/build/source.mjs +22 -2
  23. package/js/cli-table.json +84 -0
  24. package/js/hosts/hooks.mjs +240 -78
  25. package/js/hosts/hosts.mjs +56 -2
  26. package/js/hosts/link.mjs +1 -1
  27. package/js/hosts/mcp.mjs +3 -1
  28. package/js/hosts/native.mjs +17 -0
  29. package/js/hosts/settings.mjs +173 -5
  30. package/js/inspect/excludes.mjs +1 -1
  31. package/js/inspect/inventory.mjs +1 -1
  32. package/js/inspect/status.mjs +50 -2
  33. package/js/maintain/uninstall.mjs +38 -11
  34. package/js/maintain/update.mjs +2 -2
  35. package/js/web/actions.mjs +8 -8
  36. package/js/web/api.mjs +5 -10
  37. package/js/web/docs.mjs +9 -31
  38. package/js/web/handler.mjs +20 -30
  39. package/js/web/jobs.mjs +5 -26
  40. package/js/web/routes.mjs +18 -84
  41. package/js/web/server.mjs +3 -3
  42. package/package.json +1 -1
  43. package/registry.json +14 -0
  44. package/src/AGENT.md.tmpl +55 -16
  45. package/src/agents/explorer.md +1 -1
  46. package/src/doctrines/README.md +3 -3
  47. package/src/doctrines/rigor.md +13 -0
  48. package/src/laws/universal.md +98 -20
  49. package/src/ontology/universal.md +38 -13
  50. package/src/skills/_template.md +5 -1
  51. package/src/skills/bruno-collection-generator.md +63 -0
  52. package/src/skills/bruno-test-writer.md +62 -0
  53. package/src/skills/crash-course.md +1 -0
  54. package/src/skills/decode.md +1 -0
  55. package/src/skills/drill.md +1 -0
  56. package/src/skills/feynman.md +1 -0
  57. package/src/skills/forge-mcp.md +1 -1
  58. package/src/skills/herdr.md +1 -0
  59. package/src/skills/learning-path.md +1 -0
  60. package/src/skills/opencode-theme.md +1 -0
  61. package/src/skills/research.md +1 -1
  62. package/themes/_TEMPLATE.json +3 -0
  63. package/themes/biker.json +3 -0
  64. package/themes/commentator.json +3 -0
  65. package/themes/cyberpunk.json +3 -0
  66. package/themes/gamer.json +3 -0
  67. package/themes/imperial.json +3 -0
  68. package/themes/joker.json +3 -0
  69. package/themes/marvin.json +3 -0
  70. package/themes/mean.json +3 -0
  71. package/themes/military.json +3 -0
  72. package/themes/neutral.json +3 -0
  73. package/themes/pirate.json +3 -0
  74. package/themes/sports.json +3 -0
  75. package/themes/verstappen.json +3 -0
  76. package/themes/wizard.json +3 -0
  77. package/web/dist/assets/Activity-BfVcLrda.js +1 -0
  78. package/web/dist/assets/ActivityDetail-CQXccGPl.js +1 -0
  79. package/web/dist/assets/{CatalogRow-DqS4e5XM.js → CatalogRow-DALEQImZ.js} +1 -1
  80. package/web/dist/assets/{Diff-CIrGbiqm.js → Diff-BIjxXx46.js} +1 -1
  81. package/web/dist/assets/{Doctor-CpI53oHY.js → Doctor-CJLbgsrw.js} +1 -1
  82. package/web/dist/assets/FilterInput-CkUCk_lY.js +1 -0
  83. package/web/dist/assets/GreenhouseView-DfC5IILJ.js +2 -0
  84. package/web/dist/assets/{Harness-vRYs11kX.js → Harness-Dm5CCU-v.js} +1 -1
  85. package/web/dist/assets/JournalView-Cpu2eI4s.js +1 -0
  86. package/web/dist/assets/Laws-DDDVFuQz.js +3 -0
  87. package/web/dist/assets/Library-Dao3T9na.js +1 -0
  88. package/web/dist/assets/{Markdown-kgpg9EQM.js → Markdown-C__nuWX5.js} +1 -1
  89. package/web/dist/assets/OperatorHudView-DEpCtAjP.js +2 -0
  90. package/web/dist/assets/{Profile-CHr-PPf6.js → Profile-BlXtUlh2.js} +1 -1
  91. package/web/dist/assets/{Rules-CsC6hfqk.js → Rules-DIre6gxR.js} +1 -1
  92. package/web/dist/assets/Skills-rY13ZPhM.js +1 -0
  93. package/web/dist/assets/{StatusBadge-gRrak0nO.js → StatusBadge-wW_RS_my.js} +1 -1
  94. package/web/dist/assets/{activity-B0-FXZCj.js → activity-DpYPKNrA.js} +1 -1
  95. package/web/dist/assets/{index-DJOhOwwR.js → index-BEZvPvpF.js} +1 -1
  96. package/web/dist/assets/index-DNQE5ydy.js +10 -0
  97. package/web/dist/assets/index-DzdQjvM1.css +1 -0
  98. package/web/dist/assets/{index-Bx3I7cRW.js → index-PmQGRS1X.js} +1 -1
  99. package/web/dist/assets/jobBuckets-DfTUJUxR.js +1 -0
  100. package/web/dist/assets/lawCats-DUS9UTH4.js +1 -0
  101. package/web/dist/index.html +2 -2
  102. package/web/src/pages/Laws.jsx +82 -64
  103. package/js/web/graph.mjs +0 -0
  104. package/web/dist/assets/Activity-BTCG2gMl.js +0 -1
  105. package/web/dist/assets/ActivityDetail-julsmPDB.js +0 -1
  106. package/web/dist/assets/Graph-CS4tA7YS.js +0 -1
  107. package/web/dist/assets/Laws-BjbHJrJt.js +0 -3
  108. package/web/dist/assets/Library-CjC7BAWN.js +0 -1
  109. package/web/dist/assets/Skills-BvatJGfe.js +0 -1
  110. package/web/dist/assets/index-BnRWQbZb.js +0 -12
  111. package/web/dist/assets/index-D0f9tJlA.css +0 -1
  112. package/web/dist/assets/roman-DkYN0LX9.js +0 -1
@@ -1 +1 @@
1
- import{u as R,j as e,E as T,L as S,a as v}from"./index-BnRWQbZb.js";import{r as u}from"./react-DOpiTn5v.js";const _={title:"",body:"",scope:"project",trial_until:""};function N({initial:t,onCancel:n,onSave:l,busy:r}){const[a,c]=u.useState(t),i=h=>p=>c({...a,[h]:p.target.value}),o=a.title.trim()&&a.body.trim();return e.jsxs("div",{className:"rule-form",children:[e.jsx("input",{className:"lib-filter",type:"text",value:a.title,onChange:i("title"),placeholder:"Title — short and imperative (e.g. No emoji in commit subjects)","aria-label":"Rule title"}),e.jsx("textarea",{className:"rule-body-input",value:a.body,onChange:i("body"),rows:4,placeholder:"The rule, stated plainly and testably, in one short paragraph.","aria-label":"Rule body"}),e.jsxs("div",{className:"row",style:{flexWrap:"wrap"},children:[e.jsxs("select",{className:"sel",value:a.scope,onChange:i("scope"),"aria-label":"Rule scope",children:[e.jsx("option",{value:"project",children:"scope: project (this repo, committable)"}),e.jsx("option",{value:"user",children:"scope: user (personal)"})]}),e.jsxs("label",{className:"rule-trial-label",children:["trial until",e.jsx("input",{className:"lib-filter rule-date",type:"date",value:a.trial_until,onChange:i("trial_until"),"aria-label":"Trial until date (optional)"})]}),e.jsxs("div",{style:{marginLeft:"auto",display:"flex",gap:8},children:[e.jsx("button",{className:"btn sm",disabled:!o||r,onClick:()=>l(a),children:r?"Saving…":"Save rule"}),e.jsx("button",{className:"btn ghost sm",disabled:r,onClick:n,children:"Cancel"})]})]})]})}function E({rule:t,isOpen:n,onToggle:l,onEdit:r,onDelete:a,onGraduate:c}){return e.jsxs("div",{className:`rule-row ${n?"on":""}`,children:[e.jsxs("button",{className:"rule-head",onClick:l,"aria-expanded":n,children:[e.jsxs("span",{className:"rule-no",children:["R",t.id]}),e.jsx("span",{className:"rule-title",children:t.title}),e.jsx("span",{className:`rule-chip ${t.scope==="user"?"user":""}`,children:t.scope}),t.status==="trial"&&e.jsx("span",{className:`rule-chip trial ${t.overdue?"overdue":""}`,children:t.overdue?"review due":`trial · ${t.trial_until}`})]}),n&&e.jsxs("div",{className:"rule-expand",children:[e.jsx("p",{children:t.body}),t.source?e.jsxs("div",{className:"rule-src",children:["source: ",t.source]}):null,e.jsxs("div",{className:"row",style:{marginTop:10,gap:8},children:[t.status==="trial"&&e.jsx("button",{className:"btn sm",onClick:c,title:"Adopt for good — drop the trial marker",children:"Graduate"}),e.jsx("button",{className:"btn ghost sm",onClick:r,children:"Edit"}),e.jsx("button",{className:"btn ghost sm",onClick:a,children:"Retire"})]})]})]})}function L(){const[t,n]=u.useState(0),{data:l,error:r}=R(()=>v.rules(),[t]),[a,c]=u.useState(null),[i,o]=u.useState(null),[h,p]=u.useState(!1),[b,y]=u.useState(""),f=()=>n(s=>s+1);if(r)return e.jsx(T,{error:r});if(!l)return e.jsx(S,{});const g=l.rules||[],{stats:d}=l,m=Math.round(Math.max(d.rules/d.max_rules,d.tokens/d.max_tokens)*100),w=m>=100?"over":m>=70?"warn":"",x=async s=>{p(!0),y("");try{await v.rulesMutate({...s,fingerprint:l.fingerprint}),o(null)}catch(j){y(j.status===409?"user-rules.md changed on disk (an agent session?) — reloaded the fresh copy; re-apply your edit.":j.message)}finally{p(!1),f()}},k=s=>{window.confirm(`Retire rule R${s.id} — “${s.title}”? It is removed from user-rules.md.`)&&x({op:"delete",id:s.id})},C=s=>x({op:"update",id:s.id,title:s.title,body:s.body,scope:s.scope,source:s.source,trial_until:""});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"head-row mb-16",children:[e.jsxs("div",{children:[e.jsx("div",{className:"eyebrow",children:"governance · yours"}),e.jsx("h1",{className:"h",children:"Rules"}),e.jsxs("p",{className:"sub",children:["Your own standing rules, from ",e.jsx("code",{className:"mono",children:"user-rules.md"})," beside the deployed AGENT.md. The agent obeys them with the same force as the Laws — they may tighten a Law, never repeal one — and no update ever touches the file. Keep the set small: every rule is loaded every session."]})]}),l.exists&&i===null&&e.jsx("button",{className:"btn",onClick:()=>o("new"),children:"Add rule"})]}),l.exists&&e.jsxs("div",{className:`rules-meter ${w}`,children:[e.jsx("div",{className:"rules-meter-bar",children:e.jsx("div",{className:"rules-meter-fill",style:{width:`${Math.min(m,100)}%`}})}),e.jsxs("span",{className:"rules-meter-label",children:[d.rules,"/",d.max_rules," rules · ~",d.tokens," tokens",m>=100?" — over budget: a bloated rule set dilutes the rules that matter":m>=70?" — getting heavy; consider merging or pruning":""]})]}),b?e.jsx("p",{className:"sub rule-notice",children:b}):null,(l.warnings||[]).map(s=>e.jsxs("p",{className:"sub rule-notice",children:["format warning: ",s]},s)),i==="new"&&e.jsxs("div",{className:"card pad-lg mb-16",children:[e.jsx("div",{className:"eyebrow",style:{marginBottom:10},children:"new rule"}),e.jsx(N,{initial:_,busy:h,onCancel:()=>o(null),onSave:s=>x({op:"add",...s})})]}),l.exists?g.length===0&&i!=="new"?e.jsxs("div",{className:"empty",style:{padding:48},children:[e.jsx("div",{className:"big",children:"No rules yet"}),"The file is seeded and loaded every session — it is just empty. Add your first standing rule here, ask the agent for one in-session (the rule skill), or promote a recurring memory fact from the Library."]}):e.jsx("div",{className:"card rules-list",children:g.map(s=>i===s.id?e.jsx("div",{className:"rule-row on",children:e.jsx("div",{className:"rule-expand",style:{paddingTop:14},children:e.jsx(N,{initial:{title:s.title,body:s.body,scope:s.scope,trial_until:s.trial_until},busy:h,onCancel:()=>o(null),onSave:j=>x({op:"update",id:s.id,source:s.source,...j})})})},s.id):e.jsx(E,{rule:s,isOpen:a===s.id,onToggle:()=>c(a===s.id?null:s.id),onEdit:()=>{c(s.id),o(s.id)},onDelete:()=>k(s),onGraduate:()=>C(s)},s.id))}):e.jsxs("div",{className:"empty",style:{padding:48},children:[e.jsx("div",{className:"big",children:"No user-rules.md here yet"}),"The build seeds it beside AGENT.md — run a build/update from the Dashboard (or"," ",e.jsx("code",{className:"mono",children:"geneseed update"}),") and it appears, ready for your rules."]})]})}export{L as default};
1
+ import{u as R,j as e,E as T,L as S,a as v}from"./index-DNQE5ydy.js";import{r as u}from"./react-DOpiTn5v.js";const _={title:"",body:"",scope:"project",trial_until:""};function N({initial:t,onCancel:n,onSave:l,busy:r}){const[a,c]=u.useState(t),i=h=>p=>c({...a,[h]:p.target.value}),o=a.title.trim()&&a.body.trim();return e.jsxs("div",{className:"rule-form",children:[e.jsx("input",{className:"lib-filter",type:"text",value:a.title,onChange:i("title"),placeholder:"Title — short and imperative (e.g. No emoji in commit subjects)","aria-label":"Rule title"}),e.jsx("textarea",{className:"rule-body-input",value:a.body,onChange:i("body"),rows:4,placeholder:"The rule, stated plainly and testably, in one short paragraph.","aria-label":"Rule body"}),e.jsxs("div",{className:"row",style:{flexWrap:"wrap"},children:[e.jsxs("select",{className:"sel",value:a.scope,onChange:i("scope"),"aria-label":"Rule scope",children:[e.jsx("option",{value:"project",children:"scope: project (this repo, committable)"}),e.jsx("option",{value:"user",children:"scope: user (personal)"})]}),e.jsxs("label",{className:"rule-trial-label",children:["trial until",e.jsx("input",{className:"lib-filter rule-date",type:"date",value:a.trial_until,onChange:i("trial_until"),"aria-label":"Trial until date (optional)"})]}),e.jsxs("div",{style:{marginLeft:"auto",display:"flex",gap:8},children:[e.jsx("button",{className:"btn sm",disabled:!o||r,onClick:()=>l(a),children:r?"Saving…":"Save rule"}),e.jsx("button",{className:"btn ghost sm",disabled:r,onClick:n,children:"Cancel"})]})]})]})}function E({rule:t,isOpen:n,onToggle:l,onEdit:r,onDelete:a,onGraduate:c}){return e.jsxs("div",{className:`rule-row ${n?"on":""}`,children:[e.jsxs("button",{className:"rule-head",onClick:l,"aria-expanded":n,children:[e.jsxs("span",{className:"rule-no",children:["R",t.id]}),e.jsx("span",{className:"rule-title",children:t.title}),e.jsx("span",{className:`rule-chip ${t.scope==="user"?"user":""}`,children:t.scope}),t.status==="trial"&&e.jsx("span",{className:`rule-chip trial ${t.overdue?"overdue":""}`,children:t.overdue?"review due":`trial · ${t.trial_until}`})]}),n&&e.jsxs("div",{className:"rule-expand",children:[e.jsx("p",{children:t.body}),t.source?e.jsxs("div",{className:"rule-src",children:["source: ",t.source]}):null,e.jsxs("div",{className:"row",style:{marginTop:10,gap:8},children:[t.status==="trial"&&e.jsx("button",{className:"btn sm",onClick:c,title:"Adopt for good — drop the trial marker",children:"Graduate"}),e.jsx("button",{className:"btn ghost sm",onClick:r,children:"Edit"}),e.jsx("button",{className:"btn ghost sm",onClick:a,children:"Retire"})]})]})]})}function L(){const[t,n]=u.useState(0),{data:l,error:r}=R(()=>v.rules(),[t]),[a,c]=u.useState(null),[i,o]=u.useState(null),[h,p]=u.useState(!1),[b,y]=u.useState(""),f=()=>n(s=>s+1);if(r)return e.jsx(T,{error:r});if(!l)return e.jsx(S,{});const g=l.rules||[],{stats:d}=l,m=Math.round(Math.max(d.rules/d.max_rules,d.tokens/d.max_tokens)*100),w=m>=100?"over":m>=70?"warn":"",x=async s=>{p(!0),y("");try{await v.rulesMutate({...s,fingerprint:l.fingerprint}),o(null)}catch(j){y(j.status===409?"user-rules.md changed on disk (an agent session?) — reloaded the fresh copy; re-apply your edit.":j.message)}finally{p(!1),f()}},k=s=>{window.confirm(`Retire rule R${s.id} — “${s.title}”? It is removed from user-rules.md.`)&&x({op:"delete",id:s.id})},C=s=>x({op:"update",id:s.id,title:s.title,body:s.body,scope:s.scope,source:s.source,trial_until:""});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"head-row mb-16",children:[e.jsxs("div",{children:[e.jsx("div",{className:"eyebrow",children:"governance · yours"}),e.jsx("h1",{className:"h",children:"Rules"}),e.jsxs("p",{className:"sub",children:["Your own standing rules, from ",e.jsx("code",{className:"mono",children:"user-rules.md"})," beside the deployed AGENT.md. The agent obeys them with the same force as the Laws — they may tighten a Law, never repeal one — and no update ever touches the file. Keep the set small: every rule is loaded every session."]})]}),l.exists&&i===null&&e.jsx("button",{className:"btn",onClick:()=>o("new"),children:"Add rule"})]}),l.exists&&e.jsxs("div",{className:`rules-meter ${w}`,children:[e.jsx("div",{className:"rules-meter-bar",children:e.jsx("div",{className:"rules-meter-fill",style:{width:`${Math.min(m,100)}%`}})}),e.jsxs("span",{className:"rules-meter-label",children:[d.rules,"/",d.max_rules," rules · ~",d.tokens," tokens",m>=100?" — over budget: a bloated rule set dilutes the rules that matter":m>=70?" — getting heavy; consider merging or pruning":""]})]}),b?e.jsx("p",{className:"sub rule-notice",children:b}):null,(l.warnings||[]).map(s=>e.jsxs("p",{className:"sub rule-notice",children:["format warning: ",s]},s)),i==="new"&&e.jsxs("div",{className:"card pad-lg mb-16",children:[e.jsx("div",{className:"eyebrow",style:{marginBottom:10},children:"new rule"}),e.jsx(N,{initial:_,busy:h,onCancel:()=>o(null),onSave:s=>x({op:"add",...s})})]}),l.exists?g.length===0&&i!=="new"?e.jsxs("div",{className:"empty",style:{padding:48},children:[e.jsx("div",{className:"big",children:"No rules yet"}),"The file is seeded and loaded every session — it is just empty. Add your first standing rule here, ask the agent for one in-session (the rule skill), or promote a recurring memory fact from the Library."]}):e.jsx("div",{className:"card rules-list",children:g.map(s=>i===s.id?e.jsx("div",{className:"rule-row on",children:e.jsx("div",{className:"rule-expand",style:{paddingTop:14},children:e.jsx(N,{initial:{title:s.title,body:s.body,scope:s.scope,trial_until:s.trial_until},busy:h,onCancel:()=>o(null),onSave:j=>x({op:"update",id:s.id,source:s.source,...j})})})},s.id):e.jsx(E,{rule:s,isOpen:a===s.id,onToggle:()=>c(a===s.id?null:s.id),onEdit:()=>{c(s.id),o(s.id)},onDelete:()=>k(s),onGraduate:()=>C(s)},s.id))}):e.jsxs("div",{className:"empty",style:{padding:48},children:[e.jsx("div",{className:"big",children:"No user-rules.md here yet"}),"The build seeds it beside AGENT.md — run a build/update from the Dashboard (or"," ",e.jsx("code",{className:"mono",children:"geneseed update"}),") and it appears, ready for your rules."]})]})}export{L as default};
@@ -0,0 +1 @@
1
+ import{u as w,j as s,E as f,L as v,a as y,g as S}from"./index-DNQE5ydy.js";import{r as b}from"./react-DOpiTn5v.js";import{M as C}from"./Markdown-C__nuWX5.js";import{S as F}from"./StatusBadge-wW_RS_my.js";import{C as L}from"./CatalogRow-DALEQImZ.js";import{F as $}from"./FilterInput-CkUCk_lY.js";import{C as c}from"./lawCats-DUS9UTH4.js";const t={design:{label:"Design",c:c.context},build:{label:"Build",c:c.craft},review:{label:"Review",c:c.security},ship:{label:"Ship",c:c.process},understand:{label:"Understand",c:c.verify},learn:{label:"Learn",c:c.comms},personal:{label:"Personal",c:"oklch(0.72 0.025 250)"}},E=["design","build","review","ship","understand","learn","personal"];function A({skill:l,isOpen:d,onToggle:o}){const r=t[l.cat]||t.build,a=s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"skill-name",children:[s.jsx("span",{className:"x",children:"›"}),l.name,s.jsx(F,{status:l.status})]}),s.jsx("span",{className:"skill-desc",children:l.desc}),s.jsxs("span",{className:"law-class",children:[s.jsx("span",{className:"cdot"}),r.label]})]});return s.jsx(L,{kind:"skill",addr:l.name,isOpen:d,onToggle:o,className:`skill-row ${d?"on":""}`,style:{"--cc":r.c},head:a,expandClassName:"law-expand skill-expand",renderBody:i=>s.jsx("div",{className:"skill-doc",children:s.jsx(C,{body:i.body,links:i.links||[]})}),srcLine:`$ geneseed skill ${l.name} · skills/${l.name}.md`})}function D({selected:l,dataRev:d}){const{data:o,error:r}=w(()=>y.catalog("skills"),[d],"catalog:skills"),[a,i]=b.useState("all"),[h,N]=b.useState(""),j=l||null,k=e=>S(j===e?"#/skills":`#/item/skill/${e}`);if(r)return s.jsx(f,{error:r});if(!o)return s.jsx(v,{});const n=(o.items||[]).map(e=>({name:e.name,desc:e.desc,status:e.status,cat:e.klass&&t[e.klass]?e.klass:"build"})),m={};n.forEach(e=>{m[e.cat]=(m[e.cat]||0)+1});const u=n.filter(e=>e.status==="experimental").length,g=E.filter(e=>e!=="personal"||m.personal>0),x=h.trim().toLowerCase(),p=(a==="all"?n:n.filter(e=>e.cat===a)).filter(e=>!x||`${e.name} ${e.desc}`.toLowerCase().includes(x));return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"head-row mb-16",children:s.jsxs("div",{children:[s.jsx("div",{className:"eyebrow",children:"capabilities"}),s.jsx("h1",{className:"h",children:"Skills"}),s.jsx("p",{className:"sub",children:"The repeatable workflows the agent runs on demand. Pick a class to filter, or open any skill to read its full procedure."})]})}),s.jsxs("div",{className:"law-toolbar",children:[s.jsxs("div",{className:"law-cats",children:[s.jsxs("button",{className:`law-cat ${a==="all"?"on":""}`,onClick:()=>i("all"),children:[s.jsx("span",{children:"All"}),s.jsx("span",{className:"cn",children:n.length})]}),g.map(e=>s.jsxs("button",{className:`law-cat ${a===e?"on":""}`,style:{"--cc":t[e].c},onClick:()=>i(e),children:[s.jsx("span",{className:"cdot"}),s.jsx("span",{children:t[e].label}),s.jsx("span",{className:"cn",children:m[e]||0})]},e))]}),s.jsx($,{className:"lib-filter law-filter",value:h,onChange:N,placeholder:"Filter skills…",label:"Filter skills"}),s.jsxs("span",{className:"law-readout",children:[s.jsx("b",{children:p.length})," skills · ",s.jsx("b",{children:g.length})," classes ·"," ",u>0?s.jsxs(s.Fragment,{children:[s.jsx("b",{children:u})," experimental ·"," "]}):null,"source ",s.jsx("b",{children:"src/skills/"})]})]}),s.jsxs("div",{className:"card law-wrap",children:[s.jsxs("div",{className:"skill-rowhead",children:[s.jsx("span",{children:"Skill"}),s.jsx("span",{children:"Purpose"}),s.jsx("span",{children:"Class"})]}),p.map(e=>s.jsx(A,{skill:e,isOpen:j===e.name,onToggle:()=>k(e.name)},e.name)),p.length===0&&s.jsx("div",{className:"empty",style:{padding:32},children:n.length===0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"big",children:"Nothing here yet"}),"No skills are deployed; build and install a theme to seed them."]}):x?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"big",children:"No matching skills"}),"Nothing matches “",h.trim(),"”."]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"big",children:"No skills in this class"}),"Try another class, or pick All."]})})]})]})}export{D as default};
@@ -1 +1 @@
1
- import{j as t}from"./index-BnRWQbZb.js";import"./react-DOpiTn5v.js";const s={experimental:{label:"experimental",cls:"warn",hint:"Shipped, but not yet confirmed by real use."},deprecated:{label:"deprecated",cls:"bad",hint:"On its way out — look for the replacement before building on it."},personal:{label:"personal",cls:"",hint:"Yours — present in this install, not shipped or versioned by Geneseed."},unknown:{label:"no status",cls:"",hint:"Not listed in registry.json."}};function i({status:n}){const e=s[n];return e?t.jsxs("span",{className:`badge ${e.cls}`,title:e.hint,children:[t.jsx("span",{className:"dot"}),e.label]}):null}export{i as S};
1
+ import{j as t}from"./index-DNQE5ydy.js";import"./react-DOpiTn5v.js";const s={experimental:{label:"experimental",cls:"warn",hint:"Shipped, but not yet confirmed by real use."},deprecated:{label:"deprecated",cls:"bad",hint:"On its way out — look for the replacement before building on it."},personal:{label:"personal",cls:"",hint:"Yours — present in this install, not shipped or versioned by Geneseed."},unknown:{label:"no status",cls:"",hint:"Not listed in registry.json."}};function i({status:n}){const e=s[n];return e?t.jsxs("span",{className:`badge ${e.cls}`,title:e.hint,children:[t.jsx("span",{className:"dot"}),e.label]}):null}export{i as S};
@@ -1 +1 @@
1
- import{j as n}from"./index-BnRWQbZb.js";import{r as o}from"./react-DOpiTn5v.js";const i={busy:{cls:"acc",label:"working",accent:"var(--accent)"},"waiting-input":{cls:"warn",label:"your move",accent:"var(--warn)"},blocked:{cls:"bad",label:"blocked",accent:"var(--bad)"},idle:{cls:"",label:"idle",accent:"var(--line)"}},p={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function d(e){if(!e)return"";const t=e.replace(/\\/g,"/").replace(/\/+$/,"").split("/");return t[t.length-1]||e}const u=e=>e?e<1e3?String(e):e<1e5?(e/1e3).toFixed(1)+"k":e<1e6?(e/1e3).toFixed(0)+"k":(e/1e6).toFixed(1)+"M":"0";function c(e){if(e=Math.max(0,Math.floor(e)),e<60)return`${e}s`;const t=Math.floor(e/60);return t<60?`${t}m ${e%60}s`:`${Math.floor(t/60)}h ${t%60}m`}function f({startedAt:e}){const[t,a]=o.useState(()=>Date.now()/1e3);return o.useEffect(()=>{const r=setInterval(()=>a(Date.now()/1e3),1e3);return()=>clearInterval(r)},[]),c(t-e)}function m({done:e,total:t}){const a=Math.min(t,10),r=Math.min(a,Math.round(e/t*a));return n.jsxs("span",{style:{letterSpacing:2},children:[n.jsx("span",{style:{color:"var(--accent)"},children:"●".repeat(r)}),n.jsx("span",{style:{color:"var(--text-3)"},children:"○".repeat(a-r)})]})}export{p as E,i as S,m as T,f as a,d as b,u as c};
1
+ import{j as n}from"./index-DNQE5ydy.js";import{r as o}from"./react-DOpiTn5v.js";const i={busy:{cls:"acc",label:"working",accent:"var(--accent)"},"waiting-input":{cls:"warn",label:"your move",accent:"var(--warn)"},blocked:{cls:"bad",label:"blocked",accent:"var(--bad)"},idle:{cls:"",label:"idle",accent:"var(--line)"}},p={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function d(e){if(!e)return"";const t=e.replace(/\\/g,"/").replace(/\/+$/,"").split("/");return t[t.length-1]||e}const u=e=>e?e<1e3?String(e):e<1e5?(e/1e3).toFixed(1)+"k":e<1e6?(e/1e3).toFixed(0)+"k":(e/1e6).toFixed(1)+"M":"0";function c(e){if(e=Math.max(0,Math.floor(e)),e<60)return`${e}s`;const t=Math.floor(e/60);return t<60?`${t}m ${e%60}s`:`${Math.floor(t/60)}h ${t%60}m`}function f({startedAt:e}){const[t,a]=o.useState(()=>Date.now()/1e3);return o.useEffect(()=>{const r=setInterval(()=>a(Date.now()/1e3),1e3);return()=>clearInterval(r)},[]),c(t-e)}function m({done:e,total:t}){const a=Math.min(t,10),r=Math.min(a,Math.round(e/t*a));return n.jsxs("span",{style:{letterSpacing:2},children:[n.jsx("span",{style:{color:"var(--accent)"},children:"●".repeat(r)}),n.jsx("span",{style:{color:"var(--text-3)"},children:"○".repeat(a-r)})]})}export{p as E,i as S,m as T,f as a,d as b,u as c};
@@ -1 +1 @@
1
- import{j as e,I as l,a as b,w,R as v,F as N,A as f,f as u,h as k}from"./index-BnRWQbZb.js";import{r as m}from"./react-DOpiTn5v.js";function S(){const[a,n]=m.useState(!1),[r,o]=m.useState(!1),t=async()=>{if(window.confirm("Stop the local Geneseed server? The console goes offline until you start it again.")){try{await b.shutdown()}catch{}n(!0)}},d=async()=>{if(window.confirm("Restart the local Geneseed server? The console reconnects in a moment.")){o(!0);try{await b.restart()}catch{}w(v)}};return a?e.jsxs("p",{className:"sub",children:["Server stopped. You can close this tab and reopen any time with ",e.jsx("code",{children:"geneseed web"}),"."]}):e.jsxs("div",{className:"row",children:[e.jsxs("button",{className:"btn ghost",onClick:d,disabled:r,children:[e.jsx(l,{name:"refresh"}),r?"Restarting…":"Restart server"]}),e.jsxs("button",{className:"btn ghost",onClick:t,disabled:r,children:[e.jsx(l,{name:"x"}),"Stop server"]})]})}const R="https://github.com/Arylmera/Geneseed",C="https://github.com/Arylmera";function T(){const[a,n]=m.useState(R),[r,o]=m.useState(!0);return m.useEffect(()=>{var t,d;Promise.resolve((d=(t=b).docsPage)==null?void 0:d.call(t,"about")).then(i=>{i!=null&&i.repo&&(n(i.repo),o(!!i.repo_is_github))}).catch(()=>{})},[]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"card pad-lg mb-16",children:[e.jsx("div",{className:"card-head",children:e.jsx("h3",{children:"About"})}),e.jsx("p",{className:"sub mb-16",children:"Geneseed is a portable, theme-able harness you implant once and use everywhere to grow a disciplined AI coding agent. One canonical source, many voices, MIT-licensed."}),e.jsxs("div",{className:"row wrap gap-10",children:[e.jsxs("a",{className:"btn ghost",href:a,target:"_blank",rel:"noreferrer",children:[e.jsx(l,{name:"github"}),r?"Source on GitHub":"Source repo"]}),r&&e.jsxs(e.Fragment,{children:[e.jsxs("a",{className:"btn ghost",href:a+"/issues",target:"_blank",rel:"noreferrer",children:[e.jsx(l,{name:"external"}),"Issues"]}),e.jsxs("a",{className:"btn ghost",href:a+"/blob/main/LICENSE",target:"_blank",rel:"noreferrer",children:[e.jsx(l,{name:"external"}),"MIT License"]})]})]})]}),e.jsxs("div",{className:"card pad-lg",children:[e.jsx("div",{className:"card-head",children:e.jsx("h3",{children:"Creator"})}),e.jsxs("p",{className:"sub mb-16",children:["Geneseed is built by ",e.jsx("strong",{children:"Guillaume Lemer"}),". It started as a personal, Obsidian-vault-grown agent operating system and was distilled into the repo you are running. Implant it once, and a disciplined agent grows around the same inherited rules, skills, and memory in every repo it follows you into."]}),e.jsx("p",{className:"sub mb-16",children:"If you find this useful, a star on the repo or an issue with feedback is the best way to help shape what comes next."}),e.jsx("div",{className:"row wrap gap-10",children:e.jsxs("a",{className:"btn ghost",href:C,target:"_blank",rel:"noreferrer",children:[e.jsx(l,{name:"github"}),"@Arylmera on GitHub"]})})]})]})}function E({overview:a,onAction:n,flavour:r,onFlavour:o,accentMode:t,onAccentMode:d,layout:i,onLayout:p}){var x,j,g;const c=a==null?void 0:a.install,h=a==null?void 0:a.footprint,y=s=>{!c||s===h||window.confirm(`Rebuild ${c.host} · ${c.scope} with the “${s}” footprint? It rebuilds in place, non-destructive.`)&&(n==null||n("install",{...c,footprint:s}))};return e.jsxs("div",{className:"narrow-lg",children:[e.jsx("div",{className:"head-row mb-18",children:e.jsxs("div",{children:[e.jsx("h1",{className:"h",children:"Settings"}),e.jsx("p",{className:"sub",children:"Console direction, harness footprint, machine maintenance (incl. git-pull update), server control, and about. See per-install detail in the Harness tab; build from there and the Dashboard."})]})}),r&&o&&e.jsxs("div",{className:"card pad-lg mb-16",children:[e.jsx("div",{className:"card-head",children:e.jsx("h3",{children:"Console direction"})}),e.jsxs("p",{className:"sub mb-16",children:[N.length," takes on the same data. Pick a direction; it applies instantly and persists across reloads."]}),t&&d&&e.jsxs("div",{className:"dir-layout",children:[e.jsx("span",{className:"tick",id:"dir-accent-label",children:"Accent"}),e.jsx("div",{className:"seg",role:"group","aria-labelledby":"dir-accent-label",children:f.map(s=>e.jsx("button",{className:t===s.id?"on":"",onClick:()=>d(s.id),"aria-pressed":t===s.id,title:s.tagline,children:s.short},s.id))}),e.jsx("span",{className:"dir-layout-note sub",role:"status","aria-live":"polite",children:((x=f.find(s=>s.id===t))==null?void 0:x.tagline)??""})]}),i&&p&&e.jsxs("div",{className:"dir-layout",children:[e.jsx("span",{className:"tick",id:"dir-layout-label",children:"Dashboard layout"}),e.jsx("div",{className:"seg",role:"group","aria-labelledby":"dir-layout-label",children:u.map(s=>e.jsx("button",{className:i===s.id?"on":"",onClick:()=>p(s.id),"aria-pressed":i===s.id,title:s.tagline,children:s.short},s.id))}),e.jsx("span",{className:"dir-layout-note sub",role:"status","aria-live":"polite",children:i==="auto"?`Following the theme: ${((j=u.find(s=>s.id===k(r)))==null?void 0:j.short)??""}.`:((g=u.find(s=>s.id===i))==null?void 0:g.tagline)??""})]}),e.jsx("div",{className:"dir-grid",children:N.map(s=>e.jsxs("button",{className:`dir-tile dir-${s.id} ${r===s.id?"on":""}`,onClick:()=>o(s.id),"aria-pressed":r===s.id,children:[e.jsxs("span",{className:"dir-thumb","aria-hidden":"true",children:[e.jsx("span",{className:"dir-thumb-rail"}),e.jsx("span",{className:"dir-thumb-bar"}),e.jsx("span",{className:"dir-thumb-bar",style:{width:"70%"}}),e.jsx("span",{className:"dir-thumb-bar",style:{width:"52%"}}),e.jsx("span",{className:"dir-thumb-dot"})]}),e.jsxs("span",{className:"dir-meta",children:[e.jsxs("span",{className:"dir-name",children:[s.short,r===s.id&&e.jsx("span",{className:"dir-check",children:"● active"})]}),e.jsx("span",{className:"dir-tag",children:s.tagline})]})]},s.id))})]}),c&&h&&e.jsxs("div",{className:"card pad-lg mb-16",children:[e.jsx("div",{className:"card-head",children:e.jsx("h3",{children:"Harness footprint"})}),e.jsxs("p",{className:"sub mb-16",children:["How much of the Rules ",e.jsx("code",{children:"AGENT.md"})," carries inline each turn, for the current install (",e.jsxs("code",{children:[c.host," · ",c.scope]}),"). A token-cost dial; every Rule stays in force either way. Changing it rebuilds the install in place. ",e.jsx("a",{href:"#/docs/footprint",children:"Learn more →"})]}),e.jsxs("div",{className:"dir-layout",children:[e.jsx("span",{className:"tick",id:"footprint-label",children:"Footprint"}),e.jsx("div",{className:"seg",role:"group","aria-labelledby":"footprint-label",children:["full","lean"].map(s=>e.jsx("button",{className:h===s?"on":"",onClick:()=>y(s),"aria-pressed":h===s,children:s},s))}),e.jsx("span",{className:"dir-layout-note sub",role:"status","aria-live":"polite",children:h==="lean"?"Lean: terse rule lines + a pointer to the full law file (~40% smaller, lighter context per turn).":"Full: every Rule’s complete text and rationale inlined (maximum guidance, largest context)."})]})]}),e.jsxs("div",{className:"card pad-lg mb-16",children:[e.jsx("div",{className:"card-head",children:e.jsx("h3",{children:"Maintenance"})}),e.jsxs("p",{className:"sub mb-16",children:["Put ",e.jsx("code",{children:"geneseed"})," on your PATH so it runs from any directory, or remove a global install. Your memory store is always kept. Each runs live in the console."]}),e.jsxs("div",{className:"row wrap gap-10",children:[e.jsxs("button",{className:"btn ghost",onClick:()=>n("update"),children:[e.jsx(l,{name:"download"}),"Update (git pull + rebuild)"]}),e.jsxs("button",{className:"btn ghost",onClick:()=>n("link"),children:[e.jsx(l,{name:"external"}),"Add to PATH"]}),e.jsx("button",{className:"btn ghost",onClick:()=>n("unlink"),children:"Remove from PATH"}),e.jsxs("button",{className:"btn ghost",onClick:()=>{window.confirm("Uninstall the global Geneseed harness? Your memory store is kept; everything else this install added is removed.")&&n("uninstall")},children:[e.jsx(l,{name:"clear"}),"Uninstall"]})]})]}),e.jsxs("div",{className:"card pad-lg mb-16",children:[e.jsx("div",{className:"card-head",children:e.jsx("h3",{children:"Server"})}),e.jsx("p",{className:"sub mb-16",children:"The console runs a small local server. Leave it running in the background and reopen any time, or stop it when you are done."}),e.jsx(S,{})]}),e.jsx(T,{})]})}export{E as default};
1
+ import{j as e,I as l,a as b,w,R as v,F as N,A as y,d as u,e as k}from"./index-DNQE5ydy.js";import{r as m}from"./react-DOpiTn5v.js";function S(){const[a,n]=m.useState(!1),[r,o]=m.useState(!1),t=async()=>{if(window.confirm("Stop the local Geneseed server? The console goes offline until you start it again.")){try{await b.shutdown()}catch{}n(!0)}},d=async()=>{if(window.confirm("Restart the local Geneseed server? The console reconnects in a moment.")){o(!0);try{await b.restart()}catch{}w(v)}};return a?e.jsxs("p",{className:"sub",children:["Server stopped. You can close this tab and reopen any time with ",e.jsx("code",{children:"geneseed web"}),"."]}):e.jsxs("div",{className:"row",children:[e.jsxs("button",{className:"btn ghost",onClick:d,disabled:r,children:[e.jsx(l,{name:"refresh"}),r?"Restarting…":"Restart server"]}),e.jsxs("button",{className:"btn ghost",onClick:t,disabled:r,children:[e.jsx(l,{name:"x"}),"Stop server"]})]})}const R="https://github.com/Arylmera/Geneseed",C="https://github.com/Arylmera";function T(){const[a,n]=m.useState(R),[r,o]=m.useState(!0);return m.useEffect(()=>{var t,d;Promise.resolve((d=(t=b).docsPage)==null?void 0:d.call(t,"about")).then(i=>{i!=null&&i.repo&&(n(i.repo),o(!!i.repo_is_github))}).catch(()=>{})},[]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"card pad-lg mb-16",children:[e.jsx("div",{className:"card-head",children:e.jsx("h3",{children:"About"})}),e.jsx("p",{className:"sub mb-16",children:"Geneseed is a portable, theme-able harness you implant once and use everywhere to grow a disciplined AI coding agent. One canonical source, many voices, MIT-licensed."}),e.jsxs("div",{className:"row wrap gap-10",children:[e.jsxs("a",{className:"btn ghost",href:a,target:"_blank",rel:"noreferrer",children:[e.jsx(l,{name:"github"}),r?"Source on GitHub":"Source repo"]}),r&&e.jsxs(e.Fragment,{children:[e.jsxs("a",{className:"btn ghost",href:a+"/issues",target:"_blank",rel:"noreferrer",children:[e.jsx(l,{name:"external"}),"Issues"]}),e.jsxs("a",{className:"btn ghost",href:a+"/blob/main/LICENSE",target:"_blank",rel:"noreferrer",children:[e.jsx(l,{name:"external"}),"MIT License"]})]})]})]}),e.jsxs("div",{className:"card pad-lg",children:[e.jsx("div",{className:"card-head",children:e.jsx("h3",{children:"Creator"})}),e.jsxs("p",{className:"sub mb-16",children:["Geneseed is built by ",e.jsx("strong",{children:"Guillaume Lemer"}),". It started as a personal, Obsidian-vault-grown agent operating system and was distilled into the repo you are running. Implant it once, and a disciplined agent grows around the same inherited rules, skills, and memory in every repo it follows you into."]}),e.jsx("p",{className:"sub mb-16",children:"If you find this useful, a star on the repo or an issue with feedback is the best way to help shape what comes next."}),e.jsx("div",{className:"row wrap gap-10",children:e.jsxs("a",{className:"btn ghost",href:C,target:"_blank",rel:"noreferrer",children:[e.jsx(l,{name:"github"}),"@Arylmera on GitHub"]})})]})]})}function E({overview:a,onAction:n,flavour:r,onFlavour:o,accentMode:t,onAccentMode:d,layout:i,onLayout:p}){var x,j,g;const c=a==null?void 0:a.install,h=a==null?void 0:a.footprint,f=s=>{!c||s===h||window.confirm(`Rebuild ${c.host} · ${c.scope} with the “${s}” footprint? It rebuilds in place, non-destructive.`)&&(n==null||n("install",{...c,footprint:s}))};return e.jsxs("div",{className:"narrow-lg",children:[e.jsx("div",{className:"head-row mb-18",children:e.jsxs("div",{children:[e.jsx("h1",{className:"h",children:"Settings"}),e.jsx("p",{className:"sub",children:"Console direction, harness footprint, machine maintenance (incl. git-pull update), server control, and about. See per-install detail in the Harness tab; build from there and the Dashboard."})]})}),r&&o&&e.jsxs("div",{className:"card pad-lg mb-16",children:[e.jsx("div",{className:"card-head",children:e.jsx("h3",{children:"Console direction"})}),e.jsxs("p",{className:"sub mb-16",children:[N.length," takes on the same data. Pick a direction; it applies instantly and persists across reloads."]}),t&&d&&e.jsxs("div",{className:"dir-layout",children:[e.jsx("span",{className:"tick",id:"dir-accent-label",children:"Accent"}),e.jsx("div",{className:"seg",role:"group","aria-labelledby":"dir-accent-label",children:y.map(s=>e.jsx("button",{className:t===s.id?"on":"",onClick:()=>d(s.id),"aria-pressed":t===s.id,title:s.tagline,children:s.short},s.id))}),e.jsx("span",{className:"dir-layout-note sub",role:"status","aria-live":"polite",children:((x=y.find(s=>s.id===t))==null?void 0:x.tagline)??""})]}),i&&p&&e.jsxs("div",{className:"dir-layout",children:[e.jsx("span",{className:"tick",id:"dir-layout-label",children:"Dashboard layout"}),e.jsx("div",{className:"seg",role:"group","aria-labelledby":"dir-layout-label",children:u.map(s=>e.jsx("button",{className:i===s.id?"on":"",onClick:()=>p(s.id),"aria-pressed":i===s.id,title:s.tagline,children:s.short},s.id))}),e.jsx("span",{className:"dir-layout-note sub",role:"status","aria-live":"polite",children:i==="auto"?`Following the theme: ${((j=u.find(s=>s.id===k(r)))==null?void 0:j.short)??""}.`:((g=u.find(s=>s.id===i))==null?void 0:g.tagline)??""})]}),e.jsx("div",{className:"dir-grid",children:N.map(s=>e.jsxs("button",{className:`dir-tile dir-${s.id} ${r===s.id?"on":""}`,onClick:()=>o(s.id),"aria-pressed":r===s.id,children:[e.jsxs("span",{className:"dir-thumb","aria-hidden":"true",children:[e.jsx("span",{className:"dir-thumb-rail"}),e.jsx("span",{className:"dir-thumb-bar"}),e.jsx("span",{className:"dir-thumb-bar",style:{width:"70%"}}),e.jsx("span",{className:"dir-thumb-bar",style:{width:"52%"}}),e.jsx("span",{className:"dir-thumb-dot"})]}),e.jsxs("span",{className:"dir-meta",children:[e.jsxs("span",{className:"dir-name",children:[s.short,r===s.id&&e.jsx("span",{className:"dir-check",children:"● active"})]}),e.jsx("span",{className:"dir-tag",children:s.tagline})]})]},s.id))})]}),c&&h&&e.jsxs("div",{className:"card pad-lg mb-16",children:[e.jsx("div",{className:"card-head",children:e.jsx("h3",{children:"Harness footprint"})}),e.jsxs("p",{className:"sub mb-16",children:["How much of the Rules ",e.jsx("code",{children:"AGENT.md"})," carries inline each turn, for the current install (",e.jsxs("code",{children:[c.host," · ",c.scope]}),"). A token-cost dial; every Rule stays in force either way. Changing it rebuilds the install in place. ",e.jsx("a",{href:"#/docs/footprint",children:"Learn more →"})]}),e.jsxs("div",{className:"dir-layout",children:[e.jsx("span",{className:"tick",id:"footprint-label",children:"Footprint"}),e.jsx("div",{className:"seg",role:"group","aria-labelledby":"footprint-label",children:["full","lean"].map(s=>e.jsx("button",{className:h===s?"on":"",onClick:()=>f(s),"aria-pressed":h===s,children:s},s))}),e.jsx("span",{className:"dir-layout-note sub",role:"status","aria-live":"polite",children:h==="lean"?"Lean: terse rule lines + a pointer to the full law file (~40% smaller, lighter context per turn).":"Full: every Rule’s complete text and rationale inlined (maximum guidance, largest context)."})]})]}),e.jsxs("div",{className:"card pad-lg mb-16",children:[e.jsx("div",{className:"card-head",children:e.jsx("h3",{children:"Maintenance"})}),e.jsxs("p",{className:"sub mb-16",children:["Put ",e.jsx("code",{children:"geneseed"})," on your PATH so it runs from any directory, or remove a global install. Your memory store is always kept. Each runs live in the console."]}),e.jsxs("div",{className:"row wrap gap-10",children:[e.jsxs("button",{className:"btn ghost",onClick:()=>n("update"),children:[e.jsx(l,{name:"download"}),"Update (git pull + rebuild)"]}),e.jsxs("button",{className:"btn ghost",onClick:()=>n("link"),children:[e.jsx(l,{name:"external"}),"Add to PATH"]}),e.jsx("button",{className:"btn ghost",onClick:()=>n("unlink"),children:"Remove from PATH"}),e.jsxs("button",{className:"btn ghost",onClick:()=>{window.confirm("Uninstall the global Geneseed harness? Your memory store is kept; everything else this install added is removed.")&&n("uninstall")},children:[e.jsx(l,{name:"clear"}),"Uninstall"]})]})]}),e.jsxs("div",{className:"card pad-lg mb-16",children:[e.jsx("div",{className:"card-head",children:e.jsx("h3",{children:"Server"})}),e.jsx("p",{className:"sub mb-16",children:"The console runs a small local server. Leave it running in the background and reopen any time, or stop it when you are done."}),e.jsx(S,{})]}),e.jsx(T,{})]})}export{E as default};
@@ -0,0 +1,10 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GreenhouseView-DfC5IILJ.js","assets/react-DOpiTn5v.js","assets/jobBuckets-DfTUJUxR.js","assets/OperatorHudView-DEpCtAjP.js","assets/JournalView-Cpu2eI4s.js","assets/lawCats-DUS9UTH4.js","assets/Activity-BfVcLrda.js","assets/activity-DpYPKNrA.js","assets/ActivityDetail-CQXccGPl.js","assets/Library-Dao3T9na.js","assets/Markdown-C__nuWX5.js","assets/StatusBadge-wW_RS_my.js","assets/FilterInput-CkUCk_lY.js","assets/Laws-DDDVFuQz.js","assets/CatalogRow-DALEQImZ.js","assets/Rules-DIre6gxR.js","assets/Profile-BlXtUlh2.js","assets/Skills-rY13ZPhM.js","assets/Diff-BIjxXx46.js","assets/Doctor-CJLbgsrw.js","assets/index-BEZvPvpF.js","assets/Harness-Dm5CCU-v.js","assets/index-PmQGRS1X.js"])))=>i.map(i=>d[i]);
2
+ import{r as l,c as Ie}from"./react-DOpiTn5v.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const r of a)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(a){const r={};return a.integrity&&(r.integrity=a.integrity),a.referrerPolicy&&(r.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?r.credentials="include":a.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(a){if(a.ep)return;a.ep=!0;const r=n(a);fetch(a.href,r)}})();var he={exports:{}},W={};/**
3
+ * @license React
4
+ * react-jsx-runtime.production.min.js
5
+ *
6
+ * Copyright (c) Facebook, Inc. and its affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var De=l,Oe=Symbol.for("react.element"),$e=Symbol.for("react.fragment"),Pe=Object.prototype.hasOwnProperty,Ve=De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Be={key:!0,ref:!0,__self:!0,__source:!0};function ue(e,t,n){var i,a={},r=null,o=null;n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),t.ref!==void 0&&(o=t.ref);for(i in t)Pe.call(t,i)&&!Be.hasOwnProperty(i)&&(a[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)a[i]===void 0&&(a[i]=t[i]);return{$$typeof:Oe,type:e,key:r,ref:o,props:a,_owner:Ve.current}}W.Fragment=$e;W.jsx=ue;W.jsxs=ue;he.exports=W;var s=he.exports;const He="modulepreload",ze=function(e){return"/"+e},ce={},M=function(t,n,i){let a=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),c=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));a=Promise.allSettled(n.map(h=>{if(h=ze(h),h in ce)return;ce[h]=!0;const f=h.endsWith(".css"),p=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const d=document.createElement("link");if(d.rel=f?"stylesheet":He,f||(d.as="script"),d.crossOrigin="",d.href=h,c&&d.setAttribute("nonce",c),document.head.appendChild(d),f)return new Promise((u,m)=>{d.addEventListener("load",u),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${h}`)))})}))}function r(o){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=o,window.dispatchEvent(c),!c.defaultPrevented)throw o}return a.then(o=>{for(const c of o||[])c.status==="rejected"&&r(c.reason);return t().catch(r)})},Ue=typeof window<"u"?window.__GENESEED_TOKEN__:"";async function me(e){const t=await e.json().catch(()=>({})),n=e.status===403&&(t.error||"").startsWith("forbidden")?"the web server restarted since this page loaded — reload the page, then re-apply your edit":t.error||t.message||e.statusText,i=new Error(n);return i.status=e.status,i.body=t,i}async function k(e){const t=await fetch(e);if(!t.ok)throw await me(t);return t.json()}async function E(e,t={}){const n=await fetch(e,{method:"POST",headers:{"X-Geneseed-Token":Ue||"","Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw await me(n);return n.json()}const We=()=>k("/api/overview"),Ze=()=>k("/api/recent"),Ke=()=>k("/api/activity"),Ge=e=>k("/api/activity/"+encodeURIComponent(e)),Ye=e=>E("/api/activity",{enabled:e}),qe=()=>k("/api/setup"),Je=()=>k("/api/doctor"),Xe=()=>k("/api/themes"),Qe=e=>k(`/api/catalog/${e}`),es=(e,t)=>k(`/api/item/${e}/${encodeURIComponent(t)}`),ss=e=>E("/api/memory/delete",{name:e}),ts=()=>k("/api/diff"),as=e=>E("/api/actions/restore",{files:e}),ns=409,is=e=>k(`/api/jobs/${e}`),rs=()=>k("/api/jobs"),cs=e=>E(`/api/jobs/${e}/cancel`);async function ls(e,t){try{return await E(`/api/actions/${e}`,t||{})}catch(n){throw n.status===ns?new Error("An action is already running."):n}}const os=()=>k("/api/mcp"),ds=(e,t,n)=>E("/api/mcp",{path:e,name:t,enabled:n}),hs=e=>E("/api/reveal",{path:e}),us=()=>k("/api/installs"),ms=(e,t,n)=>E("/api/install",{host:e,path:t,action:n}),ps=(e,t,n)=>E("/api/install",{host:e,path:t,action:"remove",memory:n}),fs=(e,t)=>E("/api/view",{host:e,path:t}),xs=()=>E("/api/pick-folder",{}),gs=()=>k("/api/ping"),js=()=>E("/api/shutdown"),vs=()=>E("/api/restart"),pe=e=>e?`?harness=${encodeURIComponent(e)}`:"",ys=e=>k(`/api/docs${pe(e)}`),bs=(e,t)=>k(`/api/docs/page/${encodeURIComponent(e)}${pe(t)}`),Ns=()=>k("/api/rules"),ks=e=>E("/api/rules",e),ws=e=>E("/api/rules/promote",e),Es=()=>k("/api/profile"),Ms=e=>E("/api/profile",e),Ss=()=>k("/api/excludes"),_s=(e,t)=>E("/api/excludes",{action:e,path:t}),w={overview:We,recent:Ze,activity:Ke,activityDetail:Ge,activityToggle:Ye,setup:qe,doctor:Je,themes:Xe,catalog:Qe,item:es,memoryDelete:ss,diff:ts,restore:as,job:is,jobs:rs,cancelJob:cs,action:ls,mcp:os,mcpToggle:ds,mcpReveal:hs,installs:us,installToggle:ms,installRemove:ps,selectView:fs,pickFolder:xs,ping:gs,shutdown:js,restart:vs,docs:ys,docsPage:bs,rules:Ns,rulesMutate:ks,rulesPromote:ws,profile:Es,profileSave:Ms,excludes:Ss,excludeMutate:_s},Cs=new Set(["activity","diff","settings","harness","harnesses","doctor","themes","library","laws","rules","profile","skills","agents","about"]),Fs={themes:"harness",harnesses:"harness",about:"settings"};function As(){const e=()=>{const a=((typeof window<"u"?window.location.hash:"")||"#/").slice(2).split("/").filter(Boolean);return a[0]==="section"?{view:"section",section:a[1]}:a[0]==="item"?{view:"item",type:a[1],name:decodeURIComponent(a[2]||"")}:a[0]==="docs"?{view:"docs",page:decodeURIComponent(a.slice(1).join("/")||"")}:a[0]==="activity"&&a[1]?{view:"activity-detail",sid:decodeURIComponent(a[1])}:Cs.has(a[0])?{view:Fs[a[0]]||a[0]}:{view:"dashboard"}},[t,n]=l.useState(e);return l.useEffect(()=>{const i=()=>n(e());return window.addEventListener("hashchange",i),()=>window.removeEventListener("hashchange",i)},[]),t}const R=e=>{window.location.hash=e},le={red:"#FF5C57",green:"#4ED888",yellow:"#E8B53D",blue:"#5B8CFF",magenta:"#C77DFF",cyan:"#3AD4C4",white:"#E9EFEA"},U={red:"#C53A36",green:"#2FA864",yellow:"#B8862A",blue:"#3C66D8",magenta:"#9A52D6",cyan:"#2BA89B",white:"#AEB8B0"},P=e=>le[e]||le.cyan,Ls=e=>e==="yellow"||e==="white"||e==="cyan"||e==="green"?"#06100D":"#FFFFFF";function Rs(e,t,n){if(!e)return;const i=n==="light";let a=i?U[t]||U.cyan:P(t),r=i?"#FFFFFF":Ls(t);i&&t==="white"&&(a="#566B62",r="#FFFFFF"),e.style.setProperty("--accent",a),e.style.setProperty("--accent-2",U[t]||U.cyan),e.style.setProperty("--accent-ink",r)}const Ts={cultivar:{dark:"#3AD4C4",light:"#127E73",ink:"#06100D",inkLight:"#FFFFFF"},greenhouse:{dark:"#74CE86",light:"#1C8450",ink:"#06140C",inkLight:"#FFFFFF"},operator:{dark:"#E8A23B",light:"#8F5E10",ink:"#1A1306",inkLight:"#FFFFFF"},heirloom:{dark:"#B9A6C6",light:"#6E5A7C",ink:"#1B1622",inkLight:"#FFFFFF"},matrix:{dark:"#19E37C",light:"#0B7A47",ink:"#04140C",inkLight:"#FFFFFF"},aurora:{dark:"#2DE0B8",light:"#0B7D62",ink:"#04231A",inkLight:"#FFFFFF"},perspective:{dark:"#FF7A59",light:"#C24A2C",ink:"#2A0E04",inkLight:"#FFFFFF"},sequencer:{dark:"#5B57E8",light:"#4F46E5",ink:"#FFFFFF",inkLight:"#FFFFFF"},cobalt:{dark:"#2BA8FF",light:"#1668A8",ink:"#021018",inkLight:"#FFFFFF"},cosmic:{dark:"#C081FF",light:"#7A33CC",ink:"#1A0833",inkLight:"#FFFFFF"},neon:{dark:"#DB245C",light:"#D81E5B",ink:"#FFFFFF",inkLight:"#FFFFFF"},atlas:{dark:"#8FD694",light:"#1C8450",ink:"#14200F",inkLight:"#FFFFFF"}};function Is(e,t,n){const i=Ts[t];if(!e||!i)return!1;const a=n==="light";return e.style.setProperty("--accent",a?i.light:i.dark),e.style.setProperty("--accent-2",i.light),e.style.setProperty("--accent-ink",a?i.inkLight:i.ink),!0}const V={agents:{label:"Agents",type:"agent",desc:"capability specialists",icon:"agent"},skills:{label:"Skills",type:"skill",desc:"repeatable workflows",icon:"skill"},laws:{label:"Constitution",type:"law",desc:"ontology, invariants, doctrines",icon:"law"},memory:{label:"Memory",type:"memory",desc:"durable facts",icon:"library"},notebook:{label:"Notebook",type:"notebook",desc:"sovereign space",icon:"notebook"},wiki:{label:"Knowledge",type:"wiki",desc:"knowledge base + setup",icon:"graph"},config:{label:"Config",type:"config",desc:"install metadata",icon:"settings"}},C=["agents","memory","notebook","wiki","config"],na=C.filter(e=>e!=="agents"&&e!=="config"),ia={config:"wiki"},Ds=Object.fromEntries(Object.entries(V).map(([e,t])=>[t.type,e]));function Z(e,t){const[n,i]=l.useState(()=>{try{return t(localStorage.getItem(e))}catch{return t(null)}});return l.useEffect(()=>{try{localStorage.setItem(e,n)}catch{}},[e,n]),[n,i]}const Os="geneseed-mode";function $s(){const[e,t]=Z(Os,i=>i==="light"?"light":"dark");return[e,()=>t(i=>i==="light"?"dark":"light")]}const Ps="geneseed-flavour",Vs=[{id:"cultivar",short:"Cultivar",name:"Cultivar Evolved",tagline:"The calm default — cool teal ink, geometric sans, soft flat cards lit by one quiet shadow."},{id:"greenhouse",short:"Greenhouse",name:"Greenhouse",tagline:"Warm loam dark, fresh sage green, rounded humanist type — the softest, friendliest skin."},{id:"operator",short:"Operator",name:"Operator HUD",tagline:"Amber phosphor on cool charcoal — all-mono, zero-radius instrument readout."},{id:"heirloom",short:"Heirloom",name:"Heirloom",tagline:"Aubergine plum and serif display — the one luxe, calm, editorial skin."},{id:"matrix",short:"Matrix",name:"Matrix",tagline:"Acid-green order-book terminal on pure black — all Space Mono, square 2px, a faint code-grid."},{id:"aurora",short:"Aurora",name:"Aurora Glass",tagline:"The glass skin — frosted navy panels lit by a cyan-to-violet aurora, airy and weightless."},{id:"perspective",short:"Perspective",name:"Perspective",tagline:"Coral on cool slate, condensed-architectural headings, cards that physically lift off the page."},{id:"sequencer",short:"Sequencer",name:"Sequencer",tagline:"A quant terminal in daylight — indigo on white, Inter, lining numerals on a fine ruled grid."},{id:"cobalt",short:"Cobalt",name:"Cobalt Terminal",tagline:"Electric-blue hacker terminal — all-mono, 2px corners, CRT scanlines on near-black."},{id:"cosmic",short:"Cosmic",name:"Cosmic",tagline:"Violet-magenta nebula on near-black — wide Audiowide wordmark, chamfered sci-fi instrumentation."},{id:"neon",short:"Neon",name:"Neon",tagline:"Neon-noir: hot-pink edge-glow on near-black, all-mono Geist, frosted glass."},{id:"atlas",short:"Atlas",name:"Atlas",tagline:"The field journal — loam dark, sage ink, the codex as a living map."}],Bs=new Set(Vs.map(e=>e.id)),Hs={a:"cultivar",b:"greenhouse",c:"operator",d:"heirloom",e:"matrix",f:"aurora",g:"perspective",z:"sequencer",cb:"cobalt",cm:"cosmic"};function zs(){return Z(Ps,e=>Bs.has(e)?e:Hs[e]||"cultivar")}const Us="geneseed-accent",Ws=[{id:"auto",short:"Auto",tagline:"Follows the deployed voice's accent."},{id:"curated",short:"Curated",tagline:"Each theme's own signature colour."}],Zs=new Set(Ws.map(e=>e.id));function Ks(){return Z(Us,e=>e&&Zs.has(e)?e:"auto")}const Gs="geneseed-layout",Ys=[{id:"auto",short:"Auto",tagline:"Follows the theme."},{id:"cultivar",short:"Cultivar",tagline:"Hero, KPIs & genome grid."},{id:"greenhouse",short:"Greenhouse",tagline:"Ring, tiles & mix donut."},{id:"operator",short:"Operator",tagline:"Dense terminal readout."},{id:"journal",short:"Journal",tagline:"Growth rings & the constitution map."}],fe=new Set(Ys.map(e=>e.id));function qs(e){return e==="atlas"||e==="greenhouse"?"journal":e==="cobalt"?"greenhouse":e==="operator"?"operator":"cultivar"}function Js(e,t){return t&&t!=="auto"&&fe.has(t)?t:qs(e)}function Xs(){return Z(Gs,e=>e&&fe.has(e)?e:"auto")}function Qs(e){const[t,n]=l.useState(null),[i,a]=l.useState([]),r=()=>w.overview().then(n).catch(o=>e==null?void 0:e(o));return l.useEffect(()=>{r()},[]),l.useEffect(()=>{w.themes().then(o=>a(o.themes)).catch(()=>{})},[]),{overview:t,themes:i,reload:r}}const et=1e3,st=30;async function oe(e=0){await new Promise(t=>setTimeout(t,e));for(let t=0;t<st;t++)try{await w.ping();break}catch{await new Promise(n=>setTimeout(n,et))}window.location.reload()}const tt=600;function at({onFinish:e,onError:t}={}){const[n,i]=l.useState([]),[a,r]=l.useState(null),[o,c]=l.useState(!1);return l.useEffect(()=>{w.jobs().then(({jobs:p})=>{if(!p.length)return;i(p.map(u=>({id:u.id,action:u.action,status:u.status,output:u.output||"",duration:u.duration,started:u.started})));const d=p.find(u=>u.status==="running");d&&(r(d.id),c(!0))}).catch(()=>{})},[]),l.useEffect(()=>{var u;if(!a)return;const p=((u=n.find(m=>m.id===a))==null?void 0:u.action)==="update",d=setInterval(async()=>{if(!document.hidden)try{const m=await w.job(a);if(i(j=>{const g=j.findIndex(K=>K.id===a);if(g===-1)return j;const v=j[g],x=m.output||"";if(v.output===x&&v.status===m.status&&v.duration===m.duration)return j;const N=j.slice();return N[g]={...v,output:x,status:m.status,duration:m.duration},N}),m.status!=="running"){if(clearInterval(d),r(null),p){oe(2e3);return}e==null||e()}}catch{clearInterval(d),p&&oe(0)}},tt);return()=>clearInterval(d)},[a]),{runs:n,activeId:a,consoleOpen:o,setConsoleOpen:c,runAction:async(p,d)=>{try{const{job_id:u}=await w.action(p,d),m=p==="build"&&(d!=null&&d.theme)?`build (${d.theme} · ${d.emit})`:p;return i(j=>[...j,{id:u,action:m,status:"running",output:"",started:Date.now()/1e3}]),r(u),c(!0),u}catch(u){t==null||t(u)}},cancelJob:p=>w.cancelJob(p).catch(d=>t==null?void 0:t(d)),clearRuns:()=>i([])}}const I=new Map;function ee(e,t=[],n=null){const i=n===null?null:`${n}|${t.join("")}`,[a,r]=l.useState(()=>i!==null&&I.has(i)?I.get(i):null),[o,c]=l.useState(""),[h,f]=l.useState(()=>!(i!==null&&I.has(i))),p=l.useRef(e);p.current=e;const d=l.useRef(i);d.current=i;const u=l.useCallback(()=>(f(!0),c(""),Promise.resolve(p.current()).then(m=>{d.current!==null&&I.set(d.current,m),r(m)}).catch(m=>c(m.message)).finally(()=>f(!1))),t);return l.useEffect(()=>{if(d.current!==null&&I.has(d.current)){r(I.get(d.current)),c(""),f(!1);return}u()},[u]),{data:a,error:o,loading:h,reload:u,setData:r}}const xe=60,ge=3600,nt=86400,Q={seconds:90,minutes:90*xe,hours:36*ge};function je(e){const t=Math.max(0,Date.now()/1e3-e);return t<Q.seconds?`${Math.round(t)}s`:t<Q.minutes?`${Math.round(t/xe)}m`:t<Q.hours?`${Math.round(t/ge)}h`:`${Math.round(t/nt)}d`}function it(e){return e?e.replace(/\\/g,"/").replace(/^\/?(home|Users)\/[^/]+/i,"~").replace(/^[A-Z]:\/Users\/[^/]+/i,"~"):"~"}const L={deployed:.4,doctorClean:.25,doctorMinor:.15,doctorMinorMax:2,doctorFail:.05,versionSynced:.2,diskClean:.15};function ve(e,t){var r,o,c;if(!e)return 0;const n=((o=(r=e.doctor)==null?void 0:r.problems)==null?void 0:o.length)??99,i=(c=e.doctor)!=null&&c.ok?L.doctorClean:n<=L.doctorMinorMax?L.doctorMinor:L.doctorFail,a=t&&t.installed_fp&&t.installed_fp===t.source_fp;return(e.deployed?L.deployed:0)+i+(a?L.versionSynced:0)+(e.diff&&e.diff.missing===0?L.diskClean:0)}const ye=e=>Math.max(...C.map(t=>(e==null?void 0:e[t])??0),1),B=e=>((e==null?void 0:e.edited)??0)+((e==null?void 0:e.added)??0),ra=e=>{var t;return((e==null?void 0:e.laws)??0)+(((t=e==null?void 0:e.doctrines)==null?void 0:t.rules)??0)},rt={dashboard:"M3 13h7V3H3v10Zm0 8h7v-6H3v6Zm11 0h7V11h-7v10Zm0-18v6h7V3h-7Z",library:"M4 5h10v14H4zM16 7h4v12h-4M7 9h4M7 12h4",graph:"M6 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM18 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM18 20a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM7.5 14.5l8-8M16.7 15.2L8.8 16.6",changes:"M4 6h10M4 12h7M4 18h12M17 4l3 3-3 3M20 7h-6",doctor:"M12 3v6m0 0a4 4 0 0 1-4 4H7a3 3 0 0 0-3 3v2m8-9a4 4 0 0 0 4 4h1a3 3 0 0 1 3 3v2M12 3a1.5 1.5 0 1 0 0-.01",themes:"M12 3a9 9 0 1 0 0 18c1.1 0 2-.9 2-2 0-.5-.2-1-.5-1.3-.3-.4-.5-.8-.5-1.2 0-1 .8-1.5 1.7-1.5H17a4 4 0 0 0 4-4c0-4.4-4-8-9-8Z",settings:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm8-3a8 8 0 0 0-.1-1.3l2-1.6-2-3.4-2.4 1a8 8 0 0 0-2.2-1.3L15 2H9l-.3 2.6a8 8 0 0 0-2.2 1.3l-2.4-1-2 3.4 2 1.6A8 8 0 0 0 4 12c0 .4 0 .9.1 1.3l-2 1.6 2 3.4 2.4-1a8 8 0 0 0 2.2 1.3L9 22h6l.3-2.6a8 8 0 0 0 2.2-1.3l2.4 1 2-3.4-2-1.6c.1-.4.1-.9.1-1.3Z",search:"M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM21 21l-4.3-4.3",chevron:"M9 6l6 6-6 6",x:"M6 6l12 12M18 6L6 18",menu:"M4 7h16M4 12h16M4 17h16",play:"M7 5v14l11-7L7 5Z",clear:"M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14",download:"M12 3v12m0 0l-4-4m4 4l4-4M4 19h16",refresh:"M21 12a9 9 0 1 1-3-6.7M21 4v5h-5",folder:"M3 7a2 2 0 0 1 2-2h3.5l2 2H19a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z",build:"M14 3l-1 4 4-1 3 3-4 1 1 4-3 3-1-4-4 1-3-3 4-1-1-4 3-3 5 0Z",arrow:"M5 12h14M13 6l6 6-6 6",external:"M14 5h5v5M19 5l-8 8M12 5H6a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2v-6",copy:"M9 9h11v11H9zM5 15H4V4h11v1",spark:"M12 3v3m0 12v3m9-9h-3M6 12H3m13.5-6.5-2 2m-7 7-2 2m11 0-2-2m-7-7-2-2",activity:"M3 12h4l2.5-7 5 14 2.5-7H21",agent:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM22 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8",layers:"M12 3l9 5-9 5-9-5 9-5ZM3 13l9 5 9-5M3 17l9 5 9-5",sun:"M12 4V2M12 22v-2M4 12H2M22 12h-2M5.6 5.6 4.2 4.2M19.8 19.8l-1.4-1.4M18.4 5.6l1.4-1.4M4.2 19.8l1.4-1.4M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z",moon:"M21 12.8A8.5 8.5 0 1 1 11.2 3a6.5 6.5 0 0 0 9.8 9.8Z",power:"M12 3v9M7.5 6.5a7 7 0 1 0 9 0",docs:"M5 4h9l5 5v11a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1ZM14 4v5h5M8 12h7M8 16h7",skill:"M21.7 6.6a5 5 0 0 1-6.6 6.6l-7.4 7.4a2 2 0 1 1-2.8-2.8l7.4-7.4a5 5 0 0 1 6.6-6.6l-2.6 2.6a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0Z",law:"M12 3v18M5 6h14M8 21h8M6 6l-3 6h6zM3 12a3 3 0 0 1 6 0M18 6l-3 6h6zM15 12a3 3 0 0 1 6 0",rule:"M7 3h10a1 1 0 0 1 1 1v17l-6-3.5L6 21V4a1 1 0 0 1 1-1ZM9.5 9.5l1.8 1.8 3.4-3.6",profile:"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM5 20a7 7 0 0 1 14 0",notebook:"M7 4h11v16H7zM4 8h3M4 12h3M4 16h3M11 9h5M11 13h5M11 17h3",about:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM12 11v6M12 7.6h.01",github:"M12 2a10 10 0 0 0-3.2 19.5c.5.1.7-.2.7-.5v-1.8c-2.8.6-3.4-1.2-3.4-1.2-.5-1.2-1.1-1.5-1.1-1.5-.9-.6.1-.6.1-.6 1 .1 1.5 1 1.5 1 .9 1.5 2.3 1.1 2.9.8.1-.6.3-1.1.6-1.3-2.2-.3-4.6-1.1-4.6-5 0-1.1.4-2 1-2.7-.1-.3-.4-1.3.1-2.7 0 0 .8-.3 2.7 1a9.4 9.4 0 0 1 5 0c1.9-1.3 2.7-1 2.7-1 .5 1.4.2 2.4.1 2.7.6.7 1 1.6 1 2.7 0 3.9-2.4 4.7-4.6 5 .4.3.7.9.7 1.8v2.6c0 .3.2.6.7.5A10 10 0 0 0 12 2Z"};function S({name:e,className:t="glyph",style:n}){return s.jsx("svg",{className:t,style:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:s.jsx("path",{d:rt[e]||""})})}function ct({className:e="sprout"}){return s.jsxs("svg",{className:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[s.jsx("path",{d:"M12 21.5v-9",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",fill:"none"}),s.jsx("path",{d:"M12 13c0-4.5 3.2-7.5 7.5-7.5 0 4.5-3.2 7.5-7.5 7.5z",fill:"var(--accent)"}),s.jsx("path",{d:"M12 14.5c0-3.6-2.6-6-6-6 0 3.6 2.6 6 6 6z",fill:"var(--accent)",opacity:".42"}),s.jsx("circle",{cx:"12",cy:"12.4",r:"1.1",fill:"var(--bg)"})]})}const lt=[{hash:"#/",id:"dashboard",label:"Dashboard",icon:"dashboard",match:e=>e.view==="dashboard",tag:()=>"today"},{group:"Codex"},{hash:"#/laws",id:"laws",label:"Constitution",icon:"law",match:e=>e.view==="laws"||e.view==="section"&&e.section==="laws"||e.view==="item"&&e.type==="law",tag:e=>{var t;return((t=e==null?void 0:e.counts)==null?void 0:t.laws)??null}},{hash:"#/rules",id:"rules",label:"Rules",icon:"rule",match:e=>e.view==="rules"},{hash:"#/profile",id:"profile",label:"Profile",icon:"profile",match:e=>e.view==="profile"},{hash:"#/skills",id:"skills",label:"Skills",icon:"skill",match:e=>e.view==="skills"||e.view==="section"&&e.section==="skills"||e.view==="item"&&e.type==="skill",tag:e=>{var t;return((t=e==null?void 0:e.counts)==null?void 0:t.skills)??null}},{hash:"#/agents",id:"agents",label:"Agents",icon:"agent",match:e=>e.view==="agents"||e.view==="section"&&e.section==="agents"||e.view==="item"&&e.type==="agent",tag:e=>{var t;return((t=e==null?void 0:e.counts)==null?void 0:t.agents)??null}},{hash:"#/library",id:"library",label:"Library",icon:"library",match:e=>e.view==="library"||e.view==="section"&&!["laws","skills","agents"].includes(e.section)||e.view==="item"&&!["law","skill","agent"].includes(e.type),tag:e=>e!=null&&e.counts?(e.counts.memory??0)+(e.counts.notebook??0)+(e.counts.wiki??0)+(e.counts.config??0):null},{hash:"#/docs",id:"docs",label:"Docs",icon:"docs",match:e=>e.view==="docs"},{group:"Care"},{hash:"#/activity",id:"activity",label:"Activity",icon:"activity",match:e=>e.view==="activity"||e.view==="activity-detail"},{hash:"#/diff",id:"changes",label:"Changes",icon:"changes",match:e=>e.view==="diff",tag:e=>(e!=null&&e.diff?B(e.diff):null)||null},{hash:"#/doctor",id:"doctor",label:"Doctor",icon:"doctor",match:e=>e.view==="doctor",tag:e=>e!=null&&e.doctor?e.doctor.ok?"clean":e.doctor.problems.length:null,warn:e=>!!(e!=null&&e.doctor)&&!e.doctor.ok},{group:"Setup"},{hash:"#/harness",id:"harness",label:"Harness",icon:"layers",match:e=>e.view==="harness",tag:e=>(e==null?void 0:e.theme)??null},{hash:"#/settings",id:"settings",label:"Settings",icon:"settings",match:e=>e.view==="settings"}];function ot({value:e}){const n=2*Math.PI*30;return s.jsxs("svg",{className:"rv-ring",width:"66",height:"66",viewBox:"0 0 72 72",role:"img","aria-label":`Growth ${Math.round(e*100)} of 100`,children:[s.jsx("circle",{cx:"36",cy:"36",r:30,fill:"none",stroke:"var(--line-2)",strokeWidth:"6"}),s.jsx("circle",{cx:"36",cy:"36",r:30,fill:"none",stroke:"var(--accent)",strokeWidth:"6",strokeLinecap:"round",strokeDasharray:`${n*e} ${n}`,transform:"rotate(-90 36 36)",style:{transition:"stroke-dasharray 1.1s cubic-bezier(.2,.7,.2,1)"}}),s.jsx("text",{className:"rv-ring-num",x:"36",y:"34",textAnchor:"middle",children:Math.round(e*100)}),s.jsx("text",{className:"rv-ring-lbl",x:"36",y:"47",textAnchor:"middle",children:"GROWTH"})]})}function dt({overview:e,setup:t}){if(!e)return null;const n=e.doctor?e.doctor.ok?"clean":`${e.doctor.problems.length} to fix`:"—";return s.jsxs("div",{className:"rail-vitals",children:[s.jsx(ot,{value:ve(e,t)}),s.jsxs("div",{className:"rv-rows",children:[s.jsxs("div",{children:[s.jsx("span",{children:"Drift"}),s.jsx("b",{children:B(e.diff)})]}),s.jsxs("div",{children:[s.jsx("span",{children:"Doctor"}),s.jsx("b",{children:n})]}),s.jsxs("div",{children:[s.jsx("span",{children:"Built"}),s.jsx("b",{className:"plain",title:e.build_time||void 0,children:e.build_epoch?je(e.build_epoch):"never"})]})]})]})}function ht({route:e,overview:t,setup:n,onOpenVoice:i,onNavigate:a}){return s.jsxs("nav",{className:"rail",id:"rail-nav","aria-label":"Harness navigation",tabIndex:-1,children:[s.jsxs("button",{className:"rail-brand",onClick:()=>{R("#/"),a==null||a()},title:"Dashboard",children:[s.jsx(ct,{}),s.jsxs("div",{className:"brand-text",children:[s.jsxs("span",{className:"brand-name",children:["Gene",s.jsx("b",{children:"seed"})]}),s.jsx("span",{className:"brand-sub",children:"harness console"})]})]}),s.jsx(dt,{overview:t,setup:n}),lt.map((r,o)=>{if(r.group)return s.jsx("div",{className:"rail-group",children:r.group},"g"+o);const c=r.tag?r.tag(t):null,h=r.match(e),f=typeof r.warn=="function"?r.warn(t):!!r.warn;return s.jsx("div",{className:"rail-nav",children:s.jsxs("a",{className:`rail-item ${h?"active":""}`,href:r.hash,"aria-current":h?"page":void 0,title:r.label,onClick:()=>a==null?void 0:a(),children:[s.jsx(S,{name:r.icon}),s.jsx("span",{children:r.label}),c?s.jsx("span",{className:"tag",style:f?{color:"var(--warn)"}:null,children:c}):null]})},r.id)}),s.jsx("div",{className:"rail-spacer"}),s.jsx("div",{className:"rail-foot",children:s.jsxs("button",{className:"voice",onClick:i,title:"Switch deployed voice",children:[s.jsx("span",{className:"voice-orb"}),s.jsxs("div",{className:"voice-meta",children:[s.jsx("div",{className:"vk",children:"deployed voice"}),s.jsx("div",{className:"vv",children:(t==null?void 0:t.theme)||"—"})]}),s.jsx(S,{name:"chevron",className:"chev glyph"})]})})]})}function ut(){const[e,t]=l.useState(null),[n,i]=l.useState(""),a=l.useRef(null),r=l.useCallback(()=>{if(e||a.current)return a.current;const o=(async()=>{const c=[],h=["laws","skills",...C],f=await Promise.all(h.map(async p=>{try{const d=await w.catalog(p);return{sec:p,items:(d==null?void 0:d.items)||[]}}catch{return{sec:p,items:[]}}}));for(const{sec:p,items:d}of f){const u=V[p];for(const m of d){const j=m.title||m.name;c.push({kind:u.label,sortKey:h.indexOf(p),title:j,desc:m.desc||"",hay:`${j} ${m.desc||""} ${m.name||""}`.toLowerCase(),route:`#/item/${u.type}/${encodeURIComponent(m.name)}`})}}try{const p=await w.mcp(),d=new Set;for(const u of(p==null?void 0:p.targets)||[])for(const m of u.servers||[]){if(d.has(m.name))continue;d.add(m.name);const j=m.label||m.name;c.push({kind:"MCP servers",sortKey:100,title:j,desc:m.desc||"",hay:`${j} ${m.desc||""} ${m.name||""} mcp`.toLowerCase(),route:"#/settings"})}}catch{}try{const p=await w.docs();for(const d of(p==null?void 0:p.groups)||[])for(const u of d.pages||[])c.push({kind:"Docs",sortKey:110,title:u.title,desc:d.label,hay:`${u.title||""} ${u.id||""} ${d.label||""}`.toLowerCase(),route:`#/docs/${encodeURIComponent(u.id)}`})}catch{}return t(c),a.current=null,c})().catch(c=>(a.current=null,i(c.message||String(c)),[]));return a.current=o,o},[e]);return{index:e,error:n,prime:r}}const mt=24;function pt(e,t){const n=e.title.toLowerCase();return n.startsWith(t)?0:n.includes(t)?1:e.hay.includes(t)?2:-1}function be(e,t){const n=t.toLowerCase().trim();if(!n||!e)return[];const i=[];for(const a of e){const r=pt(a,n);r>=0&&i.push({e:a,s:r})}return i.sort((a,r)=>a.s-r.s||a.e.sortKey-r.e.sortKey||a.e.title.localeCompare(r.e.title)),i.slice(0,mt).map(a=>a.e)}function ft({query:e,index:t,loading:n,error:i,active:a,onActive:r,onClose:o}){const c=l.useMemo(()=>be(t,e),[t,e]),h=l.useRef(null);l.useEffect(()=>{a>=c.length&&r(0)},[c,a,r]),l.useEffect(()=>{var m;const u=(m=h.current)==null?void 0:m.querySelector(`[data-spot-row="${a}"]`);u==null||u.scrollIntoView({block:"nearest"})},[a]);const f=u=>{u&&(R(u.route),o())},p=[];let d=null;return c.forEach((u,m)=>{(!d||d.kind!==u.kind)&&(d={kind:u.kind,rows:[]},p.push(d)),d.rows.push({entry:u,index:m})}),e.trim()?s.jsxs("div",{className:"spotlight",ref:h,id:"spotlight-list",role:"listbox","aria-label":"Search results",children:[i&&!t&&s.jsxs("div",{className:"spot-empty",role:"presentation",children:["Could not load the search index — ",i]}),n&&!t&&!i&&s.jsx("div",{className:"spot-empty",role:"presentation",children:"Loading…"}),!n&&c.length===0&&t&&s.jsxs("div",{className:"spot-empty",role:"presentation",children:["No matches for “",e,"”."]}),p.map(u=>s.jsxs("div",{className:"spot-group",role:"group","aria-label":u.kind,children:[s.jsx("div",{className:"spot-group-head","aria-hidden":"true",children:u.kind}),u.rows.map(({entry:m,index:j})=>s.jsxs("div",{id:`spot-opt-${j}`,"data-spot-row":j,role:"option","aria-selected":j===a,className:`spot-row ${j===a?"on":""}`,onMouseDown:g=>{g.preventDefault(),f(m)},onMouseEnter:()=>r(j),children:[s.jsx("div",{className:"spot-title",children:m.title}),m.desc?s.jsx("div",{className:"spot-desc",children:m.desc}):null]},`${m.route}-${j}`))]},u.kind))]}):null}function xt({value:e,onChange:t}){const n=l.useRef(null),i=l.useRef(null),[a,r]=l.useState(!1),[o,c]=l.useState(0),{index:h,error:f,prime:p}=ut();l.useEffect(()=>{const g=v=>{var N;!((v.metaKey||v.ctrlKey)&&!v.altKey&&v.key.toLowerCase()==="k")&&(v.key!=="/"||v.target.closest("input, textarea, select"))||(v.preventDefault(),(N=n.current)==null||N.focus())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[]),l.useEffect(()=>{if(!a)return;const g=v=>{var x;(x=i.current)!=null&&x.contains(v.target)||r(!1)};return window.addEventListener("mousedown",g),()=>window.removeEventListener("mousedown",g)},[a]);const d=a&&!!e.trim(),u=d&&h?be(h,e):[],m=o<u.length?`spot-opt-${o}`:void 0,j=g=>{var v,x;if(d)if(g.key==="ArrowDown")g.preventDefault(),c(N=>Math.min(N+1,Math.max(u.length-1,0)));else if(g.key==="ArrowUp")g.preventDefault(),c(N=>Math.max(N-1,0));else if(g.key==="Enter"){const N=u[o];N&&(g.preventDefault(),R(N.route),r(!1),(v=n.current)==null||v.blur())}else g.key==="Escape"&&(g.preventDefault(),e?t(""):(r(!1),(x=n.current)==null||x.blur()))};return s.jsxs("div",{className:"tb-search",ref:i,children:[s.jsx(S,{name:"search",className:"mag glyph"}),s.jsx("input",{ref:n,role:"combobox","aria-label":"Search the harness","aria-autocomplete":"list","aria-expanded":d,"aria-controls":d?"spotlight-list":void 0,"aria-activedescendant":m,value:e,onChange:g=>{t(g.target.value),c(0)},onFocus:()=>{r(!0),p()},onKeyDown:j,placeholder:"Search the harness…",title:"Press / to jump here, or Ctrl-K / ⌘K from inside any field"}),s.jsx("span",{className:"kbd",children:"/"}),s.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:d?u.length?`${u.length} results`:"no matches":""}),d&&s.jsx(ft,{query:e,index:h,loading:!h,error:f,active:o,onActive:c,onClose:()=>{var g;r(!1),(g=n.current)==null||g.blur()}})]})}function gt({dataRev:e,onSwitch:t}){const{data:n}=ee(()=>w.installs(),[e]),i=((n==null?void 0:n.installs)||[]).filter(o=>o.state==="active");if(i.length<2)return null;const a=i.find(o=>o.selected)||i[0],r=async o=>{const c=i.find(h=>h.id===o.target.value);if(c)try{await w.selectView(c.host,c.path),t==null||t()}catch{}};return s.jsxs("div",{className:"row gap-8",style:{alignItems:"center"},title:"Harness the console is viewing",children:[s.jsx("span",{style:{fontSize:12,color:"var(--text-3)"},children:"harness"}),s.jsx("select",{className:"sel","aria-label":"harness to view",value:a.id,onChange:r,children:i.map(o=>s.jsxs("option",{value:o.id,children:[o.host," · ",o.scope]},o.id))})]})}const jt={dashboard:"overview",diff:"diff",doctor:"doctor",harness:"harness",settings:"settings"};function vt(e){return e.view==="section"?["laws","skills"].includes(e.section)?e.section:"library":e.view==="item"?e.type==="law"?"laws":e.type==="skill"?"skills":"library":jt[e.view]||e.view}function yt({route:e,navOpen:t,onToggleNav:n,target:i,version:a,query:r,onQuery:o,mode:c,onToggleMode:h,onShutdown:f,dataRev:p,onSwitch:d}){return s.jsxs("header",{className:"topbar",children:[s.jsx("button",{className:"tb-menu",onClick:n,"aria-label":t?"Close navigation":"Open navigation","aria-expanded":!!t,"aria-controls":"rail-nav",children:s.jsx(S,{name:t?"x":"menu"})}),s.jsxs("div",{className:"prompt",children:[s.jsx("span",{className:"path",children:it(i)}),s.jsx("span",{className:"sep",children:"$"}),s.jsx("span",{className:"cmd",children:"geneseed"})," ",s.jsxs("span",{className:"flag",children:["--tab=",vt(e)]}),a&&s.jsxs("span",{className:"flag ver",children:[" --version=",a]}),s.jsx("span",{className:"cur"})]}),s.jsx("div",{className:"topbar-spacer"}),s.jsx(gt,{dataRev:p,onSwitch:d}),s.jsx(xt,{value:r,onChange:o}),s.jsx("button",{className:"iconbtn",title:c==="light"?"Switch to dark":"Switch to light","aria-label":c==="light"?"Switch to dark mode":"Switch to light mode",onClick:h,children:s.jsx(S,{name:c==="light"?"moon":"sun"})}),s.jsx("button",{className:"iconbtn",title:"Stop server","aria-label":"Stop server",onClick:f,children:s.jsx(S,{name:"power"})})]})}function bt({themes:e,current:t,onPick:n,onClose:i}){const a=l.useRef(null);return l.useEffect(()=>{const r=o=>{a.current&&!a.current.contains(o.target)&&i()};return document.addEventListener("mousedown",r),()=>document.removeEventListener("mousedown",r)},[i]),s.jsxs("div",{className:"pop",ref:a,children:[s.jsx("div",{className:"tick",style:{padding:"4px 10px 8px"},children:"Switch voice"}),e.map(r=>s.jsxs("div",{className:`pop-item ${r.name===t?"on":""}`,onClick:()=>n(r.name),children:[s.jsx("span",{className:"po",style:{background:P(r.accent),boxShadow:`0 0 8px ${P(r.accent)}`}}),s.jsx("span",{className:"pn",children:r.name})]},r.name))]})}const Nt=3500;function kt({toast:e,onClose:t}){return l.useEffect(()=>{const n=setTimeout(t,Nt);return()=>clearTimeout(n)},[e]),s.jsxs("div",{className:`toast ${e.kind}`,role:e.kind==="err"?"alert":"status","aria-live":e.kind==="err"?void 0:"polite",children:[s.jsx("div",{children:e.msg}),s.jsx("div",{style:{marginTop:8},children:s.jsx("button",{className:"btn ghost",onClick:t,children:"Dismiss"})})]})}function wt({runs:e,open:t,onToggle:n,onClear:i,onCancel:a,busy:r}){const o=l.useRef(null),c=e.length?e[e.length-1].output.length:0;return l.useEffect(()=>{const h=o.current;h&&t&&(h.scrollTop=h.scrollHeight)},[e.length,c,t]),s.jsxs("div",{className:"console",style:{height:"42vh",transform:t?"none":"translateY(calc(42vh - 42px))"},children:[s.jsxs("div",{className:"console-head",onClick:n,children:[s.jsxs("span",{className:"ttl",children:[s.jsx("span",{className:`live ${r?"on":""}`}),"terminal"]}),s.jsx("span",{className:"count",children:e.length}),s.jsxs("div",{className:"right",onClick:h=>h.stopPropagation(),children:[s.jsx("button",{className:"iconbtn",title:"Clear","aria-label":"Clear run history",onClick:i,disabled:!e.length,children:s.jsx(S,{name:"clear"})}),s.jsx("button",{className:"iconbtn",title:t?"Collapse":"Expand","aria-label":t?"Collapse console":"Expand console","aria-expanded":t,onClick:n,children:s.jsx(S,{name:"chevron",className:"glyph",style:{transform:t?"rotate(90deg)":"rotate(-90deg)"}})})]})]}),t&&s.jsxs("div",{className:"console-body",ref:o,children:[e.length===0&&s.jsx("div",{className:"console-empty",children:"No commands run yet. Actions you trigger stream here."}),e.map(h=>s.jsxs("div",{className:"run",children:[s.jsxs("div",{className:"run-head",children:[s.jsx("span",{className:"pr",children:"$"}),s.jsx("span",{className:"act",children:h.action}),s.jsx("span",{className:`st ${h.status}`,children:h.status==="running"?"…running":`${h.status==="done"?"✓ done":"✗ failed"}${h.duration?` · ${h.duration}s`:""}`}),h.status==="running"&&a&&s.jsx("button",{className:"iconbtn run-cancel",title:"Cancel this run","aria-label":`Cancel the ${h.action} run`,onClick:()=>a(h.id),children:s.jsx(S,{name:"x"})})]}),h.output&&s.jsx("pre",{className:"run-out",children:h.output})]},h.id))]})]})}const Et=550,de="gs-splash-seen";function Mt(){try{if(window.localStorage.getItem(de))return 0;window.localStorage.setItem(de,"1")}catch{}return Et}function St({ready:e,onDone:t}){const[n,i]=l.useState(!1),[a,r]=l.useState(!1);l.useEffect(()=>{const c=Mt();if(!c){i(!0);return}const h=setTimeout(()=>i(!0),c);return()=>clearTimeout(h)},[]),l.useEffect(()=>{e&&n&&r(!0)},[e,n]),l.useEffect(()=>{if(!a)return;const c=setTimeout(()=>t==null?void 0:t(),700);return()=>clearTimeout(c)},[a]);const o=c=>{c.animationName==="splashOut"&&(t==null||t())};return s.jsxs("div",{className:`boot-splash${a?" fading":""}`,"aria-hidden":"true",onAnimationEnd:o,children:[s.jsxs("div",{className:"boot-dial",children:[s.jsxs("svg",{className:"boot-ring",viewBox:"0 0 172 172",children:[s.jsx("circle",{cx:"86",cy:"86",r:"72",fill:"none",stroke:"var(--surface-3)",strokeWidth:"9"}),s.jsx("circle",{cx:"86",cy:"86",r:"50",fill:"none",stroke:"var(--line-2)",strokeWidth:"8",strokeDasharray:"1.2 5.3",opacity:".7"}),s.jsx("circle",{className:"boot-progress",cx:"86",cy:"86",r:"72",fill:"none",stroke:"var(--accent)",strokeWidth:"9",strokeLinecap:"round"})]}),s.jsxs("svg",{className:"boot-sprout",viewBox:"0 0 24 24",children:[s.jsx("path",{className:"bs-stem",d:"M12 21.5v-9",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",fill:"none"}),s.jsx("path",{className:"bs-leaf bs-leaf-main",d:"M12 13c0-4.5 3.2-7.5 7.5-7.5 0 4.5-3.2 7.5-7.5 7.5z",fill:"var(--accent)"}),s.jsx("path",{className:"bs-leaf bs-leaf-back",d:"M12 14.5c0-3.6-2.6-6-6-6 0 3.6 2.6 6 6 6z",fill:"var(--accent)",opacity:".42"}),s.jsx("circle",{cx:"12",cy:"12.4",r:"1.1",fill:"var(--bg)"})]})]}),s.jsxs("div",{className:"boot-status",children:[s.jsx("span",{children:"germinating harness"}),s.jsx("span",{className:"boot-caret"})]})]})}function $({label:e="Loading…"}){return s.jsxs("div",{className:"loading",role:"status",children:[e,s.jsxs("div",{className:"skel","aria-hidden":"true",children:[s.jsx("div",{className:"skel-bar"}),s.jsx("div",{className:"skel-bar"}),s.jsx("div",{className:"skel-bar"})]})]})}function _t({open:e,title:t,children:n,confirmLabel:i,onConfirm:a,onClose:r}){const o=l.useRef(null);return l.useEffect(()=>{const c=o.current;c&&(e&&!c.open&&(typeof c.showModal=="function"?c.showModal():c.setAttribute("open","")),!e&&c.open&&c.close())},[e]),s.jsxs("dialog",{ref:o,className:"confirm",onCancel:r,onClose:r,children:[s.jsx("h3",{className:"confirm-title",children:t}),s.jsx("div",{className:"confirm-body",children:n}),s.jsxs("div",{className:"confirm-actions",children:[s.jsx("button",{type:"button",className:"btn ghost",onClick:r,children:"Cancel"}),s.jsx("button",{type:"button",className:"btn",onClick:a,autoFocus:!0,children:i||"Confirm"})]})]})}const Ct={neutral:"Loaded & ready",imperial:"The Codex in force",military:"The unit stands ready",cyberpunk:"Jacked in",wizard:"Wards in place",pirate:"The crew stands ready",gamer:"Game loaded",sports:"The squad takes the field",biker:"The crew rolls out",commentator:"Lights out, away we go",verstappen:"Setup's in",joker:"Mic check",mean:"Rules are up",marvin:"Online. Reluctantly."},Ft=e=>e.deployed?Ct[e.theme]||"Loaded & ready":"Not deployed";function At({value:e,size:t=232}){const n=t/2-14,i=2*Math.PI*n,a=i*(1-e);return s.jsxs("div",{className:"ring-wrap",style:{width:t,height:t},children:[s.jsxs("svg",{viewBox:`0 0 ${t} ${t}`,children:[s.jsx("circle",{cx:t/2,cy:t/2,r:n,fill:"none",stroke:"var(--surface-3)",strokeWidth:"10"}),s.jsx("circle",{cx:t/2,cy:t/2,r:n,fill:"none",stroke:"var(--accent)",strokeWidth:"10",strokeLinecap:"round",strokeDasharray:i,strokeDashoffset:a,style:{transition:"stroke-dashoffset 1.1s cubic-bezier(.2,.7,.2,1)"}}),Array.from({length:48}).map((r,o)=>{const c=o/48*2*Math.PI,h=n-18,f=n-24,p=t/2+Math.cos(c)*h,d=t/2+Math.sin(c)*h,u=t/2+Math.cos(c)*f,m=t/2+Math.sin(c)*f;return s.jsx("line",{x1:p,y1:d,x2:u,y2:m,stroke:"var(--line-2)",strokeWidth:"1",opacity:o/48<e?.9:.25},o)})]}),s.jsxs("div",{className:"ring-center",children:[s.jsxs("div",{className:"pct",children:[Math.round(e*100),s.jsx("span",{style:{fontSize:20,color:"var(--text-3)"},children:"%"})]}),s.jsx("div",{className:"lbl",children:"germination"})]})]})}function Lt({overview:e}){const t=B(e.diff),n=e.counts||{},i=[{key:"agents",label:"Agents",hash:"#/agents"},{key:"skills",label:"Skills",hash:"#/skills"},{key:"laws",label:"Invariants",hash:"#/laws"}];return s.jsxs("div",{className:"card kpiband rise mb-16",children:[i.map(a=>{const r=n[a.key];return s.jsxs("a",{className:"kseg",href:a.hash,title:`Open ${a.label}`,children:[s.jsx("span",{className:"kseg-n"+(r===0?" zero":""),children:r??"—"}),s.jsx("span",{className:"kseg-l",children:a.label})]},a.key)}),s.jsx("div",{className:"kseg-spacer"}),s.jsxs("button",{className:"kseg"+(t>0?" hot":""),onClick:()=>R("#/diff"),title:"Open changes",children:[s.jsx("span",{className:"kseg-n"+(t===0?" zero":""),children:t}),s.jsx("span",{className:"kseg-l",children:"Local edits"}),t>0&&s.jsx("span",{className:"delta up",children:"▲"})]})]})}function Rt({overview:e}){return s.jsx("div",{className:"genome",children:C.map((t,n)=>{var r;const i=V[t],a=(r=e.counts)==null?void 0:r[t];return s.jsxs("div",{className:"card gcell rise",style:{animationDelay:`${n*50}ms`},onClick:()=>R("#/section/"+t),children:[s.jsxs("div",{className:"gtop",children:[s.jsx("span",{className:"gname",children:i.label}),s.jsx(S,{name:i.icon,className:"gicon"})]}),s.jsx("div",{className:"gcount"+(a===0?" zero":""),children:a??"—"}),s.jsx("div",{className:"gdesc",children:i.desc})]},t)})})}function se({jobs:e}){if(!e||e.length===0)return s.jsx("div",{className:"feed",children:s.jsxs("div",{className:"empty",children:[s.jsx("div",{className:"big",children:"No activity yet"}),"Actions you run appear here."]})});const t={done:"ok",running:"acc",failed:"bad"},n=[...e].sort((i,a)=>a.started-i.started).slice(0,8);return s.jsx("div",{className:"feed",children:n.map(i=>s.jsxs("div",{className:"feed-row",children:[s.jsx("span",{className:`feed-dot ${t[i.status]||"ok"}`}),s.jsx("span",{className:"feed-txt",children:s.jsx("b",{children:i.action})}),s.jsxs("span",{className:"feed-when",children:[je(i.started)," ago"]})]},i.id))})}function Tt({overview:e,sigil:t,setup:n,jobs:i,onAction:a}){const r=Ft(e),o=ve(e,n);return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"card pad-lg rise mb-16",children:s.jsxs("div",{className:"hero",children:[s.jsx(At,{value:o}),s.jsxs("div",{className:"hero-facts",children:[s.jsx("div",{className:"ttl",children:r}),t&&s.jsxs("div",{className:"voice-readout",children:[s.jsx("span",{className:"vr-cur",children:"▕"}),s.jsx("span",{className:"vr-txt",children:t})]},e.theme),s.jsxs("p",{className:"sub",children:["One source rendered into ",s.jsx("code",{children:e.target}),". Every repo on this machine inherits it."]}),s.jsxs("div",{className:"hero-chips",children:[s.jsxs("span",{className:"chip",children:[s.jsx("span",{className:"ck",children:"voice"}),s.jsx("span",{className:"cv",style:{textTransform:"capitalize"},children:e.theme})]}),s.jsxs("span",{className:"chip",children:[s.jsx("span",{className:"ck",children:"mode"}),s.jsx("span",{className:"cv",children:e.emit})]}),s.jsxs("span",{className:"chip",children:[s.jsx("span",{className:"ck",children:"footprint"}),s.jsx("span",{className:"cv",children:e.footprint})]}),s.jsxs("span",{className:"chip",children:[s.jsx("span",{className:"ck",children:"built"}),s.jsx("span",{className:"cv",children:e.build_time||"unknown"})]}),s.jsxs("span",{className:"chip",children:[s.jsx("span",{className:"ck",children:"fp"}),s.jsx("span",{className:"cv",children:(n==null?void 0:n.installed_fp)||"—"})]})]}),s.jsxs("div",{className:"row wrap gap-10",children:[s.jsxs("button",{className:"btn",onClick:()=>a("update"),children:[s.jsx(S,{name:"refresh"}),"Update"]}),s.jsxs("button",{className:"btn ghost",onClick:()=>a("build-all"),children:[s.jsx(S,{name:"build"}),"Rebuild"]}),s.jsxs("button",{className:"btn ghost",onClick:()=>a("doctor"),children:[s.jsx(S,{name:"doctor"}),"Run doctor"]})]})]})]})}),s.jsx(Lt,{overview:e}),s.jsxs("div",{className:"grid split-status",children:[s.jsxs("div",{className:"card pad-lg",children:[s.jsxs("div",{className:"card-head",children:[s.jsx("h3",{children:"Capability genome"}),s.jsx("div",{className:"right",children:s.jsxs("span",{className:"tick",children:[C.length," sections"]})})]}),s.jsx(Rt,{overview:e})]}),s.jsxs("div",{className:"card pad-lg",children:[s.jsxs("div",{className:"card-head",children:[s.jsx("h3",{children:"Recent activity"}),s.jsx("div",{className:"right",children:s.jsxs("span",{className:"badge acc",children:[s.jsx("span",{className:"dot"}),"live"]})})]}),s.jsx(se,{jobs:i})]})]})]})}function It({k:e,overview:t,max:n}){var r;const i=V[e],a=((r=t.counts)==null?void 0:r[e])??0;return s.jsxs("div",{className:"strand",onClick:()=>R("#/section/"+e),children:[s.jsxs("span",{className:"strand-name",children:[s.jsx("span",{className:"strand-dot"}),s.jsx("span",{children:i.label})]}),s.jsx("div",{className:"hbar",children:s.jsx("i",{style:{width:`${a/n*100}%`}})}),s.jsx("span",{className:"strand-val",children:a})]})}function Dt({overview:e,sigil:t,setup:n,jobs:i}){const a=ye(e.counts),r=(n==null?void 0:n.version_verdict)||"",o=r.includes("up to date"),c=B(e.diff),h=[["Source","src/, the canonical genetic material",(n==null?void 0:n.source_fp)||"—",!0],["Render",`geneseed build → ${e.emit}`,e.theme+" voice",!0],["Deployed",e.target,"inherited by every repo",!1]];return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"mb-16",children:s.jsxs("div",{className:"card pad-lg rise",style:{position:"relative",overflow:"hidden"},children:[s.jsx("h2",{className:"h",style:{fontSize:22,margin:"0 0 18px"},children:"Gene-seed lineage"}),s.jsxs("div",{className:"lineage-track",children:[s.jsx("div",{className:"spine"}),h.map(([f,p,d,u],m)=>s.jsxs("div",{className:"lineage-step",children:[s.jsx("span",{className:`node ${u?"on":""}`}),s.jsx("div",{className:"lt",children:f}),s.jsx("div",{className:"ld",children:p}),s.jsx("div",{className:"ltag",children:d})]},m))]}),s.jsx("hr",{className:"hr"}),t&&s.jsxs("div",{className:"voice-readout",style:{marginBottom:14},children:[s.jsx("span",{className:"vr-cur",children:"▕"}),s.jsx("span",{className:"vr-txt",children:t})]},e.theme),s.jsxs("div",{className:"row wrap gap-10",children:[s.jsxs("span",{className:`badge ${o?"ok":"warn"}`,children:[s.jsx("span",{className:"dot"}),"in sync · ",r]}),s.jsxs("span",{className:"badge",children:[s.jsx("span",{className:"dot"}),c," local edits"]})]})]})}),s.jsxs("div",{className:"grid split-even",children:[s.jsxs("div",{className:"card pad-lg",children:[s.jsxs("div",{className:"card-head",children:[s.jsx("h3",{children:"Genome strand"}),s.jsx("div",{className:"right",children:s.jsx("span",{className:"tick",children:"by volume"})})]}),C.map(f=>s.jsx(It,{k:f,overview:e,max:a},f))]}),s.jsxs("div",{className:"card pad-lg",children:[s.jsx("div",{className:"card-head",children:s.jsx("h3",{children:"Recent activity"})}),s.jsx(se,{jobs:i})]})]})]})}function Ot({overview:e,setup:t,jobs:n}){var h,f,p;const i=C.reduce((d,u)=>{var m;return d+(((m=e.counts)==null?void 0:m[u])??0)},0),a=ye(e.counts),r=(h=e.doctor)==null?void 0:h.ok,o=((p=(f=e.doctor)==null?void 0:f.problems)==null?void 0:p.length)??0,c=B(e.diff);return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"card pad-md rise mb-16",children:s.jsx("div",{className:"row wrap between gap-16",children:s.jsxs("div",{className:"row",style:{gap:20,flexWrap:"wrap"},children:[s.jsxs("div",{children:[s.jsx("div",{className:"tick",children:"status"}),s.jsx("div",{className:"row",style:{gap:8,marginTop:4},children:s.jsxs("span",{className:`badge ${e.deployed?"ok":"warn"}`,children:[s.jsx("span",{className:"dot"}),e.deployed?"deployed":"not deployed"]})})]}),s.jsxs("div",{children:[s.jsx("div",{className:"tick",children:"voice"}),s.jsx("div",{className:"metric",style:{fontSize:18,marginTop:6,textTransform:"capitalize"},children:e.theme})]}),s.jsxs("div",{children:[s.jsx("div",{className:"tick",children:"mode"}),s.jsx("div",{className:"mono",style:{fontSize:14,marginTop:6},children:e.emit})]}),s.jsxs("div",{children:[s.jsx("div",{className:"tick",children:"fingerprint"}),s.jsx("div",{className:"mono",style:{fontSize:14,marginTop:6,color:"var(--accent)"},children:(t==null?void 0:t.installed_fp)||"—"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"tick",children:"doctor"}),s.jsx("div",{className:"row",style:{gap:8,marginTop:4},children:r?s.jsxs("span",{className:"badge ok",children:[s.jsx("span",{className:"dot"}),"clean"]}):s.jsxs("span",{className:"badge warn",children:[s.jsx("span",{className:"dot"}),o," issue",o!==1?"s":""]})})]}),s.jsxs("div",{children:[s.jsx("div",{className:"tick",children:"edits"}),s.jsx("div",{className:"metric",style:{fontSize:18,marginTop:6},children:c})]})]})})}),s.jsxs("div",{className:"grid split-operator",children:[s.jsxs("div",{className:"card rise",style:{animationDelay:"60ms"},children:[s.jsxs("div",{className:"card-head pad-lg",style:{padding:"18px 20px 0",marginBottom:14},children:[s.jsx("h3",{children:"Sections"}),s.jsx("div",{className:"right",children:s.jsxs("span",{className:"tick",children:[i," entries total"]})})]}),s.jsxs("table",{className:"tbl",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"Section"}),s.jsx("th",{children:"Detail"}),s.jsx("th",{style:{width:130},children:"Share"}),s.jsx("th",{className:"num",children:"Count"})]})}),s.jsx("tbody",{children:C.map(d=>{var j;const u=V[d],m=((j=e.counts)==null?void 0:j[d])??0;return s.jsxs("tr",{className:"clickable",onClick:()=>R("#/section/"+d),children:[s.jsx("td",{className:"name",children:u.label}),s.jsx("td",{className:"muted",children:u.desc}),s.jsx("td",{children:s.jsx("div",{className:"hbar",children:s.jsx("i",{style:{width:`${m/a*100}%`}})})}),s.jsx("td",{className:"num",children:m})]},d)})})]})]}),s.jsxs("div",{className:"card pad-lg rise",style:{animationDelay:"120ms"},children:[s.jsx("div",{className:"card-head",children:s.jsx("h3",{children:"Run log"})}),s.jsx(se,{jobs:n})]})]})]})}function $t({error:e,style:t}){return e?s.jsx("p",{className:"badge bad",style:t,children:e}):null}function Pt({onAction:e}){var u,m,j,g,v;const{data:t,error:n}=ee(()=>w.themes(),[]),[i,a]=l.useState(""),[r,o]=l.useState("");if(n)return s.jsx($t,{error:n});if(!t)return s.jsx($,{});const c=i||((u=t.current)==null?void 0:u.theme)||"neutral",h=(m=t.emits)==null?void 0:m.some(x=>x.name==="opencode-global"),f=r||(h?"opencode-global":((j=t.current)==null?void 0:j.emit)||((v=(g=t.emits)==null?void 0:g[0])==null?void 0:v.name)||""),p=a,d=o;return s.jsxs("div",{className:"narrow-lg",children:[s.jsx("div",{className:"head-row mb-18",children:s.jsxs("div",{children:[s.jsx("h1",{className:"h",children:"Deploy your harness"}),s.jsx("p",{className:"sub",children:"Geneseed isn't implanted on this machine yet. Pick a voice and an install mode, then deploy. The graft runs in the console below, and this dashboard lights up when it lands."})]})}),s.jsxs("div",{className:"card pad-lg mb-16",children:[s.jsx("div",{className:"card-head",children:s.jsx("h3",{children:"1 · Choose a voice"})}),s.jsx("div",{className:"row wrap gap-10",children:t.themes.map(x=>s.jsxs("button",{className:`btn ${x.name===c?"soft":"ghost"}`,onClick:()=>p(x.name),title:x.blurb||x.tagline||x.name,children:[s.jsx("span",{className:"po",style:{width:10,height:10,borderRadius:"50%",background:P(x.accent),boxShadow:`0 0 8px ${P(x.accent)}`}}),s.jsx("span",{style:{textTransform:"capitalize"},children:x.name})]},x.name))})]}),s.jsxs("div",{className:"card pad-lg mb-16",children:[s.jsx("div",{className:"card-head",children:s.jsx("h3",{children:"2 · Install mode"})}),s.jsxs("p",{className:"sub mb-16",children:[s.jsx("code",{children:"opencode-global"})," deploys once to your global config so every repo on this machine inherits the harness (recommended). Other modes render into a chosen directory."]}),s.jsxs("label",{className:"stack",style:{gap:6,maxWidth:360},children:[s.jsx("span",{className:"tick",children:"Mode"}),s.jsx("select",{className:"sel",value:f,onChange:x=>d(x.target.value),children:t.emits.map(x=>s.jsxs("option",{value:x.name,children:[x.name,x.desc?` · ${x.desc}`:""]},x.name))})]})]}),s.jsxs("button",{className:"btn btn-grid",disabled:!f,onClick:()=>e("build",{theme:c,emit:f}),children:[s.jsx(S,{name:"build"}),"Deploy harness"]})]})}const Vt=l.lazy(()=>M(()=>import("./GreenhouseView-DfC5IILJ.js"),__vite__mapDeps([0,1,2]))),Bt=l.lazy(()=>M(()=>import("./OperatorHudView-DEpCtAjP.js"),__vite__mapDeps([3,1,2]))),Ht=l.lazy(()=>M(()=>import("./JournalView-Cpu2eI4s.js"),__vite__mapDeps([4,1,5])));function zt({overview:e,themes:t,setup:n,runs:i,onAction:a,flavour:r="a",layout:o="auto",dataRev:c}){var v;const h=Js(r,o),[f,p]=l.useState("status"),[d,u]=l.useState(null),[m,j]=l.useState(null),g=e&&((v=t.find(x=>x.name===e.theme))==null?void 0:v.sigil)||"";return l.useEffect(()=>{let x=!0;return(h==="greenhouse"||h==="operator")&&w.doctor().then(N=>x&&u(N)).catch(()=>{}),h==="journal"&&w.recent().then(N=>x&&j(N)).catch(()=>{}),()=>{x=!1}},[h,c]),e?e.deployed?f==="status"&&h==="journal"?s.jsx(l.Suspense,{fallback:s.jsx($,{}),children:s.jsx(Ht,{overview:e,recent:m,onAction:a,onDirection:p})}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"head-row",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"h",children:"Harness console"}),s.jsx("p",{className:"sub",children:"A live readout of the harness this machine carries. Its voice, its capabilities, its drift from source."})]}),s.jsx("div",{className:"seg",role:"group","aria-label":"Dashboard view",children:[["status","Status"],["lineage","Lineage"],["operator","Operator"]].map(([x,N])=>s.jsx("button",{className:f===x?"on":"",onClick:()=>p(x),"aria-pressed":f===x,children:N},x))})]}),f==="status"&&h==="cultivar"&&s.jsx(Tt,{overview:e,sigil:g,setup:n,jobs:i,onAction:a}),f==="status"&&h==="greenhouse"&&s.jsx(l.Suspense,{fallback:s.jsx($,{}),children:s.jsx(Vt,{overview:e,sigil:g,jobs:i,doctor:d,onAction:a})}),f==="status"&&h==="operator"&&s.jsx(l.Suspense,{fallback:s.jsx($,{}),children:s.jsx(Bt,{overview:e,jobs:i,doctor:d,onAction:a})}),f==="lineage"&&s.jsx(Dt,{overview:e,sigil:g,setup:n,jobs:i}),f==="operator"&&s.jsx(Ot,{overview:e,setup:n,jobs:i})]}):s.jsx(Pt,{onAction:a}):s.jsx("div",{className:"loading",children:"Loading…"})}const Ut=l.lazy(()=>M(()=>import("./Activity-BfVcLrda.js"),__vite__mapDeps([6,1,7]))),Wt=l.lazy(()=>M(()=>import("./ActivityDetail-CQXccGPl.js"),__vite__mapDeps([8,1,7]))),Zt=l.lazy(()=>M(()=>import("./Library-Dao3T9na.js"),__vite__mapDeps([9,1,10,11,12]))),Kt=l.lazy(()=>M(()=>import("./Laws-DDDVFuQz.js"),__vite__mapDeps([13,1,5,14,12]))),Gt=l.lazy(()=>M(()=>import("./Rules-DIre6gxR.js"),__vite__mapDeps([15,1]))),Yt=l.lazy(()=>M(()=>import("./Profile-BlXtUlh2.js"),__vite__mapDeps([16,1,10]))),qt=l.lazy(()=>M(()=>import("./Skills-rY13ZPhM.js"),__vite__mapDeps([17,1,10,11,14,12,5]))),Jt=l.lazy(()=>M(()=>import("./Diff-BIjxXx46.js"),__vite__mapDeps([18,1]))),Xt=l.lazy(()=>M(()=>import("./Doctor-CJLbgsrw.js"),__vite__mapDeps([19,1]))),Qt=l.lazy(()=>M(()=>import("./index-BEZvPvpF.js"),__vite__mapDeps([20,1]))),ea=l.lazy(()=>M(()=>import("./Harness-Dm5CCU-v.js"),__vite__mapDeps([21,1]))),sa=l.lazy(()=>M(()=>import("./index-PmQGRS1X.js"),__vite__mapDeps([22,1,10])));function ta(){const e=As(),t=e.view==="section",n=e.view==="item",i=e.view==="laws"||t&&e.section==="laws"||n&&e.type==="law",a=e.view==="skills"||t&&e.section==="skills"||n&&e.type==="skill",r=e.view==="library"||e.view==="agents"||(t||n)&&!i&&!a,o=e.view==="agents"?"agents":t?e.section:n?Ds[e.type]||e.type:void 0,c=n?e.name:void 0,[h,f]=l.useState(""),[p,d]=l.useState(null),[u,m]=l.useState(!1),[j,g]=l.useState(!1),[v,x]=$s(),[N,K]=zs(),[G,Ne]=Ks(),[te,ke]=Xs(),[we,Ee]=l.useState(()=>!window.sessionStorage.getItem("gs-booted")),[F,H]=l.useState(!1),Y=l.useRef(null),ae=l.useRef(null);l.useEffect(()=>{if(!F)return;const y=A=>{A.key==="Escape"&&H(!1)};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[F]),l.useEffect(()=>{var O;if(!F)return;const y=ae.current,A=document.activeElement;return y&&(y.inert=!0),(O=document.getElementById("rail-nav"))==null||O.focus(),()=>{y&&(y.inert=!1),A instanceof HTMLElement&&A.focus()}},[F]);const ne=y=>{var A,O;return d({kind:((A=y==null?void 0:y.body)==null?void 0:A.kind)||"err",msg:((O=y==null?void 0:y.body)==null?void 0:O.message)||y.message})},{overview:b,themes:q,reload:ie}=Qs(ne),[_,Me]=l.useState(0),J=()=>{ie(),Me(y=>y+1)},{runs:z,activeId:Se,consoleOpen:_e,setConsoleOpen:Ce,runAction:T,cancelJob:Fe,clearRuns:Ae}=at({onFinish:J,onError:ne}),{data:re}=ee(()=>w.setup().catch(()=>null),[_],"setup"),D=z[z.length-1],Le=D?D.status==="running"?`${D.action} running`:`${D.action} ${D.status}`:"";l.useEffect(()=>{const y=Y.current;y&&(G==="curated"&&Is(y,N,v)||b!=null&&b.accent&&Rs(y,b.accent,v))},[b,v,G,N]);const[Re,X]=l.useState(!1),Te=async()=>{X(!1);try{await w.shutdown()}catch{}g(!0)};return j?s.jsxs("div",{className:`app fl-${N} ${v==="light"?"light":""}`,ref:Y,children:[s.jsx("div",{className:"atmos","aria-hidden":"true"}),s.jsx("div",{className:"page",style:{display:"grid",placeItems:"center"},children:s.jsxs("p",{className:"sub",style:{textAlign:"center",maxWidth:480},children:["Server stopped. You can close this tab and reopen any time with"," ",s.jsx("code",{children:"geneseed web"}),"."]})})]}):s.jsxs("div",{className:`app fl-${N} ${v==="light"?"light":""}${F?" nav-open":""}`,ref:Y,children:[s.jsx("div",{className:"atmos","aria-hidden":"true"}),s.jsx("a",{className:"skip-link",href:"#main",children:"Skip to content"}),s.jsx("p",{className:"sr-only",role:"status","aria-live":"polite",children:Le}),F&&s.jsx("button",{type:"button",className:"nav-scrim","aria-label":"Close navigation",onClick:()=>H(!1)}),s.jsx(ht,{route:e,overview:b,setup:re,onOpenVoice:()=>m(y=>!y),onNavigate:()=>H(!1)}),u&&s.jsx(bt,{themes:q,current:b==null?void 0:b.theme,onPick:y=>{m(!1),T("build",{theme:y,emit:b==null?void 0:b.emit})},onClose:()=>m(!1)}),s.jsxs("div",{className:"col",ref:ae,children:[s.jsx(yt,{route:e,navOpen:F,onToggleNav:()=>H(y=>!y),target:b==null?void 0:b.target,version:b==null?void 0:b.version,query:h,onQuery:f,mode:v,onToggleMode:x,onShutdown:()=>X(!0),dataRev:_,onSwitch:J}),s.jsx("main",{className:"page",id:"main",tabIndex:-1,children:s.jsx("div",{className:e.view==="harness"?"pad pad-wide":"pad",children:s.jsxs(l.Suspense,{fallback:s.jsx($,{}),children:[e.view==="dashboard"&&s.jsx(zt,{overview:b,themes:q,setup:re,runs:z,onAction:T,flavour:N,layout:te,dataRev:_}),e.view==="activity"&&s.jsx(Ut,{}),e.view==="activity-detail"&&s.jsx(Wt,{sid:e.sid},e.sid),i&&s.jsx(Kt,{selected:c,overview:b,onAction:T,dataRev:_}),a&&s.jsx(qt,{selected:c,dataRev:_}),r&&s.jsx(Zt,{overview:b,section:o,selected:c,dataRev:_}),e.view==="rules"&&s.jsx(Gt,{}),e.view==="profile"&&s.jsx(Yt,{}),e.view==="diff"&&s.jsx(Jt,{onMutated:ie,dataRev:_}),e.view==="doctor"&&s.jsx(Xt,{}),e.view==="settings"&&s.jsx(Qt,{overview:b,onAction:T,flavour:N,onFlavour:K,accentMode:G,onAccentMode:Ne,layout:te,onLayout:ke}),e.view==="harness"&&s.jsx(ea,{onAction:T,themes:q,currentTheme:b==null?void 0:b.theme,overview:b,dataRev:_,onMutated:J}),e.view==="docs"&&s.jsx(sa,{page:e.page,query:h,onAction:T,overview:b})]})})}),s.jsx(wt,{runs:z,open:_e,busy:!!Se,onToggle:()=>Ce(y=>!y),onClear:Ae,onCancel:Fe})]}),s.jsxs(_t,{open:Re,title:"Stop the server?",confirmLabel:"Stop server",onConfirm:Te,onClose:()=>X(!1),children:["The console goes offline until you start it again with ",s.jsx("code",{children:"geneseed web"}),"."]}),p&&s.jsx(kt,{toast:p,onClose:()=>d(null)}),we&&s.jsx(St,{ready:!!b,onDone:()=>{window.sessionStorage.setItem("gs-booted","1"),Ee(!1)}})]})}Ie(document.getElementById("root")).render(s.jsx(ta,{}));"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").catch(()=>{})});export{Ws as A,$t as E,Vs as F,S as I,$ as L,et as R,V as S,w as a,na as b,ia as c,Ys as d,qs as e,Z as f,R as g,Ft as h,B as i,s as j,C as k,ra as l,je as r,ee as u,oe as w};