@aiquants/enrichment-react 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,6 @@
1
- import { SearchDegradationReason, ConfidentialityLevel, PipelineRunStatus, PipelineStepKey, EnrichmentStageKey, SearchMode, ChunkSource, PipelinePhase, PipelineStepMetric, DocumentKind, StepGate, PipelineRunRecord, PipelineFlow, NothingToReadToken, PipelineStepStatus, PipelineTrigger } from "@aiquants/enrichment-core";
1
+ import { SearchDegradationReason, DiffLinePage, DocumentHistory, DocumentComparison, DocumentChangeFeedPage, DocumentCaptureAnswer, ConfidentialityLevel, ReadableEntry, PipelineRunStatus, PipelineStepKey, RestrictedRunMark, RestrictedIngestMark, ChunkBodyFidelity, ChunkChangeKind, DocumentStateCause, DocumentFacet, FacetChangeCounts, JsonValue, EnrichmentStageKey, SearchMode, ChunkSource, PipelinePhase, PipelineStepMetric, DocumentKind, StepGate, PipelineFlow, NothingToReadToken, PipelineStepStatus, PipelineTrigger, RunTerminalStepOutcome, LedgerStepKey, RestrictedFailureMark } from "@aiquants/enrichment-core";
2
2
  import React$1, { ReactNode, JSX } from "react";
