@ashlr/hub 3.4.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -1
- package/README.md +3 -0
- package/dist/build-identity.json +2 -2
- package/dist/cli/index.js +11 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/local-runtime.js +40 -9
- package/dist/cli/local-runtime.js.map +1 -1
- package/dist/core/local-eval/classify.d.ts +57 -0
- package/dist/core/local-eval/classify.js +121 -0
- package/dist/core/local-eval/classify.js.map +1 -0
- package/dist/core/local-eval/configuration.d.ts +37 -0
- package/dist/core/local-eval/configuration.js +171 -0
- package/dist/core/local-eval/configuration.js.map +1 -0
- package/dist/core/local-eval/index.d.ts +15 -0
- package/dist/core/local-eval/index.js +16 -0
- package/dist/core/local-eval/index.js.map +1 -0
- package/dist/core/local-eval/main.d.ts +31 -0
- package/dist/core/local-eval/main.js +174 -0
- package/dist/core/local-eval/main.js.map +1 -0
- package/dist/core/local-eval/report.d.ts +25 -0
- package/dist/core/local-eval/report.js +157 -0
- package/dist/core/local-eval/report.js.map +1 -0
- package/dist/core/local-eval/runner.d.ts +55 -0
- package/dist/core/local-eval/runner.js +290 -0
- package/dist/core/local-eval/runner.js.map +1 -0
- package/dist/core/local-eval/tasks.d.ts +22 -0
- package/dist/core/local-eval/tasks.js +303 -0
- package/dist/core/local-eval/tasks.js.map +1 -0
- package/dist/core/local-eval/trace.d.ts +67 -0
- package/dist/core/local-eval/trace.js +309 -0
- package/dist/core/local-eval/trace.js.map +1 -0
- package/dist/core/local-eval/types.d.ts +262 -0
- package/dist/core/local-eval/types.js +23 -0
- package/dist/core/local-eval/types.js.map +1 -0
- package/dist/core/local-runtime/llama/anthropic-proxy-host.d.ts +68 -0
- package/dist/core/local-runtime/llama/anthropic-proxy-host.js +120 -0
- package/dist/core/local-runtime/llama/anthropic-proxy-host.js.map +1 -0
- package/dist/core/local-runtime/llama/anthropic-proxy-process.d.ts +15 -0
- package/dist/core/local-runtime/llama/anthropic-proxy-process.js +21 -0
- package/dist/core/local-runtime/llama/anthropic-proxy-process.js.map +1 -0
- package/dist/core/local-runtime/llama/anthropic-proxy.d.ts +2 -1
- package/dist/core/local-runtime/llama/anthropic-proxy.js +14 -6
- package/dist/core/local-runtime/llama/anthropic-proxy.js.map +1 -1
- package/dist/core/local-runtime/llama/anthropic-shim.d.ts +33 -0
- package/dist/core/local-runtime/llama/anthropic-shim.js +59 -0
- package/dist/core/local-runtime/llama/anthropic-shim.js.map +1 -1
- package/dist/core/local-runtime/llama/config.d.ts +101 -6
- package/dist/core/local-runtime/llama/config.js +174 -6
- package/dist/core/local-runtime/llama/config.js.map +1 -1
- package/dist/core/local-runtime/llama/index.d.ts +15 -0
- package/dist/core/local-runtime/llama/index.js +13 -0
- package/dist/core/local-runtime/llama/index.js.map +1 -1
- package/dist/core/local-runtime/llama/paths.d.ts +17 -0
- package/dist/core/local-runtime/llama/paths.js +25 -0
- package/dist/core/local-runtime/llama/paths.js.map +1 -1
- package/dist/core/local-runtime/llama/proxy-invocation.d.ts +101 -0
- package/dist/core/local-runtime/llama/proxy-invocation.js +134 -0
- package/dist/core/local-runtime/llama/proxy-invocation.js.map +1 -0
- package/dist/core/local-runtime/llama/proxy-launchd.d.ts +83 -0
- package/dist/core/local-runtime/llama/proxy-launchd.js +216 -0
- package/dist/core/local-runtime/llama/proxy-launchd.js.map +1 -0
- package/dist/core/local-runtime/llama/shapes.d.ts +2 -1
- package/dist/core/local-runtime/llama/shapes.js +2 -1
- package/dist/core/local-runtime/llama/shapes.js.map +1 -1
- package/dist/core/verse/adapters/claude.js +16 -0
- package/dist/core/verse/adapters/claude.js.map +1 -1
- package/dist/core/verse/adapters/codex.js +60 -2
- package/dist/core/verse/adapters/codex.js.map +1 -1
- package/dist/core/verse/adapters/grok.js +13 -0
- package/dist/core/verse/adapters/grok.js.map +1 -1
- package/dist/core/verse/control-api.d.ts +8 -9
- package/dist/core/verse/control-api.js +14 -114
- package/dist/core/verse/control-api.js.map +1 -1
- package/dist/core/verse/github-api.d.ts +50 -0
- package/dist/core/verse/github-api.js +211 -0
- package/dist/core/verse/github-api.js.map +1 -0
- package/dist/core/verse/github-proposal.d.ts +64 -0
- package/dist/core/verse/github-proposal.js +186 -0
- package/dist/core/verse/github-proposal.js.map +1 -0
- package/dist/core/verse/github-repo.d.ts +104 -0
- package/dist/core/verse/github-repo.js +476 -0
- package/dist/core/verse/github-repo.js.map +1 -0
- package/dist/core/verse/github-types.d.ts +174 -0
- package/dist/core/verse/github-types.js +31 -0
- package/dist/core/verse/github-types.js.map +1 -0
- package/dist/core/verse/mcp-cli-health.d.ts +149 -0
- package/dist/core/verse/mcp-cli-health.js +227 -0
- package/dist/core/verse/mcp-cli-health.js.map +1 -0
- package/dist/core/verse/mcp-control-api.d.ts +68 -0
- package/dist/core/verse/mcp-control-api.js +322 -0
- package/dist/core/verse/mcp-control-api.js.map +1 -0
- package/dist/core/verse/mcp-mutation.d.ts +187 -0
- package/dist/core/verse/mcp-mutation.js +471 -0
- package/dist/core/verse/mcp-mutation.js.map +1 -0
- package/dist/core/verse/mcp-scope.d.ts +114 -0
- package/dist/core/verse/mcp-scope.js +149 -0
- package/dist/core/verse/mcp-scope.js.map +1 -0
- package/dist/core/verse/mcp-seat-view.d.ts +197 -0
- package/dist/core/verse/mcp-seat-view.js +322 -0
- package/dist/core/verse/mcp-seat-view.js.map +1 -0
- package/dist/core/verse/path-guard.d.ts +115 -0
- package/dist/core/verse/path-guard.js +171 -0
- package/dist/core/verse/path-guard.js.map +1 -0
- package/dist/core/verse/seats.js +30 -2
- package/dist/core/verse/seats.js.map +1 -1
- package/dist/core/verse/session-engine.js +60 -1
- package/dist/core/verse/session-engine.js.map +1 -1
- package/dist/core/verse/session-store.js +20 -0
- package/dist/core/verse/session-store.js.map +1 -1
- package/dist/core/verse/types.d.ts +225 -1
- package/dist/core/verse/types.js +26 -0
- package/dist/core/verse/types.js.map +1 -1
- package/dist/core/verse/verse-api.d.ts +16 -1
- package/dist/core/verse/verse-api.js +338 -16
- package/dist/core/verse/verse-api.js.map +1 -1
- package/dist/core/verse/workspaces.d.ts +130 -0
- package/dist/core/verse/workspaces.js +501 -0
- package/dist/core/verse/workspaces.js.map +1 -0
- package/dist/core/web/api.js +23 -0
- package/dist/core/web/api.js.map +1 -1
- package/dist/core/web/public/next/assets/{App-LuILXjWG.js → App-CsbPYQqy.js} +2 -2
- package/dist/core/web/public/next/assets/{App-LuILXjWG.js.map → App-CsbPYQqy.js.map} +1 -1
- package/dist/core/web/public/next/assets/{ApprovalsSection-B_Xor8JH.js → ApprovalsSection-CBZquyLK.js} +2 -2
- package/dist/core/web/public/next/assets/{ApprovalsSection-B_Xor8JH.js.map → ApprovalsSection-CBZquyLK.js.map} +1 -1
- package/dist/core/web/public/next/assets/AutonomySection-CQVpEdCE.js +2 -0
- package/dist/core/web/public/next/assets/{AutonomySection-BEwITtPJ.js.map → AutonomySection-CQVpEdCE.js.map} +1 -1
- package/dist/core/web/public/next/assets/AutonomySection-DTN6m6QE.css +1 -0
- package/dist/core/web/public/next/assets/ChatSection-DiRvNX3Q.css +1 -0
- package/dist/core/web/public/next/assets/ChatSection-DmE9K0Tg.js +77 -0
- package/dist/core/web/public/next/assets/ChatSection-DmE9K0Tg.js.map +1 -0
- package/dist/core/web/public/next/assets/{ConfirmDialog-BqkZdPs_.js → ConfirmDialog-deO0C0iY.js} +2 -2
- package/dist/core/web/public/next/assets/{ConfirmDialog-BqkZdPs_.js.map → ConfirmDialog-deO0C0iY.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Dialog-CPmedg4S.js → Dialog-CNd7q89m.js} +2 -2
- package/dist/core/web/public/next/assets/{Dialog-CPmedg4S.js.map → Dialog-CNd7q89m.js.map} +1 -1
- package/dist/core/web/public/next/assets/{DiffViewer-DmPJbeM_.js → DiffViewer-DTO0KRuG.js} +2 -2
- package/dist/core/web/public/next/assets/{DiffViewer-DmPJbeM_.js.map → DiffViewer-DTO0KRuG.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Epistemic-M3SxLHjq.js → Epistemic-53PikaUI.js} +2 -2
- package/dist/core/web/public/next/assets/{Epistemic-M3SxLHjq.js.map → Epistemic-53PikaUI.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Meter-D_X7c9U3.js → Meter-DRWZQgr1.js} +2 -2
- package/dist/core/web/public/next/assets/{Meter-D_X7c9U3.js.map → Meter-DRWZQgr1.js.map} +1 -1
- package/dist/core/web/public/next/assets/{MutationTokenDialog-Ba5ZHu-8.js → MutationTokenDialog-DYF8n_RD.js} +2 -2
- package/dist/core/web/public/next/assets/{MutationTokenDialog-Ba5ZHu-8.js.map → MutationTokenDialog-DYF8n_RD.js.map} +1 -1
- package/dist/core/web/public/next/assets/{RefreshIndicator-vHGpmyzb.js → RefreshIndicator-DXJQXKyA.js} +2 -2
- package/dist/core/web/public/next/assets/{RefreshIndicator-vHGpmyzb.js.map → RefreshIndicator-DXJQXKyA.js.map} +1 -1
- package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-B5g6JEVk.js → ResourcePoolConsoleApp-hDSEFdLU.js} +2 -2
- package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-B5g6JEVk.js.map → ResourcePoolConsoleApp-hDSEFdLU.js.map} +1 -1
- package/dist/core/web/public/next/assets/{RouteErrorBoundary-CroxuKoi.js → RouteErrorBoundary-CZd7ln8v.js} +2 -2
- package/dist/core/web/public/next/assets/{RouteErrorBoundary-CroxuKoi.js.map → RouteErrorBoundary-CZd7ln8v.js.map} +1 -1
- package/dist/core/web/public/next/assets/{SettingsSection-p-7FCGfn.js → SettingsSection-C9Qs9JWW.js} +2 -2
- package/dist/core/web/public/next/assets/{SettingsSection-p-7FCGfn.js.map → SettingsSection-C9Qs9JWW.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Skeleton-4qq4HuJO.js → Skeleton-YkcOpgFb.js} +2 -2
- package/dist/core/web/public/next/assets/{Skeleton-4qq4HuJO.js.map → Skeleton-YkcOpgFb.js.map} +1 -1
- package/dist/core/web/public/next/assets/{StatusBadge-BbEdqEGn.js → StatusBadge-DJw0LSPg.js} +2 -2
- package/dist/core/web/public/next/assets/{StatusBadge-BbEdqEGn.js.map → StatusBadge-DJw0LSPg.js.map} +1 -1
- package/dist/core/web/public/next/assets/{TableView-nyYs7Sv1.js → TableView-Bj-w1O6o.js} +2 -2
- package/dist/core/web/public/next/assets/{TableView-nyYs7Sv1.js.map → TableView-Bj-w1O6o.js.map} +1 -1
- package/dist/core/web/public/next/assets/{UniverseConsoleApp-DjTpQUrA.js → UniverseConsoleApp-Bs2fxaen.js} +2 -2
- package/dist/core/web/public/next/assets/{UniverseConsoleApp-DjTpQUrA.js.map → UniverseConsoleApp-Bs2fxaen.js.map} +1 -1
- package/dist/core/web/public/next/assets/{UniverseView-BtApwayT.js → UniverseView-B6b2hw-8.js} +2 -2
- package/dist/core/web/public/next/assets/{UniverseView-BtApwayT.js.map → UniverseView-B6b2hw-8.js.map} +1 -1
- package/dist/core/web/public/next/assets/{UsageSection-Db99N6ao.js → UsageSection-C__ziNkV.js} +2 -2
- package/dist/core/web/public/next/assets/{UsageSection-Db99N6ao.js.map → UsageSection-C__ziNkV.js.map} +1 -1
- package/dist/core/web/public/next/assets/{VerseConsoleApp-COa3J2dO.js → VerseConsoleApp-Cu5aG6J6.js} +3 -3
- package/dist/core/web/public/next/assets/VerseConsoleApp-Cu5aG6J6.js.map +1 -0
- package/dist/core/web/public/next/assets/{global-CNVapoV1.js → global-BHjd6fVZ.js} +2 -2
- package/dist/core/web/public/next/assets/{global-CNVapoV1.js.map → global-BHjd6fVZ.js.map} +1 -1
- package/dist/core/web/public/next/assets/index-CJ-e8YA9.js +2 -0
- package/dist/core/web/public/next/assets/index-CJ-e8YA9.js.map +1 -0
- package/dist/core/web/public/next/assets/{index-BkUlX2Se.js → index-CpgkRaTi.js} +3 -3
- package/dist/core/web/public/next/assets/{index-BkUlX2Se.js.map → index-CpgkRaTi.js.map} +1 -1
- package/dist/core/web/public/next/assets/{queries-C9XS4SYq.js → queries-856qUN3Y.js} +2 -2
- package/dist/core/web/public/next/assets/{queries-C9XS4SYq.js.map → queries-856qUN3Y.js.map} +1 -1
- package/dist/core/web/public/next/assets/{use-guarded-action-Bql1nA-z.js → use-guarded-action-DwaESKVy.js} +2 -2
- package/dist/core/web/public/next/assets/{use-guarded-action-Bql1nA-z.js.map → use-guarded-action-DwaESKVy.js.map} +1 -1
- package/dist/core/web/public/next/assets/verse-model-Dllo8rRt.js +2 -0
- package/dist/core/web/public/next/assets/{verse-model-IrNQKtER.js.map → verse-model-Dllo8rRt.js.map} +1 -1
- package/dist/core/web/public/next/assets/workspace-model-JgmWDKt4.js +2 -0
- package/dist/core/web/public/next/assets/workspace-model-JgmWDKt4.js.map +1 -0
- package/dist/core/web/public/next/index.html +1 -1
- package/dist/release-dependency-inventory.json +1 -1
- package/docs/README.md +4 -0
- package/package.json +1 -1
- package/dist/cli/activation.d.ts +0 -41
- package/dist/cli/activation.js +0 -485
- package/dist/cli/activation.js.map +0 -1
- package/dist/core/fleet/generated-repair-resolution.d.ts +0 -36
- package/dist/core/fleet/generated-repair-resolution.js +0 -245
- package/dist/core/fleet/generated-repair-resolution.js.map +0 -1
- package/dist/core/local-runtime/llama/port.d.ts +0 -17
- package/dist/core/local-runtime/llama/port.js +0 -47
- package/dist/core/local-runtime/llama/port.js.map +0 -1
- package/dist/core/local-runtime/llama/proxy-host.d.ts +0 -54
- package/dist/core/local-runtime/llama/proxy-host.js +0 -159
- package/dist/core/local-runtime/llama/proxy-host.js.map +0 -1
- package/dist/core/local-runtime/llama/proxy-process.d.ts +0 -148
- package/dist/core/local-runtime/llama/proxy-process.js +0 -250
- package/dist/core/local-runtime/llama/proxy-process.js.map +0 -1
- package/dist/core/local-runtime/llama/proxy-record.d.ts +0 -40
- package/dist/core/local-runtime/llama/proxy-record.js +0 -133
- package/dist/core/local-runtime/llama/proxy-record.js.map +0 -1
- package/dist/core/local-runtime/llama/proxy-supervisor.d.ts +0 -118
- package/dist/core/local-runtime/llama/proxy-supervisor.js +0 -511
- package/dist/core/local-runtime/llama/proxy-supervisor.js.map +0 -1
- package/dist/core/web/public/next/assets/AutonomySection-BB8RD-tv.css +0 -1
- package/dist/core/web/public/next/assets/AutonomySection-BEwITtPJ.js +0 -2
- package/dist/core/web/public/next/assets/ChatSection-DrxqhBPK.css +0 -1
- package/dist/core/web/public/next/assets/ChatSection-bRAzlMth.js +0 -77
- package/dist/core/web/public/next/assets/ChatSection-bRAzlMth.js.map +0 -1
- package/dist/core/web/public/next/assets/VerseConsoleApp-COa3J2dO.js.map +0 -1
- package/dist/core/web/public/next/assets/index-YNTgDG2b.js +0 -2
- package/dist/core/web/public/next/assets/index-YNTgDG2b.js.map +0 -1
- package/dist/core/web/public/next/assets/verse-model-IrNQKtER.js +0 -2
- package/node_modules/which/CHANGELOG.md +0 -166
package/dist/core/web/public/next/assets/{VerseConsoleApp-COa3J2dO.js → VerseConsoleApp-Cu5aG6J6.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ApprovalsSection-
|
|
2
|
-
import{j as n,r as g,_ as N}from"./index-BkUlX2Se.js";import{a as S,A as P,f as J,k as Me,o as M,b as Oe,t as Te,g as Ie,h as Le,p as Re,r as Ve,m as De,i as Be,S as $e,l as Pe}from"./global-CNVapoV1.js";import{R as Fe,T as Ue}from"./RouteErrorBoundary-CroxuKoi.js";import{i as We}from"./queries-C9XS4SYq.js";import"./index-YNTgDG2b.js";const te="ashlr:desktop-command",ze=["open-settings","toggle-theme"];function Ge(e){if(e==="light"||e==="dark")return e;try{return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}}function qe(){return window.__ASHLR_DESKTOP__}function Ke(e){try{qe()?.reportTheme?.(Ge(e))}catch{}}function He(e){return typeof e=="string"&&ze.includes(e)}function Ye(e){function t(s){const a=s.detail?.command;He(a)&&e(a)}return window.addEventListener(te,t),()=>window.removeEventListener(te,t)}function m({size:e=16,title:t,children:s,...o}){return n.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",focusable:"false",...t?{role:"img"}:{"aria-hidden":!0},...o,children:[t?n.jsx("title",{children:t}):null,s]})}const pe=e=>n.jsx(m,{...e,children:n.jsx("path",{d:"M2.5 11.5V4.25A1.75 1.75 0 0 1 4.25 2.5h7.5a1.75 1.75 0 0 1 1.75 1.75v4.5a1.75 1.75 0 0 1-1.75 1.75H5.5L2.5 13.5v-2Z"})}),fe=e=>n.jsxs(m,{...e,children:[n.jsx("rect",{x:"4.5",y:"4.5",width:"7",height:"7",rx:"1.5"}),n.jsx("path",{d:"M6.5 1.5v3M9.5 1.5v3M6.5 11.5v3M9.5 11.5v3M1.5 6.5h3M1.5 9.5h3M11.5 6.5h3M11.5 9.5h3"})]}),Qe=e=>n.jsxs(m,{...e,children:[n.jsx("path",{d:"M2 9.5 3.6 3.4A1.5 1.5 0 0 1 5.05 2.3h5.9a1.5 1.5 0 0 1 1.45 1.1L14 9.5"}),n.jsx("path",{d:"M2 9.5h3l.8 1.6h4.4l.8-1.6h3v2.6A1.9 1.9 0 0 1 12.1 14H3.9A1.9 1.9 0 0 1 2 12.1V9.5Z"})]}),Rn=e=>n.jsx(m,{...e,children:n.jsx("path",{d:"m3 8.5 3.2 3.2L13 5"})}),Je=e=>n.jsxs(m,{...e,children:[n.jsx("circle",{cx:"8",cy:"8",r:"6"}),n.jsx("path",{d:"m5.2 8.2 1.9 1.9 3.7-4"})]}),Ze=e=>n.jsx(m,{...e,children:n.jsx("path",{d:"m4 4 8 8M12 4l-8 8"})}),Xe=e=>n.jsxs(m,{...e,children:[n.jsx("path",{d:"M2.2 11.5a6.4 6.4 0 1 1 11.6 0"}),n.jsx("path",{d:"M8 11 10.8 6.6"}),n.jsx("circle",{cx:"8",cy:"11.6",r:"0.9",fill:"currentColor",stroke:"none"})]}),ge=e=>n.jsxs(m,{...e,children:[n.jsx("path",{d:"M2.5 4.5h4M9.5 4.5h4M2.5 11.5h2M7.5 11.5h6"}),n.jsx("circle",{cx:"8",cy:"4.5",r:"1.6"}),n.jsx("circle",{cx:"6",cy:"11.5",r:"1.6"})]}),et=e=>n.jsxs(m,{...e,children:[n.jsx("path",{d:"M8 2.6 14.2 13H1.8L8 2.6Z"}),n.jsx("path",{d:"M8 6.6v3"}),n.jsx("circle",{cx:"8",cy:"11.3",r:"0.75",fill:"currentColor",stroke:"none"})]}),tt=e=>n.jsxs(m,{...e,children:[n.jsx("circle",{cx:"8",cy:"8",r:"6"}),n.jsx("path",{d:"M8 7.4v3.4"}),n.jsx("circle",{cx:"8",cy:"5.4",r:"0.75",fill:"currentColor",stroke:"none"})]}),st=e=>n.jsx(m,{...e,children:n.jsx("path",{d:"M8 3.2v9.6M3.2 8h9.6"})}),nt=e=>n.jsxs(m,{...e,children:[n.jsx("circle",{cx:"7.2",cy:"7.2",r:"4.2"}),n.jsx("path",{d:"m10.4 10.4 3.1 3.1"})]}),Vn=e=>n.jsxs(m,{...e,children:[n.jsx("rect",{x:"5.5",y:"5.5",width:"8",height:"8",rx:"1.5"}),n.jsx("path",{d:"M10.5 3.5a1.5 1.5 0 0 0-1.5-1.5H4A1.5 1.5 0 0 0 2.5 3.5v5A1.5 1.5 0 0 0 4 10"})]}),ot=e=>n.jsx(m,{...e,children:n.jsx("path",{d:"m4 6.2 4 4 4-4"})}),at=e=>n.jsx(m,{...e,children:n.jsx("path",{d:"m6.2 4 4 4-4 4"})}),rt=e=>n.jsx(m,{...e,children:n.jsx("path",{d:"M2.8 4.2h10.4M6.4 4.2V2.8h3.2v1.4M4.2 4.2l.6 8.2a1.3 1.3 0 0 0 1.3 1.2h3.8a1.3 1.3 0 0 0 1.3-1.2l.6-8.2"})}),Dn=e=>n.jsxs(m,{...e,children:[n.jsx("path",{d:"M9.5 2.5H13.5v4M13.5 2.5 7.8 8.2"}),n.jsx("path",{d:"M12.5 9.6v2.9a1.5 1.5 0 0 1-1.5 1.5H3.5A1.5 1.5 0 0 1 2 12.5V5a1.5 1.5 0 0 1 1.5-1.5h2.9"})]}),Bn=e=>n.jsxs(m,{...e,children:[n.jsx("rect",{x:"3",y:"7",width:"10",height:"6.5",rx:"1.5"}),n.jsx("path",{d:"M5.5 7V5.2a2.5 2.5 0 0 1 5 0V7"})]}),$n=e=>n.jsxs(m,{...e,children:[n.jsx("circle",{cx:"8",cy:"8",r:"3.1"}),n.jsx("path",{d:"M8 1.5v1.6M8 12.9v1.6M1.5 8h1.6M12.9 8h1.6M3.4 3.4l1.1 1.1M11.5 11.5l1.1 1.1M12.6 3.4l-1.1 1.1M4.5 11.5l-1.1 1.1"})]}),Pn=e=>n.jsx(m,{...e,children:n.jsx("path",{d:"M13 9.8A5.6 5.6 0 0 1 6.2 3a5.6 5.6 0 1 0 6.8 6.8Z"})}),Fn=e=>n.jsxs(m,{...e,children:[n.jsx("rect",{x:"1.8",y:"2.8",width:"12.4",height:"8.4",rx:"1.5"}),n.jsx("path",{d:"M5.8 14h4.4M8 11.2V14"})]}),it=pe,lt=fe,ct=Qe,dt=Xe,ut=ge,Un=nt,Wn=st,zn=rt,Gn=ot,qn=at;function be({size:e=16,children:t,...s}){return n.jsx("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",...s,children:t})}function Kn(e){return n.jsxs(be,{...e,children:[n.jsx("rect",{x:"2.5",y:"3",width:"11",height:"10",rx:"1.5"}),n.jsx("path",{d:"M10 3v10"})]})}function Hn(e){return n.jsxs(be,{...e,children:[n.jsx("rect",{x:"2.5",y:"3",width:"11",height:"10",rx:"1.5"}),n.jsx("path",{d:"M6 3v10"})]})}function ht(e){const{size:t=20,...s}=e;return n.jsx("svg",{viewBox:"0 0 32 32",width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinejoin:"round",strokeLinecap:"round","aria-hidden":"true",focusable:"false",...s,children:n.jsx("path",{d:"m5 11 11-6 11 6-11 6Z M5 16l11 6 11-6 M5 21l11 6 11-6"})})}const xe={chat:it,autonomy:lt,approvals:ct,usage:dt,settings:ut},mt="_button_12qr7_1",pt="_glyph_12qr7_30",ft="_sm_12qr7_37",gt="_block_12qr7_43",bt="_iconOnly_12qr7_48",xt="_ghost_12qr7_60",_t="_subtle_12qr7_71",yt="_primary_12qr7_84",jt="_danger_12qr7_99",j={button:mt,glyph:pt,sm:ft,block:gt,iconOnly:bt,ghost:xt,subtle:_t,primary:yt,danger:jt};function w({variant:e="subtle",size:t="md",icon:s,trailingIcon:o,block:a=!1,busy:r=!1,iconOnly:c=!1,className:u,children:d,disabled:p,type:_="button",...Ee}){const Ce=[j.button,j[e],j[t],c?j.iconOnly:"",a?j.block:"",u??""].filter(Boolean).join(" ");return n.jsxs("button",{type:_,className:Ce,disabled:p||r,"aria-busy":r||void 0,...Ee,children:[s?n.jsx("span",{className:j.glyph,children:s}):null,c?null:d,o?n.jsx("span",{className:j.glyph,children:o}):null]})}const vt="_tag_2eqdv_1",wt="_sm_2eqdv_19",kt="_mono_2eqdv_25",St="_dot_2eqdv_30",Nt="_marker_2eqdv_38",V={tag:vt,sm:wt,mono:kt,dot:St,marker:Nt},At={claude:"var(--engine-claude)",codex:"var(--engine-codex)",grok:"var(--engine-grok)",local:"var(--engine-local)"};function Et({children:e,engine:t,mono:s=!1,size:o="md",dot:a=!1,title:r,className:c}){const u=a||t!==void 0;return n.jsxs("span",{className:`${V.tag} ${V[o]} ${s?V.mono:""} ${c??""}`,title:r,"data-engine":t,children:[u?n.jsx("span",{className:V.dot,style:t?{background:At[t]}:void 0,"aria-hidden":"true"}):null,e]})}const v=[{id:"chat",label:"Chat",module:"ChatSection"},{id:"autonomy",label:"Autonomy",module:"AutonomySection"},{id:"approvals",label:"Approvals",module:"ApprovalsSection"},{id:"usage",label:"Usage",module:"UsageSection"},{id:"settings",label:"Settings",module:"SettingsSection"}],Ct=new Set(v.map(e=>e.id)),Z={min:240,max:360,def:264},X={min:260,max:480,def:320},_e="ashlr.verse.ui.v2",D={section:"chat",sidebarWidth:Z.def,sidebarCollapsed:!1,resourcesOpen:!0,resourcesWidth:X.def,pendingApprovals:0,command:null};function B(e,t){const s=Number(e);return!Number.isFinite(s)||s<=0?t.def:Math.max(t.min,Math.min(t.max,Math.round(s)))}function Mt(){try{const e=localStorage.getItem(_e);if(!e)return D;const t=JSON.parse(e);return{...D,section:typeof t.section=="string"&&Ct.has(t.section)?t.section:D.section,sidebarWidth:B(t.sidebarWidth,Z),sidebarCollapsed:t.sidebarCollapsed===!0,resourcesOpen:t.resourcesOpen!==!1,resourcesWidth:B(t.resourcesWidth,X)}}catch{return D}}let A=Mt(),se=0;const K=new Set;function Ot(e){const t={section:e.section,sidebarWidth:e.sidebarWidth,sidebarCollapsed:e.sidebarCollapsed,resourcesOpen:e.resourcesOpen,resourcesWidth:e.resourcesWidth};try{localStorage.setItem(_e,JSON.stringify(t))}catch{}}function y(e){const t={...A,...e};if(Object.keys(e).every(o=>Object.is(A[o],t[o])))return;const s=["section","sidebarWidth","sidebarCollapsed","resourcesOpen","resourcesWidth"].some(o=>!Object.is(A[o],t[o]));A=t,s&&Ot(t);for(const o of K)o()}function Tt(e){return K.add(e),()=>K.delete(e)}function ne(){return A}function E(e){y({section:e})}function Yn(e){y({sidebarWidth:B(e,Z)})}function Qn(e){y({sidebarCollapsed:e})}function Jn(e){y({resourcesOpen:e})}function Zn(e){y({resourcesWidth:B(e,X)})}function It(e){const t=Number.isFinite(e)?Math.max(0,Math.trunc(e)):0;y({pendingApprovals:t})}function H(e){se+=1,y({section:"chat",command:{name:e,nonce:se}})}function Xn(){y({command:null})}const ye="ashlr.verse.seats.v1",Lt=50;let U=null;function je(){if(U)return U;const e={};try{const t=localStorage.getItem(ye),s=t?JSON.parse(t):null;if(s&&typeof s=="object"&&!Array.isArray(s))for(const[o,a]of Object.entries(s)){if(!a||typeof a!="object"||Array.isArray(a))continue;const{seatId:r,model:c}=a;typeof r!="string"||r.length===0||typeof c!="string"||c.length===0||(e[o]={seatId:r,model:c})}}catch{}return U=e,e}function eo(e){const t=je();if(e){const a=t[e];if(a)return a}const s=Object.keys(t),o=s[s.length-1];return o?t[o]??null:null}function to(e,t){if(!e||!t.seatId||!t.model)return;const s=je();delete s[e],s[e]={seatId:t.seatId,model:t.model};const o=Object.keys(s);for(const a of o.slice(0,Math.max(0,o.length-Lt)))delete s[a];try{localStorage.setItem(ye,JSON.stringify(s))}catch{}}const oe="usage-version-unsupported",Rt="2.1.257";function b(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?e:null}function l(e,t){const s=e[t];return typeof s=="string"&&s.length>0?s:null}function h(e,t){const s=e[t];return typeof s=="number"&&Number.isFinite(s)?s:null}function x(e,t,s=!1){const o=e[t];return typeof o=="boolean"?o:s}function O(e){return Array.isArray(e)?e:[]}const Vt=/(launcher\.mjs|native-profiles|account-connections|console-startup|\/\.ashlr\b|Bearer\s|--token\b)/i;function Dt(e){if(typeof e!="string")return null;const t=e.trim();return t.length===0||t.length>200||Vt.test(t)||/[\r\n]/.test(t)?null:t}function Y(e){return e===null?null:Math.max(0,Math.min(100,e))}function ae(e){const t=b(e);if(!t)return null;const s=l(t,"id")??l(t,"label");if(s===null)return null;const o=b(t.nativeReport),a=x(t,"limitReached")||x(t,"rateLimitReached"),r=t.measured;return{id:s,label:l(t,"label"),usedPercent:Y(h(t,"usedPercent")??h(t,"used_percent")),resetsAt:l(t,"resetsAt")??l(t,"resets_at"),resetDescription:(o?l(o,"resetDescription"):null)??l(t,"resetDescription"),limitReached:a,measured:typeof r=="boolean"?r:!a}}function Bt(e){const t=b(e);if(!t)return null;const s=l(t,"balance"),o=s===null?h(t,"balance"):Number.parseFloat(s);return{hasCredits:x(t,"hasCredits")||x(t,"has_credits"),unlimited:x(t,"unlimited"),balance:s,balanceValue:typeof o=="number"&&Number.isFinite(o)?o:null}}const $t=["claude","codex","grok"];function Pt(e){const t=b(e);if(!t)return null;const s=l(t,"id"),o=l(t,"provider");if(s===null||o===null||!$t.includes(o))return null;const a=O(t.windows).map(ae).filter(d=>d!==null),r=l(t,"state"),c=l(t,"authentication"),u=b(t.unsupported);return{id:s,label:l(t,"label")??s,provider:o,state:r==="checking"||r==="observed"||r==="signed-out"||r==="unavailable"?r:"unavailable",authentication:c==="signed-in"||c==="signed-out"?c:"unknown",health:l(t,"health"),planType:l(t,"planType")??l(t,"plan_type"),observedAt:l(t,"observedAt"),windows:a,binding:ae(t.binding),credits:Bt(t.credits),reason:l(t,"reason"),unsupported:Ft(t,u),reconnectCommand:Dt(t.reconnectCommand),notes:O(t.notes).filter(d=>typeof d=="string")}}function Ft(e,t){if(t)return{code:l(t,"code")??oe,pinnedVersion:l(t,"pinnedVersion")??l(t,"version")};const s=l(e,"reason");return s!==oe?null:{code:s,pinnedVersion:Rt}}function Ut(e){const t=l(e,"collectorNote");if(t)return t;const s=b(e.collector);return!s||l(s,"owner")!=="another-collector"?null:l(s,"note")??"Another collector process owns the quota-refresh lease, so these readings are read-only and may be staler than this server’s poll interval."}function Wt(e){const t=b(e);if(!t)return null;const s=Array.isArray(t.accounts)?t.accounts:Array.isArray(e)?e:null;return s===null?null:{sampledAt:l(t,"sampledAt"),refreshing:x(t,"refreshing"),accounts:s.map(Pt).filter(o=>o!==null),collectorNote:Ut(t)}}function zt(e){const t=b(e);if(!t)return null;const s=l(t,"day");return s===null||!/^\d{4}-\d{2}-\d{2}$/.test(s)?null:{day:s,tokensIn:h(t,"tokensIn")??0,tokensOut:h(t,"tokensOut")??0,estCostUsd:h(t,"estCostUsd")??0,sessions:h(t,"sessions")??0,cacheRead:h(t,"cacheRead"),cacheWrite:h(t,"cacheWrite"),cacheHitRate:h(t,"cacheHitRate")}}function so(e,t){const s=b(e),o=s?Array.isArray(s.byDay)?s.byDay:Array.isArray(s.days)?s.days:null:Array.isArray(e)?e:null;if(o===null)return null;const a=s?l(s,"window"):null;return{window:a==="7d"||a==="30d"?a:t,days:o.map(zt).filter(r=>r!==null).sort((r,c)=>r.day.localeCompare(c.day)),generatedAt:s?l(s,"generatedAt"):null,estimated:s?x(s,"estimated",!0):!0,caveats:s?O(s.caveats).filter(r=>typeof r=="string"):[]}}function ve(e,t){const s=b(e);if(!s)return null;const o=l(s,"label")??l(s,"id")??l(s,"name")??l(s,"model");if(o===null)return null;const a=s.capabilities,r=l(s,"state"),c=s.supportsTools,u=h(s,"nativeContextLength")??h(s,"nativeContext"),d=h(s,"contextLength")??h(s,"configuredContext"),p=l(s,"placement");return{name:o,runtime:t,loaded:r!==null?r==="loaded":x(s,"loaded")||x(s,"resident"),sizeBytes:h(s,"sizeBytes")??h(s,"size"),sizeVramBytes:h(s,"sizeVramBytes")??h(s,"size_vram"),placement:p==="gpu"||p==="cpu"||p==="split"?p:"unknown",gpuPercent:Y(h(s,"gpuPercent")),memoryPercent:Y(h(s,"memoryPercent")),family:l(s,"family"),arch:l(s,"arch"),expiresAt:l(s,"expiresAt")??l(s,"expires_at"),parameterSize:l(s,"parameterSize")??l(s,"parameter_size"),quantization:l(s,"quantization")??l(s,"quantization_level"),nativeContext:u,configuredContext:d!==null&&u!==null&&d===u?null:d,capabilities:Array.isArray(a)?a.filter(_=>typeof _=="string"):null,supportsTools:typeof c=="boolean"?c:null}}function re(e,t){const s=b(e);if(!s)return null;const o=Array.isArray(s.models)?s.models:null;if(o===null)return null;const a=o.map(c=>ve(c,t)).filter(c=>c!==null),r=x(s,"stale");return{models:a,status:{runtime:t,reachable:x(s,"reachable"),reason:l(s,"reason"),stale:r,staleForMs:r?h(s,"staleForMs"):null,modelCount:a.length}}}function we(e){const t=b(e);if(!t)return null;const s=re(t.ollama,"ollama"),o=re(t.lmStudio??t.lmstudio,"lmstudio");if(s!==null||o!==null){const r=[s,o].filter(d=>d!==null),c=r.some(d=>d.status.reachable),u=b(t.machine);return{reachable:c,models:r.flatMap(d=>d.models),memoryBudgetBytes:(u?h(u,"totalMemoryBytes"):null)??h(t,"memoryBudgetBytes")??h(t,"memoryBudget"),freeMemoryBytes:u?h(u,"freeMemoryBytes"):null,reason:c?null:r.map(d=>d.status.reason).find(d=>d!==null)??null,runtimes:r.map(d=>d.status),notes:O(t.notes).filter(d=>typeof d=="string"),sampledAt:l(t,"sampledAt")}}const a=Array.isArray(t.models)?t.models:null;return a===null?null:{reachable:x(t,"reachable",!0),models:a.map(r=>ve(r,null)).filter(r=>r!==null),memoryBudgetBytes:h(t,"memoryBudgetBytes")??h(t,"memoryBudget"),freeMemoryBytes:h(t,"freeMemoryBytes"),reason:l(t,"reason"),runtimes:[],notes:O(t.notes).filter(r=>typeof r=="string"),sampledAt:l(t,"sampledAt")}}const Gt="verse-usage-frontier",qt="verse-usage-control",no={key:Gt,fetch:e=>S("/api/usage",e)};function Kt(e){return e instanceof P?e.status===404?"This server does not expose /api/verse/control, so configured caps and today’s spend are unavailable here.":`Configured caps unavailable (HTTP ${e.status}).`:"Configured caps unavailable: the request failed."}const oo={key:qt,fetch:async e=>{try{return{raw:await S("/api/verse/control",e),available:!0,reason:null}}catch(t){if(t instanceof P&&t.status===401||t instanceof DOMException&&t.name==="AbortError")throw t;return{raw:null,available:!1,reason:Kt(t)}}}},Ht="verse-usage-accounts",Yt="verse-usage-local-models",ie="verse-usage-series";function Qt(e,t){return t instanceof P?t.status===404?`This server does not expose ${e} yet, so this panel has no source.`:`${e} answered HTTP ${t.status}.`:`${e} could not be reached.`}function $(e){return async t=>{try{return{raw:await S(e,t),available:!0,reason:null}}catch(s){if(s instanceof P&&s.status===401||s instanceof DOMException&&s.name==="AbortError")throw s;return{raw:null,available:!1,reason:Qt(e,s)}}}}const Jt={key:Ht,fetch:$("/api/verse/accounts")},Zt=[350,1200],le=$("/api/verse/local-models");function Xt(e){if(!e.available)return!1;const t=we(e.raw);return t!==null&&!t.reachable}function es(e,t){return new Promise((s,o)=>{if(t?.aborted){o(new DOMException("Aborted","AbortError"));return}const a=()=>{clearTimeout(r),o(new DOMException("Aborted","AbortError"))},r=setTimeout(()=>{t?.removeEventListener("abort",a),s()},e);t?.addEventListener("abort",a,{once:!0})})}const ts={key:Yt,fetch:async e=>{let t=await le(e);for(const s of Zt){if(!Xt(t))return t;await es(s,e),t=await le(e)}return t}},ss={"7d":{key:`${ie}:7d`,fetch:$("/api/verse/usage-series?window=7d")},"30d":{key:`${ie}:30d`,fetch:$("/api/verse/usage-series?window=30d")}};function ao(e){return ss[e]}const C=[{id:"welcome",title:"Welcome to Verse",subtitle:"Five sections, one rail. Two minutes and you will know what each one does."},{id:"accounts",title:"Your seats",subtitle:"Which provider accounts this machine can actually dispatch to right now."},{id:"local",title:"Local runtime",subtitle:"Whether there is a model on this machine, and what that changes."},{id:"stops",title:"Three ways to stop",subtitle:"They do not have the same blast radius. This is the one screen that says so."},{id:"finish",title:"Make it yours",subtitle:"Theme, accent, density and font live in Settings. Then start a chat."}];function ns(e){return Number.isFinite(e)?Math.min(C.length-1,Math.max(0,Math.trunc(e))):0}const os={claude:"Sign back in with the Claude CLI on this machine, then reopen Verse.",codex:"Sign back in with the Codex CLI on this machine, then reopen Verse.",grok:"Reconnect the Grok seat through `ashlr resources`."};function as(e){const t=e.label||e.id,s={id:e.id,label:t,provider:e.provider};if(e.authentication==="signed-out"||e.state==="signed-out")return{...s,tone:"attention",state:"signed out",detail:e.reason??e.notes[0]??`Verse cannot dispatch to ${t} until this seat is signed in again.`,fix:e.reconnectCommand??os[e.provider]};if(e.unsupported)return{...s,tone:"attention",state:"probe blocked",detail:`The usage probe for ${t} is pinned to a specific CLI build`+(e.unsupported.pinnedVersion?` (${e.unsupported.pinnedVersion})`:"")+" and this machine is running a different one, so its quota is unreadable. The seat itself still works.",fix:null};if(e.state==="unavailable")return{...s,tone:"unknown",state:"no reading",detail:e.reason??`No usage reading came back for ${t}. That is not the same as a limit.`,fix:null};if(e.state==="checking")return{...s,tone:"unknown",state:"checking",detail:`Still probing ${t}.`,fix:null};const o=e.binding,a=o?.limitReached===!0,r=e.credits?.hasCredits===!0||e.credits?.unlimited===!0;if(a&&!r)return{...s,tone:"attention",state:"limit reached",detail:`${t} reported its limit reached. Pick another seat, or wait for the window to reset.`,fix:null};if(a&&r)return{...s,tone:"ok",state:"usable on credits",detail:`${t} has used up its included window but still has a spendable balance, so it can still dispatch.`,fix:null};const c=o?.measured===!0&&typeof o.usedPercent=="number"?o.usedPercent:null;return{...s,tone:"ok",state:"connected",detail:c===null?`${t} is signed in. No local utilization signal for this provider — that is expected, not a fault.`:`${t} is signed in, ${Math.round(c)}% through its binding window.`,fix:null}}function rs(e){if(e.loading)return{findings:null,summary:"Checking which accounts this machine can reach…",caveat:null,signedOutCount:0};if(!e.snapshot)return{findings:null,summary:"This server did not report a per-account roster, so Verse cannot say which seats are connected.",caveat:e.unavailableReason,signedOutCount:0};const t=e.snapshot.accounts.map(as);if(t.length===0)return{findings:t,summary:"No provider accounts are connected on this machine yet. Verse will still run local models.",caveat:e.snapshot.collectorNote,signedOutCount:0};const s=t.filter(r=>r.state==="signed out"),o=t.filter(r=>r.tone==="ok"),a=s.length===0?`${o.length} of ${t.length} ${t.length===1?"seat is":"seats are"} ready to dispatch.`:`${s.length} ${s.length===1?"seat is":"seats are"} signed out. Each one below says how to get it back.`;return{findings:t,summary:a,caveat:e.snapshot.collectorNote,signedOutCount:s.length}}const W="Local seats cost nothing and consume no provider quota, so the autonomous loop can keep working after a cloud window is used up.",z="Without one, every turn and every autonomous tick spends a provider account, and a used-up window stops the work.";function is(e){if(e.loading)return{tone:"unknown",state:"checking",summary:"Probing the local runtimes on this machine…",meaning:W,fix:null,modelCount:0,toolCapableCount:0,stale:!1};if(!e.snapshot)return{tone:"unknown",state:"not reported",summary:"This server does not report local runtimes, so Verse cannot say whether one is available here.",meaning:z,fix:e.unavailableReason,modelCount:0,toolCapableCount:0,stale:!1};const t=e.snapshot.models,s=t.filter(a=>a.supportsTools===!0).length,o=e.snapshot.runtimes.some(a=>a.stale);return e.snapshot.reachable?t.length===0?{tone:"attention",state:"no models",summary:"A local runtime answered, but it has no models installed.",meaning:z,fix:"Pull a model into the runtime, then press Refresh in Usage.",modelCount:0,toolCapableCount:0,stale:o}:{tone:"ok",state:o?"available (retained reading)":"available",summary:`${t.length} local ${t.length===1?"model":"models"} available`+(s>0?`, ${s} of them tool-capable.`:", none of them tool-capable.")+(o?" This is a retained reading, not a fresh probe.":""),meaning:s>0?W:`${W} A model that cannot call tools can answer, but cannot run an agentic turn.`,fix:null,modelCount:t.length,toolCapableCount:s,stale:o}:{tone:"attention",state:"unreachable",summary:"No local runtime answered. Verse cannot tell whether one is not running or not installed — the probe only knows it got no answer.",meaning:z,fix:"Start Ollama (or LM Studio) and press Refresh in Usage. If neither is installed, everything still works — it all runs on the cloud seats.",modelCount:0,toolCapableCount:0,stale:o}}const ls=[{name:"Pause",scope:"Halts autonomous dispatch only. A running loop parks instead of exiting.",limit:"Your own chats and the agent’s write tools keep working.",reversible:"Reversible in one click, with no restart and no confirmation.",tone:"ok"},{name:"Stop loop",scope:"Stops the daemon — and engages the GLOBAL kill switch while doing it.",limit:"That means it also refuses the agent’s own write tools, exactly like the emergency control.",reversible:"Reversible, but confirm-guarded. For an ordinary halt, use Pause.",tone:"attention"},{name:"Emergency stop",scope:"Engages the global kill switch (~/.ashlr/KILL) directly.",limit:"Every mutating path refuses: the loop, dispatch, and the agent’s own write tools.",reversible:"Reversible, confirm-guarded, and deliberately separated from the other two.",tone:"attention"}],ke="ashlr.verse.onboarding.v1",cs={completedAt:null,dismissedAt:null};function ds(){try{const e=localStorage.getItem(ke);if(!e)return cs;const t=JSON.parse(e);return{completedAt:typeof t.completedAt=="string"?t.completedAt:null,dismissedAt:typeof t.dismissedAt=="string"?t.dismissedAt:null}}catch{return{completedAt:null,dismissedAt:new Date(0).toISOString()}}}function Se(e){try{localStorage.setItem(ke,JSON.stringify(e))}catch{}}function us(e){return e.completedAt===null&&e.dismissedAt===null}const ce=ds();let k={...ce,open:us(ce),step:0};const Q=new Set;function F(e){const t={...k,...e};if(!Object.keys(e).every(s=>Object.is(k[s],t[s]))){k=t;for(const s of Q)s()}}function hs(e){return Q.add(e),()=>Q.delete(e)}function de(){return k}function ue(e){F({step:Math.max(0,Math.trunc(e))})}function he(){const e={completedAt:k.completedAt,dismissedAt:new Date().toISOString()};Se(e),F({...e,open:!1})}function ms(){const e={completedAt:new Date().toISOString(),dismissedAt:k.dismissedAt};Se(e),F({...e,open:!1})}function ro(){F({open:!0,step:0})}function ps(){return g.useSyncExternalStore(hs,de,de)}const fs="_card_13g9r_14",gs="_head_13g9r_56",bs="_headText_13g9r_64",xs="_eyebrow_13g9r_72",_s="_title_13g9r_80",ys="_subtitle_13g9r_88",js="_body_13g9r_96",vs="_lead_13g9r_107",ws="_aside_13g9r_113",ks="_caveat_13g9r_114",Ss="_kbd_13g9r_125",Ns="_sections_13g9r_138",As="_findings_13g9r_139",Es="_sectionRow_13g9r_148",Cs="_sectionIcon_13g9r_160",Ms="_localIcon_13g9r_161",Os="_sectionText_13g9r_173",Ts="_sectionName_13g9r_180",Is="_sectionBlurb_13g9r_190",Ls="_finding_13g9r_139",Rs="_findingHead_13g9r_210",Vs="_stopName_13g9r_218",Ds="_findingDetail_13g9r_225",Bs="_findingNote_13g9r_231",$s="_findingFix_13g9r_237",Ps="_fixLabel_13g9r_245",Fs="_fixText_13g9r_254",Us="_code_13g9r_260",Ws="_tone_13g9r_276",zs="_toneLabel_13g9r_283",Gs="_foot_13g9r_305",qs="_pips_13g9r_315",Ks="_pip_13g9r_315",Hs="_actions_13g9r_338",i={card:fs,head:gs,headText:bs,eyebrow:xs,title:_s,subtitle:ys,body:js,lead:vs,aside:ws,caveat:ks,kbd:Ss,sections:Ns,findings:As,sectionRow:Es,sectionIcon:Cs,localIcon:Ms,sectionText:Os,sectionName:Ts,sectionBlurb:Is,finding:Ls,findingHead:Rs,stopName:Vs,findingDetail:Ds,findingNote:Bs,findingFix:$s,fixLabel:Ps,fixText:Fs,code:Us,tone:Ws,toneLabel:zs,foot:Gs,pips:qs,pip:Ks,actions:Hs};function ee({tone:e,label:t}){const s=e==="ok"?Je:e==="attention"?et:tt;return n.jsxs("span",{className:i.tone,"data-tone":e,children:[n.jsx(s,{size:13,"aria-hidden":"true",focusable:"false"}),n.jsx("span",{className:i.toneLabel,children:t})]})}function T({children:e}){return n.jsx("div",{className:i.body,children:e})}const Ys={chat:"Talk to a seat. Sessions are grouped by project and resume where they stopped.",autonomy:"The human-out-of-the-loop cockpit: the loop, its budget, its scope, and what it did while you were away.",approvals:"Everything the loop produced that is waiting on you. Approving a PR proposal pushes a branch.",usage:"Which account you can actually use right now, and what it costs.",settings:"Theme, accent, density, font — and this tour again whenever you want it."};function Qs(){return n.jsxs(T,{children:[n.jsx("p",{className:i.lead,children:"Verse is the desktop surface over this machine’s agentic fleet. Everything it shows comes from one local server — no session, token or artifact leaves this machine."}),n.jsx("ul",{className:i.sections,children:v.map((e,t)=>{const s=xe[e.id];return n.jsxs("li",{className:i.sectionRow,children:[n.jsx("span",{className:i.sectionIcon,"aria-hidden":"true",children:n.jsx(s,{})}),n.jsxs("span",{className:i.sectionText,children:[n.jsxs("span",{className:i.sectionName,children:[e.label," ",n.jsxs("kbd",{className:i.kbd,children:["⌘",t+1]})]}),n.jsx("span",{className:i.sectionBlurb,children:Ys[e.id]})]})]},e.id)})})]})}function Js(){const e=J(Jt),t=g.useMemo(()=>rs({snapshot:e.data?.available?Wt(e.data.raw):null,loading:e.data===void 0&&e.status!=="error",unavailableReason:e.data?.reason??e.error?.message??null}),[e.data,e.status,e.error]);return n.jsxs(T,{children:[n.jsx("p",{className:i.lead,children:t.summary}),t.findings===null?null:n.jsx("ul",{className:i.findings,children:t.findings.map(s=>n.jsxs("li",{className:i.finding,children:[n.jsxs("div",{className:i.findingHead,children:[n.jsx(Et,{engine:s.provider,children:s.label}),n.jsx(ee,{tone:s.tone,label:s.state})]}),n.jsx("p",{className:i.findingDetail,children:s.detail}),s.fix?n.jsxs("p",{className:i.findingFix,children:[n.jsx("span",{className:i.fixLabel,children:"Fix"}),n.jsx("code",{className:i.code,children:s.fix})]}):null]},s.id))}),t.caveat?n.jsx("p",{className:i.caveat,children:t.caveat}):null,n.jsxs("p",{className:i.aside,children:["The full per-window picture — resets, credits, limits — lives in Usage"," ",n.jsx("kbd",{className:i.kbd,children:"⌘4"}),"."]})]})}function Zs(){const e=J(ts),t=g.useMemo(()=>is({snapshot:e.data?.available?we(e.data.raw):null,loading:e.data===void 0&&e.status!=="error",unavailableReason:e.data?.reason??e.error?.message??null}),[e.data,e.status,e.error]);return n.jsxs(T,{children:[n.jsxs("div",{className:i.findingHead,children:[n.jsx("span",{className:i.localIcon,"aria-hidden":"true",children:n.jsx(fe,{size:15})}),n.jsx(ee,{tone:t.tone,label:t.state})]}),n.jsx("p",{className:i.lead,children:t.summary}),n.jsx("p",{className:i.findingDetail,children:t.meaning}),t.fix?n.jsxs("p",{className:i.findingFix,children:[n.jsx("span",{className:i.fixLabel,children:"Fix"}),n.jsx("span",{className:i.fixText,children:t.fix})]}):null]})}function Xs(){return n.jsxs(T,{children:[n.jsxs("p",{className:i.lead,children:["Autonomy ",n.jsx("kbd",{className:i.kbd,children:"⌘2"})," has three stop controls. They are not interchangeable, and the difference is the most important thing on this screen."]}),n.jsx("ul",{className:i.findings,children:ls.map(e=>n.jsxs("li",{className:i.finding,children:[n.jsxs("div",{className:i.findingHead,children:[n.jsx("span",{className:i.stopName,children:e.name}),n.jsx(ee,{tone:e.tone,label:e.tone==="ok"?"narrow":"global"})]}),n.jsx("p",{className:i.findingDetail,children:e.scope}),n.jsx("p",{className:i.findingDetail,children:e.limit}),n.jsx("p",{className:i.findingNote,children:e.reversible})]},e.name))})]})}function en(){return n.jsxs(T,{children:[n.jsxs("p",{className:i.lead,children:["Settings ",n.jsx("kbd",{className:i.kbd,children:"⌘,"})," carries theme, accent hue, density, display font, corner radius and reduced motion. Every change applies as you make it — there is no save button."]}),n.jsx(w,{variant:"subtle",icon:n.jsx(ge,{size:14}),onClick:()=>E("settings"),children:"Open Settings"}),n.jsx("p",{className:i.aside,children:"You can replay this tour any time from Settings → Onboarding."})]})}const tn=[Qs,Js,Zs,Xs,en];function sn(){const{open:e,step:t}=ps(),s=ns(t),o=C[s],a=tn[s],r=s===C.length-1,c=g.useCallback(()=>he(),[]),u=g.useRef(null);return g.useEffect(()=>{if(!e)return;function d(p){if(p.key!=="Escape")return;const _=u.current;!_||!(p.target instanceof Node)||!_.contains(p.target)||(p.preventDefault(),he())}return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e]),e?n.jsxs("aside",{ref:u,className:i.card,"aria-labelledby":"verse-onboarding-title",role:"region",children:[n.jsxs("header",{className:i.head,children:[n.jsxs("div",{className:i.headText,children:[n.jsxs("p",{className:i.eyebrow,children:["Getting started · ",s+1," of ",C.length]}),n.jsx("h2",{id:"verse-onboarding-title",className:i.title,children:o.title}),n.jsx("p",{className:i.subtitle,children:o.subtitle})]}),n.jsx(w,{iconOnly:!0,variant:"ghost",size:"sm","aria-label":"Close getting started",icon:n.jsx(Ze,{size:14}),onClick:c})]}),n.jsx(a,{}),n.jsxs("footer",{className:i.foot,children:[n.jsx("ol",{className:i.pips,"aria-hidden":"true",children:C.map((d,p)=>n.jsx("li",{className:i.pip,"data-state":p===s?"current":p<s?"done":"todo"},d.id))}),n.jsxs("div",{className:i.actions,children:[n.jsx(w,{variant:"ghost",size:"sm",onClick:c,children:"Skip setup"}),s>0?n.jsx(w,{variant:"subtle",size:"sm",onClick:()=>ue(s-1),children:"Back"}):null,r?n.jsx(w,{variant:"primary",size:"sm",icon:n.jsx(pe,{size:14}),onClick:()=>{ms(),H("new-chat")},children:"Start a first chat"}):n.jsx(w,{variant:"primary",size:"sm",onClick:()=>ue(s+1),children:"Next"})]})]})]}):null}function nn(){return g.useSyncExternalStore(Tt,ne,ne)}const on="_shell_tbse1_5",an="_rail_tbse1_21",rn="_railDragStrip_tbse1_44",ln="_mark_tbse1_52",cn="_railList_tbse1_62",dn="_railFoot_tbse1_71",un="_railButton_tbse1_73",hn="_railDot_tbse1_104",mn="_section_tbse1_116",pn="_loading_tbse1_126",fn="_missing_tbse1_135",gn="_missingTitle_tbse1_142",bn="_missingBody_tbse1_149",xn="_missingDetail_tbse1_150",f={shell:on,rail:an,railDragStrip:rn,mark:ln,railList:cn,railFoot:dn,railButton:un,railDot:hn,section:mn,loading:pn,missing:fn,missingTitle:gn,missingBody:bn,missingDetail:xn},_n=Object.assign({"./sections/ApprovalsSection.tsx":()=>N(()=>import("./ApprovalsSection-B_Xor8JH.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27])),"./sections/AutonomySection.tsx":()=>N(()=>import("./AutonomySection-BEwITtPJ.js"),__vite__mapDeps([28,1,5,6,7,8,2,3,9,12,13,14,15,23,18,19,24,22,10,11,29,30,16,17,31,25,26,4,32])),"./sections/ChatSection.tsx":()=>N(()=>import("./ChatSection-bRAzlMth.js"),__vite__mapDeps([33,1,5,6,7,8,2,3,9,25,26,29,30,34,12,13,14,15,16,17,20,21,4,35])),"./sections/SettingsSection.tsx":()=>N(()=>import("./SettingsSection-p-7FCGfn.js"),__vite__mapDeps([36,1,2,3,7,25,26,29,30,16,17,6,8,4,37])),"./sections/UsageSection.tsx":()=>N(()=>import("./UsageSection-Db99N6ao.js"),__vite__mapDeps([38,1,2,3,4,14,15,39,40,16,17,34,10,11,31,22,25,26,7,41]))});function G({label:e,moduleName:t,detail:s}){return n.jsxs("div",{className:f.missing,role:"status",children:[n.jsxs("h1",{className:f.missingTitle,children:[e," is not wired up yet"]}),n.jsxs("p",{className:f.missingBody,children:["This build has no ",n.jsxs("code",{children:["routes/verse/sections/",t,".tsx"]}),". The rail keeps the slot so the section appears the moment that module lands — nothing here is broken, and the other sections still work."]}),s?n.jsx("p",{className:f.missingDetail,children:s}):null]})}function yn(e){const t=v.find(o=>o.id===e),s=_n[`./sections/${t.module}.tsx`];return async()=>{if(!s)return{default:()=>n.jsx(G,{label:t.label,moduleName:t.module})};try{const o=await s(),a=o[t.module]??o.default;return typeof a!="function"?{default:()=>n.jsx(G,{label:t.label,moduleName:t.module,detail:`The module loaded but exports no \`${t.module}\` component.`})}:{default:a}}catch(o){const a=o instanceof Error?o.message:String(o);return{default:()=>n.jsx(G,{label:t.label,moduleName:t.module,detail:a})}}}}const jn=new Map(v.map(e=>[e.id,g.lazy(yn(e.id))])),vn=We({status:"pending",limit:500});function wn(){const e=nn(),t=Me(),s=jn.get(e.section),a=J(vn).data?.pending;g.useEffect(()=>{typeof a=="number"&&It(a)},[a]),g.useEffect(()=>{function c(u){if(!(u.metaKey||u.ctrlKey)||u.altKey||u.shiftKey)return;const d=Number.parseInt(u.key,10);if(Number.isInteger(d)&&d>=1&&d<=v.length){u.preventDefault(),E(v[d-1].id);return}switch(u.key.toLowerCase()){case"k":u.preventDefault(),H("quick-switcher");break;case"n":u.preventDefault(),H("new-chat");break;case",":u.preventDefault(),E("settings");break}}return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[]),g.useEffect(()=>Ye(c=>{c==="open-settings"?E("settings"):c==="toggle-theme"&&t.cycle()}),[t]),g.useEffect(()=>{Ke(t.theme)},[t.theme]);const r=g.useMemo(()=>`Theme: ${t.theme} — click to cycle`,[t.theme]);return n.jsxs("div",{className:f.shell,children:[n.jsxs("nav",{className:f.rail,"aria-label":"Verse sections",children:[n.jsx("span",{className:f.railDragStrip,"data-app-region":"drag","aria-hidden":"true"}),n.jsxs("span",{className:f.mark,title:"Ashlr Verse",children:[n.jsx(ht,{}),n.jsx("span",{className:"visually-hidden",children:"Ashlr Verse"})]}),n.jsx("ul",{className:f.railList,children:v.map((c,u)=>{const d=xe[c.id],p=c.id==="approvals"?e.pendingApprovals:0,_=e.section===c.id;return n.jsx("li",{children:n.jsxs("button",{type:"button",className:f.railButton,"aria-current":_?"page":void 0,"data-section":c.id,title:`${c.label} (⌘${u+1})`,"aria-label":p>0?`${c.label}, ${p} pending`:c.label,onClick:()=>E(c.id),children:[n.jsx(d,{}),p>0?n.jsx("span",{className:f.railDot,"data-pending":p,"aria-hidden":"true"}):null]})},c.id)})}),n.jsx("div",{className:f.railFoot,children:n.jsx("button",{type:"button",className:f.railButton,onClick:t.cycle,title:r,"aria-label":r,"data-theme-toggle":t.theme,children:n.jsx(kn,{preference:t.theme})})})]}),n.jsx("main",{className:f.section,"data-section":e.section,id:"main-content",tabIndex:-1,children:n.jsx(Fe,{resetKey:e.section,children:n.jsx(g.Suspense,{fallback:n.jsx(Sn,{}),children:n.jsx(s,{})})})}),n.jsx(sn,{})]})}function kn({preference:e}){return n.jsxs("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinejoin:"round",strokeLinecap:"round","aria-hidden":"true",focusable:"false",children:[n.jsx("circle",{cx:"8",cy:"8",r:"4.2"}),e==="dark"?n.jsx("path",{d:"M8 3.8a4.2 4.2 0 0 0 0 8.4Z",fill:"currentColor",stroke:"none"}):null,e==="light"?n.jsx("path",{d:"M8 1.6v1M8 13.4v1M14.4 8h-1M2.6 8h-1M12.5 3.5l-.7.7M4.2 11.8l-.7.7M12.5 12.5l-.7-.7M4.2 4.2l-.7-.7"}):null]})}function Sn(){return n.jsx("div",{className:f.loading,role:"status","aria-live":"polite",children:"Loading…"})}const Ne="verse-bootstrap",I="verse-sessions",q={key:Ne,fetch:e=>S("/api/verse/bootstrap",e)},io={key:I,fetch:e=>S("/api/verse/sessions",e)};function L(e,t=""){return`/api/verse/sessions/${encodeURIComponent(e)}${t}`}function lo(e,t){return S(L(e),t)}class Nn extends Error{constructor(){super("Unlock actions with the mutation token before chatting."),this.name="VerseMutationLockedError"}}async function R(e,t){const s=Ie();if(!s)throw new Nn;const o=await Oe(e,t,s);return Te(),o}function Ae(){M(I),M(Ne)}async function co(e){const t=await R("/api/verse/sessions",e);return Ae(),t}async function uo(e,t){const s={text:t},o=await R(L(e,"/turns"),s);return M(I),o}async function ho(e){await R(L(e,"/cancel"),{}),M(I)}async function mo(e){await R(L(e,"/delete"),{}),Ae()}async function po(e,t){const s=await R(L(e,"/rename"),{title:t});return M(I),s}const An="_shell_k4nf7_1",En="_checking_k4nf7_2",me={shell:An,checking:En};function Cn(){const e=Le();return g.useEffect(()=>{if(e!=="checking")return;let t=!1;return Re().then(s=>{if(!(t||s))return Ve(q.key,q.fetch).then(()=>{t||De(Be(q.key).status==="success")})}),()=>{t=!0}},[e]),e==="checking"?n.jsx("p",{className:me.checking,role:"status",children:"Checking for an existing Verse session…"}):e==="unauthenticated"?n.jsx($e,{heading:"Connect to Ashlr Verse",command:"ashlr verse",subject:"Ashlr Verse",mutationField:!0}):n.jsxs(Ue,{children:[n.jsx(Pe,{}),n.jsx("div",{className:me.shell,children:n.jsx(wn,{})})]})}const fo=Object.freeze(Object.defineProperty({__proto__:null,VerseConsoleApp:Cn},Symbol.toStringTag,{value:"Module"}));export{Gn as A,w as B,qn as C,Dn as D,Rn as E,et as F,Fn as G,$n as H,ot as I,Pn as J,Vn as K,Bn as L,tt as M,Jt as N,ts as O,Wn as P,ao as Q,no as R,Un as S,zn as T,oo as U,ht as V,Wt as W,we as X,so as Y,fo as Z,Hn as a,L as b,Kn as c,io as d,Nn as e,lo as f,co as g,ho as h,Ae as i,po as j,mo as k,eo as l,Xn as m,Yn as n,Zn as o,Qn as p,Jn as q,to as r,uo as s,Z as t,nn as u,q as v,X as w,ps as x,ro as y,Et as z};
|
|
3
|
-
//# sourceMappingURL=VerseConsoleApp-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ApprovalsSection-CBZquyLK.js","assets/index-CpgkRaTi.js","assets/global-BHjd6fVZ.js","assets/global-BeRYd1Bu.css","assets/queries-856qUN3Y.js","assets/MutationTokenDialog-DYF8n_RD.js","assets/Dialog-CNd7q89m.js","assets/index-CJ-e8YA9.js","assets/Dialog-DxN7RgB5.css","assets/MutationTokenDialog-jWLLCxWn.css","assets/Epistemic-53PikaUI.js","assets/Epistemic-DiyMyeaN.css","assets/RefreshIndicator-DXJQXKyA.js","assets/RefreshIndicator-O7jUBOmX.css","assets/Skeleton-YkcOpgFb.js","assets/Skeleton-D2JaTXyv.css","assets/StatusBadge-DJw0LSPg.js","assets/StatusBadge-TpDqZf6K.css","assets/ConfirmDialog-deO0C0iY.js","assets/ConfirmDialog-cYuivhCX.css","assets/DiffViewer-DTO0KRuG.js","assets/DiffViewer-hN7X6wGT.css","assets/format-fggwu_Rs.js","assets/use-guarded-action-DwaESKVy.js","assets/use-guarded-action-Bqa2v0a-.css","assets/RouteErrorBoundary-CZd7ln8v.js","assets/RouteErrorBoundary-BIpdnxp-.css","assets/ApprovalsSection-CRP59wSb.css","assets/AutonomySection-CQVpEdCE.js","assets/Meter-DRWZQgr1.js","assets/Meter-CGBsbXUX.css","assets/fleet-model-DXCfVtNW.js","assets/workspace-model-JgmWDKt4.js","assets/verse-model-Dllo8rRt.js","assets/AutonomySection-DTN6m6QE.css","assets/ChatSection-DmE9K0Tg.js","assets/ChatSection-DiRvNX3Q.css","assets/SettingsSection-C9Qs9JWW.js","assets/SettingsSection-DGJMdUh2.css","assets/UsageSection-C__ziNkV.js","assets/TableView-Bj-w1O6o.js","assets/TableView-R6Yeztp1.css","assets/UsageSection-UUYDidOg.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{j as n,r as g,_ as A}from"./index-CpgkRaTi.js";import{a as _,A as P,f as J,k as Me,o as O,b as Oe,t as Te,g as Ie,h as Re,p as Le,r as Ve,m as De,i as Be,S as $e,l as Pe}from"./global-BHjd6fVZ.js";import{R as Fe,T as Ue}from"./RouteErrorBoundary-CZd7ln8v.js";import{i as We}from"./queries-856qUN3Y.js";import"./index-CJ-e8YA9.js";const te="ashlr:desktop-command",ze=["open-settings","toggle-theme"];function Ge(e){if(e==="light"||e==="dark")return e;try{return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}}function qe(){return window.__ASHLR_DESKTOP__}function Ke(e){try{qe()?.reportTheme?.(Ge(e))}catch{}}function Ye(e){return typeof e=="string"&&ze.includes(e)}function He(e){function t(s){const a=s.detail?.command;Ye(a)&&e(a)}return window.addEventListener(te,t),()=>window.removeEventListener(te,t)}function m({size:e=16,title:t,children:s,...o}){return n.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",focusable:"false",...t?{role:"img"}:{"aria-hidden":!0},...o,children:[t?n.jsx("title",{children:t}):null,s]})}const pe=e=>n.jsx(m,{...e,children:n.jsx("path",{d:"M2.5 11.5V4.25A1.75 1.75 0 0 1 4.25 2.5h7.5a1.75 1.75 0 0 1 1.75 1.75v4.5a1.75 1.75 0 0 1-1.75 1.75H5.5L2.5 13.5v-2Z"})}),fe=e=>n.jsxs(m,{...e,children:[n.jsx("rect",{x:"4.5",y:"4.5",width:"7",height:"7",rx:"1.5"}),n.jsx("path",{d:"M6.5 1.5v3M9.5 1.5v3M6.5 11.5v3M9.5 11.5v3M1.5 6.5h3M1.5 9.5h3M11.5 6.5h3M11.5 9.5h3"})]}),Qe=e=>n.jsxs(m,{...e,children:[n.jsx("path",{d:"M2 9.5 3.6 3.4A1.5 1.5 0 0 1 5.05 2.3h5.9a1.5 1.5 0 0 1 1.45 1.1L14 9.5"}),n.jsx("path",{d:"M2 9.5h3l.8 1.6h4.4l.8-1.6h3v2.6A1.9 1.9 0 0 1 12.1 14H3.9A1.9 1.9 0 0 1 2 12.1V9.5Z"})]}),Dn=e=>n.jsx(m,{...e,children:n.jsx("path",{d:"m3 8.5 3.2 3.2L13 5"})}),Je=e=>n.jsxs(m,{...e,children:[n.jsx("circle",{cx:"8",cy:"8",r:"6"}),n.jsx("path",{d:"m5.2 8.2 1.9 1.9 3.7-4"})]}),Ze=e=>n.jsx(m,{...e,children:n.jsx("path",{d:"m4 4 8 8M12 4l-8 8"})}),Xe=e=>n.jsxs(m,{...e,children:[n.jsx("path",{d:"M2.2 11.5a6.4 6.4 0 1 1 11.6 0"}),n.jsx("path",{d:"M8 11 10.8 6.6"}),n.jsx("circle",{cx:"8",cy:"11.6",r:"0.9",fill:"currentColor",stroke:"none"})]}),ge=e=>n.jsxs(m,{...e,children:[n.jsx("path",{d:"M2.5 4.5h4M9.5 4.5h4M2.5 11.5h2M7.5 11.5h6"}),n.jsx("circle",{cx:"8",cy:"4.5",r:"1.6"}),n.jsx("circle",{cx:"6",cy:"11.5",r:"1.6"})]}),et=e=>n.jsxs(m,{...e,children:[n.jsx("path",{d:"M8 2.6 14.2 13H1.8L8 2.6Z"}),n.jsx("path",{d:"M8 6.6v3"}),n.jsx("circle",{cx:"8",cy:"11.3",r:"0.75",fill:"currentColor",stroke:"none"})]}),tt=e=>n.jsxs(m,{...e,children:[n.jsx("circle",{cx:"8",cy:"8",r:"6"}),n.jsx("path",{d:"M8 7.4v3.4"}),n.jsx("circle",{cx:"8",cy:"5.4",r:"0.75",fill:"currentColor",stroke:"none"})]}),st=e=>n.jsx(m,{...e,children:n.jsx("path",{d:"M8 3.2v9.6M3.2 8h9.6"})}),nt=e=>n.jsxs(m,{...e,children:[n.jsx("circle",{cx:"7.2",cy:"7.2",r:"4.2"}),n.jsx("path",{d:"m10.4 10.4 3.1 3.1"})]}),Bn=e=>n.jsxs(m,{...e,children:[n.jsx("rect",{x:"5.5",y:"5.5",width:"8",height:"8",rx:"1.5"}),n.jsx("path",{d:"M10.5 3.5a1.5 1.5 0 0 0-1.5-1.5H4A1.5 1.5 0 0 0 2.5 3.5v5A1.5 1.5 0 0 0 4 10"})]}),ot=e=>n.jsx(m,{...e,children:n.jsx("path",{d:"m4 6.2 4 4 4-4"})}),at=e=>n.jsx(m,{...e,children:n.jsx("path",{d:"m6.2 4 4 4-4 4"})}),rt=e=>n.jsx(m,{...e,children:n.jsx("path",{d:"M2.8 4.2h10.4M6.4 4.2V2.8h3.2v1.4M4.2 4.2l.6 8.2a1.3 1.3 0 0 0 1.3 1.2h3.8a1.3 1.3 0 0 0 1.3-1.2l.6-8.2"})}),$n=e=>n.jsxs(m,{...e,children:[n.jsx("path",{d:"M9.5 2.5H13.5v4M13.5 2.5 7.8 8.2"}),n.jsx("path",{d:"M12.5 9.6v2.9a1.5 1.5 0 0 1-1.5 1.5H3.5A1.5 1.5 0 0 1 2 12.5V5a1.5 1.5 0 0 1 1.5-1.5h2.9"})]}),Pn=e=>n.jsxs(m,{...e,children:[n.jsx("rect",{x:"3",y:"7",width:"10",height:"6.5",rx:"1.5"}),n.jsx("path",{d:"M5.5 7V5.2a2.5 2.5 0 0 1 5 0V7"})]}),Fn=e=>n.jsxs(m,{...e,children:[n.jsx("circle",{cx:"8",cy:"8",r:"3.1"}),n.jsx("path",{d:"M8 1.5v1.6M8 12.9v1.6M1.5 8h1.6M12.9 8h1.6M3.4 3.4l1.1 1.1M11.5 11.5l1.1 1.1M12.6 3.4l-1.1 1.1M4.5 11.5l-1.1 1.1"})]}),Un=e=>n.jsx(m,{...e,children:n.jsx("path",{d:"M13 9.8A5.6 5.6 0 0 1 6.2 3a5.6 5.6 0 1 0 6.8 6.8Z"})}),Wn=e=>n.jsxs(m,{...e,children:[n.jsx("rect",{x:"1.8",y:"2.8",width:"12.4",height:"8.4",rx:"1.5"}),n.jsx("path",{d:"M5.8 14h4.4M8 11.2V14"})]}),it=pe,lt=fe,ct=Qe,dt=Xe,ut=ge,zn=nt,Gn=st,qn=rt,Kn=ot,Yn=at;function be({size:e=16,children:t,...s}){return n.jsx("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",...s,children:t})}function Hn(e){return n.jsxs(be,{...e,children:[n.jsx("rect",{x:"2.5",y:"3",width:"11",height:"10",rx:"1.5"}),n.jsx("path",{d:"M10 3v10"})]})}function Qn(e){return n.jsxs(be,{...e,children:[n.jsx("rect",{x:"2.5",y:"3",width:"11",height:"10",rx:"1.5"}),n.jsx("path",{d:"M6 3v10"})]})}function ht(e){const{size:t=20,...s}=e;return n.jsx("svg",{viewBox:"0 0 32 32",width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinejoin:"round",strokeLinecap:"round","aria-hidden":"true",focusable:"false",...s,children:n.jsx("path",{d:"m5 11 11-6 11 6-11 6Z M5 16l11 6 11-6 M5 21l11 6 11-6"})})}const xe={chat:it,autonomy:lt,approvals:ct,usage:dt,settings:ut},mt="_button_12qr7_1",pt="_glyph_12qr7_30",ft="_sm_12qr7_37",gt="_block_12qr7_43",bt="_iconOnly_12qr7_48",xt="_ghost_12qr7_60",_t="_subtle_12qr7_71",yt="_primary_12qr7_84",vt="_danger_12qr7_99",j={button:mt,glyph:pt,sm:ft,block:gt,iconOnly:bt,ghost:xt,subtle:_t,primary:yt,danger:vt};function k({variant:e="subtle",size:t="md",icon:s,trailingIcon:o,block:a=!1,busy:r=!1,iconOnly:c=!1,className:u,children:d,disabled:p,type:y="button",...Ee}){const Ce=[j.button,j[e],j[t],c?j.iconOnly:"",a?j.block:"",u??""].filter(Boolean).join(" ");return n.jsxs("button",{type:y,className:Ce,disabled:p||r,"aria-busy":r||void 0,...Ee,children:[s?n.jsx("span",{className:j.glyph,children:s}):null,c?null:d,o?n.jsx("span",{className:j.glyph,children:o}):null]})}const jt="_tag_2eqdv_1",wt="_sm_2eqdv_19",kt="_mono_2eqdv_25",St="_dot_2eqdv_30",Nt="_marker_2eqdv_38",V={tag:jt,sm:wt,mono:kt,dot:St,marker:Nt},At={claude:"var(--engine-claude)",codex:"var(--engine-codex)",grok:"var(--engine-grok)",local:"var(--engine-local)"};function Et({children:e,engine:t,mono:s=!1,size:o="md",dot:a=!1,title:r,className:c}){const u=a||t!==void 0;return n.jsxs("span",{className:`${V.tag} ${V[o]} ${s?V.mono:""} ${c??""}`,title:r,"data-engine":t,children:[u?n.jsx("span",{className:V.dot,style:t?{background:At[t]}:void 0,"aria-hidden":"true"}):null,e]})}const w=[{id:"chat",label:"Chat",module:"ChatSection"},{id:"autonomy",label:"Autonomy",module:"AutonomySection"},{id:"approvals",label:"Approvals",module:"ApprovalsSection"},{id:"usage",label:"Usage",module:"UsageSection"},{id:"settings",label:"Settings",module:"SettingsSection"}],Ct=new Set(w.map(e=>e.id)),Z={min:240,max:360,def:264},X={min:260,max:480,def:320},_e="ashlr.verse.ui.v2",D={section:"chat",sidebarWidth:Z.def,sidebarCollapsed:!1,resourcesOpen:!0,resourcesWidth:X.def,pendingApprovals:0,command:null};function B(e,t){const s=Number(e);return!Number.isFinite(s)||s<=0?t.def:Math.max(t.min,Math.min(t.max,Math.round(s)))}function Mt(){try{const e=localStorage.getItem(_e);if(!e)return D;const t=JSON.parse(e);return{...D,section:typeof t.section=="string"&&Ct.has(t.section)?t.section:D.section,sidebarWidth:B(t.sidebarWidth,Z),sidebarCollapsed:t.sidebarCollapsed===!0,resourcesOpen:t.resourcesOpen!==!1,resourcesWidth:B(t.resourcesWidth,X)}}catch{return D}}let E=Mt(),se=0;const K=new Set;function Ot(e){const t={section:e.section,sidebarWidth:e.sidebarWidth,sidebarCollapsed:e.sidebarCollapsed,resourcesOpen:e.resourcesOpen,resourcesWidth:e.resourcesWidth};try{localStorage.setItem(_e,JSON.stringify(t))}catch{}}function v(e){const t={...E,...e};if(Object.keys(e).every(o=>Object.is(E[o],t[o])))return;const s=["section","sidebarWidth","sidebarCollapsed","resourcesOpen","resourcesWidth"].some(o=>!Object.is(E[o],t[o]));E=t,s&&Ot(t);for(const o of K)o()}function Tt(e){return K.add(e),()=>K.delete(e)}function ne(){return E}function C(e){v({section:e})}function Jn(e){v({sidebarWidth:B(e,Z)})}function Zn(e){v({sidebarCollapsed:e})}function Xn(e){v({resourcesOpen:e})}function eo(e){v({resourcesWidth:B(e,X)})}function It(e){const t=Number.isFinite(e)?Math.max(0,Math.trunc(e)):0;v({pendingApprovals:t})}function Y(e){se+=1,v({section:"chat",command:{name:e,nonce:se}})}function to(){v({command:null})}const ye="ashlr.verse.seats.v1",Rt=50;let U=null;function ve(){if(U)return U;const e={};try{const t=localStorage.getItem(ye),s=t?JSON.parse(t):null;if(s&&typeof s=="object"&&!Array.isArray(s))for(const[o,a]of Object.entries(s)){if(!a||typeof a!="object"||Array.isArray(a))continue;const{seatId:r,model:c}=a;typeof r!="string"||r.length===0||typeof c!="string"||c.length===0||(e[o]={seatId:r,model:c})}}catch{}return U=e,e}function so(e){const t=ve();if(e){const a=t[e];if(a)return a}const s=Object.keys(t),o=s[s.length-1];return o?t[o]??null:null}function no(e,t){if(!e||!t.seatId||!t.model)return;const s=ve();delete s[e],s[e]={seatId:t.seatId,model:t.model};const o=Object.keys(s);for(const a of o.slice(0,Math.max(0,o.length-Rt)))delete s[a];try{localStorage.setItem(ye,JSON.stringify(s))}catch{}}const oe="usage-version-unsupported",Lt="2.1.257";function b(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?e:null}function l(e,t){const s=e[t];return typeof s=="string"&&s.length>0?s:null}function h(e,t){const s=e[t];return typeof s=="number"&&Number.isFinite(s)?s:null}function x(e,t,s=!1){const o=e[t];return typeof o=="boolean"?o:s}function T(e){return Array.isArray(e)?e:[]}const Vt=/(launcher\.mjs|native-profiles|account-connections|console-startup|\/\.ashlr\b|Bearer\s|--token\b)/i;function Dt(e){if(typeof e!="string")return null;const t=e.trim();return t.length===0||t.length>200||Vt.test(t)||/[\r\n]/.test(t)?null:t}function H(e){return e===null?null:Math.max(0,Math.min(100,e))}function ae(e){const t=b(e);if(!t)return null;const s=l(t,"id")??l(t,"label");if(s===null)return null;const o=b(t.nativeReport),a=x(t,"limitReached")||x(t,"rateLimitReached"),r=t.measured;return{id:s,label:l(t,"label"),usedPercent:H(h(t,"usedPercent")??h(t,"used_percent")),resetsAt:l(t,"resetsAt")??l(t,"resets_at"),resetDescription:(o?l(o,"resetDescription"):null)??l(t,"resetDescription"),limitReached:a,measured:typeof r=="boolean"?r:!a}}function Bt(e){const t=b(e);if(!t)return null;const s=l(t,"balance"),o=s===null?h(t,"balance"):Number.parseFloat(s);return{hasCredits:x(t,"hasCredits")||x(t,"has_credits"),unlimited:x(t,"unlimited"),balance:s,balanceValue:typeof o=="number"&&Number.isFinite(o)?o:null}}const $t=["claude","codex","grok"];function Pt(e){const t=b(e);if(!t)return null;const s=l(t,"id"),o=l(t,"provider");if(s===null||o===null||!$t.includes(o))return null;const a=T(t.windows).map(ae).filter(d=>d!==null),r=l(t,"state"),c=l(t,"authentication"),u=b(t.unsupported);return{id:s,label:l(t,"label")??s,provider:o,state:r==="checking"||r==="observed"||r==="signed-out"||r==="unavailable"?r:"unavailable",authentication:c==="signed-in"||c==="signed-out"?c:"unknown",health:l(t,"health"),planType:l(t,"planType")??l(t,"plan_type"),observedAt:l(t,"observedAt"),windows:a,binding:ae(t.binding),credits:Bt(t.credits),reason:l(t,"reason"),unsupported:Ft(t,u),reconnectCommand:Dt(t.reconnectCommand),notes:T(t.notes).filter(d=>typeof d=="string")}}function Ft(e,t){if(t)return{code:l(t,"code")??oe,pinnedVersion:l(t,"pinnedVersion")??l(t,"version")};const s=l(e,"reason");return s!==oe?null:{code:s,pinnedVersion:Lt}}function Ut(e){const t=l(e,"collectorNote");if(t)return t;const s=b(e.collector);return!s||l(s,"owner")!=="another-collector"?null:l(s,"note")??"Another collector process owns the quota-refresh lease, so these readings are read-only and may be staler than this server’s poll interval."}function Wt(e){const t=b(e);if(!t)return null;const s=Array.isArray(t.accounts)?t.accounts:Array.isArray(e)?e:null;return s===null?null:{sampledAt:l(t,"sampledAt"),refreshing:x(t,"refreshing"),accounts:s.map(Pt).filter(o=>o!==null),collectorNote:Ut(t)}}function zt(e){const t=b(e);if(!t)return null;const s=l(t,"day");return s===null||!/^\d{4}-\d{2}-\d{2}$/.test(s)?null:{day:s,tokensIn:h(t,"tokensIn")??0,tokensOut:h(t,"tokensOut")??0,estCostUsd:h(t,"estCostUsd")??0,sessions:h(t,"sessions")??0,cacheRead:h(t,"cacheRead"),cacheWrite:h(t,"cacheWrite"),cacheHitRate:h(t,"cacheHitRate")}}function oo(e,t){const s=b(e),o=s?Array.isArray(s.byDay)?s.byDay:Array.isArray(s.days)?s.days:null:Array.isArray(e)?e:null;if(o===null)return null;const a=s?l(s,"window"):null;return{window:a==="7d"||a==="30d"?a:t,days:o.map(zt).filter(r=>r!==null).sort((r,c)=>r.day.localeCompare(c.day)),generatedAt:s?l(s,"generatedAt"):null,estimated:s?x(s,"estimated",!0):!0,caveats:s?T(s.caveats).filter(r=>typeof r=="string"):[]}}function je(e,t){const s=b(e);if(!s)return null;const o=l(s,"label")??l(s,"id")??l(s,"name")??l(s,"model");if(o===null)return null;const a=s.capabilities,r=l(s,"state"),c=s.supportsTools,u=h(s,"nativeContextLength")??h(s,"nativeContext"),d=h(s,"contextLength")??h(s,"configuredContext"),p=l(s,"placement");return{name:o,runtime:t,loaded:r!==null?r==="loaded":x(s,"loaded")||x(s,"resident"),sizeBytes:h(s,"sizeBytes")??h(s,"size"),sizeVramBytes:h(s,"sizeVramBytes")??h(s,"size_vram"),placement:p==="gpu"||p==="cpu"||p==="split"?p:"unknown",gpuPercent:H(h(s,"gpuPercent")),memoryPercent:H(h(s,"memoryPercent")),family:l(s,"family"),arch:l(s,"arch"),expiresAt:l(s,"expiresAt")??l(s,"expires_at"),parameterSize:l(s,"parameterSize")??l(s,"parameter_size"),quantization:l(s,"quantization")??l(s,"quantization_level"),nativeContext:u,configuredContext:d!==null&&u!==null&&d===u?null:d,capabilities:Array.isArray(a)?a.filter(y=>typeof y=="string"):null,supportsTools:typeof c=="boolean"?c:null}}function re(e,t){const s=b(e);if(!s)return null;const o=Array.isArray(s.models)?s.models:null;if(o===null)return null;const a=o.map(c=>je(c,t)).filter(c=>c!==null),r=x(s,"stale");return{models:a,status:{runtime:t,reachable:x(s,"reachable"),reason:l(s,"reason"),stale:r,staleForMs:r?h(s,"staleForMs"):null,modelCount:a.length}}}function we(e){const t=b(e);if(!t)return null;const s=re(t.ollama,"ollama"),o=re(t.lmStudio??t.lmstudio,"lmstudio");if(s!==null||o!==null){const r=[s,o].filter(d=>d!==null),c=r.some(d=>d.status.reachable),u=b(t.machine);return{reachable:c,models:r.flatMap(d=>d.models),memoryBudgetBytes:(u?h(u,"totalMemoryBytes"):null)??h(t,"memoryBudgetBytes")??h(t,"memoryBudget"),freeMemoryBytes:u?h(u,"freeMemoryBytes"):null,reason:c?null:r.map(d=>d.status.reason).find(d=>d!==null)??null,runtimes:r.map(d=>d.status),notes:T(t.notes).filter(d=>typeof d=="string"),sampledAt:l(t,"sampledAt")}}const a=Array.isArray(t.models)?t.models:null;return a===null?null:{reachable:x(t,"reachable",!0),models:a.map(r=>je(r,null)).filter(r=>r!==null),memoryBudgetBytes:h(t,"memoryBudgetBytes")??h(t,"memoryBudget"),freeMemoryBytes:h(t,"freeMemoryBytes"),reason:l(t,"reason"),runtimes:[],notes:T(t.notes).filter(r=>typeof r=="string"),sampledAt:l(t,"sampledAt")}}const Gt="verse-usage-frontier",qt="verse-usage-control",ao={key:Gt,fetch:e=>_("/api/usage",e)};function Kt(e){return e instanceof P?e.status===404?"This server does not expose /api/verse/control, so configured caps and today’s spend are unavailable here.":`Configured caps unavailable (HTTP ${e.status}).`:"Configured caps unavailable: the request failed."}const ro={key:qt,fetch:async e=>{try{return{raw:await _("/api/verse/control",e),available:!0,reason:null}}catch(t){if(t instanceof P&&t.status===401||t instanceof DOMException&&t.name==="AbortError")throw t;return{raw:null,available:!1,reason:Kt(t)}}}},Yt="verse-usage-accounts",Ht="verse-usage-local-models",ie="verse-usage-series";function Qt(e,t){return t instanceof P?t.status===404?`This server does not expose ${e} yet, so this panel has no source.`:`${e} answered HTTP ${t.status}.`:`${e} could not be reached.`}function $(e){return async t=>{try{return{raw:await _(e,t),available:!0,reason:null}}catch(s){if(s instanceof P&&s.status===401||s instanceof DOMException&&s.name==="AbortError")throw s;return{raw:null,available:!1,reason:Qt(e,s)}}}}const Jt={key:Yt,fetch:$("/api/verse/accounts")},Zt=[350,1200],le=$("/api/verse/local-models");function Xt(e){if(!e.available)return!1;const t=we(e.raw);return t!==null&&!t.reachable}function es(e,t){return new Promise((s,o)=>{if(t?.aborted){o(new DOMException("Aborted","AbortError"));return}const a=()=>{clearTimeout(r),o(new DOMException("Aborted","AbortError"))},r=setTimeout(()=>{t?.removeEventListener("abort",a),s()},e);t?.addEventListener("abort",a,{once:!0})})}const ts={key:Ht,fetch:async e=>{let t=await le(e);for(const s of Zt){if(!Xt(t))return t;await es(s,e),t=await le(e)}return t}},ss={"7d":{key:`${ie}:7d`,fetch:$("/api/verse/usage-series?window=7d")},"30d":{key:`${ie}:30d`,fetch:$("/api/verse/usage-series?window=30d")}};function io(e){return ss[e]}const M=[{id:"welcome",title:"Welcome to Verse",subtitle:"Five sections, one rail. Two minutes and you will know what each one does."},{id:"accounts",title:"Your seats",subtitle:"Which provider accounts this machine can actually dispatch to right now."},{id:"local",title:"Local runtime",subtitle:"Whether there is a model on this machine, and what that changes."},{id:"stops",title:"Three ways to stop",subtitle:"They do not have the same blast radius. This is the one screen that says so."},{id:"finish",title:"Make it yours",subtitle:"Theme, accent, density and font live in Settings. Then start a chat."}];function ns(e){return Number.isFinite(e)?Math.min(M.length-1,Math.max(0,Math.trunc(e))):0}const os={claude:"Sign back in with the Claude CLI on this machine, then reopen Verse.",codex:"Sign back in with the Codex CLI on this machine, then reopen Verse.",grok:"Reconnect the Grok seat through `ashlr resources`."};function as(e){const t=e.label||e.id,s={id:e.id,label:t,provider:e.provider};if(e.authentication==="signed-out"||e.state==="signed-out")return{...s,tone:"attention",state:"signed out",detail:e.reason??e.notes[0]??`Verse cannot dispatch to ${t} until this seat is signed in again.`,fix:e.reconnectCommand??os[e.provider]};if(e.unsupported)return{...s,tone:"attention",state:"probe blocked",detail:`The usage probe for ${t} is pinned to a specific CLI build`+(e.unsupported.pinnedVersion?` (${e.unsupported.pinnedVersion})`:"")+" and this machine is running a different one, so its quota is unreadable. The seat itself still works.",fix:null};if(e.state==="unavailable")return{...s,tone:"unknown",state:"no reading",detail:e.reason??`No usage reading came back for ${t}. That is not the same as a limit.`,fix:null};if(e.state==="checking")return{...s,tone:"unknown",state:"checking",detail:`Still probing ${t}.`,fix:null};const o=e.binding,a=o?.limitReached===!0,r=e.credits?.hasCredits===!0||e.credits?.unlimited===!0;if(a&&!r)return{...s,tone:"attention",state:"limit reached",detail:`${t} reported its limit reached. Pick another seat, or wait for the window to reset.`,fix:null};if(a&&r)return{...s,tone:"ok",state:"usable on credits",detail:`${t} has used up its included window but still has a spendable balance, so it can still dispatch.`,fix:null};const c=o?.measured===!0&&typeof o.usedPercent=="number"?o.usedPercent:null;return{...s,tone:"ok",state:"connected",detail:c===null?`${t} is signed in. No local utilization signal for this provider — that is expected, not a fault.`:`${t} is signed in, ${Math.round(c)}% through its binding window.`,fix:null}}function rs(e){if(e.loading)return{findings:null,summary:"Checking which accounts this machine can reach…",caveat:null,signedOutCount:0};if(!e.snapshot)return{findings:null,summary:"This server did not report a per-account roster, so Verse cannot say which seats are connected.",caveat:e.unavailableReason,signedOutCount:0};const t=e.snapshot.accounts.map(as);if(t.length===0)return{findings:t,summary:"No provider accounts are connected on this machine yet. Verse will still run local models.",caveat:e.snapshot.collectorNote,signedOutCount:0};const s=t.filter(r=>r.state==="signed out"),o=t.filter(r=>r.tone==="ok"),a=s.length===0?`${o.length} of ${t.length} ${t.length===1?"seat is":"seats are"} ready to dispatch.`:`${s.length} ${s.length===1?"seat is":"seats are"} signed out. Each one below says how to get it back.`;return{findings:t,summary:a,caveat:e.snapshot.collectorNote,signedOutCount:s.length}}const W="Local seats cost nothing and consume no provider quota, so the autonomous loop can keep working after a cloud window is used up.",z="Without one, every turn and every autonomous tick spends a provider account, and a used-up window stops the work.";function is(e){if(e.loading)return{tone:"unknown",state:"checking",summary:"Probing the local runtimes on this machine…",meaning:W,fix:null,modelCount:0,toolCapableCount:0,stale:!1};if(!e.snapshot)return{tone:"unknown",state:"not reported",summary:"This server does not report local runtimes, so Verse cannot say whether one is available here.",meaning:z,fix:e.unavailableReason,modelCount:0,toolCapableCount:0,stale:!1};const t=e.snapshot.models,s=t.filter(a=>a.supportsTools===!0).length,o=e.snapshot.runtimes.some(a=>a.stale);return e.snapshot.reachable?t.length===0?{tone:"attention",state:"no models",summary:"A local runtime answered, but it has no models installed.",meaning:z,fix:"Pull a model into the runtime, then press Refresh in Usage.",modelCount:0,toolCapableCount:0,stale:o}:{tone:"ok",state:o?"available (retained reading)":"available",summary:`${t.length} local ${t.length===1?"model":"models"} available`+(s>0?`, ${s} of them tool-capable.`:", none of them tool-capable.")+(o?" This is a retained reading, not a fresh probe.":""),meaning:s>0?W:`${W} A model that cannot call tools can answer, but cannot run an agentic turn.`,fix:null,modelCount:t.length,toolCapableCount:s,stale:o}:{tone:"attention",state:"unreachable",summary:"No local runtime answered. Verse cannot tell whether one is not running or not installed — the probe only knows it got no answer.",meaning:z,fix:"Start Ollama (or LM Studio) and press Refresh in Usage. If neither is installed, everything still works — it all runs on the cloud seats.",modelCount:0,toolCapableCount:0,stale:o}}const ls=[{name:"Pause",scope:"Halts autonomous dispatch only. A running loop parks instead of exiting.",limit:"Your own chats and the agent’s write tools keep working.",reversible:"Reversible in one click, with no restart and no confirmation.",tone:"ok"},{name:"Stop loop",scope:"Stops the daemon — and engages the GLOBAL kill switch while doing it.",limit:"That means it also refuses the agent’s own write tools, exactly like the emergency control.",reversible:"Reversible, but confirm-guarded. For an ordinary halt, use Pause.",tone:"attention"},{name:"Emergency stop",scope:"Engages the global kill switch (~/.ashlr/KILL) directly.",limit:"Every mutating path refuses: the loop, dispatch, and the agent’s own write tools.",reversible:"Reversible, confirm-guarded, and deliberately separated from the other two.",tone:"attention"}],ke="ashlr.verse.onboarding.v1",cs={completedAt:null,dismissedAt:null};function ds(){try{const e=localStorage.getItem(ke);if(!e)return cs;const t=JSON.parse(e);return{completedAt:typeof t.completedAt=="string"?t.completedAt:null,dismissedAt:typeof t.dismissedAt=="string"?t.dismissedAt:null}}catch{return{completedAt:null,dismissedAt:new Date(0).toISOString()}}}function Se(e){try{localStorage.setItem(ke,JSON.stringify(e))}catch{}}function us(e){return e.completedAt===null&&e.dismissedAt===null}const ce=ds();let S={...ce,open:us(ce),step:0};const Q=new Set;function F(e){const t={...S,...e};if(!Object.keys(e).every(s=>Object.is(S[s],t[s]))){S=t;for(const s of Q)s()}}function hs(e){return Q.add(e),()=>Q.delete(e)}function de(){return S}function ue(e){F({step:Math.max(0,Math.trunc(e))})}function he(){const e={completedAt:S.completedAt,dismissedAt:new Date().toISOString()};Se(e),F({...e,open:!1})}function ms(){const e={completedAt:new Date().toISOString(),dismissedAt:S.dismissedAt};Se(e),F({...e,open:!1})}function lo(){F({open:!0,step:0})}function ps(){return g.useSyncExternalStore(hs,de,de)}const fs="_card_13g9r_14",gs="_head_13g9r_56",bs="_headText_13g9r_64",xs="_eyebrow_13g9r_72",_s="_title_13g9r_80",ys="_subtitle_13g9r_88",vs="_body_13g9r_96",js="_lead_13g9r_107",ws="_aside_13g9r_113",ks="_caveat_13g9r_114",Ss="_kbd_13g9r_125",Ns="_sections_13g9r_138",As="_findings_13g9r_139",Es="_sectionRow_13g9r_148",Cs="_sectionIcon_13g9r_160",Ms="_localIcon_13g9r_161",Os="_sectionText_13g9r_173",Ts="_sectionName_13g9r_180",Is="_sectionBlurb_13g9r_190",Rs="_finding_13g9r_139",Ls="_findingHead_13g9r_210",Vs="_stopName_13g9r_218",Ds="_findingDetail_13g9r_225",Bs="_findingNote_13g9r_231",$s="_findingFix_13g9r_237",Ps="_fixLabel_13g9r_245",Fs="_fixText_13g9r_254",Us="_code_13g9r_260",Ws="_tone_13g9r_276",zs="_toneLabel_13g9r_283",Gs="_foot_13g9r_305",qs="_pips_13g9r_315",Ks="_pip_13g9r_315",Ys="_actions_13g9r_338",i={card:fs,head:gs,headText:bs,eyebrow:xs,title:_s,subtitle:ys,body:vs,lead:js,aside:ws,caveat:ks,kbd:Ss,sections:Ns,findings:As,sectionRow:Es,sectionIcon:Cs,localIcon:Ms,sectionText:Os,sectionName:Ts,sectionBlurb:Is,finding:Rs,findingHead:Ls,stopName:Vs,findingDetail:Ds,findingNote:Bs,findingFix:$s,fixLabel:Ps,fixText:Fs,code:Us,tone:Ws,toneLabel:zs,foot:Gs,pips:qs,pip:Ks,actions:Ys};function ee({tone:e,label:t}){const s=e==="ok"?Je:e==="attention"?et:tt;return n.jsxs("span",{className:i.tone,"data-tone":e,children:[n.jsx(s,{size:13,"aria-hidden":"true",focusable:"false"}),n.jsx("span",{className:i.toneLabel,children:t})]})}function I({children:e}){return n.jsx("div",{className:i.body,children:e})}const Hs={chat:"Talk to a seat. Sessions are grouped by project and resume where they stopped.",autonomy:"The human-out-of-the-loop cockpit: the loop, its budget, its scope, and what it did while you were away.",approvals:"Everything the loop produced that is waiting on you. Approving a PR proposal pushes a branch.",usage:"Which account you can actually use right now, and what it costs.",settings:"Theme, accent, density, font — and this tour again whenever you want it."};function Qs(){return n.jsxs(I,{children:[n.jsx("p",{className:i.lead,children:"Verse is the desktop surface over this machine’s agentic fleet. Everything it shows comes from one local server — no session, token or artifact leaves this machine."}),n.jsx("ul",{className:i.sections,children:w.map((e,t)=>{const s=xe[e.id];return n.jsxs("li",{className:i.sectionRow,children:[n.jsx("span",{className:i.sectionIcon,"aria-hidden":"true",children:n.jsx(s,{})}),n.jsxs("span",{className:i.sectionText,children:[n.jsxs("span",{className:i.sectionName,children:[e.label," ",n.jsxs("kbd",{className:i.kbd,children:["⌘",t+1]})]}),n.jsx("span",{className:i.sectionBlurb,children:Hs[e.id]})]})]},e.id)})})]})}function Js(){const e=J(Jt),t=g.useMemo(()=>rs({snapshot:e.data?.available?Wt(e.data.raw):null,loading:e.data===void 0&&e.status!=="error",unavailableReason:e.data?.reason??e.error?.message??null}),[e.data,e.status,e.error]);return n.jsxs(I,{children:[n.jsx("p",{className:i.lead,children:t.summary}),t.findings===null?null:n.jsx("ul",{className:i.findings,children:t.findings.map(s=>n.jsxs("li",{className:i.finding,children:[n.jsxs("div",{className:i.findingHead,children:[n.jsx(Et,{engine:s.provider,children:s.label}),n.jsx(ee,{tone:s.tone,label:s.state})]}),n.jsx("p",{className:i.findingDetail,children:s.detail}),s.fix?n.jsxs("p",{className:i.findingFix,children:[n.jsx("span",{className:i.fixLabel,children:"Fix"}),n.jsx("code",{className:i.code,children:s.fix})]}):null]},s.id))}),t.caveat?n.jsx("p",{className:i.caveat,children:t.caveat}):null,n.jsxs("p",{className:i.aside,children:["The full per-window picture — resets, credits, limits — lives in Usage"," ",n.jsx("kbd",{className:i.kbd,children:"⌘4"}),"."]})]})}function Zs(){const e=J(ts),t=g.useMemo(()=>is({snapshot:e.data?.available?we(e.data.raw):null,loading:e.data===void 0&&e.status!=="error",unavailableReason:e.data?.reason??e.error?.message??null}),[e.data,e.status,e.error]);return n.jsxs(I,{children:[n.jsxs("div",{className:i.findingHead,children:[n.jsx("span",{className:i.localIcon,"aria-hidden":"true",children:n.jsx(fe,{size:15})}),n.jsx(ee,{tone:t.tone,label:t.state})]}),n.jsx("p",{className:i.lead,children:t.summary}),n.jsx("p",{className:i.findingDetail,children:t.meaning}),t.fix?n.jsxs("p",{className:i.findingFix,children:[n.jsx("span",{className:i.fixLabel,children:"Fix"}),n.jsx("span",{className:i.fixText,children:t.fix})]}):null]})}function Xs(){return n.jsxs(I,{children:[n.jsxs("p",{className:i.lead,children:["Autonomy ",n.jsx("kbd",{className:i.kbd,children:"⌘2"})," has three stop controls. They are not interchangeable, and the difference is the most important thing on this screen."]}),n.jsx("ul",{className:i.findings,children:ls.map(e=>n.jsxs("li",{className:i.finding,children:[n.jsxs("div",{className:i.findingHead,children:[n.jsx("span",{className:i.stopName,children:e.name}),n.jsx(ee,{tone:e.tone,label:e.tone==="ok"?"narrow":"global"})]}),n.jsx("p",{className:i.findingDetail,children:e.scope}),n.jsx("p",{className:i.findingDetail,children:e.limit}),n.jsx("p",{className:i.findingNote,children:e.reversible})]},e.name))})]})}function en(){return n.jsxs(I,{children:[n.jsxs("p",{className:i.lead,children:["Settings ",n.jsx("kbd",{className:i.kbd,children:"⌘,"})," carries theme, accent hue, density, display font, corner radius and reduced motion. Every change applies as you make it — there is no save button."]}),n.jsx(k,{variant:"subtle",icon:n.jsx(ge,{size:14}),onClick:()=>C("settings"),children:"Open Settings"}),n.jsx("p",{className:i.aside,children:"You can replay this tour any time from Settings → Onboarding."})]})}const tn=[Qs,Js,Zs,Xs,en];function sn(){const{open:e,step:t}=ps(),s=ns(t),o=M[s],a=tn[s],r=s===M.length-1,c=g.useCallback(()=>he(),[]),u=g.useRef(null);return g.useEffect(()=>{if(!e)return;function d(p){if(p.key!=="Escape")return;const y=u.current;!y||!(p.target instanceof Node)||!y.contains(p.target)||(p.preventDefault(),he())}return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e]),e?n.jsxs("aside",{ref:u,className:i.card,"aria-labelledby":"verse-onboarding-title",role:"region",children:[n.jsxs("header",{className:i.head,children:[n.jsxs("div",{className:i.headText,children:[n.jsxs("p",{className:i.eyebrow,children:["Getting started · ",s+1," of ",M.length]}),n.jsx("h2",{id:"verse-onboarding-title",className:i.title,children:o.title}),n.jsx("p",{className:i.subtitle,children:o.subtitle})]}),n.jsx(k,{iconOnly:!0,variant:"ghost",size:"sm","aria-label":"Close getting started",icon:n.jsx(Ze,{size:14}),onClick:c})]}),n.jsx(a,{}),n.jsxs("footer",{className:i.foot,children:[n.jsx("ol",{className:i.pips,"aria-hidden":"true",children:M.map((d,p)=>n.jsx("li",{className:i.pip,"data-state":p===s?"current":p<s?"done":"todo"},d.id))}),n.jsxs("div",{className:i.actions,children:[n.jsx(k,{variant:"ghost",size:"sm",onClick:c,children:"Skip setup"}),s>0?n.jsx(k,{variant:"subtle",size:"sm",onClick:()=>ue(s-1),children:"Back"}):null,r?n.jsx(k,{variant:"primary",size:"sm",icon:n.jsx(pe,{size:14}),onClick:()=>{ms(),Y("new-chat")},children:"Start a first chat"}):n.jsx(k,{variant:"primary",size:"sm",onClick:()=>ue(s+1),children:"Next"})]})]})]}):null}function nn(){return g.useSyncExternalStore(Tt,ne,ne)}const on="_shell_tbse1_5",an="_rail_tbse1_21",rn="_railDragStrip_tbse1_44",ln="_mark_tbse1_52",cn="_railList_tbse1_62",dn="_railFoot_tbse1_71",un="_railButton_tbse1_73",hn="_railDot_tbse1_104",mn="_section_tbse1_116",pn="_loading_tbse1_126",fn="_missing_tbse1_135",gn="_missingTitle_tbse1_142",bn="_missingBody_tbse1_149",xn="_missingDetail_tbse1_150",f={shell:on,rail:an,railDragStrip:rn,mark:ln,railList:cn,railFoot:dn,railButton:un,railDot:hn,section:mn,loading:pn,missing:fn,missingTitle:gn,missingBody:bn,missingDetail:xn},_n=Object.assign({"./sections/ApprovalsSection.tsx":()=>A(()=>import("./ApprovalsSection-CBZquyLK.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27])),"./sections/AutonomySection.tsx":()=>A(()=>import("./AutonomySection-CQVpEdCE.js"),__vite__mapDeps([28,1,5,6,7,8,2,3,9,12,13,14,15,23,18,19,24,22,10,11,29,30,16,17,31,32,33,25,26,4,34])),"./sections/ChatSection.tsx":()=>A(()=>import("./ChatSection-DmE9K0Tg.js"),__vite__mapDeps([35,1,5,6,7,8,2,3,9,25,26,29,30,33,32,12,13,14,15,16,17,20,21,4,36])),"./sections/SettingsSection.tsx":()=>A(()=>import("./SettingsSection-C9Qs9JWW.js"),__vite__mapDeps([37,1,2,3,7,25,26,29,30,16,17,6,8,4,38])),"./sections/UsageSection.tsx":()=>A(()=>import("./UsageSection-C__ziNkV.js"),__vite__mapDeps([39,1,2,3,4,14,15,40,41,16,17,33,10,11,31,22,25,26,7,42]))});function G({label:e,moduleName:t,detail:s}){return n.jsxs("div",{className:f.missing,role:"status",children:[n.jsxs("h1",{className:f.missingTitle,children:[e," is not wired up yet"]}),n.jsxs("p",{className:f.missingBody,children:["This build has no ",n.jsxs("code",{children:["routes/verse/sections/",t,".tsx"]}),". The rail keeps the slot so the section appears the moment that module lands — nothing here is broken, and the other sections still work."]}),s?n.jsx("p",{className:f.missingDetail,children:s}):null]})}function yn(e){const t=w.find(o=>o.id===e),s=_n[`./sections/${t.module}.tsx`];return async()=>{if(!s)return{default:()=>n.jsx(G,{label:t.label,moduleName:t.module})};try{const o=await s(),a=o[t.module]??o.default;return typeof a!="function"?{default:()=>n.jsx(G,{label:t.label,moduleName:t.module,detail:`The module loaded but exports no \`${t.module}\` component.`})}:{default:a}}catch(o){const a=o instanceof Error?o.message:String(o);return{default:()=>n.jsx(G,{label:t.label,moduleName:t.module,detail:a})}}}}const vn=new Map(w.map(e=>[e.id,g.lazy(yn(e.id))])),jn=We({status:"pending",limit:500});function wn(){const e=nn(),t=Me(),s=vn.get(e.section),a=J(jn).data?.pending;g.useEffect(()=>{typeof a=="number"&&It(a)},[a]),g.useEffect(()=>{function c(u){if(!(u.metaKey||u.ctrlKey)||u.altKey||u.shiftKey)return;const d=Number.parseInt(u.key,10);if(Number.isInteger(d)&&d>=1&&d<=w.length){u.preventDefault(),C(w[d-1].id);return}switch(u.key.toLowerCase()){case"k":u.preventDefault(),Y("quick-switcher");break;case"n":u.preventDefault(),Y("new-chat");break;case",":u.preventDefault(),C("settings");break}}return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[]),g.useEffect(()=>He(c=>{c==="open-settings"?C("settings"):c==="toggle-theme"&&t.cycle()}),[t]),g.useEffect(()=>{Ke(t.theme)},[t.theme]);const r=g.useMemo(()=>`Theme: ${t.theme} — click to cycle`,[t.theme]);return n.jsxs("div",{className:f.shell,children:[n.jsxs("nav",{className:f.rail,"aria-label":"Verse sections",children:[n.jsx("span",{className:f.railDragStrip,"data-app-region":"drag","aria-hidden":"true"}),n.jsxs("span",{className:f.mark,title:"Ashlr Verse",children:[n.jsx(ht,{}),n.jsx("span",{className:"visually-hidden",children:"Ashlr Verse"})]}),n.jsx("ul",{className:f.railList,children:w.map((c,u)=>{const d=xe[c.id],p=c.id==="approvals"?e.pendingApprovals:0,y=e.section===c.id;return n.jsx("li",{children:n.jsxs("button",{type:"button",className:f.railButton,"aria-current":y?"page":void 0,"data-section":c.id,title:`${c.label} (⌘${u+1})`,"aria-label":p>0?`${c.label}, ${p} pending`:c.label,onClick:()=>C(c.id),children:[n.jsx(d,{}),p>0?n.jsx("span",{className:f.railDot,"data-pending":p,"aria-hidden":"true"}):null]})},c.id)})}),n.jsx("div",{className:f.railFoot,children:n.jsx("button",{type:"button",className:f.railButton,onClick:t.cycle,title:r,"aria-label":r,"data-theme-toggle":t.theme,children:n.jsx(kn,{preference:t.theme})})})]}),n.jsx("main",{className:f.section,"data-section":e.section,id:"main-content",tabIndex:-1,children:n.jsx(Fe,{resetKey:e.section,children:n.jsx(g.Suspense,{fallback:n.jsx(Sn,{}),children:n.jsx(s,{})})})}),n.jsx(sn,{})]})}function kn({preference:e}){return n.jsxs("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinejoin:"round",strokeLinecap:"round","aria-hidden":"true",focusable:"false",children:[n.jsx("circle",{cx:"8",cy:"8",r:"4.2"}),e==="dark"?n.jsx("path",{d:"M8 3.8a4.2 4.2 0 0 0 0 8.4Z",fill:"currentColor",stroke:"none"}):null,e==="light"?n.jsx("path",{d:"M8 1.6v1M8 13.4v1M14.4 8h-1M2.6 8h-1M12.5 3.5l-.7.7M4.2 11.8l-.7.7M12.5 12.5l-.7-.7M4.2 4.2l-.7-.7"}):null]})}function Sn(){return n.jsx("div",{className:f.loading,role:"status","aria-live":"polite",children:"Loading…"})}const Ne="verse-bootstrap",R="verse-sessions",q={key:Ne,fetch:e=>_("/api/verse/bootstrap",e)},co={key:R,fetch:e=>_("/api/verse/sessions",e)};function N(e,t=""){return`/api/verse/sessions/${encodeURIComponent(e)}${t}`}function uo(e,t){return _(N(e),t)}class Nn extends Error{constructor(){super("Unlock actions with the mutation token before chatting."),this.name="VerseMutationLockedError"}}async function L(e,t){const s=Ie();if(!s)throw new Nn;const o=await Oe(e,t,s);return Te(),o}function Ae(){O(R),O(Ne)}async function ho(e){const t=await L("/api/verse/sessions",e);return Ae(),t}async function mo(e,t){const s={text:t},o=await L(N(e,"/turns"),s);return O(R),o}async function po(e){await L(N(e,"/cancel"),{}),O(R)}async function fo(e){await L(N(e,"/delete"),{}),Ae()}async function go(e,t){const s=await L(N(e,"/rename"),{title:t});return O(R),s}const An="verse-workspaces",En="verse-autonomy-scope",bo={key:An,fetch:e=>_("/api/verse/workspaces",e)},xo={key:En,fetch:e=>_("/api/verse/autonomy-scope",e)};function _o(e,t){return _(N(e,"/roots"),t)}const Cn="_shell_k4nf7_1",Mn="_checking_k4nf7_2",me={shell:Cn,checking:Mn};function On(){const e=Re();return g.useEffect(()=>{if(e!=="checking")return;let t=!1;return Le().then(s=>{if(!(t||s))return Ve(q.key,q.fetch).then(()=>{t||De(Be(q.key).status==="success")})}),()=>{t=!0}},[e]),e==="checking"?n.jsx("p",{className:me.checking,role:"status",children:"Checking for an existing Verse session…"}):e==="unauthenticated"?n.jsx($e,{heading:"Connect to Ashlr Verse",command:"ashlr verse",subject:"Ashlr Verse",mutationField:!0}):n.jsxs(Ue,{children:[n.jsx(Pe,{}),n.jsx("div",{className:me.shell,children:n.jsx(wn,{})})]})}const yo=Object.freeze(Object.defineProperty({__proto__:null,VerseConsoleApp:On},Symbol.toStringTag,{value:"Module"}));export{oo as $,Kn as A,ps as B,Yn as C,k as D,lo as E,Et as F,$n as G,Dn as H,ot as I,et as J,Wn as K,Fn as L,Un as M,Bn as N,Pn as O,Gn as P,tt as Q,Jt as R,zn as S,qn as T,ts as U,ht as V,io as W,ao as X,ro as Y,Wt as Z,we as _,xo as a,yo as a0,Qn as b,N as c,uo as d,Hn as e,_o as f,co as g,bo as h,Ae as i,Nn as j,ho as k,so as l,po as m,go as n,fo as o,to as p,Jn as q,no as r,mo as s,eo as t,nn as u,q as v,Zn as w,Xn as x,Z as y,X as z};
|
|
3
|
+
//# sourceMappingURL=VerseConsoleApp-Cu5aG6J6.js.map
|