@chengxianglibra/dsh-data-analysis 0.1.2 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +135 -0
- package/README.md +105 -98
- package/cordis.patch.yml +1 -1
- package/lib/bin/environment.js +8 -6
- package/lib/client/credentials/changes.js +74 -0
- package/lib/client/credentials/create-datasource.js +126 -22
- package/lib/client/credentials/credential-draft.js +42 -0
- package/lib/client/credentials/defaults.js +11 -0
- package/lib/client/credentials/descriptions.js +46 -0
- package/lib/client/credentials/install.js +209 -81
- package/lib/client/credentials/model.js +323 -51
- package/lib/client/credentials/report-publishing.js +96 -0
- package/lib/client/credentials/styles.js +13 -9
- package/lib/client/i18n/context.js +22 -0
- package/lib/client/i18n/copy.js +60 -0
- package/lib/client/i18n/credentials.js +475 -0
- package/lib/client/i18n/host.js +28 -0
- package/lib/client/i18n/navigation.js +41 -0
- package/lib/client/i18n/presentation.js +577 -0
- package/lib/client/i18n/python.js +36 -0
- package/lib/client/i18n/semantic.js +441 -0
- package/lib/client/i18n/settings.js +30 -0
- package/lib/client/input-context.js +21 -0
- package/lib/client/python-tool/card.js +35 -0
- package/lib/client/python-tool/execution-error.js +35 -0
- package/lib/client/python-tool/install.js +9 -0
- package/lib/client/python-tool/model.js +101 -0
- package/lib/client/right-tabs/install.js +535 -0
- package/lib/client/right-tabs/live-delivery.js +58 -0
- package/lib/client/right-tabs/navigation.js +47 -0
- package/lib/client/right-tabs/page.js +178 -0
- package/lib/client/right-tabs/styles.js +11 -0
- package/lib/client/rpc.js +5 -0
- package/lib/client/semantic-reference.js +10 -0
- package/lib/client/settings/card.js +90 -0
- package/lib/client/settings/install.js +10 -0
- package/lib/client/workspace-header-action.js +14 -1
- package/lib/client/workspace-shortcuts.js +26 -0
- package/lib/client.js +388 -242
- package/lib/compatibility.js +1 -1
- package/lib/datasource/authoring.js +43 -4
- package/lib/datasource/bridge-programs.js +23 -20
- package/lib/datasource/bridge.js +46 -3
- package/lib/datasource/changes-contract.js +41 -0
- package/lib/datasource/changes.js +49 -0
- package/lib/datasource/configure.js +39 -0
- package/lib/datasource/defaults.js +25 -0
- package/lib/datasource/index.js +2 -1
- package/lib/datasource/python-options.js +15 -0
- package/lib/datasource/python.js +119 -25
- package/lib/datasource/rpc.js +75 -13
- package/lib/datasource/service.js +286 -11
- package/lib/datasource/test.js +3 -2
- package/lib/disclosure/activation.js +19 -7
- package/lib/disclosure/execution-guidance.js +49 -0
- package/lib/disclosure/help.js +4 -1
- package/lib/environment/runtime.js +35 -34
- package/lib/environment/workspace.js +18 -1
- package/lib/lifecycle.js +33 -0
- package/lib/plugin-agents.js +154 -0
- package/lib/plugin.js +98 -172
- package/lib/presentation/asset.js +34 -0
- package/lib/presentation/assets/portable.js +14 -14
- package/lib/presentation/assets/static.js +344 -73
- package/lib/presentation/build/index.js +3 -2
- package/lib/presentation/commit.js +19 -12
- package/lib/presentation/contracts/asset-path.js +9 -0
- package/lib/presentation/contracts/catalog.js +62 -0
- package/lib/presentation/contracts/charts.js +0 -23
- package/lib/presentation/contracts/index.js +17 -5
- package/lib/presentation/contracts/types.js +1 -1
- package/lib/presentation/delivery.js +45 -30
- package/lib/presentation/export-html.js +214 -0
- package/lib/presentation/files.js +4 -5
- package/lib/presentation/projection/index.js +2 -1
- package/lib/presentation/projection/program.js +2 -9
- package/lib/presentation/projection/sql-code.js +13 -13
- package/lib/presentation/reports.js +114 -17
- package/lib/presentation/rpc.js +96 -58
- package/lib/presentation/tool.js +6 -10
- package/lib/report-publishing/adapters.js +111 -0
- package/lib/report-publishing/config.js +69 -0
- package/lib/report-publishing/service.js +180 -0
- package/lib/rpc.js +49 -0
- package/lib/semantic-browser/contracts.js +17 -0
- package/lib/semantic-browser/program.js +10 -0
- package/lib/semantic-browser/service.js +40 -6
- package/lib/semantic-reference/bridge.js +10 -1
- package/lib/semantic-reference/contracts.js +20 -6
- package/lib/semantic-reference/environment.js +56 -0
- package/lib/semantic-reference/labels.js +16 -0
- package/lib/semantic-reference/rpc.js +39 -18
- package/lib/semantic-reference/search.js +5 -4
- package/lib/semantic-reference/usage.js +12 -3
- package/lib/settings.js +21 -0
- package/lib/tool-lifecycle.js +22 -0
- package/lib/types/client/credentials/changes.d.ts +9 -0
- package/lib/types/client/credentials/create-datasource.d.ts +3 -1
- package/lib/types/client/credentials/credential-draft.d.ts +14 -0
- package/lib/types/client/credentials/defaults.d.ts +2 -0
- package/lib/types/client/credentials/descriptions.d.ts +1 -0
- package/lib/types/client/credentials/install.d.ts +19 -1
- package/lib/types/client/credentials/model.d.ts +31 -11
- package/lib/types/client/credentials/report-publishing.d.ts +5 -0
- package/lib/types/client/credentials/styles.d.ts +1 -1
- package/lib/types/client/i18n/context.d.ts +17 -0
- package/lib/types/client/i18n/copy.d.ts +821 -0
- package/lib/types/client/i18n/credentials.d.ts +475 -0
- package/lib/types/client/i18n/host.d.ts +17 -0
- package/lib/types/client/i18n/navigation.d.ts +41 -0
- package/lib/types/client/i18n/presentation.d.ts +577 -0
- package/lib/types/client/i18n/python.d.ts +19 -0
- package/lib/types/client/i18n/semantic.d.ts +441 -0
- package/lib/types/client/i18n/settings.d.ts +16 -0
- package/lib/types/client/input-context.d.ts +19 -0
- package/lib/types/client/presentation/ask-dsh.d.ts +4 -8
- package/lib/types/client/presentation/catalog-model.d.ts +24 -0
- package/lib/types/client/presentation/catalog.d.ts +20 -0
- package/lib/types/client/presentation/chart-tooltip.d.ts +2 -2
- package/lib/types/client/presentation/context-reference.d.ts +12 -0
- package/lib/types/client/presentation/copy-context.d.ts +2 -2
- package/lib/types/client/presentation/delivery-model.d.ts +27 -6
- package/lib/types/client/presentation/delivery.d.ts +8 -7
- package/lib/types/client/presentation/download.d.ts +2 -0
- package/lib/types/client/presentation/export-menu.d.ts +26 -0
- package/lib/types/client/presentation/export-view.d.ts +63 -0
- package/lib/types/client/presentation/host-entry.d.ts +8 -2
- package/lib/types/client/presentation/icons.d.ts +1 -1
- package/lib/types/client/presentation/model.d.ts +14 -15
- package/lib/types/client/presentation/reader.d.ts +15 -2
- package/lib/types/client/presentation/reference-source.d.ts +9 -0
- package/lib/types/client/presentation/source-code-model.d.ts +2 -1
- package/lib/types/client/presentation/source-code.d.ts +0 -5
- package/lib/types/client/presentation/source-dialog.d.ts +1 -2
- package/lib/types/client/presentation/sources.d.ts +5 -5
- package/lib/types/client/presentation/styles.d.ts +1 -1
- package/lib/types/client/presentation/table.d.ts +5 -1
- package/lib/types/client/python-tool/card.d.ts +2 -0
- package/lib/types/client/python-tool/execution-error.d.ts +3 -0
- package/lib/types/client/python-tool/install.d.ts +2 -0
- package/lib/types/client/python-tool/model.d.ts +20 -0
- package/lib/types/client/right-tabs/install.d.ts +18 -0
- package/lib/types/client/right-tabs/live-delivery.d.ts +8 -0
- package/lib/types/client/right-tabs/navigation.d.ts +17 -0
- package/lib/types/client/right-tabs/page.d.ts +36 -0
- package/lib/types/client/right-tabs/styles.d.ts +2 -0
- package/lib/types/client/rpc.d.ts +3 -0
- package/lib/types/client/semantic-reference.d.ts +4 -0
- package/lib/types/client/settings/card.d.ts +9 -0
- package/lib/types/client/settings/install.d.ts +2 -0
- package/lib/types/client/workspace-header-action.d.ts +1 -1
- package/lib/types/client/workspace-shortcuts.d.ts +15 -0
- package/lib/types/client.d.ts +5 -2
- package/lib/types/compatibility.d.ts +1 -1
- package/lib/types/datasource/authoring.d.ts +10 -0
- package/lib/types/datasource/bridge.d.ts +23 -2
- package/lib/types/datasource/changes-contract.d.ts +18 -0
- package/lib/types/datasource/changes.d.ts +15 -0
- package/lib/types/datasource/configure.d.ts +7 -0
- package/lib/types/datasource/defaults.d.ts +7 -0
- package/lib/types/datasource/index.d.ts +6 -1
- package/lib/types/datasource/python-options.d.ts +8 -0
- package/lib/types/datasource/python.d.ts +17 -2
- package/lib/types/datasource/rpc.d.ts +2 -1
- package/lib/types/datasource/service.d.ts +48 -5
- package/lib/types/datasource/test.d.ts +1 -1
- package/lib/types/disclosure/activation.d.ts +2 -1
- package/lib/types/disclosure/execution-guidance.d.ts +6 -0
- package/lib/types/disclosure/help.d.ts +1 -1
- package/lib/types/environment/types.d.ts +2 -1
- package/lib/types/environment/workspace.d.ts +1 -0
- package/lib/types/lifecycle.d.ts +8 -0
- package/lib/types/plugin-agents.d.ts +29 -0
- package/lib/types/plugin.d.ts +12 -28
- package/lib/types/presentation/asset.d.ts +6 -0
- package/lib/types/presentation/build/index.d.ts +7 -2
- package/lib/types/presentation/commit.d.ts +1 -1
- package/lib/types/presentation/contracts/asset-path.d.ts +2 -0
- package/lib/types/presentation/contracts/catalog.d.ts +27 -0
- package/lib/types/presentation/contracts/charts.d.ts +0 -2
- package/lib/types/presentation/contracts/types.d.ts +7 -4
- package/lib/types/presentation/delivery.d.ts +1 -1
- package/lib/types/presentation/export-html.d.ts +13 -0
- package/lib/types/presentation/reports.d.ts +6 -1
- package/lib/types/presentation/rpc.d.ts +3 -2
- package/lib/types/presentation/tool.d.ts +2 -2
- package/lib/types/report-publishing/adapters.d.ts +6 -0
- package/lib/types/report-publishing/config.d.ts +22 -0
- package/lib/types/report-publishing/service.d.ts +68 -0
- package/lib/types/rpc.d.ts +3 -0
- package/lib/types/semantic-browser/contracts.d.ts +7 -0
- package/lib/types/semantic-browser/service.d.ts +7 -1
- package/lib/types/semantic-reference/bridge.d.ts +1 -0
- package/lib/types/semantic-reference/contracts.d.ts +5 -2
- package/lib/types/semantic-reference/environment.d.ts +22 -0
- package/lib/types/semantic-reference/labels.d.ts +16 -0
- package/lib/types/semantic-reference/rpc.d.ts +1 -1
- package/lib/types/semantic-reference/search.d.ts +1 -1
- package/lib/types/settings.d.ts +14 -0
- package/lib/types/tool-lifecycle.d.ts +4 -0
- package/lib/types/workspace-identity.d.ts +6 -0
- package/lib/workspace-identity.js +9 -0
- package/package.json +93 -61
- package/python/presentation-kit/dist/dsh_data_analysis_presentation_kit-1.1.0-py3-none-any.whl +0 -0
- package/skills/dsh-data-analysis-files/SKILL.md +44 -0
- package/skills/dsh-data-analysis-files/references/delivery.md +15 -0
- package/skills/dsh-data-analysis-files/references/examples.md +93 -0
- package/skills/dsh-data-analysis-presentation/SKILL.md +15 -15
- package/skills/dsh-data-analysis-presentation/references/examples/artifact.draft.json +13 -4
- package/skills/dsh-data-analysis-presentation/references/examples/charts.draft.json +3 -2
- package/skills/dsh-data-analysis-presentation/references/examples/comparison.draft.json +3 -2
- package/skills/dsh-data-analysis-presentation/references/examples/computed-sources.draft.json +12 -5
- package/skills/dsh-data-analysis-presentation/references/examples/computed.draft.json +3 -2
- package/skills/dsh-data-analysis-presentation/references/examples/interaction.draft.json +3 -2
- package/skills/dsh-data-analysis-presentation/references/examples/source-only.draft.json +12 -4
- package/skills/dsh-data-analysis-presentation/references/examples.md +3 -1
- package/skills/dsh-data-analysis-presentation/references/export-html.md +7 -0
- package/skills/dsh-data-analysis-presentation/references/interaction.md +1 -1
- package/skills/dsh-data-analysis-presentation/references/narrative.md +1 -1
- package/skills/dsh-data-analysis-presentation/references/publishing.md +3 -0
- package/skills/dsh-data-analysis-presentation/references/schema.md +29 -2
- package/lib/types/client/presentation/install.d.ts +0 -15
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chengxianglibra/dsh-data-analysis",
|
|
3
3
|
"description": "Marivo runtime, live Help, secure datasource execution and presentation delivery for DeepSeek Harness",
|
|
4
|
-
"version": "0.1
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/chengxianglibra/dsh-data-analysis.git",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"engines": {
|
|
17
|
-
"node": ">=24"
|
|
17
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
18
18
|
},
|
|
19
19
|
"main": "lib/index.js",
|
|
20
20
|
"types": "lib/types/index.d.ts",
|
|
@@ -54,9 +54,11 @@
|
|
|
54
54
|
"lib/**/*.js",
|
|
55
55
|
"lib/types/**/*.d.ts",
|
|
56
56
|
"skills/dsh-data-analysis-presentation/**",
|
|
57
|
+
"skills/dsh-data-analysis-files/**",
|
|
57
58
|
"python/presentation-kit/dist/dsh_data_analysis_presentation_kit-1.1.0-py3-none-any.whl",
|
|
58
59
|
"cordis.patch.yml",
|
|
59
|
-
"README.md"
|
|
60
|
+
"README.md",
|
|
61
|
+
"README.en.md"
|
|
60
62
|
],
|
|
61
63
|
"scripts": {
|
|
62
64
|
"build": "npm run clean && tsc -p tsconfig.build.json && node scripts/finalize-build.mjs",
|
|
@@ -72,11 +74,11 @@
|
|
|
72
74
|
"schema": "dsh-data-analysis-compatibility/v2",
|
|
73
75
|
"dsh": {
|
|
74
76
|
"distribution": "@deepseek-ai/dsh",
|
|
75
|
-
"peerRange": "0.1.
|
|
77
|
+
"peerRange": ">=0.1.5-rc.1"
|
|
76
78
|
},
|
|
77
79
|
"marivo": {
|
|
78
|
-
"version": "0.5.
|
|
79
|
-
"packageSpec": "marivo[duckdb,trino,clickhouse]==0.5.
|
|
80
|
+
"version": "0.5.5",
|
|
81
|
+
"packageSpec": "marivo[duckdb,trino,clickhouse]==0.5.5"
|
|
80
82
|
},
|
|
81
83
|
"contracts": {
|
|
82
84
|
"runtimeInstallation": "dsh-data-analysis-runtime/v3",
|
|
@@ -87,13 +89,19 @@
|
|
|
87
89
|
"client": {
|
|
88
90
|
"inject": [
|
|
89
91
|
"@deepseek-ai/dsh-client-connection",
|
|
92
|
+
"@deepseek-ai/dsh-api-gateway",
|
|
90
93
|
"@deepseek-ai/dsh-client-locale",
|
|
91
|
-
"@deepseek-ai/dsh-
|
|
94
|
+
"@deepseek-ai/dsh-api-session-controller",
|
|
95
|
+
"@deepseek-ai/dsh-api-workspace-controller",
|
|
96
|
+
"@deepseek-ai/dsh-client-ui-chat",
|
|
92
97
|
"@deepseek-ai/dsh-client-ui-conversation",
|
|
93
98
|
"@deepseek-ai/dsh-client-ui-tool",
|
|
94
99
|
"@deepseek-ai/dsh-client-ui-input-trigger",
|
|
95
100
|
"@deepseek-ai/dsh-client-ui-sidebar",
|
|
96
|
-
"@deepseek-ai/dsh-client-ui-layout"
|
|
101
|
+
"@deepseek-ai/dsh-client-ui-layout",
|
|
102
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right",
|
|
103
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
104
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins"
|
|
97
105
|
],
|
|
98
106
|
"platform": "web"
|
|
99
107
|
},
|
|
@@ -102,72 +110,96 @@
|
|
|
102
110
|
}
|
|
103
111
|
},
|
|
104
112
|
"dependencies": {
|
|
113
|
+
"@aws-sdk/client-s3": "^3.1129.0",
|
|
105
114
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
106
115
|
"zod": "^4.4.3"
|
|
107
116
|
},
|
|
108
117
|
"devDependencies": {
|
|
109
|
-
"@deepseek-ai/dsh-agent-loop": "
|
|
110
|
-
"@deepseek-ai/dsh-anonymous-user-id": "
|
|
111
|
-
"@deepseek-ai/dsh-bash-local": "
|
|
112
|
-
"@deepseek-ai/dsh-client-
|
|
113
|
-
"@deepseek-ai/dsh-client-ui-
|
|
114
|
-
"@deepseek-ai/dsh-
|
|
115
|
-
"@deepseek-ai/dsh-
|
|
116
|
-
"@deepseek-ai/dsh-
|
|
117
|
-
"@deepseek-ai/dsh-
|
|
118
|
-
"@deepseek-ai/dsh-
|
|
119
|
-
"@deepseek-ai/dsh-
|
|
120
|
-
"@deepseek-ai/dsh-
|
|
121
|
-
"@deepseek-ai/dsh-
|
|
122
|
-
"@deepseek-ai/dsh-
|
|
123
|
-
"@deepseek-ai/dsh-
|
|
124
|
-
"@deepseek-ai/dsh-
|
|
118
|
+
"@deepseek-ai/dsh-agent-loop": "0.1.5-rc.1",
|
|
119
|
+
"@deepseek-ai/dsh-anonymous-user-id": "0.1.5-rc.1",
|
|
120
|
+
"@deepseek-ai/dsh-bash-local": "0.1.5-rc.1",
|
|
121
|
+
"@deepseek-ai/dsh-client-store": "0.1.5-rc.1",
|
|
122
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.1.5-rc.1",
|
|
123
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.1.5-rc.1",
|
|
124
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right": "0.1.5-rc.1",
|
|
125
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.5-rc.1",
|
|
126
|
+
"@deepseek-ai/dsh-code-runtime": "0.1.5-rc.1",
|
|
127
|
+
"@deepseek-ai/dsh-code-runtime-worker-thread": "0.1.5-rc.1",
|
|
128
|
+
"@deepseek-ai/dsh-credentials-local": "0.1.5-rc.1",
|
|
129
|
+
"@deepseek-ai/dsh-fs-local": "0.1.5-rc.1",
|
|
130
|
+
"@deepseek-ai/dsh-fs-observation-policy": "0.1.5-rc.1",
|
|
131
|
+
"@deepseek-ai/dsh-launch-environment": "0.1.5-rc.1",
|
|
132
|
+
"@deepseek-ai/dsh-llm-deepseek": "0.1.5-rc.1",
|
|
133
|
+
"@deepseek-ai/dsh-scope": "0.1.5-rc.1",
|
|
134
|
+
"@deepseek-ai/dsh-session-persistence": "0.1.5-rc.1",
|
|
135
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "0.1.5-rc.1",
|
|
136
|
+
"@deepseek-ai/dsh-session-projection": "0.1.5-rc.1",
|
|
137
|
+
"@deepseek-ai/dsh-skill": "0.1.5-rc.1",
|
|
138
|
+
"@deepseek-ai/dsh-storage": "0.1.5-rc.1",
|
|
139
|
+
"@deepseek-ai/dsh-storage-json": "0.1.5-rc.1",
|
|
140
|
+
"@deepseek-ai/dsh-subprocess-local": "0.1.5-rc.1",
|
|
141
|
+
"@deepseek-ai/dsh-tool-bash": "0.1.5-rc.1",
|
|
142
|
+
"@deepseek-ai/dsh-tool-fs": "0.1.5-rc.1",
|
|
143
|
+
"@deepseek-ai/dsh-tool-present": "0.1.5-rc.1",
|
|
144
|
+
"@deepseek-ai/dsh-tool-skill": "0.1.5-rc.1",
|
|
145
|
+
"@deepseek-ai/dsh-util-workspace-path": "0.1.5-rc.1",
|
|
146
|
+
"@shikijs/core": "4.4.3",
|
|
147
|
+
"@shikijs/engine-javascript": "4.4.3",
|
|
148
|
+
"@shikijs/langs": "4.4.3",
|
|
125
149
|
"@types/react": "^18.3.31",
|
|
126
|
-
"react": "^18.3.1",
|
|
127
|
-
"typescript": "^6.0.3",
|
|
128
|
-
"esbuild": "^0.28.2",
|
|
129
|
-
"@deepseek-ai/dsh-storage": "^0.1.1-rc.2",
|
|
130
|
-
"@deepseek-ai/dsh-storage-json": "^0.1.1-rc.2",
|
|
131
|
-
"@deepseek-ai/dsh-session-persistence-jsonl": "0.1.1-rc.2",
|
|
132
150
|
"@types/react-dom": "18.3.7",
|
|
151
|
+
"@wasm-fmt/ruff_fmt": "0.15.20",
|
|
152
|
+
"esbuild": "^0.28.2",
|
|
153
|
+
"immer": "10.1.1",
|
|
133
154
|
"playwright": "1.63.0",
|
|
155
|
+
"react": "^18.3.1",
|
|
134
156
|
"react-dom": "18.3.1",
|
|
135
157
|
"react-is": "18.3.1",
|
|
136
158
|
"recharts": "3.8.1",
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"@
|
|
141
|
-
"@
|
|
142
|
-
"@
|
|
143
|
-
"
|
|
159
|
+
"sql-formatter": "15.8.2",
|
|
160
|
+
"typescript": "^6.0.3",
|
|
161
|
+
"zustand": "4.4.7",
|
|
162
|
+
"@deepseek-ai/dsh-settings": "0.1.5-rc.1",
|
|
163
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.5-rc.1",
|
|
164
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.5-rc.1",
|
|
165
|
+
"@deepseek-ai/dsh-settings-file": "0.1.5-rc.1"
|
|
144
166
|
},
|
|
145
167
|
"peerDependencies": {
|
|
146
|
-
"@deepseek-ai/dsh-agent": "0.1.1-rc.2",
|
|
147
|
-
"@deepseek-ai/dsh-client-connection": "0.1.1-rc.2",
|
|
148
|
-
"@deepseek-ai/dsh-client-locale": "0.1.1-rc.2",
|
|
149
|
-
"@deepseek-ai/dsh-client-runtime": "0.1.1-rc.2",
|
|
150
|
-
"@deepseek-ai/dsh-client-ui-conversation": "0.1.1-rc.2",
|
|
151
|
-
"@deepseek-ai/dsh-client-ui-primitives": "0.1.1-rc.2",
|
|
152
|
-
"@deepseek-ai/dsh-client-ui-tool": "0.1.1-rc.2",
|
|
153
|
-
"@deepseek-ai/dsh-credentials": "0.1.1-rc.2",
|
|
154
|
-
"@deepseek-ai/dsh-home-paths": "0.1.1-rc.2",
|
|
155
|
-
"@deepseek-ai/dsh-llm": "0.1.1-rc.2",
|
|
156
|
-
"@deepseek-ai/dsh-session": "0.1.1-rc.2",
|
|
157
|
-
"@deepseek-ai/dsh-shell-env": "0.1.1-rc.2",
|
|
158
|
-
"@deepseek-ai/dsh-skill-filesystem": "0.1.1-rc.2",
|
|
159
|
-
"@deepseek-ai/dsh-scope": "0.1.1-rc.2",
|
|
160
|
-
"@deepseek-ai/dsh-system-prompt": "0.1.1-rc.2",
|
|
161
168
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
162
|
-
"@deepseek-ai/dsh-
|
|
169
|
+
"@deepseek-ai/dsh-agent": ">=0.1.5-rc.1",
|
|
170
|
+
"@deepseek-ai/dsh-api-gateway": ">=0.1.5-rc.1",
|
|
171
|
+
"@deepseek-ai/dsh-api-session-controller": ">=0.1.5-rc.1",
|
|
172
|
+
"@deepseek-ai/dsh-api-workspace-controller": ">=0.1.5-rc.1",
|
|
173
|
+
"@deepseek-ai/dsh-atomic-write": ">=0.1.5-rc.1",
|
|
174
|
+
"@deepseek-ai/dsh-client-connection": ">=0.1.5-rc.1",
|
|
175
|
+
"@deepseek-ai/dsh-client-locale": ">=0.1.5-rc.1",
|
|
176
|
+
"@deepseek-ai/dsh-client-ui-chat": ">=0.1.5-rc.1",
|
|
177
|
+
"@deepseek-ai/dsh-client-ui-conversation": ">=0.1.5-rc.1",
|
|
178
|
+
"@deepseek-ai/dsh-client-ui-input-trigger": ">=0.1.5-rc.1",
|
|
179
|
+
"@deepseek-ai/dsh-client-ui-layout": ">=0.1.5-rc.1",
|
|
180
|
+
"@deepseek-ai/dsh-client-ui-primitives": ">=0.1.5-rc.1",
|
|
181
|
+
"@deepseek-ai/dsh-client-ui-sidebar": ">=0.1.5-rc.1",
|
|
182
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right": ">=0.1.5-rc.1",
|
|
183
|
+
"@deepseek-ai/dsh-client-ui-tool": ">=0.1.5-rc.1",
|
|
184
|
+
"@deepseek-ai/dsh-credentials": ">=0.1.5-rc.1",
|
|
185
|
+
"@deepseek-ai/dsh-home-paths": ">=0.1.5-rc.1",
|
|
186
|
+
"@deepseek-ai/dsh-llm": ">=0.1.5-rc.1",
|
|
187
|
+
"@deepseek-ai/dsh-sandbox": ">=0.1.5-rc.1",
|
|
188
|
+
"@deepseek-ai/dsh-scope": ">=0.1.5-rc.1",
|
|
189
|
+
"@deepseek-ai/dsh-session": ">=0.1.5-rc.1",
|
|
190
|
+
"@deepseek-ai/dsh-shell": ">=0.1.5-rc.1",
|
|
191
|
+
"@deepseek-ai/dsh-shell-env": ">=0.1.5-rc.1",
|
|
192
|
+
"@deepseek-ai/dsh-skill-filesystem": ">=0.1.5-rc.1",
|
|
193
|
+
"@deepseek-ai/dsh-storage-domain": ">=0.1.5-rc.1",
|
|
194
|
+
"@deepseek-ai/dsh-system-prompt": ">=0.1.5-rc.1",
|
|
195
|
+
"@deepseek-ai/dsh-tools": ">=0.1.5-rc.1",
|
|
196
|
+
"@deepseek-ai/dsh-typert-protocol": ">=0.1.5-rc.1",
|
|
197
|
+
"@deepseek-ai/dsh-typert-registry": ">=0.1.5-rc.1",
|
|
198
|
+
"@deepseek-ai/dsh-util-values": ">=0.1.5-rc.1",
|
|
199
|
+
"@deepseek-ai/dsh-workspace": ">=0.1.5-rc.1",
|
|
163
200
|
"react": "^18.3.1",
|
|
164
|
-
"@deepseek-ai/dsh-
|
|
165
|
-
"@deepseek-ai/dsh-client-ui-
|
|
166
|
-
"@deepseek-ai/dsh-
|
|
167
|
-
"@deepseek-ai/dsh-client-ui-sidebar": "0.1.1-rc.2",
|
|
168
|
-
"@deepseek-ai/dsh-client-ui-layout": "0.1.1-rc.2",
|
|
169
|
-
"@deepseek-ai/dsh-shell": "0.1.1-rc.2",
|
|
170
|
-
"@deepseek-ai/dsh-sandbox": "0.1.1-rc.2",
|
|
171
|
-
"@deepseek-ai/dsh-atomic-write": "0.1.1-rc.2"
|
|
201
|
+
"@deepseek-ai/dsh-settings": ">=0.1.5-rc.1",
|
|
202
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.1.5-rc.1",
|
|
203
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": ">=0.1.5-rc.1"
|
|
172
204
|
}
|
|
173
205
|
}
|
package/python/presentation-kit/dist/dsh_data_analysis_presentation_kit-1.1.0-py3-none-any.whl
CHANGED
|
Binary file
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dsh-data-analysis-files
|
|
3
|
+
description: 分析附件或 Workspace 中的 CSV、JSON、Parquet、Excel 数据,回答问题或交付 CSV、JSON、PNG 文件。可接续报告展示,无需先建立 Marivo datasource 或语义模型。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 文件分析
|
|
7
|
+
|
|
8
|
+
本 Skill 负责文件读取、计算、分析核对与普通文件交付。按用户问题选择方法;需要保存报告或交互展示时,完成分析后交给 `dsh-data-analysis-presentation`。
|
|
9
|
+
|
|
10
|
+
## 确认输入与执行
|
|
11
|
+
|
|
12
|
+
使用 Harness 提供的当前附件可读路径,或用户指定的 Workspace 文件;同名附件按消息和完整路径区分。路径不可读时报告实际问题,不猜测 Host 缓存位置。
|
|
13
|
+
在实际读取代码中使用该完整路径,使执行记录保留输入身份;不为缩短路径而复制成 Workspace 同名文件,以免覆盖或在后续追问中读到旧副本。
|
|
14
|
+
|
|
15
|
+
文件读取、计算和最终文件生成均通过 `marivo_python` 在绑定 Runtime 中执行,不改走 Bash 的 `python`/`python3` 或其他解释器。纯本地文件分析可直接使用 pandas 或原生 `duckdb`,传 `datasources: []`;无需 `md.raw_sql`、Marivo 分析 Skill、live Help 或语义建模。只有实际访问 Marivo datasource 时才声明其精确名称并查询相关契约。
|
|
16
|
+
|
|
17
|
+
使用现有 reader,保留回答所需的 sheet、字段和解析范围;区分样本与全量。Excel `.xlsx` 可用 DuckDB `read_xlsx`,首次使用可能联网获取官方扩展;不承诺旧 `.xls` 或冷缓存离线读取,不临时安装 Python 依赖。
|
|
18
|
+
|
|
19
|
+
每次 `marivo_python` 都是独立进程。原生 DuckDB 连接可在本次调用内复用、创建临时表,并及时关闭;后续追问重新读取原文件或已有结果,不依赖上次内存状态。按问题控制读取和输出规模,SQL `LIMIT` 不代表仅扫描这些行。
|
|
20
|
+
|
|
21
|
+
## 计算与核对
|
|
22
|
+
|
|
23
|
+
按问题确认粒度、单位、时间范围与比较基准;检查会影响计算的解析类型、缺失值、重复记录及连接基数。合并同名文件、筛选或去重时说明实际规则,不把缺失值当零,不把样本当全量。
|
|
24
|
+
|
|
25
|
+
完成文字答案或生成交付物前,逐项核对用户问题及各比较分支。保留比较两侧、变化方向和比例分母,从原值核对差值、比例与合计;Top N 或子集不能替代全量结论。观测和数值贡献不自动证明原因;结论措辞应体现实际证据强度。
|
|
26
|
+
最后核对解释文字中的比较名称与涨跌方向是否和表中同一项一致;基准不同可以解释比率差异,本身不能证明业务变化的原因。
|
|
27
|
+
|
|
28
|
+
某个基准或分支缺数据时,交付已有支持的答案,并明确缺失范围及影响,不用另一项成功比较替代。所需答案已有支持或已明确阻塞时结束,不为完善展示额外扩展分析。
|
|
29
|
+
|
|
30
|
+
## 可复用语义与停止条件
|
|
31
|
+
|
|
32
|
+
分析中发现可供后续任务复用的业务定义或语义缺口时,先区分共享口径与本次结果:指标定义、维度含义或业务关系可作为语义候选;观测数值、临时筛选与未验证假设保留在当前分析中,不自动成为共享定义。
|
|
33
|
+
|
|
34
|
+
仅当当前问题需要该共享定义,或用户已授权语义沉淀时,加载 `marivo-semantic`,携带复用用途、已有依据、适用范围和未决含义,按其 Skill 与实时 Help 检查并优先复用已有对象。需要新增或修正时只处理最小必要缺口;业务含义与授权已明确则继续,实质歧义按语义 Skill 澄清,不自行猜测定义,也不重复请求已有授权。
|
|
35
|
+
|
|
36
|
+
收到经验证的对象引用后继续原问题;必要对象已完成且原问题已回答,或阻塞已明确时停止。不递归扩展相邻指标、实体或业务域。顺带发现的范围外机会只在答复中简要说明用途与依据,不自动建模、另建记录文件或继续探索。普通文件计算仍无需语义建模;展示流程不承担语义沉淀。
|
|
37
|
+
|
|
38
|
+
## 按用户目标交付
|
|
39
|
+
|
|
40
|
+
普通答案和简短比较表格直接在聊天中回答,不额外创建文件。用户要求 CSV、JSON、PNG 等实际文件时,先读[文件交付](references/delivery.md),通过 `marivo_python` 生成最终文件,优先写入当前绑定 Workspace;确认执行成功、文件存在后,调用实际可用的 Harness 原生 `present`,再回复用户。文件生成和原生声明分别核对,路径或代码块不能替代交付。
|
|
41
|
+
|
|
42
|
+
需要交互图表、表格、报告或看板时加载 `dsh-data-analysis-presentation`,将 DataFrame 交给现有 writer,关联实际返回的 `codeRef`,用 `marivo_present` 保存固定 Build。在正文说明文件名与分析范围,不将文件结果冒充 Marivo Artifact 或 Evidence。普通 `present` 不赋予文件 Report/Build 或 Evidence 身份。
|
|
43
|
+
|
|
44
|
+
需要起步代码时读[简短示例](references/examples.md);其中提供无需额外依赖的 PNG 写入代码,也通过 `marivo_python` 执行。
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# 文件交付与恢复
|
|
2
|
+
|
|
3
|
+
用户要求 CSV、JSON、PNG 等实际文件时读取本页。生成最终文件后,按当前 Harness 原生 `present` 工具契约交付;不猜测附件缓存或 Shell 私有临时目录。工具拥有路径与类型校验,详见 Harness [present 契约](https://github.com/deepseek-ai/deepseek-harness/blob/dsh-v0.1.5-rc.1/packages/fs/tool-present/README.md)。
|
|
4
|
+
|
|
5
|
+
## 生成与声明
|
|
6
|
+
|
|
7
|
+
只交付用户要求的最终文件。报告内部的 `presentation.json`、computed 数据和 receipt 不作为默认附件;用户另行要求时,先确认实际文件已经存在且当前 Session 可访问。浏览器内生成的下载不伪装成 Session 文件;报告 HTML 交给展示 Skill 的导出或发布流程。
|
|
8
|
+
|
|
9
|
+
文件生成成功后调用 `present`,分别核对生成与声明结果。当前缺少 `present` 时,说明“文件已生成,原生交付能力不可用”,并提供准确路径;不虚构卡片,不安装工具或改写 profile。
|
|
10
|
+
|
|
11
|
+
## 失败与再次交付
|
|
12
|
+
|
|
13
|
+
生成失败不声明成功;声明失败区分“文件已生成”和“交付未完成”。修复路径或可见性后只重试交付,不为补卡片重跑分析。响应不确定时先核对已有调用结果和事件,不盲目重复声明。原生打开失败时使用 Host 的预览或错误反馈,不绕过权限。
|
|
14
|
+
|
|
15
|
+
卡片读取当前源文件,不保存内容版本;修改、移动或删除会影响后续读取。成功声明的持久事件属于 Harness,即使 PTC 外层程序随后失败,也不撤销已成功的声明。子代理产物属于其调用 Session;父 Agent 如需交付,先确认自己能访问文件,再在父 Session 显式调用 `present`,不自动跨 Session 转投递。
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# 文件分析示例
|
|
2
|
+
|
|
3
|
+
以下代码通过 `marivo_python` 执行,两例都使用 `datasources: []`。将 `path` 替换为 Harness 提供的附件可读路径或用户指定的 Workspace 文件,列名按实际结构调整。
|
|
4
|
+
|
|
5
|
+
## pandas
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
import pandas as pd
|
|
9
|
+
|
|
10
|
+
path = "/actual/readable/file.csv"
|
|
11
|
+
frame = pd.read_csv(path)
|
|
12
|
+
result = frame.groupby("category", dropna=False)["amount"].sum().reset_index()
|
|
13
|
+
print(result.to_string(index=False))
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
JSON、JSON Lines 和 Parquet 可分别使用 `pd.read_json`、`pd.read_json(..., lines=True)` 和 `pd.read_parquet`;读取选项由实际文件决定。默认 Runtime 未提供 `openpyxl`,`.xlsx` 可用下例的 DuckDB reader 后转成 DataFrame。
|
|
17
|
+
|
|
18
|
+
## 原生 DuckDB
|
|
19
|
+
|
|
20
|
+
```python
|
|
21
|
+
import duckdb
|
|
22
|
+
|
|
23
|
+
path = "/actual/readable/file.csv"
|
|
24
|
+
with duckdb.connect(":memory:") as con:
|
|
25
|
+
result = con.execute(
|
|
26
|
+
"SELECT category, SUM(amount) AS amount "
|
|
27
|
+
"FROM read_csv_auto(?) GROUP BY category ORDER BY amount DESC LIMIT 20",
|
|
28
|
+
[path],
|
|
29
|
+
).df()
|
|
30
|
+
print(result.to_string(index=False))
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
按文件改用 `read_json_auto(?)`、`read_parquet(?)` 或 `read_xlsx(?)`。`.xlsx` 的指定工作表可用 `read_xlsx(?, sheet = ?)` 并传入路径与 sheet 名;首次加载 `excel` 扩展需要获取官方扩展。参数避免将路径或 sheet 名直接拼入 SQL;reader 支持 glob,含通配符的文件名需先确认只命中目标文件。
|
|
34
|
+
|
|
35
|
+
原生连接支持同一调用内的多条 SQL 和临时表,无需另建 Marivo datasource。需要交互表格或报告时,使用展示 Skill 的 computed 示例;写入当前 Workspace,`sourceIds` 可为空,dataset 的 `codeRefs` 使用本次成功执行返回的实际引用。
|
|
36
|
+
|
|
37
|
+
## 导出 CSV 或 JSON
|
|
38
|
+
|
|
39
|
+
仅在用户要求实际文件时执行;`result` 是本次调用内已计算的 DataFrame。使用当前绑定 Workspace 的实际路径,不把附件路径当输出目录。
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
from pathlib import Path
|
|
43
|
+
|
|
44
|
+
output_dir = Path("/actual/workspace/exports")
|
|
45
|
+
output_dir.mkdir(parents=True, exist_ok=True)
|
|
46
|
+
csv_path = output_dir / "summary.csv"
|
|
47
|
+
result.to_csv(csv_path, index=False)
|
|
48
|
+
# 用户要求 JSON 时可改为:
|
|
49
|
+
# json_path = output_dir / "summary.json"
|
|
50
|
+
# result.to_json(json_path, orient="records", force_ascii=False)
|
|
51
|
+
print(str(csv_path.resolve()))
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
执行成功后,将实际输出路径交给当前 Harness 原生 `present`(参数以当前工具契约为准):
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{"files":[{"path":"/actual/workspace/exports/summary.csv","description":"按类别汇总的金额"}]}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
无需加载展示 Skill 或调用 `marivo_present`。只交付用户要求的文件;当前没有 `present` 时报告已生成文件的准确路径和原生交付能力缺失。
|
|
61
|
+
|
|
62
|
+
## 导出 PNG
|
|
63
|
+
|
|
64
|
+
不要假设 Runtime 安装了 matplotlib 或 Pillow。以下标准库示例生成无文字的简单条形缩略图,适用于用户明确要求 PNG;颜色、顺序、数值和分析范围应在回复中说明。复杂交互图表使用展示 Skill。
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
from pathlib import Path
|
|
68
|
+
import struct
|
|
69
|
+
import zlib
|
|
70
|
+
|
|
71
|
+
# 替换为本次分析得出的非负数值;依次为 A、B、C。
|
|
72
|
+
values = [11, 23, 37]
|
|
73
|
+
width, height = 240, 120
|
|
74
|
+
pixels = bytearray([255] * (width * height * 3))
|
|
75
|
+
for index, value in enumerate(values):
|
|
76
|
+
bar_height = round(value / max(values, default=1) * 100) if max(values, default=0) else 0
|
|
77
|
+
for y in range(height - 10 - bar_height, height - 10):
|
|
78
|
+
for x in range(20 + index * 70, 60 + index * 70):
|
|
79
|
+
offset = (y * width + x) * 3
|
|
80
|
+
pixels[offset:offset + 3] = bytes((45, 110, 210))
|
|
81
|
+
def chunk(kind, data):
|
|
82
|
+
return struct.pack(">I", len(data)) + kind + data + struct.pack(">I", zlib.crc32(kind + data))
|
|
83
|
+
rows = b"".join(b"\x00" + pixels[y * width * 3:(y + 1) * width * 3] for y in range(height))
|
|
84
|
+
png = (b"\x89PNG\r\n\x1a\n"
|
|
85
|
+
+ chunk(b"IHDR", struct.pack(">IIBBBBB", width, height, 8, 2, 0, 0, 0))
|
|
86
|
+
+ chunk(b"IDAT", zlib.compress(rows)) + chunk(b"IEND", b""))
|
|
87
|
+
output = Path("/actual/workspace/exports/amounts.png")
|
|
88
|
+
output.parent.mkdir(parents=True, exist_ok=True)
|
|
89
|
+
output.write_bytes(png)
|
|
90
|
+
print(str(output.resolve()))
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
成功后通过原生 `present` 交付实际 PNG 路径。文件生成失败不调用 `present`;声明失败仅修复交付,不重新计算。
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dsh-data-analysis-presentation
|
|
3
|
-
description:
|
|
3
|
+
description: 将已有分析结果保存为右侧阅读器中的交互图表、表格、报告、看板或来源面板,并支持报告更新、HTML 导出与按需发布。普通文字、简短聊天表格及 CSV、PNG 文件交付无需此 Skill。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# 分析展示与报告交付
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
本 Skill 负责把已有结果组织为 JSON Draft,通过 `marivo_present` 保存并打开阅读器。分析方法、业务语义、质量与 lineage 由分析流程和 Marivo Runtime 契约拥有;展示不能补造缺失证据。
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## 生成报告
|
|
11
11
|
|
|
12
|
-
1.
|
|
13
|
-
2.
|
|
14
|
-
3.
|
|
15
|
-
4.
|
|
16
|
-
5.
|
|
12
|
+
1. 确认展示目标与已有结果。报告语言遵循用户要求,否则根据问题和上下文决定,不跟随系统界面语言。已有结果可直接展示;缺少计算时,文件分析交给 `dsh-data-analysis-files`,Marivo 分析或建模交给对应 Runtime Skill 与 live Help。只补所需分支。
|
|
13
|
+
2. 选择数据与来源。可恢复 Artifact 用实际 `session.id` 和 `artifact.ref` 引用,按需加 `findingId`,不重复导出。同一问题需要计算后的 DataFrame 时,通过 `marivo_python` 在绑定 Runtime 使用 `dsh_data_analysis_presentation.write_dataset`;纯本地 pandas/原生 DuckDB 传 `datasources: []`,访问 Marivo datasource 才声明其精确名称。文件结果注明文件名与分析范围,关联实际返回的 `codeRef`,不构造 Marivo Artifact 或 Evidence 身份。
|
|
14
|
+
3. 写草稿前读 [schema 与文件边界](references/schema.md)。使用完整 Draft、Workspace 相对路径和实际来源身份;来源事实与 unavailable 状态由 builder 读取。报告、看板及比较型展示还需读 [叙事与证据检查](references/narrative.md),核对展示中的数值、范围、方向、分母和文字与已有结果一致。需要图表时读 [图形配置](references/charts.md),需要起步草稿或 writer 用法时读 [可改写示例](references/examples.md)。
|
|
15
|
+
4. 用普通文件能力在当前 Workspace 写 Draft。手写 computed JSON 时可按 [静态预检](references/schema.md#草稿静态预检)检查结构,再调用 `marivo_present`。成功 receipt 才表示已保存交付;失败按诊断修正草稿或引用,不为修复展示自动重新查询、observe、revalidate 或重放分析。缺失数据交回原分析流程。
|
|
16
|
+
5. 回复主要结论、未完成分支和实质限制,简短说明报告已在右侧 tab 打开;headless 时提供 receipt 的准确路径。保留来源 unavailable、Agent 预筛选与 writer 截断的区别。只声明实际完成的浏览器检查,不把构建成功视为计算或业务结论已验证。
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## 按操作读取
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
- **修改、合并或刷新已有报告**:先读 [报告更新](references/schema.md#报告更新)。基于已读取内容修改完整 Draft,保留用户需要的编辑;成对传入实际 `report_id` 与 `expected_build_id`,保存同一 Report 的新 Build。冲突时读取并核对当前版本,不仅替换 expected ID 重试。
|
|
21
|
+
- **筛选与动态指标**:默认不添加全局筛选。需要共同维度交互时,先读 [全局筛选与动态指标](references/interaction.md),准备所有可选组合所需结果;reader 不重算,缺组合时减少筛选或回到分析流程。
|
|
22
|
+
- **来源与生成代码追问**:简短问题可用 Marivo 公开 Python API 回答;需要来源面板时用 `datasets: []` 与 `source` block。脚本关联方式见 [生成代码](references/schema.md#生成代码),从报告 cell 继续见 [引用恢复](references/schema.md#从报告-cell-引用继续)。已有快照不证明当前数据新鲜度。
|
|
23
|
+
- **离线 HTML 文件**:读 [导出与原生交付](references/export-html.md),使用保存的 Build 导出,再调用原生 `present`。普通报告交付不额外生成 HTML 或附件。
|
|
24
|
+
- **对象存储链接**:用户要求发布时读 [发布报告](references/publishing.md),使用实时可用的 `marivo_publish_report`;成功后返回其确认的 URL。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"schemaVersion":
|
|
2
|
+
"schemaVersion": 2,
|
|
3
3
|
"title": "演示:已有 Artifact 表格",
|
|
4
4
|
"datasets": [
|
|
5
5
|
{
|
|
@@ -13,7 +13,10 @@
|
|
|
13
13
|
"sources": [
|
|
14
14
|
{
|
|
15
15
|
"id": "analysis",
|
|
16
|
-
"ref": {
|
|
16
|
+
"ref": {
|
|
17
|
+
"sessionId": "example-session",
|
|
18
|
+
"artifactRef": "example-artifact"
|
|
19
|
+
}
|
|
17
20
|
}
|
|
18
21
|
],
|
|
19
22
|
"blocks": [
|
|
@@ -22,6 +25,12 @@
|
|
|
22
25
|
"kind": "markdown",
|
|
23
26
|
"text": "演示草稿:请替换实际来源、列名和分析范围。展示最多 100 行,不据此声称全量总计。"
|
|
24
27
|
},
|
|
25
|
-
{
|
|
26
|
-
|
|
28
|
+
{
|
|
29
|
+
"id": "values",
|
|
30
|
+
"kind": "table",
|
|
31
|
+
"datasetId": "result",
|
|
32
|
+
"columns": ["region", "revenue"]
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"locale": "zh-CN"
|
|
27
36
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"schemaVersion":
|
|
2
|
+
"schemaVersion": 2,
|
|
3
3
|
"title": "演示:减少项与其他项抵消后的净变化",
|
|
4
4
|
"datasets": [
|
|
5
5
|
{
|
|
@@ -75,5 +75,6 @@
|
|
|
75
75
|
"datasetId": "full",
|
|
76
76
|
"columns": ["category", "baseline", "current", "delta_current_minus_baseline"]
|
|
77
77
|
}
|
|
78
|
-
]
|
|
78
|
+
],
|
|
79
|
+
"locale": "zh-CN"
|
|
79
80
|
}
|
package/skills/dsh-data-analysis-presentation/references/examples/computed-sources.draft.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"schemaVersion":
|
|
2
|
+
"schemaVersion": 2,
|
|
3
3
|
"title": "演示:computed 的多个声明来源",
|
|
4
4
|
"datasets": [
|
|
5
5
|
{
|
|
@@ -20,7 +20,10 @@
|
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"id": "accounts",
|
|
23
|
-
"ref": {
|
|
23
|
+
"ref": {
|
|
24
|
+
"sessionId": "example-accounts-session",
|
|
25
|
+
"artifactRef": "example-accounts-artifact"
|
|
26
|
+
}
|
|
24
27
|
}
|
|
25
28
|
],
|
|
26
29
|
"blocks": [
|
|
@@ -29,7 +32,11 @@
|
|
|
29
32
|
"kind": "markdown",
|
|
30
33
|
"text": "演示草稿:来源引用需替换为实际引用。声明多个 Artifact 不表示 computed 计算已经过验证;不可恢复的来源由 reader 如实显示。"
|
|
31
34
|
},
|
|
32
|
-
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
{
|
|
36
|
+
"id": "values",
|
|
37
|
+
"kind": "table",
|
|
38
|
+
"datasetId": "quarter"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"locale": "zh-CN"
|
|
35
42
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"schemaVersion":
|
|
2
|
+
"schemaVersion": 2,
|
|
3
3
|
"title": "演示:只读来源面板",
|
|
4
4
|
"datasets": [],
|
|
5
5
|
"sources": [
|
|
6
6
|
{
|
|
7
7
|
"id": "analysis",
|
|
8
|
-
"ref": {
|
|
8
|
+
"ref": {
|
|
9
|
+
"sessionId": "example-session",
|
|
10
|
+
"artifactRef": "example-artifact"
|
|
11
|
+
}
|
|
9
12
|
}
|
|
10
13
|
],
|
|
11
14
|
"blocks": [
|
|
@@ -14,6 +17,11 @@
|
|
|
14
17
|
"kind": "markdown",
|
|
15
18
|
"text": "演示草稿:替换实际引用后,查看生成时可恢复的公开来源事实。"
|
|
16
19
|
},
|
|
17
|
-
{
|
|
18
|
-
|
|
20
|
+
{
|
|
21
|
+
"id": "sources",
|
|
22
|
+
"kind": "source",
|
|
23
|
+
"sourceIds": ["analysis"]
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"locale": "zh-CN"
|
|
19
27
|
}
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
使用 [write-computed.py](examples/write-computed.py) 了解 helper 的完整用法。通过 `marivo_python` 在绑定 Runtime 执行改写后的代码;示例本身只有演示数据,可用 `datasources: []`。代码把文件写入 Workspace 的 `presentation-example/computed.dataset.json`,与 [computed.draft.json](examples/computed.draft.json) 中的路径一致。父目录由 Python 示例创建。已有 computed 文件可直接使用,无需重新计算。
|
|
12
12
|
|
|
13
|
+
文件分析得到的 pandas DataFrame 或原生 DuckDB `.df()` 结果可直接替换示例数据,无需 Marivo datasource 或语义模型。读取指引见 `dsh-data-analysis-files`;草稿正文说明实际文件名、sheet/字段选择及样本或全量范围,`sourceIds` 无 Artifact 时保持空数组,`codeRefs` 关联生成该数据的实际执行引用。
|
|
14
|
+
|
|
13
15
|
[computed.dataset.json](examples/computed.dataset.json) 是该示例的实际 typed JSON 输出,含精确金额、整数和 null;[computed.draft.json](examples/computed.draft.json) 同时展示单值、趋势、分组、原值表格,未声明来源。需要声明多个 Artifact 来源时参考 [computed-sources.draft.json](examples/computed-sources.draft.json),只增加声明与关联,不提交转换信息。无法恢复的声明来源由 present 标记 unavailable,不删除声明来隐藏缺失。
|
|
14
16
|
|
|
15
17
|
将选定草稿写成 `analysis/presentation.draft.json` 后调用:
|
|
@@ -18,7 +20,7 @@
|
|
|
18
20
|
{"draft_path":"analysis/presentation.draft.json"}
|
|
19
21
|
```
|
|
20
22
|
|
|
21
|
-
一个成功的 `marivo_present` 已完成 reader
|
|
23
|
+
一个成功的 `marivo_present` 已完成 reader 构建;离线 HTML 在用户下载时生成;根据 receipt 交付,不能把示例数据解释成用户的真实业务结论。
|
|
22
24
|
|
|
23
25
|
## 比较与抵消项
|
|
24
26
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# 导出完整 HTML
|
|
2
|
+
|
|
3
|
+
用户要求离线 HTML 文件时,调用 `marivo_export_html({"report_id":"实际 Report ID","build_id":"实际 Build ID","output_path":"reports/analysis.html"})`。从成功 receipt 或已读取报告取得身份;基于固定报告上下文时始终传 `build_id`,仅在用户要求当前版本时省略。路径相对于当前 Workspace,必须为新的 `.html` 文件,可自动创建父目录;已有文件不会覆盖,不能写入 `.dsh-data-analysis`。
|
|
4
|
+
|
|
5
|
+
成功后必须使用返回的实际 `path` 调用原生 `present({ files: [{ path, description: "离线 HTML 报告" }] })`,再给出最终回复;不把 JSON 路径当成 HTML,也不以仅提及路径代替文件交付。若当前 Agent 未提供 `present`,如实报告已导出文件和交付能力缺失,不宣称已生成文件卡片。
|
|
6
|
+
|
|
7
|
+
导出复用已保存快照,不访问 Python 或数据源,不更新报告,不包含未保存编辑或临时筛选。需要先修改内容时,先完成报告保存再导出对应 Build。导出不依赖发布配置,也不生成外部 URL;完整报告保留全部已保存筛选组合,不是数据权限隔离副本。
|