dsh-convert-core 0.1.0-alpha.1 → 0.1.0-alpha.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 (2) hide show
  1. package/README.md +11 -15
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -5,15 +5,13 @@
5
5
  它可以**独立运行**,不依赖 DSH。
6
6
 
7
7
  ```bash
8
- pnpm --filter dsh-convert-core build
9
- node packages/dsh-convert-core/bin/tita-convert.mjs --port 8787
8
+ npm install dsh-convert-core
9
+ npx tita-convert --port 8787
10
10
  # → http://127.0.0.1:8787/
11
11
  ```
12
12
 
13
- DSH 侧只是它的再封装,见
14
- [`plugins/dsh-data-domain-knowledge/src/convert`](../../plugins/dsh-data-domain-knowledge/src/convert/host.ts)
15
- (0018 起转换宿主是 knowledge 插件的子模块,内核仍是本包,并以 `optionalDependencies`
16
- 的形式被懒加载)。
13
+ DSH 侧只是它的再封装:`dsh-data-domain-knowledge` 把本包当 `optionalDependency` 懒加载,
14
+ 设置项、Agent 工具与 `/convert` 路由在那边,解析逻辑全在这里。
17
15
 
18
16
  ## 引擎:@firecrawl/anydoc
19
17
 
@@ -66,23 +64,22 @@ convert-out/<taskId>/
66
64
  manifest.json 来源、引擎与格式、warnings、content_hash、ingest 负载
67
65
  ```
68
66
 
69
- front matter 与知识录入(0013)对齐:`title / created_at / updated_at` 必填,
67
+ front matter 与知识录入契约对齐:`title / created_at / updated_at` 必填,
70
68
  `external_id / source_format / content_hash / parser / source_path /
71
69
  source_type_source / source_type_candidates` 由内核如实填写。
72
70
 
73
71
  **内核不决定 `source_type`**。它只给出候选(`source_type_candidates`),并在
74
- `manifest.ingest.sourceTypeRequired` 上写明"还没人分类"。这是 0013 的边界。
72
+ `manifest.ingest.sourceTypeRequired` 上写明"还没人分类" —— 分类由入库方决定。
75
73
 
76
74
  ## 范围
77
75
 
78
- 文档类**只做文件类**;网页链接仍在
79
- [`issues/0017-网页与视频转换能力.md`](../../issues/0017-网页与视频转换能力.md)。
76
+ 文档类**只做文件类**:网页链接不在范围内。
80
77
  **本地音视频与图片(`iddoc`)、扫描件轻量 OCR(`scanned`)已落地**;版面/表格/公式级的
81
- 高质量扫描档(docling / MinerU)仍是 0017 的可选档。
78
+ 高质量扫描档(docling / MinerU)还没做。
82
79
 
83
80
  `needsOcr` 是文档线划在哪里的地方:扫描版 PDF 在默认路径上会**明确失败**,并把错误建议指向
84
81
  `scanned` 档(或 `SCANNED_OCR=1`),而不是悄悄改成云端 OCR。特别地,**不使用 anydoc 的
85
- `ocr: 'hosted'`** —— 它会把整份文档发往 Firecrawl Parse 云端,与 0015 的本地优先原则冲突。
82
+ `ocr: 'hosted'`** —— 它会把整份文档发往 Firecrawl Parse 云端,与本包「本地优先」的取舍冲突。
86
83
 
87
84
  ## 适配器
88
85
 
@@ -134,9 +131,8 @@ curl -X POST "localhost:8787/api/tasks?kind=file" -F "file=@spec.docx"
134
131
  lucide 图标集由 `scripts/vendor.mjs` 在构建时从 npm 包拷成静态资源(图标以纯 SVG map
135
132
  注入,避免 `createIcons()` 在 Vue 背后替换 DOM 节点)。
136
133
 
137
- 之所以不用 SPA 工具链:内核必须能被 `node bin/tita-convert.mjs` 直接拉起,并且
138
- DSH 插件要把它当静态页原样挂载。代价是没有 shadcn/Tailwind;DSH 侧的 React 面板
139
- 用 `@tita-data-agent/ui` 的 shadcn 封装(见 AGENTS.md 的组件约定)。
134
+ 之所以不用 SPA 工具链:内核必须能被 `npx tita-convert` 直接拉起,并且
135
+ DSH 插件要把它当静态页原样挂载。代价是没有 shadcn/Tailwind。
140
136
 
141
137
  ## 设计取舍
142
138
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-convert-core",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "0.1.0-alpha.2",
4
4
  "description": "Standalone conversion kernel: file / url / video / text to knowledge-ready Markdown + local assets, with an HTTP API and a Vue 3 (Options API) console. The local media pipeline (audio/video/image → Markdown, subtitles first, optional local ASR/OCR) is built in under src/media/ — it used to be its own package.",
5
5
  "type": "module",
6
6
  "main": "lib/server.js",