@roarpeng/graphflow 1.9.12 → 1.9.14

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 (98) hide show
  1. package/AGENTS.md +2 -0
  2. package/CHANGELOG.md +33 -0
  3. package/CLAUDE.md +2 -0
  4. package/README.md +49 -8
  5. package/README.zh.md +129 -0
  6. package/cordis.patch.yml +30 -0
  7. package/dist/config/defaults.d.ts.map +1 -1
  8. package/dist/config/defaults.js +1 -0
  9. package/dist/config/defaults.js.map +1 -1
  10. package/dist/config/include-extensions.d.ts +7 -0
  11. package/dist/config/include-extensions.d.ts.map +1 -1
  12. package/dist/config/include-extensions.js +23 -0
  13. package/dist/config/include-extensions.js.map +1 -1
  14. package/dist/config/loader.d.ts.map +1 -1
  15. package/dist/config/loader.js +1 -0
  16. package/dist/config/loader.js.map +1 -1
  17. package/dist/config/schema.d.ts +6 -0
  18. package/dist/config/schema.d.ts.map +1 -1
  19. package/dist/graph/snapshot-view.d.ts +4 -0
  20. package/dist/graph/snapshot-view.d.ts.map +1 -1
  21. package/dist/graph/snapshot-view.js +36 -2
  22. package/dist/graph/snapshot-view.js.map +1 -1
  23. package/dist/integrations/agent-mcp-installer.d.ts.map +1 -1
  24. package/dist/integrations/agent-mcp-installer.js +8 -0
  25. package/dist/integrations/agent-mcp-installer.js.map +1 -1
  26. package/dist/integrations/agent-profiles/index.d.ts +2 -0
  27. package/dist/integrations/agent-profiles/index.d.ts.map +1 -1
  28. package/dist/integrations/agent-profiles/index.js +2 -0
  29. package/dist/integrations/agent-profiles/index.js.map +1 -1
  30. package/dist/integrations/agent-profiles/profiles/dsh.d.ts +2 -0
  31. package/dist/integrations/agent-profiles/profiles/dsh.d.ts.map +1 -0
  32. package/dist/integrations/agent-profiles/profiles/dsh.js +16 -0
  33. package/dist/integrations/agent-profiles/profiles/dsh.js.map +1 -0
  34. package/dist/integrations/agent-profiles/skills/dsh.d.ts +2 -0
  35. package/dist/integrations/agent-profiles/skills/dsh.d.ts.map +1 -0
  36. package/dist/integrations/agent-profiles/skills/dsh.js +13 -0
  37. package/dist/integrations/agent-profiles/skills/dsh.js.map +1 -0
  38. package/dist/integrations/dsh-harness-installer.d.ts +49 -0
  39. package/dist/integrations/dsh-harness-installer.d.ts.map +1 -0
  40. package/dist/integrations/dsh-harness-installer.js +193 -0
  41. package/dist/integrations/dsh-harness-installer.js.map +1 -0
  42. package/dist/integrations/ensure-anydoc.d.ts +5 -0
  43. package/dist/integrations/ensure-anydoc.d.ts.map +1 -1
  44. package/dist/integrations/ensure-anydoc.js +7 -0
  45. package/dist/integrations/ensure-anydoc.js.map +1 -1
  46. package/dist/integrations/skill-installer.d.ts.map +1 -1
  47. package/dist/integrations/skill-installer.js +6 -0
  48. package/dist/integrations/skill-installer.js.map +1 -1
  49. package/dist/learning/dialogue-thread.d.ts +88 -0
  50. package/dist/learning/dialogue-thread.d.ts.map +1 -0
  51. package/dist/learning/dialogue-thread.js +419 -0
  52. package/dist/learning/dialogue-thread.js.map +1 -0
  53. package/dist/learning/workbench-topic.d.ts +116 -0
  54. package/dist/learning/workbench-topic.d.ts.map +1 -0
  55. package/dist/learning/workbench-topic.js +642 -0
  56. package/dist/learning/workbench-topic.js.map +1 -0
  57. package/dist/surfaces/cli/index.js +123 -5
  58. package/dist/surfaces/cli/index.js.map +1 -1
  59. package/dist/surfaces/cli/init.d.ts +3 -0
  60. package/dist/surfaces/cli/init.d.ts.map +1 -1
  61. package/dist/surfaces/cli/init.js +36 -3
  62. package/dist/surfaces/cli/init.js.map +1 -1
  63. package/dist/surfaces/cli/output.d.ts.map +1 -1
  64. package/dist/surfaces/cli/output.js +3 -0
  65. package/dist/surfaces/cli/output.js.map +1 -1
  66. package/dist/surfaces/cli/runtime/dialogue.d.ts +23 -0
  67. package/dist/surfaces/cli/runtime/dialogue.d.ts.map +1 -0
  68. package/dist/surfaces/cli/runtime/dialogue.js +50 -0
  69. package/dist/surfaces/cli/runtime/dialogue.js.map +1 -0
  70. package/dist/surfaces/cli/runtime/graph.d.ts +11 -2
  71. package/dist/surfaces/cli/runtime/graph.d.ts.map +1 -1
  72. package/dist/surfaces/cli/runtime/graph.js +225 -5
  73. package/dist/surfaces/cli/runtime/graph.js.map +1 -1
  74. package/dist/surfaces/cli/runtime/routing.d.ts.map +1 -1
  75. package/dist/surfaces/cli/runtime/routing.js +44 -3
  76. package/dist/surfaces/cli/runtime/routing.js.map +1 -1
  77. package/dist/surfaces/cli/runtime/settings.d.ts.map +1 -1
  78. package/dist/surfaces/cli/runtime/settings.js +13 -0
  79. package/dist/surfaces/cli/runtime/settings.js.map +1 -1
  80. package/dist/surfaces/cli/runtime/types.d.ts +56 -0
  81. package/dist/surfaces/cli/runtime/types.d.ts.map +1 -1
  82. package/dist/surfaces/cli/runtime.d.ts +2 -1
  83. package/dist/surfaces/cli/runtime.d.ts.map +1 -1
  84. package/dist/surfaces/cli/runtime.js +7 -2
  85. package/dist/surfaces/cli/runtime.js.map +1 -1
  86. package/dist/surfaces/cursor-rules/graphflow.mdc +10 -3
  87. package/dist/surfaces/mcp/tool-definitions.d.ts.map +1 -1
  88. package/dist/surfaces/mcp/tool-definitions.js +23 -3
  89. package/dist/surfaces/mcp/tool-definitions.js.map +1 -1
  90. package/dist/surfaces/mcp/tool-handlers.d.ts.map +1 -1
  91. package/dist/surfaces/mcp/tool-handlers.js +27 -3
  92. package/dist/surfaces/mcp/tool-handlers.js.map +1 -1
  93. package/dist/surfaces/trae-skill/graphflow/SKILL.md +50 -5
  94. package/package.json +11 -2
  95. package/plugin.json +27 -4
  96. package/skills/graphflow/SKILL.md +50 -5
  97. package/src/surfaces/cursor-rules/graphflow.mdc +10 -3
  98. package/src/surfaces/trae-skill/graphflow/SKILL.md +50 -5
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "graphflow"
3
- description: "Graph-based code context compression, task planning, and knowledge graph orchestration (10 MCP tools). Invoke before ANY code question, bug fix, debugging, file reading, Chinese/CJK query, refactor, or multi-step edit — ALWAYS call graphflow_context MCP first when GraphFlow is connected."
3
+ description: "图谱上下文压缩、任务规划与知识图谱编排(10 MCP 工具)。任何读代码、改代码、排错、中文问题之前必须先调 graphflow_context。DeepSeek Harness 下工具名为 mcp__graphflow__graphflow_*。"
4
4
  ---
