@ashlr/hub 3.9.0 → 3.9.1
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 +13 -0
- package/dist/build-identity.json +2 -2
- package/dist/core/resources/claude-account-usage.d.ts +19 -0
- package/dist/core/resources/claude-account-usage.js +22 -1
- package/dist/core/resources/claude-account-usage.js.map +1 -1
- package/dist/core/verse/accounts.d.ts +6 -5
- package/dist/core/verse/accounts.js +9 -8
- package/dist/core/verse/accounts.js.map +1 -1
- package/dist/core/web/public/next/assets/{App-XURmiAAp.js → App-D2P1AJiD.js} +2 -2
- package/dist/core/web/public/next/assets/{App-XURmiAAp.js.map → App-D2P1AJiD.js.map} +1 -1
- package/dist/core/web/public/next/assets/{ApprovalsSection-BriUzoZc.js → ApprovalsSection-Dq66NMfx.js} +2 -2
- package/dist/core/web/public/next/assets/{ApprovalsSection-BriUzoZc.js.map → ApprovalsSection-Dq66NMfx.js.map} +1 -1
- package/dist/core/web/public/next/assets/{AutonomySection-C4GBsQVc.js → AutonomySection-DyxpeR5I.js} +2 -2
- package/dist/core/web/public/next/assets/{AutonomySection-C4GBsQVc.js.map → AutonomySection-DyxpeR5I.js.map} +1 -1
- package/dist/core/web/public/next/assets/{ChatSection-hlgPBRco.js → ChatSection-bzwFdbdw.js} +2 -2
- package/dist/core/web/public/next/assets/{ChatSection-hlgPBRco.js.map → ChatSection-bzwFdbdw.js.map} +1 -1
- package/dist/core/web/public/next/assets/{ConfirmDialog-BdQYI-Ng.js → ConfirmDialog-DkR0z5_a.js} +2 -2
- package/dist/core/web/public/next/assets/{ConfirmDialog-BdQYI-Ng.js.map → ConfirmDialog-DkR0z5_a.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Dialog-BxdIfmFH.js → Dialog-CIjlQZqc.js} +2 -2
- package/dist/core/web/public/next/assets/{Dialog-BxdIfmFH.js.map → Dialog-CIjlQZqc.js.map} +1 -1
- package/dist/core/web/public/next/assets/{DiffViewer-DmeRWuc4.js → DiffViewer-BjQZAm5L.js} +2 -2
- package/dist/core/web/public/next/assets/{DiffViewer-DmeRWuc4.js.map → DiffViewer-BjQZAm5L.js.map} +1 -1
- package/dist/core/web/public/next/assets/{McpSection-q34T7Tho.js → McpSection-D2FySMy3.js} +2 -2
- package/dist/core/web/public/next/assets/{McpSection-q34T7Tho.js.map → McpSection-D2FySMy3.js.map} +1 -1
- package/dist/core/web/public/next/assets/{MutationTokenDialog-CFAkwOEt.js → MutationTokenDialog-QBPrD1UE.js} +2 -2
- package/dist/core/web/public/next/assets/{MutationTokenDialog-CFAkwOEt.js.map → MutationTokenDialog-QBPrD1UE.js.map} +1 -1
- package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-DHc8GFOY.js → ResourcePoolConsoleApp-Dzq9Ufq_.js} +2 -2
- package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-DHc8GFOY.js.map → ResourcePoolConsoleApp-Dzq9Ufq_.js.map} +1 -1
- package/dist/core/web/public/next/assets/{RouteErrorBoundary-ZL9F4qUn.js → RouteErrorBoundary-Chd-wt6w.js} +2 -2
- package/dist/core/web/public/next/assets/{RouteErrorBoundary-ZL9F4qUn.js.map → RouteErrorBoundary-Chd-wt6w.js.map} +1 -1
- package/dist/core/web/public/next/assets/{Segmented-DbRjVye3.js → Segmented-DhGh7Y1s.js} +2 -2
- package/dist/core/web/public/next/assets/{Segmented-DbRjVye3.js.map → Segmented-DhGh7Y1s.js.map} +1 -1
- package/dist/core/web/public/next/assets/{SettingsSection-nJGGGYqv.js → SettingsSection-Bqimu_Mg.js} +2 -2
- package/dist/core/web/public/next/assets/{SettingsSection-nJGGGYqv.js.map → SettingsSection-Bqimu_Mg.js.map} +1 -1
- package/dist/core/web/public/next/assets/{UniverseConsoleApp-6GJydgo4.js → UniverseConsoleApp-DzAyrE-A.js} +2 -2
- package/dist/core/web/public/next/assets/{UniverseConsoleApp-6GJydgo4.js.map → UniverseConsoleApp-DzAyrE-A.js.map} +1 -1
- package/dist/core/web/public/next/assets/{UniverseView-DLDtNYL8.js → UniverseView-BGl3DRV7.js} +2 -2
- package/dist/core/web/public/next/assets/{UniverseView-DLDtNYL8.js.map → UniverseView-BGl3DRV7.js.map} +1 -1
- package/dist/core/web/public/next/assets/{UsageSection-Cf9d9iFH.js → UsageSection-PaaJ1L90.js} +2 -2
- package/dist/core/web/public/next/assets/{UsageSection-Cf9d9iFH.js.map → UsageSection-PaaJ1L90.js.map} +1 -1
- package/dist/core/web/public/next/assets/{VerseConsoleApp-y0uOHixd.js → VerseConsoleApp-DYH7ottg.js} +3 -3
- package/dist/core/web/public/next/assets/{VerseConsoleApp-y0uOHixd.js.map → VerseConsoleApp-DYH7ottg.js.map} +1 -1
- package/dist/core/web/public/next/assets/{charts-CVooqJWN.js → charts-CnMDT08S.js} +2 -2
- package/dist/core/web/public/next/assets/{charts-CVooqJWN.js.map → charts-CnMDT08S.js.map} +1 -1
- package/dist/core/web/public/next/assets/{context-model-Bqv8DVuH.js → context-model-DTvb2uZy.js} +2 -2
- package/dist/core/web/public/next/assets/{context-model-Bqv8DVuH.js.map → context-model-DTvb2uZy.js.map} +1 -1
- package/dist/core/web/public/next/assets/{global-eaY9GyX3.js → global-F2K14nNo.js} +2 -2
- package/dist/core/web/public/next/assets/{global-eaY9GyX3.js.map → global-F2K14nNo.js.map} +1 -1
- package/dist/core/web/public/next/assets/{icons-vex8rclC.js → icons-B2fa40k6.js} +2 -2
- package/dist/core/web/public/next/assets/{icons-vex8rclC.js.map → icons-B2fa40k6.js.map} +1 -1
- package/dist/core/web/public/next/assets/{index-D2Eik-zt.js → index-DO9a5IaB.js} +3 -3
- package/dist/core/web/public/next/assets/{index-D2Eik-zt.js.map → index-DO9a5IaB.js.map} +1 -1
- package/dist/core/web/public/next/assets/{queries-bAYU0VNy.js → queries-BdSsWYSu.js} +2 -2
- package/dist/core/web/public/next/assets/{queries-bAYU0VNy.js.map → queries-BdSsWYSu.js.map} +1 -1
- package/dist/core/web/public/next/assets/{use-guarded-action-C7QrP7Yp.js → use-guarded-action-BrlIU0jJ.js} +2 -2
- package/dist/core/web/public/next/assets/{use-guarded-action-C7QrP7Yp.js.map → use-guarded-action-BrlIU0jJ.js.map} +1 -1
- package/dist/core/web/public/next/assets/{verse-model-TfDk9cky.js → verse-model-GWqHIjMG.js} +2 -2
- package/dist/core/web/public/next/assets/{verse-model-TfDk9cky.js.map → verse-model-GWqHIjMG.js.map} +1 -1
- package/dist/core/web/public/next/assets/{workspace-model-CHol5RVp.js → workspace-model-4yzB--1h.js} +2 -2
- package/dist/core/web/public/next/assets/{workspace-model-CHol5RVp.js.map → workspace-model-4yzB--1h.js.map} +1 -1
- package/dist/core/web/public/next/index.html +1 -1
- package/dist/release-dependency-inventory.json +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsSection-nJGGGYqv.js","names":[],"sources":["../../../../../../src/web-ui/routes/verse/sections/SettingsSection.module.css","../../../../../../src/web-ui/routes/verse/sections/SettingRow.tsx","../../../../../../src/web-ui/routes/verse/onboarding/OnboardingPanel.tsx","../../../../../../package.json","../../../../../../src/web-ui/routes/verse/sections/app-version.ts","../../../../../../src/web-ui/routes/verse/sections/AboutPanel.tsx","../../../../../../src/web-ui/design/contrast.ts","../../../../../../src/web-ui/routes/verse/sections/AppearancePanel.tsx","../../../../../../src/web-ui/routes/verse/sections/ConnectionPanel.tsx","../../../../../../src/web-ui/routes/verse/sections/ShortcutsPanel.tsx","../../../../../../src/web-ui/routes/verse/sections/SettingsSection.tsx"],"sourcesContent":["/* Settings — one reading column of quiet two-column rows. Shared by every\n panel in this folder so the label/control rhythm can never drift between\n Appearance and Connection. */\n\n.section {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n background: var(--bg-canvas);\n}\n\n.strip {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--space-3);\n flex: none;\n height: var(--strip-height);\n padding: 0 var(--space-5);\n border-bottom: 1px solid var(--border-subtle);\n background: var(--bg-surface);\n}\n\n.stripTitle {\n font-family: var(--font-display);\n font-size: var(--text-sm-size);\n font-weight: var(--font-weight-semibold);\n letter-spacing: var(--tracking-display);\n}\n\n.scroll {\n flex: 1;\n min-height: 0;\n overflow: auto;\n}\n\n.column {\n width: 100%;\n max-width: var(--measure-read);\n margin: 0 auto;\n padding: var(--space-6) var(--space-5) var(--space-16);\n display: flex;\n flex-direction: column;\n gap: var(--space-8);\n}\n\n/* ---------------------------------------------------------------------------\n * Panel = a titled group of rows, separated by hairlines rather than cards.\n * ------------------------------------------------------------------------- */\n.panel {\n display: flex;\n flex-direction: column;\n}\n\n.panelHead {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: var(--space-3);\n padding-bottom: var(--space-2);\n}\n\n.panelTitle {\n font-family: var(--font-display);\n font-size: var(--text-2xs-size);\n line-height: var(--text-2xs-line);\n letter-spacing: var(--tracking-label);\n text-transform: uppercase;\n font-weight: var(--font-weight-medium);\n color: var(--text-tertiary);\n}\n\n.panelBody {\n border-top: 1px solid var(--border-subtle);\n}\n\n/* ---------------------------------------------------------------------------\n * Row: label + description on the left, control on the right.\n * ------------------------------------------------------------------------- */\n.row {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: var(--space-4);\n padding: var(--density-pad) 0;\n border-bottom: 1px solid var(--border-subtle);\n}\n\n.rowStacked {\n grid-template-columns: minmax(0, 1fr);\n align-items: stretch;\n}\n\n.rowText {\n min-width: 0;\n}\n\n.rowLabel {\n display: block;\n font-size: var(--text-sm-size);\n line-height: var(--text-sm-line);\n color: var(--text-primary);\n font-weight: var(--font-weight-medium);\n}\n\n.rowDescription {\n margin-top: 2px;\n font-size: var(--text-xs-size);\n line-height: var(--text-xs-line);\n color: var(--text-secondary);\n}\n\n.rowControl {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--space-2);\n min-width: 0;\n}\n\n.rowStacked .rowControl {\n justify-content: flex-start;\n}\n\n/* Below the shell's 900px breakpoint the two columns stack rather than\n squeezing a slider into 80px. */\n@media (max-width: 720px) {\n .row {\n grid-template-columns: minmax(0, 1fr);\n }\n .rowControl {\n justify-content: flex-start;\n }\n}\n\n/* ---------------------------------------------------------------------------\n * Accent controls\n * ------------------------------------------------------------------------- */\n.swatches {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-2);\n}\n\n.swatch {\n width: 22px;\n height: 22px;\n padding: 0;\n border: 1px solid var(--border-default);\n border-radius: var(--radius-xs);\n cursor: pointer;\n transition: transform var(--duration-fast) var(--ease-standard);\n}\n\n.swatch:hover {\n transform: translateY(-1px);\n}\n\n/* Selection is carried by a ring AND the check glyph, never by color. */\n.swatch[aria-checked='true'] {\n box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 3px var(--text-primary);\n}\n\n.swatchCheck {\n display: flex;\n align-items: center;\n justify-content: center;\n color: #ffffff;\n mix-blend-mode: difference;\n}\n\n.sliderStack {\n display: flex;\n flex-direction: column;\n gap: var(--space-1);\n width: min(320px, 100%);\n}\n\n.contrastWarning {\n display: flex;\n align-items: flex-start;\n gap: var(--space-2);\n margin-top: var(--space-2);\n padding: var(--space-2) var(--space-3);\n border: 1px solid var(--status-warning-solid);\n border-radius: var(--radius-xs);\n background: var(--status-warning-bg);\n color: var(--status-warning-fg);\n font-size: var(--text-xs-size);\n line-height: var(--text-xs-line);\n}\n\n/* ---------------------------------------------------------------------------\n * Live preview\n * ------------------------------------------------------------------------- */\n.preview {\n display: flex;\n flex-direction: column;\n gap: var(--space-3);\n padding: var(--space-4);\n border: 1px solid var(--border-default);\n border-radius: var(--radius-md);\n background: var(--bg-surface);\n}\n\n.previewRow {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--space-2);\n}\n\n.previewHeading {\n font-family: var(--font-display);\n font-size: var(--text-md-size);\n line-height: var(--text-md-line);\n letter-spacing: var(--tracking-display);\n font-weight: var(--font-weight-semibold);\n}\n\n.previewBody {\n font-size: var(--text-sm-size);\n line-height: var(--text-sm-line);\n color: var(--text-secondary);\n}\n\n.previewNumerals {\n font-family: var(--font-display);\n font-variant-numeric: tabular-nums;\n letter-spacing: var(--tracking-display);\n color: var(--text-primary);\n}\n\n/* ---------------------------------------------------------------------------\n * Connection / About\n * ------------------------------------------------------------------------- */\n.origin {\n width: min(320px, 100%);\n}\n\n.note {\n display: flex;\n gap: var(--space-2);\n padding: var(--space-3);\n border: 1px solid var(--border-subtle);\n border-radius: var(--radius-xs);\n /* --bg-canvas, not --bg-hover: in light both --bg-hover and --bg-code\n resolve to --gray-100, so the .code chip nested inside this note had no\n ground of its own and was distinguished only by its hairline — a rounded\n bordered box inside a rounded bordered box, which §1.2 forbids. */\n background: var(--bg-canvas);\n color: var(--text-secondary);\n font-size: var(--text-xs-size);\n line-height: var(--text-xs-line);\n}\n\n.noteIcon {\n flex: none;\n margin-top: 1px;\n color: var(--text-tertiary);\n}\n\n.code {\n font-family: var(--font-mono);\n font-size: var(--text-2xs-size);\n padding: 1px 4px;\n border: 1px solid var(--border-subtle);\n border-radius: var(--radius-xs);\n background: var(--bg-code);\n color: var(--text-primary);\n white-space: nowrap;\n}\n\n/* ---------------------------------------------------------------------------\n * Keyboard reference\n * ------------------------------------------------------------------------- */\n.shortcuts {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));\n gap: 0 var(--space-6);\n}\n\n.shortcut {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--space-3);\n padding: var(--space-2) 0;\n border-bottom: 1px solid var(--border-subtle);\n font-size: var(--text-sm-size);\n}\n\n.keys {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n flex: none;\n}\n\n.key {\n min-width: 20px;\n padding: 2px var(--space-1);\n border: 1px solid var(--border-default);\n border-bottom-width: 2px;\n border-radius: var(--radius-xs);\n background: var(--bg-surface);\n color: var(--text-secondary);\n font-family: var(--font-display);\n font-size: var(--text-2xs-size);\n line-height: var(--text-2xs-line);\n text-align: center;\n}\n\n.about {\n display: flex;\n flex-direction: column;\n gap: var(--space-2);\n}\n\n.aboutLine {\n display: flex;\n align-items: center;\n gap: var(--space-2);\n font-size: var(--text-sm-size);\n color: var(--text-secondary);\n}\n\n.aboutName {\n font-family: var(--font-display);\n font-size: var(--text-lg-size);\n line-height: var(--text-lg-line);\n letter-spacing: var(--tracking-display);\n font-weight: var(--font-weight-semibold);\n color: var(--text-primary);\n}\n\n.link {\n display: inline-flex;\n align-items: center;\n gap: var(--space-1);\n color: var(--text-link);\n text-decoration: none;\n}\n\n.link:hover {\n text-decoration: underline;\n}\n\n/* ---- desktop shell (see desktop/README.md \"Desktop shell contract\") -----\n * In the Tauri window the OS title bar overlays the top 48px and the macOS\n * traffic lights float over the top-LEFT 92px of the WINDOW. This strip does\n * not start at the window's left edge — the 56px rail does — so the inset it\n * owes is the overlap, never the full 92px. Both vars are absent in a\n * browser, where the expression floors to 0px and the layout is unchanged. */\n.strip {\n padding-left: max(\n var(--space-5),\n calc(var(--app-traffic-light-inset, 0px) - var(--rail-width, 56px))\n );\n}\n","/**\n * routes/verse/sections/SettingRow.tsx — the Settings layout primitive:\n * label + description on the left, control on the right, hairline between.\n *\n * The label is a real <label> bound to the control's id when one is given;\n * for composite controls (a radiogroup, a swatch grid) pass `labelId` and\n * point the group's `aria-labelledby` at it instead — a <label> cannot name\n * a group, and an unnamed radiogroup is announced as \"group\".\n */\nimport type { ReactNode } from 'react';\nimport styles from './SettingsSection.module.css';\n\nexport interface PanelProps {\n title: ReactNode;\n /** Right-aligned affordance in the panel header (e.g. \"Reset\"). */\n action?: ReactNode;\n children: ReactNode;\n}\n\nexport function Panel({ title, action, children }: PanelProps) {\n return (\n <section className={styles.panel}>\n <div className={styles.panelHead}>\n <h3 className={styles.panelTitle}>{title}</h3>\n {action}\n </div>\n <div className={styles.panelBody}>{children}</div>\n </section>\n );\n}\n\nexport interface SettingRowProps {\n label: ReactNode;\n description?: ReactNode;\n /** id of the control this row labels (renders a real <label for>). */\n htmlFor?: string;\n /** id to put on the label text, for a control using aria-labelledby. */\n labelId?: string;\n /** Put the control under the text instead of beside it (sliders, previews). */\n stacked?: boolean;\n children: ReactNode;\n}\n\nexport function SettingRow({\n label,\n description,\n htmlFor,\n labelId,\n stacked = false,\n children,\n}: SettingRowProps) {\n const text = (\n <>\n <span className={styles.rowLabel} id={labelId}>\n {label}\n </span>\n {description ? <span className={styles.rowDescription}>{description}</span> : null}\n </>\n );\n\n return (\n <div className={`${styles.row} ${stacked ? styles.rowStacked : ''}`}>\n <div className={styles.rowText}>\n {htmlFor ? (\n <label htmlFor={htmlFor} className={styles.rowText}>\n {text}\n </label>\n ) : (\n text\n )}\n </div>\n <div className={styles.rowControl}>{children}</div>\n </div>\n );\n}\n","/**\n * routes/verse/onboarding/OnboardingPanel.tsx — the Settings row that brings\n * the first-run tour back.\n *\n * It lives here rather than in sections/ so the whole onboarding feature is\n * one folder; SettingsSection.tsx imports it the same way it imports its own\n * panels, and reuses the same Panel/SettingRow primitives so the row keeps\n * the label-left / control-right rhythm of every other setting.\n *\n * The description states what the tour actually covers, and — because this\n * is the only place the stored answer is visible — whether it has been seen.\n */\nimport { Button } from '../../../components/primitives/index.js';\nimport { Panel, SettingRow } from '../sections/SettingRow.js';\nimport { replayOnboarding } from './onboarding-store.js';\nimport { useOnboarding } from './useOnboarding.js';\n\nfunction describe(completedAt: string | null, dismissedAt: string | null): string {\n if (completedAt) return `Last completed ${new Date(completedAt).toLocaleDateString()}.`;\n if (dismissedAt) return 'Skipped. Nothing was missed — it is all reachable from the sections themselves.';\n return 'Not seen yet.';\n}\n\nexport function OnboardingPanel() {\n const { completedAt, dismissedAt, open } = useOnboarding();\n\n return (\n <Panel title=\"Onboarding\">\n <SettingRow\n label=\"Replay the first-run tour\"\n description={`Your connected seats, whether a local runtime is available, and what each of the three stop controls really halts. ${describe(completedAt, dismissedAt)}`}\n >\n <Button variant=\"subtle\" size=\"sm\" onClick={replayOnboarding} disabled={open}>\n {open ? 'Showing' : 'Replay'}\n </Button>\n </SettingRow>\n </Panel>\n );\n}\n","{\n \"name\": \"@ashlr/hub\",\n \"version\": \"3.9.0\",\n \"description\": \"Local-first command center for agentic engineers.\",\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"license\": \"MIT\",\n \"author\": \"Mason Wyatt <mason@evero-consulting.com>\",\n \"homepage\": \"https://github.com/ashlrai/ashlr-hub#readme\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/ashlrai/ashlr-hub.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/ashlrai/ashlr-hub/issues\"\n },\n \"keywords\": [\n \"cli\",\n \"agentic\",\n \"mcp\",\n \"local-first\",\n \"raycast\",\n \"developer-tools\",\n \"ai\"\n ],\n \"type\": \"module\",\n \"bin\": {\n \"ashlr\": \"bin/ashlr\"\n },\n \"files\": [\n \"dist\",\n \"bin\",\n \"scripts/run-verify-command.mjs\",\n \"scripts/scorecard-history-worker.mjs\",\n \"scripts/evaluators/preparation-verification-activity.mjs\",\n \"scripts/evaluators/preparation-verification-activity.d.mts\",\n \"scripts/evaluators/preparation-verification-protocol.mjs\",\n \"scripts/evaluators/preparation-verification-native.mjs\",\n \"scripts/evaluators/preparation-verification-native.d.mts\",\n \"schema\",\n \"CHANGELOG.md\",\n \"docs/README.md\",\n \"docs/QUICKSTART.md\",\n \"docs/DEMO.md\",\n \"docs/ARCHITECTURE.md\",\n \"docs/MISSION-OS.md\",\n \"docs/ASHLR-UNIVERSE.md\",\n \"docs/AUTONOMY-GAP.md\",\n \"docs/FIRM-DEMO.md\",\n \"docs/UNIVERSE-RESEARCH.md\",\n \"docs/UNIVERSE-AUTONOMY-RESEARCH.md\",\n \"docs/RESOURCE-POOLS.md\",\n \"docs/NORTH-STAR.md\",\n \"docs/ELITE-AGENT-EFFICIENCY.md\",\n \"docs/RUNTIME_ACTIVATION_AUTHORITY.md\",\n \"docs/contracts/CONTRACT-M515.md\",\n \"docs/contracts/CONTRACT-M521.md\",\n \"docs/contracts/CONTRACT-M568.md\",\n \"docs/contracts/CONTRACT-MISSION-RECEIPT-V1.md\"\n ],\n \"bundledDependencies\": [\n \"@modelcontextprotocol/sdk\",\n \"marked\",\n \"tar\"\n ],\n \"exports\": {\n \".\": {\n \"types\": \"./dist/api/index.d.ts\",\n \"import\": \"./dist/api/index.js\"\n },\n \"./core\": {\n \"types\": \"./dist/api/core.d.ts\",\n \"import\": \"./dist/api/core.js\"\n },\n \"./types\": {\n \"types\": \"./dist/api/types.d.ts\",\n \"import\": \"./dist/api/types.js\"\n },\n \"./plugin\": {\n \"types\": \"./dist/api/plugin.d.ts\",\n \"import\": \"./dist/api/plugin.js\"\n },\n \"./universe\": {\n \"types\": \"./dist/core/universe/index.d.ts\",\n \"import\": \"./dist/core/universe/index.js\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"engines\": {\n \"node\": \">=22.15.0\"\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run typecheck && npm run lint && npm run test:ci && npm run test:web\",\n \"prepack\": \"npm run build\",\n \"build\": \"tsc -p tsconfig.json && node scripts/copy-assets.mjs && node scripts/build-preparation-builtin.mjs && vite build --config vite.config.web.ts && node scripts/build-release-dependency-inventory.mjs && node scripts/build-identity.mjs\",\n \"build:preparation-builtin\": \"node scripts/build-preparation-builtin.mjs\",\n \"build:binary\": \"node scripts/build-sea.mjs\",\n \"release:canary\": \"node scripts/run-signed-release-canary.mjs\",\n \"verify:local-production\": \"node scripts/run-local-production-gate.mjs\",\n \"build:web\": \"vite build --config vite.config.web.ts\",\n \"dev\": \"tsx src/cli/index.ts\",\n \"dev:web\": \"vite --config vite.config.web.ts\",\n \"test\": \"vitest run\",\n \"test:serial\": \"vitest run --no-file-parallelism\",\n \"test:web\": \"vitest run --config vitest.config.web.ts\",\n \"test:ci\": \"node scripts/test-ci.mjs\",\n \"test:invariants\": \"vitest run test/h*.test.ts --no-file-parallelism\",\n \"test:engineering-responsiveness\": \"vitest run --config vitest.config.engineering-performance.ts\",\n \"conformance:ecosystem\": \"tsx scripts/run-ecosystem-conformance.ts\",\n \"check:docs\": \"node scripts/check-documentation.mjs\",\n \"lint\": \"eslint . && npm run lint:realio-lane\",\n \"lint:realio-lane\": \"node scripts/check-realio-lane-membership.mjs\",\n \"typecheck\": \"tsc --noEmit && npm run typecheck:web\",\n \"typecheck:web\": \"tsc --noEmit -p src/web-ui/tsconfig.json\"\n },\n \"devDependencies\": {\n \"@testing-library/jest-dom\": \"^7.0.1\",\n \"@testing-library/react\": \"^16.1.0\",\n \"@testing-library/user-event\": \"^14.5.2\",\n \"@types/node\": \"^26.2.0\",\n \"@types/react\": \"^19.0.0\",\n \"@types/react-dom\": \"^19.0.0\",\n \"@vitejs/plugin-react\": \"^6.1.0\",\n \"dompurify\": \"^3.4.15\",\n \"eslint\": \"^9.0.0\",\n \"eslint-plugin-react-hooks\": \"^5.1.0\",\n \"jsdom\": \"^25.0.1\",\n \"react\": \"^19.0.0\",\n \"react-dom\": \"^19.0.0\",\n \"react-router-dom\": \"^7.1.1\",\n \"tsx\": \"^4.0.0\",\n \"typescript\": \"^5.5.0\",\n \"typescript-eslint\": \"^8.61.0\",\n \"vite\": \"8.2.2\",\n \"vitest\": \"4.1.11\",\n \"yaml\": \"^2.8.1\"\n },\n \"overrides\": {\n \"fast-uri\": \"3.1.6\",\n \"hono\": \"4.13.5\",\n \"ip-address\": \"10.4.0\",\n \"vite\": \"8.2.2\",\n \"js-yaml\": \"4.3.2\",\n \"nanoid\": \"3.3.18\",\n \"qs\": \"6.16.0\"\n },\n \"dependencies\": {\n \"@modelcontextprotocol/sdk\": \"^1.30.0\",\n \"marked\": \"18.0.10\",\n \"tar\": \"7.5.22\"\n },\n \"bundleDependencies\": [\n \"@modelcontextprotocol/sdk\",\n \"marked\",\n \"tar\"\n ]\n}\n","/**\n * routes/verse/sections/app-version.ts — the hub's version, for About.\n *\n * Read straight from package.json (Vite inlines the named export at build\n * time and `resolveJsonModule` types it), because no API route reports it:\n * /api/health answers liveness, /api/snapshot answers fleet state, and\n * neither carries the running hub's version. A hardcoded string here would\n * silently drift from the published package on every release.\n */\nimport { version } from '../../../../../package.json';\n\nexport const APP_VERSION: string = version;\nexport const APP_NAME = 'Ashlr Verse';\n","/**\n * routes/verse/sections/AboutPanel.tsx — what this is and which build it is.\n * The version comes from package.json at build time (./app-version.ts).\n */\nimport { IconExternalLink } from '../../../components/primitives/icons.js';\nimport { Tag } from '../../../components/primitives/index.js';\nimport { APP_NAME, APP_VERSION } from './app-version.js';\nimport { Panel } from './SettingRow.js';\nimport styles from './SettingsSection.module.css';\n\nexport function AboutPanel() {\n return (\n <Panel title=\"About\">\n <div className={`${styles.row} ${styles.rowStacked}`}>\n <div className={styles.about}>\n <p className={styles.aboutName}>{APP_NAME}</p>\n <p className={styles.aboutLine}>\n <Tag mono>v{APP_VERSION}</Tag>\n <span>ashlr-hub — local-first command center for agentic engineers.</span>\n </p>\n <p className={styles.aboutLine}>\n Every session, token and artifact stays on this machine. The console talks to one local server and no\n third-party service.\n </p>\n <p className={styles.aboutLine}>\n <a\n className={styles.link}\n href=\"https://github.com/ashlrai/ashlr-hub\"\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n >\n Source and changelog\n <IconExternalLink size={12} />\n </a>\n </p>\n </div>\n </div>\n </Panel>\n );\n}\n","/**\n * design/contrast.ts — WCAG 2.1 contrast math over CSS color strings.\n *\n * Two callers, one implementation:\n * - routes/verse/sections/AppearancePanel.tsx warns, live, when a\n * hand-dragged accent stops being readable as link/button text in the\n * active theme. The design language allows any hue; it does not allow an\n * unreadable one to ship silently.\n * - design/tokens-contrast.test.ts asserts the whole palette in BOTH\n * themes (design doc §6: >= 4.5:1 body text, >= 3:1 meaningful borders).\n *\n * Deliberately dependency-free and DOM-free: parse -> linearize -> ratio.\n * Supports the subset of CSS color syntax the stylesheets actually use —\n * #rgb / #rrggbb / #rrggbbaa, rgb()/rgba(), hsl()/hsla(), both the legacy\n * comma form and the modern space form, plus `color-mix(in srgb, ...)`.\n * Anything else returns null rather than guessing a color.\n *\n * `color-mix` is in that list because the meaning-carrying marks that the\n * contrast suite has to guard are not all plain tokens: the chart gridline,\n * the empty half of a window meter and the diff row tints are all declared as\n * a mix in a CSS module. Without this the suite could only assert the token a\n * mix is DERIVED from, which is precisely the gap that let a 45%-alpha\n * gridline ship under a comment claiming it cleared 3:1.\n */\n\nexport interface Rgba {\n /** 0-255 */\n r: number;\n /** 0-255 */\n g: number;\n /** 0-255 */\n b: number;\n /** 0-1 */\n a: number;\n}\n\nconst HEX_RE = /^#([0-9a-f]{3,8})$/i;\nconst FN_RE = /^(rgba?|hsla?)\\(([^)]*)\\)$/i;\n\nfunction clamp(n: number, min: number, max: number): number {\n return Math.min(max, Math.max(min, n));\n}\n\n/** \"50%\" -> 0.5, \"0.5\" -> 0.5, \"128\" (of 255) handled by the caller. */\nfunction unitValue(raw: string, scale: number): number {\n const text = raw.trim();\n if (text.endsWith('%')) return (Number.parseFloat(text) / 100) * scale;\n return Number.parseFloat(text);\n}\n\nfunction hslToRgb(h: number, s: number, l: number): { r: number; g: number; b: number } {\n const hue = ((h % 360) + 360) % 360;\n const c = (1 - Math.abs(2 * l - 1)) * s;\n const x = c * (1 - Math.abs(((hue / 60) % 2) - 1));\n const m = l - c / 2;\n let rgb: [number, number, number];\n if (hue < 60) rgb = [c, x, 0];\n else if (hue < 120) rgb = [x, c, 0];\n else if (hue < 180) rgb = [0, c, x];\n else if (hue < 240) rgb = [0, x, c];\n else if (hue < 300) rgb = [x, 0, c];\n else rgb = [c, 0, x];\n return {\n r: Math.round((rgb[0] + m) * 255),\n g: Math.round((rgb[1] + m) * 255),\n b: Math.round((rgb[2] + m) * 255),\n };\n}\n\n/**\n * Split a function's argument list on top-level commas, so a nested\n * `rgb(...)`/`color-mix(...)` argument survives intact.\n */\nfunction splitTopLevel(text: string): string[] {\n const parts: string[] = [];\n let depth = 0;\n let current = '';\n for (const ch of text) {\n if (ch === '(') depth += 1;\n else if (ch === ')') depth -= 1;\n if (ch === ',' && depth === 0) {\n parts.push(current);\n current = '';\n continue;\n }\n current += ch;\n }\n parts.push(current);\n return parts.map((p) => p.trim()).filter((p) => p.length > 0);\n}\n\n/** `#abc 40%` -> ['#abc', 40]; a missing percentage comes back as null. */\nfunction colorWithPercent(raw: string): { color: string; pct: number | null } | null {\n const text = raw.trim();\n const m = /\\s(\\d*\\.?\\d+)%$/.exec(text);\n if (m) return { color: text.slice(0, m.index).trim(), pct: Number.parseFloat(m[1]!) };\n const lead = /^(\\d*\\.?\\d+)%\\s/.exec(text);\n if (lead) return { color: text.slice(lead[0].length).trim(), pct: Number.parseFloat(lead[1]!) };\n return { color: text, pct: null };\n}\n\n/**\n * `color-mix(in srgb, <color> [p%], <color> [p%])`, per CSS Color 5: the two\n * percentages are normalized to sum to 100, the result's alpha is their\n * alpha-weighted sum, and the channels are mixed PREMULTIPLIED — which is why\n * mixing against `transparent` yields the first color at that alpha rather\n * than a color darkened toward black.\n *\n * Only the `srgb` color space is accepted. Every other space would need its\n * own transfer function, and silently treating `oklab` as srgb would report a\n * contrast ratio the browser does not agree with.\n */\nfunction parseColorMix(text: string): Rgba | null {\n const body = /^color-mix\\((.*)\\)$/is.exec(text.trim());\n if (!body) return null;\n const args = splitTopLevel(body[1]!);\n if (args.length !== 3) return null;\n if (args[0]!.replace(/\\s+/g, ' ').trim() !== 'in srgb') return null;\n\n const first = colorWithPercent(args[1]!);\n const second = colorWithPercent(args[2]!);\n if (!first || !second) return null;\n const c1 = parseColor(first.color);\n const c2 = parseColor(second.color);\n if (!c1 || !c2) return null;\n\n let p1 = first.pct;\n let p2 = second.pct;\n if (p1 === null && p2 === null) {\n p1 = 50;\n p2 = 50;\n } else if (p1 === null) p1 = 100 - p2!;\n else if (p2 === null) p2 = 100 - p1;\n const total = p1 + p2!;\n if (total <= 0) return null;\n const w1 = p1 / total;\n const w2 = p2! / total;\n\n const alpha = c1.a * w1 + c2.a * w2;\n if (alpha <= 0) return { r: 0, g: 0, b: 0, a: 0 };\n const channel = (k: 'r' | 'g' | 'b'): number =>\n clamp(Math.round((c1[k] * c1.a * w1 + c2[k] * c2.a * w2) / alpha), 0, 255);\n return { r: channel('r'), g: channel('g'), b: channel('b'), a: clamp(alpha, 0, 1) };\n}\n\n/** Parse a CSS color string. Returns null for anything unrecognized. */\nexport function parseColor(input: string): Rgba | null {\n const text = input.trim().toLowerCase();\n if (text === 'transparent') return { r: 0, g: 0, b: 0, a: 0 };\n if (text.startsWith('color-mix(')) return parseColorMix(text);\n\n const hex = HEX_RE.exec(text);\n if (hex) {\n const body = hex[1]!;\n const expand = (s: string) => Number.parseInt(s.length === 1 ? s + s : s, 16);\n if (body.length === 3 || body.length === 4) {\n return {\n r: expand(body[0]!),\n g: expand(body[1]!),\n b: expand(body[2]!),\n a: body.length === 4 ? expand(body[3]!) / 255 : 1,\n };\n }\n if (body.length === 6 || body.length === 8) {\n return {\n r: expand(body.slice(0, 2)),\n g: expand(body.slice(2, 4)),\n b: expand(body.slice(4, 6)),\n a: body.length === 8 ? expand(body.slice(6, 8)) / 255 : 1,\n };\n }\n return null;\n }\n\n const fn = FN_RE.exec(text);\n if (!fn) return null;\n const name = fn[1]!;\n // Both syntaxes: `a, b, c, d` and `a b c / d`.\n const parts = fn[2]!\n .replace(/\\//g, ' ')\n .split(/[\\s,]+/)\n .filter(Boolean);\n if (parts.length < 3) return null;\n const alpha = parts.length >= 4 ? clamp(unitValue(parts[3]!, 1), 0, 1) : 1;\n\n if (name.startsWith('rgb')) {\n return {\n r: clamp(Math.round(unitValue(parts[0]!, 255)), 0, 255),\n g: clamp(Math.round(unitValue(parts[1]!, 255)), 0, 255),\n b: clamp(Math.round(unitValue(parts[2]!, 255)), 0, 255),\n a: alpha,\n };\n }\n\n const hue = Number.parseFloat(parts[0]!);\n const sat = clamp(unitValue(parts[1]!, 1), 0, 1);\n const light = clamp(unitValue(parts[2]!, 1), 0, 1);\n if (!Number.isFinite(hue)) return null;\n return { ...hslToRgb(hue, sat, light), a: alpha };\n}\n\n/** Composite a (possibly translucent) color over an opaque backdrop. */\nexport function flatten(color: Rgba, backdrop: Rgba): Rgba {\n if (color.a >= 1) return color;\n const a = color.a;\n return {\n r: Math.round(color.r * a + backdrop.r * (1 - a)),\n g: Math.round(color.g * a + backdrop.g * (1 - a)),\n b: Math.round(color.b * a + backdrop.b * (1 - a)),\n a: 1,\n };\n}\n\n/** WCAG relative luminance of an opaque color. */\nexport function relativeLuminance(color: Rgba): number {\n const channel = (v: number): number => {\n const s = v / 255;\n return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;\n };\n return 0.2126 * channel(color.r) + 0.7152 * channel(color.g) + 0.0722 * channel(color.b);\n}\n\n/**\n * WCAG contrast ratio (1-21) between two CSS colors. A translucent color is\n * composited over `backdrop` first (default white) — asking for the contrast\n * of a 14%-alpha status background is otherwise meaningless.\n * Returns null when either color cannot be parsed, so a caller can say\n * \"unknown\" instead of asserting on a guess.\n */\nexport function contrastRatio(foreground: string, background: string, backdrop = '#ffffff'): number | null {\n const bgRaw = parseColor(background);\n const fgRaw = parseColor(foreground);\n const base = parseColor(backdrop);\n if (!bgRaw || !fgRaw || !base) return null;\n const bg = flatten(bgRaw, base);\n const fg = flatten(fgRaw, bg);\n const l1 = relativeLuminance(fg);\n const l2 = relativeLuminance(bg);\n const [hi, lo] = l1 >= l2 ? [l1, l2] : [l2, l1];\n return (hi + 0.05) / (lo + 0.05);\n}\n\n/** Convenience for the appearance panel: does this pair clear body-text contrast? */\nexport function meetsTextContrast(foreground: string, background: string, backdrop?: string): boolean {\n const ratio = contrastRatio(foreground, background, backdrop);\n return ratio !== null && ratio >= 4.5;\n}\n\n/**\n * The accent, resolved to a hex the same way tokens.css derives its ramp\n * (hsl channels + a per-step lightness offset). Used by the appearance panel\n * to preview and contrast-check a hue the operator is dragging, without\n * reading computed styles mid-drag.\n */\nexport function accentHex(h: number, s: number, l: number, lightnessOffset = 0): string {\n const rgb = hslToRgb(h, clamp(s, 0, 100) / 100, clamp(l + lightnessOffset, 0, 100) / 100);\n const hex = (n: number) => n.toString(16).padStart(2, '0');\n return `#${hex(rgb.r)}${hex(rgb.g)}${hex(rgb.b)}`;\n}\n","/**\n * routes/verse/sections/AppearancePanel.tsx — the \"Linux\" part of the design\n * language: theme, accent, display size, density, display face, radius,\n * motion.\n *\n * Every control applies IMMEDIATELY (design doc §3: live preview, no save\n * button) because the whole app is the preview — the panel writes through\n * data/appearance-store.ts, which writes the tokens on <html>. The preview\n * block at the end exists to show type, numerals, a filled action and a\n * meter in one place, so the effect of a change is visible without leaving\n * Settings.\n *\n * The hue slider is free-range, so the panel checks the resulting link color\n * against BOTH themes with design/contrast.ts and warns when a choice drops\n * under 4.5:1 — the operator keeps the hue they asked for, but is never\n * allowed to make it unreadable without being told.\n */\nimport { useId } from 'react';\nimport { Button, Input, Meter, Segmented, Slider, StatusBadge, Switch, Tag } from '../../../components/primitives/index.js';\nimport { IconAlert, IconCheck, IconMonitor, IconMoon, IconSun } from '../../../components/primitives/icons.js';\nimport { accentHex, contrastRatio } from '../../../design/contrast.js';\nimport {\n ACCENT_LIGHTNESS_RANGE,\n ACCENT_PRESETS,\n isDefaultAppearance,\n matchingAccentPreset,\n type Appearance,\n type Density,\n type DisplayFont,\n type RadiusScale,\n type ThemePreference,\n type UiScale,\n} from '../../../data/appearance-store.js';\nimport { Panel, SettingRow } from './SettingRow.js';\nimport styles from './SettingsSection.module.css';\n\n/**\n * The literal `--bg-surface` of each theme (design/tokens.css). Used only to\n * score a candidate accent; design/tokens-contrast.test.ts asserts these two\n * constants still match the stylesheet, so a future retune cannot leave the\n * warning scoring against a color the app no longer paints.\n */\nexport const LIGHT_SURFACE = '#ffffff';\nexport const DARK_SURFACE = '#121214';\n/** Dark raises accent lightness by --accent-l-shift; --accent-600 sits 8% below/above it. */\nconst DARK_L_SHIFT = 6;\nconst LINK_STEP = 8;\n\nconst THEME_OPTIONS = [\n { value: 'system' as ThemePreference, label: 'System', icon: <IconMonitor /> },\n { value: 'light' as ThemePreference, label: 'Light', icon: <IconSun /> },\n { value: 'dark' as ThemePreference, label: 'Dark', icon: <IconMoon /> },\n];\n\n/**\n * Display size. The labels say what the operator gets, not what the\n * multiplier is — \"1.25x\" is an implementation detail and a worse name than\n * \"Large\" for a control you pick by looking at the result.\n *\n * Only three, and none of them smaller than Default: the type ramp bottoms\n * out at a 12px body floor, and Density directly below is already the\n * \"tighter\" control. See the [data-ui-scale] block in design/tokens.css.\n */\nconst UI_SCALE_OPTIONS = [\n { value: 'default' as UiScale, label: 'Default' },\n { value: 'large' as UiScale, label: 'Large' },\n { value: 'xlarge' as UiScale, label: 'Extra large' },\n];\n\nconst DENSITY_OPTIONS = [\n { value: 'comfortable' as Density, label: 'Comfortable' },\n { value: 'compact' as Density, label: 'Compact' },\n];\n\nconst FONT_OPTIONS = [\n { value: 'grotesk' as DisplayFont, label: 'Space Grotesk' },\n { value: 'ui' as DisplayFont, label: 'UI sans' },\n { value: 'mono' as DisplayFont, label: 'Mono' },\n];\n\nconst RADIUS_OPTIONS = [\n { value: 'sharp' as RadiusScale, label: 'Sharp' },\n { value: 'default' as RadiusScale, label: 'Default' },\n { value: 'soft' as RadiusScale, label: 'Soft' },\n];\n\n/** A 360° sweep at the current saturation/lightness, so the track shows the choice. */\nfunction hueTrack(s: number, l: number): string {\n const stops = [0, 60, 120, 180, 240, 300, 360].map((h) => `${accentHex(h, s, l)} ${(h / 360) * 100}%`);\n return `linear-gradient(to right, ${stops.join(', ')})`;\n}\n\nexport interface AccentReadability {\n lightRatio: number | null;\n darkRatio: number | null;\n /** Themes in which the derived link color drops below 4.5:1. */\n failing: Array<'light' | 'dark'>;\n}\n\n/** Exported for the section's test: the same math the warning renders from. */\nexport function accentReadability(h: number, s: number, l: number): AccentReadability {\n const lightLink = accentHex(h, s, l, -LINK_STEP);\n const darkLink = accentHex(h, s, l, DARK_L_SHIFT + LINK_STEP);\n const lightRatio = contrastRatio(lightLink, LIGHT_SURFACE);\n const darkRatio = contrastRatio(darkLink, DARK_SURFACE);\n const failing: Array<'light' | 'dark'> = [];\n if (lightRatio !== null && lightRatio < 4.5) failing.push('light');\n if (darkRatio !== null && darkRatio < 4.5) failing.push('dark');\n return { lightRatio, darkRatio, failing };\n}\n\nexport interface AppearancePanelProps {\n appearance: Appearance;\n onChange: (patch: Partial<Appearance>) => void;\n onReset: () => void;\n}\n\nexport function AppearancePanel({ appearance, onChange, onReset }: AppearancePanelProps) {\n const accentLabelId = useId();\n const hueId = useId();\n const satId = useId();\n const lightId = useId();\n const motionId = useId();\n\n const preset = matchingAccentPreset(appearance);\n const readability = accentReadability(appearance.accentH, appearance.accentS, appearance.accentL);\n\n return (\n <Panel\n title=\"Appearance\"\n action={\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={onReset}\n disabled={isDefaultAppearance(appearance)}\n title=\"Restore the shipped theme, accent, display size, density, font, radius and motion\"\n >\n Reset to defaults\n </Button>\n }\n >\n <SettingRow label=\"Theme\" description=\"System follows your OS appearance setting.\">\n <Segmented\n aria-label=\"Theme\"\n options={THEME_OPTIONS}\n value={appearance.theme}\n onChange={(theme) => onChange({ theme })}\n />\n </SettingRow>\n\n <SettingRow\n label=\"Accent\"\n labelId={accentLabelId}\n description={\n preset\n ? `${preset.label} — used for links, focus rings and the one primary action per surface.`\n : 'Custom hue — used for links, focus rings and the one primary action per surface.'\n }\n >\n <div className={styles.swatches} role=\"radiogroup\" aria-labelledby={accentLabelId}>\n {ACCENT_PRESETS.map((p) => {\n const selected = preset?.id === p.id;\n return (\n <button\n key={p.id}\n type=\"button\"\n role=\"radio\"\n aria-checked={selected}\n aria-label={p.label}\n tabIndex={selected || (!preset && p.id === ACCENT_PRESETS[0]!.id) ? 0 : -1}\n className={styles.swatch}\n style={{ background: accentHex(p.h, p.s, p.l) }}\n onClick={() => onChange({ accentH: p.h, accentS: p.s, accentL: p.l })}\n >\n {selected ? (\n <span className={styles.swatchCheck}>\n <IconCheck size={12} />\n </span>\n ) : null}\n </button>\n );\n })}\n </div>\n </SettingRow>\n\n <SettingRow\n label=\"Accent channels\"\n description=\"Hue, saturation and lightness are written straight onto the root element — the whole app follows as you drag.\"\n stacked\n >\n <div className={styles.sliderStack}>\n <Slider\n id={hueId}\n label=\"Hue\"\n min={0}\n max={359}\n value={appearance.accentH}\n valueLabel={`${appearance.accentH}°`}\n valueText={`${appearance.accentH} degrees`}\n trackImage={hueTrack(appearance.accentS, appearance.accentL)}\n onChange={(e) => onChange({ accentH: Number(e.currentTarget.value) })}\n />\n <Slider\n id={satId}\n label=\"Saturation\"\n min={0}\n max={100}\n value={appearance.accentS}\n valueLabel={`${appearance.accentS}%`}\n valueText={`${appearance.accentS} percent`}\n onChange={(e) => onChange({ accentS: Number(e.currentTarget.value) })}\n />\n <Slider\n id={lightId}\n label=\"Lightness\"\n min={ACCENT_LIGHTNESS_RANGE.min}\n max={ACCENT_LIGHTNESS_RANGE.max}\n value={appearance.accentL}\n valueLabel={`${appearance.accentL}%`}\n valueText={`${appearance.accentL} percent`}\n onChange={(e) => onChange({ accentL: Number(e.currentTarget.value) })}\n />\n {readability.failing.length > 0 ? (\n <p className={styles.contrastWarning} role=\"status\">\n <IconAlert size={14} />\n <span>\n This accent falls below 4.5:1 as link text in{' '}\n {readability.failing.length === 2 ? 'both themes' : `${readability.failing[0]} mode`}. Raise or lower\n the lightness to keep it readable.\n </span>\n </p>\n ) : null}\n </div>\n </SettingRow>\n\n <SettingRow\n label=\"Display size\"\n description=\"Scales text AND spacing together across the whole app, for a large display or a long session. Applies as you pick it.\"\n >\n <Segmented\n aria-label=\"Display size\"\n options={UI_SCALE_OPTIONS}\n value={appearance.uiScale}\n onChange={(uiScale) => onChange({ uiScale })}\n />\n </SettingRow>\n\n <SettingRow\n label=\"Density\"\n description=\"Row height and control padding across every view. Independent of display size — a large, tightly packed interface is a valid choice.\"\n >\n <Segmented\n aria-label=\"Density\"\n options={DENSITY_OPTIONS}\n value={appearance.density}\n onChange={(density) => onChange({ density })}\n />\n </SettingRow>\n\n <SettingRow label=\"Display font\" description=\"Titles, seat names, metrics and numerals. Body copy stays in the UI sans.\">\n <Segmented\n aria-label=\"Display font\"\n options={FONT_OPTIONS}\n value={appearance.displayFont}\n onChange={(displayFont) => onChange({ displayFont })}\n />\n </SettingRow>\n\n <SettingRow label=\"Corner radius\" description=\"Sharp reads like a terminal; soft reads like a consumer app.\">\n <Segmented\n aria-label=\"Corner radius\"\n options={RADIUS_OPTIONS}\n value={appearance.radius}\n onChange={(radius) => onChange({ radius })}\n />\n </SettingRow>\n\n <SettingRow\n label=\"Reduce motion\"\n htmlFor={motionId}\n description=\"Collapses every transition to 1ms. Defaults to your system preference; turning it off here overrides that.\"\n >\n <Switch\n id={motionId}\n checked={appearance.reduceMotion}\n onChange={(reduceMotion) => onChange({ reduceMotion })}\n aria-label=\"Reduce motion\"\n />\n </SettingRow>\n\n <SettingRow label=\"Preview\" description=\"Live — these are the real primitives, not a picture of them.\" stacked>\n <div className={styles.preview}>\n <p className={styles.previewHeading}>Ashlr Verse</p>\n <p className={styles.previewBody}>\n Body copy stays in the UI sans at the reading measure; numerals like{' '}\n <span className={styles.previewNumerals}>18,420 / 66,000</span> use the display face.\n </p>\n <div className={styles.previewRow}>\n <Button variant=\"primary\" size=\"sm\">\n Primary\n </Button>\n <Button variant=\"subtle\" size=\"sm\">\n Subtle\n </Button>\n <Button variant=\"ghost\" size=\"sm\">\n Ghost\n </Button>\n <Button variant=\"danger\" size=\"sm\">\n Destructive\n </Button>\n </div>\n <div className={styles.previewRow}>\n <StatusBadge status=\"running\" />\n <Tag engine=\"claude\">Claude Max</Tag>\n <Tag engine=\"local\" mono>\n qwen3-coder\n </Tag>\n </div>\n <Meter value={18_420} max={66_000} label=\"Context\" />\n <Input aria-label=\"Preview field\" placeholder=\"A field at the current density\" size=\"sm\" />\n </div>\n </SettingRow>\n </Panel>\n );\n}\n","/**\n * routes/verse/sections/ConnectionPanel.tsx — which server this window is\n * talking to, what authority it currently holds, and how to get the tokens\n * back if it loses them.\n *\n * SECURITY: this panel never renders, copies or logs a token. It shows the\n * STATE of the two authorities (read session, mutation hold) and tells the\n * operator where the real values are printed — the terminal that started the\n * server. The mutation token is memory-only by design (data/auth-store.ts);\n * showing it here would put it on screen, in a screenshot, and in any\n * screen-recording of a demo.\n */\nimport { useRef, useState } from 'react';\nimport { Button, Dialog, Input, StatusBadge } from '../../../components/primitives/index.js';\nimport { IconCopy, IconInfo, IconLock } from '../../../components/primitives/icons.js';\nimport { clearMutationToken, clearReadSession } from '../../../data/auth-store.js';\nimport { useAuthPhase, useMutationHold } from '../../../data/hooks.js';\nimport { useToast } from '../../../components/primitives/Toast.js';\nimport { Panel, SettingRow } from './SettingRow.js';\nimport styles from './SettingsSection.module.css';\n\nfunction formatHoldExpiry(heldUntil: number | null): string {\n if (heldUntil === null) return 'locked';\n const minutes = Math.max(0, Math.round((heldUntil - Date.now()) / 60_000));\n if (minutes <= 0) return 'expiring now';\n return `unlocked for ${minutes} more minute${minutes === 1 ? '' : 's'}`;\n}\n\nexport function ConnectionPanel() {\n const phase = useAuthPhase();\n const hold = useMutationHold();\n const toast = useToast();\n const [confirmOpen, setConfirmOpen] = useState(false);\n const cancelRef = useRef<HTMLButtonElement>(null);\n\n const origin = typeof window === 'undefined' ? '' : window.location.origin;\n\n async function copyOrigin(): Promise<void> {\n try {\n await navigator.clipboard.writeText(origin);\n toast.show('Server address copied.');\n } catch {\n toast.show('Could not reach the clipboard — select the field and copy manually.', 'danger');\n }\n }\n\n async function disconnect(): Promise<void> {\n setConfirmOpen(false);\n await clearReadSession();\n toast.show('Disconnected. Paste the read token to reconnect.');\n }\n\n return (\n <Panel title=\"Connection\">\n <SettingRow label=\"Server\" description=\"This window talks to one local hub. Nothing leaves your machine.\">\n <div className={styles.origin}>\n <Input value={origin} readOnly mono size=\"sm\" aria-label=\"Server address\" />\n </div>\n <Button variant=\"ghost\" size=\"sm\" icon={<IconCopy />} onClick={() => void copyOrigin()}>\n Copy\n </Button>\n </SettingRow>\n\n <SettingRow label=\"Read session\" description=\"A 15-minute signed cookie, renewed silently while this tab stays open.\">\n <StatusBadge\n status={phase === 'authenticated' ? 'connected' : phase === 'checking' ? 'checking' : 'disconnected'}\n tone={phase === 'authenticated' ? 'success' : phase === 'checking' ? 'running' : 'danger'}\n />\n </SettingRow>\n\n <SettingRow\n label=\"Mutation hold\"\n description=\"Every action that changes something needs the mutation token. It is held in memory only, never stored, and clears when this tab closes.\"\n >\n <StatusBadge\n status={hold.hasHold ? formatHoldExpiry(hold.heldUntil) : 'locked'}\n tone={hold.hasHold ? 'success' : 'neutral'}\n />\n <Button\n variant=\"subtle\"\n size=\"sm\"\n icon={<IconLock />}\n onClick={() => {\n clearMutationToken();\n toast.show('Mutation hold cleared.');\n }}\n disabled={!hold.hasHold}\n >\n Lock now\n </Button>\n </SettingRow>\n\n <SettingRow\n label=\"Disconnect\"\n description=\"Ends the read session in this browser and clears the mutation hold. Chats on the server are untouched.\"\n >\n <Button variant=\"danger\" size=\"sm\" onClick={() => setConfirmOpen(true)}>\n Disconnect\n </Button>\n </SettingRow>\n\n <div className={styles.row}>\n <p className={styles.note}>\n <span className={styles.noteIcon}>\n <IconInfo size={14} />\n </span>\n <span>\n <strong>Where the tokens come from.</strong> Start the console with{' '}\n <code className={styles.code}>ashlr verse</code> — it prints a read token and a mutation token in that\n terminal, and opens this page. The desktop app injects both for you. Tokens are never displayed here, and\n the hub never writes them into a page, a log line or an API response. Lost them? Stop the server and start\n it again; it mints a fresh pair.\n </span>\n </p>\n </div>\n\n <Dialog\n open={confirmOpen}\n onClose={() => setConfirmOpen(false)}\n titleId=\"verse-settings-disconnect\"\n title=\"Disconnect from this server?\"\n description=\"You will need the read token again to get back in. Running sessions keep running on the server.\"\n initialFocusRef={cancelRef}\n >\n <div className={styles.previewRow} style={{ justifyContent: 'flex-end' }}>\n <Button ref={cancelRef} variant=\"subtle\" onClick={() => setConfirmOpen(false)}>\n Cancel\n </Button>\n <Button variant=\"danger\" onClick={() => void disconnect()}>\n Disconnect\n </Button>\n </div>\n </Dialog>\n </Panel>\n );\n}\n","/**\n * routes/verse/sections/ShortcutsPanel.tsx — the keyboard reference.\n *\n * It documents the bindings the V2 shell contract fixes (⌘1-⌘5, ⌘K, ⌘N, ⌘,)\n * plus the composer's own keys. It is a REFERENCE, not the implementation:\n * the handlers live with the shell (owner C) and the composer. Keeping the\n * list here means an operator can find a binding without a manual; keeping\n * it declarative means it is one array to update when a binding changes.\n */\nimport { Panel } from './SettingRow.js';\nimport styles from './SettingsSection.module.css';\n\n/** ⌘ on Apple platforms, Ctrl everywhere else. */\nexport function isApplePlatform(): boolean {\n if (typeof navigator === 'undefined') return true;\n const source = `${navigator.platform ?? ''} ${navigator.userAgent ?? ''}`;\n return /mac|iphone|ipad|ipod/i.test(source);\n}\n\ninterface Shortcut {\n keys: string[];\n action: string;\n}\n\nexport function shortcutGroups(mod: string): Array<{ title: string; items: Shortcut[] }> {\n return [\n {\n title: 'Navigation',\n items: [\n { keys: [mod, '1'], action: 'Chat' },\n { keys: [mod, '2'], action: 'Autonomy' },\n { keys: [mod, '3'], action: 'Approvals' },\n { keys: [mod, '4'], action: 'Usage' },\n { keys: [mod, '5'], action: 'Settings' },\n { keys: [mod, 'K'], action: 'Quick switcher' },\n { keys: [mod, ','], action: 'Settings' },\n ],\n },\n {\n title: 'Chat',\n items: [\n { keys: [mod, 'N'], action: 'New chat' },\n { keys: ['Enter'], action: 'Send message' },\n { keys: ['Shift', 'Enter'], action: 'New line' },\n { keys: ['Esc'], action: 'Stop dictation / close overlay' },\n ],\n },\n ];\n}\n\nexport function ShortcutsPanel() {\n const mod = isApplePlatform() ? '⌘' : 'Ctrl';\n return (\n <Panel title=\"Keyboard\">\n <div className={styles.shortcuts}>\n {shortcutGroups(mod).flatMap((group) =>\n group.items.map((item) => (\n <div key={`${group.title}-${item.action}-${item.keys.join('+')}`} className={styles.shortcut}>\n <span>{item.action}</span>\n <span className={styles.keys}>\n {item.keys.map((key) => (\n <kbd key={key} className={styles.key}>\n {key}\n </kbd>\n ))}\n </span>\n </div>\n )),\n )}\n </div>\n </Panel>\n );\n}\n","/**\n * routes/verse/sections/SettingsSection.tsx — the Settings rail item\n * (VERSE-CONTRACT-V2, owner A). Named export, NO props: the shell\n * lazy-mounts it and it reads everything it needs from the stores.\n *\n * Four panels in one 720px reading column: Appearance (live, no save\n * button), Connection (server, authority state, how to get tokens back),\n * Keyboard, and About. Each row is label + description on the left, control\n * on the right — the same rhythm all the way down, so the page reads as one\n * object rather than four inventions.\n */\nimport { useAppearance } from '../../../data/hooks.js';\nimport { OnboardingPanel } from '../onboarding/OnboardingPanel.js';\nimport { AboutPanel } from './AboutPanel.js';\nimport { AppearancePanel } from './AppearancePanel.js';\nimport { ConnectionPanel } from './ConnectionPanel.js';\nimport { ShortcutsPanel } from './ShortcutsPanel.js';\nimport styles from './SettingsSection.module.css';\n\nexport function SettingsSection() {\n const { appearance, set, reset } = useAppearance();\n\n return (\n <div className={styles.section}>\n <header className={styles.strip} data-app-region=\"drag\">\n <h2 className={styles.stripTitle}>Settings</h2>\n </header>\n <div className={styles.scroll}>\n <div className={styles.column}>\n <AppearancePanel appearance={appearance} onChange={set} onReset={reset} />\n <ConnectionPanel />\n <ShortcutsPanel />\n <OnboardingPanel />\n <AboutPanel />\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":"inDCmBA,SAAgB,EAAM,CAAE,QAAO,SAAQ,YAAwB,CAC7D,OACE,EAAA,EAAA,KAAA,CAAC,UAAD,CAAS,UAAW,EAAO,MAA3B,SAAA,EACE,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAW,EAAO,UAAvB,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAW,EAAO,WAAa,SAAA,CAAU,CAAA,EAC5C,CACE,CACL,CAAA,GAAA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,EAAO,UAAY,UAAc,CAAA,CAC1C,GAEb,CAcA,SAAgB,EAAW,CACzB,QACA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,EAAA,EAAA,IAAA,CAAC,EAAD,CAAkB,CAAA,GAClB,EAAA,EAAA,IAAA,CAAC,EAAD,CAAa,CAAA,CACV,GACF,CAAA,CACF,GAET"}
|
|
1
|
+
{"version":3,"file":"SettingsSection-Bqimu_Mg.js","names":[],"sources":["../../../../../../src/web-ui/routes/verse/sections/SettingsSection.module.css","../../../../../../src/web-ui/routes/verse/sections/SettingRow.tsx","../../../../../../src/web-ui/routes/verse/onboarding/OnboardingPanel.tsx","../../../../../../package.json","../../../../../../src/web-ui/routes/verse/sections/app-version.ts","../../../../../../src/web-ui/routes/verse/sections/AboutPanel.tsx","../../../../../../src/web-ui/design/contrast.ts","../../../../../../src/web-ui/routes/verse/sections/AppearancePanel.tsx","../../../../../../src/web-ui/routes/verse/sections/ConnectionPanel.tsx","../../../../../../src/web-ui/routes/verse/sections/ShortcutsPanel.tsx","../../../../../../src/web-ui/routes/verse/sections/SettingsSection.tsx"],"sourcesContent":["/* Settings — one reading column of quiet two-column rows. Shared by every\n panel in this folder so the label/control rhythm can never drift between\n Appearance and Connection. */\n\n.section {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n background: var(--bg-canvas);\n}\n\n.strip {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--space-3);\n flex: none;\n height: var(--strip-height);\n padding: 0 var(--space-5);\n border-bottom: 1px solid var(--border-subtle);\n background: var(--bg-surface);\n}\n\n.stripTitle {\n font-family: var(--font-display);\n font-size: var(--text-sm-size);\n font-weight: var(--font-weight-semibold);\n letter-spacing: var(--tracking-display);\n}\n\n.scroll {\n flex: 1;\n min-height: 0;\n overflow: auto;\n}\n\n.column {\n width: 100%;\n max-width: var(--measure-read);\n margin: 0 auto;\n padding: var(--space-6) var(--space-5) var(--space-16);\n display: flex;\n flex-direction: column;\n gap: var(--space-8);\n}\n\n/* ---------------------------------------------------------------------------\n * Panel = a titled group of rows, separated by hairlines rather than cards.\n * ------------------------------------------------------------------------- */\n.panel {\n display: flex;\n flex-direction: column;\n}\n\n.panelHead {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: var(--space-3);\n padding-bottom: var(--space-2);\n}\n\n.panelTitle {\n font-family: var(--font-display);\n font-size: var(--text-2xs-size);\n line-height: var(--text-2xs-line);\n letter-spacing: var(--tracking-label);\n text-transform: uppercase;\n font-weight: var(--font-weight-medium);\n color: var(--text-tertiary);\n}\n\n.panelBody {\n border-top: 1px solid var(--border-subtle);\n}\n\n/* ---------------------------------------------------------------------------\n * Row: label + description on the left, control on the right.\n * ------------------------------------------------------------------------- */\n.row {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: var(--space-4);\n padding: var(--density-pad) 0;\n border-bottom: 1px solid var(--border-subtle);\n}\n\n.rowStacked {\n grid-template-columns: minmax(0, 1fr);\n align-items: stretch;\n}\n\n.rowText {\n min-width: 0;\n}\n\n.rowLabel {\n display: block;\n font-size: var(--text-sm-size);\n line-height: var(--text-sm-line);\n color: var(--text-primary);\n font-weight: var(--font-weight-medium);\n}\n\n.rowDescription {\n margin-top: 2px;\n font-size: var(--text-xs-size);\n line-height: var(--text-xs-line);\n color: var(--text-secondary);\n}\n\n.rowControl {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--space-2);\n min-width: 0;\n}\n\n.rowStacked .rowControl {\n justify-content: flex-start;\n}\n\n/* Below the shell's 900px breakpoint the two columns stack rather than\n squeezing a slider into 80px. */\n@media (max-width: 720px) {\n .row {\n grid-template-columns: minmax(0, 1fr);\n }\n .rowControl {\n justify-content: flex-start;\n }\n}\n\n/* ---------------------------------------------------------------------------\n * Accent controls\n * ------------------------------------------------------------------------- */\n.swatches {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-2);\n}\n\n.swatch {\n width: 22px;\n height: 22px;\n padding: 0;\n border: 1px solid var(--border-default);\n border-radius: var(--radius-xs);\n cursor: pointer;\n transition: transform var(--duration-fast) var(--ease-standard);\n}\n\n.swatch:hover {\n transform: translateY(-1px);\n}\n\n/* Selection is carried by a ring AND the check glyph, never by color. */\n.swatch[aria-checked='true'] {\n box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 3px var(--text-primary);\n}\n\n.swatchCheck {\n display: flex;\n align-items: center;\n justify-content: center;\n color: #ffffff;\n mix-blend-mode: difference;\n}\n\n.sliderStack {\n display: flex;\n flex-direction: column;\n gap: var(--space-1);\n width: min(320px, 100%);\n}\n\n.contrastWarning {\n display: flex;\n align-items: flex-start;\n gap: var(--space-2);\n margin-top: var(--space-2);\n padding: var(--space-2) var(--space-3);\n border: 1px solid var(--status-warning-solid);\n border-radius: var(--radius-xs);\n background: var(--status-warning-bg);\n color: var(--status-warning-fg);\n font-size: var(--text-xs-size);\n line-height: var(--text-xs-line);\n}\n\n/* ---------------------------------------------------------------------------\n * Live preview\n * ------------------------------------------------------------------------- */\n.preview {\n display: flex;\n flex-direction: column;\n gap: var(--space-3);\n padding: var(--space-4);\n border: 1px solid var(--border-default);\n border-radius: var(--radius-md);\n background: var(--bg-surface);\n}\n\n.previewRow {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--space-2);\n}\n\n.previewHeading {\n font-family: var(--font-display);\n font-size: var(--text-md-size);\n line-height: var(--text-md-line);\n letter-spacing: var(--tracking-display);\n font-weight: var(--font-weight-semibold);\n}\n\n.previewBody {\n font-size: var(--text-sm-size);\n line-height: var(--text-sm-line);\n color: var(--text-secondary);\n}\n\n.previewNumerals {\n font-family: var(--font-display);\n font-variant-numeric: tabular-nums;\n letter-spacing: var(--tracking-display);\n color: var(--text-primary);\n}\n\n/* ---------------------------------------------------------------------------\n * Connection / About\n * ------------------------------------------------------------------------- */\n.origin {\n width: min(320px, 100%);\n}\n\n.note {\n display: flex;\n gap: var(--space-2);\n padding: var(--space-3);\n border: 1px solid var(--border-subtle);\n border-radius: var(--radius-xs);\n /* --bg-canvas, not --bg-hover: in light both --bg-hover and --bg-code\n resolve to --gray-100, so the .code chip nested inside this note had no\n ground of its own and was distinguished only by its hairline — a rounded\n bordered box inside a rounded bordered box, which §1.2 forbids. */\n background: var(--bg-canvas);\n color: var(--text-secondary);\n font-size: var(--text-xs-size);\n line-height: var(--text-xs-line);\n}\n\n.noteIcon {\n flex: none;\n margin-top: 1px;\n color: var(--text-tertiary);\n}\n\n.code {\n font-family: var(--font-mono);\n font-size: var(--text-2xs-size);\n padding: 1px 4px;\n border: 1px solid var(--border-subtle);\n border-radius: var(--radius-xs);\n background: var(--bg-code);\n color: var(--text-primary);\n white-space: nowrap;\n}\n\n/* ---------------------------------------------------------------------------\n * Keyboard reference\n * ------------------------------------------------------------------------- */\n.shortcuts {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));\n gap: 0 var(--space-6);\n}\n\n.shortcut {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--space-3);\n padding: var(--space-2) 0;\n border-bottom: 1px solid var(--border-subtle);\n font-size: var(--text-sm-size);\n}\n\n.keys {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n flex: none;\n}\n\n.key {\n min-width: 20px;\n padding: 2px var(--space-1);\n border: 1px solid var(--border-default);\n border-bottom-width: 2px;\n border-radius: var(--radius-xs);\n background: var(--bg-surface);\n color: var(--text-secondary);\n font-family: var(--font-display);\n font-size: var(--text-2xs-size);\n line-height: var(--text-2xs-line);\n text-align: center;\n}\n\n.about {\n display: flex;\n flex-direction: column;\n gap: var(--space-2);\n}\n\n.aboutLine {\n display: flex;\n align-items: center;\n gap: var(--space-2);\n font-size: var(--text-sm-size);\n color: var(--text-secondary);\n}\n\n.aboutName {\n font-family: var(--font-display);\n font-size: var(--text-lg-size);\n line-height: var(--text-lg-line);\n letter-spacing: var(--tracking-display);\n font-weight: var(--font-weight-semibold);\n color: var(--text-primary);\n}\n\n.link {\n display: inline-flex;\n align-items: center;\n gap: var(--space-1);\n color: var(--text-link);\n text-decoration: none;\n}\n\n.link:hover {\n text-decoration: underline;\n}\n\n/* ---- desktop shell (see desktop/README.md \"Desktop shell contract\") -----\n * In the Tauri window the OS title bar overlays the top 48px and the macOS\n * traffic lights float over the top-LEFT 92px of the WINDOW. This strip does\n * not start at the window's left edge — the 56px rail does — so the inset it\n * owes is the overlap, never the full 92px. Both vars are absent in a\n * browser, where the expression floors to 0px and the layout is unchanged. */\n.strip {\n padding-left: max(\n var(--space-5),\n calc(var(--app-traffic-light-inset, 0px) - var(--rail-width, 56px))\n );\n}\n","/**\n * routes/verse/sections/SettingRow.tsx — the Settings layout primitive:\n * label + description on the left, control on the right, hairline between.\n *\n * The label is a real <label> bound to the control's id when one is given;\n * for composite controls (a radiogroup, a swatch grid) pass `labelId` and\n * point the group's `aria-labelledby` at it instead — a <label> cannot name\n * a group, and an unnamed radiogroup is announced as \"group\".\n */\nimport type { ReactNode } from 'react';\nimport styles from './SettingsSection.module.css';\n\nexport interface PanelProps {\n title: ReactNode;\n /** Right-aligned affordance in the panel header (e.g. \"Reset\"). */\n action?: ReactNode;\n children: ReactNode;\n}\n\nexport function Panel({ title, action, children }: PanelProps) {\n return (\n <section className={styles.panel}>\n <div className={styles.panelHead}>\n <h3 className={styles.panelTitle}>{title}</h3>\n {action}\n </div>\n <div className={styles.panelBody}>{children}</div>\n </section>\n );\n}\n\nexport interface SettingRowProps {\n label: ReactNode;\n description?: ReactNode;\n /** id of the control this row labels (renders a real <label for>). */\n htmlFor?: string;\n /** id to put on the label text, for a control using aria-labelledby. */\n labelId?: string;\n /** Put the control under the text instead of beside it (sliders, previews). */\n stacked?: boolean;\n children: ReactNode;\n}\n\nexport function SettingRow({\n label,\n description,\n htmlFor,\n labelId,\n stacked = false,\n children,\n}: SettingRowProps) {\n const text = (\n <>\n <span className={styles.rowLabel} id={labelId}>\n {label}\n </span>\n {description ? <span className={styles.rowDescription}>{description}</span> : null}\n </>\n );\n\n return (\n <div className={`${styles.row} ${stacked ? styles.rowStacked : ''}`}>\n <div className={styles.rowText}>\n {htmlFor ? (\n <label htmlFor={htmlFor} className={styles.rowText}>\n {text}\n </label>\n ) : (\n text\n )}\n </div>\n <div className={styles.rowControl}>{children}</div>\n </div>\n );\n}\n","/**\n * routes/verse/onboarding/OnboardingPanel.tsx — the Settings row that brings\n * the first-run tour back.\n *\n * It lives here rather than in sections/ so the whole onboarding feature is\n * one folder; SettingsSection.tsx imports it the same way it imports its own\n * panels, and reuses the same Panel/SettingRow primitives so the row keeps\n * the label-left / control-right rhythm of every other setting.\n *\n * The description states what the tour actually covers, and — because this\n * is the only place the stored answer is visible — whether it has been seen.\n */\nimport { Button } from '../../../components/primitives/index.js';\nimport { Panel, SettingRow } from '../sections/SettingRow.js';\nimport { replayOnboarding } from './onboarding-store.js';\nimport { useOnboarding } from './useOnboarding.js';\n\nfunction describe(completedAt: string | null, dismissedAt: string | null): string {\n if (completedAt) return `Last completed ${new Date(completedAt).toLocaleDateString()}.`;\n if (dismissedAt) return 'Skipped. Nothing was missed — it is all reachable from the sections themselves.';\n return 'Not seen yet.';\n}\n\nexport function OnboardingPanel() {\n const { completedAt, dismissedAt, open } = useOnboarding();\n\n return (\n <Panel title=\"Onboarding\">\n <SettingRow\n label=\"Replay the first-run tour\"\n description={`Your connected seats, whether a local runtime is available, and what each of the three stop controls really halts. ${describe(completedAt, dismissedAt)}`}\n >\n <Button variant=\"subtle\" size=\"sm\" onClick={replayOnboarding} disabled={open}>\n {open ? 'Showing' : 'Replay'}\n </Button>\n </SettingRow>\n </Panel>\n );\n}\n","{\n \"name\": \"@ashlr/hub\",\n \"version\": \"3.9.1\",\n \"description\": \"Local-first command center for agentic engineers.\",\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"license\": \"MIT\",\n \"author\": \"Mason Wyatt <mason@evero-consulting.com>\",\n \"homepage\": \"https://github.com/ashlrai/ashlr-hub#readme\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/ashlrai/ashlr-hub.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/ashlrai/ashlr-hub/issues\"\n },\n \"keywords\": [\n \"cli\",\n \"agentic\",\n \"mcp\",\n \"local-first\",\n \"raycast\",\n \"developer-tools\",\n \"ai\"\n ],\n \"type\": \"module\",\n \"bin\": {\n \"ashlr\": \"bin/ashlr\"\n },\n \"files\": [\n \"dist\",\n \"bin\",\n \"scripts/run-verify-command.mjs\",\n \"scripts/scorecard-history-worker.mjs\",\n \"scripts/evaluators/preparation-verification-activity.mjs\",\n \"scripts/evaluators/preparation-verification-activity.d.mts\",\n \"scripts/evaluators/preparation-verification-protocol.mjs\",\n \"scripts/evaluators/preparation-verification-native.mjs\",\n \"scripts/evaluators/preparation-verification-native.d.mts\",\n \"schema\",\n \"CHANGELOG.md\",\n \"docs/README.md\",\n \"docs/QUICKSTART.md\",\n \"docs/DEMO.md\",\n \"docs/ARCHITECTURE.md\",\n \"docs/MISSION-OS.md\",\n \"docs/ASHLR-UNIVERSE.md\",\n \"docs/AUTONOMY-GAP.md\",\n \"docs/FIRM-DEMO.md\",\n \"docs/UNIVERSE-RESEARCH.md\",\n \"docs/UNIVERSE-AUTONOMY-RESEARCH.md\",\n \"docs/RESOURCE-POOLS.md\",\n \"docs/NORTH-STAR.md\",\n \"docs/ELITE-AGENT-EFFICIENCY.md\",\n \"docs/RUNTIME_ACTIVATION_AUTHORITY.md\",\n \"docs/contracts/CONTRACT-M515.md\",\n \"docs/contracts/CONTRACT-M521.md\",\n \"docs/contracts/CONTRACT-M568.md\",\n \"docs/contracts/CONTRACT-MISSION-RECEIPT-V1.md\"\n ],\n \"bundledDependencies\": [\n \"@modelcontextprotocol/sdk\",\n \"marked\",\n \"tar\"\n ],\n \"exports\": {\n \".\": {\n \"types\": \"./dist/api/index.d.ts\",\n \"import\": \"./dist/api/index.js\"\n },\n \"./core\": {\n \"types\": \"./dist/api/core.d.ts\",\n \"import\": \"./dist/api/core.js\"\n },\n \"./types\": {\n \"types\": \"./dist/api/types.d.ts\",\n \"import\": \"./dist/api/types.js\"\n },\n \"./plugin\": {\n \"types\": \"./dist/api/plugin.d.ts\",\n \"import\": \"./dist/api/plugin.js\"\n },\n \"./universe\": {\n \"types\": \"./dist/core/universe/index.d.ts\",\n \"import\": \"./dist/core/universe/index.js\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"engines\": {\n \"node\": \">=22.15.0\"\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run typecheck && npm run lint && npm run test:ci && npm run test:web\",\n \"prepack\": \"npm run build\",\n \"build\": \"tsc -p tsconfig.json && node scripts/copy-assets.mjs && node scripts/build-preparation-builtin.mjs && vite build --config vite.config.web.ts && node scripts/build-release-dependency-inventory.mjs && node scripts/build-identity.mjs\",\n \"build:preparation-builtin\": \"node scripts/build-preparation-builtin.mjs\",\n \"build:binary\": \"node scripts/build-sea.mjs\",\n \"release:canary\": \"node scripts/run-signed-release-canary.mjs\",\n \"verify:local-production\": \"node scripts/run-local-production-gate.mjs\",\n \"build:web\": \"vite build --config vite.config.web.ts\",\n \"dev\": \"tsx src/cli/index.ts\",\n \"dev:web\": \"vite --config vite.config.web.ts\",\n \"test\": \"vitest run\",\n \"test:serial\": \"vitest run --no-file-parallelism\",\n \"test:web\": \"vitest run --config vitest.config.web.ts\",\n \"test:ci\": \"node scripts/test-ci.mjs\",\n \"test:invariants\": \"vitest run test/h*.test.ts --no-file-parallelism\",\n \"test:engineering-responsiveness\": \"vitest run --config vitest.config.engineering-performance.ts\",\n \"conformance:ecosystem\": \"tsx scripts/run-ecosystem-conformance.ts\",\n \"check:docs\": \"node scripts/check-documentation.mjs\",\n \"lint\": \"eslint . && npm run lint:realio-lane\",\n \"lint:realio-lane\": \"node scripts/check-realio-lane-membership.mjs\",\n \"typecheck\": \"tsc --noEmit && npm run typecheck:web\",\n \"typecheck:web\": \"tsc --noEmit -p src/web-ui/tsconfig.json\"\n },\n \"devDependencies\": {\n \"@testing-library/jest-dom\": \"^7.0.1\",\n \"@testing-library/react\": \"^16.1.0\",\n \"@testing-library/user-event\": \"^14.5.2\",\n \"@types/node\": \"^26.2.0\",\n \"@types/react\": \"^19.0.0\",\n \"@types/react-dom\": \"^19.0.0\",\n \"@vitejs/plugin-react\": \"^6.1.0\",\n \"dompurify\": \"^3.4.15\",\n \"eslint\": \"^9.0.0\",\n \"eslint-plugin-react-hooks\": \"^5.1.0\",\n \"jsdom\": \"^25.0.1\",\n \"react\": \"^19.0.0\",\n \"react-dom\": \"^19.0.0\",\n \"react-router-dom\": \"^7.1.1\",\n \"tsx\": \"^4.0.0\",\n \"typescript\": \"^5.5.0\",\n \"typescript-eslint\": \"^8.61.0\",\n \"vite\": \"8.2.2\",\n \"vitest\": \"4.1.11\",\n \"yaml\": \"^2.8.1\"\n },\n \"overrides\": {\n \"fast-uri\": \"3.1.6\",\n \"hono\": \"4.13.5\",\n \"ip-address\": \"10.4.0\",\n \"vite\": \"8.2.2\",\n \"js-yaml\": \"4.3.2\",\n \"nanoid\": \"3.3.18\",\n \"qs\": \"6.16.0\"\n },\n \"dependencies\": {\n \"@modelcontextprotocol/sdk\": \"^1.30.0\",\n \"marked\": \"18.0.10\",\n \"tar\": \"7.5.22\"\n },\n \"bundleDependencies\": [\n \"@modelcontextprotocol/sdk\",\n \"marked\",\n \"tar\"\n ]\n}\n","/**\n * routes/verse/sections/app-version.ts — the hub's version, for About.\n *\n * Read straight from package.json (Vite inlines the named export at build\n * time and `resolveJsonModule` types it), because no API route reports it:\n * /api/health answers liveness, /api/snapshot answers fleet state, and\n * neither carries the running hub's version. A hardcoded string here would\n * silently drift from the published package on every release.\n */\nimport { version } from '../../../../../package.json';\n\nexport const APP_VERSION: string = version;\nexport const APP_NAME = 'Ashlr Verse';\n","/**\n * routes/verse/sections/AboutPanel.tsx — what this is and which build it is.\n * The version comes from package.json at build time (./app-version.ts).\n */\nimport { IconExternalLink } from '../../../components/primitives/icons.js';\nimport { Tag } from '../../../components/primitives/index.js';\nimport { APP_NAME, APP_VERSION } from './app-version.js';\nimport { Panel } from './SettingRow.js';\nimport styles from './SettingsSection.module.css';\n\nexport function AboutPanel() {\n return (\n <Panel title=\"About\">\n <div className={`${styles.row} ${styles.rowStacked}`}>\n <div className={styles.about}>\n <p className={styles.aboutName}>{APP_NAME}</p>\n <p className={styles.aboutLine}>\n <Tag mono>v{APP_VERSION}</Tag>\n <span>ashlr-hub — local-first command center for agentic engineers.</span>\n </p>\n <p className={styles.aboutLine}>\n Every session, token and artifact stays on this machine. The console talks to one local server and no\n third-party service.\n </p>\n <p className={styles.aboutLine}>\n <a\n className={styles.link}\n href=\"https://github.com/ashlrai/ashlr-hub\"\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n >\n Source and changelog\n <IconExternalLink size={12} />\n </a>\n </p>\n </div>\n </div>\n </Panel>\n );\n}\n","/**\n * design/contrast.ts — WCAG 2.1 contrast math over CSS color strings.\n *\n * Two callers, one implementation:\n * - routes/verse/sections/AppearancePanel.tsx warns, live, when a\n * hand-dragged accent stops being readable as link/button text in the\n * active theme. The design language allows any hue; it does not allow an\n * unreadable one to ship silently.\n * - design/tokens-contrast.test.ts asserts the whole palette in BOTH\n * themes (design doc §6: >= 4.5:1 body text, >= 3:1 meaningful borders).\n *\n * Deliberately dependency-free and DOM-free: parse -> linearize -> ratio.\n * Supports the subset of CSS color syntax the stylesheets actually use —\n * #rgb / #rrggbb / #rrggbbaa, rgb()/rgba(), hsl()/hsla(), both the legacy\n * comma form and the modern space form, plus `color-mix(in srgb, ...)`.\n * Anything else returns null rather than guessing a color.\n *\n * `color-mix` is in that list because the meaning-carrying marks that the\n * contrast suite has to guard are not all plain tokens: the chart gridline,\n * the empty half of a window meter and the diff row tints are all declared as\n * a mix in a CSS module. Without this the suite could only assert the token a\n * mix is DERIVED from, which is precisely the gap that let a 45%-alpha\n * gridline ship under a comment claiming it cleared 3:1.\n */\n\nexport interface Rgba {\n /** 0-255 */\n r: number;\n /** 0-255 */\n g: number;\n /** 0-255 */\n b: number;\n /** 0-1 */\n a: number;\n}\n\nconst HEX_RE = /^#([0-9a-f]{3,8})$/i;\nconst FN_RE = /^(rgba?|hsla?)\\(([^)]*)\\)$/i;\n\nfunction clamp(n: number, min: number, max: number): number {\n return Math.min(max, Math.max(min, n));\n}\n\n/** \"50%\" -> 0.5, \"0.5\" -> 0.5, \"128\" (of 255) handled by the caller. */\nfunction unitValue(raw: string, scale: number): number {\n const text = raw.trim();\n if (text.endsWith('%')) return (Number.parseFloat(text) / 100) * scale;\n return Number.parseFloat(text);\n}\n\nfunction hslToRgb(h: number, s: number, l: number): { r: number; g: number; b: number } {\n const hue = ((h % 360) + 360) % 360;\n const c = (1 - Math.abs(2 * l - 1)) * s;\n const x = c * (1 - Math.abs(((hue / 60) % 2) - 1));\n const m = l - c / 2;\n let rgb: [number, number, number];\n if (hue < 60) rgb = [c, x, 0];\n else if (hue < 120) rgb = [x, c, 0];\n else if (hue < 180) rgb = [0, c, x];\n else if (hue < 240) rgb = [0, x, c];\n else if (hue < 300) rgb = [x, 0, c];\n else rgb = [c, 0, x];\n return {\n r: Math.round((rgb[0] + m) * 255),\n g: Math.round((rgb[1] + m) * 255),\n b: Math.round((rgb[2] + m) * 255),\n };\n}\n\n/**\n * Split a function's argument list on top-level commas, so a nested\n * `rgb(...)`/`color-mix(...)` argument survives intact.\n */\nfunction splitTopLevel(text: string): string[] {\n const parts: string[] = [];\n let depth = 0;\n let current = '';\n for (const ch of text) {\n if (ch === '(') depth += 1;\n else if (ch === ')') depth -= 1;\n if (ch === ',' && depth === 0) {\n parts.push(current);\n current = '';\n continue;\n }\n current += ch;\n }\n parts.push(current);\n return parts.map((p) => p.trim()).filter((p) => p.length > 0);\n}\n\n/** `#abc 40%` -> ['#abc', 40]; a missing percentage comes back as null. */\nfunction colorWithPercent(raw: string): { color: string; pct: number | null } | null {\n const text = raw.trim();\n const m = /\\s(\\d*\\.?\\d+)%$/.exec(text);\n if (m) return { color: text.slice(0, m.index).trim(), pct: Number.parseFloat(m[1]!) };\n const lead = /^(\\d*\\.?\\d+)%\\s/.exec(text);\n if (lead) return { color: text.slice(lead[0].length).trim(), pct: Number.parseFloat(lead[1]!) };\n return { color: text, pct: null };\n}\n\n/**\n * `color-mix(in srgb, <color> [p%], <color> [p%])`, per CSS Color 5: the two\n * percentages are normalized to sum to 100, the result's alpha is their\n * alpha-weighted sum, and the channels are mixed PREMULTIPLIED — which is why\n * mixing against `transparent` yields the first color at that alpha rather\n * than a color darkened toward black.\n *\n * Only the `srgb` color space is accepted. Every other space would need its\n * own transfer function, and silently treating `oklab` as srgb would report a\n * contrast ratio the browser does not agree with.\n */\nfunction parseColorMix(text: string): Rgba | null {\n const body = /^color-mix\\((.*)\\)$/is.exec(text.trim());\n if (!body) return null;\n const args = splitTopLevel(body[1]!);\n if (args.length !== 3) return null;\n if (args[0]!.replace(/\\s+/g, ' ').trim() !== 'in srgb') return null;\n\n const first = colorWithPercent(args[1]!);\n const second = colorWithPercent(args[2]!);\n if (!first || !second) return null;\n const c1 = parseColor(first.color);\n const c2 = parseColor(second.color);\n if (!c1 || !c2) return null;\n\n let p1 = first.pct;\n let p2 = second.pct;\n if (p1 === null && p2 === null) {\n p1 = 50;\n p2 = 50;\n } else if (p1 === null) p1 = 100 - p2!;\n else if (p2 === null) p2 = 100 - p1;\n const total = p1 + p2!;\n if (total <= 0) return null;\n const w1 = p1 / total;\n const w2 = p2! / total;\n\n const alpha = c1.a * w1 + c2.a * w2;\n if (alpha <= 0) return { r: 0, g: 0, b: 0, a: 0 };\n const channel = (k: 'r' | 'g' | 'b'): number =>\n clamp(Math.round((c1[k] * c1.a * w1 + c2[k] * c2.a * w2) / alpha), 0, 255);\n return { r: channel('r'), g: channel('g'), b: channel('b'), a: clamp(alpha, 0, 1) };\n}\n\n/** Parse a CSS color string. Returns null for anything unrecognized. */\nexport function parseColor(input: string): Rgba | null {\n const text = input.trim().toLowerCase();\n if (text === 'transparent') return { r: 0, g: 0, b: 0, a: 0 };\n if (text.startsWith('color-mix(')) return parseColorMix(text);\n\n const hex = HEX_RE.exec(text);\n if (hex) {\n const body = hex[1]!;\n const expand = (s: string) => Number.parseInt(s.length === 1 ? s + s : s, 16);\n if (body.length === 3 || body.length === 4) {\n return {\n r: expand(body[0]!),\n g: expand(body[1]!),\n b: expand(body[2]!),\n a: body.length === 4 ? expand(body[3]!) / 255 : 1,\n };\n }\n if (body.length === 6 || body.length === 8) {\n return {\n r: expand(body.slice(0, 2)),\n g: expand(body.slice(2, 4)),\n b: expand(body.slice(4, 6)),\n a: body.length === 8 ? expand(body.slice(6, 8)) / 255 : 1,\n };\n }\n return null;\n }\n\n const fn = FN_RE.exec(text);\n if (!fn) return null;\n const name = fn[1]!;\n // Both syntaxes: `a, b, c, d` and `a b c / d`.\n const parts = fn[2]!\n .replace(/\\//g, ' ')\n .split(/[\\s,]+/)\n .filter(Boolean);\n if (parts.length < 3) return null;\n const alpha = parts.length >= 4 ? clamp(unitValue(parts[3]!, 1), 0, 1) : 1;\n\n if (name.startsWith('rgb')) {\n return {\n r: clamp(Math.round(unitValue(parts[0]!, 255)), 0, 255),\n g: clamp(Math.round(unitValue(parts[1]!, 255)), 0, 255),\n b: clamp(Math.round(unitValue(parts[2]!, 255)), 0, 255),\n a: alpha,\n };\n }\n\n const hue = Number.parseFloat(parts[0]!);\n const sat = clamp(unitValue(parts[1]!, 1), 0, 1);\n const light = clamp(unitValue(parts[2]!, 1), 0, 1);\n if (!Number.isFinite(hue)) return null;\n return { ...hslToRgb(hue, sat, light), a: alpha };\n}\n\n/** Composite a (possibly translucent) color over an opaque backdrop. */\nexport function flatten(color: Rgba, backdrop: Rgba): Rgba {\n if (color.a >= 1) return color;\n const a = color.a;\n return {\n r: Math.round(color.r * a + backdrop.r * (1 - a)),\n g: Math.round(color.g * a + backdrop.g * (1 - a)),\n b: Math.round(color.b * a + backdrop.b * (1 - a)),\n a: 1,\n };\n}\n\n/** WCAG relative luminance of an opaque color. */\nexport function relativeLuminance(color: Rgba): number {\n const channel = (v: number): number => {\n const s = v / 255;\n return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;\n };\n return 0.2126 * channel(color.r) + 0.7152 * channel(color.g) + 0.0722 * channel(color.b);\n}\n\n/**\n * WCAG contrast ratio (1-21) between two CSS colors. A translucent color is\n * composited over `backdrop` first (default white) — asking for the contrast\n * of a 14%-alpha status background is otherwise meaningless.\n * Returns null when either color cannot be parsed, so a caller can say\n * \"unknown\" instead of asserting on a guess.\n */\nexport function contrastRatio(foreground: string, background: string, backdrop = '#ffffff'): number | null {\n const bgRaw = parseColor(background);\n const fgRaw = parseColor(foreground);\n const base = parseColor(backdrop);\n if (!bgRaw || !fgRaw || !base) return null;\n const bg = flatten(bgRaw, base);\n const fg = flatten(fgRaw, bg);\n const l1 = relativeLuminance(fg);\n const l2 = relativeLuminance(bg);\n const [hi, lo] = l1 >= l2 ? [l1, l2] : [l2, l1];\n return (hi + 0.05) / (lo + 0.05);\n}\n\n/** Convenience for the appearance panel: does this pair clear body-text contrast? */\nexport function meetsTextContrast(foreground: string, background: string, backdrop?: string): boolean {\n const ratio = contrastRatio(foreground, background, backdrop);\n return ratio !== null && ratio >= 4.5;\n}\n\n/**\n * The accent, resolved to a hex the same way tokens.css derives its ramp\n * (hsl channels + a per-step lightness offset). Used by the appearance panel\n * to preview and contrast-check a hue the operator is dragging, without\n * reading computed styles mid-drag.\n */\nexport function accentHex(h: number, s: number, l: number, lightnessOffset = 0): string {\n const rgb = hslToRgb(h, clamp(s, 0, 100) / 100, clamp(l + lightnessOffset, 0, 100) / 100);\n const hex = (n: number) => n.toString(16).padStart(2, '0');\n return `#${hex(rgb.r)}${hex(rgb.g)}${hex(rgb.b)}`;\n}\n","/**\n * routes/verse/sections/AppearancePanel.tsx — the \"Linux\" part of the design\n * language: theme, accent, display size, density, display face, radius,\n * motion.\n *\n * Every control applies IMMEDIATELY (design doc §3: live preview, no save\n * button) because the whole app is the preview — the panel writes through\n * data/appearance-store.ts, which writes the tokens on <html>. The preview\n * block at the end exists to show type, numerals, a filled action and a\n * meter in one place, so the effect of a change is visible without leaving\n * Settings.\n *\n * The hue slider is free-range, so the panel checks the resulting link color\n * against BOTH themes with design/contrast.ts and warns when a choice drops\n * under 4.5:1 — the operator keeps the hue they asked for, but is never\n * allowed to make it unreadable without being told.\n */\nimport { useId } from 'react';\nimport { Button, Input, Meter, Segmented, Slider, StatusBadge, Switch, Tag } from '../../../components/primitives/index.js';\nimport { IconAlert, IconCheck, IconMonitor, IconMoon, IconSun } from '../../../components/primitives/icons.js';\nimport { accentHex, contrastRatio } from '../../../design/contrast.js';\nimport {\n ACCENT_LIGHTNESS_RANGE,\n ACCENT_PRESETS,\n isDefaultAppearance,\n matchingAccentPreset,\n type Appearance,\n type Density,\n type DisplayFont,\n type RadiusScale,\n type ThemePreference,\n type UiScale,\n} from '../../../data/appearance-store.js';\nimport { Panel, SettingRow } from './SettingRow.js';\nimport styles from './SettingsSection.module.css';\n\n/**\n * The literal `--bg-surface` of each theme (design/tokens.css). Used only to\n * score a candidate accent; design/tokens-contrast.test.ts asserts these two\n * constants still match the stylesheet, so a future retune cannot leave the\n * warning scoring against a color the app no longer paints.\n */\nexport const LIGHT_SURFACE = '#ffffff';\nexport const DARK_SURFACE = '#121214';\n/** Dark raises accent lightness by --accent-l-shift; --accent-600 sits 8% below/above it. */\nconst DARK_L_SHIFT = 6;\nconst LINK_STEP = 8;\n\nconst THEME_OPTIONS = [\n { value: 'system' as ThemePreference, label: 'System', icon: <IconMonitor /> },\n { value: 'light' as ThemePreference, label: 'Light', icon: <IconSun /> },\n { value: 'dark' as ThemePreference, label: 'Dark', icon: <IconMoon /> },\n];\n\n/**\n * Display size. The labels say what the operator gets, not what the\n * multiplier is — \"1.25x\" is an implementation detail and a worse name than\n * \"Large\" for a control you pick by looking at the result.\n *\n * Only three, and none of them smaller than Default: the type ramp bottoms\n * out at a 12px body floor, and Density directly below is already the\n * \"tighter\" control. See the [data-ui-scale] block in design/tokens.css.\n */\nconst UI_SCALE_OPTIONS = [\n { value: 'default' as UiScale, label: 'Default' },\n { value: 'large' as UiScale, label: 'Large' },\n { value: 'xlarge' as UiScale, label: 'Extra large' },\n];\n\nconst DENSITY_OPTIONS = [\n { value: 'comfortable' as Density, label: 'Comfortable' },\n { value: 'compact' as Density, label: 'Compact' },\n];\n\nconst FONT_OPTIONS = [\n { value: 'grotesk' as DisplayFont, label: 'Space Grotesk' },\n { value: 'ui' as DisplayFont, label: 'UI sans' },\n { value: 'mono' as DisplayFont, label: 'Mono' },\n];\n\nconst RADIUS_OPTIONS = [\n { value: 'sharp' as RadiusScale, label: 'Sharp' },\n { value: 'default' as RadiusScale, label: 'Default' },\n { value: 'soft' as RadiusScale, label: 'Soft' },\n];\n\n/** A 360° sweep at the current saturation/lightness, so the track shows the choice. */\nfunction hueTrack(s: number, l: number): string {\n const stops = [0, 60, 120, 180, 240, 300, 360].map((h) => `${accentHex(h, s, l)} ${(h / 360) * 100}%`);\n return `linear-gradient(to right, ${stops.join(', ')})`;\n}\n\nexport interface AccentReadability {\n lightRatio: number | null;\n darkRatio: number | null;\n /** Themes in which the derived link color drops below 4.5:1. */\n failing: Array<'light' | 'dark'>;\n}\n\n/** Exported for the section's test: the same math the warning renders from. */\nexport function accentReadability(h: number, s: number, l: number): AccentReadability {\n const lightLink = accentHex(h, s, l, -LINK_STEP);\n const darkLink = accentHex(h, s, l, DARK_L_SHIFT + LINK_STEP);\n const lightRatio = contrastRatio(lightLink, LIGHT_SURFACE);\n const darkRatio = contrastRatio(darkLink, DARK_SURFACE);\n const failing: Array<'light' | 'dark'> = [];\n if (lightRatio !== null && lightRatio < 4.5) failing.push('light');\n if (darkRatio !== null && darkRatio < 4.5) failing.push('dark');\n return { lightRatio, darkRatio, failing };\n}\n\nexport interface AppearancePanelProps {\n appearance: Appearance;\n onChange: (patch: Partial<Appearance>) => void;\n onReset: () => void;\n}\n\nexport function AppearancePanel({ appearance, onChange, onReset }: AppearancePanelProps) {\n const accentLabelId = useId();\n const hueId = useId();\n const satId = useId();\n const lightId = useId();\n const motionId = useId();\n\n const preset = matchingAccentPreset(appearance);\n const readability = accentReadability(appearance.accentH, appearance.accentS, appearance.accentL);\n\n return (\n <Panel\n title=\"Appearance\"\n action={\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={onReset}\n disabled={isDefaultAppearance(appearance)}\n title=\"Restore the shipped theme, accent, display size, density, font, radius and motion\"\n >\n Reset to defaults\n </Button>\n }\n >\n <SettingRow label=\"Theme\" description=\"System follows your OS appearance setting.\">\n <Segmented\n aria-label=\"Theme\"\n options={THEME_OPTIONS}\n value={appearance.theme}\n onChange={(theme) => onChange({ theme })}\n />\n </SettingRow>\n\n <SettingRow\n label=\"Accent\"\n labelId={accentLabelId}\n description={\n preset\n ? `${preset.label} — used for links, focus rings and the one primary action per surface.`\n : 'Custom hue — used for links, focus rings and the one primary action per surface.'\n }\n >\n <div className={styles.swatches} role=\"radiogroup\" aria-labelledby={accentLabelId}>\n {ACCENT_PRESETS.map((p) => {\n const selected = preset?.id === p.id;\n return (\n <button\n key={p.id}\n type=\"button\"\n role=\"radio\"\n aria-checked={selected}\n aria-label={p.label}\n tabIndex={selected || (!preset && p.id === ACCENT_PRESETS[0]!.id) ? 0 : -1}\n className={styles.swatch}\n style={{ background: accentHex(p.h, p.s, p.l) }}\n onClick={() => onChange({ accentH: p.h, accentS: p.s, accentL: p.l })}\n >\n {selected ? (\n <span className={styles.swatchCheck}>\n <IconCheck size={12} />\n </span>\n ) : null}\n </button>\n );\n })}\n </div>\n </SettingRow>\n\n <SettingRow\n label=\"Accent channels\"\n description=\"Hue, saturation and lightness are written straight onto the root element — the whole app follows as you drag.\"\n stacked\n >\n <div className={styles.sliderStack}>\n <Slider\n id={hueId}\n label=\"Hue\"\n min={0}\n max={359}\n value={appearance.accentH}\n valueLabel={`${appearance.accentH}°`}\n valueText={`${appearance.accentH} degrees`}\n trackImage={hueTrack(appearance.accentS, appearance.accentL)}\n onChange={(e) => onChange({ accentH: Number(e.currentTarget.value) })}\n />\n <Slider\n id={satId}\n label=\"Saturation\"\n min={0}\n max={100}\n value={appearance.accentS}\n valueLabel={`${appearance.accentS}%`}\n valueText={`${appearance.accentS} percent`}\n onChange={(e) => onChange({ accentS: Number(e.currentTarget.value) })}\n />\n <Slider\n id={lightId}\n label=\"Lightness\"\n min={ACCENT_LIGHTNESS_RANGE.min}\n max={ACCENT_LIGHTNESS_RANGE.max}\n value={appearance.accentL}\n valueLabel={`${appearance.accentL}%`}\n valueText={`${appearance.accentL} percent`}\n onChange={(e) => onChange({ accentL: Number(e.currentTarget.value) })}\n />\n {readability.failing.length > 0 ? (\n <p className={styles.contrastWarning} role=\"status\">\n <IconAlert size={14} />\n <span>\n This accent falls below 4.5:1 as link text in{' '}\n {readability.failing.length === 2 ? 'both themes' : `${readability.failing[0]} mode`}. Raise or lower\n the lightness to keep it readable.\n </span>\n </p>\n ) : null}\n </div>\n </SettingRow>\n\n <SettingRow\n label=\"Display size\"\n description=\"Scales text AND spacing together across the whole app, for a large display or a long session. Applies as you pick it.\"\n >\n <Segmented\n aria-label=\"Display size\"\n options={UI_SCALE_OPTIONS}\n value={appearance.uiScale}\n onChange={(uiScale) => onChange({ uiScale })}\n />\n </SettingRow>\n\n <SettingRow\n label=\"Density\"\n description=\"Row height and control padding across every view. Independent of display size — a large, tightly packed interface is a valid choice.\"\n >\n <Segmented\n aria-label=\"Density\"\n options={DENSITY_OPTIONS}\n value={appearance.density}\n onChange={(density) => onChange({ density })}\n />\n </SettingRow>\n\n <SettingRow label=\"Display font\" description=\"Titles, seat names, metrics and numerals. Body copy stays in the UI sans.\">\n <Segmented\n aria-label=\"Display font\"\n options={FONT_OPTIONS}\n value={appearance.displayFont}\n onChange={(displayFont) => onChange({ displayFont })}\n />\n </SettingRow>\n\n <SettingRow label=\"Corner radius\" description=\"Sharp reads like a terminal; soft reads like a consumer app.\">\n <Segmented\n aria-label=\"Corner radius\"\n options={RADIUS_OPTIONS}\n value={appearance.radius}\n onChange={(radius) => onChange({ radius })}\n />\n </SettingRow>\n\n <SettingRow\n label=\"Reduce motion\"\n htmlFor={motionId}\n description=\"Collapses every transition to 1ms. Defaults to your system preference; turning it off here overrides that.\"\n >\n <Switch\n id={motionId}\n checked={appearance.reduceMotion}\n onChange={(reduceMotion) => onChange({ reduceMotion })}\n aria-label=\"Reduce motion\"\n />\n </SettingRow>\n\n <SettingRow label=\"Preview\" description=\"Live — these are the real primitives, not a picture of them.\" stacked>\n <div className={styles.preview}>\n <p className={styles.previewHeading}>Ashlr Verse</p>\n <p className={styles.previewBody}>\n Body copy stays in the UI sans at the reading measure; numerals like{' '}\n <span className={styles.previewNumerals}>18,420 / 66,000</span> use the display face.\n </p>\n <div className={styles.previewRow}>\n <Button variant=\"primary\" size=\"sm\">\n Primary\n </Button>\n <Button variant=\"subtle\" size=\"sm\">\n Subtle\n </Button>\n <Button variant=\"ghost\" size=\"sm\">\n Ghost\n </Button>\n <Button variant=\"danger\" size=\"sm\">\n Destructive\n </Button>\n </div>\n <div className={styles.previewRow}>\n <StatusBadge status=\"running\" />\n <Tag engine=\"claude\">Claude Max</Tag>\n <Tag engine=\"local\" mono>\n qwen3-coder\n </Tag>\n </div>\n <Meter value={18_420} max={66_000} label=\"Context\" />\n <Input aria-label=\"Preview field\" placeholder=\"A field at the current density\" size=\"sm\" />\n </div>\n </SettingRow>\n </Panel>\n );\n}\n","/**\n * routes/verse/sections/ConnectionPanel.tsx — which server this window is\n * talking to, what authority it currently holds, and how to get the tokens\n * back if it loses them.\n *\n * SECURITY: this panel never renders, copies or logs a token. It shows the\n * STATE of the two authorities (read session, mutation hold) and tells the\n * operator where the real values are printed — the terminal that started the\n * server. The mutation token is memory-only by design (data/auth-store.ts);\n * showing it here would put it on screen, in a screenshot, and in any\n * screen-recording of a demo.\n */\nimport { useRef, useState } from 'react';\nimport { Button, Dialog, Input, StatusBadge } from '../../../components/primitives/index.js';\nimport { IconCopy, IconInfo, IconLock } from '../../../components/primitives/icons.js';\nimport { clearMutationToken, clearReadSession } from '../../../data/auth-store.js';\nimport { useAuthPhase, useMutationHold } from '../../../data/hooks.js';\nimport { useToast } from '../../../components/primitives/Toast.js';\nimport { Panel, SettingRow } from './SettingRow.js';\nimport styles from './SettingsSection.module.css';\n\nfunction formatHoldExpiry(heldUntil: number | null): string {\n if (heldUntil === null) return 'locked';\n const minutes = Math.max(0, Math.round((heldUntil - Date.now()) / 60_000));\n if (minutes <= 0) return 'expiring now';\n return `unlocked for ${minutes} more minute${minutes === 1 ? '' : 's'}`;\n}\n\nexport function ConnectionPanel() {\n const phase = useAuthPhase();\n const hold = useMutationHold();\n const toast = useToast();\n const [confirmOpen, setConfirmOpen] = useState(false);\n const cancelRef = useRef<HTMLButtonElement>(null);\n\n const origin = typeof window === 'undefined' ? '' : window.location.origin;\n\n async function copyOrigin(): Promise<void> {\n try {\n await navigator.clipboard.writeText(origin);\n toast.show('Server address copied.');\n } catch {\n toast.show('Could not reach the clipboard — select the field and copy manually.', 'danger');\n }\n }\n\n async function disconnect(): Promise<void> {\n setConfirmOpen(false);\n await clearReadSession();\n toast.show('Disconnected. Paste the read token to reconnect.');\n }\n\n return (\n <Panel title=\"Connection\">\n <SettingRow label=\"Server\" description=\"This window talks to one local hub. Nothing leaves your machine.\">\n <div className={styles.origin}>\n <Input value={origin} readOnly mono size=\"sm\" aria-label=\"Server address\" />\n </div>\n <Button variant=\"ghost\" size=\"sm\" icon={<IconCopy />} onClick={() => void copyOrigin()}>\n Copy\n </Button>\n </SettingRow>\n\n <SettingRow label=\"Read session\" description=\"A 15-minute signed cookie, renewed silently while this tab stays open.\">\n <StatusBadge\n status={phase === 'authenticated' ? 'connected' : phase === 'checking' ? 'checking' : 'disconnected'}\n tone={phase === 'authenticated' ? 'success' : phase === 'checking' ? 'running' : 'danger'}\n />\n </SettingRow>\n\n <SettingRow\n label=\"Mutation hold\"\n description=\"Every action that changes something needs the mutation token. It is held in memory only, never stored, and clears when this tab closes.\"\n >\n <StatusBadge\n status={hold.hasHold ? formatHoldExpiry(hold.heldUntil) : 'locked'}\n tone={hold.hasHold ? 'success' : 'neutral'}\n />\n <Button\n variant=\"subtle\"\n size=\"sm\"\n icon={<IconLock />}\n onClick={() => {\n clearMutationToken();\n toast.show('Mutation hold cleared.');\n }}\n disabled={!hold.hasHold}\n >\n Lock now\n </Button>\n </SettingRow>\n\n <SettingRow\n label=\"Disconnect\"\n description=\"Ends the read session in this browser and clears the mutation hold. Chats on the server are untouched.\"\n >\n <Button variant=\"danger\" size=\"sm\" onClick={() => setConfirmOpen(true)}>\n Disconnect\n </Button>\n </SettingRow>\n\n <div className={styles.row}>\n <p className={styles.note}>\n <span className={styles.noteIcon}>\n <IconInfo size={14} />\n </span>\n <span>\n <strong>Where the tokens come from.</strong> Start the console with{' '}\n <code className={styles.code}>ashlr verse</code> — it prints a read token and a mutation token in that\n terminal, and opens this page. The desktop app injects both for you. Tokens are never displayed here, and\n the hub never writes them into a page, a log line or an API response. Lost them? Stop the server and start\n it again; it mints a fresh pair.\n </span>\n </p>\n </div>\n\n <Dialog\n open={confirmOpen}\n onClose={() => setConfirmOpen(false)}\n titleId=\"verse-settings-disconnect\"\n title=\"Disconnect from this server?\"\n description=\"You will need the read token again to get back in. Running sessions keep running on the server.\"\n initialFocusRef={cancelRef}\n >\n <div className={styles.previewRow} style={{ justifyContent: 'flex-end' }}>\n <Button ref={cancelRef} variant=\"subtle\" onClick={() => setConfirmOpen(false)}>\n Cancel\n </Button>\n <Button variant=\"danger\" onClick={() => void disconnect()}>\n Disconnect\n </Button>\n </div>\n </Dialog>\n </Panel>\n );\n}\n","/**\n * routes/verse/sections/ShortcutsPanel.tsx — the keyboard reference.\n *\n * It documents the bindings the V2 shell contract fixes (⌘1-⌘5, ⌘K, ⌘N, ⌘,)\n * plus the composer's own keys. It is a REFERENCE, not the implementation:\n * the handlers live with the shell (owner C) and the composer. Keeping the\n * list here means an operator can find a binding without a manual; keeping\n * it declarative means it is one array to update when a binding changes.\n */\nimport { Panel } from './SettingRow.js';\nimport styles from './SettingsSection.module.css';\n\n/** ⌘ on Apple platforms, Ctrl everywhere else. */\nexport function isApplePlatform(): boolean {\n if (typeof navigator === 'undefined') return true;\n const source = `${navigator.platform ?? ''} ${navigator.userAgent ?? ''}`;\n return /mac|iphone|ipad|ipod/i.test(source);\n}\n\ninterface Shortcut {\n keys: string[];\n action: string;\n}\n\nexport function shortcutGroups(mod: string): Array<{ title: string; items: Shortcut[] }> {\n return [\n {\n title: 'Navigation',\n items: [\n { keys: [mod, '1'], action: 'Chat' },\n { keys: [mod, '2'], action: 'Autonomy' },\n { keys: [mod, '3'], action: 'Approvals' },\n { keys: [mod, '4'], action: 'Usage' },\n { keys: [mod, '5'], action: 'Settings' },\n { keys: [mod, 'K'], action: 'Quick switcher' },\n { keys: [mod, ','], action: 'Settings' },\n ],\n },\n {\n title: 'Chat',\n items: [\n { keys: [mod, 'N'], action: 'New chat' },\n { keys: ['Enter'], action: 'Send message' },\n { keys: ['Shift', 'Enter'], action: 'New line' },\n { keys: ['Esc'], action: 'Stop dictation / close overlay' },\n ],\n },\n ];\n}\n\nexport function ShortcutsPanel() {\n const mod = isApplePlatform() ? '⌘' : 'Ctrl';\n return (\n <Panel title=\"Keyboard\">\n <div className={styles.shortcuts}>\n {shortcutGroups(mod).flatMap((group) =>\n group.items.map((item) => (\n <div key={`${group.title}-${item.action}-${item.keys.join('+')}`} className={styles.shortcut}>\n <span>{item.action}</span>\n <span className={styles.keys}>\n {item.keys.map((key) => (\n <kbd key={key} className={styles.key}>\n {key}\n </kbd>\n ))}\n </span>\n </div>\n )),\n )}\n </div>\n </Panel>\n );\n}\n","/**\n * routes/verse/sections/SettingsSection.tsx — the Settings rail item\n * (VERSE-CONTRACT-V2, owner A). Named export, NO props: the shell\n * lazy-mounts it and it reads everything it needs from the stores.\n *\n * Four panels in one 720px reading column: Appearance (live, no save\n * button), Connection (server, authority state, how to get tokens back),\n * Keyboard, and About. Each row is label + description on the left, control\n * on the right — the same rhythm all the way down, so the page reads as one\n * object rather than four inventions.\n */\nimport { useAppearance } from '../../../data/hooks.js';\nimport { OnboardingPanel } from '../onboarding/OnboardingPanel.js';\nimport { AboutPanel } from './AboutPanel.js';\nimport { AppearancePanel } from './AppearancePanel.js';\nimport { ConnectionPanel } from './ConnectionPanel.js';\nimport { ShortcutsPanel } from './ShortcutsPanel.js';\nimport styles from './SettingsSection.module.css';\n\nexport function SettingsSection() {\n const { appearance, set, reset } = useAppearance();\n\n return (\n <div className={styles.section}>\n <header className={styles.strip} data-app-region=\"drag\">\n <h2 className={styles.stripTitle}>Settings</h2>\n </header>\n <div className={styles.scroll}>\n <div className={styles.column}>\n <AppearancePanel appearance={appearance} onChange={set} onReset={reset} />\n <ConnectionPanel />\n <ShortcutsPanel />\n <OnboardingPanel />\n <AboutPanel />\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":"inDCmBA,SAAgB,EAAM,CAAE,QAAO,SAAQ,YAAwB,CAC7D,OACE,EAAA,EAAA,KAAA,CAAC,UAAD,CAAS,UAAW,EAAO,MAA3B,SAAA,EACE,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAW,EAAO,UAAvB,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAW,EAAO,WAAa,SAAA,CAAU,CAAA,EAC5C,CACE,CACL,CAAA,GAAA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,EAAO,UAAY,UAAc,CAAA,CAC1C,GAEb,CAcA,SAAgB,EAAW,CACzB,QACA,cACA,UACA,UACA,UAAU,GACV,YACkB,CAClB,IAAM,GACJ,EAAA,EAAA,KAAA,CAAA,EAAA,SAAA,CAAA,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAW,EAAO,SAAU,GAAI,EACnC,SAAA,CACG,CAAA,EACL,GAAc,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAW,EAAO,eAAiB,SAAA,CAAkB,CAAA,EAAI,IAC9E,CAAA,CAAA,EAGJ,OACE,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAW,GAAG,EAAO,IAAI,GAAG,EAAU,EAAO,WAAa,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K,IACd,EAAA,EAAA,IAAA,CAAC,MAAD,CAAe,UAAW,EAAO,IAC9B,SAAA,CACE,EAFK,CAEL,CACN,CACG,CAAA,CACH,CATK,EAAA,GAAG,EAAM,MAAM,GAAG,EAAK,OAAO,GAAG,EAAK,KAAK,KAAK,GAAG,GASxD,CACN,CACH,CACG,CAAA,CACA,CAAA,CAEX,CCrDA,SAAgB,IAAkB,CAChC,GAAM,CAAE,aAAY,MAAK,SAAU,EAAc,EAEjD,OACE,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAW,EAAO,QAAvB,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,SAAD,CAAQ,UAAW,EAAO,MAAO,kBAAgB,OAC/C,UAAA,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAW,EAAO,WAAY,SAAA,UAAY,CAAA,CACxC,CAAA,GACR,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,EAAO,OACrB,UAAA,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAW,EAAO,OAAvB,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,GAAD,CAA6B,aAAY,SAAU,EAAK,QAAS,CAAQ,CAAA,GACzE,EAAA,EAAA,IAAA,CAAC,EAAD,CAAkB,CAAA,GAClB,EAAA,EAAA,IAAA,CAAC,GAAD,CAAiB,CAAA,GACjB,EAAA,EAAA,IAAA,CAAC,EAAD,CAAkB,CAAA,GAClB,EAAA,EAAA,IAAA,CAAC,EAAD,CAAa,CAAA,CACV,GACF,CAAA,CACF,GAET"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,n as t,o as n}from"./index-D2Eik-zt.js";import{P as r,g as i,k as a,l as o,lt as s,n as c,ot as l,t as u,v as d,x as f,y as p}from"./global-eaY9GyX3.js";import{n as m,t as h}from"./UniverseView-DLDtNYL8.js";var g=n(e(),1),_=Object.freeze({"campaign-execution":Object.freeze([`campaign-call-threw`]),"campaign-verification":Object.freeze([`campaign-evidence-changed`]),"delivery-execution":Object.freeze([`delivery-call-threw`]),"delivery-verification":Object.freeze([`delivery-evidence-changed`,`delivery-receipt-unverified`]),"settlement-publication":Object.freeze([`settlement-write-failed`])});function v(e){return typeof e==`string`&&/^[a-z0-9][a-z0-9_-]{0,63}$/.test(e)}function y(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function b(e){return typeof e==`string`&&/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z$/.test(e)&&Number.isFinite(Date.parse(e))&&new Date(e).toISOString()===(e.length===20?e.replace(`Z`,`.000Z`):e)}function x(e){return typeof e==`string`&&/^[a-z0-9][a-z0-9_:-]{0,191}$/.test(e)}function S(e,t){let n=()=>Error(`Controller evidence could not be validated.`);if(!v(t)||!y(e)||e.schemaVersion!==1||e.controllerId!==t||typeof e.sourceState!=`string`||![`healthy`,`missing`,`degraded`].includes(e.sourceState)||typeof e.status!=`string`||![`completed`,`incomplete`,`cancelled`,`timed-out`,`unavailable`,`draining`,`drained`].includes(e.status)||!(e.createdAt===null||b(e.createdAt))||!(e.deadlineAt===null||b(e.deadlineAt))||!b(e.observedAt)||!Array.isArray(e.reasons)||e.reasons.length>128||!e.reasons.every(x)||!Array.isArray(e.outcomes)||e.outcomes.length>64)throw n();let r=new Set,i=e.outcomes.map(e=>{if(!y(e)||typeof e.campaignId!=`string`||!v(e.campaignId)||r.has(e.campaignId)||typeof e.state!=`string`||![`pending`,`in-flight`,`completed`,`held`].includes(e.state)||typeof e.attempted!=`boolean`||!x(e.reasonCode))throw n();return r.add(e.campaignId),{campaignId:e.campaignId,state:e.state,attempted:e.attempted,reasonCode:e.reasonCode}}),a;if(e.topology!==void 0){if(!Array.isArray(e.topology)||e.topology.length>64||e.topology.length!==i.length)throw n();let t=new Set;a=e.topology.map(e=>{if(!y(e)||!v(e.campaignId)||!r.has(e.campaignId)||t.has(e.campaignId))throw n();t.add(e.campaignId);let i=t=>{if(!Array.isArray(t)||t.length>63||!t.every(t=>v(t)&&r.has(t)&&t!==e.campaignId)||new Set(t).size!==t.length)throw n();return[...t]},a=i(e.dependsOn),o=i(e.prerequisites);if(a.some(e=>!o.includes(e)))throw n();return{campaignId:e.campaignId,dependsOn:a,prerequisites:o}});let o=new Map(a.map(e=>[e.campaignId,e])),s=new Set;for(;s.size<a.length;){let e=a.find(e=>!s.has(e.campaignId)&&e.prerequisites.every(e=>s.has(e)));if(!e)throw n();s.add(e.campaignId)}for(let e of a){let t=new Set,r=[...e.dependsOn];for(;r.length;){let e=r.pop();t.has(e)||(t.add(e),r.push(...o.get(e).dependsOn))}if(e.prerequisites.some(e=>!t.has(e)))throw n()}}let o,s;if(e.diagnostics!==void 0){if(!Array.isArray(e.diagnostics)||e.diagnostics.length>i.length)throw n();let t=new Set;s=e.diagnostics.map(e=>{if(!y(e)||!v(e.campaignId)||!r.has(e.campaignId)||t.has(e.campaignId)||i.find(t=>t.campaignId===e.campaignId)?.state===`pending`||typeof e.phase!=`string`||!Object.hasOwn(_,e.phase)||typeof e.code!=`string`||!b(e.at))throw n();let a=e.phase;if(!_[a].includes(e.code))throw n();return t.add(e.campaignId),{campaignId:e.campaignId,phase:a,code:e.code,at:e.at}})}if(e.control!==void 0){let t=e.control;if(!y(t)||typeof t.mode!=`string`||![`open`,`drain`].includes(t.mode)||!Number.isInteger(t.sequence)||t.sequence<1||t.sequence>511||!b(t.requestedAt)||!(t.acknowledgedAt===null||b(t.acknowledgedAt)))throw n();o={mode:t.mode,sequence:t.sequence,requestedAt:t.requestedAt,acknowledgedAt:t.acknowledgedAt}}if(o?.mode===`open`&&o.acknowledgedAt!==null||e.status===`draining`&&(o?.mode!==`drain`||o.acknowledgedAt!==null)||e.status===`drained`&&(o?.mode!==`drain`||o.acknowledgedAt===null))throw n();return{schemaVersion:1,controllerId:t,sourceState:e.sourceState,status:e.status,createdAt:e.createdAt,deadlineAt:e.deadlineAt,observedAt:e.observedAt,reasons:[...e.reasons],outcomes:i,...a?{topology:a}:{},...o?{control:o}:{},...s?{diagnostics:s}:{}}}async function C(e,t){if(!v(e))throw Error(`Enter a valid controller ID.`);return S(await o(`/api/universe/controller-status?controllerId=${encodeURIComponent(e)}`,t),e)}function w(e,t,n){let r=t.trim().toLowerCase();return e.filter(e=>(n===`all`||e.state===n)&&(e.campaignId.toLowerCase().includes(r)||e.reasonCode.toLowerCase().includes(r)))}function T(e,t,n){let r=Number.isFinite(n)?Math.max(0,Math.floor(n)):0;if(t===null)return e.slice(0,r);let i=[],a=[];for(let n of e)(n.from===t||n.to===t?i:a).push(n);return[...i,...a].slice(0,r)}var E={topology:`_topology_1rqbo_1`,header:`_header_1rqbo_2`,snapshot:`_snapshot_1rqbo_5`,counts:`_counts_1rqbo_6`,finder:`_finder_1rqbo_10`,finderControls:`_finderControls_1rqbo_11`,searchLabel:`_searchLabel_1rqbo_13`,utilityButton:`_utilityButton_1rqbo_16`,finderMeta:`_finderMeta_1rqbo_19`,results:`_results_1rqbo_22`,result:`_result_1rqbo_22`,resultName:`_resultName_1rqbo_27`,resultState:`_resultState_1rqbo_28`,resultReason:`_resultReason_1rqbo_32`,pagination:`_pagination_1rqbo_33`,noResults:`_noResults_1rqbo_35`,selectionNote:`_selectionNote_1rqbo_36`,workspace:`_workspace_1rqbo_37`,board:`_board_1rqbo_38`,canvas:`_canvas_1rqbo_39`,edges:`_edges_1rqbo_40`,edge:`_edge_1rqbo_40`,selectedEdge:`_selectedEdge_1rqbo_41`,column:`_column_1rqbo_43`,node:`_node_1rqbo_44`,nodeName:`_nodeName_1rqbo_47`,nodeState:`_nodeState_1rqbo_48`,detail:`_detail_1rqbo_52`,detailState:`_detailState_1rqbo_55`,facts:`_facts_1rqbo_59`,relationships:`_relationships_1rqbo_63`,note:`_note_1rqbo_67`,legend:`_legend_1rqbo_67`,empty:`_empty_1rqbo_67`,notice:`_notice_1rqbo_69`,srOnly:`_srOnly_1rqbo_73`},D=t(),O=64,k=256,A=8,j={pending:`Pending`,"in-flight":`Unresolved intent`,completed:`Completed`,held:`Held`},M={pending:`No settled outcome is recorded. Pending does not mean ready to run.`,"in-flight":`A durable dispatch intent remains unresolved. This is not proof of a live worker.`,completed:`The controller recorded completion, including any required local delivery. This is not a production deployment claim.`,held:`Work remains held for the recorded reason. This view does not retry or release it.`};function N(e){let t=e.outcomes.slice(0,O),n=new Map(e.topology?.map(e=>[e.campaignId,e])),r=new Set(t.map(e=>e.campaignId)),i=new Map;if(e.topology)for(let e=0;e<t.length;e++)for(let e of t){let t=n.get(e.campaignId);i.has(e.campaignId)||!t||t.dependsOn.some(e=>!i.has(e))||i.set(e.campaignId,t.dependsOn.length?Math.max(...t.dependsOn.map(e=>i.get(e)))+1:0)}let a=[...new Set(i.values())].sort((e,t)=>e-t).map(e=>({label:`Dependency layer ${e+1}`,nodes:t.filter(t=>i.get(t.campaignId)===e)})),o=t.filter(e=>!i.has(e.campaignId));o.length&&a.push({label:e.topology?`Layer unavailable`:`Recorded campaigns`,nodes:o});let s=new Map;return a.forEach((e,t)=>e.nodes.forEach((e,n)=>s.set(e.campaignId,{x:24+t*244,y:56+n*108}))),{nodes:t,topology:n,columns:a,positions:s,edges:t.flatMap(e=>(n.get(e.campaignId)?.dependsOn??[]).filter(e=>r.has(e)).map(t=>({from:t,to:e.campaignId}))),width:Math.max(256,a.length*244+8),height:64+Math.max(1,...a.map(e=>e.nodes.length))*108}}function P({data:e}){let t=(0,g.useMemo)(()=>N(e),[e]),[n,r]=(0,g.useState)(t.nodes[0]?.campaignId??null),[i,a]=(0,g.useState)(``),[o,s]=(0,g.useState)(`all`),[c,l]=(0,g.useState)(0),u=(0,g.useRef)(null),d=(0,g.useRef)(new Map),f=t.nodes.find(e=>e.campaignId===n),p=(0,g.useMemo)(()=>w(t.nodes,i,o),[t.nodes,i,o]),m=i.trim().length>0||o!==`all`,h=Math.max(1,Math.ceil(p.length/A)),_=Math.min(c,h-1),v=p.slice(_*A,(_+1)*A),y=f&&m&&!p.some(e=>e.campaignId===f.campaignId),b=(0,g.useMemo)(()=>T(t.edges,f?.campaignId??null,k),[t.edges,f?.campaignId]),x=(0,g.useId)(),S=`${x}-detail`,C=f?t.topology.get(f.campaignId):void 0,P=C?.prerequisites.filter(e=>!C.dependsOn.includes(e))??[],F=new Map(e.outcomes.map(e=>[e.campaignId,e])),I=t=>e.outcomes.filter(e=>e.state===t).length;function L(e,n=!1){let r=u.current,i=t.positions.get(e);if(!r||!i)return;let a=Math.max(0,i.x+96-r.clientWidth/2),o=Math.max(0,i.y+40-r.clientHeight/2);typeof r.scrollTo==`function`?r.scrollTo({left:a,top:o,behavior:`auto`}):(r.scrollLeft=a,r.scrollTop=o),n&&d.current.get(e)?.focus({preventScroll:!0})}function R(e){r(e),L(e)}function z(e,n){return e.length?(0,D.jsx)(`ul`,{className:E.relationships,children:e.map(e=>(0,D.jsxs)(`li`,{children:[t.positions.has(e)?(0,D.jsx)(`button`,{type:`button`,onClick:()=>R(e),children:e}):(0,D.jsx)(`span`,{children:e}),(0,D.jsx)(`span`,{children:F.has(e)?j[F.get(e).state]:`Outcome unavailable`})]},e))}):(0,D.jsx)(`p`,{className:E.note,children:n})}return(0,D.jsxs)(`section`,{className:E.topology,"aria-label":`Controller mission topology`,children:[(0,D.jsxs)(`header`,{className:E.header,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`h3`,{children:`Mission topology`}),(0,D.jsx)(`p`,{children:`Follow the declared work graph. Select a campaign to inspect its recorded state and prerequisites.`})]}),(0,D.jsx)(`span`,{className:E.snapshot,children:`Recorded snapshot`})]}),(0,D.jsxs)(`dl`,{className:E.counts,"aria-label":`Recorded campaign counts`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Campaigns`}),(0,D.jsx)(`dd`,{children:e.outcomes.length})]}),[`completed`,`in-flight`,`held`,`pending`].map(e=>(0,D.jsxs)(`div`,{"data-state":e,children:[(0,D.jsx)(`dt`,{children:j[e]}),(0,D.jsx)(`dd`,{children:I(e)})]},e))]}),e.topology?null:(0,D.jsx)(`p`,{className:E.notice,children:`Dependency information is unavailable in this observation. Campaign placement does not imply independence or readiness.`}),e.outcomes.length>O?(0,D.jsxs)(`p`,{className:E.notice,children:[`Showing the first `,O,` of `,e.outcomes.length,` campaigns. Counts include all recorded outcomes; relationships outside this diagram remain in the selected campaign detail.`]}):null,t.nodes.length?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(`section`,{className:E.finder,"aria-label":`Campaign navigator`,children:[(0,D.jsxs)(`div`,{className:E.finderControls,children:[(0,D.jsxs)(`label`,{className:E.searchLabel,htmlFor:`${x}-search`,children:[`Search campaigns`,(0,D.jsx)(`input`,{id:`${x}-search`,type:`search`,value:i,maxLength:192,placeholder:`Campaign ID or recorded reason`,"aria-describedby":`${x}-finder-hint`,onChange:e=>{a(e.target.value),l(0)}})]}),(0,D.jsxs)(`label`,{htmlFor:`${x}-state`,children:[`Recorded state`,(0,D.jsxs)(`select`,{id:`${x}-state`,value:o,onChange:e=>{s(e.target.value),l(0)},children:[(0,D.jsx)(`option`,{value:`all`,children:`All recorded states`}),[`pending`,`in-flight`,`completed`,`held`].map(e=>(0,D.jsx)(`option`,{value:e,children:j[e]},e))]})]}),(0,D.jsx)(`button`,{type:`button`,className:E.utilityButton,disabled:!f,onClick:()=>{f&&L(f.campaignId,!0)},children:`Locate selected`}),m?(0,D.jsx)(`button`,{type:`button`,className:E.utilityButton,onClick:()=>{a(``),s(`all`),l(0)},children:`Reset filters`}):null]}),(0,D.jsxs)(`div`,{className:E.finderMeta,children:[(0,D.jsxs)(`p`,{id:`${x}-finder-hint`,children:[`Search covers the `,t.nodes.length,` diagram campaigns. Filters narrow this index, not the graph or its dependency layers.`]}),(0,D.jsx)(`span`,{"aria-live":`polite`,"aria-atomic":`true`,children:m?`${p.length} matching campaign${p.length===1?``:`s`}`:`${t.nodes.length} campaigns in diagram`})]}),m?(0,D.jsxs)(D.Fragment,{children:[p.length?(0,D.jsx)(`ul`,{className:E.results,"aria-label":`Matching campaigns`,children:v.map(e=>(0,D.jsx)(`li`,{children:(0,D.jsxs)(`button`,{type:`button`,className:E.result,"aria-label":`Select campaign ${e.campaignId}`,"aria-describedby":`${x}-result-state-${e.campaignId} ${x}-result-reason-${e.campaignId}`,"aria-pressed":f?.campaignId===e.campaignId,"aria-controls":S,onClick:()=>R(e.campaignId),children:[(0,D.jsx)(`span`,{className:E.resultName,children:e.campaignId}),(0,D.jsx)(`span`,{id:`${x}-result-state-${e.campaignId}`,className:E.resultState,"data-state":e.state,children:j[e.state]}),(0,D.jsx)(`span`,{id:`${x}-result-reason-${e.campaignId}`,className:E.resultReason,children:e.reasonCode})]})},e.campaignId))}):(0,D.jsx)(`p`,{className:E.noResults,children:`No diagram campaigns match. Try another campaign ID or recorded reason, or reset filters.`}),h>1?(0,D.jsxs)(`nav`,{className:E.pagination,"aria-label":`Campaign result pages`,children:[(0,D.jsxs)(`span`,{children:[`Page `,_+1,` of `,h]}),(0,D.jsx)(`button`,{type:`button`,className:E.utilityButton,disabled:_===0,onClick:()=>l(_-1),children:`Previous results`}),(0,D.jsx)(`button`,{type:`button`,className:E.utilityButton,disabled:_+1===h,onClick:()=>l(_+1),children:`Next results`})]}):null]}):null]}),(0,D.jsxs)(`div`,{className:E.workspace,children:[(0,D.jsx)(`div`,{ref:u,className:E.board,role:`region`,"aria-label":`Campaign dependency diagram`,tabIndex:0,children:(0,D.jsxs)(`div`,{className:E.canvas,style:{width:t.width,height:t.height},children:[(0,D.jsx)(`svg`,{width:t.width,height:t.height,className:E.edges,"aria-hidden":`true`,children:b.map(e=>{let n=t.positions.get(e.from),r=t.positions.get(e.to),i=n.x+192,a=r.x,o=(i+a)/2;return(0,D.jsx)(`path`,{className:f&&(e.from===f.campaignId||e.to===f.campaignId)?E.selectedEdge:E.edge,d:`M ${i} ${n.y+40} C ${o} ${n.y+40}, ${o} ${r.y+40}, ${a} ${r.y+40}`},`${e.from}-${e.to}`)})}),t.columns.map((e,t)=>(0,D.jsx)(`span`,{className:E.column,style:{left:24+t*244},children:e.label},e.label)),t.nodes.map((e,n)=>{let r=t.positions.get(e.campaignId),i=t.topology.get(e.campaignId);return(0,D.jsxs)(`div`,{children:[(0,D.jsxs)(`button`,{type:`button`,className:E.node,"data-state":e.state,style:{left:r.x,top:r.y},ref:t=>{t?d.current.set(e.campaignId,t):d.current.delete(e.campaignId)},"aria-label":`Inspect campaign ${e.campaignId}: ${j[e.state]}`,"aria-pressed":f?.campaignId===e.campaignId,"aria-controls":S,"aria-describedby":`${x}-relations-${n}`,onClick:()=>R(e.campaignId),children:[(0,D.jsx)(`span`,{className:E.nodeName,children:e.campaignId}),(0,D.jsx)(`span`,{className:E.nodeState,children:j[e.state]})]}),(0,D.jsx)(`span`,{id:`${x}-relations-${n}`,className:E.srOnly,children:i?`Direct dependencies: ${i.dependsOn.join(`, `)||`none declared`}. Additional inherited delivery prerequisites: ${i.prerequisites.filter(e=>!i.dependsOn.includes(e)).join(`, `)||`none recorded`}.`:`Dependency information unavailable.`})]},e.campaignId)})]})}),(0,D.jsx)(`section`,{id:S,className:E.detail,"aria-label":`Selected campaign detail`,children:f?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`span`,{className:E.detailState,"data-state":f.state,children:j[f.state]}),(0,D.jsx)(`h4`,{children:f.campaignId}),y?(0,D.jsx)(`p`,{className:E.selectionNote,children:`The selected campaign is outside the current filters. Its recorded detail remains available.`}):null,(0,D.jsx)(`p`,{children:M[f.state]}),(0,D.jsxs)(`dl`,{className:E.facts,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Recorded reason`}),(0,D.jsx)(`dd`,{children:f.reasonCode})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Campaign-call intent`}),(0,D.jsx)(`dd`,{children:f.attempted?`Recorded`:`Not recorded`})]})]}),(0,D.jsx)(`p`,{className:E.note,children:`A call intent is not proof of worker execution, model requests or successful evaluation.`}),(0,D.jsx)(`h5`,{children:`Direct dependencies`}),C?z(C.dependsOn,`None declared for this campaign.`):(0,D.jsx)(`p`,{className:E.note,children:`Dependency information unavailable.`}),(0,D.jsx)(`h5`,{children:`Additional inherited delivery prerequisites`}),C?z(P,`None recorded beyond the direct dependencies.`):(0,D.jsx)(`p`,{className:E.note,children:`Delivery prerequisite information unavailable.`}),(0,D.jsx)(`p`,{className:E.note,children:`Inherited prerequisites are ancestor delivery gates, not additional declared dependency edges. A state badge alone does not verify the delivery receipt.`})]}):(0,D.jsx)(`p`,{className:E.note,children:n?`Selected campaign ${n} is no longer present in this diagram. No substitute has been selected. Choose another campaign to inspect its evidence.`:`Select a campaign to inspect its recorded evidence.`})})]}),(0,D.jsx)(`p`,{className:E.legend,children:`Lines show declared dependencies, from earlier to later layers. Layer placement does not change declared priority or establish execution readiness.`}),t.edges.length>k?(0,D.jsxs)(`p`,{className:E.note,children:[`Showing `,k,` of `,t.edges.length,` visible dependency lines. Every campaign’s complete relationships remain available in its detail and accessible description.`]}):null]}):(0,D.jsx)(`p`,{className:E.empty,children:`No campaign outcomes are available in this observation. Inspect a registered controller with recorded campaigns to see its mission topology.`})]})}function F({data:e}){return(0,D.jsx)(P,{data:e},e.controllerId)}var I=e=>e==null?`Not recorded`:String(e),L=e=>[...new Set(e)].sort().join(`, `)||`None recorded`,R={pending:`Pending`,held:`Held`,completed:`Completed`,"in-flight":`Unresolved intent`};function z(e,t){let n={clockWarning:!1,changes:[],changedCampaigns:0};if(!e)return{...n,kind:`baseline`,notice:`First accepted observation. Refresh this controller explicitly to compare recorded evidence.`};if(e.controllerId!==t.controllerId||e.createdAt!==t.createdAt)return{...n,kind:`incomparable`,notice:`Controller identity or registration timestamp changed. Registration continuity is not established; these observations are not compared.`};let r=[],i=(e,t,n,i,a)=>{n!==i&&r.push({key:e,label:t,before:n,after:i,...a?{campaignId:a}:{}})},a=[];(e.sourceState!==`healthy`||t.sourceState!==`healthy`)&&a.push(`One or both observations contain missing or degraded evidence. Absence from an observation does not establish deletion, completion or execution.`),t.createdAt===null&&a.push(`The registration timestamp is not recorded. Registration continuity is not established.`),e.deadlineAt!==t.deadlineAt&&a.push(`The recorded deadline changed. This difference does not establish registration continuity or renew execution authority.`),i(`controller:status`,`Recorded controller status`,e.status,t.status),i(`controller:health`,`Evidence health`,e.sourceState,t.sourceState),i(`controller:deadline`,`Recorded deadline`,I(e.deadlineAt),I(t.deadlineAt)),i(`controller:reasons`,`Evidence reasons`,L(e.reasons),L(t.reasons));for(let[n,r]of[[`mode`,`Admission mode`],[`sequence`,`Admission sequence`],[`requestedAt`,`Admission requested at`],[`acknowledgedAt`,`Admission acknowledged at`]])i(`control:${n}`,r,I(e.control?.[n]),I(t.control?.[n]));let o=new Map(e.outcomes.map(e=>[e.campaignId,e])),s=new Map(t.outcomes.map(e=>[e.campaignId,e])),c=[...s.keys(),...[...o.keys()].filter(e=>!s.has(e))];for(let e of c){let t=o.get(e),n=s.get(e);if(!t||!n){i(`campaign:${e}:presence`,`Campaign presence`,t?`Present`:`Not observed`,n?`Present`:`Not observed`,e);continue}i(`campaign:${e}:state`,`Recorded state`,R[t.state],R[n.state],e),i(`campaign:${e}:reason`,`Recorded reason`,t.reasonCode,n.reasonCode,e),i(`campaign:${e}:attempted`,`Campaign-call intent`,t.attempted?`Recorded`:`Not recorded`,n.attempted?`Recorded`:`Not recorded`,e)}if(i(`controller:campaign-order`,`Recorded campaign order`,e.outcomes.map(e=>e.campaignId).join(`, `)||`None recorded`,t.outcomes.map(e=>e.campaignId).join(`, `)||`None recorded`),i(`controller:topology`,`Dependency evidence`,e.topology?`Available`:`Unavailable`,t.topology?`Available`:`Unavailable`),e.topology&&t.topology){let n=new Map(e.topology.map(e=>[e.campaignId,e]));for(let e of t.topology){let t=n.get(e.campaignId);t&&(i(`campaign:${e.campaignId}:dependencies`,`Direct dependencies`,L(t.dependsOn),L(e.dependsOn),e.campaignId),i(`campaign:${e.campaignId}:prerequisites`,`Effective prerequisites`,L(t.prerequisites),L(e.prerequisites),e.campaignId))}}return{kind:`compared`,notice:a.join(` `)||null,clockWarning:Date.parse(t.observedAt)<=Date.parse(e.observedAt),changes:r,changedCampaigns:new Set(r.flatMap(e=>e.campaignId?[e.campaignId]:[])).size}}var B={changes:`_changes_qcw1f_1`,header:`_header_qcw1f_2`,labels:`_labels_qcw1f_4`,historical:`_historical_qcw1f_6`,description:`_description_qcw1f_7`,note:`_note_qcw1f_7`,footnote:`_footnote_qcw1f_7`,times:`_times_qcw1f_9`,warning:`_warning_qcw1f_12`,baseline:`_baseline_qcw1f_13`,counts:`_counts_qcw1f_14`,disclosure:`_disclosure_qcw1f_18`,rows:`_rows_qcw1f_22`,row:`_row_qcw1f_22`,field:`_field_qcw1f_24`,values:`_values_qcw1f_27`};function V({previous:e,current:t,historical:n,loading:r}){let i=(0,g.useMemo)(()=>z(e,t),[e,t]);return(0,D.jsxs)(`section`,{className:B.changes,"aria-label":`Changes between observations`,children:[(0,D.jsxs)(`header`,{className:B.header,children:[(0,D.jsx)(`h3`,{children:`Changes between observations`}),(0,D.jsxs)(`div`,{className:B.labels,children:[r?(0,D.jsx)(`span`,{children:`Refresh in progress`}):null,n?(0,D.jsx)(`span`,{className:B.historical,children:`Historical observations`}):null]})]}),(0,D.jsx)(`p`,{className:B.description,children:`Compare the last two accepted responses in this session. This is not an event log or a live activity view.`}),(0,D.jsxs)(`dl`,{className:B.times,"aria-label":`Compared observation times`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Previous observation`}),(0,D.jsx)(`dd`,{children:e?(0,D.jsx)(`time`,{dateTime:e.observedAt,children:e.observedAt}):`Not yet observed`})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Displayed observation`}),(0,D.jsx)(`dd`,{children:(0,D.jsx)(`time`,{dateTime:t.observedAt,children:t.observedAt})})]})]}),r?(0,D.jsx)(`p`,{className:B.note,children:`The accepted observations below remain unchanged while the refresh is pending.`}):null,n?(0,D.jsx)(`p`,{className:B.warning,children:`The latest refresh failed. This comparison uses retained observations, not current evidence.`}):null,i.notice?(0,D.jsx)(`p`,{className:i.kind===`baseline`?B.note:B.warning,children:i.notice}):null,i.clockWarning?(0,D.jsx)(`p`,{className:B.warning,children:`Observation timestamps are equal or move backward. Before and after follow response order, not a verified event timeline.`}):null,i.kind===`baseline`?(0,D.jsx)(`p`,{className:B.baseline,children:`Refresh this controller to compare two observations.`}):i.kind===`incomparable`?(0,D.jsx)(`p`,{className:B.baseline,children:`These observations cannot be compared as one controller registration.`}):i.changes.length===0?(0,D.jsx)(`p`,{className:B.baseline,children:`No compared evidence fields changed. Observation times are excluded; this does not prove that no work occurred.`}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(`dl`,{className:B.counts,"aria-label":`Observation change counts`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Changed fields`}),(0,D.jsx)(`dd`,{children:i.changes.length})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Campaigns with displayed changes`}),(0,D.jsx)(`dd`,{children:i.changedCampaigns})]})]}),(0,D.jsxs)(`details`,{className:B.disclosure,children:[(0,D.jsxs)(`summary`,{children:[`Review `,i.changes.length,` changed field`,i.changes.length===1?``:`s`]}),(0,D.jsx)(`ul`,{className:B.rows,"aria-label":`Changed observation fields`,children:i.changes.map(e=>(0,D.jsxs)(`li`,{className:B.row,children:[(0,D.jsxs)(`div`,{className:B.field,children:[(0,D.jsx)(`h4`,{children:e.label}),e.campaignId?(0,D.jsx)(`span`,{children:e.campaignId}):null]}),(0,D.jsxs)(`dl`,{className:B.values,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Before`}),(0,D.jsx)(`dd`,{children:e.before})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`After`}),(0,D.jsx)(`dd`,{children:e.after})]})]})]},e.key))})]})]}),(0,D.jsx)(`p`,{className:B.footnote,children:`Differences describe returned evidence only. They do not establish worker execution, delivery verification or a production deployment.`})]})}var H={inspector:`_inspector_123iu_1`,header:`_header_123iu_2`,note:`_note_123iu_4`,empty:`_empty_123iu_4`,field:`_field_123iu_4`,control:`_control_123iu_4`,readOnly:`_readOnly_123iu_5`,form:`_form_123iu_6`,identity:`_identity_123iu_15`,warning:`_warning_123iu_18`,facts:`_facts_123iu_19`,sequence:`_sequence_123iu_24`,tableWrap:`_tableWrap_123iu_27`,reasons:`_reasons_123iu_32`};function U({value:e}){return e?(0,D.jsx)(`time`,{dateTime:e,children:e.replace(`T`,` `).replace(`Z`,` UTC`)}):(0,D.jsx)(D.Fragment,{children:`Not recorded`})}var W={"campaign-execution":`Campaign execution`,"campaign-verification":`Campaign verification`,"delivery-execution":`Local branch delivery`,"delivery-verification":`Delivery confirmation`,"settlement-publication":`Controller acknowledgement`};function G(){let[e,t]=(0,g.useState)(``),[n,r]=(0,g.useState)(null),[i,a]=(0,g.useState)({current:null,previous:null}),o=i.current,[s,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(null),[d,f]=(0,g.useState)(!1),p=(0,g.useRef)({sequence:0,abort:null});(0,g.useEffect)(()=>()=>{p.current.sequence+=1,p.current.abort?.abort()},[]);async function m(e){if(!v(e)){f(!0);return}f(!1),p.current.abort?.abort();let t=++p.current.sequence,n=new AbortController;p.current.abort=n,r(e),a(t=>t.current?.controllerId===e?t:{current:null,previous:null}),c(!0),u(null);try{let r=await C(e,n.signal);t===p.current.sequence&&a(t=>({current:r,previous:t.current?.controllerId===e?t.current:null}))}catch{t===p.current.sequence&&u(`Observation failed or returned invalid evidence. Check your connection and refresh this controller.`)}finally{t===p.current.sequence&&c(!1)}}return(0,D.jsxs)(`section`,{className:H.inspector,"aria-labelledby":`controller-inspector-title`,children:[(0,D.jsxs)(`header`,{className:H.header,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`h2`,{id:`controller-inspector-title`,children:`Controller inspector`}),(0,D.jsx)(`p`,{children:`Read the recorded progress of a named portfolio controller.`})]}),(0,D.jsx)(`span`,{className:H.readOnly,children:`Read-only`})]}),(0,D.jsxs)(`form`,{className:H.form,onSubmit:t=>{t.preventDefault(),m(e)},children:[(0,D.jsxs)(`div`,{className:H.field,children:[(0,D.jsx)(`label`,{htmlFor:`controller-id`,children:`Controller ID`}),(0,D.jsx)(`input`,{id:`controller-id`,value:e,onChange:e=>{t(e.target.value),f(!1)},maxLength:64,autoComplete:`off`,autoCapitalize:`none`,spellCheck:!1,"aria-invalid":d,"aria-describedby":`controller-id-help`}),(0,D.jsx)(`p`,{id:`controller-id-help`,children:`Use the ID from your controller manifest: lowercase letters, numbers, hyphens or underscores.`})]}),(0,D.jsx)(`button`,{type:`submit`,children:`Inspect controller`}),n?(0,D.jsx)(`button`,{type:`button`,disabled:s,onClick:()=>{m(n)},children:`Refresh controller`}):null]}),d?(0,D.jsx)(`p`,{role:`alert`,className:H.warning,children:`Enter 1–64 characters, starting with a lowercase letter or number.`}):null,n?(0,D.jsxs)(`div`,{"aria-busy":s,children:[(0,D.jsxs)(`h3`,{className:H.identity,children:[`Evidence for `,(0,D.jsx)(`code`,{children:n})]}),e===n?null:(0,D.jsxs)(`p`,{className:H.note,children:[`The form has changed. Evidence below still belongs to `,n,`; submit to inspect another ID.`]}),(0,D.jsx)(`p`,{role:`status`,className:H.note,children:s?`Reading ${n}…${o?` Previous observation remains below.`:``}`:l&&o?`Historical observation — refresh failed. This is not current evidence.`:o?`Recorded snapshot. Refresh explicitly to check for changes; this is not a live process view.`:`No verified observation is available.`}),l?(0,D.jsx)(`p`,{role:`alert`,className:H.warning,children:l}):null,o?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(`dl`,{className:H.facts,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Evidence health`}),(0,D.jsx)(`dd`,{children:o.sourceState})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Recorded status`}),(0,D.jsx)(`dd`,{children:o.status})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Observed at`}),(0,D.jsx)(`dd`,{children:(0,D.jsx)(U,{value:o.observedAt})})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Created at`}),(0,D.jsx)(`dd`,{children:(0,D.jsx)(U,{value:o.createdAt})})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Original deadline`}),(0,D.jsx)(`dd`,{children:(0,D.jsx)(U,{value:o.deadlineAt})})]})]}),(0,D.jsx)(V,{previous:i.previous,current:o,historical:!!l,loading:s}),o.sourceState===`missing`?(0,D.jsx)(`p`,{className:H.warning,children:`No controller registration was found in this store. Check the ID and selected Universe store.`}):null,o.sourceState===`degraded`?(0,D.jsx)(`p`,{className:H.warning,children:`Evidence could not be fully verified. This observation does not repair locks, reconcile work or prove a controller is running.`}):null,o.control?(0,D.jsxs)(`section`,{className:H.control,"aria-label":`Recorded admission control`,children:[(0,D.jsx)(`h4`,{children:o.control.mode===`open`?`Admission reopened`:o.control.acknowledgedAt?`Drain acknowledged`:`Drain awaiting acknowledgement`}),(0,D.jsxs)(`ol`,{className:H.sequence,children:[(0,D.jsxs)(`li`,{children:[(0,D.jsx)(`strong`,{children:o.control.mode===`open`?`Resume recorded`:`Drain recorded`}),(0,D.jsxs)(`span`,{children:[`Sequence `,o.control.sequence]}),(0,D.jsx)(U,{value:o.control.requestedAt})]}),(0,D.jsxs)(`li`,{children:[(0,D.jsx)(`strong`,{children:o.control.mode===`open`?`Resume did not start work`:o.control.acknowledgedAt?`Acknowledgement recorded`:`Acknowledgement not recorded`}),o.control.mode===`drain`?(0,D.jsx)(U,{value:o.control.acknowledgedAt}):(0,D.jsx)(`span`,{children:`Resume does not start work.`})]})]}),(0,D.jsx)(`p`,{children:o.control.mode===`drain`?`Drain blocks new dispatch intents; already-admitted work can continue. An unresolved intent prevents acknowledgement; absence of a visible worker proves neither completion nor failure.`:`Execution requires a separate run invocation. Admission state does not renew the original deadline or establish a running controller.`})]}):(0,D.jsx)(`p`,{className:H.note,children:`No admission-control record. This does not establish process liveness.`}),(0,D.jsx)(F,{data:o},o.controllerId),o.outcomes.length?(0,D.jsx)(`div`,{className:H.tableWrap,role:`region`,"aria-label":`Recorded campaign outcomes`,tabIndex:0,children:(0,D.jsxs)(`table`,{children:[(0,D.jsx)(`caption`,{children:`Recorded campaign outcomes`}),(0,D.jsx)(`thead`,{children:(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{scope:`col`,children:`Campaign`}),(0,D.jsx)(`th`,{scope:`col`,children:`State`}),(0,D.jsx)(`th`,{scope:`col`,children:`Campaign attempted`}),(0,D.jsx)(`th`,{scope:`col`,children:`Reason`})]})}),(0,D.jsx)(`tbody`,{children:o.outcomes.map(e=>(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{scope:`row`,children:e.campaignId}),(0,D.jsx)(`td`,{children:e.state}),(0,D.jsx)(`td`,{children:e.attempted?`Yes`:`No`}),(0,D.jsx)(`td`,{children:e.reasonCode})]},e.campaignId))})]})}):(0,D.jsx)(`p`,{className:H.note,children:`No campaign outcomes available in this observation.`}),(0,D.jsx)(`p`,{className:H.note,children:`“In-flight” means an unresolved durable intent, not proof of a live worker. Campaign attempted records a call intent, not proof of worker execution or successful evaluation. A dispatch-not-started outcome remains held and does not authorize a retry.`}),o.diagnostics?.length?(0,D.jsxs)(`section`,{"aria-label":`Recorded handoff diagnostics`,children:[(0,D.jsx)(`h4`,{children:`Recorded handoff diagnostics`}),(0,D.jsx)(`p`,{className:H.note,children:`These are historical failure records, not live errors. Check the campaign outcome above for its current recorded state. A diagnostic never authorizes retrying a worker or publishing a branch.`}),(0,D.jsx)(`div`,{className:H.tableWrap,role:`region`,"aria-label":`Handoff diagnostic details`,tabIndex:0,children:(0,D.jsxs)(`table`,{children:[(0,D.jsx)(`caption`,{children:`Where the handoff stopped`}),(0,D.jsx)(`thead`,{children:(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{scope:`col`,children:`Campaign`}),(0,D.jsx)(`th`,{scope:`col`,children:`Stage`}),(0,D.jsx)(`th`,{scope:`col`,children:`Failure code`}),(0,D.jsx)(`th`,{scope:`col`,children:`Recorded at`})]})}),(0,D.jsx)(`tbody`,{children:o.diagnostics.map(e=>(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{scope:`row`,children:e.campaignId}),(0,D.jsx)(`td`,{children:W[e.phase]}),(0,D.jsx)(`td`,{children:e.code}),(0,D.jsx)(`td`,{children:(0,D.jsx)(U,{value:e.at})})]},e.campaignId))})]})}),(0,D.jsx)(`p`,{className:H.note,children:`Inspect the pinned campaign and delivery receipts before recovery. Completed outcomes can retain an earlier diagnostic; raw error text and private intent digests are omitted here.`})]}):null,o.reasons.length?(0,D.jsxs)(`details`,{className:H.reasons,children:[(0,D.jsxs)(`summary`,{children:[`Evidence reasons (`,o.reasons.length,`)`]}),(0,D.jsx)(`ul`,{children:o.reasons.map((e,t)=>(0,D.jsx)(`li`,{children:e},`${e}-${t}`))})]}):null]}):null]}):(0,D.jsx)(`p`,{className:H.empty,children:`Enter an ID to inspect this store. Nothing is queried until you submit.`})]})}var K={shell:`_shell_8ebyv_1`,scopeBar:`_scopeBar_8ebyv_2`,scope:`_scope_8ebyv_2`,brand:`_brand_8ebyv_4`,brandMark:`_brandMark_8ebyv_6`,workspace:`_workspace_8ebyv_7`,badge:`_badge_8ebyv_8`,store:`_store_8ebyv_9`,root:`_root_8ebyv_12`,actions:`_actions_8ebyv_13`,notice:`_notice_8ebyv_14`,main:`_main_8ebyv_16`,explanation:`_explanation_8ebyv_17`,checking:`_checking_8ebyv_20`},q={key:`universe-console-scope`,async fetch(){let e=await o(`/api/universe/console`);if(e?.schemaVersion!==1||e.mode!==`universe`||e.readOnly!==!0||typeof e.root!=`string`||!/^(?:\/|[a-zA-Z]:[\\/]|\\\\)/.test(e.root)||[...e.root].some(e=>e.charCodeAt(0)<32||e.charCodeAt(0)>=127&&e.charCodeAt(0)<=159))throw Error(`The server did not establish an explicit read-only Universe scope.`);return e}};function J(){let e=d(q),t=p(q),n=f();return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(c,{}),(0,D.jsxs)(`div`,{className:K.shell,children:[(0,D.jsxs)(`header`,{className:K.scopeBar,children:[(0,D.jsxs)(`div`,{className:K.scope,children:[(0,D.jsxs)(`div`,{className:K.brand,children:[(0,D.jsx)(`svg`,{className:K.brandMark,viewBox:`0 0 32 32`,"aria-hidden":`true`,focusable:`false`,children:(0,D.jsx)(`path`,{d:`m5 11 11-6 11 6-11 6Z M5 16l11 6 11-6 M5 21l11 6 11-6`})}),(0,D.jsx)(`strong`,{children:`Ashlrverse`}),(0,D.jsx)(`span`,{className:K.workspace,children:`Experiments`})]}),(0,D.jsx)(`span`,{className:K.badge,children:`Read-only observation`}),e.data?(0,D.jsxs)(`details`,{className:K.store,children:[(0,D.jsx)(`summary`,{children:`Universe store`}),(0,D.jsx)(`code`,{"aria-label":`Universe store`,className:K.root,children:e.data.root})]}):null]}),(0,D.jsxs)(`div`,{className:K.actions,children:[(0,D.jsxs)(`button`,{type:`button`,onClick:n.cycle,children:[`Theme: `,n.theme]}),(0,D.jsx)(`button`,{type:`button`,onClick:()=>{a()},children:`Disconnect`})]})]}),(0,D.jsx)(`main`,{id:`main-content`,tabIndex:-1,className:K.main,children:e.status===`error`?(0,D.jsxs)(`section`,{role:`alert`,className:K.notice,children:[(0,D.jsx)(`h1`,{children:`Console scope unavailable`}),(0,D.jsxs)(`p`,{children:[e.error?.message,` No project data is shown until the scope can be checked.`]}),(0,D.jsx)(`button`,{type:`button`,onClick:t,children:`Retry scope check`})]}):e.data?(0,D.jsxs)(m.Provider,{value:e.data.root,children:[(0,D.jsx)(`p`,{className:K.explanation,children:`This console observes the selected Universe store. Run campaigns from your terminal; opening this page does not start work.`}),(0,D.jsx)(G,{},e.data.root),(0,D.jsx)(h,{})]}):(0,D.jsx)(`p`,{role:`status`,children:`Checking the selected Universe store…`})})]})]})}function Y(){let e=i();return(0,g.useEffect)(()=>{if(e!==`checking`)return;let t=!1;return s(q.key,q.fetch).then(()=>{t||r(l(q.key).status===`success`)}),()=>{t=!0}},[e]),e===`checking`?(0,D.jsx)(`p`,{className:K.checking,role:`status`,children:`Checking for an existing console session…`}):e===`unauthenticated`?(0,D.jsx)(u,{heading:`Connect to Ashlrverse`,command:`ashlr universe console --root /absolute/universe-store`}):(0,D.jsx)(J,{})}export{Y as UniverseConsoleApp};
|
|
2
|
-
//# sourceMappingURL=UniverseConsoleApp-
|
|
1
|
+
import{a as e,n as t,o as n}from"./index-DO9a5IaB.js";import{P as r,g as i,k as a,l as o,lt as s,n as c,ot as l,t as u,v as d,x as f,y as p}from"./global-F2K14nNo.js";import{n as m,t as h}from"./UniverseView-BGl3DRV7.js";var g=n(e(),1),_=Object.freeze({"campaign-execution":Object.freeze([`campaign-call-threw`]),"campaign-verification":Object.freeze([`campaign-evidence-changed`]),"delivery-execution":Object.freeze([`delivery-call-threw`]),"delivery-verification":Object.freeze([`delivery-evidence-changed`,`delivery-receipt-unverified`]),"settlement-publication":Object.freeze([`settlement-write-failed`])});function v(e){return typeof e==`string`&&/^[a-z0-9][a-z0-9_-]{0,63}$/.test(e)}function y(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function b(e){return typeof e==`string`&&/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z$/.test(e)&&Number.isFinite(Date.parse(e))&&new Date(e).toISOString()===(e.length===20?e.replace(`Z`,`.000Z`):e)}function x(e){return typeof e==`string`&&/^[a-z0-9][a-z0-9_:-]{0,191}$/.test(e)}function S(e,t){let n=()=>Error(`Controller evidence could not be validated.`);if(!v(t)||!y(e)||e.schemaVersion!==1||e.controllerId!==t||typeof e.sourceState!=`string`||![`healthy`,`missing`,`degraded`].includes(e.sourceState)||typeof e.status!=`string`||![`completed`,`incomplete`,`cancelled`,`timed-out`,`unavailable`,`draining`,`drained`].includes(e.status)||!(e.createdAt===null||b(e.createdAt))||!(e.deadlineAt===null||b(e.deadlineAt))||!b(e.observedAt)||!Array.isArray(e.reasons)||e.reasons.length>128||!e.reasons.every(x)||!Array.isArray(e.outcomes)||e.outcomes.length>64)throw n();let r=new Set,i=e.outcomes.map(e=>{if(!y(e)||typeof e.campaignId!=`string`||!v(e.campaignId)||r.has(e.campaignId)||typeof e.state!=`string`||![`pending`,`in-flight`,`completed`,`held`].includes(e.state)||typeof e.attempted!=`boolean`||!x(e.reasonCode))throw n();return r.add(e.campaignId),{campaignId:e.campaignId,state:e.state,attempted:e.attempted,reasonCode:e.reasonCode}}),a;if(e.topology!==void 0){if(!Array.isArray(e.topology)||e.topology.length>64||e.topology.length!==i.length)throw n();let t=new Set;a=e.topology.map(e=>{if(!y(e)||!v(e.campaignId)||!r.has(e.campaignId)||t.has(e.campaignId))throw n();t.add(e.campaignId);let i=t=>{if(!Array.isArray(t)||t.length>63||!t.every(t=>v(t)&&r.has(t)&&t!==e.campaignId)||new Set(t).size!==t.length)throw n();return[...t]},a=i(e.dependsOn),o=i(e.prerequisites);if(a.some(e=>!o.includes(e)))throw n();return{campaignId:e.campaignId,dependsOn:a,prerequisites:o}});let o=new Map(a.map(e=>[e.campaignId,e])),s=new Set;for(;s.size<a.length;){let e=a.find(e=>!s.has(e.campaignId)&&e.prerequisites.every(e=>s.has(e)));if(!e)throw n();s.add(e.campaignId)}for(let e of a){let t=new Set,r=[...e.dependsOn];for(;r.length;){let e=r.pop();t.has(e)||(t.add(e),r.push(...o.get(e).dependsOn))}if(e.prerequisites.some(e=>!t.has(e)))throw n()}}let o,s;if(e.diagnostics!==void 0){if(!Array.isArray(e.diagnostics)||e.diagnostics.length>i.length)throw n();let t=new Set;s=e.diagnostics.map(e=>{if(!y(e)||!v(e.campaignId)||!r.has(e.campaignId)||t.has(e.campaignId)||i.find(t=>t.campaignId===e.campaignId)?.state===`pending`||typeof e.phase!=`string`||!Object.hasOwn(_,e.phase)||typeof e.code!=`string`||!b(e.at))throw n();let a=e.phase;if(!_[a].includes(e.code))throw n();return t.add(e.campaignId),{campaignId:e.campaignId,phase:a,code:e.code,at:e.at}})}if(e.control!==void 0){let t=e.control;if(!y(t)||typeof t.mode!=`string`||![`open`,`drain`].includes(t.mode)||!Number.isInteger(t.sequence)||t.sequence<1||t.sequence>511||!b(t.requestedAt)||!(t.acknowledgedAt===null||b(t.acknowledgedAt)))throw n();o={mode:t.mode,sequence:t.sequence,requestedAt:t.requestedAt,acknowledgedAt:t.acknowledgedAt}}if(o?.mode===`open`&&o.acknowledgedAt!==null||e.status===`draining`&&(o?.mode!==`drain`||o.acknowledgedAt!==null)||e.status===`drained`&&(o?.mode!==`drain`||o.acknowledgedAt===null))throw n();return{schemaVersion:1,controllerId:t,sourceState:e.sourceState,status:e.status,createdAt:e.createdAt,deadlineAt:e.deadlineAt,observedAt:e.observedAt,reasons:[...e.reasons],outcomes:i,...a?{topology:a}:{},...o?{control:o}:{},...s?{diagnostics:s}:{}}}async function C(e,t){if(!v(e))throw Error(`Enter a valid controller ID.`);return S(await o(`/api/universe/controller-status?controllerId=${encodeURIComponent(e)}`,t),e)}function w(e,t,n){let r=t.trim().toLowerCase();return e.filter(e=>(n===`all`||e.state===n)&&(e.campaignId.toLowerCase().includes(r)||e.reasonCode.toLowerCase().includes(r)))}function T(e,t,n){let r=Number.isFinite(n)?Math.max(0,Math.floor(n)):0;if(t===null)return e.slice(0,r);let i=[],a=[];for(let n of e)(n.from===t||n.to===t?i:a).push(n);return[...i,...a].slice(0,r)}var E={topology:`_topology_1rqbo_1`,header:`_header_1rqbo_2`,snapshot:`_snapshot_1rqbo_5`,counts:`_counts_1rqbo_6`,finder:`_finder_1rqbo_10`,finderControls:`_finderControls_1rqbo_11`,searchLabel:`_searchLabel_1rqbo_13`,utilityButton:`_utilityButton_1rqbo_16`,finderMeta:`_finderMeta_1rqbo_19`,results:`_results_1rqbo_22`,result:`_result_1rqbo_22`,resultName:`_resultName_1rqbo_27`,resultState:`_resultState_1rqbo_28`,resultReason:`_resultReason_1rqbo_32`,pagination:`_pagination_1rqbo_33`,noResults:`_noResults_1rqbo_35`,selectionNote:`_selectionNote_1rqbo_36`,workspace:`_workspace_1rqbo_37`,board:`_board_1rqbo_38`,canvas:`_canvas_1rqbo_39`,edges:`_edges_1rqbo_40`,edge:`_edge_1rqbo_40`,selectedEdge:`_selectedEdge_1rqbo_41`,column:`_column_1rqbo_43`,node:`_node_1rqbo_44`,nodeName:`_nodeName_1rqbo_47`,nodeState:`_nodeState_1rqbo_48`,detail:`_detail_1rqbo_52`,detailState:`_detailState_1rqbo_55`,facts:`_facts_1rqbo_59`,relationships:`_relationships_1rqbo_63`,note:`_note_1rqbo_67`,legend:`_legend_1rqbo_67`,empty:`_empty_1rqbo_67`,notice:`_notice_1rqbo_69`,srOnly:`_srOnly_1rqbo_73`},D=t(),O=64,k=256,A=8,j={pending:`Pending`,"in-flight":`Unresolved intent`,completed:`Completed`,held:`Held`},M={pending:`No settled outcome is recorded. Pending does not mean ready to run.`,"in-flight":`A durable dispatch intent remains unresolved. This is not proof of a live worker.`,completed:`The controller recorded completion, including any required local delivery. This is not a production deployment claim.`,held:`Work remains held for the recorded reason. This view does not retry or release it.`};function N(e){let t=e.outcomes.slice(0,O),n=new Map(e.topology?.map(e=>[e.campaignId,e])),r=new Set(t.map(e=>e.campaignId)),i=new Map;if(e.topology)for(let e=0;e<t.length;e++)for(let e of t){let t=n.get(e.campaignId);i.has(e.campaignId)||!t||t.dependsOn.some(e=>!i.has(e))||i.set(e.campaignId,t.dependsOn.length?Math.max(...t.dependsOn.map(e=>i.get(e)))+1:0)}let a=[...new Set(i.values())].sort((e,t)=>e-t).map(e=>({label:`Dependency layer ${e+1}`,nodes:t.filter(t=>i.get(t.campaignId)===e)})),o=t.filter(e=>!i.has(e.campaignId));o.length&&a.push({label:e.topology?`Layer unavailable`:`Recorded campaigns`,nodes:o});let s=new Map;return a.forEach((e,t)=>e.nodes.forEach((e,n)=>s.set(e.campaignId,{x:24+t*244,y:56+n*108}))),{nodes:t,topology:n,columns:a,positions:s,edges:t.flatMap(e=>(n.get(e.campaignId)?.dependsOn??[]).filter(e=>r.has(e)).map(t=>({from:t,to:e.campaignId}))),width:Math.max(256,a.length*244+8),height:64+Math.max(1,...a.map(e=>e.nodes.length))*108}}function P({data:e}){let t=(0,g.useMemo)(()=>N(e),[e]),[n,r]=(0,g.useState)(t.nodes[0]?.campaignId??null),[i,a]=(0,g.useState)(``),[o,s]=(0,g.useState)(`all`),[c,l]=(0,g.useState)(0),u=(0,g.useRef)(null),d=(0,g.useRef)(new Map),f=t.nodes.find(e=>e.campaignId===n),p=(0,g.useMemo)(()=>w(t.nodes,i,o),[t.nodes,i,o]),m=i.trim().length>0||o!==`all`,h=Math.max(1,Math.ceil(p.length/A)),_=Math.min(c,h-1),v=p.slice(_*A,(_+1)*A),y=f&&m&&!p.some(e=>e.campaignId===f.campaignId),b=(0,g.useMemo)(()=>T(t.edges,f?.campaignId??null,k),[t.edges,f?.campaignId]),x=(0,g.useId)(),S=`${x}-detail`,C=f?t.topology.get(f.campaignId):void 0,P=C?.prerequisites.filter(e=>!C.dependsOn.includes(e))??[],F=new Map(e.outcomes.map(e=>[e.campaignId,e])),I=t=>e.outcomes.filter(e=>e.state===t).length;function L(e,n=!1){let r=u.current,i=t.positions.get(e);if(!r||!i)return;let a=Math.max(0,i.x+96-r.clientWidth/2),o=Math.max(0,i.y+40-r.clientHeight/2);typeof r.scrollTo==`function`?r.scrollTo({left:a,top:o,behavior:`auto`}):(r.scrollLeft=a,r.scrollTop=o),n&&d.current.get(e)?.focus({preventScroll:!0})}function R(e){r(e),L(e)}function z(e,n){return e.length?(0,D.jsx)(`ul`,{className:E.relationships,children:e.map(e=>(0,D.jsxs)(`li`,{children:[t.positions.has(e)?(0,D.jsx)(`button`,{type:`button`,onClick:()=>R(e),children:e}):(0,D.jsx)(`span`,{children:e}),(0,D.jsx)(`span`,{children:F.has(e)?j[F.get(e).state]:`Outcome unavailable`})]},e))}):(0,D.jsx)(`p`,{className:E.note,children:n})}return(0,D.jsxs)(`section`,{className:E.topology,"aria-label":`Controller mission topology`,children:[(0,D.jsxs)(`header`,{className:E.header,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`h3`,{children:`Mission topology`}),(0,D.jsx)(`p`,{children:`Follow the declared work graph. Select a campaign to inspect its recorded state and prerequisites.`})]}),(0,D.jsx)(`span`,{className:E.snapshot,children:`Recorded snapshot`})]}),(0,D.jsxs)(`dl`,{className:E.counts,"aria-label":`Recorded campaign counts`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Campaigns`}),(0,D.jsx)(`dd`,{children:e.outcomes.length})]}),[`completed`,`in-flight`,`held`,`pending`].map(e=>(0,D.jsxs)(`div`,{"data-state":e,children:[(0,D.jsx)(`dt`,{children:j[e]}),(0,D.jsx)(`dd`,{children:I(e)})]},e))]}),e.topology?null:(0,D.jsx)(`p`,{className:E.notice,children:`Dependency information is unavailable in this observation. Campaign placement does not imply independence or readiness.`}),e.outcomes.length>O?(0,D.jsxs)(`p`,{className:E.notice,children:[`Showing the first `,O,` of `,e.outcomes.length,` campaigns. Counts include all recorded outcomes; relationships outside this diagram remain in the selected campaign detail.`]}):null,t.nodes.length?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(`section`,{className:E.finder,"aria-label":`Campaign navigator`,children:[(0,D.jsxs)(`div`,{className:E.finderControls,children:[(0,D.jsxs)(`label`,{className:E.searchLabel,htmlFor:`${x}-search`,children:[`Search campaigns`,(0,D.jsx)(`input`,{id:`${x}-search`,type:`search`,value:i,maxLength:192,placeholder:`Campaign ID or recorded reason`,"aria-describedby":`${x}-finder-hint`,onChange:e=>{a(e.target.value),l(0)}})]}),(0,D.jsxs)(`label`,{htmlFor:`${x}-state`,children:[`Recorded state`,(0,D.jsxs)(`select`,{id:`${x}-state`,value:o,onChange:e=>{s(e.target.value),l(0)},children:[(0,D.jsx)(`option`,{value:`all`,children:`All recorded states`}),[`pending`,`in-flight`,`completed`,`held`].map(e=>(0,D.jsx)(`option`,{value:e,children:j[e]},e))]})]}),(0,D.jsx)(`button`,{type:`button`,className:E.utilityButton,disabled:!f,onClick:()=>{f&&L(f.campaignId,!0)},children:`Locate selected`}),m?(0,D.jsx)(`button`,{type:`button`,className:E.utilityButton,onClick:()=>{a(``),s(`all`),l(0)},children:`Reset filters`}):null]}),(0,D.jsxs)(`div`,{className:E.finderMeta,children:[(0,D.jsxs)(`p`,{id:`${x}-finder-hint`,children:[`Search covers the `,t.nodes.length,` diagram campaigns. Filters narrow this index, not the graph or its dependency layers.`]}),(0,D.jsx)(`span`,{"aria-live":`polite`,"aria-atomic":`true`,children:m?`${p.length} matching campaign${p.length===1?``:`s`}`:`${t.nodes.length} campaigns in diagram`})]}),m?(0,D.jsxs)(D.Fragment,{children:[p.length?(0,D.jsx)(`ul`,{className:E.results,"aria-label":`Matching campaigns`,children:v.map(e=>(0,D.jsx)(`li`,{children:(0,D.jsxs)(`button`,{type:`button`,className:E.result,"aria-label":`Select campaign ${e.campaignId}`,"aria-describedby":`${x}-result-state-${e.campaignId} ${x}-result-reason-${e.campaignId}`,"aria-pressed":f?.campaignId===e.campaignId,"aria-controls":S,onClick:()=>R(e.campaignId),children:[(0,D.jsx)(`span`,{className:E.resultName,children:e.campaignId}),(0,D.jsx)(`span`,{id:`${x}-result-state-${e.campaignId}`,className:E.resultState,"data-state":e.state,children:j[e.state]}),(0,D.jsx)(`span`,{id:`${x}-result-reason-${e.campaignId}`,className:E.resultReason,children:e.reasonCode})]})},e.campaignId))}):(0,D.jsx)(`p`,{className:E.noResults,children:`No diagram campaigns match. Try another campaign ID or recorded reason, or reset filters.`}),h>1?(0,D.jsxs)(`nav`,{className:E.pagination,"aria-label":`Campaign result pages`,children:[(0,D.jsxs)(`span`,{children:[`Page `,_+1,` of `,h]}),(0,D.jsx)(`button`,{type:`button`,className:E.utilityButton,disabled:_===0,onClick:()=>l(_-1),children:`Previous results`}),(0,D.jsx)(`button`,{type:`button`,className:E.utilityButton,disabled:_+1===h,onClick:()=>l(_+1),children:`Next results`})]}):null]}):null]}),(0,D.jsxs)(`div`,{className:E.workspace,children:[(0,D.jsx)(`div`,{ref:u,className:E.board,role:`region`,"aria-label":`Campaign dependency diagram`,tabIndex:0,children:(0,D.jsxs)(`div`,{className:E.canvas,style:{width:t.width,height:t.height},children:[(0,D.jsx)(`svg`,{width:t.width,height:t.height,className:E.edges,"aria-hidden":`true`,children:b.map(e=>{let n=t.positions.get(e.from),r=t.positions.get(e.to),i=n.x+192,a=r.x,o=(i+a)/2;return(0,D.jsx)(`path`,{className:f&&(e.from===f.campaignId||e.to===f.campaignId)?E.selectedEdge:E.edge,d:`M ${i} ${n.y+40} C ${o} ${n.y+40}, ${o} ${r.y+40}, ${a} ${r.y+40}`},`${e.from}-${e.to}`)})}),t.columns.map((e,t)=>(0,D.jsx)(`span`,{className:E.column,style:{left:24+t*244},children:e.label},e.label)),t.nodes.map((e,n)=>{let r=t.positions.get(e.campaignId),i=t.topology.get(e.campaignId);return(0,D.jsxs)(`div`,{children:[(0,D.jsxs)(`button`,{type:`button`,className:E.node,"data-state":e.state,style:{left:r.x,top:r.y},ref:t=>{t?d.current.set(e.campaignId,t):d.current.delete(e.campaignId)},"aria-label":`Inspect campaign ${e.campaignId}: ${j[e.state]}`,"aria-pressed":f?.campaignId===e.campaignId,"aria-controls":S,"aria-describedby":`${x}-relations-${n}`,onClick:()=>R(e.campaignId),children:[(0,D.jsx)(`span`,{className:E.nodeName,children:e.campaignId}),(0,D.jsx)(`span`,{className:E.nodeState,children:j[e.state]})]}),(0,D.jsx)(`span`,{id:`${x}-relations-${n}`,className:E.srOnly,children:i?`Direct dependencies: ${i.dependsOn.join(`, `)||`none declared`}. Additional inherited delivery prerequisites: ${i.prerequisites.filter(e=>!i.dependsOn.includes(e)).join(`, `)||`none recorded`}.`:`Dependency information unavailable.`})]},e.campaignId)})]})}),(0,D.jsx)(`section`,{id:S,className:E.detail,"aria-label":`Selected campaign detail`,children:f?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`span`,{className:E.detailState,"data-state":f.state,children:j[f.state]}),(0,D.jsx)(`h4`,{children:f.campaignId}),y?(0,D.jsx)(`p`,{className:E.selectionNote,children:`The selected campaign is outside the current filters. Its recorded detail remains available.`}):null,(0,D.jsx)(`p`,{children:M[f.state]}),(0,D.jsxs)(`dl`,{className:E.facts,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Recorded reason`}),(0,D.jsx)(`dd`,{children:f.reasonCode})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Campaign-call intent`}),(0,D.jsx)(`dd`,{children:f.attempted?`Recorded`:`Not recorded`})]})]}),(0,D.jsx)(`p`,{className:E.note,children:`A call intent is not proof of worker execution, model requests or successful evaluation.`}),(0,D.jsx)(`h5`,{children:`Direct dependencies`}),C?z(C.dependsOn,`None declared for this campaign.`):(0,D.jsx)(`p`,{className:E.note,children:`Dependency information unavailable.`}),(0,D.jsx)(`h5`,{children:`Additional inherited delivery prerequisites`}),C?z(P,`None recorded beyond the direct dependencies.`):(0,D.jsx)(`p`,{className:E.note,children:`Delivery prerequisite information unavailable.`}),(0,D.jsx)(`p`,{className:E.note,children:`Inherited prerequisites are ancestor delivery gates, not additional declared dependency edges. A state badge alone does not verify the delivery receipt.`})]}):(0,D.jsx)(`p`,{className:E.note,children:n?`Selected campaign ${n} is no longer present in this diagram. No substitute has been selected. Choose another campaign to inspect its evidence.`:`Select a campaign to inspect its recorded evidence.`})})]}),(0,D.jsx)(`p`,{className:E.legend,children:`Lines show declared dependencies, from earlier to later layers. Layer placement does not change declared priority or establish execution readiness.`}),t.edges.length>k?(0,D.jsxs)(`p`,{className:E.note,children:[`Showing `,k,` of `,t.edges.length,` visible dependency lines. Every campaign’s complete relationships remain available in its detail and accessible description.`]}):null]}):(0,D.jsx)(`p`,{className:E.empty,children:`No campaign outcomes are available in this observation. Inspect a registered controller with recorded campaigns to see its mission topology.`})]})}function F({data:e}){return(0,D.jsx)(P,{data:e},e.controllerId)}var I=e=>e==null?`Not recorded`:String(e),L=e=>[...new Set(e)].sort().join(`, `)||`None recorded`,R={pending:`Pending`,held:`Held`,completed:`Completed`,"in-flight":`Unresolved intent`};function z(e,t){let n={clockWarning:!1,changes:[],changedCampaigns:0};if(!e)return{...n,kind:`baseline`,notice:`First accepted observation. Refresh this controller explicitly to compare recorded evidence.`};if(e.controllerId!==t.controllerId||e.createdAt!==t.createdAt)return{...n,kind:`incomparable`,notice:`Controller identity or registration timestamp changed. Registration continuity is not established; these observations are not compared.`};let r=[],i=(e,t,n,i,a)=>{n!==i&&r.push({key:e,label:t,before:n,after:i,...a?{campaignId:a}:{}})},a=[];(e.sourceState!==`healthy`||t.sourceState!==`healthy`)&&a.push(`One or both observations contain missing or degraded evidence. Absence from an observation does not establish deletion, completion or execution.`),t.createdAt===null&&a.push(`The registration timestamp is not recorded. Registration continuity is not established.`),e.deadlineAt!==t.deadlineAt&&a.push(`The recorded deadline changed. This difference does not establish registration continuity or renew execution authority.`),i(`controller:status`,`Recorded controller status`,e.status,t.status),i(`controller:health`,`Evidence health`,e.sourceState,t.sourceState),i(`controller:deadline`,`Recorded deadline`,I(e.deadlineAt),I(t.deadlineAt)),i(`controller:reasons`,`Evidence reasons`,L(e.reasons),L(t.reasons));for(let[n,r]of[[`mode`,`Admission mode`],[`sequence`,`Admission sequence`],[`requestedAt`,`Admission requested at`],[`acknowledgedAt`,`Admission acknowledged at`]])i(`control:${n}`,r,I(e.control?.[n]),I(t.control?.[n]));let o=new Map(e.outcomes.map(e=>[e.campaignId,e])),s=new Map(t.outcomes.map(e=>[e.campaignId,e])),c=[...s.keys(),...[...o.keys()].filter(e=>!s.has(e))];for(let e of c){let t=o.get(e),n=s.get(e);if(!t||!n){i(`campaign:${e}:presence`,`Campaign presence`,t?`Present`:`Not observed`,n?`Present`:`Not observed`,e);continue}i(`campaign:${e}:state`,`Recorded state`,R[t.state],R[n.state],e),i(`campaign:${e}:reason`,`Recorded reason`,t.reasonCode,n.reasonCode,e),i(`campaign:${e}:attempted`,`Campaign-call intent`,t.attempted?`Recorded`:`Not recorded`,n.attempted?`Recorded`:`Not recorded`,e)}if(i(`controller:campaign-order`,`Recorded campaign order`,e.outcomes.map(e=>e.campaignId).join(`, `)||`None recorded`,t.outcomes.map(e=>e.campaignId).join(`, `)||`None recorded`),i(`controller:topology`,`Dependency evidence`,e.topology?`Available`:`Unavailable`,t.topology?`Available`:`Unavailable`),e.topology&&t.topology){let n=new Map(e.topology.map(e=>[e.campaignId,e]));for(let e of t.topology){let t=n.get(e.campaignId);t&&(i(`campaign:${e.campaignId}:dependencies`,`Direct dependencies`,L(t.dependsOn),L(e.dependsOn),e.campaignId),i(`campaign:${e.campaignId}:prerequisites`,`Effective prerequisites`,L(t.prerequisites),L(e.prerequisites),e.campaignId))}}return{kind:`compared`,notice:a.join(` `)||null,clockWarning:Date.parse(t.observedAt)<=Date.parse(e.observedAt),changes:r,changedCampaigns:new Set(r.flatMap(e=>e.campaignId?[e.campaignId]:[])).size}}var B={changes:`_changes_qcw1f_1`,header:`_header_qcw1f_2`,labels:`_labels_qcw1f_4`,historical:`_historical_qcw1f_6`,description:`_description_qcw1f_7`,note:`_note_qcw1f_7`,footnote:`_footnote_qcw1f_7`,times:`_times_qcw1f_9`,warning:`_warning_qcw1f_12`,baseline:`_baseline_qcw1f_13`,counts:`_counts_qcw1f_14`,disclosure:`_disclosure_qcw1f_18`,rows:`_rows_qcw1f_22`,row:`_row_qcw1f_22`,field:`_field_qcw1f_24`,values:`_values_qcw1f_27`};function V({previous:e,current:t,historical:n,loading:r}){let i=(0,g.useMemo)(()=>z(e,t),[e,t]);return(0,D.jsxs)(`section`,{className:B.changes,"aria-label":`Changes between observations`,children:[(0,D.jsxs)(`header`,{className:B.header,children:[(0,D.jsx)(`h3`,{children:`Changes between observations`}),(0,D.jsxs)(`div`,{className:B.labels,children:[r?(0,D.jsx)(`span`,{children:`Refresh in progress`}):null,n?(0,D.jsx)(`span`,{className:B.historical,children:`Historical observations`}):null]})]}),(0,D.jsx)(`p`,{className:B.description,children:`Compare the last two accepted responses in this session. This is not an event log or a live activity view.`}),(0,D.jsxs)(`dl`,{className:B.times,"aria-label":`Compared observation times`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Previous observation`}),(0,D.jsx)(`dd`,{children:e?(0,D.jsx)(`time`,{dateTime:e.observedAt,children:e.observedAt}):`Not yet observed`})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Displayed observation`}),(0,D.jsx)(`dd`,{children:(0,D.jsx)(`time`,{dateTime:t.observedAt,children:t.observedAt})})]})]}),r?(0,D.jsx)(`p`,{className:B.note,children:`The accepted observations below remain unchanged while the refresh is pending.`}):null,n?(0,D.jsx)(`p`,{className:B.warning,children:`The latest refresh failed. This comparison uses retained observations, not current evidence.`}):null,i.notice?(0,D.jsx)(`p`,{className:i.kind===`baseline`?B.note:B.warning,children:i.notice}):null,i.clockWarning?(0,D.jsx)(`p`,{className:B.warning,children:`Observation timestamps are equal or move backward. Before and after follow response order, not a verified event timeline.`}):null,i.kind===`baseline`?(0,D.jsx)(`p`,{className:B.baseline,children:`Refresh this controller to compare two observations.`}):i.kind===`incomparable`?(0,D.jsx)(`p`,{className:B.baseline,children:`These observations cannot be compared as one controller registration.`}):i.changes.length===0?(0,D.jsx)(`p`,{className:B.baseline,children:`No compared evidence fields changed. Observation times are excluded; this does not prove that no work occurred.`}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(`dl`,{className:B.counts,"aria-label":`Observation change counts`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Changed fields`}),(0,D.jsx)(`dd`,{children:i.changes.length})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Campaigns with displayed changes`}),(0,D.jsx)(`dd`,{children:i.changedCampaigns})]})]}),(0,D.jsxs)(`details`,{className:B.disclosure,children:[(0,D.jsxs)(`summary`,{children:[`Review `,i.changes.length,` changed field`,i.changes.length===1?``:`s`]}),(0,D.jsx)(`ul`,{className:B.rows,"aria-label":`Changed observation fields`,children:i.changes.map(e=>(0,D.jsxs)(`li`,{className:B.row,children:[(0,D.jsxs)(`div`,{className:B.field,children:[(0,D.jsx)(`h4`,{children:e.label}),e.campaignId?(0,D.jsx)(`span`,{children:e.campaignId}):null]}),(0,D.jsxs)(`dl`,{className:B.values,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Before`}),(0,D.jsx)(`dd`,{children:e.before})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`After`}),(0,D.jsx)(`dd`,{children:e.after})]})]})]},e.key))})]})]}),(0,D.jsx)(`p`,{className:B.footnote,children:`Differences describe returned evidence only. They do not establish worker execution, delivery verification or a production deployment.`})]})}var H={inspector:`_inspector_123iu_1`,header:`_header_123iu_2`,note:`_note_123iu_4`,empty:`_empty_123iu_4`,field:`_field_123iu_4`,control:`_control_123iu_4`,readOnly:`_readOnly_123iu_5`,form:`_form_123iu_6`,identity:`_identity_123iu_15`,warning:`_warning_123iu_18`,facts:`_facts_123iu_19`,sequence:`_sequence_123iu_24`,tableWrap:`_tableWrap_123iu_27`,reasons:`_reasons_123iu_32`};function U({value:e}){return e?(0,D.jsx)(`time`,{dateTime:e,children:e.replace(`T`,` `).replace(`Z`,` UTC`)}):(0,D.jsx)(D.Fragment,{children:`Not recorded`})}var W={"campaign-execution":`Campaign execution`,"campaign-verification":`Campaign verification`,"delivery-execution":`Local branch delivery`,"delivery-verification":`Delivery confirmation`,"settlement-publication":`Controller acknowledgement`};function G(){let[e,t]=(0,g.useState)(``),[n,r]=(0,g.useState)(null),[i,a]=(0,g.useState)({current:null,previous:null}),o=i.current,[s,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(null),[d,f]=(0,g.useState)(!1),p=(0,g.useRef)({sequence:0,abort:null});(0,g.useEffect)(()=>()=>{p.current.sequence+=1,p.current.abort?.abort()},[]);async function m(e){if(!v(e)){f(!0);return}f(!1),p.current.abort?.abort();let t=++p.current.sequence,n=new AbortController;p.current.abort=n,r(e),a(t=>t.current?.controllerId===e?t:{current:null,previous:null}),c(!0),u(null);try{let r=await C(e,n.signal);t===p.current.sequence&&a(t=>({current:r,previous:t.current?.controllerId===e?t.current:null}))}catch{t===p.current.sequence&&u(`Observation failed or returned invalid evidence. Check your connection and refresh this controller.`)}finally{t===p.current.sequence&&c(!1)}}return(0,D.jsxs)(`section`,{className:H.inspector,"aria-labelledby":`controller-inspector-title`,children:[(0,D.jsxs)(`header`,{className:H.header,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`h2`,{id:`controller-inspector-title`,children:`Controller inspector`}),(0,D.jsx)(`p`,{children:`Read the recorded progress of a named portfolio controller.`})]}),(0,D.jsx)(`span`,{className:H.readOnly,children:`Read-only`})]}),(0,D.jsxs)(`form`,{className:H.form,onSubmit:t=>{t.preventDefault(),m(e)},children:[(0,D.jsxs)(`div`,{className:H.field,children:[(0,D.jsx)(`label`,{htmlFor:`controller-id`,children:`Controller ID`}),(0,D.jsx)(`input`,{id:`controller-id`,value:e,onChange:e=>{t(e.target.value),f(!1)},maxLength:64,autoComplete:`off`,autoCapitalize:`none`,spellCheck:!1,"aria-invalid":d,"aria-describedby":`controller-id-help`}),(0,D.jsx)(`p`,{id:`controller-id-help`,children:`Use the ID from your controller manifest: lowercase letters, numbers, hyphens or underscores.`})]}),(0,D.jsx)(`button`,{type:`submit`,children:`Inspect controller`}),n?(0,D.jsx)(`button`,{type:`button`,disabled:s,onClick:()=>{m(n)},children:`Refresh controller`}):null]}),d?(0,D.jsx)(`p`,{role:`alert`,className:H.warning,children:`Enter 1–64 characters, starting with a lowercase letter or number.`}):null,n?(0,D.jsxs)(`div`,{"aria-busy":s,children:[(0,D.jsxs)(`h3`,{className:H.identity,children:[`Evidence for `,(0,D.jsx)(`code`,{children:n})]}),e===n?null:(0,D.jsxs)(`p`,{className:H.note,children:[`The form has changed. Evidence below still belongs to `,n,`; submit to inspect another ID.`]}),(0,D.jsx)(`p`,{role:`status`,className:H.note,children:s?`Reading ${n}…${o?` Previous observation remains below.`:``}`:l&&o?`Historical observation — refresh failed. This is not current evidence.`:o?`Recorded snapshot. Refresh explicitly to check for changes; this is not a live process view.`:`No verified observation is available.`}),l?(0,D.jsx)(`p`,{role:`alert`,className:H.warning,children:l}):null,o?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(`dl`,{className:H.facts,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Evidence health`}),(0,D.jsx)(`dd`,{children:o.sourceState})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Recorded status`}),(0,D.jsx)(`dd`,{children:o.status})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Observed at`}),(0,D.jsx)(`dd`,{children:(0,D.jsx)(U,{value:o.observedAt})})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Created at`}),(0,D.jsx)(`dd`,{children:(0,D.jsx)(U,{value:o.createdAt})})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:`Original deadline`}),(0,D.jsx)(`dd`,{children:(0,D.jsx)(U,{value:o.deadlineAt})})]})]}),(0,D.jsx)(V,{previous:i.previous,current:o,historical:!!l,loading:s}),o.sourceState===`missing`?(0,D.jsx)(`p`,{className:H.warning,children:`No controller registration was found in this store. Check the ID and selected Universe store.`}):null,o.sourceState===`degraded`?(0,D.jsx)(`p`,{className:H.warning,children:`Evidence could not be fully verified. This observation does not repair locks, reconcile work or prove a controller is running.`}):null,o.control?(0,D.jsxs)(`section`,{className:H.control,"aria-label":`Recorded admission control`,children:[(0,D.jsx)(`h4`,{children:o.control.mode===`open`?`Admission reopened`:o.control.acknowledgedAt?`Drain acknowledged`:`Drain awaiting acknowledgement`}),(0,D.jsxs)(`ol`,{className:H.sequence,children:[(0,D.jsxs)(`li`,{children:[(0,D.jsx)(`strong`,{children:o.control.mode===`open`?`Resume recorded`:`Drain recorded`}),(0,D.jsxs)(`span`,{children:[`Sequence `,o.control.sequence]}),(0,D.jsx)(U,{value:o.control.requestedAt})]}),(0,D.jsxs)(`li`,{children:[(0,D.jsx)(`strong`,{children:o.control.mode===`open`?`Resume did not start work`:o.control.acknowledgedAt?`Acknowledgement recorded`:`Acknowledgement not recorded`}),o.control.mode===`drain`?(0,D.jsx)(U,{value:o.control.acknowledgedAt}):(0,D.jsx)(`span`,{children:`Resume does not start work.`})]})]}),(0,D.jsx)(`p`,{children:o.control.mode===`drain`?`Drain blocks new dispatch intents; already-admitted work can continue. An unresolved intent prevents acknowledgement; absence of a visible worker proves neither completion nor failure.`:`Execution requires a separate run invocation. Admission state does not renew the original deadline or establish a running controller.`})]}):(0,D.jsx)(`p`,{className:H.note,children:`No admission-control record. This does not establish process liveness.`}),(0,D.jsx)(F,{data:o},o.controllerId),o.outcomes.length?(0,D.jsx)(`div`,{className:H.tableWrap,role:`region`,"aria-label":`Recorded campaign outcomes`,tabIndex:0,children:(0,D.jsxs)(`table`,{children:[(0,D.jsx)(`caption`,{children:`Recorded campaign outcomes`}),(0,D.jsx)(`thead`,{children:(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{scope:`col`,children:`Campaign`}),(0,D.jsx)(`th`,{scope:`col`,children:`State`}),(0,D.jsx)(`th`,{scope:`col`,children:`Campaign attempted`}),(0,D.jsx)(`th`,{scope:`col`,children:`Reason`})]})}),(0,D.jsx)(`tbody`,{children:o.outcomes.map(e=>(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{scope:`row`,children:e.campaignId}),(0,D.jsx)(`td`,{children:e.state}),(0,D.jsx)(`td`,{children:e.attempted?`Yes`:`No`}),(0,D.jsx)(`td`,{children:e.reasonCode})]},e.campaignId))})]})}):(0,D.jsx)(`p`,{className:H.note,children:`No campaign outcomes available in this observation.`}),(0,D.jsx)(`p`,{className:H.note,children:`“In-flight” means an unresolved durable intent, not proof of a live worker. Campaign attempted records a call intent, not proof of worker execution or successful evaluation. A dispatch-not-started outcome remains held and does not authorize a retry.`}),o.diagnostics?.length?(0,D.jsxs)(`section`,{"aria-label":`Recorded handoff diagnostics`,children:[(0,D.jsx)(`h4`,{children:`Recorded handoff diagnostics`}),(0,D.jsx)(`p`,{className:H.note,children:`These are historical failure records, not live errors. Check the campaign outcome above for its current recorded state. A diagnostic never authorizes retrying a worker or publishing a branch.`}),(0,D.jsx)(`div`,{className:H.tableWrap,role:`region`,"aria-label":`Handoff diagnostic details`,tabIndex:0,children:(0,D.jsxs)(`table`,{children:[(0,D.jsx)(`caption`,{children:`Where the handoff stopped`}),(0,D.jsx)(`thead`,{children:(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{scope:`col`,children:`Campaign`}),(0,D.jsx)(`th`,{scope:`col`,children:`Stage`}),(0,D.jsx)(`th`,{scope:`col`,children:`Failure code`}),(0,D.jsx)(`th`,{scope:`col`,children:`Recorded at`})]})}),(0,D.jsx)(`tbody`,{children:o.diagnostics.map(e=>(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{scope:`row`,children:e.campaignId}),(0,D.jsx)(`td`,{children:W[e.phase]}),(0,D.jsx)(`td`,{children:e.code}),(0,D.jsx)(`td`,{children:(0,D.jsx)(U,{value:e.at})})]},e.campaignId))})]})}),(0,D.jsx)(`p`,{className:H.note,children:`Inspect the pinned campaign and delivery receipts before recovery. Completed outcomes can retain an earlier diagnostic; raw error text and private intent digests are omitted here.`})]}):null,o.reasons.length?(0,D.jsxs)(`details`,{className:H.reasons,children:[(0,D.jsxs)(`summary`,{children:[`Evidence reasons (`,o.reasons.length,`)`]}),(0,D.jsx)(`ul`,{children:o.reasons.map((e,t)=>(0,D.jsx)(`li`,{children:e},`${e}-${t}`))})]}):null]}):null]}):(0,D.jsx)(`p`,{className:H.empty,children:`Enter an ID to inspect this store. Nothing is queried until you submit.`})]})}var K={shell:`_shell_8ebyv_1`,scopeBar:`_scopeBar_8ebyv_2`,scope:`_scope_8ebyv_2`,brand:`_brand_8ebyv_4`,brandMark:`_brandMark_8ebyv_6`,workspace:`_workspace_8ebyv_7`,badge:`_badge_8ebyv_8`,store:`_store_8ebyv_9`,root:`_root_8ebyv_12`,actions:`_actions_8ebyv_13`,notice:`_notice_8ebyv_14`,main:`_main_8ebyv_16`,explanation:`_explanation_8ebyv_17`,checking:`_checking_8ebyv_20`},q={key:`universe-console-scope`,async fetch(){let e=await o(`/api/universe/console`);if(e?.schemaVersion!==1||e.mode!==`universe`||e.readOnly!==!0||typeof e.root!=`string`||!/^(?:\/|[a-zA-Z]:[\\/]|\\\\)/.test(e.root)||[...e.root].some(e=>e.charCodeAt(0)<32||e.charCodeAt(0)>=127&&e.charCodeAt(0)<=159))throw Error(`The server did not establish an explicit read-only Universe scope.`);return e}};function J(){let e=d(q),t=p(q),n=f();return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(c,{}),(0,D.jsxs)(`div`,{className:K.shell,children:[(0,D.jsxs)(`header`,{className:K.scopeBar,children:[(0,D.jsxs)(`div`,{className:K.scope,children:[(0,D.jsxs)(`div`,{className:K.brand,children:[(0,D.jsx)(`svg`,{className:K.brandMark,viewBox:`0 0 32 32`,"aria-hidden":`true`,focusable:`false`,children:(0,D.jsx)(`path`,{d:`m5 11 11-6 11 6-11 6Z M5 16l11 6 11-6 M5 21l11 6 11-6`})}),(0,D.jsx)(`strong`,{children:`Ashlrverse`}),(0,D.jsx)(`span`,{className:K.workspace,children:`Experiments`})]}),(0,D.jsx)(`span`,{className:K.badge,children:`Read-only observation`}),e.data?(0,D.jsxs)(`details`,{className:K.store,children:[(0,D.jsx)(`summary`,{children:`Universe store`}),(0,D.jsx)(`code`,{"aria-label":`Universe store`,className:K.root,children:e.data.root})]}):null]}),(0,D.jsxs)(`div`,{className:K.actions,children:[(0,D.jsxs)(`button`,{type:`button`,onClick:n.cycle,children:[`Theme: `,n.theme]}),(0,D.jsx)(`button`,{type:`button`,onClick:()=>{a()},children:`Disconnect`})]})]}),(0,D.jsx)(`main`,{id:`main-content`,tabIndex:-1,className:K.main,children:e.status===`error`?(0,D.jsxs)(`section`,{role:`alert`,className:K.notice,children:[(0,D.jsx)(`h1`,{children:`Console scope unavailable`}),(0,D.jsxs)(`p`,{children:[e.error?.message,` No project data is shown until the scope can be checked.`]}),(0,D.jsx)(`button`,{type:`button`,onClick:t,children:`Retry scope check`})]}):e.data?(0,D.jsxs)(m.Provider,{value:e.data.root,children:[(0,D.jsx)(`p`,{className:K.explanation,children:`This console observes the selected Universe store. Run campaigns from your terminal; opening this page does not start work.`}),(0,D.jsx)(G,{},e.data.root),(0,D.jsx)(h,{})]}):(0,D.jsx)(`p`,{role:`status`,children:`Checking the selected Universe store…`})})]})]})}function Y(){let e=i();return(0,g.useEffect)(()=>{if(e!==`checking`)return;let t=!1;return s(q.key,q.fetch).then(()=>{t||r(l(q.key).status===`success`)}),()=>{t=!0}},[e]),e===`checking`?(0,D.jsx)(`p`,{className:K.checking,role:`status`,children:`Checking for an existing console session…`}):e===`unauthenticated`?(0,D.jsx)(u,{heading:`Connect to Ashlrverse`,command:`ashlr universe console --root /absolute/universe-store`}):(0,D.jsx)(J,{})}export{Y as UniverseConsoleApp};
|
|
2
|
+
//# sourceMappingURL=UniverseConsoleApp-DzAyrE-A.js.map
|