@vpxa/kb 0.1.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/LICENSE +21 -0
- package/README.md +1140 -0
- package/bin/kb.mjs +10 -0
- package/package.json +67 -0
- package/packages/analyzers/dist/blast-radius-analyzer.d.ts +23 -0
- package/packages/analyzers/dist/blast-radius-analyzer.js +114 -0
- package/packages/analyzers/dist/dependency-analyzer.d.ts +29 -0
- package/packages/analyzers/dist/dependency-analyzer.js +425 -0
- package/packages/analyzers/dist/diagram-generator.d.ts +13 -0
- package/packages/analyzers/dist/diagram-generator.js +86 -0
- package/packages/analyzers/dist/entry-point-analyzer.d.ts +19 -0
- package/packages/analyzers/dist/entry-point-analyzer.js +239 -0
- package/packages/analyzers/dist/index.d.ts +14 -0
- package/packages/analyzers/dist/index.js +23 -0
- package/packages/analyzers/dist/knowledge-producer.d.ts +32 -0
- package/packages/analyzers/dist/knowledge-producer.js +113 -0
- package/packages/analyzers/dist/pattern-analyzer.d.ts +12 -0
- package/packages/analyzers/dist/pattern-analyzer.js +359 -0
- package/packages/analyzers/dist/regex-call-graph.d.ts +17 -0
- package/packages/analyzers/dist/regex-call-graph.js +428 -0
- package/packages/analyzers/dist/structure-analyzer.d.ts +11 -0
- package/packages/analyzers/dist/structure-analyzer.js +258 -0
- package/packages/analyzers/dist/symbol-analyzer.d.ts +10 -0
- package/packages/analyzers/dist/symbol-analyzer.js +442 -0
- package/packages/analyzers/dist/ts-call-graph.d.ts +27 -0
- package/packages/analyzers/dist/ts-call-graph.js +160 -0
- package/packages/analyzers/dist/types.d.ts +98 -0
- package/packages/analyzers/dist/types.js +1 -0
- package/packages/chunker/dist/call-graph-extractor.d.ts +22 -0
- package/packages/chunker/dist/call-graph-extractor.js +90 -0
- package/packages/chunker/dist/chunker-factory.d.ts +7 -0
- package/packages/chunker/dist/chunker-factory.js +36 -0
- package/packages/chunker/dist/chunker.interface.d.ts +10 -0
- package/packages/chunker/dist/chunker.interface.js +1 -0
- package/packages/chunker/dist/code-chunker.d.ts +14 -0
- package/packages/chunker/dist/code-chunker.js +134 -0
- package/packages/chunker/dist/generic-chunker.d.ts +12 -0
- package/packages/chunker/dist/generic-chunker.js +72 -0
- package/packages/chunker/dist/index.d.ts +8 -0
- package/packages/chunker/dist/index.js +21 -0
- package/packages/chunker/dist/markdown-chunker.d.ts +14 -0
- package/packages/chunker/dist/markdown-chunker.js +122 -0
- package/packages/chunker/dist/treesitter-chunker.d.ts +47 -0
- package/packages/chunker/dist/treesitter-chunker.js +234 -0
- package/packages/cli/dist/commands/analyze.d.ts +3 -0
- package/packages/cli/dist/commands/analyze.js +112 -0
- package/packages/cli/dist/commands/context-cmds.d.ts +3 -0
- package/packages/cli/dist/commands/context-cmds.js +155 -0
- package/packages/cli/dist/commands/environment.d.ts +3 -0
- package/packages/cli/dist/commands/environment.js +204 -0
- package/packages/cli/dist/commands/execution.d.ts +3 -0
- package/packages/cli/dist/commands/execution.js +137 -0
- package/packages/cli/dist/commands/graph.d.ts +3 -0
- package/packages/cli/dist/commands/graph.js +81 -0
- package/packages/cli/dist/commands/init.d.ts +8 -0
- package/packages/cli/dist/commands/init.js +87 -0
- package/packages/cli/dist/commands/knowledge.d.ts +3 -0
- package/packages/cli/dist/commands/knowledge.js +139 -0
- package/packages/cli/dist/commands/search.d.ts +3 -0
- package/packages/cli/dist/commands/search.js +267 -0
- package/packages/cli/dist/commands/system.d.ts +3 -0
- package/packages/cli/dist/commands/system.js +241 -0
- package/packages/cli/dist/commands/workspace.d.ts +3 -0
- package/packages/cli/dist/commands/workspace.js +388 -0
- package/packages/cli/dist/context.d.ts +5 -0
- package/packages/cli/dist/context.js +14 -0
- package/packages/cli/dist/helpers.d.ts +52 -0
- package/packages/cli/dist/helpers.js +458 -0
- package/packages/cli/dist/index.d.ts +8 -0
- package/packages/cli/dist/index.js +69 -0
- package/packages/cli/dist/kb-init.d.ts +57 -0
- package/packages/cli/dist/kb-init.js +82 -0
- package/packages/cli/dist/types.d.ts +7 -0
- package/packages/cli/dist/types.js +1 -0
- package/packages/core/dist/constants.d.ts +49 -0
- package/packages/core/dist/constants.js +43 -0
- package/packages/core/dist/content-detector.d.ts +9 -0
- package/packages/core/dist/content-detector.js +79 -0
- package/packages/core/dist/errors.d.ts +18 -0
- package/packages/core/dist/errors.js +40 -0
- package/packages/core/dist/index.d.ts +6 -0
- package/packages/core/dist/index.js +9 -0
- package/packages/core/dist/logger.d.ts +9 -0
- package/packages/core/dist/logger.js +34 -0
- package/packages/core/dist/types.d.ts +108 -0
- package/packages/core/dist/types.js +1 -0
- package/packages/embeddings/dist/embedder.interface.d.ts +24 -0
- package/packages/embeddings/dist/embedder.interface.js +1 -0
- package/packages/embeddings/dist/index.d.ts +3 -0
- package/packages/embeddings/dist/index.js +5 -0
- package/packages/embeddings/dist/onnx-embedder.d.ts +24 -0
- package/packages/embeddings/dist/onnx-embedder.js +82 -0
- package/packages/indexer/dist/file-hasher.d.ts +11 -0
- package/packages/indexer/dist/file-hasher.js +13 -0
- package/packages/indexer/dist/filesystem-crawler.d.ts +27 -0
- package/packages/indexer/dist/filesystem-crawler.js +125 -0
- package/packages/indexer/dist/graph-extractor.d.ts +22 -0
- package/packages/indexer/dist/graph-extractor.js +111 -0
- package/packages/indexer/dist/incremental-indexer.d.ts +47 -0
- package/packages/indexer/dist/incremental-indexer.js +278 -0
- package/packages/indexer/dist/index.d.ts +5 -0
- package/packages/indexer/dist/index.js +14 -0
- package/packages/server/dist/api.d.ts +8 -0
- package/packages/server/dist/api.js +9 -0
- package/packages/server/dist/config.d.ts +3 -0
- package/packages/server/dist/config.js +75 -0
- package/packages/server/dist/curated-manager.d.ts +86 -0
- package/packages/server/dist/curated-manager.js +357 -0
- package/packages/server/dist/index.d.ts +2 -0
- package/packages/server/dist/index.js +134 -0
- package/packages/server/dist/replay-interceptor.d.ts +11 -0
- package/packages/server/dist/replay-interceptor.js +38 -0
- package/packages/server/dist/resources/resources.d.ts +4 -0
- package/packages/server/dist/resources/resources.js +40 -0
- package/packages/server/dist/server.d.ts +21 -0
- package/packages/server/dist/server.js +247 -0
- package/packages/server/dist/tools/analyze.tools.d.ts +11 -0
- package/packages/server/dist/tools/analyze.tools.js +288 -0
- package/packages/server/dist/tools/forge.tools.d.ts +12 -0
- package/packages/server/dist/tools/forge.tools.js +501 -0
- package/packages/server/dist/tools/forget.tool.d.ts +4 -0
- package/packages/server/dist/tools/forget.tool.js +43 -0
- package/packages/server/dist/tools/graph.tool.d.ts +4 -0
- package/packages/server/dist/tools/graph.tool.js +110 -0
- package/packages/server/dist/tools/list.tool.d.ts +4 -0
- package/packages/server/dist/tools/list.tool.js +56 -0
- package/packages/server/dist/tools/lookup.tool.d.ts +4 -0
- package/packages/server/dist/tools/lookup.tool.js +53 -0
- package/packages/server/dist/tools/onboard.tool.d.ts +5 -0
- package/packages/server/dist/tools/onboard.tool.js +112 -0
- package/packages/server/dist/tools/produce.tool.d.ts +3 -0
- package/packages/server/dist/tools/produce.tool.js +74 -0
- package/packages/server/dist/tools/read.tool.d.ts +4 -0
- package/packages/server/dist/tools/read.tool.js +49 -0
- package/packages/server/dist/tools/reindex.tool.d.ts +7 -0
- package/packages/server/dist/tools/reindex.tool.js +70 -0
- package/packages/server/dist/tools/remember.tool.d.ts +4 -0
- package/packages/server/dist/tools/remember.tool.js +45 -0
- package/packages/server/dist/tools/replay.tool.d.ts +3 -0
- package/packages/server/dist/tools/replay.tool.js +89 -0
- package/packages/server/dist/tools/search.tool.d.ts +5 -0
- package/packages/server/dist/tools/search.tool.js +331 -0
- package/packages/server/dist/tools/status.tool.d.ts +4 -0
- package/packages/server/dist/tools/status.tool.js +68 -0
- package/packages/server/dist/tools/toolkit.tools.d.ts +35 -0
- package/packages/server/dist/tools/toolkit.tools.js +1674 -0
- package/packages/server/dist/tools/update.tool.d.ts +4 -0
- package/packages/server/dist/tools/update.tool.js +42 -0
- package/packages/server/dist/tools/utility.tools.d.ts +15 -0
- package/packages/server/dist/tools/utility.tools.js +461 -0
- package/packages/store/dist/graph-store.interface.d.ts +104 -0
- package/packages/store/dist/graph-store.interface.js +1 -0
- package/packages/store/dist/index.d.ts +6 -0
- package/packages/store/dist/index.js +9 -0
- package/packages/store/dist/lance-store.d.ts +32 -0
- package/packages/store/dist/lance-store.js +258 -0
- package/packages/store/dist/sqlite-graph-store.d.ts +43 -0
- package/packages/store/dist/sqlite-graph-store.js +374 -0
- package/packages/store/dist/store-factory.d.ts +9 -0
- package/packages/store/dist/store-factory.js +14 -0
- package/packages/store/dist/store.interface.d.ts +48 -0
- package/packages/store/dist/store.interface.js +1 -0
- package/packages/tools/dist/batch.d.ts +21 -0
- package/packages/tools/dist/batch.js +45 -0
- package/packages/tools/dist/changelog.d.ts +34 -0
- package/packages/tools/dist/changelog.js +112 -0
- package/packages/tools/dist/check.d.ts +26 -0
- package/packages/tools/dist/check.js +59 -0
- package/packages/tools/dist/checkpoint.d.ts +17 -0
- package/packages/tools/dist/checkpoint.js +43 -0
- package/packages/tools/dist/codemod.d.ts +37 -0
- package/packages/tools/dist/codemod.js +69 -0
- package/packages/tools/dist/compact.d.ts +41 -0
- package/packages/tools/dist/compact.js +60 -0
- package/packages/tools/dist/data-transform.d.ts +10 -0
- package/packages/tools/dist/data-transform.js +124 -0
- package/packages/tools/dist/dead-symbols.d.ts +21 -0
- package/packages/tools/dist/dead-symbols.js +71 -0
- package/packages/tools/dist/delegate.d.ts +34 -0
- package/packages/tools/dist/delegate.js +130 -0
- package/packages/tools/dist/diff-parse.d.ts +26 -0
- package/packages/tools/dist/diff-parse.js +153 -0
- package/packages/tools/dist/digest.d.ts +53 -0
- package/packages/tools/dist/digest.js +242 -0
- package/packages/tools/dist/encode.d.ts +14 -0
- package/packages/tools/dist/encode.js +46 -0
- package/packages/tools/dist/env-info.d.ts +28 -0
- package/packages/tools/dist/env-info.js +58 -0
- package/packages/tools/dist/eval.d.ts +13 -0
- package/packages/tools/dist/eval.js +79 -0
- package/packages/tools/dist/evidence-map.d.ts +79 -0
- package/packages/tools/dist/evidence-map.js +203 -0
- package/packages/tools/dist/file-summary.d.ts +32 -0
- package/packages/tools/dist/file-summary.js +106 -0
- package/packages/tools/dist/file-walk.d.ts +4 -0
- package/packages/tools/dist/file-walk.js +75 -0
- package/packages/tools/dist/find-examples.d.ts +25 -0
- package/packages/tools/dist/find-examples.js +48 -0
- package/packages/tools/dist/find.d.ts +47 -0
- package/packages/tools/dist/find.js +120 -0
- package/packages/tools/dist/forge-classify.d.ts +44 -0
- package/packages/tools/dist/forge-classify.js +319 -0
- package/packages/tools/dist/forge-ground.d.ts +64 -0
- package/packages/tools/dist/forge-ground.js +184 -0
- package/packages/tools/dist/git-context.d.ts +22 -0
- package/packages/tools/dist/git-context.js +46 -0
- package/packages/tools/dist/graph-query.d.ts +89 -0
- package/packages/tools/dist/graph-query.js +194 -0
- package/packages/tools/dist/health.d.ts +14 -0
- package/packages/tools/dist/health.js +118 -0
- package/packages/tools/dist/http-request.d.ts +23 -0
- package/packages/tools/dist/http-request.js +58 -0
- package/packages/tools/dist/index.d.ts +49 -0
- package/packages/tools/dist/index.js +273 -0
- package/packages/tools/dist/lane.d.ts +39 -0
- package/packages/tools/dist/lane.js +227 -0
- package/packages/tools/dist/measure.d.ts +38 -0
- package/packages/tools/dist/measure.js +119 -0
- package/packages/tools/dist/onboard.d.ts +41 -0
- package/packages/tools/dist/onboard.js +1139 -0
- package/packages/tools/dist/parse-output.d.ts +80 -0
- package/packages/tools/dist/parse-output.js +158 -0
- package/packages/tools/dist/process-manager.d.ts +18 -0
- package/packages/tools/dist/process-manager.js +69 -0
- package/packages/tools/dist/queue.d.ts +38 -0
- package/packages/tools/dist/queue.js +126 -0
- package/packages/tools/dist/regex-test.d.ts +31 -0
- package/packages/tools/dist/regex-test.js +39 -0
- package/packages/tools/dist/rename.d.ts +29 -0
- package/packages/tools/dist/rename.js +70 -0
- package/packages/tools/dist/replay.d.ts +56 -0
- package/packages/tools/dist/replay.js +108 -0
- package/packages/tools/dist/schema-validate.d.ts +23 -0
- package/packages/tools/dist/schema-validate.js +141 -0
- package/packages/tools/dist/scope-map.d.ts +52 -0
- package/packages/tools/dist/scope-map.js +72 -0
- package/packages/tools/dist/snippet.d.ts +34 -0
- package/packages/tools/dist/snippet.js +80 -0
- package/packages/tools/dist/stash.d.ts +12 -0
- package/packages/tools/dist/stash.js +60 -0
- package/packages/tools/dist/stratum-card.d.ts +31 -0
- package/packages/tools/dist/stratum-card.js +239 -0
- package/packages/tools/dist/symbol.d.ts +28 -0
- package/packages/tools/dist/symbol.js +87 -0
- package/packages/tools/dist/test-run.d.ts +23 -0
- package/packages/tools/dist/test-run.js +55 -0
- package/packages/tools/dist/text-utils.d.ts +16 -0
- package/packages/tools/dist/text-utils.js +31 -0
- package/packages/tools/dist/time-utils.d.ts +18 -0
- package/packages/tools/dist/time-utils.js +135 -0
- package/packages/tools/dist/trace.d.ts +24 -0
- package/packages/tools/dist/trace.js +114 -0
- package/packages/tools/dist/truncation.d.ts +22 -0
- package/packages/tools/dist/truncation.js +45 -0
- package/packages/tools/dist/watch.d.ts +30 -0
- package/packages/tools/dist/watch.js +61 -0
- package/packages/tools/dist/web-fetch.d.ts +45 -0
- package/packages/tools/dist/web-fetch.js +249 -0
- package/packages/tools/dist/web-search.d.ts +23 -0
- package/packages/tools/dist/web-search.js +46 -0
- package/packages/tools/dist/workset.d.ts +45 -0
- package/packages/tools/dist/workset.js +77 -0
- package/packages/tui/dist/App.d.ts +8 -0
- package/packages/tui/dist/App.js +52659 -0
- package/packages/tui/dist/index.d.ts +19 -0
- package/packages/tui/dist/index.js +54742 -0
- package/packages/tui/dist/panels/CuratedPanel.d.ts +8 -0
- package/packages/tui/dist/panels/CuratedPanel.js +34452 -0
- package/packages/tui/dist/panels/LogPanel.d.ts +3 -0
- package/packages/tui/dist/panels/LogPanel.js +51894 -0
- package/packages/tui/dist/panels/SearchPanel.d.ts +10 -0
- package/packages/tui/dist/panels/SearchPanel.js +34985 -0
- package/packages/tui/dist/panels/StatusPanel.d.ts +8 -0
- package/packages/tui/dist/panels/StatusPanel.js +34465 -0
- package/skills/knowledge-base/SKILL.md +316 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* kb_graph — Knowledge graph query tools.
|
|
3
|
+
*
|
|
4
|
+
* Query, traverse, and manage the entity-relationship knowledge graph.
|
|
5
|
+
* The graph complements vector search with structural reasoning:
|
|
6
|
+
* vector search finds similar content, graph traversal finds connected concepts.
|
|
7
|
+
*/
|
|
8
|
+
import type { GraphEdge, GraphNode, GraphStats, GraphTraversalResult, IGraphStore } from '@kb/store';
|
|
9
|
+
export interface GraphQueryOptions {
|
|
10
|
+
/** Action: query nodes, traverse from a node, get stats, or add data */
|
|
11
|
+
action: 'find_nodes' | 'find_edges' | 'neighbors' | 'traverse' | 'stats' | 'add' | 'delete' | 'clear';
|
|
12
|
+
/** Node type filter (for find_nodes) */
|
|
13
|
+
nodeType?: string;
|
|
14
|
+
/** Name pattern (LIKE %pattern%) for find_nodes */
|
|
15
|
+
namePattern?: string;
|
|
16
|
+
/** Source path filter */
|
|
17
|
+
sourcePath?: string;
|
|
18
|
+
/** Node ID for neighbors/traverse/delete */
|
|
19
|
+
nodeId?: string;
|
|
20
|
+
/** Edge type filter */
|
|
21
|
+
edgeType?: string;
|
|
22
|
+
/** From node ID (for find_edges) */
|
|
23
|
+
fromId?: string;
|
|
24
|
+
/** To node ID (for find_edges) */
|
|
25
|
+
toId?: string;
|
|
26
|
+
/** Traversal direction */
|
|
27
|
+
direction?: 'outgoing' | 'incoming' | 'both';
|
|
28
|
+
/** Max traversal depth (default: 2) */
|
|
29
|
+
maxDepth?: number;
|
|
30
|
+
/** Max results (default: 50) */
|
|
31
|
+
limit?: number;
|
|
32
|
+
/** Nodes to add (for action=add) */
|
|
33
|
+
nodes?: Array<{
|
|
34
|
+
id?: string;
|
|
35
|
+
type: string;
|
|
36
|
+
name: string;
|
|
37
|
+
properties?: Record<string, unknown>;
|
|
38
|
+
sourceRecordId?: string;
|
|
39
|
+
sourcePath?: string;
|
|
40
|
+
}>;
|
|
41
|
+
/** Edges to add (for action=add) */
|
|
42
|
+
edges?: Array<{
|
|
43
|
+
id?: string;
|
|
44
|
+
fromId: string;
|
|
45
|
+
toId: string;
|
|
46
|
+
type: string;
|
|
47
|
+
weight?: number;
|
|
48
|
+
properties?: Record<string, unknown>;
|
|
49
|
+
}>;
|
|
50
|
+
}
|
|
51
|
+
export interface GraphQueryResult {
|
|
52
|
+
action: string;
|
|
53
|
+
nodes?: GraphNode[];
|
|
54
|
+
edges?: GraphEdge[];
|
|
55
|
+
stats?: GraphStats;
|
|
56
|
+
nodesAdded?: number;
|
|
57
|
+
edgesAdded?: number;
|
|
58
|
+
deleted?: number;
|
|
59
|
+
summary: string;
|
|
60
|
+
}
|
|
61
|
+
export declare function graphQuery(graphStore: IGraphStore, options: GraphQueryOptions): Promise<GraphQueryResult>;
|
|
62
|
+
export interface GraphAugmentOptions {
|
|
63
|
+
/** Max graph hops from each vector hit (default: 1) */
|
|
64
|
+
hops?: number;
|
|
65
|
+
/** Edge type filter for graph expansion */
|
|
66
|
+
edgeType?: string;
|
|
67
|
+
/** Max graph nodes per vector hit (default: 5) */
|
|
68
|
+
maxPerHit?: number;
|
|
69
|
+
}
|
|
70
|
+
export interface GraphAugmentedResult {
|
|
71
|
+
/** Original search result record ID */
|
|
72
|
+
recordId: string;
|
|
73
|
+
/** Original similarity score */
|
|
74
|
+
score: number;
|
|
75
|
+
/** Source path of the matched record */
|
|
76
|
+
sourcePath: string;
|
|
77
|
+
/** Graph nodes connected to this record (via sourceRecordId) */
|
|
78
|
+
graphContext: GraphTraversalResult;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Augment vector search results with graph context.
|
|
82
|
+
* For each search hit, finds linked graph nodes and traverses their connections.
|
|
83
|
+
*/
|
|
84
|
+
export declare function graphAugmentSearch(graphStore: IGraphStore, hits: Array<{
|
|
85
|
+
recordId: string;
|
|
86
|
+
score: number;
|
|
87
|
+
sourcePath: string;
|
|
88
|
+
}>, options?: GraphAugmentOptions): Promise<GraphAugmentedResult[]>;
|
|
89
|
+
//# sourceMappingURL=graph-query.d.ts.map
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
function generateId(prefix, ...parts) {
|
|
3
|
+
return `${prefix}_${createHash("sha256").update(parts.join("|")).digest("hex").slice(0, 12)}`;
|
|
4
|
+
}
|
|
5
|
+
async function graphQuery(graphStore, options) {
|
|
6
|
+
const { action } = options;
|
|
7
|
+
switch (action) {
|
|
8
|
+
case "find_nodes": {
|
|
9
|
+
const nodes = await graphStore.findNodes({
|
|
10
|
+
type: options.nodeType,
|
|
11
|
+
namePattern: options.namePattern,
|
|
12
|
+
sourcePath: options.sourcePath,
|
|
13
|
+
limit: options.limit
|
|
14
|
+
});
|
|
15
|
+
return {
|
|
16
|
+
action,
|
|
17
|
+
nodes,
|
|
18
|
+
summary: `Found ${nodes.length} node(s)${options.nodeType ? ` of type "${options.nodeType}"` : ""}${options.namePattern ? ` matching "${options.namePattern}"` : ""}`
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
case "find_edges": {
|
|
22
|
+
const edges = await graphStore.findEdges({
|
|
23
|
+
type: options.edgeType,
|
|
24
|
+
fromId: options.fromId,
|
|
25
|
+
toId: options.toId,
|
|
26
|
+
limit: options.limit
|
|
27
|
+
});
|
|
28
|
+
return {
|
|
29
|
+
action,
|
|
30
|
+
edges,
|
|
31
|
+
summary: `Found ${edges.length} edge(s)${options.edgeType ? ` of type "${options.edgeType}"` : ""}`
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
case "neighbors": {
|
|
35
|
+
if (!options.nodeId) {
|
|
36
|
+
return { action, summary: "Error: nodeId is required for neighbors action" };
|
|
37
|
+
}
|
|
38
|
+
const result = await graphStore.getNeighbors(options.nodeId, {
|
|
39
|
+
edgeType: options.edgeType,
|
|
40
|
+
direction: options.direction,
|
|
41
|
+
limit: options.limit
|
|
42
|
+
});
|
|
43
|
+
return {
|
|
44
|
+
action,
|
|
45
|
+
nodes: result.nodes,
|
|
46
|
+
edges: result.edges,
|
|
47
|
+
summary: `Found ${result.nodes.length} neighbor(s) and ${result.edges.length} edge(s) for node "${options.nodeId}"`
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
case "traverse": {
|
|
51
|
+
if (!options.nodeId) {
|
|
52
|
+
return { action, summary: "Error: nodeId is required for traverse action" };
|
|
53
|
+
}
|
|
54
|
+
const result = await graphStore.traverse(options.nodeId, {
|
|
55
|
+
edgeType: options.edgeType,
|
|
56
|
+
maxDepth: options.maxDepth,
|
|
57
|
+
direction: options.direction,
|
|
58
|
+
limit: options.limit
|
|
59
|
+
});
|
|
60
|
+
return {
|
|
61
|
+
action,
|
|
62
|
+
nodes: result.nodes,
|
|
63
|
+
edges: result.edges,
|
|
64
|
+
summary: `Traversed ${result.nodes.length} node(s) and ${result.edges.length} edge(s) from "${options.nodeId}" (depth=${options.maxDepth ?? 2})`
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
case "stats": {
|
|
68
|
+
const stats = await graphStore.getStats();
|
|
69
|
+
return {
|
|
70
|
+
action,
|
|
71
|
+
stats,
|
|
72
|
+
summary: `Graph: ${stats.nodeCount} nodes, ${stats.edgeCount} edges. Types: ${Object.entries(stats.nodeTypes).map(([t, c]) => `${t}(${c})`).join(", ") || "none"}`
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
case "add": {
|
|
76
|
+
let nodesAdded = 0;
|
|
77
|
+
let edgesAdded = 0;
|
|
78
|
+
if (options.nodes && options.nodes.length > 0) {
|
|
79
|
+
const graphNodes = options.nodes.map((n) => ({
|
|
80
|
+
id: n.id ?? generateId("node", n.type, n.name),
|
|
81
|
+
type: n.type,
|
|
82
|
+
name: n.name,
|
|
83
|
+
properties: n.properties ?? {},
|
|
84
|
+
sourceRecordId: n.sourceRecordId,
|
|
85
|
+
sourcePath: n.sourcePath,
|
|
86
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
87
|
+
}));
|
|
88
|
+
await graphStore.upsertNodes(graphNodes);
|
|
89
|
+
nodesAdded = graphNodes.length;
|
|
90
|
+
}
|
|
91
|
+
if (options.edges && options.edges.length > 0) {
|
|
92
|
+
const graphEdges = options.edges.map((e) => ({
|
|
93
|
+
id: e.id ?? generateId("edge", e.fromId, e.toId, e.type),
|
|
94
|
+
fromId: e.fromId,
|
|
95
|
+
toId: e.toId,
|
|
96
|
+
type: e.type,
|
|
97
|
+
weight: e.weight,
|
|
98
|
+
properties: e.properties
|
|
99
|
+
}));
|
|
100
|
+
await graphStore.upsertEdges(graphEdges);
|
|
101
|
+
edgesAdded = graphEdges.length;
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
action,
|
|
105
|
+
nodesAdded,
|
|
106
|
+
edgesAdded,
|
|
107
|
+
summary: `Added ${nodesAdded} node(s) and ${edgesAdded} edge(s) to the graph`
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
case "delete": {
|
|
111
|
+
if (options.nodeId) {
|
|
112
|
+
await graphStore.deleteNode(options.nodeId);
|
|
113
|
+
return { action, deleted: 1, summary: `Deleted node "${options.nodeId}" and its edges` };
|
|
114
|
+
}
|
|
115
|
+
if (options.sourcePath) {
|
|
116
|
+
const count = await graphStore.deleteBySourcePath(options.sourcePath);
|
|
117
|
+
return {
|
|
118
|
+
action,
|
|
119
|
+
deleted: count,
|
|
120
|
+
summary: `Deleted ${count} node(s) from source "${options.sourcePath}"`
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
return { action, summary: "Error: nodeId or sourcePath required for delete action" };
|
|
124
|
+
}
|
|
125
|
+
case "clear": {
|
|
126
|
+
const stats = await graphStore.getStats();
|
|
127
|
+
await graphStore.clear();
|
|
128
|
+
return {
|
|
129
|
+
action,
|
|
130
|
+
deleted: stats.nodeCount,
|
|
131
|
+
summary: `Cleared graph: removed ${stats.nodeCount} node(s) and ${stats.edgeCount} edge(s)`
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
default:
|
|
135
|
+
return { action, summary: `Unknown action: ${action}` };
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
async function graphAugmentSearch(graphStore, hits, options) {
|
|
139
|
+
const hops = options?.hops ?? 1;
|
|
140
|
+
const maxPerHit = options?.maxPerHit ?? 5;
|
|
141
|
+
const results = [];
|
|
142
|
+
for (const hit of hits) {
|
|
143
|
+
try {
|
|
144
|
+
const linkedNodes = await graphStore.findNodes({ sourcePath: hit.sourcePath });
|
|
145
|
+
const allNodes = [];
|
|
146
|
+
const allEdges = [];
|
|
147
|
+
const seenNodeIds = /* @__PURE__ */ new Set();
|
|
148
|
+
const seenEdgeIds = /* @__PURE__ */ new Set();
|
|
149
|
+
for (const node of linkedNodes.slice(0, maxPerHit)) {
|
|
150
|
+
if (seenNodeIds.has(node.id)) continue;
|
|
151
|
+
seenNodeIds.add(node.id);
|
|
152
|
+
allNodes.push(node);
|
|
153
|
+
if (hops > 0) {
|
|
154
|
+
const traversal = await graphStore.traverse(node.id, {
|
|
155
|
+
maxDepth: hops,
|
|
156
|
+
edgeType: options?.edgeType,
|
|
157
|
+
limit: maxPerHit
|
|
158
|
+
});
|
|
159
|
+
for (const n of traversal.nodes) {
|
|
160
|
+
if (!seenNodeIds.has(n.id)) {
|
|
161
|
+
seenNodeIds.add(n.id);
|
|
162
|
+
allNodes.push(n);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
for (const e of traversal.edges) {
|
|
166
|
+
if (!seenEdgeIds.has(e.id)) {
|
|
167
|
+
seenEdgeIds.add(e.id);
|
|
168
|
+
allEdges.push(e);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
results.push({
|
|
174
|
+
recordId: hit.recordId,
|
|
175
|
+
score: hit.score,
|
|
176
|
+
sourcePath: hit.sourcePath,
|
|
177
|
+
graphContext: { nodes: allNodes, edges: allEdges }
|
|
178
|
+
});
|
|
179
|
+
} catch {
|
|
180
|
+
results.push({
|
|
181
|
+
recordId: hit.recordId,
|
|
182
|
+
score: hit.score,
|
|
183
|
+
sourcePath: hit.sourcePath,
|
|
184
|
+
graphContext: { nodes: [], edges: [] }
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return results;
|
|
189
|
+
}
|
|
190
|
+
export {
|
|
191
|
+
graphAugmentSearch,
|
|
192
|
+
graphQuery
|
|
193
|
+
};
|
|
194
|
+
//# sourceMappingURL=graph-query.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface HealthCheck {
|
|
2
|
+
name: string;
|
|
3
|
+
status: 'pass' | 'warn' | 'fail';
|
|
4
|
+
message: string;
|
|
5
|
+
}
|
|
6
|
+
export interface HealthResult {
|
|
7
|
+
path: string;
|
|
8
|
+
checks: HealthCheck[];
|
|
9
|
+
score: number;
|
|
10
|
+
summary: string;
|
|
11
|
+
}
|
|
12
|
+
/** Run project health checks on a directory. */
|
|
13
|
+
export declare function health(rootPath?: string): HealthResult;
|
|
14
|
+
//# sourceMappingURL=health.d.ts.map
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { join, resolve } from "node:path";
|
|
3
|
+
function health(rootPath) {
|
|
4
|
+
const root = resolve(rootPath ?? process.cwd());
|
|
5
|
+
const checks = [];
|
|
6
|
+
const pkgPath = join(root, "package.json");
|
|
7
|
+
if (existsSync(pkgPath)) {
|
|
8
|
+
checks.push({ name: "package.json", status: "pass", message: "Found" });
|
|
9
|
+
try {
|
|
10
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
11
|
+
if (!pkg.name) {
|
|
12
|
+
checks.push({ name: "package.name", status: "warn", message: "Missing package name" });
|
|
13
|
+
} else {
|
|
14
|
+
checks.push({ name: "package.name", status: "pass", message: pkg.name });
|
|
15
|
+
}
|
|
16
|
+
const scripts = pkg.scripts ?? {};
|
|
17
|
+
for (const script of ["build", "test", "lint"]) {
|
|
18
|
+
if (scripts[script]) {
|
|
19
|
+
checks.push({ name: `script:${script}`, status: "pass", message: scripts[script] });
|
|
20
|
+
} else {
|
|
21
|
+
checks.push({
|
|
22
|
+
name: `script:${script}`,
|
|
23
|
+
status: "warn",
|
|
24
|
+
message: `No "${script}" script defined`
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (pkg.type === "module") {
|
|
29
|
+
checks.push({ name: "esm", status: "pass", message: 'ESM ("type": "module")' });
|
|
30
|
+
} else if (pkg.type === "commonjs") {
|
|
31
|
+
checks.push({ name: "esm", status: "pass", message: 'CJS ("type": "commonjs")' });
|
|
32
|
+
} else {
|
|
33
|
+
checks.push({ name: "esm", status: "warn", message: 'No "type" field \u2014 defaults to CJS' });
|
|
34
|
+
}
|
|
35
|
+
if (pkg.engines?.node) {
|
|
36
|
+
checks.push({ name: "engines.node", status: "pass", message: pkg.engines.node });
|
|
37
|
+
} else {
|
|
38
|
+
checks.push({
|
|
39
|
+
name: "engines.node",
|
|
40
|
+
status: "warn",
|
|
41
|
+
message: "No Node.js engine constraint"
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
} catch {
|
|
45
|
+
checks.push({
|
|
46
|
+
name: "package.json",
|
|
47
|
+
status: "fail",
|
|
48
|
+
message: "Failed to parse package.json"
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
checks.push({
|
|
53
|
+
name: "package.json",
|
|
54
|
+
status: "fail",
|
|
55
|
+
message: "Missing \u2014 not a Node.js project"
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
const tsconfigPath = join(root, "tsconfig.json");
|
|
59
|
+
if (existsSync(tsconfigPath)) {
|
|
60
|
+
checks.push({ name: "tsconfig.json", status: "pass", message: "Found" });
|
|
61
|
+
} else {
|
|
62
|
+
checks.push({ name: "tsconfig.json", status: "warn", message: "Missing" });
|
|
63
|
+
}
|
|
64
|
+
const gitignorePath = join(root, ".gitignore");
|
|
65
|
+
if (existsSync(gitignorePath)) {
|
|
66
|
+
const content = readFileSync(gitignorePath, "utf-8");
|
|
67
|
+
const hasNodeModules = content.includes("node_modules");
|
|
68
|
+
const hasDist = content.includes("dist");
|
|
69
|
+
if (hasNodeModules && hasDist) {
|
|
70
|
+
checks.push({
|
|
71
|
+
name: ".gitignore",
|
|
72
|
+
status: "pass",
|
|
73
|
+
message: "Includes node_modules and dist"
|
|
74
|
+
});
|
|
75
|
+
} else {
|
|
76
|
+
checks.push({
|
|
77
|
+
name: ".gitignore",
|
|
78
|
+
status: "warn",
|
|
79
|
+
message: `Missing: ${!hasNodeModules ? "node_modules " : ""}${!hasDist ? "dist" : ""}`.trim()
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
} else {
|
|
83
|
+
checks.push({ name: ".gitignore", status: "warn", message: "Missing" });
|
|
84
|
+
}
|
|
85
|
+
const lockFiles = ["pnpm-lock.yaml", "package-lock.json", "yarn.lock", "bun.lock"];
|
|
86
|
+
const foundLock = lockFiles.find((f) => existsSync(join(root, f)));
|
|
87
|
+
if (foundLock) {
|
|
88
|
+
checks.push({ name: "lockfile", status: "pass", message: foundLock });
|
|
89
|
+
} else {
|
|
90
|
+
checks.push({ name: "lockfile", status: "warn", message: "No lock file found" });
|
|
91
|
+
}
|
|
92
|
+
const readmePath = join(root, "README.md");
|
|
93
|
+
if (existsSync(readmePath)) {
|
|
94
|
+
const size = readFileSync(readmePath, "utf-8").length;
|
|
95
|
+
checks.push({
|
|
96
|
+
name: "README.md",
|
|
97
|
+
status: size > 100 ? "pass" : "warn",
|
|
98
|
+
message: size > 100 ? `Found (${size} chars)` : "Found but very short"
|
|
99
|
+
});
|
|
100
|
+
} else {
|
|
101
|
+
checks.push({ name: "README.md", status: "warn", message: "Missing" });
|
|
102
|
+
}
|
|
103
|
+
if (existsSync(join(root, "LICENSE")) || existsSync(join(root, "LICENSE.md"))) {
|
|
104
|
+
checks.push({ name: "LICENSE", status: "pass", message: "Found" });
|
|
105
|
+
} else {
|
|
106
|
+
checks.push({ name: "LICENSE", status: "warn", message: "Missing" });
|
|
107
|
+
}
|
|
108
|
+
const total = checks.length;
|
|
109
|
+
const passed = checks.filter((c) => c.status === "pass").length;
|
|
110
|
+
const failed = checks.filter((c) => c.status === "fail").length;
|
|
111
|
+
const score = Math.round(passed / total * 100);
|
|
112
|
+
const summary = failed > 0 ? `${failed} critical issue(s), ${total - passed - failed} warning(s)` : total - passed > 0 ? `${total - passed} warning(s)` : "All checks passed";
|
|
113
|
+
return { path: root, checks, score, summary };
|
|
114
|
+
}
|
|
115
|
+
export {
|
|
116
|
+
health
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=health.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* kb_http — Make HTTP requests for API testing and debugging.
|
|
3
|
+
*/
|
|
4
|
+
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD';
|
|
5
|
+
export interface HttpRequestOptions {
|
|
6
|
+
url: string;
|
|
7
|
+
method?: HttpMethod;
|
|
8
|
+
headers?: Record<string, string>;
|
|
9
|
+
body?: string;
|
|
10
|
+
timeout?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface HttpRequestResult {
|
|
13
|
+
status: number;
|
|
14
|
+
statusText: string;
|
|
15
|
+
headers: Record<string, string>;
|
|
16
|
+
body: string;
|
|
17
|
+
durationMs: number;
|
|
18
|
+
contentType: string;
|
|
19
|
+
sizeBytes: number;
|
|
20
|
+
truncated: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function httpRequest(options: HttpRequestOptions): Promise<HttpRequestResult>;
|
|
23
|
+
//# sourceMappingURL=http-request.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { headTailTruncate } from "./truncation.js";
|
|
2
|
+
const MAX_BODY_SIZE = 5e4;
|
|
3
|
+
const DEFAULT_TIMEOUT = 15e3;
|
|
4
|
+
async function httpRequest(options) {
|
|
5
|
+
const { url, method = "GET", headers = {}, body, timeout = DEFAULT_TIMEOUT } = options;
|
|
6
|
+
const parsed = new URL(url);
|
|
7
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
8
|
+
throw new Error(`Unsupported protocol: ${parsed.protocol} \u2014 only http/https allowed`);
|
|
9
|
+
}
|
|
10
|
+
const controller = new AbortController();
|
|
11
|
+
const timer = setTimeout(() => controller.abort(), timeout);
|
|
12
|
+
const start = Date.now();
|
|
13
|
+
let response;
|
|
14
|
+
try {
|
|
15
|
+
response = await fetch(url, {
|
|
16
|
+
method,
|
|
17
|
+
headers: { "User-Agent": "kb-http/1.0", ...headers },
|
|
18
|
+
body: method !== "GET" && method !== "HEAD" ? body : void 0,
|
|
19
|
+
signal: controller.signal,
|
|
20
|
+
redirect: "follow"
|
|
21
|
+
});
|
|
22
|
+
} finally {
|
|
23
|
+
clearTimeout(timer);
|
|
24
|
+
}
|
|
25
|
+
const durationMs = Date.now() - start;
|
|
26
|
+
const responseText = await response.text();
|
|
27
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
28
|
+
let formattedBody = responseText;
|
|
29
|
+
if (contentType.includes("json")) {
|
|
30
|
+
try {
|
|
31
|
+
formattedBody = JSON.stringify(JSON.parse(responseText), null, 2);
|
|
32
|
+
} catch {
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
let truncated = false;
|
|
36
|
+
if (formattedBody.length > MAX_BODY_SIZE) {
|
|
37
|
+
formattedBody = headTailTruncate(formattedBody, MAX_BODY_SIZE);
|
|
38
|
+
truncated = true;
|
|
39
|
+
}
|
|
40
|
+
const responseHeaders = {};
|
|
41
|
+
response.headers.forEach((value, key) => {
|
|
42
|
+
responseHeaders[key] = value;
|
|
43
|
+
});
|
|
44
|
+
return {
|
|
45
|
+
status: response.status,
|
|
46
|
+
statusText: response.statusText,
|
|
47
|
+
headers: responseHeaders,
|
|
48
|
+
body: formattedBody,
|
|
49
|
+
durationMs,
|
|
50
|
+
contentType,
|
|
51
|
+
sizeBytes: responseText.length,
|
|
52
|
+
truncated
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
httpRequest
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=http-request.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export { type BatchOperation, type BatchOptions, type BatchResult, batch, } from './batch.js';
|
|
2
|
+
export { type ChangelogEntry, type ChangelogFormat, type ChangelogOptions, type ChangelogResult, changelog, formatChangelog, } from './changelog.js';
|
|
3
|
+
export { type CheckOptions, type CheckResult, check } from './check.js';
|
|
4
|
+
export { type Checkpoint, checkpointLatest, checkpointList, checkpointLoad, checkpointSave, } from './checkpoint.js';
|
|
5
|
+
export { type CodemodChange, type CodemodOptions, type CodemodResult, type CodemodRule, codemod, } from './codemod.js';
|
|
6
|
+
export { type CompactOptions, type CompactResult, compact } from './compact.js';
|
|
7
|
+
export { dataTransform, type TransformOptions, type TransformResult, } from './data-transform.js';
|
|
8
|
+
export { type DeadSymbol, type DeadSymbolOptions, type DeadSymbolResult, findDeadSymbols, } from './dead-symbols.js';
|
|
9
|
+
export { type DelegateOptions, type DelegateResult, delegate, delegateListModels, } from './delegate.js';
|
|
10
|
+
export { type DiffChange, type DiffFile, type DiffHunk, type DiffParseOptions, diffParse, } from './diff-parse.js';
|
|
11
|
+
export { type DigestFieldEntry, type DigestOptions, type DigestResult, type DigestSource, digest, } from './digest.js';
|
|
12
|
+
export { type EncodeOperation, type EncodeOptions, type EncodeResult, encode, } from './encode.js';
|
|
13
|
+
export { type EnvInfoOptions, type EnvInfoResult, envInfo, } from './env-info.js';
|
|
14
|
+
export { type EvalOptions, type EvalResult, evaluate } from './eval.js';
|
|
15
|
+
export { type EvidenceEntry, type EvidenceMapAction, type EvidenceMapResult, type EvidenceMapState, type EvidenceStatus, evidenceMap, type ForgeTier, type GateDecision, type GateResult, type UnknownType, } from './evidence-map.js';
|
|
16
|
+
export { type FileSummaryOptions, type FileSummaryResult, fileSummary, } from './file-summary.js';
|
|
17
|
+
export { type FindOptions, type FindResult, type FindResults, find } from './find.js';
|
|
18
|
+
export { type Example, type FindExamplesOptions, type FindExamplesResult, findExamples, } from './find-examples.js';
|
|
19
|
+
export { type ClassifyTrigger, type ForgeClassifyCeremony, type ForgeClassifyOptions, type ForgeClassifyResult, forgeClassify, type TypedUnknownSeed, } from './forge-classify.js';
|
|
20
|
+
export { type ConstraintRef, type ForgeGroundOptions, type ForgeGroundResult, forgeGround, } from './forge-ground.js';
|
|
21
|
+
export { type GitContextOptions, type GitContextResult, gitContext, } from './git-context.js';
|
|
22
|
+
export { type GraphAugmentedResult, type GraphAugmentOptions, type GraphQueryOptions, type GraphQueryResult, graphAugmentSearch, graphQuery, } from './graph-query.js';
|
|
23
|
+
export { type HealthCheck, type HealthResult, health, } from './health.js';
|
|
24
|
+
export { type HttpMethod, type HttpRequestOptions, type HttpRequestResult, httpRequest, } from './http-request.js';
|
|
25
|
+
export { type LaneDiffEntry, type LaneDiffResult, type LaneMergeResult, type LaneMeta, laneCreate, laneDiff, laneDiscard, laneList, laneMerge, laneStatus, } from './lane.js';
|
|
26
|
+
export { analyzeFile, type FileMetrics, type MeasureOptions, type MeasureResult, measure, } from './measure.js';
|
|
27
|
+
export { type OnboardMode, type OnboardOptions, type OnboardResult, type OnboardStepResult, onboard, } from './onboard.js';
|
|
28
|
+
export { type ParsedError, type ParsedGitStatus, type ParsedOutput, type ParsedTestResult, type ParsedTestSummary, parseBiome, parseGitStatus, parseOutput, parseTsc, parseVitest, } from './parse-output.js';
|
|
29
|
+
export { type ManagedProcess, processList, processLogs, processStart, processStatus, processStop, } from './process-manager.js';
|
|
30
|
+
export { type QueueItem, type QueueState, queueClear, queueCreate, queueDelete, queueDone, queueFail, queueGet, queueList, queueNext, queuePush, } from './queue.js';
|
|
31
|
+
export { type RegexTestOptions, type RegexTestResult, regexTest, } from './regex-test.js';
|
|
32
|
+
export { type RenameChange, type RenameOptions, type RenameResult, rename, } from './rename.js';
|
|
33
|
+
export { type ReplayEntry, type ReplayOptions, replayAppend, replayCapture, replayClear, replayList, replayTrim, } from './replay.js';
|
|
34
|
+
export { type SchemaValidateOptions, type SchemaValidateResult, schemaValidate, type ValidationError, } from './schema-validate.js';
|
|
35
|
+
export { type ScopeMapEntry, type ScopeMapOptions, type ScopeMapResult, scopeMap, } from './scope-map.js';
|
|
36
|
+
export { type Snippet, type SnippetAction, type SnippetOptions, type SnippetResult, snippet, } from './snippet.js';
|
|
37
|
+
export { type StashEntry, stashClear, stashDelete, stashGet, stashList, stashSet, } from './stash.js';
|
|
38
|
+
export { type StratumCard, type StratumCardOptions, type StratumCardResult, stratumCard, } from './stratum-card.js';
|
|
39
|
+
export { type SymbolInfo, type SymbolOptions, symbol } from './symbol.js';
|
|
40
|
+
export { classifyExitCode, type TestRunOptions, type TestRunResult, testRun } from './test-run.js';
|
|
41
|
+
export { cosineSimilarity, estimateTokens, segment, } from './text-utils.js';
|
|
42
|
+
export { type TimeOptions, type TimeResult, timeUtils, } from './time-utils.js';
|
|
43
|
+
export { type TraceNode, type TraceOptions, type TraceResult, trace } from './trace.js';
|
|
44
|
+
export { headTailTruncate, paragraphTruncate } from './truncation.js';
|
|
45
|
+
export { type WatchEvent, type WatchHandle, type WatchOptions, watchList, watchStart, watchStop, } from './watch.js';
|
|
46
|
+
export { type WebFetchMode, type WebFetchOptions, type WebFetchResult, webFetch, } from './web-fetch.js';
|
|
47
|
+
export { parseSearchResults, type WebSearchOptions, type WebSearchResult, type WebSearchResultItem, webSearch, } from './web-search.js';
|
|
48
|
+
export { addToWorkset, deleteWorkset, getWorkset, listWorksets, removeFromWorkset, saveWorkset, type Workset, } from './workset.js';
|
|
49
|
+
//# sourceMappingURL=index.d.ts.map
|