@maind-dev/mcp-bridge 0.16.0 → 0.18.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/build/index.js CHANGED
@@ -97,7 +97,7 @@ var BRIDGE_VERSION;
97
97
  var init_version = __esm({
98
98
  "src/version.ts"() {
99
99
  "use strict";
100
- BRIDGE_VERSION = "0.16.0";
100
+ BRIDGE_VERSION = "0.18.0";
101
101
  }
102
102
  });
103
103
 
@@ -109,11 +109,11 @@ var init_types = __esm({
109
109
  });
110
110
 
111
111
  // ../../packages/claude-code-telemetry/dist/transcript.js
112
- import { createReadStream, existsSync as existsSync4 } from "node:fs";
112
+ import { createReadStream, existsSync as existsSync5 } from "node:fs";
113
113
  import { stat } from "node:fs/promises";
114
114
  import { createInterface as createInterface4 } from "node:readline";
115
115
  async function summariseTranscript(path7) {
116
- if (!path7 || !existsSync4(path7))
116
+ if (!path7 || !existsSync5(path7))
117
117
  return null;
118
118
  let stats;
119
119
  try {
@@ -123,7 +123,7 @@ async function summariseTranscript(path7) {
123
123
  }
124
124
  let input = 0;
125
125
  let output = 0;
126
- let lines = 0;
126
+ let lines2 = 0;
127
127
  return await new Promise((resolve2) => {
128
128
  const stream = createReadStream(path7, { encoding: "utf-8" });
129
129
  const rl = createInterface4({ input: stream });
@@ -131,7 +131,7 @@ async function summariseTranscript(path7) {
131
131
  const trimmed = line.trim();
132
132
  if (!trimmed)
133
133
  return;
134
- lines++;
134
+ lines2++;
135
135
  try {
136
136
  const parsed = JSON.parse(trimmed);
137
137
  const usage = parsed.message?.usage;
@@ -149,7 +149,7 @@ async function summariseTranscript(path7) {
149
149
  input_tokens: input,
150
150
  output_tokens: output,
151
151
  total_tokens: input + output,
152
- lines_seen: lines,
152
+ lines_seen: lines2,
153
153
  last_modified_ms: stats.mtimeMs
154
154
  });
155
155
  });
@@ -198,7 +198,7 @@ var init_effort = __esm({
198
198
  });
199
199
 
200
200
  // ../../packages/claude-code-telemetry/dist/session-analysis.js
201
- import { createReadStream as createReadStream2, existsSync as existsSync5 } from "node:fs";
201
+ import { createReadStream as createReadStream2, existsSync as existsSync6 } from "node:fs";
202
202
  import { createInterface as createInterface5 } from "node:readline";
203
203
  function num2(v) {
204
204
  return typeof v === "number" && Number.isFinite(v) ? v : 0;
@@ -276,7 +276,7 @@ function emptyAnalysis(sessionId) {
276
276
  }
277
277
  async function analyzeSession(path7) {
278
278
  const a = emptyAnalysis("");
279
- if (!path7 || !existsSync5(path7))
279
+ if (!path7 || !existsSync6(path7))
280
280
  return a;
281
281
  const reactions = [];
282
282
  let effort = null;
@@ -559,14 +559,14 @@ var init_hook_input = __esm({
559
559
 
560
560
  // src/hooks/state.ts
561
561
  import { mkdir as mkdir2, readFile as readFile2, writeFile as writeFile2, rename as rename2 } from "node:fs/promises";
562
- import { existsSync as existsSync6 } from "node:fs";
562
+ import { existsSync as existsSync7 } from "node:fs";
563
563
  import { homedir as homedir4 } from "node:os";
564
564
  import { join as join13 } from "node:path";
565
565
  function emptyState() {
566
566
  return { config: null, sessions: {}, pending_metrics: [] };
567
567
  }
568
568
  async function loadState() {
569
- if (!existsSync6(STATE_FILE)) return emptyState();
569
+ if (!existsSync7(STATE_FILE)) return emptyState();
570
570
  try {
571
571
  const raw = await readFile2(STATE_FILE, "utf-8");
572
572
  const parsed = JSON.parse(raw);
@@ -586,7 +586,7 @@ async function loadState() {
586
586
  }
587
587
  }
588
588
  async function saveState(state) {
589
- if (!existsSync6(STATE_DIR)) {
589
+ if (!existsSync7(STATE_DIR)) {
590
590
  await mkdir2(STATE_DIR, { recursive: true, mode: 448 });
591
591
  }
592
592
  const tmp = `${STATE_FILE}.tmp`;
@@ -1701,7 +1701,7 @@ function sleep(ms) {
1701
1701
  return new Promise((resolve2) => setTimeout(resolve2, ms));
1702
1702
  }
1703
1703
  function printAuthInstructions(start) {
1704
- const lines = [
1704
+ const lines2 = [
1705
1705
  "",
1706
1706
  " \u250C\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\u2500\u2500\u2500\u2500\u2510",
1707
1707
  " \u2502 \u2502",
@@ -1717,7 +1717,7 @@ function printAuthInstructions(start) {
1717
1717
  " \u2514\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\u2500\u2500\u2500\u2500\u2518",
1718
1718
  ""
1719
1719
  ];
1720
- process.stderr.write(lines.join("\n") + "\n");
1720
+ process.stderr.write(lines2.join("\n") + "\n");
1721
1721
  }
1722
1722
  function pad(s, width) {
1723
1723
  if (s.length >= width) return s.slice(0, width);
@@ -1993,17 +1993,17 @@ var InstallReport = class {
1993
1993
  );
1994
1994
  const pad2 = (s, w) => s + " ".repeat(Math.max(0, w - s.length));
1995
1995
  const sep2 = `| ${"-".repeat(targetWidth)} | ${"-".repeat(actionWidth)} | ${"-".repeat(statusWidth)} | ${"-".repeat(detailWidth)} |`;
1996
- const lines = [];
1997
- lines.push(
1996
+ const lines2 = [];
1997
+ lines2.push(
1998
1998
  `| ${pad2(headers[0], targetWidth)} | ${pad2(headers[1], actionWidth)} | ${pad2(headers[2], statusWidth)} | ${pad2(headers[3], detailWidth)} |`
1999
1999
  );
2000
- lines.push(sep2);
2000
+ lines2.push(sep2);
2001
2001
  for (const r of this.results) {
2002
- lines.push(
2002
+ lines2.push(
2003
2003
  `| ${pad2(r.target, targetWidth)} | ${pad2(r.action, actionWidth)} | ${pad2(r.status, statusWidth)} | ${pad2(r.detail ?? "", detailWidth)} |`
2004
2004
  );
2005
2005
  }
2006
- return lines.join("\n") + "\n";
2006
+ return lines2.join("\n") + "\n";
2007
2007
  }
2008
2008
  print(stream) {
2009
2009
  const s = this.summary();
@@ -2327,8 +2327,8 @@ async function atomicWriteFile(filepath, content, mode) {
2327
2327
  async function hasLinePrefix(filepath, prefix) {
2328
2328
  const content = await readFileSafe(filepath);
2329
2329
  if (content === null) return false;
2330
- const lines = content.split(/\r?\n/);
2331
- return lines.some((l) => l.startsWith(prefix));
2330
+ const lines2 = content.split(/\r?\n/);
2331
+ return lines2.some((l) => l.startsWith(prefix));
2332
2332
  }
2333
2333
  function isNoEnt(err) {
2334
2334
  return isNodeError(err) && err.code === "ENOENT";
@@ -3933,7 +3933,7 @@ import { execFileSync as execFileSync5 } from "node:child_process";
3933
3933
 
3934
3934
  // ../../packages/code-index/build/node.js
3935
3935
  import { mkdirSync as mkdirSync3 } from "node:fs";
3936
- import { posix as posix5 } from "node:path";
3936
+ import { posix as posix6 } from "node:path";
3937
3937
 
3938
3938
  // ../../packages/code-index/build/parse/tree-sitter/parser.js
3939
3939
  import { join as join9 } from "node:path";
@@ -4341,7 +4341,7 @@ var TreeSitterParser = class {
4341
4341
 
4342
4342
  // ../../packages/code-index/build/query/engine.js
4343
4343
  import { readFileSync as readFileSync4 } from "node:fs";
4344
- import { posix as posix4 } from "node:path";
4344
+ import { posix as posix5 } from "node:path";
4345
4345
 
4346
4346
  // ../../packages/code-index/build/embed/recipe.js
4347
4347
  var MAX_CHARS = 1e3;
@@ -4861,11 +4861,11 @@ function readFileHistory(repoRoot, paths, opts = {}) {
4861
4861
  const commits = [];
4862
4862
  if (raw !== null) {
4863
4863
  for (const record of splitRecords(raw)) {
4864
- const lines = record.split("\n");
4865
- const head = parseHistoryRecord(lines[0] ?? "");
4864
+ const lines2 = record.split("\n");
4865
+ const head = parseHistoryRecord(lines2[0] ?? "");
4866
4866
  if (!head)
4867
4867
  continue;
4868
- const filesTouched = lines.slice(1).filter((l) => l.trim().length > 0).length;
4868
+ const filesTouched = lines2.slice(1).filter((l) => l.trim().length > 0).length;
4869
4869
  commits.push({
4870
4870
  sha: head.sha,
4871
4871
  dateIso: head.dateIso,
@@ -5241,6 +5241,259 @@ async function checkDivergence(repoRoot, opts = {}) {
5241
5241
  return { ok: isHealthy(findings), findings, facts };
5242
5242
  }
5243
5243
 
5244
+ // ../../packages/code-index/build/repo-health/number-collisions.js
5245
+ import { existsSync as existsSync3, readdirSync as readdirSync2 } from "node:fs";
5246
+ import { posix as posix4 } from "node:path";
5247
+ var NUMBERED_RE = /^(?<prefix>[A-Za-z][A-Za-z_.-]*?[-_])?(?<num>\d{2,})(?=[-_.])/;
5248
+ var DEFAULT_MIN_FILES = 5;
5249
+ var DEFAULT_MIN_DISTINCT_RATIO = 0.8;
5250
+ function isCounterNamespace(numbers, opts = {}) {
5251
+ const minFiles = opts.minFiles ?? DEFAULT_MIN_FILES;
5252
+ if (numbers.length < minFiles)
5253
+ return false;
5254
+ const distinct = new Set(numbers).size;
5255
+ return distinct / numbers.length >= (opts.minDistinctRatio ?? DEFAULT_MIN_DISTINCT_RATIO);
5256
+ }
5257
+ function namespaceKey(ns) {
5258
+ return `${ns.dir}#${ns.prefix}`;
5259
+ }
5260
+ function parseNumbered(fileName) {
5261
+ const m = NUMBERED_RE.exec(fileName);
5262
+ if (!m?.groups)
5263
+ return null;
5264
+ return { prefix: m.groups.prefix ?? "", number: m.groups.num };
5265
+ }
5266
+ function computeNumberCollisions(facts) {
5267
+ const out = [];
5268
+ if (!facts.isRepo)
5269
+ return out;
5270
+ const added = new Set(facts.addedPaths);
5271
+ for (const ns of facts.namespaces) {
5272
+ const key = namespaceKey(ns);
5273
+ const byNumber = facts.sightingsByNamespace.get(key);
5274
+ if (!byNumber)
5275
+ continue;
5276
+ const taken = new Set(byNumber.keys());
5277
+ for (const [number, sightings] of byNumber) {
5278
+ const paths = [...new Set(sightings.map((s) => s.path))];
5279
+ if (paths.length < 2)
5280
+ continue;
5281
+ const ownPath = paths.find((p) => added.has(p));
5282
+ const others = paths.filter((p) => p !== ownPath);
5283
+ const label = `${ns.prefix}${number}`;
5284
+ out.push(ownPath ? {
5285
+ id: `number.collision:${key}#${number}`,
5286
+ status: "open",
5287
+ namespace: ns,
5288
+ number,
5289
+ title: `${label} is already taken`,
5290
+ detail: `This branch adds ${ownPath}, but ${label} already exists as ${others.join(", ")}. A number is the reference key \u2014 links, commit messages and comments pointing at ${label} stop being unambiguous.`,
5291
+ ownPath,
5292
+ sightings: sightings.filter((s) => s.path !== ownPath),
5293
+ suggestion: `${ns.prefix}${suggestNextNumber(taken, number)}`,
5294
+ hint: `Rename yours (git mv) to the suggested number and update every reference: title/frontmatter, any index file, wiki-style links, and comments naming the old filename. Already-merged references (commit messages, applied migrations) stay as they are \u2014 they are history.`
5295
+ } : {
5296
+ id: `number.collision:${key}#${number}`,
5297
+ status: "info",
5298
+ namespace: ns,
5299
+ number,
5300
+ title: `${label} is used more than once (pre-existing)`,
5301
+ detail: `${label} is carried by ${paths.length} files: ${paths.join(", ")}.`,
5302
+ sightings,
5303
+ hint: "Not introduced by this branch \u2014 inventory, not a blocker."
5304
+ });
5305
+ }
5306
+ }
5307
+ const order = { open: 0, warn: 1, info: 2, passed: 3 };
5308
+ return out.sort((a, b) => order[a.status] - order[b.status] || a.id.localeCompare(b.id));
5309
+ }
5310
+ function isCollisionFree(findings) {
5311
+ return !findings.some((f) => f.status === "open");
5312
+ }
5313
+ function suggestNextNumber(taken, like) {
5314
+ let max = 0;
5315
+ for (const t of taken) {
5316
+ const n = Number(t);
5317
+ if (Number.isFinite(n))
5318
+ max = Math.max(max, n);
5319
+ }
5320
+ return String(max + 1).padStart(like.length, "0");
5321
+ }
5322
+ function trimOrNull2(s) {
5323
+ const t = s?.trim();
5324
+ return t ? t : null;
5325
+ }
5326
+ function lines(out) {
5327
+ return out ? out.split("\n").filter(Boolean) : [];
5328
+ }
5329
+ function resolveDefaultBranch2(repoRoot) {
5330
+ const sym = trimOrNull2(runGit(repoRoot, ["symbolic-ref", "--quiet", "refs/remotes/origin/HEAD"]));
5331
+ if (sym) {
5332
+ const m = /refs\/remotes\/origin\/(.+)$/.exec(sym);
5333
+ if (m)
5334
+ return m[1];
5335
+ }
5336
+ for (const cand of ["main", "master"]) {
5337
+ if (runGit(repoRoot, ["rev-parse", "--verify", "--quiet", `origin/${cand}`]) !== null) {
5338
+ return cand;
5339
+ }
5340
+ }
5341
+ return null;
5342
+ }
5343
+ function detectNamespaces(repoRoot, opts = {}) {
5344
+ const minFiles = opts.minFiles ?? DEFAULT_MIN_FILES;
5345
+ const args = ["ls-files", "-z", "--"];
5346
+ args.push(...opts.dirs?.length ? opts.dirs : ["."]);
5347
+ const raw = runGit(repoRoot, args);
5348
+ if (raw === null)
5349
+ return [];
5350
+ const candidates = /* @__PURE__ */ new Map();
5351
+ for (const path7 of raw.split("\0").filter(Boolean)) {
5352
+ const dir = posix4.dirname(path7);
5353
+ const parsed = parseNumbered(posix4.basename(path7));
5354
+ if (!parsed)
5355
+ continue;
5356
+ const key = `${dir}#${parsed.prefix}`;
5357
+ const existing = candidates.get(key);
5358
+ if (existing)
5359
+ existing.numbers.push(parsed.number);
5360
+ else
5361
+ candidates.set(key, { dir, prefix: parsed.prefix, numbers: [parsed.number] });
5362
+ }
5363
+ return [...candidates.values()].filter((c) => isCounterNamespace(c.numbers, { ...opts, minFiles })).map((c) => ({
5364
+ dir: c.dir,
5365
+ prefix: c.prefix,
5366
+ fileCount: c.numbers.length,
5367
+ distinctRatio: new Set(c.numbers).size / c.numbers.length
5368
+ })).sort((a, b) => namespaceKey(a).localeCompare(namespaceKey(b)));
5369
+ }
5370
+ async function gatherNumberCollisionFacts(repoRoot, opts = {}) {
5371
+ const skipped = [];
5372
+ const inside = trimOrNull2(runGit(repoRoot, ["rev-parse", "--is-inside-work-tree"]));
5373
+ if (inside !== "true") {
5374
+ return {
5375
+ isRepo: false,
5376
+ defaultBranch: null,
5377
+ namespaces: [],
5378
+ sightingsByNamespace: /* @__PURE__ */ new Map(),
5379
+ addedPaths: [],
5380
+ skipped: ["not a git work tree"]
5381
+ };
5382
+ }
5383
+ const namespaces = detectNamespaces(repoRoot, opts);
5384
+ const nsByKey = new Map(namespaces.map((ns) => [namespaceKey(ns), ns]));
5385
+ const dirs = [...new Set(namespaces.map((ns) => ns.dir))];
5386
+ const sightingsByNamespace = /* @__PURE__ */ new Map();
5387
+ const record = (path7, kind, where) => {
5388
+ const dir = posix4.dirname(path7);
5389
+ const parsed = parseNumbered(posix4.basename(path7));
5390
+ if (!parsed)
5391
+ return;
5392
+ const key = `${dir}#${parsed.prefix}`;
5393
+ if (!nsByKey.has(key))
5394
+ return;
5395
+ const byNumber = sightingsByNamespace.get(key) ?? /* @__PURE__ */ new Map();
5396
+ const list = byNumber.get(parsed.number) ?? [];
5397
+ list.push({ kind, where, path: path7 });
5398
+ byNumber.set(parsed.number, list);
5399
+ sightingsByNamespace.set(key, byNumber);
5400
+ };
5401
+ const scanTree = (ref, kind, where) => {
5402
+ if (dirs.length === 0)
5403
+ return;
5404
+ const out = runGit(repoRoot, ["ls-tree", "-r", "--name-only", ref, "--", ...dirs]);
5405
+ if (out === null) {
5406
+ skipped.push(`could not read ${where}`);
5407
+ return;
5408
+ }
5409
+ for (const path7 of lines(out))
5410
+ record(path7, kind, where);
5411
+ };
5412
+ for (const dir of dirs) {
5413
+ const abs = posix4.join(repoRoot, dir);
5414
+ if (!existsSync3(abs))
5415
+ continue;
5416
+ try {
5417
+ for (const file of readdirSync2(abs))
5418
+ record(`${dir}/${file}`, "self", "this worktree");
5419
+ } catch {
5420
+ skipped.push(`could not read ${dir}`);
5421
+ }
5422
+ }
5423
+ const defaultBranch = resolveDefaultBranch2(repoRoot);
5424
+ if (defaultBranch) {
5425
+ scanTree(`origin/${defaultBranch}`, "default_branch", `origin/${defaultBranch}`);
5426
+ } else {
5427
+ skipped.push("no default branch resolvable (offline clone?) \u2014 base comparison skipped");
5428
+ }
5429
+ const currentBranch = trimOrNull2(runGit(repoRoot, ["rev-parse", "--abbrev-ref", "HEAD"]));
5430
+ for (const branch of lines(runGit(repoRoot, ["for-each-ref", "--format=%(refname:short)", "refs/heads"]))) {
5431
+ if (branch === currentBranch)
5432
+ continue;
5433
+ scanTree(branch, "branch", `Branch ${branch}`);
5434
+ }
5435
+ if (opts.includeWorktrees !== false) {
5436
+ const selfRoot = trimOrNull2(runGit(repoRoot, ["rev-parse", "--show-toplevel"]));
5437
+ for (const line of lines(runGit(repoRoot, ["worktree", "list", "--porcelain"]))) {
5438
+ if (!line.startsWith("worktree "))
5439
+ continue;
5440
+ const root = line.slice("worktree ".length).trim();
5441
+ if (!root || root === selfRoot || !existsSync3(root))
5442
+ continue;
5443
+ for (const dir of dirs) {
5444
+ const abs = posix4.join(root, dir);
5445
+ if (!existsSync3(abs))
5446
+ continue;
5447
+ try {
5448
+ for (const file of readdirSync2(abs)) {
5449
+ record(`${dir}/${file}`, "worktree", `Worktree ${root}`);
5450
+ }
5451
+ } catch {
5452
+ skipped.push(`could not read ${dir} in ${root}`);
5453
+ }
5454
+ }
5455
+ }
5456
+ }
5457
+ let addedPaths = [];
5458
+ if (defaultBranch && dirs.length > 0) {
5459
+ const diff = runGit(repoRoot, [
5460
+ "diff",
5461
+ "--name-only",
5462
+ "--diff-filter=A",
5463
+ `origin/${defaultBranch}...HEAD`,
5464
+ "--",
5465
+ ...dirs
5466
+ ]);
5467
+ if (diff === null) {
5468
+ skipped.push("could not diff against the default branch \u2014 everything reported as info");
5469
+ } else {
5470
+ addedPaths = lines(diff);
5471
+ }
5472
+ const untracked = runGit(repoRoot, [
5473
+ "ls-files",
5474
+ "--others",
5475
+ "--exclude-standard",
5476
+ "--",
5477
+ ...dirs
5478
+ ]);
5479
+ if (untracked !== null)
5480
+ addedPaths = [...addedPaths, ...lines(untracked)];
5481
+ }
5482
+ return {
5483
+ isRepo: true,
5484
+ defaultBranch,
5485
+ namespaces,
5486
+ sightingsByNamespace,
5487
+ addedPaths,
5488
+ skipped
5489
+ };
5490
+ }
5491
+ async function checkNumberCollisions(repoRoot, opts = {}) {
5492
+ const facts = await gatherNumberCollisionFacts(repoRoot, opts);
5493
+ const findings = computeNumberCollisions(facts);
5494
+ return { ok: isCollisionFree(findings), findings, facts };
5495
+ }
5496
+
5244
5497
  // ../../packages/code-index/build/review/risk-rules.js
5245
5498
  var RISK_RULES = [
5246
5499
  {
@@ -5627,7 +5880,7 @@ var CodeIndexEngine = class {
5627
5880
  return null;
5628
5881
  let source = "";
5629
5882
  try {
5630
- const full = readFileSync4(posix4.join(this.repoRoot, n.filePath), "utf8");
5883
+ const full = readFileSync4(posix5.join(this.repoRoot, n.filePath), "utf8");
5631
5884
  source = full.slice(n.startByte, n.endByte);
5632
5885
  } catch {
5633
5886
  return null;
@@ -5698,6 +5951,9 @@ var CodeIndexEngine = class {
5698
5951
  async checkDivergence(opts = {}) {
5699
5952
  return checkDivergence(this.repoRoot, opts);
5700
5953
  }
5954
+ async checkNumberCollisions(opts = {}) {
5955
+ return checkNumberCollisions(this.repoRoot, opts);
5956
+ }
5701
5957
  async reviewChanges(opts = {}) {
5702
5958
  await this.store.init();
5703
5959
  const rawPaths = enumerateChangedPaths(this.repoRoot, opts);
@@ -5761,7 +6017,7 @@ var CodeIndexEngine = class {
5761
6017
  }
5762
6018
  readRepoFile(relPath) {
5763
6019
  try {
5764
- return readFileSync4(posix4.join(this.repoRoot, relPath), "utf8");
6020
+ return readFileSync4(posix5.join(this.repoRoot, relPath), "utf8");
5765
6021
  } catch {
5766
6022
  return null;
5767
6023
  }
@@ -6095,8 +6351,8 @@ var NodeSqliteStore = class {
6095
6351
  // ../../packages/code-index/build/node.js
6096
6352
  var DEFAULT_DB_RELPATH = ".maind/code-index.sqlite";
6097
6353
  function createNodeCodeIndex(opts) {
6098
- const dbPath = opts.dbPath ?? posix5.join(opts.repoRoot, DEFAULT_DB_RELPATH);
6099
- mkdirSync3(posix5.dirname(dbPath), { recursive: true });
6354
+ const dbPath = opts.dbPath ?? posix6.join(opts.repoRoot, DEFAULT_DB_RELPATH);
6355
+ mkdirSync3(posix6.dirname(dbPath), { recursive: true });
6100
6356
  const store = new NodeSqliteStore(dbPath);
6101
6357
  const parser = new TreeSitterParser();
6102
6358
  return new CodeIndexEngine({
@@ -6365,6 +6621,24 @@ var LOCAL_TOOLS = [
6365
6621
  }
6366
6622
  }
6367
6623
  }
6624
+ },
6625
+ {
6626
+ name: "check_number_collisions",
6627
+ description: "Local guard against a numbered namespace being claimed twice (ADR-250): filenames carrying a sequential counter \u2014 ADR-248-*.md, 0001-use-postgres.md (adr-tools), RFC-12-*, Supabase migration slots \u2014 are a distributed counter with NO allocator. Two parallel agent sessions each list the directory, each see N as the highest, each write N+1: both are individually correct and the duplicate exists only in the union on the default branch, where it surfaces at merge time (or, for migrations, as a silently skipped push). Runs entirely on this machine (git + fs), nothing is uploaded. Namespaces are DISCOVERED, not configured \u2014 no prefix is hardcoded, and date-stamped families (BRIEF-2026-\u2026) are rejected because a counter's numbers are near-unique while a date family's repeat. Consults four sources, and the fourth is the point: the default branch, all other local branches, all SIBLING WORKTREES INCLUDING THEIR UNCOMMITTED FILES, and your own tree \u2014 the competing file is typically in no pushed commit yet. Findings use open|warn|info: `open` = THIS branch introduces the clash (act on it), `info` = the collision predates your work (inventory, not your problem). Call this WHEN: (a) you are about to create a file in a numbered series \u2014 an ADR, RFC, migration, numbered spec \u2014 and picked the number by listing the directory; (b) before pushing a branch that adds such a file; (c) a merge conflicted in an index/README that lists numbered documents. An `open` finding means renumber BEFORE pushing \u2014 resolving it after the merge means rewriting every reference.",
6628
+ inputSchema: {
6629
+ type: "object",
6630
+ properties: {
6631
+ dirs: {
6632
+ type: "array",
6633
+ items: { type: "string" },
6634
+ description: "Restrict detection to these repo-relative directories (default: whole repo)."
6635
+ },
6636
+ min_files: {
6637
+ type: "number",
6638
+ description: "How many files must share a prefix before it counts as a namespace (default 5). Lower it to cover a young series that is still below the threshold."
6639
+ }
6640
+ }
6641
+ }
6368
6642
  }
6369
6643
  ];
6370
6644
  var LOCAL_TOOL_NAMES = new Set(LOCAL_TOOLS.map((t) => t.name));
@@ -6425,6 +6699,35 @@ async function dispatchLocalTool(engine, name, args) {
6425
6699
  hint: report.ok ? "No silent divergence detected \u2014 safe to proceed." : `${openCount} blocking (open) + ${warnCount} warning finding(s). Resolve the 'open' findings \u2014 or get the user's explicit acknowledgement \u2014 BEFORE recommending push/deploy/release.`
6426
6700
  };
6427
6701
  }
6702
+ case "check_number_collisions": {
6703
+ const report = await engine.checkNumberCollisions({
6704
+ dirs: Array.isArray(args.dirs) ? args.dirs.filter((d) => typeof d === "string") : void 0,
6705
+ minFiles: typeof args.min_files === "number" ? args.min_files : void 0
6706
+ });
6707
+ const open = report.findings.filter((f) => f.status === "open");
6708
+ const preexisting = report.findings.filter(
6709
+ (f) => f.status === "info"
6710
+ );
6711
+ return {
6712
+ ok: report.ok,
6713
+ open_count: open.length,
6714
+ preexisting_count: preexisting.length,
6715
+ // Nur die blockierenden Findings vollständig; der Bestand als Zahl plus
6716
+ // Nummern, damit ein Repo mit alten Doppelungen die Antwort nicht flutet
6717
+ // und der Agent das Handlungsrelevante zuerst liest.
6718
+ findings: open,
6719
+ preexisting: preexisting.map(
6720
+ (f) => `${f.namespace.prefix}${f.number}`
6721
+ ),
6722
+ namespaces: report.facts.namespaces.map((ns) => ({
6723
+ dir: ns.dir,
6724
+ prefix: ns.prefix,
6725
+ file_count: ns.fileCount
6726
+ })),
6727
+ skipped: report.facts.skipped,
6728
+ hint: report.ok ? report.facts.namespaces.length === 0 ? "No numbered namespace detected \u2014 nothing to collide. Pass min_files to cover a series below the detection threshold." : "No number introduced by this branch is taken elsewhere." : `${open.length} number(s) this branch adds are already taken. Renumber BEFORE pushing \u2014 afterwards every reference (links, index entries, comments) has to be rewritten.`
6729
+ };
6730
+ }
6428
6731
  case "codebase_search": {
6429
6732
  const query = str(args.query);
6430
6733
  if (!query) throw new Error("codebase_search requires a 'query' string");
@@ -6756,7 +7059,7 @@ import { randomUUID as randomUUID2 } from "node:crypto";
6756
7059
 
6757
7060
  // src/bridge-config.ts
6758
7061
  init_device_id();
6759
- import { existsSync as existsSync3, readFileSync as readFileSync6 } from "node:fs";
7062
+ import { existsSync as existsSync4, readFileSync as readFileSync6 } from "node:fs";
6760
7063
  import { join as join11 } from "node:path";
6761
7064
  function bridgeConfigPath() {
6762
7065
  return join11(configDir(), "config.json");
@@ -6764,7 +7067,7 @@ function bridgeConfigPath() {
6764
7067
  function readBridgeConfig() {
6765
7068
  try {
6766
7069
  const file = bridgeConfigPath();
6767
- if (!existsSync3(file)) return null;
7070
+ if (!existsSync4(file)) return null;
6768
7071
  const raw = JSON.parse(readFileSync6(file, "utf8"));
6769
7072
  if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
6770
7073
  return null;
@@ -6896,7 +7199,15 @@ var PresenceAnnouncer = class {
6896
7199
  project_key: this.projectKey,
6897
7200
  session_id: this.sessionId,
6898
7201
  status,
6899
- ttl_minutes: TTL_MINUTES
7202
+ ttl_minutes: TTL_MINUTES,
7203
+ // Self-declaration (migration 20260801120000). The server CANNOT derive
7204
+ // this: our announce rides the very same forwarder — headers included —
7205
+ // as an `announce_session` the agent writes itself, so the two requests
7206
+ // are byte-identical apart from these args. Without the marker a
7207
+ // skeleton row is indistinguishable from a sloppy agent session, which
7208
+ // is how 16 of 23 rows came to say nothing AND not say why. Display hint
7209
+ // only; the server keeps 'agent' once an agent has enriched the row.
7210
+ announce_source: "bridge"
6900
7211
  };
6901
7212
  if (status === "active") {
6902
7213
  const branch = await this.gitBranch();
package/build/meta.json CHANGED
@@ -1 +1 @@
1
- {"inputs":{"src/client-detect.ts":{"bytes":3979,"imports":[],"format":"esm"},"src/conventions-cache.ts":{"bytes":6619,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/forward.ts":{"bytes":27137,"imports":[{"path":"node:readline","kind":"import-statement","external":true},{"path":"node:timers/promises","kind":"import-statement","external":true},{"path":"src/client-detect.ts","kind":"import-statement","original":"./client-detect.js"},{"path":"src/conventions-cache.ts","kind":"import-statement","original":"./conventions-cache.js"}],"format":"esm"},"src/device-id.ts":{"bytes":5476,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/auth.ts":{"bytes":8214,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"src/device-id.ts","kind":"import-statement","original":"./device-id.js"}],"format":"esm"},"src/version.ts":{"bytes":306,"imports":[],"format":"esm"},"src/project-key.ts":{"bytes":2719,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/install/flags.ts":{"bytes":5809,"imports":[],"format":"esm"},"src/install/report.ts":{"bytes":4292,"imports":[],"format":"esm"},"src/install/project-root.ts":{"bytes":4032,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true}],"format":"esm"},"src/install/bridge-entry.ts":{"bytes":6171,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"node:url","kind":"import-statement","external":true}],"format":"esm"},"src/install/client-targets.ts":{"bytes":6752,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"src/install/bridge-entry.ts","kind":"import-statement","original":"./bridge-entry.js"}],"format":"esm"},"src/install/atomic-write.ts":{"bytes":4154,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/install/json-merge.ts":{"bytes":5180,"imports":[{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"./atomic-write.js"}],"format":"esm"},"src/install/toml-merge.ts":{"bytes":4819,"imports":[{"path":"smol-toml","kind":"import-statement","external":true},{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"./atomic-write.js"}],"format":"esm"},"../../packages/integration-snippets/build/index.js":{"bytes":35437,"imports":[],"format":"esm"},"src/install/preamble.ts":{"bytes":4556,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/integration-snippets/build/index.js","kind":"import-statement","original":"@maind-dev/integration-snippets"},{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"./atomic-write.js"}],"format":"esm"},"src/install/hook-merge.ts":{"bytes":13173,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"./atomic-write.js"},{"path":"src/install/bridge-entry.ts","kind":"import-statement","original":"./bridge-entry.js"}],"format":"esm"},"src/install/browser-pair.ts":{"bytes":4543,"imports":[{"path":"src/auth.ts","kind":"import-statement","original":"../auth.js"},{"path":"src/device-id.ts","kind":"import-statement","original":"../device-id.js"}],"format":"esm"},"src/install/telemetry.ts":{"bytes":3027,"imports":[],"format":"esm"},"src/install/index.ts":{"bytes":7574,"imports":[{"path":"node:os","kind":"import-statement","external":true},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/install/flags.ts","kind":"import-statement","original":"./flags.js"},{"path":"src/install/report.ts","kind":"import-statement","original":"./report.js"},{"path":"src/install/project-root.ts","kind":"import-statement","original":"./project-root.js"},{"path":"src/install/client-targets.ts","kind":"import-statement","original":"./client-targets.js"},{"path":"src/install/json-merge.ts","kind":"import-statement","original":"./json-merge.js"},{"path":"src/install/toml-merge.ts","kind":"import-statement","original":"./toml-merge.js"},{"path":"src/install/preamble.ts","kind":"import-statement","original":"./preamble.js"},{"path":"src/install/hook-merge.ts","kind":"import-statement","original":"./hook-merge.js"},{"path":"src/install/browser-pair.ts","kind":"import-statement","original":"./browser-pair.js"},{"path":"src/install/telemetry.ts","kind":"import-statement","original":"./telemetry.js"}],"format":"esm"},"../../packages/project-key/build/index.js":{"bytes":3446,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/parse/keys.js":{"bytes":448,"imports":[],"format":"esm"},"../../packages/code-index/build/parse/types.js":{"bytes":768,"imports":[],"format":"esm"},"../../packages/code-index/build/parse/lang/shared.js":{"bytes":2278,"imports":[],"format":"esm"},"../../packages/code-index/build/parse/lang/python.js":{"bytes":4535,"imports":[{"path":"../../packages/code-index/build/parse/keys.js","kind":"import-statement","original":"../keys.js"},{"path":"../../packages/code-index/build/parse/lang/shared.js","kind":"import-statement","original":"./shared.js"}],"format":"esm"},"../../packages/code-index/build/parse/lang/typescript.js":{"bytes":5949,"imports":[{"path":"../../packages/code-index/build/parse/keys.js","kind":"import-statement","original":"../keys.js"},{"path":"../../packages/code-index/build/parse/lang/shared.js","kind":"import-statement","original":"./shared.js"}],"format":"esm"},"../../packages/code-index/build/parse/tree-sitter/grammars.js":{"bytes":1941,"imports":[{"path":"node:module","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/parse/tree-sitter/parser.js":{"bytes":3231,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"web-tree-sitter","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/parse/keys.js","kind":"import-statement","original":"../keys.js"},{"path":"../../packages/code-index/build/parse/types.js","kind":"import-statement","original":"../types.js"},{"path":"../../packages/code-index/build/parse/lang/python.js","kind":"import-statement","original":"../lang/python.js"},{"path":"../../packages/code-index/build/parse/lang/typescript.js","kind":"import-statement","original":"../lang/typescript.js"},{"path":"../../packages/code-index/build/parse/lang/shared.js","kind":"import-statement","original":"../lang/shared.js"},{"path":"../../packages/code-index/build/parse/tree-sitter/grammars.js","kind":"import-statement","original":"./grammars.js"}],"format":"esm"},"../../packages/code-index/build/embed/recipe.js":{"bytes":594,"imports":[],"format":"esm"},"../../packages/code-index/build/embed/types.js":{"bytes":505,"imports":[],"format":"esm"},"../../packages/code-index/build/util/vector.js":{"bytes":707,"imports":[],"format":"esm"},"../../packages/code-index/build/graph/resolve.js":{"bytes":3928,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/parse/keys.js","kind":"import-statement","original":"../parse/keys.js"}],"format":"esm"},"../../packages/code-index/build/incremental/discover.js":{"bytes":8578,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/parse/types.js","kind":"import-statement","original":"../parse/types.js"}],"format":"esm"},"../../packages/code-index/build/incremental/hunks.js":{"bytes":6171,"imports":[{"path":"../../packages/code-index/build/incremental/discover.js","kind":"import-statement","original":"./discover.js"}],"format":"esm"},"../../packages/code-index/build/incremental/history.js":{"bytes":7302,"imports":[{"path":"../../packages/code-index/build/incremental/discover.js","kind":"import-statement","original":"./discover.js"}],"format":"esm"},"../../packages/code-index/build/repo-health/divergence.js":{"bytes":18968,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/incremental/discover.js","kind":"import-statement","original":"../incremental/discover.js"}],"format":"esm"},"../../packages/code-index/build/review/risk-rules.js":{"bytes":1958,"imports":[],"format":"esm"},"../../packages/code-index/build/review/risk-scan.js":{"bytes":1451,"imports":[{"path":"../../packages/code-index/build/review/risk-rules.js","kind":"import-statement","original":"./risk-rules.js"}],"format":"esm"},"../../packages/code-index/build/store/schema.js":{"bytes":3047,"imports":[],"format":"esm"},"../../packages/code-index/build/util/identifiers.js":{"bytes":2180,"imports":[],"format":"esm"},"../../packages/code-index/build/query/engine.js":{"bytes":20406,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/embed/recipe.js","kind":"import-statement","original":"../embed/recipe.js"},{"path":"../../packages/code-index/build/embed/types.js","kind":"import-statement","original":"../embed/types.js"},{"path":"../../packages/code-index/build/util/vector.js","kind":"import-statement","original":"../util/vector.js"},{"path":"../../packages/code-index/build/graph/resolve.js","kind":"import-statement","original":"../graph/resolve.js"},{"path":"../../packages/code-index/build/incremental/discover.js","kind":"import-statement","original":"../incremental/discover.js"},{"path":"../../packages/code-index/build/incremental/hunks.js","kind":"import-statement","original":"../incremental/hunks.js"},{"path":"../../packages/code-index/build/incremental/history.js","kind":"import-statement","original":"../incremental/history.js"},{"path":"../../packages/code-index/build/repo-health/divergence.js","kind":"import-statement","original":"../repo-health/divergence.js"},{"path":"../../packages/code-index/build/review/risk-scan.js","kind":"import-statement","original":"../review/risk-scan.js"},{"path":"../../packages/code-index/build/store/schema.js","kind":"import-statement","original":"../store/schema.js"},{"path":"../../packages/code-index/build/util/identifiers.js","kind":"import-statement","original":"../util/identifiers.js"}],"format":"esm"},"../../packages/code-index/build/store/node-sqlite.js":{"bytes":11850,"imports":[{"path":"better-sqlite3","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/store/schema.js","kind":"import-statement","original":"./schema.js"},{"path":"../../packages/code-index/build/util/identifiers.js","kind":"import-statement","original":"../util/identifiers.js"}],"format":"esm"},"../../packages/code-index/build/sync/types.js":{"bytes":1779,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/sync/client.js":{"bytes":10021,"imports":[{"path":"../../packages/code-index/build/store/schema.js","kind":"import-statement","original":"../store/schema.js"},{"path":"../../packages/code-index/build/sync/types.js","kind":"import-statement","original":"./types.js"}],"format":"esm"},"../../packages/code-index/build/node.js":{"bytes":2578,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/project-key/build/index.js","kind":"import-statement","original":"@maind/project-key"},{"path":"../../packages/code-index/build/parse/tree-sitter/parser.js","kind":"import-statement","original":"./parse/tree-sitter/parser.js"},{"path":"../../packages/code-index/build/query/engine.js","kind":"import-statement","original":"./query/engine.js"},{"path":"../../packages/code-index/build/store/node-sqlite.js","kind":"import-statement","original":"./store/node-sqlite.js"},{"path":"../../packages/code-index/build/sync/client.js","kind":"import-statement","original":"./sync/client.js"},{"path":"../../packages/code-index/build/sync/client.js","kind":"import-statement","original":"./sync/client.js"}],"format":"esm"},"src/local-tools/engine.ts":{"bytes":1138,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/node.js","kind":"import-statement","original":"@maind/code-index/node"}],"format":"esm"},"src/local-tools/token-estimate.ts":{"bytes":898,"imports":[],"format":"esm"},"src/local-tools/savings.ts":{"bytes":3781,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/local-tools/token-estimate.ts","kind":"import-statement","original":"./token-estimate.js"}],"format":"esm"},"../../packages/code-index/build/model/types.js":{"bytes":471,"imports":[],"format":"esm"},"../../packages/code-index/build/index.js":{"bytes":1537,"imports":[{"path":"../../packages/code-index/build/model/types.js","kind":"import-statement","original":"./model/types.js"},{"path":"../../packages/code-index/build/query/engine.js","kind":"import-statement","original":"./query/engine.js"},{"path":"../../packages/code-index/build/incremental/history.js","kind":"import-statement","original":"./incremental/history.js"},{"path":"../../packages/code-index/build/review/risk-rules.js","kind":"import-statement","original":"./review/risk-rules.js"},{"path":"../../packages/code-index/build/repo-health/divergence.js","kind":"import-statement","original":"./repo-health/divergence.js"},{"path":"../../packages/code-index/build/parse/types.js","kind":"import-statement","original":"./parse/types.js"},{"path":"../../packages/code-index/build/embed/types.js","kind":"import-statement","original":"./embed/types.js"},{"path":"../../packages/code-index/build/store/schema.js","kind":"import-statement","original":"./store/schema.js"}],"format":"esm"},"src/local-tools/tools.ts":{"bytes":21891,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/index.js","kind":"import-statement","original":"@maind/code-index"}],"format":"esm"},"src/local-tools/router.ts":{"bytes":5550,"imports":[{"path":"src/local-tools/engine.ts","kind":"import-statement","original":"./engine.js"},{"path":"src/local-tools/savings.ts","kind":"import-statement","original":"./savings.js"},{"path":"src/local-tools/tools.ts","kind":"import-statement","original":"./tools.js"}],"format":"esm"},"src/functions-origin.ts":{"bytes":714,"imports":[],"format":"esm"},"src/metrics-post.ts":{"bytes":2619,"imports":[{"path":"src/functions-origin.ts","kind":"import-statement","original":"./functions-origin.js"}],"format":"esm"},"src/bridge-config.ts":{"bytes":1603,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/device-id.ts","kind":"import-statement","original":"./device-id.js"}],"format":"esm"},"src/presence.ts":{"bytes":9308,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/bridge-config.ts","kind":"import-statement","original":"./bridge-config.js"}],"format":"esm"},"../../packages/claude-code-telemetry/dist/types.js":{"bytes":338,"imports":[],"format":"esm"},"../../packages/claude-code-telemetry/dist/transcript.js":{"bytes":2017,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/decisions.js":{"bytes":6845,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/effort.js":{"bytes":1858,"imports":[],"format":"esm"},"../../packages/claude-code-telemetry/dist/session-analysis.js":{"bytes":12237,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"../../packages/claude-code-telemetry/dist/effort.js","kind":"import-statement","original":"./effort.js"}],"format":"esm"},"../../packages/claude-code-telemetry/dist/parse.js":{"bytes":7254,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"../../packages/claude-code-telemetry/dist/effort.js","kind":"import-statement","original":"./effort.js"},{"path":"../../packages/claude-code-telemetry/dist/types.js","kind":"import-statement","original":"./types.js"}],"format":"esm"},"../../packages/claude-code-telemetry/dist/windows.js":{"bytes":3963,"imports":[],"format":"esm"},"../../packages/claude-code-telemetry/dist/projects.js":{"bytes":3166,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/index.js":{"bytes":685,"imports":[{"path":"../../packages/claude-code-telemetry/dist/types.js","kind":"import-statement","original":"./types.js"},{"path":"../../packages/claude-code-telemetry/dist/transcript.js","kind":"import-statement","original":"./transcript.js"},{"path":"../../packages/claude-code-telemetry/dist/decisions.js","kind":"import-statement","original":"./decisions.js"},{"path":"../../packages/claude-code-telemetry/dist/session-analysis.js","kind":"import-statement","original":"./session-analysis.js"},{"path":"../../packages/claude-code-telemetry/dist/parse.js","kind":"import-statement","original":"./parse.js"},{"path":"../../packages/claude-code-telemetry/dist/effort.js","kind":"import-statement","original":"./effort.js"},{"path":"../../packages/claude-code-telemetry/dist/windows.js","kind":"import-statement","original":"./windows.js"},{"path":"../../packages/claude-code-telemetry/dist/projects.js","kind":"import-statement","original":"./projects.js"}],"format":"esm"},"src/hooks/api.ts":{"bytes":2311,"imports":[{"path":"src/device-id.ts","kind":"import-statement","original":"../device-id.js"}],"format":"esm"},"src/hooks/hook-input.ts":{"bytes":1677,"imports":[],"format":"esm"},"src/hooks/state.ts":{"bytes":4970,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/index.ts":{"bytes":15805,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/claude-code-telemetry/dist/index.js","kind":"import-statement","original":"@maind/claude-code-telemetry"},{"path":"src/device-id.ts","kind":"import-statement","original":"../device-id.js"},{"path":"src/hooks/api.ts","kind":"import-statement","original":"./api.js"},{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"./hook-input.js"},{"path":"src/hooks/state.ts","kind":"import-statement","original":"./state.js"}],"format":"esm"},"src/session-end/index.ts":{"bytes":3073,"imports":[{"path":"../../packages/claude-code-telemetry/dist/index.js","kind":"import-statement","original":"@maind/claude-code-telemetry"},{"path":"src/device-id.ts","kind":"import-statement","original":"../device-id.js"},{"path":"src/hooks/api.ts","kind":"import-statement","original":"../hooks/api.js"},{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"../hooks/hook-input.js"},{"path":"src/hooks/index.ts","kind":"import-statement","original":"../hooks/index.js"},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"}],"format":"esm"},"src/index.ts":{"bytes":13767,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/forward.ts","kind":"import-statement","original":"./forward.js"},{"path":"src/device-id.ts","kind":"import-statement","original":"./device-id.js"},{"path":"src/auth.ts","kind":"import-statement","original":"./auth.js"},{"path":"src/version.ts","kind":"import-statement","original":"./version.js"},{"path":"src/project-key.ts","kind":"import-statement","original":"./project-key.js"},{"path":"src/install/index.ts","kind":"import-statement","original":"./install/index.js"},{"path":"src/local-tools/router.ts","kind":"import-statement","original":"./local-tools/router.js"},{"path":"src/local-tools/savings.ts","kind":"import-statement","original":"./local-tools/savings.js"},{"path":"src/metrics-post.ts","kind":"import-statement","original":"./metrics-post.js"},{"path":"src/presence.ts","kind":"import-statement","original":"./presence.js"},{"path":"src/session-end/index.ts","kind":"dynamic-import","original":"./session-end/index.js"},{"path":"src/hooks/index.ts","kind":"dynamic-import","original":"./hooks/index.js"}],"format":"esm"}},"outputs":{"build/index.js":{"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:url","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"smol-toml","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"web-tree-sitter","kind":"import-statement","external":true},{"path":"node:module","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"better-sqlite3","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/device-id.ts":{"bytesInOutput":2427},"src/version.ts":{"bytesInOutput":127},"../../packages/claude-code-telemetry/dist/types.js":{"bytesInOutput":110},"../../packages/claude-code-telemetry/dist/transcript.js":{"bytesInOutput":1493},"../../packages/claude-code-telemetry/dist/decisions.js":{"bytesInOutput":118},"../../packages/claude-code-telemetry/dist/effort.js":{"bytesInOutput":596},"../../packages/claude-code-telemetry/dist/session-analysis.js":{"bytesInOutput":7796},"../../packages/claude-code-telemetry/dist/parse.js":{"bytesInOutput":147},"../../packages/claude-code-telemetry/dist/windows.js":{"bytesInOutput":219},"../../packages/claude-code-telemetry/dist/projects.js":{"bytesInOutput":326},"../../packages/claude-code-telemetry/dist/index.js":{"bytesInOutput":279},"src/hooks/api.ts":{"bytesInOutput":1232},"src/hooks/hook-input.ts":{"bytesInOutput":945},"src/hooks/state.ts":{"bytesInOutput":1728},"src/hooks/index.ts":{"bytesInOutput":9522},"src/session-end/index.ts":{"bytesInOutput":1707},"src/index.ts":{"bytesInOutput":8052},"src/forward.ts":{"bytesInOutput":17599},"src/client-detect.ts":{"bytesInOutput":2068},"src/conventions-cache.ts":{"bytesInOutput":3228},"src/auth.ts":{"bytesInOutput":5107},"src/project-key.ts":{"bytesInOutput":1352},"src/install/index.ts":{"bytesInOutput":5157},"src/install/flags.ts":{"bytesInOutput":4261},"src/install/report.ts":{"bytesInOutput":3091},"src/install/project-root.ts":{"bytesInOutput":2188},"src/install/client-targets.ts":{"bytesInOutput":3218},"src/install/bridge-entry.ts":{"bytesInOutput":1714},"src/install/atomic-write.ts":{"bytesInOutput":1758},"src/install/json-merge.ts":{"bytesInOutput":3341},"src/install/toml-merge.ts":{"bytesInOutput":3262},"src/install/preamble.ts":{"bytesInOutput":2812},"../../packages/integration-snippets/build/index.js":{"bytesInOutput":27539},"src/install/hook-merge.ts":{"bytesInOutput":7303},"src/install/browser-pair.ts":{"bytesInOutput":2701},"src/install/telemetry.ts":{"bytesInOutput":1798},"src/local-tools/engine.ts":{"bytesInOutput":483},"../../packages/code-index/build/node.js":{"bytesInOutput":530},"../../packages/code-index/build/parse/tree-sitter/parser.js":{"bytesInOutput":2043},"../../packages/code-index/build/parse/keys.js":{"bytesInOutput":169},"../../packages/code-index/build/parse/types.js":{"bytesInOutput":546},"../../packages/code-index/build/parse/lang/shared.js":{"bytesInOutput":1131},"../../packages/code-index/build/parse/lang/python.js":{"bytesInOutput":3747},"../../packages/code-index/build/parse/lang/typescript.js":{"bytesInOutput":4716},"../../packages/code-index/build/parse/tree-sitter/grammars.js":{"bytesInOutput":523},"../../packages/code-index/build/query/engine.js":{"bytesInOutput":14515},"../../packages/code-index/build/embed/recipe.js":{"bytesInOutput":197},"../../packages/code-index/build/embed/types.js":{"bytesInOutput":105},"../../packages/code-index/build/util/vector.js":{"bytesInOutput":339},"../../packages/code-index/build/graph/resolve.js":{"bytesInOutput":2482},"../../packages/code-index/build/incremental/discover.js":{"bytesInOutput":4835},"../../packages/code-index/build/incremental/hunks.js":{"bytesInOutput":3945},"../../packages/code-index/build/incremental/history.js":{"bytesInOutput":3432},"../../packages/code-index/build/repo-health/divergence.js":{"bytesInOutput":12934},"../../packages/code-index/build/review/risk-rules.js":{"bytesInOutput":876},"../../packages/code-index/build/review/risk-scan.js":{"bytesInOutput":802},"../../packages/code-index/build/store/schema.js":{"bytesInOutput":2170},"../../packages/code-index/build/util/identifiers.js":{"bytesInOutput":1094},"../../packages/code-index/build/store/node-sqlite.js":{"bytesInOutput":9759},"src/local-tools/savings.ts":{"bytesInOutput":1926},"src/local-tools/token-estimate.ts":{"bytesInOutput":133},"src/local-tools/tools.ts":{"bytesInOutput":18691},"../../packages/code-index/build/index.js":{"bytesInOutput":34},"src/local-tools/router.ts":{"bytesInOutput":3828},"src/functions-origin.ts":{"bytesInOutput":259},"src/metrics-post.ts":{"bytesInOutput":1285},"src/presence.ts":{"bytesInOutput":4772},"src/bridge-config.ts":{"bytesInOutput":789}},"bytes":242975}}}
1
+ {"inputs":{"src/client-detect.ts":{"bytes":3979,"imports":[],"format":"esm"},"src/conventions-cache.ts":{"bytes":6619,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/forward.ts":{"bytes":27137,"imports":[{"path":"node:readline","kind":"import-statement","external":true},{"path":"node:timers/promises","kind":"import-statement","external":true},{"path":"src/client-detect.ts","kind":"import-statement","original":"./client-detect.js"},{"path":"src/conventions-cache.ts","kind":"import-statement","original":"./conventions-cache.js"}],"format":"esm"},"src/device-id.ts":{"bytes":5476,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/auth.ts":{"bytes":8214,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"src/device-id.ts","kind":"import-statement","original":"./device-id.js"}],"format":"esm"},"src/version.ts":{"bytes":306,"imports":[],"format":"esm"},"src/project-key.ts":{"bytes":2719,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/install/flags.ts":{"bytes":5809,"imports":[],"format":"esm"},"src/install/report.ts":{"bytes":4292,"imports":[],"format":"esm"},"src/install/project-root.ts":{"bytes":4032,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true}],"format":"esm"},"src/install/bridge-entry.ts":{"bytes":6171,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"node:url","kind":"import-statement","external":true}],"format":"esm"},"src/install/client-targets.ts":{"bytes":6752,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"src/install/bridge-entry.ts","kind":"import-statement","original":"./bridge-entry.js"}],"format":"esm"},"src/install/atomic-write.ts":{"bytes":4154,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/install/json-merge.ts":{"bytes":5180,"imports":[{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"./atomic-write.js"}],"format":"esm"},"src/install/toml-merge.ts":{"bytes":4819,"imports":[{"path":"smol-toml","kind":"import-statement","external":true},{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"./atomic-write.js"}],"format":"esm"},"../../packages/integration-snippets/build/index.js":{"bytes":35437,"imports":[],"format":"esm"},"src/install/preamble.ts":{"bytes":4556,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/integration-snippets/build/index.js","kind":"import-statement","original":"@maind-dev/integration-snippets"},{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"./atomic-write.js"}],"format":"esm"},"src/install/hook-merge.ts":{"bytes":13173,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"./atomic-write.js"},{"path":"src/install/bridge-entry.ts","kind":"import-statement","original":"./bridge-entry.js"}],"format":"esm"},"src/install/browser-pair.ts":{"bytes":4543,"imports":[{"path":"src/auth.ts","kind":"import-statement","original":"../auth.js"},{"path":"src/device-id.ts","kind":"import-statement","original":"../device-id.js"}],"format":"esm"},"src/install/telemetry.ts":{"bytes":3027,"imports":[],"format":"esm"},"src/install/index.ts":{"bytes":7574,"imports":[{"path":"node:os","kind":"import-statement","external":true},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/install/flags.ts","kind":"import-statement","original":"./flags.js"},{"path":"src/install/report.ts","kind":"import-statement","original":"./report.js"},{"path":"src/install/project-root.ts","kind":"import-statement","original":"./project-root.js"},{"path":"src/install/client-targets.ts","kind":"import-statement","original":"./client-targets.js"},{"path":"src/install/json-merge.ts","kind":"import-statement","original":"./json-merge.js"},{"path":"src/install/toml-merge.ts","kind":"import-statement","original":"./toml-merge.js"},{"path":"src/install/preamble.ts","kind":"import-statement","original":"./preamble.js"},{"path":"src/install/hook-merge.ts","kind":"import-statement","original":"./hook-merge.js"},{"path":"src/install/browser-pair.ts","kind":"import-statement","original":"./browser-pair.js"},{"path":"src/install/telemetry.ts","kind":"import-statement","original":"./telemetry.js"}],"format":"esm"},"../../packages/project-key/build/index.js":{"bytes":3446,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/parse/keys.js":{"bytes":448,"imports":[],"format":"esm"},"../../packages/code-index/build/parse/types.js":{"bytes":768,"imports":[],"format":"esm"},"../../packages/code-index/build/parse/lang/shared.js":{"bytes":2278,"imports":[],"format":"esm"},"../../packages/code-index/build/parse/lang/python.js":{"bytes":4535,"imports":[{"path":"../../packages/code-index/build/parse/keys.js","kind":"import-statement","original":"../keys.js"},{"path":"../../packages/code-index/build/parse/lang/shared.js","kind":"import-statement","original":"./shared.js"}],"format":"esm"},"../../packages/code-index/build/parse/lang/typescript.js":{"bytes":5949,"imports":[{"path":"../../packages/code-index/build/parse/keys.js","kind":"import-statement","original":"../keys.js"},{"path":"../../packages/code-index/build/parse/lang/shared.js","kind":"import-statement","original":"./shared.js"}],"format":"esm"},"../../packages/code-index/build/parse/tree-sitter/grammars.js":{"bytes":1941,"imports":[{"path":"node:module","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/parse/tree-sitter/parser.js":{"bytes":3231,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"web-tree-sitter","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/parse/keys.js","kind":"import-statement","original":"../keys.js"},{"path":"../../packages/code-index/build/parse/types.js","kind":"import-statement","original":"../types.js"},{"path":"../../packages/code-index/build/parse/lang/python.js","kind":"import-statement","original":"../lang/python.js"},{"path":"../../packages/code-index/build/parse/lang/typescript.js","kind":"import-statement","original":"../lang/typescript.js"},{"path":"../../packages/code-index/build/parse/lang/shared.js","kind":"import-statement","original":"../lang/shared.js"},{"path":"../../packages/code-index/build/parse/tree-sitter/grammars.js","kind":"import-statement","original":"./grammars.js"}],"format":"esm"},"../../packages/code-index/build/embed/recipe.js":{"bytes":594,"imports":[],"format":"esm"},"../../packages/code-index/build/embed/types.js":{"bytes":505,"imports":[],"format":"esm"},"../../packages/code-index/build/util/vector.js":{"bytes":707,"imports":[],"format":"esm"},"../../packages/code-index/build/graph/resolve.js":{"bytes":3928,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/parse/keys.js","kind":"import-statement","original":"../parse/keys.js"}],"format":"esm"},"../../packages/code-index/build/incremental/discover.js":{"bytes":8578,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/parse/types.js","kind":"import-statement","original":"../parse/types.js"}],"format":"esm"},"../../packages/code-index/build/incremental/hunks.js":{"bytes":6171,"imports":[{"path":"../../packages/code-index/build/incremental/discover.js","kind":"import-statement","original":"./discover.js"}],"format":"esm"},"../../packages/code-index/build/incremental/history.js":{"bytes":7302,"imports":[{"path":"../../packages/code-index/build/incremental/discover.js","kind":"import-statement","original":"./discover.js"}],"format":"esm"},"../../packages/code-index/build/repo-health/divergence.js":{"bytes":18968,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/incremental/discover.js","kind":"import-statement","original":"../incremental/discover.js"}],"format":"esm"},"../../packages/code-index/build/repo-health/number-collisions.js":{"bytes":15364,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/incremental/discover.js","kind":"import-statement","original":"../incremental/discover.js"}],"format":"esm"},"../../packages/code-index/build/review/risk-rules.js":{"bytes":1958,"imports":[],"format":"esm"},"../../packages/code-index/build/review/risk-scan.js":{"bytes":1451,"imports":[{"path":"../../packages/code-index/build/review/risk-rules.js","kind":"import-statement","original":"./risk-rules.js"}],"format":"esm"},"../../packages/code-index/build/store/schema.js":{"bytes":3047,"imports":[],"format":"esm"},"../../packages/code-index/build/util/identifiers.js":{"bytes":2180,"imports":[],"format":"esm"},"../../packages/code-index/build/query/engine.js":{"bytes":20772,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/embed/recipe.js","kind":"import-statement","original":"../embed/recipe.js"},{"path":"../../packages/code-index/build/embed/types.js","kind":"import-statement","original":"../embed/types.js"},{"path":"../../packages/code-index/build/util/vector.js","kind":"import-statement","original":"../util/vector.js"},{"path":"../../packages/code-index/build/graph/resolve.js","kind":"import-statement","original":"../graph/resolve.js"},{"path":"../../packages/code-index/build/incremental/discover.js","kind":"import-statement","original":"../incremental/discover.js"},{"path":"../../packages/code-index/build/incremental/hunks.js","kind":"import-statement","original":"../incremental/hunks.js"},{"path":"../../packages/code-index/build/incremental/history.js","kind":"import-statement","original":"../incremental/history.js"},{"path":"../../packages/code-index/build/repo-health/divergence.js","kind":"import-statement","original":"../repo-health/divergence.js"},{"path":"../../packages/code-index/build/repo-health/number-collisions.js","kind":"import-statement","original":"../repo-health/number-collisions.js"},{"path":"../../packages/code-index/build/review/risk-scan.js","kind":"import-statement","original":"../review/risk-scan.js"},{"path":"../../packages/code-index/build/store/schema.js","kind":"import-statement","original":"../store/schema.js"},{"path":"../../packages/code-index/build/util/identifiers.js","kind":"import-statement","original":"../util/identifiers.js"}],"format":"esm"},"../../packages/code-index/build/store/node-sqlite.js":{"bytes":11850,"imports":[{"path":"better-sqlite3","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/store/schema.js","kind":"import-statement","original":"./schema.js"},{"path":"../../packages/code-index/build/util/identifiers.js","kind":"import-statement","original":"../util/identifiers.js"}],"format":"esm"},"../../packages/code-index/build/sync/types.js":{"bytes":1779,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/sync/client.js":{"bytes":10021,"imports":[{"path":"../../packages/code-index/build/store/schema.js","kind":"import-statement","original":"../store/schema.js"},{"path":"../../packages/code-index/build/sync/types.js","kind":"import-statement","original":"./types.js"}],"format":"esm"},"../../packages/code-index/build/node.js":{"bytes":2578,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/project-key/build/index.js","kind":"import-statement","original":"@maind/project-key"},{"path":"../../packages/code-index/build/parse/tree-sitter/parser.js","kind":"import-statement","original":"./parse/tree-sitter/parser.js"},{"path":"../../packages/code-index/build/query/engine.js","kind":"import-statement","original":"./query/engine.js"},{"path":"../../packages/code-index/build/store/node-sqlite.js","kind":"import-statement","original":"./store/node-sqlite.js"},{"path":"../../packages/code-index/build/sync/client.js","kind":"import-statement","original":"./sync/client.js"},{"path":"../../packages/code-index/build/sync/client.js","kind":"import-statement","original":"./sync/client.js"}],"format":"esm"},"src/local-tools/engine.ts":{"bytes":1138,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/node.js","kind":"import-statement","original":"@maind/code-index/node"}],"format":"esm"},"src/local-tools/token-estimate.ts":{"bytes":898,"imports":[],"format":"esm"},"src/local-tools/savings.ts":{"bytes":3781,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/local-tools/token-estimate.ts","kind":"import-statement","original":"./token-estimate.js"}],"format":"esm"},"../../packages/code-index/build/model/types.js":{"bytes":471,"imports":[],"format":"esm"},"../../packages/code-index/build/index.js":{"bytes":1897,"imports":[{"path":"../../packages/code-index/build/model/types.js","kind":"import-statement","original":"./model/types.js"},{"path":"../../packages/code-index/build/query/engine.js","kind":"import-statement","original":"./query/engine.js"},{"path":"../../packages/code-index/build/incremental/history.js","kind":"import-statement","original":"./incremental/history.js"},{"path":"../../packages/code-index/build/review/risk-rules.js","kind":"import-statement","original":"./review/risk-rules.js"},{"path":"../../packages/code-index/build/repo-health/divergence.js","kind":"import-statement","original":"./repo-health/divergence.js"},{"path":"../../packages/code-index/build/repo-health/number-collisions.js","kind":"import-statement","original":"./repo-health/number-collisions.js"},{"path":"../../packages/code-index/build/parse/types.js","kind":"import-statement","original":"./parse/types.js"},{"path":"../../packages/code-index/build/embed/types.js","kind":"import-statement","original":"./embed/types.js"},{"path":"../../packages/code-index/build/store/schema.js","kind":"import-statement","original":"./store/schema.js"}],"format":"esm"},"src/local-tools/tools.ts":{"bytes":25815,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/index.js","kind":"import-statement","original":"@maind/code-index"}],"format":"esm"},"src/local-tools/router.ts":{"bytes":5550,"imports":[{"path":"src/local-tools/engine.ts","kind":"import-statement","original":"./engine.js"},{"path":"src/local-tools/savings.ts","kind":"import-statement","original":"./savings.js"},{"path":"src/local-tools/tools.ts","kind":"import-statement","original":"./tools.js"}],"format":"esm"},"src/functions-origin.ts":{"bytes":714,"imports":[],"format":"esm"},"src/metrics-post.ts":{"bytes":2619,"imports":[{"path":"src/functions-origin.ts","kind":"import-statement","original":"./functions-origin.js"}],"format":"esm"},"src/bridge-config.ts":{"bytes":1603,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/device-id.ts","kind":"import-statement","original":"./device-id.js"}],"format":"esm"},"src/presence.ts":{"bytes":9888,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/bridge-config.ts","kind":"import-statement","original":"./bridge-config.js"}],"format":"esm"},"../../packages/claude-code-telemetry/dist/types.js":{"bytes":338,"imports":[],"format":"esm"},"../../packages/claude-code-telemetry/dist/transcript.js":{"bytes":2017,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/decisions.js":{"bytes":6845,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/effort.js":{"bytes":1858,"imports":[],"format":"esm"},"../../packages/claude-code-telemetry/dist/session-analysis.js":{"bytes":12237,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"../../packages/claude-code-telemetry/dist/effort.js","kind":"import-statement","original":"./effort.js"}],"format":"esm"},"../../packages/claude-code-telemetry/dist/parse.js":{"bytes":7254,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"../../packages/claude-code-telemetry/dist/effort.js","kind":"import-statement","original":"./effort.js"},{"path":"../../packages/claude-code-telemetry/dist/types.js","kind":"import-statement","original":"./types.js"}],"format":"esm"},"../../packages/claude-code-telemetry/dist/windows.js":{"bytes":3963,"imports":[],"format":"esm"},"../../packages/claude-code-telemetry/dist/projects.js":{"bytes":3166,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/index.js":{"bytes":685,"imports":[{"path":"../../packages/claude-code-telemetry/dist/types.js","kind":"import-statement","original":"./types.js"},{"path":"../../packages/claude-code-telemetry/dist/transcript.js","kind":"import-statement","original":"./transcript.js"},{"path":"../../packages/claude-code-telemetry/dist/decisions.js","kind":"import-statement","original":"./decisions.js"},{"path":"../../packages/claude-code-telemetry/dist/session-analysis.js","kind":"import-statement","original":"./session-analysis.js"},{"path":"../../packages/claude-code-telemetry/dist/parse.js","kind":"import-statement","original":"./parse.js"},{"path":"../../packages/claude-code-telemetry/dist/effort.js","kind":"import-statement","original":"./effort.js"},{"path":"../../packages/claude-code-telemetry/dist/windows.js","kind":"import-statement","original":"./windows.js"},{"path":"../../packages/claude-code-telemetry/dist/projects.js","kind":"import-statement","original":"./projects.js"}],"format":"esm"},"src/hooks/api.ts":{"bytes":2311,"imports":[{"path":"src/device-id.ts","kind":"import-statement","original":"../device-id.js"}],"format":"esm"},"src/hooks/hook-input.ts":{"bytes":1677,"imports":[],"format":"esm"},"src/hooks/state.ts":{"bytes":4970,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/index.ts":{"bytes":15805,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/claude-code-telemetry/dist/index.js","kind":"import-statement","original":"@maind/claude-code-telemetry"},{"path":"src/device-id.ts","kind":"import-statement","original":"../device-id.js"},{"path":"src/hooks/api.ts","kind":"import-statement","original":"./api.js"},{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"./hook-input.js"},{"path":"src/hooks/state.ts","kind":"import-statement","original":"./state.js"}],"format":"esm"},"src/session-end/index.ts":{"bytes":3073,"imports":[{"path":"../../packages/claude-code-telemetry/dist/index.js","kind":"import-statement","original":"@maind/claude-code-telemetry"},{"path":"src/device-id.ts","kind":"import-statement","original":"../device-id.js"},{"path":"src/hooks/api.ts","kind":"import-statement","original":"../hooks/api.js"},{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"../hooks/hook-input.js"},{"path":"src/hooks/index.ts","kind":"import-statement","original":"../hooks/index.js"},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"}],"format":"esm"},"src/index.ts":{"bytes":13767,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/forward.ts","kind":"import-statement","original":"./forward.js"},{"path":"src/device-id.ts","kind":"import-statement","original":"./device-id.js"},{"path":"src/auth.ts","kind":"import-statement","original":"./auth.js"},{"path":"src/version.ts","kind":"import-statement","original":"./version.js"},{"path":"src/project-key.ts","kind":"import-statement","original":"./project-key.js"},{"path":"src/install/index.ts","kind":"import-statement","original":"./install/index.js"},{"path":"src/local-tools/router.ts","kind":"import-statement","original":"./local-tools/router.js"},{"path":"src/local-tools/savings.ts","kind":"import-statement","original":"./local-tools/savings.js"},{"path":"src/metrics-post.ts","kind":"import-statement","original":"./metrics-post.js"},{"path":"src/presence.ts","kind":"import-statement","original":"./presence.js"},{"path":"src/session-end/index.ts","kind":"dynamic-import","original":"./session-end/index.js"},{"path":"src/hooks/index.ts","kind":"dynamic-import","original":"./hooks/index.js"}],"format":"esm"}},"outputs":{"build/index.js":{"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:url","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"smol-toml","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"web-tree-sitter","kind":"import-statement","external":true},{"path":"node:module","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"better-sqlite3","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/device-id.ts":{"bytesInOutput":2427},"src/version.ts":{"bytesInOutput":127},"../../packages/claude-code-telemetry/dist/types.js":{"bytesInOutput":110},"../../packages/claude-code-telemetry/dist/transcript.js":{"bytesInOutput":1496},"../../packages/claude-code-telemetry/dist/decisions.js":{"bytesInOutput":118},"../../packages/claude-code-telemetry/dist/effort.js":{"bytesInOutput":596},"../../packages/claude-code-telemetry/dist/session-analysis.js":{"bytesInOutput":7796},"../../packages/claude-code-telemetry/dist/parse.js":{"bytesInOutput":147},"../../packages/claude-code-telemetry/dist/windows.js":{"bytesInOutput":219},"../../packages/claude-code-telemetry/dist/projects.js":{"bytesInOutput":326},"../../packages/claude-code-telemetry/dist/index.js":{"bytesInOutput":279},"src/hooks/api.ts":{"bytesInOutput":1232},"src/hooks/hook-input.ts":{"bytesInOutput":945},"src/hooks/state.ts":{"bytesInOutput":1728},"src/hooks/index.ts":{"bytesInOutput":9522},"src/session-end/index.ts":{"bytesInOutput":1707},"src/index.ts":{"bytesInOutput":8052},"src/forward.ts":{"bytesInOutput":17599},"src/client-detect.ts":{"bytesInOutput":2068},"src/conventions-cache.ts":{"bytesInOutput":3228},"src/auth.ts":{"bytesInOutput":5109},"src/project-key.ts":{"bytesInOutput":1352},"src/install/index.ts":{"bytesInOutput":5157},"src/install/flags.ts":{"bytesInOutput":4261},"src/install/report.ts":{"bytesInOutput":3096},"src/install/project-root.ts":{"bytesInOutput":2188},"src/install/client-targets.ts":{"bytesInOutput":3218},"src/install/bridge-entry.ts":{"bytesInOutput":1714},"src/install/atomic-write.ts":{"bytesInOutput":1760},"src/install/json-merge.ts":{"bytesInOutput":3341},"src/install/toml-merge.ts":{"bytesInOutput":3262},"src/install/preamble.ts":{"bytesInOutput":2812},"../../packages/integration-snippets/build/index.js":{"bytesInOutput":27539},"src/install/hook-merge.ts":{"bytesInOutput":7303},"src/install/browser-pair.ts":{"bytesInOutput":2701},"src/install/telemetry.ts":{"bytesInOutput":1798},"src/local-tools/engine.ts":{"bytesInOutput":483},"../../packages/code-index/build/node.js":{"bytesInOutput":530},"../../packages/code-index/build/parse/tree-sitter/parser.js":{"bytesInOutput":2043},"../../packages/code-index/build/parse/keys.js":{"bytesInOutput":169},"../../packages/code-index/build/parse/types.js":{"bytesInOutput":546},"../../packages/code-index/build/parse/lang/shared.js":{"bytesInOutput":1131},"../../packages/code-index/build/parse/lang/python.js":{"bytesInOutput":3747},"../../packages/code-index/build/parse/lang/typescript.js":{"bytesInOutput":4716},"../../packages/code-index/build/parse/tree-sitter/grammars.js":{"bytesInOutput":523},"../../packages/code-index/build/query/engine.js":{"bytesInOutput":14617},"../../packages/code-index/build/embed/recipe.js":{"bytesInOutput":197},"../../packages/code-index/build/embed/types.js":{"bytesInOutput":105},"../../packages/code-index/build/util/vector.js":{"bytesInOutput":339},"../../packages/code-index/build/graph/resolve.js":{"bytesInOutput":2482},"../../packages/code-index/build/incremental/discover.js":{"bytesInOutput":4835},"../../packages/code-index/build/incremental/hunks.js":{"bytesInOutput":3945},"../../packages/code-index/build/incremental/history.js":{"bytesInOutput":3435},"../../packages/code-index/build/repo-health/divergence.js":{"bytesInOutput":12934},"../../packages/code-index/build/repo-health/number-collisions.js":{"bytesInOutput":9037},"../../packages/code-index/build/review/risk-rules.js":{"bytesInOutput":876},"../../packages/code-index/build/review/risk-scan.js":{"bytesInOutput":802},"../../packages/code-index/build/store/schema.js":{"bytesInOutput":2170},"../../packages/code-index/build/util/identifiers.js":{"bytesInOutput":1094},"../../packages/code-index/build/store/node-sqlite.js":{"bytesInOutput":9759},"src/local-tools/savings.ts":{"bytesInOutput":1926},"src/local-tools/token-estimate.ts":{"bytesInOutput":133},"src/local-tools/tools.ts":{"bytesInOutput":22413},"../../packages/code-index/build/index.js":{"bytesInOutput":34},"src/local-tools/router.ts":{"bytesInOutput":3828},"src/functions-origin.ts":{"bytesInOutput":259},"src/metrics-post.ts":{"bytesInOutput":1285},"src/presence.ts":{"bytesInOutput":5352},"src/bridge-config.ts":{"bytesInOutput":789}},"bytes":256500}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maind-dev/mcp-bridge",
3
- "version": "0.16.0",
3
+ "version": "0.18.0",
4
4
  "description": "Local MCP bridge for maind.dev \u2014 wraps any MCP-compatible client (Claude Code, Cursor, Windsurf) and pins your API key to a single device via the maind device authorization flow.",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",