@roarpeng/graphflow 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ All notable changes to this project are documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [1.4.1] - 2026-07-05
8
+
9
+ ### Fixed
10
+
11
+ - **CI Windows 构建**:`package-windows` 固定 `windows-2022`,修复 `windows-latest`(VS 2026)上 node-gyp 无法识别 VS 18 导致 `hnswlib-node` 编译失败
12
+ - **validate**:Linux CI 增加 `npm rebuild hnswlib-node`,确保 HNSW 原生模块在测试前就绪
13
+ - **文档一致性**:同步 MCP 工具列表(移除 v1.4 已删除的 `enrich_graph` / `model_download` / `metrics`;补充 `submit_insight` / `merge_insight` / `skill_guide`)
14
+
15
+ ### Changed
16
+
17
+ - **README / 扩展 README**:补充 VSIX 安装步骤(VS Code / Cursor)、MCP `install` 命令、`hnswlib-node` 原生编译环境说明
18
+
7
19
  ## [1.4.0] - 2026-07-04
8
20
 
9
21
  ### Changed
package/README.md CHANGED
@@ -97,9 +97,9 @@ npx @roarpeng/graphflow context preview "orchestrator" --json
97
97
 
98
98
  ### 发布信息
99
99
 
100
- - 最新版本:**v1.4.0**(root + vscode-extension);npm:`@roarpeng/graphflow@1.4.0`
101
- - **GitHub Release**:push 到 `main` 后 CI 自动构建 VSIX 并发布到 GitHub Releases
102
- - **npm 发布**:push tag `v*` 触发 npm publish
100
+ - 最新版本:**v1.4.1**(root + vscode-extension);npm:`@roarpeng/graphflow@1.4.1`
101
+ - **GitHub Release**:push 到 `main` 后 CI `windows-2022` 上自动构建 VSIX 并发布到 [GitHub Releases](https://github.com/Roarpeng/GraphFlow/releases)
102
+ - **npm 发布**:push tag `v*`(如 `v1.4.1`)触发 [Publish npm](https://github.com/Roarpeng/GraphFlow/actions/workflows/publish-npm.yml) 工作流
103
103
  - 变更日志:`CHANGELOG.md`
104
104
 
105
105
  ## 环境要求
@@ -107,6 +107,9 @@ npx @roarpeng/graphflow context preview "orchestrator" --json
107
107
  1. Node.js >= 20
108
108
  2. npm >= 10
109
109
  3. Windows / macOS / Linux 均可
110
+ 4. **npm 安装 `@roarpeng/graphflow` 时**:`hnswlib-node` 为**强制依赖**(HNSW 向量召回),首次安装会编译原生模块
111
+ - **Linux / macOS**:通常自带 C++ 工具链即可
112
+ - **Windows**:需安装 [Visual Studio Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) 并勾选 **「使用 C++ 的桌面开发」**;或使用 WSL / Linux 环境安装
110
113
 
111
114
  ## 5 分钟本地试跑
112
115
 
@@ -303,13 +306,18 @@ const run = await orchestrate(
303
306
  GraphFlow CLI 可自动检测并安装 MCP 配置到 15+ 编码 Agent:
304
307
 
305
308
  ```bash
306
- # 检测已安装的 Agent
309
+ # 检测已安装的 Agent 与 MCP 配置状态
307
310
  npx @roarpeng/graphflow doctor
308
311
 
309
- # 自动安装 MCP 配置到所有检测到的 Agent
312
+ # 一键安装 MCP + Skill + Cursor Rules(推荐)
313
+ npx @roarpeng/graphflow install
314
+
315
+ # 或仅初始化项目级配置(.graphflow/config.json 等)
310
316
  npx @roarpeng/graphflow init
311
317
  ```
312
318
 
319
+ **本地 `npm install` 后**:若项目已有 `.cursor/mcp.json` 或 `.vscode/mcp.json`,postinstall 会自动注入 workspace 级 GraphFlow MCP 与 Skill;完整用户级安装请运行 `npx @roarpeng/graphflow install`。
320
+
313
321
  支持的 Agent:Cursor、VS Code、Trae、Claude Code、Windsurf、Cline、Roo Code、Kilo Code、PearAI、Gemini、Codex、Antigravity、Amazon Q、Zed、Continue。
314
322
 
315
323
  ## 配置文件
@@ -350,7 +358,25 @@ cp graphflow.config.example.json graphflow.config.json
350
358
  | `skillPolicy.enableSkillFlywheel` | 技能飞轮 |
351
359
  | `embeddingPolicy.provider` | embedding 提供者(`hash` 零成本 / `openai`) |
352
360
 
353
- ## VS Code 扩展
361
+ ## VS Code / Cursor 扩展
362
+
363
+ 扩展内置 GraphFlow runtime,**安装 VSIX 后无需再 clone 本仓库或配置 `npm run start`**。
364
+
365
+ ### 安装 VSIX(推荐)
366
+
367
+ 1. 打开 [GitHub Releases](https://github.com/Roarpeng/GraphFlow/releases),下载最新 `graphflow-vscode-<version>.vsix`(CI 在每次 push `main` / tag 后自动构建)
368
+ 2. **VS Code**:扩展视图 → `…` → **从 VSIX 安装…** → 选择下载的文件
369
+ 3. **Cursor**:扩展视图 → 右上角 `…` → **Install from VSIX** → 选择下载的文件
370
+ 4. 重启编辑器;首次激活会自动尝试安装 GraphFlow MCP 到本机 Agent 配置
371
+ 5. 命令面板运行 **GraphFlow: Show Settings** → **建立图谱(无需 LLM)** → 即可使用 Context Preview / 知识图谱
372
+
373
+ CLI 安装(若已安装 `code` / `cursor` 命令):
374
+
375
+ ```bash
376
+ code --install-extension graphflow-vscode-1.4.1.vsix
377
+ # 或
378
+ cursor --install-extension graphflow-vscode-1.4.1.vsix
379
+ ```
354
380
 
355
381
  ### 命令面板
356
382
 
@@ -374,7 +400,7 @@ Chat Agent(`@graphflow`):`/run`、`/plan`、`/graph`、`/skills`、`/diagn
374
400
 
375
401
  其它建图入口:`graph index` CLI、MCP `graphflow_index`、`autoIndexOnPreview` / `autoIndexOnRun` / `autoIndexOnSave`
376
402
 
377
- ### 开发模式
403
+ ### 开发模式(贡献者)
378
404
 
379
405
  ```bash
380
406
  cd vscode-extension
@@ -384,13 +410,11 @@ npm run build
384
410
 
385
411
  在 VS Code 中 `F5` 启动 Extension Development Host。
386
412
 
387
- ### 安装 VSIX
388
-
389
- 从 [GitHub Releases](https://github.com/Roarpeng/GraphFlow/releases) 下载最新 VSIX,或本地:
413
+ ### 本地打包 VSIX
390
414
 
391
415
  ```bash
392
- cd vscode-extension && npm run package
393
- code --install-extension artifacts/graphflow-vscode-*.vsix
416
+ npm run package:extension
417
+ # 输出:artifacts/graphflow-vscode-<version>.vsix
394
418
  ```
395
419
 
396
420
  ## 本地验收清单
@@ -44,6 +44,8 @@ Do not scan the whole repository, recursively inspect many files, or read large
44
44
  | `graphflow_plan_insight` | Six Thinking Hats + 5-Why deep analysis | Medium - ambiguous/high-stakes tasks |
45
45
  | `graphflow_run` | Plan + context package (bridge mode) | Medium - full task packaging |
46
46
  | `graphflow_report_outcome` | Report bridge-mode execution outcome back | Medium - close the learning loop |
47
+ | `graphflow_submit_insight` | Submit agent answers to Six Hats / plan prompts | Medium - no external LLM API |
48
+ | `graphflow_merge_insight` | Merge submitted insights into unified plan | Medium - after submit_insight |
47
49
 
48
50
  ### Graph Management Tools (Medium Frequency)
49
51
 
@@ -53,8 +55,6 @@ Do not scan the whole repository, recursively inspect many files, or read large
53
55
  | `graphflow_index_file` | Single file incremental index | Medium-High - after saving a file |
54
56
  | `graphflow_rebuild` | Clear cache + full re-index | Low - when graph is stale/corrupted |
55
57
  | `graphflow_inspect_graph` | Graph stats & sample nodes/edges | Low - check graph health |
56
- | `graphflow_enrich_graph` | Semantic enrichment of symbols | Rare - LLM-powered enrichment |
57
- | `graphflow_model_download` | Download local compression model | Rare - offline setup |
58
58
 
59
59
  ### Collaboration & Insights Tools (Low Frequency)
60
60
 
@@ -63,8 +63,8 @@ Do not scan the whole repository, recursively inspect many files, or read large
63
63
  | `graphflow_export_artifact` | Export graph to portable artifact | Low - team sharing |
64
64
  | `graphflow_import_artifact` | Import graph artifact | Low - skip full index on new machine |
65
65
  | `graphflow_skill_insights` | Learned skill patterns | Low - leverage prior learning |
66
+ | `graphflow_skill_guide` | Skill usage guide for connected agents | Low - onboarding |
66
67
  | `graphflow_stats` | Cumulative token savings stats | Low - ROI tracking |
67
- | `graphflow_metrics` | Prometheus-compatible metrics | Low - observability |
68
68
  | `graphflow_diagnose` | Provider health & model routing | Rare - config issues |
69
69
 
70
70
  ## Standard Workflows
@@ -21,10 +21,10 @@ GraphFlow is a graph-based context and planning service backed by a persistent M
21
21
  ┌─────────────────────────────────────────────────┐
22
22
  │ GraphFlow MCP Server (persistent backend) │
23
23
  │ 18 tools: preview, expand, plan, plan_insight, │
24
- │ run, report_outcome, index, index_file, rebuild,│
25
- enrich, model_download, inspect, skill_insights,│
26
- │ diagnose, export_artifact, import_artifact, │
27
- │ stats, metrics
24
+ │ run, report_outcome, submit_insight, merge_insight,│
25
+ index, index_file, rebuild, inspect, skill_insights,│
26
+ skill_guide, diagnose, export_artifact, import_artifact,│
27
+ │ stats
28
28
  └──────────────────┬──────────────────────────────┘
29
29
 
30
30
 
@@ -72,6 +72,8 @@ GraphFlow is a graph-based context and planning service backed by a persistent M
72
72
  | `graphflow_plan_insight` | Six Thinking Hats + 5-Why deep analysis | Medium - ambiguous/high-stakes tasks |
73
73
  | `graphflow_run` | Plan + context package (bridge mode) | Medium - full task packaging |
74
74
  | `graphflow_report_outcome` | Report bridge-mode execution outcome back | Medium - close the learning loop |
75
+ | `graphflow_submit_insight` | Submit agent answers to Six Hats / plan prompts | Medium - no external LLM API |
76
+ | `graphflow_merge_insight` | Merge submitted insights into unified plan | Medium - after submit_insight |
75
77
 
76
78
  ### Graph Management Tools (Medium Frequency)
77
79
 
@@ -81,8 +83,6 @@ GraphFlow is a graph-based context and planning service backed by a persistent M
81
83
  | `graphflow_index_file` | Single file incremental index | Medium-High - after saving a file |
82
84
  | `graphflow_rebuild` | Clear cache + full re-index | Low - when graph is stale/corrupted |
83
85
  | `graphflow_inspect_graph` | Graph stats & sample nodes/edges | Low - check graph health |
84
- | `graphflow_enrich_graph` | Semantic enrichment of symbols | Rare - LLM-powered enrichment |
85
- | `graphflow_model_download` | Download local compression model | Rare - offline setup |
86
86
 
87
87
  ### Collaboration & Insights Tools (Low Frequency)
88
88
 
@@ -91,8 +91,8 @@ GraphFlow is a graph-based context and planning service backed by a persistent M
91
91
  | `graphflow_export_artifact` | Export graph to portable artifact | Low - team sharing |
92
92
  | `graphflow_import_artifact` | Import graph artifact | Low - skip full index on new machine |
93
93
  | `graphflow_skill_insights` | Learned skill patterns | Low - leverage prior learning |
94
+ | `graphflow_skill_guide` | Skill usage guide for connected agents | Low - onboarding |
94
95
  | `graphflow_stats` | Cumulative token savings stats | Low - ROI tracking |
95
- | `graphflow_metrics` | Prometheus-compatible metrics | Low - observability |
96
96
  | `graphflow_diagnose` | Provider health & model routing | Rare - config issues |
97
97
 
98
98
  ---
@@ -300,14 +300,6 @@ graphflow_import_artifact(inputPath?)
300
300
 
301
301
  ### Workflow 7: Advanced Capabilities
302
302
 
303
- #### Semantic Enrichment (LLM required)
304
- ```
305
- graphflow_enrich_graph(batchSize?, sleepMs?, timeoutMs?)
306
- ```
307
- - Adds semantic descriptions to symbol nodes
308
- - Improves context quality for complex queries
309
- - Requires configured LLM provider
310
-
311
303
  #### Skill Insights (learning flywheel)
312
304
  ```
313
305
  graphflow_skill_insights(limit?, rootDir?)
@@ -324,14 +316,6 @@ graphflow_stats(configPath?, rootDir?)
324
316
  - ROI tracking
325
317
  - See how much GraphFlow has saved
326
318
 
327
- #### Prometheus Metrics
328
- ```
329
- graphflow_metrics(configPath?, rootDir?)
330
- ```
331
- - Prometheus text exposition format
332
- - Token savings, graph size, compression ratio
333
- - For observability dashboards
334
-
335
319
  #### Diagnostics
336
320
  ```
337
321
  graphflow_diagnose(configPath?)
@@ -377,9 +361,8 @@ Start
377
361
  ├─ Do you want to leverage prior learning?
378
362
  │ └─ YES → graphflow_skill_insights
379
363
 
380
- ├─ Tracking ROI / observability?
381
- ├─ Quick stats → graphflow_stats
382
- │ └─ Prometheus → graphflow_metrics
364
+ ├─ Tracking ROI?
365
+ └─ graphflow_stats
383
366
 
384
367
  └─ Is routing/models misbehaving?
385
368
  └─ YES → graphflow_diagnose
@@ -467,7 +450,7 @@ Always pay attention to `tokenBudget`:
467
450
  ### Context quality is poor
468
451
  1. Try more specific query terms
469
452
  2. Check if symbols are indexed (inspect graph)
470
- 3. Run `graphflow_enrich_graph` for semantic enhancement (LLM required)
453
+ 3. Run `graphflow_rebuild` if the graph may be stale
471
454
 
472
455
  ### Tool errors / configuration issues
473
456
  1. Run `graphflow_diagnose` to check provider health
@@ -527,9 +510,6 @@ await graphflow_skill_insights({ limit: 5 });
527
510
  // Token savings stats
528
511
  await graphflow_stats();
529
512
 
530
- // Prometheus metrics
531
- await graphflow_metrics();
532
-
533
513
  // Diagnose issues
534
514
  await graphflow_diagnose();
535
515
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roarpeng/graphflow",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -44,6 +44,8 @@ Do not scan the whole repository, recursively inspect many files, or read large
44
44
  | `graphflow_plan_insight` | Six Thinking Hats + 5-Why deep analysis | Medium - ambiguous/high-stakes tasks |
45
45
  | `graphflow_run` | Plan + context package (bridge mode) | Medium - full task packaging |
46
46
  | `graphflow_report_outcome` | Report bridge-mode execution outcome back | Medium - close the learning loop |
47
+ | `graphflow_submit_insight` | Submit agent answers to Six Hats / plan prompts | Medium - no external LLM API |
48
+ | `graphflow_merge_insight` | Merge submitted insights into unified plan | Medium - after submit_insight |
47
49
 
48
50
  ### Graph Management Tools (Medium Frequency)
49
51
 
@@ -53,8 +55,6 @@ Do not scan the whole repository, recursively inspect many files, or read large
53
55
  | `graphflow_index_file` | Single file incremental index | Medium-High - after saving a file |
54
56
  | `graphflow_rebuild` | Clear cache + full re-index | Low - when graph is stale/corrupted |
55
57
  | `graphflow_inspect_graph` | Graph stats & sample nodes/edges | Low - check graph health |
56
- | `graphflow_enrich_graph` | Semantic enrichment of symbols | Rare - LLM-powered enrichment |
57
- | `graphflow_model_download` | Download local compression model | Rare - offline setup |
58
58
 
59
59
  ### Collaboration & Insights Tools (Low Frequency)
60
60
 
@@ -63,8 +63,8 @@ Do not scan the whole repository, recursively inspect many files, or read large
63
63
  | `graphflow_export_artifact` | Export graph to portable artifact | Low - team sharing |
64
64
  | `graphflow_import_artifact` | Import graph artifact | Low - skip full index on new machine |
65
65
  | `graphflow_skill_insights` | Learned skill patterns | Low - leverage prior learning |
66
+ | `graphflow_skill_guide` | Skill usage guide for connected agents | Low - onboarding |
66
67
  | `graphflow_stats` | Cumulative token savings stats | Low - ROI tracking |
67
- | `graphflow_metrics` | Prometheus-compatible metrics | Low - observability |
68
68
  | `graphflow_diagnose` | Provider health & model routing | Rare - config issues |
69
69
 
70
70
  ## Standard Workflows
@@ -21,10 +21,10 @@ GraphFlow is a graph-based context and planning service backed by a persistent M
21
21
  ┌─────────────────────────────────────────────────┐
22
22
  │ GraphFlow MCP Server (persistent backend) │
23
23
  │ 18 tools: preview, expand, plan, plan_insight, │
24
- │ run, report_outcome, index, index_file, rebuild,│
25
- enrich, model_download, inspect, skill_insights,│
26
- │ diagnose, export_artifact, import_artifact, │
27
- │ stats, metrics
24
+ │ run, report_outcome, submit_insight, merge_insight,│
25
+ index, index_file, rebuild, inspect, skill_insights,│
26
+ skill_guide, diagnose, export_artifact, import_artifact,│
27
+ │ stats
28
28
  └──────────────────┬──────────────────────────────┘
29
29
 
30
30
 
@@ -72,6 +72,8 @@ GraphFlow is a graph-based context and planning service backed by a persistent M
72
72
  | `graphflow_plan_insight` | Six Thinking Hats + 5-Why deep analysis | Medium - ambiguous/high-stakes tasks |
73
73
  | `graphflow_run` | Plan + context package (bridge mode) | Medium - full task packaging |
74
74
  | `graphflow_report_outcome` | Report bridge-mode execution outcome back | Medium - close the learning loop |
75
+ | `graphflow_submit_insight` | Submit agent answers to Six Hats / plan prompts | Medium - no external LLM API |
76
+ | `graphflow_merge_insight` | Merge submitted insights into unified plan | Medium - after submit_insight |
75
77
 
76
78
  ### Graph Management Tools (Medium Frequency)
77
79
 
@@ -81,8 +83,6 @@ GraphFlow is a graph-based context and planning service backed by a persistent M
81
83
  | `graphflow_index_file` | Single file incremental index | Medium-High - after saving a file |
82
84
  | `graphflow_rebuild` | Clear cache + full re-index | Low - when graph is stale/corrupted |
83
85
  | `graphflow_inspect_graph` | Graph stats & sample nodes/edges | Low - check graph health |
84
- | `graphflow_enrich_graph` | Semantic enrichment of symbols | Rare - LLM-powered enrichment |
85
- | `graphflow_model_download` | Download local compression model | Rare - offline setup |
86
86
 
87
87
  ### Collaboration & Insights Tools (Low Frequency)
88
88
 
@@ -91,8 +91,8 @@ GraphFlow is a graph-based context and planning service backed by a persistent M
91
91
  | `graphflow_export_artifact` | Export graph to portable artifact | Low - team sharing |
92
92
  | `graphflow_import_artifact` | Import graph artifact | Low - skip full index on new machine |
93
93
  | `graphflow_skill_insights` | Learned skill patterns | Low - leverage prior learning |
94
+ | `graphflow_skill_guide` | Skill usage guide for connected agents | Low - onboarding |
94
95
  | `graphflow_stats` | Cumulative token savings stats | Low - ROI tracking |
95
- | `graphflow_metrics` | Prometheus-compatible metrics | Low - observability |
96
96
  | `graphflow_diagnose` | Provider health & model routing | Rare - config issues |
97
97
 
98
98
  ---
@@ -300,14 +300,6 @@ graphflow_import_artifact(inputPath?)
300
300
 
301
301
  ### Workflow 7: Advanced Capabilities
302
302
 
303
- #### Semantic Enrichment (LLM required)
304
- ```
305
- graphflow_enrich_graph(batchSize?, sleepMs?, timeoutMs?)
306
- ```
307
- - Adds semantic descriptions to symbol nodes
308
- - Improves context quality for complex queries
309
- - Requires configured LLM provider
310
-
311
303
  #### Skill Insights (learning flywheel)
312
304
  ```
313
305
  graphflow_skill_insights(limit?, rootDir?)
@@ -324,14 +316,6 @@ graphflow_stats(configPath?, rootDir?)
324
316
  - ROI tracking
325
317
  - See how much GraphFlow has saved
326
318
 
327
- #### Prometheus Metrics
328
- ```
329
- graphflow_metrics(configPath?, rootDir?)
330
- ```
331
- - Prometheus text exposition format
332
- - Token savings, graph size, compression ratio
333
- - For observability dashboards
334
-
335
319
  #### Diagnostics
336
320
  ```
337
321
  graphflow_diagnose(configPath?)
@@ -377,9 +361,8 @@ Start
377
361
  ├─ Do you want to leverage prior learning?
378
362
  │ └─ YES → graphflow_skill_insights
379
363
 
380
- ├─ Tracking ROI / observability?
381
- ├─ Quick stats → graphflow_stats
382
- │ └─ Prometheus → graphflow_metrics
364
+ ├─ Tracking ROI?
365
+ └─ graphflow_stats
383
366
 
384
367
  └─ Is routing/models misbehaving?
385
368
  └─ YES → graphflow_diagnose
@@ -467,7 +450,7 @@ Always pay attention to `tokenBudget`:
467
450
  ### Context quality is poor
468
451
  1. Try more specific query terms
469
452
  2. Check if symbols are indexed (inspect graph)
470
- 3. Run `graphflow_enrich_graph` for semantic enhancement (LLM required)
453
+ 3. Run `graphflow_rebuild` if the graph may be stale
471
454
 
472
455
  ### Tool errors / configuration issues
473
456
  1. Run `graphflow_diagnose` to check provider health
@@ -527,9 +510,6 @@ await graphflow_skill_insights({ limit: 5 });
527
510
  // Token savings stats
528
511
  await graphflow_stats();
529
512
 
530
- // Prometheus metrics
531
- await graphflow_metrics();
532
-
533
513
  // Diagnose issues
534
514
  await graphflow_diagnose();
535
515
  ```