@flanksource/clicky-ui 0.3.53 → 0.3.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/data/TaskManager.cjs +39 -32
  2. package/dist/data/TaskManager.cjs.map +1 -1
  3. package/dist/data/TaskManager.d.ts +6 -1
  4. package/dist/data/TaskManager.d.ts.map +1 -1
  5. package/dist/data/TaskManager.js +39 -32
  6. package/dist/data/TaskManager.js.map +1 -1
  7. package/dist/data/clicky-export/ClickyExportDialog.cjs +4 -3
  8. package/dist/data/clicky-export/ClickyExportDialog.cjs.map +1 -1
  9. package/dist/data/clicky-export/ClickyExportDialog.d.ts +4 -1
  10. package/dist/data/clicky-export/ClickyExportDialog.d.ts.map +1 -1
  11. package/dist/data/clicky-export/ClickyExportDialog.js +4 -3
  12. package/dist/data/clicky-export/ClickyExportDialog.js.map +1 -1
  13. package/dist/data/test-runner/MatrixMarks.cjs +26 -14
  14. package/dist/data/test-runner/MatrixMarks.cjs.map +1 -1
  15. package/dist/data/test-runner/MatrixMarks.d.ts +18 -2
  16. package/dist/data/test-runner/MatrixMarks.d.ts.map +1 -1
  17. package/dist/data/test-runner/MatrixMarks.js +27 -16
  18. package/dist/data/test-runner/MatrixMarks.js.map +1 -1
  19. package/dist/data/test-runner/index.d.ts +2 -2
  20. package/dist/data/test-runner/index.d.ts.map +1 -1
  21. package/dist/data/test-runner/matrix-marks.cjs +2 -11
  22. package/dist/data/test-runner/matrix-marks.cjs.map +1 -1
  23. package/dist/data/test-runner/matrix-marks.d.ts +2 -4
  24. package/dist/data/test-runner/matrix-marks.d.ts.map +1 -1
  25. package/dist/data/test-runner/matrix-marks.js +3 -11
  26. package/dist/data/test-runner/matrix-marks.js.map +1 -1
  27. package/dist/data/version-info.cjs +3 -3
  28. package/dist/data/version-info.js +3 -3
  29. package/dist/data.cjs +1 -1
  30. package/dist/data.js +3 -3
  31. package/dist/hooks/use-task-run.cjs +22 -9
  32. package/dist/hooks/use-task-run.cjs.map +1 -1
  33. package/dist/hooks/use-task-run.d.ts +2 -0
  34. package/dist/hooks/use-task-run.d.ts.map +1 -1
  35. package/dist/hooks/use-task-run.js +22 -9
  36. package/dist/hooks/use-task-run.js.map +1 -1
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.js +3 -3
  39. package/dist/styles.css +1 -1
  40. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"matrix-marks.js","names":[],"sources":["../../../src/data/test-runner/matrix-marks.ts"],"sourcesContent":["// The glyph vocabulary of a bulk test matrix (plans × environments): plan\n// cells, sub-steps, the environment header's verdict row and the legend all\n// read MATRIX_MARKS, in this order. The live web matrix and its printed report\n// draw from this one table. MatrixMarks.tsx renders it; this file holds only\n// the tokens and pure helpers (react/only-export-components).\n\nimport {\n UiCircleOutline,\n UiCircleX,\n UiHourglass,\n UiLoader,\n UiPass,\n UiProhibit,\n UiSkipForward,\n UiWarningCircle,\n UiWarningTriangleFilled,\n type IconComponent,\n} from \"../../icons\";\n\nexport type MatrixMarkToken = {\n icon: IconComponent;\n tone: string;\n /** Progress-bar fill; absent for states a bar leaves as its track. */\n bar?: string;\n label: string;\n legend?: string;\n /** Whether a sub-step spells the outcome out beside its glyph. */\n attention: boolean;\n spin?: boolean;\n};\n\nexport const MATRIX_MARKS = {\n passed: { icon: UiPass, tone: \"text-emerald-600 dark:text-emerald-400\", bar: \"bg-emerald-500\", label: \"passed\", attention: false },\n warned: { icon: UiWarningCircle, tone: \"text-amber-600 dark:text-amber-400\", bar: \"bg-amber-400\", label: \"warned\", attention: true },\n skipped: { icon: UiSkipForward, tone: \"text-slate-400 dark:text-slate-500\", bar: \"bg-slate-300 dark:bg-slate-600\", label: \"skipped\", attention: false },\n running: { icon: UiLoader, tone: \"text-blue-600 dark:text-blue-400\", bar: \"bg-blue-500 animate-pulse\", label: \"running\", attention: true, spin: true },\n aborted: { icon: UiProhibit, tone: \"text-red-400 dark:text-red-300\", bar: \"bg-red-300 dark:bg-red-800\", label: \"aborted\", attention: true },\n failed: { icon: UiCircleX, tone: \"text-red-600 dark:text-red-400\", bar: \"bg-red-600\", label: \"failed\", attention: true },\n error: { icon: UiWarningTriangleFilled, tone: \"text-red-600 dark:text-red-400\", bar: \"bg-red-800\", label: \"error\", legend: \"error · never started\", attention: true },\n pending: { icon: UiHourglass, tone: \"text-muted-foreground\", label: \"pending\", legend: \"pending · queued\", attention: false },\n absent: { icon: UiCircleOutline, tone: \"text-muted-foreground/60\", label: \"not in this run\", attention: false },\n} satisfies Record<string, MatrixMarkToken>;\n\nexport type MatrixMarkKey = keyof typeof MATRIX_MARKS;\nexport type MatrixCounts = Partial<Record<MatrixMarkKey, number>>;\n\nexport const MATRIX_ORDER = Object.keys(MATRIX_MARKS) as readonly MatrixMarkKey[];\n\n/** The plan outcomes an environment header's progress bar fills, left to right. */\nexport const MATRIX_PLAN_BAR = [\"passed\", \"warned\", \"failed\", \"error\", \"running\"] as const;\n\n/** One environment's plan totals, as its matrix column header reads them. */\nexport type MatrixEnvCounts = {\n passed: number;\n warned: number;\n failed: number;\n error: number;\n running: number;\n queued: number;\n total: number;\n};\n\nexport function matrixMarkKey(outcome: string): MatrixMarkKey {\n if (!Object.hasOwn(MATRIX_MARKS, outcome)) throw new Error(`matrix has no mark for outcome \"${outcome}\"`);\n return outcome as MatrixMarkKey;\n}\n\n/**\n * Whether a mix holds only the outcome a mark beside it already shows, so\n * drawing both would repeat the glyph.\n */\nexport function repeatsMark(counts: MatrixCounts, mark: MatrixMarkKey): boolean {\n const nonZero = MATRIX_ORDER.filter((key) => (counts[key] ?? 0) > 0);\n return nonZero.length === 1 && nonZero[0] === mark;\n}\n\n/** A mark's progress-bar fill; static (print) drops its animate-* classes. */\nexport function matrixBarClass(mark: (typeof MATRIX_PLAN_BAR)[number], isStatic: boolean): string {\n const bar: string = MATRIX_MARKS[mark].bar;\n return isStatic ? bar.split(\" \").filter((c) => !c.startsWith(\"animate-\")).join(\" \") : bar;\n}\n\n/** The matrix's one duration format: 42s, 4m 12s, 1h 03m. */\nexport function formatMatrixDuration(ms: number): string {\n const s = Math.round(ms / 1000);\n if (s < 60) return `${s}s`;\n const m = Math.floor(s / 60);\n if (m < 60) return `${m}m ${String(s % 60).padStart(2, \"0\")}s`;\n return `${Math.floor(m / 60)}h ${String(m % 60).padStart(2, \"0\")}m`;\n}\n"],"mappings":";;;;;;;;;;AA+BA,IAAa,eAAe;CAC1B,QAAQ;EAAE,MAAM;EAAQ,MAAM;EAA0C,KAAK;EAAkB,OAAO;EAAU,WAAW;CAAM;CACjI,QAAQ;EAAE,MAAM;EAAiB,MAAM;EAAsC,KAAK;EAAgB,OAAO;EAAU,WAAW;CAAK;CACnI,SAAS;EAAE,MAAM;EAAe,MAAM;EAAsC,KAAK;EAAkC,OAAO;EAAW,WAAW;CAAM;CACtJ,SAAS;EAAE,MAAM;EAAU,MAAM;EAAoC,KAAK;EAA6B,OAAO;EAAW,WAAW;EAAM,MAAM;CAAK;CACrJ,SAAS;EAAE,MAAM;EAAY,MAAM;EAAkC,KAAK;EAA8B,OAAO;EAAW,WAAW;CAAK;CAC1I,QAAQ;EAAE,MAAM;EAAW,MAAM;EAAkC,KAAK;EAAc,OAAO;EAAU,WAAW;CAAK;CACvH,OAAO;EAAE,MAAM;EAAyB,MAAM;EAAkC,KAAK;EAAc,OAAO;EAAS,QAAQ;EAAyB,WAAW;CAAK;CACpK,SAAS;EAAE,MAAM;EAAa,MAAM;EAAyB,OAAO;EAAW,QAAQ;EAAoB,WAAW;CAAM;CAC5H,QAAQ;EAAE,MAAM;EAAiB,MAAM;EAA4B,OAAO;EAAmB,WAAW;CAAM;AAChH;AAKA,IAAa,eAAe,OAAO,KAAK,YAAY;;AAGpD,IAAa,kBAAkB;CAAC;CAAU;CAAU;CAAU;CAAS;AAAS;AAahF,SAAgB,cAAc,SAAgC;CAC5D,IAAI,CAAC,OAAO,OAAO,cAAc,OAAO,GAAG,MAAM,IAAI,MAAM,mCAAmC,QAAQ,EAAE;CACxG,OAAO;AACT;;;;;AAMA,SAAgB,YAAY,QAAsB,MAA8B;CAC9E,MAAM,UAAU,aAAa,QAAQ,SAAS,OAAO,QAAQ,KAAK,CAAC;CACnE,OAAO,QAAQ,WAAW,KAAK,QAAQ,OAAO;AAChD;;AAGA,SAAgB,eAAe,MAAwC,UAA2B;CAChG,MAAM,MAAc,aAAa,KAAK,CAAC;CACvC,OAAO,WAAW,IAAI,MAAM,GAAG,CAAC,CAAC,QAAQ,MAAM,CAAC,EAAE,WAAW,UAAU,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI;AACxF;;AAGA,SAAgB,qBAAqB,IAAoB;CACvD,MAAM,IAAI,KAAK,MAAM,KAAK,GAAI;CAC9B,IAAI,IAAI,IAAI,OAAO,GAAG,EAAE;CACxB,MAAM,IAAI,KAAK,MAAM,IAAI,EAAE;CAC3B,IAAI,IAAI,IAAI,OAAO,GAAG,EAAE,IAAI,OAAO,IAAI,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG,EAAE;CAC5D,OAAO,GAAG,KAAK,MAAM,IAAI,EAAE,EAAE,IAAI,OAAO,IAAI,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG,EAAE;AACnE"}
1
+ {"version":3,"file":"matrix-marks.js","names":[],"sources":["../../../src/data/test-runner/matrix-marks.ts"],"sourcesContent":["// The glyph vocabulary of a bulk test matrix (plans × environments): plan\n// cells, sub-steps, the environment header's verdict row and the legend all\n// read MATRIX_MARKS, in this order. The live web matrix and its printed report\n// draw from this one table. MatrixMarks.tsx renders it; this file holds only\n// the tokens and pure helpers (react/only-export-components).\n\nimport {\n UiCircleOutline,\n UiCircleX,\n UiHourglass,\n UiLoader,\n UiPass,\n UiProhibit,\n UiSkipForward,\n UiWarningCircle,\n UiWarningTriangleFilled,\n type IconComponent,\n} from \"../../icons\";\n\nexport type MatrixMarkToken = {\n icon: IconComponent;\n tone: string;\n /** Progress-bar fill; absent for states a bar leaves as its track. */\n bar?: string;\n label: string;\n legend?: string;\n /** Whether a sub-step spells the outcome out beside its glyph. */\n attention: boolean;\n spin?: boolean;\n};\n\nexport const MATRIX_MARKS = {\n passed: { icon: UiPass, tone: \"text-emerald-600 dark:text-emerald-400\", bar: \"bg-emerald-500\", label: \"passed\", attention: false },\n warned: { icon: UiWarningCircle, tone: \"text-amber-600 dark:text-amber-400\", bar: \"bg-amber-400\", label: \"warned\", attention: true },\n skipped: { icon: UiSkipForward, tone: \"text-slate-400 dark:text-slate-500\", bar: \"bg-slate-300 dark:bg-slate-600\", label: \"skipped\", attention: false },\n running: { icon: UiLoader, tone: \"text-blue-600 dark:text-blue-400\", bar: \"bg-blue-500 animate-pulse\", label: \"running\", attention: true, spin: true },\n aborted: { icon: UiProhibit, tone: \"text-red-400 dark:text-red-300\", bar: \"bg-red-300 dark:bg-red-800\", label: \"aborted\", attention: true },\n failed: { icon: UiCircleX, tone: \"text-red-600 dark:text-red-400\", bar: \"bg-red-600\", label: \"failed\", attention: true },\n error: { icon: UiWarningTriangleFilled, tone: \"text-red-600 dark:text-red-400\", bar: \"bg-red-800\", label: \"error\", legend: \"error · never started\", attention: true },\n pending: { icon: UiHourglass, tone: \"text-muted-foreground\", label: \"pending\", legend: \"pending · queued\", attention: false },\n absent: { icon: UiCircleOutline, tone: \"text-muted-foreground/60\", label: \"not in this run\", attention: false },\n} satisfies Record<string, MatrixMarkToken>;\n\nexport type MatrixMarkKey = keyof typeof MATRIX_MARKS;\nexport type MatrixCounts = Partial<Record<MatrixMarkKey, number>>;\n\nexport const MATRIX_ORDER = Object.keys(MATRIX_MARKS) as readonly MatrixMarkKey[];\n\n/** One environment's plan totals, as its matrix column header reads them. */\nexport type MatrixEnvCounts = {\n passed: number;\n warned: number;\n failed: number;\n error: number;\n running: number;\n queued: number;\n total: number;\n};\n\nexport function matrixMarkKey(outcome: string): MatrixMarkKey {\n if (!Object.hasOwn(MATRIX_MARKS, outcome)) throw new Error(`matrix has no mark for outcome \"${outcome}\"`);\n return outcome as MatrixMarkKey;\n}\n\n/**\n * Whether a mix holds only the outcome a mark beside it already shows, so\n * drawing both would repeat the glyph.\n */\nexport function repeatsMark(counts: MatrixCounts, mark: MatrixMarkKey): boolean {\n const nonZero = MATRIX_ORDER.filter((key) => (counts[key] ?? 0) > 0);\n return nonZero.length === 1 && nonZero[0] === mark;\n}\n\n/** A mark's progress-bar fill, the muted track for one with none; static (print) drops its animate-* classes. */\nexport function matrixBarClass(mark: MatrixMarkKey, isStatic: boolean): string {\n const bar: string = (MATRIX_MARKS[mark] as MatrixMarkToken).bar ?? \"bg-muted\";\n return isStatic ? bar.split(\" \").filter((c) => !c.startsWith(\"animate-\")).join(\" \") : bar;\n}\n\n/** The matrix's one duration format: 42s, 4m 12s, 1h 03m. */\nexport function formatMatrixDuration(ms: number): string {\n const s = Math.round(ms / 1000);\n if (s < 60) return `${s}s`;\n const m = Math.floor(s / 60);\n if (m < 60) return `${m}m ${String(s % 60).padStart(2, \"0\")}s`;\n return `${Math.floor(m / 60)}h ${String(m % 60).padStart(2, \"0\")}m`;\n}\n"],"mappings":";;;;;;;;;;AA+BA,IAAa,eAAe;CAC1B,QAAQ;EAAE,MAAM;EAAQ,MAAM;EAA0C,KAAK;EAAkB,OAAO;EAAU,WAAW;CAAM;CACjI,QAAQ;EAAE,MAAM;EAAiB,MAAM;EAAsC,KAAK;EAAgB,OAAO;EAAU,WAAW;CAAK;CACnI,SAAS;EAAE,MAAM;EAAe,MAAM;EAAsC,KAAK;EAAkC,OAAO;EAAW,WAAW;CAAM;CACtJ,SAAS;EAAE,MAAM;EAAU,MAAM;EAAoC,KAAK;EAA6B,OAAO;EAAW,WAAW;EAAM,MAAM;CAAK;CACrJ,SAAS;EAAE,MAAM;EAAY,MAAM;EAAkC,KAAK;EAA8B,OAAO;EAAW,WAAW;CAAK;CAC1I,QAAQ;EAAE,MAAM;EAAW,MAAM;EAAkC,KAAK;EAAc,OAAO;EAAU,WAAW;CAAK;CACvH,OAAO;EAAE,MAAM;EAAyB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b4717f12", ""),
18
- tag: read(() => "clicky-ui@0.3.52", ""),
19
- date: read(() => "2026-10-27T15:07:43.883Z", ""),
17
+ commit: read(() => "ee67b513d", ""),
18
+ tag: read(() => "clicky-ui@0.3.54", ""),
19
+ date: read(() => "2026-11-01T17:35:12.318Z", ""),
20
20
  dirty: read(() => true, false),
21
21
  mode: detectMode()
22
22
  };
