@maind-dev/mcp-bridge 0.20.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +384 -75
- package/build/meta.json +1 -1
- package/package.json +15 -16
package/build/index.js
CHANGED
|
@@ -172,6 +172,13 @@ function clearApiKey() {
|
|
|
172
172
|
if (!existsSync(file)) return;
|
|
173
173
|
writeFileSync2(file, "", { encoding: "utf8", mode: 384 });
|
|
174
174
|
}
|
|
175
|
+
function bridgeLabel() {
|
|
176
|
+
try {
|
|
177
|
+
return `mcp-bridge-${hostname()}`;
|
|
178
|
+
} catch {
|
|
179
|
+
return "mcp-bridge";
|
|
180
|
+
}
|
|
181
|
+
}
|
|
175
182
|
function clientMeta(version) {
|
|
176
183
|
return {
|
|
177
184
|
os: `${platform()} ${release()}`,
|
|
@@ -195,7 +202,7 @@ var BRIDGE_VERSION;
|
|
|
195
202
|
var init_version = __esm({
|
|
196
203
|
"src/version.ts"() {
|
|
197
204
|
"use strict";
|
|
198
|
-
BRIDGE_VERSION = "0.
|
|
205
|
+
BRIDGE_VERSION = "0.22.0";
|
|
199
206
|
}
|
|
200
207
|
});
|
|
201
208
|
|
|
@@ -625,16 +632,16 @@ function toPosix(p) {
|
|
|
625
632
|
return sep === "/" ? p : p.split(sep).join("/");
|
|
626
633
|
}
|
|
627
634
|
function classify(paths) {
|
|
628
|
-
const
|
|
635
|
+
const out2 = [];
|
|
629
636
|
for (const raw of paths) {
|
|
630
637
|
const path8 = toPosix(raw).trim();
|
|
631
638
|
if (!path8 || isSkippablePath(path8))
|
|
632
639
|
continue;
|
|
633
640
|
const language = languageForPath(path8);
|
|
634
641
|
if (language)
|
|
635
|
-
|
|
642
|
+
out2.push({ path: path8, language });
|
|
636
643
|
}
|
|
637
|
-
return
|
|
644
|
+
return out2;
|
|
638
645
|
}
|
|
639
646
|
function classifyPaths(paths) {
|
|
640
647
|
return classify(paths);
|
|
@@ -1063,12 +1070,12 @@ import { execFileSync as execFileSync4 } from "node:child_process";
|
|
|
1063
1070
|
import { existsSync as existsSync3, readFileSync as readFileSync3 } from "node:fs";
|
|
1064
1071
|
import { posix as posix3 } from "node:path";
|
|
1065
1072
|
function computeDivergence(facts) {
|
|
1066
|
-
const
|
|
1073
|
+
const out2 = [];
|
|
1067
1074
|
if (!facts.isRepo)
|
|
1068
|
-
return
|
|
1075
|
+
return out2;
|
|
1069
1076
|
const onFeatureBranch = facts.branch != null && facts.defaultBranch != null && facts.branch !== facts.defaultBranch && !facts.detachedHead;
|
|
1070
1077
|
if (facts.detachedHead) {
|
|
1071
|
-
|
|
1078
|
+
out2.push({
|
|
1072
1079
|
id: "worktree.detached-head",
|
|
1073
1080
|
status: "warn",
|
|
1074
1081
|
scope: "worktree",
|
|
@@ -1079,7 +1086,7 @@ function computeDivergence(facts) {
|
|
|
1079
1086
|
}
|
|
1080
1087
|
if (onFeatureBranch) {
|
|
1081
1088
|
if (facts.upstream == null) {
|
|
1082
|
-
|
|
1089
|
+
out2.push({
|
|
1083
1090
|
id: "branch.no-upstream",
|
|
1084
1091
|
status: "open",
|
|
1085
1092
|
scope: "branch",
|
|
@@ -1090,7 +1097,7 @@ function computeDivergence(facts) {
|
|
|
1090
1097
|
} else {
|
|
1091
1098
|
const upstreamBranch = facts.upstream.split("/").slice(1).join("/");
|
|
1092
1099
|
if (upstreamBranch && upstreamBranch !== facts.branch) {
|
|
1093
|
-
|
|
1100
|
+
out2.push({
|
|
1094
1101
|
id: "branch.upstream-mismatch",
|
|
1095
1102
|
status: "open",
|
|
1096
1103
|
scope: "branch",
|
|
@@ -1100,7 +1107,7 @@ function computeDivergence(facts) {
|
|
|
1100
1107
|
});
|
|
1101
1108
|
}
|
|
1102
1109
|
if (facts.remoteTrackingExists === false) {
|
|
1103
|
-
|
|
1110
|
+
out2.push({
|
|
1104
1111
|
id: "branch.unpushed-missing-remote",
|
|
1105
1112
|
status: "open",
|
|
1106
1113
|
scope: "branch",
|
|
@@ -1114,7 +1121,7 @@ function computeDivergence(facts) {
|
|
|
1114
1121
|
const behind = facts.behind ?? 0;
|
|
1115
1122
|
const ahead = facts.ahead ?? 0;
|
|
1116
1123
|
if (behind > 0) {
|
|
1117
|
-
|
|
1124
|
+
out2.push({
|
|
1118
1125
|
id: "branch.behind",
|
|
1119
1126
|
status: "info",
|
|
1120
1127
|
scope: "branch",
|
|
@@ -1124,7 +1131,7 @@ function computeDivergence(facts) {
|
|
|
1124
1131
|
});
|
|
1125
1132
|
}
|
|
1126
1133
|
if (facts.upstream != null && facts.headMatchesUpstream === false) {
|
|
1127
|
-
|
|
1134
|
+
out2.push({
|
|
1128
1135
|
id: "branch.unpushed-commits",
|
|
1129
1136
|
status: "warn",
|
|
1130
1137
|
scope: "branch",
|
|
@@ -1135,7 +1142,7 @@ function computeDivergence(facts) {
|
|
|
1135
1142
|
}
|
|
1136
1143
|
if (facts.unmergedMigrations.length > 0) {
|
|
1137
1144
|
const n = facts.unmergedMigrations.length;
|
|
1138
|
-
|
|
1145
|
+
out2.push({
|
|
1139
1146
|
id: "branch.unmerged-migrations",
|
|
1140
1147
|
status: "info",
|
|
1141
1148
|
scope: "branch",
|
|
@@ -1145,7 +1152,7 @@ function computeDivergence(facts) {
|
|
|
1145
1152
|
});
|
|
1146
1153
|
}
|
|
1147
1154
|
if (facts.isSharedMainTree && facts.otherWorktrees > 0 && facts.uncommitted > 0 && !onFeatureBranch) {
|
|
1148
|
-
|
|
1155
|
+
out2.push({
|
|
1149
1156
|
id: "worktree.direct-on-shared-base",
|
|
1150
1157
|
status: "warn",
|
|
1151
1158
|
scope: "worktree",
|
|
@@ -1155,7 +1162,7 @@ function computeDivergence(facts) {
|
|
|
1155
1162
|
});
|
|
1156
1163
|
}
|
|
1157
1164
|
if (facts.inProgressOp) {
|
|
1158
|
-
|
|
1165
|
+
out2.push({
|
|
1159
1166
|
id: "worktree.in-progress-op",
|
|
1160
1167
|
status: "warn",
|
|
1161
1168
|
scope: "worktree",
|
|
@@ -1166,7 +1173,7 @@ function computeDivergence(facts) {
|
|
|
1166
1173
|
}
|
|
1167
1174
|
if (facts.worktreeParity && facts.worktreeParity.missing.length > 0) {
|
|
1168
1175
|
const miss = facts.worktreeParity.missing;
|
|
1169
|
-
|
|
1176
|
+
out2.push({
|
|
1170
1177
|
id: "worktree.parity-missing",
|
|
1171
1178
|
status: "open",
|
|
1172
1179
|
scope: "worktree",
|
|
@@ -1176,7 +1183,7 @@ function computeDivergence(facts) {
|
|
|
1176
1183
|
});
|
|
1177
1184
|
}
|
|
1178
1185
|
if (facts.release?.allRed) {
|
|
1179
|
-
|
|
1186
|
+
out2.push({
|
|
1180
1187
|
id: "release.all-checks-red",
|
|
1181
1188
|
status: "warn",
|
|
1182
1189
|
scope: "release",
|
|
@@ -1185,7 +1192,7 @@ function computeDivergence(facts) {
|
|
|
1185
1192
|
hint: "Check the CI provider's billing/spending status before debugging code."
|
|
1186
1193
|
});
|
|
1187
1194
|
}
|
|
1188
|
-
return sortFindings(
|
|
1195
|
+
return sortFindings(out2);
|
|
1189
1196
|
}
|
|
1190
1197
|
function sortFindings(f) {
|
|
1191
1198
|
return [...f].sort((a, b) => STATUS_ORDER[a.status] - STATUS_ORDER[b.status] || a.id.localeCompare(b.id));
|
|
@@ -1225,11 +1232,11 @@ function detectInProgressOp(repoRoot) {
|
|
|
1225
1232
|
return null;
|
|
1226
1233
|
}
|
|
1227
1234
|
function parseWorktrees(raw) {
|
|
1228
|
-
const
|
|
1235
|
+
const out2 = [];
|
|
1229
1236
|
let cur = null;
|
|
1230
1237
|
const flush = () => {
|
|
1231
1238
|
if (cur?.path)
|
|
1232
|
-
|
|
1239
|
+
out2.push({ path: cur.path, branch: cur.branch, detached: cur.detached ?? false });
|
|
1233
1240
|
};
|
|
1234
1241
|
for (const line of raw.split("\n")) {
|
|
1235
1242
|
if (line.startsWith("worktree ")) {
|
|
@@ -1244,7 +1251,7 @@ function parseWorktrees(raw) {
|
|
|
1244
1251
|
}
|
|
1245
1252
|
}
|
|
1246
1253
|
flush();
|
|
1247
|
-
return
|
|
1254
|
+
return out2;
|
|
1248
1255
|
}
|
|
1249
1256
|
function readWorktreeRequirements(repoRoot) {
|
|
1250
1257
|
const p = posix3.join(repoRoot, WORKTREE_REQUIREMENTS_RELPATH);
|
|
@@ -1436,9 +1443,9 @@ function parseNumbered(fileName) {
|
|
|
1436
1443
|
return { prefix: m.groups.prefix ?? "", number: m.groups.num };
|
|
1437
1444
|
}
|
|
1438
1445
|
function computeNumberCollisions(facts) {
|
|
1439
|
-
const
|
|
1446
|
+
const out2 = [];
|
|
1440
1447
|
if (!facts.isRepo)
|
|
1441
|
-
return
|
|
1448
|
+
return out2;
|
|
1442
1449
|
const added = new Set(facts.addedPaths);
|
|
1443
1450
|
for (const ns of facts.namespaces) {
|
|
1444
1451
|
const key = namespaceKey(ns);
|
|
@@ -1453,7 +1460,7 @@ function computeNumberCollisions(facts) {
|
|
|
1453
1460
|
const ownPath = paths.find((p) => added.has(p));
|
|
1454
1461
|
const others = paths.filter((p) => p !== ownPath);
|
|
1455
1462
|
const label = `${ns.prefix}${number}`;
|
|
1456
|
-
|
|
1463
|
+
out2.push(ownPath ? {
|
|
1457
1464
|
id: `number.collision:${key}#${number}`,
|
|
1458
1465
|
status: "open",
|
|
1459
1466
|
namespace: ns,
|
|
@@ -1477,7 +1484,7 @@ function computeNumberCollisions(facts) {
|
|
|
1477
1484
|
}
|
|
1478
1485
|
}
|
|
1479
1486
|
const order = { open: 0, warn: 1, info: 2, passed: 3 };
|
|
1480
|
-
return
|
|
1487
|
+
return out2.sort((a, b) => order[a.status] - order[b.status] || a.id.localeCompare(b.id));
|
|
1481
1488
|
}
|
|
1482
1489
|
function isCollisionFree(findings) {
|
|
1483
1490
|
return !findings.some((f) => f.status === "open");
|
|
@@ -1533,8 +1540,8 @@ function trimOrNull2(s) {
|
|
|
1533
1540
|
const t = s?.trim();
|
|
1534
1541
|
return t ? t : null;
|
|
1535
1542
|
}
|
|
1536
|
-
function lines(
|
|
1537
|
-
return
|
|
1543
|
+
function lines(out2) {
|
|
1544
|
+
return out2 ? out2.split("\n").filter(Boolean) : [];
|
|
1538
1545
|
}
|
|
1539
1546
|
function resolveDefaultBranch2(repoRoot) {
|
|
1540
1547
|
const sym = trimOrNull2(runGit(repoRoot, ["symbolic-ref", "--quiet", "refs/remotes/origin/HEAD"]));
|
|
@@ -1611,12 +1618,12 @@ async function gatherNumberCollisionFacts(repoRoot, opts = {}) {
|
|
|
1611
1618
|
const scanTree = (ref, kind, where) => {
|
|
1612
1619
|
if (dirs.length === 0)
|
|
1613
1620
|
return;
|
|
1614
|
-
const
|
|
1615
|
-
if (
|
|
1621
|
+
const out2 = runGit(repoRoot, ["ls-tree", "-r", "--name-only", ref, "--", ...dirs]);
|
|
1622
|
+
if (out2 === null) {
|
|
1616
1623
|
skipped.push(`could not read ${where}`);
|
|
1617
1624
|
return;
|
|
1618
1625
|
}
|
|
1619
|
-
for (const path8 of lines(
|
|
1626
|
+
for (const path8 of lines(out2))
|
|
1620
1627
|
record(path8, kind, where);
|
|
1621
1628
|
};
|
|
1622
1629
|
for (const dir of dirs) {
|
|
@@ -2143,13 +2150,13 @@ var init_engine = __esm({
|
|
|
2143
2150
|
await this.store.init();
|
|
2144
2151
|
const limit = clampLimit(opts.limit, 20, 100);
|
|
2145
2152
|
const hits = await this.store.searchFts(query, opts.kind ?? null, limit);
|
|
2146
|
-
const
|
|
2153
|
+
const out2 = [];
|
|
2147
2154
|
for (const h of hits) {
|
|
2148
2155
|
const n = await this.store.getNode(h.nodeKey);
|
|
2149
2156
|
if (n)
|
|
2150
|
-
|
|
2157
|
+
out2.push({ ...toHit(n), score: h.score });
|
|
2151
2158
|
}
|
|
2152
|
-
return
|
|
2159
|
+
return out2;
|
|
2153
2160
|
}
|
|
2154
2161
|
async semanticQuery(query, opts = {}) {
|
|
2155
2162
|
await this.store.init();
|
|
@@ -2159,13 +2166,13 @@ var init_engine = __esm({
|
|
|
2159
2166
|
const qvec = await this.embedder.embedQuery(query);
|
|
2160
2167
|
const all = await this.store.allEmbeddings();
|
|
2161
2168
|
const scored = all.map((e) => ({ nodeKey: e.nodeKey, score: cosineSimilarity(qvec, e.vec) })).sort((a, b) => b.score - a.score).slice(0, limit);
|
|
2162
|
-
const
|
|
2169
|
+
const out2 = [];
|
|
2163
2170
|
for (const s of scored) {
|
|
2164
2171
|
const n = await this.store.getNode(s.nodeKey);
|
|
2165
2172
|
if (n)
|
|
2166
|
-
|
|
2173
|
+
out2.push({ ...toHit(n), score: s.score });
|
|
2167
2174
|
}
|
|
2168
|
-
return
|
|
2175
|
+
return out2;
|
|
2169
2176
|
}
|
|
2170
2177
|
async tracePath(nodeKey, opts = {}) {
|
|
2171
2178
|
await this.store.init();
|
|
@@ -2753,12 +2760,164 @@ var init_session_analysis = __esm({
|
|
|
2753
2760
|
});
|
|
2754
2761
|
|
|
2755
2762
|
// ../../packages/claude-code-telemetry/dist/ingest.js
|
|
2763
|
+
function ingestBody(analytics, span, ctx) {
|
|
2764
|
+
const body = { session_analytics: analytics };
|
|
2765
|
+
if (span && span.started_at) {
|
|
2766
|
+
body.session_span = ctx ? { ...span, ...ctx } : span;
|
|
2767
|
+
}
|
|
2768
|
+
return body;
|
|
2769
|
+
}
|
|
2756
2770
|
var init_ingest = __esm({
|
|
2757
2771
|
"../../packages/claude-code-telemetry/dist/ingest.js"() {
|
|
2758
2772
|
"use strict";
|
|
2759
2773
|
}
|
|
2760
2774
|
});
|
|
2761
2775
|
|
|
2776
|
+
// ../../packages/claude-code-telemetry/dist/session-span.js
|
|
2777
|
+
import { createReadStream as createReadStream3, existsSync as existsSync8 } from "node:fs";
|
|
2778
|
+
import { createInterface as createInterface6 } from "node:readline";
|
|
2779
|
+
function asBlocks2(content) {
|
|
2780
|
+
if (typeof content === "string")
|
|
2781
|
+
return [{ type: "text", text: content }];
|
|
2782
|
+
if (!Array.isArray(content))
|
|
2783
|
+
return [];
|
|
2784
|
+
return content.filter((b) => typeof b === "object" && b !== null);
|
|
2785
|
+
}
|
|
2786
|
+
function textOf2(blocks) {
|
|
2787
|
+
return blocks.filter((b) => b.type === "text" && typeof b.text === "string").map((b) => b.text).join("\n");
|
|
2788
|
+
}
|
|
2789
|
+
function emptySpan(sessionId) {
|
|
2790
|
+
return {
|
|
2791
|
+
session_id: sessionId,
|
|
2792
|
+
started_at: null,
|
|
2793
|
+
ended_at: null,
|
|
2794
|
+
wall_seconds: 0,
|
|
2795
|
+
agent_seconds: 0,
|
|
2796
|
+
wait_seconds: 0,
|
|
2797
|
+
pauses: [],
|
|
2798
|
+
pause_count: 0,
|
|
2799
|
+
pause_seconds: 0,
|
|
2800
|
+
pauses_truncated: false,
|
|
2801
|
+
turn_count: 0,
|
|
2802
|
+
event_count: 0
|
|
2803
|
+
};
|
|
2804
|
+
}
|
|
2805
|
+
function classify2(parsed) {
|
|
2806
|
+
const role = parsed.message?.role;
|
|
2807
|
+
if (role === "assistant") {
|
|
2808
|
+
const blocks2 = asBlocks2(parsed.message?.content);
|
|
2809
|
+
const calledTool = blocks2.some((b) => b.type === "tool_use");
|
|
2810
|
+
return { holder: calledTool ? "agent" : "human", genuine: false };
|
|
2811
|
+
}
|
|
2812
|
+
if (role !== "user")
|
|
2813
|
+
return null;
|
|
2814
|
+
const blocks = asBlocks2(parsed.message?.content);
|
|
2815
|
+
const text = textOf2(blocks);
|
|
2816
|
+
if (text.includes(INTERRUPT_MARKER2))
|
|
2817
|
+
return { holder: "human", genuine: false };
|
|
2818
|
+
const denied = blocks.some((b) => b.type === "tool_result" && b.is_error === true && typeof b.content === "string" && b.content.includes(DENIAL_MARKER2));
|
|
2819
|
+
if (denied)
|
|
2820
|
+
return { holder: "agent", genuine: false };
|
|
2821
|
+
if (blocks.some((b) => b.type === "tool_result"))
|
|
2822
|
+
return { holder: "agent", genuine: false };
|
|
2823
|
+
if (!text.trim())
|
|
2824
|
+
return null;
|
|
2825
|
+
return { holder: "agent", genuine: true };
|
|
2826
|
+
}
|
|
2827
|
+
async function analyzeSpan(path8) {
|
|
2828
|
+
const s = emptySpan("");
|
|
2829
|
+
if (!path8 || !existsSync8(path8))
|
|
2830
|
+
return s;
|
|
2831
|
+
let firstMs = null;
|
|
2832
|
+
let lastMs = 0;
|
|
2833
|
+
let agentMs = 0;
|
|
2834
|
+
let prevMs = null;
|
|
2835
|
+
let prevHolder = "human";
|
|
2836
|
+
const pauses = [];
|
|
2837
|
+
await new Promise((resolve2) => {
|
|
2838
|
+
const stream = createReadStream3(path8, { encoding: "utf-8" });
|
|
2839
|
+
const rl = createInterface6({ input: stream });
|
|
2840
|
+
const processLine = (line) => {
|
|
2841
|
+
const trimmed = line.trim();
|
|
2842
|
+
if (!trimmed)
|
|
2843
|
+
return;
|
|
2844
|
+
let parsed;
|
|
2845
|
+
try {
|
|
2846
|
+
parsed = JSON.parse(trimmed);
|
|
2847
|
+
} catch {
|
|
2848
|
+
return;
|
|
2849
|
+
}
|
|
2850
|
+
if (!s.session_id) {
|
|
2851
|
+
const sid = parsed.sessionId ?? parsed.session_id;
|
|
2852
|
+
if (typeof sid === "string" && sid)
|
|
2853
|
+
s.session_id = sid;
|
|
2854
|
+
}
|
|
2855
|
+
if (parsed.isSidechain === true)
|
|
2856
|
+
return;
|
|
2857
|
+
const ts = typeof parsed.timestamp === "string" ? Date.parse(parsed.timestamp) : NaN;
|
|
2858
|
+
if (!Number.isFinite(ts))
|
|
2859
|
+
return;
|
|
2860
|
+
if (prevMs !== null && ts < prevMs)
|
|
2861
|
+
return;
|
|
2862
|
+
const turn = classify2(parsed);
|
|
2863
|
+
if (turn === null)
|
|
2864
|
+
return;
|
|
2865
|
+
s.event_count++;
|
|
2866
|
+
if (turn.genuine)
|
|
2867
|
+
s.turn_count++;
|
|
2868
|
+
if (firstMs === null)
|
|
2869
|
+
firstMs = ts;
|
|
2870
|
+
lastMs = ts;
|
|
2871
|
+
if (prevMs !== null) {
|
|
2872
|
+
const dt = ts - prevMs;
|
|
2873
|
+
if (prevHolder === "agent") {
|
|
2874
|
+
agentMs += dt;
|
|
2875
|
+
} else if (dt >= PAUSE_FLOOR_SECONDS * 1e3) {
|
|
2876
|
+
s.pause_count++;
|
|
2877
|
+
s.pause_seconds += Math.round(dt / 1e3);
|
|
2878
|
+
if (pauses.length < MAX_PAUSES) {
|
|
2879
|
+
pauses.push({
|
|
2880
|
+
offset_seconds: Math.round((prevMs - firstMs) / 1e3),
|
|
2881
|
+
duration_seconds: Math.round(dt / 1e3)
|
|
2882
|
+
});
|
|
2883
|
+
}
|
|
2884
|
+
}
|
|
2885
|
+
}
|
|
2886
|
+
prevMs = ts;
|
|
2887
|
+
prevHolder = turn.holder;
|
|
2888
|
+
};
|
|
2889
|
+
rl.on("line", (line) => {
|
|
2890
|
+
try {
|
|
2891
|
+
processLine(line);
|
|
2892
|
+
} catch {
|
|
2893
|
+
}
|
|
2894
|
+
});
|
|
2895
|
+
rl.on("close", () => resolve2());
|
|
2896
|
+
rl.on("error", () => resolve2());
|
|
2897
|
+
stream.on("error", () => resolve2());
|
|
2898
|
+
});
|
|
2899
|
+
if (firstMs === null)
|
|
2900
|
+
return s;
|
|
2901
|
+
s.started_at = new Date(firstMs).toISOString();
|
|
2902
|
+
s.ended_at = new Date(lastMs).toISOString();
|
|
2903
|
+
s.wall_seconds = Math.round((lastMs - firstMs) / 1e3);
|
|
2904
|
+
s.agent_seconds = Math.round(agentMs / 1e3);
|
|
2905
|
+
s.wait_seconds = s.wall_seconds - s.agent_seconds;
|
|
2906
|
+
s.pauses = pauses;
|
|
2907
|
+
s.pauses_truncated = s.pause_count > pauses.length;
|
|
2908
|
+
return s;
|
|
2909
|
+
}
|
|
2910
|
+
var INTERRUPT_MARKER2, DENIAL_MARKER2, PAUSE_FLOOR_SECONDS, MAX_PAUSES;
|
|
2911
|
+
var init_session_span = __esm({
|
|
2912
|
+
"../../packages/claude-code-telemetry/dist/session-span.js"() {
|
|
2913
|
+
"use strict";
|
|
2914
|
+
INTERRUPT_MARKER2 = "[Request interrupted by user";
|
|
2915
|
+
DENIAL_MARKER2 = "The user doesn't want to proceed with this tool use";
|
|
2916
|
+
PAUSE_FLOOR_SECONDS = 60;
|
|
2917
|
+
MAX_PAUSES = 200;
|
|
2918
|
+
}
|
|
2919
|
+
});
|
|
2920
|
+
|
|
2762
2921
|
// ../../packages/claude-code-telemetry/dist/parse.js
|
|
2763
2922
|
var init_parse = __esm({
|
|
2764
2923
|
"../../packages/claude-code-telemetry/dist/parse.js"() {
|
|
@@ -2799,6 +2958,7 @@ var init_dist = __esm({
|
|
|
2799
2958
|
init_decisions();
|
|
2800
2959
|
init_session_analysis();
|
|
2801
2960
|
init_ingest();
|
|
2961
|
+
init_session_span();
|
|
2802
2962
|
init_parse();
|
|
2803
2963
|
init_effort();
|
|
2804
2964
|
init_windows();
|
|
@@ -2898,14 +3058,14 @@ var init_hook_input = __esm({
|
|
|
2898
3058
|
|
|
2899
3059
|
// src/hooks/state.ts
|
|
2900
3060
|
import { mkdir as mkdir2, readFile as readFile2, writeFile as writeFile2, rename as rename2 } from "node:fs/promises";
|
|
2901
|
-
import { existsSync as
|
|
3061
|
+
import { existsSync as existsSync9 } from "node:fs";
|
|
2902
3062
|
import { homedir as homedir4 } from "node:os";
|
|
2903
3063
|
import { join as join13 } from "node:path";
|
|
2904
3064
|
function emptyState() {
|
|
2905
3065
|
return { config: null, sessions: {}, pending_metrics: [] };
|
|
2906
3066
|
}
|
|
2907
3067
|
async function loadState() {
|
|
2908
|
-
if (!
|
|
3068
|
+
if (!existsSync9(STATE_FILE)) return emptyState();
|
|
2909
3069
|
try {
|
|
2910
3070
|
const raw = await readFile2(STATE_FILE, "utf-8");
|
|
2911
3071
|
const parsed = JSON.parse(raw);
|
|
@@ -2925,7 +3085,7 @@ async function loadState() {
|
|
|
2925
3085
|
}
|
|
2926
3086
|
}
|
|
2927
3087
|
async function saveState(state) {
|
|
2928
|
-
if (!
|
|
3088
|
+
if (!existsSync9(STATE_DIR)) {
|
|
2929
3089
|
await mkdir2(STATE_DIR, { recursive: true, mode: 448 });
|
|
2930
3090
|
}
|
|
2931
3091
|
const tmp = `${STATE_FILE}.tmp`;
|
|
@@ -2961,7 +3121,7 @@ __export(hooks_exports, {
|
|
|
2961
3121
|
runSessionEndMetrics: () => runSessionEndMetrics,
|
|
2962
3122
|
runSyncConfig: () => runSyncConfig
|
|
2963
3123
|
});
|
|
2964
|
-
import { existsSync as
|
|
3124
|
+
import { existsSync as existsSync10, readFileSync as readFileSync7, realpathSync } from "node:fs";
|
|
2965
3125
|
import { writeFile as writeFile3 } from "node:fs/promises";
|
|
2966
3126
|
import { homedir as homedir5 } from "node:os";
|
|
2967
3127
|
import { basename, dirname as dirname5, isAbsolute as isAbsolute2, join as join14, relative } from "node:path";
|
|
@@ -3060,7 +3220,7 @@ async function runOnFileWrite() {
|
|
|
3060
3220
|
if (!filePath) return 0;
|
|
3061
3221
|
const cwd = typeof input.cwd === "string" && input.cwd.length > 0 ? input.cwd : process.cwd();
|
|
3062
3222
|
const abs = isAbsolute2(filePath) ? filePath : join14(cwd, filePath);
|
|
3063
|
-
if (
|
|
3223
|
+
if (existsSync10(abs)) return 0;
|
|
3064
3224
|
const repoRoot = resolveRepoRoot(cwd);
|
|
3065
3225
|
const rel = relative(repoRoot, realpathOfUnwritten(abs));
|
|
3066
3226
|
if (rel.length === 0 || rel.startsWith("..") || isAbsolute2(rel)) return 0;
|
|
@@ -3238,7 +3398,7 @@ function readHookWiring() {
|
|
|
3238
3398
|
const settingsPath = join14(homedir5(), ".claude", "settings.json");
|
|
3239
3399
|
let raw = null;
|
|
3240
3400
|
try {
|
|
3241
|
-
if (
|
|
3401
|
+
if (existsSync10(settingsPath)) raw = readFileSync7(settingsPath, "utf8");
|
|
3242
3402
|
} catch {
|
|
3243
3403
|
}
|
|
3244
3404
|
return { settingsPath, findings: inspectHookWiring(raw) };
|
|
@@ -3336,7 +3496,11 @@ var session_end_exports = {};
|
|
|
3336
3496
|
__export(session_end_exports, {
|
|
3337
3497
|
runOnSessionEnd: () => runOnSessionEnd
|
|
3338
3498
|
});
|
|
3339
|
-
|
|
3499
|
+
function presenceSessionId() {
|
|
3500
|
+
const raw = (process.env.MAIND_SESSION_ID ?? "").trim().toLowerCase();
|
|
3501
|
+
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(raw) ? raw : null;
|
|
3502
|
+
}
|
|
3503
|
+
async function postWithTimeout(apiKey, deviceId, body, timeoutMs) {
|
|
3340
3504
|
const post = fetch(INGEST_ENDPOINT, {
|
|
3341
3505
|
method: "POST",
|
|
3342
3506
|
headers: {
|
|
@@ -3345,7 +3509,7 @@ async function postWithTimeout(apiKey, deviceId, analytics, timeoutMs) {
|
|
|
3345
3509
|
"x-maind-device-id": deviceId,
|
|
3346
3510
|
"x-maind-bridge-version": BRIDGE_VERSION
|
|
3347
3511
|
},
|
|
3348
|
-
body: JSON.stringify(
|
|
3512
|
+
body: JSON.stringify(body)
|
|
3349
3513
|
}).then(() => void 0).catch(() => void 0);
|
|
3350
3514
|
const timeout = new Promise((resolve2) => setTimeout(resolve2, timeoutMs));
|
|
3351
3515
|
await Promise.race([post, timeout]);
|
|
@@ -3358,14 +3522,24 @@ async function runOnSessionEnd() {
|
|
|
3358
3522
|
const transcriptPath = transcriptPathOf(input);
|
|
3359
3523
|
if (transcriptPath) {
|
|
3360
3524
|
try {
|
|
3361
|
-
const analytics = await
|
|
3362
|
-
|
|
3525
|
+
const [analytics, span] = await Promise.all([
|
|
3526
|
+
analyzeSession(transcriptPath),
|
|
3527
|
+
analyzeSpan(transcriptPath)
|
|
3528
|
+
]);
|
|
3529
|
+
if (sessionId) {
|
|
3530
|
+
analytics.session_id = sessionId;
|
|
3531
|
+
span.session_id = sessionId;
|
|
3532
|
+
}
|
|
3363
3533
|
if (analytics.session_id) {
|
|
3364
|
-
|
|
3534
|
+
const body = ingestBody(analytics, span, {
|
|
3535
|
+
client_session_id: presenceSessionId(),
|
|
3536
|
+
client: "claude-code"
|
|
3537
|
+
});
|
|
3538
|
+
await postWithTimeout(apiKey, ensureDeviceId(), body, 1500);
|
|
3365
3539
|
}
|
|
3366
3540
|
} catch (err) {
|
|
3367
3541
|
process.stderr.write(
|
|
3368
|
-
`[maind-mcp-bridge] session-
|
|
3542
|
+
`[maind-mcp-bridge] session-end ingest failed: ${err instanceof Error ? err.message : String(err)}
|
|
3369
3543
|
`
|
|
3370
3544
|
);
|
|
3371
3545
|
}
|
|
@@ -3570,8 +3744,8 @@ var Forwarder = class {
|
|
|
3570
3744
|
this.presence?.onActivity();
|
|
3571
3745
|
}
|
|
3572
3746
|
if (this.localRouter && this.localRouter.handlesToolCall(parsed?.method, parsed?.params)) {
|
|
3573
|
-
const
|
|
3574
|
-
process.stdout.write(
|
|
3747
|
+
const out2 = await this.localRouter.handleToolCall(parsed?.id ?? null, parsed?.params);
|
|
3748
|
+
process.stdout.write(out2 + "\n");
|
|
3575
3749
|
return;
|
|
3576
3750
|
}
|
|
3577
3751
|
const isToolsList = this.localRouter !== null && parsed?.method === "tools/list";
|
|
@@ -3974,7 +4148,7 @@ function functionsOrigin() {
|
|
|
3974
4148
|
const v = process.env.MAIND_FUNCTIONS_ORIGIN;
|
|
3975
4149
|
return v && v.length > 0 ? v.replace(/\/+$/, "") : DEFAULT_FUNCTIONS_ORIGIN;
|
|
3976
4150
|
}
|
|
3977
|
-
async function runDeviceFlow(version) {
|
|
4151
|
+
async function runDeviceFlow(version, out2 = process.stderr) {
|
|
3978
4152
|
const origin = functionsOrigin();
|
|
3979
4153
|
const startUrl = `${origin}/device-authorization-start`;
|
|
3980
4154
|
const pollUrl = `${origin}/device-authorization-poll`;
|
|
@@ -3992,36 +4166,36 @@ async function runDeviceFlow(version) {
|
|
|
3992
4166
|
const start = await startRes.json();
|
|
3993
4167
|
await openExternalBrowser(start.verification_uri_complete).catch(() => {
|
|
3994
4168
|
});
|
|
3995
|
-
printAuthInstructions(start);
|
|
4169
|
+
printAuthInstructions(start, out2);
|
|
3996
4170
|
const deadline = Date.now() + start.expires_in * 1e3;
|
|
3997
4171
|
const intervalMs = Math.max(start.interval, 3) * 1e3;
|
|
3998
4172
|
while (Date.now() < deadline) {
|
|
3999
4173
|
await sleep(intervalMs);
|
|
4000
4174
|
const poll = await pollOnce(pollUrl, start.device_code).catch((e) => {
|
|
4001
|
-
|
|
4175
|
+
out2.write(`[maind-mcp-bridge] poll error (will retry): ${String(e)}
|
|
4002
4176
|
`);
|
|
4003
4177
|
return null;
|
|
4004
4178
|
});
|
|
4005
4179
|
if (!poll) continue;
|
|
4006
4180
|
if (poll.status === "approved") {
|
|
4007
4181
|
writeApiKey(poll.api_key);
|
|
4008
|
-
|
|
4182
|
+
out2.write(
|
|
4009
4183
|
`[maind-mcp-bridge] signed in (plan: ${poll.plan}). API key saved to ~/.config/maind/api-key
|
|
4010
4184
|
`
|
|
4011
4185
|
);
|
|
4012
4186
|
return { apiKey: poll.api_key, plan: poll.plan };
|
|
4013
4187
|
}
|
|
4014
4188
|
if (poll.status === "denied") {
|
|
4015
|
-
|
|
4189
|
+
out2.write("[maind-mcp-bridge] sign-in denied by user\n");
|
|
4016
4190
|
return null;
|
|
4017
4191
|
}
|
|
4018
4192
|
if (poll.status === "expired" || poll.status === "consumed") {
|
|
4019
|
-
|
|
4193
|
+
out2.write(`[maind-mcp-bridge] sign-in ${poll.status}
|
|
4020
4194
|
`);
|
|
4021
4195
|
return null;
|
|
4022
4196
|
}
|
|
4023
4197
|
}
|
|
4024
|
-
|
|
4198
|
+
out2.write("[maind-mcp-bridge] sign-in timed out\n");
|
|
4025
4199
|
return null;
|
|
4026
4200
|
}
|
|
4027
4201
|
async function pollOnce(url, deviceCode) {
|
|
@@ -4039,7 +4213,7 @@ async function pollOnce(url, deviceCode) {
|
|
|
4039
4213
|
function sleep(ms) {
|
|
4040
4214
|
return new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
4041
4215
|
}
|
|
4042
|
-
function printAuthInstructions(start) {
|
|
4216
|
+
function printAuthInstructions(start, out2) {
|
|
4043
4217
|
const lines2 = [
|
|
4044
4218
|
"",
|
|
4045
4219
|
" \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",
|
|
@@ -4056,7 +4230,7 @@ function printAuthInstructions(start) {
|
|
|
4056
4230
|
" \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",
|
|
4057
4231
|
""
|
|
4058
4232
|
];
|
|
4059
|
-
|
|
4233
|
+
out2.write(lines2.join("\n") + "\n");
|
|
4060
4234
|
}
|
|
4061
4235
|
function pad(s, width) {
|
|
4062
4236
|
if (s.length >= width) return s.slice(0, width);
|
|
@@ -4154,6 +4328,8 @@ function parseInstallFlags(argv) {
|
|
|
4154
4328
|
noHook: false,
|
|
4155
4329
|
nonInteractive: false,
|
|
4156
4330
|
token: null,
|
|
4331
|
+
oneClickToken: null,
|
|
4332
|
+
oneClickExchangeUrl: null,
|
|
4157
4333
|
telemetry: false,
|
|
4158
4334
|
client: null,
|
|
4159
4335
|
skipCodex: false,
|
|
@@ -4206,6 +4382,24 @@ function parseInstallFlags(argv) {
|
|
|
4206
4382
|
i++;
|
|
4207
4383
|
break;
|
|
4208
4384
|
}
|
|
4385
|
+
case "--one-click-token": {
|
|
4386
|
+
const next = argv[i + 1];
|
|
4387
|
+
if (next === void 0 || next.startsWith("--")) {
|
|
4388
|
+
throw new InstallFlagError("--one-click-token requires a token argument");
|
|
4389
|
+
}
|
|
4390
|
+
flags.oneClickToken = next;
|
|
4391
|
+
i++;
|
|
4392
|
+
break;
|
|
4393
|
+
}
|
|
4394
|
+
case "--one-click-exchange-url": {
|
|
4395
|
+
const next = argv[i + 1];
|
|
4396
|
+
if (next === void 0 || next.startsWith("--")) {
|
|
4397
|
+
throw new InstallFlagError("--one-click-exchange-url requires a URL argument");
|
|
4398
|
+
}
|
|
4399
|
+
flags.oneClickExchangeUrl = next;
|
|
4400
|
+
i++;
|
|
4401
|
+
break;
|
|
4402
|
+
}
|
|
4209
4403
|
case "--client": {
|
|
4210
4404
|
const next = argv[i + 1];
|
|
4211
4405
|
if (next === void 0 || next.startsWith("--")) {
|
|
@@ -4247,7 +4441,10 @@ function printInstallHelp() {
|
|
|
4247
4441
|
" --no-preamble Skip the 5 preamble files (MCP-config + pairing only)",
|
|
4248
4442
|
" --no-hook Never write the Claude Code hooks (overrides --full for hooks)",
|
|
4249
4443
|
" --non-interactive Skip every TTY prompt (used by CI / Dashboard-One-Click)",
|
|
4250
|
-
" --token <
|
|
4444
|
+
" --token <key> Use a pre-issued mnd_ api-key instead of browser pairing",
|
|
4445
|
+
" --one-click-token <jwt> Exchange the dashboard one-click token for a device-bound",
|
|
4446
|
+
" key \u2014 no browser (needs --one-click-exchange-url; ADR-267)",
|
|
4447
|
+
" --one-click-exchange-url <url> Exchange endpoint (set by the launcher scripts)",
|
|
4251
4448
|
" --client <family> Install only for one client family (claude-code, cursor, ...)",
|
|
4252
4449
|
" --skip-codex Skip the Codex ~/.codex/config.toml target",
|
|
4253
4450
|
' --dry-run Compute the plan but do not write anything (status "would-\u2026")',
|
|
@@ -4560,6 +4757,9 @@ function nonEmpty(v) {
|
|
|
4560
4757
|
return trimmed.length > 0 ? trimmed : null;
|
|
4561
4758
|
}
|
|
4562
4759
|
|
|
4760
|
+
// src/install/index.ts
|
|
4761
|
+
init_bridge_entry();
|
|
4762
|
+
|
|
4563
4763
|
// src/install/atomic-write.ts
|
|
4564
4764
|
import * as fs2 from "node:fs/promises";
|
|
4565
4765
|
import * as path4 from "node:path";
|
|
@@ -4669,7 +4869,7 @@ async function mergeJsonConfig(target, serverEntry, dryRun = false) {
|
|
|
4669
4869
|
if (isObject(existing) && serverEntriesEqual(existing, serverEntry)) {
|
|
4670
4870
|
alreadyConsistent = true;
|
|
4671
4871
|
}
|
|
4672
|
-
nextConfig = { ...parsed, [MAIND_SERVER_KEY]: serverEntry };
|
|
4872
|
+
nextConfig = { ...parsed, [MAIND_SERVER_KEY]: mergeEntry(existing, serverEntry) };
|
|
4673
4873
|
} else {
|
|
4674
4874
|
const mcpServers = isObject(parsed.mcpServers) ? parsed.mcpServers : {};
|
|
4675
4875
|
const existing = mcpServers[MAIND_SERVER_KEY];
|
|
@@ -4678,7 +4878,7 @@ async function mergeJsonConfig(target, serverEntry, dryRun = false) {
|
|
|
4678
4878
|
}
|
|
4679
4879
|
nextConfig = {
|
|
4680
4880
|
...parsed,
|
|
4681
|
-
mcpServers: { ...mcpServers, [MAIND_SERVER_KEY]: serverEntry }
|
|
4881
|
+
mcpServers: { ...mcpServers, [MAIND_SERVER_KEY]: mergeEntry(existing, serverEntry) }
|
|
4682
4882
|
};
|
|
4683
4883
|
}
|
|
4684
4884
|
if (alreadyConsistent && raw !== null) {
|
|
@@ -4710,6 +4910,14 @@ async function mergeJsonConfig(target, serverEntry, dryRun = false) {
|
|
|
4710
4910
|
detail: target.path
|
|
4711
4911
|
};
|
|
4712
4912
|
}
|
|
4913
|
+
function mergeEntry(existing, serverEntry) {
|
|
4914
|
+
const existingEnv = isObject(existing) && isObject(existing.env) ? existing.env : {};
|
|
4915
|
+
const env = { ...serverEntry.env };
|
|
4916
|
+
for (const [key, value] of Object.entries(existingEnv)) {
|
|
4917
|
+
if (!(key in env) && typeof value === "string") env[key] = value;
|
|
4918
|
+
}
|
|
4919
|
+
return { command: serverEntry.command, args: [...serverEntry.args], env };
|
|
4920
|
+
}
|
|
4713
4921
|
function hasRootShape(parsed) {
|
|
4714
4922
|
if ("mcpServers" in parsed) return false;
|
|
4715
4923
|
if (!(MAIND_SERVER_KEY in parsed)) return false;
|
|
@@ -4794,10 +5002,15 @@ async function mergeTomlConfig(target, serverEntry, dryRun = false) {
|
|
|
4794
5002
|
detail: "maind entry already up-to-date"
|
|
4795
5003
|
};
|
|
4796
5004
|
}
|
|
5005
|
+
const existingEnv = isObject2(existing) && isObject2(existing.env) ? existing.env : {};
|
|
5006
|
+
const mergedEnv = { ...serverEntry.env };
|
|
5007
|
+
for (const [key, value] of Object.entries(existingEnv)) {
|
|
5008
|
+
if (!(key in mergedEnv) && typeof value === "string") mergedEnv[key] = value;
|
|
5009
|
+
}
|
|
4797
5010
|
const maindBlock = {
|
|
4798
5011
|
command: serverEntry.command,
|
|
4799
5012
|
args: [...serverEntry.args],
|
|
4800
|
-
env:
|
|
5013
|
+
env: mergedEnv
|
|
4801
5014
|
};
|
|
4802
5015
|
const nextConfig = {
|
|
4803
5016
|
...parsed,
|
|
@@ -5839,11 +6052,11 @@ function findExistingHookCommand(settings, event, pattern) {
|
|
|
5839
6052
|
}
|
|
5840
6053
|
return null;
|
|
5841
6054
|
}
|
|
5842
|
-
async function promptYesNo(
|
|
5843
|
-
|
|
6055
|
+
async function promptYesNo(out2, prompt) {
|
|
6056
|
+
out2.write(prompt);
|
|
5844
6057
|
const rl = readline2.createInterface({
|
|
5845
6058
|
input: process.stdin,
|
|
5846
|
-
output:
|
|
6059
|
+
output: out2,
|
|
5847
6060
|
terminal: true
|
|
5848
6061
|
});
|
|
5849
6062
|
const answer = await new Promise((resolve2) => {
|
|
@@ -5862,6 +6075,47 @@ function errMessage(err) {
|
|
|
5862
6075
|
|
|
5863
6076
|
// src/install/browser-pair.ts
|
|
5864
6077
|
init_device_id();
|
|
6078
|
+
|
|
6079
|
+
// src/install/one-click-exchange.ts
|
|
6080
|
+
async function exchangeOneClickToken(args) {
|
|
6081
|
+
const fetchImpl = args.fetchImpl ?? fetch;
|
|
6082
|
+
const controller = new AbortController();
|
|
6083
|
+
const timer = setTimeout(() => controller.abort(), args.timeoutMs ?? 1e4);
|
|
6084
|
+
try {
|
|
6085
|
+
const res = await fetchImpl(args.url, {
|
|
6086
|
+
method: "POST",
|
|
6087
|
+
headers: { "content-type": "application/json" },
|
|
6088
|
+
body: JSON.stringify({
|
|
6089
|
+
token: args.token,
|
|
6090
|
+
device_id: args.deviceId,
|
|
6091
|
+
label: args.label,
|
|
6092
|
+
client_meta: args.clientMeta
|
|
6093
|
+
}),
|
|
6094
|
+
signal: controller.signal
|
|
6095
|
+
});
|
|
6096
|
+
let body = {};
|
|
6097
|
+
try {
|
|
6098
|
+
body = await res.json();
|
|
6099
|
+
} catch {
|
|
6100
|
+
}
|
|
6101
|
+
if (!res.ok) {
|
|
6102
|
+
return { ok: false, reason: body.error ?? `http_${res.status}` };
|
|
6103
|
+
}
|
|
6104
|
+
if (body.status !== "exchanged" || typeof body.api_key !== "string" || !body.api_key.startsWith("mnd_")) {
|
|
6105
|
+
return { ok: false, reason: "unexpected_response" };
|
|
6106
|
+
}
|
|
6107
|
+
return { ok: true, apiKey: body.api_key, plan: body.plan ?? "unknown" };
|
|
6108
|
+
} catch (err) {
|
|
6109
|
+
if (err instanceof Error && err.name === "AbortError") {
|
|
6110
|
+
return { ok: false, reason: "timeout" };
|
|
6111
|
+
}
|
|
6112
|
+
return { ok: false, reason: err instanceof Error ? err.message : String(err) };
|
|
6113
|
+
} finally {
|
|
6114
|
+
clearTimeout(timer);
|
|
6115
|
+
}
|
|
6116
|
+
}
|
|
6117
|
+
|
|
6118
|
+
// src/install/browser-pair.ts
|
|
5865
6119
|
async function pairOrUseToken(opts) {
|
|
5866
6120
|
const targetKey = "browser-pair";
|
|
5867
6121
|
if (opts.token !== null) {
|
|
@@ -5901,6 +6155,47 @@ async function pairOrUseToken(opts) {
|
|
|
5901
6155
|
};
|
|
5902
6156
|
}
|
|
5903
6157
|
}
|
|
6158
|
+
let exchangeFailure = null;
|
|
6159
|
+
if (opts.oneClickToken !== null && opts.oneClickExchangeUrl !== null) {
|
|
6160
|
+
if (opts.dryRun) {
|
|
6161
|
+
return {
|
|
6162
|
+
apiKey: null,
|
|
6163
|
+
result: {
|
|
6164
|
+
target: targetKey,
|
|
6165
|
+
action: "exchange",
|
|
6166
|
+
status: "would-pair",
|
|
6167
|
+
detail: "would exchange one-click token for a device-bound key (no browser)"
|
|
6168
|
+
}
|
|
6169
|
+
};
|
|
6170
|
+
}
|
|
6171
|
+
const meta = clientMeta(opts.bridgeVersion);
|
|
6172
|
+
const exchanged = await exchangeOneClickToken({
|
|
6173
|
+
token: opts.oneClickToken,
|
|
6174
|
+
url: opts.oneClickExchangeUrl,
|
|
6175
|
+
deviceId: meta.device_id,
|
|
6176
|
+
label: bridgeLabel(),
|
|
6177
|
+
clientMeta: { ...meta }
|
|
6178
|
+
});
|
|
6179
|
+
if (exchanged.ok) {
|
|
6180
|
+
clearApiKey();
|
|
6181
|
+
writeApiKey(exchanged.apiKey);
|
|
6182
|
+
return {
|
|
6183
|
+
apiKey: exchanged.apiKey,
|
|
6184
|
+
result: {
|
|
6185
|
+
target: targetKey,
|
|
6186
|
+
action: "exchange",
|
|
6187
|
+
status: "created",
|
|
6188
|
+
detail: `device-bound api-key via one-click exchange (plan: ${exchanged.plan})`
|
|
6189
|
+
}
|
|
6190
|
+
};
|
|
6191
|
+
}
|
|
6192
|
+
exchangeFailure = exchanged.reason;
|
|
6193
|
+
out(opts).write(
|
|
6194
|
+
`[maind-mcp-bridge] one-click exchange failed (${exchanged.reason}) \u2014 falling back to browser pairing.
|
|
6195
|
+
`
|
|
6196
|
+
);
|
|
6197
|
+
}
|
|
6198
|
+
const fallbackNote = exchangeFailure === null ? "" : ` (after exchange failure: ${exchangeFailure})`;
|
|
5904
6199
|
const cached = readApiKey();
|
|
5905
6200
|
if (cached !== null) {
|
|
5906
6201
|
return {
|
|
@@ -5909,7 +6204,7 @@ async function pairOrUseToken(opts) {
|
|
|
5909
6204
|
target: targetKey,
|
|
5910
6205
|
action: "skip",
|
|
5911
6206
|
status: "skipped",
|
|
5912
|
-
detail:
|
|
6207
|
+
detail: `device already paired \u2014 use --reauth to force a fresh pairing${fallbackNote}`
|
|
5913
6208
|
}
|
|
5914
6209
|
};
|
|
5915
6210
|
}
|
|
@@ -5925,7 +6220,7 @@ async function pairOrUseToken(opts) {
|
|
|
5925
6220
|
};
|
|
5926
6221
|
}
|
|
5927
6222
|
try {
|
|
5928
|
-
const flow = await runDeviceFlow(opts.bridgeVersion);
|
|
6223
|
+
const flow = await runDeviceFlow(opts.bridgeVersion, out(opts));
|
|
5929
6224
|
if (flow === null) {
|
|
5930
6225
|
return {
|
|
5931
6226
|
apiKey: null,
|
|
@@ -5933,7 +6228,7 @@ async function pairOrUseToken(opts) {
|
|
|
5933
6228
|
target: targetKey,
|
|
5934
6229
|
action: "pair",
|
|
5935
6230
|
status: "failed",
|
|
5936
|
-
detail:
|
|
6231
|
+
detail: `device-authorization flow did not complete (denied / expired / timeout)${fallbackNote}`
|
|
5937
6232
|
}
|
|
5938
6233
|
};
|
|
5939
6234
|
}
|
|
@@ -5943,7 +6238,7 @@ async function pairOrUseToken(opts) {
|
|
|
5943
6238
|
target: targetKey,
|
|
5944
6239
|
action: "pair",
|
|
5945
6240
|
status: "created",
|
|
5946
|
-
detail: `device-bound api-key written (plan: ${flow.plan})`
|
|
6241
|
+
detail: `device-bound api-key written (plan: ${flow.plan})${fallbackNote}`
|
|
5947
6242
|
}
|
|
5948
6243
|
};
|
|
5949
6244
|
} catch (err) {
|
|
@@ -5973,6 +6268,9 @@ function validateTokenShape(token) {
|
|
|
5973
6268
|
function errMessage2(err) {
|
|
5974
6269
|
return err instanceof Error ? err.message : String(err);
|
|
5975
6270
|
}
|
|
6271
|
+
function out(opts) {
|
|
6272
|
+
return opts.out ?? process.stdout;
|
|
6273
|
+
}
|
|
5976
6274
|
|
|
5977
6275
|
// src/install/telemetry.ts
|
|
5978
6276
|
var DEFAULT_FUNCTIONS_ORIGIN2 = "https://vsddmiosisvfrairepxv.supabase.co/functions/v1";
|
|
@@ -6098,7 +6396,10 @@ async function runInstall(argv) {
|
|
|
6098
6396
|
const pairOutcome = await pairOrUseToken({
|
|
6099
6397
|
bridgeVersion: BRIDGE_VERSION,
|
|
6100
6398
|
token: flags.token,
|
|
6101
|
-
|
|
6399
|
+
oneClickToken: flags.oneClickToken,
|
|
6400
|
+
oneClickExchangeUrl: flags.oneClickExchangeUrl,
|
|
6401
|
+
dryRun: flags.dryRun,
|
|
6402
|
+
out: process.stdout
|
|
6102
6403
|
});
|
|
6103
6404
|
report.add(pairOutcome.result);
|
|
6104
6405
|
if (pairOutcome.result.status === "failed") {
|
|
@@ -6197,6 +6498,14 @@ Finished in ${wallClockSec}s. Restart your MCP client so it picks up the new ser
|
|
|
6197
6498
|
`
|
|
6198
6499
|
);
|
|
6199
6500
|
}
|
|
6501
|
+
const launch = resolveBridgeLaunch({
|
|
6502
|
+
entryPath: currentBridgeEntry(),
|
|
6503
|
+
nodePath: process.execPath,
|
|
6504
|
+
isElectron: process.versions.electron !== void 0
|
|
6505
|
+
});
|
|
6506
|
+
const reauthCmd = launch.fallbackReason === null ? `${launchToShellCommand(launch)} --reauth` : "npx -y @maind-dev/mcp-bridge --reauth";
|
|
6507
|
+
process.stdout.write(`Re-pair this device later with: ${reauthCmd}
|
|
6508
|
+
`);
|
|
6200
6509
|
if (exitCode === 1) {
|
|
6201
6510
|
process.stdout.write(
|
|
6202
6511
|
"Note: some steps were skipped or failed \u2014 review the table above. The MCP setup is usable as long as 'browser-pair' and at least one JSON/TOML target succeeded.\n"
|
|
@@ -6936,10 +7245,10 @@ var SavingsAggregator = class {
|
|
|
6936
7245
|
}
|
|
6937
7246
|
/** Return the pending delta and reset the accumulator. */
|
|
6938
7247
|
takePending() {
|
|
6939
|
-
const
|
|
7248
|
+
const out2 = { tokens: this.pendingTokens, calls: this.pendingCalls };
|
|
6940
7249
|
this.pendingTokens = 0;
|
|
6941
7250
|
this.pendingCalls = 0;
|
|
6942
|
-
return
|
|
7251
|
+
return out2;
|
|
6943
7252
|
}
|
|
6944
7253
|
};
|
|
6945
7254
|
function readFileCapped(absPath) {
|
|
@@ -7866,9 +8175,9 @@ async function main() {
|
|
|
7866
8175
|
}
|
|
7867
8176
|
if (process.argv.includes("--reauth")) {
|
|
7868
8177
|
clearApiKey();
|
|
7869
|
-
const result = await runDeviceFlow(BRIDGE_VERSION);
|
|
8178
|
+
const result = await runDeviceFlow(BRIDGE_VERSION, process.stdout);
|
|
7870
8179
|
if (result === null) process.exit(1);
|
|
7871
|
-
process.
|
|
8180
|
+
process.stdout.write("[maind-mcp-bridge] re-authorization complete.\n");
|
|
7872
8181
|
process.exit(0);
|
|
7873
8182
|
}
|
|
7874
8183
|
const deviceId = ensureDeviceId();
|
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":6836,"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":35430,"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-wiring.ts":{"bytes":12359,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"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/hook-merge.ts":{"bytes":13672,"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"},{"path":"src/install/hook-wiring.ts","kind":"import-statement","original":"./hook-wiring.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":7646,"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":10201,"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":6382,"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":19495,"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":21017,"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":1957,"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":28311,"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":15962,"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/ingest.js":{"bytes":2127,"imports":[],"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":770,"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/ingest.js","kind":"import-statement","original":"./ingest.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":2481,"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":23762,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"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},{"path":"../../packages/claude-code-telemetry/dist/index.js","kind":"import-statement","original":"@maind/claude-code-telemetry"},{"path":"../../packages/code-index/build/index.js","kind":"import-statement","original":"@maind/code-index"},{"path":"src/conventions-cache.ts","kind":"import-statement","original":"../conventions-cache.js"},{"path":"src/device-id.ts","kind":"import-statement","original":"../device-id.js"},{"path":"src/install/hook-wiring.ts","kind":"import-statement","original":"../install/hook-wiring.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":13910,"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: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: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:path","kind":"import-statement","external":true},{"path":"node:url","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":"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: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","kind":"import-statement","external":true},{"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},{"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: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: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":"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/conventions-cache.ts":{"bytesInOutput":3358},"src/device-id.ts":{"bytesInOutput":2427},"src/version.ts":{"bytesInOutput":127},"src/install/bridge-entry.ts":{"bytesInOutput":1893},"src/install/hook-wiring.ts":{"bytesInOutput":5916},"../../packages/code-index/build/parse/keys.js":{"bytesInOutput":273},"../../packages/code-index/build/parse/types.js":{"bytesInOutput":652},"../../packages/code-index/build/embed/recipe.js":{"bytesInOutput":320},"../../packages/code-index/build/embed/types.js":{"bytesInOutput":262},"../../packages/code-index/build/util/vector.js":{"bytesInOutput":446},"../../packages/code-index/build/graph/resolve.js":{"bytesInOutput":2672},"../../packages/code-index/build/incremental/discover.js":{"bytesInOutput":5300},"../../packages/code-index/build/incremental/hunks.js":{"bytesInOutput":4218},"../../packages/code-index/build/incremental/history.js":{"bytesInOutput":3674},"../../packages/code-index/build/repo-health/divergence.js":{"bytesInOutput":13172},"../../packages/code-index/build/repo-health/number-collisions.js":{"bytesInOutput":11108},"../../packages/code-index/build/review/risk-rules.js":{"bytesInOutput":1137},"../../packages/code-index/build/review/risk-scan.js":{"bytesInOutput":940},"../../packages/code-index/build/store/schema.js":{"bytesInOutput":2434},"../../packages/code-index/build/util/identifiers.js":{"bytesInOutput":1211},"../../packages/code-index/build/query/engine.js":{"bytesInOutput":16592},"../../packages/code-index/build/model/types.js":{"bytesInOutput":107},"../../packages/code-index/build/index.js":{"bytesInOutput":348},"../../packages/claude-code-telemetry/dist/types.js":{"bytesInOutput":111},"../../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":9282},"../../packages/claude-code-telemetry/dist/ingest.js":{"bytesInOutput":112},"../../packages/claude-code-telemetry/dist/parse.js":{"bytesInOutput":148},"../../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":299},"src/hooks/api.ts":{"bytesInOutput":1234},"src/hooks/hook-input.ts":{"bytesInOutput":1142},"src/hooks/state.ts":{"bytesInOutput":1728},"src/hooks/index.ts":{"bytesInOutput":12996},"src/session-end/index.ts":{"bytesInOutput":1707},"src/index.ts":{"bytesInOutput":8195},"src/forward.ts":{"bytesInOutput":17625},"src/client-detect.ts":{"bytesInOutput":2068},"src/auth.ts":{"bytesInOutput":5109},"src/project-key.ts":{"bytesInOutput":1352},"src/install/index.ts":{"bytesInOutput":5207},"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":3239},"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":6687},"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":545},"../../packages/code-index/build/parse/tree-sitter/parser.js":{"bytesInOutput":2070},"../../packages/code-index/build/parse/lang/python.js":{"bytesInOutput":3760},"../../packages/code-index/build/parse/lang/shared.js":{"bytesInOutput":1131},"../../packages/code-index/build/parse/lang/typescript.js":{"bytesInOutput":4729},"../../packages/code-index/build/parse/tree-sitter/grammars.js":{"bytesInOutput":523},"../../packages/code-index/build/store/node-sqlite.js":{"bytesInOutput":9794},"../../packages/code-index/build/sync/client.js":{"bytesInOutput":15},"src/local-tools/savings.ts":{"bytesInOutput":1926},"src/local-tools/token-estimate.ts":{"bytesInOutput":133},"src/local-tools/tools.ts":{"bytesInOutput":24547},"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":277318}}}
|
|
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":8167,"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":7076,"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":6836,"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":6145,"imports":[{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"./atomic-write.js"}],"format":"esm"},"src/install/toml-merge.ts":{"bytes":5260,"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":35430,"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-wiring.ts":{"bytes":12359,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"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/hook-merge.ts":{"bytes":13672,"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"},{"path":"src/install/hook-wiring.ts","kind":"import-statement","original":"./hook-wiring.js"}],"format":"esm"},"src/install/one-click-exchange.ts":{"bytes":2872,"imports":[],"format":"esm"},"src/install/browser-pair.ts":{"bytes":7133,"imports":[{"path":"src/auth.ts","kind":"import-statement","original":"../auth.js"},{"path":"src/device-id.ts","kind":"import-statement","original":"../device-id.js"},{"path":"src/install/one-click-exchange.ts","kind":"import-statement","original":"./one-click-exchange.js"}],"format":"esm"},"src/install/telemetry.ts":{"bytes":3027,"imports":[],"format":"esm"},"src/install/index.ts":{"bytes":8512,"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/bridge-entry.ts","kind":"import-statement","original":"./bridge-entry.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":10201,"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":6382,"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":19495,"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":21017,"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":1957,"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":28311,"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":15962,"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/ingest.js":{"bytes":3096,"imports":[],"format":"esm"},"../../packages/claude-code-telemetry/dist/session-span.js":{"bytes":10271,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true}],"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":875,"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/ingest.js","kind":"import-statement","original":"./ingest.js"},{"path":"../../packages/claude-code-telemetry/dist/session-span.js","kind":"import-statement","original":"./session-span.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":2481,"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":23762,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"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},{"path":"../../packages/claude-code-telemetry/dist/index.js","kind":"import-statement","original":"@maind/claude-code-telemetry"},{"path":"../../packages/code-index/build/index.js","kind":"import-statement","original":"@maind/code-index"},{"path":"src/conventions-cache.ts","kind":"import-statement","original":"../conventions-cache.js"},{"path":"src/device-id.ts","kind":"import-statement","original":"../device-id.js"},{"path":"src/install/hook-wiring.ts","kind":"import-statement","original":"../install/hook-wiring.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":4147,"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":14088,"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: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: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:path","kind":"import-statement","external":true},{"path":"node:url","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":"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: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: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","kind":"import-statement","external":true},{"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},{"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: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: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":"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/conventions-cache.ts":{"bytesInOutput":3358},"src/device-id.ts":{"bytesInOutput":2542},"src/version.ts":{"bytesInOutput":127},"src/install/bridge-entry.ts":{"bytesInOutput":1893},"src/install/hook-wiring.ts":{"bytesInOutput":5916},"../../packages/code-index/build/parse/keys.js":{"bytesInOutput":273},"../../packages/code-index/build/parse/types.js":{"bytesInOutput":652},"../../packages/code-index/build/embed/recipe.js":{"bytesInOutput":320},"../../packages/code-index/build/embed/types.js":{"bytesInOutput":262},"../../packages/code-index/build/util/vector.js":{"bytesInOutput":446},"../../packages/code-index/build/graph/resolve.js":{"bytesInOutput":2672},"../../packages/code-index/build/incremental/discover.js":{"bytesInOutput":5303},"../../packages/code-index/build/incremental/hunks.js":{"bytesInOutput":4218},"../../packages/code-index/build/incremental/history.js":{"bytesInOutput":3674},"../../packages/code-index/build/repo-health/divergence.js":{"bytesInOutput":13189},"../../packages/code-index/build/repo-health/number-collisions.js":{"bytesInOutput":11118},"../../packages/code-index/build/review/risk-rules.js":{"bytesInOutput":1137},"../../packages/code-index/build/review/risk-scan.js":{"bytesInOutput":940},"../../packages/code-index/build/store/schema.js":{"bytesInOutput":2434},"../../packages/code-index/build/util/identifiers.js":{"bytesInOutput":1211},"../../packages/code-index/build/query/engine.js":{"bytesInOutput":16598},"../../packages/code-index/build/model/types.js":{"bytesInOutput":107},"../../packages/code-index/build/index.js":{"bytesInOutput":348},"../../packages/claude-code-telemetry/dist/types.js":{"bytesInOutput":111},"../../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":9282},"../../packages/claude-code-telemetry/dist/ingest.js":{"bytesInOutput":317},"../../packages/claude-code-telemetry/dist/session-span.js":{"bytesInOutput":4537},"../../packages/claude-code-telemetry/dist/parse.js":{"bytesInOutput":148},"../../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":324},"src/hooks/api.ts":{"bytesInOutput":1234},"src/hooks/hook-input.ts":{"bytesInOutput":1142},"src/hooks/state.ts":{"bytesInOutput":1728},"src/hooks/index.ts":{"bytesInOutput":12999},"src/session-end/index.ts":{"bytesInOutput":2150},"src/index.ts":{"bytesInOutput":8211},"src/forward.ts":{"bytesInOutput":17627},"src/client-detect.ts":{"bytesInOutput":2068},"src/auth.ts":{"bytesInOutput":5084},"src/project-key.ts":{"bytesInOutput":1352},"src/install/index.ts":{"bytesInOutput":5724},"src/install/flags.ts":{"bytesInOutput":5191},"src/install/report.ts":{"bytesInOutput":3096},"src/install/project-root.ts":{"bytesInOutput":2188},"src/install/client-targets.ts":{"bytesInOutput":3239},"src/install/atomic-write.ts":{"bytesInOutput":1760},"src/install/json-merge.ts":{"bytesInOutput":3769},"src/install/toml-merge.ts":{"bytesInOutput":3529},"src/install/preamble.ts":{"bytesInOutput":2812},"../../packages/integration-snippets/build/index.js":{"bytesInOutput":27539},"src/install/hook-merge.ts":{"bytesInOutput":6690},"src/install/browser-pair.ts":{"bytesInOutput":4115},"src/install/one-click-exchange.ts":{"bytesInOutput":1235},"src/install/telemetry.ts":{"bytesInOutput":1798},"src/local-tools/engine.ts":{"bytesInOutput":483},"../../packages/code-index/build/node.js":{"bytesInOutput":545},"../../packages/code-index/build/parse/tree-sitter/parser.js":{"bytesInOutput":2070},"../../packages/code-index/build/parse/lang/python.js":{"bytesInOutput":3760},"../../packages/code-index/build/parse/lang/shared.js":{"bytesInOutput":1131},"../../packages/code-index/build/parse/lang/typescript.js":{"bytesInOutput":4729},"../../packages/code-index/build/parse/tree-sitter/grammars.js":{"bytesInOutput":523},"../../packages/code-index/build/store/node-sqlite.js":{"bytesInOutput":9794},"../../packages/code-index/build/sync/client.js":{"bytesInOutput":15},"src/local-tools/savings.ts":{"bytesInOutput":1928},"src/local-tools/token-estimate.ts":{"bytesInOutput":133},"src/local-tools/tools.ts":{"bytesInOutput":24547},"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":287628}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maind-dev/mcp-bridge",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Local MCP bridge for maind.dev
|
|
3
|
+
"version": "0.22.0",
|
|
4
|
+
"description": "Local MCP bridge for maind.dev — 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",
|
|
7
7
|
"bin": {
|
|
@@ -11,15 +11,6 @@
|
|
|
11
11
|
"build",
|
|
12
12
|
"README.md"
|
|
13
13
|
],
|
|
14
|
-
"scripts": {
|
|
15
|
-
"build": "pnpm --filter @maind/code-index build && node scripts/bundle.mjs",
|
|
16
|
-
"prepublishOnly": "pnpm build",
|
|
17
|
-
"start": "node build/index.js",
|
|
18
|
-
"dev": "node --watch --watch-path=src --import tsx src/index.ts",
|
|
19
|
-
"test": "node --import tsx --test 'test/**/*.test.ts'",
|
|
20
|
-
"type-check": "tsc --noEmit",
|
|
21
|
-
"typecheck": "tsc --noEmit"
|
|
22
|
-
},
|
|
23
14
|
"dependencies": {
|
|
24
15
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
25
16
|
"better-sqlite3": "^12.11.1",
|
|
@@ -28,13 +19,13 @@
|
|
|
28
19
|
"web-tree-sitter": "0.24.7"
|
|
29
20
|
},
|
|
30
21
|
"devDependencies": {
|
|
31
|
-
"@maind-dev/integration-snippets": "workspace:*",
|
|
32
|
-
"@maind/claude-code-telemetry": "workspace:*",
|
|
33
|
-
"@maind/code-index": "workspace:*",
|
|
34
22
|
"@types/node": "^20.11.0",
|
|
35
23
|
"esbuild": "^0.24.0",
|
|
36
24
|
"tsx": "^4.7.0",
|
|
37
|
-
"typescript": "^5.4.0"
|
|
25
|
+
"typescript": "^5.4.0",
|
|
26
|
+
"@maind-dev/integration-snippets": "0.1.0",
|
|
27
|
+
"@maind/code-index": "0.0.0",
|
|
28
|
+
"@maind/claude-code-telemetry": "0.0.0"
|
|
38
29
|
},
|
|
39
30
|
"engines": {
|
|
40
31
|
"node": ">=20.0.0"
|
|
@@ -49,5 +40,13 @@
|
|
|
49
40
|
"license": "MIT",
|
|
50
41
|
"publishConfig": {
|
|
51
42
|
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "pnpm --filter \"@maind-dev/mcp-bridge^...\" build && node scripts/bundle.mjs",
|
|
46
|
+
"start": "node build/index.js",
|
|
47
|
+
"dev": "node --watch --watch-path=src --import tsx src/index.ts",
|
|
48
|
+
"test": "node --import tsx --test 'test/**/*.test.ts'",
|
|
49
|
+
"type-check": "tsc --noEmit",
|
|
50
|
+
"typecheck": "tsc --noEmit"
|
|
52
51
|
}
|
|
53
|
-
}
|
|
52
|
+
}
|