@uniqbit/mate-core 1.0.0-canary.6 → 1.0.0-canary.8

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 (249) hide show
  1. package/claude-capability-plugins/companion-mentions/.claude-plugin/plugin.json +1 -1
  2. package/package.json +6 -3
  3. package/src/cli/commands/artifact/delivery/submit.ts +6 -4
  4. package/src/cli/commands/artifact/finish/command.ts +28 -11
  5. package/src/cli/commands/artifact/pending/command.ts +71 -7
  6. package/src/cli/commands/cap/tokensave.ts +2 -2
  7. package/src/cli/commands/companion/update.ts +2 -3
  8. package/src/cli/commands/doctor.ts +67 -4
  9. package/src/cli/commands/friction.ts +558 -0
  10. package/src/cli/commands/install.ts +8 -4
  11. package/src/cli/commands/plugin/install.ts +82 -35
  12. package/src/cli/commands/studio/connection.ts +53 -0
  13. package/src/cli/commands/studio/routes.ts +3 -0
  14. package/src/cli/commands/studio/selection.ts +10 -1
  15. package/src/cli/commands/studio/server.ts +31 -0
  16. package/src/cli/commands/studio/service-host.ts +3 -0
  17. package/src/cli/commands/studio/services.ts +25 -0
  18. package/src/cli/commands/triage.ts +172 -0
  19. package/src/cli/commands/vscode/release-vsix.json +2 -2
  20. package/src/cli/install-plan.tsx +3 -0
  21. package/src/cli/main.ts +85 -19
  22. package/src/cli/plugin-commands.ts +6 -1
  23. package/src/cli/usage.ts +12 -2
  24. package/src/create-mate.ts +11 -5
  25. package/src/distribution.ts +2 -0
  26. package/src/factory-host.ts +6 -0
  27. package/src/hooks/validate-artifact-path.ts +64 -14
  28. package/src/index.ts +1 -0
  29. package/src/lib/delivery/merge-git.ts +31 -7
  30. package/src/lib/delivery/overlap.ts +14 -1
  31. package/src/lib/delivery/repository-access.ts +11 -6
  32. package/src/lib/delivery/staging/apply-chain.ts +25 -7
  33. package/src/lib/delivery/staging/linked-merges.ts +175 -0
  34. package/src/lib/delivery/staging/naming.ts +3 -0
  35. package/src/lib/delivery/staging/openspec-type.ts +38 -7
  36. package/src/lib/delivery/staging/pending.ts +153 -11
  37. package/src/lib/delivery/staging/preflight.ts +239 -0
  38. package/src/lib/delivery/staging/project.ts +243 -104
  39. package/src/lib/delivery/staging/replay.ts +5 -3
  40. package/src/lib/delivery/staging/settle-linked.ts +5 -119
  41. package/src/lib/delivery/staging/submit.ts +139 -18
  42. package/src/lib/delivery/submit-change.ts +163 -37
  43. package/src/lib/friction/describe.ts +42 -0
  44. package/src/lib/friction/fields.ts +60 -0
  45. package/src/lib/friction/mark.ts +194 -0
  46. package/src/lib/friction/view/model.ts +67 -0
  47. package/src/lib/friction/view/read.ts +145 -0
  48. package/src/lib/friction/view/select.ts +54 -0
  49. package/src/lib/openspec-cli.ts +10 -5
  50. package/src/lib/orchestrator/adapters/claude.ts +5 -4
  51. package/src/lib/orchestrator/adapters/opencode.ts +2 -0
  52. package/src/lib/orchestrator/root-context.ts +23 -6
  53. package/src/lib/package-paths.ts +23 -15
  54. package/src/lib/session-attribution.ts +3 -7
  55. package/src/lib/skills-cli.ts +38 -0
  56. package/src/lib/tool-manifest.ts +73 -0
  57. package/src/lib/triage/context.ts +312 -0
  58. package/src/lib/triage/launch.ts +52 -0
  59. package/src/lib/triage/prepare.ts +112 -0
  60. package/src/lib/triage/session.ts +126 -0
  61. package/src/opencode/companion-hooks.ts +53 -5
  62. package/src/opencode/projected-guidance.ts +2 -0
  63. package/src/playbooks/companion-guidance.ts +2 -2
  64. package/src/plugin-api.ts +6 -0
  65. package/src/runtime/command-arg.ts +15 -0
  66. package/src/runtime/command-friction.ts +97 -0
  67. package/src/runtime/companion-guidance.ts +33 -16
  68. package/src/runtime/friction-fingerprint.ts +35 -0
  69. package/src/runtime/friction-log.ts +376 -0
  70. package/src/runtime/friction-recorder.ts +212 -0
  71. package/src/runtime/friction-retention.ts +1 -0
  72. package/src/runtime/friction-state.ts +110 -0
  73. package/src/runtime/friction-switch.ts +26 -0
  74. package/src/runtime/friction-vocabulary.ts +42 -0
  75. package/src/runtime/git-tracked.ts +13 -2
  76. package/src/runtime/projected-guidance.ts +2 -1
  77. package/src/runtime/secret-values.ts +16 -0
  78. package/src/runtime/session-id.ts +24 -0
  79. package/src/runtime/session-prepare-runner.ts +3 -0
  80. package/src/runtime/workflow/next-handoff-process.ts +2 -1
  81. package/src/studio.ts +47 -1
  82. package/src/templates/capabilities/openspec-cap/mate-minimal/schema.yaml +5 -1
  83. package/src/templates/capabilities/react-doctor/mate-react-doctor/SKILL.md +28 -0
  84. package/src/templates/mate-skills/agents/mate-apply-change/SKILL.md +42 -4
  85. package/src/templates/mate-skills/agents/mate-archive-change/SKILL.md +27 -2
  86. package/src/templates/mate-skills/agents/mate-backfill-spec/SKILL.md +23 -1
  87. package/src/templates/mate-skills/agents/mate-clarify-intent/SKILL.md +26 -1
  88. package/src/templates/mate-skills/agents/mate-domain-modeling/SKILL.md +28 -0
  89. package/src/templates/mate-skills/agents/mate-explore-change/SKILL.md +28 -3
  90. package/src/templates/mate-skills/agents/mate-grill-me/SKILL.md +28 -0
  91. package/src/templates/mate-skills/agents/mate-grill-with-docs/SKILL.md +28 -0
  92. package/src/templates/mate-skills/agents/mate-grilling/SKILL.md +25 -0
  93. package/src/templates/mate-skills/agents/mate-interview-me/SKILL.md +28 -0
  94. package/src/templates/mate-skills/agents/mate-propose-change/SKILL.md +28 -3
  95. package/src/templates/mate-skills/agents/mate-publish-artifact/SKILL.md +28 -6
  96. package/src/templates/mate-skills/agents/mate-show-me/SKILL.md +27 -2
  97. package/src/templates/mate-skills/agents/mate-simplify-code/SKILL.md +28 -0
  98. package/src/templates/mate-skills/agents/mate-submit-change/SKILL.md +24 -2
  99. package/src/templates/mate-skills/claude/mate-apply-change/SKILL.md +42 -4
  100. package/src/templates/mate-skills/claude/mate-archive-change/SKILL.md +27 -2
  101. package/src/templates/mate-skills/claude/mate-backfill-spec/SKILL.md +23 -1
  102. package/src/templates/mate-skills/claude/mate-clarify-intent/SKILL.md +26 -1
  103. package/src/templates/mate-skills/claude/mate-domain-modeling/SKILL.md +28 -0
  104. package/src/templates/mate-skills/claude/mate-explore-change/SKILL.md +28 -3
  105. package/src/templates/mate-skills/claude/mate-grill-me/SKILL.md +28 -0
  106. package/src/templates/mate-skills/claude/mate-grill-with-docs/SKILL.md +28 -0
  107. package/src/templates/mate-skills/claude/mate-grilling/SKILL.md +25 -0
  108. package/src/templates/mate-skills/claude/mate-interview-me/SKILL.md +28 -0
  109. package/src/templates/mate-skills/claude/mate-propose-change/SKILL.md +28 -3
  110. package/src/templates/mate-skills/claude/mate-publish-artifact/SKILL.md +28 -6
  111. package/src/templates/mate-skills/claude/mate-show-me/SKILL.md +27 -2
  112. package/src/templates/mate-skills/claude/mate-simplify-code/SKILL.md +28 -0
  113. package/src/templates/mate-skills/claude/mate-submit-change/SKILL.md +24 -2
  114. package/src/templates/triage/PLAYBOOK.md +120 -0
  115. package/src/tools/setup/__snapshots__/runtime-surface-golden.test.ts.snap +108 -108
  116. package/src/tools/setup/capabilities/graphify.ts +23 -1
  117. package/src/tools/setup/capabilities/rtk.ts +46 -94
  118. package/src/tools/setup/capabilities/tokensave.ts +76 -54
  119. package/src/tools/setup/dynamic-plugins/audiences.ts +28 -14
  120. package/src/tools/setup/dynamic-plugins/hydrate.ts +32 -14
  121. package/src/tools/setup/dynamic-plugins/install.ts +2 -0
  122. package/src/tools/setup/dynamic-plugins/installed.ts +73 -0
  123. package/src/tools/setup/dynamic-plugins/loader.ts +12 -10
  124. package/src/tools/setup/dynamic-plugins/local.ts +492 -0
  125. package/src/tools/setup/dynamic-plugins/paths.ts +34 -6
  126. package/src/tools/setup/dynamic-plugins/verify.ts +34 -14
  127. package/src/tools/setup/dynamic-plugins/workspaces.ts +17 -8
  128. package/src/tools/setup/mate.ts +26 -1
  129. package/src/tools/setup/plugin.ts +5 -0
  130. package/src/tools/setup/plugins/gitignore.ts +45 -12
  131. package/src/tools/setup/service.ts +12 -0
  132. package/src/tools/setup/utils.ts +10 -1
  133. package/src/tools/setup.ts +16 -2
  134. package/studio-dist/client/assets/app-ggXJ_QVh.css +2 -0
  135. package/studio-dist/client/assets/button-amJ3g5oD.js +1 -0
  136. package/studio-dist/client/assets/cn-BQPKiwI4.js +1 -0
  137. package/studio-dist/client/assets/combobox-CJ7aGFid.js +1 -0
  138. package/studio-dist/client/assets/{companion-view-BVaZNtiI.js → companion-view-C_N237bf.js} +1 -1
  139. package/studio-dist/client/assets/fields-BAiGkJ5N.js +1 -0
  140. package/studio-dist/client/assets/friction-DqOU59v7.js +1 -0
  141. package/studio-dist/client/assets/getting-started-djaQeWlu.js +1 -0
  142. package/studio-dist/client/assets/getting-started-yp42dj5S.js +1 -0
  143. package/studio-dist/client/assets/getting-started._topic-C9zVXz_m.js +1 -0
  144. package/studio-dist/client/assets/getting-started.index-DWbDKICP.js +1 -0
  145. package/studio-dist/client/assets/graph-BYaD_5Bq.js +2 -0
  146. package/studio-dist/client/assets/{graph-canvas-DDuzsNSx.js → graph-canvas-ySGKMhmk.js} +1 -1
  147. package/studio-dist/client/assets/guides-D6T6W_jV.js +1 -0
  148. package/studio-dist/client/assets/index-Qx7reRPD.js +40 -0
  149. package/studio-dist/client/assets/markdown-view-jMiaBTSO.js +1 -0
  150. package/studio-dist/client/assets/panel-C4bf_h2W.js +1 -0
  151. package/studio-dist/client/assets/plugins._service._view-y6f2FDAB.js +1 -0
  152. package/studio-dist/client/assets/prepaint-CKsXyJOR.js +27 -0
  153. package/studio-dist/client/assets/{queries-axYk2u9L.js → queries-Dfp5deWj.js} +1 -1
  154. package/studio-dist/client/assets/react-BYUSgtBs.js +1 -0
  155. package/studio-dist/client/assets/reports-JFSwSueq.js +1 -0
  156. package/studio-dist/client/assets/routes-BdOWSgzK.js +1 -0
  157. package/studio-dist/client/assets/search-CXosfvYh.js +1 -0
  158. package/studio-dist/client/assets/select-BHYYWPhK.js +1 -0
  159. package/studio-dist/client/assets/skills-Bo9FLsBd.js +1 -0
  160. package/studio-dist/client/assets/{specs-DU1kqcp5.js → specs-BrCOjOch.js} +1 -1
  161. package/studio-dist/client/assets/specs-view-CdE2rlli.js +1 -0
  162. package/studio-dist/client/assets/{steps-DhIFuAZy.js → steps-CKUno4lh.js} +1 -1
  163. package/studio-dist/client/assets/store-C3vJq8Wj.js +1 -0
  164. package/studio-dist/client/assets/{studio-BR9j15J0.js → studio-0ueISxwP.js} +8 -8
  165. package/studio-dist/client/assets/{studio-queries-CFP_yTpr.js → studio-queries-BflKt9va.js} +2 -2
  166. package/studio-dist/client/assets/{usage-CHmwtkoM.js → usage-BLsLy0nN.js} +16 -16
  167. package/studio-dist/client/assets/useAnchoredPopupScrollLock-DC7f8GOp.js +1 -0
  168. package/studio-dist/client/assets/useMutation-uJUrejsi.js +1 -0
  169. package/studio-dist/client/assets/vault-BB1B_OhR.js +1 -0
  170. package/studio-dist/client/assets/warnings-CqOOGlPD.js +1 -0
  171. package/studio-dist/client/assets/workflow-BFzmI-06.js +1 -0
  172. package/studio-dist/server/assets/{__23tanstack-start-server-fn-resolver-DAbZ6fzY.js → __23tanstack-start-server-fn-resolver-gVfW5vIV.js} +30 -14
  173. package/studio-dist/server/assets/_tanstack-start-manifest_v.js +66 -50
  174. package/studio-dist/server/assets/{button-BfoNadNR.js → button-D6bvrFmm.js} +226 -3478
  175. package/studio-dist/server/assets/cn-FXJAM0KO.js +5528 -0
  176. package/studio-dist/server/assets/combobox-D2MbYV1O.js +484 -0
  177. package/studio-dist/server/assets/{companion-view-DHUjPpA0.js → companion-view-Mf1ANbMb.js} +2 -2
  178. package/studio-dist/server/assets/{companions-kBrJZAd6.js → companions-Dr6IpNAb.js} +1 -1
  179. package/studio-dist/server/assets/{fields-BD_c65T1.js → fields-B4mAPETz.js} +2 -1
  180. package/studio-dist/server/assets/friction-9a5S1m7U.js +943 -0
  181. package/studio-dist/server/assets/friction-CWOTjpCV.js +62 -0
  182. package/studio-dist/server/assets/{getting-started-7P0oyWaM.js → getting-started-RU6tYU2Q.js} +2 -2
  183. package/studio-dist/server/assets/{getting-started._topic-B1mV0kGz.js → getting-started._topic-C02HGrC6.js} +2 -2
  184. package/studio-dist/server/assets/{getting-started.index-CeGtvUsm.js → getting-started.index-EzLRosbb.js} +2 -2
  185. package/studio-dist/server/assets/{graph-BWtmJOH2.js → graph-B11ITte0.js} +1 -1
  186. package/studio-dist/server/assets/{graph-DSDVEELZ.js → graph-CZ2H9Fzr.js} +8 -8
  187. package/studio-dist/server/assets/{graph-canvas-CID9Nksc.js → graph-canvas-rP5TT14Z.js} +2 -2
  188. package/studio-dist/server/assets/{guides-Bm3RbUB-.js → guides-B8HdeK_C.js} +1 -1
  189. package/studio-dist/server/assets/{guides-BLJenHwQ.js → guides-BGftp4wf.js} +1 -1
  190. package/studio-dist/server/assets/{guides.server-rHHqRuzV.js → guides.server-DqFQAStf.js} +1 -1
  191. package/studio-dist/server/assets/{markdown-view-D3v9x-cM.js → markdown-view-CArpV-CS.js} +1 -1
  192. package/studio-dist/server/assets/{panel-yqOl5GMU.js → panel-DR0iq46J.js} +4 -3
  193. package/studio-dist/server/assets/{plugins._service._view-DwqJX7s9.js → plugins._service._view-n7u2k5dF.js} +11 -6
  194. package/studio-dist/server/assets/prepaint-B28ClcPN.js +45 -0
  195. package/studio-dist/server/assets/{queries-DYmGrhNO.js → queries-D-yVP9i0.js} +1 -1
  196. package/studio-dist/server/assets/react-CiBZPDs8.js +45 -0
  197. package/studio-dist/server/assets/{reports-C4Y_Jd-x.js → reports-B9k98oE6.js} +1 -1
  198. package/studio-dist/server/assets/{reports-7yaPz7aP.js → reports-C2SmTgqh.js} +7 -7
  199. package/studio-dist/server/assets/{router-Dnoq5auE.js → router-CPt0TAk_.js} +654 -1565
  200. package/studio-dist/server/assets/{routes-Cok4p3mK.js → routes-CwH8LEy2.js} +8 -8
  201. package/studio-dist/server/assets/{search-DUK7Jl6f.js → search-b-yQesv3.js} +25 -2
  202. package/studio-dist/server/assets/{combobox-oxUI6r4V.js → select-C3i6TTX-.js} +35 -514
  203. package/studio-dist/server/assets/{shell-DNVXedgE.js → shell-CagqZZMZ.js} +4 -3
  204. package/studio-dist/server/assets/{skills-D8qdXSku.js → skills-C21Mg_8-.js} +8 -8
  205. package/studio-dist/server/assets/{skills-pKmuAs0F.js → skills-DGg0mWDM.js} +1 -1
  206. package/studio-dist/server/assets/{specs-DeHYUNFp.js → specs-DetoMiaB.js} +4 -4
  207. package/studio-dist/server/assets/{specs-view-BGn-5Ik_.js → specs-view-CmbfLDwN.js} +10 -9
  208. package/studio-dist/server/assets/{steps-CV7Yk7L7.js → steps-D1tYAyWZ.js} +1 -1
  209. package/studio-dist/server/assets/store-aC-I6f6o.js +93 -0
  210. package/studio-dist/server/assets/{studio-CB94np48.js → studio-qRvQjRpz.js} +47 -2
  211. package/studio-dist/server/assets/{studio-queries-BqZGBE70.js → studio-queries-Dqf-3nzj.js} +66 -8
  212. package/studio-dist/server/assets/{usage-M6Gi6Km7.js → usage-CS4CBK9D.js} +13 -44
  213. package/studio-dist/server/assets/{usage-j5jR9gX9.js → usage-Cwle9-xY.js} +1 -1
  214. package/studio-dist/server/assets/useAnchoredPopupScrollLock-BjMNgXv9.js +756 -0
  215. package/studio-dist/server/assets/useMutation-DpBIuWXt.js +690 -0
  216. package/studio-dist/server/assets/{vault-lBlvSyD4.js → vault-CEBBRLMb.js} +1 -1
  217. package/studio-dist/server/assets/{vault-PqVmssmW.js → vault-DVQidlId.js} +6 -6
  218. package/studio-dist/server/assets/{views-CsFp1i1G.js → views-UgO0Qz_g.js} +2 -2
  219. package/studio-dist/server/assets/{warnings-BDs34j_m.js → warnings-C7hgXpdk.js} +2 -2
  220. package/studio-dist/server/assets/{workflow-T0eEldsa.js → workflow-6dZZ1ofw.js} +9 -9
  221. package/studio-dist/server/server.js +2 -2
  222. package/tool-manifest.yaml +85 -0
  223. package/studio-dist/client/assets/app-BFVyWHGo.css +0 -2
  224. package/studio-dist/client/assets/button-D6LrRkOG.js +0 -1
  225. package/studio-dist/client/assets/combobox-Dk2MMZWE.js +0 -1
  226. package/studio-dist/client/assets/fields-D_FYhxQr.js +0 -1
  227. package/studio-dist/client/assets/getting-started-ByWRg7hC.js +0 -1
  228. package/studio-dist/client/assets/getting-started-DZSjYC-b.js +0 -1
  229. package/studio-dist/client/assets/getting-started._topic-C6OyQ4G6.js +0 -1
  230. package/studio-dist/client/assets/getting-started.index-BkmPHdEm.js +0 -1
  231. package/studio-dist/client/assets/graph-7jm2XzyL.js +0 -2
  232. package/studio-dist/client/assets/guides-D9VTjWXP.js +0 -1
  233. package/studio-dist/client/assets/index-BBmFpG4y.js +0 -40
  234. package/studio-dist/client/assets/markdown-view-RL5YvfZg.js +0 -1
  235. package/studio-dist/client/assets/panel-B8F8sOKQ.js +0 -1
  236. package/studio-dist/client/assets/plugins._service._view-CynxTbMx.js +0 -1
  237. package/studio-dist/client/assets/react-r45OnJCw.js +0 -27
  238. package/studio-dist/client/assets/reports-BCAyXh6p.js +0 -1
  239. package/studio-dist/client/assets/routes-BFPqq89E.js +0 -1
  240. package/studio-dist/client/assets/skills-DTks_uBx.js +0 -1
  241. package/studio-dist/client/assets/specs-view-omrd_5P3.js +0 -1
  242. package/studio-dist/client/assets/store-DJ5cncKA.js +0 -1
  243. package/studio-dist/client/assets/useBaseQuery-BlC-AZ35.js +0 -1
  244. package/studio-dist/client/assets/vault-DRg8MScm.js +0 -1
  245. package/studio-dist/client/assets/warnings-UHFy6HAp.js +0 -1
  246. package/studio-dist/client/assets/workflow-Bv9vSfVV.js +0 -1
  247. package/studio-dist/server/assets/react-BO0uMhpm.js +0 -89
  248. package/studio-dist/server/assets/store-CWDGIp6x.js +0 -280
  249. package/studio-dist/server/assets/useBaseQuery-Tv_QJt9r.js +0 -2051
