import { InspectReplicaSelection } from '@voltro/protocol/inspect'; import { ReactNode } from 'react'; import { InspectBackfillInput as ScheduleBackfillInput } from '@voltro/protocol/inspect'; import { InspectBackfillReceipt as ScheduleBackfillReceipt } from '@voltro/protocol/inspect'; import { InspectBackfillResult as ScheduleBackfillResult } from '@voltro/protocol/inspect'; import { WorkflowControlIntent } from '@voltro/protocol'; import { WorkflowControlReadInput } from '@voltro/protocol'; import { WorkflowControlResult } from '@voltro/protocol'; import { WorkflowRetryCommand } from '@voltro/protocol'; import { WorkflowRetryObservation } from '@voltro/protocol'; import { WorkflowRetryTarget } from '@voltro/protocol'; /** One access rule (the `passwordHash` is never sent — `hasPassword` says * whether one is set). */ export declare interface AccessRuleWire { readonly owner?: boolean; readonly roles?: ReadonlyArray; readonly groups?: ReadonlyArray; readonly scopes?: ReadonlyArray; readonly tenant?: boolean; readonly apiKey?: boolean; readonly password?: boolean; readonly guard?: string; } export declare interface ActiveFilter { readonly key: string; readonly label: string; readonly onRemove: () => void; } export declare const ActiveFilterChips: ({ filters, onClear }: { readonly filters: ReadonlyArray; readonly onClear: () => void; }) => ReactNode; export declare const AdmissionQueuePanel: (props: AdmissionQueuePanelProps) => ReactNode; export declare interface AdmissionQueuePanelProps { readonly useFlowControl: (placementId?: string) => DataSource; readonly usePauseWorkflow?: () => MutateSource<{ workflow: string; reason?: string; }, unknown>; readonly useResumeWorkflow?: () => MutateSource<{ workflow: string; }, unknown>; readonly useIntentValidation?: (placementId?: string) => DataSource; readonly useOperateIntent?: () => MutateSource; readonly capabilities: Capabilities; } /** "19 starts collapsed into this run" — the ledger row for this execution, * rendered AT the run, where a reader looking for the other eighteen looks. */ export declare const AdmissionRow: ({ admission }: { readonly admission: FlowControlAdmission; }) => ReactNode; /** Outcome → tone, so a drop never renders like an admit. */ export declare const admissionTone: (outcome: string) => "ok" | "warn" | "bad"; export declare interface AgentToolsData { readonly capturedAt: number; readonly enabled: boolean; readonly reason?: string; readonly tools: ReadonlyArray<{ readonly name: string; readonly tag: string; readonly kind: string; readonly description: string; readonly write: boolean; readonly confirm: boolean; readonly approvalBacked: boolean; readonly maxPerRun?: number; readonly input?: Readonly>; }>; readonly dropped: ReadonlyArray<{ readonly name: string; readonly reason: string; }>; } export declare const AgentToolsPage: ({ useSnapshot, contextLine }: StandingPageProps) => ReactNode; export declare interface AggregateEntry { readonly name: string; readonly meta: AggregateMetaSerialised; } export declare interface AggregateMetaSerialised { /** ISO string — null until the first refresh succeeds. */ readonly refreshedAt: string | null; readonly rowCount: number; readonly durationMs: number; readonly lastError: string | null; /** ISO string — when the next refresh is scheduled. */ readonly nextRefreshAt: string | null; } export declare interface AggregatesData { readonly aggregates: ReadonlyArray; /** ISO timestamp the snapshot was taken at. */ readonly capturedAt: string; } export declare const AggregatesPage: ({ useAggregates, useRefreshAggregate, capabilities, contextLine, }: AggregatesPageProps) => ReactNode; export declare interface AggregatesPageProps { readonly useAggregates: () => DataSource; /** Manual "Run now" — gated on `canRequeueWorkflow` (same trust * class as schedule-fire + workflow-requeue). */ readonly useRefreshAggregate?: () => MutateSource<{ name: string; }, void>; readonly capabilities: Capabilities; readonly contextLine?: ReactNode; } /** A flow definition row (subset the panel renders). */ export declare interface AiFlowRow { readonly id: string; readonly name?: string; /** 'deterministic' | 'agentic'. */ readonly mode?: string; /** 'draft' | 'active' | 'archived'. */ readonly status?: string; readonly visibility?: string; readonly isEnabled?: boolean; readonly usageCount?: number; } /** A flow run row (subset the panel renders). */ export declare interface AiFlowRunRow { readonly id: string; readonly input?: unknown; readonly output?: unknown; readonly steps?: unknown; readonly workflowStart?: unknown; readonly error?: string | null; readonly errorMessage?: string | null; readonly chainRefusal?: string | null; readonly flowRef?: string; readonly flowName?: string; /** pending | running | waiting | succeeded | failed | cancelled. */ readonly status?: string; readonly mode?: string; /** manual | cron. */ readonly source?: string; readonly currentStep?: number; readonly totalSteps?: number; /** micro-USD; the panel renders it as USD. */ readonly costMicroUsd?: number; readonly startedAt?: string; readonly completedAt?: string; readonly createdAt?: string; } export declare interface AiFlowRunsData { readonly count: number; readonly rows: ReadonlyArray; } export declare interface AiFlowsData { readonly count: number; readonly rows: ReadonlyArray; } export declare const AiFlowsPage: ({ useFlows, useRuns, contextLine, workflowHref }: AiFlowsPageProps) => ReactNode; export declare interface AiFlowsPageProps { readonly useFlows: () => DataSource; readonly useRuns: (runId?: string) => DataSource; readonly workflowHref?: (workflowName: string, executionId: string) => string; readonly contextLine?: ReactNode; } /** Granted-everything bag. Local devtools (no auth, no tenancy) ships * with this. Admin app's caps look similar but flow through an * explicit role check anyway so cap evolution stays auditable. */ export declare const ALL_CAPABILITIES_LOCAL: Capabilities; export declare interface AnalyticsCapabilityFlags { readonly track: boolean; readonly aggregate: boolean; readonly timeseries: boolean; readonly topN: boolean; } export declare interface AnalyticsData { readonly provider: string; readonly capabilities: AnalyticsCapabilityFlags; readonly detail: Readonly> | null; readonly recentActivity: AnalyticsRecentActivity; readonly capturedAt: string; } export declare const AnalyticsPage: ({ useAnalytics, contextLine, }: AnalyticsPageProps) => ReactNode; export declare interface AnalyticsPageProps { readonly useAnalytics: () => DataSource; readonly contextLine?: ReactNode; } export declare interface AnalyticsRecentActivity { readonly windowMs: number; readonly totalSamples: number; readonly errorCount: number; readonly tags: ReadonlyArray; } export declare interface AnalyticsTagSample { readonly tag: string; readonly count: number; readonly errors: number; readonly p50: number; readonly p95: number; } /** One task hierarchy and responsive navigation for both inspect dashboards. * The hosts retain their typed routes, environment selection and auth. */ export declare const AppInspector: ({ host, kind, plugins, current, renderLink, navigate, onRefresh, needsWriteAccess, children }: { readonly host: "local" | "cloud"; readonly kind: "api" | "web" | undefined; readonly plugins?: PluginsData["plugins"] | undefined; readonly current: string; readonly renderLink: (feature: InspectFeature, label: string, className: string, active: boolean) => ReactNode; readonly navigate: (feature: InspectFeatureId) => void; readonly onRefresh?: (() => void) | undefined; readonly needsWriteAccess?: boolean | undefined; readonly children: ReactNode; }) => ReactNode; /** App identity stays above the shared task navigation in both dashboard hosts. */ export declare function AppInspectorHeader({ name, url, badges, backLink, actions }: { readonly name: string; readonly url?: string | undefined; readonly badges?: ReactNode; readonly backLink?: ReactNode; readonly actions?: ReactNode; }): ReactNode; export declare interface AppliedPlanSnapshot { readonly id: string; readonly fingerprint: string; readonly appliedAt: string; readonly appliedBy: string; readonly environment: 'dev' | 'staging' | 'prod'; readonly source: 'auto-diff' | 'file'; readonly durationMs: number; readonly opCount: number; readonly notes?: string; /** The planner output as it ran; the timeline renderer can expand * to show op-by-op detail. Cloud may strip this for the index * view to keep payloads small + load it lazily per row. */ readonly operations?: ReadonlyArray; } /** One screen the generated app would expose. */ export declare interface AppScreen { /** The route pattern (page) or the procedure tag. */ readonly title: string; readonly kind: 'list' | 'form' | 'action' | 'stream' | 'page'; /** The table the screen reads/writes, when derivable from the graph. */ readonly table?: string; /** The rpc tags this screen binds. */ readonly binds: ReadonlyArray; } /** Input and output of this attempt against the previous one, as a diff — the * question a retry raises is "what changed", and two JSON blocks side by side * do not answer it. */ export declare const AttemptDiff: ({ current, previous }: { readonly current: WorkflowRunStep; readonly previous: WorkflowRunStep; }) => ReactNode; export declare const AttentionBlock: ({ runs, latency, onFilter, deadLettered, onDeadLetter }: { readonly runs: ReadonlyArray; readonly latency: WorkflowLatencyStats | undefined; readonly onFilter: (kind: AttentionKind) => void; /** Starts the admission gave up on — from the flow-control read, when wired. */ readonly deadLettered?: number; readonly onDeadLetter?: () => void; }) => ReactNode; export declare type AttentionKind = 'failed' | 'stuck' | 'suspended' | 'running'; export declare interface AttentionSummary { readonly failed: number; readonly stuck: number; readonly suspended: number; readonly running: number; /** The threshold a running run counts as stuck from. */ readonly stuckAfterMs: number; } /** Tick positions for a span: a "nice" step giving five to ten ticks. */ export declare const axisTicks: (spanMs: number) => ReadonlyArray; export declare const BillingPage: ({ useStats, useUsage, contextLine }: BillingPageProps) => ReactNode; export declare interface BillingPageProps { readonly useStats: () => DataSource; readonly useUsage: () => DataSource; readonly contextLine?: ReactNode; } export declare interface BillingStatsData { readonly provider: string; readonly supportsMeteredUsage: boolean; readonly plans: ReadonlyArray; /** rpc tags gated by the declarative `enforce` map. */ readonly enforce: ReadonlyArray; readonly webhookPath: string; } export declare interface BillingUsageData { readonly usage: ReadonlyArray; } /** A pending usage counter. Typed loosely (extra columns tolerated) so the * panel renders whatever the usage store exposes. */ export declare interface BillingUsageRow { readonly tenantId?: string; readonly entitlementKey?: string; readonly key?: string; readonly quantity?: number; readonly period?: string; readonly reported?: boolean; readonly [column: string]: unknown; } export declare interface BudgetsData { readonly capturedAt: string; readonly budgets: ReadonlyArray<{ readonly budget: string; readonly tenantId: string | null; readonly status: 'ok' | 'warn' | 'exceeded'; readonly severity: 'info' | 'warn' | 'critical'; readonly spent: number; readonly limit: number; readonly warnThreshold: number; readonly unit: string | null; readonly onExceeded: 'observe' | 'suspend'; readonly windowStartedAt: number | null; readonly since: number | null; readonly lastUpdatedAt: number | null; readonly lastCause: { readonly unit: string; readonly subscriptionId?: string | null; readonly procedure?: string | null; readonly traceId?: string | null; } | null; readonly description?: string; }>; readonly attribution: ReadonlyArray<{ readonly tenantId: string | null; readonly total: number; readonly byUnit: Readonly>; readonly bySubscription: Readonly>; readonly lastUpdatedAt: number | null; }>; } export declare const BudgetsPage: ({ useSnapshot, contextLine }: StandingPageProps) => ReactNode; /** * Combine the proposal's graph (procedures) + the columns parsed from its entity * artifacts into a per-table preview spec: the columns to render + the list / * create rpc tags. A table is previewable when its columns are known. */ export declare const buildPreviewSpec: (graph: unknown, artifacts: ReadonlyArray<{ readonly path: string; readonly content: string; }>) => ReadonlyArray; /** * The run's timeline in body order. Exported so the arithmetic — pairing * timer and signal events, stacking attempts, placing children — has a test * without a DOM. */ export declare const buildTimeline: (input: { readonly steps: ReadonlyArray; readonly events: ReadonlyArray; readonly children: ReadonlyArray; }) => ReadonlyArray; export declare const BulkRunActionsPanel: ({ useBulkRuns, capabilities, prepareControls, observeControl, prepareRetries, observeRetry, }: BulkRunActionsPanelProps) => ReactNode; export declare interface BulkRunActionsPanelProps { readonly prepareControls: (targets: ReadonlyArray>) => ReadonlyArray; readonly observeControl: (result: WorkflowControlResult) => void; readonly prepareRetries?: (targets: BulkRunResult['targets']) => ReadonlyArray; readonly observeRetry?: (result: WorkflowRetryObservation) => void; readonly useBulkRuns: () => MutateSource; readonly capabilities: Capabilities; } export declare interface BulkRunRequest { readonly controls?: ReadonlyArray<{ readonly runId: string; readonly workflowName: string; readonly executionId: string; readonly requestId: string; }>; readonly op: 'cancel' | 'replay'; /** The rows the operator ticked. Still capped by `limit`. */ readonly runIds?: ReadonlyArray; /** Required. There is deliberately no unbounded form — the cap IS the blast * radius, and `truncated` on the result answers "was that all of them". */ readonly limit: number; /** `true` selects and reports without changing anything. The panel always * runs this first. */ readonly dryRun?: boolean; readonly mode?: 'retry' | 'redrive'; readonly reason?: string; readonly workflow?: string; readonly status?: string; readonly startedAfter?: string; readonly startedBefore?: string; } export declare interface BulkRunResult { readonly targets: ReadonlyArray<{ readonly runId: string; readonly workflowName: string; readonly executionId: string; }>; readonly controls: ReadonlyArray; readonly retries: ReadonlyArray; readonly op: 'cancel' | 'replay'; readonly mode: 'retry' | 'redrive' | null; readonly dryRun: boolean; /** Rows the filter selected, before eligibility. */ readonly matched: number; readonly eligible: ReadonlyArray; readonly skipped: ReadonlyArray<{ readonly runId: string; readonly status: string; readonly why: string; }>; readonly succeeded: ReadonlyArray; readonly failed: ReadonlyArray<{ readonly runId: string; readonly reason: string; }>; /** More runs match than were considered. Without it, a result of "1000 * cancelled" reads as "all of them". */ readonly truncated: boolean; } export declare const CachePage: ({ useCache, contextLine }: CachePageProps) => ReactNode; export declare interface CachePageProps { readonly useCache: () => DataSource; readonly contextLine?: ReactNode; } export declare interface Capabilities { readonly canViewLogs: boolean; readonly canViewTraces: boolean; readonly canViewMigrationDetails: boolean; readonly canViewAuditLog: boolean; readonly canViewDataRows: boolean; readonly canInvokeProcedure: boolean; readonly canRunSeed: boolean; readonly canRollbackMigration: boolean; readonly canApplyMigration: boolean; readonly canCompareMigrationEnvironments: boolean; readonly canRetryCdcDelivery: boolean; readonly canResendOutbox: boolean; readonly canRequeueWorkflow: boolean; /** Pause / unpause a workflow's ADMISSION. Separate from * `canRequeueWorkflow` because the blast radius is different in kind: a * requeue re-runs one job, a pause stops every future start of a workflow * fleet-wide until somebody unpauses it. */ readonly canPauseWorkflow: boolean; /** * Cancel or replay MANY runs in one operation. * * Its own capability rather than riding `canPauseWorkflow`, and the reason is * the argument that made pause safe to expose in the first place: a pause * COLLECTS starts and never discards one, so the worst outcome is a backlog. * A bulk cancel destroys work that is already in flight and cannot be undone. * Folding the two into one flag would quietly hand every operator who may * pause a workflow the power to end a thousand runs. */ readonly canBulkOperateRuns: boolean; /** Send or replay a declared domain event as the operator. Its own flag: * an event fans out to every trigger listening, so one send can start * several workflows — a different blast radius from one start. */ readonly canEmitWorkflowEvent: boolean; readonly canEditRow: boolean; readonly canDeleteRow: boolean; readonly canInsertRow: boolean; readonly canRotateInspectToken: boolean; readonly canEditEnvVar: boolean; readonly canManageWebhooks: boolean; readonly canUploadStorage: boolean; readonly canDeleteStorage: boolean; readonly canManageStorage: boolean; readonly canPreviewMail: boolean; readonly canToggleFlag: boolean; readonly canRunGovernance: boolean; readonly canModerateContent: boolean; readonly canReindexSearch: boolean; /** Repair drifted search rows now (`POST /resync`). Its own flag rather than * riding `canReindexSearch`: a resync re-reads ONLY the drifted rows (cheap, * bounded by the ledger), a reindex re-reads the whole table — an operator * trusted with the first is not automatically trusted with the second. */ readonly canResyncSearch: boolean; } export declare interface CdcOutData { readonly sinks: ReadonlyArray; /** This replica's buffer and lease state, never a fleet total. */ readonly handoff: { readonly leader: boolean; readonly seeded: boolean; readonly awaitingSeed: number; readonly buffered: number; readonly pending: number; readonly dropped: number; readonly windowMs: number; readonly dedupWindowMs: number; }; } export declare interface CdcOutDeadLetterData { /** At most 100 retained rows, ordered by delivery key descending. */ readonly rows: ReadonlyArray<{ readonly deliveryKey: string; readonly pipe: string; readonly table: string; readonly op: 'insert' | 'update' | 'delete'; readonly key: string; readonly attempts: number; readonly lastError: string | null; readonly createdAt: string; }>; } export declare const CdcOutPage: ({ useSinks, useDeadLetter, contextLine, retryDelivery }: CdcOutPageProps) => ReactNode; export declare interface CdcOutPageProps { readonly useSinks: () => DataSource; readonly useDeadLetter: () => DataSource; readonly retryDelivery?: (deliveryKey: string) => Promise<{ accepted: boolean; }>; readonly contextLine?: ReactNode; } /** One configured reverse-ETL sink + its live delivery counters. */ export declare interface CdcOutSinkRow { /** The source table whose changes mirror outward. */ readonly table: string; /** The sink's name (e.g. `memory`, `webhook(host)`). */ readonly sink: string; readonly pipe: string; /** Durable outbox rows awaiting delivery. */ readonly pending: number; readonly delivering: number; /** Retained outbox rows successfully delivered. */ readonly delivered: number; /** Retained outbox rows that exhausted their attempts. */ readonly dead: number; readonly failed: number; /** Wall-clock ms of the last successful delivery, or null. */ readonly lastDeliveryAtMs: number | null; } export declare type CellValue = string | number | boolean | null | Record | ReadonlyArray; export declare interface ChecksData { readonly capturedAt: number; readonly mode: string; readonly summary: { readonly pass: number; readonly fail: number; readonly unavailable: number; }; readonly checks: ReadonlyArray<{ readonly id: string; readonly status: 'pass' | 'fail' | 'unavailable'; readonly summary: string; readonly findings: ReadonlyArray>>; readonly reason?: string; readonly fix?: string; }>; } export declare const ChecksPage: ({ useSnapshot, contextLine }: StandingPageProps) => ReactNode; export declare type ClusterCoordination = 'single' | 'advisoryLock' | 'cluster'; export declare interface ClusterCoordinationState { readonly recentReplicaIds: ReadonlyArray; readonly scheduleClaims: ReadonlyArray; readonly runningScheduleRuns: number; readonly runningWorkflowRuns: number; readonly runners?: ReadonlyArray<{ readonly address: string; readonly status: string | null; }>; } export declare interface ClusterData { readonly instances: ReadonlyArray; } export declare type ClusterDialect = 'postgres' | 'mysql' | 'mariadb' | 'mssql' | 'sqlite' | 'memory'; export declare interface ClusterInstance { readonly replicaId: string; readonly dialect: ClusterDialect; readonly runnerHost: string; readonly runnerPort: number; readonly runnerStorage: ClusterRunnerStorage; /** Shard-ownership coordination for SQL runner storage: `'row'` (certified * `cluster_locks` lease — safe across a Galera / PXC cluster), `'advisory'` * (session `GET_LOCK` / `pg_advisory_lock`), `'auto'` (resolved per dialect * + wsrep probe at boot), or `'none'`. */ readonly shardLock: ClusterShardLock; readonly coordination: ClusterCoordination; readonly cdc: { readonly enabled: boolean; readonly flavor: string; }; readonly tier: ClusterTier; readonly serverId?: number; /** SQL-backed runner on a loopback host — cross-pod resume breaks. */ readonly localhostRisk: boolean; } /** One process's snapshot — what `/_voltro/inspect/cluster` returns, * plus the `process` name the consumer stamps on after fan-out. */ export declare interface ClusterInstanceSnapshot { readonly process: string; readonly instance: ClusterInstance; readonly coordinationState: ClusterCoordinationState; readonly capturedAt: number; } export declare const ClusterPage: ({ useCluster, contextLine }: ClusterPageProps) => ReactNode; export declare interface ClusterPageProps { readonly useCluster: () => DataSource; readonly contextLine?: ReactNode; } export declare type ClusterRunnerStorage = 'sql' | 'memory' | 'none'; export declare interface ClusterScheduleClaim { readonly claimKey: string; readonly replicaId: string | null; readonly claimedAt: string | null; } export declare type ClusterShardLock = 'auto' | 'row' | 'advisory' | 'none'; export declare type ClusterTier = 'full' | 'inline-only' | 'single-process' | 'none'; export declare interface ColumnSpec { readonly name: string; readonly type: ColumnType; readonly nullable: boolean; readonly hasDefault: boolean; readonly vectorDim?: number; readonly unique: boolean; /** For `reference` columns, the target table name (enables FK drill-down). */ readonly referencesTable?: string; /** Closed value set from `text().oneOf([...])` — rendered as a select. */ readonly oneOf?: ReadonlyArray; /** Server-redacted in the current viewer's role (e.g. `passwordHash` * for non-owner). Renderer shows `‹hidden›`; server enforces. */ readonly redacted?: boolean; } export declare type ColumnType = 'id' | 'text' | 'integer' | 'real' | 'decimal' | 'bigint' | 'boolean' | 'timestamp' | 'date' | 'json' | 'bytes' | 'reference' | 'vector' | 'enum' | 'array' | 'interval' | 'raw'; export declare interface CommentsData { readonly page?: { readonly offset: number; readonly search: string; readonly total: number; readonly pageSize: number; }; readonly detail?: { readonly threadId: string; readonly found: boolean; readonly offset: number; readonly total: number; readonly messages: ReadonlyArray<{ readonly id: string; readonly body: string; readonly author: string; readonly createdAt: string; readonly editedAt: string | null; }>; }; readonly stats: { readonly threads: number; readonly open: number; readonly comments: number; }; readonly recent: ReadonlyArray; } export declare const CommentsPage: ({ useThreads, contextLine }: CommentsPageProps) => ReactNode; export declare interface CommentsPageProps { readonly useThreads: (query?: CommentThreadQuery) => DataSource; readonly contextLine?: ReactNode; } export declare interface CommentThreadQuery { readonly threadId?: string; readonly offset?: number; readonly search?: string; } export declare interface CommentThreadRow { readonly id: string; readonly anchor: string; readonly status: string; readonly createdBy: string; readonly createdAt: string; readonly comments: number; } /** Keeps an operation's target and consequence beside its final action. */ export declare const ConfirmAction: ({ title, description, label, pending, disabled, destructive, onConfirm, onCancel, children }: { readonly title: string; readonly description: ReactNode; readonly label: string; readonly pending: boolean; readonly disabled?: boolean; readonly destructive?: boolean; readonly onConfirm: () => void; readonly onCancel: () => void; readonly children?: ReactNode; }) => ReactNode; /** A confirmed operation keeps failures open and prevents duplicate submissions. */ export declare const ConfirmMutationButton: ({ label, description, disabled, onConfirm }: { readonly label: string; readonly description: ReactNode; readonly disabled?: boolean; readonly onConfirm: () => void | Promise; }) => ReactNode; export declare interface ConsentRecordWire { readonly subjectId: string; readonly purpose: string; readonly granted: boolean; readonly at: string; readonly tenantId?: string | null; } export declare type CountMode = 'exact' | 'estimate' | 'none'; /** * One remote env's diff against the local declared schema, fetched * via `voltro db plan --against `. The renderer shows it * side-by-side with the local pending plan so the operator can spot * "staging is ahead of dev" / "prod hasn't caught up yet" without * leaving the page. */ export declare interface CrossEnvDiffSnapshot { readonly remoteUrl: string; readonly remoteLabel?: string; readonly fetchedAt: string; readonly remoteFingerprint: string; readonly plan: MigrationPlanSnapshot | null; readonly error?: string; } export declare const DatabasePage: ({ useDatabaseStatus, useRollbackMigration, useRunSeed, capabilities, contextLine, }: DatabasePageProps) => ReactNode; export declare interface DatabasePageProps { /** Reactive data source for the current app's migrations + seeds. */ readonly useDatabaseStatus: () => DataSource; /** Mutating: roll back one migration by id. Pass `undefined` when * rollback isn't supported by this transport (e.g. early devtools * builds without write endpoints). The renderer hides Rollback * buttons in that case regardless of caps. */ readonly useRollbackMigration?: () => MutateSource<{ readonly id: string; }, void>; /** Mutating: run one seed by id. */ readonly useRunSeed?: () => MutateSource<{ readonly id: string; }, void>; /** Capability set the consumer derives from auth/role. */ readonly capabilities: Capabilities; /** Optional short context line under the title. Cloud-dashboard might * set "App: · Env: "; local devtools might omit it. */ readonly contextLine?: ReactNode; } export declare interface DatabaseStatus { /** The SQL dialect this api booted against. */ readonly dialect: 'postgres' | 'mysql' | 'mariadb' | 'mssql' | 'sqlite' | 'memory'; /** Read-replica routing state. `replicaCount: 0` for primary-only * deployments — the wrapper is never installed in that case but * the snapshot still surfaces the policy/region defaults. */ readonly replication: ReplicationStatus; readonly migrations: ReadonlyArray; readonly seeds: ReadonlyArray; } export declare interface DataCacheData { readonly backend: 'memory' | 'redis'; /** Resolved engine when inferable: redis / valkey / keydb / dragonfly / * upstash / memory. */ readonly engine: string; readonly driver: 'resp' | 'http'; readonly hits: number; readonly misses: number; /** Hit rate 0–1. */ readonly hitRate: number; } export declare interface DataRowSort { readonly column: string; readonly direction: 'asc' | 'desc'; } export declare interface DataRowsPage { /** Transport state; absence makes no claim about continuous updates. */ readonly syncState?: 'live' | 'reconnecting'; /** Bounded CDC-confirmed deletions; disappearance from a page alone is not deletion. */ readonly deletedRowIds?: ReadonlyArray; readonly rows: ReadonlyArray; /** `null` when no count was computed (`count: 'none'`). */ readonly total: number | null; readonly offset: number; readonly limit: number; /** How `total` was computed (estimate → show "~N"). */ readonly countMode?: CountMode; } /** Everything the grid asks a transport for. The transport translates * this into URL params (devtools) or RPC args (cloud). */ export declare interface DataRowsQuery { readonly filter?: PredicateNode | undefined; /** Free-text search → OR of `contains` over text/enum columns. */ readonly quickSearch?: string | undefined; readonly sort?: ReadonlyArray | undefined; readonly offset: number; readonly limit: number; readonly count?: CountMode | undefined; } /** * A reactive data source — the read-side of an inspect page. * * Implementations: * - local devtools: HTTP fetch (with optional SSE bridge for live data) * - cloud customer dashboard: `useSubscription` on a cloud-api RPC that * proxies the customer-app's inspect endpoint * - admin app: tenant-scope-bypassing variant of the above */ export declare interface DataSource { /** Explicitly request a fresh snapshot when the host supports it. */ readonly refresh?: (() => void) | undefined; /** Upstream scope when the payload itself cannot carry metadata (e.g. arrays). */ readonly observation?: ObservationEnvelope | undefined; /** Latest snapshot. `undefined` until the first read returns. */ readonly data: T | undefined; /** Read-side error. Surfaced from initial fetch or stream interruption. */ readonly error: unknown | undefined; /** True while a fetch / handshake is in flight and `data` is still * `undefined`. Distinct from "no data exists" (which keeps `pending: false`). */ readonly pending: boolean; } export declare interface DataSourceOption { readonly id: string; readonly name: string; readonly url: string; /** Only set when the host has a declared relationship, never a guessed one. */ readonly linked?: boolean; } /** A frontend owns no data tables; the host supplies authorized API destinations. */ export declare const DataSourcePicker: ({ sources, pending, error, renderLink, manageLink }: DataSourcePickerProps) => ReactNode; export declare interface DataSourcePickerProps { readonly sources: ReadonlyArray; readonly pending: boolean; readonly error?: unknown; readonly renderLink: (source: DataSourceOption, label: ReactNode, className: string) => ReactNode; readonly manageLink?: ReactNode; } export declare interface DataViewerNavTarget { readonly table: string; readonly column: string; readonly value: CellValue; } export declare const DataViewerPage: (props: DataViewerPageProps) => ReactNode; export declare interface DataViewerPageProps { readonly useTables: () => DataSource>; readonly useProvenance?: (tableName: string, rowId: string) => DataSource; readonly useRows: (tableName: string, query: DataRowsQuery) => DataSource; /** Optional liveness flag for the indicator (transport connected). */ readonly useLive?: (tableName: string) => boolean; readonly useUpdateRow?: () => MutateSource<{ table: string; id: string; patch: RowData; expected: RowData; }, void>; readonly useInsertRow?: () => MutateSource<{ table: string; row: RowData; }, void>; readonly useDeleteRows?: () => MutateSource<{ table: string; rows: ReadonlyArray<{ id: string; expected: RowData; }>; }, void>; /** FK drill-down: navigate to the referenced table filtered to a row. */ readonly onNavigateToRow?: (target: DataViewerNavTarget) => void; /** Deep-link bridge (search-param serialisation lives in the wrapper). */ readonly urlState?: DataViewerUrlState; readonly capabilities: Capabilities; readonly contextLine?: ReactNode; } export declare interface DataViewerUrlState { readonly read: () => { table?: string | undefined; filter?: PredicateNode | undefined; sort?: ReadonlyArray | undefined; quickSearch?: string | undefined; page?: number | undefined; }; readonly write: (s: { table?: string | undefined; filter?: PredicateNode | undefined; sort?: ReadonlyArray | undefined; quickSearch?: string | undefined; page?: number | undefined; }) => void; } export declare const DefinitionChips: ({ definition }: { readonly definition: WorkflowDefinition; }) => ReactNode; export declare const DefinitionsTable: ({ definitions, runs, byTag, windowHours, bucketSeconds, windowMinutes, href, onStart }: DefinitionsTableProps) => ReactNode; export declare interface DefinitionsTableProps { readonly definitions: ReadonlyArray; readonly runs: ReadonlyArray; /** The stats window's bucket — the sparkline's resolution and tooltip time. */ readonly bucketSeconds?: number; readonly windowMinutes?: number; readonly byTag: ReadonlyArray<{ readonly tag: string; readonly started: number; readonly succeeded: number; readonly failed: number; readonly cancelled: number; readonly series?: ReadonlyArray<{ readonly started: number; readonly failed: number; }>; }> | undefined; readonly windowHours: number | undefined; readonly href?: (tag: string) => string; readonly onStart?: (tag: string) => void; } export declare interface DeliveryRecordWire { readonly id: string; readonly to: string; readonly category: string; readonly channel: string; readonly status: 'sent' | 'failed' | 'skipped'; readonly error?: string; readonly at: string; /** Which device token / push endpoint (multi-endpoint channels — web push, * mobile push). Absent on single-target channels. */ readonly endpoint?: string | null; /** When the recipient clicked the notification (web push click tracking). */ readonly clickedAt?: string | null; } /** * Derive the generated app's screen map from its graph (the wire value is an open * record — parsed defensively). Routes become `page` screens; procedures become * `list` / `form` / `stream` / `action` screens bound to the table they touch. */ export declare const deriveAppScreens: (graph: unknown) => ReadonlyArray; /** Derive per-endpoint rows (rpc + http + subscription + plugin) from a MetricSample[] * snapshot. Histogram series that share a tag (split by status/kind) are merged * so the quantile reflects all of them. RPC/HTTP failures use status='error'; * plugin failures use a dedicated counter; subscriptions have no error counter. */ export declare const deriveMetricRows: (samples: InspectMetricsData) => ReadonlyArray; /** Wrap devtools-ui pages to render them in `locale`. Omit / default → English. */ export declare const DevtoolsI18nProvider: ({ locale, children, }: { readonly locale: DevtoolsLocale; readonly children: ReactNode; }) => ReactNode; export declare type DevtoolsLocale = 'en' | 'de'; export declare interface DirEntry { readonly dir: string; readonly hasLayout: boolean; readonly hasError: boolean; readonly hasPending: boolean; readonly hasNotFound: boolean; } export declare interface DriftSnapshot { /** True when live fingerprint ≠ last-applied fingerprint. */ readonly isDrifted: boolean; readonly liveFingerprint: string; readonly lastAppliedFingerprint?: string; readonly lastAppliedAt?: string; readonly lastAppliedId?: string; } export declare type EnvAccess = 'public' | 'secret'; export declare interface EnvData { readonly app: string; readonly entries: ReadonlyArray; readonly summary: { readonly total: number; readonly set: number; readonly missingRequired: number; }; } export declare interface EnvEntry { readonly key: string; readonly owner: EnvOwner; readonly access: EnvAccess; readonly required: boolean; /** `process.env[key]` is present. Value is NEVER included. */ readonly isSet: boolean; /** Set, OR has a default, OR not required — i.e. won't block boot. */ readonly satisfied: boolean; readonly description?: string; readonly group?: string; /** Server's `EnvFieldKind`; widened to `string` here to avoid importing * @voltro/env. */ readonly kind?: string; } export declare type EnvOwner = 'app' | 'framework' | `plugin:${string}`; export declare const EnvPage: ({ useEnv, contextLine }: EnvPageProps) => ReactNode; export declare interface EnvPageProps { readonly useEnv: () => DataSource; readonly capabilities: Capabilities; readonly contextLine?: ReactNode; } export declare interface ErasureLogEntryWire { readonly subjectId: string; readonly at: string; readonly mode: string; readonly affected: ReadonlyArray<{ table: string; count: number; }>; } export declare interface EventDeclaration { readonly name: string; /** Field names of the routing key — what fans this event out. */ readonly keyFields: ReadonlyArray; /** How many ENFORCEABLE guards gate listening. 0 = anyone authenticated may * subscribe — check `openAccess` to tell "decided open" from "no decision". */ readonly guards: number; /** The declared `openAccess:` reason, when the author decided the event is * deliberately open. Distinct from `guards: 0`, which is "nobody declared * anything" — the confusion `openAccess` exists to remove. */ readonly openAccess?: string; /** Whether a FIRST attach replays the recent buffer. */ readonly rewind: boolean; /** * `'each'` — every delivery matters; a slow subscriber is told what it lost. * `'latest'` — a newer delivery supersedes a pending one and nothing is lost. * * Shown because the two produce IDENTICAL panels otherwise while meaning * opposite things about a missing message, and "why does this event never * report a gap" is unanswerable from the numbers alone. */ readonly delivery: 'each' | 'latest'; } export declare interface EventRoute { /** `tenant · event · key`, already rendered for humans. */ readonly route: string; readonly event: string; readonly subscribers: number; /** Deliveries retained for a reconnect right now. */ readonly buffered: number; readonly lastEmittedAt: number | undefined; } export declare interface EventsData { readonly declared: ReadonlyArray; readonly routes: ReadonlyArray; /** The answering process's publish origin. Serials are only comparable * within one, so a reader comparing pods needs to know which answered. */ readonly origin: string; readonly totals: { readonly routes: number; readonly subscribers: number; readonly buffered: number; }; readonly capturedAt: number; } export declare const EventsPage: ({ useEvents, contextLine }: EventsPageProps) => ReactNode; export declare interface EventsPageProps { readonly useEvents: () => DataSource; readonly contextLine?: ReactNode; } /** Total excluded, across all labels and reasons. */ export declare const excludedTotal: (payload: unknown) => number; /** JSON snapshots of standing registries. No server or runtime imports. */ declare type ExpectationRule = { readonly kind: 'freshness'; readonly column: string; readonly maxAgeMs: number; } | { readonly kind: 'nullRate'; readonly column: string; readonly maxRate: number; } | { readonly kind: 'rowCount'; readonly min?: number; readonly max?: number; } | { readonly kind: 'valueBounds'; readonly column: string; readonly min?: number; readonly max?: number; readonly maxViolationRate?: number; }; export declare interface ExpectationsData { readonly capturedAt: string; readonly expectations: ReadonlyArray<{ readonly name: string; readonly table: string; readonly invariant: 'freshness' | 'nullRate' | 'rowCount' | 'valueBounds'; readonly rule: ExpectationRule; readonly severity: 'info' | 'warn' | 'critical'; readonly status: 'holding' | 'violated' | 'unknown'; readonly metric: number | null; readonly threshold: number | null; readonly since: string | null; readonly lastEvaluatedAt: string | null; readonly lastCause: { readonly table: string; readonly op: string; readonly traceId?: string | null; readonly subjectId?: string | null; readonly procedure?: string | null; } | null; readonly description?: string; }>; } export declare const ExpectationsPage: ({ useSnapshot, contextLine }: StandingPageProps) => ReactNode; export declare interface ExperimentsData { readonly capturedAt: string; readonly experiments: ReadonlyArray<{ readonly name: string; readonly table: string; readonly metric: 'count' | 'sum' | 'avg' | 'conversionRate'; readonly baseline: string; readonly totalExposure: number; readonly variants: ReadonlyArray<{ readonly variant: string; readonly isBaseline: boolean; readonly isHoldout: boolean; readonly exposure: number; readonly metric: number | null; readonly lift: number | null; readonly diff: number | null; }>; readonly lastUpdatedAt: string | null; readonly description?: string; }>; } export declare const ExperimentsPage: ({ useSnapshot, contextLine }: StandingPageProps) => ReactNode; export declare interface FilterLeaf { readonly column: string; readonly op: FilterOp; readonly value?: CellValue; } export declare type FilterOp = 'eq' | 'neq' | 'contains' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'notIn' | 'isNull' | 'isNotNull'; export declare interface FlaggedItemWire { readonly id: string; readonly tag: string; readonly categories: ReadonlyArray; readonly reason: string; readonly subjectId: string | null; readonly at: string; readonly status: FlaggedStatus; } export declare type FlaggedStatus = 'pending' | 'confirmed' | 'dismissed'; export declare interface FlagLifecycleFindingWire { readonly key: string; readonly shape: FlagShapeWire; readonly shapeReason: string; readonly usage: FlagUsageWire; readonly lastTargetedAt: string | null; readonly lastBulkAt: string | null; readonly liveTargetedEvaluations: number; /** * True only when something is PROVEN: a constant/expired shape, or a `stale` * usage verdict over a long-enough observation window. * * `neverObserved` deliberately does NOT set it — a flag declared yesterday and * a flag abandoned last year produce the identical row. Do not render * `neverObserved` as "dead" in a panel; that is the over-claim the whole * report is built to avoid. */ readonly removalCandidate: boolean; readonly why: ReadonlyArray; } export declare interface FlagLifecycleWire { readonly coverage: FlagUsageCoverageWire; readonly findings: ReadonlyArray; /** What the report structurally cannot see. Ships WITH the data, and the * panel renders it — a limits list in a docs page next to a number somebody * is about to act on is a limits list nobody reads. */ readonly limits: ReadonlyArray; } /** A runtime override refused for not matching its flag's declared value type. */ export declare interface FlagOverrideRefusalWire { readonly key: string; readonly reason: string; } export declare interface FlagsAuditData { readonly audit: ReadonlyArray<{ readonly flag: string; readonly enabled: boolean; readonly previousEnabled: boolean | null; readonly actorId: string | null; readonly at: string; }>; /** An unavailable audit store must not be presented as an empty history. */ readonly note?: string; } /** What the DEFINITION alone proves about a flag (no observation involved). */ export declare type FlagShapeWire = 'constantOn' | 'constantOff' | 'expired' | 'notYetActive' | 'conditional'; export declare interface FlagsListData { readonly flags: ReadonlyArray; /** Absent on an app whose flags plugin predates the lifecycle report. */ readonly lifecycle?: FlagLifecycleWire; /** Keyed by flag key; only `defineFlag()` flags appear. */ readonly typed?: Readonly>; readonly overrideRefusals?: ReadonlyArray; } export declare const FlagsPage: ({ useFlags, useAudit, useToggle, capabilities, contextLine }: FlagsPageProps) => ReactNode; export declare interface FlagsPageProps { readonly useFlags: () => DataSource; readonly useAudit: () => DataSource; readonly useToggle?: () => MutateSource; readonly capabilities: Capabilities; readonly contextLine?: ReactNode; } export declare interface FlagSummaryWire { readonly key: string; readonly enabled: boolean; /** 0–100. 100 = on for everyone (subject to targeting). */ readonly rollout: number; readonly description?: string; } export declare interface FlagToggleInput { readonly key: string; readonly enabled: boolean; } export declare interface FlagToggleResult { readonly ok: boolean; readonly flags: ReadonlyArray; } export declare interface FlagUsageCoverageWire { readonly tracking: boolean; readonly observedSince: string | null; readonly observedDays: number; readonly retentionDays: number; readonly staleAfterDays: number; } /** What the OBSERVATIONS prove. Only `stale` is a proof — see the note on * `removalCandidate`. */ export declare type FlagUsageWire = 'evaluated' | 'stale' | 'neverObserved' | 'untracked'; /** How complete the fleet answer is. Every field here exists because its * absence would let a partial answer render as a whole one. */ export declare interface FleetCompleteness { readonly complete: boolean; readonly responded: number; readonly expected: number; /** Replicas membership knows about that published nothing readable. */ readonly missing: ReadonlyArray; /** Answers old enough that a reader should not treat them as current. */ readonly stale: ReadonlyArray<{ readonly replicaId: string; readonly ageMs: number; }>; /** Framework versions among the responders, counted — present only when * they DIFFER, which means a rolling deploy is in flight and the numbers * span two shapes. */ readonly departed?: ReadonlyArray<{ readonly replicaId: string; readonly ageMs: number; readonly version?: string; }>; readonly versions?: Readonly> | undefined; readonly reason?: string | undefined; } export declare interface FleetData { readonly replicas: ReadonlyArray; readonly completeness: FleetCompleteness; /** Which replica assembled this answer. Every replica can, and knowing * which one did is what lets a reader compare two assemblies. */ readonly assembledBy: string; readonly assembledAt: number; } export declare const FleetPage: ({ useFleet, contextLine }: FleetPageProps) => ReactNode; export declare interface FleetPageProps { readonly useFleet: () => DataSource; readonly contextLine?: ReactNode; } /** One replica's published observation. */ export declare interface FleetReplica { readonly replicaId: string; /** The framework version it runs. `undefined` when it could not be read — * which is not the same as an old version, and must not render as one. */ readonly version: string | undefined; /** How long ago it published, on the READER's clock. Approximate by * construction: it compares two machines' clocks. Good enough to say * "minutes old", never good enough to order two replicas by. */ readonly ageMs: number; /** `host:port` a peer can reach it on, or `undefined` — a replica that * published no reachable address cannot be addressed with `?replica=`. */ readonly reachableAt?: string | undefined; /** The counters it published. Shape depends on the kind. */ readonly payload: unknown; } /** * The resume census a replica publishes — the motivating payload. * * One entry per query label: how many of its subscriptions recorded a * delta-resume ring, and how many were excluded, by reason. */ export declare interface FleetResumeEntry { readonly label: string; readonly resumable: number; readonly excluded: Readonly>; } /** One admission DECISION — the audit trail. */ export declare interface FlowControlAdmission { readonly id: string; readonly workflowName: string; readonly outcome: 'admitted' | 'dropped' | 'skipped' | 'evicted' | 'expired' | string; readonly mode: string | null; readonly reason: string | null; readonly collapsed: number; readonly waitedMs: number | null; readonly executionId: string | null; readonly singletonKey: string | null; readonly concurrencyKey: string | null; readonly rateKey: string | null; readonly admittedAt: string; readonly releasedAt: string | null; /** Still holding a concurrency slot / singleton key. */ readonly holding: boolean; } /** * The last `cancelOn` sweep. * * `problems` is the one worth rendering loudly. An event whose SHAPE changed * makes `cancelOn` silently stop firing: the run keeps going, which is the safe * direction, and nothing about the run says a cancellation was attempted and * could not be evaluated. */ export declare interface FlowControlCancellation { readonly examined: boolean; readonly events: number; readonly cancelled: number; readonly discarded: number; readonly catchingUp: boolean; readonly sawFullRunPage: boolean; readonly problems: ReadonlyArray<{ readonly kind: string; readonly workflowName: string; readonly event: string; readonly detail: string; }>; readonly failures: ReadonlyArray<{ readonly subject: string; readonly detail: string; }>; readonly watermark: string | null; } /** The flow control as short chips: `concurrency 4`, `debounce 5s`, … */ export declare const flowControlChips: (control: WorkflowDefinition["flowControl"]) => ReadonlyArray<{ readonly kind: string; readonly text: string; }>; export declare interface FlowControlData { readonly placementId?: string; readonly workflows: ReadonlyArray; readonly intents: ReadonlyArray; readonly admissions: ReadonlyArray; /** `null` when no sweep has reported — NOT an all-zero object, which would * read as "the sweep ran and found nothing". */ readonly cancellation?: FlowControlCancellation | null; /** * `false` when flow control is not wired in this deployment at all. * * Distinct from wired-and-empty, and the panel renders the two differently. * An all-zero response is otherwise indistinguishable from a drainer that * never ran, which is the confusion this codebase keeps writing guards * against. */ readonly active: boolean; } /** One start waiting in the admission queue. */ export declare interface FlowControlIntent { readonly id: string; readonly workflowName: string; /** The resolved flow-control key. Empty for an unkeyed control. */ readonly controlKey: string; readonly mode: string; readonly priority: number; readonly dueAt: string; readonly deadlineAt: string | null; /** Starts folded into this ONE row. The number the feature exists to produce. */ readonly collapsed: number; readonly firstSeenAt: string; /** * How long this has been waiting. * * The starvation signal. A debounce with no `timeout` can defer forever, and * nothing else shows it — the row stays `pending` and looks perfectly * healthy. A value climbing past a few multiples of the declared period is * the thing to act on. */ readonly pendingAgeMs: number; /** Due, and the drainer has not taken it yet. A handful is normal (the tick * is ~1s); a growing number means the drainer is not running. */ readonly overdue: boolean; readonly attempts: number; readonly lastError: string | null; readonly deadLetteredAt: string | null; readonly tenantId: string | null; } export declare interface FlowControlWorkflow { readonly workflowName: string; readonly paused: boolean; /** What this workflow DECLARES. Present so "nothing is queued" reads as "no * controls" rather than as "the queue is broken" — the two produce the same * empty list otherwise. */ readonly controls: ReadonlyArray; readonly pending: number; readonly deadLettered: number; readonly inFlight: number; } /** * Render a stored control key for humans. * * A POOLED concurrency key is stored as `pool` * (the NUL separators make the prefix unforgeable by an app key function -- * see `pooledConcurrencyKey` in `@voltro/workflow`). Shown raw, the NULs * render as invisible boxes and the key reads as one smashed-together token. * Everything that is not a pooled spelling passes through untouched. */ export declare const formatControlKey: (key: string) => string; export declare const formatOffset: (offsetMs: number) => string; /** "15 min" / "1 h" / "7 d" for a window in minutes. */ export declare const formatWindow: (minutes: number) => string; export declare const GeneratedAppPreview: ({ graph, artifacts, contextLine }: GeneratedAppPreviewProps) => ReactNode; export declare interface GeneratedAppPreviewProps { /** The proposal's graph (open record) + the generated artifacts (for columns). */ readonly graph: unknown; readonly artifacts?: ReadonlyArray<{ readonly path: string; readonly content: string; }>; readonly contextLine?: ReactNode; } export declare interface GovernanceConsentData { readonly records: ReadonlyArray; } export declare interface GovernanceEraseInput { readonly subjectId: string; readonly mode?: 'delete' | 'anonymize'; } export declare interface GovernanceEraseResult { readonly entry: ErasureLogEntryWire; } export declare interface GovernanceErasuresData { readonly erasures: ReadonlyArray; } export declare interface GovernanceExportInput { readonly subjectId: string; } export declare interface GovernanceExportResult { readonly bundle: Record>>; } export declare const GovernancePage: (props: GovernancePageProps) => ReactNode; export declare interface GovernancePageProps { readonly useStatus: () => DataSource; readonly useSubjectGraph: () => DataSource; readonly useErasures: () => DataSource; readonly useConsent: (subjectId: string | undefined) => DataSource; readonly useExport?: () => MutateSource; readonly useErase?: () => MutateSource; readonly useSweep?: () => MutateSource; readonly capabilities: Capabilities; readonly contextLine?: ReactNode; } export declare interface GovernanceStatusData { readonly retention: ReadonlyArray; readonly scopes: ReadonlyArray; readonly fieldEncryption: boolean; readonly sweepIntervalMs: number; readonly lastSweepAt: string | null; readonly lastSweep: ReadonlyArray; readonly erasureCount: number; } export declare interface GovernanceSubjectGraphData { readonly subjectTable: string; readonly derived: boolean; readonly paths: ReadonlyArray<{ readonly table: string; readonly depth: number; readonly via: 'relation' | 'reference' | 'declared'; readonly route: ReadonlyArray; }>; /** Known gaps belong beside the paths and before export/erase actions. */ readonly limitations: ReadonlyArray<{ readonly kind: 'depth-truncated' | 'unreachable' | 'excluded'; readonly table: string; readonly detail: string; }>; } export declare interface GovernanceSweepResult { readonly lastSweepAt: string | null; readonly lastSweep: ReadonlyArray; } export declare type GrantPermission = 'read' | 'write'; export declare type GrantPrincipalType = 'user' | 'group' | 'apiKey'; export declare interface InboxItemWire { readonly id: string; readonly subjectId: string; readonly category: string; readonly title: string; readonly body: string; readonly readAt: string | null; readonly createdAt: string; } export declare interface InferenceQueueData { readonly queued: ReadonlyArray; readonly recent: ReadonlyArray; readonly counts: { readonly pending: number; readonly running: number; readonly failed: number; }; /** `false` when nothing can enqueue. Distinct from an empty queue, and * rendered differently. */ readonly active: boolean; /** `null` when no dispatcher tick has reported — NOT a zeroed object. */ readonly dispatcher: { readonly examined: boolean; readonly claimed: number; readonly succeeded: number; readonly failed: number; readonly retried: number; readonly reclaimed: number; readonly failures: ReadonlyArray<{ readonly id: string; readonly detail: string; }>; } | null; } export declare const InferenceQueuePanel: ({ useInferences }: InferenceQueuePanelProps) => ReactNode; export declare interface InferenceQueuePanelProps { readonly useInferences: () => DataSource; } export declare interface InferenceRow { readonly id: string; readonly workflowName: string; readonly runId: string | null; readonly executionId: string; readonly stepName: string; readonly status: string; readonly kind: string; readonly provider: string; readonly model: string; /** How long the call has been queued or running. Turns "a run is suspended" * into "the provider has not answered in nine minutes". */ readonly waitingMs: number; readonly attempts: number; readonly errorMessage: string | null; readonly durationMs: number | null; readonly enqueuedAt: string; readonly completedAt: string | null; /** The dispatcher holding this claim died; the next tick reclaims it. A * growing count means dispatchers are dying. */ readonly leaseExpired: boolean; } /** Status → tone. A failure never renders like a completion. */ export declare const inferenceTone: (status: string) => "ok" | "warn" | "bad"; /** One task catalog for both dashboard deployments. Host-only features are explicit. */ export declare const INSPECT_FEATURES: readonly [{ readonly id: "overview"; readonly group: "app"; readonly appliesTo: "both"; readonly host: "local"; }, { readonly id: "plugins"; readonly group: "app"; readonly appliesTo: "api"; }, { readonly id: "agent-tools"; readonly group: "app"; readonly appliesTo: "api"; }, { readonly id: "routes"; readonly group: "app"; readonly appliesTo: "web"; }, { readonly id: "rpc"; readonly group: "app"; readonly appliesTo: "api"; }, { readonly id: "env"; readonly group: "app"; readonly appliesTo: "both"; }, { readonly id: "connection"; readonly group: "app"; readonly appliesTo: "both"; }, { readonly id: "data"; readonly group: "data"; readonly appliesTo: "both"; }, { readonly id: "database"; readonly group: "data"; readonly appliesTo: "api"; }, { readonly id: "migrations"; readonly group: "data"; readonly appliesTo: "api"; }, { readonly id: "branches"; readonly group: "data"; readonly appliesTo: "api"; readonly host: "cloud"; }, { readonly id: "aggregates"; readonly group: "data"; readonly appliesTo: "api"; }, { readonly id: "expectations"; readonly group: "data"; readonly appliesTo: "api"; }, { readonly id: "cache"; readonly group: "data"; readonly appliesTo: "api"; }, { readonly id: "storage"; readonly group: "data"; readonly appliesTo: "api"; readonly plugin: "@voltro/plugin-storage"; }, { readonly id: "cdc-out"; readonly group: "data"; readonly appliesTo: "api"; readonly plugin: "@voltro/plugin-cdc-out"; }, { readonly id: "search"; readonly group: "data"; readonly appliesTo: "api"; readonly plugin: "@voltro/plugin-search"; }, { readonly id: "workflows"; readonly group: "automation"; readonly appliesTo: "api"; }, { readonly id: "outbox"; readonly group: "automation"; readonly appliesTo: "api"; }, { readonly id: "schedules"; readonly group: "automation"; readonly appliesTo: "api"; }, { readonly id: "events"; readonly group: "automation"; readonly appliesTo: "api"; }, { readonly id: "queue"; readonly group: "automation"; readonly appliesTo: "api"; readonly plugin: "queue"; }, { readonly id: "webhooks"; readonly group: "automation"; readonly appliesTo: "api"; readonly plugin: "@voltro/plugin-webhooks"; }, { readonly id: "ai-flows"; readonly group: "automation"; readonly appliesTo: "api"; readonly plugin: "aiFlows"; }, { readonly id: "flags"; readonly group: "product"; readonly appliesTo: "api"; readonly plugin: "@voltro/plugin-flags"; }, { readonly id: "experiments"; readonly group: "product"; readonly appliesTo: "api"; }, { readonly id: "billing"; readonly group: "product"; readonly appliesTo: "api"; readonly plugin: "@voltro/plugin-billing"; }, { readonly id: "mail"; readonly group: "product"; readonly appliesTo: "api"; readonly plugin: "@voltro/plugin-mail"; }, { readonly id: "notifications"; readonly group: "product"; readonly appliesTo: "api"; readonly plugin: "@voltro/plugin-notifications"; }, { readonly id: "comments"; readonly group: "product"; readonly appliesTo: "api"; readonly plugin: "@voltro/plugin-comments"; }, { readonly id: "moderation"; readonly group: "product"; readonly appliesTo: "api"; readonly plugin: "@voltro/plugin-moderation"; }, { readonly id: "governance"; readonly group: "product"; readonly appliesTo: "api"; readonly plugin: "@voltro/plugin-governance"; }, { readonly id: "metrics"; readonly group: "observe"; readonly appliesTo: "both"; }, { readonly id: "rate-limit"; readonly group: "observe"; readonly appliesTo: "api"; readonly plugin: "@voltro/plugin-ratelimit"; }, { readonly id: "budgets"; readonly group: "observe"; readonly appliesTo: "api"; }, { readonly id: "checks"; readonly group: "observe"; readonly appliesTo: "api"; }, { readonly id: "analytics"; readonly group: "observe"; readonly appliesTo: "api"; }, { readonly id: "logs"; readonly group: "observe"; readonly appliesTo: "both"; }, { readonly id: "traces"; readonly group: "observe"; readonly appliesTo: "api"; }, { readonly id: "timeline"; readonly group: "observe"; readonly appliesTo: "api"; }, { readonly id: "cluster"; readonly group: "observe"; readonly appliesTo: "api"; }, { readonly id: "fleet"; readonly group: "observe"; readonly appliesTo: "api"; }]; export declare interface InspectAccessData { readonly readConfigured: boolean; readonly writeConfigured: boolean; } /** Hosts key this page by app identity so unsaved credentials cannot follow an app switch. */ export declare const InspectAccessPage: ({ useAccess, useSave, canConfigure, contextLine }: InspectAccessPageProps) => ReactNode; export declare interface InspectAccessPageProps { readonly useAccess: () => DataSource; readonly useSave: () => MutateSource; readonly canConfigure: boolean; readonly contextLine?: ReactNode; } export declare interface InspectAccessUpdate { readonly readToken?: string | null; readonly writeToken?: string | null; } export declare interface InspectFeature { readonly id: InspectFeatureId; readonly group: InspectFeatureGroup; readonly appliesTo: 'api' | 'web' | 'both'; readonly host?: 'local' | 'cloud'; readonly plugin?: string; } export declare type InspectFeatureGroup = typeof INSPECT_FEATURES[number]['group']; export declare type InspectFeatureId = typeof INSPECT_FEATURES[number]['id']; /** Until discovery resolves, show shared surfaces. An unavailable inventory is * not evidence that a plugin is absent, so it must not hide its panel. */ export declare const inspectFeaturesFor: (host: "local" | "cloud", kind: "api" | "web" | undefined, plugins?: ReadonlyArray<{ readonly name: string; readonly baseName?: string; }>) => ReadonlyArray; export declare type InspectMetricsData = ReadonlyArray | WindowMetrics; /** Metadata only. Plugin configuration and credentials never belong here. */ export declare interface InspectPlugin { readonly name: string; readonly baseName?: string; readonly inspectSlug?: string; readonly version?: string; readonly description?: string; readonly framework?: string; readonly permissions: ReadonlyArray; readonly declaredScopes?: ReadonlyArray; readonly hooks: Readonly>; readonly routes: ReadonlyArray<{ readonly kind: 'mutation' | 'query' | 'action'; readonly name: string; readonly description?: string; }>; readonly httpRoutes: ReadonlyArray<{ readonly method: string; readonly path: string; }>; readonly inspectEndpoints: ReadonlyArray<{ readonly method: string; readonly path: string; readonly description?: string; }>; readonly templates: ReadonlyArray<{ readonly id: string; readonly title: string; readonly description: string; readonly kind: 'api' | 'web' | 'fullstack'; }>; readonly dashboardMounts: ReadonlyArray<{ readonly id: string; readonly slot: 'page' | 'widget' | 'nav'; readonly route?: string; readonly label: string; readonly bundleUrl: string; }>; readonly extendsSchema: { readonly tables: number; readonly migrations: number; }; readonly hasCodegen: boolean; readonly services: boolean; readonly hasConfigSchema: boolean; /** Activation completed during this process startup; not a live health signal. */ readonly activated: boolean; readonly installed: boolean; } export declare interface IntentOperationInput { readonly placementId?: string; readonly intentId: string; readonly action: 'retry' | 'discard'; } export declare interface IntentOperationResult { readonly changed: boolean; } export declare interface IntentValidationData { readonly checked: number; readonly valid: number; readonly invalid: number; readonly unavailable: number; readonly intents: ReadonlyArray<{ readonly id: string; readonly workflowName: string; readonly status: 'valid' | 'invalid' | 'workflow-missing' | 'schema-unavailable'; readonly detail: string | null; readonly queuedAppVersion: string | null; readonly queuedSchemaFingerprint: string | null; readonly currentSchemaFingerprint: string | null; readonly deadLettered: boolean; }>; } export declare const isStuckInference: (row: InferenceRow) => boolean; export declare const isWindowMetrics: (data: unknown) => data is WindowMetrics; /** A line diff of two values as pretty JSON. Exported for the test. */ export declare const jsonLineDiff: (before: unknown, after: unknown) => ReadonlyArray<{ readonly kind: " " | "-" | "+"; readonly text: string; }>; /** The names a "send event" may use: declared triggers off the definitions * plus every name already in the log. */ export declare const knownEventNames: (definitions: ReadonlyArray, events: ReadonlyArray) => ReadonlyArray; export declare const LatencyTiles: ({ latency }: { readonly latency: WorkflowLatencyStats; }) => ReactNode; export declare const lifecycleTone: (lifecycle: string) => string; export declare const LiveIndicator: ({ live, liveLabel, idleLabel, }: LiveIndicatorProps) => ReactNode; export declare interface LiveIndicatorProps { readonly live: boolean; /** Override the label. Defaults to `Live` / `Idle`. */ readonly liveLabel?: string; readonly idleLabel?: string; } export declare type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal'; export declare interface LogRecord { /** Wall-clock unix milliseconds. */ readonly ts: number; readonly level: LogLevel; readonly source: 'server' | 'client'; /** Logger scope ("voltro:dev:api", "voltro:dev:web", custom user scopes, …). */ readonly scope?: string; readonly message: string; /** Optional structured fields the logger emitted with the message. */ readonly fields?: Readonly>; } export declare const LogsPage: ({ useLogs, contextLine }: LogsPageProps) => ReactNode; export declare interface LogsPageProps { /** Hook factory: consumer wires fetch-or-RPC to a `LogsSnapshot`. */ readonly useLogs: (query: LogsQuery) => DataSource; readonly capabilities: Capabilities; readonly contextLine?: ReactNode; } export declare interface LogsQuery { /** Lower-bound timestamp (inclusive). */ readonly since?: number; /** Upper-bound timestamp (inclusive). */ readonly until?: number; /** Max records returned (server caps at buffer capacity). */ readonly max?: number; /** Minimum severity. */ readonly level?: LogLevel; /** Source filter — `server` for backend, `client` for the browser bridge. */ readonly source?: 'server' | 'client'; /** Case-insensitive substring match on `scope`. */ readonly scope?: string; /** Case-insensitive substring match on `message`. */ readonly filter?: string; } export declare interface LogsSnapshot { readonly capturedAt: number; readonly bufferCapacity: number; readonly bufferSize: number; readonly returned: number; readonly records: ReadonlyArray; } export declare interface MailOutboxData { readonly sends: ReadonlyArray; } export declare const MailPage: ({ useOutbox, useTemplates, usePreview, contextLine, capabilities, }: MailPageProps) => ReactNode; export declare interface MailPageProps { readonly useOutbox: () => DataSource; readonly useTemplates: () => DataSource; /** Render a template with props → subject + html + text (no send). */ readonly usePreview?: () => MutateSource; readonly capabilities: Capabilities; readonly contextLine?: ReactNode; } export declare interface MailPreview { readonly subject: string; readonly html: string; readonly text: string; } export declare interface MailPreviewInput { readonly template: string; readonly props?: unknown; readonly locale?: string; } export declare interface MailSend { readonly id: string; readonly to: ReadonlyArray; readonly from: string; readonly subject: string; /** `resend` / `memory` / `skipped` / `suppressed` / … */ readonly provider: string; readonly ok: boolean; readonly error?: string; /** epoch-ms when the send completed. */ readonly ts: number; readonly template?: string; } export declare interface MailTemplateRef { readonly name: string; readonly locale?: string; /** Sample props (skeleton from the template's schema) to pre-fill the * preview box — `{ name: '' }` instead of an empty `{}`. */ readonly props?: unknown; } export declare interface MailTemplatesData { readonly templates: ReadonlyArray; } /** * The engine: an in-memory, reactive, per-table store. A mutation `insert` adds a * row and notifies every open `list` subscription on that table — the same * write→push reactivity the real runtime gives, simulated client-side. */ export declare const makePreviewStore: () => PreviewStore; export declare interface MetricBucketPoint { readonly le: MetricReading; readonly count: number; } /** JSON-safe registry samples. The rolling invocation window is a separate source. */ export declare type MetricReading = number | '+Inf' | '-Inf' | 'NaN'; export declare interface MetricRegistryData { readonly samples: ReadonlyArray; } /** A derived per-endpoint row for the dashboard table. */ export declare interface MetricRow { readonly kind: 'rpc' | 'http' | 'subscription' | 'plugin'; readonly tag: string; /** cumulative invocation count (since process start). */ readonly count: number; readonly errorCount: number; /** quantiles in MILLISECONDS, from the duration histogram buckets. */ readonly p50: number; readonly p95: number; readonly p99: number; } export declare interface MetricSample { readonly name: string; readonly type: MetricSampleType; readonly labels: Record; readonly description?: string; readonly value?: MetricReading; readonly buckets?: ReadonlyArray; readonly sum?: MetricReading; readonly count?: number; } export declare type MetricSampleType = 'counter' | 'gauge' | 'histogram' | 'summary' | 'frequency'; export declare const MetricsPage: ({ useMetrics, useRegistry, contextLine }: MetricsPageProps) => ReactNode; export declare interface MetricsPageProps { readonly useMetrics: () => DataSource; readonly useRegistry?: () => DataSource; readonly contextLine?: ReactNode; } export declare const MigrationCard: ({ migration, canRollback, onRollback, rollbackPending, }: MigrationCardProps) => ReactNode; export declare interface MigrationCardProps { readonly migration: MigrationSnapshot; readonly canRollback?: boolean; readonly onRollback?: (id: string) => void; readonly rollbackPending?: boolean; } export declare interface MigrationPlanSnapshot { readonly operations: ReadonlyArray; readonly fromFingerprint: string; readonly toFingerprint: string; readonly summary: { readonly safe: number; readonly needsDefault: number; readonly needsBackfill: number; readonly needsRenameAnnotation: number; readonly lossy: number; readonly onlineRequired: number; readonly multiStep: number; readonly blocked: number; }; } export declare interface MigrationSnapshot { readonly id: string; readonly name: string; readonly hash: string; readonly status: 'pending' | 'applied' | 'failed' | 'reverted'; readonly appliedAt?: string; readonly durationMs?: number; readonly stepCount: number; readonly lastError?: { stepName: string; message: string; }; } export declare const MigrationsPage: ({ useMigrationsStatus, useApplyPlan, useSquashHistory, useRestoreSnapshot, useCompareCrossEnv, capabilities, contextLine, }: MigrationsPageProps) => ReactNode; export declare interface MigrationsPageProps { readonly useMigrationsStatus: () => DataSource; /** Mutate: apply the current pending plan. Pass undefined if the * transport doesn't expose an Apply mutation (read-only previews, * cloud's "approval required" mode). */ readonly useApplyPlan?: () => MutateSource<{ readonly note?: string | undefined; }, void>; /** Mutate: consolidate every auto-diff plan applied before a cut-off * into one synthetic snapshot row. Pass undefined to hide the * Squash card (cloud may gate this behind project-admin only). */ readonly useSquashHistory?: () => MutateSource<{ readonly before: string; readonly note?: string | undefined; }, { readonly snapshotId: string; readonly rowsSquashed: number; }>; /** Mutate: restore soft-drop sidecar columns from one applied plan * back to their original names. Pass undefined when no sidecar * columns exist (the card hides itself in that case too). */ readonly useRestoreSnapshot?: () => MutateSource<{ readonly planId: string; }, { readonly restoredColumns: number; }>; /** Mutate: fetch a remote env's live schema + diff against local. * The result is folded into `MigrationsStatus.crossEnvDiffs` by the * transport so the page re-renders without a refresh. */ readonly useCompareCrossEnv?: () => MutateSource<{ readonly url: string; readonly label?: string | undefined; readonly token?: string | undefined; }, CrossEnvDiffSnapshot>; readonly capabilities: Capabilities; readonly contextLine?: ReactNode; } /** * Bundle the page consumes via `useMigrationsStatus`. Three independent * concerns under one snapshot to avoid three round-trips at page load. */ export declare interface MigrationsStatus { readonly drift: DriftSnapshot; readonly pending: MigrationPlanSnapshot | null; readonly history: ReadonlyArray; /** Soft-drop snapshot columns present in the live DB * (`__dropped_`). Populated when the planner has * observed at least one survivor across the last N applied plans. * Drives the "Restore snapshot" affordance. Optional so old * transports stay wire-compatible. */ readonly softDropSnapshots?: ReadonlyArray; /** Cross-env diffs the operator has pre-fetched via * `voltro db plan --against `. Stored client-side per session; * the page just renders them. Empty by default. */ readonly crossEnvDiffs?: ReadonlyArray; } export declare const migrationTone: (status: MigrationSnapshot["status"]) => string; export declare interface ModerationFlaggedData { readonly items: ReadonlyArray; readonly stats: { readonly blocked: number; readonly flagged: number; readonly pending: number; }; } export declare const ModerationPage: ({ useFlagged, useResolve, capabilities, contextLine }: ModerationPageProps) => ReactNode; export declare interface ModerationPageProps { readonly useFlagged: () => DataSource; readonly useResolve?: () => MutateSource; readonly capabilities: Capabilities; readonly contextLine?: ReactNode; } export declare interface ModerationResolveInput { readonly id: string; readonly action: 'confirm' | 'dismiss'; } export declare interface ModerationResolveResult { readonly ok: boolean; readonly item: FlaggedItemWire; } /** * A one-shot mutating action — the write-side of an inspect page. * * Implementations: * - local devtools: HTTP POST to a write-enabled inspect endpoint * - cloud customer dashboard: `useMutation` against a cloud-api RPC * that proxies the action through to the customer-app * - admin app: bypasses tenant scope * * The mutate() promise resolves on success and rejects on failure; * `pending` and `error` mirror the most-recent invocation so renderers * can show pre / during / post states. */ export declare interface MutateSource { /** True while a mutate call is in flight. */ readonly pending: boolean; /** Last call's error, if any. Reset to undefined on next call. */ readonly error: unknown | undefined; readonly mutate: (input: Input) => Promise; } export declare const NondeterminismBanner: ({ findings, onSelectStep }: { readonly findings: ReadonlyArray; readonly onSelectStep?: (stepName: string) => void; }) => ReactNode; export declare interface NondeterminismFinding { readonly stepName: string; readonly kind: string; readonly recorded: unknown; readonly reached: unknown; readonly detail: unknown; readonly occurredAt: string; } export declare const nondeterminismFindings: (events: ReadonlyArray) => ReadonlyArray; export declare interface NotificationsDeliveriesData { readonly deliveries: ReadonlyArray; readonly channels: ReadonlyArray; readonly stats: { readonly sent: number; readonly failed: number; readonly byChannel: Record; }; } export declare interface NotificationsInboxData { readonly items: ReadonlyArray; readonly unread: number; } export declare const NotificationsPage: ({ useDeliveries, useInbox, contextLine }: NotificationsPageProps) => ReactNode; export declare interface NotificationsPageProps { readonly useDeliveries: () => DataSource; readonly useInbox: (subjectId: string | undefined) => DataSource; readonly contextLine?: ReactNode; } /** The envelope, as the fetch layer attaches it to a payload. */ export declare interface ObservationEnvelope { readonly scope?: { readonly kind?: string; } | undefined; readonly origin?: { readonly replicaId?: string; readonly instanceId?: string; readonly version?: string | undefined; } | undefined; readonly completeness?: { readonly complete?: boolean; readonly fleetSize?: number; readonly responded?: number; readonly expected?: number; readonly missing?: ReadonlyArray; readonly stale?: ReadonlyArray<{ readonly replicaId: string; readonly ageMs: number; }>; readonly departed?: ReadonlyArray<{ readonly replicaId: string; readonly ageMs: number; readonly version?: string; }>; readonly versions?: Readonly>; readonly reason?: string; } | undefined; readonly capturedAt?: number; } /** Read the envelope the fetch layer attached, if any. */ export declare const observationOf: (payload: unknown) => ObservationEnvelope | undefined; export declare type OperationClass = 'safe' | 'needs-default' | 'needs-backfill' | 'needs-rename-annotation' | 'lossy' | 'online-required' | 'multi-step'; /** * Every kind `@voltro/database`'s `MigrationOperation` can carry. * * Hand-written ON PURPOSE — this package is transport- and framework-agnostic * (its only dependency is `@voltro/ui-shadcn`), so it cannot derive the union * from the planner the way `@voltro/cli`'s `InspectMigrationOperationKind` * does. That makes it the one copy that CAN drift, and it had: it was missing * `add-unique-composite` / `drop-unique-composite` for as long as those ops * have existed, so a plan containing one arrived at the dashboard as a kind the * renderer had no case for. * * `migrationOpKindParity.test.ts` in `@voltro/database` reads this list against * the planner's union and fails on any divergence — the guard exists because * the drift is invisible otherwise: nothing crashes, a row just renders blank. * Keep the entries one-per-line so that test can parse them. */ export declare type OperationKind = 'create-table' | 'drop-table' | 'add-column' | 'drop-column' | 'rename-column' | 'alter-column-nullability' | 'alter-column-type' | 'alter-column-default' | 'add-index' | 'drop-index' | 'rename-index' | 'rename-table' | 'add-unique' | 'drop-unique' | 'add-enum-value' | 'add-unique-composite' | 'drop-unique-composite' | 'add-foreign-key' | 'drop-foreign-key' | 'add-check' | 'drop-check' | 'reconcile-json-check'; export declare interface OutboxAttemptsData { readonly found: boolean; readonly attempts: ReadonlyArray<{ readonly id: string; readonly attempt: number; readonly trigger: string; readonly triggeredBy: string | null; readonly reason: string | null; readonly outcome: string; readonly startedAt: string | null; readonly durationMs: number; readonly error: string | null; }>; } export declare interface OutboxData { readonly available: boolean; readonly effects: ReadonlyArray; readonly entries: ReadonlyArray; readonly hasMore: boolean; } export declare interface OutboxEntry { readonly id: string; readonly effect: string; readonly status: string; readonly attempts: number; readonly maxAttempts: number; readonly createdAt: string | null; readonly nextAttemptAt: string | null; readonly deliveredAt: string | null; readonly lastError: string | null; readonly tenantId: string | null; readonly subjectId: string | null; readonly traceId: string | null; readonly resendCount: number; readonly resendReason: string | null; } export declare interface OutboxFilter { readonly status?: 'pending' | 'delivering' | 'delivered' | 'dead'; readonly offset: number; } export declare const OutboxPage: (props: OutboxPageProps) => ReactNode; export declare interface OutboxPageProps { readonly useSnapshot: (input: OutboxFilter) => DataSource; readonly useAttempts: (id: string) => DataSource; readonly useResend: () => MutateSource; readonly capabilities: Capabilities; } export declare interface OutboxResendInput { readonly id: string; readonly reason: string; readonly confirm: true; } export declare interface OutboxResendResult { readonly accepted: boolean; readonly reason: string | null; } /** * Parse an entity artifact's columns from the framework DSL * (`table('name', { col: type()… })`). Regex over the known flat shape — returns * null when the content has no `table(...)` declaration. Browser-safe (no TS * compile); deterministic + unit-tested. */ export declare const parseEntityColumns: (content: string) => { table: string; columns: ReadonlyArray; } | null; /** * A payload a developer can EDIT rather than invent: every declared property * with a placeholder of its type, `example` / `default` honoured, required * ones first. Exported for the unit test; `{}` when the schema says nothing. */ export declare const payloadTemplate: (schema: Readonly> | undefined, depth?: number) => unknown; /** Compact view of one planned op for the UI; the renderer derives a * one-line description from the kind + table + tiny payload. */ export declare interface PlannedOperationSnapshot { readonly kind: OperationKind; readonly table: string; readonly classification: OperationClass; readonly reason?: string; readonly blocked?: { readonly fix: string; }; /** Optional summary the renderer uses for column/index/FK args. */ readonly target?: string; } /** Mount only the explicitly selected install. A single install is unambiguous; * two installs require a choice before any data read or action is mounted. */ export declare const PluginInstance: ({ baseName, usePlugins, selection, children }: { readonly baseName: string; readonly usePlugins: () => DataSource; readonly selection?: { readonly value: string; readonly onChange: (value: string) => void; }; readonly children: (inspectSlug: string) => ReactNode; }) => ReactNode; export declare interface PluginsData { readonly plugins: ReadonlyArray; readonly capturedAt: number; } export declare const PluginsPage: ({ usePlugins, contextLine, appUrl }: PluginsPageProps) => ReactNode; export declare interface PluginsPageProps { readonly usePlugins: () => DataSource; readonly contextLine?: ReactNode; readonly appUrl?: string | undefined; } /** Recursive filter tree: arbitrary nesting of AND/OR groups around * leaf conditions. Serialised to the inspect `q` param. */ export declare type PredicateNode = { readonly kind: 'and'; readonly children: ReadonlyArray; } | { readonly kind: 'or'; readonly children: ReadonlyArray; } | ({ readonly kind: 'leaf'; } & FilterLeaf); /** Which preset the current `from`/`to` pair is, or undefined for a custom * range — a preset written a minute ago still reads as that preset. */ export declare const presetOf: (from: string, to: string, now: number) => TimePreset | undefined; export declare interface PreviewColumn { readonly name: string; readonly type: string; readonly widget: PreviewWidget; /** Auto-managed (id / timestamp default) → omitted from the create form. */ readonly auto: boolean; } export declare type PreviewRow = Record; export declare interface PreviewStore { readonly rows: (table: string) => ReadonlyArray; /** Insert a row (auto-assigns `id`); fires the table's subscribers. */ readonly insert: (table: string, row: PreviewRow) => PreviewRow; readonly remove: (table: string, id: string) => void; /** Subscribe to a table's rows; returns an unsubscribe. Fires on every change. */ readonly subscribe: (table: string, cb: (rows: ReadonlyArray) => void) => () => void; } export declare interface PreviewTableSpec { readonly table: string; readonly columns: ReadonlyArray; /** The query tag that lists this table (if the graph has one). */ readonly listTag?: string; /** The mutation tag that inserts into this table (if the graph has one). */ readonly createTag?: string; } export declare type PreviewWidget = 'text' | 'number' | 'checkbox' | 'date'; /** Prometheus-style histogram_quantile over cumulative [le, count] buckets. * `total` is the histogram's overall count (the implicit +Inf bucket). * Returns the boundary unit (seconds for our duration histograms). */ export declare const quantileFromBuckets: (buckets: ReadonlyArray, total: number, q: number) => number; /** One registered queue consumer + its live counters. */ export declare interface QueueConsumerRow { readonly topic: string; readonly groupId: string | null; readonly dlqTopic: string; readonly maxAttempts: number; readonly consumed: number; readonly retried: number; readonly deadLettered: number; readonly lastError: string | null; } export declare interface QueueData { /** This instance is the current provider for the app-wide outbox producer. */ readonly producerSelected: boolean; readonly brokers: ReadonlyArray; readonly consumers: ReadonlyArray; /** Messages produced per topic (outbox bridge + QueueService). */ readonly produced: Readonly>; } export declare const QueuePage: ({ useQueue, contextLine }: QueuePageProps) => ReactNode; export declare interface QueuePageProps { readonly useQueue: () => DataSource; readonly contextLine?: ReactNode; } export declare interface RateLimitCounts { readonly allowed: number; readonly rejected: number; readonly bypassed: number; readonly unbound: number; readonly storeErrors: number; readonly lastRejectedAt: number | null; readonly lastStoreErrorAt: number | null; } export declare interface RateLimitData { readonly capturedAt: number; readonly startedAt: number; readonly rpcGate: 'enabled' | 'disabled' | 'dynamic'; readonly dynamicResolver: boolean; readonly store: { readonly kind: 'memory' | 'postgres' | 'redis' | 'custom'; readonly scope: 'process' | 'shared-store' | 'unknown'; readonly sqlBinding: 'not-required' | 'waiting' | 'binding' | 'bound' | 'failed'; readonly trackedBuckets: number | null; }; readonly rules: ReadonlyArray; readonly defaultRule: RateLimitRuleData | null; readonly http: { readonly limit: number; readonly windowMs: number; readonly algorithm: string; } | null; readonly counters: { readonly rpc: RateLimitCounts; readonly http: RateLimitCounts; }; } export declare const RateLimitPage: ({ useSnapshot }: { readonly useSnapshot: () => DataSource; }) => ReactNode; export declare interface RateLimitRuleData { readonly id: string; readonly match: string; readonly kinds: ReadonlyArray; readonly limit: number | 'dynamic'; readonly windowMs: number | 'dynamic'; readonly algorithm: string; readonly burst: number | 'dynamic'; readonly by: ReadonlyArray; readonly scope: string; readonly tenantOverrides: number; } /** Read-only baseline — useful for unauthenticated previews / public * status pages should those ever exist. */ export declare const READ_ONLY_CAPABILITIES: Capabilities; export declare interface RegistryMetricSample { readonly name: string; readonly type: MetricSampleType; readonly labels: Readonly>; readonly description?: string; readonly value?: MetricReading; readonly count?: number; readonly sum?: MetricReading; readonly buckets?: ReadonlyArray<{ readonly le: MetricReading; readonly count: number; }>; readonly quantiles?: ReadonlyArray<{ readonly quantile: number; readonly value: MetricReading; }>; readonly occurrences?: Readonly>; } /** Non-composable process observations are compared explicitly, never flattened * into an arbitrary winning replica. Shared records retain one editor. * Hosts key this boundary by app identity so retained membership cannot carry * over to another app when its first inventory request fails. */ export declare function ReplicaInspection({ selection, fleet, feature, enabled, pending, error, children }: { readonly selection: InspectReplicaSelection; readonly fleet: FleetData | undefined; readonly feature: string; readonly enabled: boolean; readonly pending?: boolean | undefined; readonly error?: unknown; readonly children: ReactNode; }): ReactNode; /** Editing the list starts no reads until Apply. Missing selected IDs remain * visible: a failed pod cannot change the meaning of an explicit selection. */ export declare function ReplicaSelector({ value, onChange, fleet, pending, error, onRetry }: ReplicaSelectorProps): ReactNode; export declare interface ReplicaSelectorProps { readonly value: InspectReplicaSelection; readonly onChange: (selection: InspectReplicaSelection) => void; readonly fleet: FleetData | undefined; readonly pending?: boolean; readonly error?: unknown; readonly onRetry?: () => void; } /** * Snapshot of the api's read-replica routing config. The framework * always publishes a value for every field — when replicas aren't * configured the snapshot encodes the documented defaults * (replicaCount 0, rywPolicy 'off', rywStore 'memory', region null, * localityEnabled false). The dashboard renders from this directly * without nullish-coalescing. */ declare interface ReplicationStatus { /** Number of replicas the framework's `ReplicatedDataStore` is * routing across. `0` means primary-only — no wrapper installed. */ readonly replicaCount: number; /** Active RYW policy. `'off'` when replicas are absent OR the api * set `RYW_POLICY=off`. */ readonly rywPolicy: 'off' | 'fallback' | 'wait'; /** Backing store for the RYW position cache. `'memory'` for the * per-process default; `'redis'` when `RYW_STORE=redis` is wired. */ readonly rywStore: 'memory' | 'redis'; /** Process-resolved region from `VOLTRO_REGION` / `AWS_REGION` / * etc. `null` when no region var is set — locality is off. */ readonly region: string | null; /** True when DB_REPLICA_REGIONS aligned with DB_REPLICA_URLS and * the framework installed the locality-aware selector. */ readonly localityEnabled: boolean; } /** Total subscriptions a replica reported as resumable, across all labels. */ export declare const resumableTotal: (payload: unknown) => number; /** Read a replica's payload as a resume census, or `[]` when it is not one. */ export declare const resumeCensusOf: (payload: unknown) => ReadonlyArray; export declare interface RetentionPolicyWire { readonly table: string; readonly ttlMs: number; readonly action: string; } /** Details for the selected page; rendering modes are facts, not health states. */ export declare const RouteCard: ({ route }: RouteCardProps) => ReactNode; export declare interface RouteCardProps { readonly route: RouteEntry; } export declare interface RouteEntry { readonly pattern: string; readonly file: string; readonly dirChain: ReadonlyArray; readonly renderMode: string; readonly interactive: 'full' | 'islands' | 'none'; readonly tenantAware: boolean; readonly revalidateMs: number | null; readonly staleWhileRevalidateMs: number; readonly cacheInvalidatesOn: ReadonlyArray; readonly hasLoader: boolean; readonly hasMeta: boolean; readonly hasGetStaticPaths: boolean; } export declare const RouteExplorer: ({ data, renderDetails }: RouteExplorerProps) => ReactNode; export declare interface RouteExplorerProps { readonly data: RoutesData; /** Hosts can add live route metrics without defining a second route tree. */ readonly renderDetails?: (route: RouteEntry) => ReactNode; } export declare interface RoutesData { readonly pages: ReadonlyArray; readonly dirs: ReadonlyArray; } /** * Routes belonging to one declared event. * * Matched on the `event` field rather than by parsing the rendered route: the * route string is for display and its separator could change, while `event` is * the identity the server sends alongside it precisely so nobody has to parse. */ export declare const routesForEvent: (data: EventsData, name: string) => ReadonlyArray; export declare const RoutesPage: ({ useRoutes, contextLine }: RoutesPageProps) => ReactNode; export declare interface RoutesPageProps { readonly useRoutes: () => DataSource; readonly capabilities: Capabilities; readonly contextLine?: ReactNode; } export declare type RowData = Readonly>; /** Last-write audit evidence; not a complete history or per-column change log. */ export declare interface RowProvenance { readonly table: string; readonly id: string; readonly found: boolean; readonly attribution: 'audit' | 'none'; readonly lastWrite: { readonly actor: { readonly id: string | null; } | null; readonly at: string | null; readonly traceId?: string | null; } | null; } export declare interface RpcData { readonly procedures: ReadonlyArray; readonly workflows: ReadonlyArray; } declare interface RpcInvocationInput { readonly tag: string; readonly input: unknown; readonly tenant: string | null; } declare type RpcInvocationResult = { readonly ok: true; readonly result: unknown; } | { readonly ok: false; readonly error: unknown; }; export declare const RpcPage: ({ useRpc, contextLine, invoke, capabilities }: RpcPageProps) => ReactNode; export declare interface RpcPageProps { readonly invoke?: (input: RpcInvocationInput) => Promise; readonly useRpc: () => DataSource; readonly capabilities: Capabilities; readonly contextLine?: ReactNode; } export declare interface RpcProcedure { readonly tag: string; readonly kind: 'query' | 'mutation' | 'action' | 'stream'; readonly file: string; readonly hasInputSchema: boolean; readonly hasOutputSchema: boolean; readonly hasErrorSchema: boolean; /** Draft-07 JSON Schema. Undefined when the framework couldn't encode. */ readonly inputSchema?: Readonly>; readonly outputSchema?: Readonly>; readonly errorSchema?: Readonly>; /** The declared access decision, as the manifest serialises it. Absent on an * older manifest — draw no conclusion then. */ readonly guards?: ReadonlyArray; } export declare const RpcProcedureRow: ({ procedure, onClick }: RpcProcedureRowProps) => ReactNode; export declare interface RpcProcedureRowProps { readonly procedure: RpcProcedure; readonly onClick?: (tag: string) => void; } export { ScheduleBackfillInput } export { ScheduleBackfillReceipt } export { ScheduleBackfillResult } export declare interface ScheduleEntry { readonly name: string; readonly cron: string; readonly timezone: string; readonly trigger: ScheduleTrigger; readonly onOverlap: 'skip' | 'queue' | 'parallel'; readonly backfill: 'skip' | 'latest' | 'all'; readonly maxRuntimeMs: number; readonly description?: string; /** ISO string — next firing computed from the cron + timezone. */ readonly nextFiringAt: string; /** * The most recent occurrence that has already passed, and the most recent one * the ledger has a run for. Present only for `trigger: 'external'` schedules, * and absent (not null) when the server could not answer. * * They exist because in `external` mode nothing else notices silence: the app * arms no timer, so a platform scheduler that stopped firing renders as "no * runs" — exactly how a schedule with nothing to do renders. `lastRunAt` * behind `lastOccurrenceAt` is the difference. */ readonly lastOccurrenceAt?: string | null; readonly lastRunAt?: string | null; } export declare interface ScheduleRun { readonly id: string; readonly name: string; readonly status: ScheduleRunStatus; readonly trigger: 'self' | 'external' | 'manual'; readonly scheduledAt: string; readonly firedAt: string | null; readonly completedAt: string | null; readonly durationMs: number | null; readonly errorTag: string | null; readonly errorMessage: string | null; readonly coordinationOutcome: string | null; readonly replicaId: string | null; } export declare interface ScheduleRunsData { readonly runs: ReadonlyArray; } export declare type ScheduleRunStatus = 'running' | 'queued' | 'succeeded' | 'failed' | 'skipped' | 'missed'; export declare interface SchedulesData { readonly schedules: ReadonlyArray; readonly coordination: 'single' | 'advisoryLock' | 'cluster'; } export declare const SchedulesPage: ({ useSchedules, useScheduleRun, useScheduleRuns, useRunNow, useBackfill, useBackfillRequest, backfillScope, capabilities, contextLine }: SchedulesPageProps) => ReactNode; export declare interface SchedulesPageProps { readonly useSchedules: () => DataSource; readonly useScheduleRun: (name: string, runId: string) => DataSource; readonly useScheduleRuns?: (name: string) => DataSource; readonly useRunNow?: () => MutateSource<{ name: string; }, void>; readonly backfillScope: string; readonly useBackfillRequest: (id: string | undefined) => DataSource; readonly useBackfill: () => MutateSource; readonly capabilities: Capabilities; readonly contextLine?: ReactNode; } export declare type ScheduleTrigger = 'self' | 'external'; /** `{ orderId: string, amount: number }` — one line for a chip or a tooltip. */ export declare const schemaSummary: (schema: Readonly> | undefined) => string; export declare const ScopeNotice: ({ observation, strings }: ScopeNoticeProps) => ReactNode; export declare interface ScopeNoticeProps { readonly observation: ObservationEnvelope | undefined; /** Localised strings; English defaults so a host can omit them. */ readonly strings?: { readonly oneOf?: (n: number) => string; readonly unknownFleet?: string; readonly partial?: (responded: number, expected: number) => string; readonly servedBy?: (replicaId: string) => string; }; } export declare interface SearchDriftData { readonly entries: ReadonlyArray; } /** One un-applied change, as `GET /drift` reports it (the repair queue, * oldest first). */ export declare interface SearchDriftEntryWire { readonly indexName: string; readonly sourceTable: string; readonly rowId: string; readonly docId: string; readonly op: 'upsert' | 'remove'; readonly attempts: number; readonly lastError: string; readonly firstFailedAt: string; readonly lastFailedAt: string; } export declare interface SearchIndexesData { readonly indexes: ReadonlyArray; readonly backend: string; /** Whether the index survives a restart / is shared across replicas. */ readonly durable?: boolean; /** Total pending drift-ledger entries across all indexes. */ readonly pendingDrift?: number; /** The sync/repair policy in force (retries, resync interval, …). */ readonly sync?: Record; } export declare interface SearchIndexWire { readonly table: string; readonly index: string; readonly tenantField: string | null; readonly synced: number; readonly removed: number; /** Changes that exhausted the sync retry and went to the drift ledger * instead of the engine. Cumulative — `> 0` means this index HAS drifted. */ readonly dropped: number; /** Ledger entries for this index still waiting for repair, right now. */ readonly pendingDrift: number; /** Most recent sync failure for this index (ISO), or null. */ readonly lastDriftAt: string | null; /** The index is KNOWN to disagree with the database right now. */ readonly drifted: boolean; readonly lastReindexAt: string | null; readonly lastReindexCount: number; } export declare const SearchPage: ({ useIndexes, useReindex, useDrift, useResync, capabilities, contextLine }: SearchPageProps) => ReactNode; export declare interface SearchPageProps { readonly useIndexes: () => DataSource; readonly useReindex?: () => MutateSource; readonly useDrift?: () => DataSource; readonly useResync?: () => MutateSource; readonly capabilities: Capabilities; readonly contextLine?: ReactNode; } export declare interface SearchReindexInput { readonly table: string; } export declare interface SearchReindexResult { readonly ok: boolean; readonly table: string; readonly index: string; readonly count: number; } export declare interface SearchResyncInput { readonly limit?: number; } export declare interface SearchResyncResult { readonly ok: boolean; readonly scanned: number; readonly repaired: number; readonly failed: number; } export declare const SeedCard: ({ seed, canRunSeed, onRunSeed, runPending, }: SeedCardProps) => ReactNode; export declare interface SeedCardProps { readonly seed: SeedSnapshot; readonly canRunSeed?: boolean; readonly onRunSeed?: (id: string) => void; readonly runPending?: boolean; } export declare const seedRunStatusTone: (s?: SeedSnapshot["lastRunStatus"]) => string; export declare interface SeedSnapshot { readonly id: string; readonly name: string; readonly lifecycle: string; readonly fingerprint: string; readonly cron?: string; readonly watchedTables?: ReadonlyArray; readonly lastRunStatus?: 'succeeded' | 'failed' | 'skipped'; readonly lastRunAt?: string; readonly lastRunDurationMs?: number; readonly lastRunRowsTouched?: number; readonly lastError?: { message: string; stepName?: string; }; } /** Sticky under the filters while rows are ticked: preview first (a dry run * against the SAME selection), then the verb — the panel on the Flow tab * does the same over a filter; this does it over what the operator can see. */ export declare const SelectionBar: (props: SelectionBarProps) => ReactNode; export declare interface SelectionBarProps { readonly prepareControls: (targets: ReadonlyArray>) => ReadonlyArray; readonly observeControl: (result: WorkflowControlResult) => void; readonly prepareRetries?: (targets: BulkRunResult['targets']) => ReadonlyArray; readonly observeRetry?: (result: WorkflowRetryObservation) => void; readonly selected: ReadonlyArray; readonly useBulkRuns: () => MutateSource; readonly capabilities: Capabilities; readonly onClear: () => void; } export declare const SendEventModal: ({ knownNames, initialName, initialPayload, pending, onCancel, onConfirm }: SendEventModalProps) => ReactNode; export declare interface SendEventModalProps { /** Names the api will accept — declared events and what triggers listen to. */ readonly knownNames: ReadonlyArray; readonly initialName?: string; readonly initialPayload?: unknown; readonly pending: boolean; readonly onCancel: () => void; readonly onConfirm: (input: { readonly name: string; readonly payload: unknown; }) => Promise; } /** * HAND COPY of `@voltro/cli`'s `SerialisedGuard` (inspect.ts). It has to be: * this package is deliberately dependency-free apart from the component kit, * so the dashboards that render a manifest can consume it without pulling in * the CLI. The copy is pinned from the owning side by * `packages/cli/src/serialisedGuardParity.test.ts` — same discipline as the * migration `OperationKind` copy in `data/migrations.ts`, which drifted * silently for two op kinds before its pin existed. * * Three kinds, three access states: `scope`/`policy` = a check runs; `open` = * the author's DECLARED no-check-needed (`openAccess:`), with the reason — * which is not the same fact as the field being absent (nobody decided). */ export declare type SerialisedGuard = { readonly kind: 'scope'; readonly scope: ReadonlyArray; readonly mode: 'all' | 'any'; /** The guard carries a `resource` extractor server-side, so the real * check is per-row and a global scope answer may be incomplete. */ readonly resourceScoped: boolean; } | { readonly kind: 'policy'; readonly action: string; readonly resourceType: string; } | { readonly kind: 'open'; readonly reason: string; }; /** * A column the planner marked as soft-dropped (renamed to a sidecar * `__dropped_` column instead of physically dropped) while * `VOLTRO_SOFT_DROP=1` was active. Carries enough info for the UI to * surface "X dropped column(s) from plan_… available to restore". */ declare interface SoftDropSnapshot { /** The plan that emitted the soft-drop. */ readonly planId: string; readonly table: string; /** Original column name (the visible one before the rename). */ readonly column: string; /** Sidecar column the data actually lives in now. */ readonly sidecarColumn: string; readonly droppedAt: string; } export declare interface SpanRow { readonly traceId: string; readonly spanId: string; readonly parentSpanId: string | null; readonly name: string; readonly kind: 'internal' | 'server' | 'client' | 'producer' | 'consumer'; readonly attributes: Readonly>; /** Wall-clock unix ms. */ readonly startMs: number; readonly endMs: number; readonly durationMs: number; readonly status: SpanStatus; readonly statusMessage?: string; } export declare type SpanStatus = 'ok' | 'error' | 'unset'; /** The sparkline as an SVG area over N buckets — 180 points read as a line, * not as 180 bars — with a failed marker per bucket that had one, and a * per-bucket tooltip (time and counts) on hover. Exported for the test. */ export declare const Sparkline: ({ series, title, bucketSeconds, endAt }: { readonly series: ReadonlyArray<{ readonly total: number; readonly failed: number; }>; readonly title: string; /** Seconds per bucket and the instant the last bucket ends — the tooltip's time. */ readonly bucketSeconds?: number; readonly endAt?: number; }) => ReactNode; /** Hourly run counts per tag over the loaded window — the sparkline's bars. * Client-side over what is loaded: the stats endpoint aggregates buckets * across tags, so a per-tag series has to come from the rows. */ export declare const sparklineOf: (runs: ReadonlyArray, tag: string, now: number, bucketCount?: number, bucketSeconds?: number) => ReadonlyArray<{ readonly total: number; readonly failed: number; }>; /** * How old an answer may be before it is worth doubting. * * A THRESHOLD for rendering, not for filtering: a stale replica is still * shown, with its age. Hiding it would make a partial answer look complete — * which is the failure this whole page exists to prevent. */ export declare const STALE_AFTER_MS = 120000; export declare interface StandingPageProps { readonly useSnapshot: () => DataSource; readonly contextLine?: ReactNode; } /** * Is this intent starving? * * Deliberately a RATIO of its own age to its own group's, not an absolute * threshold: a fifteen-minute debounce waiting twenty minutes is normal, and a * one-second throttle waiting twenty minutes is not. With no declared period to * compare against, the honest fallback is the queue's own median — an intent * waiting an order of magnitude longer than its peers is worth a look whatever * the units are. */ export declare const starvationRatio: (intent: FlowControlIntent, all: ReadonlyArray) => number; /** The stats window and bucket for a time preset — the server floors the * bucket to its cap. No preset: a day in five-minute buckets. */ export declare const statsWindowFor: (preset: TimePreset | undefined) => { readonly minutes: number; readonly bucketSeconds: number; }; export declare const StepMetricsTable: ({ steps }: { readonly steps: ReadonlyArray; }) => ReactNode; export declare interface StorageDeleteInput { readonly refId: string; } export declare interface StorageDeleteResult { readonly ok: boolean; } export declare interface StorageGrantsData { readonly grants: ReadonlyArray; } export declare interface StorageGrantWire { readonly id: string; readonly refId: string; readonly principalType: GrantPrincipalType; readonly principalId: string; readonly permission: GrantPermission; readonly createdAt: string; readonly expiresAt: string | null; readonly createdBy: string | null; } export declare const StoragePage: ({ useRefs, useStats, useGrants, useShare, useRevoke, useDelete, useUpload, uploadScope, download, capabilities, contextLine }: StoragePageProps) => ReactNode; export declare interface StoragePageProps { readonly uploadScope: string; readonly useRefs: (query?: StorageRefsQuery) => DataSource; readonly useStats: () => DataSource; /** Grants for the selected ref (re-subscribes when `refId` changes). */ readonly useGrants: (refId: string | undefined) => DataSource; readonly useShare?: () => MutateSource; readonly useRevoke?: () => MutateSource; readonly useDelete?: () => MutateSource; readonly useUpload?: () => MutateSource; readonly download?: (refId: string) => Promise; readonly capabilities: Capabilities; readonly contextLine?: ReactNode; } export declare interface StorageRefsData { readonly page: { readonly search: string; readonly offset: number; readonly nextOffset: number | null; }; readonly refs: ReadonlyArray; } export declare interface StorageRefsQuery { readonly search?: string; readonly offset?: number; } export declare interface StorageRefWire { readonly id: string; readonly tenantId: string | null; readonly ownerId: string | null; readonly bucket: string; readonly key: string; readonly contentType: string; readonly size: number; readonly checksum: string; readonly visibility: StorageVisibility; readonly accessPolicy: ReadonlyArray | null; readonly hasPassword: boolean; /** ISO timestamp. */ readonly createdAt: string; } export declare interface StorageRevokeInput { readonly grantId: string; } export declare interface StorageRevokeResult { readonly ok: boolean; } export declare interface StorageShareInput { readonly refId: string; readonly principalType: GrantPrincipalType; readonly principalId: string; readonly permission?: GrantPermission; readonly expiresInDays?: number; } export declare interface StorageShareResult { readonly grant: StorageGrantWire; } export declare interface StorageStatsData { readonly provider: string; readonly bucket: string; readonly byTenant: Record; readonly visibility: { readonly public: number; readonly private: number; }; } /** File bytes stay outside RPC payloads; the host provides a binary transport. */ export declare interface StorageUploadInput { /** Reuse for the same file and metadata after an uncertain upload. */ readonly operationId?: string; readonly file: File; readonly key: string; readonly tenantId: string | null; readonly ownerId: string | null; readonly visibility: StorageVisibility; } export declare interface StorageUploadResult { readonly id: string; readonly size: number; readonly contentType: string; } export declare type StorageVisibility = 'public' | 'private'; /** * Is this call stuck? * * An absolute threshold, unlike the admission queue's starvation ratio, and * deliberately so: a model call has a real-world expected duration measured in * seconds, so "still waiting after two minutes" means something on its own * without needing peers to compare against. */ export declare const STUCK_INFERENCE_MS = 120000; export declare interface SubjectScopeWire { readonly table: string; readonly subjectField: string; } /** Live subscriber count for one declared event, across all its keys. */ export declare const subscribersForEvent: (data: EventsData, name: string) => number; /** What needs an operator now, from the loaded window: failed, running past * three times the window's p95 (never under five minutes), suspended. Pure, * exported for the test. */ export declare const summariseAttention: (runs: ReadonlyArray, latency: WorkflowLatencyStats | undefined, now: number) => AttentionSummary; export declare interface SweepReportWire { readonly table: string; readonly action: string; readonly affected: number; } /** Container that draws the bottom border + sits the tab row over it. */ export declare const TabBar: ({ children }: TabBarProps) => ReactNode; export declare interface TabBarProps { readonly children: ReactNode; } export declare const TabButton: ({ label, count, active, onClick }: TabButtonProps) => ReactNode; export declare interface TabButtonProps { readonly label: string; readonly count?: number; readonly active: boolean; readonly onClick: () => void; } export declare interface TableSpec { readonly name: string; readonly columns: ReadonlyArray; readonly rowCount?: number; readonly isFrameworkTable?: boolean; readonly isReactive?: boolean; /** False when the table has no single `id` primary key — the row * editor (update/delete are id-keyed) renders read-only. Default true. */ readonly editable?: boolean; /** Primary-key column the editor targets. Conventionally `id`. */ readonly pkColumn?: string; } export declare const TIME_PRESETS: ReadonlyArray<{ readonly id: TimePreset; readonly ms: number; }>; /** The `GET /_voltro/inspect/timeline` snapshot. */ export declare interface TimelineData { /** False when `VOLTRO_TIMELINE=off` (the default in production). */ readonly enabled: boolean; /** The highest seq recorded — the scrubber's "now". */ readonly currentSeq: number; readonly events: ReadonlyArray; } export declare interface TimelineEntry { readonly id: string; readonly kind: TimelineKind; readonly label: string; readonly start: number; /** `null` while still open (running step, sleeping, awaiting, child in flight). */ readonly end: number | null; readonly status: 'running' | 'succeeded' | 'failed' | 'waiting' | 'cancelled'; readonly attempt?: number; readonly attempts?: number; readonly step?: WorkflowRunStep; readonly child?: WorkflowRunSnapshot; readonly payload?: unknown; } /** One recorded ChangeEvent in the timeline ring (redacted server-side). */ export declare interface TimelineEventRow { /** Monotonic per-process sequence — the scrubber's x-axis. */ readonly seq: number; /** Wall-clock ms when recorded. */ readonly ts: number; readonly table: string; readonly op: 'insert' | 'update' | 'delete'; readonly old: Record | null; readonly new: Record | null; readonly tenantId: string | null; } export declare type TimelineKind = 'step' | 'sleep' | 'signal' | 'child'; export declare const TimelinePage: ({ useTimeline, useReplay, contextLine }: TimelinePageProps) => ReactNode; export declare interface TimelinePageProps { /** The recorded events + currentSeq (`GET /_voltro/inspect/timeline`). */ readonly useTimeline: () => DataSource; /** A table's rows as of a seq (`…/timeline/replay`). `null` args = no fetch. */ readonly useReplay: (args: TimelineReplayArgs | null) => DataSource; readonly contextLine?: ReactNode; } /** Args for a point-in-time replay (`null` = nothing selected → no fetch). */ export declare interface TimelineReplayArgs { readonly table: string; readonly seq: number; } /** The `GET /_voltro/inspect/timeline/replay` result — a table's row-set as of * `asOfSeq`, reconstructed read-only. */ export declare interface TimelineReplayData { readonly table: string; readonly asOfSeq: number; readonly currentSeq: number; readonly rows: ReadonlyArray>; } export declare type TimePreset = '15m' | '1h' | '24h' | '7d'; /** A `datetime-local` value for an instant, in the viewer's zone (what the * inputs already hold). */ export declare const toLocalInput: (ms: number) => string; export declare const TracesPage: ({ useTraces, capabilities, contextLine, focusedTraceId }: TracesPageProps) => ReactNode; export declare interface TracesPageProps { readonly useTraces: (query: TracesQuery) => DataSource; readonly capabilities: Capabilities; readonly contextLine?: ReactNode; /** When set, the matching row is auto-expanded, scrolled into view, * and briefly ring-highlighted on mount. Used by deep-links from * the workflows page's `trace · ` chip (`?id=`). */ readonly focusedTraceId?: string; } export declare interface TracesQuery { /** Only traces containing at least one error span. */ readonly onlyErrors?: boolean; /** Max traces returned. */ readonly max?: number; } export declare interface TracesSnapshot { readonly capturedAt: number; readonly bufferCapacity: number; readonly bufferSize: number; readonly returned: number; readonly traces: ReadonlyArray; } export declare interface TraceSummary { readonly traceId: string; /** Earliest-starting span's name (the trace root, best-effort). */ readonly rootName: string; readonly startMs: number; /** Wall-clock span of the whole trace. For a subscription this is the * open-duration (liveness), NOT latency — use `lastDeliveryMs`. */ readonly durationMs: number; readonly spanCount: number; readonly hasError: boolean; /** `'subscription'` traces are long-lived; their `durationMs` is * liveness. `'request'` traces (mutation/action/webhook) have real * latency in `durationMs`. */ readonly kind: 'request' | 'subscription'; /** Subscriptions: latency of the most recent data transfer. */ readonly lastDeliveryMs?: number; /** Subscriptions: number of deliveries (snapshot + deltas). */ readonly deliveryCount?: number; /** Spans in waterfall (start-ascending) order. */ readonly spans: ReadonlyArray; } /** Static facts about a `defineFlag()` flag that no report can derive. */ export declare interface TypedFlagWire { readonly valueType: string; readonly variants: ReadonlyArray; /** IN-11 — the experiment this flag's arms report uplift for. */ readonly experiment: string | null; } /** * Declared events nothing has touched in this process. * * The runtime counterpart to `voltro doctor`'s static orphan audit: that one * reads source and answers "is it wired", this one answers "has it ever run * HERE". They disagree usefully — an event wired for a mobile client this * process never serves shows up here and not there. */ export declare const unusedEvents: (data: EventsData) => ReadonlyArray; /** `t('some.key', { count })` — looks up the active locale, falls back to English, * then to the key id. Supports `{name}` placeholder interpolation. */ export declare const useDevtoolsT: () => ((key: string, values?: Record) => string); export declare const useLiveTick: (intervalMs: number, enabled?: boolean) => number; /** Undefined outside an inspector: discovery and app identity remain unscoped. */ export declare const useReplicaReadSelection: () => InspectReplicaSelection | undefined; export declare const VersionsTable: ({ versions }: { readonly versions: ReadonlyArray; }) => ReactNode; export declare interface WebhookDelivery { readonly id: string; readonly deliveryId: string; readonly targetId: string; readonly event: string; readonly attempt: number; readonly status: WebhookDeliveryStatus; readonly responseStatus: number | null; readonly errorMessage: string | null; readonly latencyMs: number | null; readonly scheduledAt: string; readonly nextAttemptAt: string | null; } export declare type WebhookDeliveryStatus = 'pending' | 'inFlight' | 'succeeded' | 'failed' | 'retryScheduled'; /** * Per-event: how many targets subscribe, and whether this deployment has EVER * delivered it. * * Suggested by a deployment who shipped a create dialog offering eleven event * checkboxes of which four were wired. Ticking `team.updated` returned 200, * showed the endpoint enabled and healthy, and delivered nothing — forever. * Nothing in the framework could catch that in their code; the deployment can, * because it knows both halves. * * `everDelivered` is NOT derived from `deliveries`. That array is the most * recent page, so an event delivered steadily but long ago would read as never * delivered — the false positive this column exists to avoid producing. The * server answers it with its own bounded query. * * Facts, not a verdict: a target subscribed a minute ago with no delivery yet is * not a fault, and any threshold for "long enough to be suspicious" would be * wrong for someone. */ declare interface WebhookEventActivity { readonly event: string; readonly targets: number; readonly everDelivered: boolean; readonly lastDeliveryAt: string | null; /** Whether `emit(...)` EVER ran, independent of whether a target matched. * `undefined` = the stats table could not be read — "we did not look", which * is not the same answer as "it never fired". */ readonly everEmitted?: boolean; readonly lastEmitAt?: string | null; readonly emitCount?: number; } export declare interface WebhookIncoming { readonly id: string; /** Mounted URL path (`/webhooks/` by default). */ readonly path: string; readonly provider?: string; readonly signatureConfigured: boolean; readonly file: string; } export declare interface WebhookOutgoing { readonly id: string; readonly description?: string; readonly version: number; readonly file: string; } export declare interface WebhooksData { readonly storageConfigured?: boolean; readonly outgoing: ReadonlyArray; readonly incoming: ReadonlyArray; readonly targets: ReadonlyArray; readonly deliveries: ReadonlyArray; /** Absent on an older api — the column simply does not render. */ readonly eventActivity?: ReadonlyArray; } export declare const WebhooksPage: ({ useWebhooks, useSubscribe, usePause, useResume, useDelete, useRotateSecret, useReplay, useRepinVersion, capabilities, contextLine, }: WebhooksPageProps) => ReactNode; export declare interface WebhooksPageProps { readonly useWebhooks: () => DataSource; readonly useSubscribe?: () => MutateSource; readonly usePause?: () => MutateSource<{ targetId: string; }, void>; readonly useResume?: () => MutateSource<{ targetId: string; }, void>; readonly useDelete?: () => MutateSource<{ targetId: string; }, void>; readonly useRotateSecret?: () => MutateSource<{ targetId: string; }, { secret: string; }>; readonly useReplay?: () => MutateSource<{ deliveryId: string; }, void>; readonly useRepinVersion?: () => MutateSource<{ targetId: string; version: number; }, void>; readonly capabilities: Capabilities; readonly contextLine?: ReactNode; } /** Input for the subscribe mutation — mirrors the framework's * `WebhookSubscribeInput`. */ export declare interface WebhookSubscribeInput { readonly event: string; readonly url: string; readonly description?: string; readonly rateLimitPerMinute?: number; readonly format?: 'json' | 'form' | 'xml'; } export declare interface WebhookSubscribeResult { readonly id: string; readonly event: string; readonly url: string; readonly secret: string; } export declare interface WebhookTarget { readonly id: string; readonly event: string; readonly url: string; readonly active: boolean; readonly payloadVersion: number; readonly rateLimitPerMinute: number | null; readonly description: string | null; readonly createdAt: string; } /** API invocation collector: a bounded rolling window, distinct from the web * app's cumulative Effect registry. Keep that time basis visible. */ export declare interface WindowMetrics { readonly windowMs: number; readonly capturedAt: number; readonly totalSamples: number; readonly buckets: ReadonlyArray<{ readonly kind: 'request' | 'rpc' | 'plugin'; readonly tag: string; readonly count: number; readonly errorCount: number; readonly latencyMs: { readonly p50: number; readonly p95: number; readonly p99: number; readonly mean: number; readonly min: number; readonly max: number; }; }>; } export declare const WorkflowConfigCard: ({ definition }: { readonly definition: WorkflowDefinition; }) => ReactNode; declare type WorkflowControlReader = (input: WorkflowControlReadInput) => DataSource; /** Browser recovery metadata only. Never persist workflow input, output or errors. */ declare interface WorkflowControlReference extends WorkflowControlReadInput { readonly runId: string; } export declare interface WorkflowDefinition { readonly tag: string; readonly file: string; /** Everything below mirrors the api's `InspectWorkflowEntry` — read off the * definition the engine registers. Optional so an older api still lists * its workflows; the page then shows the name and file only. */ readonly payloadSchema?: Readonly>; readonly version?: string; readonly compatibleWith?: ReadonlyArray; readonly patches?: ReadonlyArray; readonly flowControl?: Readonly>>>; readonly messages?: { readonly signals: ReadonlyArray; readonly updates: ReadonlyArray; }; readonly access?: { readonly internal: boolean; readonly scopes: ReadonlyArray; readonly openAccess?: string; }; readonly triggers?: { readonly events: ReadonlyArray<{ readonly id: string; readonly event: string; }>; readonly schedules: ReadonlyArray<{ readonly name: string; readonly cron: string; }>; }; } export declare const WorkflowDefinitionRow: ({ definition, href, action }: WorkflowDefinitionRowProps) => ReactNode; export declare interface WorkflowDefinitionRowProps { readonly definition: WorkflowDefinition; readonly href?: string; /** Rendered at the row's right edge, outside the link — a "Start run…" * button, typically. */ readonly action?: ReactNode; } declare interface WorkflowDomainEvent { readonly id: string; readonly name: string; readonly payload: unknown; readonly source: string; readonly subject: unknown | null; readonly traceId: string | null; readonly occurredAt: string; } export declare interface WorkflowDomainEventsData { readonly events: ReadonlyArray; } export declare interface WorkflowEntry { readonly tag: string; readonly file: string; } export declare interface WorkflowEventDeliveriesData { readonly deliveries: ReadonlyArray; } declare interface WorkflowEventDelivery { readonly id: string; readonly eventId: string; readonly eventName: string; readonly triggerId: string; readonly workflowName: string; readonly executionId: string | null; readonly status: 'starting' | 'started' | 'skipped' | 'failed'; readonly idempotencyKey: string; readonly skipped: boolean; readonly errorMessage: string | null; readonly createdAt: string; readonly completedAt: string | null; } /** What `POST /_voltro/inspect/workflows/events` answers — the log row's id * and what it started. */ export declare interface WorkflowEventEmitReceipt { readonly eventId: string; readonly triggered: ReadonlyArray<{ readonly triggerId: string; readonly workflowName: string; readonly status: string; readonly reason?: string; }>; } /** The workflow's admission, on the workflow's own page: paused or not, how * much is waiting, dead-lettered or holding a slot, and the two verbs — with * the paused state VISIBLE, which is the reason this is not a wall of * controls on another tab. */ export declare const WorkflowFlowStrip: ({ tag, useFlowControl, usePauseWorkflow, useResumeWorkflow, capabilities }: WorkflowFlowStripProps) => ReactNode; export declare interface WorkflowFlowStripProps { readonly tag: string; readonly useFlowControl: (placementId?: string) => DataSource; readonly usePauseWorkflow?: () => MutateSource<{ workflow: string; reason?: string; }, unknown>; readonly useResumeWorkflow?: () => MutateSource<{ workflow: string; }, unknown>; readonly capabilities: Capabilities; } export declare interface WorkflowLatencyStats { readonly samples: number; readonly p50: number | null; readonly p95: number | null; readonly max: number | null; } declare type WorkflowRetryReader = (target: WorkflowRetryTarget) => DataSource; /** Only recovery identities and a payload fingerprint, never the workflow payload. */ declare interface WorkflowRetryReference { readonly runId: string; readonly executionId: string; readonly workflowName: string; readonly requestId: string; readonly payloadFingerprint: string; } export declare interface WorkflowRunData { /** `null` once the read returned and no run matched. */ readonly run: WorkflowRunSnapshot | null; } /** One row in the chronological run-event log. Captures * transitions that don't have a row representation — suspend / resume * / cancel today, plus timer-fired / signal-received / child-spawned * in later phases. The renderer treats `eventType` as an open string * so a new framework event type doesn't require a UI update. */ export declare interface WorkflowRunEvent { readonly id: string; readonly runId: string; readonly eventType: string; readonly payload: unknown | null; /** ISO-8601 timestamp. */ readonly occurredAt: string; readonly stepName: string | null; readonly attempt: number | null; } export declare interface WorkflowRunEventsData { readonly events: ReadonlyArray; } export declare const WorkflowRunPage: ({ runId, useWorkflowRun, useWorkflowRunSteps, useWorkflowRunEvents, useWorkflowChildren, useCancelRun, useResumeRun, useRetryRun, useResumeFromStep, useSignalRun, useUpdateRun, useControlReceipt, useRetryReceipt, useFlowControl, controlScope, capabilities, backHref, workflowDetailHref, runHref, traceUrlBuilder, contextLine, }: WorkflowRunPageProps) => ReactNode; export declare interface WorkflowRunPageProps { readonly runId: string; readonly useWorkflowRun: (runId: string) => DataSource; readonly useWorkflowRunSteps: (runId: string) => DataSource; readonly useWorkflowRunEvents?: (runId: string) => DataSource; readonly useWorkflowChildren?: (parentExecutionId: string) => DataSource; readonly useCancelRun?: () => MutateSource<{ runId: string; control?: WorkflowControlIntent; }, WorkflowControlResult>; readonly useResumeRun?: () => MutateSource<{ runId: string; control?: WorkflowControlIntent; }, WorkflowControlResult>; readonly useRetryRun?: () => MutateSource; readonly useRetryReceipt?: WorkflowRetryReader; readonly useResumeFromStep?: () => MutateSource; readonly useSignalRun?: () => MutateSource<{ runId: string; signalName: string; payload?: unknown; }, void>; readonly useUpdateRun?: () => MutateSource<{ runId: string; updateName: string; payload?: unknown; timeoutMs?: number; }, WorkflowUpdateResult_2>; readonly useControlReceipt?: WorkflowControlReader; /** The admission ledger — this run's row is rendered at the run ("19 starts * collapsed into this one"), which is where a reader looking for the other * eighteen looks. */ readonly useFlowControl?: (placementId?: string) => DataSource; /** Stable inspected-app identity — the control journal's scope. */ readonly controlScope?: string; readonly capabilities: Capabilities; /** The list this run came from. */ readonly backHref: string; readonly workflowDetailHref?: (tag: string) => string; /** Another run's page — parent and children link through it. */ readonly runHref?: (runId: string) => string; readonly traceUrlBuilder?: (traceId: string) => string; readonly contextLine?: ReactNode; } export declare const WorkflowRunRow: ({ run, canCancel, canRetry, canRequeue, onCancel, onRetry, onRequeue, pending, }: WorkflowRunRowProps) => ReactNode; export declare interface WorkflowRunRowProps { readonly run: WorkflowRunSnapshot; readonly canCancel?: boolean; readonly canRetry?: boolean; readonly canRequeue?: boolean; readonly onCancel?: (runId: string) => void; readonly onRetry?: (runId: string) => void; readonly onRequeue?: (runId: string) => void; readonly pending?: boolean; } export declare interface WorkflowRunsData { readonly runs: ReadonlyArray; } /** * Server-side run filter, passed INTO the `useWorkflowRuns` provider hook. * * The page keeps its client-side filtering as a second layer on whatever comes * back — deliberately: an older api that ignores these query params still * renders a correctly-filtered page (just over a larger fetch), and a * server that DID filter loses nothing to a re-check. What the server filter * buys is scale — the page stops needing every run in memory to find the five * failed ones. */ export declare interface WorkflowRunsFilter { readonly statuses?: ReadonlyArray; /** Substring match on the tag — the search box. */ readonly tagContains?: string; readonly source?: string; /** Prefix of the run id OR execution id. */ readonly idPrefix?: string; /** Exact tag — detail mode. */ readonly tag?: string; /** ISO instants bounding `startedAt` (inclusive / exclusive) — the filter * bar's time range. Sent as `from`/`to` to the inspect endpoint. */ readonly startedAfter?: string; readonly startedBefore?: string; readonly limit?: number; } /** Per-run record. Mirrors `_voltro_workflow_runs` rows + carries the * caller payload so the dashboard can render an "open details" * drawer + the retry button without an extra round-trip. */ export declare interface WorkflowRunSnapshot { readonly runId: string; readonly workflowTag: string; readonly executionId: string; readonly status: 'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'paused' | 'suspended'; readonly startedAt?: string; readonly completedAt?: string; readonly durationMs?: number; readonly payload?: unknown; readonly workflowVersion?: string | null; readonly workflowPatches?: unknown | null; readonly output?: unknown; readonly traceId?: string; /** Framework surface that accepted the start: `workflow-rpc`, * `app-context`, `inspect`, `schedule:`, `incoming:`, * or a plugin-defined source. */ readonly source?: string | null; /** Aggregated step counts derived by the consumer from the steps * query — undefined when steps haven't been loaded. The renderer * shows a progress bar when both are defined. */ readonly stepCount?: number; readonly stepsCompleted?: number; /** Most-recent step the run was on. Useful for the listing row. */ readonly currentStep?: string; /** Last error captured by the recorder. */ readonly lastError?: { stepName: string; message: string; tag?: string; }; /** Parent workflow's executionId — when this run was spawned from * inside another workflow's body. The dashboard renders a * "child of …" chip pointing at the parent's run-detail. */ readonly parentExecutionId?: string | null; /** Parent-close policy for child workflow runs. Null for top-level * runs and plain starts that do not declare child semantics. */ readonly parentClosePolicy?: 'cancel' | 'terminate' | 'abandon' | null; } /** One row in the per-run step timeline — see plan 41 R4. */ export declare interface WorkflowRunStep { readonly id: string; readonly runId: string; readonly stepName: string; readonly attempt: number; readonly status: 'running' | 'succeeded' | 'failed'; /** What the step received via `step({ input, ... })`. Null when the * step was declared without an `input` (or pre-instrumentation). */ readonly input: unknown | null; /** Declarative retry summary. Null when the step didn't * declare `step({ retry })`. */ readonly retryPolicy: WorkflowRunStepRetryPolicy | null; readonly output: unknown | null; readonly errorTag: string | null; readonly errorMessage: string | null; /** Structured Cause for the dashboard stack-trace panel. * Shape: `{ pretty: string, failures: unknown[], defects: unknown[] }`. * Null when the step didn't fail. */ readonly errorCause: { readonly pretty: string; readonly failures: ReadonlyArray; readonly defects: ReadonlyArray; } | null; readonly startedAt: string; readonly completedAt: string | null; readonly durationMs: number | null; } /** Retry-policy summary as recorded into the step row. * Pure metadata for display; the actual retry behavior is owned by * the user's `Effect.retry` / `Activity.interruptRetryPolicy`. */ declare interface WorkflowRunStepRetryPolicy { readonly strategy: 'exponential' | 'fixed' | 'linear'; readonly maxAttempts: number; readonly baseDelay?: string; readonly maxDelay?: string; readonly step?: string; readonly note?: string; } export declare interface WorkflowRunStepsData { readonly steps: ReadonlyArray; } export declare interface WorkflowsData { readonly definitions: ReadonlyArray; } export declare const WorkflowsPage: ({ useWorkflows, useWorkflowRuns, useWorkflowStats, useWorkflowRunSteps, useWorkflowRunEvents, useWorkflowDomainEvents, useWorkflowEventDeliveries, useWorkflowChildren, useSignalRun, useCancelRun, useControlReceipt, controlScope, useRetryRun, useRetryReceipt, useSuspendRun, useResumeRun, useResumeFromStep, useFlowControl, usePauseWorkflow, useIntentValidation, useOperateIntent, useResumeWorkflow, useBulkRuns, useInferences, capabilities, useUpdateRun, contextLine, focusedTag, useStartRun, useEmitEvent, runHref: buildRunHref, workflowDetailHref: buildWorkflowHref, backHref: suppliedBackHref, traceUrlBuilder: buildTraceHref, }: WorkflowsPageProps) => ReactNode; export declare interface WorkflowsPageProps { readonly useWorkflows: () => DataSource; /** Per-run snapshot list. Re-mounts every ~2s while at least one * row is `running` (feels-live without CDC bridge). * * The page passes its CURRENT triage filters so the consumer can forward * them to `/_voltro/inspect/workflows/runs` as query params (`statuses`, * `q`, `source`, `idPrefix`) and the server does the narrowing. A deployment * that ignores the argument keeps working — the page re-applies the same * filters client-side either way (see `WorkflowRunsFilter`). */ readonly useWorkflowRuns?: (filter?: WorkflowRunsFilter) => DataSource; /** Bucketed run activity for the throughput/failure chart * (`/_voltro/inspect/workflows/stats`). Optional — without it the chart * simply does not render, which keeps older apis working. */ readonly useWorkflowStats?: (filter?: { readonly tag?: string; readonly hours?: number; readonly minutes?: number; readonly bucketSeconds?: number; }) => DataSource; /** Per-run step timeline. Called only for the actively-expanded * run; pass through `useSubscription` keyed on `runId`. */ readonly useWorkflowRunSteps?: (runId: string) => DataSource; /** Chronological lifecycle event log for one run. Same * pattern as `useWorkflowRunSteps`: called only when a run is * expanded. Renders as a panel below Steps. Optional — without * the prop the panel doesn't render (graceful for older clients * + memory-store apps that haven't migrated the events table). */ readonly useWorkflowRunEvents?: (runId: string) => DataSource; /** Domain events emitted through `ctx.events.emit(...)`. When * provided, the page renders an Events tab with delivery fan-out. */ readonly useWorkflowDomainEvents?: () => DataSource; readonly useWorkflowEventDeliveries?: (eventId: string) => DataSource; /** Children of a parent run (forward parent/child * lineage). Called per expanded RunRow with that run's * `executionId`. Returns the children as `WorkflowRunsData`. */ readonly useWorkflowChildren?: (parentExecutionId: string) => DataSource; /** Inject a named signal into a running workflow that's * parked on `awaitSignal({ name, schema })`. When provided, the * RunRow renders a "Send signal…" button on running rows that opens * a modal asking for `signalName` + JSON `payload`. */ readonly useSignalRun?: () => MutateSource<{ runId: string; signalName: string; payload?: unknown; }, void>; /** Send a synchronous tracked update into a running workflow. The * mutation waits for the workflow's `awaitUpdate(...)` handler to * record a result or validation failure. */ readonly useUpdateRun?: () => MutateSource<{ runId: string; updateName: string; payload?: unknown; timeoutMs?: number; }, WorkflowUpdateResult>; /** When provided, the `trace · ` chip in each * RunRow becomes an anchor link to a deployment-supplied URL. * Typical wiring: cloud dashboard points it at `/.../traces?id=`; * self-hosted setups can point at Jaeger / Tempo / Honeycomb. */ readonly traceUrlBuilder?: (traceId: string) => string; /** The declarative flow-control admission queue + ledger. When provided, the * Flow tab renders what was NOT started and why — the question the run table * cannot answer. Optional, so an older api simply omits the section. */ readonly useFlowControl?: (placementId?: string) => DataSource; readonly useIntentValidation?: (placementId?: string) => DataSource; readonly useOperateIntent?: () => MutateSource; readonly usePauseWorkflow?: () => MutateSource<{ workflow: string; reason?: string; }, unknown>; readonly useResumeWorkflow?: () => MutateSource<{ workflow: string; }, unknown>; /** Bulk cancel / replay. Optional, like every other operator verb — an older * api simply does not render the panel. */ readonly useBulkRuns?: () => MutateSource; /** Send or replay a declared domain event — `POST /_voltro/inspect/workflows/events`. * When present (and the capability allows) the events tab gets "Send * event…" and every logged event a "Replay". */ readonly useEmitEvent?: () => MutateSource<{ name: string; payload: unknown; }, WorkflowEventEmitReceipt>; /** The OFFLOADED-inference queue. Optional: an older api simply does not * render the panel. */ readonly useInferences?: () => DataSource; readonly useCancelRun?: () => MutateSource<{ runId: string; control?: WorkflowControlIntent; }, WorkflowControlResult>; /** Stable inspected-app identity, shared by list/detail views. Required to submit controls. */ readonly controlScope?: string; readonly useControlReceipt?: WorkflowControlReader; /** Retry signature accepts an optional `payloadOverride` — the * framework's replay-with-override path. When the * deployment's mutation supports it, the dashboard exposes a * "Retry with…" button beside the bare "Retry". */ readonly useRetryRun?: () => MutateSource; readonly useRetryReceipt?: WorkflowRetryReader; /** Suspend an in-flight run via the engine's native interrupt * semantics. The run row flips to `suspended` (distinct from * `cancelled`, which is terminal). */ readonly useSuspendRun?: () => MutateSource<{ runId: string; }, void>; /** Resume a previously-suspended run from its last checkpoint via * the engine's native `workflow.resume(executionId)`. */ readonly useResumeFromStep?: () => MutateSource; readonly useResumeRun?: () => MutateSource<{ runId: string; control?: WorkflowControlIntent; }, WorkflowControlResult>; readonly capabilities: Capabilities; readonly contextLine?: ReactNode; /** When set, the page renders in detail mode for ONE * workflow: definitions tab is hidden, runs are filtered to this * tag, and a stats card (success-rate, p50/p95 duration, counts * over the loaded window) is shown above the runs list. Pair this * with a `useWorkflowRuns` that calls the RPC with this tag. */ readonly focusedTag?: string; /** Start a workflow by name with a JSON payload — the inspect start * endpoint. When provided, the definitions tab gets a "Start run…" per * workflow and the empty runs state a call to action. */ readonly useStartRun?: () => MutateSource<{ workflow: string; payload: unknown; tenantId?: string; }, { id: string; executionId: string | null; status: string; }>; /** A run's own page. When provided, a run row LINKS there instead of * expanding inline — the accordion was a page with no URL. */ readonly runHref?: (runId: string) => string; /** When set, every WorkflowDefinitionRow on the * definitions tab becomes a link. Consumer maps tag → URL. */ readonly workflowDetailHref?: (tag: string) => string; /** Used in detail mode as the "Back" link target. */ readonly backHref?: string; } /** One bucket of the throughput/failure chart. Mirrors the * `/_voltro/inspect/workflows/stats` wire shape. */ export declare interface WorkflowStatsBucket { readonly start: string; readonly started: number; readonly succeeded: number; readonly failed: number; readonly cancelled: number; } export declare const WorkflowStatsCard: ({ runs, latency }: WorkflowStatsCardProps) => ReactNode; declare interface WorkflowStatsCardProps { readonly runs: ReadonlyArray; /** Server-side durations over the stats window. When present they replace * the percentiles computed from the loaded page — the page is the newest * slice, the window is the answer. */ readonly latency?: WorkflowLatencyStats; } export declare interface WorkflowStatsData { readonly windowHours: number; readonly bucketMinutes: number; /** Fine units — a 15-minute window in 5-second buckets. Absent on an * older api; derived from the hour/minute fields then. */ readonly windowMinutes?: number; readonly bucketSeconds?: number; readonly buckets: ReadonlyArray; readonly byTag: ReadonlyArray<{ readonly tag: string; readonly started: number; readonly succeeded: number; readonly failed: number; readonly cancelled: number; /** This tag's share of each bucket, aligned with `buckets` — the * overview sparkline from the window. Absent on an older api, and the * table then draws it from the loaded runs. */ readonly series?: ReadonlyArray<{ readonly started: number; readonly failed: number; }>; }>; /** Per-version figures — only with a `tag`. */ readonly byVersion?: ReadonlyArray; readonly total: number; /** The window held more rows than the server's scan cap — the chart then * describes the newest slice, not the window. MUST render as a warning: * a silently-truncated chart shows throughput dropping at exactly the * moment it spiked. */ readonly truncated: boolean; /** Terminal-run durations over the window. Optional for an older api. */ readonly latency?: WorkflowLatencyStats; /** Only with a `tag` — a step name means nothing across workflows. */ readonly steps?: ReadonlyArray; } export declare interface WorkflowStepResumeInput { readonly runId: string; readonly step: string; } export declare interface WorkflowStepResumeResult { readonly redriven: boolean; readonly stepName: string; readonly activitiesReset: number; readonly reason: string | null; } /** Per-step figures over the stats window — `/_voltro/inspect/workflows/stats?tag=`. */ export declare interface WorkflowStepStats { readonly name: string; readonly runs: number; readonly attempts: number; readonly failed: number; readonly retried: number; readonly p50: number | null; readonly p95: number | null; } export declare const WorkflowThroughputChart: ({ stats, title, workflowHref }: WorkflowThroughputChartProps) => ReactNode; export declare interface WorkflowThroughputChartProps { readonly stats: WorkflowStatsData; /** Compact label above the chart, e.g. the focused workflow's tag. */ readonly title?: ReactNode; /** When set, the per-workflow totals under the chart render as links — * the overview's "busiest workflows" list, jumping into detail mode. * Omit in detail mode (one tag has no list worth showing). */ readonly workflowHref?: (tag: string) => string; } declare interface WorkflowUpdateResult { readonly eventId: string; readonly updateId: string; readonly completedEventId: string; readonly result: unknown; } declare interface WorkflowUpdateResult_2 { readonly eventId: string; readonly updateId: string; readonly completedEventId: string; readonly result: unknown; } export declare interface WorkflowVersionStats { readonly version: string; readonly started: number; readonly succeeded: number; readonly failed: number; readonly cancelled: number; readonly p50: number | null; readonly p95: number | null; } export { }