@chengxianglibra/dsh-data-analysis 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/README.md +83 -34
  2. package/lib/bin/environment.js +1 -1
  3. package/lib/bin/presentation-lint.js +21 -0
  4. package/lib/bridges.js +2 -2
  5. package/lib/client/credentials/create-datasource.js +67 -0
  6. package/lib/client/credentials/install.js +191 -0
  7. package/lib/client/credentials/model.js +494 -0
  8. package/lib/client/credentials/styles.js +17 -0
  9. package/lib/client/workspace-header-action.js +11 -0
  10. package/lib/client.js +1133 -736
  11. package/lib/compatibility.js +1 -1
  12. package/lib/datasource/authoring.js +70 -0
  13. package/lib/datasource/bridge-programs.js +30 -18
  14. package/lib/datasource/bridge.js +100 -8
  15. package/lib/datasource/index.js +3 -2
  16. package/lib/datasource/python.js +115 -0
  17. package/lib/datasource/resolver-program.js +112 -0
  18. package/lib/datasource/rpc.js +88 -0
  19. package/lib/datasource/service.js +687 -0
  20. package/lib/datasource/shell-env.js +2 -333
  21. package/lib/datasource/test.js +24 -51
  22. package/lib/environment/binding.js +54 -9
  23. package/lib/environment/runtime.js +89 -78
  24. package/lib/environment/subprocess.js +6 -1
  25. package/lib/environment/summary.js +3 -3
  26. package/lib/environment/workspace.js +5 -0
  27. package/lib/index.js +1 -1
  28. package/lib/plugin.js +168 -51
  29. package/lib/presentation/assets/portable.js +606 -0
  30. package/lib/presentation/assets/static.js +945 -0
  31. package/lib/presentation/build/index.js +71 -0
  32. package/lib/presentation/commit.js +156 -0
  33. package/lib/presentation/contracts/charts.js +476 -0
  34. package/lib/presentation/contracts/editing.js +58 -0
  35. package/lib/presentation/contracts/index.js +651 -0
  36. package/lib/presentation/contracts/interaction.js +62 -0
  37. package/lib/presentation/contracts/types.js +15 -0
  38. package/lib/presentation/contracts/values.js +28 -0
  39. package/lib/presentation/delivery.js +56 -0
  40. package/lib/presentation/files.js +83 -0
  41. package/lib/presentation/index.js +6 -0
  42. package/lib/presentation/lint.js +46 -0
  43. package/lib/presentation/projection/files.js +85 -0
  44. package/lib/presentation/projection/index.js +195 -0
  45. package/lib/presentation/projection/program.js +144 -0
  46. package/lib/presentation/projection/sql-code.js +79 -0
  47. package/lib/presentation/receipt.js +34 -0
  48. package/lib/presentation/reports.js +122 -0
  49. package/lib/presentation/rpc.js +148 -0
  50. package/lib/presentation/tool.js +122 -0
  51. package/lib/python-execution-contracts.js +1 -0
  52. package/lib/python-execution.js +232 -0
  53. package/lib/semantic-browser/contracts.js +80 -0
  54. package/lib/semantic-browser/definition.js +64 -0
  55. package/lib/semantic-browser/program.js +119 -0
  56. package/lib/semantic-browser/service.js +72 -0
  57. package/lib/semantic-reference/bridge.js +118 -0
  58. package/lib/semantic-reference/contracts.js +113 -0
  59. package/lib/semantic-reference/index.js +3 -0
  60. package/lib/semantic-reference/rpc.js +122 -0
  61. package/lib/semantic-reference/search.js +94 -0
  62. package/lib/semantic-reference/usage.js +143 -0
  63. package/lib/types/bridges.d.ts +2 -2
  64. package/lib/types/client/credentials/create-datasource.d.ts +5 -0
  65. package/lib/types/client/credentials/install.d.ts +1 -0
  66. package/lib/types/client/credentials/model.d.ts +59 -0
  67. package/lib/types/client/credentials/styles.d.ts +1 -0
  68. package/lib/types/client/presentation/ask-dsh.d.ts +9 -0
  69. package/lib/types/client/presentation/chart-explorer.d.ts +12 -0
  70. package/lib/types/client/presentation/chart-geometry.d.ts +30 -0
  71. package/lib/types/client/presentation/chart-renderer.d.ts +10 -0
  72. package/lib/types/client/presentation/chart-specials.d.ts +10 -0
  73. package/lib/types/client/presentation/chart-styles.d.ts +1 -0
  74. package/lib/types/client/presentation/chart-tooltip.d.ts +13 -0
  75. package/lib/types/client/presentation/chart-view.d.ts +23 -0
  76. package/lib/types/client/presentation/copy-context.d.ts +5 -0
  77. package/lib/types/client/presentation/delivery-model.d.ts +54 -0
  78. package/lib/types/client/presentation/delivery.d.ts +77 -0
  79. package/lib/types/client/presentation/editor-controls.d.ts +12 -0
  80. package/lib/types/client/presentation/global-filters.d.ts +6 -0
  81. package/lib/types/client/presentation/host-entry.d.ts +12 -0
  82. package/lib/types/client/presentation/icons.d.ts +4 -0
  83. package/lib/types/client/presentation/install.d.ts +15 -0
  84. package/lib/types/client/presentation/markdown.d.ts +5 -0
  85. package/lib/types/client/presentation/model.d.ts +62 -0
  86. package/lib/types/client/presentation/reader.d.ts +11 -0
  87. package/lib/types/client/presentation/source-code-model.d.ts +16 -0
  88. package/lib/types/client/presentation/source-code.d.ts +11 -0
  89. package/lib/types/client/presentation/source-dialog.d.ts +13 -0
  90. package/lib/types/client/presentation/source-facts.d.ts +20 -0
  91. package/lib/types/client/presentation/source-format.d.ts +5 -0
  92. package/lib/types/client/presentation/source-highlight.d.ts +7 -0
  93. package/lib/types/client/presentation/sources.d.ts +13 -0
  94. package/lib/types/client/presentation/styles.d.ts +1 -0
  95. package/lib/types/client/presentation/table.d.ts +12 -0
  96. package/lib/types/client/presentation/use-element-width.d.ts +5 -0
  97. package/lib/types/client/workspace-header-action.d.ts +7 -0
  98. package/lib/types/client.d.ts +4 -122
  99. package/lib/types/compatibility.d.ts +2 -2
  100. package/lib/types/datasource/authoring.d.ts +25 -0
  101. package/lib/types/datasource/bridge.d.ts +21 -3
  102. package/lib/types/datasource/index.d.ts +3 -5
  103. package/lib/types/datasource/python.d.ts +4 -0
  104. package/lib/types/datasource/resolver-program.d.ts +6 -0
  105. package/lib/types/datasource/rpc.d.ts +4 -0
  106. package/lib/types/datasource/service.d.ts +112 -0
  107. package/lib/types/datasource/shell-env.d.ts +0 -29
  108. package/lib/types/datasource/test.d.ts +6 -29
  109. package/lib/types/environment/binding.d.ts +5 -1
  110. package/lib/types/environment/errors.d.ts +1 -1
  111. package/lib/types/environment/runtime.d.ts +5 -5
  112. package/lib/types/environment/types.d.ts +13 -2
  113. package/lib/types/index.d.ts +1 -1
  114. package/lib/types/plugin.d.ts +11 -5
  115. package/lib/types/presentation/build/index.d.ts +11 -0
  116. package/lib/types/presentation/commit.d.ts +4 -0
  117. package/lib/types/presentation/contracts/charts.d.ts +13 -0
  118. package/lib/types/presentation/contracts/editing.d.ts +8 -0
  119. package/lib/types/presentation/contracts/index.d.ts +11 -0
  120. package/lib/types/presentation/contracts/interaction.d.ts +8 -0
  121. package/lib/types/presentation/contracts/types.d.ts +252 -0
  122. package/lib/types/presentation/contracts/values.d.ts +9 -0
  123. package/lib/types/presentation/delivery.d.ts +3 -0
  124. package/lib/types/presentation/files.d.ts +7 -0
  125. package/lib/types/presentation/index.d.ts +6 -0
  126. package/lib/types/presentation/lint.d.ts +13 -0
  127. package/lib/types/presentation/projection/files.d.ts +2 -0
  128. package/lib/types/presentation/projection/index.d.ts +20 -0
  129. package/lib/types/presentation/projection/program.d.ts +2 -0
  130. package/lib/types/presentation/projection/sql-code.d.ts +2 -0
  131. package/lib/types/presentation/receipt.d.ts +14 -0
  132. package/lib/types/presentation/reports.d.ts +5 -0
  133. package/lib/types/presentation/rpc.d.ts +24 -0
  134. package/lib/types/presentation/tool.d.ts +12 -0
  135. package/lib/types/python-execution-contracts.d.ts +10 -0
  136. package/lib/types/python-execution.d.ts +10 -0
  137. package/lib/types/semantic-browser/contracts.d.ts +40 -0
  138. package/lib/types/semantic-browser/definition.d.ts +20 -0
  139. package/lib/types/semantic-browser/program.d.ts +2 -0
  140. package/lib/types/semantic-browser/service.d.ts +20 -0
  141. package/lib/types/semantic-reference/bridge.d.ts +11 -0
  142. package/lib/types/semantic-reference/contracts.d.ts +51 -0
  143. package/lib/types/semantic-reference/index.d.ts +3 -0
  144. package/lib/types/semantic-reference/rpc.d.ts +15 -0
  145. package/lib/types/semantic-reference/search.d.ts +10 -0
  146. package/lib/types/semantic-reference/usage.d.ts +43 -0
  147. package/package.json +43 -19
  148. package/python/presentation-kit/dist/dsh_data_analysis_presentation_kit-1.1.0-py3-none-any.whl +0 -0
  149. package/skills/dsh-data-analysis-presentation/SKILL.md +24 -0
  150. package/skills/dsh-data-analysis-presentation/references/chart-examples.md +18 -0
  151. package/skills/dsh-data-analysis-presentation/references/charts.md +55 -0
  152. package/skills/dsh-data-analysis-presentation/references/examples/artifact.draft.json +27 -0
  153. package/skills/dsh-data-analysis-presentation/references/examples/charts-bins.dataset.json +33 -0
  154. package/skills/dsh-data-analysis-presentation/references/examples/charts-boxes.dataset.json +45 -0
  155. package/skills/dsh-data-analysis-presentation/references/examples/charts-composition.dataset.json +33 -0
  156. package/skills/dsh-data-analysis-presentation/references/examples/charts-funnel.dataset.json +27 -0
  157. package/skills/dsh-data-analysis-presentation/references/examples/charts-precision.dataset.json +21 -0
  158. package/skills/dsh-data-analysis-presentation/references/examples/charts-series.dataset.json +58 -0
  159. package/skills/dsh-data-analysis-presentation/references/examples/charts-shares.dataset.json +33 -0
  160. package/skills/dsh-data-analysis-presentation/references/examples/charts-waterfall.dataset.json +44 -0
  161. package/skills/dsh-data-analysis-presentation/references/examples/charts.draft.json +392 -0
  162. package/skills/dsh-data-analysis-presentation/references/examples/comparison-selected.dataset.json +24 -0
  163. package/skills/dsh-data-analysis-presentation/references/examples/comparison-summary.dataset.json +22 -0
  164. package/skills/dsh-data-analysis-presentation/references/examples/comparison.dataset.json +18 -0
  165. package/skills/dsh-data-analysis-presentation/references/examples/comparison.draft.json +79 -0
  166. package/skills/dsh-data-analysis-presentation/references/examples/computed-sources.draft.json +35 -0
  167. package/skills/dsh-data-analysis-presentation/references/examples/computed.dataset.json +12 -0
  168. package/skills/dsh-data-analysis-presentation/references/examples/computed.draft.json +57 -0
  169. package/skills/dsh-data-analysis-presentation/references/examples/interaction-detail.dataset.json +30 -0
  170. package/skills/dsh-data-analysis-presentation/references/examples/interaction-summary.dataset.json +22 -0
  171. package/skills/dsh-data-analysis-presentation/references/examples/interaction.draft.json +278 -0
  172. package/skills/dsh-data-analysis-presentation/references/examples/source-only.draft.json +19 -0
  173. package/skills/dsh-data-analysis-presentation/references/examples/write-charts.py +73 -0
  174. package/skills/dsh-data-analysis-presentation/references/examples/write-comparison.py +42 -0
  175. package/skills/dsh-data-analysis-presentation/references/examples/write-computed.py +21 -0
  176. package/skills/dsh-data-analysis-presentation/references/examples/write-interaction.py +33 -0
  177. package/skills/dsh-data-analysis-presentation/references/examples.md +42 -0
  178. package/skills/dsh-data-analysis-presentation/references/interaction.md +56 -0
  179. package/skills/dsh-data-analysis-presentation/references/narrative.md +37 -0
  180. package/skills/dsh-data-analysis-presentation/references/schema.md +138 -0
  181. package/lib/datasource/access.js +0 -60
  182. package/lib/datasource/credentials.js +0 -24
  183. package/lib/evidence/bridge-program.js +0 -153
  184. package/lib/evidence/bridge.js +0 -166
  185. package/lib/evidence/index.js +0 -2
  186. package/lib/evidence/sources.js +0 -263
  187. package/lib/types/datasource/access.d.ts +0 -27
  188. package/lib/types/evidence/bridge.d.ts +0 -40
  189. package/lib/types/evidence/index.d.ts +0 -4
  190. package/lib/types/evidence/sources.d.ts +0 -57
  191. package/python/report-kit/dist/dsh_data_analysis_report_kit-3.0.0-py3-none-any.whl +0 -0
  192. package/skills/dsh-data-analysis-report/SKILL.md +0 -57
  193. package/skills/dsh-data-analysis-report/assets/marivo-artifact.js +0 -113
  194. package/skills/dsh-data-analysis-report/assets/marivo-session-dag.js +0 -1201
  195. package/skills/dsh-data-analysis-report/assets/report-data.js +0 -449
