@chengxianglibra/dsh-data-analysis 0.1.2 → 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 (212) hide show
  1. package/README.md +136 -99
  2. package/cordis.patch.yml +1 -1
  3. package/lib/bin/environment.js +8 -6
  4. package/lib/client/credentials/changes.js +74 -0
  5. package/lib/client/credentials/create-datasource.js +126 -22
  6. package/lib/client/credentials/credential-draft.js +42 -0
  7. package/lib/client/credentials/defaults.js +11 -0
  8. package/lib/client/credentials/descriptions.js +46 -0
  9. package/lib/client/credentials/install.js +209 -81
  10. package/lib/client/credentials/model.js +323 -51
  11. package/lib/client/credentials/report-publishing.js +96 -0
  12. package/lib/client/credentials/styles.js +13 -9
  13. package/lib/client/i18n/context.js +22 -0
  14. package/lib/client/i18n/copy.js +57 -0
  15. package/lib/client/i18n/credentials.js +475 -0
  16. package/lib/client/i18n/host.js +27 -0
  17. package/lib/client/i18n/navigation.js +41 -0
  18. package/lib/client/i18n/presentation.js +577 -0
  19. package/lib/client/i18n/python.js +36 -0
  20. package/lib/client/i18n/semantic.js +441 -0
  21. package/lib/client/input-context.js +21 -0
  22. package/lib/client/python-tool/card.js +35 -0
  23. package/lib/client/python-tool/execution-error.js +35 -0
  24. package/lib/client/python-tool/install.js +9 -0
  25. package/lib/client/python-tool/model.js +101 -0
  26. package/lib/client/right-tabs/install.js +535 -0
  27. package/lib/client/right-tabs/live-delivery.js +58 -0
  28. package/lib/client/right-tabs/navigation.js +47 -0
  29. package/lib/client/right-tabs/page.js +178 -0
  30. package/lib/client/right-tabs/styles.js +11 -0
  31. package/lib/client/rpc.js +5 -0
  32. package/lib/client/semantic-reference.js +10 -0
  33. package/lib/client/workspace-header-action.js +14 -1
  34. package/lib/client/workspace-shortcuts.js +26 -0
  35. package/lib/client.js +365 -242
  36. package/lib/compatibility.js +1 -1
  37. package/lib/datasource/authoring.js +43 -4
  38. package/lib/datasource/bridge-programs.js +23 -20
  39. package/lib/datasource/bridge.js +46 -3
  40. package/lib/datasource/changes-contract.js +41 -0
  41. package/lib/datasource/changes.js +49 -0
  42. package/lib/datasource/configure.js +39 -0
  43. package/lib/datasource/defaults.js +25 -0
  44. package/lib/datasource/index.js +2 -1
  45. package/lib/datasource/python-options.js +21 -0
  46. package/lib/datasource/python.js +116 -25
  47. package/lib/datasource/rpc.js +75 -13
  48. package/lib/datasource/service.js +286 -11
  49. package/lib/datasource/test.js +2 -1
  50. package/lib/disclosure/activation.js +19 -7
  51. package/lib/disclosure/execution-guidance.js +52 -0
  52. package/lib/disclosure/help.js +4 -1
  53. package/lib/environment/runtime.js +35 -34
  54. package/lib/environment/workspace.js +18 -1
  55. package/lib/lifecycle.js +33 -0
  56. package/lib/plugin-agents.js +154 -0
  57. package/lib/plugin.js +94 -172
  58. package/lib/presentation/asset.js +34 -0
  59. package/lib/presentation/assets/portable.js +14 -14
  60. package/lib/presentation/assets/static.js +344 -73
  61. package/lib/presentation/build/index.js +3 -2
  62. package/lib/presentation/commit.js +19 -12
  63. package/lib/presentation/contracts/asset-path.js +9 -0
  64. package/lib/presentation/contracts/catalog.js +62 -0
  65. package/lib/presentation/contracts/charts.js +0 -23
  66. package/lib/presentation/contracts/index.js +17 -5
  67. package/lib/presentation/contracts/types.js +1 -1
  68. package/lib/presentation/delivery.js +45 -30
  69. package/lib/presentation/export-html.js +214 -0
  70. package/lib/presentation/files.js +4 -5
  71. package/lib/presentation/projection/index.js +2 -1
  72. package/lib/presentation/projection/program.js +2 -9
  73. package/lib/presentation/projection/sql-code.js +13 -13
  74. package/lib/presentation/reports.js +114 -17
  75. package/lib/presentation/rpc.js +96 -58
  76. package/lib/presentation/tool.js +6 -10
  77. package/lib/report-publishing/adapters.js +111 -0
  78. package/lib/report-publishing/config.js +69 -0
  79. package/lib/report-publishing/service.js +180 -0
  80. package/lib/rpc.js +49 -0
  81. package/lib/semantic-browser/contracts.js +17 -0
  82. package/lib/semantic-browser/program.js +10 -0
  83. package/lib/semantic-browser/service.js +40 -6
  84. package/lib/semantic-reference/bridge.js +10 -1
  85. package/lib/semantic-reference/contracts.js +20 -6
  86. package/lib/semantic-reference/environment.js +56 -0
  87. package/lib/semantic-reference/labels.js +16 -0
  88. package/lib/semantic-reference/rpc.js +39 -18
  89. package/lib/semantic-reference/search.js +5 -4
  90. package/lib/semantic-reference/usage.js +12 -3
  91. package/lib/tool-lifecycle.js +22 -0
  92. package/lib/types/client/credentials/changes.d.ts +9 -0
  93. package/lib/types/client/credentials/create-datasource.d.ts +3 -1
  94. package/lib/types/client/credentials/credential-draft.d.ts +14 -0
  95. package/lib/types/client/credentials/defaults.d.ts +2 -0
  96. package/lib/types/client/credentials/descriptions.d.ts +1 -0
  97. package/lib/types/client/credentials/install.d.ts +19 -1
  98. package/lib/types/client/credentials/model.d.ts +31 -11
  99. package/lib/types/client/credentials/report-publishing.d.ts +5 -0
  100. package/lib/types/client/credentials/styles.d.ts +1 -1
  101. package/lib/types/client/i18n/context.d.ts +17 -0
  102. package/lib/types/client/i18n/copy.d.ts +806 -0
  103. package/lib/types/client/i18n/credentials.d.ts +475 -0
  104. package/lib/types/client/i18n/host.d.ts +16 -0
  105. package/lib/types/client/i18n/navigation.d.ts +41 -0
  106. package/lib/types/client/i18n/presentation.d.ts +577 -0
  107. package/lib/types/client/i18n/python.d.ts +19 -0
  108. package/lib/types/client/i18n/semantic.d.ts +441 -0
  109. package/lib/types/client/input-context.d.ts +19 -0
  110. package/lib/types/client/presentation/ask-dsh.d.ts +4 -8
  111. package/lib/types/client/presentation/catalog-model.d.ts +24 -0
  112. package/lib/types/client/presentation/catalog.d.ts +20 -0
  113. package/lib/types/client/presentation/chart-tooltip.d.ts +2 -2
  114. package/lib/types/client/presentation/context-reference.d.ts +12 -0
  115. package/lib/types/client/presentation/copy-context.d.ts +2 -2
  116. package/lib/types/client/presentation/delivery-model.d.ts +27 -6
  117. package/lib/types/client/presentation/delivery.d.ts +8 -7
  118. package/lib/types/client/presentation/download.d.ts +2 -0
  119. package/lib/types/client/presentation/export-menu.d.ts +26 -0
  120. package/lib/types/client/presentation/export-view.d.ts +63 -0
  121. package/lib/types/client/presentation/host-entry.d.ts +8 -2
  122. package/lib/types/client/presentation/icons.d.ts +1 -1
  123. package/lib/types/client/presentation/model.d.ts +14 -15
  124. package/lib/types/client/presentation/reader.d.ts +15 -2
  125. package/lib/types/client/presentation/reference-source.d.ts +9 -0
  126. package/lib/types/client/presentation/source-code-model.d.ts +2 -1
  127. package/lib/types/client/presentation/source-code.d.ts +0 -5
  128. package/lib/types/client/presentation/source-dialog.d.ts +1 -2
  129. package/lib/types/client/presentation/sources.d.ts +5 -5
  130. package/lib/types/client/presentation/styles.d.ts +1 -1
  131. package/lib/types/client/presentation/table.d.ts +5 -1
  132. package/lib/types/client/python-tool/card.d.ts +2 -0
  133. package/lib/types/client/python-tool/execution-error.d.ts +3 -0
  134. package/lib/types/client/python-tool/install.d.ts +2 -0
  135. package/lib/types/client/python-tool/model.d.ts +20 -0
  136. package/lib/types/client/right-tabs/install.d.ts +18 -0
  137. package/lib/types/client/right-tabs/live-delivery.d.ts +8 -0
  138. package/lib/types/client/right-tabs/navigation.d.ts +17 -0
  139. package/lib/types/client/right-tabs/page.d.ts +36 -0
  140. package/lib/types/client/right-tabs/styles.d.ts +2 -0
  141. package/lib/types/client/rpc.d.ts +3 -0
  142. package/lib/types/client/semantic-reference.d.ts +4 -0
  143. package/lib/types/client/workspace-header-action.d.ts +1 -1
  144. package/lib/types/client/workspace-shortcuts.d.ts +15 -0
  145. package/lib/types/client.d.ts +6 -3
  146. package/lib/types/compatibility.d.ts +1 -1
  147. package/lib/types/datasource/authoring.d.ts +10 -0
  148. package/lib/types/datasource/bridge.d.ts +23 -2
  149. package/lib/types/datasource/changes-contract.d.ts +18 -0
  150. package/lib/types/datasource/changes.d.ts +15 -0
  151. package/lib/types/datasource/configure.d.ts +7 -0
  152. package/lib/types/datasource/defaults.d.ts +7 -0
  153. package/lib/types/datasource/index.d.ts +6 -1
  154. package/lib/types/datasource/python-options.d.ts +9 -0
  155. package/lib/types/datasource/python.d.ts +17 -2
  156. package/lib/types/datasource/rpc.d.ts +2 -1
  157. package/lib/types/datasource/service.d.ts +48 -5
  158. package/lib/types/datasource/test.d.ts +1 -1
  159. package/lib/types/disclosure/activation.d.ts +2 -1
  160. package/lib/types/disclosure/execution-guidance.d.ts +6 -0
  161. package/lib/types/disclosure/help.d.ts +1 -1
  162. package/lib/types/environment/types.d.ts +2 -1
  163. package/lib/types/environment/workspace.d.ts +1 -0
  164. package/lib/types/lifecycle.d.ts +8 -0
  165. package/lib/types/plugin-agents.d.ts +27 -0
  166. package/lib/types/plugin.d.ts +12 -28
  167. package/lib/types/presentation/asset.d.ts +6 -0
  168. package/lib/types/presentation/build/index.d.ts +7 -2
  169. package/lib/types/presentation/commit.d.ts +1 -1
  170. package/lib/types/presentation/contracts/asset-path.d.ts +2 -0
  171. package/lib/types/presentation/contracts/catalog.d.ts +27 -0
  172. package/lib/types/presentation/contracts/charts.d.ts +0 -2
  173. package/lib/types/presentation/contracts/types.d.ts +7 -4
  174. package/lib/types/presentation/delivery.d.ts +1 -1
  175. package/lib/types/presentation/export-html.d.ts +13 -0
  176. package/lib/types/presentation/reports.d.ts +6 -1
  177. package/lib/types/presentation/rpc.d.ts +3 -2
  178. package/lib/types/presentation/tool.d.ts +2 -2
  179. package/lib/types/report-publishing/adapters.d.ts +6 -0
  180. package/lib/types/report-publishing/config.d.ts +22 -0
  181. package/lib/types/report-publishing/service.d.ts +68 -0
  182. package/lib/types/rpc.d.ts +3 -0
  183. package/lib/types/semantic-browser/contracts.d.ts +7 -0
  184. package/lib/types/semantic-browser/service.d.ts +7 -1
  185. package/lib/types/semantic-reference/bridge.d.ts +1 -0
  186. package/lib/types/semantic-reference/contracts.d.ts +5 -2
  187. package/lib/types/semantic-reference/environment.d.ts +22 -0
  188. package/lib/types/semantic-reference/labels.d.ts +16 -0
  189. package/lib/types/semantic-reference/rpc.d.ts +1 -1
  190. package/lib/types/semantic-reference/search.d.ts +1 -1
  191. package/lib/types/tool-lifecycle.d.ts +4 -0
  192. package/lib/types/workspace-identity.d.ts +6 -0
  193. package/lib/workspace-identity.js +9 -0
  194. package/package.json +83 -61
  195. package/python/presentation-kit/dist/dsh_data_analysis_presentation_kit-1.1.0-py3-none-any.whl +0 -0
  196. package/skills/dsh-data-analysis-files/SKILL.md +32 -0
  197. package/skills/dsh-data-analysis-files/references/examples.md +93 -0
  198. package/skills/dsh-data-analysis-presentation/SKILL.md +10 -6
  199. package/skills/dsh-data-analysis-presentation/references/examples/artifact.draft.json +13 -4
  200. package/skills/dsh-data-analysis-presentation/references/examples/charts.draft.json +3 -2
  201. package/skills/dsh-data-analysis-presentation/references/examples/comparison.draft.json +3 -2
  202. package/skills/dsh-data-analysis-presentation/references/examples/computed-sources.draft.json +12 -5
  203. package/skills/dsh-data-analysis-presentation/references/examples/computed.draft.json +3 -2
  204. package/skills/dsh-data-analysis-presentation/references/examples/interaction.draft.json +3 -2
  205. package/skills/dsh-data-analysis-presentation/references/examples/source-only.draft.json +12 -4
  206. package/skills/dsh-data-analysis-presentation/references/examples.md +3 -1
  207. package/skills/dsh-data-analysis-presentation/references/export-html.md +7 -0
  208. package/skills/dsh-data-analysis-presentation/references/interaction.md +1 -1
  209. package/skills/dsh-data-analysis-presentation/references/narrative.md +1 -1
  210. package/skills/dsh-data-analysis-presentation/references/publishing.md +3 -0
  211. package/skills/dsh-data-analysis-presentation/references/schema.md +25 -1
  212. package/lib/types/client/presentation/install.d.ts +0 -15
