dsh-data-domain-knowledge 0.1.0-alpha.5 → 0.1.0-alpha.8

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 (72) hide show
  1. package/README.md +3 -2
  2. package/cordis.patch.yml +10 -6
  3. package/eval/datasets/diagnosis-cases/cases.md +899 -0
  4. package/lib/client.js +5180 -4294
  5. package/lib/doc-page.js +18 -11
  6. package/lib/types/convert/host.d.ts.map +1 -1
  7. package/lib/types/convert/host.js +6 -24
  8. package/lib/types/convert/host.js.map +1 -1
  9. package/lib/types/fts.d.ts +2 -3
  10. package/lib/types/fts.d.ts.map +1 -1
  11. package/lib/types/index.d.ts.map +1 -1
  12. package/lib/types/index.js +146 -0
  13. package/lib/types/index.js.map +1 -1
  14. package/lib/types/layout.d.ts +4 -2
  15. package/lib/types/layout.d.ts.map +1 -1
  16. package/lib/types/layout.js +4 -2
  17. package/lib/types/layout.js.map +1 -1
  18. package/lib/types/oplog.d.ts +98 -0
  19. package/lib/types/oplog.d.ts.map +1 -0
  20. package/lib/types/oplog.js +178 -0
  21. package/lib/types/oplog.js.map +1 -0
  22. package/lib/types/runtime.d.ts +59 -0
  23. package/lib/types/runtime.d.ts.map +1 -1
  24. package/lib/types/runtime.js +236 -9
  25. package/lib/types/runtime.js.map +1 -1
  26. package/lib/types/types.d.ts +69 -1
  27. package/lib/types/types.d.ts.map +1 -1
  28. package/lib/types/types.js.map +1 -1
  29. package/package.json +25 -25
  30. package/preset/tita-data-agent/agent.cordis.yml +10 -6
  31. package/src/client/AgentPresetCard.tsx +1 -1
  32. package/src/client/CompileDialogs.tsx +219 -0
  33. package/src/client/ExpansionGraph.tsx +252 -0
  34. package/src/client/ImportFilesDialog.tsx +273 -0
  35. package/src/client/IntentTab.tsx +1 -1
  36. package/src/client/KnowledgeBaseTab.tsx +595 -220
  37. package/src/client/KnowledgeGraphView.tsx +328 -115
  38. package/src/client/KnowledgePanel.tsx +9 -2
  39. package/src/client/KnowledgeStepRail.tsx +8 -2
  40. package/src/client/KnowledgeToolRow.tsx +298 -124
  41. package/src/client/ListPager.tsx +81 -0
  42. package/src/client/NodeSettings.tsx +2 -2
  43. package/src/client/OperationLogTab.tsx +279 -0
  44. package/src/client/PreviewSections.tsx +92 -49
  45. package/src/client/RecallPanel.tsx +237 -67
  46. package/src/client/RelatedGraph.tsx +221 -0
  47. package/src/client/TypeDefinitionDrawer.tsx +51 -17
  48. package/src/client/WikiCardPreview.tsx +116 -0
  49. package/src/client/WikiCardRow.tsx +114 -0
  50. package/src/client/WikiTypeEditor.tsx +39 -40
  51. package/src/client/agent-preset.ts +1 -1
  52. package/src/client/architecture.tsx +1 -1
  53. package/src/client/asset-images.ts +30 -3
  54. package/src/client/attribution/AttributionGraph.tsx +1 -1
  55. package/src/client/convert/ConvertPanel.tsx +3 -30
  56. package/src/client/doc-page.tsx +3 -4
  57. package/src/client/graph/edges.ts +63 -0
  58. package/src/client/graph/expansion.ts +71 -0
  59. package/src/client/graph/layout.ts +128 -25
  60. package/src/client/graph/related.ts +235 -0
  61. package/src/client/graph.css +17 -21
  62. package/src/client/ledger.tsx +436 -0
  63. package/src/client/styles.css +602 -70
  64. package/src/client/useFitScale.ts +7 -1
  65. package/src/convert/host.ts +6 -24
  66. package/src/fts.ts +2 -2
  67. package/src/index.ts +134 -0
  68. package/src/layout.ts +4 -2
  69. package/src/oplog.ts +214 -0
  70. package/src/python/embedding_worker.py +1 -1
  71. package/src/runtime.ts +273 -9
  72. package/src/types.ts +68 -1
