@chengxianglibra/dsh-data-analysis 0.1.1 → 0.1.2
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/README.md +83 -34
- package/lib/bin/environment.js +1 -1
- package/lib/bin/presentation-lint.js +21 -0
- package/lib/bridges.js +2 -2
- package/lib/client/credentials/create-datasource.js +67 -0
- package/lib/client/credentials/install.js +191 -0
- package/lib/client/credentials/model.js +494 -0
- package/lib/client/credentials/styles.js +17 -0
- package/lib/client/workspace-header-action.js +11 -0
- package/lib/client.js +1133 -736
- package/lib/compatibility.js +1 -1
- package/lib/datasource/authoring.js +70 -0
- package/lib/datasource/bridge-programs.js +30 -18
- package/lib/datasource/bridge.js +100 -8
- package/lib/datasource/index.js +3 -2
- package/lib/datasource/python.js +115 -0
- package/lib/datasource/resolver-program.js +112 -0
- package/lib/datasource/rpc.js +88 -0
- package/lib/datasource/service.js +687 -0
- package/lib/datasource/shell-env.js +2 -333
- package/lib/datasource/test.js +24 -51
- package/lib/environment/binding.js +54 -9
- package/lib/environment/runtime.js +89 -78
- package/lib/environment/subprocess.js +6 -1
- package/lib/environment/summary.js +3 -3
- package/lib/environment/workspace.js +5 -0
- package/lib/index.js +1 -1
- package/lib/plugin.js +168 -51
- package/lib/presentation/assets/portable.js +606 -0
- package/lib/presentation/assets/static.js +945 -0
- package/lib/presentation/build/index.js +71 -0
- package/lib/presentation/commit.js +156 -0
- package/lib/presentation/contracts/charts.js +476 -0
- package/lib/presentation/contracts/editing.js +58 -0
- package/lib/presentation/contracts/index.js +651 -0
- package/lib/presentation/contracts/interaction.js +62 -0
- package/lib/presentation/contracts/types.js +15 -0
- package/lib/presentation/contracts/values.js +28 -0
- package/lib/presentation/delivery.js +56 -0
- package/lib/presentation/files.js +83 -0
- package/lib/presentation/index.js +6 -0
- package/lib/presentation/lint.js +46 -0
- package/lib/presentation/projection/files.js +85 -0
- package/lib/presentation/projection/index.js +195 -0
- package/lib/presentation/projection/program.js +144 -0
- package/lib/presentation/projection/sql-code.js +79 -0
- package/lib/presentation/receipt.js +34 -0
- package/lib/presentation/reports.js +122 -0
- package/lib/presentation/rpc.js +148 -0
- package/lib/presentation/tool.js +122 -0
- package/lib/python-execution-contracts.js +1 -0
- package/lib/python-execution.js +232 -0
- package/lib/semantic-browser/contracts.js +80 -0
- package/lib/semantic-browser/definition.js +64 -0
- package/lib/semantic-browser/program.js +119 -0
- package/lib/semantic-browser/service.js +72 -0
- package/lib/semantic-reference/bridge.js +118 -0
- package/lib/semantic-reference/contracts.js +113 -0
- package/lib/semantic-reference/index.js +3 -0
- package/lib/semantic-reference/rpc.js +122 -0
- package/lib/semantic-reference/search.js +94 -0
- package/lib/semantic-reference/usage.js +143 -0
- package/lib/types/bridges.d.ts +2 -2
- package/lib/types/client/credentials/create-datasource.d.ts +5 -0
- package/lib/types/client/credentials/install.d.ts +1 -0
- package/lib/types/client/credentials/model.d.ts +59 -0
- package/lib/types/client/credentials/styles.d.ts +1 -0
- package/lib/types/client/presentation/ask-dsh.d.ts +9 -0
- package/lib/types/client/presentation/chart-explorer.d.ts +12 -0
- package/lib/types/client/presentation/chart-geometry.d.ts +30 -0
- package/lib/types/client/presentation/chart-renderer.d.ts +10 -0
- package/lib/types/client/presentation/chart-specials.d.ts +10 -0
- package/lib/types/client/presentation/chart-styles.d.ts +1 -0
- package/lib/types/client/presentation/chart-tooltip.d.ts +13 -0
- package/lib/types/client/presentation/chart-view.d.ts +23 -0
- package/lib/types/client/presentation/copy-context.d.ts +5 -0
- package/lib/types/client/presentation/delivery-model.d.ts +54 -0
- package/lib/types/client/presentation/delivery.d.ts +77 -0
- package/lib/types/client/presentation/editor-controls.d.ts +12 -0
- package/lib/types/client/presentation/global-filters.d.ts +6 -0
- package/lib/types/client/presentation/host-entry.d.ts +12 -0
- package/lib/types/client/presentation/icons.d.ts +4 -0
- package/lib/types/client/presentation/install.d.ts +15 -0
- package/lib/types/client/presentation/markdown.d.ts +5 -0
- package/lib/types/client/presentation/model.d.ts +62 -0
- package/lib/types/client/presentation/reader.d.ts +11 -0
- package/lib/types/client/presentation/source-code-model.d.ts +16 -0
- package/lib/types/client/presentation/source-code.d.ts +11 -0
- package/lib/types/client/presentation/source-dialog.d.ts +13 -0
- package/lib/types/client/presentation/source-facts.d.ts +20 -0
- package/lib/types/client/presentation/source-format.d.ts +5 -0
- package/lib/types/client/presentation/source-highlight.d.ts +7 -0
- package/lib/types/client/presentation/sources.d.ts +13 -0
- package/lib/types/client/presentation/styles.d.ts +1 -0
- package/lib/types/client/presentation/table.d.ts +12 -0
- package/lib/types/client/presentation/use-element-width.d.ts +5 -0
- package/lib/types/client/workspace-header-action.d.ts +7 -0
- package/lib/types/client.d.ts +4 -122
- package/lib/types/compatibility.d.ts +2 -2
- package/lib/types/datasource/authoring.d.ts +25 -0
- package/lib/types/datasource/bridge.d.ts +21 -3
- package/lib/types/datasource/index.d.ts +3 -5
- package/lib/types/datasource/python.d.ts +4 -0
- package/lib/types/datasource/resolver-program.d.ts +6 -0
- package/lib/types/datasource/rpc.d.ts +4 -0
- package/lib/types/datasource/service.d.ts +112 -0
- package/lib/types/datasource/shell-env.d.ts +0 -29
- package/lib/types/datasource/test.d.ts +6 -29
- package/lib/types/environment/binding.d.ts +5 -1
- package/lib/types/environment/errors.d.ts +1 -1
- package/lib/types/environment/runtime.d.ts +5 -5
- package/lib/types/environment/types.d.ts +13 -2
- package/lib/types/index.d.ts +1 -1
- package/lib/types/plugin.d.ts +11 -5
- package/lib/types/presentation/build/index.d.ts +11 -0
- package/lib/types/presentation/commit.d.ts +4 -0
- package/lib/types/presentation/contracts/charts.d.ts +13 -0
- package/lib/types/presentation/contracts/editing.d.ts +8 -0
- package/lib/types/presentation/contracts/index.d.ts +11 -0
- package/lib/types/presentation/contracts/interaction.d.ts +8 -0
- package/lib/types/presentation/contracts/types.d.ts +252 -0
- package/lib/types/presentation/contracts/values.d.ts +9 -0
- package/lib/types/presentation/delivery.d.ts +3 -0
- package/lib/types/presentation/files.d.ts +7 -0
- package/lib/types/presentation/index.d.ts +6 -0
- package/lib/types/presentation/lint.d.ts +13 -0
- package/lib/types/presentation/projection/files.d.ts +2 -0
- package/lib/types/presentation/projection/index.d.ts +20 -0
- package/lib/types/presentation/projection/program.d.ts +2 -0
- package/lib/types/presentation/projection/sql-code.d.ts +2 -0
- package/lib/types/presentation/receipt.d.ts +14 -0
- package/lib/types/presentation/reports.d.ts +5 -0
- package/lib/types/presentation/rpc.d.ts +24 -0
- package/lib/types/presentation/tool.d.ts +12 -0
- package/lib/types/python-execution-contracts.d.ts +10 -0
- package/lib/types/python-execution.d.ts +10 -0
- package/lib/types/semantic-browser/contracts.d.ts +40 -0
- package/lib/types/semantic-browser/definition.d.ts +20 -0
- package/lib/types/semantic-browser/program.d.ts +2 -0
- package/lib/types/semantic-browser/service.d.ts +20 -0
- package/lib/types/semantic-reference/bridge.d.ts +11 -0
- package/lib/types/semantic-reference/contracts.d.ts +51 -0
- package/lib/types/semantic-reference/index.d.ts +3 -0
- package/lib/types/semantic-reference/rpc.d.ts +15 -0
- package/lib/types/semantic-reference/search.d.ts +10 -0
- package/lib/types/semantic-reference/usage.d.ts +43 -0
- package/package.json +43 -19
- package/python/presentation-kit/dist/dsh_data_analysis_presentation_kit-1.1.0-py3-none-any.whl +0 -0
- package/skills/dsh-data-analysis-presentation/SKILL.md +24 -0
- package/skills/dsh-data-analysis-presentation/references/chart-examples.md +18 -0
- package/skills/dsh-data-analysis-presentation/references/charts.md +55 -0
- package/skills/dsh-data-analysis-presentation/references/examples/artifact.draft.json +27 -0
- package/skills/dsh-data-analysis-presentation/references/examples/charts-bins.dataset.json +33 -0
- package/skills/dsh-data-analysis-presentation/references/examples/charts-boxes.dataset.json +45 -0
- package/skills/dsh-data-analysis-presentation/references/examples/charts-composition.dataset.json +33 -0
- package/skills/dsh-data-analysis-presentation/references/examples/charts-funnel.dataset.json +27 -0
- package/skills/dsh-data-analysis-presentation/references/examples/charts-precision.dataset.json +21 -0
- package/skills/dsh-data-analysis-presentation/references/examples/charts-series.dataset.json +58 -0
- package/skills/dsh-data-analysis-presentation/references/examples/charts-shares.dataset.json +33 -0
- package/skills/dsh-data-analysis-presentation/references/examples/charts-waterfall.dataset.json +44 -0
- package/skills/dsh-data-analysis-presentation/references/examples/charts.draft.json +392 -0
- package/skills/dsh-data-analysis-presentation/references/examples/comparison-selected.dataset.json +24 -0
- package/skills/dsh-data-analysis-presentation/references/examples/comparison-summary.dataset.json +22 -0
- package/skills/dsh-data-analysis-presentation/references/examples/comparison.dataset.json +18 -0
- package/skills/dsh-data-analysis-presentation/references/examples/comparison.draft.json +79 -0
- package/skills/dsh-data-analysis-presentation/references/examples/computed-sources.draft.json +35 -0
- package/skills/dsh-data-analysis-presentation/references/examples/computed.dataset.json +12 -0
- package/skills/dsh-data-analysis-presentation/references/examples/computed.draft.json +57 -0
- package/skills/dsh-data-analysis-presentation/references/examples/interaction-detail.dataset.json +30 -0
- package/skills/dsh-data-analysis-presentation/references/examples/interaction-summary.dataset.json +22 -0
- package/skills/dsh-data-analysis-presentation/references/examples/interaction.draft.json +278 -0
- package/skills/dsh-data-analysis-presentation/references/examples/source-only.draft.json +19 -0
- package/skills/dsh-data-analysis-presentation/references/examples/write-charts.py +73 -0
- package/skills/dsh-data-analysis-presentation/references/examples/write-comparison.py +42 -0
- package/skills/dsh-data-analysis-presentation/references/examples/write-computed.py +21 -0
- package/skills/dsh-data-analysis-presentation/references/examples/write-interaction.py +33 -0
- package/skills/dsh-data-analysis-presentation/references/examples.md +42 -0
- package/skills/dsh-data-analysis-presentation/references/interaction.md +56 -0
- package/skills/dsh-data-analysis-presentation/references/narrative.md +37 -0
- package/skills/dsh-data-analysis-presentation/references/schema.md +138 -0
- package/lib/datasource/access.js +0 -60
- package/lib/datasource/credentials.js +0 -24
- package/lib/evidence/bridge-program.js +0 -153
- package/lib/evidence/bridge.js +0 -166
- package/lib/evidence/index.js +0 -2
- package/lib/evidence/sources.js +0 -263
- package/lib/types/datasource/access.d.ts +0 -27
- package/lib/types/evidence/bridge.d.ts +0 -40
- package/lib/types/evidence/index.d.ts +0 -4
- package/lib/types/evidence/sources.d.ts +0 -57
- package/python/report-kit/dist/dsh_data_analysis_report_kit-3.0.0-py3-none-any.whl +0 -0
- package/skills/dsh-data-analysis-report/SKILL.md +0 -57
- package/skills/dsh-data-analysis-report/assets/marivo-artifact.js +0 -113
- package/skills/dsh-data-analysis-report/assets/marivo-session-dag.js +0 -1201
- package/skills/dsh-data-analysis-report/assets/report-data.js +0 -449
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PresentationBlock, PresentationDocument } from './types.ts';
|
|
2
|
+
export interface PresentationEdits {
|
|
3
|
+
title: string;
|
|
4
|
+
blocks: PresentationBlock[];
|
|
5
|
+
}
|
|
6
|
+
export declare function presentationEdits(document: PresentationDocument): PresentationEdits;
|
|
7
|
+
/** Only presentation fields are accepted. Saved data, sources and captured code stay server-owned. */
|
|
8
|
+
export declare function applyPresentationEdits(base: PresentationDocument, value: unknown): PresentationDocument;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Cell, type DatasetColumn, type PresentationDocument, type PresentationDraft, type PresentationReceipt, type TypedDataset } from './types.ts';
|
|
2
|
+
export * from './charts.ts';
|
|
3
|
+
export * from './types.ts';
|
|
4
|
+
export * from './values.ts';
|
|
5
|
+
export declare function parsePresentationBuildId(value: unknown, path?: string): string;
|
|
6
|
+
export declare function parseTypedDataset(value: unknown, path?: string): TypedDataset;
|
|
7
|
+
/** Tables retain the original decimal/int64 spelling, including trailing decimal zeroes. */
|
|
8
|
+
export declare function formatCell(value: Cell, _column: DatasetColumn): string;
|
|
9
|
+
export declare function parsePresentationDraft(value: unknown): PresentationDraft;
|
|
10
|
+
export declare function parsePresentationDocument(value: unknown): PresentationDocument;
|
|
11
|
+
export declare function parsePresentationReceipt(value: unknown): PresentationReceipt;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PresentationBlock, PresentationDocument, PresentationInteraction } from './types.ts';
|
|
2
|
+
export declare function defaultSelection(interaction: PresentationInteraction): Record<string, string>;
|
|
3
|
+
export declare function selectedSlice(interaction: PresentationInteraction, selection: Record<string, string>): import("./types.ts").PresentationSlice;
|
|
4
|
+
export declare function interactionRows(interaction: PresentationInteraction | undefined, selection: Record<string, string>, block: PresentationBlock): number[] | undefined;
|
|
5
|
+
export declare function filterSummary(interaction: PresentationInteraction, selection: Record<string, string>): string;
|
|
6
|
+
/** Preserve the authored before / interactive / after boundary during host edits. */
|
|
7
|
+
export declare function blockRegion(document: PresentationDocument, id: string): number;
|
|
8
|
+
export declare function editedInteraction(document: PresentationDocument, blocks: PresentationBlock[]): PresentationInteraction | undefined;
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/** Pure presentation data. No Marivo schema, Node runtime or Host imports. */
|
|
2
|
+
import type { PythonCodeRef, PythonCodeSnippet } from '../../python-execution-contracts.ts';
|
|
3
|
+
export type { PythonCodeRef, PythonCodeSnippet } from '../../python-execution-contracts.ts';
|
|
4
|
+
export declare const PRESENTATION_SCHEMA_VERSION: 2;
|
|
5
|
+
export declare const PRESENTATION_BUDGETS: {
|
|
6
|
+
readonly documentBytes: number;
|
|
7
|
+
readonly draftBytes: number;
|
|
8
|
+
readonly datasetBytes: number;
|
|
9
|
+
readonly htmlBytes: number;
|
|
10
|
+
readonly datasets: 16;
|
|
11
|
+
readonly columns: 64;
|
|
12
|
+
readonly rows: 5000;
|
|
13
|
+
readonly cells: 100000;
|
|
14
|
+
readonly sources: 64;
|
|
15
|
+
readonly codeSnippets: 32;
|
|
16
|
+
readonly blocks: 64;
|
|
17
|
+
readonly text: 32768;
|
|
18
|
+
};
|
|
19
|
+
export type ColumnType = 'string' | 'boolean' | 'float64' | 'int64' | 'decimal' | 'date' | 'datetime';
|
|
20
|
+
export type Cell = string | boolean | number | null;
|
|
21
|
+
export interface DatasetColumn {
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
type: ColumnType;
|
|
25
|
+
nullable: boolean;
|
|
26
|
+
unit?: string;
|
|
27
|
+
}
|
|
28
|
+
/** int64/decimal are exact strings; datetime always includes an explicit offset. */
|
|
29
|
+
export interface TypedDataset {
|
|
30
|
+
schemaVersion: 1;
|
|
31
|
+
columns: DatasetColumn[];
|
|
32
|
+
rows: Cell[][];
|
|
33
|
+
rowCount: number;
|
|
34
|
+
limit: number;
|
|
35
|
+
truncated: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface SourceRef {
|
|
38
|
+
sessionId: string;
|
|
39
|
+
artifactRef: string;
|
|
40
|
+
findingId?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface DeclaredSource {
|
|
43
|
+
id: string;
|
|
44
|
+
ref: SourceRef;
|
|
45
|
+
}
|
|
46
|
+
/** Captured SQL belongs to an exact persisted producer, never a reconstructed query. */
|
|
47
|
+
export interface SqlCodeSnippet {
|
|
48
|
+
language: 'sql';
|
|
49
|
+
text: string;
|
|
50
|
+
provenance: 'execution';
|
|
51
|
+
runId: string;
|
|
52
|
+
queryId: string;
|
|
53
|
+
artifactRef: string;
|
|
54
|
+
}
|
|
55
|
+
export interface SourceCodeSnapshot {
|
|
56
|
+
snippets: SqlCodeSnippet[];
|
|
57
|
+
notices: string[];
|
|
58
|
+
}
|
|
59
|
+
export type SourceSnapshot = DeclaredSource & ({
|
|
60
|
+
status: 'available';
|
|
61
|
+
label: string;
|
|
62
|
+
facts: {
|
|
63
|
+
label: string;
|
|
64
|
+
value: string;
|
|
65
|
+
}[];
|
|
66
|
+
code?: SourceCodeSnapshot;
|
|
67
|
+
} | {
|
|
68
|
+
status: 'unavailable';
|
|
69
|
+
reason: string;
|
|
70
|
+
});
|
|
71
|
+
export type DraftDataset = ({
|
|
72
|
+
id: string;
|
|
73
|
+
kind: 'artifact';
|
|
74
|
+
sourceId: string;
|
|
75
|
+
columns?: string[];
|
|
76
|
+
rowLimit: number;
|
|
77
|
+
} | {
|
|
78
|
+
id: string;
|
|
79
|
+
kind: 'computed';
|
|
80
|
+
path: string;
|
|
81
|
+
sourceIds: string[];
|
|
82
|
+
}) & {
|
|
83
|
+
codeRefs?: PythonCodeRef[];
|
|
84
|
+
};
|
|
85
|
+
export interface DocumentDataset {
|
|
86
|
+
id: string;
|
|
87
|
+
origin: 'artifact' | 'computed';
|
|
88
|
+
data: TypedDataset;
|
|
89
|
+
sourceIds: string[];
|
|
90
|
+
code?: PythonCodeSnippet[];
|
|
91
|
+
}
|
|
92
|
+
export type ChartType = 'line' | 'area' | 'stackedArea' | 'sparkline' | 'bar' | 'horizontalBar' | 'stackedBar' | 'stackedBar100' | 'horizontalStackedBar' | 'horizontalStackedBar100' | 'histogram' | 'boxPlot' | 'scatter' | 'heatmap' | 'pie' | 'leaderboard' | 'funnel' | 'waterfall';
|
|
93
|
+
/** Names identify columns containing prepared values, never expressions or statistics. */
|
|
94
|
+
export interface ChartBindings {
|
|
95
|
+
binStart?: string;
|
|
96
|
+
binEnd?: string;
|
|
97
|
+
minimum?: string;
|
|
98
|
+
q1?: string;
|
|
99
|
+
q3?: string;
|
|
100
|
+
maximum?: string;
|
|
101
|
+
start?: string;
|
|
102
|
+
end?: string;
|
|
103
|
+
role?: string;
|
|
104
|
+
share?: string;
|
|
105
|
+
rank?: string;
|
|
106
|
+
denominator?: string;
|
|
107
|
+
size?: string;
|
|
108
|
+
label?: string;
|
|
109
|
+
color?: string;
|
|
110
|
+
}
|
|
111
|
+
export interface ChartOptions {
|
|
112
|
+
showPoints?: 'auto' | 'always' | 'never';
|
|
113
|
+
series?: Record<string, {
|
|
114
|
+
lineStyle?: 'solid' | 'dashed' | 'dotted';
|
|
115
|
+
role?: 'actual' | 'baseline' | 'target' | 'forecast' | 'plan' | 'comparison';
|
|
116
|
+
}>;
|
|
117
|
+
valueLabels?: 'none' | 'auto' | 'all';
|
|
118
|
+
referenceLines?: {
|
|
119
|
+
axis: 'x' | 'y';
|
|
120
|
+
value: number;
|
|
121
|
+
label?: string;
|
|
122
|
+
}[];
|
|
123
|
+
}
|
|
124
|
+
interface ChartViewFields {
|
|
125
|
+
datasetId: string;
|
|
126
|
+
x: string;
|
|
127
|
+
y: string[];
|
|
128
|
+
numericMode: 'exact' | 'approximate';
|
|
129
|
+
bindings?: ChartBindings;
|
|
130
|
+
options?: ChartOptions;
|
|
131
|
+
}
|
|
132
|
+
type PreparedChart<Type extends ChartType, Keys extends keyof ChartBindings> = {
|
|
133
|
+
chart: Type;
|
|
134
|
+
bindings: ChartBindings & Required<Pick<ChartBindings, Keys>>;
|
|
135
|
+
};
|
|
136
|
+
/** Statistical families require prepared bindings at both the type and JSON boundaries. */
|
|
137
|
+
export type ChartView = ChartViewFields & ({
|
|
138
|
+
chart: Exclude<ChartType, 'histogram' | 'boxPlot' | 'waterfall' | 'pie' | 'funnel' | 'leaderboard' | 'stackedBar100' | 'horizontalStackedBar100'>;
|
|
139
|
+
} | PreparedChart<'histogram', 'binStart' | 'binEnd'> | PreparedChart<'boxPlot', 'minimum' | 'q1' | 'q3' | 'maximum'> | PreparedChart<'waterfall', 'start' | 'end' | 'role'> | PreparedChart<'pie' | 'funnel', 'share'> | PreparedChart<'leaderboard', 'rank'> | PreparedChart<'stackedBar100' | 'horizontalStackedBar100', 'denominator'>);
|
|
140
|
+
/** Prepared values in the metric's selected row; no reader-side calculations. */
|
|
141
|
+
export interface MetricComparison {
|
|
142
|
+
label: string;
|
|
143
|
+
referenceColumnId?: string;
|
|
144
|
+
deltaColumnId?: string;
|
|
145
|
+
relativeColumnId?: string;
|
|
146
|
+
sentiment?: 'higher-is-better' | 'lower-is-better' | 'neutral';
|
|
147
|
+
}
|
|
148
|
+
export type PresentationBlock = {
|
|
149
|
+
id: string;
|
|
150
|
+
kind: 'markdown';
|
|
151
|
+
text: string;
|
|
152
|
+
} | ({
|
|
153
|
+
id: string;
|
|
154
|
+
kind: 'metric';
|
|
155
|
+
datasetId: string;
|
|
156
|
+
columnId: string;
|
|
157
|
+
label: string;
|
|
158
|
+
description?: string;
|
|
159
|
+
comparisons?: MetricComparison[];
|
|
160
|
+
} & ({
|
|
161
|
+
rowIndex: number;
|
|
162
|
+
rowSelection?: never;
|
|
163
|
+
} | {
|
|
164
|
+
rowSelection: 'slice';
|
|
165
|
+
rowIndex?: never;
|
|
166
|
+
})) | ({
|
|
167
|
+
id: string;
|
|
168
|
+
kind: 'chart';
|
|
169
|
+
preparedViews?: (ChartView & {
|
|
170
|
+
id: string;
|
|
171
|
+
label: string;
|
|
172
|
+
})[];
|
|
173
|
+
} & ChartView) | {
|
|
174
|
+
id: string;
|
|
175
|
+
kind: 'table';
|
|
176
|
+
datasetId: string;
|
|
177
|
+
columns?: string[];
|
|
178
|
+
} | {
|
|
179
|
+
id: string;
|
|
180
|
+
kind: 'source';
|
|
181
|
+
sourceIds: string[];
|
|
182
|
+
};
|
|
183
|
+
/** Author-prepared combinations; the reader never computes business aggregates. */
|
|
184
|
+
export interface PresentationFilter {
|
|
185
|
+
id: string;
|
|
186
|
+
label: string;
|
|
187
|
+
allOptionId: string;
|
|
188
|
+
options: {
|
|
189
|
+
id: string;
|
|
190
|
+
label: string;
|
|
191
|
+
}[];
|
|
192
|
+
}
|
|
193
|
+
export interface PresentationSlice {
|
|
194
|
+
selection: Record<string, string>;
|
|
195
|
+
datasets: {
|
|
196
|
+
datasetId: string;
|
|
197
|
+
rowIndices: number[];
|
|
198
|
+
}[];
|
|
199
|
+
}
|
|
200
|
+
export interface PresentationInteraction {
|
|
201
|
+
title: string;
|
|
202
|
+
blockIds: string[];
|
|
203
|
+
filters: PresentationFilter[];
|
|
204
|
+
slices: PresentationSlice[];
|
|
205
|
+
}
|
|
206
|
+
export interface PresentationDraft {
|
|
207
|
+
schemaVersion: 1;
|
|
208
|
+
title: string;
|
|
209
|
+
datasets: DraftDataset[];
|
|
210
|
+
sources: DeclaredSource[];
|
|
211
|
+
blocks: PresentationBlock[];
|
|
212
|
+
interaction?: PresentationInteraction;
|
|
213
|
+
}
|
|
214
|
+
export interface PresentationDiagnostic {
|
|
215
|
+
code: string;
|
|
216
|
+
path: string;
|
|
217
|
+
message: string;
|
|
218
|
+
}
|
|
219
|
+
export interface PresentationDocument {
|
|
220
|
+
schemaVersion: 2;
|
|
221
|
+
reportId: string;
|
|
222
|
+
workspaceId: string;
|
|
223
|
+
buildId: string;
|
|
224
|
+
title: string;
|
|
225
|
+
generatedAt: string;
|
|
226
|
+
datasets: DocumentDataset[];
|
|
227
|
+
sources: SourceSnapshot[];
|
|
228
|
+
blocks: PresentationBlock[];
|
|
229
|
+
diagnostics: PresentationDiagnostic[];
|
|
230
|
+
interaction?: PresentationInteraction;
|
|
231
|
+
}
|
|
232
|
+
export type PresentationAsset = 'presentation.json' | 'index.html';
|
|
233
|
+
export interface PresentationFile<Asset extends PresentationAsset = PresentationAsset> {
|
|
234
|
+
asset: Asset;
|
|
235
|
+
path: string;
|
|
236
|
+
sha256: string;
|
|
237
|
+
bytes: number;
|
|
238
|
+
}
|
|
239
|
+
/** Session and Turn belong to the Host delivery envelope, not to the file identity. */
|
|
240
|
+
export interface PresentationReceipt {
|
|
241
|
+
schemaVersion: 2;
|
|
242
|
+
reportId: string;
|
|
243
|
+
kind: 'marivo.presentation';
|
|
244
|
+
workspaceId: string;
|
|
245
|
+
buildId: string;
|
|
246
|
+
title: string;
|
|
247
|
+
summary: string;
|
|
248
|
+
files: {
|
|
249
|
+
document: PresentationFile<'presentation.json'>;
|
|
250
|
+
html: PresentationFile<'index.html'>;
|
|
251
|
+
};
|
|
252
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Cell, DatasetColumn } from './types.ts';
|
|
2
|
+
export declare class PresentationContractError extends Error {
|
|
3
|
+
readonly code: string;
|
|
4
|
+
readonly path: string;
|
|
5
|
+
readonly hint: string;
|
|
6
|
+
readonly reason: string;
|
|
7
|
+
constructor(code: string, path: string, message: string, hint?: string);
|
|
8
|
+
}
|
|
9
|
+
export declare function chartNumber(value: Cell, column: DatasetColumn, mode: 'exact' | 'approximate', path?: string): number | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type PresentationAsset } from './contracts/index.ts';
|
|
2
|
+
export declare function presentationReportPath(root: string, reportId: string): string;
|
|
3
|
+
export declare function presentationAssetPath(root: string, reportId: string, buildId: string, asset: PresentationAsset): string;
|
|
4
|
+
export declare function presentationSha256(bytes: Uint8Array): string;
|
|
5
|
+
/** Bounded raw-byte reader with no symbolic links and stable directory/file identity. */
|
|
6
|
+
export declare function readPresentationAsset(workspaceRoot: string, reportId: string, buildId: string, asset: PresentationAsset, signal?: AbortSignal): Promise<Buffer>;
|
|
7
|
+
export declare function readReportFile(workspaceRoot: string, filename: string, maximum: number, signal?: AbortSignal): Promise<Buffer>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Static preflight only: never starts a Runtime or publishes presentation assets. */
|
|
2
|
+
export declare function lintPresentationDraft(workspaceRoot: string, draftPath: string): Promise<{
|
|
3
|
+
ok: boolean;
|
|
4
|
+
scope: string;
|
|
5
|
+
checkedComputedDatasets: number;
|
|
6
|
+
diagnostics: {
|
|
7
|
+
code: string;
|
|
8
|
+
path: string;
|
|
9
|
+
message: string;
|
|
10
|
+
hint: string;
|
|
11
|
+
}[];
|
|
12
|
+
deferredChecks: string[];
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { MarivoCheckedRunner } from '../../environment/types.ts';
|
|
2
|
+
import { type PresentationDocument, type PresentationDraft } from '../contracts/index.ts';
|
|
3
|
+
export { readWorkspaceJson } from './files.ts';
|
|
4
|
+
export interface PresentationProjectionOptions {
|
|
5
|
+
/** Workspace identity is resolved by Host together with this runner, never from a draft. */
|
|
6
|
+
workspaceId: string;
|
|
7
|
+
reportId: string;
|
|
8
|
+
buildId: string;
|
|
9
|
+
generatedAt?: string;
|
|
10
|
+
signal?: AbortSignal;
|
|
11
|
+
}
|
|
12
|
+
/** Internal S2 bridge: restores public data without observe, revalidation or credential admission. */
|
|
13
|
+
export declare class MarivoPresentationProjection {
|
|
14
|
+
#private;
|
|
15
|
+
constructor(runner: MarivoCheckedRunner);
|
|
16
|
+
get status(): "ready" | "failed";
|
|
17
|
+
get binding(): Readonly<import("../../environment/types.ts").MarivoEnvironmentBinding>;
|
|
18
|
+
readDraft(relativePath: string, signal?: AbortSignal): Promise<PresentationDraft>;
|
|
19
|
+
project(value: unknown, options: PresentationProjectionOptions): Promise<PresentationDocument>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Pure Host delivery envelope shared by the server and browser. */
|
|
2
|
+
import { type PresentationReceipt } from './contracts/index.ts';
|
|
3
|
+
export declare const MARIVO_PRESENT_TOOL_NAME = "marivo_present";
|
|
4
|
+
export declare const MARIVO_PRESENTATION_DELIVERY_KIND = "marivo.presentation.delivery";
|
|
5
|
+
export declare const MARIVO_PRESENTATION_RPC_CHANNEL = "/marivo-presentation";
|
|
6
|
+
export interface PresentationDelivery {
|
|
7
|
+
kind: typeof MARIVO_PRESENTATION_DELIVERY_KIND;
|
|
8
|
+
schemaVersion: 2;
|
|
9
|
+
dshSessionId: string;
|
|
10
|
+
turn: number;
|
|
11
|
+
receipt: PresentationReceipt;
|
|
12
|
+
}
|
|
13
|
+
export declare function parsePresentationDelivery(value: unknown): PresentationDelivery;
|
|
14
|
+
export declare function presentationReceiptText(receipt: PresentationReceipt): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type PresentationDocument, type PresentationReceipt } from './contracts/index.ts';
|
|
2
|
+
export declare function readReceiptDocument(root: string, receipt: PresentationReceipt, signal?: AbortSignal): Promise<PresentationDocument>;
|
|
3
|
+
export declare function resolvePresentation(root: string, workspaceId: string, reportId: string, signal?: AbortSignal): Promise<PresentationReceipt>;
|
|
4
|
+
/** The mutable pointer is the publication boundary; completed builds are never overwritten. */
|
|
5
|
+
export declare function publishPresentation(root: string, document: PresentationDocument, expectedBuildId: string | null, assertOwner: () => Promise<void>, signal?: AbortSignal): Promise<PresentationReceipt>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { HostConnectionHandle } from '@deepseek-ai/dsh-client-connection';
|
|
2
|
+
import { type PresentationAsset } from './contracts/index.ts';
|
|
3
|
+
export interface PresentationWorkspace {
|
|
4
|
+
id: string;
|
|
5
|
+
path: string;
|
|
6
|
+
}
|
|
7
|
+
export type PresentationWorkspaceResolver = (sessionId: string) => PresentationWorkspace | undefined | Promise<PresentationWorkspace | undefined>;
|
|
8
|
+
export declare class MarivoPresentationFileService {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(resolve: PresentationWorkspaceResolver);
|
|
11
|
+
close(): void;
|
|
12
|
+
report(endpoint: 'reports/resolve' | 'reports/save', payload: unknown, caller?: AbortSignal): Promise<import("./contracts/types.ts").PresentationReceipt>;
|
|
13
|
+
read(payload: unknown, caller?: AbortSignal): Promise<{
|
|
14
|
+
workspaceId: string;
|
|
15
|
+
reportId: string;
|
|
16
|
+
buildId: string;
|
|
17
|
+
asset: PresentationAsset;
|
|
18
|
+
mimeType: string;
|
|
19
|
+
sha256: string;
|
|
20
|
+
bytes: number;
|
|
21
|
+
bodyBase64: string;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
export declare function registerMarivoPresentationRpc(connection: HostConnectionHandle, service: MarivoPresentationFileService): () => Promise<void>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { Session } from '@deepseek-ai/dsh-session';
|
|
3
|
+
import { type ToolDefinition } from '@deepseek-ai/dsh-tools';
|
|
4
|
+
import type { MarivoPresentationProjection } from './projection/index.ts';
|
|
5
|
+
export interface PresentationBinding {
|
|
6
|
+
workspaceId: string;
|
|
7
|
+
projection: MarivoPresentationProjection;
|
|
8
|
+
}
|
|
9
|
+
export type PresentationBindingSource = () => PresentationBinding | Promise<PresentationBinding>;
|
|
10
|
+
/** One call projects a draft, builds both assets, commits them, then emits the receipt. */
|
|
11
|
+
export declare function createMarivoPresentTool(source: PresentationBindingSource, session: Session, lifecycleSignal?: AbortSignal): ToolDefinition;
|
|
12
|
+
export declare function registerMarivoPresentTool(ctx: Context, source: PresentationBindingSource, session: Session): () => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Host-issued reference to an immutable successful Python execution snapshot. */
|
|
2
|
+
export interface PythonCodeRef {
|
|
3
|
+
executionId: string;
|
|
4
|
+
sha256: string;
|
|
5
|
+
}
|
|
6
|
+
export interface PythonCodeSnippet extends PythonCodeRef {
|
|
7
|
+
language: 'python';
|
|
8
|
+
text: string;
|
|
9
|
+
provenance: 'execution';
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PythonCodeRef, PythonCodeSnippet } from './python-execution-contracts.ts';
|
|
2
|
+
export type { PythonCodeRef, PythonCodeSnippet } from './python-execution-contracts.ts';
|
|
3
|
+
/** Publish a complete record once. Its final name never exposes a partial write or overwrites. */
|
|
4
|
+
export declare function savePythonExecution(workspaceRoot: string, input: {
|
|
5
|
+
text: string;
|
|
6
|
+
startedAt: string;
|
|
7
|
+
finishedAt: string;
|
|
8
|
+
}, signal?: AbortSignal): Promise<PythonCodeRef>;
|
|
9
|
+
/** Resolve Host-stored execution identities for the bound Workspace. Never executes code. */
|
|
10
|
+
export declare function readPythonExecution(workspaceRoot: string, ref: PythonCodeRef, signal?: AbortSignal): Promise<PythonCodeSnippet>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type SemanticRef } from '../semantic-reference/contracts.ts';
|
|
2
|
+
import { type ComputationDefinition } from './definition.ts';
|
|
3
|
+
export declare const BROWSER_ENDPOINT = "semantic-browser/catalog";
|
|
4
|
+
export declare const CATALOG_MAX_BYTES: number;
|
|
5
|
+
export interface DisplayField {
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly value: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ObjectRelation {
|
|
10
|
+
readonly field: string;
|
|
11
|
+
readonly ref: SemanticRef;
|
|
12
|
+
}
|
|
13
|
+
export interface SemanticObjectView {
|
|
14
|
+
readonly ref: SemanticRef;
|
|
15
|
+
readonly computation: ComputationDefinition | null;
|
|
16
|
+
readonly name: string;
|
|
17
|
+
readonly domain: string | null;
|
|
18
|
+
readonly definition: string | null;
|
|
19
|
+
readonly guardrails: readonly string[];
|
|
20
|
+
readonly source: {
|
|
21
|
+
readonly file: string;
|
|
22
|
+
readonly line: number;
|
|
23
|
+
readonly symbol: string;
|
|
24
|
+
};
|
|
25
|
+
readonly fields: readonly DisplayField[];
|
|
26
|
+
readonly relations: readonly ObjectRelation[];
|
|
27
|
+
}
|
|
28
|
+
export interface CatalogProjection {
|
|
29
|
+
readonly fingerprint: string;
|
|
30
|
+
readonly kinds: readonly string[];
|
|
31
|
+
readonly objects: readonly SemanticObjectView[];
|
|
32
|
+
}
|
|
33
|
+
export interface CatalogSnapshot extends CatalogProjection {
|
|
34
|
+
readonly workspaceId: string;
|
|
35
|
+
readonly projectRoot: string;
|
|
36
|
+
readonly environmentFingerprint: string;
|
|
37
|
+
readonly loadedAt: string;
|
|
38
|
+
}
|
|
39
|
+
export declare function parseCatalogProjection(value: unknown): CatalogProjection;
|
|
40
|
+
export declare function parseCatalogSnapshot(value: unknown): CatalogSnapshot;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type SemanticRef } from '../semantic-reference/contracts.ts';
|
|
2
|
+
export type DefinitionValue = string | number | boolean | null | DefinitionValue[] | {
|
|
3
|
+
readonly [key: string]: DefinitionValue;
|
|
4
|
+
};
|
|
5
|
+
export interface ComputationDefinition {
|
|
6
|
+
readonly schema: 'marivo.semantic_definition/v1';
|
|
7
|
+
readonly ref: SemanticRef;
|
|
8
|
+
readonly catalog_definition_fingerprint: string;
|
|
9
|
+
readonly node: {
|
|
10
|
+
readonly [key: string]: DefinitionValue;
|
|
11
|
+
};
|
|
12
|
+
readonly temporal: {
|
|
13
|
+
readonly [key: string]: DefinitionValue;
|
|
14
|
+
};
|
|
15
|
+
readonly source_location: {
|
|
16
|
+
readonly file: string;
|
|
17
|
+
readonly line: number;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export declare function parseComputation(input: unknown, ref: SemanticRef, fingerprint: string): ComputationDefinition | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { MarivoCheckedRunner } from '../environment/types.ts';
|
|
2
|
+
import { type CatalogSnapshot } from './contracts.ts';
|
|
3
|
+
export interface BrowserWorkspace {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly path: string;
|
|
6
|
+
}
|
|
7
|
+
export interface BrowserHost {
|
|
8
|
+
getWorkspace(id: string): BrowserWorkspace | undefined;
|
|
9
|
+
projectRoot(workspace: BrowserWorkspace): string;
|
|
10
|
+
resolve(root: string): Promise<MarivoCheckedRunner>;
|
|
11
|
+
}
|
|
12
|
+
/** Workspace-addressed read service; intentionally has no Agent or credential dependency. */
|
|
13
|
+
export declare class SemanticBrowserService {
|
|
14
|
+
#private;
|
|
15
|
+
constructor(host: BrowserHost);
|
|
16
|
+
read(payload: unknown, caller: AbortSignal): Promise<CatalogSnapshot>;
|
|
17
|
+
dispose(): void;
|
|
18
|
+
}
|
|
19
|
+
/** Fixed diagnostics only: Python errors may contain model code or datasource secrets. */
|
|
20
|
+
export declare function browserFailure(error: unknown): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { MarivoCheckedRunner } from '../environment/types.ts';
|
|
2
|
+
import { type Projection } from './contracts.ts';
|
|
3
|
+
export declare const CATALOG_PROGRAM: string;
|
|
4
|
+
/** One plugin-owned cache, keyed by the exact Environment fingerprint. */
|
|
5
|
+
export declare class SemanticReferenceBridge {
|
|
6
|
+
#private;
|
|
7
|
+
constructor(clock?: () => number);
|
|
8
|
+
candidates(runner: MarivoCheckedRunner, signal: AbortSignal): Promise<Projection>;
|
|
9
|
+
invalidate(key: string): void;
|
|
10
|
+
dispose(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** Browser-safe wire contracts. These bounds do not reimplement Marivo's domain grammar. */
|
|
2
|
+
export declare const CHANNEL = "/dsh-data-analysis";
|
|
3
|
+
export declare const SOURCE = "marivo-semantic";
|
|
4
|
+
export declare const LIMIT = 40;
|
|
5
|
+
export declare const MAX_WIRE_BYTES: number;
|
|
6
|
+
export interface SemanticRef {
|
|
7
|
+
readonly schema: 'marivo.semantic_ref/v1';
|
|
8
|
+
readonly kind: string;
|
|
9
|
+
readonly path: string;
|
|
10
|
+
}
|
|
11
|
+
export interface Envelope {
|
|
12
|
+
readonly schema: 'dsh-data-analysis-semantic-reference/v1';
|
|
13
|
+
readonly sessionId: string;
|
|
14
|
+
readonly environmentFingerprint: string;
|
|
15
|
+
readonly ref: SemanticRef;
|
|
16
|
+
}
|
|
17
|
+
export interface Candidate {
|
|
18
|
+
readonly ref: SemanticRef;
|
|
19
|
+
readonly refKey: string;
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly businessDefinition: string | null;
|
|
22
|
+
}
|
|
23
|
+
export interface Projection {
|
|
24
|
+
readonly kinds: readonly string[];
|
|
25
|
+
readonly items: readonly Candidate[];
|
|
26
|
+
}
|
|
27
|
+
export interface RankedCandidate extends Candidate {
|
|
28
|
+
readonly section: 'recent' | 'kind' | 'strict' | 'fuzzy';
|
|
29
|
+
}
|
|
30
|
+
export interface CandidatesResponse {
|
|
31
|
+
readonly environmentFingerprint: string;
|
|
32
|
+
readonly items: readonly RankedCandidate[];
|
|
33
|
+
}
|
|
34
|
+
export declare function closed(value: unknown, keys: readonly string[]): Record<string, unknown>;
|
|
35
|
+
export declare function boundedText(value: unknown, max: number, empty?: boolean): string;
|
|
36
|
+
export declare function parseJson(value: unknown, max?: number): unknown;
|
|
37
|
+
export declare function parseRef(value: unknown): SemanticRef;
|
|
38
|
+
export declare function refKey(ref: SemanticRef): string;
|
|
39
|
+
export declare function parseEnvelope(value: unknown): Envelope;
|
|
40
|
+
export declare function envelopeJson(envelope: Envelope): string;
|
|
41
|
+
export declare function modelMarker(envelope: Envelope): string;
|
|
42
|
+
export declare function parseCandidate(value: unknown): Candidate;
|
|
43
|
+
export declare function parseProjection(value: unknown): Projection;
|
|
44
|
+
export declare function parseCandidatesRequest(value: unknown): {
|
|
45
|
+
version: number;
|
|
46
|
+
sessionId: string;
|
|
47
|
+
query: string;
|
|
48
|
+
quoted: boolean;
|
|
49
|
+
limit: number;
|
|
50
|
+
};
|
|
51
|
+
export declare function parseCandidatesResponse(value: unknown): CandidatesResponse;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ConnectionRpcHandler, HostConnectionHandle } from '@deepseek-ai/dsh-client-connection';
|
|
2
|
+
import type { MarivoCheckedRunner } from '../environment/types.ts';
|
|
3
|
+
import { SemanticReferenceBridge } from './bridge.ts';
|
|
4
|
+
import { type SemanticReferenceUsage } from './usage.ts';
|
|
5
|
+
export type EnvironmentResolver = (sessionId: string, purpose: 'candidates' | 'reference') => Promise<MarivoCheckedRunner>;
|
|
6
|
+
/** Abort the caller's wait, without pretending to cancel the shared Environment resolver. */
|
|
7
|
+
export declare function abortable<T>(promise: Promise<T>, signal: AbortSignal): Promise<T>;
|
|
8
|
+
export declare class SemanticReferenceService {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(resolve: EnvironmentResolver, usage: SemanticReferenceUsage, bridge?: SemanticReferenceBridge);
|
|
11
|
+
handle(endpoint: string, payload: unknown, caller: AbortSignal): Promise<unknown>;
|
|
12
|
+
stop(): void;
|
|
13
|
+
close(): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export declare function registerSemanticReferenceRpc(connection: HostConnectionHandle, service: SemanticReferenceService, browser?: ConnectionRpcHandler): () => Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Projection, type RankedCandidate } from './contracts.ts';
|
|
2
|
+
export interface UsageScore {
|
|
3
|
+
readonly count: number;
|
|
4
|
+
readonly last: number;
|
|
5
|
+
}
|
|
6
|
+
export type UsageScores = ReadonlyMap<string, UsageScore>;
|
|
7
|
+
export declare function normalize(text: string): string;
|
|
8
|
+
export declare function compareText(a: string, b: string): number;
|
|
9
|
+
export declare function dice(a: string, b: string): number;
|
|
10
|
+
export declare function search(projection: Projection, rawQuery: string, usage?: UsageScores): readonly RankedCandidate[];
|