@vpxa/kb 0.1.23 → 0.1.25
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 +3 -3
- package/package.json +9 -2
- package/packages/analyzers/dist/symbol-analyzer.js +5 -5
- package/packages/cli/dist/commands/init/adapters.js +1 -1
- package/packages/cli/dist/commands/init/constants.d.ts +4 -1
- package/packages/cli/dist/commands/init/constants.js +1 -1
- package/packages/cli/dist/commands/init/frontmatter.d.ts +54 -0
- package/packages/cli/dist/commands/init/frontmatter.js +2 -0
- package/packages/cli/dist/commands/init/index.js +4 -4
- package/packages/cli/dist/commands/init/manifest.d.ts +71 -0
- package/packages/cli/dist/commands/init/manifest.js +1 -0
- package/packages/cli/dist/commands/init/scaffold.d.ts +28 -5
- package/packages/cli/dist/commands/init/scaffold.js +1 -1
- package/packages/cli/dist/commands/init/templates.js +38 -9
- package/packages/cli/dist/commands/init/user.d.ts +1 -1
- package/packages/cli/dist/commands/init/user.js +4 -4
- package/packages/cli/dist/commands/system.js +2 -2
- package/packages/cli/dist/kb-init.js +1 -1
- package/packages/core/dist/errors.d.ts +2 -2
- package/packages/core/dist/errors.js +1 -1
- package/packages/core/dist/logger.d.ts +2 -1
- package/packages/core/dist/logger.js +1 -1
- package/packages/core/dist/types.d.ts +6 -0
- package/packages/dashboard/dist/assets/index-9ysCkze9.js +21 -0
- package/packages/dashboard/dist/assets/index-9ysCkze9.js.map +1 -0
- package/packages/dashboard/dist/assets/index-CHpVij2M.css +1 -0
- package/packages/dashboard/dist/index.html +18 -0
- package/packages/elicitation/dist/__tests__/build.test.d.ts +1 -0
- package/packages/elicitation/dist/__tests__/build.test.js +35 -0
- package/packages/elicitation/dist/__tests__/fields.test.d.ts +1 -0
- package/packages/elicitation/dist/__tests__/fields.test.js +81 -0
- package/packages/elicitation/dist/__tests__/normalize.test.d.ts +1 -0
- package/packages/elicitation/dist/__tests__/normalize.test.js +60 -0
- package/packages/elicitation/dist/build.d.ts +13 -0
- package/packages/elicitation/dist/build.js +23 -0
- package/packages/elicitation/dist/fields.d.ts +41 -0
- package/packages/elicitation/dist/fields.js +62 -0
- package/packages/elicitation/dist/index.d.ts +10 -0
- package/packages/elicitation/dist/index.js +12 -0
- package/packages/elicitation/dist/normalize.d.ts +15 -0
- package/packages/elicitation/dist/normalize.js +31 -0
- package/packages/elicitation/dist/types.d.ts +85 -0
- package/packages/elicitation/dist/types.js +8 -0
- package/packages/kb-client/dist/direct-client.d.ts +37 -0
- package/packages/kb-client/dist/direct-client.js +1 -0
- package/packages/kb-client/dist/index.d.ts +5 -0
- package/packages/kb-client/dist/index.js +1 -0
- package/packages/kb-client/dist/mcp-client.d.ts +19 -0
- package/packages/kb-client/dist/mcp-client.js +4 -0
- package/packages/kb-client/dist/parsers.d.ts +35 -0
- package/packages/kb-client/dist/parsers.js +2 -0
- package/packages/kb-client/dist/types.d.ts +62 -0
- package/packages/kb-client/dist/types.js +1 -0
- package/packages/present/dist/index.html +384 -0
- package/packages/server/dist/completions.d.ts +14 -0
- package/packages/server/dist/completions.js +1 -0
- package/packages/server/dist/config.js +1 -1
- package/packages/server/dist/dashboard-static.d.ts +27 -0
- package/packages/server/dist/dashboard-static.js +1 -0
- package/packages/server/dist/elicitor.d.ts +18 -0
- package/packages/server/dist/elicitor.js +1 -0
- package/packages/server/dist/index.js +1 -1
- package/packages/server/dist/mcp-logging.js +1 -1
- package/packages/server/dist/output-schemas.d.ts +118 -1
- package/packages/server/dist/output-schemas.js +1 -1
- package/packages/server/dist/prompts.d.ts +9 -2
- package/packages/server/dist/prompts.js +13 -6
- package/packages/server/dist/resources/curated-resources.js +1 -1
- package/packages/server/dist/resources/resource-notifier.d.ts +45 -0
- package/packages/server/dist/resources/resource-notifier.js +1 -0
- package/packages/server/dist/sampling.d.ts +41 -0
- package/packages/server/dist/sampling.js +2 -0
- package/packages/server/dist/server.d.ts +5 -2
- package/packages/server/dist/server.js +3 -1
- package/packages/server/dist/task-manager.d.ts +40 -0
- package/packages/server/dist/task-manager.js +1 -0
- package/packages/server/dist/tool-metadata.js +1 -1
- package/packages/server/dist/tool-prefix.d.ts +12 -0
- package/packages/server/dist/tool-prefix.js +1 -0
- package/packages/server/dist/tools/analyze.tools.js +4 -4
- package/packages/server/dist/tools/audit.tool.js +1 -1
- package/packages/server/dist/tools/brainstorm.tool.d.ts +7 -0
- package/packages/server/dist/tools/brainstorm.tool.js +9 -0
- package/packages/server/dist/tools/bridge.tools.js +1 -1
- package/packages/server/dist/tools/context.tools.js +9 -9
- package/packages/server/dist/tools/execution.tools.d.ts +2 -1
- package/packages/server/dist/tools/execution.tools.js +4 -3
- package/packages/server/dist/tools/forge.tools.js +10 -10
- package/packages/server/dist/tools/forget.tool.d.ts +2 -1
- package/packages/server/dist/tools/forget.tool.js +1 -1
- package/packages/server/dist/tools/graph.tool.js +2 -2
- package/packages/server/dist/tools/infra.tools.js +2 -2
- package/packages/server/dist/tools/list.tool.js +2 -2
- package/packages/server/dist/tools/lookup.tool.js +1 -1
- package/packages/server/dist/tools/manipulation.tools.js +4 -4
- package/packages/server/dist/tools/onboard.tool.js +2 -2
- package/packages/server/dist/tools/persistence.tools.js +4 -4
- package/packages/server/dist/tools/policy.tools.js +3 -2
- package/packages/server/dist/tools/present-blocks.d.ts +46 -0
- package/packages/server/dist/tools/present-blocks.js +27 -0
- package/packages/server/dist/tools/present-charts.d.ts +31 -0
- package/packages/server/dist/tools/present-charts.js +34 -0
- package/packages/server/dist/tools/present-theme.d.ts +14 -0
- package/packages/server/dist/tools/present-theme.js +395 -0
- package/packages/server/dist/tools/present-utils.d.ts +11 -0
- package/packages/server/dist/tools/present-utils.js +1 -0
- package/packages/server/dist/tools/present.tool.d.ts +7 -0
- package/packages/server/dist/tools/present.tool.js +113 -0
- package/packages/server/dist/tools/produce.tool.js +2 -2
- package/packages/server/dist/tools/read.tool.js +1 -1
- package/packages/server/dist/tools/reindex.tool.d.ts +2 -1
- package/packages/server/dist/tools/reindex.tool.js +2 -2
- package/packages/server/dist/tools/remember.tool.d.ts +2 -1
- package/packages/server/dist/tools/remember.tool.js +2 -2
- package/packages/server/dist/tools/replay.tool.js +2 -2
- package/packages/server/dist/tools/search.tool.d.ts +2 -1
- package/packages/server/dist/tools/search.tool.js +5 -4
- package/packages/server/dist/tools/status.tool.js +2 -2
- package/packages/server/dist/tools/update.tool.d.ts +2 -1
- package/packages/server/dist/tools/update.tool.js +1 -1
- package/packages/server/dist/tools/utility.tools.js +8 -8
- package/packages/store/dist/lance-store.d.ts +1 -0
- package/packages/store/dist/lance-store.js +1 -1
- package/packages/tools/dist/audit.js +1 -1
- package/packages/tools/dist/batch.js +1 -1
- package/packages/tools/dist/check.js +1 -1
- package/packages/tools/dist/checkpoint.js +1 -1
- package/packages/tools/dist/compact.js +2 -2
- package/packages/tools/dist/config-extractor.d.ts +9 -0
- package/packages/tools/dist/config-extractor.js +7 -0
- package/packages/tools/dist/dead-symbols.js +2 -2
- package/packages/tools/dist/diagram-builder.d.ts +9 -0
- package/packages/tools/dist/diagram-builder.js +9 -0
- package/packages/tools/dist/eval.js +2 -2
- package/packages/tools/dist/evidence-map.d.ts +12 -1
- package/packages/tools/dist/evidence-map.js +2 -2
- package/packages/tools/dist/file-summary.js +2 -2
- package/packages/tools/dist/find-examples.js +2 -2
- package/packages/tools/dist/forge-classify.d.ts +4 -0
- package/packages/tools/dist/forge-classify.js +1 -1
- package/packages/tools/dist/git-context.d.ts +1 -0
- package/packages/tools/dist/git-context.js +3 -3
- package/packages/tools/dist/index.d.ts +3 -2
- package/packages/tools/dist/index.js +1 -1
- package/packages/tools/dist/onboard-utils.d.ts +12 -0
- package/packages/tools/dist/onboard-utils.js +1 -0
- package/packages/tools/dist/onboard.js +2 -21
- package/packages/tools/dist/queue.js +1 -1
- package/packages/tools/dist/regex-utils.d.ts +8 -0
- package/packages/tools/dist/regex-utils.js +1 -0
- package/packages/tools/dist/rename.js +2 -2
- package/packages/tools/dist/replay.d.ts +2 -1
- package/packages/tools/dist/replay.js +4 -4
- package/packages/tools/dist/symbol.js +3 -3
- package/packages/tools/dist/synthesis-engine.d.ts +13 -0
- package/packages/tools/dist/synthesis-engine.js +6 -0
- package/packages/tools/dist/test-run.d.ts +3 -1
- package/packages/tools/dist/test-run.js +1 -1
- package/packages/tools/dist/trace.js +2 -2
- package/packages/tui/dist/App-DXY0-tlW.js +2 -0
- package/packages/tui/dist/App.d.ts +3 -3
- package/packages/tui/dist/App.js +1 -1
- package/packages/tui/dist/CuratedPanel-BIamXLNy.js +2 -0
- package/packages/tui/dist/LogPanel-D6u6o84n.js +3 -0
- package/packages/tui/dist/SearchPanel-CpJGczAc.js +2 -0
- package/packages/tui/dist/StatusPanel-BAbUxyqQ.js +2 -0
- package/packages/tui/dist/hooks/useKBClient.d.ts +9 -0
- package/packages/tui/dist/hooks/useKBClient.js +2 -0
- package/packages/tui/dist/hooks/usePolling.d.ts +8 -0
- package/packages/tui/dist/hooks/usePolling.js +2 -0
- package/packages/tui/dist/index.d.ts +6 -2
- package/packages/tui/dist/index.js +1 -1
- package/packages/tui/dist/jsx-runtime-y6Gdq5PZ.js +294 -0
- package/packages/tui/dist/panels/CuratedPanel.d.ts +1 -7
- package/packages/tui/dist/panels/CuratedPanel.js +1 -1
- package/packages/tui/dist/panels/LogPanel.js +1 -1
- package/packages/tui/dist/panels/SearchPanel.d.ts +1 -10
- package/packages/tui/dist/panels/SearchPanel.js +1 -1
- package/packages/tui/dist/panels/StatusPanel.d.ts +1 -7
- package/packages/tui/dist/panels/StatusPanel.js +1 -1
- package/packages/tui/dist/react-D__J1GQe.js +24 -0
- package/packages/tui/dist/types-VcTHNV6s.d.ts +64 -0
- package/packages/tui/dist/useKBClient-C35iA4uG.js +2 -0
- package/packages/tui/dist/usePolling-BbjnRWgx.js +2 -0
- package/scaffold/adapters/copilot.mjs +9 -81
- package/scaffold/definitions/agents.mjs +12 -0
- package/scaffold/definitions/bodies.mjs +39 -14
- package/scaffold/definitions/protocols.mjs +149 -0
- package/scaffold/definitions/tools.mjs +40 -5
- package/scaffold/general/agents/Architect-Reviewer-Alpha.agent.md +1 -1
- package/scaffold/general/agents/Architect-Reviewer-Beta.agent.md +1 -1
- package/scaffold/general/agents/Code-Reviewer-Alpha.agent.md +1 -1
- package/scaffold/general/agents/Code-Reviewer-Beta.agent.md +1 -1
- package/scaffold/general/agents/Debugger.agent.md +2 -2
- package/scaffold/general/agents/Documenter.agent.md +2 -2
- package/scaffold/general/agents/Explorer.agent.md +4 -3
- package/scaffold/general/agents/Frontend.agent.md +1 -1
- package/scaffold/general/agents/Implementer.agent.md +1 -1
- package/scaffold/general/agents/Orchestrator.agent.md +16 -1
- package/scaffold/general/agents/Planner.agent.md +11 -4
- package/scaffold/general/agents/Refactor.agent.md +1 -1
- package/scaffold/general/agents/Researcher-Alpha.agent.md +1 -1
- package/scaffold/general/agents/Researcher-Beta.agent.md +1 -1
- package/scaffold/general/agents/Researcher-Delta.agent.md +1 -1
- package/scaffold/general/agents/Researcher-Gamma.agent.md +1 -1
- package/scaffold/general/agents/Security.agent.md +10 -8
- package/scaffold/general/agents/_shared/architect-reviewer-base.md +1 -0
- package/scaffold/general/agents/_shared/code-agent-base.md +28 -0
- package/scaffold/general/agents/_shared/code-reviewer-base.md +1 -0
- package/scaffold/general/agents/_shared/forge-protocol.md +44 -0
- package/scaffold/general/agents/_shared/researcher-base.md +14 -0
- package/scaffold/general/agents/templates/adr-template.md +1 -0
- package/scaffold/general/agents/templates/execution-state.md +1 -0
- package/skills/knowledge-base/SKILL.md +19 -6
- package/skills/present/SKILL.md +153 -0
- package/packages/server/dist/tools/toolkit.tools.d.ts +0 -36
- package/packages/server/dist/tools/toolkit.tools.js +0 -20
- package/packages/tui/dist/App-DE_tdOhs.js +0 -2
- package/packages/tui/dist/CuratedPanel-sYdZAICX.js +0 -2
- package/packages/tui/dist/LogPanel-Ce3jMQbH.js +0 -3
- package/packages/tui/dist/SearchPanel-DREo6zgt.js +0 -2
- package/packages/tui/dist/StatusPanel-2ex8fLOO.js +0 -2
- package/packages/tui/dist/embedder.interface-IFCBpOlX.d.ts +0 -28
- package/packages/tui/dist/index-C8NmOF18.d.ts +0 -13
- package/packages/tui/dist/jsx-runtime-Cof-kwFn.js +0 -316
- package/packages/tui/dist/store.interface-CnY6SPOH.d.ts +0 -150
- /package/packages/tui/dist/{devtools-DUyj952l.js → devtools-DMOZMn70.js} +0 -0
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
|
-
//#region packages/core/dist/types.d.ts
|
|
3
|
-
//#region packages/core/src/types.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Core types for the MCP Knowledge Base system.
|
|
6
|
-
*/
|
|
7
|
-
/** The origin of a knowledge record — how it was created */
|
|
8
|
-
declare const KNOWLEDGE_ORIGINS: readonly ["indexed", "curated", "produced"];
|
|
9
|
-
type KnowledgeOrigin = (typeof KNOWLEDGE_ORIGINS)[number];
|
|
10
|
-
/** Coarse source classification derived from ContentType */
|
|
11
|
-
declare const SOURCE_TYPES: readonly ["source", "documentation", "test", "config", "generated"];
|
|
12
|
-
type SourceType = (typeof SOURCE_TYPES)[number];
|
|
13
|
-
/** Content type classification */
|
|
14
|
-
declare const CONTENT_TYPES: readonly ["documentation", "code-typescript", "code-javascript", "code-python", "code-other", "config-json", "config-yaml", "config-toml", "config-env", "test-code", "cdk-stack", "markdown", "curated-knowledge", "produced-knowledge", "unknown"];
|
|
15
|
-
type ContentType = (typeof CONTENT_TYPES)[number];
|
|
16
|
-
/** A single knowledge record stored in the vector DB */
|
|
17
|
-
interface KnowledgeRecord {
|
|
18
|
-
/** Unique identifier (deterministic hash of source + chunk index) */
|
|
19
|
-
id: string;
|
|
20
|
-
/** The text content of this chunk */
|
|
21
|
-
content: string;
|
|
22
|
-
/** Source file path relative to workspace root */
|
|
23
|
-
sourcePath: string;
|
|
24
|
-
/** Content type classification */
|
|
25
|
-
contentType: ContentType;
|
|
26
|
-
/** Heading path for markdown (e.g., "## Setup > ### Prerequisites") */
|
|
27
|
-
headingPath?: string;
|
|
28
|
-
/** Zero-based chunk index within the source file */
|
|
29
|
-
chunkIndex: number;
|
|
30
|
-
/** Total number of chunks from this source file */
|
|
31
|
-
totalChunks: number;
|
|
32
|
-
/** Start line in source file (1-based) */
|
|
33
|
-
startLine: number;
|
|
34
|
-
/** End line in source file (1-based) */
|
|
35
|
-
endLine: number;
|
|
36
|
-
/** File hash for incremental indexing */
|
|
37
|
-
fileHash: string;
|
|
38
|
-
/** ISO timestamp when this record was created/updated */
|
|
39
|
-
indexedAt: string;
|
|
40
|
-
/** How this record was created */
|
|
41
|
-
origin: KnowledgeOrigin;
|
|
42
|
-
/** User-defined tags for categorization */
|
|
43
|
-
tags: string[];
|
|
44
|
-
/** Category for curated/produced knowledge */
|
|
45
|
-
category?: string;
|
|
46
|
-
/** Version number for curated knowledge updates */
|
|
47
|
-
version: number;
|
|
48
|
-
}
|
|
49
|
-
/** A raw chunk produced by a chunker before embedding */
|
|
50
|
-
/** Search result returned by the store */
|
|
51
|
-
interface SearchResult {
|
|
52
|
-
/** The matching knowledge record */
|
|
53
|
-
record: KnowledgeRecord;
|
|
54
|
-
/** Similarity score (0-1, higher = more similar) */
|
|
55
|
-
score: number;
|
|
56
|
-
}
|
|
57
|
-
/** Configuration loaded from kb.config.json */
|
|
58
|
-
interface KBConfig {
|
|
59
|
-
/** MCP server name. Defaults to 'kb'. */
|
|
60
|
-
serverName?: string;
|
|
61
|
-
sources: Array<{
|
|
62
|
-
path: string;
|
|
63
|
-
excludePatterns: string[];
|
|
64
|
-
}>;
|
|
65
|
-
indexing: {
|
|
66
|
-
chunkSize: number;
|
|
67
|
-
chunkOverlap: number;
|
|
68
|
-
minChunkSize: number; /** Max files processed concurrently. Defaults to half of available CPU cores. */
|
|
69
|
-
concurrency?: number;
|
|
70
|
-
};
|
|
71
|
-
embedding: {
|
|
72
|
-
model: string;
|
|
73
|
-
dimensions: number;
|
|
74
|
-
};
|
|
75
|
-
store: {
|
|
76
|
-
backend: string;
|
|
77
|
-
path: string;
|
|
78
|
-
};
|
|
79
|
-
curated: {
|
|
80
|
-
path: string;
|
|
81
|
-
};
|
|
82
|
-
/** Enterprise RAG bridge configuration (optional) */
|
|
83
|
-
er?: {
|
|
84
|
-
/** Whether ER integration is enabled */enabled: boolean; /** Base URL of the ER API (e.g., https://xxx.execute-api.region.amazonaws.com/prod) */
|
|
85
|
-
baseUrl: string; /** Request timeout in milliseconds. Defaults to 5000. */
|
|
86
|
-
timeoutMs?: number; /** Cache TTL in milliseconds. Defaults to 21600000 (6 hours). */
|
|
87
|
-
cacheTtlMs?: number; /** Maximum cache entries. Defaults to 100. */
|
|
88
|
-
cacheMaxEntries?: number; /** Vector similarity threshold below which ER fallback triggers. Defaults to 0.45. */
|
|
89
|
-
fallbackThreshold?: number;
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
/** Index statistics */
|
|
93
|
-
interface IndexStats {
|
|
94
|
-
totalRecords: number;
|
|
95
|
-
totalFiles: number;
|
|
96
|
-
contentTypeBreakdown: Record<string, number>;
|
|
97
|
-
lastIndexedAt: string | null;
|
|
98
|
-
storeBackend: string;
|
|
99
|
-
embeddingModel: string;
|
|
100
|
-
} //#endregion
|
|
101
|
-
//#endregion
|
|
102
|
-
//#region packages/store/dist/store.interface.d.ts
|
|
103
|
-
//#region packages/store/src/store.interface.d.ts
|
|
104
|
-
/** Options for searching the store */
|
|
105
|
-
interface SearchOptions {
|
|
106
|
-
/** Maximum number of results to return */
|
|
107
|
-
limit?: number;
|
|
108
|
-
/** Minimum similarity score (0-1) */
|
|
109
|
-
minScore?: number;
|
|
110
|
-
/** Filter by content type */
|
|
111
|
-
contentType?: ContentType;
|
|
112
|
-
/** Filter by coarse source type (source, documentation, test, config, generated) */
|
|
113
|
-
sourceType?: SourceType;
|
|
114
|
-
/** Filter by origin */
|
|
115
|
-
origin?: KnowledgeOrigin;
|
|
116
|
-
/** Filter by category */
|
|
117
|
-
category?: string;
|
|
118
|
-
/** Filter by tags (any match) */
|
|
119
|
-
tags?: string[];
|
|
120
|
-
}
|
|
121
|
-
interface IKnowledgeStore {
|
|
122
|
-
/** Initialize the store (create tables, etc.) */
|
|
123
|
-
initialize(): Promise<void>;
|
|
124
|
-
/** Add or update records with their embedding vectors */
|
|
125
|
-
upsert(records: KnowledgeRecord[], vectors: Float32Array[]): Promise<void>;
|
|
126
|
-
/** Search by vector similarity */
|
|
127
|
-
search(queryVector: Float32Array, options?: SearchOptions): Promise<SearchResult[]>;
|
|
128
|
-
/** Get a specific record by ID */
|
|
129
|
-
getById(id: string): Promise<KnowledgeRecord | null>;
|
|
130
|
-
/** Delete records by source path (used during re-indexing) */
|
|
131
|
-
deleteBySourcePath(sourcePath: string): Promise<number>;
|
|
132
|
-
/** Delete a specific record by ID */
|
|
133
|
-
deleteById(id: string): Promise<boolean>;
|
|
134
|
-
/** Get all records for a source path */
|
|
135
|
-
getBySourcePath(sourcePath: string): Promise<KnowledgeRecord[]>;
|
|
136
|
-
/** Get index statistics */
|
|
137
|
-
getStats(): Promise<IndexStats>;
|
|
138
|
-
/** List all unique source paths in the store */
|
|
139
|
-
listSourcePaths(): Promise<string[]>;
|
|
140
|
-
/** Create a full-text search index on the content column for keyword search */
|
|
141
|
-
createFtsIndex(): Promise<void>;
|
|
142
|
-
/** Full-text keyword search (requires FTS index) */
|
|
143
|
-
ftsSearch(query: string, options?: SearchOptions): Promise<SearchResult[]>;
|
|
144
|
-
/** Drop the backing table entirely — used for hard resets (e.g. dimension changes) */
|
|
145
|
-
dropTable(): Promise<void>;
|
|
146
|
-
/** Close the store connection */
|
|
147
|
-
close(): Promise<void>;
|
|
148
|
-
} //#endregion
|
|
149
|
-
//#endregion
|
|
150
|
-
export { KBConfig as n, IKnowledgeStore as t };
|
|
File without changes
|