@chengxianglibra/dsh-data-analysis 0.1.1 → 0.2.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.
Files changed (303) hide show
  1. package/README.md +139 -53
  2. package/cordis.patch.yml +1 -1
  3. package/lib/bin/environment.js +9 -7
  4. package/lib/bin/presentation-lint.js +21 -0
  5. package/lib/bridges.js +2 -2
  6. package/lib/client/credentials/changes.js +74 -0
  7. package/lib/client/credentials/create-datasource.js +171 -0
  8. package/lib/client/credentials/credential-draft.js +42 -0
  9. package/lib/client/credentials/defaults.js +11 -0
  10. package/lib/client/credentials/descriptions.js +46 -0
  11. package/lib/client/credentials/install.js +319 -0
  12. package/lib/client/credentials/model.js +766 -0
  13. package/lib/client/credentials/report-publishing.js +96 -0
  14. package/lib/client/credentials/styles.js +21 -0
  15. package/lib/client/i18n/context.js +22 -0
  16. package/lib/client/i18n/copy.js +57 -0
  17. package/lib/client/i18n/credentials.js +475 -0
  18. package/lib/client/i18n/host.js +27 -0
  19. package/lib/client/i18n/navigation.js +41 -0
  20. package/lib/client/i18n/presentation.js +577 -0
  21. package/lib/client/i18n/python.js +36 -0
  22. package/lib/client/i18n/semantic.js +441 -0
  23. package/lib/client/input-context.js +21 -0
  24. package/lib/client/python-tool/card.js +35 -0
  25. package/lib/client/python-tool/execution-error.js +35 -0
  26. package/lib/client/python-tool/install.js +9 -0
  27. package/lib/client/python-tool/model.js +101 -0
  28. package/lib/client/right-tabs/install.js +535 -0
  29. package/lib/client/right-tabs/live-delivery.js +58 -0
  30. package/lib/client/right-tabs/navigation.js +47 -0
  31. package/lib/client/right-tabs/page.js +178 -0
  32. package/lib/client/right-tabs/styles.js +11 -0
  33. package/lib/client/rpc.js +5 -0
  34. package/lib/client/semantic-reference.js +10 -0
  35. package/lib/client/workspace-header-action.js +24 -0
  36. package/lib/client/workspace-shortcuts.js +26 -0
  37. package/lib/client.js +1250 -730
  38. package/lib/compatibility.js +2 -2
  39. package/lib/datasource/authoring.js +109 -0
  40. package/lib/datasource/bridge-programs.js +42 -27
  41. package/lib/datasource/bridge.js +144 -9
  42. package/lib/datasource/changes-contract.js +41 -0
  43. package/lib/datasource/changes.js +49 -0
  44. package/lib/datasource/configure.js +39 -0
  45. package/lib/datasource/defaults.js +25 -0
  46. package/lib/datasource/index.js +4 -2
  47. package/lib/datasource/python-options.js +21 -0
  48. package/lib/datasource/python.js +206 -0
  49. package/lib/datasource/resolver-program.js +112 -0
  50. package/lib/datasource/rpc.js +150 -0
  51. package/lib/datasource/service.js +962 -0
  52. package/lib/datasource/shell-env.js +2 -333
  53. package/lib/datasource/test.js +25 -51
  54. package/lib/disclosure/activation.js +19 -7
  55. package/lib/disclosure/execution-guidance.js +52 -0
  56. package/lib/disclosure/help.js +4 -1
  57. package/lib/environment/binding.js +54 -9
  58. package/lib/environment/runtime.js +120 -108
  59. package/lib/environment/subprocess.js +6 -1
  60. package/lib/environment/summary.js +3 -3
  61. package/lib/environment/workspace.js +23 -1
  62. package/lib/index.js +1 -1
  63. package/lib/lifecycle.js +33 -0
  64. package/lib/plugin-agents.js +154 -0
  65. package/lib/plugin.js +172 -133
  66. package/lib/presentation/asset.js +34 -0
  67. package/lib/presentation/assets/portable.js +606 -0
  68. package/lib/presentation/assets/static.js +1216 -0
  69. package/lib/presentation/build/index.js +72 -0
  70. package/lib/presentation/commit.js +163 -0
  71. package/lib/presentation/contracts/asset-path.js +9 -0
  72. package/lib/presentation/contracts/catalog.js +62 -0
  73. package/lib/presentation/contracts/charts.js +453 -0
  74. package/lib/presentation/contracts/editing.js +58 -0
  75. package/lib/presentation/contracts/index.js +663 -0
  76. package/lib/presentation/contracts/interaction.js +62 -0
  77. package/lib/presentation/contracts/types.js +15 -0
  78. package/lib/presentation/contracts/values.js +28 -0
  79. package/lib/presentation/delivery.js +71 -0
  80. package/lib/presentation/export-html.js +214 -0
  81. package/lib/presentation/files.js +82 -0
  82. package/lib/presentation/index.js +6 -0
  83. package/lib/presentation/lint.js +46 -0
  84. package/lib/presentation/projection/files.js +85 -0
  85. package/lib/presentation/projection/index.js +196 -0
  86. package/lib/presentation/projection/program.js +137 -0
  87. package/lib/presentation/projection/sql-code.js +79 -0
  88. package/lib/presentation/receipt.js +34 -0
  89. package/lib/presentation/reports.js +219 -0
  90. package/lib/presentation/rpc.js +186 -0
  91. package/lib/presentation/tool.js +118 -0
  92. package/lib/python-execution-contracts.js +1 -0
  93. package/lib/python-execution.js +232 -0
  94. package/lib/report-publishing/adapters.js +111 -0
  95. package/lib/report-publishing/config.js +69 -0
  96. package/lib/report-publishing/service.js +180 -0
  97. package/lib/rpc.js +49 -0
  98. package/lib/semantic-browser/contracts.js +97 -0
  99. package/lib/semantic-browser/definition.js +64 -0
  100. package/lib/semantic-browser/program.js +129 -0
  101. package/lib/semantic-browser/service.js +106 -0
  102. package/lib/semantic-reference/bridge.js +127 -0
  103. package/lib/semantic-reference/contracts.js +127 -0
  104. package/lib/semantic-reference/environment.js +56 -0
  105. package/lib/semantic-reference/index.js +3 -0
  106. package/lib/semantic-reference/labels.js +16 -0
  107. package/lib/semantic-reference/rpc.js +143 -0
  108. package/lib/semantic-reference/search.js +95 -0
  109. package/lib/semantic-reference/usage.js +152 -0
  110. package/lib/tool-lifecycle.js +22 -0
  111. package/lib/types/bridges.d.ts +2 -2
  112. package/lib/types/client/credentials/changes.d.ts +9 -0
  113. package/lib/types/client/credentials/create-datasource.d.ts +7 -0
  114. package/lib/types/client/credentials/credential-draft.d.ts +14 -0
  115. package/lib/types/client/credentials/defaults.d.ts +2 -0
  116. package/lib/types/client/credentials/descriptions.d.ts +1 -0
  117. package/lib/types/client/credentials/install.d.ts +19 -0
  118. package/lib/types/client/credentials/model.d.ts +79 -0
  119. package/lib/types/client/credentials/report-publishing.d.ts +5 -0
  120. package/lib/types/client/credentials/styles.d.ts +1 -0
  121. package/lib/types/client/i18n/context.d.ts +17 -0
  122. package/lib/types/client/i18n/copy.d.ts +806 -0
  123. package/lib/types/client/i18n/credentials.d.ts +475 -0
  124. package/lib/types/client/i18n/host.d.ts +16 -0
  125. package/lib/types/client/i18n/navigation.d.ts +41 -0
  126. package/lib/types/client/i18n/presentation.d.ts +577 -0
  127. package/lib/types/client/i18n/python.d.ts +19 -0
  128. package/lib/types/client/i18n/semantic.d.ts +441 -0
  129. package/lib/types/client/input-context.d.ts +19 -0
  130. package/lib/types/client/presentation/ask-dsh.d.ts +5 -0
  131. package/lib/types/client/presentation/catalog-model.d.ts +24 -0
  132. package/lib/types/client/presentation/catalog.d.ts +20 -0
  133. package/lib/types/client/presentation/chart-explorer.d.ts +12 -0
  134. package/lib/types/client/presentation/chart-geometry.d.ts +30 -0
  135. package/lib/types/client/presentation/chart-renderer.d.ts +10 -0
  136. package/lib/types/client/presentation/chart-specials.d.ts +10 -0
  137. package/lib/types/client/presentation/chart-styles.d.ts +1 -0
  138. package/lib/types/client/presentation/chart-tooltip.d.ts +13 -0
  139. package/lib/types/client/presentation/chart-view.d.ts +23 -0
  140. package/lib/types/client/presentation/context-reference.d.ts +12 -0
  141. package/lib/types/client/presentation/copy-context.d.ts +5 -0
  142. package/lib/types/client/presentation/delivery-model.d.ts +75 -0
  143. package/lib/types/client/presentation/delivery.d.ts +78 -0
  144. package/lib/types/client/presentation/download.d.ts +2 -0
  145. package/lib/types/client/presentation/editor-controls.d.ts +12 -0
  146. package/lib/types/client/presentation/export-menu.d.ts +26 -0
  147. package/lib/types/client/presentation/export-view.d.ts +63 -0
  148. package/lib/types/client/presentation/global-filters.d.ts +6 -0
  149. package/lib/types/client/presentation/host-entry.d.ts +18 -0
  150. package/lib/types/client/presentation/icons.d.ts +4 -0
  151. package/lib/types/client/presentation/markdown.d.ts +5 -0
  152. package/lib/types/client/presentation/model.d.ts +61 -0
  153. package/lib/types/client/presentation/reader.d.ts +24 -0
  154. package/lib/types/client/presentation/reference-source.d.ts +9 -0
  155. package/lib/types/client/presentation/source-code-model.d.ts +17 -0
  156. package/lib/types/client/presentation/source-code.d.ts +6 -0
  157. package/lib/types/client/presentation/source-dialog.d.ts +12 -0
  158. package/lib/types/client/presentation/source-facts.d.ts +20 -0
  159. package/lib/types/client/presentation/source-format.d.ts +5 -0
  160. package/lib/types/client/presentation/source-highlight.d.ts +7 -0
  161. package/lib/types/client/presentation/sources.d.ts +13 -0
  162. package/lib/types/client/presentation/styles.d.ts +1 -0
  163. package/lib/types/client/presentation/table.d.ts +16 -0
  164. package/lib/types/client/presentation/use-element-width.d.ts +5 -0
  165. package/lib/types/client/python-tool/card.d.ts +2 -0
  166. package/lib/types/client/python-tool/execution-error.d.ts +3 -0
  167. package/lib/types/client/python-tool/install.d.ts +2 -0
  168. package/lib/types/client/python-tool/model.d.ts +20 -0
  169. package/lib/types/client/right-tabs/install.d.ts +18 -0
  170. package/lib/types/client/right-tabs/live-delivery.d.ts +8 -0
  171. package/lib/types/client/right-tabs/navigation.d.ts +17 -0
  172. package/lib/types/client/right-tabs/page.d.ts +36 -0
  173. package/lib/types/client/right-tabs/styles.d.ts +2 -0
  174. package/lib/types/client/rpc.d.ts +3 -0
  175. package/lib/types/client/semantic-reference.d.ts +4 -0
  176. package/lib/types/client/workspace-header-action.d.ts +7 -0
  177. package/lib/types/client/workspace-shortcuts.d.ts +15 -0
  178. package/lib/types/client.d.ts +9 -124
  179. package/lib/types/compatibility.d.ts +3 -3
  180. package/lib/types/datasource/authoring.d.ts +35 -0
  181. package/lib/types/datasource/bridge.d.ts +43 -4
  182. package/lib/types/datasource/changes-contract.d.ts +18 -0
  183. package/lib/types/datasource/changes.d.ts +15 -0
  184. package/lib/types/datasource/configure.d.ts +7 -0
  185. package/lib/types/datasource/defaults.d.ts +7 -0
  186. package/lib/types/datasource/index.d.ts +8 -5
  187. package/lib/types/datasource/python-options.d.ts +9 -0
  188. package/lib/types/datasource/python.d.ts +19 -0
  189. package/lib/types/datasource/resolver-program.d.ts +6 -0
  190. package/lib/types/datasource/rpc.d.ts +5 -0
  191. package/lib/types/datasource/service.d.ts +155 -0
  192. package/lib/types/datasource/shell-env.d.ts +0 -29
  193. package/lib/types/datasource/test.d.ts +6 -29
  194. package/lib/types/disclosure/activation.d.ts +2 -1
  195. package/lib/types/disclosure/execution-guidance.d.ts +6 -0
  196. package/lib/types/disclosure/help.d.ts +1 -1
  197. package/lib/types/environment/binding.d.ts +5 -1
  198. package/lib/types/environment/errors.d.ts +1 -1
  199. package/lib/types/environment/runtime.d.ts +5 -5
  200. package/lib/types/environment/types.d.ts +15 -3
  201. package/lib/types/environment/workspace.d.ts +1 -0
  202. package/lib/types/index.d.ts +1 -1
  203. package/lib/types/lifecycle.d.ts +8 -0
  204. package/lib/types/plugin-agents.d.ts +27 -0
  205. package/lib/types/plugin.d.ts +14 -24
  206. package/lib/types/presentation/asset.d.ts +6 -0
  207. package/lib/types/presentation/build/index.d.ts +16 -0
  208. package/lib/types/presentation/commit.d.ts +4 -0
  209. package/lib/types/presentation/contracts/asset-path.d.ts +2 -0
  210. package/lib/types/presentation/contracts/catalog.d.ts +27 -0
  211. package/lib/types/presentation/contracts/charts.d.ts +11 -0
  212. package/lib/types/presentation/contracts/editing.d.ts +8 -0
  213. package/lib/types/presentation/contracts/index.d.ts +11 -0
  214. package/lib/types/presentation/contracts/interaction.d.ts +8 -0
  215. package/lib/types/presentation/contracts/types.d.ts +255 -0
  216. package/lib/types/presentation/contracts/values.d.ts +9 -0
  217. package/lib/types/presentation/delivery.d.ts +3 -0
  218. package/lib/types/presentation/export-html.d.ts +13 -0
  219. package/lib/types/presentation/files.d.ts +7 -0
  220. package/lib/types/presentation/index.d.ts +6 -0
  221. package/lib/types/presentation/lint.d.ts +13 -0
  222. package/lib/types/presentation/projection/files.d.ts +2 -0
  223. package/lib/types/presentation/projection/index.d.ts +20 -0
  224. package/lib/types/presentation/projection/program.d.ts +2 -0
  225. package/lib/types/presentation/projection/sql-code.d.ts +2 -0
  226. package/lib/types/presentation/receipt.d.ts +14 -0
  227. package/lib/types/presentation/reports.d.ts +10 -0
  228. package/lib/types/presentation/rpc.d.ts +25 -0
  229. package/lib/types/presentation/tool.d.ts +12 -0
  230. package/lib/types/python-execution-contracts.d.ts +10 -0
  231. package/lib/types/python-execution.d.ts +10 -0
  232. package/lib/types/report-publishing/adapters.d.ts +6 -0
  233. package/lib/types/report-publishing/config.d.ts +22 -0
  234. package/lib/types/report-publishing/service.d.ts +68 -0
  235. package/lib/types/rpc.d.ts +3 -0
  236. package/lib/types/semantic-browser/contracts.d.ts +47 -0
  237. package/lib/types/semantic-browser/definition.d.ts +20 -0
  238. package/lib/types/semantic-browser/program.d.ts +2 -0
  239. package/lib/types/semantic-browser/service.d.ts +26 -0
  240. package/lib/types/semantic-reference/bridge.d.ts +12 -0
  241. package/lib/types/semantic-reference/contracts.d.ts +54 -0
  242. package/lib/types/semantic-reference/environment.d.ts +22 -0
  243. package/lib/types/semantic-reference/index.d.ts +3 -0
  244. package/lib/types/semantic-reference/labels.d.ts +16 -0
  245. package/lib/types/semantic-reference/rpc.d.ts +15 -0
  246. package/lib/types/semantic-reference/search.d.ts +10 -0
  247. package/lib/types/semantic-reference/usage.d.ts +43 -0
  248. package/lib/types/tool-lifecycle.d.ts +4 -0
  249. package/lib/types/workspace-identity.d.ts +6 -0
  250. package/lib/workspace-identity.js +9 -0
  251. package/package.json +99 -53
  252. package/python/presentation-kit/dist/dsh_data_analysis_presentation_kit-1.1.0-py3-none-any.whl +0 -0
  253. package/skills/dsh-data-analysis-files/SKILL.md +32 -0
  254. package/skills/dsh-data-analysis-files/references/examples.md +93 -0
  255. package/skills/dsh-data-analysis-presentation/SKILL.md +28 -0
  256. package/skills/dsh-data-analysis-presentation/references/chart-examples.md +18 -0
  257. package/skills/dsh-data-analysis-presentation/references/charts.md +55 -0
  258. package/skills/dsh-data-analysis-presentation/references/examples/artifact.draft.json +36 -0
  259. package/skills/dsh-data-analysis-presentation/references/examples/charts-bins.dataset.json +33 -0
  260. package/skills/dsh-data-analysis-presentation/references/examples/charts-boxes.dataset.json +45 -0
  261. package/skills/dsh-data-analysis-presentation/references/examples/charts-composition.dataset.json +33 -0
  262. package/skills/dsh-data-analysis-presentation/references/examples/charts-funnel.dataset.json +27 -0
  263. package/skills/dsh-data-analysis-presentation/references/examples/charts-precision.dataset.json +21 -0
  264. package/skills/dsh-data-analysis-presentation/references/examples/charts-series.dataset.json +58 -0
  265. package/skills/dsh-data-analysis-presentation/references/examples/charts-shares.dataset.json +33 -0
  266. package/skills/dsh-data-analysis-presentation/references/examples/charts-waterfall.dataset.json +44 -0
  267. package/skills/dsh-data-analysis-presentation/references/examples/charts.draft.json +393 -0
  268. package/skills/dsh-data-analysis-presentation/references/examples/comparison-selected.dataset.json +24 -0
  269. package/skills/dsh-data-analysis-presentation/references/examples/comparison-summary.dataset.json +22 -0
  270. package/skills/dsh-data-analysis-presentation/references/examples/comparison.dataset.json +18 -0
  271. package/skills/dsh-data-analysis-presentation/references/examples/comparison.draft.json +80 -0
  272. package/skills/dsh-data-analysis-presentation/references/examples/computed-sources.draft.json +42 -0
  273. package/skills/dsh-data-analysis-presentation/references/examples/computed.dataset.json +12 -0
  274. package/skills/dsh-data-analysis-presentation/references/examples/computed.draft.json +58 -0
  275. package/skills/dsh-data-analysis-presentation/references/examples/interaction-detail.dataset.json +30 -0
  276. package/skills/dsh-data-analysis-presentation/references/examples/interaction-summary.dataset.json +22 -0
  277. package/skills/dsh-data-analysis-presentation/references/examples/interaction.draft.json +279 -0
  278. package/skills/dsh-data-analysis-presentation/references/examples/source-only.draft.json +27 -0
  279. package/skills/dsh-data-analysis-presentation/references/examples/write-charts.py +73 -0
  280. package/skills/dsh-data-analysis-presentation/references/examples/write-comparison.py +42 -0
  281. package/skills/dsh-data-analysis-presentation/references/examples/write-computed.py +21 -0
  282. package/skills/dsh-data-analysis-presentation/references/examples/write-interaction.py +33 -0
  283. package/skills/dsh-data-analysis-presentation/references/examples.md +44 -0
  284. package/skills/dsh-data-analysis-presentation/references/export-html.md +7 -0
  285. package/skills/dsh-data-analysis-presentation/references/interaction.md +56 -0
  286. package/skills/dsh-data-analysis-presentation/references/narrative.md +37 -0
  287. package/skills/dsh-data-analysis-presentation/references/publishing.md +3 -0
  288. package/skills/dsh-data-analysis-presentation/references/schema.md +162 -0
  289. package/lib/datasource/access.js +0 -60
  290. package/lib/datasource/credentials.js +0 -24
  291. package/lib/evidence/bridge-program.js +0 -153
  292. package/lib/evidence/bridge.js +0 -166
  293. package/lib/evidence/index.js +0 -2
  294. package/lib/evidence/sources.js +0 -263
  295. package/lib/types/datasource/access.d.ts +0 -27
  296. package/lib/types/evidence/bridge.d.ts +0 -40
  297. package/lib/types/evidence/index.d.ts +0 -4
  298. package/lib/types/evidence/sources.d.ts +0 -57
  299. package/python/report-kit/dist/dsh_data_analysis_report_kit-3.0.0-py3-none-any.whl +0 -0
  300. package/skills/dsh-data-analysis-report/SKILL.md +0 -57
  301. package/skills/dsh-data-analysis-report/assets/marivo-artifact.js +0 -113
  302. package/skills/dsh-data-analysis-report/assets/marivo-session-dag.js +0 -1201
  303. package/skills/dsh-data-analysis-report/assets/report-data.js +0 -449
