@uniqbit/mate-core 1.0.0-canary.2 → 1.0.0-canary.5

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 (189) hide show
  1. package/claude-capability-plugins/companion-mentions/.claude-plugin/plugin.json +1 -1
  2. package/claude-plugin/hooks/hooks.json +21 -1
  3. package/claude-plugin/hooks/session-attention.mjs +10 -0
  4. package/claude-plugin/hooks/session-end.mjs +9 -0
  5. package/claude-plugin/hooks/session-guidance.mjs +1 -1
  6. package/opencode-plugin/src/server.ts +13 -2
  7. package/opencode-plugin/src/tui.tsx +1 -1
  8. package/opencode-plugin/tui.tsx +2 -1
  9. package/package.json +1 -1
  10. package/src/cli/commands/artifact/delivery/archive.ts +2 -2
  11. package/src/cli/commands/artifact/delivery/link.ts +22 -5
  12. package/src/cli/commands/artifact/delivery/output.ts +9 -1
  13. package/src/cli/commands/artifact/finish/openspec.ts +1 -3
  14. package/src/cli/commands/companion/companion.ts +1 -1
  15. package/src/cli/commands/companion/link.ts +36 -4
  16. package/src/cli/commands/companion/open.ts +40 -12
  17. package/src/cli/commands/doctor.ts +122 -0
  18. package/src/cli/commands/session/prepare.ts +32 -4
  19. package/src/cli/commands/session/registry.ts +90 -0
  20. package/src/cli/commands/studio/companion-removal.ts +79 -0
  21. package/src/cli/commands/studio/mate-inventory.ts +1 -1
  22. package/src/cli/commands/studio/payload.ts +12 -1
  23. package/src/cli/commands/studio/server.ts +39 -16
  24. package/src/cli/commands/studio/services.ts +20 -0
  25. package/src/cli/commands/studio/skill-files.ts +133 -0
  26. package/src/cli/commands/studio/vault.ts +218 -44
  27. package/src/cli/commands/studio/views/model.ts +0 -5
  28. package/src/cli/commands/studio/views/vault/markdown-tree.ts +255 -4
  29. package/src/cli/commands/unwrap.ts +8 -0
  30. package/src/cli/commands/update.ts +26 -8
  31. package/src/cli/commands/vscode/setup.ts +155 -0
  32. package/src/cli/commands/vscode/vsix.ts +73 -0
  33. package/src/cli/commands/working/cleanup.ts +34 -10
  34. package/src/cli/commands/working/worktree.ts +58 -8
  35. package/src/cli/commands/wrap.ts +33 -7
  36. package/src/cli/main.ts +9 -2
  37. package/src/cli/usage.ts +6 -1
  38. package/src/hooks/companion-instructions.ts +19 -11
  39. package/src/hooks/hook-io.ts +15 -0
  40. package/src/hooks/session-banner.ts +5 -3
  41. package/src/hooks/session-end.ts +10 -0
  42. package/src/hooks/session-guidance.ts +10 -6
  43. package/src/hooks/session-prepare.ts +47 -31
  44. package/src/hooks/session-register.ts +199 -0
  45. package/src/hooks/tokensave-route.ts +7 -3
  46. package/src/hooks/validate-artifact-path.ts +9 -2
  47. package/src/lib/delivery/archive-change.ts +0 -1
  48. package/src/lib/delivery/branches.ts +15 -0
  49. package/src/lib/delivery/record-delivery.ts +94 -39
  50. package/src/lib/delivery/record.ts +30 -28
  51. package/src/lib/delivery/refresh.ts +37 -17
  52. package/src/lib/delivery/resolve-branch.ts +258 -37
  53. package/src/lib/factory/outcomes/index.ts +11 -1
  54. package/src/lib/factory/runtime.ts +10 -1
  55. package/src/lib/opencode-server.ts +238 -0
  56. package/src/lib/orchestrator/adapters/claude.ts +147 -2
  57. package/src/lib/orchestrator/adapters/opencode.ts +53 -2
  58. package/src/lib/orchestrator/checkout-adoption.ts +125 -0
  59. package/src/lib/orchestrator/companion-registry-store.ts +6 -2
  60. package/src/lib/orchestrator/editor.ts +2 -2
  61. package/src/lib/orchestrator/framework-context.ts +26 -14
  62. package/src/lib/orchestrator/global-config-store.ts +11 -0
  63. package/src/lib/orchestrator/launcher.ts +15 -2
  64. package/src/lib/orchestrator/projection-claude-links.ts +52 -5
  65. package/src/lib/orchestrator/projection-claude-skills.ts +28 -2
  66. package/src/lib/orchestrator/projection-companion-link.ts +12 -1
  67. package/src/lib/orchestrator/registry-checkouts.ts +177 -0
  68. package/src/lib/orchestrator/repository-link.ts +216 -57
  69. package/src/lib/orchestrator/serving-claude-wrap.ts +43 -0
  70. package/src/lib/orchestrator/session-context-link.ts +11 -5
  71. package/src/lib/orchestrator/session-prepare.ts +36 -6
  72. package/src/lib/orchestrator/types.ts +5 -0
  73. package/src/lib/orchestrator/workspace-inventory.ts +5 -1
  74. package/src/lib/public-npm.ts +17 -0
  75. package/src/lib/session-attribution.ts +52 -0
  76. package/src/lib/session-state.ts +285 -0
  77. package/src/lib/session-stop.ts +64 -0
  78. package/src/lib/workset/record.ts +20 -0
  79. package/src/lib/workset/worktree.ts +85 -17
  80. package/src/opencode/background-server.ts +145 -0
  81. package/src/opencode/companion-hooks.ts +3 -1
  82. package/src/opencode/companion-policy.ts +2 -2
  83. package/src/opencode/projected-guidance.ts +2 -1
  84. package/src/opencode/session-register.ts +176 -0
  85. package/src/opencode/tui.tsx +19 -29
  86. package/src/runtime/claude-delivery-plan.ts +14 -3
  87. package/src/runtime/current-branch.ts +10 -0
  88. package/src/runtime/env.ts +13 -7
  89. package/src/runtime/git-layout.ts +164 -17
  90. package/src/runtime/launch-env-guard.ts +65 -0
  91. package/src/runtime/opencode-server-record.ts +136 -0
  92. package/src/runtime/projection.ts +40 -6
  93. package/src/runtime/repo-local.ts +6 -1
  94. package/src/runtime/serving-claude-wrap.ts +28 -0
  95. package/src/runtime/session-context.ts +4 -3
  96. package/src/runtime/session-registry.ts +434 -0
  97. package/src/runtime/tokensave-route.ts +10 -5
  98. package/src/runtime/wrap-state.ts +31 -0
  99. package/src/studio.ts +2 -0
  100. package/src/templates/mate-skills/agents/mate-apply-change/SKILL.md +49 -21
  101. package/src/templates/mate-skills/agents/mate-archive-change/SKILL.md +0 -5
  102. package/src/templates/mate-skills/agents/mate-propose-change/SKILL.md +2 -8
  103. package/src/templates/mate-skills/agents/mate-propose-change/references/mate-revise.md +1 -3
  104. package/src/templates/mate-skills/agents/mate-publish-artifact/SKILL.md +2 -4
  105. package/src/templates/mate-skills/claude/mate-apply-change/SKILL.md +49 -21
  106. package/src/templates/mate-skills/claude/mate-archive-change/SKILL.md +0 -5
  107. package/src/templates/mate-skills/claude/mate-propose-change/SKILL.md +2 -8
  108. package/src/templates/mate-skills/claude/mate-propose-change/references/mate-revise.md +1 -3
  109. package/src/templates/mate-skills/claude/mate-publish-artifact/SKILL.md +2 -4
  110. package/src/tools/setup/__snapshots__/runtime-surface-golden.test.ts.snap +404 -30
  111. package/src/tools/setup/dynamic-plugins/hydrate.ts +4 -3
  112. package/src/tools/setup/providers/claude-plugin-hooks.ts +26 -0
  113. package/src/tools/setup/providers/claude.ts +21 -1
  114. package/studio-dist/client/assets/app-CdPiFv59.css +2 -0
  115. package/studio-dist/client/assets/button-BIIHE0EQ.js +3 -0
  116. package/studio-dist/client/assets/companion-view-DM6YyXaR.js +1 -0
  117. package/studio-dist/client/assets/delivery-path-DELxj0Av.js +1 -0
  118. package/studio-dist/client/assets/factory-BZy0E8ty.js +4 -0
  119. package/studio-dist/client/assets/index-B3wkMzjA.js +40 -0
  120. package/studio-dist/client/assets/markdown-view-pQ2Qp_i5.js +1 -0
  121. package/studio-dist/client/assets/panel-CbajlC3p.js +1 -0
  122. package/studio-dist/client/assets/{prepaint-CD5OpmTM.js → prepaint-CwSrpdFA.js} +7 -4
  123. package/studio-dist/client/assets/react-CN2GSx7x.js +1 -0
  124. package/studio-dist/client/assets/reports-DllhYQ5_.js +1 -0
  125. package/studio-dist/client/assets/routes-COm-G3mK.js +1 -0
  126. package/studio-dist/client/assets/skills-DmWAy-jZ.js +1 -0
  127. package/studio-dist/client/assets/specs-BG3Wi3ln.js +1 -0
  128. package/studio-dist/client/assets/steps-DFsH3Neu.js +1 -0
  129. package/studio-dist/client/assets/vault-B2q1nBY5.js +1 -0
  130. package/studio-dist/client/assets/warnings-BSXIyuSQ.js +1 -0
  131. package/studio-dist/client/assets/workflow-DlsQD6Hc.js +1 -0
  132. package/studio-dist/server/assets/{__23tanstack-start-server-fn-resolver-BQKuMdJW.js → __23tanstack-start-server-fn-resolver-M2GBs8s3.js} +179 -9
  133. package/studio-dist/server/assets/_tanstack-start-manifest_v.js +35 -25
  134. package/studio-dist/server/assets/button-CIJqAhni.js +11929 -0
  135. package/studio-dist/server/assets/{companion-view-aBady57v.js → companion-view-DISASvdJ.js} +13 -7
  136. package/studio-dist/server/assets/companions-BYbHWKOZ.js +15 -0
  137. package/studio-dist/server/assets/delivery-path-C29fBynY.js +654 -0
  138. package/studio-dist/server/assets/{factory-DT3UzHlh.js → factory-DGPmNGbo.js} +1 -0
  139. package/studio-dist/server/assets/{factory-D6xnjedJ.js → factory-DUTa0eDs.js} +317 -530
  140. package/studio-dist/server/assets/markdown-view-Bn7xPdks.js +86 -0
  141. package/studio-dist/server/assets/panel-3Jmn4awF.js +169 -0
  142. package/studio-dist/server/assets/{prepaint-BMke0fo1.js → prepaint-DJfTQ_VH.js} +6 -2
  143. package/studio-dist/server/assets/{react-COs0LHn-.js → react-Ce6dj15C.js} +4 -9
  144. package/studio-dist/server/assets/reports-C06RXVE2.js +18 -0
  145. package/studio-dist/server/assets/reports-D6YMqhnO.js +142 -0
  146. package/studio-dist/server/assets/router-C8MGqlAY.js +13713 -0
  147. package/studio-dist/server/assets/routes-BcFgvqf7.js +622 -0
  148. package/studio-dist/server/assets/{shell-CboT2f66.js → shell-DS3wUexh.js} +1 -0
  149. package/studio-dist/server/assets/skills-BEnOxiDl.js +266 -0
  150. package/studio-dist/server/assets/skills-CtrBAtX3.js +28 -0
  151. package/studio-dist/server/assets/specs-C8rv34-5.js +211 -0
  152. package/studio-dist/server/assets/{start-BW5ovN0k.js → start-h3ICWwd2.js} +4 -1
  153. package/studio-dist/server/assets/steps-Dq_CwY_s.js +181 -0
  154. package/studio-dist/server/assets/{vault-BGulVoNh.js → vault-BmWnryh3.js} +16 -1
  155. package/studio-dist/server/assets/vault-Fvxt2Tzl.js +1032 -0
  156. package/studio-dist/server/assets/{views-Bd7cRr27.js → views-BgYa-za2.js} +1 -3
  157. package/studio-dist/server/assets/warnings-DzR6fyZh.js +23 -0
  158. package/studio-dist/server/assets/workflow-liRYecHk.js +73 -0
  159. package/studio-dist/server/server.js +3 -157
  160. package/studio-dist/client/assets/companion-view-Csva26Ir.js +0 -1
  161. package/studio-dist/client/assets/delivery-path-DJMpRmiY.js +0 -1
  162. package/studio-dist/client/assets/factory-B7l9ZQyx.js +0 -4
  163. package/studio-dist/client/assets/index-n6uo_92S.js +0 -40
  164. package/studio-dist/client/assets/queries-CN3JwMBX.js +0 -1
  165. package/studio-dist/client/assets/react-CabXf2Ds.js +0 -1
  166. package/studio-dist/client/assets/report-time-Dc-KOqQu.js +0 -1
  167. package/studio-dist/client/assets/reports-C01RsnMA.js +0 -1
  168. package/studio-dist/client/assets/routes-4pbC-2Hj.js +0 -1
  169. package/studio-dist/client/assets/skills-CihQganl.js +0 -1
  170. package/studio-dist/client/assets/spec-areas-C2L48N4C.js +0 -1
  171. package/studio-dist/client/assets/specs-D24_35_K.js +0 -1
  172. package/studio-dist/client/assets/studio-DKxfi691.css +0 -1
  173. package/studio-dist/client/assets/studio-queries-rvbJupCy.js +0 -3
  174. package/studio-dist/client/assets/vault-Bd4CQiTK.js +0 -1
  175. package/studio-dist/client/assets/warnings-V_Ys51wJ.js +0 -1
  176. package/studio-dist/client/assets/workflow-BJejeVwQ.js +0 -1
  177. package/studio-dist/server/assets/delivery-path-BkKNjgkf.js +0 -778
  178. package/studio-dist/server/assets/queries-Ag2iL8q2.js +0 -107
  179. package/studio-dist/server/assets/report-time-DAfzln-N.js +0 -8
  180. package/studio-dist/server/assets/reports-BnUNJVtx.js +0 -126
  181. package/studio-dist/server/assets/router-BH--drIx.js +0 -4298
  182. package/studio-dist/server/assets/routes-khSDK1bV.js +0 -361
  183. package/studio-dist/server/assets/skills-MWYnWoKs.js +0 -106
  184. package/studio-dist/server/assets/spec-areas-DcnO6vW-.js +0 -16
  185. package/studio-dist/server/assets/specs-DE3w8hZP.js +0 -155
  186. package/studio-dist/server/assets/studio-queries-CLnP9kGu.js +0 -3365
  187. package/studio-dist/server/assets/vault-CuyyhLyB.js +0 -832
  188. package/studio-dist/server/assets/warnings-BH05rOuG.js +0 -15
  189. package/studio-dist/server/assets/workflow-BSuIKWqH.js +0 -42
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{Na as t,da as n,ia as r}from"./button-BIIHE0EQ.js";var i=e(t(),1),a=n(),o=new Set(`h1.h2.h3.h4.h5.h6.p.pre.code.span.blockquote.hr.ol.ul.li.div.dl.dt.dd.table.thead.tbody.tr.th.td.strong.em.del.br`.split(`.`));function s(e,t){let n=e.c?.map(c),{a:s}=e;return e.t===`a`?s?.note?(0,a.jsx)(r,{to:`/vault`,search:e=>({...e,path:s.note,dir:void 0,mode:void 0}),"data-vault-entry":s.note,children:n},t):s?.href&&/^https?:\/\//i.test(s.href)?(0,a.jsx)(`a`,{href:s.href,target:`_blank`,rel:`noopener noreferrer`,children:n},t):(0,a.jsx)(`span`,{children:n},t):e.t===`input`?(0,a.jsx)(`input`,{type:`checkbox`,checked:!!s?.checked,disabled:!0,readOnly:!0,"aria-label":`Task`},t):o.has(e.t)?(0,i.createElement)(e.t,{key:t,className:s?.className,start:s?.start,style:s?.align?{textAlign:s.align}:void 0},n&&n.length>0?n:void 0):(0,a.jsx)(`span`,{children:n},t)}function c(e,t){return typeof e==`string`?e:s(e,t)}function l({nodes:e}){return(0,a.jsx)(`div`,{className:`markdown-body`,children:e.map(c)})}export{l as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{Ar as t,Na as n,da as r,r as i,t as a}from"./button-BIIHE0EQ.js";import{A as o,D as s,M as c,N as l,O as u,P as d,j as f,k as p}from"./index-B3wkMzjA.js";var m=e(n(),1),h=r();function g(e){return(0,h.jsx)(o,{"data-slot":`sheet`,...e})}var _=l;function v({className:e,wide:n=!1,...r}){return(0,h.jsxs)(f,{children:[(0,h.jsx)(d,{"data-slot":`sheet-overlay`,className:`fixed inset-0 z-30 bg-[color-mix(in_srgb,var(--bg)_45%,transparent)] transition-opacity duration-200 data-ending-style:opacity-0 data-starting-style:opacity-0`}),(0,h.jsx)(c,{"data-slot":`sheet-content`,"data-wide":n?``:void 0,className:t(`fixed top-2 right-2 bottom-2 z-30 flex w-[min(560px,calc(100vw-16px))] flex-col overflow-hidden rounded-panel border border-rule bg-surface text-text shadow-float outline-none transition-[transform,width] duration-250 ease-[cubic-bezier(.16,1,.3,1)] data-ending-style:translate-x-[calc(100%+16px)] data-starting-style:translate-x-[calc(100%+16px)] data-wide:w-[min(760px,calc(100vw-16px))]`,e),...r})]})}function y({className:e,...n}){return(0,h.jsx)(p,{"data-slot":`sheet-title`,className:t(`m-0 text-lg font-semibold break-words`,e),...n})}function b({items:e,current:t,onSelect:n,pass:r,wide:o,title:c,children:l}){let d=(0,m.useRef)(null),f=t!==null,p=t===null?-1:e.indexOf(t),b=p>0?e[p-1]:void 0,x=p>=0&&p<e.length-1?e[p+1]:void 0;(0,m.useEffect)(()=>{let e=e=>{let t=e.target;t?.closest&&!t.closest(`[data-slot=sheet-content]`)&&(d.current=t)};return document.addEventListener(`focusin`,e),()=>document.removeEventListener(`focusin`,e)},[]);let S=(0,m.useEffectEvent)(e=>{if(e.metaKey||e.ctrlKey||e.altKey||s(e.target))return;let t=e.key===`ArrowRight`?x:e.key===`ArrowLeft`?b:void 0;t!==void 0&&(e.preventDefault(),n(t))});return(0,m.useEffect)(()=>{if(!f)return;let e=e=>S(e);return document.addEventListener(`keydown`,e,!0),()=>document.removeEventListener(`keydown`,e,!0)},[f]),(0,h.jsx)(g,{open:f,onOpenChange:e=>{e||n(null)},children:(0,h.jsxs)(v,{wide:o,"aria-label":c,finalFocus:()=>!d.current?.isConnected||d.current,initialFocus:()=>document.getElementById(`side-panel-close`),children:[(0,h.jsx)(y,{className:`sr-only`,children:c}),(0,h.jsxs)(`div`,{className:`flex items-center gap-1.5 border-b border-rule py-2.5 pr-3 pl-5`,children:[(0,h.jsxs)(`span`,{className:`mr-auto font-mono text-xs text-muted`,"aria-live":`polite`,children:[p>=0?`${p+1} of ${e.length}`:null,r?` · ${r}`:null]}),(0,h.jsx)(a,{size:`icon-sm`,variant:`ghost`,"aria-label":`Previous`,disabled:b===void 0,onClick:()=>b!==void 0&&n(b),children:(0,h.jsx)(i,{name:`left`})}),(0,h.jsx)(a,{size:`icon-sm`,variant:`ghost`,"aria-label":`Next`,disabled:x===void 0,onClick:()=>x!==void 0&&n(x),children:(0,h.jsx)(i,{name:`right`})}),(0,h.jsx)(_,{id:`side-panel-close`,render:(0,h.jsx)(a,{size:`icon-sm`,variant:`ghost`,"aria-label":`Close`}),children:(0,h.jsx)(i,{name:`close`})})]}),(0,h.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-auto`,children:l}),(0,h.jsxs)(`div`,{className:`flex gap-3.5 border-t border-rule px-5 py-2.5 text-2xs text-muted max-sm:hidden`,children:[(0,h.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,h.jsx)(u,{children:`←`}),(0,h.jsx)(u,{children:`→`}),` previous, next`]}),(0,h.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,h.jsx)(u,{children:`esc`}),` close`]})]})]})})}function x({kicker:e,title:t,mono:n=!1,children:r}){return(0,h.jsxs)(`div`,{className:`grid gap-1.5 border-b border-rule px-5 pt-4 pb-3.5`,children:[e?(0,h.jsx)(`div`,{className:`flex items-center gap-2 text-xs text-muted`,children:e}):null,(0,h.jsx)(`h2`,{className:n?`m-0 font-mono text-md font-semibold break-words`:`m-0 text-lg font-semibold`,children:t}),r]})}function S({title:e,aside:t,children:n}){return(0,h.jsxs)(`section`,{className:`grid gap-2.5 border-b border-rule-soft px-5 py-4`,"aria-label":e,children:[(0,h.jsxs)(`h3`,{className:`m-0 flex items-center gap-2 text-sm font-semibold`,children:[e,t?(0,h.jsx)(`span`,{className:`ml-auto font-mono text-2xs font-normal text-muted`,children:t}):null]}),n]})}export{_ as a,g as i,S as n,v as o,b as r,y as s,x as t};
@@ -1,4 +1,4 @@
1
- import{L as e,R as t}from"./studio-queries-rvbJupCy.js";var n=`mate-studio-theme`,r=`mate-studio-companion`,i=`mate-studio-vault-tree`,a=`(function () {
1
+ import{bi as e,yi as t}from"./button-BIIHE0EQ.js";var n=`mate-studio-theme`,r=`mate-studio-companion`,i=`mate-studio-vault-tree`,a=`mate-studio-rail`,o=`(function () {
2
2
  try {
3
3
  var chosen = localStorage.getItem(${JSON.stringify(n)});
4
4
  if (chosen === "dark" || chosen === "light") {
@@ -7,6 +7,9 @@ import{L as e,R as t}from"./studio-queries-rvbJupCy.js";var n=`mate-studio-theme
7
7
  if (localStorage.getItem(${JSON.stringify(i)}) === "hidden") {
8
8
  document.documentElement.setAttribute("data-vault-tree", "hidden");
9
9
  }
10
+ if (localStorage.getItem(${JSON.stringify(a)}) === "min") {
11
+ document.documentElement.setAttribute("data-rail", "min");
12
+ }
10
13
  } catch (error) {
11
14
  /* a blocked web store only costs the preference, never the page */
12
15
  }
@@ -14,11 +17,11 @@ import{L as e,R as t}from"./studio-queries-rvbJupCy.js";var n=`mate-studio-theme
14
17
  try {
15
18
  var params = new URLSearchParams(location.search);
16
19
  var last = localStorage.getItem(${JSON.stringify(r)});
17
- if (!params.has(${JSON.stringify(t)}) && ${String(e)}.test(last || "")) {
18
- params.set(${JSON.stringify(t)}, last);
20
+ if (!params.has(${JSON.stringify(e)}) && ${String(t)}.test(last || "")) {
21
+ params.set(${JSON.stringify(e)}, last);
19
22
  location.replace(location.pathname + "?" + params.toString());
20
23
  }
21
24
  } catch (error) {
22
25
  /* a blocked web store only costs the restore, never the page */
23
26
  }
24
- })();`;export{i,a as n,n as r,r as t};
27
+ })();`;export{i as a,n as i,a as n,o as r,r as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{Na as t}from"./button-BIIHE0EQ.js";var n=e(t(),1),r=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},i=(e=>e?r(e):r),a=e=>e;function o(e,t=a){let r=n.useSyncExternalStore(e.subscribe,n.useCallback(()=>t(e.getState()),[e,t]),()=>t(e.getInitialState()));return n.useDebugValue(r),r}var s=e=>{let t=i(e),n=e=>o(t,e);return Object.assign(n,t),n},c=(e=>e?s(e):s);export{c as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{Ar as t,Hr as n,Na as r,da as i,ki as a,la as o,nt as s,oa as c,r as l,rt as u,sa as d,st as f,tt as p,ui as m}from"./button-BIIHE0EQ.js";import{r as h,t as g}from"./panel-CbajlC3p.js";import{F as _,L as v,a as y}from"./index-B3wkMzjA.js";function b(e){let t=o();return d(t.stores.location,c(e,t))}var x=e(r(),1),S=e=>String(e).padStart(2,`0`);function C(e){let t=new Date(e);return`${t.getFullYear()}-${S(t.getMonth()+1)}-${S(t.getDate())} ${S(t.getHours())}:${S(t.getMinutes())}`}var w=i(),T=/(?:^|[#&])report=([0-9a-f]{32})/;function E(e,t){let n=t===`system`?``:`?scheme=${t}`;return`${m}${e}${n}`}function D(e){try{let t=`${location.pathname}${location.search}${e?`#report=${e}`:``}`;history.replaceState(history.state,``,t)}catch{}}function O({report:e,src:t}){return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(g,{title:e.title,kicker:(0,w.jsx)(`span`,{children:C(e.createdAt)}),children:(0,w.jsxs)(`a`,{id:`reports-open`,className:`inline-flex items-center gap-1.5 text-sm`,href:t,target:`_blank`,rel:`noopener noreferrer`,children:[(0,w.jsx)(l,{name:`external`,className:`size-3.5`}),` Open in new tab`]})}),(0,w.jsx)(`iframe`,{id:`reports-frame`,className:`min-h-0 w-full flex-1 border-0 bg-page`,title:`Hosted report`,sandbox:`allow-scripts allow-modals`,referrerPolicy:`no-referrer`,src:t},t)]})}function k({companion:e}){let r=a(n(e)),i=_(e=>e.theme),o=v(e=>e.clearReports),c=T.exec(b({select:e=>`#${e.hash}`}))?.[1],[l,d]=(0,x.useState)(void 0);(0,x.useEffect)(o,[o]);let m=r.data??[],g=l===void 0?c??null:l,y=m.find(e=>e.id===g)??null,S=e=>{d(e),D(e)},k=y?E(y.id,i):null;return(0,w.jsxs)(`section`,{className:t(u,`grid content-start gap-3 pb-10`),"data-reports-view":!0,"aria-label":`Hosted reports`,children:[m.length===0?(0,w.jsx)(p,{children:(0,w.jsx)(`span`,{id:`reports-empty`,children:`No hosted reports yet.`})}):(0,w.jsx)(s,{title:`Reports`,count:m.length,hint:`Newest first`,children:(0,w.jsx)(`ul`,{id:`reports-list`,className:`m-0 list-none p-0`,"aria-label":`Reports`,children:m.map(e=>(0,w.jsx)(`li`,{children:(0,w.jsxs)(`button`,{type:`button`,className:t(f,`grid grid-cols-[minmax(0,1fr)_auto]`),"data-report-id":e.id,"aria-current":e.id===y?.id?`true`:void 0,onClick:()=>S(e.id),children:[(0,w.jsx)(`span`,{className:`truncate text-sm`,"data-report-title":!0,children:e.title}),(0,w.jsx)(`span`,{className:`font-mono text-xs text-muted`,"data-report-time":!0,children:C(e.createdAt)})]})},e.id))})}),(0,w.jsx)(h,{items:m.map(e=>e.id),current:y?.id??null,onSelect:S,wide:!0,title:y?`Report ${y.title}`:`Report`,children:y&&k?(0,w.jsx)(O,{report:y,src:k}):null})]})}var A=function(){let{companion:e}=y.useSearch();return e?(0,w.jsx)(k,{companion:e}):null};export{A as component};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{t}from"./companion-view-DM6YyXaR.js";import{$ as n,Ar as r,Gr as i,Na as a,Q as o,aa as s,at as c,ct as l,da as u,et as d,ia as f,ki as p,nt as m,ot as h,qr as g,r as _,rt as v,st as y,t as b,tt as x}from"./button-BIIHE0EQ.js";import{n as S,r as C,t as w}from"./panel-CbajlC3p.js";import{t as T}from"./warnings-BSXIyuSQ.js";import{t as E}from"./markdown-view-pQ2Qp_i5.js";import{C as D,E as O,S as k,T as A,s as j,w as M}from"./index-B3wkMzjA.js";var N=e(a(),1);function P(e){let t=new Set,n=[];for(let r of e)for(let e of r.specs)t.has(e)||(t.add(e),n.push({capability:e,change:r.name,archivedOn:r.archivedOn}));return n}var F=u(),ee=20,te=12,I=`openspec/changes/archive`,L=e=>`openspec/specs/${e}/spec.md`,R=r(y,`grid grid-cols-[minmax(0,1fr)_auto] gap-x-4 py-2`);function z({payload:e}){let[t,n]=(0,N.useState)(null),i=e.shipped.slice(0,ee),a=i.find(e=>e.anchor===t)??null;return(0,F.jsxs)(`div`,{className:`analyst-overview`,children:[(0,F.jsx)(T,{warnings:e.warnings}),(0,F.jsx)(`div`,{className:r(v,`@container pb-10`),children:(0,F.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1.5fr)_minmax(0,1fr)] items-start gap-3 @max-[760px]:grid-cols-1`,children:[(0,F.jsx)(H,{all:e.shipped.length,shown:i,current:t,onOpen:n}),(0,F.jsx)(W,{shipped:e.shipped})]})}),(0,F.jsx)(C,{items:i.map(e=>e.anchor),current:a?.anchor??null,onSelect:n,title:a?`Shipped change ${a.name}`:`Shipped change`,children:a?(0,F.jsx)(U,{change:a}):null})]})}function B(e){let t=[];for(let n of e){let e=t.at(-1);e?.[0]===n.archivedOn?e[1].push(n):t.push([n.archivedOn,[n]])}return t}function V(e){let t=new Date(`${e}T00:00:00Z`);return Number.isNaN(t.getTime())?``:t.toLocaleDateString(`en`,{weekday:`long`,timeZone:`UTC`})}function H({all:e,shown:t,current:n,onOpen:i}){return(0,F.jsx)(m,{title:`Recently shipped`,count:e,hint:e>t.length?`newest ${t.length}`:void 0,children:t.length===0?(0,F.jsx)(`p`,{className:`empty m-0 px-4 py-3 text-sm text-muted`,children:`No shipped changes yet.`}):(0,F.jsx)(`ol`,{className:`analyst-days m-0 list-none p-0`,children:B(t).map(([e,t])=>(0,F.jsxs)(`li`,{className:`border-t border-rule first:border-t-0`,children:[(0,F.jsxs)(`h3`,{className:`m-0 flex items-center gap-2 bg-[color-mix(in_srgb,var(--surface)_45%,transparent)] px-4 pt-2.5 pb-1.5 text-xs font-semibold text-muted`,children:[(0,F.jsx)(`time`,{dateTime:e,className:`font-mono text-text`,children:e}),V(e),(0,F.jsx)(d,{value:t.length})]}),(0,F.jsx)(`ol`,{className:`analyst-list m-0 list-none p-0`,children:t.map(e=>(0,F.jsx)(`li`,{children:(0,F.jsxs)(`button`,{type:`button`,className:r(y,`grid gap-0.5 py-2`),"aria-current":n===e.anchor?`true`:void 0,onClick:()=>i(e.anchor),children:[(0,F.jsx)(`span`,{className:`analyst-row-title truncate font-mono text-sm`,children:e.name}),(0,F.jsx)(`span`,{className:`truncate text-xs text-muted`,children:e.specs.length===0?`no spec changes`:e.specs.join(`, `)})]})},e.anchor))})]},e))})})}function U({change:e}){let t=`${I}/${e.anchor}`;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(w,{mono:!0,title:e.name,kicker:(0,F.jsxs)(`span`,{children:[`Shipped `,e.archivedOn]})}),(0,F.jsx)(S,{title:`Proposal`,children:e.hasProposal?(0,F.jsxs)(f,{className:`inline-flex items-center gap-2 text-sm`,to:`/vault`,search:e=>({...e,path:`${t}/proposal.md`}),children:[(0,F.jsx)(_,{name:`doc`}),` Read the proposal`]}):(0,F.jsxs)(`p`,{className:`m-0 text-sm text-muted`,children:[`This change has no proposal.`,` `,(0,F.jsx)(f,{to:`/vault`,search:e=>({...e,dir:t}),children:`Open its folder`})]})}),(0,F.jsx)(S,{title:`Specs it changed`,aside:String(e.specs.length),children:e.specs.length===0?(0,F.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`No spec changed.`}):(0,F.jsx)(`ul`,{className:`m-0 grid list-none gap-1 p-0`,children:e.specs.map(e=>(0,F.jsx)(`li`,{children:(0,F.jsx)(f,{className:`font-mono text-sm`,to:`/vault`,search:t=>({...t,path:L(e)}),children:e})},e))})})]})}function W({shipped:e}){let t=P(e).slice(0,te);return(0,F.jsx)(m,{title:`Recently changed specs`,hint:(0,F.jsx)(f,{to:`/specs`,search:e=>e,children:`All specs`}),children:t.length===0?(0,F.jsx)(`p`,{className:`empty m-0 px-4 py-3 text-sm text-muted`,children:`No specs changed by shipped changes yet.`}):(0,F.jsx)(`ol`,{className:`analyst-list m-0 list-none p-0`,children:t.map((e,n)=>(0,F.jsx)(`li`,{children:(0,F.jsxs)(f,{className:R,to:`/vault`,search:t=>({...t,path:L(e.capability)}),children:[(0,F.jsxs)(`span`,{className:`grid min-w-0 gap-0.5`,children:[(0,F.jsx)(`span`,{className:`analyst-row-title truncate font-mono text-sm`,children:e.capability}),(0,F.jsxs)(`span`,{className:`truncate text-xs text-muted`,children:[`by `,e.change]})]}),(0,F.jsx)(`span`,{className:`font-mono text-xs text-muted`,children:e.archivedOn===t[n-1]?.archivedOn?null:e.archivedOn})]})},e.capability))})})}var G=`openspec/changes`,K=e=>`${G}/${e.name}`,q=`flex w-full min-w-0 items-center gap-2.5 rounded-control border-0 bg-transparent px-2 py-1 text-left text-sm text-text hover:bg-surface-soft disabled:cursor-default disabled:hover:bg-transparent`;function J({done:e}){return(0,F.jsx)(`span`,{className:r(`grid size-3.5 flex-none place-items-center rounded-[4px] border`,e?`border-accent bg-accent text-on-accent`:`border-rule bg-page`),"aria-hidden":`true`,children:e?(0,F.jsx)(_,{name:`check`,className:`size-2.5 [stroke-width:2.4]`}):null})}function Y({companion:e,dir:t,onRead:n}){let r=p(i(e,`${t}/specs`));if(r.isPending)return(0,F.jsx)(`p`,{className:`m-0 pl-8 text-xs text-muted`,children:`Listing specs…`});let a=(r.data?.entries??[]).filter(e=>e.kind===`directory`);return r.isError||a.length===0?(0,F.jsx)(`p`,{className:`m-0 pl-8 text-xs text-muted`,children:(0,F.jsx)(f,{to:`/vault`,search:e=>({...e,dir:`${t}/specs`}),children:`Open the specs folder`})}):(0,F.jsx)(`ul`,{className:`m-0 grid list-none gap-0.5 p-0 pl-6`,children:a.map(e=>(0,F.jsx)(`li`,{children:(0,F.jsxs)(`button`,{type:`button`,className:q,"data-artifact-file":`${e.path}/spec.md`,onClick:()=>n(`${e.path}/spec.md`),children:[(0,F.jsx)(_,{name:`doc`,className:`flex-none text-muted`}),(0,F.jsx)(`span`,{className:`truncate font-mono text-xs`,children:e.name})]})},e.path))})}function X({change:e,companion:t,onRead:n}){if(e.artifacts.length===0)return(0,F.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`No artifacts yet.`});let r=K(e);return(0,F.jsx)(`ul`,{className:`m-0 -mx-2 grid list-none gap-0.5 p-0`,children:e.artifacts.map(e=>{let i=e.status===`done`,a=i&&t!==void 0,o=e.id===`specs`;return(0,F.jsxs)(`li`,{children:[(0,F.jsxs)(`button`,{type:`button`,className:q,disabled:!a||o,"data-artifact":e.id,onClick:()=>n(`${r}/${e.id}.md`),children:[(0,F.jsx)(J,{done:i}),(0,F.jsx)(`span`,{className:i?`text-text`:`text-muted`,children:e.id}),(0,F.jsx)(`span`,{className:`ml-auto text-xs text-muted`,children:i?o?`per capability`:`read`:`not yet`}),a&&!o?(0,F.jsx)(_,{name:`right`,className:`text-muted`}):null]}),a&&o?(0,F.jsx)(Y,{companion:t,dir:r,onRead:n}):null]},e.id)})})}function Z({companion:e,path:t,change:n,onBack:r}){let i=p(g(e,{path:t})),a=i.data?.open?.markdown,o=t.slice(K(n).length+1);return(0,F.jsxs)(`section`,{className:`grid content-start gap-3 px-5 py-4`,"aria-label":`Artifact ${o}`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(b,{size:`sm`,variant:`ghost`,className:`-ml-2`,onClick:r,children:[(0,F.jsx)(_,{name:`left`}),` Artifacts`]}),(0,F.jsx)(`code`,{className:`min-w-0 truncate font-mono text-xs text-muted`,children:o}),(0,F.jsxs)(f,{className:`ml-auto inline-flex flex-none items-center gap-1.5 text-xs`,to:`/vault`,search:e=>({...e,path:t}),children:[(0,F.jsx)(_,{name:`external`,className:`size-3.5`}),` Open in Vault`]})]}),a?(0,F.jsx)(`div`,{className:`prose-panel`,children:(0,F.jsx)(E,{nodes:a})}):(0,F.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:i.isPending?`Loading…`:`The file could not be read.`})]})}var ne={"needs-you":`Review or fix before the build goes on`,building:`An agent is working through the tasks`,ready:`Every task is done`};function Q(e){if(e.valid===!1)return{marker:`issue`,word:`Invalid`};let t=M(e);return t===`needs-you`?(e.totalTasks??0)===0?{marker:`warn`,word:`No tasks`}:{marker:`review`,word:`Review`}:t===`building`?{marker:`build`,word:`Building`}:{marker:`done`,word:`Ready`}}var $=[`Propose change`,`Human review`,`Apply change`,`Archive change`];function re({stage:e}){let t=$.indexOf(e);return(0,F.jsx)(`ol`,{className:`m-0 grid list-none grid-cols-4 gap-1 p-0`,"aria-label":`Delivery Path`,children:$.map((e,n)=>(0,F.jsx)(`li`,{"aria-current":n===t?`step`:void 0,className:r(`grid gap-1.5 text-2xs text-muted before:h-1 before:rounded-full before:bg-rule before:content-['']`,n<t&&`before:bg-[color-mix(in_srgb,var(--accent)_55%,var(--border))]`,n===t&&`font-semibold text-text before:bg-accent`,n===t&&e===`Human review`&&`before:bg-why`),children:e},e))})}function ie({change:e,companion:t,reading:r,onRead:i}){let a=A(e),{marker:s,word:c}=Q(e),u=(0,F.jsx)(S,{title:`Artifacts`,aside:e.schemaName,children:(0,F.jsx)(X,{change:e,companion:t,onRead:i})}),d=M(e)===`needs-you`;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(w,{mono:!0,title:e.name,kicker:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(l,{marker:s,children:c}),(0,F.jsx)(o,{at:e.lastModified,className:`ml-auto`})]}),children:(0,F.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:a.situation})}),r&&t?(0,F.jsx)(Z,{companion:t,path:r,change:e,onBack:()=>i(null)}):(0,F.jsxs)(F.Fragment,{children:[d?u:null,(0,F.jsx)(S,{title:`Delivery Path`,aside:a.stage,children:(0,F.jsx)(re,{stage:a.stage})}),(0,F.jsxs)(S,{title:`Next step`,children:[(0,F.jsxs)(`p`,{className:`m-0 text-sm`,children:[a.next,`.`]}),(0,F.jsx)(n,{text:a.prompt})]}),(0,F.jsx)(S,{title:`Tasks`,aside:`${e.completedTasks??0}/${e.totalTasks??0}`,children:(0,F.jsx)(h,{done:e.completedTasks??0,total:e.totalTasks??0})}),d?null:u]})]})}function ae({change:e,current:t,onOpen:n}){let{marker:i,word:a}=Q(e),s=A(e);return(0,F.jsx)(`li`,{children:(0,F.jsxs)(`button`,{type:`button`,className:r(y,`grid grid-cols-[minmax(0,1fr)_120px_150px_72px] @max-[640px]:grid-cols-[minmax(0,1fr)_auto]`),"aria-current":t?`true`:void 0,"data-change":e.name,onClick:n,children:[(0,F.jsxs)(`span`,{className:`grid min-w-0 gap-0.5`,children:[(0,F.jsx)(`span`,{className:`truncate font-mono text-sm`,children:e.name}),(0,F.jsx)(`span`,{className:r(`truncate text-xs`,e.valid===!1?`text-bad`:`text-muted`),children:s.situation})]}),(0,F.jsx)(l,{marker:i,children:a}),(0,F.jsx)(`span`,{className:`@max-[640px]:hidden`,children:(0,F.jsx)(h,{done:e.completedTasks??0,total:e.totalTasks??0})}),(0,F.jsx)(o,{at:e.lastModified,className:`text-right @max-[640px]:hidden`})]})})}function oe({changes:e,selected:t,companion:n}){let i=s(),[a,o]=(0,N.useState)(`all`),[l,u]=(0,N.useState)(!1),[f,p]=(0,N.useState)(null),h=O(e),g=k.filter(e=>a===`all`||a===e),_=g.flatMap(e=>h[e]),y=l?h[`needs-you`]:_,S=e.find(e=>e.name===t)??null,w=f&&f.change===S?.name?f.path:null,T=e=>{e===null&&u(!1),i({to:`.`,search:t=>({...t,change:e??void 0}),replace:!0})};return e.length===0?(0,F.jsx)(`section`,{className:r(v,`pb-10`),"aria-label":`Changes`,children:(0,F.jsx)(x,{children:`No change is in flight in this companion.`})}):(0,F.jsxs)(`section`,{className:r(v,`@container grid content-start gap-3 pb-10`),"aria-label":`Changes`,children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,F.jsx)(c,{label:`Show changes`,value:a,onChange:o,options:[{value:`all`,label:`All`,count:e.length},...k.map(e=>({value:e,label:D[e],count:h[e].length,tone:e===`needs-you`?`warn`:void 0}))]}),h[`needs-you`].length>0?(0,F.jsxs)(b,{variant:`primary`,size:`sm`,className:`ml-auto`,onClick:()=>{u(!0),T(h[`needs-you`][0].name)},children:[`Start review pass`,(0,F.jsx)(d,{value:h[`needs-you`].length})]}):null]}),g.map(e=>h[e].length===0?null:(0,F.jsx)(m,{title:D[e],count:h[e].length,hint:ne[e],tone:e===`needs-you`?`warn`:void 0,children:(0,F.jsx)(`ul`,{className:`m-0 list-none p-0`,children:h[e].map(e=>(0,F.jsx)(ae,{change:e,current:e.name===t,onOpen:()=>{u(!1),T(e.name)}},e.name))})},e)),(0,F.jsx)(C,{items:y.map(e=>e.name),current:S?.name??null,onSelect:T,pass:l?`Needs you`:void 0,wide:w!==null,title:S?`Change ${S.name}`:`Change`,children:S?(0,F.jsx)(ie,{change:S,companion:n,reading:w,onRead:e=>p(e?{change:S.name,path:e}:null)}):null})]})}function se({payload:e,selected:t,companion:n}){return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(T,{warnings:e.warnings}),(0,F.jsx)(oe,{changes:e.changes,selected:t,companion:n})]})}function ce(){let e=j.useSearch();return(0,F.jsx)(t,{view:`dashboard`,search:e,children:t=>t.studioMode===`analysis`?(0,F.jsx)(z,{payload:{shipped:t.shipped??[],warnings:t.warnings}}):(0,F.jsx)(se,{payload:{changes:t.changes??[],warnings:t.warnings},selected:e.change,companion:e.companion})})}export{ce as component};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{t}from"./companion-view-DM6YyXaR.js";import{$ as n,Ar as r,Na as i,Ui as a,Wr as o,at as s,da as c,ki as l,nt as u,r as d,rt as f,st as p,tt as m}from"./button-BIIHE0EQ.js";import{n as h,r as g,t as _}from"./panel-CbajlC3p.js";import{n as v}from"./steps-DFsH3Neu.js";import{t as y}from"./markdown-view-pQ2Qp_i5.js";import{i as b}from"./index-B3wkMzjA.js";var x=e(i(),1),S=c(),C=`flex w-full min-w-0 items-center gap-2.5 rounded-control border-0 bg-transparent px-2 py-1 text-left text-sm text-text hover:bg-surface-soft aria-[current=true]:bg-accent-soft`;function w(e){return e<1024?`${e} B`:`${(e/1024).toFixed(+(e<10240))} KB`}function T({companion:e,agent:t,name:n}){let[i,s]=(0,x.useState)(void 0),c=l({...o(e,t,n,i),placeholderData:a});if(!c.data)return(0,S.jsx)(h,{title:`Files`,children:c.isError?(0,S.jsx)(`p`,{className:`m-0 text-sm text-muted`,role:`alert`,children:c.error instanceof Error?c.error.message:`The skill could not be read.`}):(0,S.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Listing files…`})});let{files:u,truncated:f,open:p}=c.data;return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(h,{title:`Files`,aside:f?`first ${u.length}`:u.length,children:(0,S.jsx)(`ul`,{className:`m-0 -mx-2 grid list-none gap-0.5 p-0`,children:u.map(e=>(0,S.jsx)(`li`,{children:(0,S.jsxs)(`button`,{type:`button`,className:C,"aria-current":p?.path===e.path?`true`:void 0,"data-skill-file":e.path,onClick:()=>s(e.path),children:[(0,S.jsx)(d,{name:`doc`,className:`flex-none text-muted`}),(0,S.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:e.path}),(0,S.jsx)(`span`,{className:`ml-auto flex-none font-mono text-2xs text-muted`,children:w(e.size)})]})},e.path))})}),p?(0,S.jsxs)(`section`,{className:r(`grid gap-2.5 px-5 py-4`,c.isPlaceholderData&&`opacity-60`),"aria-label":`File ${p.path}`,children:[(0,S.jsx)(`code`,{className:`truncate font-mono text-xs text-muted`,children:p.path}),p.nodes?(0,S.jsx)(`div`,{className:`prose-panel`,children:(0,S.jsx)(y,{nodes:p.nodes})}):(0,S.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:p.note})]}):null]})}var E=[{id:`claude`,label:`Claude`,dir:`.claude/skills`,invoke:e=>`/${e}`},{id:`opencode`,label:`OpenCode`,dir:`.opencode/skills`,invoke:e=>`@${e}`},{id:`agents`,label:`Agents`,dir:`.agents/skills`,invoke:e=>`$${e}`}],D=new Set([`mate-grilling`,`mate-domain-modeling`]);function O(){let e=new Map;for(let t of v({}).paths[0]?.steps??[]){t.skill&&!e.has(t.skill)&&e.set(t.skill,t.label);for(let n of t.alternatives??[])e.has(n.name)||e.set(n.name,t.label)}return e}function k(e,t){let n=[...t.keys()],r=e.filter(e=>t.has(e)).toSorted((e,t)=>n.indexOf(e)-n.indexOf(t)),i=e.filter(e=>D.has(e)),a=e.filter(e=>e.startsWith(`mate-`)&&!t.has(e)&&!D.has(e)),o=e.filter(e=>!e.startsWith(`mate-`)&&!t.has(e));return[{title:`Delivery Path`,hint:`In the order a change meets them`,names:r},{title:`Other Mate skills`,hint:`Run when you need them`,names:a},{title:`Used by other skills`,hint:`Loaded for you, not started on their own`,names:i},{title:`Other skills`,hint:`Installed besides Mate`,names:o}].filter(e=>e.names.length>0)}function A({skills:e,companion:t}){let i=e??{claude:[],opencode:[],agents:[]},[a,o]=(0,x.useState)(`claude`),[c,l]=(0,x.useState)(null),d=O(),v=E.find(e=>e.id===a);return(0,S.jsxs)(`section`,{className:r(f,`grid content-start gap-3 pb-10`),"aria-label":`Agent skills`,"data-skills-root":!0,children:[(0,S.jsx)(s,{label:`Agent`,value:a,onChange:e=>{o(e),l(null)},options:E.map(e=>({value:e.id,label:e.label,count:i[e.id].length}))}),E.map(e=>{let t=e.id===a,n=i[e.id];return(0,S.jsx)(`div`,{id:`skills-panel-${e.id}`,className:t?`grid gap-3`:`hidden`,"aria-hidden":!t,"data-skill-panel":e.id,"data-active":t,children:n.length===0?(0,S.jsxs)(m,{children:[e.label,` has no skills in this companion.`]}):k(n,d).map(e=>(0,S.jsx)(u,{title:e.title,count:e.names.length,hint:e.hint,children:(0,S.jsx)(`ul`,{className:`m-0 list-none p-0`,children:e.names.map(e=>(0,S.jsx)(`li`,{children:(0,S.jsxs)(`button`,{type:`button`,className:r(p,`grid grid-cols-[minmax(0,1fr)_auto] py-1.5`),"aria-current":t&&c===e?`true`:void 0,"data-skill":e,onClick:()=>l(e),children:[(0,S.jsx)(`span`,{className:`truncate font-mono text-sm`,children:e}),d.has(e)?(0,S.jsx)(`span`,{className:`text-xs text-muted`,children:d.get(e)}):null]})},e))})},e.title))},e.id)}),(0,S.jsx)(g,{items:k(i[a],d).flatMap(e=>e.names),current:c,onSelect:l,wide:t!==void 0,title:c?`Skill ${c}`:`Skill`,children:c?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(_,{mono:!0,title:c,kicker:d.has(c)?(0,S.jsxs)(`span`,{children:[`Delivery Path · `,d.get(c)]}):(0,S.jsx)(`span`,{children:v.label})}),(0,S.jsx)(h,{title:`Start`,children:D.has(c)?(0,S.jsx)(`p`,{className:`m-0 text-sm`,children:`Used by other skills: they load it when they need it, so it has no start command.`}):(0,S.jsx)(n,{text:v.invoke(c),label:`start command`})}),(0,S.jsx)(h,{title:`Installed for`,children:(0,S.jsx)(`ul`,{className:`m-0 grid list-none gap-1.5 p-0`,children:E.filter(e=>i[e.id].includes(c)).map(e=>(0,S.jsxs)(`li`,{className:`flex items-center gap-3 text-sm`,children:[(0,S.jsx)(`span`,{className:`w-20 text-muted`,children:e.label}),(0,S.jsxs)(`code`,{className:`truncate font-mono text-xs`,children:[e.dir,`/`,c,`/`]})]},e.id))})}),t?(0,S.jsx)(T,{companion:t,agent:a,name:c},`${a}/${c}`):null]}):null})]})}var j=function(){let e=b.useSearch();return(0,S.jsx)(t,{view:`skills`,search:e,children:t=>(0,S.jsx)(A,{skills:t.skillInventory,companion:e.companion})})};export{j as component};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{Ar as t,Na as n,ct as r,da as i,ia as a,ki as o,nt as s,qr as c,r as l,rt as u,st as d,tt as f}from"./button-BIIHE0EQ.js";import{t as p}from"./companion-view-DM6YyXaR.js";import{n as m,r as h,t as g}from"./panel-CbajlC3p.js";import{t as _}from"./markdown-view-pQ2Qp_i5.js";import{t as v}from"./warnings-BSXIyuSQ.js";import{r as y}from"./index-B3wkMzjA.js";var b=/^[a-z0-9][a-z0-9-]{0,63}$/,x=[{id:`show-me`,skill:`mate-show-me`,label:`Show me`,subject:`spec`,prompts:{claude:e=>`/mate-show-me ${e}`,opencode:e=>`Use the mate-show-me skill on spec ${e}.`}}];function S(e){return x.find(t=>t.id===e)??null}function C(e){return(e.actions??[]).flatMap(({id:e,runAgents:t,copyAgents:n})=>{let r=S(e);return r?[{action:r,runAgents:t,copyAgents:n}]:[]})}var w=e(n(),1),T=`unassigned`;function E(e){let t=new Map;for(let n of e){let e=n.areas.length>0?n.areas:[T];for(let r of e){let e=t.get(r);e?e.push(n):t.set(r,[n])}}return[...t.entries()].toSorted((e,t)=>e[0].localeCompare(t[0]))}var D=i(),O=[],k=e=>`openspec/specs/${e}/spec.md`;function A(e){return e.valid===!1?(0,D.jsx)(r,{marker:`issue`,children:`${e.issueCount??0} issues`}):e.valid===!0?(0,D.jsx)(r,{marker:`done`,children:`valid`}):(0,D.jsx)(r,{marker:`idle`,children:`unvalidated`})}var j=`.`,M=e=>e===j?`Repository root`:e;function N(e){return e===void 0?`requirements unknown`:`${e} ${e===1?`requirement`:`requirements`}`}function P({payload:e,actions:t=O,companion:n}){return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(v,{warnings:e.warnings}),(0,D.jsx)(L,{specs:e.specs,actions:t,companion:n})]})}var F=`inline-flex h-7 items-center gap-1.5 rounded-[6px] border border-rule bg-surface px-2.5 text-xs text-text hover:border-accent hover:bg-accent-soft`;function I({capability:e,actions:n}){return!b.test(e)||n.length===0?null:(0,D.jsx)(`span`,{className:`spec-actions flex flex-wrap items-center gap-1.5`,children:n.map(({action:n,runAgents:r,copyAgents:i})=>(0,D.jsxs)(w.Fragment,{children:[r.length>0?(0,D.jsxs)(`button`,{type:`button`,className:t(F,`spec-action`),"data-studio-action":n.id,"data-studio-subject":e,"data-studio-agents":r.join(` `),children:[(0,D.jsx)(l,{name:`play`,className:`size-3.5`}),n.label]}):null,(0,D.jsxs)(`button`,{type:`button`,className:t(F,`spec-copy`),"aria-label":`Copy prompt`,"data-studio-copy-prompt":n.id,"data-prompt-claude":i.includes(`claude`)?n.prompts.claude(e):void 0,"data-prompt-opencode":i.includes(`opencode`)?n.prompts.opencode(e):void 0,children:[(0,D.jsx)(l,{name:`copy`,className:`size-3.5`}),`Copy prompt`]})]},n.id))})}function L({specs:e,actions:n,companion:r}){let i=E(e),[a,o]=(0,w.useState)(null),c=[...new Set(i.flatMap(([,e])=>e.map(e=>e.capability)))],l=e.find(e=>e.capability===a)??null;return(0,D.jsxs)(`section`,{className:t(u,`grid content-start gap-3 pb-10`),"aria-label":`Specs by Area`,children:[i.length===0?(0,D.jsx)(f,{children:`No specs in this companion.`}):i.map(([e,n])=>(0,D.jsx)(s,{title:e===j?M(e):(0,D.jsx)(`span`,{className:`font-mono`,children:e}),label:`Area ${e}`,count:n.length,children:(0,D.jsx)(`ul`,{className:`m-0 list-none p-0`,children:n.map(e=>(0,D.jsx)(`li`,{children:(0,D.jsxs)(`button`,{type:`button`,className:t(d,`grid grid-cols-[minmax(0,1fr)_auto_120px] py-1.5 max-sm:grid-cols-[minmax(0,1fr)_auto]`),"aria-current":a===e.capability?`true`:void 0,"data-spec":e.capability,onClick:()=>o(e.capability),children:[(0,D.jsx)(`span`,{className:`truncate font-mono text-sm`,children:e.capability}),e.valid===!0?(0,D.jsx)(`span`,{}):A(e),(0,D.jsx)(`span`,{className:`text-right text-xs text-muted tabular-nums max-sm:hidden`,children:N(e.requirementCount)})]})},e.capability))})},e)),(0,D.jsx)(h,{items:c,current:l?.capability??null,onSelect:o,wide:!0,title:l?`Spec ${l.capability}`:`Spec`,children:l?(0,D.jsx)(R,{spec:l,actions:n,companion:r}):null})]})}function R({spec:e,actions:t,companion:n}){let r=k(e.capability),i=o({...c(n??``,{path:r}),enabled:!!n}),s=i.data?.open?.markdown;return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(g,{mono:!0,title:e.capability,kicker:(0,D.jsxs)(D.Fragment,{children:[A(e),(0,D.jsx)(`span`,{className:`ml-auto`,children:e.areas.map(M).join(`, `)})]}),children:(0,D.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,D.jsx)(I,{capability:e.capability,actions:t}),(0,D.jsxs)(a,{className:`inline-flex items-center gap-1.5 text-sm`,to:`/vault`,search:e=>({...e,path:r}),children:[(0,D.jsx)(l,{name:`external`,className:`size-3.5`}),` Open in Vault`]})]})}),(0,D.jsx)(m,{title:`Spec`,aside:e.requirementCount===void 0?void 0:N(e.requirementCount),children:s?(0,D.jsx)(`div`,{className:`prose-panel`,children:(0,D.jsx)(_,{nodes:s})}):(0,D.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:i.isError?`The spec file could not be read.`:i.isPending&&n?`Loading…`:`The spec file could not be read.`})})]})}var z=function(){let e=y.useSearch();return(0,D.jsx)(p,{view:`specs`,search:e,children:t=>(0,D.jsx)(P,{payload:{specs:t.specs??[],warnings:t.warnings},actions:C(t),companion:e.companion})})};export{z as component};
@@ -0,0 +1 @@
1
+ import{ci as e,li as t,si as n,vi as r,xi as i}from"./button-BIIHE0EQ.js";var a=[`mate-clarify-intent`,`mate-interview-me`,`mate-grill-me`],o={"mate-clarify-intent":`Default. Reads what the request already states and routes to an interview, grilling, or skip, then runs that one mode.`,"mate-interview-me":`Explicit mode: guided, one-question-at-a-time clarification when intent, constraints, or scope still need confirmation.`,"mate-grill-me":`Explicit mode: round-based stress test of a mostly known direction to surface hidden assumptions and risks.`},s={"clarify-intent":{what:`Settles who the change is for, why it is needed, how success is measured, and what binds it, before any artifact exists.`,why:`Intent gaps are cheapest to close before exploration turns them into documents.`},explore:{what:`Resolves repository evidence, unknowns, and options, with scope taken from the companion context map, and suggests slicing a large feature.`,why:`It separates uncertainty from the proposal's committed scope.`},propose:{what:`Chooses the schema from the minimal eligibility test, checks slicing when explore agreed none, and writes the change's planning artifacts in one prompt.`,why:`One prompt writes every artifact; each one is then reviewed on its own.`},apply:{what:`Records the delivery branch, avoiding protected branches, then implements the reviewed tasks.`,why:`The recorded branch is what archive and publication later wait on.`},"inspect-outcome":{what:`Shows what the applied change did as a rendered diagram and diff in a Mate report.`,why:`Seeing the result tells the reviewer whether cleanup is warranted.`},"refine-code":{what:`Looks for smaller, clearer code once tests pass, preserving behavior.`,why:`Cleanup lands before archive, so shipped code and recorded specs agree.`},archive:{what:`Applies the delta specs to the local canonical specs and records the delivery; allowed before the branch merges.`,why:`A feature's later changes build on canonical specs that already include this one.`},publish:{what:`Commits, tags, and pushes archived changes whose delivery branches are merged, chosen by the developer.`,why:`Published canonical specs then describe the default branch; unmerged archives wait.`}};function c(e,t,n){return{what:(t?.schemaName===n?t.artifacts.find(t=>t.id===e)?.description:void 0)??`A person reviews the ${e} artifact.`,why:`Reviews stay with people: Mate never marks them approved.`}}function l(e,t){if(e.kind===`human`)return null;if(e.id===`clarify-intent`)return`/${e.skill} about ${i}`;let n=e.id===`propose`&&t!==`mate-v1`?` (use schema: ${t})`:``;return`/${e.skill}${n} for ${r}`}function u(e){return e&&e.replace(` ${r}`,``).replace(` ${i}`,``)}function d(e){return a.filter(e).map(e=>({name:e,description:o[e],prompt:`/${e} about ${i}`,copyPrompt:`/${e} about`}))}var f=new Set([`explore`,`propose`,`apply`,`archive`]);function p(e){if(e.kind===`human`)return[`human-review`];let t=e.optional?[`optional`,`skill`]:[`skill`];return f.has(e.id)&&t.push(`openspec`),t}var m={"mate-v1":{tagline:`full planning`,description:`Full planning path: proposal, specs, design, and tasks.`},"mate-minimal":{tagline:`minimal planning`,description:`Short path: specs and tasks only, for one-Area, low-risk changes with clear intent.`}};function h(e){return t(e)?m[e]:{tagline:`custom schema`,description:`Planning path of the ${e} schema.`}}var g={plan:`Plan`,review:`Review`,build:`Build`,ship:`Ship`};function _(e,t){return e.kind===`human`?`review`:e.id===`apply`||t===`build`&&e.optional?`build`:t===void 0||t===`plan`?`plan`:`ship`}function v(e){return e.kind===`human`?`human`:e.optional?`optional`:null}function y(e){let t=[];for(let n of e){let e=v(n),r=t.at(-1);e&&r?.group===e?r.steps.push(n):t.push({group:e,steps:[n]})}return t.map(e=>e.group===`human`||e.group===`optional`&&e.steps.length>1?{kind:`group`,group:e.group,steps:e.steps}:{kind:`stage`,step:e.steps[0]})}function b(t,n,r){let i=r.skills?new Set(r.skills):null,a=e=>!i||i.has(e),o=e(n),f=[];for(let e of o.stages){let n=e.kind===`human`?c(e.artifact,r.topology,t):s[e.id],i=l(e,t),o=f.at(-1),m={...e,what:n.what,why:n.why,badges:p(e),prompt:i,copyPrompt:u(i),phase:_(e,o?.phase)};e.id===`clarify-intent`&&(m.alternatives=d(a)),e.kind===`skill`&&!a(e.skill)&&(m.missingSkill=e.skill),e.id===`apply`&&(m.sessionBreakBefore=!0),f.push(m)}return{schema:t,label:t,...h(t),steps:f,map:y(f),reviewsKnown:o.reviewsKnown}}function x(e,r){return r?.schemaName===e?r.artifacts.map(e=>e.id):t(e)?n[e]:void 0}function S(e={}){let r=e.topology?.schemaName;return{paths:(r&&!t(r)?[r]:Object.keys(n)).map(t=>b(t,x(t,e.topology),e))}}export{S as n,g as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{B as t,I as n,R as r,b as i,n as a,x as o,z as s}from"./index-B3wkMzjA.js";import{$i as c,Ar as l,Gr as u,Jr as d,Kr as f,Lr as p,Na as m,Rr as h,Ur as g,Xr as _,Yr as v,aa as y,da as b,ia as x,ki as S,la as C,n as w,nt as T,qr as E,r as D,st as O,t as k}from"./button-BIIHE0EQ.js";import{t as A}from"./markdown-view-pQ2Qp_i5.js";var j=e(m(),1);function M(e,t){if(e===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if(`shouldBlockFn`in e)return e;if(typeof e==`function`){let n=!!(t??!0);return{shouldBlockFn:async()=>n?await e():!1,enableBeforeUnload:n,withResolver:!1}}let n=!!(e.condition??!0),r=e.blockerFn;return{shouldBlockFn:async()=>n&&r!==void 0?await r():n,enableBeforeUnload:n,withResolver:r===void 0}}function ee(e,t){let{shouldBlockFn:n,enableBeforeUnload:r=!0,disabled:i=!1,withResolver:a=!1}=M(e,t),o=C(),{history:s}=o,[c,l]=j.useState({status:`idle`,current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return j.useEffect(()=>i?void 0:s.block({blockerFn:async e=>{function t(e){let t=o.parseLocation(e),[,n,r]=o.getMatchedRoutes(t.pathname);return r===void 0?{routeId:`__notFound__`,fullPath:t.pathname,pathname:t.pathname,params:n,search:o.options.parseSearch(e.search)}:{routeId:r.id,fullPath:r.fullPath,pathname:t.pathname,params:n,search:o.options.parseSearch(e.search)}}let r=t(e.currentLocation),i=t(e.nextLocation);if(r.routeId===`__notFound__`&&i.routeId!==`__notFound__`)return!1;let s=await n({action:e.action,current:r,next:i});if(!a)return s;if(!s)return!1;let c=await new Promise(t=>{l({status:`blocked`,current:r,next:i,action:e.action,proceed:()=>t(!1),reset:()=>t(!0)})});return l({status:`idle`,current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),c},enableBeforeUnload:r}),[n,r,i,a,s,o]),c}var N=b(),te=(e,t)=>`/api/vault/events?${new URLSearchParams({companion:e,path:t})}`;function P(e,t,n){let r=(0,j.useRef)(n);(0,j.useEffect)(()=>{r.current=n}),(0,j.useEffect)(()=>{if(typeof EventSource>`u`)return;let n=new EventSource(te(e,t));return n.onmessage=e=>{try{r.current(JSON.parse(e.data))}catch{}},()=>n.close()},[e,t])}function F({crumbs:e,children:t}){return(0,N.jsxs)(`div`,{className:`vault-bar sticky top-0 z-2 flex min-h-[52px] items-center gap-2 border-b border-rule-soft bg-[color-mix(in_srgb,var(--bg)_88%,transparent)] px-6 py-2 backdrop-blur-md max-sm:px-3`,children:[(0,N.jsx)(`div`,{className:`mr-auto flex min-w-0 items-center gap-1`,children:e}),t]})}var I=`vault-prose prose mx-auto w-full max-w-[68ch] px-10 pt-10 pb-28 max-sm:px-4`,L=w({variant:`default`,size:`sm`});function R({path:e}){return(0,N.jsxs)(`button`,{type:`button`,className:w({variant:`ghost`,size:`sm`}),"data-copy":e,"data-copy-label":`path`,"aria-label":`Copy path`,children:[(0,N.jsx)(D,{name:`copy`,className:`size-3.5`}),(0,N.jsx)(`span`,{className:`@max-[1000px]:hidden`,children:`Copy path`})]})}function z({companion:e,data:t,writable:n,search:r,crumbs:i}){let a=t.open;return a?n&&r.mode===`edit`?(0,N.jsx)(ne,{companion:e,data:t,crumbs:i},`${a.path}:edit`):(0,N.jsx)(V,{companion:e,data:t,writable:n,crumbs:i},`${a.path}:read`):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(F,{crumbs:i}),(0,N.jsxs)(`div`,{className:I,children:[(0,N.jsx)(`h1`,{className:`text-xl`,children:t.refusal?`File refused`:`Open a markdown file`}),(0,N.jsx)(`p`,{className:t.refusal?`vault-warning text-warn`:`empty text-muted`,children:t.refusal??`Choose a file from the tree to begin.`})]})]})}var B=e=>e.split(`/`).at(-1)??e;function V({companion:e,data:t,writable:n,crumbs:r}){let i=t.open,a=c(),[o,s]=(0,j.useState)(``);return P(e,i.path,t=>{t.kind===`removed`?s(`this file no longer exists on disk`):p(a,e)}),(0,N.jsxs)(`div`,{"data-vault-root":!0,"data-vault-mode":`read`,"data-vault-path":i.path,children:[(0,N.jsxs)(F,{crumbs:r,children:[(0,N.jsx)(R,{path:i.path}),n?(0,N.jsxs)(x,{className:L,id:`vault-mode-edit`,to:`/vault`,search:e=>({...e,mode:`edit`}),"data-vault-mode-link":!0,children:[(0,N.jsx)(D,{name:`pencil`,className:`size-3.5`}),`Edit`]}):(0,N.jsx)(`span`,{className:`text-xs text-muted`,title:`Start Studio with --writable to edit.`,children:`Read only`})]}),(0,N.jsxs)(`article`,{className:I,"aria-label":B(i.path),children:[(0,N.jsx)(A,{nodes:i.markdown}),(0,N.jsx)(`p`,{id:`vault-status`,className:`text-sm text-warn`,"aria-live":`polite`,children:o})]})]})}function H({companion:e,open:t,text:n}){let[r,i]=(0,j.useState)(n);(0,j.useEffect)(()=>{let e=setTimeout(()=>i(n),250);return()=>clearTimeout(e)},[n]);let a=o(`(min-width: 64rem)`),s=r===t.content,c=S({queryKey:[`vault-preview`,e,t.path,r],queryFn:()=>v({data:{companion:e,path:t.path,content:r}}),placeholderData:e=>e,enabled:a&&!s,gcTime:0}),l=s?t.markdown:c.data;return(0,N.jsxs)(`div`,{className:`vault-preview min-h-0 overflow-auto max-lg:hidden`,"aria-label":`Preview`,role:`region`,"data-vault-preview":!0,children:[(0,N.jsx)(`p`,{className:`m-0 px-7 pt-3 text-xs font-semibold text-muted`,children:`Preview`}),(0,N.jsx)(`div`,{className:`prose px-7 pt-2 pb-16 text-sm`,children:l?(0,N.jsx)(A,{nodes:l}):null})]})}function ne({companion:e,data:t,crumbs:r}){let i=t.open,a=c(),o=y(),[u,d]=(0,j.useState)(i.content),[f,m]=(0,j.useState)(i.content),[h,g]=(0,j.useState)(i.token),[v,b]=(0,j.useState)(``),[S,C]=(0,j.useState)(null),w=u!==f,T=(0,j.useRef)(w);(0,j.useEffect)(()=>{T.current=w},[w]);let E=n(e=>e.setDirty);(0,j.useEffect)(()=>E(w),[w,E]),(0,j.useEffect)(()=>()=>E(!1),[E]),ee({shouldBlockFn:()=>T.current&&!window.confirm(`Discard unsaved changes?`),enableBeforeUnload:()=>T.current}),P(e,i.path,e=>{if(e.kind===`removed`){b(`this file no longer exists on disk`);return}let t={content:e.content??``,token:e.token??``};e.kind===`overwritten`?(C(t),b(`a version was overwritten; its content is available below`)):w?(C(t),b(`the file changed on disk; unsaved content is still in the editor`)):(d(t.content),m(t.content),g(t.token),b(`updated from disk`))});let O=s({mutationFn:()=>_({data:{companion:e,path:i.path,content:u,token:h}}),onSuccess:t=>{t.kind===`conflict`?(C({content:t.content,token:t.token}),b(t.reason||`save refused`)):(g(t.token),m(u),T.current=!1,E(!1),b(`saved`),p(a,e),o({to:`/vault`,search:e=>({...e,mode:void 0}),resetScroll:!1}))},onError:e=>b(e.message||`save failed`)});return(0,N.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,"data-vault-root":!0,"data-vault-mode":`edit`,"data-vault-path":i.path,children:[(0,N.jsxs)(F,{crumbs:r,children:[w?(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs text-warn`,children:[(0,N.jsx)(`span`,{className:`size-[7px] rounded-full bg-current`,"aria-hidden":`true`}),`Unsaved`]}):null,(0,N.jsxs)(x,{className:L,id:`vault-mode-read`,to:`/vault`,search:e=>({...e,mode:void 0}),"data-vault-mode-link":!0,children:[(0,N.jsx)(D,{name:`eye`,className:`size-3.5`}),`Read`]}),(0,N.jsx)(k,{variant:`primary`,size:`sm`,id:`vault-save`,onClick:()=>O.mutate(),disabled:O.isPending,children:`Save`})]}),(0,N.jsxs)(`div`,{className:v||S?`grid gap-2 border-b border-rule-soft px-6 py-2.5 text-sm`:`sr-only`,children:[(0,N.jsx)(`p`,{id:`vault-status`,className:`m-0 text-warn`,"aria-live":`polite`,children:v}),S?(0,N.jsxs)(`div`,{id:`vault-incoming`,className:`grid gap-2`,children:[(0,N.jsx)(`strong`,{id:`vault-incoming-title`,className:`text-sm`,children:`Incoming version`}),(0,N.jsx)(`pre`,{id:`vault-incoming-content`,className:`m-0 max-h-40 overflow-auto rounded-control border border-rule bg-surface p-3 font-mono text-xs whitespace-pre-wrap`,children:S.content}),(0,N.jsx)(k,{size:`sm`,id:`vault-recover`,className:`justify-self-start`,onClick:()=>{d(S.content),m(S.content),S.token&&g(S.token),C(null),b(`incoming version loaded into the editor`)},children:`Put incoming content back`})]}):null]}),(0,N.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-cols-2 max-lg:grid-cols-1`,children:[(0,N.jsx)(`textarea`,{id:`vault-editor`,"data-vault-editor":!0,"data-vault-path":i.path,"aria-label":`Markdown source of ${B(i.path)}`,spellCheck:!1,value:u,onChange:e=>d(e.target.value),className:l(`min-h-[60vh] resize-none border-0 border-r border-rule-soft bg-transparent px-6 pt-4 pb-10 font-mono text-[0.86rem] leading-[1.75] text-text outline-none focus-visible:outline-none max-lg:border-r-0`)}),(0,N.jsx)(H,{companion:e,open:i,text:u})]})]})}var U=e=>e.split(`/`).filter(Boolean),W=`flex w-full min-w-0 items-center gap-2 rounded-[6px] border-0 bg-transparent px-2.5 py-1.5 text-left text-sm text-text no-underline hover:bg-surface aria-[current=page]:bg-accent-soft aria-[current=page]:font-semibold`;function G({entry:e,current:t,label:n}){return(0,N.jsxs)(x,{to:`/vault`,search:t=>({...t,path:e.path,dir:void 0,mode:void 0}),className:l(W,`vault-file`),"data-vault-entry":e.path,"aria-current":t?`page`:void 0,children:[(0,N.jsx)(D,{name:`doc`,className:l(`size-3.5`,t?`text-accent`:`text-muted`)}),(0,N.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:n??e.name})]})}function K({dir:e,className:t,children:n}){return(0,N.jsx)(x,{to:`/vault`,search:t=>({...t,path:void 0,dir:e??void 0,mode:void 0}),className:t,children:n})}function q({entry:e,companion:t,search:n}){return e.kind===`file`?(0,N.jsx)(G,{entry:e,current:n.path===e.path}):(0,N.jsx)(re,{entry:e,companion:t,search:n})}function re({entry:e,companion:t,search:n}){let[r,i]=(0,j.useState)(e.children!==void 0),a=S({...u(t,e.path),enabled:r&&e.children===void 0}),o=e.children??a.data?.entries;return(0,N.jsxs)(`details`,{className:`vault-directory group/dir`,open:r,"data-vault-dir":e.path,onToggle:e=>i(e.currentTarget.open),children:[(0,N.jsxs)(`summary`,{className:l(W,`cursor-pointer list-none font-semibold [&::-webkit-details-marker]:hidden`),"aria-current":n.dir===e.path?`page`:void 0,children:[(0,N.jsx)(D,{name:`right`,className:`size-3 text-muted transition-transform group-open/dir:rotate-90`}),(0,N.jsx)(D,{name:`folder`,className:`size-3.5 text-muted`}),(0,N.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.name})]}),(0,N.jsxs)(`div`,{className:`vault-children grid gap-px pl-3.5`,children:[r&&o?o.map(e=>(0,N.jsx)(q,{entry:e,companion:t,search:n},e.path)):null,a.error?(0,N.jsx)(`p`,{className:`vault-warning m-0 px-2.5 py-1 text-xs text-warn`,children:a.error.message}):null]})]})}var J=`m-0 px-2.5 py-1.5 text-sm text-muted`,Y=`vault-warning m-0 px-2.5 py-1.5 text-xs text-warn`;function ie({data:e,companion:t,search:n}){return e.failure?(0,N.jsx)(`div`,{"data-vault-slot":`tree`,children:(0,N.jsxs)(`p`,{className:Y,children:[`The files could not be listed: `,e.failure]})}):e.tree===null?(0,N.jsx)(`div`,{"data-vault-slot":`tree`,"aria-busy":`true`,children:(0,N.jsx)(`p`,{className:l(J,`empty`),children:`Listing files…`})}):(0,N.jsxs)(`div`,{"data-vault-slot":`tree`,"data-vault-generation":e.generation??void 0,children:[(0,N.jsx)(ae,{data:e}),e.tree.length===0?(0,N.jsx)(`p`,{className:l(J,`empty`),children:`This companion has no markdown files.`}):(0,N.jsx)(`nav`,{className:`vault-tree grid gap-px`,"aria-label":`Markdown files`,children:e.tree.map(e=>(0,N.jsx)(q,{entry:e,companion:t,search:n},e.path))})]})}function ae({data:e}){return e.warning?(0,N.jsxs)(`p`,{className:Y,children:[e.warning,`. The tree may be out of date.`]}):e.watching?null:(0,N.jsx)(`p`,{className:Y,children:`The tree may be out of date.`})}function oe({companion:e,query:t,search:n}){let[r,i]=(0,j.useState)(t);(0,j.useEffect)(()=>{let e=setTimeout(()=>i(t),150);return()=>clearTimeout(e)},[t]);let a=S({...f(e,r),enabled:r.trim().length>0});if(!a.data)return null;let{shown:o,total:s}=a.data,c=s-o.length;return(0,N.jsxs)(`div`,{"data-vault-filter-results":!0,children:[o.length===0?(0,N.jsx)(`p`,{className:l(J,`empty`),children:`No files match.`}):(0,N.jsx)(`nav`,{className:`vault-tree vault-results grid gap-px`,"aria-label":`Matching files`,children:o.map(e=>(0,N.jsx)(G,{entry:e,current:n.path===e.path,label:e.path},e.path))}),c>0?(0,N.jsxs)(`p`,{className:J,"data-vault-more":!0,children:[c,` more match`,c===1?``:`es`,`; refine the filter.`]}):null]})}var X=`vault-crumb rounded-[6px] px-1.5 py-0.5 text-sm text-muted no-underline hover:bg-surface hover:text-text`;function se({rootName:e,search:t}){let n=U(t.path??t.dir??``);return(0,N.jsx)(`nav`,{className:`vault-breadcrumb min-w-0`,"aria-label":`Breadcrumb`,"data-vault-crumb":!0,children:(0,N.jsxs)(`ol`,{className:`m-0 flex min-w-0 list-none items-center gap-0.5 overflow-hidden p-0 text-sm text-muted`,children:[(0,N.jsx)(`li`,{className:`flex-none`,children:n.length===0?(0,N.jsx)(`span`,{"aria-current":`page`,className:`px-1.5 font-semibold text-text`,children:e}):(0,N.jsx)(K,{dir:null,className:X,children:e})}),n.map((e,t)=>{let r=n.slice(0,t+1).join(`/`),i=t===n.length-1;return(0,N.jsxs)(`li`,{className:l(`flex items-center gap-0.5`,i?`min-w-0`:`flex-none max-md:hidden`),children:[(0,N.jsx)(`span`,{"aria-hidden":`true`,children:`/`}),i?(0,N.jsx)(`span`,{"aria-current":`page`,className:`truncate px-1.5 font-semibold text-text`,children:e}):(0,N.jsx)(K,{dir:r,className:X,children:e})]},r)})]})})}function ce(e,t){let n=e;for(let e of U(t)){let t=n?.find(t=>t.kind===`directory`&&t.name===e);if(!t)return null;n=t.children}return n??null}function le({data:e,rootName:t}){let n=e.failure?(0,N.jsxs)(`p`,{className:Y,children:[`The files could not be listed: `,e.failure]}):e.tree===null?(0,N.jsx)(`p`,{className:l(J,`empty`),children:`Listing files…`}):null,r=e.dir?U(e.dir):[],i=r.at(-1)??t;if(n)return(0,N.jsx)(`div`,{"data-vault-slot":`listing`,className:`vault-listing mx-auto w-full max-w-[820px] px-10 py-8`,"aria-busy":e.tree===null,children:n});let a=(e.dir?ce(e.tree,e.dir):null)??e.tree;return(0,N.jsxs)(`div`,{"data-vault-slot":`listing`,className:`vault-listing mx-auto grid w-full max-w-[820px] gap-4 px-10 py-8 max-sm:px-4`,children:[(0,N.jsx)(`h1`,{className:`m-0 text-xl font-semibold`,children:i}),e.dirMissing?(0,N.jsx)(`p`,{className:Y,children:`That folder is not in the tree; showing the root.`}):null,a.length===0&&r.length===0?(0,N.jsx)(`p`,{className:l(J,`empty`),children:`This companion has no markdown files.`}):(0,N.jsx)(T,{title:`In this folder`,count:a.length,children:(0,N.jsxs)(`ul`,{className:`vault-rows m-0 list-none p-0`,"aria-label":`Folder contents`,children:[r.length>0?(0,N.jsx)(`li`,{children:(0,N.jsxs)(K,{dir:r.length>1?r.slice(0,-1).join(`/`):null,className:l(O,`vault-row py-1.5`),children:[(0,N.jsx)(D,{name:`left`,className:`text-muted`}),(0,N.jsx)(`span`,{children:`..`})]})}):null,a.map(e=>(0,N.jsx)(`li`,{children:e.kind===`directory`?(0,N.jsxs)(K,{dir:e.path,className:l(O,`vault-row py-1.5 font-semibold`),children:[(0,N.jsx)(D,{name:`folder`,className:`text-muted`}),(0,N.jsx)(`span`,{className:`truncate`,children:e.name})]}):(0,N.jsxs)(x,{to:`/vault`,search:t=>({...t,path:e.path,dir:void 0,mode:void 0}),className:l(O,`vault-row py-1.5`),children:[(0,N.jsx)(D,{name:`doc`,className:`text-muted`}),(0,N.jsx)(`span`,{className:`truncate`,children:e.name})]})},e.path))]})})]})}function Z(e){return typeof e==`string`?e:(e.c??[]).map(Z).join(``)}function ue(e){return(e??[]).filter(e=>typeof e!=`string`&&e.t===`h2`).map((e,t)=>({index:t,text:Z(e)}))}var Q=e=>[...e?.querySelectorAll(`article .markdown-body h2`)??[]];function de(e,t,n){let[r,i]=(0,j.useState)(null);return(0,j.useEffect)(()=>{if(!t)return;let n=e.current,r=Q(n);if(r.length===0||typeof IntersectionObserver>`u`)return;let a=new IntersectionObserver(e=>{let t=e.find(e=>e.isIntersecting);t&&i(r.indexOf(t.target))},{root:n,rootMargin:`-60px 0px -70% 0px`});for(let e of r)a.observe(e);return()=>a.disconnect()},[e,t]),{current:r!==null&&r<n?r:0,go:t=>{Q(e.current)[t]?.scrollIntoView({behavior:`smooth`,block:`start`}),i(t)}}}function fe({headings:e,current:t,go:n}){return(0,N.jsxs)(`nav`,{className:`vault-outline min-h-0 overflow-auto border-l border-rule-soft px-5 pt-[72px] pb-6 @max-[1080px]:hidden`,"aria-label":`Outline`,children:[(0,N.jsx)(`h2`,{className:`m-0 mb-2 text-xs font-semibold text-muted`,children:`On this page`}),(0,N.jsx)(`ol`,{className:`m-0 grid list-none gap-0.5 p-0`,children:e.map(e=>(0,N.jsx)(`li`,{children:(0,N.jsx)(`button`,{type:`button`,className:l(`block w-full truncate rounded-r-[8px] border-0 bg-transparent px-2.5 py-1 text-left text-sm text-text hover:bg-surface`,t===e.index&&`font-semibold text-accent shadow-[inset_2px_0_0_var(--accent)]`),"aria-current":t===e.index?`location`:void 0,onClick:()=>n(e.index),children:e.text})},e.index))})]})}var pe=[],$=(e,t)=>[e?`272px`:null,`minmax(0,1fr)`,t?`232px`:null].filter(Boolean).join(` `);function me({data:e,companion:t,search:n,stale:i,refresh:a,filter:o,setFilter:s,hidden:c}){return(0,N.jsxs)(`aside`,{hidden:c,className:`vault-tree-panel flex min-h-0 flex-col border-r border-rule @max-[720px]:max-h-[40vh] @max-[720px]:border-r-0 @max-[720px]:border-b`,id:`vault-tree-panel`,"aria-label":`Files`,children:[(0,N.jsxs)(`div`,{className:`flex items-center justify-between pt-3 pr-2.5 pb-2 pl-5`,children:[(0,N.jsx)(`strong`,{className:`text-sm`,children:`Files`}),(0,N.jsx)(r,{label:`Refresh tree`,side:`bottom`,children:(0,N.jsx)(k,{size:`icon-sm`,variant:`ghost`,"aria-label":a.isPending?`Refreshing…`:`Refresh tree`,onClick:()=>a.mutate(),disabled:a.isPending,children:(0,N.jsx)(D,{name:`refresh`,className:a.isPending?`animate-spin`:void 0})})})]}),(0,N.jsx)(`p`,{id:`vault-stale`,className:Y+` mx-2.5`,role:`status`,hidden:!i,children:`Files changed — refresh tree.`}),a.error?(0,N.jsx)(`p`,{className:Y+` mx-2.5`,role:`status`,children:a.error.message}):null,(0,N.jsxs)(`label`,{className:`mx-3.5 mb-2 flex h-[34px] items-center gap-2 rounded-control border border-rule bg-surface pr-2 pl-2.5 text-muted focus-within:border-accent`,children:[(0,N.jsx)(D,{name:`search`,className:`size-3.5`}),(0,N.jsx)(`input`,{type:`search`,id:`vault-filter`,className:`vault-filter min-w-0 flex-1 border-0 bg-transparent text-sm text-text outline-none placeholder:text-muted`,placeholder:`Go to file`,"aria-label":`Go to file`,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Escape`&&s(``)}})]}),(0,N.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto px-2.5 pb-6`,children:o.trim()?(0,N.jsx)(oe,{companion:t,query:o,search:n}):(0,N.jsx)(ie,{data:e,companion:t,search:n})})]})}function he({companion:e,rootName:t,writable:a,search:o}){let l=c(),u=S(E(e,o)),f=S({...E(e,o,!0),enabled:!(!u.data||u.data.tree!==null||u.data.failure)}).data??u.data,[p,m]=(0,j.useState)(``),g=n(e=>e.latestGeneration),_=n(e=>e.treeHidden),v=n(e=>e.toggleTree),y=n(e=>e.hydrate);(0,j.useEffect)(y,[y]);let b=s({mutationFn:()=>d({data:{companion:e,path:o.path,dir:o.dir,refresh:!0,wait:!0}}),onSuccess:t=>void h(l,e,o,t)}),x=(0,j.useRef)(null),C=!!f?.open&&o.mode!==`edit`,w=C?ue(f?.open?.markdown):pe,T=de(x,C?f?.open?.markdown:void 0,w.length);if(!f)return(0,N.jsx)(i,{});let O=g!==null&&f.generation!==null&&g>f.generation,A=w.length>0,M=(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(r,{label:_?`Show files`:`Hide files`,side:`bottom`,children:(0,N.jsx)(k,{size:`icon-sm`,variant:`ghost`,id:`vault-tree-toggle`,"aria-controls":`vault-tree-panel`,"aria-expanded":!_,"aria-label":_?`Show files`:`Hide files`,onClick:v,children:(0,N.jsx)(D,{name:`sidebar`})})}),(0,N.jsx)(se,{rootName:t,search:o})]});return(0,N.jsx)(`div`,{className:`@container flex min-h-0 flex-1 flex-col`,children:(0,N.jsxs)(`section`,{className:`vault-layout grid min-h-0 flex-1 border-t border-rule @max-[720px]:grid-cols-1!`,style:{"--vault-wide":$(!0,A),"--vault-wide-bare":$(!1,A),"--vault-narrow":$(!0,!1),"--vault-narrow-bare":$(!1,!1)},"data-vault-layout":!0,children:[(0,N.jsx)(me,{data:f,companion:e,search:o,stale:O,refresh:b,filter:p,setFilter:m,hidden:_}),(0,N.jsx)(`div`,{ref:x,className:`vault-main min-h-0 min-w-0 overflow-auto scroll-smooth`,"data-vault-main":!0,"data-vault-pane":!0,children:o.path||f.open||f.refusal?(0,N.jsx)(z,{companion:e,data:f,writable:a,search:o,crumbs:M}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(F,{crumbs:M}),(0,N.jsx)(le,{data:f,rootName:t})]})}),A?(0,N.jsx)(fe,{headings:w,...T}):null]})})}function ge(){let e=a.useSearch(),{data:n}=t(g({companion:e.companion,studioMode:e.studioMode}));if(!e.companion||!n.selected)return null;let r=n.selected.path.split(/[\\/]/).findLast(Boolean)??`companion`;return(0,N.jsx)(he,{companion:e.companion,rootName:r,writable:n.writable,search:{path:e.path,dir:e.dir,mode:e.mode}})}export{ge as component};
@@ -0,0 +1 @@
1
+ import{Ar as e,da as t,rt as n}from"./button-BIIHE0EQ.js";var r=t();function i({warnings:t}){return t.length===0?null:(0,r.jsx)(`section`,{className:e(n,`pb-4`),"aria-label":`Warnings`,children:(0,r.jsxs)(`div`,{className:`warnings grid gap-1.5 rounded-card border border-[color-mix(in_srgb,var(--warn)_35%,var(--border))] bg-warn-soft px-4 py-3 text-sm`,children:[(0,r.jsx)(`h2`,{className:`m-0 text-sm font-semibold text-warn`,children:`Some data could not be read`}),(0,r.jsx)(`ul`,{className:`m-0 grid list-none gap-1 p-0`,children:t.map(e=>(0,r.jsx)(`li`,{children:e},e))})]})})}export{i as t};
@@ -0,0 +1 @@
1
+ import{da as e,ki as t,zr as n}from"./button-BIIHE0EQ.js";import{T as r,t as i,y as a}from"./index-B3wkMzjA.js";import{t as o}from"./companion-view-DM6YyXaR.js";import{t as s}from"./warnings-BSXIyuSQ.js";import{t as c}from"./delivery-path-DELxj0Av.js";var l=e(),u=[{node:`propose`,label:`Propose change`},{node:`reviews`,label:`Human review`},{node:`apply`,label:`Apply change`},{node:`archive`,label:`Archive change`}];function d(e){let t=u.map(t=>({...t,changes:e.flatMap(e=>r(e).stage===t.label?[e.name]:[])})),n={};for(let e of t)e.changes.length>0&&(n[e.node]=e.changes.length);return{counts:n,byStage:t}}var f=[];function p({payload:e,changes:t=f}){let{counts:n,byStage:r}=d(t);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s,{warnings:e.warnings}),(0,l.jsx)(`div`,{className:`workflow-view`,children:(0,l.jsx)(c,{payload:e,counts:n,changesByStage:r})})]})}var m=function(){let e=i.useSearch(),r=a(),s=t({...n(`dashboard`,e),enabled:r});return(0,l.jsx)(o,{view:`workflow`,search:e,children:e=>(0,l.jsx)(p,{payload:{skills:e.skills??[],topology:e.topology??null,warnings:e.warnings},changes:s.data?.changes??[]})})};export{m as component};
@@ -3834,39 +3834,209 @@ function useMatch(opts) {
3834
3834
  return opts.select ? opts.select(match) : match;
3835
3835
  }
3836
3836
  }
3837
+ // ../../node_modules/.bun/react-dom@19.2.7+e14d3f224186685e/node_modules/react-dom/cjs/react-dom.production.js
3838
+ /**
3839
+ * @license React
3840
+ * react-dom.production.js
3841
+ *
3842
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3843
+ *
3844
+ * This source code is licensed under the MIT license found in the
3845
+ * LICENSE file in the root directory of this source tree.
3846
+ */
3847
+ var require_react_dom_production = /* @__PURE__ */ __commonJSMin(((exports) => {
3848
+ var React = require_react();
3849
+ function formatProdErrorMessage(code) {
3850
+ var url = "https://react.dev/errors/" + code;
3851
+ if (1 < arguments.length) {
3852
+ url += "?args[]=" + encodeURIComponent(arguments[1]);
3853
+ for (var i = 2; i < arguments.length; i++) url += "&args[]=" + encodeURIComponent(arguments[i]);
3854
+ }
3855
+ return "Minified React error #" + code + "; visit " + url + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
3856
+ }
3857
+ function noop() {}
3858
+ var Internals = {
3859
+ d: {
3860
+ f: noop,
3861
+ r: function() {
3862
+ throw Error(formatProdErrorMessage(522));
3863
+ },
3864
+ D: noop,
3865
+ C: noop,
3866
+ L: noop,
3867
+ m: noop,
3868
+ X: noop,
3869
+ S: noop,
3870
+ M: noop
3871
+ },
3872
+ p: 0,
3873
+ findDOMNode: null
3874
+ };
3875
+ var REACT_PORTAL_TYPE = Symbol.for("react.portal");
3876
+ function createPortal$1(children, containerInfo, implementation) {
3877
+ var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
3878
+ return {
3879
+ $$typeof: REACT_PORTAL_TYPE,
3880
+ key: null == key ? null : "" + key,
3881
+ children,
3882
+ containerInfo,
3883
+ implementation
3884
+ };
3885
+ }
3886
+ var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
3887
+ function getCrossOriginStringAs(as, input) {
3888
+ if ("font" === as) return "";
3889
+ if ("string" === typeof input) return "use-credentials" === input ? input : "";
3890
+ }
3891
+ exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
3892
+ exports.createPortal = function(children, container) {
3893
+ var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
3894
+ if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType) throw Error(formatProdErrorMessage(299));
3895
+ return createPortal$1(children, container, null, key);
3896
+ };
3897
+ exports.flushSync = function(fn) {
3898
+ var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p;
3899
+ try {
3900
+ if (ReactSharedInternals.T = null, Internals.p = 2, fn) return fn();
3901
+ } finally {
3902
+ ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f();
3903
+ }
3904
+ };
3905
+ exports.preconnect = function(href, options) {
3906
+ "string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options));
3907
+ };
3908
+ exports.prefetchDNS = function(href) {
3909
+ "string" === typeof href && Internals.d.D(href);
3910
+ };
3911
+ exports.preinit = function(href, options) {
3912
+ if ("string" === typeof href && options && "string" === typeof options.as) {
3913
+ var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = "string" === typeof options.integrity ? options.integrity : void 0, fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0;
3914
+ "style" === as ? Internals.d.S(href, "string" === typeof options.precedence ? options.precedence : void 0, {
3915
+ crossOrigin,
3916
+ integrity,
3917
+ fetchPriority
3918
+ }) : "script" === as && Internals.d.X(href, {
3919
+ crossOrigin,
3920
+ integrity,
3921
+ fetchPriority,
3922
+ nonce: "string" === typeof options.nonce ? options.nonce : void 0
3923
+ });
3924
+ }
3925
+ };
3926
+ exports.preinitModule = function(href, options) {
3927
+ if ("string" === typeof href) if ("object" === typeof options && null !== options) {
3928
+ if (null == options.as || "script" === options.as) {
3929
+ var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
3930
+ Internals.d.M(href, {
3931
+ crossOrigin,
3932
+ integrity: "string" === typeof options.integrity ? options.integrity : void 0,
3933
+ nonce: "string" === typeof options.nonce ? options.nonce : void 0
3934
+ });
3935
+ }
3936
+ } else options ?? Internals.d.M(href);
3937
+ };
3938
+ exports.preload = function(href, options) {
3939
+ if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) {
3940
+ var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
3941
+ Internals.d.L(href, as, {
3942
+ crossOrigin,
3943
+ integrity: "string" === typeof options.integrity ? options.integrity : void 0,
3944
+ nonce: "string" === typeof options.nonce ? options.nonce : void 0,
3945
+ type: "string" === typeof options.type ? options.type : void 0,
3946
+ fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0,
3947
+ referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0,
3948
+ imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
3949
+ imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0,
3950
+ media: "string" === typeof options.media ? options.media : void 0
3951
+ });
3952
+ }
3953
+ };
3954
+ exports.preloadModule = function(href, options) {
3955
+ if ("string" === typeof href) if (options) {
3956
+ var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
3957
+ Internals.d.m(href, {
3958
+ as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0,
3959
+ crossOrigin,
3960
+ integrity: "string" === typeof options.integrity ? options.integrity : void 0
3961
+ });
3962
+ } else Internals.d.m(href);
3963
+ };
3964
+ exports.requestFormReset = function(form) {
3965
+ Internals.d.r(form);
3966
+ };
3967
+ exports.unstable_batchedUpdates = function(fn, a) {
3968
+ return fn(a);
3969
+ };
3970
+ exports.useFormState = function(action, initialState, permalink) {
3971
+ return ReactSharedInternals.H.useFormState(action, initialState, permalink);
3972
+ };
3973
+ exports.useFormStatus = function() {
3974
+ return ReactSharedInternals.H.useHostTransitionStatus();
3975
+ };
3976
+ exports.version = "19.2.7";
3977
+ }));
3978
+ // ../../node_modules/.bun/react-dom@19.2.7+e14d3f224186685e/node_modules/react-dom/index.js
3979
+ var require_react_dom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3980
+ function checkDCE() {
3981
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== "function") return;
3982
+ try {
3983
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
3984
+ } catch (err) {
3985
+ console.error(err);
3986
+ }
3987
+ }
3988
+ checkDCE();
3989
+ module.exports = require_react_dom_production();
3990
+ }));
3837
3991
  // \0%23tanstack-start-server-fn-resolver
