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

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 (168) hide show
  1. package/claude-capability-plugins/companion-mentions/.claude-plugin/plugin.json +1 -1
  2. package/package.json +1 -1
  3. package/src/cli/commands/doctor.ts +51 -0
  4. package/src/cli/commands/friction.ts +558 -0
  5. package/src/cli/commands/studio/connection.ts +53 -0
  6. package/src/cli/commands/studio/routes.ts +3 -0
  7. package/src/cli/commands/studio/selection.ts +10 -1
  8. package/src/cli/commands/studio/server.ts +31 -0
  9. package/src/cli/commands/studio/services.ts +25 -0
  10. package/src/cli/commands/triage.ts +151 -0
  11. package/src/cli/commands/vscode/release-vsix.json +2 -2
  12. package/src/cli/main.ts +35 -13
  13. package/src/cli/plugin-commands.ts +6 -1
  14. package/src/cli/usage.ts +10 -0
  15. package/src/create-mate.ts +11 -5
  16. package/src/distribution.ts +2 -0
  17. package/src/hooks/validate-artifact-path.ts +64 -14
  18. package/src/lib/friction/describe.ts +42 -0
  19. package/src/lib/friction/fields.ts +60 -0
  20. package/src/lib/friction/mark.ts +156 -0
  21. package/src/lib/friction/view/model.ts +67 -0
  22. package/src/lib/friction/view/read.ts +136 -0
  23. package/src/lib/friction/view/select.ts +54 -0
  24. package/src/lib/orchestrator/adapters/claude.ts +5 -4
  25. package/src/lib/orchestrator/adapters/opencode.ts +2 -0
  26. package/src/lib/orchestrator/root-context.ts +23 -6
  27. package/src/lib/package-paths.ts +23 -15
  28. package/src/lib/session-attribution.ts +3 -7
  29. package/src/lib/triage/context.ts +186 -0
  30. package/src/lib/triage/launch.ts +52 -0
  31. package/src/lib/triage/prepare.ts +97 -0
  32. package/src/lib/triage/session.ts +126 -0
  33. package/src/opencode/companion-hooks.ts +53 -5
  34. package/src/opencode/projected-guidance.ts +2 -0
  35. package/src/playbooks/companion-guidance.ts +2 -2
  36. package/src/plugin-api.ts +5 -0
  37. package/src/runtime/command-friction.ts +97 -0
  38. package/src/runtime/companion-guidance.ts +32 -15
  39. package/src/runtime/friction-fingerprint.ts +35 -0
  40. package/src/runtime/friction-log.ts +352 -0
  41. package/src/runtime/friction-recorder.ts +199 -0
  42. package/src/runtime/friction-retention.ts +1 -0
  43. package/src/runtime/friction-state.ts +110 -0
  44. package/src/runtime/friction-switch.ts +26 -0
  45. package/src/runtime/friction-vocabulary.ts +42 -0
  46. package/src/runtime/projected-guidance.ts +2 -1
  47. package/src/runtime/secret-values.ts +16 -0
  48. package/src/runtime/session-id.ts +24 -0
  49. package/src/runtime/session-prepare-runner.ts +3 -0
  50. package/src/runtime/workflow/next-handoff-process.ts +2 -1
  51. package/src/studio.ts +41 -0
  52. package/src/templates/triage/PLAYBOOK.md +112 -0
  53. package/src/tools/setup/capabilities/rtk.ts +19 -8
  54. package/src/tools/setup/plugin.ts +5 -0
  55. package/src/tools/setup/service.ts +4 -0
  56. package/src/tools/setup.ts +16 -2
  57. package/studio-dist/client/assets/app-aIwDxf48.css +2 -0
  58. package/studio-dist/client/assets/button-CX0sWAJl.js +1 -0
  59. package/studio-dist/client/assets/combobox-BmA8RjOc.js +1 -0
  60. package/studio-dist/client/assets/{companion-view-BVaZNtiI.js → companion-view-DINdPF-b.js} +1 -1
  61. package/studio-dist/client/assets/fields-BobQ7zRF.js +1 -0
  62. package/studio-dist/client/assets/friction-YdYd3zaz.js +1 -0
  63. package/studio-dist/client/assets/getting-started-CY7NEtTw.js +1 -0
  64. package/studio-dist/client/assets/getting-started-djaQeWlu.js +1 -0
  65. package/studio-dist/client/assets/getting-started._topic-DVB8e5R9.js +1 -0
  66. package/studio-dist/client/assets/getting-started.index-DQvLHEr1.js +1 -0
  67. package/studio-dist/client/assets/graph-DbNnR884.js +2 -0
  68. package/studio-dist/client/assets/{graph-canvas-DDuzsNSx.js → graph-canvas-DIcAqwtK.js} +1 -1
  69. package/studio-dist/client/assets/guides-D6T6W_jV.js +1 -0
  70. package/studio-dist/client/assets/index-CysBCSxM.js +40 -0
  71. package/studio-dist/client/assets/markdown-view-jMiaBTSO.js +1 -0
  72. package/studio-dist/client/assets/{panel-B8F8sOKQ.js → panel-Csr49lBo.js} +1 -1
  73. package/studio-dist/client/assets/plugins._service._view-CEA_CcPe.js +1 -0
  74. package/studio-dist/client/assets/prepaint-CKsXyJOR.js +27 -0
  75. package/studio-dist/client/assets/{queries-axYk2u9L.js → queries-Dfp5deWj.js} +1 -1
  76. package/studio-dist/client/assets/react-BYUSgtBs.js +1 -0
  77. package/studio-dist/client/assets/reports-CLdgxxkg.js +1 -0
  78. package/studio-dist/client/assets/routes-DGilWbDE.js +1 -0
  79. package/studio-dist/client/assets/search-CXosfvYh.js +1 -0
  80. package/studio-dist/client/assets/select-DdebbX7K.js +1 -0
  81. package/studio-dist/client/assets/skills-C3zNkU8g.js +1 -0
  82. package/studio-dist/client/assets/{specs-DU1kqcp5.js → specs-Dl8HfGlU.js} +1 -1
  83. package/studio-dist/client/assets/specs-view-B_n0Pekv.js +1 -0
  84. package/studio-dist/client/assets/{steps-DhIFuAZy.js → steps-CKUno4lh.js} +1 -1
  85. package/studio-dist/client/assets/store-DyXbi6o9.js +1 -0
  86. package/studio-dist/client/assets/{studio-BR9j15J0.js → studio-0ueISxwP.js} +8 -8
  87. package/studio-dist/client/assets/{studio-queries-CFP_yTpr.js → studio-queries-BflKt9va.js} +2 -2
  88. package/studio-dist/client/assets/{usage-CHmwtkoM.js → usage-Blcl8kA_.js} +16 -16
  89. package/studio-dist/client/assets/useAnchoredPopupScrollLock-BBXJpX5L.js +1 -0
  90. package/studio-dist/client/assets/{useBaseQuery-BlC-AZ35.js → useBaseQuery-C2cjmeH2.js} +1 -1
  91. package/studio-dist/client/assets/useMutation-DI6LbvVa.js +1 -0
  92. package/studio-dist/client/assets/vault-Cb9DmM1i.js +1 -0
  93. package/studio-dist/client/assets/warnings-B-rvoW8q.js +1 -0
  94. package/studio-dist/client/assets/workflow-DN5T19jd.js +1 -0
  95. package/studio-dist/server/assets/{__23tanstack-start-server-fn-resolver-DAbZ6fzY.js → __23tanstack-start-server-fn-resolver-JoHQ5ihx.js} +30 -14
  96. package/studio-dist/server/assets/_tanstack-start-manifest_v.js +66 -50
  97. package/studio-dist/server/assets/{button-BfoNadNR.js → button-B7e1fRyW.js} +228 -3
  98. package/studio-dist/server/assets/combobox--S_OmUfh.js +483 -0
  99. package/studio-dist/server/assets/{companion-view-DHUjPpA0.js → companion-view-D-vGM55e.js} +2 -2
  100. package/studio-dist/server/assets/{companions-kBrJZAd6.js → companions-Dr6IpNAb.js} +1 -1
  101. package/studio-dist/server/assets/{fields-BD_c65T1.js → fields-B4qM2ZwC.js} +1 -1
  102. package/studio-dist/server/assets/friction-CWOTjpCV.js +62 -0
  103. package/studio-dist/server/assets/friction-sLxaWY-H.js +903 -0
  104. package/studio-dist/server/assets/{getting-started-7P0oyWaM.js → getting-started-Cq5Pcnsr.js} +2 -2
  105. package/studio-dist/server/assets/{getting-started._topic-B1mV0kGz.js → getting-started._topic-CmWdl3u3.js} +2 -2
  106. package/studio-dist/server/assets/{getting-started.index-CeGtvUsm.js → getting-started.index-AB8xpTFY.js} +2 -2
  107. package/studio-dist/server/assets/{graph-BWtmJOH2.js → graph-B11ITte0.js} +1 -1
  108. package/studio-dist/server/assets/{graph-DSDVEELZ.js → graph-C_Hn-Wf_.js} +7 -8
  109. package/studio-dist/server/assets/{graph-canvas-CID9Nksc.js → graph-canvas-BthrSmPS.js} +2 -2
  110. package/studio-dist/server/assets/{guides-Bm3RbUB-.js → guides-B8HdeK_C.js} +1 -1
  111. package/studio-dist/server/assets/{guides-BLJenHwQ.js → guides-BVQ4pt5B.js} +1 -1
  112. package/studio-dist/server/assets/{guides.server-rHHqRuzV.js → guides.server-DqFQAStf.js} +1 -1
  113. package/studio-dist/server/assets/{markdown-view-D3v9x-cM.js → markdown-view-rwiiVcPC.js} +1 -1
  114. package/studio-dist/server/assets/{panel-yqOl5GMU.js → panel-CUxRIpYL.js} +3 -3
  115. package/studio-dist/server/assets/{plugins._service._view-DwqJX7s9.js → plugins._service._view-BSvGnlhU.js} +6 -4
  116. package/studio-dist/server/assets/prepaint-B28ClcPN.js +45 -0
  117. package/studio-dist/server/assets/{queries-DYmGrhNO.js → queries-S_Pl90IG.js} +1 -1
  118. package/studio-dist/server/assets/react-CiBZPDs8.js +45 -0
  119. package/studio-dist/server/assets/{reports-C4Y_Jd-x.js → reports-B9k98oE6.js} +1 -1
  120. package/studio-dist/server/assets/{reports-7yaPz7aP.js → reports-CJpAItPk.js} +6 -7
  121. package/studio-dist/server/assets/{router-Dnoq5auE.js → router-DF0etoNa.js} +627 -1563
  122. package/studio-dist/server/assets/{routes-Cok4p3mK.js → routes-6ylCLkyg.js} +7 -8
  123. package/studio-dist/server/assets/{search-DUK7Jl6f.js → search-b-yQesv3.js} +25 -2
  124. package/studio-dist/server/assets/{combobox-oxUI6r4V.js → select-CjuKScan.js} +34 -514
  125. package/studio-dist/server/assets/{shell-DNVXedgE.js → shell-DLkP7wG9.js} +2 -2
  126. package/studio-dist/server/assets/{skills-pKmuAs0F.js → skills-DGg0mWDM.js} +1 -1
  127. package/studio-dist/server/assets/{skills-D8qdXSku.js → skills-zeU80A9S.js} +7 -8
  128. package/studio-dist/server/assets/{specs-DeHYUNFp.js → specs-DDBNT_v1.js} +4 -4
  129. package/studio-dist/server/assets/{specs-view-BGn-5Ik_.js → specs-view-exvmWdg0.js} +9 -9
  130. package/studio-dist/server/assets/{steps-CV7Yk7L7.js → steps-D1tYAyWZ.js} +1 -1
  131. package/studio-dist/server/assets/store-kS7zk0Hr.js +93 -0
  132. package/studio-dist/server/assets/{studio-CB94np48.js → studio-qRvQjRpz.js} +47 -2
  133. package/studio-dist/server/assets/{studio-queries-BqZGBE70.js → studio-queries-qOXOYoPt.js} +66 -8
  134. package/studio-dist/server/assets/{usage-M6Gi6Km7.js → usage-C2um7YiV.js} +12 -43
  135. package/studio-dist/server/assets/{usage-j5jR9gX9.js → usage-Cwle9-xY.js} +1 -1
  136. package/studio-dist/server/assets/useAnchoredPopupScrollLock-kQBB3y_b.js +756 -0
  137. package/studio-dist/server/assets/{useBaseQuery-Tv_QJt9r.js → useBaseQuery--iH3rd-T.js} +1 -1
  138. package/studio-dist/server/assets/useMutation-C-WO6hCM.js +690 -0
  139. package/studio-dist/server/assets/{vault-PqVmssmW.js → vault-B8vgVIH9.js} +6 -6
  140. package/studio-dist/server/assets/{vault-lBlvSyD4.js → vault-CEBBRLMb.js} +1 -1
  141. package/studio-dist/server/assets/{views-CsFp1i1G.js → views-UgO0Qz_g.js} +2 -2
  142. package/studio-dist/server/assets/{warnings-BDs34j_m.js → warnings-BxK4VfV5.js} +1 -2
  143. package/studio-dist/server/assets/{workflow-T0eEldsa.js → workflow-BrTK632u.js} +8 -9
  144. package/studio-dist/server/server.js +2 -2
  145. package/studio-dist/client/assets/app-BFVyWHGo.css +0 -2
  146. package/studio-dist/client/assets/button-D6LrRkOG.js +0 -1
  147. package/studio-dist/client/assets/combobox-Dk2MMZWE.js +0 -1
  148. package/studio-dist/client/assets/fields-D_FYhxQr.js +0 -1
  149. package/studio-dist/client/assets/getting-started-ByWRg7hC.js +0 -1
  150. package/studio-dist/client/assets/getting-started-DZSjYC-b.js +0 -1
  151. package/studio-dist/client/assets/getting-started._topic-C6OyQ4G6.js +0 -1
  152. package/studio-dist/client/assets/getting-started.index-BkmPHdEm.js +0 -1
  153. package/studio-dist/client/assets/graph-7jm2XzyL.js +0 -2
  154. package/studio-dist/client/assets/guides-D9VTjWXP.js +0 -1
  155. package/studio-dist/client/assets/index-BBmFpG4y.js +0 -40
  156. package/studio-dist/client/assets/markdown-view-RL5YvfZg.js +0 -1
  157. package/studio-dist/client/assets/plugins._service._view-CynxTbMx.js +0 -1
  158. package/studio-dist/client/assets/react-r45OnJCw.js +0 -27
  159. package/studio-dist/client/assets/reports-BCAyXh6p.js +0 -1
  160. package/studio-dist/client/assets/routes-BFPqq89E.js +0 -1
  161. package/studio-dist/client/assets/skills-DTks_uBx.js +0 -1
  162. package/studio-dist/client/assets/specs-view-omrd_5P3.js +0 -1
  163. package/studio-dist/client/assets/store-DJ5cncKA.js +0 -1
  164. package/studio-dist/client/assets/vault-DRg8MScm.js +0 -1
  165. package/studio-dist/client/assets/warnings-UHFy6HAp.js +0 -1
  166. package/studio-dist/client/assets/workflow-Bv9vSfVV.js +0 -1
  167. package/studio-dist/server/assets/react-BO0uMhpm.js +0 -89
  168. package/studio-dist/server/assets/store-CWDGIp6x.js +0 -280