@@ -0,0 +1,255 @@
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: 3;
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 type PresentationLocale = 'zh-CN' | 'en-US';
207
+ export interface PresentationDraft {
208
+ schemaVersion: 2;
209
+ locale: PresentationLocale;
210
+ title: string;
211
+ datasets: DraftDataset[];
212
+ sources: DeclaredSource[];
213
+ blocks: PresentationBlock[];
214
+ interaction?: PresentationInteraction;
215
+ }
216
+ export interface PresentationDiagnostic {
217
+ code: string;
218
+ path: string;
219
+ message: string;
220
+ }
221
+ export interface PresentationDocument {
222
+ schemaVersion: 3;
223
+ locale: PresentationLocale;
224
+ reportId: string;
225
+ workspaceId: string;
226
+ buildId: string;
227
+ title: string;
228
+ generatedAt: string;
229
+ datasets: DocumentDataset[];
230
+ sources: SourceSnapshot[];
231
+ blocks: PresentationBlock[];
232
+ diagnostics: PresentationDiagnostic[];
233
+ interaction?: PresentationInteraction;
234
+ }
235
+ export type PresentationAsset = 'presentation.json' | 'index.html';
236
+ export interface PresentationFile<Asset extends PresentationAsset = PresentationAsset> {
237
+ asset: Asset;
238
+ path: string;
239
+ sha256: string;
240
+ bytes: number;
241
+ }
242
+ /** Session and Turn belong to the Host delivery envelope, not to the file identity. */
243
+ export interface PresentationReceipt {
244
+ schemaVersion: 2;
245
+ reportId: string;
246
+ kind: 'marivo.presentation';
247
+ workspaceId: string;
248
+ buildId: string;
249
+ title: string;
250
+ summary: string;
251
+ files: {
252
+ document: PresentationFile<'presentation.json'>;
253
+ html?: PresentationFile<'index.html'>;
254
+ };
255
+ }
@@ -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,3 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ /** Persist the same envelope on nested Code dispatch even when code discards the return value. */
3
+ export declare function installMarivoPresentationCodeDelivery(ctx: Context): () => Promise<void>;
@@ -0,0 +1,13 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ import type { Session } from '@deepseek-ai/dsh-session';
3
+ export declare const MARIVO_EXPORT_HTML_TOOL_NAME = "marivo_export_html";
4
+ export type ExportWorkspaceSource = () => {
5
+ id: string;
6
+ path: string;
7
+ } | Promise<{
8
+ id: string;
9
+ path: string;
10
+ }>;
11
+ export declare function parseHtmlOutputPath(value: unknown): string;
12
+ export declare function createMarivoExportHtmlTool(source: ExportWorkspaceSource, session: Session): import("@deepseek-ai/dsh-tools").ToolDefinition;
13
+ export declare function registerMarivoExportHtmlTool(ctx: Context, source: ExportWorkspaceSource, session: Session): () => Promise<void>;
@@ -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,6 @@
1
+ export * from './contracts/index.ts';
2
+ export * from './delivery.ts';
3
+ export * from './projection/index.ts';
4
+ export * from './receipt.ts';
5
+ export * from './rpc.ts';
6
+ export * from './tool.ts';
@@ -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,2 @@
1
+ /** Read raw bytes under a strict budget before JSON parsing, including concurrent growth. */
2
+ export declare function readWorkspaceJson(workspaceRoot: string, relativePath: string, maximum: number, location: string, signal?: AbortSignal): Promise<unknown>;
@@ -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,2 @@
1
+ /** Fixed public read program. Drafts contain references and data paths, never executable code. */
2
+ export declare const MARIVO_PRESENTATION_READ_PROGRAM: string;
@@ -0,0 +1,2 @@
1
+ /** Only persisted public producer records are read; this program never compiles or executes SQL. */
2
+ export declare const MARIVO_PRESENTATION_SQL_CODE_PROGRAM: string;
@@ -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,10 @@
1
+ import { type PublicationSource, type ReportCatalog, type ReportHistory } from './contracts/catalog.ts';
2
+ import { type PresentationDocument, type PresentationReceipt } from './contracts/index.ts';
3
+ export declare function readReceiptDocument(root: string, receipt: PresentationReceipt, signal?: AbortSignal): Promise<PresentationDocument>;
4
+ /** Current and its publication history become visible through one atomic rename. */
5
+ export declare function readReportHistory(root: string, workspaceId: string, reportId: string, signal?: AbortSignal): Promise<ReportHistory>;
6
+ export declare function resolvePresentation(root: string, workspaceId: string, reportId: string, signal?: AbortSignal): Promise<PresentationReceipt>;
7
+ /** Enumerate only publication pointers, never completed-but-unpublished build directories. */
8
+ export declare function listReports(root: string, workspaceId: string, signal?: AbortSignal): Promise<ReportCatalog>;
9
+ /** The mutable pointer is the publication boundary; completed builds are never overwritten. */
10
+ export declare function publishPresentation(root: string, document: PresentationDocument, expectedBuildId: string | null, assertOwner: () => Promise<void>, signal?: AbortSignal, source?: PublicationSource | null): Promise<PresentationReceipt>;
@@ -0,0 +1,25 @@
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, resolveId?: PresentationWorkspaceResolver);
11
+ catalog(endpoint: 'reports/list' | 'reports/history', payload: unknown, caller?: AbortSignal): Promise<import("./contracts/catalog.ts").ReportHistory | import("./contracts/catalog.ts").ReportCatalog>;
12
+ close(): Promise<void>;
13
+ report(endpoint: 'reports/resolve' | 'reports/save', payload: unknown, caller?: AbortSignal): Promise<import("./contracts/types.ts").PresentationReceipt>;
14
+ read(payload: unknown, caller?: AbortSignal): Promise<{
15
+ workspaceId: string;
16
+ reportId: string;
17
+ buildId: string;
18
+ asset: PresentationAsset;
19
+ mimeType: string;
20
+ sha256: string;
21
+ bytes: number;
22
+ bodyBase64: string;
23
+ }>;
24
+ }
25
+ 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 the document, 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): () => Promise<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,6 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ import type { HostConnectionHandle } from '@deepseek-ai/dsh-client-connection';
3
+ import type { ReportPublishingService } from './service.ts';
4
+ export declare const PUBLISHING_CHANNEL = "/dsh-report-publishing";
5
+ export declare function registerPublishingCredentials(connection: HostConnectionHandle, service: ReportPublishingService, workspaceExists: (id: string) => boolean): () => Promise<void>;
6
+ export declare function registerReportPublishTool(ctx: Context, service: ReportPublishingService, sessionId: string): () => Promise<void>;
@@ -0,0 +1,22 @@
1
+ import { z } from 'zod';
2
+ export declare const publishingConfigSchema: z.ZodObject<{
3
+ enabled: z.ZodDefault<z.ZodBoolean>;
4
+ storage: z.ZodObject<{
5
+ name: z.ZodString;
6
+ protocol: z.ZodDefault<z.ZodLiteral<"s3">>;
7
+ endpoint: z.ZodString;
8
+ region: z.ZodString;
9
+ bucket: z.ZodString;
10
+ forcePathStyle: z.ZodDefault<z.ZodBoolean>;
11
+ accessKeyIdRef: z.ZodString;
12
+ secretAccessKeyRef: z.ZodString;
13
+ sessionTokenRef: z.ZodOptional<z.ZodString>;
14
+ }, z.core.$strict>;
15
+ pathPrefix: z.ZodDefault<z.ZodString>;
16
+ publicBaseUrl: z.ZodString;
17
+ }, z.core.$strict>;
18
+ export type ReportPublishingConfig = z.input<typeof publishingConfigSchema> | {
19
+ enabled?: false;
20
+ };
21
+ export type EnabledPublishingConfig = z.output<typeof publishingConfigSchema>;
22
+ export declare function resolvePublishingConfig(value?: ReportPublishingConfig): EnabledPublishingConfig | undefined;
@@ -0,0 +1,68 @@
1
+ import { type CredentialProvider } from '@deepseek-ai/dsh-credentials';
2
+ import type { MarivoPresentationFileService } from '../presentation/rpc.ts';
3
+ import type { EnabledPublishingConfig } from './config.ts';
4
+ export declare function publishingPathName(value: string, fallback: string): string;
5
+ export type PublishingField = 'accessKeyId' | 'secretAccessKey' | 'sessionToken';
6
+ export interface PublishingCredentialField {
7
+ field: PublishingField;
8
+ reference: string;
9
+ required: boolean;
10
+ configured: boolean;
11
+ writable: boolean;
12
+ source?: string;
13
+ }
14
+ export interface PublishingCredentialView {
15
+ enabled: boolean;
16
+ configId?: string;
17
+ name?: string;
18
+ bucket?: string;
19
+ fields: PublishingCredentialField[];
20
+ }
21
+ type Store = Pick<CredentialProvider, 'describe' | 'set' | 'unset' | 'resolve'>;
22
+ export interface UploadInput {
23
+ config: EnabledPublishingConfig;
24
+ credentials: {
25
+ accessKeyId: string;
26
+ secretAccessKey: string;
27
+ sessionToken?: string;
28
+ };
29
+ key: string;
30
+ bytes: Buffer;
31
+ signal: AbortSignal;
32
+ }
33
+ export declare function uploadReport(input: UploadInput): Promise<void>;
34
+ export declare class ReportPublishingService {
35
+ readonly configId: `${string}-${string}-${string}-${string}-${string}`;
36
+ readonly config: EnabledPublishingConfig | undefined;
37
+ readonly store: Store;
38
+ readonly files: Pick<MarivoPresentationFileService, 'catalog' | 'read'>;
39
+ readonly upload: (input: UploadInput) => Promise<void>;
40
+ readonly workspaceName: (id: string) => string;
41
+ constructor(config: EnabledPublishingConfig | undefined, store: Store, files: Pick<MarivoPresentationFileService, 'catalog' | 'read'>, upload?: (input: UploadInput) => Promise<void>, workspaceName?: (id: string) => string);
42
+ assertConfig(configId: string): void;
43
+ references(): Array<{
44
+ field: PublishingField;
45
+ reference: string;
46
+ required: boolean;
47
+ }>;
48
+ describe(): Promise<PublishingCredentialView>;
49
+ change(field: PublishingField, value: string | undefined, signal: AbortSignal): Promise<void>;
50
+ publish(scope: {
51
+ sessionId: string;
52
+ } | {
53
+ workspaceId: string;
54
+ }, reportId: string, buildId: string, signal: AbortSignal, viewHtml?: string): Promise<{
55
+ storage: string;
56
+ bucket: string;
57
+ key: string;
58
+ url: string;
59
+ workspaceId: string;
60
+ reportId: string;
61
+ buildId: string;
62
+ sha256: string;
63
+ bytes: number;
64
+ kind: string;
65
+ publishedAt: string;
66
+ }>;
67
+ }
68
+ export {};
@@ -0,0 +1,3 @@
1
+ /** Dedicated plugin RPC envelopes over Harness-owned authenticated exact Fetch routes. */
2
+ import { type ConnectionRpcHandler, type HostConnectionHandle } from '@deepseek-ai/dsh-client-connection';
3
+ export declare function registerPluginRpc(connection: Pick<HostConnectionHandle, 'fetch'>, channel: string, endpoints: readonly string[], handler: ConnectionRpcHandler): () => Promise<void>;
@@ -0,0 +1,47 @@
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 declare const CATALOG_ERROR_SCHEMA = "marivo.semantic_catalog_error/v1";
6
+ export interface DisplayField {
7
+ readonly name: string;
8
+ readonly value: string;
9
+ }
10
+ export interface ObjectRelation {
11
+ readonly field: string;
12
+ readonly ref: SemanticRef;
13
+ }
14
+ export interface SemanticObjectView {
15
+ readonly ref: SemanticRef;
16
+ readonly computation: ComputationDefinition | null;
17
+ readonly name: string;
18
+ readonly domain: string | null;
19
+ readonly definition: string | null;
20
+ readonly guardrails: readonly string[];
21
+ readonly source: {
22
+ readonly file: string;
23
+ readonly line: number;
24
+ readonly symbol: string;
25
+ };
26
+ readonly fields: readonly DisplayField[];
27
+ readonly relations: readonly ObjectRelation[];
28
+ }
29
+ export interface CatalogProjection {
30
+ readonly fingerprint: string;
31
+ readonly kinds: readonly string[];
32
+ readonly objects: readonly SemanticObjectView[];
33
+ }
34
+ export interface CatalogFailure {
35
+ readonly schema: typeof CATALOG_ERROR_SCHEMA;
36
+ readonly kind: 'semantic';
37
+ readonly message: string;
38
+ }
39
+ export interface CatalogSnapshot extends CatalogProjection {
40
+ readonly workspaceId: string;
41
+ readonly projectRoot: string;
42
+ readonly environmentFingerprint: string;
43
+ readonly loadedAt: string;
44
+ }
45
+ export declare function parseCatalogProjection(value: unknown): CatalogProjection;
46
+ export declare function parseCatalogFailure(value: unknown): CatalogFailure | undefined;
47
+ 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,2 @@
1
+ /** Explicit public Details projection. No object dump, source-code read or data operation. */
2
+ export declare const BROWSER_CATALOG_PROGRAM: string;
@@ -0,0 +1,26 @@
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
+ export declare class SemanticCatalogLoadError extends Error {
13
+ readonly code = "catalog-load-failed";
14
+ readonly diagnostic: string;
15
+ constructor(diagnostic: string);
16
+ }
17
+ /** Workspace-addressed read service; intentionally has no Agent or credential dependency. */
18
+ export declare class SemanticBrowserService {
19
+ #private;
20
+ constructor(host: BrowserHost);
21
+ read(payload: unknown, caller: AbortSignal): Promise<CatalogSnapshot>;
22
+ close(): Promise<void>;
23
+ dispose(): void;
24
+ }
25
+ /** Preserve Marivo semantic diagnostics; keep unknown Python failures behind a fixed fallback. */
26
+ export declare function browserFailure(error: unknown): string;
@@ -0,0 +1,12 @@
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
+ close(): Promise<void>;
10
+ invalidate(key: string): void;
11
+ dispose(): void;
12
+ }