ctxloom-pro 1.7.9 → 1.7.10

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/dist/index.js CHANGED
@@ -47,7 +47,7 @@ import {
47
47
  validateDefaultRoot,
48
48
  wrapWithIndexingEnvelope,
49
49
  writeCODEOWNERS
50
- } from "./chunk-73ZZ6O4B.js";
50
+ } from "./chunk-J3NVYR6J.js";
51
51
  import {
52
52
  addCtxloomToConfig,
53
53
  detectInstalledClients
@@ -151,13 +151,41 @@ async function initSkeletonizer(state) {
151
151
  }
152
152
  return state.skeletonizerPromise;
153
153
  }
154
+ async function initOverlay(state, withGit2, gitWindowDays2) {
155
+ if (!withGit2) return null;
156
+ if (!state.overlayPromise) {
157
+ state.overlayPromise = (async () => {
158
+ try {
159
+ const overlay = new GitOverlayStore(state.projectRoot, { windowDays: gitWindowDays2 });
160
+ const loaded = await overlay.loadSnapshot();
161
+ if (!loaded) {
162
+ await overlay.rebuild();
163
+ await overlay.saveSnapshot();
164
+ } else {
165
+ await overlay.refresh();
166
+ await overlay.saveSnapshot();
167
+ }
168
+ state.overlay = overlay;
169
+ return overlay;
170
+ } catch (err) {
171
+ logger.warn("Git overlay init failed", {
172
+ root: state.projectRoot,
173
+ detail: err instanceof Error ? err.message : String(err)
174
+ });
175
+ state.overlayPromise = null;
176
+ return null;
177
+ }
178
+ })();
179
+ }
180
+ return state.overlayPromise;
181
+ }
154
182
  function classifyResolutionSource(arg, env) {
155
183
  if (arg !== void 0) {
156
184
  return /[/\\~]|^[A-Za-z]:/.test(arg) ? "arg-path" : "alias";
157
185
  }
158
186
  return env ? "env" : "cwd";
159
187
  }
