@roarpeng/graphflow 1.3.4 → 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 +59 -0
- package/README.md +124 -118
- package/dist/agents/insight.d.ts +1 -1
- package/dist/agents/insight.d.ts.map +1 -1
- package/dist/agents/insight.js +1 -1
- package/dist/agents/insight.js.map +1 -1
- package/dist/agents/validator.js +1 -1
- package/dist/agents/validator.js.map +1 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +3 -17
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/embedding-factory.d.ts.map +1 -1
- package/dist/config/embedding-factory.js +4 -5
- package/dist/config/embedding-factory.js.map +1 -1
- package/dist/config/llm-availability.d.ts.map +1 -1
- package/dist/config/llm-availability.js +0 -8
- package/dist/config/llm-availability.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +4 -75
- package/dist/config/loader.js.map +1 -1
- package/dist/config/merge.d.ts.map +1 -1
- package/dist/config/merge.js +0 -40
- package/dist/config/merge.js.map +1 -1
- package/dist/config/schema.d.ts +5 -43
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/core/agent-delegation.d.ts +1 -1
- package/dist/core/agent-delegation.d.ts.map +1 -1
- package/dist/core/orchestrator-context.d.ts.map +1 -1
- package/dist/core/orchestrator-context.js +12 -5
- package/dist/core/orchestrator-context.js.map +1 -1
- package/dist/core/orchestrator.js +8 -2
- package/dist/core/orchestrator.js.map +1 -1
- package/dist/core/triage.js +2 -2
- package/dist/core/triage.js.map +1 -1
- package/dist/core/types.d.ts +1 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/graph/context-slicer-types.d.ts +13 -16
- package/dist/graph/context-slicer-types.d.ts.map +1 -1
- package/dist/graph/context-slicer-types.js.map +1 -1
- package/dist/graph/context-slicer.d.ts +4 -5
- package/dist/graph/context-slicer.d.ts.map +1 -1
- package/dist/graph/context-slicer.js +14 -28
- package/dist/graph/context-slicer.js.map +1 -1
- package/dist/graph/file-indexer.d.ts.map +1 -1
- package/dist/graph/file-indexer.js +19 -0
- package/dist/graph/file-indexer.js.map +1 -1
- package/dist/hooks/post-run-sync.d.ts +1 -1
- package/dist/hooks/post-run-sync.d.ts.map +1 -1
- package/dist/hooks/post-run-sync.js +3 -14
- package/dist/hooks/post-run-sync.js.map +1 -1
- package/dist/index.d.ts +2 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -7
- package/dist/index.js.map +1 -1
- package/dist/integrations/agent-mcp-installer.d.ts.map +1 -1
- package/dist/integrations/agent-mcp-installer.js +6 -17
- package/dist/integrations/agent-mcp-installer.js.map +1 -1
- package/dist/learning/embeddings.d.ts +0 -1
- package/dist/learning/embeddings.d.ts.map +1 -1
- package/dist/learning/embeddings.js +0 -15
- package/dist/learning/embeddings.js.map +1 -1
- package/dist/learning/episodic-memory.d.ts +1 -1
- package/dist/learning/episodic-memory.d.ts.map +1 -1
- package/dist/learning/episodic-memory.js +38 -1
- package/dist/learning/episodic-memory.js.map +1 -1
- package/dist/learning/hnsw-index.d.ts +23 -4
- package/dist/learning/hnsw-index.d.ts.map +1 -1
- package/dist/learning/hnsw-index.js +78 -4
- package/dist/learning/hnsw-index.js.map +1 -1
- package/dist/learning/nightly-trainer.d.ts +0 -2
- package/dist/learning/nightly-trainer.d.ts.map +1 -1
- package/dist/learning/nightly-trainer.js +10 -18
- package/dist/learning/nightly-trainer.js.map +1 -1
- package/dist/learning/skill-flywheel.d.ts +2 -3
- package/dist/learning/skill-flywheel.d.ts.map +1 -1
- package/dist/learning/skill-flywheel.js +23 -84
- package/dist/learning/skill-flywheel.js.map +1 -1
- package/dist/learning/skill-store.d.ts +1 -3
- package/dist/learning/skill-store.d.ts.map +1 -1
- package/dist/learning/skill-store.js +0 -36
- package/dist/learning/skill-store.js.map +1 -1
- package/dist/learning/skill-types.d.ts +0 -13
- package/dist/learning/skill-types.d.ts.map +1 -1
- package/dist/learning/skill-types.js.map +1 -1
- package/dist/routing/model-router.d.ts +1 -1
- package/dist/routing/model-router.d.ts.map +1 -1
- package/dist/routing/model-router.js +1 -52
- package/dist/routing/model-router.js.map +1 -1
- package/dist/routing/provider-executor.d.ts.map +1 -1
- package/dist/routing/provider-executor.js +0 -48
- package/dist/routing/provider-executor.js.map +1 -1
- package/dist/routing/provider-health.d.ts.map +1 -1
- package/dist/routing/provider-health.js +2 -12
- package/dist/routing/provider-health.js.map +1 -1
- package/dist/surfaces/cli/index.js +19 -77
- package/dist/surfaces/cli/index.js.map +1 -1
- package/dist/surfaces/cli/init.d.ts +2 -25
- package/dist/surfaces/cli/init.d.ts.map +1 -1
- package/dist/surfaces/cli/init.js +57 -312
- package/dist/surfaces/cli/init.js.map +1 -1
- package/dist/surfaces/cli/output.d.ts.map +1 -1
- package/dist/surfaces/cli/output.js +1 -3
- package/dist/surfaces/cli/output.js.map +1 -1
- package/dist/surfaces/cli/runtime/env.d.ts +0 -5
- package/dist/surfaces/cli/runtime/env.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime/env.js +0 -115
- package/dist/surfaces/cli/runtime/env.js.map +1 -1
- package/dist/surfaces/cli/runtime/facade.d.ts +10 -17
- package/dist/surfaces/cli/runtime/facade.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime/facade.js +5 -5
- package/dist/surfaces/cli/runtime/facade.js.map +1 -1
- package/dist/surfaces/cli/runtime/graph.d.ts +11 -21
- package/dist/surfaces/cli/runtime/graph.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime/graph.js +31 -261
- package/dist/surfaces/cli/runtime/graph.js.map +1 -1
- package/dist/surfaces/cli/runtime/learning.d.ts +6 -0
- package/dist/surfaces/cli/runtime/learning.d.ts.map +1 -0
- package/dist/surfaces/cli/runtime/learning.js +28 -0
- package/dist/surfaces/cli/runtime/learning.js.map +1 -0
- package/dist/surfaces/cli/runtime/routing.d.ts +1 -3
- package/dist/surfaces/cli/runtime/routing.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime/routing.js +12 -36
- package/dist/surfaces/cli/runtime/routing.js.map +1 -1
- package/dist/surfaces/cli/runtime/settings.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime/settings.js +11 -117
- package/dist/surfaces/cli/runtime/settings.js.map +1 -1
- package/dist/surfaces/cli/runtime/types.d.ts +11 -35
- package/dist/surfaces/cli/runtime/types.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime.d.ts +4 -4
- package/dist/surfaces/cli/runtime.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime.js +5 -12
- package/dist/surfaces/cli/runtime.js.map +1 -1
- package/dist/surfaces/cursor-rules/graphflow.mdc +3 -3
- package/dist/surfaces/mcp/server.d.ts +4 -4
- package/dist/surfaces/mcp/server.d.ts.map +1 -1
- package/dist/surfaces/mcp/server.js +18 -21
- package/dist/surfaces/mcp/server.js.map +1 -1
- package/dist/surfaces/mcp/tool-definitions.d.ts.map +1 -1
- package/dist/surfaces/mcp/tool-definitions.js +0 -42
- package/dist/surfaces/mcp/tool-definitions.js.map +1 -1
- package/dist/surfaces/mcp/tool-handlers.d.ts +1 -4
- package/dist/surfaces/mcp/tool-handlers.d.ts.map +1 -1
- package/dist/surfaces/mcp/tool-handlers.js +1 -64
- package/dist/surfaces/mcp/tool-handlers.js.map +1 -1
- package/dist/surfaces/trae-skill/graphflow/SKILL.md +10 -30
- package/package.json +3 -5
- package/src/surfaces/cursor-rules/graphflow.mdc +3 -3
- package/src/surfaces/trae-skill/graphflow/SKILL.md +10 -30
- package/dist/graph/compression-model.d.ts +0 -52
- package/dist/graph/compression-model.d.ts.map +0 -1
- package/dist/graph/compression-model.js +0 -125
- package/dist/graph/compression-model.js.map +0 -1
- package/dist/graph/semantic-compression.d.ts +0 -65
- package/dist/graph/semantic-compression.d.ts.map +0 -1
- package/dist/graph/semantic-compression.js +0 -173
- package/dist/graph/semantic-compression.js.map +0 -1
- package/dist/graph/semantic-enricher.d.ts +0 -17
- package/dist/graph/semantic-enricher.d.ts.map +0 -1
- package/dist/graph/semantic-enricher.js +0 -97
- package/dist/graph/semantic-enricher.js.map +0 -1
- package/dist/learning/canary-gate.d.ts +0 -6
- package/dist/learning/canary-gate.d.ts.map +0 -1
- package/dist/learning/canary-gate.js +0 -13
- package/dist/learning/canary-gate.js.map +0 -1
- package/dist/learning/local-embedding.d.ts +0 -3
- package/dist/learning/local-embedding.d.ts.map +0 -1
- package/dist/learning/local-embedding.js +0 -37
- package/dist/learning/local-embedding.js.map +0 -1
- package/dist/learning/skill-evolution.d.ts +0 -16
- package/dist/learning/skill-evolution.d.ts.map +0 -1
- package/dist/learning/skill-evolution.js +0 -154
- package/dist/learning/skill-evolution.js.map +0 -1
- package/dist/learning/vector-store.d.ts +0 -20
- package/dist/learning/vector-store.d.ts.map +0 -1
- package/dist/learning/vector-store.js +0 -77
- package/dist/learning/vector-store.js.map +0 -1
- package/dist/routing/provider-adapters/openbmb.d.ts +0 -16
- package/dist/routing/provider-adapters/openbmb.d.ts.map +0 -1
- package/dist/routing/provider-adapters/openbmb.js +0 -368
- package/dist/routing/provider-adapters/openbmb.js.map +0 -1
|
@@ -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,
|
|
25
|
-
│
|
|
26
|
-
│ diagnose, export_artifact, import_artifact
|
|
27
|
-
│ stats
|
|
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
|
|
381
|
-
│
|
|
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 `
|
|
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
|
```
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { GraphFlowConfig } from "../config/schema";
|
|
2
|
-
/**
|
|
3
|
-
* Unified compression-model adapter.
|
|
4
|
-
*
|
|
5
|
-
* Product strategy (hybrid, zero extra config):
|
|
6
|
-
* 1. backend="inherit" (default) → reuse config.tiers.economy
|
|
7
|
-
* - external API configured (openai/anthropic/bailian) → use it
|
|
8
|
-
* - provider=openbmb → use embedded minicpm-1b
|
|
9
|
-
* 2. backend="network" → external API (optionally stronger model)
|
|
10
|
-
* 3. backend="local" → force embedded minicpm-1b
|
|
11
|
-
*
|
|
12
|
-
* The compressor role resolution lives in model-router.ts; this module wraps
|
|
13
|
-
* it with embedded-model auto-download and a single generate() entrypoint.
|
|
14
|
-
*/
|
|
15
|
-
export interface CompressionModelHandle {
|
|
16
|
-
provider: string;
|
|
17
|
-
model: string;
|
|
18
|
-
isEmbedded: boolean;
|
|
19
|
-
/** False when no usable model is reachable (no API key, no embedded file). */
|
|
20
|
-
available: boolean;
|
|
21
|
-
generate(prompt: string, maxTokens?: number): Promise<string>;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Detects provider fallback placeholders like "[openai:gpt-4.1-mini] <prompt>".
|
|
25
|
-
* These are returned by adapters when no real model is reachable; they must
|
|
26
|
-
* never be written into the compressed context.
|
|
27
|
-
*/
|
|
28
|
-
export declare function isPlaceholderResponse(text: string): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Resolves the compression model based on config, auto-downloading the embedded
|
|
31
|
-
* model if needed. Returns a handle with a unified generate() method.
|
|
32
|
-
*/
|
|
33
|
-
export declare function resolveCompressionModel(config: GraphFlowConfig, configPath?: string): Promise<CompressionModelHandle>;
|
|
34
|
-
/** Default embedded model: MiniCPM-1B Q4_K_M GGUF (~650MB). */
|
|
35
|
-
export declare const DEFAULT_EMBEDDED_MODEL = "minicpm-1b";
|
|
36
|
-
export declare const DEFAULT_EMBEDDED_MODEL_URL = "https://huggingface.co/openbmb/MiniCPM-2B-sft-bf16-llama-format-gguf/resolve/main/ggml-model-Q4_K_M.gguf";
|
|
37
|
-
/**
|
|
38
|
-
* Ensures the embedded compression model is downloaded. Reuses the existing
|
|
39
|
-
* robust downloader (resumable, sha256-verified, file-locked) from the CLI
|
|
40
|
-
* runtime. Returns the resolved model path.
|
|
41
|
-
*/
|
|
42
|
-
export declare function ensureEmbeddedCompressionModel(config: GraphFlowConfig, configPath?: string): Promise<string>;
|
|
43
|
-
/**
|
|
44
|
-
* Reports which compression backend is active, for diagnostics/UI.
|
|
45
|
-
*/
|
|
46
|
-
export declare function describeCompressionBackend(config: GraphFlowConfig, _configPath?: string): {
|
|
47
|
-
backend: string;
|
|
48
|
-
provider: string;
|
|
49
|
-
model: string;
|
|
50
|
-
embedded: boolean;
|
|
51
|
-
};
|
|
52
|
-
//# sourceMappingURL=compression-model.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compression-model.d.ts","sourceRoot":"","sources":["../../src/graph/compression-model.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,8EAA8E;IAC9E,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC/D;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,eAAe,EACvB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,sBAAsB,CAAC,CA2DjC;AAUD,+DAA+D;AAC/D,eAAO,MAAM,sBAAsB,eAAe,CAAC;AACnD,eAAO,MAAM,0BAA0B,6GACqE,CAAC;AAE7G;;;;GAIG;AACH,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,eAAe,EACvB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CAiBjB;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,eAAe,EACvB,WAAW,CAAC,EAAE,MAAM,GACnB;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CASzE"}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_EMBEDDED_MODEL_URL = exports.DEFAULT_EMBEDDED_MODEL = void 0;
|
|
4
|
-
exports.isPlaceholderResponse = isPlaceholderResponse;
|
|
5
|
-
exports.resolveCompressionModel = resolveCompressionModel;
|
|
6
|
-
exports.ensureEmbeddedCompressionModel = ensureEmbeddedCompressionModel;
|
|
7
|
-
exports.describeCompressionBackend = describeCompressionBackend;
|
|
8
|
-
const node_fs_1 = require("node:fs");
|
|
9
|
-
const logger_1 = require("../utils/logger");
|
|
10
|
-
const model_router_1 = require("../routing/model-router");
|
|
11
|
-
const provider_executor_1 = require("../routing/provider-executor");
|
|
12
|
-
/**
|
|
13
|
-
* Detects provider fallback placeholders like "[openai:gpt-4.1-mini] <prompt>".
|
|
14
|
-
* These are returned by adapters when no real model is reachable; they must
|
|
15
|
-
* never be written into the compressed context.
|
|
16
|
-
*/
|
|
17
|
-
function isPlaceholderResponse(text) {
|
|
18
|
-
return /^\[(openai|anthropic|bailian|doubao|openbmb):[^\]]+\]/i.test(text.trim());
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Resolves the compression model based on config, auto-downloading the embedded
|
|
22
|
-
* model if needed. Returns a handle with a unified generate() method.
|
|
23
|
-
*/
|
|
24
|
-
async function resolveCompressionModel(config, configPath) {
|
|
25
|
-
const selection = (0, model_router_1.resolveModelForRole)("compressor", configPath);
|
|
26
|
-
const isEmbedded = selection.provider === "openbmb";
|
|
27
|
-
const timeoutMs = config.graphPolicy.compression?.timeoutMs;
|
|
28
|
-
// Probe availability: external providers need an API key, embedded needs a model file.
|
|
29
|
-
let available = true;
|
|
30
|
-
if (isEmbedded) {
|
|
31
|
-
const autoDownload = config.graphPolicy.compression?.autoDownloadEmbedded !== false;
|
|
32
|
-
if (autoDownload) {
|
|
33
|
-
try {
|
|
34
|
-
await ensureEmbeddedCompressionModel(config, configPath);
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
logger_1.logger.warn({ error }, "Embedded model auto-download failed; compression will degrade to graph-only");
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
const modelPath = process.env.GRAPHFLOW_OPENBMB_MODEL_PATH;
|
|
41
|
-
available = Boolean(modelPath && (0, node_fs_1.existsSync)(modelPath));
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
const providerConfig = config.providers[selection.provider];
|
|
45
|
-
const apiKey = providerConfig?.apiKey;
|
|
46
|
-
// Unresolved "${ENV}" placeholders or missing keys mean no reachable model.
|
|
47
|
-
available = Boolean(apiKey && !/^\$\{.*\}$/.test(apiKey.trim()) && apiKey.trim().length > 0);
|
|
48
|
-
}
|
|
49
|
-
if (!available) {
|
|
50
|
-
logger_1.logger.info({ provider: selection.provider, model: selection.model }, "No usable compression model; semantic compression will be skipped (graph-structure compression still active)");
|
|
51
|
-
}
|
|
52
|
-
return {
|
|
53
|
-
provider: selection.provider,
|
|
54
|
-
model: selection.model,
|
|
55
|
-
isEmbedded,
|
|
56
|
-
available,
|
|
57
|
-
async generate(prompt, maxTokens) {
|
|
58
|
-
const previousMax = process.env.GRAPHFLOW_OPENBMB_MAX_TOKENS;
|
|
59
|
-
const previousTimeout = process.env.GRAPHFLOW_PROVIDER_TIMEOUT_MS;
|
|
60
|
-
if (maxTokens !== undefined) {
|
|
61
|
-
process.env.GRAPHFLOW_OPENBMB_MAX_TOKENS = String(maxTokens);
|
|
62
|
-
}
|
|
63
|
-
if (timeoutMs !== undefined) {
|
|
64
|
-
process.env.GRAPHFLOW_PROVIDER_TIMEOUT_MS = String(timeoutMs);
|
|
65
|
-
}
|
|
66
|
-
try {
|
|
67
|
-
const result = await (0, provider_executor_1.executeRolePrompt)("compressor", prompt, selection);
|
|
68
|
-
// Guard: never let a provider placeholder leak into compressed context.
|
|
69
|
-
if (isPlaceholderResponse(result)) {
|
|
70
|
-
throw new Error(`Compression model unavailable (${selection.provider}/${selection.model})`);
|
|
71
|
-
}
|
|
72
|
-
return result;
|
|
73
|
-
}
|
|
74
|
-
finally {
|
|
75
|
-
restoreEnv("GRAPHFLOW_OPENBMB_MAX_TOKENS", previousMax);
|
|
76
|
-
restoreEnv("GRAPHFLOW_PROVIDER_TIMEOUT_MS", previousTimeout);
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
function restoreEnv(key, previous) {
|
|
82
|
-
if (previous === undefined) {
|
|
83
|
-
delete process.env[key];
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
process.env[key] = previous;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
/** Default embedded model: MiniCPM-1B Q4_K_M GGUF (~650MB). */
|
|
90
|
-
exports.DEFAULT_EMBEDDED_MODEL = "minicpm-1b";
|
|
91
|
-
exports.DEFAULT_EMBEDDED_MODEL_URL = "https://huggingface.co/openbmb/MiniCPM-2B-sft-bf16-llama-format-gguf/resolve/main/ggml-model-Q4_K_M.gguf";
|
|
92
|
-
/**
|
|
93
|
-
* Ensures the embedded compression model is downloaded. Reuses the existing
|
|
94
|
-
* robust downloader (resumable, sha256-verified, file-locked) from the CLI
|
|
95
|
-
* runtime. Returns the resolved model path.
|
|
96
|
-
*/
|
|
97
|
-
async function ensureEmbeddedCompressionModel(config, configPath) {
|
|
98
|
-
const { downloadOpenBmbModel } = await import("../surfaces/cli/runtime/graph.js");
|
|
99
|
-
const customPath = config.graphPolicy.compression?.embeddedModelPath;
|
|
100
|
-
// Provide a default URL if user hasn't configured one via env.
|
|
101
|
-
if (!process.env.GRAPHFLOW_MINICPM_MODEL_URL) {
|
|
102
|
-
process.env.GRAPHFLOW_MINICPM_MODEL_URL = exports.DEFAULT_EMBEDDED_MODEL_URL;
|
|
103
|
-
}
|
|
104
|
-
const result = await downloadOpenBmbModel(configPath, {
|
|
105
|
-
model: exports.DEFAULT_EMBEDDED_MODEL,
|
|
106
|
-
...(customPath ? { targetPath: customPath } : {}),
|
|
107
|
-
});
|
|
108
|
-
// Point the embedded runtime at the downloaded model.
|
|
109
|
-
process.env.GRAPHFLOW_OPENBMB_MODEL_PATH = result.targetPath;
|
|
110
|
-
return result.targetPath;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Reports which compression backend is active, for diagnostics/UI.
|
|
114
|
-
*/
|
|
115
|
-
function describeCompressionBackend(config, _configPath) {
|
|
116
|
-
const backend = config.graphPolicy.compression?.backend ?? "inherit";
|
|
117
|
-
const selection = (0, model_router_1.resolveCompressorSelection)(config);
|
|
118
|
-
return {
|
|
119
|
-
backend,
|
|
120
|
-
provider: selection.provider,
|
|
121
|
-
model: selection.model,
|
|
122
|
-
embedded: selection.provider === "openbmb",
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
//# sourceMappingURL=compression-model.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compression-model.js","sourceRoot":"","sources":["../../src/graph/compression-model.ts"],"names":[],"mappings":";;;AAkCA,sDAEC;AAMD,0DA8DC;AAoBD,wEAoBC;AAKD,gEAYC;AAjKD,qCAAqC;AACrC,4CAAyC;AACzC,0DAA0F;AAC1F,oEAAiE;AA0BjE;;;;GAIG;AACH,SAAgB,qBAAqB,CAAC,IAAY;IAChD,OAAO,wDAAwD,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;AACpF,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,uBAAuB,CAC3C,MAAuB,EACvB,UAAmB;IAEnB,MAAM,SAAS,GAAG,IAAA,kCAAmB,EAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IAChE,MAAM,UAAU,GAAG,SAAS,CAAC,QAAQ,KAAK,SAAS,CAAC;IACpD,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,WAAW,EAAE,SAAS,CAAC;IAE5D,uFAAuF;IACvF,IAAI,SAAS,GAAG,IAAI,CAAC;IACrB,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC,WAAW,EAAE,oBAAoB,KAAK,KAAK,CAAC;QACpF,IAAI,YAAY,EAAE,CAAC;YACjB,IAAI,CAAC;gBACH,MAAM,8BAA8B,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;YAC3D,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,eAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,6EAA6E,CAAC,CAAC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MAAM,MAAM,GAAG,MAAM,oBAAoB,CAAC,UAAU,EAAE;QACpD,KAAK,EAAE,8BAAsB;QAC7B,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAClD,CAAC,CAAC;IAEH,sDAAsD;IACtD,OAAO,CAAC,GAAG,CAAC,4BAA4B,GAAG,MAAM,CAAC,UAAU,CAAC;IAC7D,OAAO,MAAM,CAAC,UAAU,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,SAAgB,0BAA0B,CACxC,MAAuB,EACvB,WAAoB;IAEpB,MAAM,OAAO,GAAG,MAAM,CAAC,WAAW,CAAC,WAAW,EAAE,OAAO,IAAI,SAAS,CAAC;IACrE,MAAM,SAAS,GAAG,IAAA,yCAA0B,EAAC,MAAM,CAAC,CAAC;IACrD,OAAO;QACL,OAAO;QACP,QAAQ,EAAE,SAAS,CAAC,QAAQ;QAC5B,KAAK,EAAE,SAAS,CAAC,KAAK;QACtB,QAAQ,EAAE,SAAS,CAAC,QAAQ,KAAK,SAAS;KAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import type { GraphNode } from "../core/types";
|
|
2
|
-
import { type EmbeddingProvider } from "../learning/embeddings";
|
|
3
|
-
import { type OpenBmbRuntimeOptions } from "../routing/provider-adapters/openbmb";
|
|
4
|
-
import type { CompressionModelHandle } from "./compression-model";
|
|
5
|
-
/**
|
|
6
|
-
* Semantic compression via minicpm-1b: cluster similar nodes and generate
|
|
7
|
-
* unified summaries, or condense verbose content into dense descriptions.
|
|
8
|
-
*
|
|
9
|
-
* This is the "Layer 1" compression that leverages the local LLM after graph-
|
|
10
|
-
* structure pruning has already reduced the candidate set.
|
|
11
|
-
*/
|
|
12
|
-
export interface ClusteringOptions {
|
|
13
|
-
embeddingProvider?: EmbeddingProvider;
|
|
14
|
-
similarityThreshold?: number;
|
|
15
|
-
maxClusterSize?: number;
|
|
16
|
-
}
|
|
17
|
-
export interface NodeCluster {
|
|
18
|
-
representative: GraphNode;
|
|
19
|
-
members: GraphNode[];
|
|
20
|
-
avgSimilarity: number;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Clusters nodes by embedding similarity. Nodes within a cluster can be
|
|
24
|
-
* merged into a single summary line to save tokens.
|
|
25
|
-
*/
|
|
26
|
-
export declare function clusterSimilarNodes(nodes: GraphNode[], options?: ClusteringOptions): Promise<NodeCluster[]>;
|
|
27
|
-
export interface SummarizerOptions extends OpenBmbRuntimeOptions {
|
|
28
|
-
maxSummaryTokens?: number;
|
|
29
|
-
/** Preferred: unified compression model handle (auto-selects external/embedded). */
|
|
30
|
-
modelHandle?: CompressionModelHandle;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Generates a unified summary for a cluster of similar nodes.
|
|
34
|
-
* Uses the provided compression model handle (external or embedded) if given,
|
|
35
|
-
* otherwise falls back to direct embedded openbmb invocation.
|
|
36
|
-
* Example: 3 overloaded `login()` variants → "login function with 3 signatures".
|
|
37
|
-
*/
|
|
38
|
-
export declare function summarizeCluster(cluster: NodeCluster, options?: SummarizerOptions): Promise<string>;
|
|
39
|
-
export interface DensifierOptions extends OpenBmbRuntimeOptions {
|
|
40
|
-
maxOutputTokens?: number;
|
|
41
|
-
minInputTokens?: number;
|
|
42
|
-
/** Preferred: unified compression model handle (auto-selects external/embedded). */
|
|
43
|
-
modelHandle?: CompressionModelHandle;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Rewrites verbose node content into dense summaries.
|
|
47
|
-
* Uses the provided compression model handle if given, otherwise falls back to
|
|
48
|
-
* direct embedded openbmb invocation. Only applies to nodes exceeding minInputTokens.
|
|
49
|
-
*/
|
|
50
|
-
export declare function densifyNodeContent(node: GraphNode, options?: DensifierOptions): Promise<string>;
|
|
51
|
-
/**
|
|
52
|
-
* High-level pipeline: cluster similar nodes, summarize each cluster, and
|
|
53
|
-
* densify remaining verbose nodes. Returns compressed node set.
|
|
54
|
-
*
|
|
55
|
-
* When a compression model handle is provided, summarization/densification
|
|
56
|
-
* route through it (external economy tier or embedded minicpm); otherwise they
|
|
57
|
-
* fall back to direct embedded openbmb invocation.
|
|
58
|
-
*/
|
|
59
|
-
export declare function applySemanticCompression(nodes: GraphNode[], options?: {
|
|
60
|
-
clusteringOptions?: ClusteringOptions;
|
|
61
|
-
summarizerOptions?: SummarizerOptions;
|
|
62
|
-
densifierOptions?: DensifierOptions;
|
|
63
|
-
modelHandle?: CompressionModelHandle;
|
|
64
|
-
}): Promise<GraphNode[]>;
|
|
65
|
-
//# sourceMappingURL=semantic-compression.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"semantic-compression.d.ts","sourceRoot":"","sources":["../../src/graph/semantic-compression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAsC,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACpG,OAAO,EAAuB,KAAK,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AACvG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE;;;;;;GAMG;AAEH,MAAM,WAAW,iBAAiB;IAChC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE,SAAS,CAAC;IAC1B,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,SAAS,EAAE,EAClB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,WAAW,EAAE,CAAC,CA6CxB;AAED,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oFAAoF;IACpF,WAAW,CAAC,EAAE,sBAAsB,CAAC;CACtC;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,WAAW,EACpB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,MAAM,CAAC,CA8BjB;AAED,MAAM,WAAW,gBAAiB,SAAQ,qBAAqB;IAC7D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oFAAoF;IACpF,WAAW,CAAC,EAAE,sBAAsB,CAAC;CACtC;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,SAAS,EACf,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,MAAM,CAAC,CAqCjB;AAED;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAC5C,KAAK,EAAE,SAAS,EAAE,EAClB,OAAO,CAAC,EAAE;IACR,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,WAAW,CAAC,EAAE,sBAAsB,CAAC;CACtC,GACA,OAAO,CAAC,SAAS,EAAE,CAAC,CA6CtB"}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.clusterSimilarNodes = clusterSimilarNodes;
|
|
4
|
-
exports.summarizeCluster = summarizeCluster;
|
|
5
|
-
exports.densifyNodeContent = densifyNodeContent;
|
|
6
|
-
exports.applySemanticCompression = applySemanticCompression;
|
|
7
|
-
const embeddings_1 = require("../learning/embeddings");
|
|
8
|
-
const openbmb_1 = require("../routing/provider-adapters/openbmb");
|
|
9
|
-
/**
|
|
10
|
-
* Clusters nodes by embedding similarity. Nodes within a cluster can be
|
|
11
|
-
* merged into a single summary line to save tokens.
|
|
12
|
-
*/
|
|
13
|
-
async function clusterSimilarNodes(nodes, options) {
|
|
14
|
-
const threshold = options?.similarityThreshold ?? 0.75;
|
|
15
|
-
const maxSize = options?.maxClusterSize ?? 5;
|
|
16
|
-
// Ensure all nodes have embeddings.
|
|
17
|
-
const withEmbedding = nodes.filter((n) => (0, embeddings_1.extractEmbedding)(n) !== null);
|
|
18
|
-
if (withEmbedding.length === 0)
|
|
19
|
-
return [];
|
|
20
|
-
const clusters = [];
|
|
21
|
-
const assigned = new Set();
|
|
22
|
-
for (const candidate of withEmbedding) {
|
|
23
|
-
if (assigned.has(candidate.id))
|
|
24
|
-
continue;
|
|
25
|
-
const cluster = [candidate];
|
|
26
|
-
assigned.add(candidate.id);
|
|
27
|
-
const candidateEmb = (0, embeddings_1.extractEmbedding)(candidate);
|
|
28
|
-
let simSum = 0;
|
|
29
|
-
for (const other of withEmbedding) {
|
|
30
|
-
if (assigned.has(other.id))
|
|
31
|
-
continue;
|
|
32
|
-
if (cluster.length >= maxSize)
|
|
33
|
-
break;
|
|
34
|
-
const otherEmb = (0, embeddings_1.extractEmbedding)(other);
|
|
35
|
-
if (!otherEmb)
|
|
36
|
-
continue;
|
|
37
|
-
const sim = (0, embeddings_1.cosineSimilarity)(candidateEmb, otherEmb);
|
|
38
|
-
if (sim >= threshold) {
|
|
39
|
-
cluster.push(other);
|
|
40
|
-
assigned.add(other.id);
|
|
41
|
-
simSum += sim;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
// Only create cluster if we found similar nodes (cluster size > 1).
|
|
45
|
-
if (cluster.length > 1) {
|
|
46
|
-
clusters.push({
|
|
47
|
-
representative: candidate,
|
|
48
|
-
members: cluster,
|
|
49
|
-
avgSimilarity: simSum / (cluster.length - 1),
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return clusters;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Generates a unified summary for a cluster of similar nodes.
|
|
57
|
-
* Uses the provided compression model handle (external or embedded) if given,
|
|
58
|
-
* otherwise falls back to direct embedded openbmb invocation.
|
|
59
|
-
* Example: 3 overloaded `login()` variants → "login function with 3 signatures".
|
|
60
|
-
*/
|
|
61
|
-
async function summarizeCluster(cluster, options) {
|
|
62
|
-
const memberContents = cluster.members.map((m) => m.content).slice(0, 5);
|
|
63
|
-
const prompt = [
|
|
64
|
-
"你是代码摘要生成器。多个相似的代码片段需要合并为一句统一描述。",
|
|
65
|
-
"要求:",
|
|
66
|
-
"1. 用一句话概括它们的共同功能(20字以内)",
|
|
67
|
-
"2. 如果是重载/变体,说明有几个版本",
|
|
68
|
-
"3. 不要逐个列举,只给出统一摘要",
|
|
69
|
-
"",
|
|
70
|
-
"代码片段:",
|
|
71
|
-
...memberContents.map((c, i) => `${i + 1}. ${c}`),
|
|
72
|
-
"",
|
|
73
|
-
"统一摘要:",
|
|
74
|
-
].join("\n");
|
|
75
|
-
const maxTokens = options?.maxSummaryTokens ?? 64;
|
|
76
|
-
try {
|
|
77
|
-
const result = options?.modelHandle
|
|
78
|
-
? await options.modelHandle.generate(prompt, maxTokens)
|
|
79
|
-
: await (0, openbmb_1.openbmbGenerateText)({ prompt, model: options?.modelPath ?? "minicpm-1b" }, { ...options, maxTokens });
|
|
80
|
-
return result.trim().replace(/^统一摘要[::]?\s*/i, "");
|
|
81
|
-
}
|
|
82
|
-
catch {
|
|
83
|
-
// Degrade gracefully: if no model is available, keep the representative's original content.
|
|
84
|
-
return cluster.representative.content;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Rewrites verbose node content into dense summaries.
|
|
89
|
-
* Uses the provided compression model handle if given, otherwise falls back to
|
|
90
|
-
* direct embedded openbmb invocation. Only applies to nodes exceeding minInputTokens.
|
|
91
|
-
*/
|
|
92
|
-
async function densifyNodeContent(node, options) {
|
|
93
|
-
const content = node.content;
|
|
94
|
-
const minInput = options?.minInputTokens ?? 150;
|
|
95
|
-
const estimatedTokens = Math.ceil(content.length / 4);
|
|
96
|
-
if (estimatedTokens < minInput) {
|
|
97
|
-
// Already concise.
|
|
98
|
-
return content;
|
|
99
|
-
}
|
|
100
|
-
const prompt = [
|
|
101
|
-
"你是代码压缩专家。将以下代码签名/内容改写为极简版(保留核心信息,去掉冗余)。",
|
|
102
|
-
"要求:",
|
|
103
|
-
"1. 保留函数名、参数、返回类型",
|
|
104
|
-
"2. 去掉注释、装饰器、冗长描述",
|
|
105
|
-
"3. 输出格式:function_name(params) -> return_type | 核心功能",
|
|
106
|
-
"",
|
|
107
|
-
`原内容:\n${content.slice(0, 600)}`,
|
|
108
|
-
"",
|
|
109
|
-
"压缩版:",
|
|
110
|
-
].join("\n");
|
|
111
|
-
const maxTokens = options?.maxOutputTokens ?? 80;
|
|
112
|
-
try {
|
|
113
|
-
const result = options?.modelHandle
|
|
114
|
-
? await options.modelHandle.generate(prompt, maxTokens)
|
|
115
|
-
: await (0, openbmb_1.openbmbGenerateText)({ prompt, model: options?.modelPath ?? "minicpm-1b" }, { ...options, maxTokens });
|
|
116
|
-
return result.trim().replace(/^压缩版[::]?\s*/i, "");
|
|
117
|
-
}
|
|
118
|
-
catch {
|
|
119
|
-
// Degrade gracefully: if no model is available, keep the original content.
|
|
120
|
-
return content;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* High-level pipeline: cluster similar nodes, summarize each cluster, and
|
|
125
|
-
* densify remaining verbose nodes. Returns compressed node set.
|
|
126
|
-
*
|
|
127
|
-
* When a compression model handle is provided, summarization/densification
|
|
128
|
-
* route through it (external economy tier or embedded minicpm); otherwise they
|
|
129
|
-
* fall back to direct embedded openbmb invocation.
|
|
130
|
-
*/
|
|
131
|
-
async function applySemanticCompression(nodes, options) {
|
|
132
|
-
const clusters = await clusterSimilarNodes(nodes, options?.clusteringOptions);
|
|
133
|
-
const clusterIds = new Set(clusters.flatMap((c) => c.members.map((m) => m.id)));
|
|
134
|
-
const summarizerOptions = {
|
|
135
|
-
...options?.summarizerOptions,
|
|
136
|
-
...(options?.modelHandle ? { modelHandle: options.modelHandle } : {}),
|
|
137
|
-
};
|
|
138
|
-
const densifierOptions = {
|
|
139
|
-
...options?.densifierOptions,
|
|
140
|
-
...(options?.modelHandle ? { modelHandle: options.modelHandle } : {}),
|
|
141
|
-
};
|
|
142
|
-
const compressed = [];
|
|
143
|
-
// Replace each cluster with a single summarized node.
|
|
144
|
-
for (const cluster of clusters) {
|
|
145
|
-
const summary = await summarizeCluster(cluster, summarizerOptions);
|
|
146
|
-
compressed.push({
|
|
147
|
-
...cluster.representative,
|
|
148
|
-
content: summary,
|
|
149
|
-
metadata: {
|
|
150
|
-
...cluster.representative.metadata,
|
|
151
|
-
compressed: true,
|
|
152
|
-
clusterSize: cluster.members.length,
|
|
153
|
-
originalIds: cluster.members.map((m) => m.id),
|
|
154
|
-
},
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
// Densify non-clustered nodes if verbose.
|
|
158
|
-
for (const node of nodes) {
|
|
159
|
-
if (clusterIds.has(node.id))
|
|
160
|
-
continue;
|
|
161
|
-
const dense = await densifyNodeContent(node, densifierOptions);
|
|
162
|
-
compressed.push({
|
|
163
|
-
...node,
|
|
164
|
-
content: dense,
|
|
165
|
-
metadata: {
|
|
166
|
-
...node.metadata,
|
|
167
|
-
...(dense !== node.content ? { densified: true } : {}),
|
|
168
|
-
},
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
return compressed;
|
|
172
|
-
}
|
|
173
|
-
//# sourceMappingURL=semantic-compression.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"semantic-compression.js","sourceRoot":"","sources":["../../src/graph/semantic-compression.ts"],"names":[],"mappings":";;AA6BA,kDAgDC;AAcD,4CAiCC;AAcD,gDAwCC;AAUD,4DAqDC;AAhPD,uDAAoG;AACpG,kEAAuG;AAuBvG;;;GAG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AAC,cAAc;YACzB,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE;gBACR,GAAG,OAAO,CAAC,cAAc,CAAC,QAAQ;gBAClC,UAAU,EAAE,IAAI;gBAChB,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM;gBACnC,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC9C;SACF,CAAC,CAAC;IACL,CAAC;IAED,0CAA0C;IAC1C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAAE,SAAS;QACtC,MAAM,KAAK,GAAG,MAAM,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QAC/D,UAAU,CAAC,IAAI,CAAC;YACd,GAAG,IAAI;YACP,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE;gBACR,GAAG,IAAI,CAAC,QAAQ;gBAChB,GAAG,CAAC,KAAK,KAAK,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACvD;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { GraphClient } from "./client-factory";
|
|
2
|
-
export interface EnricherOptions {
|
|
3
|
-
batchSize?: number;
|
|
4
|
-
sleepMs?: number;
|
|
5
|
-
/** Explicit model override; when omitted, routing uses semanticEnrichment/economy tier config. */
|
|
6
|
-
model?: string;
|
|
7
|
-
/** @deprecated Use `model` instead. */
|
|
8
|
-
openbmbModel?: string;
|
|
9
|
-
timeoutMs?: number;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* 后台静默富化图谱节点语义
|
|
13
|
-
*/
|
|
14
|
-
export declare function enrichGraphSemanticsSilent(client: GraphClient, options?: EnricherOptions): Promise<{
|
|
15
|
-
enrichedCount: number;
|
|
16
|
-
}>;
|
|
17
|
-
//# sourceMappingURL=semantic-enricher.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"semantic-enricher.d.ts","sourceRoot":"","sources":["../../src/graph/semantic-enricher.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAKpD,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kGAAkG;IAClG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,WAAW,EACnB,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,CA8FpC"}
|