kirograph 0.20.0 → 0.22.0
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 +4 -3
- package/dist/bin/commands/data.js +52 -0
- package/dist/bin/commands/data.js.map +2 -2
- package/dist/bin/commands/docs.js +2 -1
- package/dist/bin/commands/docs.js.map +2 -2
- package/dist/bin/commands/gain.js +21 -1
- package/dist/bin/commands/gain.js.map +2 -2
- package/dist/bin/commands/status.js +23 -1
- package/dist/bin/commands/status.js.map +2 -2
- package/dist/bin/installer/config-prompt.js +30 -1
- package/dist/bin/installer/config-prompt.js.map +2 -2
- package/dist/bin/installer/index.js +137 -0
- package/dist/bin/installer/index.js.map +2 -2
- package/dist/bin/kirograph.js +1 -1
- package/dist/config.js +19 -2
- package/dist/config.js.map +2 -2
- package/dist/core/pipeline.js +3 -1
- package/dist/core/pipeline.js.map +2 -2
- package/dist/data/indexer.js +4 -4
- package/dist/data/indexer.js.map +2 -2
- package/dist/data/linker.js +9 -5
- package/dist/data/linker.js.map +2 -2
- package/dist/data/linker.test.js +60 -0
- package/dist/data/linker.test.js.map +7 -0
- package/dist/data/parsers/__fixtures__/pdf-inspector-stub.js +41 -0
- package/dist/data/parsers/__fixtures__/pdf-inspector-stub.js.map +7 -0
- package/dist/data/parsers/index.js +3 -1
- package/dist/data/parsers/index.js.map +2 -2
- package/dist/data/parsers/pdf.js +95 -0
- package/dist/data/parsers/pdf.js.map +7 -0
- package/dist/data/parsers/pdf.test.js +125 -0
- package/dist/data/parsers/pdf.test.js.map +7 -0
- package/dist/data/queries.js +39 -2
- package/dist/data/queries.js.map +2 -2
- package/dist/data/types.js.map +1 -1
- package/dist/db/data-schema.sql +2 -1
- package/dist/db/database.js +7 -0
- package/dist/db/database.js.map +2 -2
- package/dist/docs/indexer.js +2 -1
- package/dist/docs/indexer.js.map +2 -2
- package/dist/docs/queries.js +2 -1
- package/dist/docs/queries.js.map +2 -2
- package/dist/docs/vectors.js +46 -5
- package/dist/docs/vectors.js.map +2 -2
- package/dist/extraction/extractor.js +26 -3
- package/dist/extraction/extractor.js.map +2 -2
- package/dist/extraction/grammars.js +1 -0
- package/dist/extraction/grammars.js.map +2 -2
- package/dist/extraction/languages.js +5 -1
- package/dist/extraction/languages.js.map +2 -2
- package/dist/index.js +1 -0
- package/dist/index.js.map +2 -2
- package/dist/mcp/tools.js +1 -1
- package/dist/mcp/tools.js.map +2 -2
- package/dist/memory/index.js +2 -1
- package/dist/memory/index.js.map +2 -2
- package/dist/memory/vectors.js +52 -8
- package/dist/memory/vectors.js.map +3 -3
- package/dist/patterns/library/code-eval-elixir.yaml +11 -0
- package/dist/patterns/library/command-injection-c.yaml +11 -0
- package/dist/patterns/library/command-injection-go.yaml +21 -3
- package/dist/patterns/library/command-injection-kotlin.yaml +10 -0
- package/dist/patterns/library/command-injection-php.yaml +11 -0
- package/dist/patterns/library/command-injection-ruby.yaml +11 -0
- package/dist/patterns/library/command-injection-rust.yaml +11 -0
- package/dist/patterns/library/dangerous-eval-bash.yaml +11 -0
- package/dist/patterns/library/dangerous-eval-php.yaml +11 -0
- package/dist/patterns/library/dangerous-eval-ruby.yaml +11 -0
- package/dist/patterns/library/dynamic-load-lua.yaml +10 -0
- package/dist/patterns/library/os-cmd-elixir.yaml +16 -0
- package/dist/patterns/library/os-execute-lua.yaml +10 -0
- package/dist/patterns/library/path-traversal-go.yaml +4 -4
- package/dist/patterns/library/process-launch-swift.yaml +11 -0
- package/dist/patterns/library/process-run-dart.yaml +15 -0
- package/dist/patterns/library/source-injection-bash.yaml +11 -0
- package/dist/patterns/library/sql-injection-dart.yaml +9 -0
- package/dist/patterns/library/sql-injection-kotlin.yaml +11 -0
- package/dist/patterns/library/sql-injection-php.yaml +9 -0
- package/dist/patterns/library/sql-injection-swift.yaml +11 -0
- package/dist/patterns/library/subshell-injection-ruby.yaml +8 -0
- package/dist/patterns/library/unsafe-block-rust.yaml +8 -0
- package/dist/patterns/library/unsafe-string-c.yaml +11 -0
- package/dist/patterns/runner.js +45 -27
- package/dist/patterns/runner.js.map +2 -2
- package/dist/security/integrator.js +8 -8
- package/dist/security/integrator.js.map +2 -2
- package/dist/types.js.map +2 -2
- package/dist/vectors/index.js +66 -3
- package/dist/vectors/index.js.map +2 -2
- package/dist/vectors/turboquant-index.js +261 -0
- package/dist/vectors/turboquant-index.js.map +7 -0
- package/dist/vectors/turbovec-index.js +189 -0
- package/dist/vectors/turbovec-index.js.map +7 -0
- package/package.json +26 -1
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var turbovec_index_exports = {};
|
|
30
|
+
__export(turbovec_index_exports, {
|
|
31
|
+
TurboVecIndex: () => TurboVecIndex
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(turbovec_index_exports);
|
|
34
|
+
var path = __toESM(require("path"));
|
|
35
|
+
var fs = __toESM(require("fs"));
|
|
36
|
+
var import_errors = require("../errors");
|
|
37
|
+
class TurboVecIndex {
|
|
38
|
+
constructor(kirographDir, binName, dim, bits = 4) {
|
|
39
|
+
this.kirographDir = kirographDir;
|
|
40
|
+
this.binName = binName;
|
|
41
|
+
this.dim = dim;
|
|
42
|
+
this.bits = bits;
|
|
43
|
+
this.index = null;
|
|
44
|
+
this._available = false;
|
|
45
|
+
}
|
|
46
|
+
isAvailable() {
|
|
47
|
+
return this._available;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Load the native addon and restore the index from disk if the bin file
|
|
51
|
+
* exists. Silent no-op when the addon is not built.
|
|
52
|
+
*/
|
|
53
|
+
async initialize() {
|
|
54
|
+
if (this._available) return;
|
|
55
|
+
let TVModule;
|
|
56
|
+
try {
|
|
57
|
+
TVModule = require("turbovec-node");
|
|
58
|
+
} catch {
|
|
59
|
+
(0, import_errors.logDebug)("TurboVecIndex: turbovec-node not found \u2014 run: cd native/turbovec-node && npm install && npm run build");
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const TurboVecIndexClass = TVModule?.TurboVecIndex ?? TVModule?.default?.TurboVecIndex ?? null;
|
|
63
|
+
if (!TurboVecIndexClass || typeof TurboVecIndexClass !== "function") {
|
|
64
|
+
(0, import_errors.logWarn)("TurboVecIndex: unrecognised turbovec-node module shape \u2014 turbovec engine unavailable");
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (this.dim <= 0 || this.dim % 8 !== 0) {
|
|
68
|
+
(0, import_errors.logWarn)("TurboVecIndex: dim must be a positive multiple of 8", { dim: this.dim });
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const binPath = path.join(this.kirographDir, this.binName);
|
|
72
|
+
try {
|
|
73
|
+
if (fs.existsSync(binPath) && typeof TurboVecIndexClass.load === "function") {
|
|
74
|
+
this.index = TurboVecIndexClass.load(binPath);
|
|
75
|
+
(0, import_errors.logDebug)("TurboVecIndex: restored from disk", { binPath });
|
|
76
|
+
} else {
|
|
77
|
+
this.index = new TurboVecIndexClass(this.dim, this.bits);
|
|
78
|
+
(0, import_errors.logDebug)("TurboVecIndex: new index", { dim: this.dim, bits: this.bits });
|
|
79
|
+
}
|
|
80
|
+
this._available = true;
|
|
81
|
+
} catch (err) {
|
|
82
|
+
(0, import_errors.logError)("TurboVecIndex: initialization failed", { error: String(err) });
|
|
83
|
+
this._available = false;
|
|
84
|
+
this.index = null;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/** Insert or update a vector. */
|
|
88
|
+
upsert(id, vec) {
|
|
89
|
+
if (!this._available || !this.index) return;
|
|
90
|
+
try {
|
|
91
|
+
this.index.add(id, vec);
|
|
92
|
+
} catch (err) {
|
|
93
|
+
(0, import_errors.logWarn)("TurboVecIndex: upsert failed", { id, error: String(err) });
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/** Remove a vector from the index. */
|
|
97
|
+
delete(id) {
|
|
98
|
+
if (!this._available || !this.index) return;
|
|
99
|
+
try {
|
|
100
|
+
this.index.remove(id);
|
|
101
|
+
} catch (err) {
|
|
102
|
+
(0, import_errors.logWarn)("TurboVecIndex: delete failed", { id, error: String(err) });
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/** ANN search — returns IDs sorted by descending similarity. */
|
|
106
|
+
search(queryVec, topN = 10) {
|
|
107
|
+
return this.searchWithScores(queryVec, topN).map((r) => r.id);
|
|
108
|
+
}
|
|
109
|
+
/** ANN search — returns [{id, score}] sorted by descending similarity. */
|
|
110
|
+
searchWithScores(queryVec, topN = 10) {
|
|
111
|
+
if (!this._available || !this.index) return [];
|
|
112
|
+
try {
|
|
113
|
+
const results = this.index.search(queryVec, topN);
|
|
114
|
+
return results.slice(0, topN);
|
|
115
|
+
} catch (err) {
|
|
116
|
+
(0, import_errors.logWarn)("TurboVecIndex: search failed", { error: String(err) });
|
|
117
|
+
return [];
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Persist the index to disk atomically.
|
|
122
|
+
* Saves `<binName>` (turbovec binary) and `<binName>.ids` (JSON string-ID sidecar).
|
|
123
|
+
*/
|
|
124
|
+
async save() {
|
|
125
|
+
if (!this._available || !this.index) return;
|
|
126
|
+
const binPath = path.join(this.kirographDir, this.binName);
|
|
127
|
+
const tmpBin = binPath + ".tmp";
|
|
128
|
+
try {
|
|
129
|
+
this.index.save(tmpBin);
|
|
130
|
+
if (fs.existsSync(tmpBin)) {
|
|
131
|
+
fs.renameSync(tmpBin, binPath);
|
|
132
|
+
}
|
|
133
|
+
const tmpIds = tmpBin + ".ids";
|
|
134
|
+
if (fs.existsSync(tmpIds)) {
|
|
135
|
+
fs.renameSync(tmpIds, binPath + ".ids");
|
|
136
|
+
}
|
|
137
|
+
(0, import_errors.logDebug)("TurboVecIndex: saved", { binPath });
|
|
138
|
+
} catch (err) {
|
|
139
|
+
(0, import_errors.logWarn)("TurboVecIndex: save failed", { error: String(err) });
|
|
140
|
+
for (const f of [tmpBin, tmpBin + ".ids"]) {
|
|
141
|
+
try {
|
|
142
|
+
fs.unlinkSync(f);
|
|
143
|
+
} catch {
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
/** Compression stats (formula-based, mirrors turboquant-index.ts). */
|
|
149
|
+
memoryStats() {
|
|
150
|
+
const n = this.count();
|
|
151
|
+
const rawBytes = n * this.dim * 4;
|
|
152
|
+
const actualBytes = Math.ceil(n * this.dim * this.bits / 8);
|
|
153
|
+
return {
|
|
154
|
+
totalBits: actualBytes * 8,
|
|
155
|
+
bitsPerVector: this.bits * this.dim,
|
|
156
|
+
compressionRatio: actualBytes > 0 ? rawBytes / actualBytes : 1,
|
|
157
|
+
actualBytes
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
count() {
|
|
161
|
+
if (!this._available || !this.index) return 0;
|
|
162
|
+
try {
|
|
163
|
+
return typeof this.index.len === "function" ? this.index.len() : 0;
|
|
164
|
+
} catch {
|
|
165
|
+
return 0;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
getEmbeddedIds() {
|
|
169
|
+
if (!this._available || !this.index) return [];
|
|
170
|
+
try {
|
|
171
|
+
return typeof this.index.getIds === "function" ? this.index.getIds() : [];
|
|
172
|
+
} catch {
|
|
173
|
+
return [];
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
close() {
|
|
177
|
+
try {
|
|
178
|
+
this.index?.close();
|
|
179
|
+
} catch {
|
|
180
|
+
}
|
|
181
|
+
this.index = null;
|
|
182
|
+
this._available = false;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
186
|
+
0 && (module.exports = {
|
|
187
|
+
TurboVecIndex
|
|
188
|
+
});
|
|
189
|
+
//# sourceMappingURL=turbovec-index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/vectors/turbovec-index.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * KiroGraph TurboVec ANN Index\n *\n * Wraps turbovec-node (napi-rs bindings for RyanCodrai/turbovec) as a\n * drop-in ANN index. Uses the same TurboQuant algorithm as turboquant-js\n * but backed by a Rust/SIMD implementation \u2014 NEON on ARM, AVX-512BW on\n * x86 \u2014 and supports 2, 3, or 4 bits per coordinate.\n *\n * Build the native addon once before use:\n * cd native/turbovec-node && npm install && npm run build\n *\n * Requires: Rust toolchain (rustup), plus openblas on Linux.\n * On macOS the Accelerate framework is used automatically (no extra dep).\n *\n * Falls back silently to cosine if turbovec-node is not built/installed.\n *\n * dim constraint: must be a positive multiple of 8 (768 \u2713, 384 \u2713).\n * bit_width: 2 (highest compression), 3 (balanced), 4 (highest quality).\n *\n * Upstream: https://github.com/RyanCodrai/turbovec\n */\n\nimport * as path from 'path';\nimport * as fs from 'fs';\nimport { logDebug, logWarn, logError } from '../errors';\n\n// \u2500\u2500 TurboVecIndex \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport class TurboVecIndex {\n private index: any = null;\n private _available = false;\n\n constructor(\n private readonly kirographDir: string,\n private readonly binName: string,\n private readonly dim: number,\n private readonly bits: number = 4,\n ) {}\n\n isAvailable(): boolean {\n return this._available;\n }\n\n /**\n * Load the native addon and restore the index from disk if the bin file\n * exists. Silent no-op when the addon is not built.\n */\n async initialize(): Promise<void> {\n if (this._available) return;\n\n let TVModule: any;\n try {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n TVModule = require('turbovec-node');\n } catch {\n logDebug('TurboVecIndex: turbovec-node not found \u2014 run: cd native/turbovec-node && npm install && npm run build');\n return;\n }\n\n const TurboVecIndexClass =\n TVModule?.TurboVecIndex ??\n TVModule?.default?.TurboVecIndex ??\n null;\n\n if (!TurboVecIndexClass || typeof TurboVecIndexClass !== 'function') {\n logWarn('TurboVecIndex: unrecognised turbovec-node module shape \u2014 turbovec engine unavailable');\n return;\n }\n\n // turbovec requires dim to be a positive multiple of 8\n if (this.dim <= 0 || this.dim % 8 !== 0) {\n logWarn('TurboVecIndex: dim must be a positive multiple of 8', { dim: this.dim });\n return;\n }\n\n const binPath = path.join(this.kirographDir, this.binName);\n\n try {\n if (fs.existsSync(binPath) && typeof TurboVecIndexClass.load === 'function') {\n this.index = TurboVecIndexClass.load(binPath);\n logDebug('TurboVecIndex: restored from disk', { binPath });\n } else {\n this.index = new TurboVecIndexClass(this.dim, this.bits);\n logDebug('TurboVecIndex: new index', { dim: this.dim, bits: this.bits });\n }\n this._available = true;\n } catch (err) {\n logError('TurboVecIndex: initialization failed', { error: String(err) });\n this._available = false;\n this.index = null;\n }\n }\n\n /** Insert or update a vector. */\n upsert(id: string, vec: Float32Array): void {\n if (!this._available || !this.index) return;\n try {\n this.index.add(id, vec);\n } catch (err) {\n logWarn('TurboVecIndex: upsert failed', { id, error: String(err) });\n }\n }\n\n /** Remove a vector from the index. */\n delete(id: string): void {\n if (!this._available || !this.index) return;\n try {\n this.index.remove(id);\n } catch (err) {\n logWarn('TurboVecIndex: delete failed', { id, error: String(err) });\n }\n }\n\n /** ANN search \u2014 returns IDs sorted by descending similarity. */\n search(queryVec: Float32Array, topN = 10): string[] {\n return this.searchWithScores(queryVec, topN).map(r => r.id);\n }\n\n /** ANN search \u2014 returns [{id, score}] sorted by descending similarity. */\n searchWithScores(queryVec: Float32Array, topN = 10): Array<{ id: string; score: number }> {\n if (!this._available || !this.index) return [];\n try {\n const results: Array<{ id: string; score: number }> = this.index.search(queryVec, topN);\n return results.slice(0, topN);\n } catch (err) {\n logWarn('TurboVecIndex: search failed', { error: String(err) });\n return [];\n }\n }\n\n /**\n * Persist the index to disk atomically.\n * Saves `<binName>` (turbovec binary) and `<binName>.ids` (JSON string-ID sidecar).\n */\n async save(): Promise<void> {\n if (!this._available || !this.index) return;\n\n const binPath = path.join(this.kirographDir, this.binName);\n const tmpBin = binPath + '.tmp';\n\n try {\n this.index.save(tmpBin);\n // Rust saves to `tmpBin` and `tmpBin + \".ids\"` \u2014 atomically rename both\n if (fs.existsSync(tmpBin)) {\n fs.renameSync(tmpBin, binPath);\n }\n const tmpIds = tmpBin + '.ids';\n if (fs.existsSync(tmpIds)) {\n fs.renameSync(tmpIds, binPath + '.ids');\n }\n logDebug('TurboVecIndex: saved', { binPath });\n } catch (err) {\n logWarn('TurboVecIndex: save failed', { error: String(err) });\n for (const f of [tmpBin, tmpBin + '.ids']) {\n try { fs.unlinkSync(f); } catch { /* ignore */ }\n }\n }\n }\n\n /** Compression stats (formula-based, mirrors turboquant-index.ts). */\n memoryStats(): { totalBits: number; bitsPerVector: number; compressionRatio: number; actualBytes: number } {\n const n = this.count();\n const rawBytes = n * this.dim * 4;\n const actualBytes = Math.ceil(n * this.dim * this.bits / 8);\n return {\n totalBits: actualBytes * 8,\n bitsPerVector: this.bits * this.dim,\n compressionRatio: actualBytes > 0 ? rawBytes / actualBytes : 1,\n actualBytes,\n };\n }\n\n count(): number {\n if (!this._available || !this.index) return 0;\n try {\n return typeof this.index.len === 'function' ? (this.index.len() as number) : 0;\n } catch { return 0; }\n }\n\n getEmbeddedIds(): string[] {\n if (!this._available || !this.index) return [];\n try {\n return typeof this.index.getIds === 'function' ? (this.index.getIds() as string[]) : [];\n } catch { return []; }\n }\n\n close(): void {\n try { this.index?.close(); } catch { /* ignore */ }\n this.index = null;\n this._available = false;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBA,WAAsB;AACtB,SAAoB;AACpB,oBAA4C;AAIrC,MAAM,cAAc;AAAA,EAIzB,YACmB,cACA,SACA,KACA,OAAe,GAChC;AAJiB;AACA;AACA;AACA;AAPnB,SAAQ,QAAa;AACrB,SAAQ,aAAa;AAAA,EAOlB;AAAA,EAEH,cAAuB;AACrB,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,aAA4B;AAChC,QAAI,KA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A,QAAG,QAAQ;AAAA,QAAe;AAAA,MACjD;AAAA,IACF;AAAA,EACF;AAAA;AAAA,EAGA,cAA2G;AACzG,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,WAAW,IAAI,KAAK,MAAM;AAChC,UAAM,cAAc,KAAK,KAAK,IAAI,KAAK,MAAM,KAAK,OAAO,CAAC;AAC1D,WAAO;AAAA,MACL,WAAW,cAAc;AAAA,MACzB,eAAe,KAAK,OAAO,KAAK;AAAA,MAChC,kBAAkB,cAAc,IAAI,WAAW,cAAc;AAAA,MAC7D;AAAA,IACF;AAAA,EACF;AAAA,EAEA,QAAgB;AACd,QAAI,CAAC,KAAK,cAAc,CAAC,KAAK,MAAO,QAAO;AAC5C,QAAI;AACF,aAAO,OAAO,KAAK,MAAM,QAAQ,aAAc,KAAK,MAAM,IAAI,IAAe;AAAA,IAC/E,QAAQ;AAAE,aAAO;AAAA,IAAG;AAAA,EACtB;AAAA,EAEA,iBAA2B;AACzB,QAAI,CAAC,KAAK,cAAc,CAAC,KAAK,MAAO,QAAO,CAAC;AAC7C,QAAI;AACF,aAAO,OAAO,KAAK,MAAM,WAAW,aAAc,KAAK,MAAM,OAAO,IAAiB,CAAC;AAAA,IACxF,QAAQ;AAAE,aAAO,CAAC;AAAA,IAAG;AAAA,EACvB;AAAA,EAEA,QAAc;AACZ,QAAI;AAAE,WAAK,OAAO,MAAM;AAAA,IAAG,QAAQ;AAAA,IAAe;AAClD,SAAK,QAAQ;AACb,SAAK,aAAa;AAAA,EACpB;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kirograph",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Semantic code knowledge graph for Kiro: fewer tool calls, instant symbol lookups, 100% local.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
"test": "vitest --run",
|
|
20
20
|
"test:watchmen": "bash scripts/watchmen/test.sh",
|
|
21
21
|
"test:watchmen:skip-llm": "bash scripts/watchmen/test.sh --skip-llm",
|
|
22
|
+
"test:patterns": "bash scripts/patterns/test.sh",
|
|
23
|
+
"test:sec": "bash scripts/sec/test.sh",
|
|
24
|
+
"test:turboquant": "bash scripts/turboquant/test.sh",
|
|
25
|
+
"test:turbovec": "bash scripts/turbovec/test.sh",
|
|
26
|
+
"test:data": "bash scripts/data/test.sh",
|
|
22
27
|
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
23
28
|
"release": "./scripts/release.sh",
|
|
24
29
|
"docs": "npx serve docs"
|
|
@@ -43,8 +48,26 @@
|
|
|
43
48
|
"xlsx": "^0.18.5"
|
|
44
49
|
},
|
|
45
50
|
"optionalDependencies": {
|
|
51
|
+
"@ast-grep/lang-bash": "^0.0.8",
|
|
52
|
+
"@ast-grep/lang-c": "^0.0.6",
|
|
53
|
+
"@ast-grep/lang-cpp": "^0.0.6",
|
|
54
|
+
"@ast-grep/lang-csharp": "^0.0.6",
|
|
55
|
+
"@ast-grep/lang-dart": "^0.0.7",
|
|
56
|
+
"@ast-grep/lang-elixir": "^0.0.7",
|
|
57
|
+
"@ast-grep/lang-go": "^0.0.6",
|
|
58
|
+
"@ast-grep/lang-haskell": "^0.0.7",
|
|
59
|
+
"@ast-grep/lang-java": "^0.0.7",
|
|
60
|
+
"@ast-grep/lang-kotlin": "^0.0.7",
|
|
61
|
+
"@ast-grep/lang-lua": "^0.0.7",
|
|
62
|
+
"@ast-grep/lang-php": "^0.0.7",
|
|
63
|
+
"@ast-grep/lang-python": "^0.0.6",
|
|
64
|
+
"@ast-grep/lang-ruby": "^0.0.7",
|
|
65
|
+
"@ast-grep/lang-rust": "^0.0.7",
|
|
66
|
+
"@ast-grep/lang-scala": "^0.0.7",
|
|
67
|
+
"@ast-grep/lang-swift": "^0.0.8",
|
|
46
68
|
"@ast-grep/napi": "^0.43.0",
|
|
47
69
|
"@electric-sql/pglite": "^0.2.17",
|
|
70
|
+
"@firecrawl/pdf-inspector": "^1.9.5",
|
|
48
71
|
"@lancedb/lancedb": "^0.27.2",
|
|
49
72
|
"@orama/orama": "^3.1.18",
|
|
50
73
|
"@orama/plugin-data-persistence": "^3.1.18",
|
|
@@ -52,6 +75,8 @@
|
|
|
52
75
|
"better-sqlite3": "^11.10.0",
|
|
53
76
|
"qdrant-local": "^0.0.0-alpha.10",
|
|
54
77
|
"sqlite-vec": "^0.1.9",
|
|
78
|
+
"turboquant-js": "^0.2.0",
|
|
79
|
+
"turbovec-node": "file:native/turbovec-node",
|
|
55
80
|
"typesense": "^3.0.6"
|
|
56
81
|
},
|
|
57
82
|
"devDependencies": {
|