160
- function buildContext(defaultRoot, noDefaultMode) {
188
+ function buildContext(defaultRoot, noDefaultMode, gitOpts) {
161
189
  const repoRegistry = new RepoRegistry(repoRegistryPath);
162
190
  function resolveOrDefault(arg) {
163
191
  let state;
@@ -212,6 +240,7 @@ function buildContext(defaultRoot, noDefaultMode) {
212
240
  noDefaultMode,
213
241
  registry: repoRegistry,
214
242
  stateManager,
243
+ getOverlay: (root) => initOverlay(resolveOrDefault(root), gitOpts.withGit, gitOpts.gitWindowDays),
215
244
  getStore: async (root) => {
216
245
  const state = resolveOrDefault(root);
217
246
  const store = await initStore(state);
@@ -254,7 +283,7 @@ function buildContext(defaultRoot, noDefaultMode) {
254
283
  };
255
284
  return { ctx, resolveOrDefault };
256
285
  }
257
- function createServer() {
286
+ function createServer(gitOpts = { withGit: true, gitWindowDays: 365 }) {
258
287
  const server = new Server({ name: "ctxloom", version: "1.0.0" }, { capabilities: { tools: {} } });
259
288
  const candidateDefault = PROJECT_ROOT;
260
289
  const isValidDefault = validateDefaultRoot(candidateDefault);
@@ -266,7 +295,7 @@ function createServer() {
266
295
  }
267
296
  const defaultRoot = isValidDefault ? candidateDefault : null;
268
297
  if (defaultRoot) stateManager.pin(defaultRoot);
269
- const { ctx, resolveOrDefault } = buildContext(defaultRoot, !isValidDefault);
298
+ const { ctx, resolveOrDefault } = buildContext(defaultRoot, !isValidDefault, gitOpts);
270
299
  const registry = createToolRegistry(ctx);
271
300
  server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: registry.list() }));
272
301
  server.setRequestHandler(CallToolRequestSchema, async ({ params: { name, arguments: args2 } }) => {
@@ -410,7 +439,7 @@ function createServer() {
410
439
  async function startServer(opts = {}) {
411
440
  const withGit2 = opts.withGit ?? true;
412
441
  const gitWindowDays2 = opts.gitWindowDays ?? 365;
413
- const { server, ctx } = createServer();
442
+ const { server, ctx } = createServer({ withGit: withGit2, gitWindowDays: gitWindowDays2 });
414
443
  const transport = new StdioServerTransport();
415
444
  await server.connect(transport);
416
445
  logger.info("MCP Server started on Stdio transport");
@@ -1068,7 +1097,7 @@ try {
1068
1097
  } catch {
1069
1098
  }
1070
1099
  var args = process.argv.slice(2);
1071
- var ctxloomVersion = "1.7.9".length > 0 ? "1.7.9" : "dev";
1100
+ var ctxloomVersion = "1.7.10".length > 0 ? "1.7.10" : "dev";
1072
1101
  if (args.includes("--version") || args.includes("-v")) {
1073
1102
  process.stdout.write(`ctxloom ${ctxloomVersion}
1074
1103
  `);
@@ -1163,7 +1192,7 @@ async function checkLicense() {
1163
1192
  if (command !== void 0 && LICENSE_GATE_BYPASS_COMMANDS.has(command)) return;
1164
1193
  const ciKey = process.env["CTXLOOM_LICENSE_KEY"];
1165
1194
  if (ciKey) {
1166
- const { ApiClient } = await import("./src-SNHT3SQF.js");
1195
+ const { ApiClient } = await import("./src-7ETGK3MB.js");
1167
1196
  const client = new ApiClient(process.env["CTXLOOM_API_BASE"]);
1168
1197
  try {
1169
1198
  const result = await client.validate(ciKey, "ci-ephemeral");
@@ -1556,7 +1585,7 @@ async function main() {
1556
1585
  }
1557
1586
  if (!skipHarness) {
1558
1587
  process.stdout.write("\n");
1559
- const { installHarness } = await import("./src-SNHT3SQF.js");
1588
+ const { installHarness } = await import("./src-7ETGK3MB.js");
1560
1589
  const h = installHarness({ cwd: initRoot, dryRun, force, extraHosts });
1561
1590
  const harnessFiles = [
1562
1591
  h.claudeMd,
@@ -1619,7 +1648,7 @@ async function main() {
1619
1648
  process.exit(1);
1620
1649
  }
1621
1650
  if (alias !== void 0) {
1622
- const { validateAlias } = await import("./src-SNHT3SQF.js");
1651
+ const { validateAlias } = await import("./src-7ETGK3MB.js");
1623
1652
  const v = validateAlias(alias);
1624
1653
  if (!v.ok) {
1625
1654
  console.error(`[ctxloom] Invalid alias: ${v.reason}`);
@@ -1978,7 +2007,7 @@ Suggested reviewers for ${files.length} file(s):`);
1978
2007
  process.stderr.write("[ctxloom] --limit must be a non-negative integer (0 for unlimited)\n");
1979
2008
  process.exit(2);
1980
2009
  }
1981
- const { loadRulesConfig, RulesChecker, formatText, formatJson, RulesConfigError } = await import("./src-SNHT3SQF.js");
2010
+ const { loadRulesConfig, RulesChecker, formatText, formatJson, RulesConfigError } = await import("./src-7ETGK3MB.js");
1982
2011
  let config;
1983
2012
  try {
1984
2013
  config = await loadRulesConfig(root);
@@ -2002,7 +2031,7 @@ Suggested reviewers for ${files.length} file(s):`);
2002
2031
  }
2003
2032
  let graph;
2004
2033
  if (useSnapshot) {
2005
- const { DependencyGraph: DG } = await import("./src-SNHT3SQF.js");
2034
+ const { DependencyGraph: DG } = await import("./src-7ETGK3MB.js");
2006
2035
  graph = new DG();
2007
2036
  const loaded = await graph.loadSnapshotOnly(root);
2008
2037
  if (!loaded) {
@@ -2011,7 +2040,7 @@ Suggested reviewers for ${files.length} file(s):`);
2011
2040
  }
2012
2041
  } else {
2013
2042
  process.stderr.write("[ctxloom] Building dependency graph...\n");
2014
- const { ASTParser: ASTParser2, DependencyGraph: DependencyGraph2 } = await import("./src-SNHT3SQF.js");
2043
+ const { ASTParser: ASTParser2, DependencyGraph: DependencyGraph2 } = await import("./src-7ETGK3MB.js");
2015
2044
  let parser;
2016
2045
  try {
2017
2046
  parser = new ASTParser2();
@@ -132,7 +132,7 @@ import {
132
132
  wrapBlock,
133
133
  wrapWithIndexingEnvelope,
134
134
  writeCODEOWNERS
135
- } from "./chunk-73ZZ6O4B.js";
135
+ } from "./chunk-J3NVYR6J.js";
136
136
  import {
137
137
  VectorStore,
138
138
  isCorruptionError
@@ -306,4 +306,4 @@ export {
306
306
  wrapWithIndexingEnvelope,
307
307
  writeCODEOWNERS
308
308
  };
309
- //# sourceMappingURL=src-SNHT3SQF.js.map
309
+ //# sourceMappingURL=src-7ETGK3MB.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ctxloom-pro",
3
- "version": "1.7.9",
3
+ "version": "1.7.10",
4
4
  "description": "ctxloom — The Universal Code Context Engine. A local-first MCP server providing intelligent code context via hybrid Vector + AST + Graph search with Skeletonization (92% token reduction).",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",