3838
3992
  var manifest = {
3839
3993
  "332ea72d0b70383661ce66a3228167cb05dc752e7269134a11855d1329c936aa": {
3840
3994
  functionName: "getFactory_createServerFn_handler",
3841
- importer: () => import("./factory-DT3UzHlh.js")
3995
+ importer: () => import("./factory-DGPmNGbo.js")
3842
3996
  },
3843
3997
  "63d1e2171062e2d082e16522c162963c4da2a71c447f69f0937bd6e5e10b73ba": {
3844
3998
  functionName: "saveVaultFile_createServerFn_handler",
3845
- importer: () => import("./vault-BGulVoNh.js")
3999
+ importer: () => import("./vault-BmWnryh3.js")
3846
4000
  },
3847
4001
  "7564d662d1e0ede6133407d7dde8d613b3b11718bc4f95160680342deeaf9cfd": {
3848
4002
  functionName: "getVaultChildren_createServerFn_handler",
3849
- importer: () => import("./vault-BGulVoNh.js")
4003
+ importer: () => import("./vault-BmWnryh3.js")
4004
+ },
4005
+ "8a3086c4bf87fd353e471c38fe6c5e531cb9aa6b29b234d7edb6de5d143cf689": {
4006
+ functionName: "getSkillPreview_createServerFn_handler",
4007
+ importer: () => import("./skills-CtrBAtX3.js")
4008
+ },
4009
+ "990d830ca9afc020639551c43ec50904b734051c52b1ad91dbf739065b343bb3": {
4010
+ functionName: "getReports_createServerFn_handler",
4011
+ importer: () => import("./reports-C06RXVE2.js")
3850
4012
  },
3851
4013
  "99f4d57911b5959a331ed18424ab13369de22f8b2b142a146ea967742dfbc997": {
3852
4014
  functionName: "getVaultMatches_createServerFn_handler",
3853
- importer: () => import("./vault-BGulVoNh.js")
4015
+ importer: () => import("./vault-BmWnryh3.js")
4016
+ },
4017
+ "9d1ee2ce056a1b26a05141623f6d836fa1c4c283e555132764a528a212e3c50a": {
4018
+ functionName: "deleteCompanion_createServerFn_handler",
4019
+ importer: () => import("./companions-BYbHWKOZ.js")
3854
4020
  },
3855
4021
  "a09876e9d912d4f3edfe004081679f011fcebe77cfe1b2b25cf6f3e6f1eafc6a": {
3856
4022
  functionName: "getCompanionView_createServerFn_handler",
3857
- importer: () => import("./views-Bd7cRr27.js")
4023
+ importer: () => import("./views-BgYa-za2.js")
3858
4024
  },
3859
4025
  "b0ff357be654d7d833a4f9550953dda5e215e97cdc5b21639aef40d8a2401c4f": {
3860
4026
  functionName: "runFactoryAction_createServerFn_handler",
3861
- importer: () => import("./factory-DT3UzHlh.js")
4027
+ importer: () => import("./factory-DGPmNGbo.js")
3862
4028
  },
3863
4029
  "b4cd58adfccec803b6c97478c78656e3acf554351ec97ef0ce550a10e235ebce": {
3864
4030
  functionName: "getShell_createServerFn_handler",
3865
- importer: () => import("./shell-CboT2f66.js")
4031
+ importer: () => import("./shell-DS3wUexh.js")
4032
+ },
4033
+ "c9e07976b298f1d1353d3422b03638f260b66975d28a1c8b07919923be8c488d": {
4034
+ functionName: "previewVaultFile_createServerFn_handler",
4035
+ importer: () => import("./vault-BmWnryh3.js")
3866
4036
  },
3867
4037
  "cc0685774bfb5205a762c25bdd4b959c1f541584df4b67aac816fe529fa37c87": {
3868
4038
  functionName: "getVault_createServerFn_handler",
3869
- importer: () => import("./vault-BGulVoNh.js")
4039
+ importer: () => import("./vault-BmWnryh3.js")
3870
4040
  }
3871
4041
  };
