@devflow-tools/context-engine 0.17.5 → 0.17.7
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/README.md +24 -25
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -1,45 +1,44 @@
|
|
|
1
1
|
# @devflow-tools/context-engine
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> 组合代码图、知识、记忆和语义路由,构建有预算约束的任务上下文。(v0.17.7)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@devflow-tools/context-engine)
|
|
6
|
+
|
|
7
|
+
## 安装
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
10
|
npm install @devflow-tools/context-engine
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
##
|
|
13
|
+
## 快速开始
|
|
12
14
|
|
|
13
15
|
```typescript
|
|
14
|
-
import {
|
|
16
|
+
import { createEngines } from '@devflow-tools/context-engine';
|
|
15
17
|
|
|
16
|
-
const
|
|
18
|
+
const engines = await createEngines(process.cwd());
|
|
19
|
+
const result = await engines.context.buildContext('fix the login bug');
|
|
20
|
+
console.log(result);
|
|
21
|
+
```
|
|
17
22
|
|
|
18
|
-
|
|
19
|
-
const context = await engine.buildContext('user authentication flow');
|
|
20
|
-
console.log(context.files);
|
|
23
|
+
## 公共 API / 命令
|
|
21
24
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
`ContextEngine`、`buildTaskContextEnvelope`、`buildRetrievalTaskPlan`、`buildChannelQueryPlan`、`buildOnboardingPack`、`compressToTokenLimit`、`SemanticRouter`。
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## 配置与运行时
|
|
29
|
+
|
|
30
|
+
context-engine 是组合层;SDK 仅提供 embedding contract,具体 embedding 可由 memory-engine 注入。缺少向量运行时时仍可走 lexical/fuzzy fallback。
|
|
25
31
|
|
|
26
|
-
##
|
|
32
|
+
## 版本与兼容性
|
|
27
33
|
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
- **Token 预算控制** — fast/deep 模式自动压缩结果拟合 context window
|
|
32
|
-
- **Intent 解析** — 从自然语言提取关键词和意图
|
|
33
|
-
- **反馈系统** — 支持 hit/partial/miss 反馈,持续优化排序
|
|
34
|
+
- 当前包版本:`0.17.7`
|
|
35
|
+
- Node.js:未在 package manifest 声明更高版本时,使用 Node.js 18+;原生 SQLite/Playwright 能力请按对应依赖安装
|
|
36
|
+
- workspace 内部包应使用同一 DevFlow minor/patch 版本,避免类型和数据库 schema 不一致
|
|
34
37
|
|
|
35
|
-
##
|
|
38
|
+
## 相关链接
|
|
36
39
|
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
- `.buildTaskContext(query, options?)` — 任务级上下文(含风险提示、下一步行动)
|
|
40
|
-
- `.onboard()` — 生成 Onboarding Pack
|
|
41
|
-
- `.submitFeedback(contextId, rating)` — 提交上下文反馈
|
|
42
|
-
- `.getFeedbackSummary()` — 反馈汇总
|
|
40
|
+
- [DevFlow 仓库](https://github.com/shilongfeicool/dev-flow)
|
|
41
|
+
- [问题反馈](https://github.com/shilongfeicool/dev-flow/issues)
|
|
43
42
|
|
|
44
43
|
## License
|
|
45
44
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devflow-tools/context-engine",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@colbymchenry/codegraph": "^1.1.1",
|
|
25
|
-
"@devflow-tools/database": "0.17.
|
|
26
|
-
"@devflow-tools/knowledge-engine": "0.17.
|
|
27
|
-
"@devflow-tools/memory-engine": "0.17.
|
|
28
|
-
"@devflow-tools/sdk": "0.17.
|
|
29
|
-
"@devflow-tools/telemetry": "0.17.
|
|
30
|
-
"@devflow-tools/workflow-engine": "0.17.
|
|
25
|
+
"@devflow-tools/database": "0.17.7",
|
|
26
|
+
"@devflow-tools/knowledge-engine": "0.17.7",
|
|
27
|
+
"@devflow-tools/memory-engine": "0.17.7",
|
|
28
|
+
"@devflow-tools/sdk": "0.17.7",
|
|
29
|
+
"@devflow-tools/telemetry": "0.17.7",
|
|
30
|
+
"@devflow-tools/workflow-engine": "0.17.7",
|
|
31
31
|
"better-sqlite3": "^12.11.1",
|
|
32
32
|
"nodejieba": "^3.5.8",
|
|
33
33
|
"sqlite-vec": "^0.1.9"
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"files": [
|
|
40
40
|
"dist"
|
|
41
41
|
],
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "560fe8a097aa9d398fdcfec409134cc94d26f92f"
|
|
43
43
|
}
|