@@ -1,125 +1,7 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
- export declare const MARIVO_CREDENTIAL_STORAGE_PREFIX = "DSH_DATA_ANALYSIS_CREDENTIAL_";
3
- declare const EVIDENCE_SOURCES_META_KIND = "marivo-evidence-sources";
4
- declare const EVIDENCE_SOURCES_META_VERSION = 2;
5
- /** Browser-side copy of the Host mapping; contract tests keep both implementations identical. */
6
- export declare function marivoCredentialStorageRef(ref: string): string;
7
- export interface MarivoEvidenceSource {
8
- status: 'available' | 'missing' | 'unsupported';
9
- title: string;
10
- locator: string;
11
- excerpt: string | null;
12
- truncated: boolean;
13
- environmentFingerprint: string;
14
- sessionId: string;
15
- findingId: string;
16
- findingType: string | null;
17
- epistemicKind: string | null;
18
- artifactRef: string;
19
- canonicalItemKey: string | null;
20
- committedAt: string | null;
21
- sourceRefs: string[];
22
- revalidation: {
23
- status: string;
24
- semanticStatus: string | null;
25
- evidenceStatus: string | null;
26
- dependencyStatus: string | null;
27
- } | null;
28
- }
29
- export interface MarivoEvidenceSourcesMeta {
30
- readonly kind: typeof EVIDENCE_SOURCES_META_KIND;
31
- readonly version: typeof EVIDENCE_SOURCES_META_VERSION;
32
- readonly dshSessionId: string;
33
- readonly sources: readonly MarivoEvidenceSource[];
34
- }
35
- export interface MarivoEvidenceSourcesTurnDelivery {
36
- readonly seq: number;
37
- readonly sources: readonly MarivoEvidenceSource[];
38
- }
39
- export interface MarivoEvidenceSourcesTurnData {
40
- readonly deliveries: readonly MarivoEvidenceSourcesTurnDelivery[];
41
- }
42
- interface MarivoEvidenceSourcesTurnState {
43
- readonly turn: number;
44
- readonly calls: ReadonlyMap<string, string>;
45
- readonly deliveries: readonly MarivoEvidenceSourcesTurnDelivery[];
46
- }
47
- export interface MarivoEvidenceArtifactGroup {
48
- readonly key: string;
49
- readonly environmentFingerprint: string;
50
- readonly sessionId: string;
51
- readonly artifactRef: string;
52
- readonly sources: readonly MarivoEvidenceSource[];
53
- }
54
- declare module '@deepseek-ai/dsh-client-runtime/client' {
55
- interface ConversationTurnDataMap {
56
- /** Explicitly requested Marivo Evidence sources collected from this exact Turn. */
57
- 'marivo-evidence-sources-delivery': MarivoEvidenceSourcesTurnData;
58
- }
59
- }
60
- /** Parse the closed per-call source attachment persisted in Tool result metadata. */
61
- export declare function parseEvidenceSourcesMeta(value: unknown): MarivoEvidenceSourcesMeta | null;
62
- /** Decode the Code Mode-only source attachment from a durable sub-dispatch result. */
63
- export declare function parseEvidenceSourcesDurableContent(value: unknown): {
64
- readonly turn: number;
65
- readonly meta: MarivoEvidenceSourcesMeta;
66
- } | null;
67
- /** Recover one successful native or nested source attachment. */
68
- export declare function evidenceSourcesDeliveryFromEvent(event: any, calls?: ReadonlyMap<string, string>): MarivoEvidenceSourcesTurnDelivery | null;
69
- /** Aggregate explicit source attachments under one Harness-owned Turn key. */
70
- export declare const marivoEvidenceSourcesDeliveryDefinition: {
71
- kind: string;
72
- match(event: any): {
73
- id: string;
74
- role: string;
75
- } | null;
76
- start(_context: any, match: any): MarivoEvidenceSourcesTurnState;
77
- update(context: any, match: any): MarivoEvidenceSourcesTurnState;
78
- buildLocationData(context: any, scope: string): {
79
- kind: string;
80
- turn: any;
81
- key: string;
82
- value: {
83
- deliveries: any;
84
- };
85
- } | null;
86
- };
87
- /** Successful sources completed before this exact closing Assistant message. */
88
- export declare function evidenceSourcesForClosing(owner: any): readonly MarivoEvidenceSource[];
89
- export declare function selectMarivoEvidenceSources(owner: any): readonly MarivoEvidenceSource[] | null;
90
- /** Group source presentation only; this does not infer Evidence equivalence or compatibility. */
91
- export declare function groupMarivoEvidenceSources(sources: readonly MarivoEvidenceSource[]): readonly MarivoEvidenceArtifactGroup[];
92
- export interface NeedsCredentialsResult {
93
- status: 'needs-credentials';
94
- name: string;
95
- refs: string[];
96
- }
97
- export declare function parseNeedsCredentials(text: string): NeedsCredentialsResult | null;
98
- export declare function shouldAutoOpen(sessionId: string, callId: string, result: NeedsCredentialsResult | null): boolean;
99
- export declare function blankCredentialValues(refs: readonly string[]): Record<string, string>;
100
- export declare class CredentialDialogController {
101
- readonly api: any;
102
- constructor(api: any);
103
- describe(refs: readonly string[]): Promise<Record<string, {
104
- configured: boolean;
105
- }>>;
106
- inspect(refs: readonly string[]): Promise<{
107
- configured: Record<string, boolean>;
108
- missing: string[];
109
- shouldOpen: boolean;
110
- }>;
111
- save(values: Readonly<Record<string, string>>): Promise<{
112
- ok: boolean;
113
- saved: string[];
114
- errors: Record<string, string>;
115
- }>;
116
- }
117
- export declare function MarivoDatasourceTestToolView(props: any): import("react").JSX.Element;
118
- export declare function MarivoDatasourceAccessToolView(props: any): import("react").JSX.Element;
119
- export declare function MarivoEvidenceSourcesPanel({ matched: sources, t, }: {
120
- matched: readonly MarivoEvidenceSource[];
121
- t: (key: string, values?: Record<string, string>) => string;
122
- }): import("react").JSX.Element;
2
+ export { marivoPresentationDeliveryDefinition, parsePresentationDurableContent, presentationDeliveryFromEvent, presentationsForNode, } from './client/presentation/delivery.ts';
3
+ export { PresentationDeliveryModel } from './client/presentation/delivery-model.ts';
4
+ export { HostPresentationReader } from './client/presentation/host-entry.tsx';
5
+ export { installPresentation, PresentationCards, PresentationOverlay, } from './client/presentation/install.tsx';
123
6
  export declare const inject: string[];