3
+ import { ResourceOutcome, ConsoleUiLabels } from "@aiquants/console-ui/core";
3
4
  interface SearchMetadataLike {
4
5
  is_degraded: boolean;
5
6
  search_mode: string;
@@ -12,6 +13,54 @@ interface DegradedSearchBannerProps {
12
13
  }
13
14
  declare const REASON_LABELS: Readonly<Record<SearchDegradationReason, string>>;
14
15
  declare function DegradedSearchBanner({ metadata, onDismiss }: DegradedSearchBannerProps): React$1.JSX.Element | null;
16
+ interface DocumentComparisonQuery {
17
+ readonly fromStateId: number;
18
+ readonly toStateId: number;
19
+ }
20
+ type DiffLineTarget = {
21
+ readonly facet: "text" | "summary";
22
+ } | {
23
+ readonly facet: "chunks";
24
+ readonly entry: number;
25
+ };
26
+ type DiffLinePageQuery = DocumentComparisonQuery & DiffLineTarget & {
27
+ readonly hunk: number;
28
+ readonly offset: number;
29
+ readonly limit: number;
30
+ };
31
+ type DiffLinePageReader = (query: DiffLinePageQuery, signal: AbortSignal) => Promise<ResourceOutcome<DiffLinePage>>;
32
+ interface DocumentHistoryHost {
33
+ readonly loadHistory: (metadataId: number, signal: AbortSignal) => Promise<ResourceOutcome<DocumentHistory>>;
34
+ readonly compare: (query: DocumentComparisonQuery, signal: AbortSignal) => Promise<ResourceOutcome<DocumentComparison>>;
35
+ readonly readLines: DiffLinePageReader;
36
+ readonly loadChanges: (cursor: string | null, signal: AbortSignal) => Promise<ResourceOutcome<DocumentChangeFeedPage>>;
37
+ }
38
+ type DocumentStateCapture = (metadataId: number) => Promise<ResourceOutcome<DocumentCaptureAnswer>>;
39
+ type DocumentHistoryTarget = {
40
+ readonly kind: "latest_state";
41
+ } | {
42
+ readonly kind: "run";
43
+ readonly runId: number;
44
+ } | {
45
+ readonly kind: "state";
46
+ readonly stateId: number;
47
+ };
48
+ interface DocumentChangeFeedProps {
49
+ readonly host: Pick<DocumentHistoryHost, "loadChanges">;
50
+ readonly onOpen?: (metadataId: number, stateId: number) => void;
51
+ }
52
+ declare function DocumentChangeFeed({ host, onOpen }: DocumentChangeFeedProps): ReactNode;
53
+ type DocumentHistoryReads = Pick<DocumentHistoryHost, "loadHistory" | "compare" | "readLines">;
54
+ interface DocumentHistoryInspectorProps {
55
+ readonly host: DocumentHistoryReads;
56
+ readonly metadataId: number;
57
+ readonly target: DocumentHistoryTarget;
58
+ readonly openRequest: number;
59
+ readonly onClose: () => void;
60
+ readonly returnFocusFallback: () => HTMLElement | null;
61
+ readonly captureState?: DocumentStateCapture;
62
+ }
63
+ declare function DocumentHistoryInspector({ host, metadataId, target, openRequest, onClose, returnFocusFallback, captureState }: DocumentHistoryInspectorProps): ReactNode;
15
64
  interface DocumentIngestLabel {
16
65
  labelKey: string;
17
66
  category: "user" | "system" | "domain";
@@ -52,8 +101,9 @@ interface RecentIngestItem {
52
101
  createdAt: string;
53
102
  updatedAt: string;
54
103
  errorMessage?: string | null;
55
- lastRun: RecentIngestLastRun | null;
104
+ lastRun: ReadableEntry<RecentIngestLastRun> | RestrictedRunMark | null;
56
105
  }
106
+ type RecentIngestEntry = ReadableEntry<RecentIngestItem> | RestrictedIngestMark;
57
107
  interface IngestDomainOption {
58
108
  readonly key: string;
59
109
  readonly label: string;
@@ -66,6 +116,7 @@ type IngestRowAction = {
66
116
  readonly kind: "blocked";
67
117
  readonly reason: string;
68
118
  };
119
+ declare const NO_ENRICHMENT_RECORD_TEXT = "\u53D6\u308A\u8FBC\u307F\u306E\u8A18\u9332\u306A\u3057";
69
120
  declare function ingestRowAction(item: Pick<RecentIngestItem, "syncStatus" | "isCurrent">): IngestRowAction;
70
121
  interface IngestCapabilityPolicy {
71
122
  confidentialityLevel: ConfidentialityLevel;
@@ -76,7 +127,7 @@ interface DocumentIngestConsoleProps {
76
127
  tenantId: string;
77
128
  policies?: readonly IngestCapabilityPolicy[];
78
129
  domainOptions: readonly IngestDomainOption[];
79
- recentItems?: RecentIngestItem[];
130
+ recentItems?: readonly RecentIngestEntry[];
80
131
  inspectionResult?: FileInspectionResult | null;
81
132
  isSubmitting?: boolean;
82
133
  isInspecting?: boolean;
@@ -84,8 +135,36 @@ interface DocumentIngestConsoleProps {
84
135
  onIngestDocument?: (payload: DocumentIngestPayload) => void;
85
136
  onRetryItem?: (fileId: number) => void;
86
137
  onShowHistory?: (metadataId: number) => void;
87
- }
88
- declare function DocumentIngestConsole({ policies, tenantId, domainOptions, recentItems, inspectionResult, isSubmitting, isInspecting, onInspectUri, onIngestDocument, onRetryItem, onShowHistory }: DocumentIngestConsoleProps): ReactNode;
138
+ listRefusal?: string;
139
+ }
140
+ declare function DocumentIngestConsole({ policies, tenantId, domainOptions, recentItems, inspectionResult, isSubmitting, isInspecting, onInspectUri, onIngestDocument, onRetryItem, onShowHistory, listRefusal }: DocumentIngestConsoleProps): ReactNode;
141
+ declare const FACET_LABELS: Readonly<Record<DocumentFacet, string>>;
142
+ declare const DOCUMENT_STATE_CAUSE_LABELS: Readonly<Record<DocumentStateCause, string>>;
143
+ declare const CHUNK_CHANGE_KIND_LABELS: Readonly<Record<ChunkChangeKind, string>>;
144
+ declare const CHUNK_BODY_FIDELITY_LABELS: Readonly<Record<ChunkBodyFidelity, string>>;
145
+ declare const WHITESPACE_NORMALIZED_NOTE = "\u30C1\u30E3\u30F3\u30AF\u306E\u672C\u6587\u306F\u3053\u306E\u533A\u9593\u306E\u6587\u3092\u7A7A\u767D\u3067\u7E4B\u304E\u76F4\u3057\u305F\u5F62\u3067\u3059\u3002";
146
+ declare const UNVERIFIED_CHUNK_NOTE = "\u3053\u306E\u65AD\u7247\u306F\u3053\u306E\u72B6\u614B\u306E\u62BD\u51FA\u672C\u6587\u3068\u5BFE\u5FDC\u3057\u307E\u305B\u3093\u3002";
147
+ declare const CHUNKING_ONLY_NOTE = "\u672C\u6587\u306F\u540C\u3058\u3067\u3001\u30C1\u30E3\u30F3\u30AF\u306E\u5207\u308A\u65B9\u3060\u3051\u304C\u5909\u308F\u308A\u307E\u3057\u305F\u3002";
148
+ declare const FIELD_LABELS: Readonly<Record<string, string>>;
149
+ declare function fieldLabel(field: string): string;
150
+ declare const RESTRICTED_DOCUMENT_TEXT = "\u9694\u96E2 (RESTRICTED) \u306E\u6587\u66F8";
151
+ declare const RESTRICTED_STATE_TEXT = "\u9694\u96E2\u3055\u308C\u3066\u3044\u305F\u671F\u9593\u306E\u72B6\u614B";
152
+ declare const RESTRICTED_RUN_TEXT = "\u9694\u96E2\u3055\u308C\u3066\u3044\u305F\u671F\u9593\u306E\u5B9F\u884C";
153
+ declare const NO_PREVIOUS_RECORD_TEXT = "\u76F4\u524D\u306E\u8A18\u9332\u3068\u306E\u6BD4\u8F03\u306F\u3042\u308A\u307E\u305B\u3093\u3002";
154
+ declare const FAILED_RUN_STATE_MARK = "\u5931\u6557\u3057\u305F\u5B9F\u884C\u306E\u5F8C\u306E\u72B6\u614B";
155
+ declare const UNRECORDED_RUN_MARK = "\u8A18\u9332\u3055\u308C\u3066\u3044\u307E\u305B\u3093";
156
+ declare const MODEL_ONLY_CHANGE_MARK = "\u30BD\u30FC\u30B9\u306F\u540C\u3058\u3067\u3001\u30E2\u30C7\u30EB\u306E\u51FA\u529B\u3060\u3051\u304C\u5909\u308F\u308A\u307E\u3057\u305F";
157
+ declare function unrecordedRunsMark(runIds: readonly number[]): string;
158
+ declare function revisionLabel(revision: number): string;
159
+ declare function revisionTransitionText(previousRevision: number, revision: number): string;
160
+ declare function facetCountsText(counts: FacetChangeCounts): string;
161
+ declare function jsonValueText(value: JsonValue): string;
162
+ declare const HISTORY_REFUSAL = "\u6587\u66F8\u306E\u5C65\u6B74\u3092\u95B2\u89A7\u3059\u308B\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002";
163
+ declare function historyFailureSentence(labels: ConsoleUiLabels, failure: {
164
+ readonly status: number | null;
165
+ readonly reason: string;
166
+ }, subject: string): string;
167
+ declare function historyFailedSentence(subject: string): (reason: string) => string;
89
168
  type StrategyProvenance = "tenant" | "system";
90
169
  interface EnrichmentStrategyRow {
91
170
  id: number;
@@ -319,19 +398,6 @@ declare function stepGateState(gates: readonly StepGate[], featureFlags: Readonl
319
398
  declare function stepGatePolicy(gates: readonly StepGate[]): StepGatePolicy;
320
399
  declare function gateCaption(state: StepGateState, policy: StepGatePolicy): string;
321
400
  declare function PipelineFlowViewer({ featureFlags, metrics, metricSampleWindow, selectedKind: controlledKind, onSelectKind, selectedStepKey: controlledStepKey, onSelectStep }: PipelineFlowViewerProps): ReactNode;
322
- interface PipelineRunInspectorProps {
323
- metadataId: number;
324
- runs: readonly PipelineRunRecord[];
325
- selectedRunId: number | null;
326
- onSelectRun: (runId: number) => void;
327
- isLoading: boolean;
328
- failure: string | null;
329
- onClose: () => void;
330
- openRequest: number;
331
- returnFocusFallback: () => HTMLElement | null;
332
- }
333
- declare const STEP_CARDS_OPEN_LIMIT = 8;
334
- declare function PipelineRunInspector({ metadataId, runs, selectedRunId, onSelectRun, isLoading, failure, onClose, openRequest, returnFocusFallback }: PipelineRunInspectorProps): ReactNode;
335
401
  declare const FLOW_NODE_TEXT: {
336
402
  readonly inset: 12;
337
403
  readonly labelFontSize: 13;
@@ -385,6 +451,9 @@ type PipelineRunPresentationKey = PipelineRunStatus | "FAILED_RETRY_SCHEDULED";
385
451
  declare const PIPELINE_RUN_STATUS_PRESENTATION: Readonly<Record<PipelineRunPresentationKey, StatusPresentation>>;
386
452
  declare const PIPELINE_STEP_STATUS_PRESENTATION: Readonly<Record<PipelineStepStatus, StepStatusPresentation>>;
387
453
  declare const PIPELINE_TRIGGER_LABELS: Readonly<Record<PipelineTrigger, string>>;
454
+ declare const RUN_TERMINAL_STEP_LABEL = "\u6587\u66F8\u306E\u72B6\u614B\u306E\u8A18\u9332";
455
+ declare function ledgerStepLabel(key: LedgerStepKey): string;
456
+ declare const RUN_TERMINAL_STEP_OUTCOME_LABELS: Readonly<Record<RunTerminalStepOutcome, string>>;
388
457
  declare const UNFINISHED_LABEL = "\u672A\u5B8C\u4E86";
389
458
  declare function pipelineRunPresentationKey(run: {
390
459
  readonly status: PipelineRunStatus;
@@ -461,6 +530,7 @@ interface FailedSyncItem {
461
530
  error_message?: string | null;
462
531
  failed_at: string | null;
463
532
  }
533
+ type FailedSyncEntry = ReadableEntry<FailedSyncItem> | RestrictedFailureMark;
464
534
  interface SyncStatusCounts {
465
535
  PENDING?: number;
466
536
  EXTRACTING?: number;
@@ -475,11 +545,12 @@ interface SyncStatusCounts {
475
545
  interface SyncStatusMonitorProps {
476
546
  counts: SyncStatusCounts;
477
547
  totalFiles: number;
478
- failedItems?: FailedSyncItem[];
548
+ failedItems?: readonly FailedSyncEntry[];
479
549
  onRetryAll?: () => void | Promise<void>;
480
550
  onRetryItem?: (id: string | number, fileUri: string) => void | Promise<void>;
481
551
  isRetrying?: boolean;
482
552
  onRefresh?: () => void;
553
+ listRefusal?: string;
483
554
  }
484
- declare function SyncStatusMonitor({ counts, totalFiles, failedItems, onRetryAll, onRetryItem, isRetrying, onRefresh }: SyncStatusMonitorProps): React$1.JSX.Element;
485
- export { CHUNK_SOURCE_LABELS, type CircuitBreakerState, type ComparisonHit, type ComparisonInput, type ComparisonOutcome, type ComparisonVariant, type ComparisonVariantResult, type ConfidentialityLevelFilter, DegradedSearchBanner, type DegradedSearchBannerProps, type DeveloperSearchPreset, DocumentIngestConsole, type DocumentIngestConsoleProps, type DocumentIngestLabel, type DocumentIngestPayload, EnrichmentStrategyBoard, type EnrichmentStrategyBoardProps, type EnrichmentStrategyRow, FLOW_FOCUS_RING, FLOW_GEOMETRY, FLOW_NODE_TEXT, type FailedSyncItem, type FileInspectionResult, FinishedInstant, type FinishedInstantProps, type FlowGeometry, type FlowLayout, type FusionStrategy, GATE_POLICY_LABELS, GATE_STATE_PRESENTATION, type GateState, InfrastructureHealthMonitor, type InfrastructureHealthMonitorProps, type IngestCapabilityPolicy, type IngestDomainOption, type IngestRowAction, type LaidOutEdge, type LaidOutStep, type MetadataSearchHit, type MetadataSearchParams, type MetadataSearchResult, MetadataSearchWorkbench, type MetadataSearchWorkbenchProps, ModelComparisonWorkbench, type ModelComparisonWorkbenchProps, NOTHING_TO_READ_LABELS, type OntologyClassItem, type OntologyPredicateItem, OntologyStatusCard, type OntologyStatusCardProps, type OntologyStatusData, PHASE_LABELS, PIPELINE_RUN_STATUS_PRESENTATION, PIPELINE_STEP_STATUS_PRESENTATION, PIPELINE_TRIGGER_LABELS, PipelineFlowViewer, type PipelineFlowViewerProps, PipelineRunInspector, type PipelineRunInspectorProps, type PipelineRunPresentationKey, type QdrantCollectionInfo, type QdrantCollectionSelection, type QdrantHealthInfo, type QdrantResourceUsage, QdrantStorageCard, type QdrantStorageCardProps, type QdrantStorageOverview, REASON_LABELS, type RankAgreement, type RecentIngestItem, type RecentIngestLastRun, RecordedInstant, type RecordedInstantProps, SCORE_DISPLAY_DECIMALS, SEARCH_MODE_LABELS, SEARCH_PRESETS, STEP_CARDS_OPEN_LIMIT, type SearchAuthzScopes, type SearchHitGraphRelation, type SearchHitScoreBreakdown, type SearchMetadataLike, type ServiceHealthStatus, type StatusPresentation, type StepGatePolicy, type StepGateState, type StepStatusPresentation, type StrategyProvenance, type SyncStatusCounts, SyncStatusMonitor, type SyncStatusMonitorProps, type SystemInfrastructureHealth, UNFINISHED_LABEL, formatComparisonScore, gateCaption, gateState, gateStateOf, ingestRowAction, layoutFlow, pipelineRunPresentationKey, rankAgreement, skipReasonLabel, stepGatePolicy, stepGateState };
555
+ declare function SyncStatusMonitor({ counts, totalFiles, failedItems, onRetryAll, onRetryItem, isRetrying, onRefresh, listRefusal }: SyncStatusMonitorProps): React$1.JSX.Element;
556
+ export { CHUNKING_ONLY_NOTE, CHUNK_BODY_FIDELITY_LABELS, CHUNK_CHANGE_KIND_LABELS, CHUNK_SOURCE_LABELS, type CircuitBreakerState, type ComparisonHit, type ComparisonInput, type ComparisonOutcome, type ComparisonVariant, type ComparisonVariantResult, type ConfidentialityLevelFilter, DOCUMENT_STATE_CAUSE_LABELS, DegradedSearchBanner, type DegradedSearchBannerProps, type DeveloperSearchPreset, type DiffLinePageQuery, type DiffLinePageReader, type DiffLineTarget, DocumentChangeFeed, type DocumentChangeFeedProps, type DocumentComparisonQuery, type DocumentHistoryHost, DocumentHistoryInspector, type DocumentHistoryInspectorProps, type DocumentHistoryReads, type DocumentHistoryTarget, DocumentIngestConsole, type DocumentIngestConsoleProps, type DocumentIngestLabel, type DocumentIngestPayload, type DocumentStateCapture, EnrichmentStrategyBoard, type EnrichmentStrategyBoardProps, type EnrichmentStrategyRow, FACET_LABELS, FAILED_RUN_STATE_MARK, FIELD_LABELS, FLOW_FOCUS_RING, FLOW_GEOMETRY, FLOW_NODE_TEXT, type FailedSyncEntry, type FailedSyncItem, type FileInspectionResult, FinishedInstant, type FinishedInstantProps, type FlowGeometry, type FlowLayout, type FusionStrategy, GATE_POLICY_LABELS, GATE_STATE_PRESENTATION, type GateState, HISTORY_REFUSAL, InfrastructureHealthMonitor, type InfrastructureHealthMonitorProps, type IngestCapabilityPolicy, type IngestDomainOption, type IngestRowAction, type LaidOutEdge, type LaidOutStep, MODEL_ONLY_CHANGE_MARK, type MetadataSearchHit, type MetadataSearchParams, type MetadataSearchResult, MetadataSearchWorkbench, type MetadataSearchWorkbenchProps, ModelComparisonWorkbench, type ModelComparisonWorkbenchProps, NOTHING_TO_READ_LABELS, NO_ENRICHMENT_RECORD_TEXT, NO_PREVIOUS_RECORD_TEXT, type OntologyClassItem, type OntologyPredicateItem, OntologyStatusCard, type OntologyStatusCardProps, type OntologyStatusData, PHASE_LABELS, PIPELINE_RUN_STATUS_PRESENTATION, PIPELINE_STEP_STATUS_PRESENTATION, PIPELINE_TRIGGER_LABELS, PipelineFlowViewer, type PipelineFlowViewerProps, type PipelineRunPresentationKey, type QdrantCollectionInfo, type QdrantCollectionSelection, type QdrantHealthInfo, type QdrantResourceUsage, QdrantStorageCard, type QdrantStorageCardProps, type QdrantStorageOverview, REASON_LABELS, RESTRICTED_DOCUMENT_TEXT, RESTRICTED_RUN_TEXT, RESTRICTED_STATE_TEXT, RUN_TERMINAL_STEP_LABEL, RUN_TERMINAL_STEP_OUTCOME_LABELS, type RankAgreement, type RecentIngestEntry, type RecentIngestItem, type RecentIngestLastRun, RecordedInstant, type RecordedInstantProps, SCORE_DISPLAY_DECIMALS, SEARCH_MODE_LABELS, SEARCH_PRESETS, type SearchAuthzScopes, type SearchHitGraphRelation, type SearchHitScoreBreakdown, type SearchMetadataLike, type ServiceHealthStatus, type StatusPresentation, type StepGatePolicy, type StepGateState, type StepStatusPresentation, type StrategyProvenance, type SyncStatusCounts, SyncStatusMonitor, type SyncStatusMonitorProps, type SystemInfrastructureHealth, UNFINISHED_LABEL, UNRECORDED_RUN_MARK, UNVERIFIED_CHUNK_NOTE, WHITESPACE_NORMALIZED_NOTE, facetCountsText, fieldLabel, formatComparisonScore, gateCaption, gateState, gateStateOf, historyFailedSentence, historyFailureSentence, ingestRowAction, jsonValueText, layoutFlow, ledgerStepLabel, pipelineRunPresentationKey, rankAgreement, revisionLabel, revisionTransitionText, skipReasonLabel, stepGatePolicy, stepGateState, unrecordedRunsMark };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { SearchDegradationReason, ConfidentialityLevel, PipelineRunStatus, PipelineStepKey, EnrichmentStageKey, SearchMode, ChunkSource, PipelinePhase, PipelineStepMetric, DocumentKind, StepGate, PipelineRunRecord, PipelineFlow, NothingToReadToken, PipelineStepStatus, PipelineTrigger } from "@aiquants/enrichment-core";
1
+ import { SearchDegradationReason, DiffLinePage, DocumentHistory, DocumentComparison, DocumentChangeFeedPage, DocumentCaptureAnswer, ConfidentialityLevel, ReadableEntry, PipelineRunStatus, PipelineStepKey, RestrictedRunMark, RestrictedIngestMark, ChunkBodyFidelity, ChunkChangeKind, DocumentStateCause, DocumentFacet, FacetChangeCounts, JsonValue, EnrichmentStageKey, SearchMode, ChunkSource, PipelinePhase, PipelineStepMetric, DocumentKind, StepGate, PipelineFlow, NothingToReadToken, PipelineStepStatus, PipelineTrigger, RunTerminalStepOutcome, LedgerStepKey, RestrictedFailureMark } from "@aiquants/enrichment-core";
2
2
  import React$1, { ReactNode, JSX } from "react";
3
+ import { ResourceOutcome, ConsoleUiLabels } from "@aiquants/console-ui/core";
3
4
  interface SearchMetadataLike {
4
5
  is_degraded: boolean;
5
6
  search_mode: string;
@@ -12,6 +13,54 @@ interface DegradedSearchBannerProps {
12
13
  }
13
14
  declare const REASON_LABELS: Readonly<Record<SearchDegradationReason, string>>;
14
15
  declare function DegradedSearchBanner({ metadata, onDismiss }: DegradedSearchBannerProps): React$1.JSX.Element | null;
16
+ interface DocumentComparisonQuery {
17
+ readonly fromStateId: number;
18
+ readonly toStateId: number;
19
+ }
20
+ type DiffLineTarget = {
21
+ readonly facet: "text" | "summary";
22
+ } | {
23
+ readonly facet: "chunks";
24
+ readonly entry: number;
25
+ };
26
+ type DiffLinePageQuery = DocumentComparisonQuery & DiffLineTarget & {
27
+ readonly hunk: number;
28
+ readonly offset: number;
29
+ readonly limit: number;
30
+ };
31
+ type DiffLinePageReader = (query: DiffLinePageQuery, signal: AbortSignal) => Promise<ResourceOutcome<DiffLinePage>>;
32
+ interface DocumentHistoryHost {
33
+ readonly loadHistory: (metadataId: number, signal: AbortSignal) => Promise<ResourceOutcome<DocumentHistory>>;
34
+ readonly compare: (query: DocumentComparisonQuery, signal: AbortSignal) => Promise<ResourceOutcome<DocumentComparison>>;
35
+ readonly readLines: DiffLinePageReader;
36
+ readonly loadChanges: (cursor: string | null, signal: AbortSignal) => Promise<ResourceOutcome<DocumentChangeFeedPage>>;
37
+ }
38
+ type DocumentStateCapture = (metadataId: number) => Promise<ResourceOutcome<DocumentCaptureAnswer>>;
39
+ type DocumentHistoryTarget = {
40
+ readonly kind: "latest_state";
41
+ } | {
42
+ readonly kind: "run";
43
+ readonly runId: number;
44
+ } | {
45
+ readonly kind: "state";
46
+ readonly stateId: number;
47
+ };
48
+ interface DocumentChangeFeedProps {
49
+ readonly host: Pick<DocumentHistoryHost, "loadChanges">;
50
+ readonly onOpen?: (metadataId: number, stateId: number) => void;
51
+ }
52
+ declare function DocumentChangeFeed({ host, onOpen }: DocumentChangeFeedProps): ReactNode;
53
+ type DocumentHistoryReads = Pick<DocumentHistoryHost, "loadHistory" | "compare" | "readLines">;
54
+ interface DocumentHistoryInspectorProps {
55
+ readonly host: DocumentHistoryReads;
56
+ readonly metadataId: number;
57
+ readonly target: DocumentHistoryTarget;
58
+ readonly openRequest: number;
59
+ readonly onClose: () => void;
60
+ readonly returnFocusFallback: () => HTMLElement | null;
61
+ readonly captureState?: DocumentStateCapture;
62
+ }
63
+ declare function DocumentHistoryInspector({ host, metadataId, target, openRequest, onClose, returnFocusFallback, captureState }: DocumentHistoryInspectorProps): ReactNode;
15
64
  interface DocumentIngestLabel {
16
65
  labelKey: string;
17
66
  category: "user" | "system" | "domain";
@@ -52,8 +101,9 @@ interface RecentIngestItem {
52
101
  createdAt: string;
53
102
  updatedAt: string;
54
103
  errorMessage?: string | null;
55
- lastRun: RecentIngestLastRun | null;
104
+ lastRun: ReadableEntry<RecentIngestLastRun> | RestrictedRunMark | null;
56
105
  }
106
+ type RecentIngestEntry = ReadableEntry<RecentIngestItem> | RestrictedIngestMark;
57
107
  interface IngestDomainOption {
58
108
  readonly key: string;
59
109
  readonly label: string;
@@ -66,6 +116,7 @@ type IngestRowAction = {
66
116
  readonly kind: "blocked";
67
117
  readonly reason: string;
68
118
  };
119
+ declare const NO_ENRICHMENT_RECORD_TEXT = "\u53D6\u308A\u8FBC\u307F\u306E\u8A18\u9332\u306A\u3057";
69
120
  declare function ingestRowAction(item: Pick<RecentIngestItem, "syncStatus" | "isCurrent">): IngestRowAction;
70
121
  interface IngestCapabilityPolicy {
71
122
  confidentialityLevel: ConfidentialityLevel;
@@ -76,7 +127,7 @@ interface DocumentIngestConsoleProps {
76
127
  tenantId: string;
77
128
  policies?: readonly IngestCapabilityPolicy[];
78
129
  domainOptions: readonly IngestDomainOption[];
79
- recentItems?: RecentIngestItem[];
130
+ recentItems?: readonly RecentIngestEntry[];
80
131
  inspectionResult?: FileInspectionResult | null;
81
132
  isSubmitting?: boolean;
82
133
  isInspecting?: boolean;
@@ -84,8 +135,36 @@ interface DocumentIngestConsoleProps {
84
135
  onIngestDocument?: (payload: DocumentIngestPayload) => void;
85
136
  onRetryItem?: (fileId: number) => void;
86
137
  onShowHistory?: (metadataId: number) => void;
87
- }
88
- declare function DocumentIngestConsole({ policies, tenantId, domainOptions, recentItems, inspectionResult, isSubmitting, isInspecting, onInspectUri, onIngestDocument, onRetryItem, onShowHistory }: DocumentIngestConsoleProps): ReactNode;
138
+ listRefusal?: string;
139
+ }
140
+ declare function DocumentIngestConsole({ policies, tenantId, domainOptions, recentItems, inspectionResult, isSubmitting, isInspecting, onInspectUri, onIngestDocument, onRetryItem, onShowHistory, listRefusal }: DocumentIngestConsoleProps): ReactNode;
141
+ declare const FACET_LABELS: Readonly<Record<DocumentFacet, string>>;
142
+ declare const DOCUMENT_STATE_CAUSE_LABELS: Readonly<Record<DocumentStateCause, string>>;
143
+ declare const CHUNK_CHANGE_KIND_LABELS: Readonly<Record<ChunkChangeKind, string>>;
144
+ declare const CHUNK_BODY_FIDELITY_LABELS: Readonly<Record<ChunkBodyFidelity, string>>;
145
+ declare const WHITESPACE_NORMALIZED_NOTE = "\u30C1\u30E3\u30F3\u30AF\u306E\u672C\u6587\u306F\u3053\u306E\u533A\u9593\u306E\u6587\u3092\u7A7A\u767D\u3067\u7E4B\u304E\u76F4\u3057\u305F\u5F62\u3067\u3059\u3002";
146
+ declare const UNVERIFIED_CHUNK_NOTE = "\u3053\u306E\u65AD\u7247\u306F\u3053\u306E\u72B6\u614B\u306E\u62BD\u51FA\u672C\u6587\u3068\u5BFE\u5FDC\u3057\u307E\u305B\u3093\u3002";
147
+ declare const CHUNKING_ONLY_NOTE = "\u672C\u6587\u306F\u540C\u3058\u3067\u3001\u30C1\u30E3\u30F3\u30AF\u306E\u5207\u308A\u65B9\u3060\u3051\u304C\u5909\u308F\u308A\u307E\u3057\u305F\u3002";
148
+ declare const FIELD_LABELS: Readonly<Record<string, string>>;
149
+ declare function fieldLabel(field: string): string;
150
+ declare const RESTRICTED_DOCUMENT_TEXT = "\u9694\u96E2 (RESTRICTED) \u306E\u6587\u66F8";
151
+ declare const RESTRICTED_STATE_TEXT = "\u9694\u96E2\u3055\u308C\u3066\u3044\u305F\u671F\u9593\u306E\u72B6\u614B";
152
+ declare const RESTRICTED_RUN_TEXT = "\u9694\u96E2\u3055\u308C\u3066\u3044\u305F\u671F\u9593\u306E\u5B9F\u884C";
153
+ declare const NO_PREVIOUS_RECORD_TEXT = "\u76F4\u524D\u306E\u8A18\u9332\u3068\u306E\u6BD4\u8F03\u306F\u3042\u308A\u307E\u305B\u3093\u3002";
154
+ declare const FAILED_RUN_STATE_MARK = "\u5931\u6557\u3057\u305F\u5B9F\u884C\u306E\u5F8C\u306E\u72B6\u614B";
155
+ declare const UNRECORDED_RUN_MARK = "\u8A18\u9332\u3055\u308C\u3066\u3044\u307E\u305B\u3093";
156
+ declare const MODEL_ONLY_CHANGE_MARK = "\u30BD\u30FC\u30B9\u306F\u540C\u3058\u3067\u3001\u30E2\u30C7\u30EB\u306E\u51FA\u529B\u3060\u3051\u304C\u5909\u308F\u308A\u307E\u3057\u305F";
157
+ declare function unrecordedRunsMark(runIds: readonly number[]): string;
158
+ declare function revisionLabel(revision: number): string;
159
+ declare function revisionTransitionText(previousRevision: number, revision: number): string;
160
+ declare function facetCountsText(counts: FacetChangeCounts): string;
161
+ declare function jsonValueText(value: JsonValue): string;
162
+ declare const HISTORY_REFUSAL = "\u6587\u66F8\u306E\u5C65\u6B74\u3092\u95B2\u89A7\u3059\u308B\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002";
163
+ declare function historyFailureSentence(labels: ConsoleUiLabels, failure: {
164
+ readonly status: number | null;
165
+ readonly reason: string;
166
+ }, subject: string): string;
167
+ declare function historyFailedSentence(subject: string): (reason: string) => string;
89
168
  type StrategyProvenance = "tenant" | "system";
90
169
  interface EnrichmentStrategyRow {
91
170
  id: number;
@@ -319,19 +398,6 @@ declare function stepGateState(gates: readonly StepGate[], featureFlags: Readonl
319
398
  declare function stepGatePolicy(gates: readonly StepGate[]): StepGatePolicy;
320
399
  declare function gateCaption(state: StepGateState, policy: StepGatePolicy): string;
321
400
  declare function PipelineFlowViewer({ featureFlags, metrics, metricSampleWindow, selectedKind: controlledKind, onSelectKind, selectedStepKey: controlledStepKey, onSelectStep }: PipelineFlowViewerProps): ReactNode;
322
- interface PipelineRunInspectorProps {
323
- metadataId: number;
324
- runs: readonly PipelineRunRecord[];
325
- selectedRunId: number | null;
326
- onSelectRun: (runId: number) => void;
327
- isLoading: boolean;
328
- failure: string | null;
329
- onClose: () => void;
330
- openRequest: number;
331
- returnFocusFallback: () => HTMLElement | null;
332
- }
333
- declare const STEP_CARDS_OPEN_LIMIT = 8;
334
- declare function PipelineRunInspector({ metadataId, runs, selectedRunId, onSelectRun, isLoading, failure, onClose, openRequest, returnFocusFallback }: PipelineRunInspectorProps): ReactNode;
335
401
  declare const FLOW_NODE_TEXT: {
336
402
  readonly inset: 12;
337
403
  readonly labelFontSize: 13;
@@ -385,6 +451,9 @@ type PipelineRunPresentationKey = PipelineRunStatus | "FAILED_RETRY_SCHEDULED";
385
451
  declare const PIPELINE_RUN_STATUS_PRESENTATION: Readonly<Record<PipelineRunPresentationKey, StatusPresentation>>;
386
452
  declare const PIPELINE_STEP_STATUS_PRESENTATION: Readonly<Record<PipelineStepStatus, StepStatusPresentation>>;
387
453
  declare const PIPELINE_TRIGGER_LABELS: Readonly<Record<PipelineTrigger, string>>;
454
+ declare const RUN_TERMINAL_STEP_LABEL = "\u6587\u66F8\u306E\u72B6\u614B\u306E\u8A18\u9332";
455
+ declare function ledgerStepLabel(key: LedgerStepKey): string;
456
+ declare const RUN_TERMINAL_STEP_OUTCOME_LABELS: Readonly<Record<RunTerminalStepOutcome, string>>;
388
457
  declare const UNFINISHED_LABEL = "\u672A\u5B8C\u4E86";
389
458
  declare function pipelineRunPresentationKey(run: {
390
459
  readonly status: PipelineRunStatus;
@@ -461,6 +530,7 @@ interface FailedSyncItem {
461
530
  error_message?: string | null;
462
531
  failed_at: string | null;
463
532
  }
533
+ type FailedSyncEntry = ReadableEntry<FailedSyncItem> | RestrictedFailureMark;
464
534
  interface SyncStatusCounts {
465
535
  PENDING?: number;
466
536
  EXTRACTING?: number;
@@ -475,11 +545,12 @@ interface SyncStatusCounts {
475
545
  interface SyncStatusMonitorProps {
476
546
  counts: SyncStatusCounts;
477
547
  totalFiles: number;
478
- failedItems?: FailedSyncItem[];
548
+ failedItems?: readonly FailedSyncEntry[];
479
549
  onRetryAll?: () => void | Promise<void>;
480
550
  onRetryItem?: (id: string | number, fileUri: string) => void | Promise<void>;
481
551
  isRetrying?: boolean;
482
552
  onRefresh?: () => void;
553
+ listRefusal?: string;
483
554
  }
484
- declare function SyncStatusMonitor({ counts, totalFiles, failedItems, onRetryAll, onRetryItem, isRetrying, onRefresh }: SyncStatusMonitorProps): React$1.JSX.Element;
485
- export { CHUNK_SOURCE_LABELS, type CircuitBreakerState, type ComparisonHit, type ComparisonInput, type ComparisonOutcome, type ComparisonVariant, type ComparisonVariantResult, type ConfidentialityLevelFilter, DegradedSearchBanner, type DegradedSearchBannerProps, type DeveloperSearchPreset, DocumentIngestConsole, type DocumentIngestConsoleProps, type DocumentIngestLabel, type DocumentIngestPayload, EnrichmentStrategyBoard, type EnrichmentStrategyBoardProps, type EnrichmentStrategyRow, FLOW_FOCUS_RING, FLOW_GEOMETRY, FLOW_NODE_TEXT, type FailedSyncItem, type FileInspectionResult, FinishedInstant, type FinishedInstantProps, type FlowGeometry, type FlowLayout, type FusionStrategy, GATE_POLICY_LABELS, GATE_STATE_PRESENTATION, type GateState, InfrastructureHealthMonitor, type InfrastructureHealthMonitorProps, type IngestCapabilityPolicy, type IngestDomainOption, type IngestRowAction, type LaidOutEdge, type LaidOutStep, type MetadataSearchHit, type MetadataSearchParams, type MetadataSearchResult, MetadataSearchWorkbench, type MetadataSearchWorkbenchProps, ModelComparisonWorkbench, type ModelComparisonWorkbenchProps, NOTHING_TO_READ_LABELS, type OntologyClassItem, type OntologyPredicateItem, OntologyStatusCard, type OntologyStatusCardProps, type OntologyStatusData, PHASE_LABELS, PIPELINE_RUN_STATUS_PRESENTATION, PIPELINE_STEP_STATUS_PRESENTATION, PIPELINE_TRIGGER_LABELS, PipelineFlowViewer, type PipelineFlowViewerProps, PipelineRunInspector, type PipelineRunInspectorProps, type PipelineRunPresentationKey, type QdrantCollectionInfo, type QdrantCollectionSelection, type QdrantHealthInfo, type QdrantResourceUsage, QdrantStorageCard, type QdrantStorageCardProps, type QdrantStorageOverview, REASON_LABELS, type RankAgreement, type RecentIngestItem, type RecentIngestLastRun, RecordedInstant, type RecordedInstantProps, SCORE_DISPLAY_DECIMALS, SEARCH_MODE_LABELS, SEARCH_PRESETS, STEP_CARDS_OPEN_LIMIT, type SearchAuthzScopes, type SearchHitGraphRelation, type SearchHitScoreBreakdown, type SearchMetadataLike, type ServiceHealthStatus, type StatusPresentation, type StepGatePolicy, type StepGateState, type StepStatusPresentation, type StrategyProvenance, type SyncStatusCounts, SyncStatusMonitor, type SyncStatusMonitorProps, type SystemInfrastructureHealth, UNFINISHED_LABEL, formatComparisonScore, gateCaption, gateState, gateStateOf, ingestRowAction, layoutFlow, pipelineRunPresentationKey, rankAgreement, skipReasonLabel, stepGatePolicy, stepGateState };
555
+ declare function SyncStatusMonitor({ counts, totalFiles, failedItems, onRetryAll, onRetryItem, isRetrying, onRefresh, listRefusal }: SyncStatusMonitorProps): React$1.JSX.Element;
556
+ export { CHUNKING_ONLY_NOTE, CHUNK_BODY_FIDELITY_LABELS, CHUNK_CHANGE_KIND_LABELS, CHUNK_SOURCE_LABELS, type CircuitBreakerState, type ComparisonHit, type ComparisonInput, type ComparisonOutcome, type ComparisonVariant, type ComparisonVariantResult, type ConfidentialityLevelFilter, DOCUMENT_STATE_CAUSE_LABELS, DegradedSearchBanner, type DegradedSearchBannerProps, type DeveloperSearchPreset, type DiffLinePageQuery, type DiffLinePageReader, type DiffLineTarget, DocumentChangeFeed, type DocumentChangeFeedProps, type DocumentComparisonQuery, type DocumentHistoryHost, DocumentHistoryInspector, type DocumentHistoryInspectorProps, type DocumentHistoryReads, type DocumentHistoryTarget, DocumentIngestConsole, type DocumentIngestConsoleProps, type DocumentIngestLabel, type DocumentIngestPayload, type DocumentStateCapture, EnrichmentStrategyBoard, type EnrichmentStrategyBoardProps, type EnrichmentStrategyRow, FACET_LABELS, FAILED_RUN_STATE_MARK, FIELD_LABELS, FLOW_FOCUS_RING, FLOW_GEOMETRY, FLOW_NODE_TEXT, type FailedSyncEntry, type FailedSyncItem, type FileInspectionResult, FinishedInstant, type FinishedInstantProps, type FlowGeometry, type FlowLayout, type FusionStrategy, GATE_POLICY_LABELS, GATE_STATE_PRESENTATION, type GateState, HISTORY_REFUSAL, InfrastructureHealthMonitor, type InfrastructureHealthMonitorProps, type IngestCapabilityPolicy, type IngestDomainOption, type IngestRowAction, type LaidOutEdge, type LaidOutStep, MODEL_ONLY_CHANGE_MARK, type MetadataSearchHit, type MetadataSearchParams, type MetadataSearchResult, MetadataSearchWorkbench, type MetadataSearchWorkbenchProps, ModelComparisonWorkbench, type ModelComparisonWorkbenchProps, NOTHING_TO_READ_LABELS, NO_ENRICHMENT_RECORD_TEXT, NO_PREVIOUS_RECORD_TEXT, type OntologyClassItem, type OntologyPredicateItem, OntologyStatusCard, type OntologyStatusCardProps, type OntologyStatusData, PHASE_LABELS, PIPELINE_RUN_STATUS_PRESENTATION, PIPELINE_STEP_STATUS_PRESENTATION, PIPELINE_TRIGGER_LABELS, PipelineFlowViewer, type PipelineFlowViewerProps, type PipelineRunPresentationKey, type QdrantCollectionInfo, type QdrantCollectionSelection, type QdrantHealthInfo, type QdrantResourceUsage, QdrantStorageCard, type QdrantStorageCardProps, type QdrantStorageOverview, REASON_LABELS, RESTRICTED_DOCUMENT_TEXT, RESTRICTED_RUN_TEXT, RESTRICTED_STATE_TEXT, RUN_TERMINAL_STEP_LABEL, RUN_TERMINAL_STEP_OUTCOME_LABELS, type RankAgreement, type RecentIngestEntry, type RecentIngestItem, type RecentIngestLastRun, RecordedInstant, type RecordedInstantProps, SCORE_DISPLAY_DECIMALS, SEARCH_MODE_LABELS, SEARCH_PRESETS, type SearchAuthzScopes, type SearchHitGraphRelation, type SearchHitScoreBreakdown, type SearchMetadataLike, type ServiceHealthStatus, type StatusPresentation, type StepGatePolicy, type StepGateState, type StepStatusPresentation, type StrategyProvenance, type SyncStatusCounts, SyncStatusMonitor, type SyncStatusMonitorProps, type SystemInfrastructureHealth, UNFINISHED_LABEL, UNRECORDED_RUN_MARK, UNVERIFIED_CHUNK_NOTE, WHITESPACE_NORMALIZED_NOTE, facetCountsText, fieldLabel, formatComparisonScore, gateCaption, gateState, gateStateOf, historyFailedSentence, historyFailureSentence, ingestRowAction, jsonValueText, layoutFlow, ledgerStepLabel, pipelineRunPresentationKey, rankAgreement, revisionLabel, revisionTransitionText, skipReasonLabel, stepGatePolicy, stepGateState, unrecordedRunsMark };