@@ -1,6 +1,6 @@
1
1
  import { n as require_react, o as __toESM, r as __commonJSMin, t as require_jsx_runtime } from "./jsx-runtime-Bt0s0YKS.js";
2
2
  import { i as require_react_dom } from "../server.js";
3
- import { r as QueryObserver, t as useBaseQuery } from "./useBaseQuery-Tv_QJt9r.js";
3
+ import { r as QueryObserver, t as useBaseQuery } from "./useBaseQuery--iH3rd-T.js";
4
4
  // ../../node_modules/.bun/@tanstack+react-query@5.105.3+cef22a3c7e8b4cef/node_modules/@tanstack/react-query/build/modern/useQuery.js
5
5
  function useQuery(options, queryClient) {
6
6
  return useBaseQuery(options, QueryObserver, queryClient);
@@ -3484,6 +3484,22 @@ var twMerge = /*#__PURE__*/ createTailwindMerge(getDefaultConfig);
3484
3484
  function cn(...inputs) {
3485
3485
  return twMerge(clsx(inputs));
3486
3486
  }
3487
+ // src/components/ui/spinner.tsx
3488
+ function Spinner({ className, ...props }) {
3489
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
3490
+ "data-slot": "spinner",
3491
+ role: "status",
3492
+ "aria-label": "Loading",
3493
+ viewBox: "0 0 24 24",
3494
+ fill: "none",
3495
+ stroke: "currentColor",
3496
+ strokeWidth: 2,
3497
+ strokeLinecap: "round",
3498
+ className: cn("size-4 shrink-0 animate-spin motion-reduce:animate-none", className),
3499
+ ...props,
3500
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 3a9 9 0 1 1-9 9" })
3501
+ });
3502
+ }
3487
3503
  // ../../node_modules/.bun/@base-ui+utils@0.5.0+9e489665888c9e4a/node_modules/@base-ui/utils/useControlled.mjs
