ctxloom-pro 1.3.1 → 1.5.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/dist/index.js CHANGED
@@ -49,7 +49,7 @@ import {
49
49
  validateDefaultRoot,
50
50
  wrapWithIndexingEnvelope,
51
51
  writeCODEOWNERS
52
- } from "./chunk-TIYTPWYN.js";
52
+ } from "./chunk-J2NLNQ4I.js";
53
53
  import {
54
54
  VectorStore
55
55
  } from "./chunk-DVI2RWJR.js";
@@ -1019,7 +1019,7 @@ try {
1019
1019
  } catch {
1020
1020
  }
1021
1021
  var args = process.argv.slice(2);
1022
- var ctxloomVersion = "1.3.1".length > 0 ? "1.3.1" : "dev";
1022
+ var ctxloomVersion = "1.5.0".length > 0 ? "1.5.0" : "dev";
1023
1023
  if (args.includes("--version") || args.includes("-v")) {
1024
1024
  process.stdout.write(`ctxloom ${ctxloomVersion}
1025
1025
  `);
@@ -1092,7 +1092,7 @@ async function checkLicense() {
1092
1092
  if (command !== void 0 && LICENSE_GATE_BYPASS_COMMANDS.has(command)) return;
1093
1093
  const ciKey = process.env["CTXLOOM_LICENSE_KEY"];
1094
1094
  if (ciKey) {
1095
- const { ApiClient } = await import("./src-KTFHRVTO.js");
1095
+ const { ApiClient } = await import("./src-PVBWVQMM.js");
1096
1096
  const client = new ApiClient(process.env["CTXLOOM_API_BASE"]);
1097
1097
  try {
1098
1098
  const result = await client.validate(ciKey, "ci-ephemeral");
@@ -1444,6 +1444,18 @@ async function main() {
1444
1444
  process.stdout.write(` ${style.dim("Root:")} ${initRoot}
1445
1445
 
1446
1446
  `);
1447
+ const skipHarness = process.argv.includes("--skip-harness");
1448
+ const dryRun = process.argv.includes("--dry-run");
1449
+ const force = process.argv.includes("--force");
1450
+ const extraHosts = [];
1451
+ for (let i = 0; i < process.argv.length; i++) {
1452
+ const arg = process.argv[i];
1453
+ if (arg.startsWith("--host=")) {
1454
+ extraHosts.push(...arg.slice("--host=".length).split(",").map((s) => s.trim()));
1455
+ } else if (arg === "--host" && i + 1 < process.argv.length) {
1456
+ extraHosts.push(...process.argv[i + 1].split(",").map((s) => s.trim()));
1457
+ }
1458
+ }
1447
1459
  try {
1448
1460
  const result = runInit(initRoot);
1449
1461
  const mcpLabel = result.mcpJson.created ? `${style.bold("Created")} ${result.mcpJson.path}` : result.mcpJson.merged ? `${style.bold("Merged ctxloom entry into")} ${result.mcpJson.path}` : `${style.dim("Already up to date:")} ${result.mcpJson.path}`;
@@ -1456,10 +1468,34 @@ async function main() {
1456
1468
  process.stdout.write(` ${warn(w)}
1457
1469
  `);
1458
1470
  }
1471
+ if (!skipHarness) {
1472
+ process.stdout.write("\n");
1473
+ const { installHarness } = await import("./src-PVBWVQMM.js");
1474
+ const h = installHarness({ cwd: initRoot, dryRun, force, extraHosts });
1475
+ const harnessFiles = [
1476
+ h.claudeMd,
1477
+ h.agentsMd,
1478
+ h.geminiMd,
1479
+ h.hooksJson,
1480
+ h.sessionStartSh,
1481
+ ...h.skills,
1482
+ ...h.extraHosts
1483
+ ];
1484
+ for (const fr of harnessFiles) {
1485
+ const rel = path4.relative(initRoot, fr.path);
1486
+ const label = fr.alreadyCorrect ? `${style.dim("Already up to date:")} ${rel}` : fr.created ? `${style.bold(dryRun ? "Would create" : "Created")} ${rel}` : `${style.bold(dryRun ? "Would update" : "Updated")} ${rel}`;
1487
+ process.stdout.write(` ${success(label)}
1488
+ `);
1489
+ }
1490
+ for (const w of h.warnings) {
1491
+ process.stdout.write(` ${warn(w)}
1492
+ `);
1493
+ }
1494
+ }
1459
1495
  process.stdout.write("\n");
1460
1496
  process.stdout.write(nextStep("Build the index", "ctxloom index"));
1461
1497
  process.stdout.write(
1462
- ` ${style.dim("Then reopen your AI tool in this directory to pick up the new .mcp.json.")}
1498
+ ` ${style.dim("Then reopen your AI tool in this directory to pick up the new .mcp.json + hooks.")}
1463
1499
 
1464
1500
  `
1465
1501
  );
@@ -1497,7 +1533,7 @@ async function main() {
1497
1533
  process.exit(1);
1498
1534
  }
1499
1535
  if (alias !== void 0) {
1500
- const { validateAlias } = await import("./src-KTFHRVTO.js");
1536
+ const { validateAlias } = await import("./src-PVBWVQMM.js");
1501
1537
  const v = validateAlias(alias);
1502
1538
  if (!v.ok) {
1503
1539
  console.error(`[ctxloom] Invalid alias: ${v.reason}`);
@@ -1761,7 +1797,7 @@ Suggested reviewers for ${files.length} file(s):`);
1761
1797
  process.stderr.write("[ctxloom] --limit must be a non-negative integer (0 for unlimited)\n");
1762
1798
  process.exit(2);
1763
1799
  }
1764
- const { loadRulesConfig, RulesChecker, formatText, formatJson, RulesConfigError } = await import("./src-KTFHRVTO.js");
1800
+ const { loadRulesConfig, RulesChecker, formatText, formatJson, RulesConfigError } = await import("./src-PVBWVQMM.js");
1765
1801
  let config;
1766
1802
  try {
1767
1803
  config = await loadRulesConfig(root);
@@ -1785,7 +1821,7 @@ Suggested reviewers for ${files.length} file(s):`);
1785
1821
  }
1786
1822
  let graph;
1787
1823
  if (useSnapshot) {
1788
- const { DependencyGraph: DG } = await import("./src-KTFHRVTO.js");
1824
+ const { DependencyGraph: DG } = await import("./src-PVBWVQMM.js");
1789
1825
  graph = new DG();
1790
1826
  const loaded = await graph.loadSnapshotOnly(root);
1791
1827
  if (!loaded) {
@@ -1794,7 +1830,7 @@ Suggested reviewers for ${files.length} file(s):`);
1794
1830
  }
1795
1831
  } else {
1796
1832
  process.stderr.write("[ctxloom] Building dependency graph...\n");
1797
- const { ASTParser: ASTParser2, DependencyGraph: DependencyGraph2 } = await import("./src-KTFHRVTO.js");
1833
+ const { ASTParser: ASTParser2, DependencyGraph: DependencyGraph2 } = await import("./src-PVBWVQMM.js");
1798
1834
  let parser;
1799
1835
  try {
1800
1836
  parser = new ASTParser2();
@@ -3,10 +3,13 @@ import {
3
3
  ApiClient,
4
4
  AuthorResolver,
5
5
  BAND_PCT,
6
+ CTXLOOM_HOOK_ENTRIES,
7
+ CTXLOOM_SKILLS,
6
8
  CallGraphIndex,
7
9
  ChurnIndex,
8
10
  CoChangeIndex,
9
11
  CommunityDetector,
12
+ DEFAULT_HMAC_KEY,
10
13
  DEFAULT_REVIEW_CONFIG,
11
14
  DependencyGraph,
12
15
  EmailAlreadyUsedError,
@@ -21,33 +24,44 @@ import {
21
24
  GoModuleResolver,
22
25
  GrammarLoader,
23
26
  GraphExporter,
27
+ HOST_ADAPTERS,
24
28
  InvalidKeyError,
25
29
  LicenseRequiredError,
26
30
  LicenseRevokedError,
27
31
  LicenseStore,
28
32
  NetworkError,
33
+ OVER_BUDGET_ARG_OVERRIDES,
29
34
  OwnershipIndex,
30
35
  PathValidator,
31
36
  ProjectStateManager,
32
37
  RISK_WEIGHTS,
38
+ RULES_BLOCK_CONTENT,
39
+ RULES_BLOCK_NAME,
33
40
  RepoRegistry,
34
41
  RuleManager,
35
42
  RulesChecker,
36
43
  RulesConfigError,
37
44
  SCORE_FLOOR,
45
+ SESSION_START_FULL,
38
46
  SILO_BUS_FACTOR,
47
+ SUPPORTED_HOST_IDS,
39
48
  SeatLimitError,
40
49
  Skeletonizer,
50
+ TaskBudgetTracker,
41
51
  ToolRegistry,
42
52
  TrialUnavailableError,
43
53
  TsConfigPathsResolver,
44
54
  WikiGenerator,
55
+ __resetLearnedSuggestionsCacheForTests,
56
+ __resetTaskBudgetTrackerForTests,
45
57
  activateLicense,
46
58
  aliasNotFoundError,
59
+ applyOverBudgetOverrides,
47
60
  assignLabelsByPercentile,
48
61
  buildBlastRadiusXml,
49
62
  buildCodeownersBlock,
50
63
  captureError,
64
+ computeBlockHmac,
51
65
  computeRiskBreakdown,
52
66
  computeRiskCaps,
53
67
  createProjectState,
@@ -55,7 +69,9 @@ import {
55
69
  deactivateLicense,
56
70
  detectChanges,
57
71
  disposeProjectState,
72
+ emitTaskBudgetBreached,
58
73
  ensureVectorsInitialized,
74
+ extractBlock,
59
75
  extractImports,
60
76
  extractNotebookLanguage,
61
77
  extractNotebookPythonSource,
@@ -65,13 +81,18 @@ import {
65
81
  formatJson,
66
82
  formatText,
67
83
  generateCODEOWNERS,
84
+ getHostAdapter,
68
85
  getImpactRadius,
86
+ getLearnedRules,
69
87
  getLicenseInfo,
70
88
  getOrCreateDistinctId,
89
+ getTaskBudgetTracker,
71
90
  getTelemetryLevel,
72
91
  hashProjectRoot,
92
+ installHarness,
73
93
  isActive,
74
94
  isSiloed,
95
+ learnSuggestionsFromTelemetry,
75
96
  listNamedSnapshots,
76
97
  loadFileRiskHistory,
77
98
  loadReviewConfig,
@@ -87,6 +108,7 @@ import {
87
108
  recordTrendSnapshot,
88
109
  renderStatusXml,
89
110
  requireActive,
111
+ resolveHmacKey,
90
112
  resolveImport,
91
113
  resolveProjectRoot,
92
114
  resolveViaGitHubApi,
@@ -97,13 +119,17 @@ import {
97
119
  shouldEmitFirstReviewRun,
98
120
  shouldEmitInstallCompleted,
99
121
  shouldShowTelemetryNotice,
122
+ skillFilePath,
100
123
  startTrial,
101
124
  track,
125
+ upsertBlock,
102
126
  validateAlias,
103
127
  validateDefaultRoot,
128
+ verifyBlock,
129
+ wrapBlock,
104
130
  wrapWithIndexingEnvelope,
105
131
  writeCODEOWNERS
106
- } from "./chunk-TIYTPWYN.js";
132
+ } from "./chunk-J2NLNQ4I.js";
107
133
  import {
108
134
  VectorStore
109
135
  } from "./chunk-DVI2RWJR.js";
@@ -122,10 +148,13 @@ export {
122
148
  ApiClient,
123
149
  AuthorResolver,
124
150
  BAND_PCT,
151
+ CTXLOOM_HOOK_ENTRIES,
152
+ CTXLOOM_SKILLS,
125
153
  CallGraphIndex,
126
154
  ChurnIndex,
127
155
  CoChangeIndex,
128
156
  CommunityDetector,
157
+ DEFAULT_HMAC_KEY,
129
158
  DEFAULT_REVIEW_CONFIG,
130
159
  DependencyGraph,
131
160
  EMBEDDING_DIMENSION,
@@ -141,35 +170,46 @@ export {
141
170
  GoModuleResolver,
142
171
  GrammarLoader,
143
172
  GraphExporter,
173
+ HOST_ADAPTERS,
144
174
  InvalidKeyError,
145
175
  LicenseRequiredError,
146
176
  LicenseRevokedError,
147
177
  LicenseStore,
148
178
  NetworkError,
179
+ OVER_BUDGET_ARG_OVERRIDES,
149
180
  OwnershipIndex,
150
181
  PathValidator,
151
182
  ProjectStateManager,
152
183
  RISK_WEIGHTS,
184
+ RULES_BLOCK_CONTENT,
185
+ RULES_BLOCK_NAME,
153
186
  RepoRegistry,
154
187
  RuleManager,
155
188
  RulesChecker,
156
189
  RulesConfigError,
157
190
  SCORE_FLOOR,
191
+ SESSION_START_FULL,
158
192
  SILO_BUS_FACTOR,
193
+ SUPPORTED_HOST_IDS,
159
194
  SeatLimitError,
160
195
  Skeletonizer,
196
+ TaskBudgetTracker,
161
197
  ToolRegistry,
162
198
  TrialUnavailableError,
163
199
  TsConfigPathsResolver,
164
200
  VectorStore,
165
201
  WikiGenerator,
202
+ __resetLearnedSuggestionsCacheForTests,
203
+ __resetTaskBudgetTrackerForTests,
166
204
  activateLicense,
167
205
  aliasNotFoundError,
206
+ applyOverBudgetOverrides,
168
207
  assignLabelsByPercentile,
169
208
  buildBlastRadiusXml,
170
209
  buildCodeownersBlock,
171
210
  captureError,
172
211
  collectFiles,
212
+ computeBlockHmac,
173
213
  computeRiskBreakdown,
174
214
  computeRiskCaps,
175
215
  createProjectState,
@@ -177,7 +217,9 @@ export {
177
217
  deactivateLicense,
178
218
  detectChanges,
179
219
  disposeProjectState,
220
+ emitTaskBudgetBreached,
180
221
  ensureVectorsInitialized,
222
+ extractBlock,
181
223
  extractImports,
182
224
  extractNotebookLanguage,
183
225
  extractNotebookPythonSource,
@@ -188,14 +230,19 @@ export {
188
230
  formatText,
189
231
  generateCODEOWNERS,
190
232
  generateEmbedding,
233
+ getHostAdapter,
191
234
  getImpactRadius,
235
+ getLearnedRules,
192
236
  getLicenseInfo,
193
237
  getOrCreateDistinctId,
238
+ getTaskBudgetTracker,
194
239
  getTelemetryLevel,
195
240
  hashProjectRoot,
196
241
  indexDirectory,
242
+ installHarness,
197
243
  isActive,
198
244
  isSiloed,
245
+ learnSuggestionsFromTelemetry,
199
246
  listNamedSnapshots,
200
247
  loadFileRiskHistory,
201
248
  loadReviewConfig,
@@ -212,6 +259,7 @@ export {
212
259
  recordTrendSnapshot,
213
260
  renderStatusXml,
214
261
  requireActive,
262
+ resolveHmacKey,
215
263
  resolveImport,
216
264
  resolveProjectRoot,
217
265
  resolveViaGitHubApi,
@@ -222,11 +270,15 @@ export {
222
270
  shouldEmitFirstReviewRun,
223
271
  shouldEmitInstallCompleted,
224
272
  shouldShowTelemetryNotice,
273
+ skillFilePath,
225
274
  startTrial,
226
275
  track,
276
+ upsertBlock,
227
277
  validateAlias,
228
278
  validateDefaultRoot,
279
+ verifyBlock,
280
+ wrapBlock,
229
281
  wrapWithIndexingEnvelope,
230
282
  writeCODEOWNERS
231
283
  };
232
- //# sourceMappingURL=src-KTFHRVTO.js.map
284
+ //# sourceMappingURL=src-PVBWVQMM.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ctxloom-pro",
3
- "version": "1.3.1",
3
+ "version": "1.5.0",
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",