124
7
  export declare function apply(ctx: Context): void;
125
- export {};
@@ -10,7 +10,7 @@ export interface DshDataAnalysisCompatibility {
10
10
  readonly packageSpec: string;
11
11
  };
12
12
  readonly contracts: {
13
- readonly runtimeInstallation: 'dsh-data-analysis-runtime/v2';
13
+ readonly runtimeInstallation: 'dsh-data-analysis-runtime/v3';
14
14
  readonly subprocessPolicy: 'direct-argv-inherited-env-snapshot-overlay-v2';
15
15
  };
16
16
  }
@@ -25,5 +25,5 @@ export declare const DSH_PEER_DEPENDENCIES: Readonly<{
25
25
  }>;
26
26
  export declare const MARIVO_VERSION: string;
27
27
  export declare const MARIVO_PACKAGE_SPEC: string;
28
- export declare const RUNTIME_INSTALLATION_VERSION: "dsh-data-analysis-runtime/v2";
28
+ export declare const RUNTIME_INSTALLATION_VERSION: "dsh-data-analysis-runtime/v3";
29
29
  export declare const SUBPROCESS_POLICY_VERSION: "direct-argv-inherited-env-snapshot-overlay-v2";
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ export declare const datasourceAuthoringSchema: z.ZodObject<{
3
+ fingerprint: z.ZodString;
4
+ backends: z.ZodArray<z.ZodObject<{
5
+ name: z.ZodString;
6
+ fields: z.ZodArray<z.ZodObject<{
7
+ name: z.ZodString;
8
+ type: z.ZodEnum<{
9
+ string: "string";
10
+ number: "number";
11
+ boolean: "boolean";
12
+ json: "json";
13
+ }>;
14
+ required: z.ZodBoolean;
15
+ description: z.ZodString;
16
+ default: z.ZodOptional<z.ZodUnknown>;
17
+ }, z.core.$strip>>;
18
+ }, z.core.$strip>>;
19
+ }, z.core.$strip>;
20
+ export type DatasourceAuthoring = z.infer<typeof datasourceAuthoringSchema>;
21
+ export interface DatasourceCreateInput {
22
+ backend: string;
23
+ fields: Record<string, unknown>;
24
+ }
25
+ export declare const DATASOURCE_AUTHORING_PROGRAM: string;
@@ -1,6 +1,7 @@
1
1
  import type { JsonValue } from '@deepseek-ai/dsh-session';
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
5
  interface JsonObject {
5
6
  [key: string]: JsonValue;
6
7
  }