package/README.md CHANGED
@@ -194,14 +194,15 @@ BERT 重排默认使用 `BAAI/bge-reranker-base`;如需完全离线,可把
194
194
  运行),底层是 `@firecrawl/anydoc`(MIT / Rust / 预编译绑定),支持 doc、docx、ppt、
195
195
  pptx、xls、xlsx、odt、ods、odp、rtf、epub、csv 与文本层 PDF;另有本地音视频/图片
196
196
  (`iddoc`)、扫描件轻量 OCR(`scanned`:`.pdf` 报 `needsOcr` 时**自动兜底**)与
197
- 网页 / 微信公众号文章(`web`:`kind=url` 抓链接,`.html/.htm` 收另存下来的页面)。
197
+ 网页 / 微信公众号文章(`web`:收另存到本机的 `.html/.htm` 页面,从 `og:url` / `canonical`
198
+ 把原始地址找回来;内核不联网,`kind=url` 已从契约删除)。
198
199
 
199
200
  | 项 | 值 |
200
201
  | --- | --- |
201
202
  | 工具 | `convert_capabilities` / `convert_source` / `convert_task` / `convert_ingest`(后两个写操作需本轮审批) |
202
203
  | 路由 | `/convert/**`(含内核 Vue3 控制台) |
203
204
  | 设置命名空间 | `tita-data-agent-convert`(冻结契约,由本插件安装) |
204
- | 交付目录 | `~/.tita-data-agent/convert-out/<taskId>/`(`index.md` / `assets/` / `manifest.json`) |
205
+ | 交付目录 | `<工作区>/output/<YYYY-MM-DD>/<中文名>/`(`index.md` / `assets/` / `manifest.json`);叶子名取文档标题,同名让路 `-2` |
205
206
 
206
207
  **依赖是可选的。** `dsh-convert-core` 声明在 `optionalDependencies`,首次调用时才加载。
207
208
  平台没有 anydoc 预编译绑定、或用户显式不装时,
package/cordis.patch.yml CHANGED
@@ -92,8 +92,9 @@
92
92
  a `table` card says what one row means. Computing without the definition gets
93
93
  you a number nobody agreed to.
94
94
 
95
- - **Conversion.** `convert_source` turns a file, a web page or a video into
96
- knowledge-ready Markdown and says where it landed. It is not knowledge until
95
+ - **Conversion.** `convert_source` turns a local file (including a web page
96
+ saved to disk as `.html`) or a video into knowledge-ready Markdown and says
97
+ where it landed. It never fetches a URL itself. It is not knowledge until
97
98
  `convert_ingest` has run, so keep saying which of the two steps you are on.
98
99
 
99
100
  ## Working rules
@@ -147,10 +148,13 @@
147
148
  9. **Deliverables belong to the project, not to your home.** Write every file
148
149
  you produce for the user under `output/<YYYY-MM-DD>/` in your working
149
150
  directory, never into the Agent root: the Agent root accumulates across
150
- projects, a deliverable belongs to one. Name it `<topic>-<kind>.<ext>` where
151
- `<kind>` is exactly one of `报告`, `图表`, `数据集`, `清洗脚本`, `SQL` — the
152
- name alone has to say what the file is a year later. Append `-2`, `-3` rather
153
- than overwriting, and say the path in your answer.
151
+ projects, a deliverable belongs to one. Name the file `<中文名>.<ext>` — at
152
+ most 25 characters, keeping 汉字, letters, digits, `-`, `_` and `.`, and
153
+ turning spaces and punctuation into `-` (so `销售汇总` stays `销售汇总`, and
154
+ you write `月度销售汇总.xlsx`, not `output1.xlsx`). **Do not repeat the date
155
+ in the file name**: the directory already carries it, and the name alone has
156
+ to say what the file is a year later. Append `-2`, `-3` rather than
157
+ overwriting, and say the path in your answer.
154
158
 
155
159
  ## How to write
156
160