@@ -1,8 +1,8 @@
1
1
  import { t as createServerRpc } from "./createServerRpc-bFKFpGFG.js";
2
2
  import { n as healthNote } from "./model-PyPALjii.js";
3
3
  import { n as createServerFn } from "../server.js";
4
- import { C as STUDIO_MODE_PARAM, T as companionDigest, _ as COMPANION_PARAM } from "./studio-CB94np48.js";
5
- import { r as validateStudioSearch } from "./search-DUK7Jl6f.js";
4
+ import { C as COMPANION_PARAM, j as companionDigest, k as STUDIO_MODE_PARAM } from "./studio-qRvQjRpz.js";
5
+ import { i as validateStudioSearch } from "./search-b-yQesv3.js";
6
6
  // src/server/shell.ts?tss-serverfn-split
7
7
  /** `refresh` collects the companion again; every other call reads the held snapshot. */
8
8
  var getShell_createServerFn_handler = createServerRpc({
@@ -49,7 +49,8 @@ var getShell = createServerFn({ method: "GET" }).validator((input) => ({
49
49
  label: view.label,
50
50
  ...view.description ? { description: view.description } : {},
51
51
  moduleUrl: view.moduleUrl,
52
- ...view.attentionUrl ? { attentionUrl: view.attentionUrl } : {}
52
+ ...view.attentionUrl ? { attentionUrl: view.attentionUrl } : {},
53
+ ...view.layout ? { layout: view.layout } : {}
53
54
  }] : [])),
54
55
  terminal: page.terminal ? {
55
56
  pinned: page.terminal.pinned,
@@ -1,12 +1,12 @@
1
- import { t as CompanionView } from "./companion-view-DHUjPpA0.js";
1
+ import { t as CompanionView } from "./companion-view-Mf1ANbMb.js";
2
2
  import { n as require_react, o as __toESM, t as require_jsx_runtime } from "./jsx-runtime-Bt0s0YKS.js";
3
- import { c as PAGE_PAD, f as ROW, i as CommandLine, o as EmptyNote, s as ListCard, u as Pills } from "./store-CWDGIp6x.js";
4
- import { Dr as useQuery, Tr as cn, r as Icon } from "./button-BfoNadNR.js";
5
- import { n as PanelSection, r as SidePanel, t as PanelHead } from "./panel-yqOl5GMU.js";
6
- import { i as workflowPlan } from "./steps-CV7Yk7L7.js";
7
- import { d as skillPreviewQuery, j as keepPreviousData } from "./studio-queries-BqZGBE70.js";
8
- import { t as MarkdownView } from "./markdown-view-D3v9x-cM.js";
9
- import { l as Route } from "./router-Dnoq5auE.js";
3
+ import { Lr as useQuery, ct as ROW, et as CommandLine, it as PAGE_PAD, nt as EmptyNote, ot as Pills, r as Icon, rt as ListCard } from "./button-D6bvrFmm.js";
4
+ import { t as cn } from "./cn-FXJAM0KO.js";
5
+ import { n as PanelSection, r as SidePanel, t as PanelHead } from "./panel-DR0iq46J.js";
6
+ import { i as workflowPlan } from "./steps-D1tYAyWZ.js";
7
+ import { B as keepPreviousData, d as skillPreviewQuery } from "./studio-queries-Dqf-3nzj.js";
8
+ import { t as MarkdownView } from "./markdown-view-CArpV-CS.js";
9
+ import { l as Route } from "./router-CPt0TAk_.js";
10
10
  // src/views/skills/skill-files.tsx
11
11
  var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
12
12
  var import_jsx_runtime = require_jsx_runtime();
@@ -1,6 +1,6 @@
1
1
  import { t as createServerRpc } from "./createServerRpc-bFKFpGFG.js";
2
2
  import { n as createServerFn } from "../server.js";
3
- import { g as COMPANION_DIGEST_PATTERN } from "./studio-CB94np48.js";
3
+ import { S as COMPANION_DIGEST_PATTERN } from "./studio-qRvQjRpz.js";
4
4
  // src/server/skills.ts?tss-serverfn-split
5
5
  var AGENTS = /* @__PURE__ */ new Set([
6
6
  "claude",
@@ -1,8 +1,8 @@
1
- import "./studio-CB94np48.js";
2
- import { t as CompanionView } from "./companion-view-DHUjPpA0.js";
3
- import { n as Specs } from "./specs-view-BGn-5Ik_.js";
1
+ import "./studio-qRvQjRpz.js";
2
+ import { t as CompanionView } from "./companion-view-Mf1ANbMb.js";
3
+ import { n as Specs } from "./specs-view-CmbfLDwN.js";
4
4
  import { n as findAction } from "./actions-D8erOphH.js";
5
- import { c as Route } from "./router-Dnoq5auE.js";
5
+ import { c as Route } from "./router-CPt0TAk_.js";
6
6
  import { t as require_jsx_runtime } from "./jsx-runtime-Bt0s0YKS.js";
7
7
  // src/lib/spec-offers.ts
8
8
  /** Spec offers as the view renders them: prompts rebuilt from core's action list. */
@@ -1,14 +1,15 @@
1
1
  import { n as require_react, o as __toESM, t as require_jsx_runtime } from "./jsx-runtime-Bt0s0YKS.js";
2
- import { J as Link, m as vaultQuery } from "./studio-queries-BqZGBE70.js";
3
- import { Dr as useQuery, Tr as cn, r as Icon } from "./button-BfoNadNR.js";
4
- import "./studio-CB94np48.js";
2
+ import { it as Link, m as vaultQuery } from "./studio-queries-Dqf-3nzj.js";
3
+ import { t as cn } from "./cn-FXJAM0KO.js";
4
+ import { Lr as useQuery, ct as ROW, it as PAGE_PAD, lt as StatusWord, nt as EmptyNote, r as Icon, rt as ListCard } from "./button-D6bvrFmm.js";
5
+ import "./studio-qRvQjRpz.js";
5
6
  import { t as SUBJECT_PATTERN } from "./actions-D8erOphH.js";
6
- import { c as PAGE_PAD, f as ROW, o as EmptyNote, p as StatusWord, s as ListCard } from "./store-CWDGIp6x.js";
7
- import { t as Input } from "./fields-BD_c65T1.js";
8
- import { a as ComboboxItem, c as SelectContent, d as SelectValue, i as ComboboxInput, l as SelectItem, n as ComboboxContent, o as ComboboxList, r as ComboboxEmpty, s as Select, t as Combobox, u as SelectTrigger } from "./combobox-oxUI6r4V.js";
9
- import { t as MarkdownView } from "./markdown-view-D3v9x-cM.js";
10
- import { n as PanelSection, r as SidePanel, t as PanelHead } from "./panel-yqOl5GMU.js";
11
- import { t as Warnings } from "./warnings-BDs34j_m.js";
7
+ import { t as Input } from "./fields-B4mAPETz.js";
8
+ import { a as Select, c as SelectTrigger, l as SelectValue, o as SelectContent, s as SelectItem } from "./select-C3i6TTX-.js";
9
+ import { a as ComboboxItem, i as ComboboxInput, n as ComboboxContent, o as ComboboxList, r as ComboboxEmpty, t as Combobox } from "./combobox-D2MbYV1O.js";
10
+ import { t as MarkdownView } from "./markdown-view-CArpV-CS.js";
11
+ import { n as PanelSection, r as SidePanel, t as PanelHead } from "./panel-DR0iq46J.js";
12
+ import { t as Warnings } from "./warnings-C7hgXpdk.js";
12
13
  // ../mate-core/src/cli/commands/studio/graph-model.ts
13
14
  /** Edge kinds by wire code: an edge's kind is its index here. */
14
15
  var GRAPH_EDGE_KINDS = [
@@ -1,4 +1,4 @@
1
- import { c as canonicalSchema, d as BUILTIN_ARTIFACT_TYPE, f as WORKFLOW_FILE, h as CHANGE_PLACEHOLDER, l as deliveryPath, o as SCHEMA_ARTIFACTS, p as defaultWorkflow, s as SHIPPED_SCHEMAS, u as isMateSchema, v as IDEA_PLACEHOLDER } from "./studio-CB94np48.js";
1
+ import { c as canonicalSchema, d as BUILTIN_ARTIFACT_TYPE, f as WORKFLOW_FILE, l as deliveryPath, o as SCHEMA_ARTIFACTS, p as defaultWorkflow, s as SHIPPED_SCHEMAS, u as isMateSchema, w as IDEA_PLACEHOLDER, x as CHANGE_PLACEHOLDER } from "./studio-qRvQjRpz.js";
2
2
  // src/views/workflow/steps.ts
3
3
  var DEFAULT_WORKFLOW = defaultWorkflow();
4
4
  /** The graph node of a review stage: `reviews` for the default one. */
@@ -0,0 +1,93 @@
1
+ import { i as FloatingRootStore, kr as EMPTY_OBJECT } from "./button-D6bvrFmm.js";
2
+ // ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/utils/popups/store.mjs
3
+ /**
4
+ * State common to all popup stores.
5
+ */
6
+ function createInitialPopupStoreState(triggerElements, floatingId, nested = false) {
7
+ return {
8
+ open: false,
9
+ openProp: void 0,
10
+ mounted: false,
11
+ transitionStatus: void 0,
12
+ floatingRootContext: new FloatingRootStore({
13
+ open: false,
14
+ transitionStatus: void 0,
15
+ floatingElement: null,
16
+ referenceElement: null,
17
+ triggerElements,
18
+ floatingId,
19
+ syncOnly: true,
20
+ nested,
21
+ onOpenChange: void 0
22
+ }),
23
+ floatingId,
24
+ triggerCount: 0,
25
+ preventUnmountingOnClose: false,
26
+ payload: void 0,
27
+ activeTriggerId: null,
28
+ activeTriggerElement: null,
29
+ openedWithoutTrigger: false,
30
+ triggerIdProp: void 0,
31
+ popupElement: null,
32
+ positionerElement: null,
33
+ activeTriggerProps: EMPTY_OBJECT,
34
+ inactiveTriggerProps: EMPTY_OBJECT,
35
+ popupProps: EMPTY_OBJECT
36
+ };
37
+ }
38
+ var activeTriggerIdSelector = (state) => state.triggerIdProp ?? state.activeTriggerId;
39
+ var openSelector = (state) => state.openProp ?? state.open;
40
+ var popupIdSelector = (state) => {
41
+ return (state.popupElement?.id ?? state.floatingId) || void 0;
42
+ };
43
+ function triggerOwnsOpenPopup(state, triggerId) {
44
+ return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) === triggerId;
45
+ }
46
+ function triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {
47
+ if (triggerOwnsOpenPopup(state, triggerId)) return true;
48
+ return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) == null && !state.openedWithoutTrigger && state.triggerCount === 1;
49
+ }
50
+ var popupStoreSelectors = {
51
+ open: openSelector,
52
+ mounted: (state) => state.mounted,
53
+ transitionStatus: (state) => openSelector(state) && !state.mounted ? "starting" : state.transitionStatus,
54
+ floatingRootContext: (state) => state.floatingRootContext,
55
+ triggerCount: (state) => state.triggerCount,
56
+ preventUnmountingOnClose: (state) => state.preventUnmountingOnClose,
57
+ payload: (state) => state.payload,
58
+ activeTriggerId: activeTriggerIdSelector,
59
+ activeTriggerElement: (state) => state.mounted ? state.activeTriggerElement : null,
60
+ popupId: popupIdSelector,
61
+ /**
62
+ * Whether the trigger with the given ID was used to open the popup.
63
+ */
64
+ isTriggerActive: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId,
65
+ /**
66
+ * Whether the popup is open and was activated by a trigger with the given ID.
67
+ */
68
+ isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId),
69
+ /**
70
+ * Whether the popup is mounted and was activated by a trigger with the given ID.
71
+ */
72
+ isMountedByTrigger: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId && state.mounted,
73
+ triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps,
74
+ /**
75
+ * Popup id for the trigger that currently owns the open popup.
76
+ */
77
+ triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : void 0,
78
+ popupProps: (state) => state.popupProps,
79
+ popupElement: (state) => state.popupElement,
80
+ positionerElement: (state) => state.positionerElement
81
+ };
82
+ /**
83
+ * Store members a detached handle-backed trigger reads or invokes for trigger registration and data
84
+ * forwarding. `set`/`update` are included only for trigger-count and trigger-data bookkeeping; on a
85
+ * detached (inert) store they are intentionally no-ops, so a write through them is not guaranteed to
86
+ * be durable. Component handle-store views Pick these from their concrete store (preserving its
87
+ * context and selectors) and add any component-specific trigger-invoked members such as `setOpen`.
88
+ */
89
+ /**
90
+ * The subset of a popup store that trigger registration and data forwarding rely on. Narrow enough
91
+ * that an inert store can be passed while detached.
92
+ */
93
+ export { popupStoreSelectors as n, createInitialPopupStoreState as t };
@@ -18,7 +18,8 @@ var SHARED_VIEWS = [
18
18
  "specs",
19
19
  "reports",
20
20
  "graph",
21
- "usage"
21
+ "usage",
22
+ "friction"
22
23
  ];
23
24
  function viewsFor(mode) {
24
25
  return [...MODE_VIEWS[mode], ...SHARED_VIEWS];
@@ -10194,6 +10195,50 @@ function guideTree(source, path, routes) {
10194
10195
  }
10195
10196
  /** `---` YAML, or the `<!-- mate:delta … -->` header Mate writes atop a change's spec delta. */
10196
10197
  var FRONTMATTER = /^(?:---[ \t]*\r?\n([\s\S]*?)\r?\n---|<!--[ \t]*mate:delta[ \t]*\r?\n([\s\S]*?)\r?\n[ \t]*-->)[ \t]*(?:\r?\n|$)/;
10198
+ // ../mate-core/src/runtime/friction-vocabulary.ts
10199
+ var REPORT_KINDS = [
10200
+ "bug",
10201
+ "unclear",
10202
+ "missing"
10203
+ ];
10204
+ var SUBJECT_TYPES = [
10205
+ "command",
10206
+ "hook",
10207
+ "skill",
10208
+ "guidance",
10209
+ "capability",
10210
+ "docs"
10211
+ ];
10212
+ /** A Friction State; a target without one is `open`. */
10213
+ var FRICTION_STATES = [
10214
+ "fixed",
10215
+ "reported",
10216
+ "dismissed"
10217
+ ];
10218
+ /** What a mark may set; `open` clears the Friction State. */
10219
+ var MARK_STATES = ["open", ...FRICTION_STATES];
10220
+ var STATE_FILTERS = [
10221
+ "open",
10222
+ "handled",
10223
+ "all"
10224
+ ];
10225
+ // ../mate-core/src/lib/friction/view/select.ts
10226
+ /** The Friction Items the filters show, in the view's order. */
10227
+ function selectFriction(view, filters) {
10228
+ const present = /* @__PURE__ */ new Set([...view.groups.map((group) => group.subjectType), ...view.freeReports.map((report) => report.subjectType)]);
10229
+ const types = SUBJECT_TYPES.filter((type) => present.has(type));
10230
+ const type = types.find((known) => known === filters.type);
10231
+ const shown = (item) => (filters.state === "all" || item.open === (filters.state === "open")) && (!type || item.subjectType === type);
10232
+ const groups = view.groups.filter(shown);
10233
+ const freeReports = view.freeReports.filter((report) => shown(report) && (!filters.kind || report.kind === filters.kind));
10234
+ return {
10235
+ groups,
10236
+ freeReports,
10237
+ hidden: view.groups.length + view.freeReports.length - groups.length - freeReports.length,
10238
+ types,
10239
+ type
10240
+ };
10241
+ }
10197
10242
  // ../mate-core/src/runtime/workflow/workflow.ts
10198
10243
  /**
10199
10244
  * A companion's workflow: the Delivery Path's stages with the skills each runs, and the artifact
@@ -10434,4 +10479,4 @@ var DARK_PALETTE = {
10434
10479
  hunkBg: "#232A2B"
10435
10480
  };
10436
10481
  ({ ...LIGHT_PALETTE });
10437
- export { STUDIO_MODE_PARAM as C, viewsFor as D, requestedMode as E, STUDIO_MODES as S, companionDigest as T, COMPANION_PARAM as _, DEFAULT_SCHEMA as a, MODE_VIEWS as b, canonicalSchema as c, BUILTIN_ARTIFACT_TYPE as d, WORKFLOW_FILE as f, COMPANION_DIGEST_PATTERN as g, CHANGE_PLACEHOLDER as h, stepStage as i, deliveryPath as l, guideTree as m, LIGHT_PALETTE as n, SCHEMA_ARTIFACTS as o, defaultWorkflow as p, stagesBeforeWork as r, SHIPPED_SCHEMAS as s, DARK_PALETTE as t, isMateSchema as u, IDEA_PLACEHOLDER as v, VIEW_PARAM as w, SHARED_VIEWS as x, LEGACY_ROLE_PARAM as y };
10482
+ export { VIEW_PARAM as A, COMPANION_PARAM as C, SHARED_VIEWS as D, MODE_VIEWS as E, requestedMode as M, viewsFor as N, STUDIO_MODES as O, COMPANION_DIGEST_PATTERN as S, LEGACY_ROLE_PARAM as T, REPORT_KINDS as _, DEFAULT_SCHEMA as a, guideTree as b, canonicalSchema as c, BUILTIN_ARTIFACT_TYPE as d, WORKFLOW_FILE as f, MARK_STATES as g, FRICTION_STATES as h, stepStage as i, companionDigest as j, STUDIO_MODE_PARAM as k, deliveryPath as l, selectFriction as m, LIGHT_PALETTE as n, SCHEMA_ARTIFACTS as o, defaultWorkflow as p, stagesBeforeWork as r, SHIPPED_SCHEMAS as s, DARK_PALETTE as t, isMateSchema as u, STATE_FILTERS as v, IDEA_PLACEHOLDER as w, CHANGE_PLACEHOLDER as x, SUBJECT_TYPES as y };
@@ -2,11 +2,11 @@ import { n as require_react, o as __toESM, t as require_jsx_runtime } from "./js
2
2
  import { C as rootRouteId, S as trimPathRight, _ as invariant, a as useRouter, b as removeTrailingSlash, x as trimPathLeft, y as cleanPath } from "./useSelector-DUmCUXAs.js";
3
3
  import { r as redirect } from "./redirect-BaZ_QyqF.js";
4
4
  import { a as deepEqual, c as functionalUpdate$1, f as isDangerousProtocol, l as getUrlScheme, p as isModuleNotFoundError } from "./utils-C9CX1kcy.js";
5
- import { i as reactUse, n as useMatch, t as getServerFnById } from "./__23tanstack-start-server-fn-resolver-DAbZ6fzY.js";
5
+ import { i as reactUse, n as useMatch, t as getServerFnById } from "./__23tanstack-start-server-fn-resolver-gVfW5vIV.js";
6
6
  import { n as createServerFn, r as TSS_SERVER_FUNCTION } from "../server.js";
7
- import { g as COMPANION_DIGEST_PATTERN } from "./studio-CB94np48.js";
7
+ import { S as COMPANION_DIGEST_PATTERN } from "./studio-qRvQjRpz.js";
8
+ import { i as validateStudioSearch } from "./search-b-yQesv3.js";
8
9
  import { n as unpackGraph } from "./graph-wire-BdSUx0G5.js";
9
- import { r as validateStudioSearch } from "./search-DUK7Jl6f.js";
10
10
  // ../../node_modules/.bun/@tanstack+router-core@1.171.39/node_modules/@tanstack/router-core/dist/esm/route.js
11
11
  var BaseRoute = class {
12
12
  get to() {
@@ -1064,6 +1064,67 @@ function addConsumeAwareSignal(object, getSignal, onCancelled, internalSignal) {
1064
1064
  function queryOptions(options) {
1065
1065
  return options;
1066
1066
  }
1067
+ // ../mate-core/src/cli/commands/studio/routes.ts
1068
+ /** A hosted report's HTML is served at this prefix plus its id. */
1069
+ var REPORT_VIEW_PREFIX = "/studio/reports/";
1070
+ /** A service plugin's routes: `/api/plugins/<service id>/…`. */
1071
+ var SERVICE_ROUTE_PREFIX = "/api/plugins/";
1072
+ /** Answers 204 to any reader; the page probes its connection here. */
1073
+ var STUDIO_PING_ROUTE = "/api/ping";
1074
+ /** One event stream per page: board, reports and markdown tree changes for a companion. */
1075
+ var STUDIO_EVENTS_ROUTE = "/api/events";
1076
+ /** The terminal's WASM core, loaded by Studio's bundled terminal from Studio itself. */
1077
+ var TERMINAL_WASM = `/studio/terminal/wterm.wasm`;
1078
+ /** The terminal's WebSocket, and its session list and end calls. */
1079
+ var TERMINAL_SOCKET_ROUTE = "/api/terminal";
1080
+ var TERMINAL_SESSIONS_ROUTE = "/api/terminal/sessions";
1081
+ var TERMINAL_SESSIONS_END_ROUTE = "/api/terminal/sessions/end";
1082
+ // ../mate-core/src/cli/commands/studio/connection.ts
1083
+ /**
1084
+ * The page's connection to Studio's server. Browser-safe: plugin view bundles import it,
1085
+ * so it imports nothing from Node.
1086
+ */
1087
+ /**
1088
+ * The connection problem a request's outcome (its response, or what it threw) shows.
1089
+ * `null` for any answer Studio itself gave, a refusal included, and for an abort.
1090
+ */
1091
+ function connectionStateOf(outcome) {
1092
+ if (outcome instanceof TypeError) return "offline";
1093
+ if (!(outcome instanceof Response)) return null;
1094
+ if (outcome.type === "opaqueredirect") return "signed-out";
1095
+ if (outcome.status === 401) return "expired";
1096
+ if (outcome.status === 421) return "host-refused";
1097
+ return null;
1098
+ }
1099
+ /** Pings Studio. Never carries the token, so the token exchange's 303 cannot answer it. */
1100
+ async function probeStudio(fetchImpl = fetch) {
1101
+ let outcome;
1102
+ try {
1103
+ outcome = await fetchImpl(STUDIO_PING_ROUTE, {
1104
+ redirect: "manual",
1105
+ credentials: "same-origin",
1106
+ cache: "no-store"
1107
+ });
1108
+ } catch (error) {
1109
+ outcome = error;
1110
+ }
1111
+ return connectionStateOf(outcome) ?? "online";
1112
+ }
1113
+ // src/lib/studio-fetch.ts
1114
+ /**
1115
+ * A background read of Studio's that throws on a connection problem, so the query cache sees
1116
+ * the failure and the page probes. Any answer of Studio's, a refusal included, is returned.
1117
+ */
1118
+ async function studioFetch(url, init = {}) {
1119
+ const response = await fetch(url, {
1120
+ ...init,
1121
+ credentials: "same-origin",
1122
+ redirect: "manual"
1123
+ });
1124
+ const problem = connectionStateOf(response);
1125
+ if (problem) throw new Error(`Studio connection: ${problem}`);
1126
+ return response;
1127
+ }
1067
1128
  // ../../node_modules/.bun/@tanstack+start-server-core@1.169.45/node_modules/@tanstack/start-server-core/dist/esm/createSsrRpc.js
1068
1129
  var createSsrRpc = (functionId) => {
1069
1130
  const url = "/_serverFn/" + functionId;
@@ -1253,10 +1314,7 @@ var pluginAttentionQuery = (companion, url) => queryOptions({
1253
1314
  url
1254
1315
  ],
1255
1316
  queryFn: async () => {
1256
- const response = await fetch(`${url}?companion=${encodeURIComponent(companion)}`, {
1257
- credentials: "same-origin",
1258
- headers: { accept: "application/json" }
1259
- });
1317
+ const response = await studioFetch(`${url}?companion=${encodeURIComponent(companion)}`, { headers: { accept: "application/json" } });
1260
1318
  if (!response.ok) return 0;
1261
1319
  const answer = await response.json();
1262
1320
  return typeof answer.count === "number" ? answer.count : 0;
@@ -1332,4 +1390,4 @@ function afterVaultRefresh(queryClient, companion, search, fresh) {
1332
1390
  var afterVaultFileChange = (queryClient, companion) => stale(queryClient, keys.vaultViews(companion));
1333
1391
  /** After Refresh collected `companion` again; other companions keep what they hold. */
1334
1392
  var afterRefresh = (queryClient, companion) => stale(queryClient, keys.companion(companion ?? null));
1335
- export { isValidTimeout as A, skipToken as B, addToStart as C, hashKey as D, functionalUpdate as E, partialMatchKey as F, lazyRouteComponent as G, timeUntilStale as H, replaceData as I, Link as J, createFileRoute as K, resolveQueryValue as L, matchMutation as M, matchQuery as N, hashQueryKeyByOptions as O, noop as P, shallowEqualObjects as R, addToEnd as S, fetchSignal as T, systemSetTimeoutZero as U, sleep as V, timeoutManager as W, useParams as X, useNavigate as Y, saveVaultFile as _, companionViewQuery as a, queryOptions as b, pluginAttentionQuery as c, skillPreviewQuery as d, vaultChildrenQuery as f, previewVaultFile as g, getVault as h, afterVaultRefresh as i, keepPreviousData as j, isServer as k, reportsQuery as l, vaultQuery as m, afterRefresh as n, graphQuery as o, vaultMatchesQuery as p, createRootRouteWithContext as q, afterVaultFileChange as r, holdShellForMode as s, afterEvent as t, shellQuery as u, getShell as v, ensureQueryFn as w, addConsumeAwareSignal as x, createSsrRpc as y, shouldThrowError as z };
1393
+ export { systemSetTimeoutZero as $, addConsumeAwareSignal as A, keepPreviousData as B, SERVICE_ROUTE_PREFIX as C, TERMINAL_SOCKET_ROUTE as D, TERMINAL_SESSIONS_ROUTE as E, functionalUpdate as F, replaceData as G, matchQuery as H, hashKey as I, shallowEqualObjects as J, replaceEqualDeep as K, hashQueryKeyByOptions as L, addToStart as M, ensureQueryFn as N, TERMINAL_WASM as O, fetchSignal as P, timeUntilStale as Q, isServer as R, REPORT_VIEW_PREFIX as S, TERMINAL_SESSIONS_END_ROUTE as T, noop as U, matchMutation as V, partialMatchKey as W, skipToken as X, shouldThrowError as Y, sleep as Z, saveVaultFile as _, companionViewQuery as a, useNavigate as at, studioFetch as b, pluginAttentionQuery as c, skillPreviewQuery as d, timeoutManager as et, vaultChildrenQuery as f, previewVaultFile as g, getVault as h, afterVaultRefresh as i, Link as it, addToEnd as j, queryOptions as k, reportsQuery as l, vaultQuery as m, afterRefresh as n, createFileRoute as nt, graphQuery as o, useParams as ot, vaultMatchesQuery as p, resolveQueryValue as q, afterVaultFileChange as r, createRootRouteWithContext as rt, holdShellForMode as s, afterEvent as t, lazyRouteComponent as tt, shellQuery as u, getShell as v, STUDIO_EVENTS_ROUTE as w, probeStudio as x, createSsrRpc as y, isValidTimeout as z };
@@ -1,12 +1,14 @@
1
- import { h as useMediaQuery, p as useBrowser, s as Route, xt as useMutation } from "./router-Dnoq5auE.js";
2
- import { $ as ToggleGroup, Dr as useQuery, Er as clsx, Tr as cn, et as ToggleGroupItem, o as require_with_selector$1, r as Icon, t as Button } from "./button-BfoNadNR.js";
3
- import { f as useQueryClient } from "./useBaseQuery-Tv_QJt9r.js";
4
- import { Y as useNavigate, b as queryOptions, y as createSsrRpc } from "./studio-queries-BqZGBE70.js";
1
+ import { t as useMutation } from "./useMutation-DpBIuWXt.js";
2
+ import { Lr as useQuery, dt as ToggleGroup, ft as ToggleGroupItem, o as require_with_selector$1, r as Icon, t as Button, ut as ViewLoading } from "./button-D6bvrFmm.js";
3
+ import { m as useQueryClient, n as clsx, t as cn } from "./cn-FXJAM0KO.js";
4
+ import { at as useNavigate, k as queryOptions, y as createSsrRpc } from "./studio-queries-Dqf-3nzj.js";
5
5
  import { i as __exportAll, n as require_react, o as __toESM, r as __commonJSMin, t as require_jsx_runtime } from "./jsx-runtime-Bt0s0YKS.js";
6
- import { t as Input } from "./fields-BD_c65T1.js";
7
- import { a as ComboboxItem, c as SelectContent, d as SelectValue, i as ComboboxInput, l as SelectItem, n as ComboboxContent, o as ComboboxList, r as ComboboxEmpty, s as Select, t as Combobox, u as SelectTrigger } from "./combobox-oxUI6r4V.js";
6
+ import { t as Input } from "./fields-B4mAPETz.js";
7
+ import { a as ComboboxItem, i as ComboboxInput, n as ComboboxContent, o as ComboboxList, r as ComboboxEmpty, t as Combobox } from "./combobox-D2MbYV1O.js";
8
+ import { a as Select, c as SelectTrigger, l as SelectValue, o as SelectContent, s as SelectItem } from "./select-C3i6TTX-.js";
9
+ import { C as useMediaQuery, h as useBrowser, s as Route } from "./router-CPt0TAk_.js";
8
10
  import { i as require_react_dom, n as createServerFn } from "../server.js";
9
- import { g as COMPANION_DIGEST_PATTERN } from "./studio-CB94np48.js";
11
+ import { S as COMPANION_DIGEST_PATTERN } from "./studio-qRvQjRpz.js";
10
12
  // src/server/usage.ts
11
13
  var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
12
14
  function validateUsageInput(input) {
@@ -277,44 +279,11 @@ function UsageLedger({ repositories }) {
277
279
  ]
278
280
  });
279
281
  }
280
- // src/components/ui/spinner.tsx
281
- function Spinner({ className, ...props }) {
282
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
283
- "data-slot": "spinner",
284
- role: "status",
285
- "aria-label": "Loading",
286
- viewBox: "0 0 24 24",
287
- fill: "none",
288
- stroke: "currentColor",
289
- strokeWidth: 2,
290
- strokeLinecap: "round",
291
- className: cn("size-4 shrink-0 animate-spin motion-reduce:animate-none", className),
292
- ...props,
293
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 3a9 9 0 1 1-9 9" })
294
- });
295
- }
296
282
  // src/views/usage/loading.tsx
297
283
  function UsageLoading() {
298
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
299
- className: "grid min-h-64 flex-1 place-items-center px-6 py-12",
300
- role: "status",
301
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
302
- className: "flex max-w-sm flex-col items-center gap-3 text-center",
303
- children: [
304
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, {
305
- "aria-hidden": "true",
306
- className: "size-7 text-accent"
307
- }),
308
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
309
- className: "text-sm font-medium",
310
- children: "Collecting usage…"
311
- }),
312
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
313
- className: "text-xs leading-relaxed text-muted",
314
- children: "Reading local usage for this companion and its linked repositories."
315
- })
316
- ]
317
- })
284
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ViewLoading, {
285
+ title: "Collecting usage…",
286
+ detail: "Reading local usage for this companion and its linked repositories."
318
287
  });