5
5
 
6
6
  # GraphFlow Skill
@@ -91,6 +91,41 @@ Run `npx @roarpeng/graphflow install` from the project root. Do **not** hardcode
91
91
  | `.vscode/mcp.json` | Project MCP (optional, team-shared) |
92
92
  | `.github/copilot-instructions.md` | Repo-level Copilot instructions |
93
93
 
94
+ ### DeepSeek Harness(`dsh`)插件:用法与能力
95
+
96
+ GraphFlow 是 DeepSeek Harness 的 `dsh-plugin`。装入后模型看到的工具名带前缀 `mcp__graphflow__`。
97
+
98
+ **能力**
99
+
100
+ | 能力 | 工具(dsh 名) |
101
+ |------|----------------|
102
+ | 压缩上下文(先调用) | `mcp__graphflow__graphflow_context` |
103
+ | 任务规划 DAG | `mcp__graphflow__graphflow_plan` |
104
+ | 桥接执行包 | `mcp__graphflow__graphflow_run` |
105
+ | 回填飞轮 | `mcp__graphflow__graphflow_report_outcome` |
106
+ | ATP insight | `mcp__graphflow__graphflow_insight` |
107
+ | 增量/全量建图 | `mcp__graphflow__graphflow_index` |
108
+ | 技能洞察 | `mcp__graphflow__graphflow_skill_insights` |
109
+ | 诊断 | `mcp__graphflow__graphflow_diagnose` |
110
+ | 图谱产物 | `mcp__graphflow__graphflow_artifact` |
111
+ | 技能指南 | `mcp__graphflow__graphflow_skill_guide` |
112
+
113
+ **安装**
114
+
115
+ ```sh
116
+ dsh plugin --profile web add @roarpeng/graphflow
117
+ # 或已有 ~/.dsh 时:
118
+ npx @roarpeng/graphflow install
119
+ ```
120
+
121
+ | 路径 | 作用 |
122
+ |------|------|
123
+ | 包内 `cordis.patch.yml` | `dsh plugin add` 插入的 bundle 层 |
124
+ | `$DSH_HOME/cordis.patch.yml`(默认 `~/.dsh`) | `graphflow install` 写的 home overlay |
125
+ | `$DSH_HOME/skills/graphflow/SKILL.md` | 本 Skill |
126
+
127
+ **用法:** 每次 `graphflow_context` / `graphflow_plan` 传仓库绝对路径 `rootDir`。不要在 patch 里写死 `GRAPHFLOW_WORKSPACE_ROOT`。走了 `graphflow_run` 后必须 `graphflow_report_outcome`。
128
+
94
129
  ---
