fuli-context 0.4.0 → 0.7.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 (207) hide show
  1. package/README.en.md +5 -0
  2. package/README.md +411 -173
  3. package/README.zh-CN.md +448 -0
  4. package/compose.graphiti.yml +6 -6
  5. package/dist/web/assets/AboutPage-DXh7Fwxt.css +1 -0
  6. package/dist/web/assets/AboutPage-DfnZo7Lo.js +1 -0
  7. package/dist/web/assets/ConnectionsPage-BloaSKmt.js +1 -0
  8. package/dist/web/assets/ConnectionsPage-CBHAdZXT.css +1 -0
  9. package/dist/web/assets/KnowledgeInspector-Bjhdu2mf.css +1 -0
  10. package/dist/web/assets/KnowledgeInspector-QvNpv0_k.js +1 -0
  11. package/dist/web/assets/KnowledgeOrganizerPage-Cx1w1jb2.css +1 -0
  12. package/dist/web/assets/KnowledgeOrganizerPage-DKq1jVD5.js +1 -0
  13. package/dist/web/assets/KnowledgePage-BWL0jT01.js +1 -0
  14. package/dist/web/assets/KnowledgeWorkspace-Czq6aZ7b.js +4 -0
  15. package/dist/web/assets/OverviewPage-5sJoO1Gh.js +1 -0
  16. package/dist/web/assets/{PersonalProfilePage-S8ZcG2LU.css → PersonalProfilePage-CdmEzyvZ.css} +1 -1
  17. package/dist/web/assets/PersonalProfilePage-tVChM9ik.js +1 -0
  18. package/dist/web/assets/PersonalProjectsPage-BPFrup4V.js +1 -0
  19. package/dist/web/assets/PublicProjectsPage-BPJSeREN.js +1 -0
  20. package/dist/web/assets/ReviewPage-B7EN817i.js +1 -0
  21. package/dist/web/assets/SearchableSelect-ClLN0rIb.js +1 -0
  22. package/dist/web/assets/SettingsPage-C6ouU0sR.css +1 -0
  23. package/dist/web/assets/SettingsPage-Chd_B3eH.js +1 -0
  24. package/dist/web/assets/_plugin-vue_export-helper-BDNMzG2s.js +1 -0
  25. package/dist/web/assets/console-CbDsKrsO.js +1 -0
  26. package/dist/web/assets/fuli-logo-Bu9WBuQe.js +1 -0
  27. package/dist/web/assets/fuli-logo-ER1wQ8Kk.png +0 -0
  28. package/dist/web/assets/i18n-BQcns1PH.js +5 -0
  29. package/dist/web/assets/identity-B8K4VYg6.js +1 -0
  30. package/dist/web/assets/index-CB8Xmsc2.js +2 -0
  31. package/dist/web/assets/index-CZeuPh-U.css +1 -0
  32. package/dist/web/assets/model-eF52GgPF.js +1 -0
  33. package/dist/web/assets/paths-hwz-Ac1g.js +1 -0
  34. package/dist/web/assets/useMinimumLoadingDisplay-BpCyBeko.css +1 -0
  35. package/dist/web/assets/useMinimumLoadingDisplay-wCgGDmHg.js +1 -0
  36. package/dist/web/assets/vue-router-BsEp_XwI.js +1 -0
  37. package/dist/web/index.html +9 -6
  38. package/docs/external-knowledge-architecture.md +279 -0
  39. package/examples/external-knowledge/markdown-folder.mjs +235 -0
  40. package/graph-provider/fuli_graph/app.py +57 -1
  41. package/graph-provider/fuli_graph/graph_models.py +3 -0
  42. package/graph-provider/fuli_graph/graph_query.py +62 -16
  43. package/graph-provider/fuli_graph/knowledge_review.py +612 -0
  44. package/graph-provider/fuli_graph/knowledge_review_models.py +127 -0
  45. package/graph-provider/fuli_graph/knowledge_search.py +51 -4
  46. package/graph-provider/fuli_graph/models.py +19 -0
  47. package/graph-provider/fuli_graph/runtime.py +15 -0
  48. package/graph-provider/fuli_graph/store_knowledge.py +2 -1
  49. package/graph-provider/pyproject.toml +1 -1
  50. package/npm-shrinkwrap.json +5 -407
  51. package/package.json +7 -4
  52. package/skills/capturing-session-knowledge/SKILL.md +24 -4
  53. package/skills/flreview/SKILL.md +73 -0
  54. package/skills/flreview/agents/openai.yaml +6 -0
  55. package/src/agent-tools/graph-definitions.js +79 -4
  56. package/src/agent-tools/graph-handlers.js +12 -0
  57. package/src/cli/command-registry.js +3 -3
  58. package/src/cli/local-runtime-command.js +60 -23
  59. package/src/cli/local-runtime-options.js +16 -6
  60. package/src/cli/setup-agent-selection.js +12 -12
  61. package/src/cli/setup-command.js +41 -18
  62. package/src/cli/shell-argument.js +10 -0
  63. package/src/cli/uninstall-command.js +17 -15
  64. package/src/cli/update-command.js +38 -30
  65. package/src/external-knowledge/catalog.js +61 -0
  66. package/src/external-knowledge/conflict-policy.js +58 -0
  67. package/src/external-knowledge/connected-search.js +166 -0
  68. package/src/external-knowledge/connectors/custom.js +133 -0
  69. package/src/external-knowledge/connectors/feishu.js +461 -0
  70. package/src/external-knowledge/connectors/mcp.js +438 -0
  71. package/src/external-knowledge/connectors/notion.js +307 -0
  72. package/src/external-knowledge/connectors/retrieval-api.js +222 -0
  73. package/src/external-knowledge/document-mapping.js +151 -0
  74. package/src/external-knowledge/graph-projection.js +17 -0
  75. package/src/external-knowledge/index.js +8 -0
  76. package/src/external-knowledge/registry.js +91 -0
  77. package/src/external-knowledge/runtime.js +68 -0
  78. package/src/external-knowledge/safe-diagnostic.js +14 -0
  79. package/src/external-knowledge/service.js +811 -0
  80. package/src/graphiti/agent-knowledge-workflows.js +7 -2
  81. package/src/graphiti/federated-application.js +66 -41
  82. package/src/graphiti/knowledge-item-role.js +21 -0
  83. package/src/graphiti/knowledge-review.js +43 -0
  84. package/src/graphiti/project-profile-mapping.js +32 -0
  85. package/src/graphiti/provider-client.js +22 -1
  86. package/src/graphiti/source-marker.js +54 -3
  87. package/src/graphiti/task-knowledge-recall.js +250 -0
  88. package/src/http/api-router.js +23 -108
  89. package/src/http/external-knowledge-api-router.js +104 -0
  90. package/src/http/graph-api-router.js +12 -1
  91. package/src/http/request-policy.js +38 -3
  92. package/src/local-runtime/lifecycle.js +37 -16
  93. package/src/mcp/create-mcp-server.js +1 -0
  94. package/src/mcp/instructions.js +7 -7
  95. package/src/mcp/tool-annotations.js +6 -0
  96. package/src/mcp/tool-result.js +1 -0
  97. package/src/server/application-lifecycle.js +2 -11
  98. package/src/server/blocked-ports.js +11 -0
  99. package/src/server/lan-access.js +52 -0
  100. package/src/server.js +103 -25
  101. package/src/setup/agent-installation-status.js +2 -1
  102. package/src/setup/agents.js +2 -1
  103. package/src/setup/claude-code-config.js +2 -1
  104. package/src/setup/codex-bootstrap.js +12 -7
  105. package/src/setup/container-runtime.js +25 -21
  106. package/src/setup/graph-runtime.js +219 -58
  107. package/src/setup/node-runtime.js +3 -3
  108. package/src/setup/options.js +2 -4
  109. package/src/setup/paths.js +18 -3
  110. package/src/setup/review-skill-adapters.js +49 -0
  111. package/src/setup/setup.js +26 -2
  112. package/src/setup/uninstall.js +4 -2
  113. package/src/system/resource-monitor.js +317 -0
  114. package/src/system/runtime-settings.js +131 -0
  115. package/src/system/system-service.js +119 -0
  116. package/dist/web/assets/ConnectionsPage-CCKWm-6p.js +0 -1
  117. package/dist/web/assets/KnowledgeInspector-BZkB2wJn.js +0 -1
  118. package/dist/web/assets/KnowledgeInspector-CrGYxEob.css +0 -1
  119. package/dist/web/assets/KnowledgeOrganizerPage-CJCNI2Wd.css +0 -1
  120. package/dist/web/assets/KnowledgeOrganizerPage-PXH-TlGt.js +0 -1
  121. package/dist/web/assets/KnowledgePage-CNQXd15y.js +0 -1
  122. package/dist/web/assets/KnowledgeWorkspace-CXPE4GCD.js +0 -4
  123. package/dist/web/assets/OverviewPage-ul7g7HXh.js +0 -1
  124. package/dist/web/assets/PersonalProfilePage-CC40Pw2L.js +0 -1
  125. package/dist/web/assets/PersonalProjectsPage-CPIEcShD.js +0 -1
  126. package/dist/web/assets/PublicProjectsPage-C700sR7z.js +0 -1
  127. package/dist/web/assets/ReviewPage-7MDDUDgA.js +0 -1
  128. package/dist/web/assets/console-B_Ena2DS.js +0 -5
  129. package/dist/web/assets/fuli-logo-DGuyqchQ.png +0 -0
  130. package/dist/web/assets/identity-CjBwYSMX.js +0 -1
  131. package/dist/web/assets/index-BQRkOwPx.js +0 -2
  132. package/dist/web/assets/index-CpLDx3of.css +0 -1
  133. package/dist/web/assets/model-C-5RVIJ2.js +0 -1
  134. package/dist/web/assets/paths-BkULqmGI.js +0 -1
  135. package/dist/web/assets/vue-router-DnD3hUm7.js +0 -1
  136. package/src/agent/candidate-read-service.js +0 -53
  137. package/src/agent/context-pack-service.js +0 -83
  138. package/src/agent/public-read-policy.js +0 -39
  139. package/src/agent/public-read-service.js +0 -69
  140. package/src/agent/read-projection.js +0 -107
  141. package/src/agent/search-service.js +0 -61
  142. package/src/agent/space-boundary.js +0 -33
  143. package/src/app/bootstrap.js +0 -8
  144. package/src/app/create-application.js +0 -143
  145. package/src/app/state-service.js +0 -38
  146. package/src/candidates.js +0 -78
  147. package/src/classifier.js +0 -63
  148. package/src/cli/command-arguments.js +0 -14
  149. package/src/context-pack.js +0 -206
  150. package/src/extractor.js +0 -77
  151. package/src/fact-history.js +0 -39
  152. package/src/facts/fact-service.js +0 -89
  153. package/src/http/bounded-json-array.js +0 -19
  154. package/src/http/lens-route.js +0 -50
  155. package/src/ingestion.js +0 -161
  156. package/src/lens/lens-correction-service.js +0 -81
  157. package/src/lens/lens-fact-writer.js +0 -85
  158. package/src/lens/lens-input.js +0 -62
  159. package/src/lens/lens-query-projection.js +0 -87
  160. package/src/lens/lens-query-ranking.js +0 -62
  161. package/src/lens/lens-query.js +0 -143
  162. package/src/lens/lens-resource-projection.js +0 -93
  163. package/src/lens/lens-resource-selection.js +0 -45
  164. package/src/lens/lens-resource-service.js +0 -103
  165. package/src/lens/lens-search-query.js +0 -122
  166. package/src/lens/lens-service.js +0 -183
  167. package/src/models.js +0 -44
  168. package/src/observer.js +0 -83
  169. package/src/project-rules.js +0 -33
  170. package/src/publication/outbox-service.js +0 -46
  171. package/src/publication/publication-envelope-schema.js +0 -75
  172. package/src/publication/publication-envelope.js +0 -37
  173. package/src/publication/publication-policy.js +0 -82
  174. package/src/publication/publication-service.js +0 -48
  175. package/src/router.js +0 -58
  176. package/src/runtime-options.js +0 -138
  177. package/src/security/episode-visibility.js +0 -14
  178. package/src/security/fact-visibility.js +0 -15
  179. package/src/security/source-metadata-policy.js +0 -8
  180. package/src/storage/episode-evidence-preview.js +0 -100
  181. package/src/storage/fact-search-order.js +0 -18
  182. package/src/storage/file/episode-evidence.js +0 -37
  183. package/src/storage/file/episode-index.js +0 -59
  184. package/src/storage/file/fact-search.js +0 -60
  185. package/src/storage/file-store.js +0 -437
  186. package/src/storage/migrate.js +0 -128
  187. package/src/storage/migrations/001-initial.sql +0 -83
  188. package/src/storage/migrations/002-storage-integrity.sql +0 -113
  189. package/src/storage/record-validation.js +0 -46
  190. package/src/storage/snapshot-defaults.js +0 -54
  191. package/src/storage/sqlite/candidates-repository.js +0 -84
  192. package/src/storage/sqlite/episode-evidence-repository.js +0 -154
  193. package/src/storage/sqlite/episode-privacy-sql.js +0 -33
  194. package/src/storage/sqlite/episodes-repository.js +0 -52
  195. package/src/storage/sqlite/fact-search-repository.js +0 -162
  196. package/src/storage/sqlite/facts-repository.js +0 -146
  197. package/src/storage/sqlite/imports-repository.js +0 -39
  198. package/src/storage/sqlite/mapper.js +0 -84
  199. package/src/storage/sqlite/open-database.js +0 -15
  200. package/src/storage/sqlite/outbox-repository.js +0 -103
  201. package/src/storage/sqlite/snapshot-repository.js +0 -69
  202. package/src/storage/sqlite/spaces-repository.js +0 -52
  203. package/src/storage/sqlite/subscriptions-repository.js +0 -54
  204. package/src/storage/sqlite-store.js +0 -159
  205. package/src/storage/stable-json.js +0 -24
  206. package/src/storage/store-port.js +0 -20
  207. package/src/store.js +0 -2
