@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
|
@@ -24,7 +24,7 @@ Top N、过滤或预聚合必须说明选取规则、排序方向与覆盖范围
|
|
|
24
24
|
|
|
25
25
|
先给已经得到的主要结论,再放最能支撑它的数据和比较。结论尚未成立时说明现有证据和缺口,不用图形复杂度替代分析。
|
|
26
26
|
|
|
27
|
-
正文使用 markdown,关键单值用 metric,变化或比较用 line/bar,需要核对原值时用 table
|
|
27
|
+
正文使用 markdown,关键单值用 metric,变化或比较用 line/bar,需要核对原值时用 table。各图表、表格和指标的数据源入口提供精确 Artifact 和公开事实,报告末尾默认不再添加独立的数据源段落或 `source` block;用户明确要求独立来源面板时再添加。保留 dataset 的来源声明与关联;只为当前问题读取必要 Finding,不强制遍历整个 SessionGraph。
|
|
28
28
|
|
|
29
29
|
## 看板
|
|
30
30
|
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
# 草稿 schema 与文件边界
|
|
2
2
|
|
|
3
|
-
这是插件的
|
|
3
|
+
这是插件的 Draft v2 写入契约。所有对象只接受列出的字段;不要把生成文档或 receipt 当作草稿。Marivo 的分析 API 与 semantic schema 以 bound Runtime 的 Skill 和 live Help 为准。
|
|
4
|
+
|
|
5
|
+
## 报告语言与版本
|
|
6
|
+
|
|
7
|
+
报告展示语言由 Draft 的 `locale` 决定,Document 使用 `schemaVersion: 3` 并原样保留语言。系统语言仅控制插件操作界面。保存、重开、打印和离线 HTML 均保持报告语言;用户要求改语言时更新完整 Draft,并按既有并发保存契约生成新 Build。旧 Draft v1、Document v2 或缺少语言的报告不受支持,必须重新生成;不修改已有不可变 Build。
|
|
4
8
|
|
|
5
9
|
## 顶层与引用
|
|
6
10
|
|
|
7
|
-
顶层必须有 `schemaVersion:
|
|
11
|
+
顶层必须有 `schemaVersion: 2`、`locale: "zh-CN" | "en-US"`、非空 `title`、`datasets`、`sources`、`blocks`。即使没有 dataset 或来源,也保留空数组;至少一个 block。datasets、sources、blocks 各自的 `id` 不重复,所有引用必须存在。
|
|
8
12
|
|
|
9
13
|
| 对象 | 必填字段 | 可选字段 |
|
|
10
14
|
| --- | --- | --- |
|
|
@@ -16,6 +20,26 @@
|
|
|
16
20
|
|
|
17
21
|
`draft_path` 与 computed 的 `path` 均相对于当前绑定 Workspace 根目录,**不是相对于草稿文件目录**。使用根目录内的 JSON 文件;不使用绝对路径、`..`、`.` 路径段、反斜杠、空路径段或通向 Workspace 外的符号链接。不从其他项目、解释器或数据源补齐失败的引用。
|
|
18
22
|
|
|
23
|
+
## 从报告 cell 引用继续
|
|
24
|
+
|
|
25
|
+
Ask DSH 与离线复制提供所属 Workspace、Report ID、实际显示的 Build ID、Cell ID,以及
|
|
26
|
+
相对于该 Workspace 的固定 Build `presentation.json` 路径。先用普通文件读取该路径,核对身份,
|
|
27
|
+
再按 `blocks[].id` 定位 cell;正文、数据、单位、精确值、比较和来源限制均从文件读取,不依赖旧对话。
|
|
28
|
+
`Workspace`、`Cell` 和 `Prepared view` 的字段值使用 JSON 字符串编码;先按 JSON 解码再精确匹配,
|
|
29
|
+
保留 ID 中的换行、引号和反斜杠,不取首行、不做 trim。`Report title` 仅为辅助标题,不参与身份匹配。
|
|
30
|
+
文件较长时按读取工具的分页提示继续;单行被截断时使用已有 Workspace 文件能力定向读取 JSON 字段,
|
|
31
|
+
不将截断内容当成完整文档。路径属于原 Workspace,单独分享 HTML 不授予访问原文件的能力。
|
|
32
|
+
|
|
33
|
+
引用的 Filters 按 filter ID 与 option ID 匹配该 Build 的 `interaction.slices`,从对应 dataset 的
|
|
34
|
+
`rowIndices` 取已有数据。Prepared view 按目标 chart 的 `preparedViews[].id` 读取;若附有
|
|
35
|
+
Current chart view override,则替换显示配置,再应用 Hidden series。Table sort 只改变显示顺序;
|
|
36
|
+
表格引用包含全部筛选结果,不限当前分页。未附覆盖时沿用保存配置。这些均为临时显示状态,不能宣称已保存。
|
|
37
|
+
|
|
38
|
+
解释时以引用 Build 为准,不能静默换成 current。修改时还需按下面的报告更新契约读取 current,
|
|
39
|
+
比较引用与当前内容,保留已有编辑;有歧义时澄清具体修改目标,不能只替换 expected ID 重试。
|
|
40
|
+
临时探索状态只有在用户要求保存或据此修改时才进入修改范围。目标 Workspace 或文件不可访问时明确说明,
|
|
41
|
+
不猜测其他报告、不通过重新查询或执行分析补齐。
|
|
42
|
+
|
|
19
43
|
## 报告更新
|
|
20
44
|
|
|
21
45
|
新建报告调用 `marivo_present({ draft_path })`。修改已有报告时使用:
|
|
@@ -39,6 +63,9 @@ marivo_present({ draft_path, report_id, expected_build_id })
|
|
|
39
63
|
再以该已读取版本提交;不能只替换 expected ID 重试。响应丢失时也先读取 current 核对内容,避免重复提交。
|
|
40
64
|
已有 Report 之间不自动合并,历史 Build 不覆盖或清理。
|
|
41
65
|
|
|
66
|
+
用户可在宿主阅读器编辑呈现并保存同一报告,支持 cell 移动、删除(可删空)及撤销。读取当前保存内容
|
|
67
|
+
后保留用户需要的编辑;固定 Build 链接与离线 HTML 保留原快照。筛选选择只是临时展示,不进入保存或下载。
|
|
68
|
+
|
|
42
69
|
## 生成代码
|
|
43
70
|
|
|
44
71
|
`marivo_python` 成功执行后自动保存该次提交的 Python 原文,并在结果中返回 `codeRef: {executionId, sha256}`。
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare function PresentationCards({ matched, sessionId, workspaces, model }: {
|
|
2
|
-
matched: any;
|
|
3
|
-
sessionId: any;
|
|
4
|
-
workspaces: any;
|
|
5
|
-
model: any;
|
|
6
|
-
}): import("react").JSX.Element | null;
|
|
7
|
-
export declare function PresentationOverlay({ model, sessionId, workspaceId, workspaceUnavailable, openSemanticObject, onAskDsh, }: {
|
|
8
|
-
model: any;
|
|
9
|
-
sessionId: any;
|
|
10
|
-
workspaceId: any;
|
|
11
|
-
workspaceUnavailable?: boolean | undefined;
|
|
12
|
-
openSemanticObject: any;
|
|
13
|
-
onAskDsh: any;
|
|
14
|
-
}): import("react").JSX.Element | null;
|
|
15
|
-
export declare function installPresentation(ctx: any, rpc: any, openSemanticObject: any): void;
|