@roarpeng/graphflow 1.15.2 → 1.15.3
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 +10 -0
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/dist/graph/context-package-core.d.ts +59 -0
- package/dist/graph/context-package-core.d.ts.map +1 -0
- package/dist/graph/context-package-core.js +512 -0
- package/dist/graph/context-package-core.js.map +1 -0
- package/dist/graph/context-slicer.d.ts +7 -11
- package/dist/graph/context-slicer.d.ts.map +1 -1
- package/dist/graph/context-slicer.js +54 -636
- package/dist/graph/context-slicer.js.map +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import type { GraphNode } from "../core/types.js";
|
|
2
1
|
import type { GraphClient } from "./client-factory.js";
|
|
2
|
+
import type { LayeredContextPackage, LayeredPackageOptions } from "./context-slicer-types.js";
|
|
3
|
+
import { expandSubgraph, isPinnedL3Node, vectorRecall } from "./context-package-core.js";
|
|
3
4
|
export type { ContextSlice, ContextLayer, ContextAnchorItem, LayeredContextPackage, LayeredPackageOptions, SubgraphExpansionOptions, ContextRefillManager, L3PinKind, } from "./context-slicer-types.js";
|
|
4
5
|
export { DEFAULT_EXPANSION_RELATIONS, ARCHITECTURE_QUERY, } from "./context-slicer-types.js";
|
|
5
|
-
|
|
6
|
-
* Governance pins for L3: Decision/goal nodes that packing must prefer so
|
|
7
|
-
* budget truncation cannot drop alignment / deviation / goal constraints.
|
|
8
|
-
*/
|
|
9
|
-
export declare function isPinnedL3Node(node: GraphNode): boolean;
|
|
6
|
+
export { isPinnedL3Node, expandSubgraph, vectorRecall };
|
|
10
7
|
export { getEncoder, estimateTokens, summarizeNodes, classifyLayer, canUseLayer, markLayerUsed, modulePathKey, deriveModuleId, extractFileFromSymbolId, } from "./context-slicer-utils.js";
|
|
11
8
|
export { diversifyHitsBySourceFile, expandSiblingDirectoryHits, hasModuleFamilyIntent, prepareHitsForPackaging, DEFAULT_MAX_SYMBOLS_PER_FILE, DEFAULT_MAX_SIBLING_FILES, } from "./hit-diversify.js";
|
|
12
|
-
|
|
13
|
-
export declare function expandSubgraph(client: GraphClient, seedIds: string[], options?: SubgraphExpansionOptions): Promise<GraphNode[]>;
|
|
14
|
-
export declare function buildContextSlice(client: GraphClient, query: string, maxTokens: number): Promise<ContextSlice>;
|
|
15
|
-
export declare function vectorRecall(nodes: GraphNode[], queryEmbedding: number[], topK: number, minSimilarity: number): GraphNode[];
|
|
9
|
+
export declare function buildContextSlice(client: GraphClient, query: string, maxTokens: number): Promise<import("./context-slicer-types.js").ContextSlice>;
|
|
16
10
|
export declare function buildLayeredContextPackage(client: GraphClient, query: string, maxTokens: number, options?: LayeredPackageOptions): Promise<LayeredContextPackage>;
|
|
17
|
-
export declare function createContextRefillManager(client: GraphClient, maxTokens: number, options?: LayeredPackageOptions): ContextRefillManager;
|
|
11
|
+
export declare function createContextRefillManager(client: GraphClient, maxTokens: number, options?: LayeredPackageOptions): import("./context-slicer-types.js").ContextRefillManager;
|
|
18
12
|
/**
|
|
19
13
|
* Enhanced context packaging with graph-structure compression and adaptive budgeting.
|
|
20
14
|
*
|
|
@@ -24,6 +18,8 @@ export declare function createContextRefillManager(client: GraphClient, maxToken
|
|
|
24
18
|
* 3. Graph compression: connected subgraph + PageRank re-ranking
|
|
25
19
|
* 4. Layer quotas + token budgeting
|
|
26
20
|
* 5. Edge expansion
|
|
21
|
+
*
|
|
22
|
+
* Shared recall/pack steps live in `context-package-core` (same as layered).
|
|
27
23
|
*/
|
|
28
24
|
export declare function buildEnhancedContextPackage(client: GraphClient, query: string, task: string, maxTokens: number, options?: LayeredPackageOptions): Promise<LayeredContextPackage>;
|
|
29
25
|
//# sourceMappingURL=context-slicer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-slicer.d.ts","sourceRoot":"","sources":["../../src/graph/context-slicer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context-slicer.d.ts","sourceRoot":"","sources":["../../src/graph/context-slicer.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC9F,OAAO,EAGL,cAAc,EAOd,cAAc,EAId,YAAY,EACb,MAAM,2BAA2B,CAAC;AAGnC,YAAY,EACV,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,SAAS,GACV,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC;AAGxD,OAAO,EACL,UAAU,EACV,cAAc,EACd,cAAc,EACd,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,cAAc,EACd,uBAAuB,GACxB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,EACvB,4BAA4B,EAC5B,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAE5B,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,OAAO,2BAA2B,EAAE,YAAY,CAAC,CAG3D;AAED,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,qBAAqB,CAAC,CAyBhC;AAED,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,2BAA2B,EAAE,oBAAoB,CAsC1D;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,qBAAqB,CAAC,CAsFhC"}
|