knowpool 0.0.0-stage → 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 (58) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +101 -2
  3. package/bin/knowpool.mjs +150 -0
  4. package/docs/DESIGN.md +111 -0
  5. package/docs/NAMING.md +65 -0
  6. package/docs/PROTOCOL.md +146 -0
  7. package/docs/ROADMAP.md +33 -0
  8. package/docs/architecture/BUILD.md +36 -0
  9. package/docs/architecture/README.md +125 -0
  10. package/docs/architecture/mermaid.json +18 -0
  11. package/docs/architecture/print.css +58 -0
  12. package/docs/architecture/print.py +121 -0
  13. package/docs/architecture/sources/evidence.mmd +13 -0
  14. package/docs/architecture/sources/export.mmd +11 -0
  15. package/docs/architecture/sources/review.mmd +12 -0
  16. package/docs/architecture/sources/sync.mmd +18 -0
  17. package/docs/architecture/sources/system.mmd +13 -0
  18. package/docs/architecture/sources/team.mmd +14 -0
  19. package/docs/architecture/sources/vaults.mmd +14 -0
  20. package/docs/architecture/svg/evidence.svg +1 -0
  21. package/docs/architecture/svg/export.svg +1 -0
  22. package/docs/architecture/svg/review.svg +1 -0
  23. package/docs/architecture/svg/sync.svg +1 -0
  24. package/docs/architecture/svg/system.svg +1 -0
  25. package/docs/architecture/svg/team.svg +1 -0
  26. package/docs/architecture/svg/vaults.svg +1 -0
  27. package/docs/design-history/README.md +25 -0
  28. package/docs/design-history/icons/kbloom.svg +1 -0
  29. package/docs/design-history/icons/knowary.svg +1 -0
  30. package/docs/design-history/icons/knowcommit.svg +1 -0
  31. package/docs/design-history/icons/knowcrate.svg +1 -0
  32. package/docs/design-history/icons/knowmill.svg +1 -0
  33. package/docs/design-history/icons/lorekiln.svg +1 -0
  34. package/docs/design-history/icons/loreparcel.svg +1 -0
  35. package/docs/design-history/icons/loreyard.svg +1 -0
  36. package/docs/design-history/icons/zhicang.svg +1 -0
  37. package/docs/design-history/original-layouts.md +100 -0
  38. package/examples/demo.mjs +54 -0
  39. package/examples/review.html +10 -0
  40. package/package.json +13 -4
  41. package/skills/knowpool/SKILL.md +16 -0
  42. package/src/contexts.mjs +44 -0
  43. package/src/export.mjs +107 -0
  44. package/src/extract.py +68 -0
  45. package/src/io.mjs +129 -0
  46. package/src/notes.mjs +132 -0
  47. package/src/pr.mjs +32 -0
  48. package/src/setup.mjs +63 -0
  49. package/src/sources.mjs +136 -0
  50. package/src/storage.mjs +87 -0
  51. package/src/vault.mjs +78 -0
  52. package/src/versioning.mjs +198 -0
  53. package/test/adapters.test.mjs +60 -0
  54. package/test/audit.test.mjs +129 -0
  55. package/test/fixtures/two-pages.pdf +87 -0
  56. package/test/release.test.mjs +126 -0
  57. package/test/support.mjs +56 -0
  58. package/test/workflow.test.mjs +193 -0