3488
3504
  function useControlled({ controlled, default: defaultProp, name, state = "value" }) {
3489
3505
  const { current: isControlled } = import_react.useRef(controlled !== void 0);
@@ -5839,6 +5855,214 @@ function ToggleGroupItem({ className, look = "pill", ...props }) {
5839
5855
  ...props
5840
5856
  });
5841
5857
  }
5858
+ // src/components/view-parts.tsx
5859
+ /** A view's title and one plain line on what it shows; no eyebrow. */
5860
+ function PageHeader({ title, description, actions }) {
5861
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", {
5862
+ className: "page-header flex flex-wrap items-end gap-x-4 gap-y-2 px-6 pt-5 pb-1 max-sm:px-4",
5863
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
5864
+ className: "min-w-0",
5865
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
5866
+ className: "m-0 text-xl font-semibold tracking-[-0.015em]",
5867
+ children: title
5868
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
5869
+ className: "m-0 mt-0.5 text-sm text-muted",
5870
+ children: description
5871
+ })]
5872
+ }), actions ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
5873
+ className: "ml-auto flex items-center gap-1.5",
5874
+ children: actions
5875
+ }) : null]
5876
+ });
5877
+ }
5878
+ /** The page's padding for content under the header. */
5879
+ var PAGE_PAD = "px-6 max-sm:px-4";
5880
+ var TONE_TEXT = {
5881
+ warn: "text-warn",
5882
+ bad: "text-bad",
5883
+ accent: "text-accent",
5884
+ why: "text-why",
5885
+ muted: "text-muted"
5886
+ };
5887
+ /** A count beside its label: a small tabular chip, amber only when the items need the person. */
5888
+ function Count({ value, tone, className, label }) {
5889
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
5890
+ className: cn("count inline-grid h-[18px] min-w-[18px] flex-none place-items-center rounded-full px-1.5 font-mono text-2xs leading-none font-medium tabular-nums", tone === "warn" && value > 0 ? "bg-warn-soft text-warn" : "bg-[color-mix(in_srgb,var(--muted)_16%,transparent)] text-muted", className),
5891
+ "aria-label": label,
5892
+ children: value
5893
+ });
5894
+ }
5895
+ /**
5896
+ * A group of items: the title bar carries the name, count and an optional hint on the surface
5897
+ * tint; the rows sit on the page. Never nested, never around a graph, document or form.
5898
+ */
5899
+ function ListCard({ id, title, count, hint, tone, children, className, label, level = 2 }) {
5900
+ const Heading = level === 3 ? "h3" : "h2";
5901
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
5902
+ id,
5903
+ className: cn("list-card overflow-hidden rounded-card border border-rule", className),
5904
+ "aria-label": label ?? (typeof title === "string" ? title : void 0),
5905
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
5906
+ className: cn("list-card-head flex items-center gap-2.5 border-b border-rule bg-surface px-4 py-2 text-[0.9rem] font-semibold", tone ? TONE_TEXT[tone] : null),
5907
+ children: [
5908
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Heading, {
5909
+ className: "m-0 text-[inherit] font-[inherit]",
5910
+ children: title
5911
+ }),
5912
+ count !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Count, {
5913
+ value: count,
5914
+ tone: tone === "warn" ? "warn" : void 0
5915
+ }) : null,
5916
+ hint ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
5917
+ className: "ml-auto text-xs font-normal text-muted",
5918
+ children: hint
5919
+ }) : null
5920
+ ]
5921
+ }), children]
5922
+ });
5923
+ }
5924
+ /** A row in a list card: one line, soft rule above, the surface tint on hover and when current. */
5925
+ var ROW = "list-row flex w-full min-w-0 items-center gap-4 border-0 border-t border-rule-soft bg-transparent px-4 py-2 text-left text-base text-text no-underline transition-colors first:border-t-0 hover:bg-surface aria-[current=true]:bg-surface aria-[current=true]:shadow-[inset_2px_0_0_var(--accent)]";
5926
+ /** Narrows a list in place; one value is always chosen. */
5927
+ function Pills({ label, options, value, onChange, className }) {
5928
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroup, {
5929
+ "aria-label": label,
5930
+ value: [value],
5931
+ onValueChange: (next) => {
5932
+ const chosen = next[0];
5933
+ if (chosen) onChange(chosen);
5934
+ },
5935
+ className,
5936
+ children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ToggleGroupItem, {
5937
+ value: option.value,
5938
+ children: [option.label, option.count !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Count, {
5939
+ value: option.count,
5940
+ tone: option.tone === "warn" ? "warn" : void 0
5941
+ }) : null]
5942
+ }, option.value))
5943
+ });
5944
+ }
5945
+ var MARKERS = {
5946
+ /** Diamond: waiting on a person. */
5947
+ review: "rotate-45 rounded-[2px] size-[7px] bg-why",
5948
+ /** Diamond: under way. */
5949
+ build: "rotate-45 rounded-[2px] size-[7px] bg-accent",
5950
+ /** Circle: done. */
5951
+ done: "rounded-full size-2 bg-accent",
5952
+ /** Square: something is wrong. */
5953
+ issue: "rounded-[1px] size-2 bg-bad",
5954
+ /** Ring: nothing happening. */
5955
+ idle: "rounded-full size-2 ring-[1.5px] ring-muted ring-inset",
5956
+ warn: "rounded-full size-2 bg-warn"
5957
+ };
5958
+ var MARKER_TEXT = {
5959
+ review: "text-why",
5960
+ build: "text-accent",
5961
+ done: "text-accent",
5962
+ issue: "text-bad",
5963
+ idle: "text-muted",
5964
+ warn: "text-warn"
5965
+ };
5966
+ /** A status word with its marker shape, so the state never rests on colour alone. */
5967
+ function StatusWord({ marker, children }) {
5968
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
5969
+ className: cn("status-word inline-flex items-center gap-2 text-xs whitespace-nowrap", MARKER_TEXT[marker]),
5970
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
5971
+ className: cn("flex-none", MARKERS[marker]),
5972
+ "aria-hidden": "true"
5973
+ }), children]
5974
+ });
5975
+ }
5976
+ /** "N of M tasks" with its bar. */
5977
+ function Progress({ done, total, unit = "tasks" }) {
5978
+ if (total === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
5979
+ className: "text-xs text-muted",
5980
+ children: ["No ", unit]
5981
+ });
5982
+ const percent = Math.min(100, Math.round(done / total * 100));
5983
+ const label = `${done} of ${total} ${unit}`;
5984
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
5985
+ className: "grid min-w-[120px] gap-1.5 text-xs text-muted",
5986
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: label }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
5987
+ className: "relative block h-1 w-full max-w-[140px] overflow-hidden rounded-full bg-rule",
5988
+ role: "progressbar",
5989
+ "aria-valuemin": 0,
5990
+ "aria-valuemax": 100,
5991
+ "aria-valuenow": percent,
5992
+ "aria-label": label,
5993
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
5994
+ className: "absolute inset-y-0 left-0 rounded-full bg-accent",
5995
+ style: { width: `${percent}%` }
5996
+ })
5997
+ })]
5998
+ });
5999
+ }
6000
+ var subscribe = () => () => {};
6001
+ /** "22m ago" from the viewer's clock; filled in after hydration so server and browser agree. */
6002
+ function Age({ at, className }) {
6003
+ const text = (0, import_react.useSyncExternalStore)(subscribe, () => at === void 0 ? "" : ageText(at, Date.now()), () => "");
6004
+ if (at === void 0) return null;
6005
+ const date = new Date(at);
6006
+ if (Number.isNaN(date.getTime())) return null;
6007
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("time", {
6008
+ dateTime: date.toISOString(),
6009
+ className: cn("font-mono text-xs whitespace-nowrap text-muted", className),
6010
+ children: text
6011
+ });
6012
+ }
6013
+ function ageText(at, now) {
6014
+ const seconds = Math.max(0, Math.round((now - new Date(at).getTime()) / 1e3));
6015
+ if (seconds < 60) return "just now";
6016
+ if (seconds < 3600) return `${Math.floor(seconds / 60)}m ago`;
6017
+ if (seconds < 86400) return `${Math.floor(seconds / 3600)}h ago`;
6018
+ return `${Math.floor(seconds / 86400)}d ago`;
6019
+ }
6020
+ /** A plain sentence for a list with nothing in it; no empty card. */
6021
+ function EmptyNote({ children, className }) {
6022
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
6023
+ className: cn("empty m-0 rounded-card border border-dashed border-rule px-5 py-5 text-base text-muted", className),
6024
+ children
6025
+ });
6026
+ }
6027
+ /** A command as the person would type it; `copy` is the text copied when it differs. */
6028
+ function CommandLine({ text, copy = text, label = "prompt" }) {
6029
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6030
+ className: "flex min-w-0 items-center gap-2 rounded-control border border-rule bg-page py-1.5 pr-1.5 pl-3 font-mono text-xs",
6031
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
6032
+ className: "min-w-0 flex-1 truncate",
6033
+ children: text
6034
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
6035
+ type: "button",
6036
+ className: "inline-flex h-7 flex-none items-center rounded-[6px] border border-rule bg-surface px-2.5 font-sans text-xs text-text hover:border-accent hover:bg-accent-soft",
6037
+ "data-copy": copy,
6038
+ "data-copy-label": label,
6039
+ children: "Copy"
6040
+ })]
6041
+ });
6042
+ }
6043
+ function ViewLoading({ title, detail }) {
6044
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6045
+ className: "grid min-h-64 flex-1 place-items-center px-6 py-12",
6046
+ role: "status",
6047
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6048
+ className: "flex max-w-sm flex-col items-center gap-3 text-center",
6049
+ children: [
6050
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, {
6051
+ "aria-hidden": "true",
6052
+ className: "size-7 text-accent"
6053
+ }),
6054
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
6055
+ className: "text-sm font-medium",
6056
+ children: title
6057
+ }),
6058
+ detail ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
6059
+ className: "text-xs leading-relaxed text-muted",
6060
+ children: detail
6061
+ }) : null
6062
+ ]
6063
+ })
6064
+ });
6065
+ }
5842
6066
  // ../../node_modules/.bun/@base-ui+utils@0.5.0+9e489665888c9e4a/node_modules/@base-ui/utils/fastHooks.mjs