package/README.md CHANGED
@@ -1,246 +1,484 @@
1
- # 复利(Fuli)
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/JevonsCode/fuli/main/web/assets/brand/fuli-logo.png" alt="Fuli logo" width="72" />
3
+ </p>
2
4
 
3
- 复利是一个面向 AI Agent 的本地优先上下文图谱。它让 Codex、Claude Code 和
4
- Cursor 在会话之间复用个人偏好、项目约束、历史决策与 Runbook,同时保留来源和
5
- 知识边界。
5
+ <h1 align="center">Fuli</h1>
6
6
 
7
- 当前 npm 版本是个人版:个人知识与管理界面运行在本机。团队共享 Provider 是独立的
8
- 服务部署单元,不作为第二个用户 npm 包发布。
7
+ <p align="center">
8
+ English · <a href="README.zh-CN.md">简体中文</a>
9
+ </p>
9
10
 
10
- ## 安装
11
+ <p align="center">
12
+ <a href="https://www.npmjs.com/package/fuli-context"><img src="https://img.shields.io/npm/v/fuli-context?style=flat&logo=npm&label=fuli-context" alt="npm version" /></a>
13
+ <a href="https://www.npmjs.com/package/fuli-context"><img src="https://img.shields.io/npm/dm/fuli-context?style=flat" alt="npm downloads" /></a>
14
+ <a href="LICENSE"><img src="https://img.shields.io/npm/l/fuli-context?style=flat" alt="license" /></a>
15
+ </p>
11
16
 
