@chiway/contextweaver 1.1.0 → 1.4.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.
@@ -0,0 +1,377 @@
1
+ // src/vectorStore/index.ts
2
+ import fs from "fs";
3
+ import os from "os";
4
+ import path from "path";
5
+ import * as lancedb from "@lancedb/lancedb";
6
+ var BASE_DIR = path.join(os.homedir(), ".contextweaver");
7
+ function sampleCheckDisplayCode(oldRows, getContent, options = {}) {
8
+ const sampleSize = options.sampleSize ?? 100;
9
+ const maxMismatchRatio = options.maxMismatchRatio ?? 0.01;
10
+ if (oldRows.length === 0) {
11
+ return { abort: false, sampled: 0, mismatched: 0, ratio: 0 };
12
+ }
13
+ const indices = [];
14
+ const step = Math.max(1, Math.floor(oldRows.length / sampleSize));
15
+ for (let i = 0; i < oldRows.length && indices.length < sampleSize; i += step) {
16
+ indices.push(i);
17
+ }
18
+ let sampled = 0;
19
+ let mismatched = 0;
20
+ for (const idx of indices) {
21
+ const r = oldRows[idx];
22
+ const content = getContent(r.file_path);
23
+ if (content === null) continue;
24
+ sampled++;
25
+ const safeStart = Math.max(0, Math.min(r.start_index, content.length));
26
+ const safeEnd = Math.max(safeStart, Math.min(r.end_index, content.length));
27
+ const expected = content.slice(safeStart, safeEnd);
28
+ if (expected !== r.display_code) {
29
+ mismatched++;
30
+ }
31
+ }
32
+ const ratio = sampled > 0 ? mismatched / sampled : 0;
33
+ return { abort: ratio > maxMismatchRatio, sampled, mismatched, ratio };
34
+ }
35
+ var VectorStore = class {
36
+ db = null;
37
+ table = null;
38
+ projectId;
39
+ dbPath;
40
+ vectorDim;
41
+ constructor(projectId, vectorDim = 1024, dbPathOverride) {
42
+ this.projectId = projectId;
43
+ this.dbPath = dbPathOverride ?? path.join(BASE_DIR, projectId, "vectors.lance");
44
+ this.vectorDim = vectorDim;
45
+ }
46
+ /**
47
+ * 初始化连接
48
+ */
49
+ async init() {
50
+ if (this.db) return;
51
+ const parent = path.dirname(this.dbPath);
52
+ if (!fs.existsSync(parent)) {
53
+ fs.mkdirSync(parent, { recursive: true });
54
+ }
55
+ this.db = await lancedb.connect(this.dbPath);
56
+ const tableNames = await this.db.tableNames();
57
+ if (tableNames.includes("chunks")) {
58
+ this.table = await this.db.openTable("chunks");
59
+ }
60
+ }
61
+ /**
62
+ * 确保表存在(首次插入时调用)
63
+ */
64
+ async ensureTable(records) {
65
+ if (this.table) return;
66
+ if (!this.db) throw new Error("VectorStore not initialized");
67
+ if (records.length === 0) return;
68
+ this.table = await this.db.createTable(
69
+ "chunks",
70
+ records
71
+ );
72
+ }
73
+ /**
74
+ * C2 迁移:移除 chunks 表中的 display_code / vector_text 列
75
+ *
76
+ * LanceDB 不支持 ALTER DROP COLUMN,方案为 dropTable + recreate:
77
+ * 1. 读取所有现有 chunks,仅保留新 schema 字段(含 raw_start/raw_end 用于回查正文)
78
+ * 2. 抽样校验:display_code vs files.content.slice(raw_start, raw_end)
79
+ * 差异比例 > sampleMaxMismatchRatio 则中止迁移
80
+ * 3. drop chunks 表 + 用新 schema 重建
81
+ *
82
+ * 幂等:若表中已无 display_code 列,直接返回。
83
+ *
84
+ * @returns 迁移摘要;migrated=false 表示无需迁移或被中止
85
+ */
86
+ /**
87
+ * 检测 chunks 表是否含 display_code 列(H3:纯 vector 操作)
88
+ *
89
+ * 返回值:
90
+ * - true: 表存在且含 display_code(需要迁移)
91
+ * - false: 表存在但不含 display_code(已迁移)
92
+ * - null: 表不存在(全新库 / 已 drop)
93
+ */
94
+ async hasDisplayCodeColumn() {
95
+ if (!this.table) return null;
96
+ const schema = await this.table.schema();
97
+ return schema.fields.some((f) => f.name === "display_code");
98
+ }
99
+ /**
100
+ * 读取全表(H3:纯 vector 操作,供 bootstrap 模块抽样校验使用)
101
+ */
102
+ async readAllRowsRaw() {
103
+ if (!this.table) return [];
104
+ return await this.table.query().toArray();
105
+ }
106
+ /**
107
+ * Drop chunks 表并用新 schema 重建(H3:纯 vector 操作)
108
+ *
109
+ * 调用方需保证:传入的 newRows 已剥离 display_code/vector_text 字段。
110
+ * 崩溃恢复语义由 bootstrap 模块的 state machine 负责。
111
+ */
112
+ async dropAndRecreateChunks(newRows) {
113
+ if (!this.db) throw new Error("VectorStore not initialized");
114
+ await this.db.dropTable("chunks");
115
+ this.table = null;
116
+ if (newRows.length > 0) {
117
+ this.table = await this.db.createTable("chunks", newRows);
118
+ }
119
+ }
120
+ /**
121
+ * 单调版本更新:先插入新版本,再删除旧版本
122
+ *
123
+ * 这保证了:
124
+ * - 最坏情况(崩溃)是新旧版本共存(不缺失)
125
+ * - 正常情况下旧版本被清理
126
+ */
127
+ async upsertFile(filePath, newHash, records) {
128
+ if (!this.db) throw new Error("VectorStore not initialized");
129
+ if (records.length === 0) {
130
+ await this.deleteFile(filePath);
131
+ return;
132
+ }
133
+ if (!this.table) {
134
+ await this.ensureTable(records);
135
+ } else {
136
+ await this.table.add(records);
137
+ }
138
+ if (this.table) {
139
+ await this.table.delete(
140
+ `file_path = '${this.escapeString(filePath)}' AND file_hash != '${this.escapeString(newHash)}'`
141
+ );
142
+ }
143
+ }
144
+ /**
145
+ * 批量 upsert 多个文件(性能优化版,带分批机制)
146
+ *
147
+ * 流程:
148
+ * 1. 将文件分成小批次(每批最多 BATCH_FILES 个文件或 BATCH_RECORDS 条记录)
149
+ * 2. 每批执行:插入新 records → 删除旧版本
150
+ *
151
+ * 分批是必要的,因为 LanceDB native 模块在处理超大数据时可能崩溃
152
+ *
153
+ * @param files 文件列表,每个包含 path、hash 和 records
154
+ */
155
+ async batchUpsertFiles(files) {
156
+ if (!this.db) throw new Error("VectorStore not initialized");
157
+ if (files.length === 0) return;
158
+ const BATCH_FILES = 50;
159
+ const BATCH_RECORDS = 5e3;
160
+ const batches = [];
161
+ let currentBatch = [];
162
+ let currentRecordCount = 0;
163
+ for (const file of files) {
164
+ if (currentBatch.length >= BATCH_FILES || currentRecordCount + file.records.length > BATCH_RECORDS) {
165
+ if (currentBatch.length > 0) {
166
+ batches.push(currentBatch);
167
+ }
168
+ currentBatch = [];
169
+ currentRecordCount = 0;
170
+ }
171
+ currentBatch.push(file);
172
+ currentRecordCount += file.records.length;
173
+ }
174
+ if (currentBatch.length > 0) {
175
+ batches.push(currentBatch);
176
+ }
177
+ for (const batch of batches) {
178
+ const batchRecords = [];
179
+ for (const file of batch) {
180
+ batchRecords.push(...file.records);
181
+ }
182
+ if (batchRecords.length === 0) {
183
+ const pathsToDelete = batch.map((f) => f.path);
184
+ await this.deleteFiles(pathsToDelete);
185
+ continue;
186
+ }
187
+ if (this.table && batch.length > 0) {
188
+ await this.deleteFilesByHash(
189
+ batch.map((f) => ({ path: f.path, hash: f.hash }))
190
+ );
191
+ }
192
+ if (!this.table) {
193
+ await this.ensureTable(batchRecords);
194
+ } else {
195
+ await this.table.add(batchRecords);
196
+ }
197
+ if (this.table && batch.length > 0) {
198
+ const deleteConditions = batch.map(
199
+ (f) => `(file_path = '${this.escapeString(f.path)}' AND file_hash != '${this.escapeString(f.hash)}')`
200
+ ).join(" OR ");
201
+ await this.table.delete(deleteConditions);
202
+ }
203
+ }
204
+ }
205
+ /**
206
+ * 列出所有 chunks 的 (file_path, file_hash) 唯一组合
207
+ *
208
+ * 用于 GC 阶段对比 SQLite 权威数据,识别孤儿 chunks。
209
+ * 性能优化:仅 select 两列,按 (path, hash) 去重后返回。
210
+ */
211
+ async listFileHashes() {
212
+ if (!this.table) return [];
213
+ const rows = await this.table.query().select(["file_path", "file_hash"]).toArray();
214
+ const seen = /* @__PURE__ */ new Set();
215
+ const result = [];
216
+ for (const r of rows) {
217
+ const key = `${r.file_path}\0${r.file_hash}`;
218
+ if (!seen.has(key)) {
219
+ seen.add(key);
220
+ result.push({ path: r.file_path, hash: r.file_hash });
221
+ }
222
+ }
223
+ return result;
224
+ }
225
+ /**
226
+ * 删除文件的所有 chunks
227
+ */
228
+ async deleteFile(filePath) {
229
+ if (!this.table) return;
230
+ await this.table.delete(`file_path = '${this.escapeString(filePath)}'`);
231
+ }
232
+ /**
233
+ * 按 (file_path, file_hash) 精确删除 chunks
234
+ *
235
+ * 用于事务补偿:当下游写入(如 FTS)失败时,反向删除已 upsert 的新版本,
236
+ * 保留旧版本不动,确保 vector_index_hash 仍指向旧 hash 时 LanceDB 状态一致。
237
+ */
238
+ async deleteFilesByHash(items) {
239
+ if (!this.table || items.length === 0) return;
240
+ const BATCH_SIZE = 500;
241
+ for (let i = 0; i < items.length; i += BATCH_SIZE) {
242
+ const batch = items.slice(i, i + BATCH_SIZE);
243
+ const conditions = batch.map(
244
+ (it) => `(file_path = '${this.escapeString(it.path)}' AND file_hash = '${this.escapeString(it.hash)}')`
245
+ ).join(" OR ");
246
+ await this.table.delete(conditions);
247
+ }
248
+ }
249
+ /**
250
+ * 批量删除文件(性能优化:单次 DELETE 替代 N 次循环)
251
+ * 当文件数超过 500 时分批处理,防止 LanceDB filter 字符串过长
252
+ */
253
+ async deleteFiles(filePaths) {
254
+ if (!this.table || filePaths.length === 0) return;
255
+ const BATCH_SIZE = 500;
256
+ if (filePaths.length <= BATCH_SIZE) {
257
+ const conditions = filePaths.map((p) => `file_path = '${this.escapeString(p)}'`).join(" OR ");
258
+ await this.table.delete(conditions);
259
+ } else {
260
+ for (let i = 0; i < filePaths.length; i += BATCH_SIZE) {
261
+ const batch = filePaths.slice(i, i + BATCH_SIZE);
262
+ const conditions = batch.map((p) => `file_path = '${this.escapeString(p)}'`).join(" OR ");
263
+ await this.table.delete(conditions);
264
+ }
265
+ }
266
+ }
267
+ /**
268
+ * 向量搜索
269
+ */
270
+ async search(queryVector, limit = 10, filter) {
271
+ if (!this.table) return [];
272
+ let query = this.table.vectorSearch(queryVector).limit(limit);
273
+ if (filter) {
274
+ query = query.where(filter);
275
+ }
276
+ const results = await query.toArray();
277
+ return results;
278
+ }
279
+ /**
280
+ * 获取文件的所有 chunks(按 chunk_index 排序)
281
+ */
282
+ async getFileChunks(filePath) {
283
+ if (!this.table) return [];
284
+ const results = await this.table.query().where(`file_path = '${this.escapeString(filePath)}'`).toArray();
285
+ const chunks = results;
286
+ return chunks.sort((a, b) => a.chunk_index - b.chunk_index);
287
+ }
288
+ /**
289
+ * 批量获取多个文件的 chunks(性能优化:单次查询替代 N 次循环)
290
+ * 当文件数超过 500 时分批处理,防止 LanceDB filter 字符串过长
291
+ *
292
+ * 适用于 GraphExpander 扩展、词法召回等需要批量获取的场景
293
+ * @returns Map<filePath, ChunkRecord[]>,每个文件的 chunks 已按 chunk_index 排序
294
+ */
295
+ async getFilesChunks(filePaths) {
296
+ const result = /* @__PURE__ */ new Map();
297
+ if (!this.table || filePaths.length === 0) return result;
298
+ const BATCH_SIZE = 500;
299
+ for (let i = 0; i < filePaths.length; i += BATCH_SIZE) {
300
+ const batch = filePaths.slice(i, i + BATCH_SIZE);
301
+ const conditions = batch.map((p) => `file_path = '${this.escapeString(p)}'`).join(" OR ");
302
+ const rows = await this.table.query().where(conditions).toArray();
303
+ for (const row of rows) {
304
+ let arr = result.get(row.file_path);
305
+ if (!arr) {
306
+ arr = [];
307
+ result.set(row.file_path, arr);
308
+ }
309
+ arr.push(row);
310
+ }
311
+ }
312
+ for (const arr of result.values()) {
313
+ arr.sort((a, b) => a.chunk_index - b.chunk_index);
314
+ }
315
+ return result;
316
+ }
317
+ /**
318
+ * 获取表的总记录数
319
+ */
320
+ async count() {
321
+ if (!this.table) return 0;
322
+ return await this.table.countRows();
323
+ }
324
+ /**
325
+ * 清空所有数据
326
+ */
327
+ async clear() {
328
+ if (!this.db) return;
329
+ try {
330
+ await this.db.dropTable("chunks");
331
+ this.table = null;
332
+ } catch {
333
+ }
334
+ }
335
+ /**
336
+ * 获取向量维度
337
+ */
338
+ getVectorDim() {
339
+ return this.vectorDim;
340
+ }
341
+ /**
342
+ * 转义字符串(防止 SQL 注入)
343
+ */
344
+ escapeString(str) {
345
+ return str.replace(/'/g, "''");
346
+ }
347
+ /**
348
+ * 关闭连接
349
+ */
350
+ async close() {
351
+ this.db = null;
352
+ this.table = null;
353
+ }
354
+ };
355
+ var vectorStores = /* @__PURE__ */ new Map();
356
+ async function getVectorStore(projectId, vectorDim = 1024) {
357
+ let store = vectorStores.get(projectId);
358
+ if (!store) {
359
+ store = new VectorStore(projectId, vectorDim);
360
+ await store.init();
361
+ vectorStores.set(projectId, store);
362
+ }
363
+ return store;
364
+ }
365
+ async function closeAllVectorStores() {
366
+ for (const store of vectorStores.values()) {
367
+ await store.close();
368
+ }
369
+ vectorStores.clear();
370
+ }
371
+
372
+ export {
373
+ sampleCheckDisplayCode,
374
+ VectorStore,
375
+ getVectorStore,
376
+ closeAllVectorStores
377
+ };
@@ -0,0 +1,11 @@
1
+ import {
2
+ codebaseRetrievalSchema,
3
+ handleCodebaseRetrieval
4
+ } from "./chunk-EMSMLPMK.js";
5
+ import "./chunk-RGJSXUFS.js";
6
+ import "./chunk-JVKVSTQ3.js";
7
+ import "./chunk-SKBAE26T.js";
8
+ export {
9
+ codebaseRetrievalSchema,
10
+ handleCodebaseRetrieval
11
+ };
@@ -6,7 +6,7 @@ import {
6
6
  getRerankerConfig,
7
7
  isDev,
8
8
  isMcpMode
9
- } from "./chunk-RJURH22T.js";
9
+ } from "./chunk-SKBAE26T.js";
10
10
  export {
11
11
  checkEmbeddingEnv,
12
12
  checkRerankerEnv,
@@ -16,4 +16,3 @@ export {
16
16
  isDev,
17
17
  isMcpMode
18
18
  };
19
- //# sourceMappingURL=config-BWZ6CU3W.js.map
@@ -0,0 +1,54 @@
1
+ import {
2
+ batchDelete,
3
+ batchUpdateMtime,
4
+ batchUpdateVectorIndexHash,
5
+ batchUpsert,
6
+ clear,
7
+ clearAllVectorIndexHash,
8
+ clearVectorIndexHash,
9
+ closeDb,
10
+ countPendingMarks,
11
+ deletePendingMarks,
12
+ generateProjectId,
13
+ getAllFileMeta,
14
+ getAllPaths,
15
+ getFilesNeedingVectorIndex,
16
+ getLanceDbMigrationState,
17
+ getStoredEmbeddingDimensions,
18
+ initDb,
19
+ insertPendingMarks,
20
+ migrateSchema,
21
+ releaseLanceDbMigrationLock,
22
+ replayPendingMarks,
23
+ setLanceDbMigrationState,
24
+ setStoredEmbeddingDimensions,
25
+ tryAcquireLanceDbMigrationLock
26
+ } from "./chunk-RGJSXUFS.js";
27
+ import "./chunk-JVKVSTQ3.js";
28
+ import "./chunk-SKBAE26T.js";
29
+ export {
30
+ batchDelete,
31
+ batchUpdateMtime,
32
+ batchUpdateVectorIndexHash,
33
+ batchUpsert,
34
+ clear,
35
+ clearAllVectorIndexHash,
36
+ clearVectorIndexHash,
37
+ closeDb,
38
+ countPendingMarks,
39
+ deletePendingMarks,
40
+ generateProjectId,
41
+ getAllFileMeta,
42
+ getAllPaths,
43
+ getFilesNeedingVectorIndex,
44
+ getLanceDbMigrationState,
45
+ getStoredEmbeddingDimensions,
46
+ initDb,
47
+ insertPendingMarks,
48
+ migrateSchema,
49
+ releaseLanceDbMigrationLock,
50
+ replayPendingMarks,
51
+ setLanceDbMigrationState,
52
+ setStoredEmbeddingDimensions,
53
+ tryAcquireLanceDbMigrationLock
54
+ };
package/dist/index.js CHANGED
@@ -1,15 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  scan
4
- } from "./chunk-NQR4CGQ6.js";
5
- import "./chunk-6QMYML5V.js";
4
+ } from "./chunk-X7PAYQMT.js";
5
+ import "./chunk-AB24E3Z7.js";
6
+ import "./chunk-ZOMGPIU6.js";
6
7
  import {
7
8
  generateProjectId
8
- } from "./chunk-6Z4JEEVJ.js";
9
+ } from "./chunk-RGJSXUFS.js";
9
10
  import {
10
11
  logger
11
- } from "./chunk-AMQQK4P7.js";
12
- import "./chunk-RJURH22T.js";
12
+ } from "./chunk-JVKVSTQ3.js";
13
+ import "./chunk-SKBAE26T.js";
13
14
 