@@ -0,0 +1,15 @@
1
+ import type { SessionSnapshot } from '@deepseek-ai/dsh-api-session-controller/client';
2
+ import { type ConversationSnapshot } from '@deepseek-ai/dsh-client-ui-conversation/client';
3
+ export declare const workspaceDirectories: {
4
+ readonly datasources: "marivo.credentials.datasources-and-credentials";
5
+ readonly semantic: "marivo.navigation.semantic-layer";
6
+ readonly reports: "marivo.presentation.reports";
7
+ };
8
+ export type WorkspaceDirectory = keyof typeof workspaceDirectories;
9
+ /** Only the Host's blank phase exposes preparation actions; drafts are untouched. */
10
+ export declare function WorkspaceShortcuts({ session, conversation, disabled, open, }: {
11
+ session?: SessionSnapshot;
12
+ conversation?: ConversationSnapshot;
13
+ disabled: boolean;
14
+ open: (page: WorkspaceDirectory) => void;
15
+ }): import("react").JSX.Element | null;
@@ -1,7 +1,10 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
+ import { inject, installRightTabs } from './client/right-tabs/install.tsx';
2
3
  export { marivoPresentationDeliveryDefinition, parsePresentationDurableContent, presentationDeliveryFromEvent, presentationsForNode, } from './client/presentation/delivery.ts';