@@ -13,7 +14,10 @@ export interface MarivoDatasourceFailure extends JsonObject {
13
14
  }
14
15
  export interface MarivoDatasourceRepair extends JsonObject {
15
16
  kind: string;
16
- help_target: string;
17
+ help_target: {
18
+ surface: string;
19
+ canonical_id: string | null;
20
+ };
17
21
  action: string;
18
22
  snippet: string | null;
19
23
  candidates: string[];
@@ -21,7 +25,11 @@ export interface MarivoDatasourceRepair extends JsonObject {
21
25
  }
22
26
  export interface MarivoDatasourceDescription {
23
27
  name: string;
28
+ backend?: string;
29
+ properties?: Record<string, JsonValue>;
24
30
  refs: string[];
31
+ fields: Record<string, string>;
32
+ definition: string;
25
33
  }
26
34
  export interface MarivoDatasourceTestResult {
27
35
  name: string;
@@ -32,9 +40,14 @@ export interface MarivoDatasourceTestResult {
32
40
  }
33
41
  export interface MarivoDatasourceBridgePort {
34
42
  readonly binding: Readonly<MarivoEnvironmentBinding>;
43
+ authoring?(signal?: AbortSignal): Promise<DatasourceAuthoring>;
44
+ create?(input: DatasourceCreateInput, signal?: AbortSignal): Promise<{
45
+ name?: string;
46
+ error?: string;
47
+ }>;
35
48
  describe(name: string, signal?: AbortSignal): Promise<MarivoDatasourceDescription>;
36
49
  inventory(signal?: AbortSignal): Promise<MarivoDatasourceDescription[]>;
37
- test(name: string, environmentOverlay: Readonly<NodeJS.ProcessEnv>, signal?: AbortSignal): Promise<MarivoDatasourceTestResult>;
50
+ test(description: Readonly<MarivoDatasourceDescription>, values: Readonly<Record<string, string>>, signal?: AbortSignal): Promise<MarivoDatasourceTestResult>;
38
51
  }
39
52
  export type MarivoDatasourceBridgeSource = MarivoBridgeSource<MarivoDatasourceBridgePort>;
40
53
  export type MarivoDatasourceInventoryBridge = Pick<MarivoDatasourceBridgePort, 'inventory'>;
@@ -44,9 +57,14 @@ export declare class MarivoDatasourceBridge {
44
57
  #private;
45
58
  readonly binding: Readonly<MarivoEnvironmentBinding>;
46
59
  constructor(runner: MarivoCheckedRunner);
60
+ authoring(signal?: AbortSignal): Promise<DatasourceAuthoring>;
61
+ create(input: DatasourceCreateInput, signal?: AbortSignal): Promise<{
62
+ name?: string;
63
+ error?: string;
64
+ }>;
47
65
  describe(name: string, signal?: AbortSignal): Promise<MarivoDatasourceDescription>;
48
66
  inventory(signal?: AbortSignal): Promise<MarivoDatasourceDescription[]>;
49
- test(name: string, environmentOverlay: Readonly<NodeJS.ProcessEnv>, signal?: AbortSignal): Promise<MarivoDatasourceTestResult>;
67
+ test(description: Readonly<MarivoDatasourceDescription>, values: Readonly<Record<string, string>>, signal?: AbortSignal): Promise<MarivoDatasourceTestResult>;
50
68
  }
51
69
  export declare function resolveMarivoDatasourceBridge(source: MarivoDatasourceBridgeSource): Promise<MarivoDatasourceBridgePort>;
52
70
  export declare function resolveMarivoDatasourceInventoryBridge(source: MarivoDatasourceInventoryBridgeSource): Promise<MarivoDatasourceInventoryBridge>;
@@ -1,8 +1,6 @@
1
- export type { MarivoDatasourceAccessOptions, MarivoDatasourceAccessValue, } from './access.ts';
2
- export { createMarivoDatasourceAccessTool, MARIVO_DATASOURCE_ACCESS_TOOL_NAME, registerMarivoDatasourceAccessTool, } from './access.ts';
3
1
  export type { MarivoDatasourceBridgePort, MarivoDatasourceBridgeSource, MarivoDatasourceDescription, MarivoDatasourceFailure, MarivoDatasourceInventoryBridge, MarivoDatasourceInventoryBridgeSource, MarivoDatasourceRepair, MarivoDatasourceTestResult, } from './bridge.ts';
4
2
  export { MarivoDatasourceBridge, resolveMarivoDatasourceBridge, resolveMarivoDatasourceInventoryBridge, } from './bridge.ts';
5
- export type { MarivoShellLeaseReceipt } from './shell-env.ts';
6
- export { assertMarivoCredentialReferences, DEFAULT_MARIVO_CREDENTIAL_LEASE_MAX_USES, DEFAULT_MARIVO_CREDENTIAL_LEASE_TTL_MS, MARIVO_CREDENTIAL_LEASE_PREFIX, MARIVO_CREDENTIAL_STORAGE_PREFIX, MarivoShellCredentialLeases, marivoCredentialStorageRef, } from './shell-env.ts';
7
- export type { MarivoDatasourceTestOptions, MarivoDatasourceTestValue, } from './test.ts';
3
+ export { registerMarivoPythonTool } from './python.ts';
4
+ export { MarivoCredentialService } from './service.ts';
5
+ export { assertMarivoCredentialReferences, MARIVO_CREDENTIAL_STORAGE_PREFIX, marivoCredentialStorageRef, } from './shell-env.ts';
8
6
  export { createMarivoDatasourceTestTool, MARIVO_DATASOURCE_TEST_TOOL_NAME, registerMarivoDatasourceTestTool, } from './test.ts';
@@ -0,0 +1,4 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
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;
@@ -0,0 +1,6 @@
1
+ /** Shared Python adapter. All inputs below arrive on a Host-owned pipe. */
2
+ export declare const RESOLVER_PROGRAM: string;
3
+ /** The worker checks the exact binding and enters scope before any user code. */
4
+ export declare const PYTHON_WORKER: string;
5
+ /** Capture raw fd output before Harness collection/spill, including driver writes. */
6
+ export declare const PYTHON_LAUNCHER: string;
@@ -0,0 +1,4 @@
1
+ import type { HostConnectionHandle } from '@deepseek-ai/dsh-client-connection';
2
+ import type { MarivoDatasourceBridgePort } from './bridge.ts';
3
+ import { type MarivoCredentialService } from './service.ts';
4
+ export declare function registerCredentialRpc(connection: HostConnectionHandle, service: MarivoCredentialService, workspace: (id: string) => Promise<MarivoDatasourceBridgePort>): () => Promise<void>;
@@ -0,0 +1,112 @@
1
+ import type { Agent } from '@deepseek-ai/dsh-agent';
2
+ import { type CredentialProvider } from '@deepseek-ai/dsh-credentials';
3
+ import type { JsonValue } from '@deepseek-ai/dsh-session';
4
+ import type { ToolExecution } from '@deepseek-ai/dsh-tools';
5
+ import type { DatasourceCreateInput } from './authoring.ts';
6
+ import type { MarivoDatasourceBridgePort, MarivoDatasourceDescription, MarivoDatasourceTestResult } from './bridge.ts';
7
+ export declare const CREDENTIAL_CHANNEL = "/dsh-data-analysis-credentials";
8
+ export type CredentialStore = Pick<CredentialProvider, 'describe' | 'resolve' | 'set' | 'unset'>;
9
+ export type CredentialAction = 'save' | 'update' | 'delete' | 'test' | 'submit' | 'diagnose';
10
+ export interface CredentialContextView {
11
+ token: string;
12
+ workspaceId: string;
13
+ name: string;
14
+ backend: string;
15
+ properties: Record<string, JsonValue>;
16
+ refs: string[];
17
+ fields: Record<string, string>;
18
+ version: string;
19
+ credentials: Record<string, {
20
+ configured: boolean;
21
+ source?: string;
22
+ writable: boolean;
23
+ }>;
24
+ lastTest?: {
25
+ at: number;
26
+ result: MarivoDatasourceTestResult;
27
+ stale: boolean;
28
+ };
29
+ }
30
+ export interface CredentialRequestView {
31
+ id: string;
32
+ sessionId: string;
33
+ context: CredentialContextView;
34
+ status: 'awaiting-input' | 'executing' | 'awaiting-decision' | 'succeeded' | 'handed-off' | 'call-ended' | 'context-changed';
35
+ failure?: MarivoDatasourceTestResult;
36
+ endedAt?: number;
37
+ }
38
+ export interface CredentialOperationView {
39
+ id: string;
40
+ scope: string;
41
+ action: CredentialAction;
42
+ status: 'running' | 'succeeded' | 'failed' | 'cancelled';
43
+ phase: 'saving' | 'validating' | 'settled';
44
+ saved: string[];
45
+ errors: string[];
46
+ result?: MarivoDatasourceTestResult;
47
+ endedAt?: number;
48
+ }
49
+ export interface CredentialNeedsInput {
50
+ status: 'needs-credentials';
51
+ name: string;
52
+ refs: string[];
53
+ }
54
+ export interface PreparedCredentialExecution {
55
+ status: 'ready';
56
+ values: Record<string, string>;
57
+ grants: Record<string, MarivoDatasourceDescription>;
58
+ bridge: MarivoDatasourceBridgePort;
59
+ signal: AbortSignal;
60
+ /** Call synchronously immediately before starting the resolved Shell request. */
61
+ assertCurrent: () => void;
62
+ /** Forget values and stop operation-scoped credential tracking. */
63
+ release: () => void;
64
+ }
65
+ export declare class CredentialServiceError extends Error {
66
+ readonly code: string;
67
+ constructor(code: string);
68
+ }
69
+ export declare function credentialError(error: unknown): string;
70
+ /** Owns only plugin operations and execution-scoped waits. No value cache or datasource registry. */
71
+ export declare class MarivoCredentialService {
72
+ #private;
73
+ readonly generation: `${string}-${string}-${string}-${string}-${string}`;
74
+ readonly interaction: 'web' | 'none';
75
+ readonly now: () => number;
76
+ constructor(store: CredentialStore, interaction?: 'web' | 'none', now?: () => number);
77
+ executionSignal(caller: AbortSignal, agent?: Agent): AbortSignal;
78
+ invalidateStorageRef(storageRef: string): void;
79
+ invalidate(refs: readonly string[]): void;
80
+ overview(workspaceId: string, resolve: () => Promise<MarivoDatasourceBridgePort>, caller: AbortSignal): Promise<CredentialContextView[]>;
81
+ createDatasource(generation: string, fingerprint: string, input: DatasourceCreateInput, resolve: () => Promise<MarivoDatasourceBridgePort>, caller: AbortSignal): Promise<{
82
+ name: string;
83
+ }>;
84
+ prepare(_kind: 'test', exec: ToolExecution, resolve: () => Promise<MarivoDatasourceBridgePort>, name: string): Promise<MarivoDatasourceTestResult | CredentialNeedsInput>;
85
+ prepareExecution(exec: ToolExecution, resolve: () => Promise<MarivoDatasourceBridgePort>, names: string[]): Promise<PreparedCredentialExecution | CredentialNeedsInput | MarivoDatasourceTestResult>;
86
+ watch(sessionId: string, cursor?: string): {
87
+ generation: string;
88
+ cursor: string;
89
+ requests: CredentialRequestView[];
90
+ };
91
+ waitWatch(sessionId: string, cursor: string | undefined, signal: AbortSignal): Promise<{
92
+ generation: string;
93
+ cursor: string;
94
+ requests: CredentialRequestView[];
95
+ }>;
96
+ operation(generation: string, id: string, scope: string): CredentialOperationView | undefined;
97
+ start(input: {
98
+ generation: string;
99
+ id: string;
100
+ scope: string;
101
+ action: CredentialAction;
102
+ version: string;
103
+ requestId?: string;
104
+ changes?: Record<string, string>;
105
+ reference?: string;
106
+ }): CredentialOperationView;
107
+ cancelOperation(generation: string, id: string, scope: string): void;
108
+ cancelRequest(id: string): void;
109
+ disposeAgent(agent: Agent): void;
110
+ track<T>(task: Promise<T>): Promise<T>;
111
+ close(): Promise<void>;
112
+ }
@@ -1,38 +1,9 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
- import type { Agent } from '@deepseek-ai/dsh-agent';
3
- import { type CredentialProvider } from '@deepseek-ai/dsh-credentials';
4
- import type { ToolExecution } from '@deepseek-ai/dsh-tools';
5
- import { type MarivoDatasourceBridgePort, type MarivoDatasourceBridgeSource } from './bridge.ts';
6
2
  export declare const MARIVO_CREDENTIAL_STORAGE_PREFIX = "DSH_DATA_ANALYSIS_CREDENTIAL_";
7
- export declare const MARIVO_CREDENTIAL_LEASE_PREFIX = "# dsh-marivo-credential-lease:";
8
- export declare const DEFAULT_MARIVO_CREDENTIAL_LEASE_TTL_MS: number;
9
- export declare const DEFAULT_MARIVO_CREDENTIAL_LEASE_MAX_USES = 64;
10
3
  type MarivoCredentialStorageRefName = `DSH_DATA_ANALYSIS_CREDENTIAL_${string}`;
11
- export interface MarivoShellLeaseReceipt {
12
- [key: string]: string | number;
13
- token: string;
14
- expires_in_ms: number;
15
- max_uses: number;
16
- usage: 'bounded-foreground-shell-lease';
17
- bash_prelude: string;
18
- pwsh_prelude: string;
19
- }
20
4
  /** Publish the exact shared interpreter as a non-secret, per-execution DSH fact. */
21
5
  export declare function registerMarivoRuntimeShellEnvironment(ctx: Context, pythonExecutable: string): () => void;
22
6
  /** Map one user-authored datasource environment reference to plugin-owned DSH storage. */
23
7
  export declare function marivoCredentialStorageRef(ref: string): MarivoCredentialStorageRefName;
24
8
  export declare function assertMarivoCredentialReferences(refs: readonly string[]): void;
25
- /** Own bounded leases and expose credential values only to each admitted Shell execution. */
26
- export declare class MarivoShellCredentialLeases {
27
- #private;
28
- constructor(ctx: Context, credentials: Pick<CredentialProvider, 'resolve'>, options?: {
29
- ttlMs?: number;
30
- maxUses?: number;
31
- });
32
- revokeLease(agent: Agent, bridge: MarivoDatasourceBridgePort, datasourceName: string): void;
33
- issueLease(agent: Agent, bridge: MarivoDatasourceBridgePort, datasourceName: string, refs: readonly string[]): MarivoShellLeaseReceipt;
34
- prepareExecution(agent: Agent, bridgeSource: MarivoDatasourceBridgeSource, execution: ToolExecution): Promise<boolean>;
35
- installAgent(agent: Agent, bridgeSource: MarivoDatasourceBridgeSource): () => void;
36
- dispose(): void;
37
- }
38
9
  export {};
@@ -1,32 +1,9 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
- import type { CredentialProvider } from '@deepseek-ai/dsh-credentials';
3
- import type { JsonValue } from '@deepseek-ai/dsh-session';
4
2
  import { type ToolDefinition } from '@deepseek-ai/dsh-tools';
5
- import { type MarivoDatasourceBridgePort, type MarivoDatasourceBridgeSource, type MarivoDatasourceFailure, type MarivoDatasourceRepair } from './bridge.ts';
3
+ import { type MarivoDatasourceBridgeSource } from './bridge.ts';
4
+ import type { MarivoCredentialService } from './service.ts';
6
5
  export declare const MARIVO_DATASOURCE_TEST_TOOL_NAME = "marivo_datasource_test";
7
- interface JsonObject {
8
- [key: string]: JsonValue;
9
- }
10
- export type MarivoDatasourceTestValue = ({
11
- status: 'needs-credentials';
12
- name: string;
13
- refs: string[];
14
- } & JsonObject) | ({
15
- status: 'ok';
16
- name: string;
17
- latency_ms: number | null;
18
- } & JsonObject) | ({
19
- status: 'failed';
20
- name: string;
21
- latency_ms: number | null;
22
- failure: MarivoDatasourceFailure;
23
- repair: MarivoDatasourceRepair;
24
- } & JsonObject);
25
- export interface MarivoDatasourceTestOptions {
26
- /** Explicit validation invalidates prior access for this Agent and datasource. */
27
- revokeShellLease(bridge: MarivoDatasourceBridgePort, name: string): void;
28
- }
29
- /** Build the scoped datasource connection-test Tool. */
30
- export declare function createMarivoDatasourceTestTool(bridgeSource: MarivoDatasourceBridgeSource, credentials: Pick<CredentialProvider, 'resolve'>, options: MarivoDatasourceTestOptions): ToolDefinition;
31
- export declare function registerMarivoDatasourceTestTool(ctx: Context, bridgeSource: MarivoDatasourceBridgeSource, credentials: Pick<CredentialProvider, 'resolve'>, options: MarivoDatasourceTestOptions): () => void;
32
- export {};
6
+ export declare function createMarivoDatasourceTestTool(source: MarivoDatasourceBridgeSource, service: MarivoCredentialService): ToolDefinition;
7
+ export declare function registerMarivoDatasourceTestTool(ctx: Context, source: MarivoDatasourceBridgeSource, service: MarivoCredentialService): () => void;
8
+ /** Preserve the datasource tools' public status family; raw Marivo results stay inside the service. */
9
+ export declare function datasourceToolValue(result: Awaited<ReturnType<MarivoCredentialService['prepare']>>): any;
@@ -16,11 +16,15 @@ export declare class MarivoEnvironment {
16
16
  assertImportIdentity(signal?: AbortSignal): Promise<ImportIdentity>;
17
17
  }
18
18
  /** Build an identity-checked Help runner directly from an admitted shared Runtime. */
19
- export declare function createSharedMarivoRuntimeRunner(runtime: Pick<SharedMarivoRuntime, 'runtimeRoot' | 'pythonExecutable' | 'marivoVersion' | 'packagePath'>, options?: {
19
+ export declare function createSharedMarivoRuntimeRunner(runtime: Pick<SharedMarivoRuntime, 'runtimeRoot' | 'pythonExecutable' | 'marivoVersion' | 'packagePath' | 'presentationKitVersion' | 'presentationKitPackagePath'>, options?: {
20
20
  environment?: NodeJS.ProcessEnv;
21
21
  }): MarivoEnvironment;
22
22
  /** Resolve, probe, and establish one Marivo Environment Binding. */
23
23
  export declare function bindMarivoEnvironment(config: MarivoEnvironmentConfig, options?: {
24
24
  environment?: NodeJS.ProcessEnv;
25
25
  signal?: AbortSignal;
26
+ presentationKit?: Readonly<{
27
+ version: string;
28
+ packagePath: string;
29
+ }>;
26
30
  }): Promise<MarivoEnvironment>;
@@ -1,4 +1,4 @@
1
- export type EnvironmentFailureCode = 'project-root-invalid' | 'python-path-relative' | 'python-unavailable' | 'shared-runtime-config-invalid' | 'shared-runtime-lock-timeout' | 'shared-runtime-install-failed' | 'shared-runtime-identity-mismatch' | 'shared-runtime-version-unsupported' | 'shared-runtime-pandas-unsupported' | 'shared-runtime-report-kit-unsupported' | 'shared-runtime-report-kit-wheel-invalid' | 'shared-runtime-report-kit-wheel-unavailable' | 'shared-runtime-package-unavailable' | 'shared-runtime-skills-invalid' | 'subprocess-start-failed' | 'subprocess-timeout' | 'subprocess-cancelled' | 'subprocess-output-limit' | 'subprocess-output-invalid' | 'subprocess-failed' | 'datasource-credential-ref-invalid' | 'datasource-credential-resolve-failed' | 'shell-credential-lease-invalid' | 'shell-credential-lease-expired' | 'shell-credential-lease-exhausted' | 'shell-credential-lease-scope-mismatch' | 'shell-credential-lease-resolve-failed' | 'shell-credential-injection-unsupported' | 'doctor-json-invalid' | 'doctor-admission-failed' | 'binding-identity-mismatch' | 'binding-failed';
1
+ export type EnvironmentFailureCode = 'project-root-invalid' | 'python-path-relative' | 'python-unavailable' | 'shared-runtime-config-invalid' | 'shared-runtime-lock-timeout' | 'shared-runtime-install-failed' | 'shared-runtime-identity-mismatch' | 'shared-runtime-version-unsupported' | 'shared-runtime-pandas-unsupported' | 'shared-runtime-presentation-kit-unsupported' | 'shared-runtime-presentation-kit-wheel-invalid' | 'shared-runtime-presentation-kit-wheel-unavailable' | 'shared-runtime-package-unavailable' | 'shared-runtime-skills-invalid' | 'subprocess-start-failed' | 'subprocess-timeout' | 'subprocess-cancelled' | 'subprocess-output-limit' | 'subprocess-output-invalid' | 'subprocess-failed' | 'datasource-credential-ref-invalid' | 'datasource-credential-resolve-failed' | 'shell-credential-lease-invalid' | 'shell-credential-lease-expired' | 'shell-credential-lease-exhausted' | 'shell-credential-lease-scope-mismatch' | 'shell-credential-lease-resolve-failed' | 'shell-credential-injection-unsupported' | 'doctor-json-invalid' | 'doctor-admission-failed' | 'binding-identity-mismatch' | 'binding-failed';
2
2
  /** Stable failure envelope for config, subprocess, doctor, and identity errors. */
3
3
  export declare class MarivoEnvironmentError extends Error {
4
4
  readonly code: EnvironmentFailureCode;
@@ -1,16 +1,16 @@
1
1
  import type { SharedMarivoRuntime, SharedMarivoRuntimeConfig } from './types.ts';
2
2
  export declare const SHARED_PYTHON_SPEC = "3.10";
3
3
  export declare const SHARED_MARIVO_PACKAGE_SPEC: string;
4
- export declare const REPORT_KIT_DISTRIBUTION = "dsh-data-analysis-report-kit";
5
- export declare const REPORT_KIT_VERSION = "3.0.0";
6
- export declare const REPORT_KIT_PANDAS_RANGE = ">=2.2.0,<3.0.0";
7
- export declare const REPORT_KIT_WHEEL_FILENAME = "dsh_data_analysis_report_kit-3.0.0-py3-none-any.whl";
4
+ export declare const PRESENTATION_KIT_DISTRIBUTION = "dsh-data-analysis-presentation-kit";
5
+ export declare const PRESENTATION_KIT_VERSION = "1.1.0";
6
+ export declare const PRESENTATION_KIT_PANDAS_RANGE = ">=2.2.0,<3.0.0";
7
+ export declare const PRESENTATION_KIT_WHEEL_FILENAME = "dsh_data_analysis_presentation_kit-1.1.0-py3-none-any.whl";
8
8
  export declare const DEFAULT_SHARED_RUNTIME_INSTALL_TIMEOUT_MS = 600000;
9
9
  interface RuntimeInstallOptions {
10
10
  environment?: NodeJS.ProcessEnv;
11
11
  waitIntervalMs?: number;
12
12
  /** Test/build seam; production always resolves the wheel distributed beside the plugin. */
13
- reportKitWheelPath?: string;
13
+ presentationKitWheelPath?: string;
14
14
  }
15
15
  /** Ensure and validate the one DSH-home-owned Marivo installation. */
16
16
  export declare function ensureSharedMarivoRuntime(config?: SharedMarivoRuntimeConfig, options?: RuntimeInstallOptions): Promise<SharedMarivoRuntime>;
@@ -16,8 +16,8 @@ export interface SharedMarivoRuntime {
16
16
  pythonExecutable: string;
17
17
  marivoVersion: string;
18
18
  packagePath: string;
19
- reportKitVersion: string;
20
- reportKitPackagePath: string;
19
+ presentationKitVersion: string;
20
+ presentationKitPackagePath: string;
21
21
  skillsRoot: string;
22
22
  installationPath: string;
23
23
  }
@@ -50,6 +50,11 @@ export interface MarivoEnvironmentBinding {
50
50
  pythonExecutable: string;
51
51
  marivoVersion: string;
52
52
  packagePath: string;
53
+ /** Present only for bindings admitted through the shared presentation Runtime. */
54
+ presentationKit?: Readonly<{
55
+ version: string;
56
+ packagePath: string;
57
+ }>;
53
58
  subprocessPolicyId: string;
54
59
  fingerprint: string;
55
60
  }
@@ -60,6 +65,8 @@ export interface SubprocessLimits {
60
65
  terminateGraceMs: number;
61
66
  }
62
67
  export interface SubprocessRequest {
68
+ /** Host-only pipe input. Never part of argv or the environment. */
69
+ stdin?: string;
63
70
  executable: string;
64
71
  args: readonly string[];
65
72
  /** Per-call environment values layered over the frozen binding snapshot. */
@@ -69,6 +76,10 @@ export interface SubprocessRequest {
69
76
  }
70
77
  /** One identity-checked Python operation executed by a bound Environment. */
71
78
  export interface MarivoCheckedRunRequest {
79
+ /** Host-only pipe input; callers own its short operation lifetime. */
80
+ stdin?: string;
81
+ /** Values to redact from captured output, never passed through the environment. */
82
+ secretValues?: readonly string[];
72
83
  program: string;
73
84
  args?: readonly string[];
74
85
  /** Per-operation values; every non-empty value is redacted from captured output. */
@@ -4,6 +4,6 @@ export * from './compatibility.ts';
4
4
  export * from './datasource/index.ts';
5
5
  export * from './disclosure/index.ts';
6
6
  export * from './environment/index.ts';
7
- export * from './evidence/index.ts';
8
7
  export type { Config as PluginConfig } from './plugin.ts';
9
8
  export { apply, Config, inject, installMarivoPlugin, name } from './plugin.ts';
9
+ export * from './presentation/index.ts';
@@ -1,8 +1,8 @@
1
1
  /** Cordis lifecycle adapter for the Web-profile shared Marivo Runtime. */
2
2
  import type { Context } from '@deepseek-ai/cordis';
3
3
  import type { Agent } from '@deepseek-ai/dsh-agent';
4
- import type { CredentialProvider } from '@deepseek-ai/dsh-credentials';
5
4
  import z from '@deepseek-ai/schemastery';
5
+ import { type CredentialStore, MarivoCredentialService } from './datasource/service.ts';
6
6
  import { type MarivoHelpBridgeSource } from './disclosure/bridge.ts';
7
7
  import { type MarivoDisclosureOptions } from './disclosure/index.ts';
8
8
  import { MarivoEnvironment } from './environment/index.ts';
@@ -11,10 +11,9 @@ 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
13
  export declare const MARIVO_DATASOURCE_CREDENTIAL_PROMPT: string;
14
- export declare const MARIVO_EVIDENCE_SOURCES_PROMPT: string;
15
- export declare const MARIVO_REPORT_PROMPT: string;
16
14
  /** Loader-safe configuration for the shared Runtime and per-Workspace bindings. */
17
15
  export interface Config {
16
+ readonly credentialInteraction?: 'web' | 'none';
18
17
  /** Explicit project root override; otherwise each Agent uses session.header.cwd. */
19
18
  readonly projectRoot?: string;
20
19
  /** Administrator-provided shared interpreter; must already contain an importable Marivo. */
@@ -35,9 +34,16 @@ export type MarivoPluginEnvironmentResolver = (agent: Agent) => MarivoEnvironmen
35
34
  */
36
35
  export declare function installMarivoPlugin(ctx: Context, environmentOrResolver: MarivoEnvironment | MarivoPluginEnvironmentResolver, options?: MarivoDisclosureOptions & {
37
36
  /** Override used by focused tests; normal plugin installation uses ctx.credentials. */
38
- credentials?: Pick<CredentialProvider, 'resolve'>;
37
+ credentials?: CredentialStore;
38
+ credentialService?: MarivoCredentialService;
39
+ credentialInteraction?: 'web' | 'none';
39
40
  /** Runtime-scoped Help source; normal plugin installation never binds Help to a Workspace. */
40
41
  helpBridgeSource?: MarivoHelpBridgeSource;
41
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
+ };
42
48
  /** Ensure the shared Runtime once, mount its skills, then bind each Workspace lazily. */
43
- export declare function apply(ctx: Context, config?: Config): Promise<() => void>;
49
+ export declare function apply(ctx: Context, config?: Config): Promise<() => Promise<void>>;
@@ -0,0 +1,11 @@
1
+ import { type PresentationDocument } from '../contracts/index.ts';
2
+ export interface BuiltPresentation {
3
+ document: PresentationDocument;
4
+ documentBytes: Buffer;
5
+ htmlBytes: Buffer;
6
+ }
7
+ /**
8
+ * Render an S2 snapshot without reading source data, generating identity, or writing files.
9
+ * Both renderers are built into the installed package; execution needs no build tooling.
10
+ */
11
+ export declare function buildPresentation(value: PresentationDocument): Promise<BuiltPresentation>;
@@ -0,0 +1,4 @@
1
+ import type { BuiltPresentation } from './build/index.ts';
2
+ import { type PresentationReceipt } from './contracts/index.ts';
3
+ /** Owns only one newly-created build. A single directory rename publishes both complete files. */
4
+ export declare function commitPresentation(workspaceRoot: string, input: BuiltPresentation, assertOwner: () => Promise<void>, signal?: AbortSignal): Promise<PresentationReceipt>;
@@ -0,0 +1,13 @@
1
+ import { type ChartType, type ChartView, type TypedDataset } from './types.ts';
2
+ export type { ChartBindings, ChartOptions, ChartType, ChartView } from './types.ts';
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
+ /** Strictly validates one binding. A containing block handles id/kind/preparedViews. */
6
+ export declare function parseChartViewShape(value: unknown, path?: string): asserts value is ChartView;
7
+ /** Exact source columns, including every auxiliary field used by geometry or tooltip. */
8
+ export declare function chartColumns(view: ChartView): string[];
9
+ export declare function chartSeriesFields(view: ChartView): string[];
10
+ /** Verifies supplied values only: never bins, ranks, accumulates, normalizes or sorts. */
11
+ export declare function validateChartView(view: ChartView, dataset: TypedDataset, path?: string, dataPath?: string, rowIndices?: readonly number[]): void;
12
+ /** Changes geometry only. Statistical views must be declared with prepared bindings. */
13
+ export declare function chartTransition(view: ChartView, chart: ChartType, dataset: TypedDataset): ChartView | undefined;