@@ -0,0 +1,33 @@
1
+ # 开发与验收计划
2
+
3
+ `0.1.0-alpha.2` 面向个人资料和小团队试用,使用协议 `format: 1`。可下载的安装包在 GitHub Release,npm 的 `alpha` 标签由发布者批准后生效,开发与问题跟踪在产品 GitHub 仓。软件版与知识数据协议独立演进。
4
+
5
+ ## 已实现的工程范围
6
+
7
+ | 事项 | 可重放的验收 |
8
+ | --- | --- |
9
+ | 首次使用 | `setup` 新建或克隆知识仓、验证归属、安装项目 Skill,并返回工具诊断。重复运行会复用仓 ID |
10
+ | 原件和证据 | 网页段落、PDF 物理页、文本行对应同一内容哈希。SQLite 在线备份在 WAL 已开启时仍能生成独立只读的快照 |
11
+ | 修订和授权 | 本地草稿绑定正文、目标仓和旧版本。两个并发写者最多接受一份冲突修订;团队 main 用于默认阅读 |
12
+ | 可读导出 | 新目录带 HTML 索引、Markdown、原件和 CSV 清单。导出同名中文文件时可区分内容,遇缺件不落下半份导出 |
13
+ | 远端与恢复 | 固定 Git 提交,先回读 Drive 原件,再普通推送。快进之前先取齐并核对目标原件。测试覆盖错字节、分叉和历史恢复 |
14
+ | 团队与多仓 | 已发布分支可从 CLI 创建 GitHub PR;元数据检查可在只读 CI 中执行。本地仓别名绑定仓 ID,跨仓搜索逐仓返回结果及局部错误 |
15
+ | 分发 | npm 包包含 CLI、可选适配器、Skill、示例和文档。源码仓的 GitHub Actions 在 Node 22、24 上执行测试、演示与打包 |
16
+
17
+ ## 复测方法
18
+
19
+ 在源码根目录运行 `npm ci --offline --ignore-scripts`、`npm test`、`npm run demo` 和 `npm pack --dry-run`。完整适配器测试需要 Python 3、Poppler、rclone。GitHub Actions 的测试流水线安装这些组件。发布验收另外从 tarball 或 Registry 安装到空目录,检查安装的 CLI 版本与 SHA-512 完整性。
20
+
21
+ 云端检查使用专门的私有知识仓和合成原件。作者以贡献分支提交笔记,上传后从 Drive 独立下载 SHA-256 对应的对象,再推 Git。读者在新的检出目录恢复,打开 HTML 段落和 PDF 页,逐件比较字节。托管 PR 的检查与人类审核各留自己的记录。
22
+
23
+ ## 试点与下个版本
24
+
25
+ | 阶段 | 工作与负责人 | 估算 / 通过条件 |
26
+ | --- | --- | --- |
27
+ | 个人试用 | 产品维护者找 3 名首次用户,记录首次安装、授权和生成带引草稿的耗时 | 2–3 人日;目标中位数 ≤5 分钟,记录每次卡住的位置 |
28
+ | 证据样本 | 领域作者提供有使用权的 20 条真实材料,审阅者在阅读器逐条核对定位与语义 | 2–4 人日;目标 20/20,缺乏支持的结论留作草稿 |
29
+ | 团队试点 | 两名独立成员在组织拥有的 Git 和共享存储空间验证审核、撤权、移交及独立设备恢复 | 3–5 人日;未合并内容在默认搜索中为 0,移交后仍能从原件复核每条结论 |
30
+ | Beta | 存储维护者测量大文件、历史规模与限流重试,补可续传验证记录;评测更多客户端 | 5–8 人日;断网或校验失败时零次提前前移 Git ref,恢复后逐件哈希一致 |
31
+ | 稳定版 | 发布维护者验证升级、迁移预览、回退、支持矩阵和发行说明 | 2–4 人日加观察期;从干净环境安装发行包并复现全流程 |
32
+
33
+ 各项工期按一名熟悉 Git 和 Node 的开发者估算。用户计时、领域语义审核与两名真实成员的试用需要实际参与者。后续再根据试点证据选择 OCR、Office 定位、批量归档、QMD、MCP 或其他存储适配器。
@@ -0,0 +1,36 @@
1
+ # 维护架构图册
2
+
3
+ `README.md` 保存七张图的读者问题、解释与实现链接。`sources/` 中的 Mermaid 是架构图源,`svg/` 中的对应文件可直接在 GitHub、本地浏览器及离线 PDF 中阅读。历史文本图和九份候选 SVG 归档在相邻的 `design-history/` 目录。
4
+
5
+ ## 更新一张图
6
+
7
+ 从产品仓根目录进入 `docs/architecture`。文档制图使用 `@mermaid-js/mermaid-cli` 12.2.0。以下示例重建同步时序图,`npx` 将制图工具放在 npm 工具缓存中。
8
+
9
+ ```sh
10
+ cd docs/architecture
11
+ npx --yes --package=@mermaid-js/mermaid-cli@12.2.0 mmdc \
12
+ -i sources/sync.mmd -o svg/sync.svg -c mermaid.json \
13
+ -I knowpool-sync -b white --no-font-embed
14
+ ```
15
+
16
+ 已安装 `mmdc` 时也可一次重建全部矢量图。可通过 `PUPPETEER_EXECUTABLE_PATH` 指向已有的 Chrome 或 Chromium 可执行文件。生成环境需要有能显示中文的系统字体。
17
+
18
+ ```sh
19
+ for source in sources/*.mmd; do
20
+ name=$(basename "$source" .mmd)
21
+ mmdc -i "$source" -o "svg/$name.svg" -c mermaid.json \
22
+ -I "knowpool-$name" -b white --no-font-embed
23
+ done
24
+ ```
25
+
26
+ 每张图在 `.mmd` 中包含 `accTitle` 与 `accDescr`,导出的 SVG 自带标题与无障碍说明。正文图片的替代文字另存于 README。加入新图时沿用现有小节结构,正文按问题、图、两段解释和相关链接排列。
27
+
28
+ ## 生成离线 PDF
29
+
30
+ 在同一目录运行 `python3 print.py`。工具使用 Python 3.9+ 标准库和 Chrome 或 Chromium 的打印功能,将架构解读、原始目录树与原始图标合为 `knowpool-architecture.pdf`。可用 `--chrome` 指定浏览器可执行文件。制图使用独立的临时浏览器配置。PDF 随 Git 仓保存,npm 安装包收录体积较小的矢量图与图源。
31
+
32
+ ```sh
33
+ python3 print.py
34
+ ```
35
+
36
+ 提交前打开 PDF 核对中文、箭头、页边和链接。对涉及命令行为的改动,从仓根运行 `npm test` 与 `npm run demo`。本册用的两份语音试点原件见[网页快照](../../examples/review.html)和[双页 PDF](../../test/fixtures/two-pages.pdf)。[Mermaid CLI](https://github.com/mermaid-js/mermaid-cli) · [图表无障碍语法](https://mermaid.js.org/config/accessibility.html)
@@ -0,0 +1,125 @@
1
+ # KnowPool 架构图册
2
+
3
+ 图册绘制于 `0.1.0-alpha.1`,适用于 `0.1.0-alpha.2` 的知识仓协议 `format: 1`。第一次了解产品可以先读组件图,再跟着语音试点样本,从笔记追到网页和 PDF 的原文。带图的离线版可直接转交给团队。
4
+
5
+ [下载离线图册(PDF)](https://raw.githubusercontent.com/chicogong/knowpool/main/docs/architecture/knowpool-architecture.pdf) · [全流程设计](../DESIGN.md) · [讨论原稿与候选图标](../design-history/README.md)
6
+
7
+ | 想了解的流程 | 图解 |
8
+ | --- | --- |
9
+ | 一句“把这份复盘存下来”会经过哪些组件? | [组件与数据归属](#system) |
10
+ | 怎样核对“32 段录音,端点阈值 450 毫秒”这句话? | [从结论追到原件](#evidence) |
11
+ | 审阅之后,提案或原笔记又变了会怎样? | [草稿、基线与批准](#review) |
12
+ | 作者已经批准,团队成员什么时候能搜到这次更新? | [团队 PR 与默认知识](#team) |
13
+ | 怎样避免 Git 中已经看到笔记,云盘却找不到原件? | [远端同步与恢复](#sync) |
14
+ | 同时检索个人、项目和团队,写回时如何选中正确的仓? | [多仓检索与权限](#vaults) |
15
+ | 接手人只有一个普通文件夹,也能从笔记打开原件吗? | [离线导出与移交](#export) |
16
+
17
+ <a id="system"></a>
18
+
19
+ ## 组件与数据归属
20
+
21
+ 一句“把这份复盘存下来”会经过哪些组件?
22
+
23
+ ![Agent 和用户调用 CLI,笔记和清单进入 Git,按哈希存储的原件通过 rclone 写入 Drive。](svg/system.svg)
24
+
25
+ 用户选定知识仓,Agent 按项目 Skill 提炼内容,CLI 负责文件、摘要、Git 操作和校验。也可以从终端直接操作。知道仓路径与 Git 版本就能定位笔记。
26
+
27
+ Git 记录笔记、来源清单和历史。原件保存在本机的内容寻址存储(CAS),需要远端备份时按仓同步到 Drive。拿到仓的阅读权与拿到云盘原件的访问权是两个独立授权。
28
+
29
+ [可编辑图源](sources/system.mmd) · [命令入口](../../bin/knowpool.mjs) · [存储适配器](../../src/storage.mjs) · [从源码复测](../../README.md#从源码验证)
30
+
31
+ <a id="evidence"></a>
32
+
33
+ ## 从结论追到原件
34
+
35
+ 怎样核对“32 段录音,端点阈值 450 毫秒”这句话?
36
+
37
+ ![一条笔记通过来源 ID、段落号或页码,分别指向网页和 PDF 的固定版本。](svg/evidence.svg)
38
+
39
+ 沿笔记的 `sources` 找来源 ID 与定位,再查清单中的原文件名、大小和 SHA-256。`source read` 先核对字节,再提取 `para:N`、`page:N` 或 `line:N`。同名文件换了内容,会得到新的来源 ID。
40
+
41
+ 用随仓样本核对时,网页第 2 段给出样本数和阈值,PDF 第 2 页只确认样本数。网页第 3 段注明错误率尚未测量,审阅者据此保留生产选型问题。
42
+
43
+ [可编辑图源](sources/evidence.mmd) · [网页原件](../../examples/review.html) · [PDF 原件](../../test/fixtures/two-pages.pdf) · [来源协议](../PROTOCOL.md#来源引用与正式知识)
44
+
45
+ <a id="review"></a>
46
+
47
+ ## 草稿、基线与批准
48
+
49
+ 审阅之后,提案或原笔记又变了会怎样?
50
+
51
+ ![预览展示旧文、拟议正文和证据。批准时检查摘要和基线,过时的提案返回重新审阅或起草。](svg/review.svg)
52
+
53
+ `draft create` 把仓 ID、笔记 ID、旧版本摘要和拟议全文写入本地草稿。`draft show` 展示旧文、拟议全文、证据及本次 `digest`。批准后,个人仓读工作区,团队仓的改动留在贡献分支。
54
+
55
+ 若信封字节改变,`approve` 返回 `REVIEW_CHANGED`,需要重新预览。若另一人已改动原笔记,返回 `STALE`,要依据新版本重建草稿。重复批准同一份已落地的内容会返回 `repeated`。
56
+
57
+ [可编辑图源](sources/review.mmd) · [批准逻辑](../../src/notes.mjs) · [摘要与并发回归](../../test/workflow.test.mjs) · [协议](../PROTOCOL.md)
58
+
59
+ <a id="team"></a>
60
+
61
+ ## 团队 PR 与默认知识
62
+
63
+ 作者已经批准,团队成员什么时候能搜到这次更新?
64
+
65
+ ![贡献分支通过回读后推送并开 PR。审阅者核对证据,合并 main 后,读者更新本地 main 才能搜到新版本。](svg/team.svg)
66
+
67
+ 作者从 `knowledge/<topic>` 提交,`pr create` 核对本地提交与已推送分支一致。审阅者比较 Git diff 和原始材料。`verify --metadata-only` 可在 CI 检查清单与引用,原件回读由有存储权限的一端执行。
68
+
69
+ 团队检索和导出的读取版本都是本机 `main`。托管端合并后,读者在本机 `main` 执行 `pull` 才会更新视图。CODEOWNERS、必过检查与审阅人数由仓主按托管能力配置。
70
+
71
+ [可编辑图源](sources/team.mmd) · [PR 实现](../../src/pr.mjs) · [团队读取视图](../../src/notes.mjs) · [合并可见性测试](../../test/workflow.test.mjs)
72
+
73
+ <a id="sync"></a>
74
+
75
+ ## 远端同步与恢复
76
+
77
+ 怎样避免 Git 中已经看到笔记,云盘却找不到原件?
78
+
79
+ ![作者先验证云端原件再推 Git。读者 fetch 后取齐目标原件、校验并快进。](svg/sync.svg)
80
+
81
+ `sync` 固定 HEAD,检查可达历史需要的原件,包括旧提交仍引用的对象。Drive 路径按仓 ID 和哈希隔离。每个对象都重新下载并比对 SHA-256 与大小,通过后才推 Git。失败时可在修复原件或分叉后重试。
82
+
83
+ 新目录可以 `setup --clone` 后用 `restore` 补当前检出的原件。已有仓用 `pull`,先处理目标提交的原件,再快进本机分支。Alpha 已用真实 Drive 和同一台 Mac 的两份独立检出复核网页、PDF 的字节。
84
+
85
+ [可编辑图源](sources/sync.mmd) · [同步与快进](../../src/versioning.mjs) · [Drive 回读](../../src/storage.mjs) · [失败恢复回归](../../test/release.test.mjs)
86
+
87
+ <a id="vaults"></a>
88
+
89
+ ## 多仓检索与权限
90
+
91
+ 同时检索个人、项目和团队,写回时如何选中正确的仓?
92
+
93
+ ![跨仓检索通过本机别名注册表读取各仓视图并逐仓返回,写入显式选择单一仓。](svg/vaults.svg)
94
+
95
+ `vault register` 将别名、路径和仓 ID 绑定。`search --all` 逐个读取已登记的仓,返回每仓的命中、版本或错误。一仓暂时不可用时,其余结果仍可用。项目按协作方式选 `personal` 或 `team`。
96
+
97
+ 写入用 `--vault` 或 `--context` 选一个目标。不同读取人群各用独立 Git 仓及原件权限。仓 ID 和哈希负责寻址,实际访问由文件系统、Git 与云盘管理。组织成员撤权和双人异机移交列入团队试点。
98
+
99
+ [可编辑图源](sources/vaults.mmd) · [本机注册表](../../src/contexts.mjs) · [多仓回归](../../test/release.test.mjs) · [试点目标](../ROADMAP.md#试点与下个版本)
100
+
101
+ <a id="export"></a>
102
+
103
+ ## 离线导出与移交
104
+
105
+ 接手人只有一个普通文件夹,也能从笔记打开原件吗?
106
+
107
+ ![导出按仓的读取视图验证原件,生成 HTML 索引、Markdown、原件目录与哈希清单。](svg/export.svg)
108
+
109
+ `export --out` 选择新目录或空目录。团队使用本机 `main` 同一提交的笔记与清单,个人使用当前工作区。程序先在临时目录组装并校验全部对象,成功后一次性移入目标。
110
+
111
+ 交接时先打开 `index.html`,从笔记点到原件。PDF 链接带物理页码,网页列出段号。`catalog.csv` 包含相对路径和完整哈希。同名文件会消歧,缺件时退出并保留已有内容。
112
+
113
+ [可编辑图源](sources/export.mmd) · [导出实现](../../src/export.mjs) · [导出与重名回归](../../test/release.test.mjs) · [导出协议](../PROTOCOL.md#导出与本机配置)
114
+
115
+ ## 实现范围与验证证据
116
+
117
+ 团队成员在较早的贡献分支也能从已合并条目追到 main 记录的来源。长中文名导出后仍保留文件类型。这两条路径和安装包中的资料链接均有[端到端回归](../../test/audit.test.mjs)。
118
+
119
+ 当前按文件检索标题、正文和标签。HTML 用 Python 标准库取段,文字 PDF 用 Poppler 取页,SQLite 在导入时使用在线备份生成一致快照。Office 文件和扫描件可以原样归档。OCR、Office 内部定位、QMD、MCP 及其他云存储适配器进入后续评测。
120
+
121
+ 发布验收在同一账号下走过真实私有仓 PR 和 Google Drive 回读,恢复的两份原件与输入逐字节相同。独立成员审阅、撤权与另一台设备接手仍需团队试点。[验收计划](../ROADMAP.md) · [公开代码测试](../../test/)
122
+
123
+ ## 更新图册
124
+
125
+ 每张图的 Mermaid 源文件位于 `sources/`,页面嵌入可单独下载的 `svg/` 矢量图。改动读写顺序、数据归属或错误处理时,同步核对相应实现和回归测试。制图工具只用于维护文档。[重新生成图和 PDF](BUILD.md)
@@ -0,0 +1,18 @@
1
+ {
2
+ "theme": "base",
3
+ "htmlLabels": false,
4
+ "markdownAutoWrap": false,
5
+ "themeCSS": ".edgeLabel rect.background { fill: #ffffff !important; opacity: 1 !important; }",
6
+ "deterministicIds": true,
7
+ "deterministicIDSeed": "knowpool-architecture",
8
+ "fontFamily": "Arial, PingFang SC, Microsoft YaHei, Noto Sans CJK SC, sans-serif",
9
+ "themeVariables": {
10
+ "fontSize": "18px", "primaryColor": "#e7f3ef", "primaryBorderColor": "#287265", "primaryTextColor": "#173b35",
11
+ "lineColor": "#526b70", "secondaryColor": "#edf2f8", "tertiaryColor": "#fbf4e7", "edgeLabelBackground": "#ffffff",
12
+ "actorBkg": "#e7f3ef", "actorBorder": "#287265", "actorTextColor": "#173b35", "actorLineColor": "#95aba8",
13
+ "signalColor": "#37575c", "signalTextColor": "#193d42", "labelBoxBkgColor": "#fbf4e7", "labelBoxBorderColor": "#a68751",
14
+ "labelTextColor": "#62491b", "loopTextColor": "#62491b", "noteBkgColor": "#f8f4e9", "noteBorderColor": "#b89a60", "noteTextColor": "#503e20"
15
+ },
16
+ "flowchart": { "htmlLabels": false, "curve": "linear", "wrappingWidth": 250, "minNodeWidth": 136, "nodeSpacing": 30, "rankSpacing": 38, "padding": 14, "diagramPadding": 12, "useMaxWidth": false },
17
+ "sequence": { "useMaxWidth": false, "diagramMarginX": 16, "diagramMarginY": 10, "actorMargin": 30, "width": 136, "height": 40, "messageMargin": 15, "mirrorActors": false, "actorFontSize": 18, "messageFontSize": 18, "noteFontSize": 16 }
18
+ }
@@ -0,0 +1,58 @@
1
+ @page { size: A4 landscape; margin: 0; }
2
+ * { box-sizing: border-box; }
3
+ html, body { margin: 0; color: #173b35; }
4
+ body {
5
+ font-family: Arial, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
6
+ print-color-adjust: exact;
7
+ -webkit-print-color-adjust: exact;
8
+ }
9
+ .sheet {
10
+ width: 297mm;
11
+ height: 209.8mm;
12
+ padding: 9mm 13mm 8mm;
13
+ display: flex;
14
+ flex-direction: column;
15
+ break-after: page;
16
+ }
17
+ .sheet:last-child { break-after: auto; }
18
+ header, footer { display: flex; align-items: baseline; justify-content: space-between; gap: 6mm; }
19
+ header { border-bottom: 1px solid #a6c3bb; padding-bottom: 2.5mm; }
20
+ header b { font-size: 20px; color: #14594b; }
21
+ header span, footer { font-size: 12px; color: #4b645e; }
22
+ h1 { color: #143d34; margin: 4mm 0 1mm; font-size: 34px; line-height: 1.3; }
23
+ .lead { margin: 0; color: #39564f; font-size: 18px; line-height: 1.5; }
24
+ .diagram, .layouts, .icons { flex: 1; min-height: 0; margin: 5mm 0; }
25
+ .diagram { display: flex; gap: 5mm; }
26
+ .diagram.wide { flex-direction: column; }
27
+ figure {
28
+ flex: 1; min-width: 0; min-height: 0; margin: 0;
29
+ display: flex; align-items: center; justify-content: center;
30
+ padding: 3mm;
31
+ border: 1px solid #d8e4df; border-radius: 3mm;
32
+ }
33
+ figure > svg { display: block; width: 100%; height: 100%; }
34
+ .notes { display: grid; grid-template-columns: 1fr 1fr; gap: 7mm; }
35
+ .notes p { margin: 0; border-left: 2px solid #6e9d8b; padding-left: 3mm; color: #283f38; font-size: 15.5px; line-height: 1.7; }
36
+ .side .notes { width: 29%; display: flex; flex-direction: column; justify-content: center; gap: 6mm; }
37
+ code, pre { font-family: Menlo, Consolas, "PingFang SC", "Microsoft YaHei", monospace; }
38
+ code { font-size: 0.85em; color: #155848; }
39
+ footer { margin-top: auto; border-top: 1px solid #a6c3bb; padding-top: 2.5mm; }
40
+ footer a { color: #245f55; text-underline-offset: 2px; }
41
+ footer span { white-space: nowrap; }
42
+ .layouts, .icons { display: grid; gap: 4mm; }
43
+ .layouts { grid-template-columns: 1fr 1fr; }
44
+ .layouts article, .icons article {
45
+ border: 1px solid #d8e4df; background: #f8faf8; border-radius: 3mm;
46
+ padding: 5mm; min-width: 0;
47
+ }
48
+ .layouts h2, .icons h2 { font-size: 18px; color: #19473c; line-height: 1.4; margin: 0 0 3mm; }
49
+ .layouts article { display: flex; flex-direction: column; }
50
+ .layouts pre { margin: 0 0 2mm; font-size: 13.4px; line-height: 1.5; color: #304944; }
51
+ .layouts article p { margin: auto 0 0; padding-top: 2.5mm; border-top: 1px solid #d8e4df; font-size: 13px; line-height: 1.55; color: #39564f; }
52
+ .layouts.count-4 article { padding: 3.5mm 4mm; }
53
+ .layouts.count-4 pre { font-size: 12.5px; line-height: 1.45; }
54
+ .icons { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
55
+ .icons article { display: flex; gap: 5mm; align-items: center; }
56
+ .icons svg { width: 17mm; height: 17mm; flex: none; }
57
+ .icons h2 { margin: 0 0 1mm; }
58
+ .icons p { color: #47665c; margin: 0; font-size: 14px; }
@@ -0,0 +1,121 @@
1
+ """Print the architecture atlas and the archived drawings from their Markdown sources."""
2
+
3
+ import argparse
4
+ import html
5
+ from pathlib import Path
6
+ import re
7
+ import shutil
8
+ import subprocess
9
+ import tempfile
10
+ from urllib.parse import quote
11
+
12
+
13
+ HERE = Path(__file__).resolve().parent
14
+ REPO = HERE.parent.parent
15
+ HISTORY = HERE.parent / "design-history"
16
+ GITHUB = "https://github.com/chicogong/knowpool"
17
+ LINK = re.compile(r"\[([^\]]+)\]\(([^)]+)\)")
18
+ IMAGE = re.compile(r"!\[([^\]]+)\]\(([^)]+)\)")
19
+
20
+
21
+ def inline(text):
22
+ return re.sub(r"`([^`]+)`", r"<code>\1</code>", html.escape(text))
23
+
24
+
25
+ def repo_link(label, source, parent=HERE):
26
+ name, _, anchor = source.partition("#")
27
+ file = (parent / name).resolve(strict=True)
28
+ path = quote(file.relative_to(REPO).as_posix())
29
+ kind = "tree" if file.is_dir() else "blob"
30
+ url = f"{GITHUB}/{kind}/main/{path}"
31
+ if anchor:
32
+ url += "#" + quote(anchor)
33
+ return f'<a href="{html.escape(url)}">{html.escape(label)}</a>'
34
+
35
+
36
+ def diagram_pages():
37
+ pages = []
38
+ for block in (HERE / "README.md").read_text(encoding="utf-8").split('\n<a id="')[1:]:
39
+ marker, heading, question, picture, first, second, links = block.split("\n\n")[:7]
40
+ key = marker.split('"')[0]
41
+ title = heading.removeprefix("## ")
42
+ alt, file = IMAGE.fullmatch(picture).groups()
43
+ figure = f'<figure aria-label="{html.escape(alt)}">{(HERE / file).read_text(encoding="utf-8")}</figure>'
44
+ notes = '<div class="notes"><p>' + inline(first) + '</p><p>' + inline(second) + '</p></div>'
45
+ references = " · ".join(repo_link(name, url) for name, url in LINK.findall(links))
46
+ layout = "side" if key in {"sync", "team", "export"} else "wide"
47
+ pages.append((title, question, f'<div class="diagram {layout}">{figure}{notes}</div>', references))
48
+ if not pages:
49
+ raise ValueError("No architecture sections were found in README.md")
50
+ return pages
51
+
52
+
53
+ def archive_pages():
54
+ path = HISTORY / "original-layouts.md"
55
+ layouts = re.findall(r"^## ([^\n]+)\n\n([^\n]+)\n\n```text\n(.*?)\n```", path.read_text(encoding="utf-8"), re.M | re.S)
56
+ if len(layouts) != 6:
57
+ raise ValueError("Expected the six archived structures")
58
+ pages = []
59
+ for title, lead, subset in [
60
+ ("原稿中的知识仓与产品仓", "早期讨论分别画出了用户保存资料的目录和发布 CLI、Skill 的源码目录。", layouts[:2]),
61
+ ("原稿中的工具、存储与多仓", "这四张草图记录了工具选型、哈希存储、可读导出和权限分仓的最初设想。", layouts[2:]),
62
+ ]:
63
+ tiles = []
64
+ for name, caption, tree in subset:
65
+ note = inline(LINK.sub("", caption).strip())
66
+ tiles.append(f'<article><h2>{html.escape(name)}</h2><pre>{html.escape(tree)}</pre><p>{note}</p></article>')
67
+ content = f'<div class="layouts count-{len(subset)}">{"".join(tiles)}</div>'
68
+ links = repo_link("六张文本原稿与现行实现对照", "original-layouts.md", HISTORY)
69
+ pages.append((title, lead, content, links))
70
+ history = (HISTORY / "README.md").read_text(encoding="utf-8")
71
+ icons = IMAGE.findall(history)
72
+ if len(icons) != 9:
73
+ raise ValueError("Expected nine archived SVGs")
74
+ tiles = []
75
+ for alt, file in icons:
76
+ name, _, motif = alt.partition(" ")
77
+ svg = (HISTORY / file).read_text(encoding="utf-8")
78
+ tiles.append(f'<article>{svg}<div><h2>{html.escape(name)}</h2><p>{html.escape(motif)}</p></div></article>')
79
+ pages.append(("候选品牌图稿", "九份图形保留了讨论中的路径、配色和比例。产品与命令最终定名为 KnowPool 和 knowpool。",
80
+ '<div class="icons">' + "".join(tiles) + '</div>',
81
+ repo_link("候选图标原稿", "README.md", HISTORY) + " · " + repo_link("命名决策", "../NAMING.md")))
82
+ return pages
83
+
84
+
85
+ def document():
86
+ pages = diagram_pages() + archive_pages()
87
+ parts = []
88
+ for i, (title, lead, content, links) in enumerate(pages, start=1):
89
+ parts.append(f'''<section class="sheet">
90
+ <header><b>KnowPool</b><span>产品架构图册</span></header>
91
+ <h1>{html.escape(title)}</h1><p class="lead">{html.escape(lead)}</p>
92
+ {content}
93
+ <footer><div>{links}</div><span>0.1.0-alpha.1 · 协议 1 &nbsp; | &nbsp; {i} / {len(pages)}</span></footer>
94
+ </section>''')
95
+ css = (HERE / "print.css").read_text(encoding="utf-8")
96
+ return '<!doctype html><html lang="zh-CN"><meta charset="utf-8"><title>KnowPool 架构图册</title><style>' + css + '</style><body>' + "".join(parts) + '</body></html>'
97
+
98
+
99
+ def main():
100
+ parser = argparse.ArgumentParser(description=__doc__)
101
+ parser.add_argument("--chrome", help="Chrome or Chromium executable")
102
+ opts = parser.parse_args()
103
+ browser = opts.chrome or shutil.which("chromium") or shutil.which("google-chrome") or "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
104
+ target = HERE / "knowpool-architecture.pdf"
105
+ with tempfile.TemporaryDirectory() as temp:
106
+ root = Path(temp)
107
+ page = root / "atlas.html"
108
+ page.write_text(document(), encoding="utf-8")
109
+ output = root / "atlas.pdf"
110
+ subprocess.run([browser, "--headless", "--disable-background-networking", "--no-first-run",
111
+ "--user-data-dir=" + str(root / "profile"), "--no-pdf-header-footer",
112
+ "--generate-pdf-document-outline", "--export-tagged-pdf",
113
+ "--print-to-pdf=" + str(output), page.as_uri()], check=True)
114
+ if not output.is_file() or not output.read_bytes().startswith(b"%PDF-"):
115
+ raise ValueError("Chrome did not produce a PDF")
116
+ shutil.copyfile(output, target)
117
+ print(target)
118
+
119
+
120
+ if __name__ == "__main__":
121
+ main()
@@ -0,0 +1,13 @@
1
+ flowchart LR
2
+ accTitle: 一条结论如何追到原件
3
+ accDescr: 笔记里的每个引用都包含来源 ID 和定位。来源清单记录完整哈希、大小和文件名,CLI 据此取回同一版本的 HTML 或 PDF 原件。
4
+ N["已批准笔记<br/>试点的端点设置"] --> A["HTML 引用<br/>来源 ID + para:2"]
5
+ N --> B["PDF 引用<br/>来源 ID + page:2"]
6
+ A --> M["网页清单<br/>SHA-256、大小、原名"]
7
+ B --> P["PDF 清单<br/>SHA-256、大小、原名"]
8
+ M --> W["review.html<br/>32 段录音 · 450 毫秒"]
9
+ P --> F["two-pages.pdf<br/>第 2 页确认样本数"]
10
+ classDef core fill:#174e46,color:#ffffff,stroke:#174e46;
11
+ classDef file fill:#edf2f8,color:#233c57,stroke:#637e96;
12
+ class N core;
13
+ class W,F file;
@@ -0,0 +1,11 @@
1
+ flowchart LR
2
+ accTitle: 从知识仓到可离线交接的目录
3
+ accDescr: 导出读取个人工作区或团队本机 main 的笔记和清单,复制并校验原件,完成后交付索引、Markdown、原件和 CSV。
4
+ P["个人仓<br/>已批准的工作区"] --> E["export<br/>临时目录组装并校验"]
5
+ T["团队仓<br/>本机 main 快照"] --> E
6
+ E --> I["index.html<br/>笔记、出处和原件入口"]
7
+ E --> N["notes/<br/>标题命名的 Markdown"]
8
+ E --> F["originals/<br/>按原名取回的文件"]
9
+ E --> C["catalog.csv<br/>文件名、路径、哈希和大小"]
10
+ classDef core fill:#174e46,color:#ffffff,stroke:#174e46;
11
+ class E core;
@@ -0,0 +1,12 @@
1
+ flowchart LR
2
+ accTitle: 一次批准对应哪份草稿
3
+ accDescr: 草稿信封包含仓、笔记、修订基线和拟议全文。预览展示原文、证据和摘要。批准重验当前信封和笔记,成功写入,过时则返回给作者。
4
+ D["生成草稿<br/>draft create"] --> V["对照旧文、提案和出处<br/>draft show"]
5
+ V --> A{"按 digest 批准<br/>并比对基线"}
6
+ A -->|检查通过| N["写入目标笔记<br/>个人或贡献分支"]
7
+ A -->|提案改变| R["重新查看<br/>当前草稿"]
8
+ A -->|原笔记已更新| S["基于新版本<br/>重新起草"]
9
+ classDef core fill:#174e46,color:#ffffff,stroke:#174e46;
10
+ classDef warn fill:#fbf2e0,color:#654b22,stroke:#ad8748;
11
+ class N core;
12
+ class R,S warn;
@@ -0,0 +1,18 @@
1
+ sequenceDiagram
2
+ accTitle: 云端同步和干净检出的恢复顺序
3
+ accDescr: 作者固定提交,遍历可达历史,向 Drive 写原件并下载校验。失败时本次不推送 Git。成功后读者获取目标提交,取齐并校验原件,再快进已有分支。
4
+ participant A as 作者 · sync
5
+ participant D as Google Drive
6
+ participant G as Git 远端
7
+ participant B as 读者 · pull
8
+ A->>A: 固定 HEAD,检查历史
9
+ A->>D: 按仓和哈希写入所需原件
10
+ D-->>A: 下载原件字节供作者核验
11
+ alt 哈希与大小全部通过
12
+ A->>G: 推送固定提交
13
+ B->>G: fetch 已发布的目标提交
14
+ B->>D: 取回本机缺少的目标原件
15
+ B->>B: 校验后快进并 verify
16
+ else 缺件或校验失败
17
+ A->>A: 报错,本次不推分支
18
+ end
@@ -0,0 +1,13 @@
1
+ flowchart LR
2
+ accTitle: KnowPool 的组件与数据归属
3
+ accDescr: 用户可以直接调用 CLI,也可以由 Agent 按项目 Skill 调用它。笔记和清单随 Git 分支同步,原件按哈希存放,云端通过 Google Drive 回读。
4
+ A["AI 客户端<br/>项目 Skill"] -->|调用命令| C["KnowPool CLI<br/>校验与读写"]
5
+ U["人<br/>作者与审阅者"] -->|直接操作| C
6
+ C --> G["本地 Git 知识仓<br/>笔记、清单、配置"]
7
+ C --> O["本机原件库<br/>按 SHA-256 寻址"]
8
+ G -->|推分支| H["GitHub<br/>历史、差异、PR"]
9
+ O <-->|rclone 传输| D["Google Drive<br/>仓专属原件空间"]
10
+ classDef core fill:#174e46,color:#ffffff,stroke:#174e46;
11
+ classDef remote fill:#edf2f8,color:#233c57,stroke:#637e96;
12
+ class C core;
13
+ class H,D remote;
@@ -0,0 +1,14 @@
1
+ sequenceDiagram
2
+ accTitle: 一条团队贡献何时成为默认知识
3
+ accDescr: 作者在贡献分支本地批准并提交,回读原件后推 GitHub 并建 PR。审阅者对照变更和出处,合并后读者拉取本机 main 才能在默认搜索中看到新笔记。
4
+ participant A as 作者 · 贡献分支
5
+ participant G as GitHub · 知识仓
6
+ participant R as 领域审阅者
7
+ participant B as 读者 · 本机 main
8
+ A->>A: 批准草稿并 commit
9
+ A->>G: 回读通过,推贡献分支
10
+ A->>G: pr create 提交该版本
11
+ G-->>R: 查看 diff、引用与检查
12
+ R->>G: 核对原文后合并 main
13
+ B->>G: pull 获取 main 的新提交
14
+ B->>B: 校验、快进,再 search
@@ -0,0 +1,14 @@
1
+ flowchart LR
2
+ accTitle: 多仓检索和权限边界
3
+ accDescr: 跨仓搜索只访问本机显式注册的知识仓。每个仓独立核对仓 ID,按自身模式取视图,结果保留仓与版本。写入选定一个仓,Git 和原件分别授权。
4
+ Q["只读检索<br/>search --all"] --> R["本机注册表<br/>别名、路径、仓 ID"]
5
+ R --> P["个人仓<br/>已批准的工作区"]
6
+ R --> T["团队仓<br/>本机 main"]
7
+ P --> O["按仓返回结果<br/>仓 ID、ref 或错误"]
8
+ T --> O
9
+ W["单仓写入<br/>--context team"] --> B["团队贡献分支<br/>批准与提交"]
10
+ B -.->|PR 合并,再 pull| T
11
+ classDef core fill:#174e46,color:#ffffff,stroke:#174e46;
12
+ classDef file fill:#edf2f8,color:#233c57,stroke:#637e96;
13
+ class O core;
14
+ class P,T,B file;
@@ -0,0 +1 @@
1
+ <svg id="knowpool-evidence" width="897.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="flowchart" height="191.60000610351562" viewBox="0 0 897.25 191.60000610351562" role="graphics-document document" aria-roledescription="flowchart-v2" aria-describedby="chart-desc-knowpool-evidence" aria-labelledby="chart-title-knowpool-evidence" style="background-color: white;"><title id="chart-title-knowpool-evidence">一条结论如何追到原件</title><desc id="chart-desc-knowpool-evidence">笔记里的每个引用都包含来源 ID 和定位。来源清单记录完整哈希、大小和文件名,CLI 据此取回同一版本的 HTML 或 PDF 原件。</desc><style>#knowpool-evidence{font-family:Arial,PingFang SC,Microsoft YaHei,Noto Sans CJK SC,sans-serif;font-size:18px;fill:#173b35;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#knowpool-evidence .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#knowpool-evidence .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#knowpool-evidence .error-icon{fill:#fbf4e7;}#knowpool-evidence .error-text{fill:#040b18;stroke:#040b18;}#knowpool-evidence .edge-thickness-normal{stroke-width:1px;}#knowpool-evidence .edge-thickness-thick{stroke-width:3.5px;}#knowpool-evidence .edge-pattern-solid{stroke-dasharray:0;}#knowpool-evidence .edge-thickness-invisible{stroke-width:0;fill:none;}#knowpool-evidence .edge-pattern-dashed{stroke-dasharray:3;}#knowpool-evidence .edge-pattern-dotted{stroke-dasharray:2;}#knowpool-evidence .marker{fill:#526b70;stroke:#526b70;}#knowpool-evidence .marker.cross{stroke:#526b70;}#knowpool-evidence svg{font-family:Arial,PingFang SC,Microsoft YaHei,Noto Sans CJK SC,sans-serif;font-size:18px;}#knowpool-evidence p{margin:0;}#knowpool-evidence .label{font-family:Arial,PingFang SC,Microsoft YaHei,Noto Sans CJK SC,sans-serif;color:#173b35;}#knowpool-evidence .cluster-label text{fill:#040b18;}#knowpool-evidence .cluster-label span{color:#040b18;}#knowpool-evidence .cluster-label span p{background-color:transparent;}#knowpool-evidence .label text,#knowpool-evidence span{fill:#173b35;color:#173b35;}#knowpool-evidence .node rect,#knowpool-evidence .node circle,#knowpool-evidence .node ellipse,#knowpool-evidence .node polygon,#knowpool-evidence .node path{fill:#e7f3ef;stroke:#287265;stroke-width:1px;}#knowpool-evidence .rough-node .label text,#knowpool-evidence .node .label text,#knowpool-evidence .image-shape .label,#knowpool-evidence .icon-shape .label{text-anchor:middle;}#knowpool-evidence .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#knowpool-evidence .rough-node .label,#knowpool-evidence .node .label,#knowpool-evidence .image-shape .label,#knowpool-evidence .icon-shape .label{text-align:center;}#knowpool-evidence .node.clickable{cursor:pointer;}#knowpool-evidence .root .anchor path{fill:#526b70!important;stroke-width:0;stroke:#526b70;}#knowpool-evidence .arrowheadPath{fill:#0b0b0b;}#knowpool-evidence .edgePaths .path{stroke:#526b70;stroke-width:1px;}#knowpool-evidence .flowchart-link{stroke:#526b70;fill:none;}#knowpool-evidence .edgeLabel{background-color:#ffffff;text-align:center;}#knowpool-evidence .edgeLabel p{background-color:#ffffff;}#knowpool-evidence .edgeLabel rect{opacity:0.5;background-color:#ffffff;fill:#ffffff;}#knowpool-evidence .labelBkg{background-color:rgba(255, 255, 255, 0.5);}#knowpool-evidence .cluster rect{fill:#fbf4e7;stroke:hsl(39, 31.4285714286%, 84.5098039216%);stroke-width:1px;}#knowpool-evidence .cluster text{fill:#040b18;}#knowpool-evidence .cluster span{color:#040b18;}#knowpool-evidence .node .collapsed-indicator{fill:hsl(39, 31.4285714286%, 84.5098039216%);stroke:none;opacity:0.6;}#knowpool-evidence .node .collapsed-separator{stroke:hsl(39, 31.4285714286%, 84.5098039216%);stroke-width:0.75px;}#knowpool-evidence div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:Arial,PingFang SC,Microsoft YaHei,Noto Sans CJK SC,sans-serif;font-size:12px;background:#fbf4e7;border:1px solid hsl(39, 31.4285714286%, 84.5098039216%);border-radius:2px;pointer-events:none;z-index:100;}#knowpool-evidence .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#173b35;}#knowpool-evidence rect.text{fill:none;stroke-width:0;}#knowpool-evidence .icon-shape,#knowpool-evidence .image-shape{background-color:#ffffff;text-align:center;}#knowpool-evidence .icon-shape p,#knowpool-evidence .image-shape p{background-color:#ffffff;padding:2px;}#knowpool-evidence .icon-shape .label rect,#knowpool-evidence .image-shape .label rect{opacity:0.5;background-color:#ffffff;fill:#ffffff;}#knowpool-evidence .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#knowpool-evidence .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#knowpool-evidence .node .neo-node{stroke:#287265;}#knowpool-evidence [data-look="neo"].node rect,#knowpool-evidence [data-look="neo"].cluster rect,#knowpool-evidence [data-look="neo"].node polygon{stroke:url(#knowpool-evidence-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#knowpool-evidence [data-look="neo"].swimlane.cluster rect{filter:none;}#knowpool-evidence [data-look="neo"].node path{stroke:url(#knowpool-evidence-gradient);stroke-width:1px;}#knowpool-evidence [data-look="neo"].node .outer-path{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#knowpool-evidence [data-look="neo"].node .neo-line path{stroke:#287265;filter:none;}#knowpool-evidence [data-look="neo"].node circle{stroke:url(#knowpool-evidence-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#knowpool-evidence [data-look="neo"].node circle .state-start{fill:#000000;}#knowpool-evidence [data-look="neo"].icon-shape .icon{fill:url(#knowpool-evidence-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#knowpool-evidence [data-look="neo"].icon-shape .icon-neo path{stroke:url(#knowpool-evidence-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#knowpool-evidence .edgeLabel rect.background{fill:rgb(255, 255, 255)!important;opacity:1!important;}#knowpool-evidence :root{--mermaid-font-family:Arial,PingFang SC,Microsoft YaHei,Noto Sans CJK SC,sans-serif;}#knowpool-evidence .core rect{fill:rgb(23, 78, 70)!important;color:rgb(255, 255, 255)!important;stroke:rgb(23, 78, 70)!important;}#knowpool-evidence .core polygon{fill:rgb(23, 78, 70)!important;color:rgb(255, 255, 255)!important;stroke:rgb(23, 78, 70)!important;}#knowpool-evidence .core ellipse{fill:rgb(23, 78, 70)!important;color:rgb(255, 255, 255)!important;stroke:rgb(23, 78, 70)!important;}#knowpool-evidence .core circle{fill:rgb(23, 78, 70)!important;color:rgb(255, 255, 255)!important;stroke:rgb(23, 78, 70)!important;}#knowpool-evidence .core path{fill:rgb(23, 78, 70)!important;color:rgb(255, 255, 255)!important;stroke:rgb(23, 78, 70)!important;}#knowpool-evidence .core tspan{fill:rgb(255, 255, 255)!important;}#knowpool-evidence .file rect{fill:rgb(237, 242, 248)!important;color:rgb(35, 60, 87)!important;stroke:rgb(99, 126, 150)!important;}#knowpool-evidence .file polygon{fill:rgb(237, 242, 248)!important;color:rgb(35, 60, 87)!important;stroke:rgb(99, 126, 150)!important;}#knowpool-evidence .file ellipse{fill:rgb(237, 242, 248)!important;color:rgb(35, 60, 87)!important;stroke:rgb(99, 126, 150)!important;}#knowpool-evidence .file circle{fill:rgb(237, 242, 248)!important;color:rgb(35, 60, 87)!important;stroke:rgb(99, 126, 150)!important;}#knowpool-evidence .file path{fill:rgb(237, 242, 248)!important;color:rgb(35, 60, 87)!important;stroke:rgb(99, 126, 150)!important;}#knowpool-evidence .file tspan{fill:rgb(35, 60, 87)!important;}</style><g><marker id="knowpool-evidence_flowchart-v2-pointEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="knowpool-evidence_flowchart-v2-pointStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="4.5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"><path d="M 0 5 L 10 10 L 10 0 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="knowpool-evidence_flowchart-v2-pointEnd-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="11.5" refY="7" markerUnits="userSpaceOnUse" markerWidth="10.5" markerHeight="14" orient="auto"><path d="M 0 0 L 11.5 7 L 0 14 z" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="knowpool-evidence_flowchart-v2-pointStart-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="1" refY="7" markerUnits="userSpaceOnUse" markerWidth="11.5" markerHeight="14" orient="auto"><polygon points="0,7 11.5,14 11.5,0" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="knowpool-evidence_flowchart-v2-circleEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="11" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="knowpool-evidence_flowchart-v2-circleStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-1" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="knowpool-evidence_flowchart-v2-circleEnd-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refY="5" refX="12.25" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="knowpool-evidence_flowchart-v2-circleStart-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-2" refY="5" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="knowpool-evidence_flowchart-v2-crossEnd" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="12" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"/></marker><marker id="knowpool-evidence_flowchart-v2-crossStart" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="-1" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"/></marker><marker id="knowpool-evidence_flowchart-v2-crossEnd-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="17.7" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5;"/></marker><marker id="knowpool-evidence_flowchart-v2-crossStart-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="-3.5" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5; stroke-dasharray: 1, 0;"/></marker><g class="root"><g class="clusters"/><g class="edges edgePaths"><path d="M180,88.5000025431315L192.92893218813452,88.5000025431315Q200,88.5000025431315 200,81.42893473126603L200,50.97106933774438Q200,43.900001525878906 207.07106781186548,43.900001525878906L218.0078125,43.900001525878906" id="knowpool-evidence-L_N_A_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 73.27946472167969 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_N_A_0" data-points="W3sieCI6MTgwLCJ5Ijo4OC41MDAwMDI1NDMxMzE1fSx7IngiOjIwMCwieSI6ODguNTAwMDAyNTQzMTMxNX0seyJ4IjoyMDAsInkiOjQzLjkwMDAwMTUyNTg3ODkwNn0seyJ4IjoyMjIuMDA3ODEyNSwieSI6NDMuOTAwMDAxNTI1ODc4OTA2fV0=" data-look="neo" marker-end="url(#knowpool-evidence_flowchart-v2-pointEnd-margin)"/><path d="M180,103.10000356038411L192.92893218813452,103.10000356038411Q200,103.10000356038411 200,110.17107137224959L200,140.62893676577124Q200,147.70000457763672 207.07106781186548,147.70000457763672L216,147.70000457763672" id="knowpool-evidence-L_N_B_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 71.27165222167969 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_N_B_0" data-points="W3sieCI6MTgwLCJ5IjoxMDMuMTAwMDAzNTYwMzg0MTF9LHsieCI6MjAwLCJ5IjoxMDMuMTAwMDAzNTYwMzg0MTF9LHsieCI6MjAwLCJ5IjoxNDcuNzAwMDA0NTc3NjM2NzJ9LHsieCI6MjIwLCJ5IjoxNDcuNzAwMDA0NTc3NjM2NzJ9XQ==" data-look="neo" marker-end="url(#knowpool-evidence_flowchart-v2-pointEnd-margin)"/><path d="M392.0859375,43.900001525878906L430.09375,43.900001525878906" id="knowpool-evidence-L_A_M_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 34.0078125 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_A_M_0" data-points="W3sieCI6MzkyLjA4NTkzNzUsInkiOjQzLjkwMDAwMTUyNTg3ODkwNn0seyJ4Ijo0MzQuMDkzNzUsInkiOjQzLjkwMDAwMTUyNTg3ODkwNn1d" data-look="neo" marker-end="url(#knowpool-evidence_flowchart-v2-pointEnd-margin)"/><path d="M394.09375,147.70000457763672L430.09375,147.70000457763672" id="knowpool-evidence-L_B_P_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 32 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_B_P_0" data-points="W3sieCI6Mzk0LjA5Mzc1LCJ5IjoxNDcuNzAwMDA0NTc3NjM2NzJ9LHsieCI6NDM0LjA5Mzc1LCJ5IjoxNDcuNzAwMDA0NTc3NjM2NzJ9XQ==" data-look="neo" marker-end="url(#knowpool-evidence_flowchart-v2-pointEnd-margin)"/><path d="M647.140625,43.900001525878906L683.140625,43.900001525878906" id="knowpool-evidence-L_M_W_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 32 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_M_W_0" data-points="W3sieCI6NjQ3LjE0MDYyNSwieSI6NDMuOTAwMDAxNTI1ODc4OTA2fSx7IngiOjY4Ny4xNDA2MjUsInkiOjQzLjkwMDAwMTUyNTg3ODkwNn1d" data-look="neo" marker-end="url(#knowpool-evidence_flowchart-v2-pointEnd-margin)"/><path d="M647.140625,147.70000457763672L683.140625,147.70000457763672" id="knowpool-evidence-L_P_F_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 32 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_P_F_0" data-points="W3sieCI6NjQ3LjE0MDYyNSwieSI6MTQ3LjcwMDAwNDU3NzYzNjcyfSx7IngiOjY4Ny4xNDA2MjUsInkiOjE0Ny43MDAwMDQ1Nzc2MzY3Mn1d" data-look="neo" marker-end="url(#knowpool-evidence_flowchart-v2-pointEnd-margin)"/></g><g class="edgeLabels"/><g class="nodes"><g class="node default core" id="knowpool-evidence-flowchart-N-0" data-look="neo" transform="translate(96, 95.80000305175781)"><rect class="basic label-container" style="fill:#174e46 !important;stroke:#174e46 !important" x="-84" y="-31.900001525878906" width="168" height="63.80000305175781"/><g class="label" style="color:#ffffff !important" transform="translate(0, -19.900001525878906)"><rect/><g><rect class="background" style="stroke: none"/><text y="-10.1" style="fill:#ffffff !important"><tspan class="text-outer-tspan row" x="0" y="-0.1em" dy="1.1em"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">已批准笔记</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="1em" dy="1.1em"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">试点的端点设置</tspan></tspan></text></g></g></g><g class="node default" id="knowpool-evidence-flowchart-A-1" data-look="neo" transform="translate(307.046875, 43.900001525878906)"><rect class="basic label-container" style="" x="-85.0390625" y="-31.900001525878906" width="170.078125" height="63.80000305175781"/><g class="label" style="" transform="translate(0, -19.900001525878906)"><rect/><g><rect class="background" style="stroke: none"/><text y="-10.1" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em" dy="1.1em"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">HTML</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> 引用</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="1em" dy="1.1em"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">来源</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> ID</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> +</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> para:2</tspan></tspan></text></g></g></g><g class="node default" id="knowpool-evidence-flowchart-B-3" data-look="neo" transform="translate(307.046875, 147.70000457763672)"><rect class="basic label-container" style="" x="-87.046875" y="-31.900001525878906" width="174.09375" height="63.80000305175781"/><g class="label" style="" transform="translate(0, -19.900001525878906)"><rect/><g><rect class="background" style="stroke: none"/><text y="-10.1" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em" dy="1.1em"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">PDF</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> 引用</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="1em" dy="1.1em"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">来源</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> ID</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> +</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> page:2</tspan></tspan></text></g></g></g><g class="node default" id="knowpool-evidence-flowchart-M-5" data-look="neo" transform="translate(540.6171875, 43.900001525878906)"><rect class="basic label-container" style="" x="-106.5234375" y="-31.900001525878906" width="213.046875" height="63.80000305175781"/><g class="label" style="" transform="translate(0, -19.900001525878906)"><rect/><g><rect class="background" style="stroke: none"/><text y="-10.1" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em" dy="1.1em"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">网页清单</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="1em" dy="1.1em"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">SHA-256、大小、原名</tspan></tspan></text></g></g></g><g class="node default" id="knowpool-evidence-flowchart-P-7" data-look="neo" transform="translate(540.6171875, 147.70000457763672)"><rect class="basic label-container" style="" x="-106.5234375" y="-31.900001525878906" width="213.046875" height="63.80000305175781"/><g class="label" style="" transform="translate(0, -19.900001525878906)"><rect/><g><rect class="background" style="stroke: none"/><text y="-10.1" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em" dy="1.1em"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">PDF</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> 清单</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="1em" dy="1.1em"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">SHA-256、大小、原名</tspan></tspan></text></g></g></g><g class="node default file" id="knowpool-evidence-flowchart-W-9" data-look="neo" transform="translate(786.1953125, 43.900001525878906)"><rect class="basic label-container" style="fill:#edf2f8 !important;stroke:#637e96 !important" x="-99.0546875" y="-31.900001525878906" width="198.109375" height="63.80000305175781"/><g class="label" style="color:#233c57 !important" transform="translate(0, -19.900001525878906)"><rect/><g><rect class="background" style="stroke: none"/><text y="-10.1" style="fill:#233c57 !important"><tspan class="text-outer-tspan row" x="0" y="-0.1em" dy="1.1em"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">review.html</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="1em" dy="1.1em"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">32</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> 段录音</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> ·</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> 450</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> 毫秒</tspan></tspan></text></g></g></g><g class="node default file" id="knowpool-evidence-flowchart-F-11" data-look="neo" transform="translate(776.15625, 147.70000457763672)"><rect class="basic label-container" style="fill:#edf2f8 !important;stroke:#637e96 !important" x="-89.015625" y="-31.900001525878906" width="178.03125" height="63.80000305175781"/><g class="label" style="color:#233c57 !important" transform="translate(0, -19.900001525878906)"><rect/><g><rect class="background" style="stroke: none"/><text y="-10.1" style="fill:#233c57 !important"><tspan class="text-outer-tspan row" x="0" y="-0.1em" dy="1.1em"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">two-pages.pdf</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="1em" dy="1.1em"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">第</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> 2</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> 页确认样本数</tspan></tspan></text></g></g></g></g></g></g><defs><filter id="knowpool-evidence-drop-shadow" height="130%" width="130%"><feDropShadow dx="4" dy="4" stdDeviation="0" flood-opacity="0.06" flood-color="#000000"/></filter></defs><defs><filter id="knowpool-evidence-drop-shadow-small" height="150%" width="150%"><feDropShadow dx="2" dy="2" stdDeviation="0" flood-opacity="0.06" flood-color="#000000"/></filter></defs><linearGradient id="knowpool-evidence-gradient" gradientUnits="objectBoundingBox" x1="0%" y1="0%" x2="100%" y2="0%"><stop offset="0%" stop-color="#287265" stop-opacity="1"/><stop offset="100%" stop-color="hsl(212.7272727273, 4%, 85.0980392157%)" stop-opacity="1"/></linearGradient></svg>