@xenosystem/blocks 0.13.12 → 0.13.14

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.
@@ -22,7 +22,7 @@ import {
22
22
  VisibilityIcon,
23
23
  XIcon,
24
24
  XIcon2
25
- } from "../chunk-5BVZMAD2.js";
25
+ } from "../chunk-PI5WOATA.js";
26
26
  import "../chunk-2KG3PWR4.js";
27
27
 
28
28
  // src/edit/layers/panel.ts
@@ -2,7 +2,7 @@ import {
2
2
  ICONS,
3
3
  ICON_UNITS,
4
4
  Svg
5
- } from "../chunk-5BVZMAD2.js";
5
+ } from "../chunk-PI5WOATA.js";
6
6
  import "../chunk-2KG3PWR4.js";
7
7
  export {
8
8
  ICONS,
@@ -607,7 +607,7 @@ interface ConsoleViewOptions {
607
607
  declare function consoleViewState(c: ConsoleController, options?: ConsoleViewOptions): ConsoleViewModel;
608
608
  declare function applyConsoleUi(c: ConsoleController, intent: ConsoleUiIntent): void;
609
609
  declare const consoleViewManifest: PanelManifest;
610
- declare const BEHAVIOURS: {
610
+ declare const BEHAVIOURS$1: {
611
611
  'ops/consolePanelView': (inputs: Record<string, unknown>) => ConsoleViewModel;
612
612
  };
613
613
  /** The runtime-bound unit: the scroller the virtualizer measures and follow-mode pins. */
@@ -1419,26 +1419,128 @@ interface FlattenOptions {
1419
1419
  declare function flattenRunRows(runs: readonly XenoRun[], options: FlattenOptions): XenoRunRow[];
1420
1420
 
1421
1421
  /**
1422
- * The Runs panel view.
1422
+ * The Runs panel AS A DECLARATION — the fifteenth declared block: the run/step tree of every agent
1423
+ * and workflow surface, as ONE flat row shape.
1424
+ *
1425
+ * Everything drawn is data: the toolbar (search, Clear finished), the status and source `FilterChip`s
1426
+ * (clicking `failed` alone IS the dead-letter view), the empty states, the rows — the controller has
1427
+ * already walked the tree once (`flattenRunRows`), so a run row and a step row are the same `Row`
1428
+ * with a depth, a status badge, a label, the trigger / retry / truncation badges, a `Progress` or a
1429
+ * duration in the meta slot, cancel / retry trailing, and a run's error line as an inset `Note` —
1430
+ * and the status bar with the success rate. No runtime-bound unit; the clock is a view option.
1431
+ */
1432
+
1433
+ type Tone = 'neutral' | 'info' | 'success' | 'warning' | 'error';
1434
+ /** Never index `TONE` directly with a status off the wire — a host one version ahead sends a status this build does not know. */
1435
+ declare const toneOf: (status: XenoRunStatus) => Tone;
1436
+ interface RunsViewChip {
1437
+ id: string;
1438
+ label: string;
1439
+ on: boolean;
1440
+ tone: Tone;
1441
+ title?: string;
1442
+ }
1443
+ interface RunsViewRow {
1444
+ key: string;
1445
+ runId: string;
1446
+ stepPath: XenoRunPath;
1447
+ depth: number;
1448
+ step: boolean;
1449
+ status: string;
1450
+ tone: Tone;
1451
+ label: string;
1452
+ trigger?: string;
1453
+ retries?: string;
1454
+ truncated?: string;
1455
+ truncatedHint?: string;
1456
+ hasProgress: boolean;
1457
+ progress: number;
1458
+ progressLabel: string;
1459
+ duration?: string;
1460
+ canCancel: boolean;
1461
+ cancelLabel: string;
1462
+ canRetry: boolean;
1463
+ retryLabel: string;
1464
+ hasError: boolean;
1465
+ errorCode?: string;
1466
+ errorMessage?: string;
1467
+ }
1468
+ interface RunsViewModel {
1469
+ search: string;
1470
+ statuses: RunsViewChip[];
1471
+ multiSource: boolean;
1472
+ sources: RunsViewChip[];
1473
+ hasChips: boolean;
1474
+ empty: boolean;
1475
+ emptyTitle: string;
1476
+ emptyHint: string;
1477
+ listed: boolean;
1478
+ rows: RunsViewRow[];
1479
+ countLabel: string;
1480
+ statsLabel?: string;
1481
+ }
1482
+ type RunsUiIntent = {
1483
+ kind: 'search';
1484
+ value: string;
1485
+ } | {
1486
+ kind: 'clearTerminal';
1487
+ } | {
1488
+ kind: 'status';
1489
+ status: string;
1490
+ on: boolean;
1491
+ } | {
1492
+ kind: 'source';
1493
+ id: string;
1494
+ on: boolean;
1495
+ } | {
1496
+ kind: 'row';
1497
+ runId: string;
1498
+ stepPath: XenoRunPath;
1499
+ } | {
1500
+ kind: 'contextMenu';
1501
+ runId: string;
1502
+ x: number;
1503
+ y: number;
1504
+ } | {
1505
+ kind: 'cancel';
1506
+ runId: string;
1507
+ } | {
1508
+ kind: 'retry';
1509
+ runId: string;
1510
+ };
1511
+ interface RunsViewOptions {
1512
+ showStats?: boolean;
1513
+ showProgress?: boolean;
1514
+ emptyHint?: string;
1515
+ now?: () => number;
1516
+ }
1517
+ /** Derive the view from the live controller — the runtime calls this on every draw. */
1518
+ declare function runsViewState(c: RunsController, options?: RunsViewOptions): RunsViewModel;
1519
+ declare function applyRunsUi(c: RunsController, intent: RunsUiIntent): void;
1520
+ declare const runsViewManifest: PanelManifest;
1521
+ declare const BEHAVIOURS: {
1522
+ 'ops/runsPanelView': (inputs: Record<string, unknown>) => RunsViewModel;
1523
+ };
1524
+ declare const RUNS_RUNTIME_UNITS: readonly [];
1525
+ declare const RUNS_DECLARATION: BlockDeclaration;
1526
+
1527
+ /**
1528
+ * The Runs panel view — the CODE VIEW of `RUNS_DECLARATION`, drawing the same `RunsViewModel`
1529
+ * byte-identical (the equivalence suite holds the two together). No runtime-bound unit; every
1530
+ * intent goes through `applyRunsUi`.
1423
1531
  *
1424
1532
  * Composes `@xenosystem/components/chrome`; the host must ensure `@xenosystem/workbench/primitives.css` is
1425
- * present. `ProportionBar` carries progress — it is exactly the right mark, and it means the panel
1426
- * ships no chart code of its own.
1533
+ * present.
1427
1534
  *
1428
1535
  * @module
1429
1536
  */
1430
1537
 
1431
1538
  /** Props for {@link RunsPanelView}. */
1432
- interface RunsPanelViewProps {
1539
+ interface RunsPanelViewProps extends RunsViewOptions {
1433
1540
  controller: RunsController;
1434
- showStats?: boolean;
1435
- showProgress?: boolean;
1436
- emptyHint?: string;
1437
- /** Injectable clock, so a duration column is testable. */
1438
- now?: () => number;
1439
1541
  }
1440
1542
  /** The Runs panel view. */
1441
- declare function RunsPanelView({ controller, showStats, showProgress, emptyHint, now, }: RunsPanelViewProps): ReactNode;
1543
+ declare function RunsPanelView({ controller, ...options }: RunsPanelViewProps): ReactNode;
1442
1544
 
1443
1545
  /**
1444
1546
  * The Terminal contract.
@@ -2342,4 +2444,4 @@ interface DiffPanelViewProps {
2342
2444
  /** The Diff panel view. */
2343
2445
  declare function DiffPanelView({ controller, highlighter, review }: DiffPanelViewProps): ReactNode;
2344
2446
 
2345
- export { ALL_STATUSES, BEHAVIOURS as CONSOLE_BEHAVIOURS, CONSOLE_DECLARATION, CONSOLE_PANEL_ID, CONSOLE_RUNTIME_UNITS, ConsoleController, type ConsoleControllerOptions, type ConsoleHostBridge, type ConsolePanelState, ConsolePanelView, type ConsolePanelViewProps, type ConsoleRenderContext, ConsoleScroller, type ConsoleUiIntent, type ConsoleViewModel, type ConsoleViewOptions, type ConsoleViewRow, type ConsoleViewSource, type ConsoleViewState, type CreateConsolePanelOptions, type CreateDiffPanelOptions, type CreateRunsPanelOptions, type CreateTerminalPanelOptions, DEFAULT_MAX_STEP_DEPTH, DIFF_PANEL_ID, DiffController, type DiffControllerOptions, type DiffFileView, type DiffHostBridge, type DiffPanelState, DiffPanelView, type DiffPanelViewProps, type DiffRenderContext, type DiffViewState, type FlattenOptions, LEVEL_ORDER, MESSAGE_ELISION, REDACTION_CARRY, RUNS_PANEL_ID, RUN_PATH_SEPARATOR, RUN_STATUSES, RunsController, type RunsControllerOptions, type RunsHostBridge, type RunsPanelState, RunsPanelView, type RunsPanelViewProps, type RunsRenderContext, type RunsViewState, TERMINAL_PANEL_ID, TERMINAL_STATUSES, TerminalController, type TerminalControllerOptions, type TerminalHostBridge, type TerminalInstanceView, type TerminalPanelState, TerminalPanelView, type TerminalPanelViewProps, type TerminalRenderContext, type TerminalViewState, XENO_TERMINAL_THEME_KEYS, type XenoDiffAction, type XenoDiffDecision, type XenoDiffDecisionIntent, type XenoDiffDecisionState, type XenoDiffFile, type XenoDiffFileOmission, type XenoDiffHighlighter, type XenoDiffHunk, type XenoDiffLine, type XenoDiffLineKind, type XenoDiffModel, type XenoDiffNavigate, type XenoDiffSegment, type XenoDiffStatus, type XenoDiffView, type XenoLogActivate, type XenoLogDelta, type XenoLogFilter, type XenoLogLevel, type XenoLogPatch, type XenoLogRecord, type XenoLogSource, type XenoRun, type XenoRunAction, type XenoRunActivate, type XenoRunDelta, type XenoRunError, type XenoRunFilter, type XenoRunLifecycle, type XenoRunPath, type XenoRunRow, type XenoRunRunRow, type XenoRunStats, type XenoRunStatus, type XenoRunStep, type XenoRunStepAppend, type XenoRunStepPatch, type XenoRunStepRow, type XenoRunTruncation, type XenoTerminalData, type XenoTerminalEmulator, type XenoTerminalId, type XenoTerminalIntent, type XenoTerminalSession, type XenoTerminalStatus, type XenoTerminalTheme, appendStepsAtPath, applyConsoleUi, canCancel, canRetry, collapseAdjacent, computeStats, consoleManifest, consolePanel, consoleRuntimeComponents, consoleViewManifest, consoleViewState, countChanges, createConsolePanel, createDiffPanel, createRunsPanel, createTerminalPanel, decodeRunPath, diffManifest, diffPanel, durationOf, encodeRunPath, flattenHunks, flattenRunRows, formatDuration, formatRecord, isActive, isLive, isSettled, isTerminal, isWaiting, lifecycleOf, matchesSearch as matchesRunSearch, matchesSearch$1 as matchesSearch, measuredSize, meetsLevel, needsAttention, omissionLabel, patchStepAtPath, queueDurationOf, readTerminalTheme, resolveStepPath, runsManifest, runsPanel, safeJson, spliceRedactedAppend, splitRows, statusLabel, terminalManifest, terminalPanel, terminalThemeVar, truncateLogMessage };
2447
+ export { ALL_STATUSES, BEHAVIOURS$1 as CONSOLE_BEHAVIOURS, CONSOLE_DECLARATION, CONSOLE_PANEL_ID, CONSOLE_RUNTIME_UNITS, ConsoleController, type ConsoleControllerOptions, type ConsoleHostBridge, type ConsolePanelState, ConsolePanelView, type ConsolePanelViewProps, type ConsoleRenderContext, ConsoleScroller, type ConsoleUiIntent, type ConsoleViewModel, type ConsoleViewOptions, type ConsoleViewRow, type ConsoleViewSource, type ConsoleViewState, type CreateConsolePanelOptions, type CreateDiffPanelOptions, type CreateRunsPanelOptions, type CreateTerminalPanelOptions, DEFAULT_MAX_STEP_DEPTH, DIFF_PANEL_ID, DiffController, type DiffControllerOptions, type DiffFileView, type DiffHostBridge, type DiffPanelState, DiffPanelView, type DiffPanelViewProps, type DiffRenderContext, type DiffViewState, type FlattenOptions, LEVEL_ORDER, MESSAGE_ELISION, REDACTION_CARRY, BEHAVIOURS as RUNS_BEHAVIOURS, RUNS_DECLARATION, RUNS_PANEL_ID, RUNS_RUNTIME_UNITS, RUN_PATH_SEPARATOR, RUN_STATUSES, RunsController, type RunsControllerOptions, type RunsHostBridge, type RunsPanelState, RunsPanelView, type RunsPanelViewProps, type RunsRenderContext, type RunsUiIntent, type RunsViewChip, type RunsViewModel, type RunsViewOptions, type RunsViewRow, type RunsViewState, TERMINAL_PANEL_ID, TERMINAL_STATUSES, TerminalController, type TerminalControllerOptions, type TerminalHostBridge, type TerminalInstanceView, type TerminalPanelState, TerminalPanelView, type TerminalPanelViewProps, type TerminalRenderContext, type TerminalViewState, XENO_TERMINAL_THEME_KEYS, type XenoDiffAction, type XenoDiffDecision, type XenoDiffDecisionIntent, type XenoDiffDecisionState, type XenoDiffFile, type XenoDiffFileOmission, type XenoDiffHighlighter, type XenoDiffHunk, type XenoDiffLine, type XenoDiffLineKind, type XenoDiffModel, type XenoDiffNavigate, type XenoDiffSegment, type XenoDiffStatus, type XenoDiffView, type XenoLogActivate, type XenoLogDelta, type XenoLogFilter, type XenoLogLevel, type XenoLogPatch, type XenoLogRecord, type XenoLogSource, type XenoRun, type XenoRunAction, type XenoRunActivate, type XenoRunDelta, type XenoRunError, type XenoRunFilter, type XenoRunLifecycle, type XenoRunPath, type XenoRunRow, type XenoRunRunRow, type XenoRunStats, type XenoRunStatus, type XenoRunStep, type XenoRunStepAppend, type XenoRunStepPatch, type XenoRunStepRow, type XenoRunTruncation, type XenoTerminalData, type XenoTerminalEmulator, type XenoTerminalId, type XenoTerminalIntent, type XenoTerminalSession, type XenoTerminalStatus, type XenoTerminalTheme, appendStepsAtPath, applyConsoleUi, applyRunsUi, canCancel, canRetry, collapseAdjacent, computeStats, consoleManifest, consolePanel, consoleRuntimeComponents, consoleViewManifest, consoleViewState, countChanges, createConsolePanel, createDiffPanel, createRunsPanel, createTerminalPanel, decodeRunPath, diffManifest, diffPanel, durationOf, encodeRunPath, flattenHunks, flattenRunRows, formatDuration, formatRecord, isActive, isLive, isSettled, isTerminal, isWaiting, lifecycleOf, matchesSearch as matchesRunSearch, matchesSearch$1 as matchesSearch, measuredSize, meetsLevel, needsAttention, omissionLabel, patchStepAtPath, queueDurationOf, readTerminalTheme, resolveStepPath, runsManifest, runsPanel, runsViewManifest, runsViewState, safeJson, spliceRedactedAppend, splitRows, statusLabel, terminalManifest, terminalPanel, terminalThemeVar, toneOf, truncateLogMessage };