319
288
  }
320
289
  // src/views/usage/sources.tsx
@@ -383,7 +352,7 @@ function UsageSources({ sources, repositories }) {
383
352
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("details", {
384
353
  className: "group/source py-3",
385
354
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("summary", {
386
- className: "flex cursor-pointer list-none items-start gap-2 rounded-control text-sm outline-none focus-visible:outline-2 focus-visible:outline-accent [&::-webkit-details-marker]:hidden",
355
+ className: "flex cursor-pointer list-none items-start gap-2 rounded-control text-sm [&::-webkit-details-marker]:hidden",
387
356
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
388
357
  name: "right",
389
358
  className: "mt-0.5 size-3.5 text-muted transition-transform group-open/source:rotate-90 motion-reduce:transition-none"
@@ -1,6 +1,6 @@
1
1
  import { t as createServerRpc } from "./createServerRpc-bFKFpGFG.js";
2
2
  import { n as createServerFn } from "../server.js";
3
- import { g as COMPANION_DIGEST_PATTERN } from "./studio-CB94np48.js";
3
+ import { S as COMPANION_DIGEST_PATTERN } from "./studio-qRvQjRpz.js";
4
4
  // src/server/usage.ts?tss-serverfn-split
5
5
  function validateUsageInput(input) {
6
6
  if (!input || typeof input.companion !== "string" || !COMPANION_DIGEST_PATTERN.test(input.companion)) throw new Error("No registered companion was selected");