3
4
  export { PresentationDeliveryModel } from './client/presentation/delivery-model.ts';
4
5
  export { HostPresentationReader } from './client/presentation/host-entry.tsx';
5
- export { installPresentation, PresentationCards, PresentationOverlay, } from './client/presentation/install.tsx';
6
- export declare const inject: string[];
7
- export declare function apply(ctx: Context): void;
6
+ export { inject };
7
+ export declare function apply(ctx: Context, options?: {
8
+ diagnostics?: boolean;
9
+ onInstalled?: (controller: ReturnType<typeof installRightTabs>) => void;
10
+ }): void;
@@ -17,7 +17,7 @@ export interface DshDataAnalysisCompatibility {
17
17
  /** The package semver and the compatibility contract shipped in this exact installation. */
18
18
  export declare const PLUGIN_VERSION: string;
19
19
  export declare const DSH_DATA_ANALYSIS_COMPATIBILITY: DshDataAnalysisCompatibility;
20
- /** Every DSH peer is required and must use this one verified release. */
20
+ /** Every DSH peer is required and must satisfy this declared compatibility range. */
21
21
  export declare const DSH_PEER_RANGE: string;
22
22
  export declare const DSH_DISTRIBUTION: "@deepseek-ai/dsh";
23
23
  export declare const DSH_PEER_DEPENDENCIES: Readonly<{
@@ -18,6 +18,16 @@ export declare const datasourceAuthoringSchema: z.ZodObject<{
18
18
  }, z.core.$strip>>;
19
19
  }, z.core.$strip>;
20
20
  export type DatasourceAuthoring = z.infer<typeof datasourceAuthoringSchema>;
21
+ export interface DatasourceConfiguration {
22
+ name: string;
23
+ backend: string;
24
+ fields: Record<string, unknown>;
25
+ version: string;
26
+ }
27
+ export interface DatasourceUpdateInput extends DatasourceCreateInput {
28
+ name: string;
29
+ version: string;
30
+ }
21
31
  export interface DatasourceCreateInput {
22
32
  backend: string;
23
33
  fields: Record<string, unknown>;
@@ -1,7 +1,7 @@
1
- import type { JsonValue } from '@deepseek-ai/dsh-session';
1
+ import type { JsonValue } from '@deepseek-ai/dsh-util-values';
2
2
  import type { MarivoBridgeSource } from '../environment/source.ts';
3
3
  import type { MarivoCheckedRunner, MarivoEnvironmentBinding } from '../environment/types.ts';
4
- import { type DatasourceAuthoring, type DatasourceCreateInput } from './authoring.ts';
4
+ import { type DatasourceAuthoring, type DatasourceConfiguration, type DatasourceCreateInput, type DatasourceUpdateInput } from './authoring.ts';
5
5
  interface JsonObject {
6
6
  [key: string]: JsonValue;
7
7
  }
@@ -40,11 +40,20 @@ export interface MarivoDatasourceTestResult {
40
40
  }
41
41
  export interface MarivoDatasourceBridgePort {
42
42
  readonly binding: Readonly<MarivoEnvironmentBinding>;
43
+ remove?(description: Readonly<MarivoDatasourceDescription>, signal?: AbortSignal): Promise<{
44
+ name?: string;
45
+ error?: string;
46
+ }>;
43
47
  authoring?(signal?: AbortSignal): Promise<DatasourceAuthoring>;
44
48
  create?(input: DatasourceCreateInput, signal?: AbortSignal): Promise<{
45
49
  name?: string;
46
50
  error?: string;
47
51
  }>;
52
+ configuration?(name: string, signal?: AbortSignal): Promise<DatasourceConfiguration>;
53
+ update?(input: DatasourceUpdateInput, signal?: AbortSignal): Promise<{
54
+ name?: string;
55
+ error?: string;
56
+ }>;
48
57
  describe(name: string, signal?: AbortSignal): Promise<MarivoDatasourceDescription>;
49
58
  inventory(signal?: AbortSignal): Promise<MarivoDatasourceDescription[]>;
50
59
  test(description: Readonly<MarivoDatasourceDescription>, values: Readonly<Record<string, string>>, signal?: AbortSignal): Promise<MarivoDatasourceTestResult>;
@@ -58,11 +67,23 @@ export declare class MarivoDatasourceBridge {
58
67
  readonly binding: Readonly<MarivoEnvironmentBinding>;
59
68
  constructor(runner: MarivoCheckedRunner);
60
69
  authoring(signal?: AbortSignal): Promise<DatasourceAuthoring>;
70
+ configuration(name: string, signal?: AbortSignal): Promise<DatasourceConfiguration>;
71
+ update(input: DatasourceUpdateInput, signal?: AbortSignal): Promise<{
72
+ name?: string;
73
+ error?: string;
74
+ }>;
61
75
  create(input: DatasourceCreateInput, signal?: AbortSignal): Promise<{
62
76
  name?: string;
63
77
  error?: string;
64
78
  }>;
65
79
  describe(name: string, signal?: AbortSignal): Promise<MarivoDatasourceDescription>;
80
+ remove(description: Readonly<MarivoDatasourceDescription>, signal?: AbortSignal): Promise<{
81
+ error: string;
82
+ name?: undefined;
83
+ } | {
84
+ name: string;
85
+ error?: undefined;
86
+ }>;
66
87
  inventory(signal?: AbortSignal): Promise<MarivoDatasourceDescription[]>;
67
88
  test(description: Readonly<MarivoDatasourceDescription>, values: Readonly<Record<string, string>>, signal?: AbortSignal): Promise<MarivoDatasourceTestResult>;
68
89
  }
@@ -0,0 +1,18 @@
1
+ import type { TypertRemoteContribution } from '@deepseek-ai/dsh-typert-protocol';
2
+ import type { TypertContribution } from '@deepseek-ai/dsh-typert-registry';
3
+ import { z } from 'zod';
4
+ export declare const CREDENTIAL_CHANGES_SERVICE = "dshDataAnalysisCredentials";
5
+ export declare const credentialRevisionSchema: z.ZodObject<{
6
+ generation: z.ZodString;
7
+ cursor: z.ZodString;
8
+ }, z.core.$strict>;
9
+ export type CredentialRevision = z.infer<typeof credentialRevisionSchema>;
10
+ export declare const credentialChangesHost: TypertContribution;
11
+ export declare const credentialChangesRemote: TypertRemoteContribution;
12
+ declare module '@deepseek-ai/dsh-typert-protocol' {
13
+ interface TypertRemoteNamespaceMap {
14
+ dshDataAnalysisCredentials: {
15
+ changes(sessionId: string, signal?: AbortSignal): AsyncIterable<CredentialRevision>;
16
+ };
17
+ }
18
+ }
@@ -0,0 +1,15 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
3
+ import { type CredentialRevision } from './changes-contract.ts';
4
+ import { type MarivoCredentialService } from './service.ts';
5
+ /** Reuses the Host's logical stream carrier; credentials and waiting calls keep their owner. */
6
+ export declare class CredentialChangesService extends TypertRemoteService {
7
+ private readonly credentials;
8
+ private readonly lifetime;
9
+ private readonly tasks;
10
+ private closing?;
11
+ constructor(ctx: Context, credentials: Pick<MarivoCredentialService, 'waitWatch'>);
12
+ changes(sessionId: string, caller: AbortSignal): AsyncIterable<CredentialRevision>;
13
+ private snapshot;
14
+ close(): Promise<void>;
15
+ }
@@ -0,0 +1,7 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ import { type ToolDefinition } from '@deepseek-ai/dsh-tools';
3
+ import { type MarivoDatasourceBridgeSource } from './bridge.ts';
4
+ import type { MarivoCredentialService } from './service.ts';
5
+ export declare const MARIVO_DATASOURCE_CONFIGURE_TOOL_NAME = "marivo_datasource_configure";
6
+ export declare function createMarivoDatasourceConfigureTool(source: MarivoDatasourceBridgeSource, service: MarivoCredentialService): ToolDefinition;
7
+ export declare function registerMarivoDatasourceConfigureTool(ctx: Context, source: MarivoDatasourceBridgeSource, service: MarivoCredentialService): () => Promise<void>;
@@ -0,0 +1,7 @@
1
+ import type { DatasourceAuthoring } from './authoring.ts';
2
+ export type DatasourceDefaults = Record<string, Record<string, unknown>>;
3
+ export type DatasourceAuthoringView = DatasourceAuthoring & {
4
+ creationDefaults?: DatasourceDefaults;
5
+ };
6
+ /** Validate against this Workspace's live Runtime; never include config values in errors. */
7
+ export declare function withDatasourceDefaults(schema: DatasourceAuthoring, configured: unknown): DatasourceAuthoringView;
@@ -1,6 +1,11 @@
1
+ export type { DatasourceConfiguration, DatasourceUpdateInput } from './authoring.ts';
1
2
  export type { MarivoDatasourceBridgePort, MarivoDatasourceBridgeSource, MarivoDatasourceDescription, MarivoDatasourceFailure, MarivoDatasourceInventoryBridge, MarivoDatasourceInventoryBridgeSource, MarivoDatasourceRepair, MarivoDatasourceTestResult, } from './bridge.ts';
2
3
  export { MarivoDatasourceBridge, resolveMarivoDatasourceBridge, resolveMarivoDatasourceInventoryBridge, } from './bridge.ts';
3
- export { registerMarivoPythonTool } from './python.ts';
4
+ export { createMarivoDatasourceConfigureTool, MARIVO_DATASOURCE_CONFIGURE_TOOL_NAME, registerMarivoDatasourceConfigureTool, } from './configure.ts';
5
+ export type { MarivoPythonExecutionSummary } from './python.ts';
6
+ export { MarivoPythonExecutionError, registerMarivoPythonTool } from './python.ts';
7
+ export type { MarivoPythonOptions } from './python-options.ts';
8
+ export type { ConfigurationRequestView, ConfigurationResult, DatasourceConfigureInput, } from './service.ts';
4
9
  export { MarivoCredentialService } from './service.ts';
5
10
  export { assertMarivoCredentialReferences, MARIVO_CREDENTIAL_STORAGE_PREFIX, marivoCredentialStorageRef, } from './shell-env.ts';
6
11
  export { createMarivoDatasourceTestTool, MARIVO_DATASOURCE_TEST_TOOL_NAME, registerMarivoDatasourceTestTool, } from './test.ts';
@@ -0,0 +1,9 @@
1
+ export declare const DEFAULT_PYTHON_TIMEOUT_MS = 120000;
2
+ export declare const DEFAULT_PYTHON_MAX_TIMEOUT_MS = 600000;
3
+ export interface MarivoPythonOptions {
4
+ pythonTimeoutMs?: number;
5
+ pythonMaxTimeoutMs?: number;
6
+ }
7
+ /** Do not echo rejected inputs: tool arguments and configuration are not trusted diagnostics. */
8
+ export declare function pythonTimeout(value: unknown, name: string): number;
9
+ export declare function resolvePythonOptions(options: MarivoPythonOptions): Required<MarivoPythonOptions>;
@@ -1,4 +1,19 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
2
  import { type MarivoDatasourceBridgeSource } from './bridge.ts';
3
- import type { MarivoCredentialService } from './service.ts';
4
- export declare function registerMarivoPythonTool(ctx: Context, source: MarivoDatasourceBridgeSource, service: MarivoCredentialService): () => void;
3
+ import { type MarivoPythonOptions } from './python-options.ts';
4
+ import { type MarivoCredentialService } from './service.ts';
5
+ export interface MarivoPythonExecutionSummary {
6
+ phase: 'preparing' | 'executing' | 'capturing-code';
7
+ reason: 'not-started' | 'succeeded' | 'nonzero-exit' | 'timed-out' | 'cancelled' | 'unknown';
8
+ requestedTimeoutMs: number | null;
9
+ effectiveTimeoutMs: number | null;
10
+ elapsedMs: number;
11
+ executionElapsedMs: number | null;
12
+ nextAction: string | null;
13
+ }
14
+ /** The message survives Harness error normalization; it contains only safe adapter facts. */
15
+ export declare class MarivoPythonExecutionError extends Error {
16
+ readonly execution: MarivoPythonExecutionSummary;
17
+ constructor(message: string, execution: MarivoPythonExecutionSummary);
18
+ }
19
+ export declare function registerMarivoPythonTool(ctx: Context, source: MarivoDatasourceBridgeSource, service: MarivoCredentialService, options?: MarivoPythonOptions): () => Promise<void>;
@@ -1,4 +1,5 @@
1
1
  import type { HostConnectionHandle } from '@deepseek-ai/dsh-client-connection';
2
2
  import type { MarivoDatasourceBridgePort } from './bridge.ts';
3
+ import { type DatasourceDefaults } from './defaults.ts';
3
4
  import { type MarivoCredentialService } from './service.ts';
4
- export declare function registerCredentialRpc(connection: HostConnectionHandle, service: MarivoCredentialService, workspace: (id: string) => Promise<MarivoDatasourceBridgePort>): () => Promise<void>;
5
+ export declare function registerCredentialRpc(connection: HostConnectionHandle, service: MarivoCredentialService, workspace: (id: string) => Promise<MarivoDatasourceBridgePort>, datasourceDefaults?: DatasourceDefaults): () => Promise<void>;
@@ -1,12 +1,12 @@
1
1
  import type { Agent } from '@deepseek-ai/dsh-agent';
2
2
  import { type CredentialProvider } from '@deepseek-ai/dsh-credentials';
3
- import type { JsonValue } from '@deepseek-ai/dsh-session';
4
3
  import type { ToolExecution } from '@deepseek-ai/dsh-tools';
5
- import type { DatasourceCreateInput } from './authoring.ts';
4
+ import type { JsonValue } from '@deepseek-ai/dsh-util-values';
5
+ import type { DatasourceCreateInput, DatasourceUpdateInput } from './authoring.ts';
6
6
  import type { MarivoDatasourceBridgePort, MarivoDatasourceDescription, MarivoDatasourceTestResult } from './bridge.ts';
7
7
  export declare const CREDENTIAL_CHANNEL = "/dsh-data-analysis-credentials";
8
8
  export type CredentialStore = Pick<CredentialProvider, 'describe' | 'resolve' | 'set' | 'unset'>;
9
- export type CredentialAction = 'save' | 'update' | 'delete' | 'test' | 'submit' | 'diagnose';
9
+ export type CredentialAction = 'save' | 'update' | 'delete' | 'delete-datasource' | 'test' | 'submit' | 'diagnose';
10
10
  export interface CredentialContextView {
11
11
  token: string;
12
12
  workspaceId: string;
@@ -31,16 +31,49 @@ export interface CredentialRequestView {
31
31
  id: string;
32
32
  sessionId: string;
33
33
  context: CredentialContextView;
34
- status: 'awaiting-input' | 'executing' | 'awaiting-decision' | 'succeeded' | 'handed-off' | 'call-ended' | 'context-changed';
34
+ status: 'awaiting-input' | 'executing' | 'awaiting-decision' | 'succeeded' | 'handed-off' | 'call-ended' | 'cancelled' | 'context-changed';
35
35
  failure?: MarivoDatasourceTestResult;
36
36
  endedAt?: number;
37
37
  }
38
+ export interface DatasourceConfigureInput {
39
+ mode: 'create' | 'edit';
40
+ name?: string;
41
+ reason: string;
42
+ }
43
+ export interface ConfigurationRequestView extends Omit<CredentialRequestView, 'context'> {
44
+ configuration: DatasourceConfigureInput;
45
+ workspaceId: string;
46
+ context?: CredentialContextView;
47
+ }
48
+ interface PendingConfiguration {
49
+ view: ConfigurationRequestView;
50
+ settled: boolean;
51
+ controller: AbortController;
52
+ exec: ToolExecution;
53
+ resolve: () => Promise<MarivoDatasourceBridgePort>;
54
+ fingerprint: string;
55
+ sessionIdentity: string;
56
+ signal: AbortSignal;
57
+ finish: (value: ConfigurationResult) => void;
58
+ stop: () => void;
59
+ }
60
+ export interface ConfigurationResult {
61
+ status: 'ok' | 'failed' | 'cancelled' | 'call-ended' | 'context-changed' | 'needs-configuration';
62
+ name?: string;
63
+ latency_ms?: number | null;
64
+ failure?: MarivoDatasourceTestResult['failure'];
65
+ repair?: MarivoDatasourceTestResult['repair'];
66
+ }
38
67
  export interface CredentialOperationView {
39
68
  id: string;
40
69
  scope: string;
41
70
  action: CredentialAction;
42
71
  status: 'running' | 'succeeded' | 'failed' | 'cancelled';
43
- phase: 'saving' | 'validating' | 'settled';
72
+ phase: 'saving' | 'removing' | 'validating' | 'settled';
73
+ deleteCredentials?: boolean;
74
+ datasourceRemoved?: boolean;
75
+ deletedCredentials?: string[];
76
+ credentialDeleteFailures?: string[];
44
77
  saved: string[];
45
78
  errors: string[];
46
79
  result?: MarivoDatasourceTestResult;
@@ -81,17 +114,25 @@ export declare class MarivoCredentialService {
81
114
  createDatasource(generation: string, fingerprint: string, input: DatasourceCreateInput, resolve: () => Promise<MarivoDatasourceBridgePort>, caller: AbortSignal): Promise<{
82
115
  name: string;
83
116
  }>;
117
+ updateDatasource(generation: string, fingerprint: string, input: DatasourceUpdateInput, resolve: () => Promise<MarivoDatasourceBridgePort>, caller: AbortSignal): Promise<{
118
+ name: string;
119
+ }>;
120
+ configure(exec: ToolExecution, resolve: () => Promise<MarivoDatasourceBridgePort>, input: DatasourceConfigureInput): Promise<ConfigurationResult>;
121
+ configurationRequest(id: string, workspaceId: string, resolve: () => Promise<MarivoDatasourceBridgePort>, caller: AbortSignal): Promise<PendingConfiguration>;
122
+ selectConfiguration(id: string, workspaceId: string, name: string, resolve: () => Promise<MarivoDatasourceBridgePort>, caller: AbortSignal): Promise<ConfigurationRequestView>;
84
123
  prepare(_kind: 'test', exec: ToolExecution, resolve: () => Promise<MarivoDatasourceBridgePort>, name: string): Promise<MarivoDatasourceTestResult | CredentialNeedsInput>;
85
124
  prepareExecution(exec: ToolExecution, resolve: () => Promise<MarivoDatasourceBridgePort>, names: string[]): Promise<PreparedCredentialExecution | CredentialNeedsInput | MarivoDatasourceTestResult>;
86
125
  watch(sessionId: string, cursor?: string): {
87
126
  generation: string;
88
127
  cursor: string;
89
128
  requests: CredentialRequestView[];
129
+ configurationRequests: ConfigurationRequestView[];
90
130
  };
91
131
  waitWatch(sessionId: string, cursor: string | undefined, signal: AbortSignal): Promise<{
92
132
  generation: string;
93
133
  cursor: string;
94
134
  requests: CredentialRequestView[];
135
+ configurationRequests: ConfigurationRequestView[];
95
136
  }>;
96
137
  operation(generation: string, id: string, scope: string): CredentialOperationView | undefined;
97
138
  start(input: {
@@ -103,6 +144,7 @@ export declare class MarivoCredentialService {
103
144
  requestId?: string;
104
145
  changes?: Record<string, string>;
105
146
  reference?: string;
147
+ deleteCredentials?: boolean;
106
148
  }): CredentialOperationView;
107
149
  cancelOperation(generation: string, id: string, scope: string): void;
108
150
  cancelRequest(id: string): void;
@@ -110,3 +152,4 @@ export declare class MarivoCredentialService {
110
152
  track<T>(task: Promise<T>): Promise<T>;
111
153
  close(): Promise<void>;
112
154
  }
155
+ export {};
@@ -4,6 +4,6 @@ import { type MarivoDatasourceBridgeSource } from './bridge.ts';
4
4
  import type { MarivoCredentialService } from './service.ts';
5
5
  export declare const MARIVO_DATASOURCE_TEST_TOOL_NAME = "marivo_datasource_test";
6
6
  export declare function createMarivoDatasourceTestTool(source: MarivoDatasourceBridgeSource, service: MarivoCredentialService): ToolDefinition;
7
- export declare function registerMarivoDatasourceTestTool(ctx: Context, source: MarivoDatasourceBridgeSource, service: MarivoCredentialService): () => void;
7
+ export declare function registerMarivoDatasourceTestTool(ctx: Context, source: MarivoDatasourceBridgeSource, service: MarivoCredentialService): () => Promise<void>;
8
8
  /** Preserve the datasource tools' public status family; raw Marivo results stay inside the service. */
9
9
  export declare function datasourceToolValue(result: Awaited<ReturnType<MarivoCredentialService['prepare']>>): any;
@@ -63,11 +63,12 @@ export declare class MarivoDisclosureController {
63
63
  constructor(agent: Agent, bridgeSource: MarivoHelpBridgeSource, options?: MarivoDisclosureOptions);
64
64
  get activeSkills(): readonly MarivoSkillName[];
65
65
  telemetry(): MarivoDisclosureTelemetry;
66
- addDisposer(disposer: () => void): void;
66
+ addDisposer(disposer: () => unknown): void;
67
67
  observeToolResult(exec: Readonly<ToolExecution>, result: Readonly<ToolExecutionResult>): void;
68
68
  resolveDelivery(query: Readonly<MarivoHelpDeliveryQuery>): MarivoHelpDelivery;
69
69
  prepareStep(messages: readonly UserMessage[], signal: AbortSignal): Promise<UserMessage[]>;
70
70
  dispose(): void;
71
+ close(): Promise<void>;
71
72
  }
72
73
  /** Install skill-triggered Marivo live-help disclosure for one Agent scope. */
73
74
  export declare function installMarivoDisclosure(_ctx: Context, agent: Agent, bridgeSource: MarivoHelpBridgeSource, options?: MarivoDisclosureOptions): MarivoDisclosureController;
@@ -0,0 +1,6 @@
1
+ import type { Agent } from '@deepseek-ai/dsh-agent';
2
+ import type { MarivoDisclosureController } from './activation.ts';
3
+ export declare const MARIVO_DATASOURCE_CREDENTIAL_PROMPT: string;
4
+ export declare const MARIVO_ANALYSIS_CLOSEOUT_PROMPT: string;
5
+ /** Full-plugin seam: requires its execution tools, credentials service and system sections. */
6
+ export declare function installMarivoExecutionGuidance(agent: Agent, controller: MarivoDisclosureController): () => void;
@@ -61,4 +61,4 @@ export declare function readMarivoHelpTargets(bridge: MarivoHelpBridgePort, rawT
61
61
  /** Build the native Harness ToolDefinition without registering Agent activation behavior. */
62
62
  export declare function createMarivoHelpTool(bridgeSource: MarivoHelpBridgeSource, limitOverrides?: Partial<MarivoHelpLimits>, resolveDelivery?: MarivoHelpDeliveryResolver): ToolDefinition;
63
63
  /** Register the focused Help Tool; skill-triggered root disclosure is composed separately. */
64
- export declare function registerMarivoHelpTool(ctx: Context, bridgeSource: MarivoHelpBridgeSource, limits?: Partial<MarivoHelpLimits>, resolveDelivery?: MarivoHelpDeliveryResolver): () => void;
64
+ export declare function registerMarivoHelpTool(ctx: Context, bridgeSource: MarivoHelpBridgeSource, limits?: Partial<MarivoHelpLimits>, resolveDelivery?: MarivoHelpDeliveryResolver): () => Promise<void>;
@@ -7,7 +7,8 @@ export interface MarivoEnvironmentConfig {
7
7
  export interface SharedMarivoRuntimeConfig {
8
8
  runtimeRoot?: string;
9
9
  pythonExecutable?: string;
10
- uvExecutable?: string;
10
+ /** Absolute local Python for venv creation; defaults to python3 (Windows: python). */
11
+ bootstrapPythonExecutable?: string;
11
12
  installTimeoutMs?: number;
12
13
  }
13
14
  /** Validated identity and stable skill root of the shared Marivo installation. */
@@ -6,5 +6,6 @@ export declare class MarivoWorkspaceEnvironmentManager {
6
6
  readonly runtime: SharedMarivoRuntime;
7
7
  constructor(runtime: SharedMarivoRuntime);
8
8
  resolve(projectRoot: string): Promise<MarivoEnvironment>;
9
+ close(): Promise<void>;
9
10
  dispose(): void;
10
11
  }
@@ -0,0 +1,8 @@
1
+ /** Tracks owned work, including work whose caller stopped waiting after cancellation. */
2
+ export declare class PendingTasks {
3
+ #private;
4
+ track<T>(task: Promise<T>): Promise<T>;
5
+ drain(): Promise<void>;
6
+ }
7
+ /** Start every stop synchronously, then await every cleanup even if another one fails. */
8
+ export declare function finishCleanup(actions: readonly (() => unknown)[]): Promise<void>;
@@ -0,0 +1,27 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ import type { Agent } from '@deepseek-ai/dsh-agent';
3
+ import { type MarivoPythonOptions } from './datasource/python-options.ts';
4
+ import { type CredentialStore, MarivoCredentialService } from './datasource/service.ts';
5
+ import type { MarivoHelpBridgeSource } from './disclosure/bridge.ts';
6
+ import { type MarivoDisclosureOptions } from './disclosure/index.ts';
7
+ import { MarivoEnvironment } from './environment/index.ts';
8
+ import type { ReportPublishingService } from './report-publishing/service.ts';
9
+ export type MarivoPluginEnvironmentResolver = (agent: Agent) => MarivoEnvironment | Promise<MarivoEnvironment>;
10
+ /**
11
+ * Install one already-bound environment into every live or subsequently published Agent scope.
12
+ * Installation is transactional for existing Agents and is disposed with the Cordis plugin.
13
+ */
14
+ export declare function createMarivoAgentInstallation(ctx: Context, environmentOrResolver: MarivoEnvironment | MarivoPluginEnvironmentResolver, options?: MarivoDisclosureOptions & MarivoPythonOptions & {
15
+ /** Override used by focused tests; normal plugin installation uses ctx.credentials. */
16
+ reportPublishing?: ReportPublishingService;
17
+ credentials?: CredentialStore;
18
+ credentialService?: MarivoCredentialService;
19
+ credentialInteraction?: 'web' | 'none';
20
+ /** Runtime-scoped Help source; normal plugin installation never binds Help to a Workspace. */
21
+ helpBridgeSource?: MarivoHelpBridgeSource;
22
+ }): {
23
+ install(): void;
24
+ close: () => Promise<void>;
25
+ };
26
+ /** Stops synchronously; the returned Promise also waits for all owned work. */
27
+ export declare function installMarivoPlugin(...args: Parameters<typeof createMarivoAgentInstallation>): () => Promise<void>;
@@ -1,18 +1,20 @@
1
- /** Cordis lifecycle adapter for the Web-profile shared Marivo Runtime. */
1
+ import { type ReportPublishingConfig } from './report-publishing/config.ts';
2
+ export { installMarivoPlugin, type MarivoPluginEnvironmentResolver } from './plugin-agents.ts';
3
+ export { resolvePresentationWorkspace } from './workspace-identity.ts';
2
4
  import type { Context } from '@deepseek-ai/cordis';
3
- import type { Agent } from '@deepseek-ai/dsh-agent';
4
5
  import z from '@deepseek-ai/schemastery';
5
- import { type CredentialStore, MarivoCredentialService } from './datasource/service.ts';
6
- import { type MarivoHelpBridgeSource } from './disclosure/bridge.ts';
7
- import { type MarivoDisclosureOptions } from './disclosure/index.ts';
8
- import { MarivoEnvironment } from './environment/index.ts';
6
+ import type { DatasourceDefaults } from './datasource/defaults.ts';
7
+ import { type MarivoPythonOptions } from './datasource/python-options.ts';
8
+ export { MARIVO_DATASOURCE_CREDENTIAL_PROMPT } from './disclosure/execution-guidance.ts';
9
9
  /** Cordis plugin name used by loader diagnostics and lifecycle logs. */
10
10
  export declare const name = "dsh-data-analysis";
11
11
  /** Services that must exist before the plugin binds and watches Agent scopes. */
12
12
  export declare const inject: string[];
13
- export declare const MARIVO_DATASOURCE_CREDENTIAL_PROMPT: string;
14
13
  /** Loader-safe configuration for the shared Runtime and per-Workspace bindings. */
15
- export interface Config {
14
+ export interface Config extends MarivoPythonOptions {
15
+ readonly reportPublishing?: ReportPublishingConfig;
16
+ /** Non-secret creation defaults by backend; checked against each live Runtime schema. */
17
+ readonly datasourceDefaults?: DatasourceDefaults;
16
18
  readonly credentialInteraction?: 'web' | 'none';
17
19
  /** Explicit project root override; otherwise each Agent uses session.header.cwd. */
18
20
  readonly projectRoot?: string;
@@ -20,30 +22,12 @@ export interface Config {
20
22
  readonly pythonExecutable?: string;
21
23
  /** Shared Runtime root; defaults below $DSH_HOME. */
22
24
  readonly runtimeRoot?: string;
23
- /** Local uv executable; an explicit value must be absolute. */
24
- readonly uvExecutable?: string;
25
+ /** Local Python used to create the managed venv; an explicit value must be absolute. */
26
+ readonly bootstrapPythonExecutable?: string;
25
27
  /** Maximum time for installation and lock acquisition. */
26
28
  readonly installTimeoutMs?: number;
27
29
  }
28
30
  /** Cordis loader schema. Runtime defaults are resolved in {@link apply}. */
29
31
  export declare const Config: z<Config>;
30
- export type MarivoPluginEnvironmentResolver = (agent: Agent) => MarivoEnvironment | Promise<MarivoEnvironment>;
31
- /**
32
- * Install one already-bound environment into every live or subsequently published Agent scope.
33
- * Installation is transactional for existing Agents and is disposed with the Cordis plugin.
34
- */
35
- export declare function installMarivoPlugin(ctx: Context, environmentOrResolver: MarivoEnvironment | MarivoPluginEnvironmentResolver, options?: MarivoDisclosureOptions & {
36
- /** Override used by focused tests; normal plugin installation uses ctx.credentials. */
37
- credentials?: CredentialStore;
38
- credentialService?: MarivoCredentialService;
39
- credentialInteraction?: 'web' | 'none';
40
- /** Runtime-scoped Help source; normal plugin installation never binds Help to a Workspace. */
41
- helpBridgeSource?: MarivoHelpBridgeSource;
42
- }): () => void;
43
- /** Resolve only Harness-owned, header-validated Workspace membership; never infer it from a path. */
44
- export declare function resolvePresentationWorkspace(ctx: Context, sessionId: string): {
45
- id: string;
46
- path: string;
47
- };
48
32
  /** Ensure the shared Runtime once, mount its skills, then bind each Workspace lazily. */
49
33
  export declare function apply(ctx: Context, config?: Config): Promise<() => Promise<void>>;
@@ -0,0 +1,6 @@
1
+ import { type PresentationAsset, type PresentationReceipt } from './contracts/index.ts';
2
+ /** Read a fixed, receipt-verified snapshot; never access analysis or current. */
3
+ export declare function readReceiptAsset(root: string, workspaceId: string, receipt: PresentationReceipt, asset: PresentationAsset, signal: AbortSignal): Promise<{
4
+ bytes: Buffer<ArrayBufferLike>;
5
+ sha256: string;
6
+ }>;
@@ -2,10 +2,15 @@ import { type PresentationDocument } from '../contracts/index.ts';
2
2
  export interface BuiltPresentation {
3
3
  document: PresentationDocument;
4
4
  documentBytes: Buffer;
5
- htmlBytes: Buffer;
5
+ htmlBytes?: Buffer;
6
6
  }
7
7
  /**
8
8
  * Render an S2 snapshot without reading source data, generating identity, or writing files.
9
9
  * Both renderers are built into the installed package; execution needs no build tooling.
10
10
  */
11
- export declare function buildPresentation(value: PresentationDocument): Promise<BuiltPresentation>;
11
+ export declare function buildPresentation(value: PresentationDocument): Promise<BuiltPresentation & {
12
+ htmlBytes: Buffer;
13
+ }>;
14
+ export declare function buildPresentation(value: PresentationDocument, options: {
15
+ html?: boolean;
16
+ }): Promise<BuiltPresentation>;
@@ -1,4 +1,4 @@
1
1
  import type { BuiltPresentation } from './build/index.ts';
2
2
  import { type PresentationReceipt } from './contracts/index.ts';
3
- /** Owns only one newly-created build. A single directory rename publishes both complete files. */
3
+ /** Owns only one newly-created build. A single directory rename publishes all requested complete files. */
4
4
  export declare function commitPresentation(workspaceRoot: string, input: BuiltPresentation, assertOwner: () => Promise<void>, signal?: AbortSignal): Promise<PresentationReceipt>;
@@ -0,0 +1,2 @@
1
+ import type { PresentationAsset } from './types.ts';
2
+ export declare function presentationAssetRelativePath(reportId: string, buildId: string, asset: PresentationAsset): string;
@@ -0,0 +1,27 @@
1
+ import { type PresentationReceipt } from './index.ts';
2
+ export interface PublicationSource {
3
+ kind: 'agent' | 'reader';
4
+ sessionId: string | null;
5
+ }
6
+ export interface ReportVersion {
7
+ receipt: PresentationReceipt;
8
+ publishedAt: string | null;
9
+ source: PublicationSource | null;
10
+ }
11
+ export interface ReportHistory {
12
+ workspaceId: string;
13
+ reportId: string;
14
+ currentBuildId: string;
15
+ legacyHistoryUnavailable: boolean;
16
+ versions: ReportVersion[];
17
+ }
18
+ export interface ReportCatalog {
19
+ workspaceId: string;
20
+ reports: ReportVersion[];
21
+ unavailable: number;
22
+ }
23
+ export declare const REPORT_HISTORY_BYTES: number;
24
+ export declare const REPORT_HISTORY_LIMIT = 4096;
25
+ export declare function parseReportVersion(value: unknown): ReportVersion;
26
+ export declare function parseReportHistory(value: unknown): ReportHistory;
27
+ export declare function parseReportCatalog(value: unknown): ReportCatalog;
@@ -1,12 +1,10 @@
1
1
  import { type ChartType, type ChartView, type TypedDataset } from './types.ts';
2
2
  export type { ChartBindings, ChartOptions, ChartType, ChartView } from './types.ts';
3
3
  export declare const CHART_TYPES: readonly ["line", "area", "stackedArea", "sparkline", "bar", "horizontalBar", "stackedBar", "stackedBar100", "horizontalStackedBar", "horizontalStackedBar100", "histogram", "boxPlot", "scatter", "heatmap", "pie", "leaderboard", "funnel", "waterfall"];
4
- export declare const CHART_LABELS: Record<ChartType, string>;
5
4
  /** Strictly validates one binding. A containing block handles id/kind/preparedViews. */
6
5
  export declare function parseChartViewShape(value: unknown, path?: string): asserts value is ChartView;
7
6
  /** Exact source columns, including every auxiliary field used by geometry or tooltip. */
8
7
  export declare function chartColumns(view: ChartView): string[];
9
- export declare function chartSeriesFields(view: ChartView): string[];
10
8
  /** Verifies supplied values only: never bins, ranks, accumulates, normalizes or sorts. */
11
9
  export declare function validateChartView(view: ChartView, dataset: TypedDataset, path?: string, dataPath?: string, rowIndices?: readonly number[]): void;
12
10
  /** Changes geometry only. Statistical views must be declared with prepared bindings. */
@@ -1,7 +1,7 @@
1
1
  /** Pure presentation data. No Marivo schema, Node runtime or Host imports. */
2
2
  import type { PythonCodeRef, PythonCodeSnippet } from '../../python-execution-contracts.ts';
3
3
  export type { PythonCodeRef, PythonCodeSnippet } from '../../python-execution-contracts.ts';
4
- export declare const PRESENTATION_SCHEMA_VERSION: 2;
4
+ export declare const PRESENTATION_SCHEMA_VERSION: 3;
5
5
  export declare const PRESENTATION_BUDGETS: {
6
6
  readonly documentBytes: number;
7
7
  readonly draftBytes: number;
@@ -203,8 +203,10 @@ export interface PresentationInteraction {
203
203
  filters: PresentationFilter[];
204
204
  slices: PresentationSlice[];
205
205
  }
206
+ export type PresentationLocale = 'zh-CN' | 'en-US';
206
207
  export interface PresentationDraft {
207
- schemaVersion: 1;
208
+ schemaVersion: 2;
209
+ locale: PresentationLocale;
208
210
  title: string;
209
211
  datasets: DraftDataset[];
210
212
  sources: DeclaredSource[];
@@ -217,7 +219,8 @@ export interface PresentationDiagnostic {
217
219
  message: string;
218
220
  }
219
221
  export interface PresentationDocument {
220
- schemaVersion: 2;
222
+ schemaVersion: 3;
223
+ locale: PresentationLocale;
221
224
  reportId: string;
222
225
  workspaceId: string;
223
226
  buildId: string;
@@ -247,6 +250,6 @@ export interface PresentationReceipt {
247
250
  summary: string;
248
251
  files: {
249
252
  document: PresentationFile<'presentation.json'>;
250
- html: PresentationFile<'index.html'>;
253
+ html?: PresentationFile<'index.html'>;
251
254
  };
252
255
  }
@@ -1,3 +1,3 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
2
  /** Persist the same envelope on nested Code dispatch even when code discards the return value. */
3
- export declare function installMarivoPresentationCodeDelivery(ctx: Context): () => void;
3
+ export declare function installMarivoPresentationCodeDelivery(ctx: Context): () => Promise<void>;