12
- 准备:
17
+ Fuli is a local-first collaboration context graph for AI agents. It turns reusable knowledge,
18
+ experience, decision rationale, and preferences from human–AI project work into assets with
19
+ provenance, scope, authority, and temporal history. Codex, Claude Code, and Cursor can then reuse
20
+ those assets in later tasks instead of relearning the same context.
13
21
 
14
- - Node.js 24.12 或更高版本
15
- - Docker Compose v2;Docker Desktop 或 Rancher Desktop 均可
16
- - 至少约 4 GB 可供容器使用的内存
22
+ Fuli is not a transcript archive, and it is not an attempt to build a personality model that
23
+ replaces human judgment. AI retrieves, summarizes, warns, and executes; humans retain final
24
+ authority.
17
25
 
18
- 全局安装并初始化:
26
+ ## npm packages
19
27
 
20
- ```bash
21
- npm install --global fuli-context
22
- fuli setup
23
- ```
28
+ | Package | Status | Intended use |
29
+ | --- | --- | --- |
30
+ | [`fuli-context`](https://www.npmjs.com/package/fuli-context) | Available | Personal edition; personal knowledge, the graph database, and the management UI all run locally |
31
+ | Fuli Server npm package | In development | A separate server for team-shared deployments; not yet published |
24
32
 
25
- `fuli setup` 会先展示即将进行的操作,再请求确认。它会检查容器运行时、初始化本机
26
- Graphiti / Neo4j、创建个人空间、安装配套 Agent Skills,并为检测到的 Agent 注册
27
- `fuli` MCP。Codex 接入还会在用户级 `AGENTS.md` 中合并一段很短的 Bootstrap:每个
28
- 用户任务开始时先调用协作偏好工具,并把当前工作目录作为 `projectPath` 传给 Fuli。
29
- 偏好正文仍以 Fuli 为唯一来源,不会复制到 Codex 配置中。默认不会连接或模拟团队共享
30
- Provider。
33
+ `fuli-context` is currently the only available npm package. The shared layer never contains
34
+ personal taste, personality, or judgment preferences.
31
35
 
32
- 初始化完成后:
36
+ ## Philosophy
33
37
 
34
- ```bash
35
- fuli open
36
- ```
38
+ ### 1. Measure reuse value, not knowledge volume
37
39
 
38
- 管理界面默认位于 `http://127.0.0.1:2727`。
40
+ Fuli is built around one question:
39
41
 
40
- ## CLI 使用
42
+ > Without Fuli, would the agent have to relearn information that is confirmed, still valid, and
43
+ > relevant to the current task?
41
44
 
42
- 全局安装会提供两个等价命令:
45
+ Node count, transcript count, and graph size are not success metrics. The product succeeds when a
46
+ past collaboration asset is reused within the correct project, time, provenance, and authority
47
+ boundaries—and reduces repeated explanation, correction, or rework.
43
48
 
44
- - `fuli`:完整命令名,文档默认使用它;
45
- - `fl`:短别名,例如 `fl status` 与 `fuli status` 完全相同。
49
+ ### 2. Review every task; do not retain every task
46
50
 
47
- 查看版本和内置帮助:
51
+ A task may produce:
48
52
 
49
- ```bash
50
- fuli --version
51
- fuli --help
52
- ```
53
+ - reusable knowledge such as API conventions, runbooks, release procedures, or constraints;
54
+ - experience explaining why an approach worked or failed;
55
+ - a decision trace with options, a human choice, rationale, and later validation;
56
+ - judgment aids such as preferences, principles, taste, or personality tendencies.
53
57
 
54
- ### 本地服务与安装
58
+ It may also produce only disposable output, a guess, or a one-off choice. In that case,
59
+ `retain_nothing` is the correct result. Every task should perform a knowledge-value checkpoint, but
60
+ not every task must become stored knowledge.
55
61
 
56
- | 命令 | 用途 |
57
- | --- | --- |
58
- | `fuli setup [选项]` | 初始化 Provider、管理界面、Agent 接入和 Skills;可重复执行 |
59
- | `fuli start [选项]` | 启动本机服务 |
60
- | `fuli stop [--data-dir DIR]` | 安全停止本机服务并保留数据 |
61
- | `fuli restart [选项]` | 重启本机服务 |
62
- | `fuli status [--json]` | 查看服务状态;`--json` 输出机器可读结果 |
63
- | `fuli open` | 在浏览器中打开管理界面 |
64
- | `fuli update [setup 选项]` | 更新全局 npm 包,并用新版 CLI 刷新本机接入 |
65
- | `fuli uninstall [--yes]` | 清理 Agent 接入和服务,保留知识数据 |
62
+ ### 3. Human authority outranks agent repetition
66
63
 
67
- 常用示例:
64
+ An agent may discover candidates, surface conflicts, recommend promotion, or resolve a deferred
65
+ conflict when explicitly authorized. It may not turn semantic similarity, repetition, or its own
66
+ judgment into human confirmation. Shared-knowledge promotion and sensitive project mutations use a
67
+ preview followed by an explicit, one-time, atomic action.
68
68
 
69
- ```bash
70
- fuli start
71
- fuli start --open
72
- fuli status
73
- fuli status --json
74
- fuli restart
75
- fuli restart --rebuild
76
- fuli stop
77
- ```
69
+ ### 4. Assemble context, then retrieve evidence on demand
78
70
 
79
- `fuli stop` 只停止本机服务,不删除图谱数据。
71
+ Fuli does not inject the complete history at session start. The entry step always loads effective
72
+ personal-global preferences and preferences from one exactly matched project. When the current task
73
+ signals that a stable prior fact, method, URL, decision, release, deployment, or authentication
74
+ runbook may matter, the same step also performs a small bounded recall from that project and its
75
+ authorized knowledge sources. The agent uses focused on-demand search when more evidence is needed.
76
+ Retrieval alone is not usage; a usage event is recorded only when an item materially affects an
77
+ answer, implementation, or decision.
80
78
 
81
- `start` 和 `restart` 可使用 `--data-dir DIR`、`--personal-space NAME`、`--port PORT`;
82
- `--open` 会在启动后打开管理界面,`--rebuild` 会重新构建本机 Provider 容器。
79
+ ### 5. Preserve evolution instead of overwriting history
83
80
 
84
- ### setup 选项
81
+ An old approach may have been correct under earlier conditions and later replaced. Fuli preserves
82
+ provenance, confirmation authority, time, rationale, revisions, supersession, and negative evidence
83
+ so an agent can explain both what applies now and why the past was different. Negative feedback may
84
+ lower rank or trigger review, but it never silently erases history.
85
85
 
86
- | 选项 | 用途 |
87
- | --- | --- |
88
- | `--yes` | 跳过确认,适合无人值守执行 |
89
- | `--data-dir DIR` | 使用指定数据目录;后续命令应继续传入同一路径 |
90
- | `--personal-space NAME` | 设置首次初始化时的个人空间名称,默认是 `我` |
91
- | `--port PORT` | 设置管理界面端口,默认是 `2727` |
92
- | `--codex-only` | 只接入 Codex |
93
- | `--skip-agents` | 不修改 Agent 配置,也不刷新 Agent Skills |
94
- | `--no-start` | 初始化 Provider,但不启动管理界面 |
95
- | `--personal-only` | 只使用个人 Provider;这是默认模式 |
96
- | `--with-dev-public` | 同时启动本机开发用公共 Provider,仅用于开发或联调 |
97
-
98
- 例如,无人值守地完成默认初始化:
86
+ ### 6. Put shared knowledge in the parent; keep differences in each child
99
87
 
100
- ```bash
101
- fuli setup --yes
102
- ```
88
+ For example, hotel and flight projects can keep their own PRDs, configuration, and domain rules,
89
+ while a parent activity-platform project owns shared local-run, mock, test, and deployment runbooks:
103
90
 
104
- 使用自定义数据目录和管理界面端口:
91
+ ```text
92
+ Activity platform (parent: shared runbooks)
93
+ ├── Hotel project (child: hotel PRD / configuration / overrides)
94
+ └── Flight project (child: flight PRD / configuration / overrides)
95
+ ```
105
96
 
106
- ```bash
107
- fuli setup --data-dir "./fuli-data" --port 3727
97
+ When an agent works in the hotel project, it searches hotel-local knowledge first, then follows
98
+ explicit outgoing `PART_OF` or `USES_KNOWLEDGE_FROM` relationships to authorized sources, up to two
99
+ hops. A child item with the same stable key overrides an inherited item. Generic `RELATED_TO`
100
+ relationships do not expand scope, and project-scoped personal preferences are not inherited.
101
+
102
+ Similar items from multiple children create only a common-knowledge candidate. Current clustering
103
+ is a lexical heuristic, not proof of semantic equivalence. A human must select the canonical item,
104
+ duplicates, parent project, and rationale before an atomic promotion can occur.
105
+
106
+ ### 7. Local first; no personal model in the shared layer
107
+
108
+ The personal graph stays local by default. Fuli stores structured reusable knowledge, not raw
109
+ transcripts, credentials, temporary logs, or command output. The team-shared layer contains only
110
+ confirmed project or domain knowledge with context and provenance—not personal taste, personality,
111
+ or judgment preferences.
112
+
113
+ ## Agent interaction sequence
114
+
115
+ This is the simplified lifecycle for a normal task. The Chinese
116
+ [detailed sequence diagram](acceptance/智能体调用时序图.md) also covers inheritance, usage counting,
117
+ write previews, and source markers.
118
+
119
+ ```mermaid
120
+ sequenceDiagram
121
+ autonumber
122
+ actor U as User
123
+ participant A as Agent
124
+ participant L as Lifecycle integration
125
+ participant F as Fuli MCP
126
+ participant G as Local graph
127
+
128
+ U->>A: Submit a task in the current project
129
+ alt Claude Code (hook-enforced)
130
+ L->>F: begin_task_context(projectPath, taskPrompt)
131
+ F-->>A: Preferences, exact project, bounded recall, and task token
132
+ else Codex / Cursor (prompt fallback)
133
+ A->>F: get_collaboration_preferences(projectPath, taskPrompt)
134
+ F-->>A: Preferences, exact project, and bounded recall
135
+ end
136
+
137
+ A->>A: Inspect task_knowledge_recall
138
+ opt Historical context is needed and recall did not answer it
139
+ A->>F: search_current_project_knowledge with focused queries
140
+ F->>G: Search child first, then authorized parents
141
+ G-->>A: Bounded content, status, provenance, and history
142
+ opt Knowledge materially affects the result
143
+ A->>F: record_knowledge_usage
144
+ end
145
+ end
146
+
147
+ A->>A: Complete the implementation, validation, or answer
148
+ opt The task creates a decision, contradiction, or stale signal
149
+ A->>F: Record rationale or knowledge feedback
150
+ end
151
+ A->>F: checkpoint_task_knowledge
152
+ alt A small durable candidate batch exists
153
+ F->>G: capture_candidates
154
+ else Nothing should be retained
155
+ F-->>A: retain_nothing
156
+ end
157
+
158
+ alt Claude Code Stop hook
159
+ L->>F: verify_task_checkpoint
160
+ F-->>L: Allow stop only after review
161
+ else Prompt-fallback agent
162
+ Note over A,F: Same contract, but the host cannot deterministically block a missed review
163
+ end
164
+ A-->>U: Return the result and any Fuli sources actually used
108
165
  ```
109
166
 
110
- 只初始化 Provider、不启动管理界面:
167
+ ## Read-only external knowledge
168
+
169
+ One knowledge-base connection can be bound to one or more existing personal projects without
170
+ granting Fuli write access to the source. Each target keeps independent retrieval mode, sync
171
+ cursor, and error state. The Connections page supports multi-project assignment, connection
172
+ checks, manual synchronization, disconnection, and a per-project conflict switch.
173
+
174
+ | Connector | Read path | Current boundary |
175
+ | --- | --- | --- |
176
+ | MCP | Resources `list/read`; configured `search` / `fetch` tools | Default; HTTPS or loopback HTTP, plus stdio |
177
+ | Notion | Page Markdown and Data Source queries | Current `2026-03-11` API; explicit page or data-source IDs |
178
+ | Feishu / Lark | Wiki nodes, search, and Docx raw content | Docx text only; search may require a user access token |
179
+ | RAG Retrieval API | Dify-compatible external-knowledge retrieval contract | Live only; for compatible endpoints or adapters in front of systems such as RAGFlow |
180
+ | Trusted custom code | Local ESM `sync` / `retrieve` contract | Explicitly installed trusted code, not a sandbox |
181
+
182
+ <a id="connect-external-knowledge"></a>
183
+
184
+ ### Connect one or more knowledge bases to a project
185
+
186
+ One personal project can have multiple knowledge connections, and one connection can target
187
+ multiple personal projects. Each submission adds a connection instead of replacing an existing
188
+ one. Source configuration is stored once, while retrieval mode, synchronization state, and errors
189
+ are isolated per target. Use Bind projects on an existing connection to add or remove targets.
190
+
191
+ 1. Create or confirm the target under Personal projects.
192
+ 2. If the source needs a token, set it in the environment that starts Fuli, then start or restart
193
+ the service. The binding stores only the environment-variable name. For example, run
194
+ `export PROJECT_KB_TOKEN='...'` and then `fl restart`.
195
+ 3. Open `http://127.0.0.1:2727/connections`. Under External knowledge, enter a connection name,
196
+ connector, one or more bound projects, and retrieval mode.
197
+ 4. For MCP HTTP, enter the server URL and optional token environment-variable name. For MCP stdio,
198
+ enter its command and arguments. For Notion, enter the token environment-variable name and Page
199
+ IDs or Data Source IDs. For Feishu/Lark, enter the token environment-variable name, region, and
200
+ an explicit Space ID, root-node token, or node tokens. For RAG Retrieval API, enter a
201
+ Dify-compatible endpoint, knowledge-base IDs, and an optional token environment-variable name.
202
+ A custom connector takes a trusted local ESM module and source JSON.
203
+ 5. Select Add connection and then Check. A successful `mirror` or `hybrid` binding can be synced;
204
+ a `live` binding reads its source when an Agent query runs.
205
+ 6. After creation, use Bind projects to add or remove projects and select a mode per project.
206
+
207
+ The project graph shows an External knowledge source node and a Uses external knowledge edge for
208
+ each assignment. This is a read-only projection of connection configuration. Live bodies are still
209
+ retrieved only when an Agent invokes `search_connected_knowledge`; showing the node does not mirror
210
+ content locally.
211
+
212
+ Retrieval modes differ as follows:
213
+
214
+ - `live`: read the third party at query time without storing a body mirror in Fuli; the source must
215
+ be available.
216
+ - `mirror`: manually mirror read-only content into the bound personal project and query the graph.
217
+ - `hybrid`: use both the local mirror and live source results; recommended when the connector
218
+ supports both capabilities.
219
+
220
+ Bindings support `live`, `mirror`, and `hybrid` modes. Mirror content is written only to the bound
221
+ personal project as `observed`, `pending`, `restricted`, local-only knowledge. Credentials are read
222
+ from named environment variables and are not stored in binding JSON. Source writes are never part
223
+ of the connector contract. Documents that look like credential material are skipped individually,
224
+ reported by count, and never enter the graph or Agent context.
225
+
226
+ <a id="external-knowledge-conflict-policy"></a>
227
+
228
+ ### Conflict policy
229
+
230
+ The conflict policy is stored per personal project and applies across that project's personal
231
+ graph, all external bindings, and explicitly selected public projects:
232
+
233
+ - Ask in the Agent conversation is the default. The Agent presents conflicting content, source,
234
+ and scope separately so the user can choose.
235
+ - Allow an Agent decision lets the Agent select the stronger or fresher source for the current
236
+ response and requires it to explain the basis. It never confirms, invalidates, overwrites, or
237
+ writes back any knowledge.
238
+
239
+ From the project directory, an Agent can be asked: `Search the current project and connected knowledge bases for the payment callback contract; list conflicting sources and ask me to decide.`
240
+
241
+ `search_connected_knowledge` keeps personal-graph evidence, each external binding, and explicitly
242
+ selected public projects as separate source sets. Public-project aggregation is **Beta**. When an
243
+ Agent finds a material conflict, the default policy is to show it in the conversation and ask the
244
+ user; the optional Agent-decision policy applies to the current response only and cannot confirm,
245
+ invalidate, or rewrite any source. Direct external-to-public binding, reviewed public promotion,
246
+ scheduled sync, webhooks, and full deletion reconciliation remain **TODO**.
247
+
248
+ See the [external-knowledge architecture and connector contract](docs/external-knowledge-architecture.md).
249
+
250
+ ## Current capabilities and evidence boundaries
251
+
252
+ Core mechanisms covered by implementation and automated tests include:
253
+
254
+ - a local personal space, exact project scope, and selective parent inheritance;
255
+ - preference confirmation, deferred conflict resolution, revision history, and source markers;
256
+ - bounded task-prompt recall, focused on-demand retrieval, and material-usage auditing;
257
+ - task entry and completion checkpoints, plus Claude Code entry and Stop hooks;
258
+ - decision options, rationale, and validation results supplied during initial capture;
259
+ - knowledge-usage events, negative feedback, and content-generation isolation;
260
+ - persistent scoped knowledge reviews with pause/resume watermarks;
261
+ - common-knowledge discovery and preview-token-protected atomic promotion;
262
+ - read-only multi-project MCP, Notion, Feishu/Lark, Dify-compatible RAG Retrieval API, and trusted-code bindings with connected retrieval.
263
+
264
+ The following must not be presented as already proven:
265
+
266
+ - the A/B thresholds in `FULI_ALIGNMENT_BENCHMARK.md` are acceptance conventions; claims that Fuli
267
+ reduces explanation or rework require a sufficiently large set of controlled, real paired tasks;
268
+ - benchmark projects and conversations are explicitly labeled **MOCK / synthetic data**, not user or
269
+ production data;
270
+ - the decision tool can include validation during initial capture, but it does not yet expose a
271
+ dedicated operation for appending immutable validation results to an existing `Decision`;
272
+ - Claude Code has deterministic lifecycle hooks; Codex and Cursor currently use prompt fallback and
273
+ must not be described as equally enforced;
274
+ - selected public projects in connected retrieval are Beta; external-to-public promotion and
275
+ background delta synchronization are not implemented.
276
+
277
+ ## Installation
278
+
279
+ Requirements:
280
+
281
+ - Node.js 24.12 or later;
282
+ - Docker Compose v2 through Docker Desktop, Rancher Desktop, or another compatible runtime;
283
+ - approximately 4 GB of memory available to the containers.
284
+
285
+ Install globally and initialize:
111
286
 
112
287
  ```bash
113
- fuli setup --no-start
288
+ npm install --global fuli-context
289
+ fuli setup
114
290
  ```
115
291
 
116
- ## 更新
292
+ `fuli setup` first shows its plan and asks for confirmation. It then checks the container runtime,
293
+ initializes local Graphiti / Neo4j, creates a personal space, installs the companion Agent Skills,
294
+ and registers the `fuli` MCP with detected agents. The default setup connects only the personal
295
+ Provider; it does not simulate a team-shared service.
296
+
297
+ Open the management UI after setup:
117
298
 
118
299
  ```bash
119
- fuli update
300
+ fuli open
120
301
  ```
121
302
 
122
- `fuli update` 默认先展示更新计划并请求确认。需要无人值守执行时:
303
+ The default URL is `http://127.0.0.1:2727`.
123
304
 
124
- ```bash
125
- fuli update --yes
126
- ```
305
+ The Settings page manages all seven local Fuli ports, LAN access, automatic capture, Agent access,
306
+ UI language, and the resource refresh interval. Run `fuli restart` after saving port or LAN changes;
307
+ the refresh interval applies immediately. The same page polls real memory and disk usage for the
308
+ management service, Providers, Neo4j, application files, and local data. Memory is sampled on every
309
+ poll; disk usage is sampled at most once per minute, with separate timestamps. Missing container metrics
310
+ are shown as partial instead of being replaced with mock values. Browser-tab memory and shared
311
+ container-VM overhead are excluded from the Fuli total.
127
312
 
128
- 更新流程会先查询 npm 的 `latest` 版本;确认不会降级后,才安全停止旧版服务、安装当时
129
- 的 `fuli-context@latest` 对应版本,再直接使用新安装版本的 CLI 执行 `setup --yes`。
130
- 既有知识数据、配置备份和 Neo4j 数据卷不会删除;即使 npm 上已经是当前版本,也会刷新
131
- Agent 接入和配套 Skills。`update` 支持上表中的全部 setup 选项;使用过自定义数据目录、
132
- 端口或 Provider 模式时,应在更新时重复传入相同选项。
313
+ ## CLI
133
314
 
134
- 如果当前 CLI 来自尚未发布的工作区版本,并且版本号高于 npm `latest`,更新会在停止服务
135
- 和安装包之前退出,避免把开发版本降级。
315
+ The global package provides two equivalent commands: `fuli` and the short alias `fl`.
316
+ CLI help, prompts, status output, and errors are always in English and do not follow the web or
317
+ system locale. User data such as paths and space names is displayed unchanged.
136
318
 
137
- 如果当前已安装版本尚不识别 `update`,需要先手动升级一次到包含该命令的版本:
319
+ | Command | Purpose |
320
+ | --- | --- |
321
+ | `fuli --help` / `fuli -h` | List every public command and its available options |
322
+ | `fuli --version` / `fuli -v` | Print the installed Fuli CLI version |
323
+ | `fuli setup [options]` | Initialize the Provider, UI, agent integrations, and Skills; safe to rerun |
324
+ | `fuli start [options]` | Start the Provider and UI, optionally opening a browser, rebuilding containers, or enabling LAN access |
325
+ | `fuli stop [--data-dir DIR]` | Stop services without deleting data |
326
+ | `fuli restart [options]` | Restart local services using the same runtime options as `start` |
327
+ | `fuli status [--json] [--data-dir DIR] [--port PORT]` | Show UI, personal graph, and shared-service status; `--json` emits machine-readable output |
328
+ | `fuli open [--data-dir DIR]` | Open the current management UI in the default browser |
329
+ | `fuli update [setup options]` | Update the npm package and refresh local integrations |
330
+ | `fuli uninstall [--yes] [--data-dir DIR]` | Remove agent integrations and services while preserving knowledge data and Neo4j volumes |
331
+
332
+ Common commands:
138
333
 
139
334
  ```bash
140
- npm install --global fuli-context@latest
141
- fuli setup --yes
335
+ fuli --version
336
+ fuli status
337
+ fuli restart --rebuild
338
+ fuli start --lan
339
+ fuli stop
142
340
  ```
143
341
 
144
- 如果自动更新在 npm 安装或新版 setup 阶段失败,知识数据仍会保留。检查命令输出后可用
145
- 上面两条命令恢复;使用过自定义 setup 选项时也要一并带上。
342
+ `start` and `restart` accept `--data-dir DIR`, `--personal-space NAME`, `--port PORT`, `--open`,
343
+ `--rebuild`, `--lan`, and `--no-lan`. When port or LAN flags are omitted, the saved Settings values
344
+ are used. LAN mode listens on private IPv4 addresses and prints the reachable URLs, the
345
+ `fuli` username, and a temporary access code generated for that start. The default remains
346
+ loopback-only; internal Providers and Neo4j ports are never exposed by `--lan`. LAN mode uses
347
+ HTTP Basic Auth and is intended only for trusted home or office Wi-Fi, not public deployment.
146
348
 
147
- ## 卸载
349
+ `setup` and `update` accept:
148
350
 
149
- 先清理 Agent 接入,再移除全局 npm 包:
351
+ | Option | Purpose |
352
+ | --- | --- |
353
+ | `--yes` | Skip confirmation for unattended setup |
354
+ | `--codex-only` | Configure Codex only |
355
+ | `--data-dir DIR` | Use a specific data and configuration directory |
356
+ | `--personal-space NAME` | Set the personal-space name; defaults to `Personal` |
357
+ | `--port PORT` | Set the management UI port; defaults to `2727` |
358
+ | `--skip-agents` | Do not change agent configuration or Skills |
359
+ | `--no-start` | Initialize the Provider without starting the UI |
360
+ | `--personal-only` | Use only the personal Provider; this is the default |
361
+ | `--with-dev-public` | Start a development shared Provider for local integration work only |
362
+
363
+ Update:
150
364
 
151
365
  ```bash
152
- fuli uninstall
153
- npm uninstall --global fuli-context
366
+ fuli update
154
367
  ```
155
368
 
156
- `fuli uninstall` 会:
157
-
158
- - 停止本机 Fuli 服务;
159
- - 从 Codex、Claude Code 和 Cursor 中移除 Fuli MCP 接入;
160
- - 只删除仍与当前安装包完全一致的 Fuli Skills,有本地修改的 Skill 会保留;
161
- - 保留个人图谱、配置备份与 Neo4j 数据卷。
162
-
163
- 这样重新安装时可以继续使用原数据。数据永久删除不包含在自动卸载流程中,避免误删。
369
+ The update flow verifies that it will not downgrade the installation, stops the old services,
370
+ installs `fuli-context@latest`, and refreshes agent integrations. Existing knowledge, configuration
371
+ backups, and Neo4j volumes remain intact. Reuse any custom setup options during updates.
164
372
 
165
- ## 个人版边界
373
+ Uninstall:
166
374
 
167
- - 个人知识写入本机 Provider。
168
- - Agent 归纳结构化知识,不保存整段会话。
169
- - Token、Cookie、私钥、凭据、临时日志与原始命令输出不会写入图谱。
170
- - Graphiti 的远程 LLM 路径被禁用;当前嵌入在本机计算。
171
- - 搜索按个人空间和项目范围显式限定,不会默认混入所有项目。
172
- - Fuli 不是实时监控或 Git 服务;实时错误和代码状态应从对应的监控、日志或 Git
173
- 工具获取。
174
-
175
- 团队共享能力将通过单独部署的 Provider 提供。个人版 npm 继续作为本地 CLI、管理界面
176
- 和 Agent 接入客户端,避免用户同时安装两个容易混淆的全局命令包。
177
-
178
- ## Agent 工作方式
179
-
180
- Fuli 为支持的 Agent 安装两个用户级 Skills:
181
-
182
- - `capturing-session-knowledge`:按稳定知识边界检索和静默沉淀上下文;
183
- - `grilling-project`:帮助用户审视和补全个人项目资料。
375
+ ```bash
376
+ fuli uninstall
377
+ npm uninstall --global fuli-context
378
+ ```
184
379
 
185
- Codex 的用户级 Bootstrap 要求 Agent 在每个用户任务开始时、调用其他工具或回答之前,
186
- 调用 `get_collaboration_preferences`。调用只把当前工作目录作为瞬时 `projectPath`
187
- 传给本机 Fuli;绝对路径不会写入图谱,也不会出现在工具结果中。Fuli 在 MCP 服务端
188
- 完成匹配:个人全局的品味、个性与判断偏好始终生效;只有仓库根、Codex worktree 的
189
- 原仓库,或工作区内唯一的精确子项目对应一个已登记个人项目时,才叠加该项目偏好。
190
- 模糊、多项目、待确认、已失效、冲突或其他项目的偏好不会进入实际生效列表。首次写入
191
- 或更新 Bootstrap 后,新建或重新打开一个 Codex 任务,让用户级 `AGENTS.md` 重新加载;
192
- 此后偏好修改会在下一次用户任务中重新读取,不需要重启 Codex。
380
+ Automated uninstall does not permanently delete the personal graph, which allows a later install to
381
+ reuse the same data.
193
382
 
194
- 疑似冲突既可以立即人工处理,也可以标记为“交给 AI,使用时处理”。后者不会提前覆盖
195
- 任何一条记录;只有后续任务确实需要相关偏好时,Agent 才会先比较双方并调用专用解决
196
- 工具。解决结果会保留修订历史,并标明该偏好曾发生冲突、由 AI 处理及其判断依据。
197
- 协作偏好页顶部的“已确认”“待确认”“疑似冲突”均为可点击入口;“待确认”会筛出对应
198
- 记录并打开首条详情,可继续确认、纠正或标记失效。
383
+ ## Agent integrations and primary tools
199
384
 
200
- 主要 MCP 工具包括:
385
+ Fuli installs the `capturing-session-knowledge`, `grilling-project`, and `flreview` Skills for
386
+ supported agents. `/flreview` offers all knowledge, personal preferences, or personal-project
387
+ scope. If the user has no patience, it skips mood, time, and token questions and reviews only a
388
+ small number of highest-priority items.
389
+ Claude Code uses `UserPromptSubmit` and `Stop` hooks for the task lifecycle. Codex's user-level
390
+ `AGENTS.md` and Cursor instructions use prompt fallback. Preference content remains in local Fuli as
391
+ the single source of truth and is not copied into agent configuration.
201
392
 
202
- | 工具 | 用途 |
203
- | --- | --- |
204
- | `get_collaboration_preferences` | 获取当前会话实际生效的全局与项目级协作偏好 |
205
- | `resolve_deferred_preference_conflict` | 在相关任务首次使用前解决已交给 AI 的偏好冲突并留下审计标记 |
206
- | `capture_session_knowledge` | 批量写入个人知识或创建发布预审草稿 |
207
- | `search_knowledge_graph` | 在明确范围内查询个人偏好与项目知识 |
208
- | `get_knowledge_graph` | 获取有界节点—关系图 |
209
- | `list_knowledge_spaces` | 查看个人空间、项目与订阅 |
210
- | `upsert_personal_project` | 新建或更新个人项目资料 |
211
- | `revise_personal_knowledge` | 修正、失效或恢复个人知识 |
212
- | `get_graphiti_status` | 检查 Provider 与 Graphiti 状态 |
213
-
214
- ## 本机服务
215
-
216
- | 服务 | 默认地址 |
393
+ | Tool | Purpose |
217
394
  | --- | --- |
218
- | 个人 Neo4j Browser / Bolt | `127.0.0.1:7474` / `127.0.0.1:7687` |
219
- | 个人 Provider | `127.0.0.1:8787` |
220
- | Fuli 管理界面 | `127.0.0.1:2727` |
221
-
222
- 如果端口被占用、Docker Compose 不可用或容器引擎未启动,setup 会在修改 Agent 配置前
223
- 停止,并给出对应错误。
224
-
225
- ## 源码开发
395
+ | `begin_task_context` | Hook entry: resolve the task, run bounded recall when signaled, and create a task token |
396
+ | `get_collaboration_preferences` | Fallback entry: read effective preferences and bounded task recall |
397
+ | `search_current_project_knowledge` | Search the child first, then authorized knowledge sources |
398
+ | `search_knowledge_graph` | Run a general query within an explicit bounded scope |
399
+ | `search_connected_knowledge` | Search the graph, project-bound read-only sources, and selected public projects without merging provenance |
400
+ | `record_knowledge_usage` | Record a citation or application that materially affected the result |
401
+ | `record_knowledge_feedback` | Preserve rejection, failed validation, contradiction, or stale evidence |
402
+ | `record_decision_trace` | Store options, rejected alternatives, rationale, and optional initial validation |
403
+ | `capture_session_knowledge` | Store a small structured batch of durable candidates |
404
+ | `checkpoint_task_knowledge` | Complete review with `capture_candidates` or `retain_nothing` |
405
+ | `discover_common_knowledge_candidates` | Read-only discovery of possible parent-project knowledge |
406
+ | `preview_common_knowledge_promotion` | Preview a human-confirmed promotion |
407
+ | `apply_common_knowledge_promotion` | Apply the preview atomically with a one-time token |
408
+ | `resolve_deferred_preference_conflict` | Resolve an AI-deferred conflict only when a task needs it |
409
+ | `start_knowledge_review` | Start or resume an exact personal review scope |
410
+ | `list_knowledge_review_candidates` | Rank candidates by time, conflicts, weight, and cross-session repetition |
411
+ | `record_knowledge_review_progress` | Save keep, update, invalidate, skip, or defer outcomes |
412
+ | `finish_knowledge_review` | Pause, or complete and advance the next-review watermark |
413
+
414
+ ## Privacy and safety boundaries
415
+
416
+ - Personal knowledge is written to the local Provider.
417
+ - Agents distill structured knowledge instead of storing raw transcripts.
418
+ - Tokens, cookies, private keys, credentials, private contact details, temporary logs, and raw command
419
+ output must not enter the graph.
420
+ - Graphiti's remote-LLM path is disabled; embeddings are currently computed locally.
421
+ - Searches are bounded by personal space and project scope instead of mixing every project.
422
+ - External connectors never write to third-party sources; raw credentials are rejected from stored
423
+ binding configuration.
424
+ - Shared promotion requires auditable human confirmation. Agent usage evidence can promote an item
425
+ only as far as `agent_confirmed`.
426
+ - Fuli is not a real-time monitoring or Git service; current state must be read from the relevant
427
+ source system.
428
+
429
+ ## Local services
430
+
431
+ | Service | Default loopback address | Availability |
432
+ | --- | --- | --- |
433
+ | Fuli management UI | `127.0.0.1:2727` | Always |
434
+ | Personal Provider | `127.0.0.1:8787` | Always |
435
+ | Personal Neo4j Browser / Bolt | `127.0.0.1:8060` / `127.0.0.1:7687` | Always |
436
+ | Development shared Provider | `127.0.0.1:8788` | `--with-dev-public` only |
437
+ | Development shared Neo4j Browser / Bolt | `127.0.0.1:7475` / `127.0.0.1:7688` | `--with-dev-public` only |
438
+
439
+ These seven ports can be changed in Settings. Provider and Neo4j bindings remain loopback-only even
440
+ when the management UI is started in LAN mode.
441
+
442
+ To access the UI from another device on the same Wi-Fi, run `fuli start --lan`. Starting LAN mode
443
+ from a loopback-only runtime safely restarts only the management UI and preserves Provider and
444
+ graph data. Disable LAN in Settings and run `fuli restart`, or run `fuli restart --no-lan`, to return
445
+ to loopback-only mode. Starting LAN mode again rotates the temporary access code.
446
+
447
+ If a port is occupied, Docker Compose is unavailable, or the container runtime is not running,
448
+ setup stops before modifying agent configuration and reports the cause.
449
+
450
+ ## Acceptance and development
451
+
452
+ - [Alignment Benchmark](FULI_ALIGNMENT_BENCHMARK.md)
453
+ - [Chinese acceptance index](acceptance/README.md)
454
+ - [Knowledge retrieval and confirmation diagrams](acceptance/知识检索与确认流程图.md)
455
+ - [Read-only external-knowledge architecture](docs/external-knowledge-architecture.md)
226
456
 
227
457
  ```bash
228
458
  npm install
229
459
  npm test
230
460
  npm run test:package
461
+ npm run test:external-knowledge:live
231
462
  ```
232
463
 
233
- Provider 验证:
464
+ The external-knowledge live test temporarily downloads two public official documentation
465
+ repositories, validates read-only synchronization and retrieval, then removes the complete
466
+ temporary directory. It is network-dependent and is not part of the default test suite.
467
+
468
+ Provider validation:
234
469
 
235
470
  ```bash
236
- python3 -m compileall -q graph-provider/fuli_graph
237
- python3 -m pytest -q graph-provider/tests
471
+ python3.12 -m venv .venv
472
+ . .venv/bin/activate
473
+ python -m pip install "./graph-provider[dev]"
474
+ python -m compileall -q graph-provider/fuli_graph
475
+ python -m pytest -q graph-provider/tests
238
476
  docker compose -f compose.graphiti.yml config --quiet
239
477
  ```
240
478
 
241
- `npm run test:package` 会构建前端、生成真实 npm tarball、安装到隔离的全局前缀,并验证
242
- `fuli` / `fl`、版本号、帮助信息和已发布 Web UI。测试源码、QA 截图与内部设计文档
243
- 都不会进入 npm 包。
479
+ `npm run test:package` builds the web UI, creates a real npm tarball, installs it into an isolated
480
+ global prefix, and verifies `fuli` / `fl`, version output, help output, and the packaged UI. Tests,
481
+ QA screenshots, and internal design documents are excluded from the npm package.
244
482
 
245
483
  ## License
246
484