3872
4042
  async function getServerFnById(id, access) {
@@ -3878,4 +4048,4 @@ async function getServerFnById(id, access) {
3878
4048
  if (!action) throw new Error("Server function module export not resolved for serverFn ID: " + id);
3879
4049
  return action;
3880
4050
  }
3881
- export { require_react as A, createSieveCache as C, trimPathRight as D, trimPathLeft as E, rootRouteId as O, invariant as S, removeTrailingSlash as T, createServerHistory as _, createLinkScope as a, defaultGetScrollRestorationKey as b, routerContext as c, useLayoutEffect as d, waitForReason as f, getLocationChangeInfo as g, RouterCore as h, useSelector as i, isNotFound as k, require_jsx_runtime as l, _getRenderedMatches as m, useMatch as n, matchContext as o, _getAssetMatches as p, useStructuralSharing as r, useRouter as s, getServerFnById as t, reactUse as u, createNonReactiveMutableStore as v, cleanPath as w, storageKey as x, createNonReactiveReadonlyStore as y };
4051
+ export { isNotFound as A, invariant as C, trimPathLeft as D, removeTrailingSlash as E, trimPathRight as O, storageKey as S, cleanPath as T, getLocationChangeInfo as _, useSelector as a, createNonReactiveReadonlyStore as b, useRouter as c, reactUse as d, useLayoutEffect as f, RouterCore as g, _getRenderedMatches as h, useStructuralSharing as i, require_react as j, rootRouteId as k, routerContext as l, _getAssetMatches as m, require_react_dom as n, createLinkScope as o, waitForReason as p, useMatch as r, matchContext as s, getServerFnById as t, require_jsx_runtime as u, createServerHistory as v, createSieveCache as w, defaultGetScrollRestorationKey as x, createNonReactiveMutableStore as y };
@@ -12,73 +12,83 @@ var tsrStartManifest = () => ({ routes: {
12
12
  "/workflow"
13
13
  ],
14
14
  preloads: [
15
- "/assets/index-n6uo_92S.js",
15
+ "/assets/index-B3wkMzjA.js",
16
16
  "/assets/rolldown-runtime-WkwZ5CU-.js",
17
- "/assets/studio-queries-rvbJupCy.js",
18
- "/assets/prepaint-CD5OpmTM.js",
19
- "/assets/queries-CN3JwMBX.js",
20
- "/assets/react-CabXf2Ds.js",
17
+ "/assets/button-BIIHE0EQ.js",
18
+ "/assets/prepaint-CwSrpdFA.js",
19
+ "/assets/react-CN2GSx7x.js",
21
20
  "/assets/preload-helper-BLdHbfdN.js"
22
21
  ],
23
22
  scripts: [{ attrs: {
24
23
  type: "module",
25
24
  async: !0,
26
- src: "/assets/index-n6uo_92S.js"
25
+ src: "/assets/index-B3wkMzjA.js"
27
26
  } }]
28
27
  },
29
28
  "/": {
30
29
  filePath: "src/routes/index.tsx",
31
30
  children: void 0,
32
31
  preloads: [
33
- "/assets/routes-4pbC-2Hj.js",
34
- "/assets/companion-view-Csva26Ir.js",
35
- "/assets/spec-areas-C2L48N4C.js",
36
- "/assets/report-time-Dc-KOqQu.js",
37
- "/assets/warnings-V_Ys51wJ.js"
32
+ "/assets/routes-COm-G3mK.js",
33
+ "/assets/companion-view-DM6YyXaR.js",
34
+ "/assets/panel-CbajlC3p.js",
35
+ "/assets/warnings-BSXIyuSQ.js",
36
+ "/assets/markdown-view-pQ2Qp_i5.js"
38
37
  ]
39
38
  },
40
39
  "/factory": {
41
40
  filePath: "src/routes/factory.tsx",
42
41
  children: void 0,
43
42
  preloads: [
44
- "/assets/factory-B7l9ZQyx.js",
45
- "/assets/warnings-V_Ys51wJ.js",
46
- "/assets/delivery-path-DJMpRmiY.js"
43
+ "/assets/factory-BZy0E8ty.js",
44
+ "/assets/warnings-BSXIyuSQ.js",
45
+ "/assets/panel-CbajlC3p.js",
46
+ "/assets/delivery-path-DELxj0Av.js",
47
+ "/assets/steps-DFsH3Neu.js"
47
48
  ]
48
49
  },
49
50
  "/reports": {
50
51
  filePath: "src/routes/reports.tsx",
51
52
  children: void 0,
52
- preloads: ["/assets/reports-C01RsnMA.js", "/assets/report-time-Dc-KOqQu.js"]
53
+ preloads: ["/assets/reports-DllhYQ5_.js", "/assets/panel-CbajlC3p.js"]
53
54
  },
54
55
  "/skills": {
55
56
  filePath: "src/routes/skills.tsx",
56
57
  children: void 0,
57
- preloads: ["/assets/skills-CihQganl.js", "/assets/companion-view-Csva26Ir.js"]
58
+ preloads: [
59
+ "/assets/skills-DmWAy-jZ.js",
60
+ "/assets/companion-view-DM6YyXaR.js",
61
+ "/assets/panel-CbajlC3p.js",
62
+ "/assets/steps-DFsH3Neu.js",
63
+ "/assets/markdown-view-pQ2Qp_i5.js"
64
+ ]
58
65
  },
59
66
  "/specs": {
60
67
  filePath: "src/routes/specs.tsx",
61
68
  children: void 0,
62
69
  preloads: [
63
- "/assets/specs-D24_35_K.js",
64
- "/assets/companion-view-Csva26Ir.js",
65
- "/assets/warnings-V_Ys51wJ.js",
66
- "/assets/spec-areas-C2L48N4C.js"
70
+ "/assets/specs-BG3Wi3ln.js",
71
+ "/assets/companion-view-DM6YyXaR.js",
72
+ "/assets/panel-CbajlC3p.js",
73
+ "/assets/markdown-view-pQ2Qp_i5.js",
74
+ "/assets/warnings-BSXIyuSQ.js"
67
75
  ]
68
76
  },
69
77
  "/vault": {
70
78
  filePath: "src/routes/vault.tsx",
71
79
  children: void 0,
72
- preloads: ["/assets/vault-Bd4CQiTK.js"]
80
+ preloads: ["/assets/vault-B2q1nBY5.js", "/assets/markdown-view-pQ2Qp_i5.js"]
73
81
  },
74
82
  "/workflow": {
75
83
  filePath: "src/routes/workflow.tsx",
76
84
  children: void 0,
77
85
  preloads: [
78
- "/assets/workflow-BJejeVwQ.js",
79
- "/assets/companion-view-Csva26Ir.js",
80
- "/assets/warnings-V_Ys51wJ.js",
81
- "/assets/delivery-path-DJMpRmiY.js"
86
+ "/assets/workflow-DlsQD6Hc.js",
87
+ "/assets/companion-view-DM6YyXaR.js",
88
+ "/assets/warnings-BSXIyuSQ.js",
89
+ "/assets/delivery-path-DELxj0Av.js",
90
+ "/assets/panel-CbajlC3p.js",
91
+ "/assets/steps-DFsH3Neu.js"
82
92
  ]
83
93
  }
84
94
  } });