14
15
  // src/index.ts
15
16
  import { promises as fs } from "fs";
@@ -88,7 +89,7 @@ cli.command("index [path]", "\u626B\u63CF\u4EE3\u7801\u5E93\u5E76\u5EFA\u7ACB\u7
88
89
  }
89
90
  const startTime = Date.now();
90
91
  try {
91
- const { withLock } = await import("./lock-DVY3KJSK.js");
92
+ const { withLock } = await import("./lock-FL54LIQL.js");
92
93
  let lastLoggedPercent = 0;
93
94
  const stats = await withLock(
94
95
  projectId,
@@ -120,7 +121,7 @@ cli.command("index [path]", "\u626B\u63CF\u4EE3\u7801\u5E93\u5E76\u5EFA\u7ACB\u7
120
121
  }
121
122
  });
122
123
  cli.command("mcp", "\u542F\u52A8 MCP \u670D\u52A1\u5668").action(async () => {
123
- const { startMcpServer } = await import("./server-27HI7WZO.js");
124
+ const { startMcpServer } = await import("./server-XK6EINRV.js");
124
125
  try {
125
126
  await startMcpServer();
126
127
  } catch (err) {
@@ -141,7 +142,7 @@ cli.command("search", "\u672C\u5730\u68C0\u7D22\uFF08\u53C2\u6570\u5BF9\u9F50 MC
141
142
  process.exit(1);
142
143
  }
143
144
  const technicalTerms = (options.technicalTerms || "").split(",").map((t) => t.trim()).filter(Boolean);
144
- const { handleCodebaseRetrieval } = await import("./codebaseRetrieval-NLAMGOA2.js");
145
+ const { handleCodebaseRetrieval } = await import("./codebaseRetrieval-3Z4CRA7X.js");
145
146
  const response = await handleCodebaseRetrieval({
146
147
  repo_path: repoPath,
147
148
  information_request: informationRequest,
@@ -152,6 +153,33 @@ cli.command("search", "\u672C\u5730\u68C0\u7D22\uFF08\u53C2\u6570\u5BF9\u9F50 MC
152
153
  `);
153
154
  }
154
155
  );
156
+ cli.command("migrate", "LanceDB \u8FC1\u79FB\u7BA1\u7406\uFF08CRIT-B/CRIT-C\uFF09").option("--reset", "\u6E05\u7A7A LanceDB chunks \u8868\u5E76\u91CD\u7F6E\u8FC1\u79FB\u72B6\u6001\uFF08\u7528\u4E8E\u89E3\u9664 aborted\uFF09").option("-p, --path <path>", "\u9879\u76EE\u8DEF\u5F84\uFF08\u9ED8\u8BA4\u5F53\u524D\u76EE\u5F55\uFF09").action(async (options) => {
157
+ const rootPath = options.path ? path.resolve(options.path) : process.cwd();
158
+ const projectId = generateProjectId(rootPath);
159
+ const { initDb, getLanceDbMigrationState, setLanceDbMigrationState, clearAllVectorIndexHash } = await import("./db-PMVM7557.js");
160
+ const db = initDb(projectId);
161
+ const state = getLanceDbMigrationState(db);
162
+ logger.info({ projectId, state }, "\u5F53\u524D LanceDB \u8FC1\u79FB\u72B6\u6001");
163
+ if (!options.reset) {
164
+ logger.info("\u5982\u9700\u89E3\u9664 aborted \u72B6\u6001\uFF0C\u4F7F\u7528 --reset \u9009\u9879");
165
+ db.close();
166
+ return;
167
+ }
168
+ if (state !== "aborted" && state !== "pending") {
169
+ logger.info(`\u72B6\u6001\u4E3A ${state ?? "\u672A\u8BBE\u7F6E"}\uFF0C\u65E0\u9700 reset`);
170
+ db.close();
171
+ return;
172
+ }
173
+ const { getVectorStore } = await import("./vectorStore-HPQZOVWF.js");
174
+ const { getEmbeddingConfig } = await import("./config-LCOJHTCF.js");
175
+ const store = await getVectorStore(projectId, getEmbeddingConfig().dimensions);
176
+ await store.clear();
177
+ logger.info("LanceDB chunks \u8868\u5DF2\u6E05\u7A7A");
178
+ const cleared = clearAllVectorIndexHash(db);
179
+ logger.info({ cleared }, "vector_index_hash \u5DF2\u6E05\u7A7A");
180
+ setLanceDbMigrationState(db, "done");
181
+ logger.info("\u8FC1\u79FB\u72B6\u6001\u5DF2\u91CD\u7F6E\u4E3A done\u3002\u8BF7\u91CD\u65B0\u8FD0\u884C `contextweaver index` \u91CD\u5EFA\u7D22\u5F15\u3002");
182
+ db.close();
183
+ });
155
184
  cli.help();
156
185
  cli.parse();
157
- //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-AMQQK4P7.js";
4
- import "./chunk-RJURH22T.js";
3
+ } from "./chunk-JVKVSTQ3.js";
4
+ import "./chunk-SKBAE26T.js";
5
5
 
6
6
  // src/utils/lock.ts
7
7
  import fs from "fs";
@@ -125,4 +125,3 @@ async function withLock(projectId, operation, fn, timeoutMs = 3e4) {
125
125
  export {
126
126
  withLock
127
127
  };
128
- //# sourceMappingURL=lock-DVY3KJSK.js.map
@@ -0,0 +1,11 @@
1
+ import {
2
+ scan
3
+ } from "./chunk-X7PAYQMT.js";
4
+ import "./chunk-AB24E3Z7.js";
5
+ import "./chunk-ZOMGPIU6.js";
6
+ import "./chunk-RGJSXUFS.js";
7
+ import "./chunk-JVKVSTQ3.js";
8
+ import "./chunk-SKBAE26T.js";
9
+ export {
10
+ scan
11
+ };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  codebaseRetrievalSchema,
3
3
  handleCodebaseRetrieval
4
- } from "./chunk-7G5V7YT5.js";
5
- import "./chunk-6Z4JEEVJ.js";
4
+ } from "./chunk-EMSMLPMK.js";
5
+ import "./chunk-RGJSXUFS.js";
6
6
  import {
7
7
  logger
8
- } from "./chunk-AMQQK4P7.js";
9
- import "./chunk-RJURH22T.js";
8
+ } from "./chunk-JVKVSTQ3.js";
9
+ import "./chunk-SKBAE26T.js";
10
10
 
11
11
  // src/mcp/server.ts
12
12
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
@@ -144,4 +144,3 @@ async function startMcpServer() {
144
144
  export {
145
145
  startMcpServer
146
146
  };
147
- //# sourceMappingURL=server-27HI7WZO.js.map
@@ -0,0 +1,12 @@
1
+ import {
2
+ VectorStore,
3
+ closeAllVectorStores,
4
+ getVectorStore,
5
+ sampleCheckDisplayCode
6
+ } from "./chunk-ZOMGPIU6.js";
7
+ export {
8
+ VectorStore,
9
+ closeAllVectorStores,
10
+ getVectorStore,
11
+ sampleCheckDisplayCode
12
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chiway/contextweaver",
3
- "version": "1.1.0",
3
+ "version": "1.4.0",
4
4
  "description": "A context weaving tool for LLMs",
5
5
  "license": "MIT",
6
6
  "author": "hsingjui",
@@ -1,12 +0,0 @@
1
- import {
2
- codebaseRetrievalSchema,
3
- handleCodebaseRetrieval
4
- } from "./chunk-7G5V7YT5.js";
5
- import "./chunk-6Z4JEEVJ.js";
6
- import "./chunk-AMQQK4P7.js";
7
- import "./chunk-RJURH22T.js";
8
- export {
9
- codebaseRetrievalSchema,
10
- handleCodebaseRetrieval
11
- };
12
- //# sourceMappingURL=codebaseRetrieval-NLAMGOA2.js.map
@@ -1,11 +0,0 @@
1
- import {
2
- scan
3
- } from "./chunk-NQR4CGQ6.js";
4
- import "./chunk-6QMYML5V.js";
5
- import "./chunk-6Z4JEEVJ.js";
6
- import "./chunk-AMQQK4P7.js";
7
- import "./chunk-RJURH22T.js";
8
- export {
9
- scan
10
- };
11
- //# sourceMappingURL=scanner-RFG4YWYI.js.map