@maind-dev/mcp-bridge 0.8.1 → 0.10.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 +428 -12
- package/build/meta.json +1 -1
- package/package.json +15 -16
package/build/index.js
CHANGED
|
@@ -97,7 +97,7 @@ var BRIDGE_VERSION;
|
|
|
97
97
|
var init_version = __esm({
|
|
98
98
|
"src/version.ts"() {
|
|
99
99
|
"use strict";
|
|
100
|
-
BRIDGE_VERSION = "0.
|
|
100
|
+
BRIDGE_VERSION = "0.10.0";
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
|
|
@@ -3714,9 +3714,10 @@ var IGNORE_DIRS = /* @__PURE__ */ new Set([
|
|
|
3714
3714
|
".venv",
|
|
3715
3715
|
"venv"
|
|
3716
3716
|
]);
|
|
3717
|
-
|
|
3717
|
+
var GIT_CONFIG_PIN = ["-c", "diff.renames=true", "-c", "core.quotePath=false"];
|
|
3718
|
+
function runGit(repoRoot, args) {
|
|
3718
3719
|
try {
|
|
3719
|
-
return execFileSync2("git", args, {
|
|
3720
|
+
return execFileSync2("git", [...GIT_CONFIG_PIN, ...args], {
|
|
3720
3721
|
cwd: repoRoot,
|
|
3721
3722
|
encoding: "utf8",
|
|
3722
3723
|
stdio: ["ignore", "pipe", "ignore"],
|
|
@@ -3727,6 +3728,7 @@ function git(repoRoot, args) {
|
|
|
3727
3728
|
return null;
|
|
3728
3729
|
}
|
|
3729
3730
|
}
|
|
3731
|
+
var git = runGit;
|
|
3730
3732
|
function toPosix(p) {
|
|
3731
3733
|
return sep === "/" ? p : p.split(sep).join("/");
|
|
3732
3734
|
}
|
|
@@ -3742,6 +3744,9 @@ function classify(paths) {
|
|
|
3742
3744
|
}
|
|
3743
3745
|
return out;
|
|
3744
3746
|
}
|
|
3747
|
+
function classifyPaths(paths) {
|
|
3748
|
+
return classify(paths);
|
|
3749
|
+
}
|
|
3745
3750
|
function discoverSourceFiles(repoRoot) {
|
|
3746
3751
|
const tracked = git(repoRoot, ["ls-files", "--cached", "--others", "--exclude-standard"]);
|
|
3747
3752
|
if (tracked !== null) {
|
|
@@ -3772,12 +3777,12 @@ function walk(root, rel, acc) {
|
|
|
3772
3777
|
acc.push(childRel);
|
|
3773
3778
|
}
|
|
3774
3779
|
}
|
|
3775
|
-
function
|
|
3780
|
+
function enumerateChangedPaths(repoRoot, opts = {}) {
|
|
3776
3781
|
if (headCommit(repoRoot) === null)
|
|
3777
3782
|
return null;
|
|
3778
3783
|
const includeUncommitted = opts.includeUncommitted !== false;
|
|
3779
3784
|
const ref = opts.since ?? "HEAD";
|
|
3780
|
-
const diffArgs = ["diff", "--name-
|
|
3785
|
+
const diffArgs = ["diff", "--name-status", "--diff-filter=d", ref];
|
|
3781
3786
|
if (!includeUncommitted) {
|
|
3782
3787
|
if (!opts.since) {
|
|
3783
3788
|
throw new Error("nothing to enumerate: include_uncommitted=false requires a `since` ref");
|
|
@@ -3788,9 +3793,26 @@ function changedSourceFiles(repoRoot, opts = {}) {
|
|
|
3788
3793
|
if (diff === null) {
|
|
3789
3794
|
throw new Error(`git diff failed \u2014 is '${ref}' a valid ref?`);
|
|
3790
3795
|
}
|
|
3791
|
-
const paths =
|
|
3796
|
+
const paths = /* @__PURE__ */ new Map();
|
|
3797
|
+
for (const line of diff.split("\n")) {
|
|
3798
|
+
if (!line.trim())
|
|
3799
|
+
continue;
|
|
3800
|
+
const cols = line.split(" ");
|
|
3801
|
+
if (cols.length < 2)
|
|
3802
|
+
continue;
|
|
3803
|
+
const code = cols[0][0];
|
|
3804
|
+
const p = unquote((cols.length >= 3 ? cols[cols.length - 1] : cols[1]).trim());
|
|
3805
|
+
if (!p)
|
|
3806
|
+
continue;
|
|
3807
|
+
if (code === "A" || code === "C")
|
|
3808
|
+
paths.set(p, "added");
|
|
3809
|
+
else if (code === "R")
|
|
3810
|
+
paths.set(p, "renamed");
|
|
3811
|
+
else
|
|
3812
|
+
paths.set(p, "modified");
|
|
3813
|
+
}
|
|
3792
3814
|
if (includeUncommitted) {
|
|
3793
|
-
const status = git(repoRoot, ["status", "--porcelain"]) ?? "";
|
|
3815
|
+
const status = git(repoRoot, ["status", "--porcelain", "-uall"]) ?? "";
|
|
3794
3816
|
for (const line of status.split("\n")) {
|
|
3795
3817
|
if (line.length < 4)
|
|
3796
3818
|
continue;
|
|
@@ -3802,13 +3824,27 @@ function changedSourceFiles(repoRoot, opts = {}) {
|
|
|
3802
3824
|
const arrow = p.indexOf(" -> ");
|
|
3803
3825
|
if (arrow >= 0)
|
|
3804
3826
|
p = p.slice(arrow + 4);
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3827
|
+
p = unquote(p);
|
|
3828
|
+
if (!p || paths.has(p))
|
|
3829
|
+
continue;
|
|
3830
|
+
if (x === "?" || x === "A" || y === "A")
|
|
3831
|
+
paths.set(p, "added");
|
|
3832
|
+
else if (x === "R")
|
|
3833
|
+
paths.set(p, "renamed");
|
|
3834
|
+
else
|
|
3835
|
+
paths.set(p, "modified");
|
|
3809
3836
|
}
|
|
3810
3837
|
}
|
|
3811
|
-
return
|
|
3838
|
+
return paths;
|
|
3839
|
+
}
|
|
3840
|
+
function unquote(p) {
|
|
3841
|
+
return p.startsWith('"') && p.endsWith('"') ? p.slice(1, -1) : p;
|
|
3842
|
+
}
|
|
3843
|
+
function changedSourceFiles(repoRoot, opts = {}) {
|
|
3844
|
+
const paths = enumerateChangedPaths(repoRoot, opts);
|
|
3845
|
+
if (paths === null)
|
|
3846
|
+
return null;
|
|
3847
|
+
return classify(paths.keys());
|
|
3812
3848
|
}
|
|
3813
3849
|
function statFile(repoRoot, relPath) {
|
|
3814
3850
|
try {
|
|
@@ -3824,6 +3860,221 @@ function hashContent(content) {
|
|
|
3824
3860
|
function headCommit(repoRoot) {
|
|
3825
3861
|
return git(repoRoot, ["rev-parse", "HEAD"])?.trim() ?? null;
|
|
3826
3862
|
}
|
|
3863
|
+
function resolveCommitSha(repoRoot, ref) {
|
|
3864
|
+
return git(repoRoot, ["rev-parse", "--verify", `${ref}^{commit}`])?.trim() ?? null;
|
|
3865
|
+
}
|
|
3866
|
+
function isWorktreeDirty(repoRoot) {
|
|
3867
|
+
const status = git(repoRoot, ["status", "--porcelain", "-uall"]);
|
|
3868
|
+
return status !== null && status.trim().length > 0;
|
|
3869
|
+
}
|
|
3870
|
+
|
|
3871
|
+
// ../../packages/code-index/build/incremental/hunks.js
|
|
3872
|
+
var MAX_DIFF_BYTES = 16 * 1024 * 1024;
|
|
3873
|
+
var MAX_HUNKS_PER_FILE = 500;
|
|
3874
|
+
var MAX_ADDED_LINES_PER_FILE = 4e3;
|
|
3875
|
+
var MAX_UNTRACKED_HEAD_BYTES = 256 * 1024;
|
|
3876
|
+
var HUNK_RE = /^@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@/;
|
|
3877
|
+
function changedHunks(repoRoot, opts = {}) {
|
|
3878
|
+
if (runGit(repoRoot, ["rev-parse", "HEAD"]) === null)
|
|
3879
|
+
return null;
|
|
3880
|
+
const includeUncommitted = opts.includeUncommitted !== false;
|
|
3881
|
+
const ref = opts.since ?? "HEAD";
|
|
3882
|
+
const diffArgs = [
|
|
3883
|
+
"diff",
|
|
3884
|
+
"--unified=0",
|
|
3885
|
+
"--no-color",
|
|
3886
|
+
"--no-ext-diff",
|
|
3887
|
+
"--diff-filter=d",
|
|
3888
|
+
ref
|
|
3889
|
+
];
|
|
3890
|
+
if (!includeUncommitted) {
|
|
3891
|
+
if (!opts.since) {
|
|
3892
|
+
throw new Error("nothing to enumerate: include_uncommitted=false requires a `since` ref");
|
|
3893
|
+
}
|
|
3894
|
+
diffArgs.push("HEAD");
|
|
3895
|
+
}
|
|
3896
|
+
const diff = runGit(repoRoot, diffArgs);
|
|
3897
|
+
if (diff === null) {
|
|
3898
|
+
throw new Error(`git diff failed \u2014 is '${ref}' a valid ref?`);
|
|
3899
|
+
}
|
|
3900
|
+
const files = /* @__PURE__ */ new Map();
|
|
3901
|
+
let coverage = "full";
|
|
3902
|
+
if (Buffer.byteLength(diff, "utf8") > MAX_DIFF_BYTES) {
|
|
3903
|
+
coverage = "none";
|
|
3904
|
+
} else {
|
|
3905
|
+
parseUnifiedDiff(diff, files, () => {
|
|
3906
|
+
coverage = "partial";
|
|
3907
|
+
});
|
|
3908
|
+
}
|
|
3909
|
+
if (includeUncommitted) {
|
|
3910
|
+
const status = runGit(repoRoot, ["status", "--porcelain", "-uall"]) ?? "";
|
|
3911
|
+
for (const line of status.split("\n")) {
|
|
3912
|
+
if (line.length < 4 || line[0] !== "?")
|
|
3913
|
+
continue;
|
|
3914
|
+
let p = line.slice(3);
|
|
3915
|
+
if (p.startsWith('"') && p.endsWith('"'))
|
|
3916
|
+
p = p.slice(1, -1);
|
|
3917
|
+
if (!p || files.has(p))
|
|
3918
|
+
continue;
|
|
3919
|
+
files.set(p, {
|
|
3920
|
+
path: p,
|
|
3921
|
+
status: "added",
|
|
3922
|
+
binary: false,
|
|
3923
|
+
wholeFile: true,
|
|
3924
|
+
degraded: false,
|
|
3925
|
+
addedRanges: [],
|
|
3926
|
+
deletionPoints: [],
|
|
3927
|
+
addedLines: []
|
|
3928
|
+
});
|
|
3929
|
+
}
|
|
3930
|
+
}
|
|
3931
|
+
return { files, coverage };
|
|
3932
|
+
}
|
|
3933
|
+
function parseUnifiedDiff(diff, files, onDegrade) {
|
|
3934
|
+
let current = null;
|
|
3935
|
+
let hunkCount = 0;
|
|
3936
|
+
let pendingRename = false;
|
|
3937
|
+
let pendingNewFile = false;
|
|
3938
|
+
const commit = () => {
|
|
3939
|
+
if (current)
|
|
3940
|
+
files.set(current.path, current);
|
|
3941
|
+
current = null;
|
|
3942
|
+
hunkCount = 0;
|
|
3943
|
+
};
|
|
3944
|
+
for (const line of diff.split("\n")) {
|
|
3945
|
+
if (line.startsWith("diff --git ")) {
|
|
3946
|
+
commit();
|
|
3947
|
+
pendingRename = false;
|
|
3948
|
+
pendingNewFile = false;
|
|
3949
|
+
continue;
|
|
3950
|
+
}
|
|
3951
|
+
if (line.startsWith("new file mode")) {
|
|
3952
|
+
pendingNewFile = true;
|
|
3953
|
+
continue;
|
|
3954
|
+
}
|
|
3955
|
+
if (line.startsWith("rename to ")) {
|
|
3956
|
+
pendingRename = true;
|
|
3957
|
+
continue;
|
|
3958
|
+
}
|
|
3959
|
+
if (line.startsWith("Binary files ") || line.startsWith("GIT binary patch")) {
|
|
3960
|
+
if (current)
|
|
3961
|
+
current.binary = true;
|
|
3962
|
+
continue;
|
|
3963
|
+
}
|
|
3964
|
+
if (line.startsWith("+++ ")) {
|
|
3965
|
+
let p = line.slice(4).trim();
|
|
3966
|
+
if (p.startsWith('"') && p.endsWith('"'))
|
|
3967
|
+
p = p.slice(1, -1);
|
|
3968
|
+
if (p.startsWith("b/"))
|
|
3969
|
+
p = p.slice(2);
|
|
3970
|
+
if (p === "/dev/null")
|
|
3971
|
+
continue;
|
|
3972
|
+
current = {
|
|
3973
|
+
path: p,
|
|
3974
|
+
status: pendingNewFile ? "added" : pendingRename ? "renamed" : "modified",
|
|
3975
|
+
binary: false,
|
|
3976
|
+
wholeFile: false,
|
|
3977
|
+
degraded: false,
|
|
3978
|
+
addedRanges: [],
|
|
3979
|
+
deletionPoints: [],
|
|
3980
|
+
addedLines: []
|
|
3981
|
+
};
|
|
3982
|
+
continue;
|
|
3983
|
+
}
|
|
3984
|
+
if (!current)
|
|
3985
|
+
continue;
|
|
3986
|
+
const m = HUNK_RE.exec(line);
|
|
3987
|
+
if (m) {
|
|
3988
|
+
hunkCount++;
|
|
3989
|
+
if (hunkCount > MAX_HUNKS_PER_FILE) {
|
|
3990
|
+
if (!current.degraded) {
|
|
3991
|
+
current.degraded = true;
|
|
3992
|
+
current.addedRanges = [];
|
|
3993
|
+
current.deletionPoints = [];
|
|
3994
|
+
current.addedLines = [];
|
|
3995
|
+
onDegrade();
|
|
3996
|
+
}
|
|
3997
|
+
continue;
|
|
3998
|
+
}
|
|
3999
|
+
const start = Number(m[1]);
|
|
4000
|
+
const count = m[2] === void 0 ? 1 : Number(m[2]);
|
|
4001
|
+
if (count > 0)
|
|
4002
|
+
current.addedRanges.push({ start, end: start + count - 1 });
|
|
4003
|
+
else
|
|
4004
|
+
current.deletionPoints.push(start);
|
|
4005
|
+
continue;
|
|
4006
|
+
}
|
|
4007
|
+
if (line.startsWith("+") && !line.startsWith("+++") && !current.degraded && current.addedLines.length < MAX_ADDED_LINES_PER_FILE) {
|
|
4008
|
+
current.addedLines.push(line.slice(1));
|
|
4009
|
+
}
|
|
4010
|
+
}
|
|
4011
|
+
commit();
|
|
4012
|
+
}
|
|
4013
|
+
|
|
4014
|
+
// ../../packages/code-index/build/review/risk-rules.js
|
|
4015
|
+
var RISK_RULES = [
|
|
4016
|
+
{
|
|
4017
|
+
flag: "sql_migration_added",
|
|
4018
|
+
path: /(^|\/)migrations\/[^/]+\.sql$/i,
|
|
4019
|
+
onlyWhenAdded: true
|
|
4020
|
+
},
|
|
4021
|
+
{
|
|
4022
|
+
flag: "security_definer_touched",
|
|
4023
|
+
path: /\.sql$/i,
|
|
4024
|
+
content: /\bSECURITY\s+DEFINER\b/i
|
|
4025
|
+
},
|
|
4026
|
+
{
|
|
4027
|
+
flag: "rls_policy_changed",
|
|
4028
|
+
path: /\.sql$/i,
|
|
4029
|
+
content: /\b(CREATE|ALTER|DROP)\s+POLICY\b|\bROW\s+LEVEL\s+SECURITY\b/i
|
|
4030
|
+
},
|
|
4031
|
+
{
|
|
4032
|
+
flag: "auth_config_changed",
|
|
4033
|
+
path: /(^|\/)supabase\/config\.toml$|(^|\/)(middleware|proxy)\.(ts|js)$/
|
|
4034
|
+
},
|
|
4035
|
+
{
|
|
4036
|
+
flag: "package_manifest_changed",
|
|
4037
|
+
path: /(^|\/)(package\.json|pnpm-lock\.yaml|package-lock\.json|yarn\.lock|requirements\.txt|pyproject\.toml|Cargo\.toml|go\.mod)$/
|
|
4038
|
+
},
|
|
4039
|
+
{
|
|
4040
|
+
flag: "ci_workflow_changed",
|
|
4041
|
+
path: /^\.github\/workflows\/[^/]+\.ya?ml$|^\.gitlab-ci\.yml$/
|
|
4042
|
+
},
|
|
4043
|
+
{
|
|
4044
|
+
flag: "env_or_secrets_file",
|
|
4045
|
+
path: /(^|\/)\.env(\.[^/]+)?$|\.(pem|key)$/
|
|
4046
|
+
}
|
|
4047
|
+
];
|
|
4048
|
+
|
|
4049
|
+
// ../../packages/code-index/build/review/risk-scan.js
|
|
4050
|
+
function scanRiskFlags(input) {
|
|
4051
|
+
const flags = /* @__PURE__ */ new Set();
|
|
4052
|
+
for (const [path6, status] of input.paths) {
|
|
4053
|
+
for (const rule of RISK_RULES) {
|
|
4054
|
+
if (flags.has(rule.flag))
|
|
4055
|
+
continue;
|
|
4056
|
+
if (!rule.path.test(path6))
|
|
4057
|
+
continue;
|
|
4058
|
+
if (rule.onlyWhenAdded && status !== "added")
|
|
4059
|
+
continue;
|
|
4060
|
+
if (!rule.content) {
|
|
4061
|
+
flags.add(rule.flag);
|
|
4062
|
+
continue;
|
|
4063
|
+
}
|
|
4064
|
+
const text = contentForPath(path6, input);
|
|
4065
|
+
if (text !== null && rule.content.test(text))
|
|
4066
|
+
flags.add(rule.flag);
|
|
4067
|
+
}
|
|
4068
|
+
}
|
|
4069
|
+
return [...flags].sort();
|
|
4070
|
+
}
|
|
4071
|
+
function contentForPath(path6, input) {
|
|
4072
|
+
const hunks = input.hunks.get(path6);
|
|
4073
|
+
if (hunks && !hunks.wholeFile && !hunks.degraded) {
|
|
4074
|
+
return hunks.addedLines.join("\n");
|
|
4075
|
+
}
|
|
4076
|
+
return input.readUntracked(path6);
|
|
4077
|
+
}
|
|
3827
4078
|
|
|
3828
4079
|
// ../../packages/code-index/build/store/schema.js
|
|
3829
4080
|
var SCHEMA_VERSION = "1";
|
|
@@ -4201,10 +4452,67 @@ var CodeIndexEngine = class {
|
|
|
4201
4452
|
truncated: symbols.length > limit
|
|
4202
4453
|
};
|
|
4203
4454
|
}
|
|
4455
|
+
async reviewChanges(opts = {}) {
|
|
4456
|
+
await this.store.init();
|
|
4457
|
+
const rawPaths = enumerateChangedPaths(this.repoRoot, opts);
|
|
4458
|
+
if (rawPaths === null) {
|
|
4459
|
+
throw new Error("reviewChanges requires a git repository (change detection is git-based)");
|
|
4460
|
+
}
|
|
4461
|
+
const hunksRes = changedHunks(this.repoRoot, opts);
|
|
4462
|
+
const hunks = hunksRes?.files ?? /* @__PURE__ */ new Map();
|
|
4463
|
+
let hunkCoverage = hunksRes?.coverage ?? "none";
|
|
4464
|
+
const riskFlags = scanRiskFlags({
|
|
4465
|
+
paths: rawPaths,
|
|
4466
|
+
hunks,
|
|
4467
|
+
readUntracked: (p) => this.readRepoFileHead(p, MAX_UNTRACKED_HEAD_BYTES)
|
|
4468
|
+
});
|
|
4469
|
+
const files = classifyPaths(rawPaths.keys());
|
|
4470
|
+
const limit = clampLimit(opts.limit, 64, 200);
|
|
4471
|
+
const symbols = [];
|
|
4472
|
+
let indexedFiles = 0;
|
|
4473
|
+
let staleFiles = 0;
|
|
4474
|
+
for (const f of files) {
|
|
4475
|
+
const rows = await this.store.getNodesByFile(f.path);
|
|
4476
|
+
if (rows.length === 0)
|
|
4477
|
+
continue;
|
|
4478
|
+
indexedFiles++;
|
|
4479
|
+
const fileRow = await this.store.getFile(f.path);
|
|
4480
|
+
const content = this.readRepoFile(f.path);
|
|
4481
|
+
const stale = fileRow !== null && content !== null && hashContent(content) !== fileRow.contentHash;
|
|
4482
|
+
if (stale) {
|
|
4483
|
+
staleFiles++;
|
|
4484
|
+
if (hunkCoverage === "full")
|
|
4485
|
+
hunkCoverage = "partial";
|
|
4486
|
+
}
|
|
4487
|
+
const fileStatus = rawPaths.get(f.path) ?? "modified";
|
|
4488
|
+
const fh = hunks.get(f.path);
|
|
4489
|
+
for (const row of rows) {
|
|
4490
|
+
symbols.push(classifyReviewSymbol(row, fileStatus, fh, stale));
|
|
4491
|
+
}
|
|
4492
|
+
}
|
|
4493
|
+
symbols.sort((a, b) => changeRank(a.change) - changeRank(b.change) || a.filePath.localeCompare(b.filePath) || a.startLine - b.startLine);
|
|
4494
|
+
return {
|
|
4495
|
+
changedFiles: files.length,
|
|
4496
|
+
indexedFiles,
|
|
4497
|
+
staleFiles,
|
|
4498
|
+
symbols: symbols.slice(0, limit),
|
|
4499
|
+
truncated: symbols.length > limit,
|
|
4500
|
+
riskFlags,
|
|
4501
|
+
hunkCoverage,
|
|
4502
|
+
baseKind: opts.since ? "ref" : "uncommitted",
|
|
4503
|
+
headSha: headCommit(this.repoRoot),
|
|
4504
|
+
dirty: isWorktreeDirty(this.repoRoot),
|
|
4505
|
+
baseSha: opts.since ? resolveCommitSha(this.repoRoot, opts.since) : null
|
|
4506
|
+
};
|
|
4507
|
+
}
|
|
4204
4508
|
async close() {
|
|
4205
4509
|
await this.store.close();
|
|
4206
4510
|
}
|
|
4207
4511
|
// ── internal ──
|
|
4512
|
+
readRepoFileHead(relPath, maxBytes) {
|
|
4513
|
+
const content = this.readRepoFile(relPath);
|
|
4514
|
+
return content === null ? null : content.slice(0, maxBytes);
|
|
4515
|
+
}
|
|
4208
4516
|
readRepoFile(relPath) {
|
|
4209
4517
|
try {
|
|
4210
4518
|
return readFileSync2(posix3.join(this.repoRoot, relPath), "utf8");
|
|
@@ -4235,6 +4543,36 @@ function clampLimit(v, dflt, max) {
|
|
|
4235
4543
|
return dflt;
|
|
4236
4544
|
return Math.max(1, Math.min(max, Math.floor(v)));
|
|
4237
4545
|
}
|
|
4546
|
+
function changeRank(c) {
|
|
4547
|
+
return c === "added" ? 0 : c === "modified" ? 1 : 2;
|
|
4548
|
+
}
|
|
4549
|
+
function classifyReviewSymbol(row, fileStatus, fh, stale) {
|
|
4550
|
+
if (stale)
|
|
4551
|
+
return { ...row, change: "co_located", changedLineCount: 0, staleIndex: true };
|
|
4552
|
+
if (fileStatus === "added" || fh?.wholeFile) {
|
|
4553
|
+
return {
|
|
4554
|
+
...row,
|
|
4555
|
+
change: "added",
|
|
4556
|
+
changedLineCount: row.endLine - row.startLine + 1,
|
|
4557
|
+
staleIndex: false
|
|
4558
|
+
};
|
|
4559
|
+
}
|
|
4560
|
+
if (!fh || fh.degraded || fh.binary) {
|
|
4561
|
+
return { ...row, change: "co_located", changedLineCount: 0, staleIndex: false };
|
|
4562
|
+
}
|
|
4563
|
+
let overlap = 0;
|
|
4564
|
+
for (const r of fh.addedRanges) {
|
|
4565
|
+
const lo = Math.max(r.start, row.startLine);
|
|
4566
|
+
const hi = Math.min(r.end, row.endLine);
|
|
4567
|
+
if (hi >= lo)
|
|
4568
|
+
overlap += hi - lo + 1;
|
|
4569
|
+
}
|
|
4570
|
+
const deletionTouch = fh.deletionPoints.some((c) => c >= row.startLine - 1 && c <= row.endLine);
|
|
4571
|
+
if (overlap > 0 || deletionTouch) {
|
|
4572
|
+
return { ...row, change: "modified", changedLineCount: overlap, staleIndex: false };
|
|
4573
|
+
}
|
|
4574
|
+
return { ...row, change: "co_located", changedLineCount: 0, staleIndex: false };
|
|
4575
|
+
}
|
|
4238
4576
|
|
|
4239
4577
|
// ../../packages/code-index/build/store/node-sqlite.js
|
|
4240
4578
|
import Database from "better-sqlite3";
|
|
@@ -4616,6 +4954,11 @@ function measureLocalToolSaved(name, result, serialized, repoRoot) {
|
|
|
4616
4954
|
|
|
4617
4955
|
// src/local-tools/tools.ts
|
|
4618
4956
|
import { createHash as createHash3 } from "node:crypto";
|
|
4957
|
+
|
|
4958
|
+
// ../../packages/code-index/build/index.js
|
|
4959
|
+
var CODE_INDEX_VERSION = "0.1.0";
|
|
4960
|
+
|
|
4961
|
+
// src/local-tools/tools.ts
|
|
4619
4962
|
function nodeKeyHash(nodeKey) {
|
|
4620
4963
|
return createHash3("sha256").update(nodeKey, "utf8").digest("hex");
|
|
4621
4964
|
}
|
|
@@ -4710,6 +5053,24 @@ var LOCAL_TOOLS = [
|
|
|
4710
5053
|
limit: { type: "number", description: "Max symbols (default 64, cap 200)." }
|
|
4711
5054
|
}
|
|
4712
5055
|
}
|
|
5056
|
+
},
|
|
5057
|
+
{
|
|
5058
|
+
name: "codebase_review_changes",
|
|
5059
|
+
description: "Review-grade change enumeration (ADR-228): like codebase_changes, but hunk-aware \u2014 each symbol is graded added|modified|co_located by intersecting git diff hunks with symbol spans (runs on this machine, nothing is uploaded), plus closed-enum risk_flags from the raw path list (SQL migrations, RLS/SECURITY DEFINER, CI workflows, env files \u2014 files the index itself cannot see). The output's `review_args` block is path-free by construction \u2014 feed it to the cloud tool review_changes for provenance-backed convention findings. diff_stats carries the attest anchors (head_sha, dirty, resolved base_sha \u2014 commit object hashes, no source): pass them through to review_verdict to persist a replayable review_runs record (ADR-230). Requires a FRESH index (codebase_index) \u2014 stale files degrade honestly to co_located.",
|
|
5060
|
+
inputSchema: {
|
|
5061
|
+
type: "object",
|
|
5062
|
+
properties: {
|
|
5063
|
+
since: {
|
|
5064
|
+
type: "string",
|
|
5065
|
+
description: "Git ref to diff against (e.g. 'main', a SHA). Default: HEAD (= your uncommitted work)."
|
|
5066
|
+
},
|
|
5067
|
+
include_uncommitted: {
|
|
5068
|
+
type: "boolean",
|
|
5069
|
+
description: "Include uncommitted/untracked changes (default true). false requires `since`."
|
|
5070
|
+
},
|
|
5071
|
+
limit: { type: "number", description: "Max symbols (default 64, cap 200)." }
|
|
5072
|
+
}
|
|
5073
|
+
}
|
|
4713
5074
|
}
|
|
4714
5075
|
];
|
|
4715
5076
|
var LOCAL_TOOL_NAMES = new Set(LOCAL_TOOLS.map((t) => t.name));
|
|
@@ -4784,6 +5145,61 @@ async function dispatchLocalTool(engine, name, args) {
|
|
|
4784
5145
|
hint: res.symbols.length > 0 ? "Next: call codebase_change_briefing with the briefing_args block (symbol names only \u2014 no paths) to get the maind conventions and lessons that apply to these changes." : res.changedFiles > 0 ? "Changed files found but no index rows \u2014 run codebase_index first, then retry." : "No changed files detected."
|
|
4785
5146
|
};
|
|
4786
5147
|
}
|
|
5148
|
+
case "codebase_review_changes": {
|
|
5149
|
+
const res = await engine.reviewChanges({
|
|
5150
|
+
since: str(args.since),
|
|
5151
|
+
includeUncommitted: args.include_uncommitted !== false,
|
|
5152
|
+
limit: num(args.limit)
|
|
5153
|
+
});
|
|
5154
|
+
return {
|
|
5155
|
+
changed_files: res.changedFiles,
|
|
5156
|
+
indexed_files: res.indexedFiles,
|
|
5157
|
+
stale_files: res.staleFiles,
|
|
5158
|
+
truncated: res.truncated,
|
|
5159
|
+
hunk_coverage: res.hunkCoverage,
|
|
5160
|
+
risk_flags: res.riskFlags,
|
|
5161
|
+
symbols: res.symbols.map((s) => ({
|
|
5162
|
+
name: s.name,
|
|
5163
|
+
qualified_name: s.qualifiedName,
|
|
5164
|
+
kind: s.kind,
|
|
5165
|
+
language: s.language,
|
|
5166
|
+
change: s.change,
|
|
5167
|
+
changed_line_count: s.changedLineCount,
|
|
5168
|
+
stale_index: s.staleIndex,
|
|
5169
|
+
file: s.filePath,
|
|
5170
|
+
start_line: s.startLine,
|
|
5171
|
+
node_key: s.nodeKey,
|
|
5172
|
+
node_key_hash: nodeKeyHash(s.nodeKey)
|
|
5173
|
+
})),
|
|
5174
|
+
review_args: {
|
|
5175
|
+
changed_symbols: res.symbols.map((s) => ({
|
|
5176
|
+
name: s.name,
|
|
5177
|
+
qualified_name: s.qualifiedName,
|
|
5178
|
+
kind: s.kind,
|
|
5179
|
+
language: s.language,
|
|
5180
|
+
change: s.change,
|
|
5181
|
+
changed_line_count: s.changedLineCount
|
|
5182
|
+
})),
|
|
5183
|
+
risk_flags: res.riskFlags,
|
|
5184
|
+
diff_stats: {
|
|
5185
|
+
changed_file_count: res.changedFiles,
|
|
5186
|
+
unindexed_file_count: res.changedFiles - res.indexedFiles,
|
|
5187
|
+
stale_file_count: res.staleFiles,
|
|
5188
|
+
truncated: res.truncated,
|
|
5189
|
+
hunk_coverage: res.hunkCoverage,
|
|
5190
|
+
base_kind: res.baseKind,
|
|
5191
|
+
// Attest-Anker (ADR-230 §3): Commit-Objekt-Hashes + dirty-Flag —
|
|
5192
|
+
// KEIN Source/Pfad-Inhalt. review_verdict liest sie als Fallback,
|
|
5193
|
+
// wenn der Agent das diff_stats-Objekt 1:1 weiterreicht.
|
|
5194
|
+
head_sha: res.headSha,
|
|
5195
|
+
dirty: res.dirty,
|
|
5196
|
+
base_sha: res.baseSha,
|
|
5197
|
+
code_index_version: CODE_INDEX_VERSION
|
|
5198
|
+
}
|
|
5199
|
+
},
|
|
5200
|
+
hint: res.symbols.length > 0 ? "Next: call the cloud tool review_changes with the review_args block (symbol names + closed-enum flags only \u2014 no paths) for provenance-backed convention findings." : res.changedFiles > 0 ? "Changed files found but no index rows \u2014 run codebase_index first, then retry." : "No changed files detected."
|
|
5201
|
+
};
|
|
5202
|
+
}
|
|
4787
5203
|
default:
|
|
4788
5204
|
throw new Error(`unknown local tool: ${name}`);
|
|
4789
5205
|
}
|
package/build/meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/client-detect.ts":{"bytes":3979,"imports":[],"format":"esm"},"src/forward.ts":{"bytes":20978,"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"}],"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":305,"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":5802,"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/client-targets.ts":{"bytes":5727,"imports":[{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/install/atomic-write.ts":{"bytes":4154,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/install/json-merge.ts":{"bytes":5180,"imports":[{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"./atomic-write.js"}],"format":"esm"},"src/install/toml-merge.ts":{"bytes":4819,"imports":[{"path":"smol-toml","kind":"import-statement","external":true},{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"./atomic-write.js"}],"format":"esm"},"../../packages/integration-snippets/build/index.js":{"bytes":35437,"imports":[],"format":"esm"},"src/install/preamble.ts":{"bytes":4556,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/integration-snippets/build/index.js","kind":"import-statement","original":"@maind-dev/integration-snippets"},{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"./atomic-write.js"}],"format":"esm"},"src/install/hook-merge.ts":{"bytes":8176,"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"}],"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":7285,"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":5200,"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/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":14302,"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/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"},"src/local-tools/tools.ts":{"bytes":9138,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"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"},"../../packages/claude-code-telemetry/dist/types.js":{"bytes":338,"imports":[],"format":"esm"},"../../packages/claude-code-telemetry/dist/transcript.js":{"bytes":2017,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/decisions.js":{"bytes":6845,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/effort.js":{"bytes":1858,"imports":[],"format":"esm"},"../../packages/claude-code-telemetry/dist/session-analysis.js":{"bytes":12237,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"../../packages/claude-code-telemetry/dist/effort.js","kind":"import-statement","original":"./effort.js"}],"format":"esm"},"../../packages/claude-code-telemetry/dist/parse.js":{"bytes":7254,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"../../packages/claude-code-telemetry/dist/effort.js","kind":"import-statement","original":"./effort.js"},{"path":"../../packages/claude-code-telemetry/dist/types.js","kind":"import-statement","original":"./types.js"}],"format":"esm"},"../../packages/claude-code-telemetry/dist/windows.js":{"bytes":3963,"imports":[],"format":"esm"},"../../packages/claude-code-telemetry/dist/projects.js":{"bytes":3166,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/index.js":{"bytes":685,"imports":[{"path":"../../packages/claude-code-telemetry/dist/types.js","kind":"import-statement","original":"./types.js"},{"path":"../../packages/claude-code-telemetry/dist/transcript.js","kind":"import-statement","original":"./transcript.js"},{"path":"../../packages/claude-code-telemetry/dist/decisions.js","kind":"import-statement","original":"./decisions.js"},{"path":"../../packages/claude-code-telemetry/dist/session-analysis.js","kind":"import-statement","original":"./session-analysis.js"},{"path":"../../packages/claude-code-telemetry/dist/parse.js","kind":"import-statement","original":"./parse.js"},{"path":"../../packages/claude-code-telemetry/dist/effort.js","kind":"import-statement","original":"./effort.js"},{"path":"../../packages/claude-code-telemetry/dist/windows.js","kind":"import-statement","original":"./windows.js"},{"path":"../../packages/claude-code-telemetry/dist/projects.js","kind":"import-statement","original":"./projects.js"}],"format":"esm"},"src/session-end/index.ts":{"bytes":3483,"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/version.ts","kind":"import-statement","original":"../version.js"}],"format":"esm"},"src/index.ts":{"bytes":9764,"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/session-end/index.ts","kind":"dynamic-import","original":"./session-end/index.js"}],"format":"esm"}},"outputs":{"build/index.js":{"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:readline","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":"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":"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}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/device-id.ts":{"bytesInOutput":2356},"src/version.ts":{"bytesInOutput":126},"../../packages/claude-code-telemetry/dist/types.js":{"bytesInOutput":110},"../../packages/claude-code-telemetry/dist/transcript.js":{"bytesInOutput":120},"../../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":7774},"../../packages/claude-code-telemetry/dist/parse.js":{"bytesInOutput":147},"../../packages/claude-code-telemetry/dist/windows.js":{"bytesInOutput":219},"../../packages/claude-code-telemetry/dist/projects.js":{"bytesInOutput":326},"../../packages/claude-code-telemetry/dist/index.js":{"bytesInOutput":279},"src/session-end/index.ts":{"bytesInOutput":2476},"src/index.ts":{"bytesInOutput":5306},"src/forward.ts":{"bytesInOutput":13217},"src/client-detect.ts":{"bytesInOutput":2068},"src/auth.ts":{"bytesInOutput":5107},"src/project-key.ts":{"bytesInOutput":1318},"src/install/index.ts":{"bytesInOutput":5049},"src/install/flags.ts":{"bytesInOutput":4255},"src/install/report.ts":{"bytesInOutput":3091},"src/install/project-root.ts":{"bytesInOutput":2188},"src/install/client-targets.ts":{"bytesInOutput":2805},"src/install/atomic-write.ts":{"bytesInOutput":1758},"src/install/json-merge.ts":{"bytesInOutput":3341},"src/install/toml-merge.ts":{"bytesInOutput":3262},"src/install/preamble.ts":{"bytesInOutput":2812},"../../packages/integration-snippets/build/index.js":{"bytesInOutput":27539},"src/install/hook-merge.ts":{"bytesInOutput":5372},"src/install/browser-pair.ts":{"bytesInOutput":2701},"src/install/telemetry.ts":{"bytesInOutput":1798},"src/local-tools/engine.ts":{"bytesInOutput":481},"../../packages/code-index/build/node.js":{"bytesInOutput":530},"../../packages/code-index/build/parse/tree-sitter/parser.js":{"bytesInOutput":2043},"../../packages/code-index/build/parse/keys.js":{"bytesInOutput":169},"../../packages/code-index/build/parse/types.js":{"bytesInOutput":546},"../../packages/code-index/build/parse/lang/shared.js":{"bytesInOutput":1131},"../../packages/code-index/build/parse/lang/python.js":{"bytesInOutput":3747},"../../packages/code-index/build/parse/lang/typescript.js":{"bytesInOutput":4716},"../../packages/code-index/build/parse/tree-sitter/grammars.js":{"bytesInOutput":523},"../../packages/code-index/build/query/engine.js":{"bytesInOutput":10593},"../../packages/code-index/build/embed/recipe.js":{"bytesInOutput":197},"../../packages/code-index/build/embed/types.js":{"bytesInOutput":105},"../../packages/code-index/build/util/vector.js":{"bytesInOutput":339},"../../packages/code-index/build/graph/resolve.js":{"bytesInOutput":2482},"../../packages/code-index/build/incremental/discover.js":{"bytesInOutput":3513},"../../packages/code-index/build/store/schema.js":{"bytesInOutput":2170},"../../packages/code-index/build/util/identifiers.js":{"bytesInOutput":1094},"../../packages/code-index/build/store/node-sqlite.js":{"bytesInOutput":9759},"src/local-tools/savings.ts":{"bytesInOutput":1923},"src/local-tools/token-estimate.ts":{"bytesInOutput":133},"src/local-tools/tools.ts":{"bytesInOutput":7492},"src/local-tools/router.ts":{"bytesInOutput":3827},"src/functions-origin.ts":{"bytesInOutput":259},"src/metrics-post.ts":{"bytesInOutput":1285}},"bytes":169635}}}
|
|
1
|
+
{"inputs":{"src/client-detect.ts":{"bytes":3979,"imports":[],"format":"esm"},"src/forward.ts":{"bytes":20978,"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"}],"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":5802,"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/client-targets.ts":{"bytes":5727,"imports":[{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/install/atomic-write.ts":{"bytes":4154,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/install/json-merge.ts":{"bytes":5180,"imports":[{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"./atomic-write.js"}],"format":"esm"},"src/install/toml-merge.ts":{"bytes":4819,"imports":[{"path":"smol-toml","kind":"import-statement","external":true},{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"./atomic-write.js"}],"format":"esm"},"../../packages/integration-snippets/build/index.js":{"bytes":35437,"imports":[],"format":"esm"},"src/install/preamble.ts":{"bytes":4556,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/integration-snippets/build/index.js","kind":"import-statement","original":"@maind-dev/integration-snippets"},{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"./atomic-write.js"}],"format":"esm"},"src/install/hook-merge.ts":{"bytes":8176,"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"}],"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":7285,"imports":[{"path":"node:os","kind":"import-statement","external":true},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/install/flags.ts","kind":"import-statement","original":"./flags.js"},{"path":"src/install/report.ts","kind":"import-statement","original":"./report.js"},{"path":"src/install/project-root.ts","kind":"import-statement","original":"./project-root.js"},{"path":"src/install/client-targets.ts","kind":"import-statement","original":"./client-targets.js"},{"path":"src/install/json-merge.ts","kind":"import-statement","original":"./json-merge.js"},{"path":"src/install/toml-merge.ts","kind":"import-statement","original":"./toml-merge.js"},{"path":"src/install/preamble.ts","kind":"import-statement","original":"./preamble.js"},{"path":"src/install/hook-merge.ts","kind":"import-statement","original":"./hook-merge.js"},{"path":"src/install/browser-pair.ts","kind":"import-statement","original":"./browser-pair.js"},{"path":"src/install/telemetry.ts","kind":"import-statement","original":"./telemetry.js"}],"format":"esm"},"../../packages/project-key/build/index.js":{"bytes":3446,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/parse/keys.js":{"bytes":448,"imports":[],"format":"esm"},"../../packages/code-index/build/parse/types.js":{"bytes":768,"imports":[],"format":"esm"},"../../packages/code-index/build/parse/lang/shared.js":{"bytes":2278,"imports":[],"format":"esm"},"../../packages/code-index/build/parse/lang/python.js":{"bytes":4535,"imports":[{"path":"../../packages/code-index/build/parse/keys.js","kind":"import-statement","original":"../keys.js"},{"path":"../../packages/code-index/build/parse/lang/shared.js","kind":"import-statement","original":"./shared.js"}],"format":"esm"},"../../packages/code-index/build/parse/lang/typescript.js":{"bytes":5949,"imports":[{"path":"../../packages/code-index/build/parse/keys.js","kind":"import-statement","original":"../keys.js"},{"path":"../../packages/code-index/build/parse/lang/shared.js","kind":"import-statement","original":"./shared.js"}],"format":"esm"},"../../packages/code-index/build/parse/tree-sitter/grammars.js":{"bytes":1941,"imports":[{"path":"node:module","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/parse/tree-sitter/parser.js":{"bytes":3231,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"web-tree-sitter","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/parse/keys.js","kind":"import-statement","original":"../keys.js"},{"path":"../../packages/code-index/build/parse/types.js","kind":"import-statement","original":"../types.js"},{"path":"../../packages/code-index/build/parse/lang/python.js","kind":"import-statement","original":"../lang/python.js"},{"path":"../../packages/code-index/build/parse/lang/typescript.js","kind":"import-statement","original":"../lang/typescript.js"},{"path":"../../packages/code-index/build/parse/lang/shared.js","kind":"import-statement","original":"../lang/shared.js"},{"path":"../../packages/code-index/build/parse/tree-sitter/grammars.js","kind":"import-statement","original":"./grammars.js"}],"format":"esm"},"../../packages/code-index/build/embed/recipe.js":{"bytes":594,"imports":[],"format":"esm"},"../../packages/code-index/build/embed/types.js":{"bytes":505,"imports":[],"format":"esm"},"../../packages/code-index/build/util/vector.js":{"bytes":707,"imports":[],"format":"esm"},"../../packages/code-index/build/graph/resolve.js":{"bytes":3928,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/parse/keys.js","kind":"import-statement","original":"../parse/keys.js"}],"format":"esm"},"../../packages/code-index/build/incremental/discover.js":{"bytes":8578,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/parse/types.js","kind":"import-statement","original":"../parse/types.js"}],"format":"esm"},"../../packages/code-index/build/incremental/hunks.js":{"bytes":6171,"imports":[{"path":"../../packages/code-index/build/incremental/discover.js","kind":"import-statement","original":"./discover.js"}],"format":"esm"},"../../packages/code-index/build/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":18965,"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/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":1204,"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/review/risk-rules.js","kind":"import-statement","original":"./review/risk-rules.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":13196,"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"},"../../packages/claude-code-telemetry/dist/types.js":{"bytes":338,"imports":[],"format":"esm"},"../../packages/claude-code-telemetry/dist/transcript.js":{"bytes":2017,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/decisions.js":{"bytes":6845,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/effort.js":{"bytes":1858,"imports":[],"format":"esm"},"../../packages/claude-code-telemetry/dist/session-analysis.js":{"bytes":12237,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"../../packages/claude-code-telemetry/dist/effort.js","kind":"import-statement","original":"./effort.js"}],"format":"esm"},"../../packages/claude-code-telemetry/dist/parse.js":{"bytes":7254,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:readline","kind":"import-statement","external":true},{"path":"../../packages/claude-code-telemetry/dist/effort.js","kind":"import-statement","original":"./effort.js"},{"path":"../../packages/claude-code-telemetry/dist/types.js","kind":"import-statement","original":"./types.js"}],"format":"esm"},"../../packages/claude-code-telemetry/dist/windows.js":{"bytes":3963,"imports":[],"format":"esm"},"../../packages/claude-code-telemetry/dist/projects.js":{"bytes":3166,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/index.js":{"bytes":685,"imports":[{"path":"../../packages/claude-code-telemetry/dist/types.js","kind":"import-statement","original":"./types.js"},{"path":"../../packages/claude-code-telemetry/dist/transcript.js","kind":"import-statement","original":"./transcript.js"},{"path":"../../packages/claude-code-telemetry/dist/decisions.js","kind":"import-statement","original":"./decisions.js"},{"path":"../../packages/claude-code-telemetry/dist/session-analysis.js","kind":"import-statement","original":"./session-analysis.js"},{"path":"../../packages/claude-code-telemetry/dist/parse.js","kind":"import-statement","original":"./parse.js"},{"path":"../../packages/claude-code-telemetry/dist/effort.js","kind":"import-statement","original":"./effort.js"},{"path":"../../packages/claude-code-telemetry/dist/windows.js","kind":"import-statement","original":"./windows.js"},{"path":"../../packages/claude-code-telemetry/dist/projects.js","kind":"import-statement","original":"./projects.js"}],"format":"esm"},"src/session-end/index.ts":{"bytes":3483,"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/version.ts","kind":"import-statement","original":"../version.js"}],"format":"esm"},"src/index.ts":{"bytes":9764,"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/session-end/index.ts","kind":"dynamic-import","original":"./session-end/index.js"}],"format":"esm"}},"outputs":{"build/index.js":{"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:readline","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":"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":"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}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/device-id.ts":{"bytesInOutput":2356},"src/version.ts":{"bytesInOutput":127},"../../packages/claude-code-telemetry/dist/types.js":{"bytesInOutput":110},"../../packages/claude-code-telemetry/dist/transcript.js":{"bytesInOutput":120},"../../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":7774},"../../packages/claude-code-telemetry/dist/parse.js":{"bytesInOutput":147},"../../packages/claude-code-telemetry/dist/windows.js":{"bytesInOutput":219},"../../packages/claude-code-telemetry/dist/projects.js":{"bytesInOutput":326},"../../packages/claude-code-telemetry/dist/index.js":{"bytesInOutput":279},"src/session-end/index.ts":{"bytesInOutput":2476},"src/index.ts":{"bytesInOutput":5306},"src/forward.ts":{"bytesInOutput":13217},"src/client-detect.ts":{"bytesInOutput":2068},"src/auth.ts":{"bytesInOutput":5107},"src/project-key.ts":{"bytesInOutput":1318},"src/install/index.ts":{"bytesInOutput":5049},"src/install/flags.ts":{"bytesInOutput":4255},"src/install/report.ts":{"bytesInOutput":3091},"src/install/project-root.ts":{"bytesInOutput":2188},"src/install/client-targets.ts":{"bytesInOutput":2805},"src/install/atomic-write.ts":{"bytesInOutput":1758},"src/install/json-merge.ts":{"bytesInOutput":3341},"src/install/toml-merge.ts":{"bytesInOutput":3262},"src/install/preamble.ts":{"bytesInOutput":2812},"../../packages/integration-snippets/build/index.js":{"bytesInOutput":27539},"src/install/hook-merge.ts":{"bytesInOutput":5372},"src/install/browser-pair.ts":{"bytesInOutput":2701},"src/install/telemetry.ts":{"bytesInOutput":1798},"src/local-tools/engine.ts":{"bytesInOutput":481},"../../packages/code-index/build/node.js":{"bytesInOutput":530},"../../packages/code-index/build/parse/tree-sitter/parser.js":{"bytesInOutput":2043},"../../packages/code-index/build/parse/keys.js":{"bytesInOutput":169},"../../packages/code-index/build/parse/types.js":{"bytesInOutput":546},"../../packages/code-index/build/parse/lang/shared.js":{"bytesInOutput":1131},"../../packages/code-index/build/parse/lang/python.js":{"bytesInOutput":3747},"../../packages/code-index/build/parse/lang/typescript.js":{"bytesInOutput":4716},"../../packages/code-index/build/parse/tree-sitter/grammars.js":{"bytesInOutput":523},"../../packages/code-index/build/query/engine.js":{"bytesInOutput":13877},"../../packages/code-index/build/embed/recipe.js":{"bytesInOutput":197},"../../packages/code-index/build/embed/types.js":{"bytesInOutput":105},"../../packages/code-index/build/util/vector.js":{"bytesInOutput":339},"../../packages/code-index/build/graph/resolve.js":{"bytesInOutput":2482},"../../packages/code-index/build/incremental/discover.js":{"bytesInOutput":4835},"../../packages/code-index/build/incremental/hunks.js":{"bytesInOutput":3945},"../../packages/code-index/build/review/risk-rules.js":{"bytesInOutput":876},"../../packages/code-index/build/review/risk-scan.js":{"bytesInOutput":802},"../../packages/code-index/build/store/schema.js":{"bytesInOutput":2170},"../../packages/code-index/build/util/identifiers.js":{"bytesInOutput":1094},"../../packages/code-index/build/store/node-sqlite.js":{"bytesInOutput":9759},"src/local-tools/savings.ts":{"bytesInOutput":1923},"src/local-tools/token-estimate.ts":{"bytesInOutput":133},"src/local-tools/tools.ts":{"bytesInOutput":11213},"../../packages/code-index/build/index.js":{"bytesInOutput":34},"src/local-tools/router.ts":{"bytesInOutput":3827},"src/functions-origin.ts":{"bytesInOutput":259},"src/metrics-post.ts":{"bytesInOutput":1285}},"bytes":183864}}}
|
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.10.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": "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/claude-code-telemetry": "0.0.0",
|
|
28
|
+
"@maind/code-index": "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": "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
|
+
}
|