@@ -14,9 +14,9 @@ function detectMode() {
14
14
  /** Resolve build + runtime version metadata. */
15
15
  function getVersionInfo() {
16
16
  return {
17
- commit: read(() => "6b4717f12", ""),
18
- tag: read(() => "clicky-ui@0.3.52", ""),
19
- date: read(() => "2026-10-27T15:07:06.564Z", ""),
17
+ commit: read(() => "ee67b513d", ""),
18
+ tag: read(() => "clicky-ui@0.3.54", ""),
19
+ date: read(() => "2026-11-01T17:34:39.851Z", ""),
20
20
  dirty: read(() => true, false),
21
21
  mode: detectMode()
22
22
  };
package/dist/data.cjs CHANGED
@@ -883,12 +883,12 @@ exports.MARKDOWN_SYNTAX_DOCUMENT = require_markdown_syntax.MARKDOWN_SYNTAX_DOCUM
883
883
  exports.MARKDOWN_SYNTAX_SECTIONS = require_markdown_syntax.MARKDOWN_SYNTAX_SECTIONS;
884
884
  exports.MATRIX_MARKS = require_matrix_marks.MATRIX_MARKS;
885
885
  exports.MATRIX_ORDER = require_matrix_marks.MATRIX_ORDER;
886
- exports.MATRIX_PLAN_BAR = require_matrix_marks.MATRIX_PLAN_BAR;
887
886
  exports.MAX_INLINE_SELECTION_ACTIONS = require_selectionActionSplit.MAX_INLINE_SELECTION_ACTIONS;
888
887
  exports.Markdown = require_Markdown.Markdown;
889
888
  exports.MarkdownEditor = require_MarkdownEditor.MarkdownEditor;
890
889
  exports.MatrixElapsed = require_MatrixMarks.MatrixElapsed;
891
890
  exports.MatrixEnvHeader = require_MatrixMarks.MatrixEnvHeader;
891
+ exports.MatrixHeatmap = require_MatrixMarks.MatrixHeatmap;
892
892
  exports.MatrixLegend = require_MatrixMarks.MatrixLegend;
893
893
  exports.MatrixMark = require_MatrixMarks.MatrixMark;
894
894
  exports.MatrixMix = require_MatrixMarks.MatrixMix;
package/dist/data.js CHANGED
@@ -723,8 +723,8 @@ import { TestRunSummary } from "./data/test-runner/TestRunSummary.js";
723
723
  import { TestFilterBar } from "./data/test-runner/TestFilterBar.js";
724
724
  import { TestRunner } from "./data/test-runner/TestRunner.js";
725
725
  import { TestAttempts } from "./data/test-runner/TestAttempts.js";
726
- import { MATRIX_MARKS, MATRIX_ORDER, MATRIX_PLAN_BAR, formatMatrixDuration, matrixBarClass, matrixMarkKey, repeatsMark } from "./data/test-runner/matrix-marks.js";
727
- import { EmptyMatrixCell, EnvChip, MatrixElapsed, MatrixEnvHeader, MatrixLegend, MatrixMark, MatrixMix, MatrixUnavailableEnvHeader } from "./data/test-runner/MatrixMarks.js";
726
+ import { MATRIX_MARKS, MATRIX_ORDER, formatMatrixDuration, matrixBarClass, matrixMarkKey, repeatsMark } from "./data/test-runner/matrix-marks.js";
727
+ import { EmptyMatrixCell, EnvChip, MatrixElapsed, MatrixEnvHeader, MatrixHeatmap, MatrixLegend, MatrixMark, MatrixMix, MatrixUnavailableEnvHeader } from "./data/test-runner/MatrixMarks.js";
728
728
  import { annotateRoutePaths, findNodeByRoutePath, slugify } from "./data/test-runner/routePath.js";
729
729
  import { collectFolderLintStats, folderPattern, lintFileActions, lintFolderActions, lintNodeActions, violationIgnoreAction } from "./data/lint/actions.js";
730
730
  import { collectLintLinters, countLintByLinter, countLintBySeverity, isLinterErrored, lintNodeCount, lintNodeSeverity, totalLintViolations } from "./data/lint/stats.js";
@@ -788,4 +788,4 @@ import { SAMPLE_FACETS, SAMPLE_FACET_ORDER, armedFacets, diskSeries, facetCountS
788
788
  import { ProcessFacetTable } from "./data/traces/ProcessFacetTable.js";
789
789
  import { ProcessTraceDetail } from "./data/traces/ProcessTraceDetail.js";
790
790
  import { TraceWindowList } from "./data/traces/TraceWindowList.js";
791
- export { AccessMark, AnsiHtml, Avatar, AvatarBadge, Badge, CALLOUT_TONES, CALLOUT_VARIANTS, CALLOUT_VARIANT_LABELS, CALL_GRAPH_ACCESS, CALL_GRAPH_DATA_GLYPHS, DATA_KIND_WORDS as CALL_GRAPH_DATA_KIND_WORDS, CALL_GRAPH_DEFAULT_DEPTH, EXCLUDE_EXTERNAL as CALL_GRAPH_EXCLUDE_EXTERNAL, CALL_GRAPH_MAX_DEPTH, CacheAdapterRegistry, CacheBrowser, CacheDetailPanel, CacheNodeRow, CacheStatsOverview, CacheTree, CacheValue, CallGraph, Callout, CellFilterActions, ClickyExportDialog, CodeBlock, CodeDiff, CodeLine, CompactRecord, CompactRecordList, CopyBadge, DATA_MEMBER_OWNER, DATA_TABLE_FILTER_LOOKUP_LIMIT, DEBUG_CAPTURE_HEADER, DEBUG_REFRESH_INSPECTION_HEADER, DEFAULT_LINT_GROUPING, DataTable, DetailTabSelectProvider, DiagnosticsDetailPanel, DiagnosticsTree, EmptyMatrixCell, EntityCell, EnvChip, ErrorDetails, ExecutionTree, Expectation, FilterPill, FilterPillGroup, FilterSeparator, FixtureEditor, FrameSourceWindow, GROUP_MEMBER_WINDOW, Gauge, GaugeHoverCard, GitBranchPicker, GitChangedFilesSummary, GitCommitList, GitCommitPicker, GitConnectionPicker, GitDiffPanel, GitFileList, GitFilePicker, GitPathPicker, GitPipelineExecutionPicker, GitPipelinePicker, GitRefPicker, GitRepositoryPicker, GitSourcePicker, GoProfileView, GoroutineCard, GraphDiagram, HarEntryDetails, HarPanel, Icon, JsonView, JvmStackTrace, KeyValueList, LINT_GROUPINGS, LINT_GROUPING_OPTIONS, LINT_SEVERITIES, LabelIcon, LabeledSparkline, LintDetailPanel, LintFilterBar, LintResults, LintSeverityIcon, LintTreeNode, LogViewer, LogsTable, MARKDOWN_EDITOR_PREVIEW_FORMATS, MARKDOWN_SYNTAX_DOCUMENT, MARKDOWN_SYNTAX_SECTIONS, MATRIX_MARKS, MATRIX_ORDER, MATRIX_PLAN_BAR, MAX_INLINE_SELECTION_ACTIONS, Markdown, MarkdownEditor, MatrixElapsed, MatrixEnvHeader, MatrixLegend, MatrixMark, MatrixMix, MatrixTable, MatrixTreeTable, MatrixUnavailableEnvHeader, MethodBadge, MetricTile, ObjectGraph, OutcomeIcon, PrettyStackTrace, ProcessFacetTable, ProcessNotFoundError, ProcessTraceDetail, ProcessTraceTree, ProfileTopTable, ProgressBar, ProgressBars, PromptBanner, PromptDialog, Properties, QueryBrowser, QueryBrowserExecutionError, RUNTIME_PREFIXES, RadialGauge, SAMPLE_FACETS, SAMPLE_FACET_ORDER, STATUS_LABELS, STATUS_TOKEN_GROUPS, SchemaViewer as SchemaBrowser, SchemaFieldMetaPanel, SchemaReference, SchemaViewer, SchemaViewerRow, SelectionActionBar, ServerTimingBadge, SignedDeltaBar, SortableHeader, Sparkline, SqlTraceTable, StackDumpView, StackFrameRow, StackTrace, StackedStatusBar, StatStrip, StatusDot, StatusRows, StepKindSections, StepOutputs, StepWait, SymbolBadge, TEST_OUTCOMES, TEST_TOOLS, TabButton, TagActionsProvider, TagList, TaskManager, TaskManagerButton, TaskMetadata, TaskMetadataChips, TaskProgress, TaskStreamTabs, TerminalCastPlayer, TestAttemptDetail, TestAttempts, TestDetailPanel, TestFailureDetail, TestFilterBar, TestNodeAdapterRegistry, TestOutput, TestRunSummary, TestRunner, TestRunnerProvider, TestTree, TestTreeNode, ThreadCard, Timeline, TimeseriesCoreBars, TimeseriesGauge, TimeseriesPanel, Timestamp, ToolIcon, TraceHarView, TraceView, TraceWindowList, Tree, TreeDataTable, TreeGroupHeader, TreeNode, TreeRowLead, TreeRowToggle, UIR_CALL_GRAPH_VOCABULARY, UiAccessProtected, UiAccessProtectedDark, UiAccessPublic, UiAccessPublicDark, UiActivity, UiAdd, UiAddChangeset, UiAddChangesetDark, UiAddFilled, UiAggregate, UiAggregateDark, UiAlias, UiAliasDark, UiAnnotation, UiAnnotationDark, UiAopAroundAdvice, UiAopBeforeAdvice, UiAopPointcut, UiArchive, UiArchiveFilled, UiArray, UiArrowDown, UiArrowDownFilled, UiArrowDownRight, UiArrowFatUp, UiArrowFatUpFilled, UiArrowLeft, UiArrowLeftFilled, UiArrowRight, UiArrowRightFilled, UiArrowUp, UiArrowUpFilled, UiArrowUpRight, UiArrowsCounterClockwise, UiArrowsCounterClockwiseFilled, UiArtifact, UiArtifactDark, UiAsterisk, UiAsteriskFilled, UiAsyncFn, UiAt, UiAtFilled, UiAtom, UiAtomFilled, UiAttachDebugger, UiAttachDebuggerDark, UiAttachToProcess, UiAttachToProcessDark, UiAuditLog, UiAzureRepos, UiBank, UiBankFilled, UiBatteryChargingVertical, UiBatteryChargingVerticalFilled, UiBatteryVerticalEmpty, UiBatteryVerticalEmptyFilled, UiBatteryVerticalFull, UiBatteryVerticalFullFilled, UiBatteryVerticalHigh, UiBatteryVerticalHighFilled, UiBatteryVerticalLow, UiBatteryVerticalLowFilled, UiBatteryVerticalMedium, UiBatteryVerticalMediumFilled, UiBeaker, UiBeakerFilled, UiBell, UiBellFilled, UiBellSlash, UiBellSlashFilled, UiBinary, UiBinaryFilled, UiBlueKey, UiBlueKeyDark, UiBoolean, UiBox, UiBoxFilled, UiBoxes, UiBoxesFilled, UiBraces, UiBrain, UiBrainFilled, UiBreakpoint, UiBreakpoint1, UiBreakpoint1Dark, UiBreakpoint2, UiBreakpoint2Dark, UiBreakpoint3, UiBreakpoint3Dark, UiBreakpoint4, UiBreakpoint4Dark, UiBreakpointDisabled, UiBreakpointField, UiBreakpointMethod, UiBroadcast, UiBroadcastFilled, UiBug, UiBugFilled, UiCache, UiCalculator, UiCalendar, UiCalendarBlank, UiCalendarBlankFilled, UiCalendarCheck, UiCalendarCheckFilled, UiCalendarFilled, UiCamera, UiCameraFilled, UiCancel, UiCancelFilled, UiChartBar, UiChartBarFilled, UiChartLineUp, UiChartLineUpFilled, UiChartOfAccounts, UiChartOfAccountsFilled, UiChartPie, UiChartPieFilled, UiChatDots, UiChatDotsFilled, UiCheck, UiCheckConstraint, UiCheckConstraintDark, UiCheckFilled, UiChevronDown, UiChevronDownFilled, UiChevronRight, UiChevronRightFilled, UiChevronUp, UiChevronUpFilled, UiChevronsDown, UiChevronsDownFilled, UiChevronsUp, UiChevronsUpFilled, UiChip, UiChipFilled, UiCircleFilled, UiCircleFilledFilled, UiCircleOutline, UiCircleOutlineFilled, UiCircleX, UiCircleXFilled, UiClass, UiClass1, UiClass1Dark, UiClass2, UiClass2Dark, UiClass3, UiClass3Dark, UiClass4, UiClass4Dark, UiClass5, UiClass5Dark, UiClass6, UiClass6Dark, UiClass7, UiClass7Dark, UiClearCash, UiClearCashDark, UiClipboardText, UiClipboardTextFilled, UiClock, UiClockCountdown, UiClockCountdownFilled, UiClockFilled, UiClose, UiCloseFilled, UiCloud, UiCloudDownload, UiCloudDownloadFilled, UiCloudFilled, UiCloudUpload, UiCloudUploadFilled, UiCode2, UiCode2Filled, UiCog, UiCogFilled, UiCoins, UiCoinsFilled, UiCollapseAll, UiCollection, UiCollectionDark, UiCollectionType, UiCollectionTypeDark, UiColumn, UiColumn1, UiColumn1Dark, UiColumn2, UiColumn2Dark, UiColumn3, UiColumn3Dark, UiColumn4, UiColumn4Dark, UiColumn5, UiColumn5Dark, UiColumnDark, UiColumns, UiColumnsFilled, UiCommand, UiCommandFilled, UiComment, UiCompass, UiCompassFilled, UiConfig, UiConfigFilled, UiConfigMap, UiConfigMapDark, UiConnector, UiConnectorDark, UiConstant, UiConstant1, UiConstant1Dark, UiConstructor, UiConverter, UiConverter1, UiConverter1Dark, UiConverterDark, UiCopy, UiCopyFilled, UiCreateConstraint, UiCreateConstraintDark, UiCurrencyDollar, UiCurrencyDollarFilled, UiCursorClick, UiCursorClickFilled, UiCursorText, UiCursorTextFilled, UiCustomResource, UiCustomResourceDark, UiDataSchema, UiDataSchemaDark, UiDataShare, UiDataShareDark, UiDatabase, UiDatabaseCheck, UiDatabaseCheckFilled, UiDatabaseCross, UiDatabaseCrossFilled, UiDatabaseDown, UiDatabaseDownFilled, UiDatabaseError, UiDatabaseErrorFilled, UiDatabaseEventStream, UiDatabaseFilled, UiDatabaseInfo, UiDatabaseInfoFilled, UiDatabaseLink, UiDatabaseLinkDark, UiDatabaseMinus, UiDatabaseMinusFilled, UiDatabasePending, UiDatabasePendingFilled, UiDatabasePlus, UiDatabasePlusFilled, UiDatabaseTrash, UiDatabaseTrashFilled, UiDatabaseUp, UiDatabaseUpFilled, UiDatabaseWarning, UiDatabaseWarningFilled, UiDatabaseZap, UiDebug, UiDebugContinue, UiDebugDisabled, UiDebugDisabledDark, UiDebugFilled, UiDebugSelection, UiDebugSelectionDark, UiDebugSmall, UiDebugStepInto, UiDebugStepOut, UiDebugStepOver, UiDebugStop, UiDecorator, UiDeploy, UiDeployDark, UiDesktop, UiDesktopFilled, UiDetach, UiDetachDark, UiDiagramDiff, UiDiagramDiffDark, UiDiff, UiDotsVertical, UiDotsVerticalFilled, UiDownload, UiDownloadFilled, UiDumpThreads, UiDumpThreadsDark, UiEdit, UiEditFilled, UiEditMode, UiEditModeDark, UiEllipsis, UiEllipsisBold, UiEllipsisFilled, UiEndpoint, UiEnum, UiEnumMember, UiEnvelope, UiEnvelopeFilled, UiError, UiEvaluateExpression, UiEvaluateExpressionDark, UiEvent, UiException, UiExceptionAnalyzerImportant, UiExceptionAnalyzerImportantDark, UiExceptionDark, UiExcludedGenerated, UiExcludedGeneratedDark, UiExpandAll, UiExport, UiExtension, UiExtensionDark, UiExternalLink, UiEye, UiEyeClosed, UiEyeClosedFilled, UiEyeFilled, UiFactory, UiFactoryFilled, UiFailedInProgress, UiFailedInProgressDark, UiFastForwardCircle, UiFastForwardCircleFilled, UiField, UiField1, UiField1Dark, UiField2, UiField2Dark, UiField3, UiField3Dark, UiField4, UiField4Dark, UiField5, UiField5Dark, UiField6, UiField6Dark, UiFieldProtected, UiFieldReadAccess, UiFieldType, UiFieldWriteAccess, UiFile, UiFileCode, UiFileCodeFilled, UiFileCog, UiFileFilled, UiFileFormat, UiFileFormatDark, UiFileJson, UiFilePlus, UiFilePlusFilled, UiFileSearch, UiFileSpreadsheet, UiFileText, UiFileTextFilled, UiFileType, UiFilter, UiFilterFilled, UiFingerprint, UiFingerprintFilled, UiFolder, UiFolderFilled, UiFolderGit, UiFolderGit2, UiFolderGit2Filled, UiFolderGitFilled, UiForeignServer, UiForeignServerDark, UiForm, UiFormFilled, UiFreemarker, UiFreemarkerDark, UiFullscreen, UiFullscreenFilled, UiFunction, UiFunction1, UiFunction1Dark, UiFunction2, UiFunction2Dark, UiFunction3, UiFunction3Dark, UiFunction4, UiFunction4Dark, UiFunctionSquare, UiFunctionSquareFilled, UiFunnelData, UiFunnelDataFilled, UiGavel, UiGavelFilled, UiGearSix, UiGearSixFilled, UiGitBranch, UiGitBranchFilled, UiGitCommit, UiGitCommitFilled, UiGitGraph, UiGitGraphFilled, UiGitMerge, UiGitMergeFilled, UiGitPr, UiGitPrFilled, UiGlobe, UiGraph, UiGraphFilled, UiGreyKey, UiGreyKeyDark, UiGrid, UiGridFilled, UiGroupByModuleGroup, UiGroupByModuleGroupDark, UiGroupByPackage, UiGroupByPackageDark, UiGroupByTestProduction, UiGroupByTestProductionDark, UiHandCoins, UiHandCoinsFilled, UiHandPalm, UiHandPalmFilled, UiHardDrive, UiHibernate, UiHibernateDark, UiHibernateEvent, UiHibernateEventDark, UiHistory, UiHistoryFilled, UiHome, UiHomeFilled, UiHourglass, UiHourglassFilled, UiHubot, UiHubotFilled, UiId, UiIdDark, UiIdentificationCard, UiIdentificationCardFilled, UiImage, UiImageFilled, UiImport, UiInbox, UiInboxFilled, UiIndex, UiIndex1, UiIndex1Dark, UiIndex2, UiIndex2Dark, UiIndex3, UiIndex3Dark, UiIndex4, UiIndex4Dark, UiIndex5, UiIndex5Dark, UiIndex6, UiIndex6Dark, UiIndexDark, UiInfo, UiInfoFilled, UiInsightAvailability, UiInsightAvailabilityFilled, UiInsightCompliance, UiInsightCost, UiInsightCostFilled, UiInsightIntegration, UiInsightPerformance, UiInsightPerformanceFilled, UiInsightRecommendation, UiInsightRecommendationFilled, UiInsightReliability, UiInsightReliabilityFilled, UiInsightSecurity, UiInsightSecurityFilled, UiInsightTechnicalDebt, UiInsightTechnicalDebtFilled, UiInspectionsGrammar, UiInspectionsGrammarDark, UiInterface, UiInvoice, UiInvoiceFilled, UiJpaAttribute, UiJpaId, UiJpaRelationship, UiJson, UiKanban, UiKanbanFilled, UiKey, UiKeyFilled, UiKeyboard, UiKeyboardFilled, UiKeyword, UiKillDataSourceProcess, UiKillDataSourceProcessDark, UiKubeConfigMap, UiKubeDeployment, UiKubeJob, UiKubeNamespace, UiKubePod, UiLambda, UiLangJava, UiLangJavascript, UiLangPython, UiLayers, UiLayoutDashboard, UiLayoutDashboardFilled, UiLedger, UiLedgerFilled, UiLightbulb, UiLightbulbFilled, UiLink, UiLinkExternal, UiLinkExternalFilled, UiLinkFilled, UiListChecks, UiListChecksFilled, UiListDashes, UiListDashesFilled, UiListFlat, UiListFlatFilled, UiListOrdered, UiListTree, UiListTreeFilled, UiLoader, UiLoaderFilled, UiLocation, UiLocationFilled, UiLock, UiLockFilled, UiLockKey, UiLockKeyFilled, UiLockOpen, UiLockOpenFilled, UiLogoAnthropic, UiLogoClaude, UiLogoDeepseek, UiLogoEslint, UiLogoGemini, UiLogoGo, UiLogoGoogle, UiLogoHuggingface, UiLogoJest, UiLogoMarkdown, UiLogoMeta, UiLogoMistral, UiLogoOllama, UiLogoOpenai, UiLogoOxc, UiLogoPerplexity, UiLogoPlaywright, UiLogoPython, UiLogoReact, UiLogoRuff, UiLogoTypescript, UiLogoVitest, UiMagicWand, UiMagicWandFilled, UiMarkdown, UiMaterializedLog, UiMaterializedLogDark, UiMemoryProfile, UiMemoryStick, UiMenu, UiMenuFilled, UiMessageQueue, UiMessageQueue1, UiMessageQueue1Dark, UiMethod, UiMethod1, UiMethod10, UiMethod10Dark, UiMethod11, UiMethod11Dark, UiMethod1Dark, UiMethod2, UiMethod2Dark, UiMethod3, UiMethod3Dark, UiMethod4, UiMethod4Dark, UiMethod5, UiMethod5Dark, UiMethod6, UiMethod6Dark, UiMethod7, UiMethod7Dark, UiMethod8, UiMethod8Dark, UiMethod9, UiMethod9Dark, UiModels, UiModelsDark, UiModule, UiModule1, UiModule1Dark, UiMoon, UiMoonFilled, UiName, UiNameDark, UiNamespace, UiNetwork, UiNetworkFilled, UiNull, UiNumeric, UiObject, UiOpenBlock, UiOpenBlockDark, UiOpenScad, UiOperator, UiOperator1, UiOperator1Dark, UiOrganization, UiOrganizationCheck, UiOrganizationCheckFilled, UiOrganizationCross, UiOrganizationCrossFilled, UiOrganizationFilled, UiOrganizationMinus, UiOrganizationMinusFilled, UiOrganizationPlus, UiOrganizationPlusFilled, UiPackage, UiPackageFilled, UiPalette, UiPaletteFilled, UiParameter, UiPartition, UiPartitionDark, UiPass, UiPassFilled, UiPause, UiPauseCircle, UiPauseCircleFilled, UiPencilSimpleLine, UiPencilSimpleLineFilled, UiPending, UiPendingDark, UiPercent, UiPhone, UiPhoneFilled, UiPlay, UiPlayCircle, UiPlayCircleFilled, UiPlaybook, UiPlug, UiPluginModule, UiPluginModuleDark, UiPluginV2, UiPluginV2Dark, UiPlugsConnected, UiPlugsConnectedFilled, UiPointcut, UiPointcutDark, UiProcedure, UiProcedureDark, UiProfile, UiProfile1, UiProfile1Dark, UiProfile2, UiProfile2Dark, UiProfile3, UiProfile3Dark, UiProfile4, UiProfile4Dark, UiProfileDark, UiProfiler, UiProfilerBackTrace, UiProfilerMergeCallees, UiProhibit, UiProhibitFilled, UiProjectStructure, UiProjectStructureDark, UiProjection, UiProjectionDark, UiProperty, UiPulse, UiPulseFilled, UiPuzzle, UiPuzzleFilled, UiQuestion, UiQuestionFilled, UiQueue, UiQueueFilled, UiReadAccess, UiReadAccessDark, UiReceipt, UiReceiptFilled, UiRecord, UiRecord1, UiRecord1Dark, UiRefresh, UiRefreshFilled, UiRegex, UiRegexDark, UiRelationship, UiRelationshipDark, UiRelay, UiRelayDark, UiRemove, UiRemoveFilled, UiRepeat, UiRepeatFilled, UiResizeVertical, UiResizeVerticalFilled, UiRestart, UiRobotAi, UiRobotAiFilled, UiRocket, UiRocketFilled, UiRole, UiRoleDark, UiRollback, UiRollbackDark, UiRoute, UiRouteFilled, UiRoutine, UiRoutineDark, UiRows, UiRowsFilled, UiRun, UiRun1, UiRun10, UiRun10Dark, UiRun11, UiRun11Dark, UiRun12, UiRun12Dark, UiRun13, UiRun13Dark, UiRun14, UiRun14Dark, UiRun1Dark, UiRun2, UiRun2Dark, UiRun3, UiRun3Dark, UiRun4, UiRun4Dark, UiRun5, UiRun5Dark, UiRun6, UiRun6Dark, UiRun7, UiRun7Dark, UiRun8, UiRun8Dark, UiRun9, UiRun9Dark, UiRunDark, UiSave, UiSaveFilled, UiScale, UiScan, UiScanFilled, UiScroll, UiScrollFilled, UiSealCheck, UiSealCheckFilled, UiSearch, UiSecurityRole, UiSecurityRoleDark, UiSelect, UiSelectFilled, UiSequence, UiSequence1, UiSequence1Dark, UiSequence2, UiSequence2Dark, UiSequence3, UiSequence3Dark, UiSequence4, UiSequence4Dark, UiSequenceDark, UiServer, UiServerProcess, UiServerProcessFilled, UiSetKey, UiSetKeyDark, UiSeverityBlocker, UiSeverityBlockerFilled, UiSeverityCritical, UiSeverityCriticalFilled, UiSeverityHigh, UiSeverityHighFilled, UiSeverityInfo, UiSeverityInfoFilled, UiSeverityLow, UiSeverityLowFilled, UiSeverityMedium, UiSeverityMediumFilled, UiSeverityWarning, UiSeverityWarningFilled, UiShare, UiShareFilled, UiShield, UiShieldCheck, UiShieldCheckFilled, UiShieldCross, UiShieldCrossFilled, UiShieldFilled, UiShieldInfo, UiShieldInfoFilled, UiShieldMinus, UiShieldMinusFilled, UiShieldPending, UiShieldPendingFilled, UiShieldPlus, UiShieldPlusFilled, UiShieldSlash, UiShieldSlashFilled, UiShieldWarning, UiShieldWarningFilled, UiShipWheel, UiShortcutFilter, UiShortcutFilterDark, UiShowCurrentFrame, UiShowCurrentFrameDark, UiShowMembers, UiShowMembersDark, UiShowToImplement, UiShowToImplementDark, UiSidebar, UiSidebarFilled, UiSigma, UiSignIn, UiSignInFilled, UiSignOut, UiSignOutFilled, UiSiren, UiSirenFilled, UiSkipForward, UiSkipForwardFilled, UiSkull, UiSkullFilled, UiSliders, UiSlidersFilled, UiSortAlphabetically, UiSortAlphabeticallyDark, UiSortByType, UiSortByTypeDark, UiSortByUsage, UiSortByUsageDark, UiSortByVisibility, UiSortByVisibilityDark, UiSparkles, UiSparklesFilled, UiSpeaker, UiSpeakerFilled, UiSpringBoot, UiSpringBootDark, UiSqlArray, UiSqlColumn, UiSqlConstraint, UiSqlDatabase, UiSqlForeignKey, UiSqlFunction, UiSqlIndex, UiSqlPrimaryKey, UiSqlQuery, UiSqlSchema, UiSqlSequence, UiSqlStoredProc, UiSqlTable, UiSqlTableFilled, UiSqlTrigger, UiSqlView, UiSquare, UiSquareFilled, UiStack, UiStackFilled, UiStackFrameDot, UiStackTrace, UiStar, UiStarFilled, UiStartTimer, UiStartTimerDark, UiStatic, UiStaticDark, UiStep, UiStep1, UiStep1Dark, UiStep2, UiStep2Dark, UiStep3, UiStep3Dark, UiStep4, UiStep4Dark, UiStep5, UiStep5Dark, UiStep6, UiStep6Dark, UiStep7, UiStep7Dark, UiStep8, UiStep8Dark, UiStep9, UiStep9Dark, UiStepDark, UiSteps, UiStepsFilled, UiStop, UiStrategy, UiStrategyFilled, UiStream, UiStreamDark, UiStreamKey, UiStreamKeyDark, UiString, UiStruct, UiSubmitDB, UiSubmitDBDark, UiSubscription, UiSubscriptionDark, UiSun, UiSunFilled, UiSwap, UiSymbol, UiSymbolDark, UiSync, UiTable, UiTable1, UiTable10, UiTable10Dark, UiTable11, UiTable11Dark, UiTable12, UiTable12Dark, UiTable1Dark, UiTable2, UiTable2Dark, UiTable3, UiTable3Dark, UiTable4, UiTable4Dark, UiTable5, UiTable5Dark, UiTable6, UiTable6Dark, UiTable7, UiTable7Dark, UiTable8, UiTable8Dark, UiTable9, UiTable9Dark, UiTableFilled, UiTableProperties, UiTablePropertiesFilled, UiTag, UiTagFilled, UiTax, UiTaxFilled, UiTemplate, UiTemplateDark, UiTerminal, UiTerminalFilled, UiTest, UiTest1, UiTest1Dark, UiTest2, UiTest2Dark, UiTest3, UiTest3Dark, UiTest4, UiTest4Dark, UiTest5, UiTest5Dark, UiTest6, UiTest6Dark, UiTest7, UiTest7Dark, UiText, UiTextDark, UiThermometer, UiThermometerFilled, UiThumbsDown, UiThumbsDownFilled, UiThumbsUp, UiThumbsUpFilled, UiTimer, UiTimerFilled, UiToggleOff, UiToggleOffFilled, UiToggleOn, UiToggleOnFilled, UiTrait, UiTransactionStart, UiTransactionStartDark, UiTrash, UiTrashFilled, UiTrendDown, UiTrendDownFilled, UiTrendUp, UiTrendUpFilled, UiTypeAlias, UiTypeParameter, UiTypeScriptIndexSignature, UiTypeScriptIndexSignatureDark, UiUndeploy, UiUndeployDark, UiUnknown, UiUpload, UiUploadFilled, UiUser, UiUserCheck, UiUserCheckFilled, UiUserCircle, UiUserCircleCheck, UiUserCircleCheckFilled, UiUserCircleFilled, UiUserCircleMinus, UiUserCircleMinusFilled, UiUserCirclePlus, UiUserCirclePlusFilled, UiUserCog, UiUserFilled, UiUserGear, UiUserGearFilled, UiUserMinus, UiUserMinusFilled, UiUserPlus, UiUserPlusFilled, UiUsersFour, UiUsersFourFilled, UiUsersThree, UiUsersThreeCheck, UiUsersThreeCheckFilled, UiUsersThreeCross, UiUsersThreeCrossFilled, UiUsersThreeFilled, UiUsersThreeMinus, UiUsersThreeMinusFilled, UiUsersThreePlus, UiUsersThreePlusFilled, UiVariable, UiVariable1, UiVariable1Dark, UiVariable2, UiVariable2Dark, UiVariable3, UiVariable3Dark, UiVariable4, UiVariable4Dark, UiVariable5, UiVariable5Dark, UiVariable6, UiVariable6Dark, UiVideo, UiVideoFilled, UiVirtualForeignKey, UiVirtualForeignKeyDark, UiWarningCircle, UiWarningCircleFilled, UiWarningTriangle, UiWarningTriangleFilled, UiWatch, UiWatchFilled, UiWebArtifact, UiWebArtifactDark, UiWebServiceClient, UiWebServiceClientDark, UiWorkflow, UiWrench, UiWrenchFilled, UiWriteAccess, UiWriteAccessDark, UiXpath, UiXpath1, UiXpath1Dark, UiXpathDark, UiZap, UiZapFilled, UiZoomIn, UiZoomInFilled, UiZoomOut, UiZoomOutFilled, VerificationResults, Version, WorkloadCard, aggregateProfile, aggregateStatusCounts, allGroupsTerminal, annotateRoutePaths, answerPrompt, applyFixtureFrontmatterRaw, applyFixtureFrontmatterState, applyTaskOutputDelta, armedFacets, assertCalloutValue, assignAxes, attemptStatus, badgeVariants, baseAccess as baseCallGraphAccess, bucketTasks, buildBrief, buildLintTree, buildMarkdownPreviewUrl, buildNodeBrief, buildNodeJson, buildProcessForest, buildSchemaTree, buildSchemaViewerTree, buildStepBranchTree, cacheQueryKeys, callGraphGroupFacts, calloutVariantStyles, callsItself, changeIconAliases, chooseTimestampFormat, clickyFormatForMarkdownPreview, clickyIconProvider, clockTime, collapseSingleChildChains, collectFolderLintStats, collectFrameworks, collectLintLinters, collectTreeKeys, columnsLayout, compactStackPath, computeLineDiff, countGoroutinesByState, countLintByLinter, countLintBySeverity, countObjectGraphNodes, countProcesses, countStackByState, countThreadsByState, cpuTone, createCacheClient, createCacheRegistry, createChecklistMarkdown, createFenceMarkdown, createTestRunnerRegistry, cycleFilterState, dataMemberAside, dataNodeBacking, dataNodeGlyph, dataNodeStatus, debugCaptureHeaders, debugConsoleAvailable, debugConsoleOpen, decodeFilterState, deriveProgressBars, detectDumpFormat, diskSeries, emptyLintFilters, emptyTaskStreams, emptyTestFilters, emptyVerifySummary, encodeFilterState, exchangeToHarEntry, expandAllTree, facetCountSeries, filterStateToRecord, filterTests, findLintNode, findNodeByRoutePath, findProcessByPID, fixtureFenceKind, fixtureFenceSchemaAliases, fixtureFenceSnippetInfo, fixtureFrontmatterState, flattenForest, folderPattern, formatExclude as formatCallGraphExclude, formatCount, formatCpuPercent, formatDateTimeRelative, formatDelay, formatExportValue, formatGitCommitDateHeader, formatMatrixDuration, formatProcessTimestamp, formatProfileValue, formatPropertyLabel, formatRelativeTime, formatReplicaCounts, formatServerTimingDuration, formatStatementDuration, formatTestDuration, formatTimestamp, frameHasSource, frameLocation, genericCopySections, getChangeIcon, getVersionInfo, groupRecords, groupStatements, hasFailed, hasHoverMeta, hasPending, humanizeName, iconsByConsumerName, inferColumns, interfaceMethods, isApplicationStackFrame, isAttemptLive, isDataMember, isDataNode, isFailedOrWarn, isFlatMetadata, isGroupCollapsedByDefault, isLeaf, isLinterErrored, isMetadataLink, isProcessExited, isRuntimeFrame, isTerminalStatus, latestFacetReading, latestOf, lintFileActions, lintFolderActions, lintNodeActions, lintNodeCount, lintNodeSeverity, logLevelColor, markdownDocumentStats, matchesExclude as matchesCallGraphExclude, matchesFilterState, matrixBarClass, matrixMarkKey, memoryTone, mergeAccess, mergeGraph as mergeCallGraph, mergeCopySections, mergeSeries, metadataEntries, mockMarkdownPreview, modeToFormat, normalizeErrorDiagnostics, normalizeLogsTableRows, normalizeStatus, normalizeTags, outcomeFor, parseBoundsValue, parseExclude as parseCallGraphExclude, parseCast, parseDiagnosticsStackTrace, parseDurationBoundsValue, parseFixtureFrontmatter, parseFixtureYaml, parseGoroutineDump, parseInlineJsonContextValue, parseJavaStackTrace, parseJvmThreadDump, parseMultiFilterValue, parseServerTiming, parseStackDump, parseTimestamp, parseUnifiedDiff, policySummary, prefixAdapter, processLabel, processLifetimeMs, processSeries, processStateColor, processStateIcon, profileValueTypes, programmingIconCatalog, pruneExitedProcesses, pruneNullNodes, readStepDetail, recordToFilterState, registerDebugConsole, repeatsMark, resolveBreakdown, resolveFixtureFenceSchema, resolveSelectionActionDisplay, resolveSeries, revealDebugConsole, ringLayout, routeEdges, schemaKeys, segment, serializeBoundsValue, serializeDurationBoundsValue, serializeMultiFilterValue, seriesStats, serverColumnsToDataTableColumns, serverFiltersToFilterBar, serverTimingCounterSummary, serverTimingMetricLabel, setDebugCaptureLevel, setDebugConsoleOpen, setDebugRefreshInspection, setFallbackIconProvider, shortFrameName, slugify, splitCommaValues, splitSelectionActions, splitTagToken, stackCheckpoints, stacksThrough, statusToneFor, stringifyFixtureYaml, subscribeToDebugConsole, sum, sumNonTaskTests, summarizeVerifyNodes, tagActionsFromRecord, tagFilterTokens, taskGroupErrorCount, taskGroupErrors, taskGroupJson, taskGroupMarkdown, taskMarkdown, taskQueryKeys, taskSegments, taskStatusBg, taskStatusColor, taskStatusIcon, testAttemptViews, testStatus, toggleAccess as toggleCallGraphAccess, toolKeyFor, toolMark, totalDuration, totalLintViolations, updateFilterSelection, useClickyExport, useDebugAction, usePrompts, useSelectDetailTab, useTagActions, useTagActionsValue, useTestRunner, verificationAdapters, verifyNodeTest, verifyReportCounts, verifyReportTests, violationIgnoreAction, visibleTreeRows, withTaskStreams, workloadKindLabel, workloadStatusLabel, workloadStatusTone, workloadTypeLabel };
791
+ export { AccessMark, AnsiHtml, Avatar, AvatarBadge, Badge, CALLOUT_TONES, CALLOUT_VARIANTS, CALLOUT_VARIANT_LABELS, CALL_GRAPH_ACCESS, CALL_GRAPH_DATA_GLYPHS, DATA_KIND_WORDS as CALL_GRAPH_DATA_KIND_WORDS, CALL_GRAPH_DEFAULT_DEPTH, EXCLUDE_EXTERNAL as CALL_GRAPH_EXCLUDE_EXTERNAL, CALL_GRAPH_MAX_DEPTH, CacheAdapterRegistry, CacheBrowser, CacheDetailPanel, CacheNodeRow, CacheStatsOverview, CacheTree, CacheValue, CallGraph, Callout, CellFilterActions, ClickyExportDialog, CodeBlock, CodeDiff, CodeLine, CompactRecord, CompactRecordList, CopyBadge, DATA_MEMBER_OWNER, DATA_TABLE_FILTER_LOOKUP_LIMIT, DEBUG_CAPTURE_HEADER, DEBUG_REFRESH_INSPECTION_HEADER, DEFAULT_LINT_GROUPING, DataTable, DetailTabSelectProvider, DiagnosticsDetailPanel, DiagnosticsTree, EmptyMatrixCell, EntityCell, EnvChip, ErrorDetails, ExecutionTree, Expectation, FilterPill, FilterPillGroup, FilterSeparator, FixtureEditor, FrameSourceWindow, GROUP_MEMBER_WINDOW, Gauge, GaugeHoverCard, GitBranchPicker, GitChangedFilesSummary, GitCommitList, GitCommitPicker, GitConnectionPicker, GitDiffPanel, GitFileList, GitFilePicker, GitPathPicker, GitPipelineExecutionPicker, GitPipelinePicker, GitRefPicker, GitRepositoryPicker, GitSourcePicker, GoProfileView, GoroutineCard, GraphDiagram, HarEntryDetails, HarPanel, Icon, JsonView, JvmStackTrace, KeyValueList, LINT_GROUPINGS, LINT_GROUPING_OPTIONS, LINT_SEVERITIES, LabelIcon, LabeledSparkline, LintDetailPanel, LintFilterBar, LintResults, LintSeverityIcon, LintTreeNode, LogViewer, LogsTable, MARKDOWN_EDITOR_PREVIEW_FORMATS, MARKDOWN_SYNTAX_DOCUMENT, MARKDOWN_SYNTAX_SECTIONS, MATRIX_MARKS, MATRIX_ORDER, MAX_INLINE_SELECTION_ACTIONS, Markdown, MarkdownEditor, MatrixElapsed, MatrixEnvHeader, MatrixHeatmap, MatrixLegend, MatrixMark, MatrixMix, MatrixTable, MatrixTreeTable, MatrixUnavailableEnvHeader, MethodBadge, MetricTile, ObjectGraph, OutcomeIcon, PrettyStackTrace, ProcessFacetTable, ProcessNotFoundError, ProcessTraceDetail, ProcessTraceTree, ProfileTopTable, ProgressBar, ProgressBars, PromptBanner, PromptDialog, Properties, QueryBrowser, QueryBrowserExecutionError, RUNTIME_PREFIXES, RadialGauge, SAMPLE_FACETS, SAMPLE_FACET_ORDER, STATUS_LABELS, STATUS_TOKEN_GROUPS, SchemaViewer as SchemaBrowser, SchemaFieldMetaPanel, SchemaReference, SchemaViewer, SchemaViewerRow, SelectionActionBar, ServerTimingBadge, SignedDeltaBar, SortableHeader, Sparkline, SqlTraceTable, StackDumpView, StackFrameRow, StackTrace, StackedStatusBar, StatStrip, StatusDot, StatusRows, StepKindSections, StepOutputs, StepWait, SymbolBadge, TEST_OUTCOMES, TEST_TOOLS, TabButton, TagActionsProvider, TagList, TaskManager, TaskManagerButton, TaskMetadata, TaskMetadataChips, TaskProgress, TaskStreamTabs, TerminalCastPlayer, TestAttemptDetail, TestAttempts, TestDetailPanel, TestFailureDetail, TestFilterBar, TestNodeAdapterRegistry, TestOutput, TestRunSummary, TestRunner, TestRunnerProvider, TestTree, TestTreeNode, ThreadCard, Timeline, TimeseriesCoreBars, TimeseriesGauge, TimeseriesPanel, Timestamp, ToolIcon, TraceHarView, TraceView, TraceWindowList, Tree, TreeDataTable, TreeGroupHeader, TreeNode, TreeRowLead, TreeRowToggle, UIR_CALL_GRAPH_VOCABULARY, UiAccessProtected, UiAccessProtectedDark, UiAccessPublic, UiAccessPublicDark, UiActivity, UiAdd, UiAddChangeset, UiAddChangesetDark, UiAddFilled, UiAggregate, UiAggregateDark, UiAlias, UiAliasDark, UiAnnotation, UiAnnotationDark, UiAopAroundAdvice, UiAopBeforeAdvice, UiAopPointcut, UiArchive, UiArchiveFilled, UiArray, UiArrowDown, UiArrowDownFilled, UiArrowDownRight, UiArrowFatUp, UiArrowFatUpFilled, UiArrowLeft, UiArrowLeftFilled, UiArrowRight, UiArrowRightFilled, UiArrowUp, UiArrowUpFilled, UiArrowUpRight, UiArrowsCounterClockwise, UiArrowsCounterClockwiseFilled, UiArtifact, UiArtifactDark, UiAsterisk, UiAsteriskFilled, UiAsyncFn, UiAt, UiAtFilled, UiAtom, UiAtomFilled, UiAttachDebugger, UiAttachDebuggerDark, UiAttachToProcess, UiAttachToProcessDark, UiAuditLog, UiAzureRepos, UiBank, UiBankFilled, UiBatteryChargingVertical, UiBatteryChargingVerticalFilled, UiBatteryVerticalEmpty, UiBatteryVerticalEmptyFilled, UiBatteryVerticalFull, UiBatteryVerticalFullFilled, UiBatteryVerticalHigh, UiBatteryVerticalHighFilled, UiBatteryVerticalLow, UiBatteryVerticalLowFilled, UiBatteryVerticalMedium, UiBatteryVerticalMediumFilled, UiBeaker, UiBeakerFilled, UiBell, UiBellFilled, UiBellSlash, UiBellSlashFilled, UiBinary, UiBinaryFilled, UiBlueKey, UiBlueKeyDark, UiBoolean, UiBox, UiBoxFilled, UiBoxes, UiBoxesFilled, UiBraces, UiBrain, UiBrainFilled, UiBreakpoint, UiBreakpoint1, UiBreakpoint1Dark, UiBreakpoint2, UiBreakpoint2Dark, UiBreakpoint3, UiBreakpoint3Dark, UiBreakpoint4, UiBreakpoint4Dark, UiBreakpointDisabled, UiBreakpointField, UiBreakpointMethod, UiBroadcast, UiBroadcastFilled, UiBug, UiBugFilled, UiCache, UiCalculator, UiCalendar, UiCalendarBlank, UiCalendarBlankFilled, UiCalendarCheck, UiCalendarCheckFilled, UiCalendarFilled, UiCamera, UiCameraFilled, UiCancel, UiCancelFilled, UiChartBar, UiChartBarFilled, UiChartLineUp, UiChartLineUpFilled, UiChartOfAccounts, UiChartOfAccountsFilled, UiChartPie, UiChartPieFilled, UiChatDots, UiChatDotsFilled, UiCheck, UiCheckConstraint, UiCheckConstraintDark, UiCheckFilled, UiChevronDown, UiChevronDownFilled, UiChevronRight, UiChevronRightFilled, UiChevronUp, UiChevronUpFilled, UiChevronsDown, UiChevronsDownFilled, UiChevronsUp, UiChevronsUpFilled, UiChip, UiChipFilled, UiCircleFilled, UiCircleFilledFilled, UiCircleOutline, UiCircleOutlineFilled, UiCircleX, UiCircleXFilled, UiClass, UiClass1, UiClass1Dark, UiClass2, UiClass2Dark, UiClass3, UiClass3Dark, UiClass4, UiClass4Dark, UiClass5, UiClass5Dark, UiClass6, UiClass6Dark, UiClass7, UiClass7Dark, UiClearCash, UiClearCashDark, UiClipboardText, UiClipboardTextFilled, UiClock, UiClockCountdown, UiClockCountdownFilled, UiClockFilled, UiClose, UiCloseFilled, UiCloud, UiCloudDownload, UiCloudDownloadFilled, UiCloudFilled, UiCloudUpload, UiCloudUploadFilled, UiCode2, UiCode2Filled, UiCog, UiCogFilled, UiCoins, UiCoinsFilled, UiCollapseAll, UiCollection, UiCollectionDark, UiCollectionType, UiCollectionTypeDark, UiColumn, UiColumn1, UiColumn1Dark, UiColumn2, UiColumn2Dark, UiColumn3, UiColumn3Dark, UiColumn4, UiColumn4Dark, UiColumn5, UiColumn5Dark, UiColumnDark, UiColumns, UiColumnsFilled, UiCommand, UiCommandFilled, UiComment, UiCompass, UiCompassFilled, UiConfig, UiConfigFilled, UiConfigMap, UiConfigMapDark, UiConnector, UiConnectorDark, UiConstant, UiConstant1, UiConstant1Dark, UiConstructor, UiConverter, UiConverter1, UiConverter1Dark, UiConverterDark, UiCopy, UiCopyFilled, UiCreateConstraint, UiCreateConstraintDark, UiCurrencyDollar, UiCurrencyDollarFilled, UiCursorClick, UiCursorClickFilled, UiCursorText, UiCursorTextFilled, UiCustomResource, UiCustomResourceDark, UiDataSchema, UiDataSchemaDark, UiDataShare, UiDataShareDark, UiDatabase, UiDatabaseCheck, UiDatabaseCheckFilled, UiDatabaseCross, UiDatabaseCrossFilled, UiDatabaseDown, UiDatabaseDownFilled, UiDatabaseError, UiDatabaseErrorFilled, UiDatabaseEventStream, UiDatabaseFilled, UiDatabaseInfo, UiDatabaseInfoFilled, UiDatabaseLink, UiDatabaseLinkDark, UiDatabaseMinus, UiDatabaseMinusFilled, UiDatabasePending, UiDatabasePendingFilled, UiDatabasePlus, UiDatabasePlusFilled, UiDatabaseTrash, UiDatabaseTrashFilled, UiDatabaseUp, UiDatabaseUpFilled, UiDatabaseWarning, UiDatabaseWarningFilled, UiDatabaseZap, UiDebug, UiDebugContinue, UiDebugDisabled, UiDebugDisabledDark, UiDebugFilled, UiDebugSelection, UiDebugSelectionDark, UiDebugSmall, UiDebugStepInto, UiDebugStepOut, UiDebugStepOver, UiDebugStop, UiDecorator, UiDeploy, UiDeployDark, UiDesktop, UiDesktopFilled, UiDetach, UiDetachDark, UiDiagramDiff, UiDiagramDiffDark, UiDiff, UiDotsVertical, UiDotsVerticalFilled, UiDownload, UiDownloadFilled, UiDumpThreads, UiDumpThreadsDark, UiEdit, UiEditFilled, UiEditMode, UiEditModeDark, UiEllipsis, UiEllipsisBold, UiEllipsisFilled, UiEndpoint, UiEnum, UiEnumMember, UiEnvelope, UiEnvelopeFilled, UiError, UiEvaluateExpression, UiEvaluateExpressionDark, UiEvent, UiException, UiExceptionAnalyzerImportant, UiExceptionAnalyzerImportantDark, UiExceptionDark, UiExcludedGenerated, UiExcludedGeneratedDark, UiExpandAll, UiExport, UiExtension, UiExtensionDark, UiExternalLink, UiEye, UiEyeClosed, UiEyeClosedFilled, UiEyeFilled, UiFactory, UiFactoryFilled, UiFailedInProgress, UiFailedInProgressDark, UiFastForwardCircle, UiFastForwardCircleFilled, UiField, UiField1, UiField1Dark, UiField2, UiField2Dark, UiField3, UiField3Dark, UiField4, UiField4Dark, UiField5, UiField5Dark, UiField6, UiField6Dark, UiFieldProtected, UiFieldReadAccess, UiFieldType, UiFieldWriteAccess, UiFile, UiFileCode, UiFileCodeFilled, UiFileCog, UiFileFilled, UiFileFormat, UiFileFormatDark, UiFileJson, UiFilePlus, UiFilePlusFilled, UiFileSearch, UiFileSpreadsheet, UiFileText, UiFileTextFilled, UiFileType, UiFilter, UiFilterFilled, UiFingerprint, UiFingerprintFilled, UiFolder, UiFolderFilled, UiFolderGit, UiFolderGit2, UiFolderGit2Filled, UiFolderGitFilled, UiForeignServer, UiForeignServerDark, UiForm, UiFormFilled, UiFreemarker, UiFreemarkerDark, UiFullscreen, UiFullscreenFilled, UiFunction, UiFunction1, UiFunction1Dark, UiFunction2, UiFunction2Dark, UiFunction3, UiFunction3Dark, UiFunction4, UiFunction4Dark, UiFunctionSquare, UiFunctionSquareFilled, UiFunnelData, UiFunnelDataFilled, UiGavel, UiGavelFilled, UiGearSix, UiGearSixFilled, UiGitBranch, UiGitBranchFilled, UiGitCommit, UiGitCommitFilled, UiGitGraph, UiGitGraphFilled, UiGitMerge, UiGitMergeFilled, UiGitPr, UiGitPrFilled, UiGlobe, UiGraph, UiGraphFilled, UiGreyKey, UiGreyKeyDark, UiGrid, UiGridFilled, UiGroupByModuleGroup, UiGroupByModuleGroupDark, UiGroupByPackage, UiGroupByPackageDark, UiGroupByTestProduction, UiGroupByTestProductionDark, UiHandCoins, UiHandCoinsFilled, UiHandPalm, UiHandPalmFilled, UiHardDrive, UiHibernate, UiHibernateDark, UiHibernateEvent, UiHibernateEventDark, UiHistory, UiHistoryFilled, UiHome, UiHomeFilled, UiHourglass, UiHourglassFilled, UiHubot, UiHubotFilled, UiId, UiIdDark, UiIdentificationCard, UiIdentificationCardFilled, UiImage, UiImageFilled, UiImport, UiInbox, UiInboxFilled, UiIndex, UiIndex1, UiIndex1Dark, UiIndex2, UiIndex2Dark, UiIndex3, UiIndex3Dark, UiIndex4, UiIndex4Dark, UiIndex5, UiIndex5Dark, UiIndex6, UiIndex6Dark, UiIndexDark, UiInfo, UiInfoFilled, UiInsightAvailability, UiInsightAvailabilityFilled, UiInsightCompliance, UiInsightCost, UiInsightCostFilled, UiInsightIntegration, UiInsightPerformance, UiInsightPerformanceFilled, UiInsightRecommendation, UiInsightRecommendationFilled, UiInsightReliability, UiInsightReliabilityFilled, UiInsightSecurity, UiInsightSecurityFilled, UiInsightTechnicalDebt, UiInsightTechnicalDebtFilled, UiInspectionsGrammar, UiInspectionsGrammarDark, UiInterface, UiInvoice, UiInvoiceFilled, UiJpaAttribute, UiJpaId, UiJpaRelationship, UiJson, UiKanban, UiKanbanFilled, UiKey, UiKeyFilled, UiKeyboard, UiKeyboardFilled, UiKeyword, UiKillDataSourceProcess, UiKillDataSourceProcessDark, UiKubeConfigMap, UiKubeDeployment, UiKubeJob, UiKubeNamespace, UiKubePod, UiLambda, UiLangJava, UiLangJavascript, UiLangPython, UiLayers, UiLayoutDashboard, UiLayoutDashboardFilled, UiLedger, UiLedgerFilled, UiLightbulb, UiLightbulbFilled, UiLink, UiLinkExternal, UiLinkExternalFilled, UiLinkFilled, UiListChecks, UiListChecksFilled, UiListDashes, UiListDashesFilled, UiListFlat, UiListFlatFilled, UiListOrdered, UiListTree, UiListTreeFilled, UiLoader, UiLoaderFilled, UiLocation, UiLocationFilled, UiLock, UiLockFilled, UiLockKey, UiLockKeyFilled, UiLockOpen, UiLockOpenFilled, UiLogoAnthropic, UiLogoClaude, UiLogoDeepseek, UiLogoEslint, UiLogoGemini, UiLogoGo, UiLogoGoogle, UiLogoHuggingface, UiLogoJest, UiLogoMarkdown, UiLogoMeta, UiLogoMistral, UiLogoOllama, UiLogoOpenai, UiLogoOxc, UiLogoPerplexity, UiLogoPlaywright, UiLogoPython, UiLogoReact, UiLogoRuff, UiLogoTypescript, UiLogoVitest, UiMagicWand, UiMagicWandFilled, UiMarkdown, UiMaterializedLog, UiMaterializedLogDark, UiMemoryProfile, UiMemoryStick, UiMenu, UiMenuFilled, UiMessageQueue, UiMessageQueue1, UiMessageQueue1Dark, UiMethod, UiMethod1, UiMethod10, UiMethod10Dark, UiMethod11, UiMethod11Dark, UiMethod1Dark, UiMethod2, UiMethod2Dark, UiMethod3, UiMethod3Dark, UiMethod4, UiMethod4Dark, UiMethod5, UiMethod5Dark, UiMethod6, UiMethod6Dark, UiMethod7, UiMethod7Dark, UiMethod8, UiMethod8Dark, UiMethod9, UiMethod9Dark, UiModels, UiModelsDark, UiModule, UiModule1, UiModule1Dark, UiMoon, UiMoonFilled, UiName, UiNameDark, UiNamespace, UiNetwork, UiNetworkFilled, UiNull, UiNumeric, UiObject, UiOpenBlock, UiOpenBlockDark, UiOpenScad, UiOperator, UiOperator1, UiOperator1Dark, UiOrganization, UiOrganizationCheck, UiOrganizationCheckFilled, UiOrganizationCross, UiOrganizationCrossFilled, UiOrganizationFilled, UiOrganizationMinus, UiOrganizationMinusFilled, UiOrganizationPlus, UiOrganizationPlusFilled, UiPackage, UiPackageFilled, UiPalette, UiPaletteFilled, UiParameter, UiPartition, UiPartitionDark, UiPass, UiPassFilled, UiPause, UiPauseCircle, UiPauseCircleFilled, UiPencilSimpleLine, UiPencilSimpleLineFilled, UiPending, UiPendingDark, UiPercent, UiPhone, UiPhoneFilled, UiPlay, UiPlayCircle, UiPlayCircleFilled, UiPlaybook, UiPlug, UiPluginModule, UiPluginModuleDark, UiPluginV2, UiPluginV2Dark, UiPlugsConnected, UiPlugsConnectedFilled, UiPointcut, UiPointcutDark, UiProcedure, UiProcedureDark, UiProfile, UiProfile1, UiProfile1Dark, UiProfile2, UiProfile2Dark, UiProfile3, UiProfile3Dark, UiProfile4, UiProfile4Dark, UiProfileDark, UiProfiler, UiProfilerBackTrace, UiProfilerMergeCallees, UiProhibit, UiProhibitFilled, UiProjectStructure, UiProjectStructureDark, UiProjection, UiProjectionDark, UiProperty, UiPulse, UiPulseFilled, UiPuzzle, UiPuzzleFilled, UiQuestion, UiQuestionFilled, UiQueue, UiQueueFilled, UiReadAccess, UiReadAccessDark, UiReceipt, UiReceiptFilled, UiRecord, UiRecord1, UiRecord1Dark, UiRefresh, UiRefreshFilled, UiRegex, UiRegexDark, UiRelationship, UiRelationshipDark, UiRelay, UiRelayDark, UiRemove, UiRemoveFilled, UiRepeat, UiRepeatFilled, UiResizeVertical, UiResizeVerticalFilled, UiRestart, UiRobotAi, UiRobotAiFilled, UiRocket, UiRocketFilled, UiRole, UiRoleDark, UiRollback, UiRollbackDark, UiRoute, UiRouteFilled, UiRoutine, UiRoutineDark, UiRows, UiRowsFilled, UiRun, UiRun1, UiRun10, UiRun10Dark, UiRun11, UiRun11Dark, UiRun12, UiRun12Dark, UiRun13, UiRun13Dark, UiRun14, UiRun14Dark, UiRun1Dark, UiRun2, UiRun2Dark, UiRun3, UiRun3Dark, UiRun4, UiRun4Dark, UiRun5, UiRun5Dark, UiRun6, UiRun6Dark, UiRun7, UiRun7Dark, UiRun8, UiRun8Dark, UiRun9, UiRun9Dark, UiRunDark, UiSave, UiSaveFilled, UiScale, UiScan, UiScanFilled, UiScroll, UiScrollFilled, UiSealCheck, UiSealCheckFilled, UiSearch, UiSecurityRole, UiSecurityRoleDark, UiSelect, UiSelectFilled, UiSequence, UiSequence1, UiSequence1Dark, UiSequence2, UiSequence2Dark, UiSequence3, UiSequence3Dark, UiSequence4, UiSequence4Dark, UiSequenceDark, UiServer, UiServerProcess, UiServerProcessFilled, UiSetKey, UiSetKeyDark, UiSeverityBlocker, UiSeverityBlockerFilled, UiSeverityCritical, UiSeverityCriticalFilled, UiSeverityHigh, UiSeverityHighFilled, UiSeverityInfo, UiSeverityInfoFilled, UiSeverityLow, UiSeverityLowFilled, UiSeverityMedium, UiSeverityMediumFilled, UiSeverityWarning, UiSeverityWarningFilled, UiShare, UiShareFilled, UiShield, UiShieldCheck, UiShieldCheckFilled, UiShieldCross, UiShieldCrossFilled, UiShieldFilled, UiShieldInfo, UiShieldInfoFilled, UiShieldMinus, UiShieldMinusFilled, UiShieldPending, UiShieldPendingFilled, UiShieldPlus, UiShieldPlusFilled, UiShieldSlash, UiShieldSlashFilled, UiShieldWarning, UiShieldWarningFilled, UiShipWheel, UiShortcutFilter, UiShortcutFilterDark, UiShowCurrentFrame, UiShowCurrentFrameDark, UiShowMembers, UiShowMembersDark, UiShowToImplement, UiShowToImplementDark, UiSidebar, UiSidebarFilled, UiSigma, UiSignIn, UiSignInFilled, UiSignOut, UiSignOutFilled, UiSiren, UiSirenFilled, UiSkipForward, UiSkipForwardFilled, UiSkull, UiSkullFilled, UiSliders, UiSlidersFilled, UiSortAlphabetically, UiSortAlphabeticallyDark, UiSortByType, UiSortByTypeDark, UiSortByUsage, UiSortByUsageDark, UiSortByVisibility, UiSortByVisibilityDark, UiSparkles, UiSparklesFilled, UiSpeaker, UiSpeakerFilled, UiSpringBoot, UiSpringBootDark, UiSqlArray, UiSqlColumn, UiSqlConstraint, UiSqlDatabase, UiSqlForeignKey, UiSqlFunction, UiSqlIndex, UiSqlPrimaryKey, UiSqlQuery, UiSqlSchema, UiSqlSequence, UiSqlStoredProc, UiSqlTable, UiSqlTableFilled, UiSqlTrigger, UiSqlView, UiSquare, UiSquareFilled, UiStack, UiStackFilled, UiStackFrameDot, UiStackTrace, UiStar, UiStarFilled, UiStartTimer, UiStartTimerDark, UiStatic, UiStaticDark, UiStep, UiStep1, UiStep1Dark, UiStep2, UiStep2Dark, UiStep3, UiStep3Dark, UiStep4, UiStep4Dark, UiStep5, UiStep5Dark, UiStep6, UiStep6Dark, UiStep7, UiStep7Dark, UiStep8, UiStep8Dark, UiStep9, UiStep9Dark, UiStepDark, UiSteps, UiStepsFilled, UiStop, UiStrategy, UiStrategyFilled, UiStream, UiStreamDark, UiStreamKey, UiStreamKeyDark, UiString, UiStruct, UiSubmitDB, UiSubmitDBDark, UiSubscription, UiSubscriptionDark, UiSun, UiSunFilled, UiSwap, UiSymbol, UiSymbolDark, UiSync, UiTable, UiTable1, UiTable10, UiTable10Dark, UiTable11, UiTable11Dark, UiTable12, UiTable12Dark, UiTable1Dark, UiTable2, UiTable2Dark, UiTable3, UiTable3Dark, UiTable4, UiTable4Dark, UiTable5, UiTable5Dark, UiTable6, UiTable6Dark, UiTable7, UiTable7Dark, UiTable8, UiTable8Dark, UiTable9, UiTable9Dark, UiTableFilled, UiTableProperties, UiTablePropertiesFilled, UiTag, UiTagFilled, UiTax, UiTaxFilled, UiTemplate, UiTemplateDark, UiTerminal, UiTerminalFilled, UiTest, UiTest1, UiTest1Dark, UiTest2, UiTest2Dark, UiTest3, UiTest3Dark, UiTest4, UiTest4Dark, UiTest5, UiTest5Dark, UiTest6, UiTest6Dark, UiTest7, UiTest7Dark, UiText, UiTextDark, UiThermometer, UiThermometerFilled, UiThumbsDown, UiThumbsDownFilled, UiThumbsUp, UiThumbsUpFilled, UiTimer, UiTimerFilled, UiToggleOff, UiToggleOffFilled, UiToggleOn, UiToggleOnFilled, UiTrait, UiTransactionStart, UiTransactionStartDark, UiTrash, UiTrashFilled, UiTrendDown, UiTrendDownFilled, UiTrendUp, UiTrendUpFilled, UiTypeAlias, UiTypeParameter, UiTypeScriptIndexSignature, UiTypeScriptIndexSignatureDark, UiUndeploy, UiUndeployDark, UiUnknown, UiUpload, UiUploadFilled, UiUser, UiUserCheck, UiUserCheckFilled, UiUserCircle, UiUserCircleCheck, UiUserCircleCheckFilled, UiUserCircleFilled, UiUserCircleMinus, UiUserCircleMinusFilled, UiUserCirclePlus, UiUserCirclePlusFilled, UiUserCog, UiUserFilled, UiUserGear, UiUserGearFilled, UiUserMinus, UiUserMinusFilled, UiUserPlus, UiUserPlusFilled, UiUsersFour, UiUsersFourFilled, UiUsersThree, UiUsersThreeCheck, UiUsersThreeCheckFilled, UiUsersThreeCross, UiUsersThreeCrossFilled, UiUsersThreeFilled, UiUsersThreeMinus, UiUsersThreeMinusFilled, UiUsersThreePlus, UiUsersThreePlusFilled, UiVariable, UiVariable1, UiVariable1Dark, UiVariable2, UiVariable2Dark, UiVariable3, UiVariable3Dark, UiVariable4, UiVariable4Dark, UiVariable5, UiVariable5Dark, UiVariable6, UiVariable6Dark, UiVideo, UiVideoFilled, UiVirtualForeignKey, UiVirtualForeignKeyDark, UiWarningCircle, UiWarningCircleFilled, UiWarningTriangle, UiWarningTriangleFilled, UiWatch, UiWatchFilled, UiWebArtifact, UiWebArtifactDark, UiWebServiceClient, UiWebServiceClientDark, UiWorkflow, UiWrench, UiWrenchFilled, UiWriteAccess, UiWriteAccessDark, UiXpath, UiXpath1, UiXpath1Dark, UiXpathDark, UiZap, UiZapFilled, UiZoomIn, UiZoomInFilled, UiZoomOut, UiZoomOutFilled, VerificationResults, Version, WorkloadCard, aggregateProfile, aggregateStatusCounts, allGroupsTerminal, annotateRoutePaths, answerPrompt, applyFixtureFrontmatterRaw, applyFixtureFrontmatterState, applyTaskOutputDelta, armedFacets, assertCalloutValue, assignAxes, attemptStatus, badgeVariants, baseAccess as baseCallGraphAccess, bucketTasks, buildBrief, buildLintTree, buildMarkdownPreviewUrl, buildNodeBrief, buildNodeJson, buildProcessForest, buildSchemaTree, buildSchemaViewerTree, buildStepBranchTree, cacheQueryKeys, callGraphGroupFacts, calloutVariantStyles, callsItself, changeIconAliases, chooseTimestampFormat, clickyFormatForMarkdownPreview, clickyIconProvider, clockTime, collapseSingleChildChains, collectFolderLintStats, collectFrameworks, collectLintLinters, collectTreeKeys, columnsLayout, compactStackPath, computeLineDiff, countGoroutinesByState, countLintByLinter, countLintBySeverity, countObjectGraphNodes, countProcesses, countStackByState, countThreadsByState, cpuTone, createCacheClient, createCacheRegistry, createChecklistMarkdown, createFenceMarkdown, createTestRunnerRegistry, cycleFilterState, dataMemberAside, dataNodeBacking, dataNodeGlyph, dataNodeStatus, debugCaptureHeaders, debugConsoleAvailable, debugConsoleOpen, decodeFilterState, deriveProgressBars, detectDumpFormat, diskSeries, emptyLintFilters, emptyTaskStreams, emptyTestFilters, emptyVerifySummary, encodeFilterState, exchangeToHarEntry, expandAllTree, facetCountSeries, filterStateToRecord, filterTests, findLintNode, findNodeByRoutePath, findProcessByPID, fixtureFenceKind, fixtureFenceSchemaAliases, fixtureFenceSnippetInfo, fixtureFrontmatterState, flattenForest, folderPattern, formatExclude as formatCallGraphExclude, formatCount, formatCpuPercent, formatDateTimeRelative, formatDelay, formatExportValue, formatGitCommitDateHeader, formatMatrixDuration, formatProcessTimestamp, formatProfileValue, formatPropertyLabel, formatRelativeTime, formatReplicaCounts, formatServerTimingDuration, formatStatementDuration, formatTestDuration, formatTimestamp, frameHasSource, frameLocation, genericCopySections, getChangeIcon, getVersionInfo, groupRecords, groupStatements, hasFailed, hasHoverMeta, hasPending, humanizeName, iconsByConsumerName, inferColumns, interfaceMethods, isApplicationStackFrame, isAttemptLive, isDataMember, isDataNode, isFailedOrWarn, isFlatMetadata, isGroupCollapsedByDefault, isLeaf, isLinterErrored, isMetadataLink, isProcessExited, isRuntimeFrame, isTerminalStatus, latestFacetReading, latestOf, lintFileActions, lintFolderActions, lintNodeActions, lintNodeCount, lintNodeSeverity, logLevelColor, markdownDocumentStats, matchesExclude as matchesCallGraphExclude, matchesFilterState, matrixBarClass, matrixMarkKey, memoryTone, mergeAccess, mergeGraph as mergeCallGraph, mergeCopySections, mergeSeries, metadataEntries, mockMarkdownPreview, modeToFormat, normalizeErrorDiagnostics, normalizeLogsTableRows, normalizeStatus, normalizeTags, outcomeFor, parseBoundsValue, parseExclude as parseCallGraphExclude, parseCast, parseDiagnosticsStackTrace, parseDurationBoundsValue, parseFixtureFrontmatter, parseFixtureYaml, parseGoroutineDump, parseInlineJsonContextValue, parseJavaStackTrace, parseJvmThreadDump, parseMultiFilterValue, parseServerTiming, parseStackDump, parseTimestamp, parseUnifiedDiff, policySummary, prefixAdapter, processLabel, processLifetimeMs, processSeries, processStateColor, processStateIcon, profileValueTypes, programmingIconCatalog, pruneExitedProcesses, pruneNullNodes, readStepDetail, recordToFilterState, registerDebugConsole, repeatsMark, resolveBreakdown, resolveFixtureFenceSchema, resolveSelectionActionDisplay, resolveSeries, revealDebugConsole, ringLayout, routeEdges, schemaKeys, segment, serializeBoundsValue, serializeDurationBoundsValue, serializeMultiFilterValue, seriesStats, serverColumnsToDataTableColumns, serverFiltersToFilterBar, serverTimingCounterSummary, serverTimingMetricLabel, setDebugCaptureLevel, setDebugConsoleOpen, setDebugRefreshInspection, setFallbackIconProvider, shortFrameName, slugify, splitCommaValues, splitSelectionActions, splitTagToken, stackCheckpoints, stacksThrough, statusToneFor, stringifyFixtureYaml, subscribeToDebugConsole, sum, sumNonTaskTests, summarizeVerifyNodes, tagActionsFromRecord, tagFilterTokens, taskGroupErrorCount, taskGroupErrors, taskGroupJson, taskGroupMarkdown, taskMarkdown, taskQueryKeys, taskSegments, taskStatusBg, taskStatusColor, taskStatusIcon, testAttemptViews, testStatus, toggleAccess as toggleCallGraphAccess, toolKeyFor, toolMark, totalDuration, totalLintViolations, updateFilterSelection, useClickyExport, useDebugAction, usePrompts, useSelectDetailTab, useTagActions, useTagActionsValue, useTestRunner, verificationAdapters, verifyNodeTest, verifyReportCounts, verifyReportTests, violationIgnoreAction, visibleTreeRows, withTaskStreams, workloadKindLabel, workloadStatusLabel, workloadStatusTone, workloadTypeLabel };
@@ -13,13 +13,15 @@ function hasEventSource() {
13
13
  return typeof globalThis !== "undefined" && typeof globalThis.EventSource !== "undefined";
14
14
  }
15
15
  function useTaskRun(options = {}) {
16
- const { id, ids, kind, basePath = DEFAULT_BASE, enabled = true, pollMs = DEFAULT_POLL_MS, forcePoll = false } = options;
16
+ const { id, ids, kind, basePath = DEFAULT_BASE, enabled = true, pollMs = DEFAULT_POLL_MS, forcePoll = false, headers } = options;
17
+ const headersKey = JSON.stringify(headers ?? {});
17
18
  const runIdsKey = (ids?.filter(Boolean) ?? (id ? [id] : [])).join(",");
18
19
  const subscriptionKey = JSON.stringify([
19
20
  runIdsKey,
20
21
  kind ?? "",
21
22
  basePath,
22
- enabled
23
+ enabled,
24
+ headersKey
23
25
  ]);
24
26
  const [stateKey, setStateKey] = (0, react.useState)(subscriptionKey);
25
27
  const [byId, setById] = (0, react.useState)({});
@@ -30,6 +32,7 @@ function useTaskRun(options = {}) {
30
32
  const eventSourceFactoryRef = (0, react.useRef)(eventSourceFactory);
31
33
  eventSourceFactoryRef.current = eventSourceFactory;
32
34
  (0, react.useEffect)(() => {
35
+ const requestHeaders = JSON.parse(headersKey);
33
36
  const runIds = runIdsKey ? runIdsKey.split(",") : [];
34
37
  setStateKey(subscriptionKey);
35
38
  if (!enabled || runIds.length === 0 && !kind) {
@@ -59,12 +62,15 @@ function useTaskRun(options = {}) {
59
62
  [delta.id]: require_task_streams.applyTaskOutputDelta(prev[delta.id] ?? require_task_streams.emptyTaskStreams, delta)
60
63
  }));
61
64
  };
62
- if (forcePoll || !hasEventSource()) {
65
+ if (forcePoll || headersKey !== "{}" || !hasEventSource()) {
63
66
  let stopped = false;
64
67
  let timer;
65
68
  const tick = async () => {
66
69
  try {
67
- const responses = await Promise.all(runIds.map((runId) => fetch(`${basePath}/tasks/${encodeURIComponent(runId)}`, { headers: { Accept: "application/json" } })));
70
+ const responses = await Promise.all(runIds.map((runId) => fetch(`${basePath}/tasks/${encodeURIComponent(runId)}`, { headers: {
71
+ Accept: "application/json",
72
+ ...requestHeaders
73
+ } })));
68
74
  if (responses.some((response) => !response.ok)) throw new Error("Task request failed");
69
75
  if (responses.every((response) => response.ok)) {
70
76
  const snaps = (await Promise.all(responses.map(async (response) => await response.json()))).flat();
@@ -119,7 +125,8 @@ function useTaskRun(options = {}) {
119
125
  basePath,
120
126
  enabled,
121
127
  pollMs,
122
- forcePoll
128
+ forcePoll,
129
+ headersKey
123
130
  ]);
124
131
  const current = stateKey === subscriptionKey;
125
132
  return {
@@ -133,7 +140,8 @@ function useTaskRun(options = {}) {
133
140
  };
134
141
  }
135
142
  function useTaskRuns(options = {}) {
136
- const { kind, status: statusFilter, labels, basePath = DEFAULT_BASE, enabled = true, pollMs = DEFAULT_POLL_MS, forcePoll = false } = options;
143
+ const { kind, status: statusFilter, labels, basePath = DEFAULT_BASE, enabled = true, pollMs = DEFAULT_POLL_MS, forcePoll = false, headers } = options;
144
+ const headersKey = JSON.stringify(headers ?? {});
137
145
  const [received, setReceived] = (0, react.useState)({
138
146
  key: null,
139
147
  runs: []
@@ -144,6 +152,7 @@ function useTaskRuns(options = {}) {
144
152
  eventSourceFactoryRef.current = eventSourceFactory;
145
153
  (0, react.useEffect)(() => {
146
154
  if (!enabled) return;
155
+ const requestHeaders = JSON.parse(headersKey);
147
156
  const params = new URLSearchParams();
148
157
  if (kind) params.set("kind", kind);
149
158
  if (statusFilter) params.set("status", statusFilter);
@@ -159,12 +168,15 @@ function useTaskRuns(options = {}) {
159
168
  key: requestKey,
160
169
  runs: next
161
170
  });
162
- if (forcePoll || !hasEventSource()) {
171
+ if (forcePoll || headersKey !== "{}" || !hasEventSource()) {
163
172
  let stopped = false;
164
173
  let timer;
165
174
  const tick = async () => {
166
175
  try {
167
- const res = await fetch(`${basePath}/tasks${query ? `?${query}` : ""}`, { headers: { Accept: "application/json" } });
176
+ const res = await fetch(`${basePath}/tasks${query ? `?${query}` : ""}`, { headers: {
177
+ Accept: "application/json",
178
+ ...requestHeaders
179
+ } });
168
180
  if (!res.ok) throw new Error(`Task listing failed with ${res.status}`);
169
181
  if (res.ok) {
170
182
  const next = await res.json();
@@ -203,7 +215,8 @@ function useTaskRuns(options = {}) {
203
215
  basePath,
204
216
  enabled,
205
217
  pollMs,
206
- forcePoll
218
+ forcePoll,
219
+ headersKey
207
220
  ]);
208
221
  return {
209
222
  runs: received.runs,
@@ -1 +1 @@
1
- {"version":3,"file":"use-task-run.cjs","names":["useState","useEventSourceFactory","useRef","applyTaskOutputDelta","emptyTaskStreams","allGroupsTerminal","useMemo","withTaskStreams","taskQueryKeys"],"sources":["../../src/hooks/use-task-run.ts"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from \"react\";\nimport {\n allGroupsTerminal,\n type TaskRunMeta,\n type TaskSnapshot,\n} from \"../data/TaskSnapshot\";\nimport {\n applyTaskOutputDelta,\n emptyTaskStreams,\n type TaskOutputDelta,\n type TaskStreams,\n withTaskStreams,\n} from \"../data/task-streams\";\nimport { taskQueryKeys } from \"../data/task-query-keys\";\nimport { useEventSourceFactory } from \"./event-source\";\n\n// use-task-run / use-task-runs are the generic clicky-ui task clients. They are\n// SSE-first: they subscribe to clicky's SSEHandler (event: task / event: done)\n// and fall back to polling the JSON endpoints only when EventSource is\n// unavailable. They speak only TaskSnapshot / TaskRunMeta — no app concepts.\n\nexport interface TaskTransportOptions {\n /** Base path of the clicky task API, e.g. \"/api/v1\". */\n basePath?: string | undefined;\n /** Disable the subscription entirely (e.g. before an id is known). */\n enabled?: boolean | undefined;\n /** Poll interval (ms) for the fallback / runs listing. */\n pollMs?: number | undefined;\n /** Force the polling transport even when EventSource exists (mainly tests). */\n forcePoll?: boolean | undefined;\n}\n\nconst DEFAULT_BASE = \"/api/v1\";\nconst DEFAULT_POLL_MS = 2_000;\n\nfunction streamUrl(base: string, query: string): string {\n return `${base}/tasks/stream${query ? `?${query}` : \"\"}`;\n}\n\nfunction hasEventSource(): boolean {\n return typeof globalThis !== \"undefined\" && typeof globalThis.EventSource !== \"undefined\";\n}\n\nexport interface UseTaskRunResult {\n snapshots: TaskSnapshot[];\n status: string;\n isComplete: boolean;\n}\n\nexport interface UseTaskRunOptions extends TaskTransportOptions {\n /** Stable run id to follow (drill-down). Mutually exclusive with ids/kind. */\n id?: string | undefined;\n /** Stable run ids to follow together. Mutually exclusive with id/kind. */\n ids?: string[] | undefined;\n /** Follow every run of a kind. */\n kind?: string | undefined;\n}\n\n// useTaskRun follows one or more runs (by id) or a kind, SSE-first. It accumulates the\n// latest snapshot per task/group id and reports completion once every group is\n// terminal.\nexport function useTaskRun(options: UseTaskRunOptions = {}): UseTaskRunResult {\n const {\n id,\n ids,\n kind,\n basePath = DEFAULT_BASE,\n enabled = true,\n pollMs = DEFAULT_POLL_MS,\n forcePoll = false,\n } = options;\n const runIdsKey = (ids?.filter(Boolean) ?? (id ? [id] : [])).join(\",\");\n // State is reset in an effect, so the first render after the subscription\n // changes still holds the previous run's snapshots and completion; stateKey\n // hides them until the reset lands.\n const subscriptionKey = JSON.stringify([runIdsKey, kind ?? \"\", basePath, enabled]);\n const [stateKey, setStateKey] = useState(subscriptionKey);\n\n const [byId, setById] = useState<Record<string, TaskSnapshot>>({});\n // Streams are held beside the snapshots, never inside them: a task frame\n // replaces its snapshot wholesale and would take the accumulated output with\n // it. See ../data/task-streams.\n const [streamsById, setStreamsById] = useState<Record<string, TaskStreams>>({});\n const [status, setStatus] = useState(\"idle\");\n const [isComplete, setIsComplete] = useState(false);\n\n // Read through a ref so a host's inline `value={(url) => ...}` factory prop\n // does not restart the subscription every render — only the effect's own\n // deps below do that.\n const eventSourceFactory = useEventSourceFactory();\n const eventSourceFactoryRef = useRef(eventSourceFactory);\n eventSourceFactoryRef.current = eventSourceFactory;\n\n useEffect(() => {\n const runIds = runIdsKey ? runIdsKey.split(\",\") : [];\n setStateKey(subscriptionKey);\n if (!enabled || (runIds.length === 0 && !kind)) {\n setById({});\n setStreamsById({});\n setStatus(\"idle\");\n setIsComplete(false);\n return;\n }\n setById({});\n setStreamsById({});\n setIsComplete(false);\n\n const params = new URLSearchParams();\n if (runIds.length > 0) params.set(\"tasks\", runIdsKey);\n if (kind) params.set(\"kind\", kind);\n const query = params.toString();\n\n const merge = (incoming: TaskSnapshot[]) => {\n setById((prev) => {\n const next = { ...prev };\n for (const snap of incoming) next[snap.type === \"group\" ? `group:${snap.groupId ?? snap.id}` : snap.id] = snap;\n return next;\n });\n };\n\n // Deltas are applied whether or not the task frame has landed yet: the\n // stream is keyed by task id on its own, so output that arrives first is\n // held rather than dropped.\n const mergeOutput = (delta: TaskOutputDelta) => {\n setStreamsById((prev) => ({\n ...prev,\n [delta.id]: applyTaskOutputDelta(prev[delta.id] ?? emptyTaskStreams, delta),\n }));\n };\n\n // Polling fallback transport.\n if (forcePoll || !hasEventSource()) {\n let stopped = false;\n let timer: ReturnType<typeof setTimeout> | undefined;\n const tick = async () => {\n try {\n const responses = await Promise.all(runIds.map((runId) => fetch(\n `${basePath}/tasks/${encodeURIComponent(runId)}`,\n { headers: { Accept: \"application/json\" } },\n )));\n if (responses.some((response) => !response.ok)) throw new Error(\"Task request failed\");\n if (responses.every((response) => response.ok)) {\n const snaps = (await Promise.all(responses.map(\n async (response) => (await response.json()) as TaskSnapshot[],\n ))).flat();\n if (stopped) return;\n merge(snaps);\n setStatus(\"polling\");\n if (allGroupsTerminal(snaps)) {\n setIsComplete(true);\n return; // stop polling\n }\n }\n } catch {\n if (!stopped) setStatus(\"connection lost — retrying\");\n }\n if (!stopped) timer = setTimeout(tick, pollMs);\n };\n void tick();\n return () => {\n stopped = true;\n if (timer) clearTimeout(timer);\n };\n }\n\n // SSE transport (default).\n const es = eventSourceFactoryRef.current(streamUrl(basePath, query));\n setStatus(\"connecting\");\n es.onopen = () => setStatus(\"connected\");\n es.addEventListener(\"task\", (e) => {\n try {\n merge([JSON.parse((e as MessageEvent).data) as TaskSnapshot]);\n setStatus(\"connected\");\n } catch {\n setStatus(\"invalid task stream data\");\n }\n });\n es.addEventListener(\"output\", (e) => {\n try {\n mergeOutput(JSON.parse((e as MessageEvent).data) as TaskOutputDelta);\n } catch {\n setStatus(\"invalid task output data\");\n }\n });\n es.addEventListener(\"done\", () => {\n setStatus(\"complete\");\n setIsComplete(true);\n es.close();\n });\n es.onerror = () => setStatus(\"connection lost — retrying\");\n return () => es.close();\n }, [subscriptionKey, runIdsKey, kind, basePath, enabled, pollMs, forcePoll]);\n\n const current = stateKey === subscriptionKey;\n // The streams are merged back in only here, at the boundary. The polling\n // fallback never populates them — its JSON snapshots already carry the full\n // output — so this is a no-op on that transport.\n const snapshots = useMemo(\n () => current\n ? Object.values(byId).map((snapshot) => withTaskStreams(snapshot, streamsById[snapshot.id]))\n : [],\n [current, byId, streamsById],\n );\n\n return { snapshots, status: current ? status : \"idle\", isComplete: current && isComplete };\n}\n\nexport interface UseTaskRunsOptions extends TaskTransportOptions {\n kind?: string | undefined;\n status?: string | undefined;\n /** Label equality filters (k=v). */\n labels?: Record<string, string> | undefined;\n}\n\n/** The identity of the listing request that produced a given `runs` array. */\nexport type TaskRunsKey = ReturnType<typeof taskQueryKeys.runs>;\n\nexport interface UseTaskRunsResult {\n runs: TaskRunMeta[];\n status: string;\n /**\n * Query key of the request that actually produced `runs`, or null before the\n * first frame arrives. Changing `kind`/`status`/`labels` re-subscribes but\n * keeps the previous listing on screen until the new transport delivers, so\n * this key lags `taskQueryKeys.runs(options)` during that window. A consumer\n * mirroring `runs` into a cache must compare the two and skip the write while\n * they differ, or it publishes rows that do not match the requested filters.\n */\n runsKey: TaskRunsKey | null;\n}\n\n// useTaskRuns lists all runs (TaskRunMeta) for the manager view. It is SSE-first:\n// it subscribes to clicky's runs stream (event: runs carrying the full listing)\n// and falls back to polling the JSON runs endpoint only when EventSource is\n// unavailable or forced off. The listing has no completion terminal of its own —\n// a manager view stays subscribed to observe new and changing runs.\nexport function useTaskRuns(options: UseTaskRunsOptions = {}): UseTaskRunsResult {\n const {\n kind,\n status: statusFilter,\n labels,\n basePath = DEFAULT_BASE,\n enabled = true,\n pollMs = DEFAULT_POLL_MS,\n forcePoll = false,\n } = options;\n\n // Runs are stored together with the key of the request that delivered them, so\n // a stale listing can never be mistaken for the current filters' result.\n const [received, setReceived] = useState<{\n key: TaskRunsKey | null;\n runs: TaskRunMeta[];\n }>({ key: null, runs: [] });\n const [status, setStatus] = useState(\"idle\");\n\n const eventSourceFactory = useEventSourceFactory();\n const eventSourceFactoryRef = useRef(eventSourceFactory);\n eventSourceFactoryRef.current = eventSourceFactory;\n\n useEffect(() => {\n if (!enabled) return;\n\n const params = new URLSearchParams();\n if (kind) params.set(\"kind\", kind);\n if (statusFilter) params.set(\"status\", statusFilter);\n for (const [k, v] of Object.entries(labels ?? {})) params.append(\"label\", `${k}=${v}`);\n const query = params.toString();\n const requestKey = taskQueryKeys.runs({ basePath, kind, status: statusFilter, labels });\n const receive = (next: TaskRunMeta[]) => setReceived({ key: requestKey, runs: next });\n\n // Polling fallback transport.\n if (forcePoll || !hasEventSource()) {\n let stopped = false;\n let timer: ReturnType<typeof setTimeout> | undefined;\n const tick = async () => {\n try {\n const res = await fetch(`${basePath}/tasks${query ? `?${query}` : \"\"}`, {\n headers: { Accept: \"application/json\" },\n });\n if (!res.ok) throw new Error(`Task listing failed with ${res.status}`);\n if (res.ok) {\n const next = (await res.json()) as TaskRunMeta[];\n if (stopped) return;\n receive(next);\n setStatus(\"polling\");\n }\n } catch {\n if (!stopped) setStatus(\"connection lost — retrying\");\n }\n if (!stopped) timer = setTimeout(tick, pollMs);\n };\n void tick();\n return () => {\n stopped = true;\n if (timer) clearTimeout(timer);\n };\n }\n\n // SSE transport (default).\n const es = eventSourceFactoryRef.current(`${basePath}/tasks/runs/stream${query ? `?${query}` : \"\"}`);\n setStatus(\"connecting\");\n es.onopen = () => setStatus(\"connected\");\n es.addEventListener(\"runs\", (e) => {\n try {\n receive(JSON.parse((e as MessageEvent).data) as TaskRunMeta[]);\n setStatus(\"connected\");\n } catch {\n setStatus(\"invalid task listing data\");\n }\n });\n es.onerror = () => setStatus(\"connection lost — retrying\");\n return () => es.close();\n }, [kind, statusFilter, JSON.stringify(labels ?? {}), basePath, enabled, pollMs, forcePoll]);\n\n return { runs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IAAI,CAAC,SAAS,QAAQ,WAAW,MAAM,MAAM;GAC/C;GACA,KAAU;GACV,aAAa;IACX,UAAU;IACV,IAAI,OAAO,aAAa,KAAK;GAC/B;EACF;EAGA,MAAM,KAAK,sBAAsB,QAAQ,GAAG,SAAS,oBAAoB,QAAQ,IAAI,UAAU,IAAI;EACnG,UAAU,YAAY;EACtB,GAAG,eAAe,UAAU,WAAW;EACvC,GAAG,iBAAiB,SAAS,MAAM;GACjC,IAAI;IACF,QAAQ,KAAK,MAAO,EAAmB,IAAI,CAAkB;IAC7D,UAAU,WAAW;GACvB,QAAQ;IACN,UAAU,2BAA2B;GACvC;EACF,CAAC;EACD,GAAG,gBAAgB,UAAU,4BAA4B;EACzD,aAAa,GAAG,MAAM;CACxB,GAAG;EAAC;EAAM;EAAc,KAAK,UAAU,UAAU,CAAC,CAAC;EAAG;EAAU;EAAS;EAAQ;CAAS,CAAC;CAE3F,OAAO;EAAE,MAAM,SAAS;EAAM;EAAQ,SAAS,SAAS;CAAI;AAC9D"}
1
+ {"version":3,"file":"use-task-run.cjs","names":["useState","useEventSourceFactory","useRef","applyTaskOutputDelta","emptyTaskStreams","allGroupsTerminal","useMemo","withTaskStreams","taskQueryKeys"],"sources":["../../src/hooks/use-task-run.ts"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from \"react\";\nimport {\n allGroupsTerminal,\n type TaskRunMeta,\n type TaskSnapshot,\n} from \"../data/TaskSnapshot\";\nimport {\n applyTaskOutputDelta,\n emptyTaskStreams,\n type TaskOutputDelta,\n type TaskStreams,\n withTaskStreams,\n} from \"../data/task-streams\";\nimport { taskQueryKeys } from \"../data/task-query-keys\";\nimport { useEventSourceFactory } from \"./event-source\";\n\n// use-task-run / use-task-runs are the generic clicky-ui task clients. They are\n// SSE-first: they subscribe to clicky's SSEHandler (event: task / event: done)\n// and fall back to polling the JSON endpoints only when EventSource is\n// unavailable. They speak only TaskSnapshot / TaskRunMeta — no app concepts.\n\nexport interface TaskTransportOptions {\n /** Base path of the clicky task API, e.g. \"/api/v1\". */\n basePath?: string | undefined;\n /** Disable the subscription entirely (e.g. before an id is known). */\n enabled?: boolean | undefined;\n /** Poll interval (ms) for the fallback / runs listing. */\n pollMs?: number | undefined;\n /** Force the polling transport even when EventSource exists (mainly tests). */\n forcePoll?: boolean | undefined;\n /** Headers for context-scoped task endpoints. Supplying headers uses polling. */\n headers?: Record<string, string> | undefined;\n}\n\nconst DEFAULT_BASE = \"/api/v1\";\nconst DEFAULT_POLL_MS = 2_000;\n\nfunction streamUrl(base: string, query: string): string {\n return `${base}/tasks/stream${query ? `?${query}` : \"\"}`;\n}\n\nfunction hasEventSource(): boolean {\n return typeof globalThis !== \"undefined\" && typeof globalThis.EventSource !== \"undefined\";\n}\n\nexport interface UseTaskRunResult {\n snapshots: TaskSnapshot[];\n status: string;\n isComplete: boolean;\n}\n\nexport interface UseTaskRunOptions extends TaskTransportOptions {\n /** Stable run id to follow (drill-down). Mutually exclusive with ids/kind. */\n id?: string | undefined;\n /** Stable run ids to follow together. Mutually exclusive with id/kind. */\n ids?: string[] | undefined;\n /** Follow every run of a kind. */\n kind?: string | undefined;\n}\n\n// useTaskRun follows one or more runs (by id) or a kind, SSE-first. It accumulates the\n// latest snapshot per task/group id and reports completion once every group is\n// terminal.\nexport function useTaskRun(options: UseTaskRunOptions = {}): UseTaskRunResult {\n const {\n id,\n ids,\n kind,\n basePath = DEFAULT_BASE,\n enabled = true,\n pollMs = DEFAULT_POLL_MS,\n forcePoll = false,\n headers,\n } = options;\n const headersKey = JSON.stringify(headers ?? {});\n const runIdsKey = (ids?.filter(Boolean) ?? (id ? [id] : [])).join(\",\");\n // State is reset in an effect, so the first render after the subscription\n // changes still holds the previous run's snapshots and completion; stateKey\n // hides them until the reset lands.\n const subscriptionKey = JSON.stringify([runIdsKey, kind ?? \"\", basePath, enabled, headersKey]);\n const [stateKey, setStateKey] = useState(subscriptionKey);\n\n const [byId, setById] = useState<Record<string, TaskSnapshot>>({});\n // Streams are held beside the snapshots, never inside them: a task frame\n // replaces its snapshot wholesale and would take the accumulated output with\n // it. See ../data/task-streams.\n const [streamsById, setStreamsById] = useState<Record<string, TaskStreams>>({});\n const [status, setStatus] = useState(\"idle\");\n const [isComplete, setIsComplete] = useState(false);\n\n // Read through a ref so a host's inline `value={(url) => ...}` factory prop\n // does not restart the subscription every render — only the effect's own\n // deps below do that.\n const eventSourceFactory = useEventSourceFactory();\n const eventSourceFactoryRef = useRef(eventSourceFactory);\n eventSourceFactoryRef.current = eventSourceFactory;\n\n useEffect(() => {\n const requestHeaders = JSON.parse(headersKey) as Record<string, string>;\n const runIds = runIdsKey ? runIdsKey.split(\",\") : [];\n setStateKey(subscriptionKey);\n if (!enabled || (runIds.length === 0 && !kind)) {\n setById({});\n setStreamsById({});\n setStatus(\"idle\");\n setIsComplete(false);\n return;\n }\n setById({});\n setStreamsById({});\n setIsComplete(false);\n\n const params = new URLSearchParams();\n if (runIds.length > 0) params.set(\"tasks\", runIdsKey);\n if (kind) params.set(\"kind\", kind);\n const query = params.toString();\n\n const merge = (incoming: TaskSnapshot[]) => {\n setById((prev) => {\n const next = { ...prev };\n for (const snap of incoming) next[snap.type === \"group\" ? `group:${snap.groupId ?? snap.id}` : snap.id] = snap;\n return next;\n });\n };\n\n // Deltas are applied whether or not the task frame has landed yet: the\n // stream is keyed by task id on its own, so output that arrives first is\n // held rather than dropped.\n const mergeOutput = (delta: TaskOutputDelta) => {\n setStreamsById((prev) => ({\n ...prev,\n [delta.id]: applyTaskOutputDelta(prev[delta.id] ?? emptyTaskStreams, delta),\n }));\n };\n\n // Polling fallback transport.\n if (forcePoll || headersKey !== \"{}\" || !hasEventSource()) {\n let stopped = false;\n let timer: ReturnType<typeof setTimeout> | undefined;\n const tick = async () => {\n try {\n const responses = await Promise.all(runIds.map((runId) => fetch(\n `${basePath}/tasks/${encodeURIComponent(runId)}`,\n { headers: { Accept: \"application/json\", ...requestHeaders } },\n )));\n if (responses.some((response) => !response.ok)) throw new Error(\"Task request failed\");\n if (responses.every((response) => response.ok)) {\n const snaps = (await Promise.all(responses.map(\n async (response) => (await response.json()) as TaskSnapshot[],\n ))).flat();\n if (stopped) return;\n merge(snaps);\n setStatus(\"polling\");\n if (allGroupsTerminal(snaps)) {\n setIsComplete(true);\n return; // stop polling\n }\n }\n } catch {\n if (!stopped) setStatus(\"connection lost — retrying\");\n }\n if (!stopped) timer = setTimeout(tick, pollMs);\n };\n void tick();\n return () => {\n stopped = true;\n if (timer) clearTimeout(timer);\n };\n }\n\n // SSE transport (default).\n const es = eventSourceFactoryRef.current(streamUrl(basePath, query));\n setStatus(\"connecting\");\n es.onopen = () => setStatus(\"connected\");\n es.addEventListener(\"task\", (e) => {\n try {\n merge([JSON.parse((e as MessageEvent).data) as TaskSnapshot]);\n setStatus(\"connected\");\n } catch {\n setStatus(\"invalid task stream data\");\n }\n });\n es.addEventListener(\"output\", (e) => {\n try {\n mergeOutput(JSON.parse((e as MessageEvent).data) as TaskOutputDelta);\n } catch {\n setStatus(\"invalid task output data\");\n }\n });\n es.addEventListener(\"done\", () => {\n setStatus(\"complete\");\n setIsComplete(true);\n es.close();\n });\n es.onerror = () => setStatus(\"connection lost — retrying\");\n return () => es.close();\n }, [subscriptionKey, runIdsKey, kind, basePath, enabled, pollMs, forcePoll, headersKey]);\n\n const current = stateKey === subscriptionKey;\n // The streams are merged back in only here, at the boundary. The polling\n // fallback never populates them — its JSON snapshots already carry the full\n // output — so this is a no-op on that transport.\n const snapshots = useMemo(\n () => current\n ? Object.values(byId).map((snapshot) => withTaskStreams(snapshot, streamsById[snapshot.id]))\n : [],\n [current, byId, streamsById],\n );\n\n return { snapshots, status: current ? status : \"idle\", isComplete: current && isComplete };\n}\n\nexport interface UseTaskRunsOptions extends TaskTransportOptions {\n kind?: string | undefined;\n status?: string | undefined;\n /** Label equality filters (k=v). */\n labels?: Record<string, string> | undefined;\n}\n\n/** The identity of the listing request that produced a given `runs` array. */\nexport type TaskRunsKey = ReturnType<typeof taskQueryKeys.runs>;\n\nexport interface UseTaskRunsResult {\n runs: TaskRunMeta[];\n status: string;\n /**\n * Query key of the request that actually produced `runs`, or null before the\n * first frame arrives. Changing `kind`/`status`/`labels` re-subscribes but\n * keeps the previous listing on screen until the new transport delivers, so\n * this key lags `taskQueryKeys.runs(options)` during that window. A consumer\n * mirroring `runs` into a cache must compare the two and skip the write while\n * they differ, or it publishes rows that do not match the requested filters.\n */\n runsKey: TaskRunsKey | null;\n}\n\n// useTaskRuns lists all runs (TaskRunMeta) for the manager view. It is SSE-first:\n// it subscribes to clicky's runs stream (event: runs carrying the full listing)\n// and falls back to polling the JSON runs endpoint only when EventSource is\n// unavailable or forced off. The listing has no completion terminal of its own —\n// a manager view stays subscribed to observe new and changing runs.\nexport function useTaskRuns(options: UseTaskRunsOptions = {}): UseTaskRunsResult {\n const {\n kind,\n status: statusFilter,\n labels,\n basePath = DEFAULT_BASE,\n enabled = true,\n pollMs = DEFAULT_POLL_MS,\n forcePoll = false,\n headers,\n } = options;\n const headersKey = JSON.stringify(headers ?? {});\n\n // Runs are stored together with the key of the request that delivered them, so\n // a stale listing can never be mistaken for the current filters' result.\n const [received, setReceived] = useState<{\n key: TaskRunsKey | null;\n runs: TaskRunMeta[];\n }>({ key: null, runs: [] });\n const [status, setStatus] = useState(\"idle\");\n\n const eventSourceFactory = useEventSourceFactory();\n const eventSourceFactoryRef = useRef(eventSourceFactory);\n eventSourceFactoryRef.current = eventSourceFactory;\n\n useEffect(() => {\n if (!enabled) return;\n const requestHeaders = JSON.parse(headersKey) as Record<string, string>;\n\n const params = new URLSearchParams();\n if (kind) params.set(\"kind\", kind);\n if (statusFilter) params.set(\"status\", statusFilter);\n for (const [k, v] of Object.entries(labels ?? {})) params.append(\"label\", `${k}=${v}`);\n const query = params.toString();\n const requestKey = taskQueryKeys.runs({ basePath, kind, status: statusFilter, labels });\n const receive = (next: TaskRunMeta[]) => setReceived({ key: requestKey, runs: next });\n\n // Polling fallback transport.\n if (forcePoll || headersKey !== \"{}\" || !hasEventSource()) {\n let stopped = false;\n let timer: ReturnType<typeof setTimeout> | undefined;\n const tick = async () => {\n try {\n const res = await fetch(`${basePath}/tasks${query ? `?${query}` : \"\"}`, {\n headers: { Accept: \"application/json\", ...requestHeaders },\n });\n if (!res.ok) throw new Error(`Task listing failed with ${res.status}`);\n if (res.ok) {\n const next = (await res.json()) as TaskRunMeta[];\n if (stopped) return;\n receive(next);\n setStatus(\"polling\");\n }\n } catch {\n if (!stopped) setStatus(\"connection lost — retrying\");\n }\n if (!stopped) timer = setTimeout(tick, pollMs);\n };\n void tick();\n return () => {\n stopped = true;\n if (timer) clearTimeout(timer);\n };\n }\n\n // SSE transport (default).\n const es = eventSourceFactoryRef.current(`${basePath}/tasks/runs/stream${query ? `?${query}` : \"\"}`);\n setStatus(\"connecting\");\n es.onopen = () => setStatus(\"connected\");\n es.addEventListener(\"runs\", (e) => {\n try {\n receive(JSON.parse((e as MessageEvent).data) as TaskRunMeta[]);\n setStatus(\"connected\");\n } catch {\n setStatus(\"invalid task listing data\");\n }\n });\n es.onerror = () => setStatus(\"connection lost — retrying\");\n return () => es.close();\n }, [kind, statusFilter, JSON.stringify(labels ?? {}), basePath, enabled, pollMs, forcePoll, headersKey]);\n\n return { runs: received.runs, status, runsKey: received.key };\n}\n"],"mappings":";;;;;;AAkCA,IAAM,eAAe;AACrB,IAAM,kBAAkB;AAExB,SAAS,UAAU,MAAc,OAAuB;CACtD,OAAO,GAAG,KAAK,eAAe,QAAQ,IAAI,UAAU;AACtD;AAEA,SAAS,iBAA0B;CACjC,OAAO,OAAO,eAAe,eAAe,OAAO,WAAW,gBAAgB;AAChF;AAoBA,SAAgB,WAAW,UAA6B,CAAC,GAAqB;CAC5E,MAAM,EACJ,IACA,KACA,MACA,WAAW,cACX,UAAU,MACV,SAAS,iBACT,YAAY,OACZ,YACE;CACJ,MAAM,aAAa,KAAK,UAAU,WAAW,CAAC,CAAC;CAC/C,MAAM,aAAa,KAAK,OAAO,OAAO,MAAM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AAU,YAAY;EACtB,GAAG,eAAe,UAAU,WAAW;EACvC,GAAG,iBAAiB,SAAS,MAAM;GACjC,IAAI;IACF,QAAQ,KAAK,MAAO,EAAmB,IAAI,CAAkB;IAC7D,UAAU,WAAW;GACvB,QAAQ;IACN,UAAU,2BAA2B;GACvC;EACF,CAAC;EACD,GAAG,gBAAgB,UAAU,4BAA4B;EACzD,aAAa,GAAG,MAAM;CACxB,GAAG;EAAC;EAAM;EAAc,KAAK,UAAU,UAAU,CAAC,CAAC;EAAG;EAAU;EAAS;EAAQ;EAAW;CAAU,CAAC;CAEvG,OAAO;EAAE,MAAM,SAAS;EAAM;EAAQ,SAAS,SAAS;CAAI;AAC9D"}
@@ -9,6 +9,8 @@ export interface TaskTransportOptions {
9
9
  pollMs?: number | undefined;
10
10
  /** Force the polling transport even when EventSource exists (mainly tests). */
11
11
  forcePoll?: boolean | undefined;
12
+ /** Headers for context-scoped task endpoints. Supplying headers uses polling. */
13
+ headers?: Record<string, string> | undefined;
12
14
  }
13
15
  export interface UseTaskRunResult {
14
16
  snapshots: TaskSnapshot[];
@@ -1 +1 @@
1
- {"version":3,"file":"use-task-run.d.ts","sourceRoot":"","sources":["../../src/hooks/use-task-run.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAQ9B,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAQxD,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,sEAAsE;IACtE,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,+EAA+E;IAC/E,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACjC;AAaD,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,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AAE,WAAW,GAAG,IAAI,CAAC;CAC7B;AAOD,wBAAgB,WAAW,CAAC,OAAO,GAAE,kBAAuB,GAAG,iBAAiB,CAkF/E"}
@@ -13,13 +13,15 @@ function hasEventSource() {
13
13
  return typeof globalThis !== "undefined" && typeof globalThis.EventSource !== "undefined";
14
14
  }
15
15
  function useTaskRun(options = {}) {
16
- const { id, ids, kind, basePath = DEFAULT_BASE, enabled = true, pollMs = DEFAULT_POLL_MS, forcePoll = false } = options;
16
+ const { id, ids, kind, basePath = DEFAULT_BASE, enabled = true, pollMs = DEFAULT_POLL_MS, forcePoll = false, headers } = options;
17
+ const headersKey = JSON.stringify(headers ?? {});
17
18
  const runIdsKey = (ids?.filter(Boolean) ?? (id ? [id] : [])).join(",");
18
19
  const subscriptionKey = JSON.stringify([
19
20
  runIdsKey,
20
21
  kind ?? "",
21
22
  basePath,
22
- enabled
23
+ enabled,
24
+ headersKey
23
25
  ]);
24
26
  const [stateKey, setStateKey] = useState(subscriptionKey);
25
27
  const [byId, setById] = useState({});
@@ -30,6 +32,7 @@ function useTaskRun(options = {}) {
30
32
  const eventSourceFactoryRef = useRef(eventSourceFactory);
31
33
  eventSourceFactoryRef.current = eventSourceFactory;
32
34
  useEffect(() => {
35
+ const requestHeaders = JSON.parse(headersKey);
33
36
  const runIds = runIdsKey ? runIdsKey.split(",") : [];
34
37
  setStateKey(subscriptionKey);
35
38
  if (!enabled || runIds.length === 0 && !kind) {
@@ -59,12 +62,15 @@ function useTaskRun(options = {}) {
59
62
  [delta.id]: applyTaskOutputDelta(prev[delta.id] ?? emptyTaskStreams, delta)
60
63
  }));
61
64
  };
62
- if (forcePoll || !hasEventSource()) {
65
+ if (forcePoll || headersKey !== "{}" || !hasEventSource()) {
63
66
  let stopped = false;
64
67
  let timer;
65
68
  const tick = async () => {
66
69
  try {
67
- const responses = await Promise.all(runIds.map((runId) => fetch(`${basePath}/tasks/${encodeURIComponent(runId)}`, { headers: { Accept: "application/json" } })));
70
+ const responses = await Promise.all(runIds.map((runId) => fetch(`${basePath}/tasks/${encodeURIComponent(runId)}`, { headers: {
71
+ Accept: "application/json",
72
+ ...requestHeaders
73
+ } })));
68
74
  if (responses.some((response) => !response.ok)) throw new Error("Task request failed");
69
75
  if (responses.every((response) => response.ok)) {
70
76
  const snaps = (await Promise.all(responses.map(async (response) => await response.json()))).flat();
@@ -119,7 +125,8 @@ function useTaskRun(options = {}) {
119
125
  basePath,
120
126
  enabled,
121
127
  pollMs,
122
- forcePoll
128
+ forcePoll,
129
+ headersKey
123
130
  ]);
124
131
  const current = stateKey === subscriptionKey;
125
132
  return {
@@ -133,7 +140,8 @@ function useTaskRun(options = {}) {
133
140
  };
134
141
  }
135
142
  function useTaskRuns(options = {}) {
136
- const { kind, status: statusFilter, labels, basePath = DEFAULT_BASE, enabled = true, pollMs = DEFAULT_POLL_MS, forcePoll = false } = options;
143
+ const { kind, status: statusFilter, labels, basePath = DEFAULT_BASE, enabled = true, pollMs = DEFAULT_POLL_MS, forcePoll = false, headers } = options;
144
+ const headersKey = JSON.stringify(headers ?? {});
137
145
  const [received, setReceived] = useState({
138
146
  key: null,
139
147
  runs: []
@@ -144,6 +152,7 @@ function useTaskRuns(options = {}) {
144
152
  eventSourceFactoryRef.current = eventSourceFactory;
145
153
  useEffect(() => {
146
154
  if (!enabled) return;
155
+ const requestHeaders = JSON.parse(headersKey);
147
156
  const params = new URLSearchParams();
148
157
  if (kind) params.set("kind", kind);
149
158
  if (statusFilter) params.set("status", statusFilter);
@@ -159,12 +168,15 @@ function useTaskRuns(options = {}) {
159
168
  key: requestKey,
160
169
  runs: next
161
170
  });
162
- if (forcePoll || !hasEventSource()) {
171
+ if (forcePoll || headersKey !== "{}" || !hasEventSource()) {
163
172
  let stopped = false;
164
173
  let timer;
165
174
  const tick = async () => {
166
175
  try {
167
- const res = await fetch(`${basePath}/tasks${query ? `?${query}` : ""}`, { headers: { Accept: "application/json" } });
176
+ const res = await fetch(`${basePath}/tasks${query ? `?${query}` : ""}`, { headers: {
177
+ Accept: "application/json",
178
+ ...requestHeaders
179
+ } });
168
180
  if (!res.ok) throw new Error(`Task listing failed with ${res.status}`);
169
181
  if (res.ok) {
170
182
  const next = await res.json();
@@ -203,7 +215,8 @@ function useTaskRuns(options = {}) {
203
215
  basePath,
204
216
  enabled,
205
217
  pollMs,
206
- forcePoll
218
+ forcePoll,
219
+ headersKey
207
220
  ]);
208
221
  return {
209
222
  runs: received.runs,
@@ -1 +1 @@
1
- {"version":3,"file":"use-task-run.js","names":[],"sources":["../../src/hooks/use-task-run.ts"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from \"react\";\nimport {\n allGroupsTerminal,\n type TaskRunMeta,\n type TaskSnapshot,\n} from \"../data/TaskSnapshot\";\nimport {\n applyTaskOutputDelta,\n emptyTaskStreams,\n type TaskOutputDelta,\n type TaskStreams,\n withTaskStreams,\n} from \"../data/task-streams\";\nimport { taskQueryKeys } from \"../data/task-query-keys\";\nimport { useEventSourceFactory } from \"./event-source\";\n\n// use-task-run / use-task-runs are the generic clicky-ui task clients. They are\n// SSE-first: they subscribe to clicky's SSEHandler (event: task / event: done)\n// and fall back to polling the JSON endpoints only when EventSource is\n// unavailable. They speak only TaskSnapshot / TaskRunMeta — no app concepts.\n\nexport interface TaskTransportOptions {\n /** Base path of the clicky task API, e.g. \"/api/v1\". */\n basePath?: string | undefined;\n /** Disable the subscription entirely (e.g. before an id is known). */\n enabled?: boolean | undefined;\n /** Poll interval (ms) for the fallback / runs listing. */\n pollMs?: number | undefined;\n /** Force the polling transport even when EventSource exists (mainly tests). */\n forcePoll?: boolean | undefined;\n}\n\nconst DEFAULT_BASE = \"/api/v1\";\nconst DEFAULT_POLL_MS = 2_000;\n\nfunction streamUrl(base: string, query: string): string {\n return `${base}/tasks/stream${query ? `?${query}` : \"\"}`;\n}\n\nfunction hasEventSource(): boolean {\n return typeof globalThis !== \"undefined\" && typeof globalThis.EventSource !== \"undefined\";\n}\n\nexport interface UseTaskRunResult {\n snapshots: TaskSnapshot[];\n status: string;\n isComplete: boolean;\n}\n\nexport interface UseTaskRunOptions extends TaskTransportOptions {\n /** Stable run id to follow (drill-down). Mutually exclusive with ids/kind. */\n id?: string | undefined;\n /** Stable run ids to follow together. Mutually exclusive with id/kind. */\n ids?: string[] | undefined;\n /** Follow every run of a kind. */\n kind?: string | undefined;\n}\n\n// useTaskRun follows one or more runs (by id) or a kind, SSE-first. It accumulates the\n// latest snapshot per task/group id and reports completion once every group is\n// terminal.\nexport function useTaskRun(options: UseTaskRunOptions = {}): UseTaskRunResult {\n const {\n id,\n ids,\n kind,\n basePath = DEFAULT_BASE,\n enabled = true,\n pollMs = DEFAULT_POLL_MS,\n forcePoll = false,\n } = options;\n const runIdsKey = (ids?.filter(Boolean) ?? (id ? [id] : [])).join(\",\");\n // State is reset in an effect, so the first render after the subscription\n // changes still holds the previous run's snapshots and completion; stateKey\n // hides them until the reset lands.\n const subscriptionKey = JSON.stringify([runIdsKey, kind ?? \"\", basePath, enabled]);\n const [stateKey, setStateKey] = useState(subscriptionKey);\n\n const [byId, setById] = useState<Record<string, TaskSnapshot>>({});\n // Streams are held beside the snapshots, never inside them: a task frame\n // replaces its snapshot wholesale and would take the accumulated output with\n // it. See ../data/task-streams.\n const [streamsById, setStreamsById] = useState<Record<string, TaskStreams>>({});\n const [status, setStatus] = useState(\"idle\");\n const [isComplete, setIsComplete] = useState(false);\n\n // Read through a ref so a host's inline `value={(url) => ...}` factory prop\n // does not restart the subscription every render — only the effect's own\n // deps below do that.\n const eventSourceFactory = useEventSourceFactory();\n const eventSourceFactoryRef = useRef(eventSourceFactory);\n eventSourceFactoryRef.current = eventSourceFactory;\n\n useEffect(() => {\n const runIds = runIdsKey ? runIdsKey.split(\",\") : [];\n setStateKey(subscriptionKey);\n if (!enabled || (runIds.length === 0 && !kind)) {\n setById({});\n setStreamsById({});\n setStatus(\"idle\");\n setIsComplete(false);\n return;\n }\n setById({});\n setStreamsById({});\n setIsComplete(false);\n\n const params = new URLSearchParams();\n if (runIds.length > 0) params.set(\"tasks\", runIdsKey);\n if (kind) params.set(\"kind\", kind);\n const query = params.toString();\n\n const merge = (incoming: TaskSnapshot[]) => {\n setById((prev) => {\n const next = { ...prev };\n for (const snap of incoming) next[snap.type === \"group\" ? `group:${snap.groupId ?? snap.id}` : snap.id] = snap;\n return next;\n });\n };\n\n // Deltas are applied whether or not the task frame has landed yet: the\n // stream is keyed by task id on its own, so output that arrives first is\n // held rather than dropped.\n const mergeOutput = (delta: TaskOutputDelta) => {\n setStreamsById((prev) => ({\n ...prev,\n [delta.id]: applyTaskOutputDelta(prev[delta.id] ?? emptyTaskStreams, delta),\n }));\n };\n\n // Polling fallback transport.\n if (forcePoll || !hasEventSource()) {\n let stopped = false;\n let timer: ReturnType<typeof setTimeout> | undefined;\n const tick = async () => {\n try {\n const responses = await Promise.all(runIds.map((runId) => fetch(\n `${basePath}/tasks/${encodeURIComponent(runId)}`,\n { headers: { Accept: \"application/json\" } },\n )));\n if (responses.some((response) => !response.ok)) throw new Error(\"Task request failed\");\n if (responses.every((response) => response.ok)) {\n const snaps = (await Promise.all(responses.map(\n async (response) => (await response.json()) as TaskSnapshot[],\n ))).flat();\n if (stopped) return;\n merge(snaps);\n setStatus(\"polling\");\n if (allGroupsTerminal(snaps)) {\n setIsComplete(true);\n return; // stop polling\n }\n }\n } catch {\n if (!stopped) setStatus(\"connection lost — retrying\");\n }\n if (!stopped) timer = setTimeout(tick, pollMs);\n };\n void tick();\n return () => {\n stopped = true;\n if (timer) clearTimeout(timer);\n };\n }\n\n // SSE transport (default).\n const es = eventSourceFactoryRef.current(streamUrl(basePath, query));\n setStatus(\"connecting\");\n es.onopen = () => setStatus(\"connected\");\n es.addEventListener(\"task\", (e) => {\n try {\n merge([JSON.parse((e as MessageEvent).data) as TaskSnapshot]);\n setStatus(\"connected\");\n } catch {\n setStatus(\"invalid task stream data\");\n }\n });\n es.addEventListener(\"output\", (e) => {\n try {\n mergeOutput(JSON.parse((e as MessageEvent).data) as TaskOutputDelta);\n } catch {\n setStatus(\"invalid task output data\");\n }\n });\n es.addEventListener(\"done\", () => {\n setStatus(\"complete\");\n setIsComplete(true);\n es.close();\n });\n es.onerror = () => setStatus(\"connection lost — retrying\");\n return () => es.close();\n }, [subscriptionKey, runIdsKey, kind, basePath, enabled, pollMs, forcePoll]);\n\n const current = stateKey === subscriptionKey;\n // The streams are merged back in only here, at the boundary. The polling\n // fallback never populates them — its JSON snapshots already carry the full\n // output — so this is a no-op on that transport.\n const snapshots = useMemo(\n () => current\n ? Object.values(byId).map((snapshot) => withTaskStreams(snapshot, streamsById[snapshot.id]))\n : [],\n [current, byId, streamsById],\n );\n\n return { snapshots, status: current ? status : \"idle\", isComplete: current && isComplete };\n}\n\nexport interface UseTaskRunsOptions extends TaskTransportOptions {\n kind?: string | undefined;\n status?: string | undefined;\n /** Label equality filters (k=v). */\n labels?: Record<string, string> | undefined;\n}\n\n/** The identity of the listing request that produced a given `runs` array. */\nexport type TaskRunsKey = ReturnType<typeof taskQueryKeys.runs>;\n\nexport interface UseTaskRunsResult {\n runs: TaskRunMeta[];\n status: string;\n /**\n * Query key of the request that actually produced `runs`, or null before the\n * first frame arrives. Changing `kind`/`status`/`labels` re-subscribes but\n * keeps the previous listing on screen until the new transport delivers, so\n * this key lags `taskQueryKeys.runs(options)` during that window. A consumer\n * mirroring `runs` into a cache must compare the two and skip the write while\n * they differ, or it publishes rows that do not match the requested filters.\n */\n runsKey: TaskRunsKey | null;\n}\n\n// useTaskRuns lists all runs (TaskRunMeta) for the manager view. It is SSE-first:\n// it subscribes to clicky's runs stream (event: runs carrying the full listing)\n// and falls back to polling the JSON runs endpoint only when EventSource is\n// unavailable or forced off. The listing has no completion terminal of its own —\n// a manager view stays subscribed to observe new and changing runs.\nexport function useTaskRuns(options: UseTaskRunsOptions = {}): UseTaskRunsResult {\n const {\n kind,\n status: statusFilter,\n labels,\n basePath = DEFAULT_BASE,\n enabled = true,\n pollMs = DEFAULT_POLL_MS,\n forcePoll = false,\n } = options;\n\n // Runs are stored together with the key of the request that delivered them, so\n // a stale listing can never be mistaken for the current filters' result.\n const [received, setReceived] = useState<{\n key: TaskRunsKey | null;\n runs: TaskRunMeta[];\n }>({ key: null, runs: [] });\n const [status, setStatus] = useState(\"idle\");\n\n const eventSourceFactory = useEventSourceFactory();\n const eventSourceFactoryRef = useRef(eventSourceFactory);\n eventSourceFactoryRef.current = eventSourceFactory;\n\n useEffect(() => {\n if (!enabled) return;\n\n const params = new URLSearchParams();\n if (kind) params.set(\"kind\", kind);\n if (statusFilter) params.set(\"status\", statusFilter);\n for (const [k, v] of Object.entries(labels ?? {})) params.append(\"label\", `${k}=${v}`);\n const query = params.toString();\n const requestKey = taskQueryKeys.runs({ basePath, kind, status: statusFilter, labels });\n const receive = (next: TaskRunMeta[]) => setReceived({ key: requestKey, runs: next });\n\n // Polling fallback transport.\n if (forcePoll || !hasEventSource()) {\n let stopped = false;\n let timer: ReturnType<typeof setTimeout> | undefined;\n const tick = async () => {\n try {\n const res = await fetch(`${basePath}/tasks${query ? `?${query}` : \"\"}`, {\n headers: { Accept: \"application/json\" },\n });\n if (!res.ok) throw new Error(`Task listing failed with ${res.status}`);\n if (res.ok) {\n const next = (await res.json()) as TaskRunMeta[];\n if (stopped) return;\n receive(next);\n setStatus(\"polling\");\n }\n } catch {\n if (!stopped) setStatus(\"connection lost — retrying\");\n }\n if (!stopped) timer = setTimeout(tick, pollMs);\n };\n void tick();\n return () => {\n stopped = true;\n if (timer) clearTimeout(timer);\n };\n }\n\n // SSE transport (default).\n const es = eventSourceFactoryRef.current(`${basePath}/tasks/runs/stream${query ? `?${query}` : \"\"}`);\n setStatus(\"connecting\");\n es.onopen = () => setStatus(\"connected\");\n es.addEventListener(\"runs\", (e) => {\n try {\n receive(JSON.parse((e as MessageEvent).data) as TaskRunMeta[]);\n setStatus(\"connected\");\n } catch {\n setStatus(\"invalid task listing data\");\n }\n });\n es.onerror = () => setStatus(\"connection lost — retrying\");\n return () => es.close();\n }, [kind, statusFilter, JSON.stringify(labels ?? {}), basePath, enabled, pollMs, forcePoll]);\n\n return { runs: received.runs, status, runsKey: received.key };\n}\n"],"mappings":";;;;;;AAgCA,IAAM,eAAe;AACrB,IAAM,kBAAkB;AAExB,SAAS,UAAU,MAAc,OAAuB;CACtD,OAAO,GAAG,KAAK,eAAe,QAAQ,IAAI,UAAU;AACtD;AAEA,SAAS,iBAA0B;CACjC,OAAO,OAAO,eAAe,eAAe,OAAO,WAAW,gBAAgB;AAChF;AAoBA,SAAgB,WAAW,UAA6B,CAAC,GAAqB;CAC5E,MAAM,EACJ,IACA,KACA,MACA,WAAW,cACX,UAAU,MACV,SAAS,iBACT,YAAY,UACV;CACJ,MAAM,aAAa,KAAK,OAAO,OAAO,MAAM,KAAK,CAAC,EAAE,IAAI,CAAC,GAAA,CAAI,KAAK,GAAG;CAIrE,MAAM,kBAAkB,KAAK,UAAU;EAAC;EAAW,QAAQ;EAAI;EAAU;CAAO,CAAC;CACjF,MAAM,CAAC,UAAU,eAAe,SAAS,eAAe;CAExD,MAAM,CAAC,MAAM,WAAW,SAAuC,CAAC,CAAC;CAIjE,MAAM,CAAC,aAAa,kBAAkB,SAAsC,CAAC,CAAC;CAC9E,MAAM,CAAC,QAAQ,aAAa,SAAS,MAAM;CAC3C,MAAM,CAAC,YAAY,iBAAiB,SAAS,KAAK;CAKlD,MAAM,qBAAqB,sBAAsB;CACjD,MAAM,wBAAwB,OAAO,kBAAkB;CACvD,sBAAsB,UAAU;CAEhC,gBAAgB;EACd,MAAM,SAAS,YAAY,UAAU,MAAM,GAAG,IAAI,CAAC;EACnD,YAAY,eAAe;EAC3B,IAAI,CAAC,WAAY,OAAO,WAAW,KAAK,CAAC,MAAO;GAC9C,QAAQ,CAAC,CAAC;GACV,eAAe,CAAC,CAAC;GACjB,UAAU,MAAM;GAChB,cAAc,KAAK;GACnB;EACF;EACA,QAAQ,CAAC,CAAC;EACV,eAAe,CAAC,CAAC;EACjB,cAAc,KAAK;EAEnB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AiB,SAAS,MAAM;GACjC,IAAI;IACF,QAAQ,KAAK,MAAO,EAAmB,IAAI,CAAkB;IAC7D,UAAU,WAAW;GACvB,QAAQ;IACN,UAAU,2BAA2B;GACvC;EACF,CAAC;EACD,GAAG,gBAAgB,UAAU,4BAA4B;EACzD,aAAa,GAAG,MAAM;CACxB,GAAG;EAAC;EAAM;EAAc,KAAK,UAAU,UAAU,CAAC,CAAC;EAAG;EAAU;EAAS;EAAQ;CAAS,CAAC;CAE3F,OAAO;EAAE,MAAM,SAAS;EAAM;EAAQ,SAAS,SAAS;CAAI;AAC9D"}
1
+ {"version":3,"file":"use-task-run.js","names":[],"sources":["../../src/hooks/use-task-run.ts"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from \"react\";\nimport {\n allGroupsTerminal,\n type TaskRunMeta,\n type TaskSnapshot,\n} from \"../data/TaskSnapshot\";\nimport {\n applyTaskOutputDelta,\n emptyTaskStreams,\n type TaskOutputDelta,\n type TaskStreams,\n withTaskStreams,\n} from \"../data/task-streams\";\nimport { taskQueryKeys } from \"../data/task-query-keys\";\nimport { useEventSourceFactory } from \"./event-source\";\n\n// use-task-run / use-task-runs are the generic clicky-ui task clients. They are\n// SSE-first: they subscribe to clicky's SSEHandler (event: task / event: done)\n// and fall back to polling the JSON endpoints only when EventSource is\n// unavailable. They speak only TaskSnapshot / TaskRunMeta — no app concepts.\n\nexport interface TaskTransportOptions {\n /** Base path of the clicky task API, e.g. \"/api/v1\". */\n basePath?: string | undefined;\n /** Disable the subscription entirely (e.g. before an id is known). */\n enabled?: boolean | undefined;\n /** Poll interval (ms) for the fallback / runs listing. */\n pollMs?: number | undefined;\n /** Force the polling transport even when EventSource exists (mainly tests). */\n forcePoll?: boolean | undefined;\n /** Headers for context-scoped task endpoints. Supplying headers uses polling. */\n headers?: Record<string, string> | undefined;\n}\n\nconst DEFAULT_BASE = \"/api/v1\";\nconst DEFAULT_POLL_MS = 2_000;\n\nfunction streamUrl(base: string, query: string): string {\n return `${base}/tasks/stream${query ? `?${query}` : \"\"}`;\n}\n\nfunction hasEventSource(): boolean {\n return typeof globalThis !== \"undefined\" && typeof globalThis.EventSource !== \"undefined\";\n}\n\nexport interface UseTaskRunResult {\n snapshots: TaskSnapshot[];\n status: string;\n isComplete: boolean;\n}\n\nexport interface UseTaskRunOptions extends TaskTransportOptions {\n /** Stable run id to follow (drill-down). Mutually exclusive with ids/kind. */\n id?: string | undefined;\n /** Stable run ids to follow together. Mutually exclusive with id/kind. */\n ids?: string[] | undefined;\n /** Follow every run of a kind. */\n kind?: string | undefined;\n}\n\n// useTaskRun follows one or more runs (by id) or a kind, SSE-first. It accumulates the\n// latest snapshot per task/group id and reports completion once every group is\n// terminal.\nexport function useTaskRun(options: UseTaskRunOptions = {}): UseTaskRunResult {\n const {\n id,\n ids,\n kind,\n basePath = DEFAULT_BASE,\n enabled = true,\n pollMs = DEFAULT_POLL_MS,\n forcePoll = false,\n headers,\n } = options;\n const headersKey = JSON.stringify(headers ?? {});\n const runIdsKey = (ids?.filter(Boolean) ?? (id ? [id] : [])).join(\",\");\n // State is reset in an effect, so the first render after the subscription\n // changes still holds the previous run's snapshots and completion; stateKey\n // hides them until the reset lands.\n const subscriptionKey = JSON.stringify([runIdsKey, kind ?? \"\", basePath, enabled, headersKey]);\n const [stateKey, setStateKey] = useState(subscriptionKey);\n\n const [byId, setById] = useState<Record<string, TaskSnapshot>>({});\n // Streams are held beside the snapshots, never inside them: a task frame\n // replaces its snapshot wholesale and would take the accumulated output with\n // it. See ../data/task-streams.\n const [streamsById, setStreamsById] = useState<Record<string, TaskStreams>>({});\n const [status, setStatus] = useState(\"idle\");\n const [isComplete, setIsComplete] = useState(false);\n\n // Read through a ref so a host's inline `value={(url) => ...}` factory prop\n // does not restart the subscription every render — only the effect's own\n // deps below do that.\n const eventSourceFactory = useEventSourceFactory();\n const eventSourceFactoryRef = useRef(eventSourceFactory);\n eventSourceFactoryRef.current = eventSourceFactory;\n\n useEffect(() => {\n const requestHeaders = JSON.parse(headersKey) as Record<string, string>;\n const runIds = runIdsKey ? runIdsKey.split(\",\") : [];\n setStateKey(subscriptionKey);\n if (!enabled || (runIds.length === 0 && !kind)) {\n setById({});\n setStreamsById({});\n setStatus(\"idle\");\n setIsComplete(false);\n return;\n }\n setById({});\n setStreamsById({});\n setIsComplete(false);\n\n const params = new URLSearchParams();\n if (runIds.length > 0) params.set(\"tasks\", runIdsKey);\n if (kind) params.set(\"kind\", kind);\n const query = params.toString();\n\n const merge = (incoming: TaskSnapshot[]) => {\n setById((prev) => {\n const next = { ...prev };\n for (const snap of incoming) next[snap.type === \"group\" ? `group:${snap.groupId ?? snap.id}` : snap.id] = snap;\n return next;\n });\n };\n\n // Deltas are applied whether or not the task frame has landed yet: the\n // stream is keyed by task id on its own, so output that arrives first is\n // held rather than dropped.\n const mergeOutput = (delta: TaskOutputDelta) => {\n setStreamsById((prev) => ({\n ...prev,\n [delta.id]: applyTaskOutputDelta(prev[delta.id] ?? emptyTaskStreams, delta),\n }));\n };\n\n // Polling fallback transport.\n if (forcePoll || headersKey !== \"{}\" || !hasEventSource()) {\n let stopped = false;\n let timer: ReturnType<typeof setTimeout> | undefined;\n const tick = async () => {\n try {\n const responses = await Promise.all(runIds.map((runId) => fetch(\n `${basePath}/tasks/${encodeURIComponent(runId)}`,\n { headers: { Accept: \"application/json\", ...requestHeaders } },\n )));\n if (responses.some((response) => !response.ok)) throw new Error(\"Task request failed\");\n if (responses.every((response) => response.ok)) {\n const snaps = (await Promise.all(responses.map(\n async (response) => (await response.json()) as TaskSnapshot[],\n ))).flat();\n if (stopped) return;\n merge(snaps);\n setStatus(\"polling\");\n if (allGroupsTerminal(snaps)) {\n setIsComplete(true);\n return; // stop polling\n }\n }\n } catch {\n if (!stopped) setStatus(\"connection lost — retrying\");\n }\n if (!stopped) timer = setTimeout(tick, pollMs);\n };\n void tick();\n return () => {\n stopped = true;\n if (timer) clearTimeout(timer);\n };\n }\n\n // SSE transport (default).\n const es = eventSourceFactoryRef.current(streamUrl(basePath, query));\n setStatus(\"connecting\");\n es.onopen = () => setStatus(\"connected\");\n es.addEventListener(\"task\", (e) => {\n try {\n merge([JSON.parse((e as MessageEvent).data) as TaskSnapshot]);\n setStatus(\"connected\");\n } catch {\n setStatus(\"invalid task stream data\");\n }\n });\n es.addEventListener(\"output\", (e) => {\n try {\n mergeOutput(JSON.parse((e as MessageEvent).data) as TaskOutputDelta);\n } catch {\n setStatus(\"invalid task output data\");\n }\n });\n es.addEventListener(\"done\", () => {\n setStatus(\"complete\");\n setIsComplete(true);\n es.close();\n });\n es.onerror = () => setStatus(\"connection lost — retrying\");\n return () => es.close();\n }, [subscriptionKey, runIdsKey, kind, basePath, enabled, pollMs, forcePoll, headersKey]);\n\n const current = stateKey === subscriptionKey;\n // The streams are merged back in only here, at the boundary. The polling\n // fallback never populates them — its JSON snapshots already carry the full\n // output — so this is a no-op on that transport.\n const snapshots = useMemo(\n () => current\n ? Object.values(byId).map((snapshot) => withTaskStreams(snapshot, streamsById[snapshot.id]))\n : [],\n [current, byId, streamsById],\n );\n\n return { snapshots, status: current ? status : \"idle\", isComplete: current && isComplete };\n}\n\nexport interface UseTaskRunsOptions extends TaskTransportOptions {\n kind?: string | undefined;\n status?: string | undefined;\n /** Label equality filters (k=v). */\n labels?: Record<string, string> | undefined;\n}\n\n/** The identity of the listing request that produced a given `runs` array. */\nexport type TaskRunsKey = ReturnType<typeof taskQueryKeys.runs>;\n\nexport interface UseTaskRunsResult {\n runs: TaskRunMeta[];\n status: string;\n /**\n * Query key of the request that actually produced `runs`, or null before the\n * first frame arrives. Changing `kind`/`status`/`labels` re-subscribes but\n * keeps the previous listing on screen until the new transport delivers, so\n * this key lags `taskQueryKeys.runs(options)` during that window. A consumer\n * mirroring `runs` into a cache must compare the two and skip the write while\n * they differ, or it publishes rows that do not match the requested filters.\n */\n runsKey: TaskRunsKey | null;\n}\n\n// useTaskRuns lists all runs (TaskRunMeta) for the manager view. It is SSE-first:\n// it subscribes to clicky's runs stream (event: runs carrying the full listing)\n// and falls back to polling the JSON runs endpoint only when EventSource is\n// unavailable or forced off. The listing has no completion terminal of its own —\n// a manager view stays subscribed to observe new and changing runs.\nexport function useTaskRuns(options: UseTaskRunsOptions = {}): UseTaskRunsResult {\n const {\n kind,\n status: statusFilter,\n labels,\n basePath = DEFAULT_BASE,\n enabled = true,\n pollMs = DEFAULT_POLL_MS,\n forcePoll = false,\n headers,\n } = options;\n const headersKey = JSON.stringify(headers ?? {});\n\n // Runs are stored together with the key of the request that delivered them, so\n // a stale listing can never be mistaken for the current filters' result.\n const [received, setReceived] = useState<{\n key: TaskRunsKey | null;\n runs: TaskRunMeta[];\n }>({ key: null, runs: [] });\n const [status, setStatus] = useState(\"idle\");\n\n const eventSourceFactory = useEventSourceFactory();\n const eventSourceFactoryRef = useRef(eventSourceFactory);\n eventSourceFactoryRef.current = eventSourceFactory;\n\n useEffect(() => {\n if (!enabled) return;\n const requestHeaders = JSON.parse(headersKey) as Record<string, string>;\n\n const params = new URLSearchParams();\n if (kind) params.set(\"kind\", kind);\n if (statusFilter) params.set(\"status\", statusFilter);\n for (const [k, v] of Object.entries(labels ?? {})) params.append(\"label\", `${k}=${v}`);\n const query = params.toString();\n const requestKey = taskQueryKeys.runs({ basePath, kind, status: statusFilter, labels });\n const receive = (next: TaskRunMeta[]) => setReceived({ key: requestKey, runs: next });\n\n // Polling fallback transport.\n if (forcePoll || headersKey !== \"{}\" || !hasEventSource()) {\n let stopped = false;\n let timer: ReturnType<typeof setTimeout> | undefined;\n const tick = async () => {\n try {\n const res = await fetch(`${basePath}/tasks${query ? `?${query}` : \"\"}`, {\n headers: { Accept: \"application/json\", ...requestHeaders },\n });\n if (!res.ok) throw new Error(`Task listing failed with ${res.status}`);\n if (res.ok) {\n const next = (await res.json()) as TaskRunMeta[];\n if (stopped) return;\n receive(next);\n setStatus(\"polling\");\n }\n } catch {\n if (!stopped) setStatus(\"connection lost — retrying\");\n }\n if (!stopped) timer = setTimeout(tick, pollMs);\n };\n void tick();\n return () => {\n stopped = true;\n if (timer) clearTimeout(timer);\n };\n }\n\n // SSE transport (default).\n const es = eventSourceFactoryRef.current(`${basePath}/tasks/runs/stream${query ? `?${query}` : \"\"}`);\n setStatus(\"connecting\");\n es.onopen = () => setStatus(\"connected\");\n es.addEventListener(\"runs\", (e) => {\n try {\n receive(JSON.parse((e as MessageEvent).data) as TaskRunMeta[]);\n setStatus(\"connected\");\n } catch {\n setStatus(\"invalid task listing data\");\n }\n });\n es.onerror = () => setStatus(\"connection lost — retrying\");\n return () => es.close();\n }, [kind, statusFilter, JSON.stringify(labels ?? {}), basePath, enabled, pollMs, forcePoll, headersKey]);\n\n return { runs: received.runs, status, runsKey: received.key };\n}\n"],"mappings":";;;;;;AAkCA,IAAM,eAAe;AACrB,IAAM,kBAAkB;AAExB,SAAS,UAAU,MAAc,OAAuB;CACtD,OAAO,GAAG,KAAK,eAAe,QAAQ,IAAI,UAAU;AACtD;AAEA,SAAS,iBAA0B;CACjC,OAAO,OAAO,eAAe,eAAe,OAAO,WAAW,gBAAgB;AAChF;AAoBA,SAAgB,WAAW,UAA6B,CAAC,GAAqB;CAC5E,MAAM,EACJ,IACA,KACA,MACA,WAAW,cACX,UAAU,MACV,SAAS,iBACT,YAAY,OACZ,YACE;CACJ,MAAM,aAAa,KAAK,UAAU,WAAW,CAAC,CAAC;CAC/C,MAAM,aAAa,KAAK,OAAO,OAAO,MAAM,KAAK,CAAC,EAAE,IAAI,CAAC,GAAA,CAAI,KAAK,GAAG;CAIrE,MAAM,kBAAkB,KAAK,UAAU;EAAC;EAAW,QAAQ;EAAI;EAAU;EAAS;CAAU,CAAC;CAC7F,MAAM,CAAC,UAAU,eAAe,SAAS,eAAe;CAExD,MAAM,CAAC,MAAM,WAAW,SAAuC,CAAC,CAAC;CAIjE,MAAM,CAAC,aAAa,kBAAkB,SAAsC,CAAC,CAAC;CAC9E,MAAM,CAAC,QAAQ,aAAa,SAAS,MAAM;CAC3C,MAAM,CAAC,YAAY,i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,QAAQ,IAAI,UAAU,MAAM,EACtE,SAAS;MAAE,QAAQ;MAAoB,GAAG;KAAe,EAC3D,CAAC;KACD,IAAI,CAAC,IAAI,IAAI,MAAM,IAAI,MAAM,4BAA4B,IAAI,QAAQ;KACrE,IAAI,IAAI,IAAI;MACV,MAAM,OAAQ,MAAM,IAAI,KAAK;MAC7B,IAAI,SAAS;MACb,QAAQ,IAAI;MACZ,UAAU,SAAS;KACrB;IACF,QAAQ;KACN,IAAI,CAAC,SAAS,UAAU,4BAA4B;IACtD;IACA,IAAI,CAAC,SAAS,QAAQ,WAAW,MAAM,MAAM;GAC/C;GACA,KAAU;GACV,aAAa;IACX,UAAU;IACV,IAAI,OAAO,aAAa,KAAK;GAC/B;EACF;EAGA,MAAM,KAAK,sBAAsB,QAAQ,GAAG,SAAS,oBAAoB,QAAQ,IAAI,UAAU,IAAI;EACnG,UAAU,YAAY;EACtB,GAAG,eAAe,UAAU,WAAW;EACvC,GAAG,iBAAiB,SAAS,MAAM;GACjC,IAAI;IACF,QAAQ,KAAK,MAAO,EAAmB,IAAI,CAAkB;IAC7D,UAAU,WAAW;GACvB,QAAQ;IACN,UAAU,2BAA2B;GACvC;EACF,CAAC;EACD,GAAG,gBAAgB,UAAU,4BAA4B;EACzD,aAAa,GAAG,MAAM;CACxB,GAAG;EAAC;EAAM;EAAc,KAAK,UAAU,UAAU,CAAC,CAAC;EAAG;EAAU;EAAS;EAAQ;EAAW;CAAU,CAAC;CAEvG,OAAO;EAAE,MAAM,SAAS;EAAM;EAAQ,SAAS,SAAS;CAAI;AAC9D"}
package/dist/index.cjs CHANGED
@@ -1159,12 +1159,12 @@ exports.MATCH_FIELDS = require_permission_strategies.MATCH_FIELDS;
1159
1159
  exports.MATCH_FIELD_OPTIONS = require_permission_strategies.MATCH_FIELD_OPTIONS;
1160
1160
  exports.MATRIX_MARKS = require_matrix_marks.MATRIX_MARKS;
1161
1161
  exports.MATRIX_ORDER = require_matrix_marks.MATRIX_ORDER;
1162
- exports.MATRIX_PLAN_BAR = require_matrix_marks.MATRIX_PLAN_BAR;
1163
1162
  exports.MAX_INLINE_SELECTION_ACTIONS = require_selectionActionSplit.MAX_INLINE_SELECTION_ACTIONS;
1164
1163
  exports.Markdown = require_Markdown.Markdown;
1165
1164
  exports.MarkdownEditor = require_MarkdownEditor.MarkdownEditor;
1166
1165
  exports.MatrixElapsed = require_MatrixMarks.MatrixElapsed;
1167
1166
  exports.MatrixEnvHeader = require_MatrixMarks.MatrixEnvHeader;
1167
+ exports.MatrixHeatmap = require_MatrixMarks.MatrixHeatmap;
1168
1168
  exports.MatrixLegend = require_MatrixMarks.MatrixLegend;
1169
1169
  exports.MatrixMark = require_MatrixMarks.MatrixMark;
1170
1170
  exports.MatrixMix = require_MatrixMarks.MatrixMix;