95
130
 
96
131
  ## Tool Inventory (10 MCP Tools)
@@ -138,13 +173,21 @@ Step 1: graphflow_context(query: "<your question>")
138
173
  Step 2: Read summary + anchors as primary context
139
174
  Step 3: Expand specific anchors with graphflow_context(anchorId: "...") when needed
140
175
  Step 4: Read full files only when exact edits required
176
+ Step 5: After answering the user, call graphflow_context({ assistantReply: "<original answer>" })
177
+ (query optional). This fills the pending turn/topic. Store original text, not an extracted abstract.
141
178
  ```
142
179
 
180
+ Complex tasks: `graphflow_plan` seeds a **workbench** of topic containers (function nodes on the canvas). Pass `topicId` to refine a node or return to the mainline. Drift auto-forks an isolated side node; messages stay inside the topic — the canvas is not one-turn-one-node. Without a workbench, previews still record as dialogue-turn nodes (`resumeFromTurnId`). Workbench titles/Path labels are **display only**; next-turn context is Goal + path titles + local original Q/A.
181
+
143
182
  **Input - context (preview):**
144
183
  ```typescript
145
184
  {
146
- query: string; // Required for preview - user question (Chinese OK)
185
+ query?: string; // User question (Chinese OK). Omit when only filling assistantReply.
147
186
  englishQuery?: string; // Agent-translated English code search terms (recommended for CJK)
187
+ topicId?: string; // Click a workbench function node to refine / return to mainline
188
+ sessionId?: string; // Dialogue session name (default "main")
189
+ resumeFromTurnId?: string; // Continue from a clicked dialogue-turn node (legacy, no workbench)
190
+ assistantReply?: string; // Original assistant answer to store on the pending turn/topic
148
191
  configPath?: string;
149
192
  rootDir?: string;
150
193
  }
@@ -210,9 +253,11 @@ Step 2: graphflow_plan(task: "<task description>")
210
253
  (simple-plan-intent, simple-plan-decomposition) and optional suggestedNodes.
211
254
  MUST submit/merge via graphflow_insight before treating the DAG as final.
212
255
  - Local suggestedNodes are heuristic hints only.
213
- Step 3: Review plan steps and dependencies
214
- Step 4: Execute step by step, using GraphFlow context for each step
215
- Step 5: graphflow_index() after major changes
256
+ - Result includes workbench.topics and workbench.outline (mainline DAG + side branches).
257
+ Step 3: Review workbench.outline (function nodes), not chat turns. Wake later with graphflow workbench tree or graphflow_diagnose (graph.workbenchOutline).
258
+ Step 4: Refine a node: graphflow_context({ query, topicId: "<topic:...>" })
259
+ Step 5: If the conversation drifted, click a 主线 node (same topicId) to restore trunk context
260
+ Step 6: graphflow_index() after major changes
216
261
  ```
217
262
 
218
263
  **Input:**