5843
6067
  var hooks = [];
5844
6068
  var currentInstance = void 0;
@@ -8072,7 +8296,8 @@ var PATHS = {
8072
8296
  eye: "M2.5 10S5 4.5 10 4.5 17.5 10 17.5 10 15 15.5 10 15.5 2.5 10 2.5 10Zm7.5 2.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z",
8073
8297
  pencil: "m12.5 4.5 3 3L7 16H4v-3zM11 6l3 3",
8074
8298
  more: "M5 10h.01M10 10h.01M15 10h.01",
8075
- trash: "M4 6h12M8 6V4h4v2M6 6l1 10h6l1-10M9 9v4m2-4v4"
8299
+ trash: "M4 6h12M8 6V4h4v2M6 6l1 10h6l1-10M9 9v4m2-4v4",
8300
+ alert: "M10 3.5 17 16H3zM10 8.5v3.5m0 2h.01"
8076
8301
  };
8077
8302
  function Icon({ name, className }) {
8078
8303
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
@@ -8190,4 +8415,4 @@ function Button({ className, variant, size, type = "button", ...props }) {
8190
8415
  ...props
8191
8416
  });
8192
8417
  }
8193
- export { ToggleGroup as $, getFrameElement as $n, triggerOpenStateMapping as $t, useFloatingParentNodeId as A, inputClear as An, getPaddingObject as At, FocusGuard as B, triggerPress as Bn, stopEvent as Bt, useAnimationsFinished as C, cancelOpen as Cn, useId as Cr, getAlignmentAxis as Ct, FloatingNode as D, focusOut as Dn, useQuery as Dr, getOppositeAxis as Dt, resolveRef as E, escapeKey as En, clsx as Er, getExpandedPlacements as Et, CLICK_TRIGGER_IDENTIFIER as F, none as Fn, rectToClientRect as Ft, useValueAsRef as G, useButton as Gn, isTargetInsideEnabledTrigger as Gt, visuallyHiddenInput as H, createChangeEventDetails as Hn, getNodeChildren as Ht, DISABLED_TRANSITIONS_STYLE as I, outsidePress as In, round as It, Timeout as J, useIsoLayoutEffect as Jn, matchesFocusVisible as Jt, mergeCleanups as K, ownerDocument as Kn, isTypeableCombobox as Kt, DROPDOWN_COLLISION_AVOIDANCE as L, pointer as Ln, isMouseLikePointerType as Lt, FloatingPortal as M, itemPress as Mn, getSideAxis as Mt, useFloatingPortalNode as N, keyboard as Nn, max as Nt, FloatingTree as O, imperativeAction as On, getOppositeAxisPlacements as Ot, usePortalContext as P, listNavigation as Pn, min as Pt, fastComponentRef as Q, getDocumentElement as Qn, pressableTriggerOpenStateMapping as Qt, POPUP_COLLISION_AVOIDANCE as R, triggerFocus as Rn, isVirtualClick as Rt, useOpenChangeComplete as S, CompositeList as Sn, useBaseUiId as Sr, getAlignment as St, useDismiss as T, disabled as Tn, cn as Tr, getAxisLength as Tt, AnimationFrame as U, createGenericEventDetails as Un, getFloatingFocusElement as Ut, visuallyHidden as V, windowResize as Vn, getNodeAncestors as Vt, useAnimationFrame as W, useCompositeListItem as Wn, isInteractiveElement as Wt, useOnMount as X, getComputedStyle$1 as Xn, popupStateMapping as Xt, useTimeout as Y, useStableCallback as Yn, triggerDisabled as Yt, fastComponent as Z, getContainingBlock as Zn, popupTransitionStateMapping as Zt, usePopupInteractionProps as _, webkit as _n, EMPTY_OBJECT as _r, isListIndexDisabled as _t, ReactStore as a, startingStyle as an, isContainingBlock as ar, getNextTabbable as at, useTriggerDataForwarding as b, mac as bn, useMergedRefs as br, evaluate as bt, PopupTriggerMap as c, ARROW_LEFT$1 as cn, isLastTraversableNode as cr, isOutsideEvent as ct, applyPopupOpenChange as d, activeElement as dn, isTableElement as dr, getGridNavigatedIndex as dt, popupOpen$1 as en, getNodeName as er, ToggleGroupItem as et, attachPreventUnmountOnClose as f, closest as fn, isTopLayer as fr, getMaxListIndex as ft, useOpenStateTransitions as g, gecko as gn, EMPTY_ARRAY as gr, isIndexOutOfListBounds as gt, useImplicitActiveTrigger as h, jsdom as hn, mergeProps as hr, isElementVisible as ht, FloatingRootStore as i, open as in, getWindow as ir, focusable as it, useFloatingTree as j, inputPress as jn, getSide as jt, useFloatingNodeId as k, inputChange as kn, getOppositePlacement as kt, FOCUSABLE_POPUP_PROPS as l, ARROW_RIGHT$1 as ln, isOverflowElement as lr, isTabbable as lt, createPopupOpenState as m, getTarget as mn, useRenderElement as mr, getNextListIndex as mt, buttonVariants as n, closed as nn, getOverflowAncestors as nr, useDirection as nt, require_with_selector as o, transitionStatusMapping as on, isElement as or, getPreviousTabbable as ot, createDefaultInitialFocus as p, contains as pn, isWebKit as pr, getMinListIndex as pt, addEventListener as q, formatErrorMessage as qn, isTypeableElement as qt, Icon as r, endingStyle as rn, getParentNode as rr, COMPOSITE_KEYS as rt, require_shim as s, ARROW_DOWN$1 as sn, isHTMLElement as sr, getTabbableNearElement as st, Button as t, pressed as tn, getNodeScroll as tr, useToolbarRootContext as tt, PopupHandleAttachment as u, ARROW_UP$1 as un, isShadowRoot as ur, tabbable as ut, usePopupRootStore as v, android as vn, NOOP as vr, clamp as vt, useTransitionStatus as w, closePress as wn, useControlled as wr, getAlignmentSides as wt, useUnmountAfterClose as x, isElementDisabled as xn, useRefWithInit as xr, floor as xt, usePopupRootSync as y, ios as yn, isReactVersionAtLeast as yr, createCoords as yt, createAttribute as z, triggerHover as zn, isVirtualPointerEvent as zt };
8418
+ export { Age as $, windowResize as $n, getNodeAncestors as $t, useFloatingParentNodeId as A, android as An, NOOP as Ar, clamp as At, FocusGuard as B, imperativeAction as Bn, getOppositeAxisPlacements as Bt, useAnimationsFinished as C, activeElement as Cn, isTableElement as Cr, getGridNavigatedIndex as Ct, FloatingNode as D, jsdom as Dn, mergeProps as Dr, isElementVisible as Dt, resolveRef as E, getTarget as En, useRenderElement as Er, getNextListIndex as Et, CLICK_TRIGGER_IDENTIFIER as F, cancelOpen as Fn, useId as Fr, getAlignmentAxis as Ft, useValueAsRef as G, keyboard as Gn, max as Gt, visuallyHiddenInput as H, inputClear as Hn, getPaddingObject as Ht, DISABLED_TRANSITIONS_STYLE as I, closePress as In, useControlled as Ir, getAlignmentSides as It, Timeout as J, outsidePress as Jn, round as Jt, mergeCleanups as K, listNavigation as Kn, min as Kt, DROPDOWN_COLLISION_AVOIDANCE as L, disabled as Ln, cn as Lr, getAxisLength as Lt, FloatingPortal as M, mac as Mn, useMergedRefs as Mr, evaluate as Mt, useFloatingPortalNode as N, isElementDisabled as Nn, useRefWithInit as Nr, floor as Nt, FloatingTree as O, gecko as On, EMPTY_ARRAY as Or, isIndexOutOfListBounds as Ot, usePortalContext as P, CompositeList as Pn, useBaseUiId as Pr, getAlignment as Pt, fastComponentRef as Q, triggerPress as Qn, stopEvent as Qt, POPUP_COLLISION_AVOIDANCE as R, escapeKey as Rn, clsx as Rr, getExpandedPlacements as Rt, useOpenChangeComplete as S, ARROW_UP$1 as Sn, isShadowRoot as Sr, tabbable as St, useDismiss as T, contains as Tn, isWebKit as Tr, getMinListIndex as Tt, AnimationFrame as U, inputPress as Un, getSide as Ut, visuallyHidden as V, inputChange as Vn, getOppositePlacement as Vt, useAnimationFrame as W, itemPress as Wn, getSideAxis as Wt, useOnMount as X, triggerFocus as Xn, isVirtualClick as Xt, useTimeout as Y, pointer as Yn, isMouseLikePointerType as Yt, fastComponent as Z, triggerHover as Zn, isVirtualPointerEvent as Zt, usePopupInteractionProps as _, startingStyle as _n, isContainingBlock as _r, getNextTabbable as _t, ReactStore as a, isTypeableElement as an, formatErrorMessage as ar, PageHeader as at, useTriggerDataForwarding as b, ARROW_LEFT$1 as bn, isLastTraversableNode as br, isOutsideEvent as bt, PopupTriggerMap as c, popupStateMapping as cn, getComputedStyle$1 as cr, ROW as ct, applyPopupOpenChange as d, triggerOpenStateMapping as dn, getFrameElement as dr, ToggleGroup as dt, getNodeChildren as en, createChangeEventDetails as er, CommandLine as et, attachPreventUnmountOnClose as f, popupOpen$1 as fn, getNodeName as fr, ToggleGroupItem as ft, useOpenStateTransitions as g, open as gn, getWindow as gr, focusable as gt, useImplicitActiveTrigger as h, endingStyle as hn, getParentNode as hr, COMPOSITE_KEYS as ht, FloatingRootStore as i, isTypeableCombobox as in, ownerDocument as ir, PAGE_PAD as it, useFloatingTree as j, ios as jn, isReactVersionAtLeast as jr, createCoords as jt, useFloatingNodeId as k, webkit as kn, EMPTY_OBJECT as kr, isListIndexDisabled as kt, FOCUSABLE_POPUP_PROPS as l, popupTransitionStateMapping as ln, getContainingBlock as lr, StatusWord as lt, createPopupOpenState as m, closed as mn, getOverflowAncestors as mr, useDirection as mt, buttonVariants as n, isInteractiveElement as nn, useCompositeListItem as nr, EmptyNote as nt, require_with_selector as o, matchesFocusVisible as on, useIsoLayoutEffect as or, Pills as ot, createDefaultInitialFocus as p, pressed as pn, getNodeScroll as pr, useToolbarRootContext as pt, addEventListener as q, none as qn, rectToClientRect as qt, Icon as r, isTargetInsideEnabledTrigger as rn, useButton as rr, ListCard as rt, require_shim as s, triggerDisabled as sn, useStableCallback as sr, Progress as st, Button as t, getFloatingFocusElement as tn, createGenericEventDetails as tr, Count as tt, PopupHandleAttachment as u, pressableTriggerOpenStateMapping as un, getDocumentElement as ur, ViewLoading as ut, usePopupRootStore as v, transitionStatusMapping as vn, isElement as vr, getPreviousTabbable as vt, useTransitionStatus as w, closest as wn, isTopLayer as wr, getMaxListIndex as wt, useUnmountAfterClose as x, ARROW_RIGHT$1 as xn, isOverflowElement as xr, isTabbable as xt, usePopupRootSync as y, ARROW_DOWN$1 as yn, isHTMLElement as yr, getTabbableNearElement as yt, createAttribute as z, focusOut as zn, useQuery as zr, getOppositeAxis as zt };