@maind-dev/mcp-bridge 0.31.0 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -202,7 +202,7 @@ var BRIDGE_VERSION;
202
202
  var init_version = __esm({
203
203
  "src/version.ts"() {
204
204
  "use strict";
205
- BRIDGE_VERSION = "0.31.0";
205
+ BRIDGE_VERSION = "0.34.0";
206
206
  }
207
207
  });
208
208
 
@@ -841,6 +841,12 @@ function readBridgeConfig() {
841
841
  if (typeof o.guard_stop_gate === "boolean") {
842
842
  config.guard_stop_gate = o.guard_stop_gate;
843
843
  }
844
+ if (o.gateway_mode === "off" || o.gateway_mode === "warn" || o.gateway_mode === "enforce") {
845
+ config.gateway_mode = o.gateway_mode;
846
+ }
847
+ if (typeof o.gateway_attest === "boolean") {
848
+ config.gateway_attest = o.gateway_attest;
849
+ }
844
850
  return config;
845
851
  } catch {
846
852
  return null;
@@ -3638,8 +3644,10 @@ var init_session_analysis = __esm({
3638
3644
  });
3639
3645
 
3640
3646
  // ../../packages/claude-code-telemetry/dist/ingest.js
3641
- function ingestBody(analytics, span, ctx) {
3642
- const body = { session_analytics: analytics };
3647
+ function ingestBody(analytics, span, ctx, source = "unknown") {
3648
+ const body = {
3649
+ session_analytics: { ...analytics, ingest_source: source }
3650
+ };
3643
3651
  if (span && span.started_at) {
3644
3652
  body.session_span = ctx ? { ...span, ...ctx } : span;
3645
3653
  }
@@ -4721,10 +4729,15 @@ async function runOnSessionEnd() {
4721
4729
  Date.now()
4722
4730
  );
4723
4731
  if (analytics.session_id) {
4724
- const body = ingestBody(analytics, span, {
4725
- client_session_id: presenceSessionId(),
4726
- client: "claude-code"
4727
- });
4732
+ const body = ingestBody(
4733
+ analytics,
4734
+ span,
4735
+ {
4736
+ client_session_id: presenceSessionId(),
4737
+ client: "claude-code"
4738
+ },
4739
+ "live_bridge"
4740
+ );
4728
4741
  await postWithTimeout(apiKey, ensureDeviceId(), body, 1500);
4729
4742
  }
4730
4743
  } catch (err) {
@@ -5147,6 +5160,9 @@ var init_cli = __esm({
5147
5160
 
5148
5161
  // src/guard/mcp-client.ts
5149
5162
  async function fetchSessionBriefing(opts) {
5163
+ return fetchToolText("get_session_briefing", { tools: ["claude-code"] }, opts);
5164
+ }
5165
+ async function fetchToolText(toolName, toolArgs, opts) {
5150
5166
  const mcpUrl = opts.mcpUrl ?? process.env.MAIND_MCP_URL ?? DEFAULT_MCP_URL3;
5151
5167
  const controller = new AbortController();
5152
5168
  const timer = setTimeout(() => controller.abort(), opts.timeoutMs ?? 3e3);
@@ -5155,8 +5171,8 @@ async function fetchSessionBriefing(opts) {
5155
5171
  "content-type": "application/json",
5156
5172
  accept: "application/json, text/event-stream",
5157
5173
  authorization: `Bearer ${opts.apiKey}`,
5158
- // The guard acts on behalf of a Claude Code session — attribute it so.
5159
- "x-maind-client-family": "claude-code",
5174
+ // Attribution: default claude-code (guard), überschreibbar (gateway).
5175
+ "x-maind-client-family": opts.clientFamily ?? "claude-code",
5160
5176
  "x-maind-client-version": opts.bridgeVersion,
5161
5177
  "x-maind-bridge-version": opts.bridgeVersion
5162
5178
  };
@@ -5196,8 +5212,8 @@ async function fetchSessionBriefing(opts) {
5196
5212
  id: "guard-briefing",
5197
5213
  method: "tools/call",
5198
5214
  params: {
5199
- name: "get_session_briefing",
5200
- arguments: { tools: ["claude-code"] }
5215
+ name: toolName,
5216
+ arguments: toolArgs
5201
5217
  }
5202
5218
  })
5203
5219
  });
@@ -5588,7 +5604,7 @@ function parseFrame(line) {
5588
5604
  }
5589
5605
  return { kind: "opaque" };
5590
5606
  }
5591
- function denyResult(id, toolName) {
5607
+ function denyResult(id, toolName, reason) {
5592
5608
  return JSON.stringify({
5593
5609
  jsonrpc: "2.0",
5594
5610
  id,
@@ -5596,7 +5612,7 @@ function denyResult(id, toolName) {
5596
5612
  content: [
5597
5613
  {
5598
5614
  type: "text",
5599
- text: `maind gateway: tool '${toolName}' is denied by local gateway policy. The call was not forwarded to the server. Remove the --deny-tool flag (or adjust the gateway policy) to allow it.`
5615
+ text: reason ?? `maind gateway: tool '${toolName}' is denied by local gateway policy. The call was not forwarded to the server. Remove the --deny-tool flag (or adjust the gateway policy) to allow it.`
5600
5616
  }
5601
5617
  ],
5602
5618
  isError: true
@@ -5606,12 +5622,344 @@ function denyResult(id, toolName) {
5606
5622
  function toolEvent(event, server, tool, at) {
5607
5623
  return { at, event, server, tool };
5608
5624
  }
5625
+ function policyEvent(event, server, tool, at, conventionId, conventionVersion) {
5626
+ return {
5627
+ at,
5628
+ event,
5629
+ server,
5630
+ tool,
5631
+ convention_id: conventionId,
5632
+ convention_version: conventionVersion
5633
+ };
5634
+ }
5609
5635
  var init_frames = __esm({
5610
5636
  "src/gateway/frames.ts"() {
5611
5637
  "use strict";
5612
5638
  }
5613
5639
  });
5614
5640
 
5641
+ // src/gateway/attest.ts
5642
+ import { appendFile as appendFile2, mkdir as mkdir6, readFile as readFile5, rename as rename5, writeFile as writeFile6 } from "node:fs/promises";
5643
+ import { homedir as homedir8 } from "node:os";
5644
+ import { join as join21 } from "node:path";
5645
+ function aggregateWindow(events, mode, serverLabel, projectKey) {
5646
+ if (mode === "off" || events.length === 0) return null;
5647
+ const counts = {};
5648
+ const citations = /* @__PURE__ */ new Map();
5649
+ let min = Infinity;
5650
+ let max = -Infinity;
5651
+ for (const e of events) {
5652
+ if (e.at < min) min = e.at;
5653
+ if (e.at > max) max = e.at;
5654
+ const c = counts[e.tool] ??= { calls: 0, warns: 0, denies: 0 };
5655
+ if (e.event === "tool_call") c.calls += 1;
5656
+ else if (e.event === "policy_warn") c.warns += 1;
5657
+ else c.denies += 1;
5658
+ if ((e.event === "policy_warn" || e.event === "policy_deny") && e.convention_id !== void 0 && e.convention_version !== void 0) {
5659
+ const prev = citations.get(e.convention_id);
5660
+ if (prev === void 0 || e.convention_version > prev) {
5661
+ citations.set(e.convention_id, e.convention_version);
5662
+ }
5663
+ }
5664
+ }
5665
+ const toolEntries = Object.entries(counts).sort((a, b) => b[1].calls + b[1].warns + b[1].denies - (a[1].calls + a[1].warns + a[1].denies)).slice(0, 64);
5666
+ return {
5667
+ window_start: new Date(min).toISOString(),
5668
+ window_end: new Date(max).toISOString(),
5669
+ server_label: serverLabel,
5670
+ gateway_mode: mode,
5671
+ counts: Object.fromEntries(toolEntries),
5672
+ event_count: Math.min(events.length, 1e5),
5673
+ citations: [...citations.entries()].slice(0, 32).map(([convention_id, convention_version]) => ({ convention_id, convention_version })),
5674
+ ...projectKey ? { project_key: projectKey } : {}
5675
+ };
5676
+ }
5677
+ function attestSpoolPath() {
5678
+ return join21(homedir8(), ".maind", "gateway", "attest-spool.jsonl");
5679
+ }
5680
+ async function postAttestation(payload) {
5681
+ const apiKey = readApiKey();
5682
+ if (apiKey === null) return false;
5683
+ const text = await fetchToolText("gateway_attest", { ...payload }, {
5684
+ apiKey,
5685
+ deviceId: ensureDeviceId(),
5686
+ projectKey: payload.project_key ?? null,
5687
+ bridgeVersion: BRIDGE_VERSION,
5688
+ clientFamily: "gateway",
5689
+ timeoutMs: 6e3
5690
+ });
5691
+ if (text === null) return false;
5692
+ try {
5693
+ const parsed = JSON.parse(text);
5694
+ return parsed.ok === true;
5695
+ } catch {
5696
+ return false;
5697
+ }
5698
+ }
5699
+ async function spoolAttestation(payload) {
5700
+ try {
5701
+ await mkdir6(join21(homedir8(), ".maind", "gateway"), { recursive: true });
5702
+ await appendFile2(attestSpoolPath(), JSON.stringify(payload) + "\n", { mode: 384 });
5703
+ await capSpool();
5704
+ } catch {
5705
+ }
5706
+ }
5707
+ async function capSpool() {
5708
+ try {
5709
+ const raw = await readFile5(attestSpoolPath(), "utf8");
5710
+ const lines2 = raw.split("\n").filter((l) => l.trim());
5711
+ if (lines2.length <= SPOOL_CAP) return;
5712
+ const tmp = `${attestSpoolPath()}.${process.pid}.tmp`;
5713
+ await writeFile6(tmp, lines2.slice(-SPOOL_CAP).join("\n") + "\n", { mode: 384 });
5714
+ await rename5(tmp, attestSpoolPath());
5715
+ } catch {
5716
+ }
5717
+ }
5718
+ async function flushAttestSpool() {
5719
+ let lines2;
5720
+ try {
5721
+ lines2 = (await readFile5(attestSpoolPath(), "utf8")).split("\n").filter((l) => l.trim());
5722
+ } catch {
5723
+ return;
5724
+ }
5725
+ if (lines2.length === 0) return;
5726
+ const remaining = [];
5727
+ let failed3 = false;
5728
+ for (const line of lines2) {
5729
+ if (failed3) {
5730
+ remaining.push(line);
5731
+ continue;
5732
+ }
5733
+ let payload = null;
5734
+ try {
5735
+ payload = JSON.parse(line);
5736
+ } catch {
5737
+ continue;
5738
+ }
5739
+ if (await postAttestation(payload)) continue;
5740
+ failed3 = true;
5741
+ remaining.push(line);
5742
+ }
5743
+ try {
5744
+ const tmp = `${attestSpoolPath()}.${process.pid}.tmp`;
5745
+ await writeFile6(tmp, remaining.length > 0 ? remaining.join("\n") + "\n" : "", { mode: 384 });
5746
+ await rename5(tmp, attestSpoolPath());
5747
+ } catch {
5748
+ }
5749
+ }
5750
+ var SPOOL_CAP;
5751
+ var init_attest = __esm({
5752
+ "src/gateway/attest.ts"() {
5753
+ "use strict";
5754
+ init_device_id();
5755
+ init_mcp_client();
5756
+ init_version();
5757
+ SPOOL_CAP = 256;
5758
+ }
5759
+ });
5760
+
5761
+ // src/gateway/config.ts
5762
+ function resolveGatewayMode(env = process.env, cfg = readBridgeConfig()) {
5763
+ const fromEnv = env.MAIND_GATEWAY;
5764
+ if (fromEnv === "off" || fromEnv === "warn" || fromEnv === "enforce") return fromEnv;
5765
+ return cfg?.gateway_mode ?? "warn";
5766
+ }
5767
+ function resolveGatewayAttest(env = process.env, cfg = readBridgeConfig()) {
5768
+ const fromEnv = env.MAIND_GATEWAY_ATTEST;
5769
+ if (fromEnv === "1") return true;
5770
+ if (fromEnv === "0") return false;
5771
+ return cfg?.gateway_attest === true;
5772
+ }
5773
+ async function writeGatewayConfigPatch(patch, configPath = bridgeConfigPath()) {
5774
+ let existing = {};
5775
+ try {
5776
+ const raw = await readFileSafe(configPath);
5777
+ if (raw !== null && raw.trim().length > 0) {
5778
+ const parsed = JSON.parse(raw);
5779
+ if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) {
5780
+ existing = parsed;
5781
+ }
5782
+ }
5783
+ } catch {
5784
+ }
5785
+ const next = { ...existing, ...patch };
5786
+ await atomicWriteFile(configPath, JSON.stringify(next, null, 2) + "\n", 384);
5787
+ }
5788
+ async function writeGatewayMode(mode, configPath = bridgeConfigPath()) {
5789
+ await writeGatewayConfigPatch({ gateway_mode: mode }, configPath);
5790
+ }
5791
+ async function writeGatewayAttest(enabled, configPath = bridgeConfigPath()) {
5792
+ await writeGatewayConfigPatch({ gateway_attest: enabled }, configPath);
5793
+ }
5794
+ var init_config2 = __esm({
5795
+ "src/gateway/config.ts"() {
5796
+ "use strict";
5797
+ init_bridge_config();
5798
+ init_atomic_write();
5799
+ }
5800
+ });
5801
+
5802
+ // src/gateway/policy.ts
5803
+ function extractGatewayRules(payload) {
5804
+ if (typeof payload !== "object" || payload === null) return [];
5805
+ const list = payload.conventions;
5806
+ if (!Array.isArray(list)) return [];
5807
+ const rules = [];
5808
+ for (const row of list) {
5809
+ if (typeof row !== "object" || row === null) continue;
5810
+ const c = row;
5811
+ const gate = c.gateway_gate;
5812
+ if (typeof gate !== "object" || gate === null) continue;
5813
+ const g = gate;
5814
+ if (g.enabled !== true) continue;
5815
+ const id = typeof c.id === "string" && c.id.length > 0 && c.id.length <= 64 ? c.id : null;
5816
+ const version = typeof c.version === "number" && Number.isInteger(c.version) && c.version >= 1 ? c.version : null;
5817
+ if (id === null || version === null) continue;
5818
+ const severity = typeof c.severity === "string" && SEVERITIES.has(c.severity) ? c.severity : "recommended";
5819
+ const summary = typeof c.summary === "string" ? c.summary : "";
5820
+ const servers = Array.isArray(g.servers) ? g.servers.filter((s) => typeof s === "string" && s.length > 0) : null;
5821
+ if (servers !== null && servers.length === 0) continue;
5822
+ const tools = Array.isArray(g.deny_tools) ? g.deny_tools.filter((t) => typeof t === "string" && t.length > 0) : [];
5823
+ for (const tool of tools) {
5824
+ if (rules.length >= MAX_RULES) return rules;
5825
+ rules.push({ tool, servers, conventionId: id, conventionVersion: version, severity, summary });
5826
+ }
5827
+ }
5828
+ return rules;
5829
+ }
5830
+ function ruleMatches(rule, tool, serverLabel) {
5831
+ if (rule.tool !== tool) return false;
5832
+ if (rule.servers === null) return true;
5833
+ return rule.servers.includes("*") || rule.servers.includes(serverLabel);
5834
+ }
5835
+ function decideToolCall(tool, serverLabel, rules, mode) {
5836
+ if (mode === "off") return { kind: "allow" };
5837
+ let best = null;
5838
+ for (const r of rules) {
5839
+ if (!ruleMatches(r, tool, serverLabel)) continue;
5840
+ if (best === null || SEVERITY_RANK[r.severity] > SEVERITY_RANK[best.severity]) best = r;
5841
+ }
5842
+ if (best === null) return { kind: "allow" };
5843
+ if (best.severity === "required" && mode === "enforce") return { kind: "deny", rule: best };
5844
+ return { kind: "warn", rule: best };
5845
+ }
5846
+ function policyDenyText(tool, rule) {
5847
+ const cite = `${rule.conventionId} v${rule.conventionVersion}`;
5848
+ const summary = rule.summary ? ` ("${rule.summary}")` : "";
5849
+ return `maind gateway: tool '${tool}' is denied by convention ${cite}${summary}. The call was not forwarded to the server. Exits: ask the user to run 'maind-mcp-bridge gateway mode warn' (observe instead of enforce), or to disable the convention for themselves (set_convention_pref) if it is not mandatory.`;
5850
+ }
5851
+ var MAX_RULES, SEVERITIES, SEVERITY_RANK;
5852
+ var init_policy = __esm({
5853
+ "src/gateway/policy.ts"() {
5854
+ "use strict";
5855
+ MAX_RULES = 256;
5856
+ SEVERITIES = /* @__PURE__ */ new Set(["required", "recommended", "info"]);
5857
+ SEVERITY_RANK = {
5858
+ required: 2,
5859
+ recommended: 1,
5860
+ info: 0
5861
+ };
5862
+ }
5863
+ });
5864
+
5865
+ // src/gateway/policy-cache.ts
5866
+ import { mkdirSync as mkdirSync5, readFileSync as readFileSync10, renameSync as renameSync3, writeFileSync as writeFileSync4 } from "node:fs";
5867
+ import { homedir as homedir9 } from "node:os";
5868
+ import { dirname as dirname7, join as join22 } from "node:path";
5869
+ function policyCachePath() {
5870
+ return join22(homedir9(), ".maind", "gateway", "policy-cache.json");
5871
+ }
5872
+ function writePolicyCache(identity, rules, nowIso = (/* @__PURE__ */ new Date()).toISOString()) {
5873
+ try {
5874
+ const payload = {
5875
+ version: CACHE_VERSION2,
5876
+ cached_at: nowIso,
5877
+ mcp_url: identity.mcpUrl,
5878
+ key_fp: identity.keyFp,
5879
+ rules
5880
+ };
5881
+ const target = policyCachePath();
5882
+ mkdirSync5(dirname7(target), { recursive: true });
5883
+ const tmp = `${target}.${process.pid}.tmp`;
5884
+ writeFileSync4(tmp, JSON.stringify(payload, null, 2), { encoding: "utf8", mode: 384 });
5885
+ renameSync3(tmp, target);
5886
+ } catch {
5887
+ }
5888
+ }
5889
+ function readPolicyCache(identity) {
5890
+ try {
5891
+ const raw = readFileSync10(policyCachePath(), "utf8");
5892
+ const parsed = JSON.parse(raw);
5893
+ if (parsed.version !== CACHE_VERSION2 || parsed.mcp_url !== identity.mcpUrl || parsed.key_fp !== identity.keyFp || typeof parsed.cached_at !== "string" || !Array.isArray(parsed.rules)) {
5894
+ return null;
5895
+ }
5896
+ return {
5897
+ version: CACHE_VERSION2,
5898
+ cached_at: parsed.cached_at,
5899
+ mcp_url: parsed.mcp_url,
5900
+ key_fp: parsed.key_fp,
5901
+ rules: parsed.rules
5902
+ };
5903
+ } catch {
5904
+ return null;
5905
+ }
5906
+ }
5907
+ var CACHE_VERSION2;
5908
+ var init_policy_cache = __esm({
5909
+ "src/gateway/policy-cache.ts"() {
5910
+ "use strict";
5911
+ CACHE_VERSION2 = 1;
5912
+ }
5913
+ });
5914
+
5915
+ // src/gateway/policy-fetch.ts
5916
+ function policyIdentity(env = process.env) {
5917
+ const mcpUrl = env.MAIND_MCP_URL ?? DEFAULT_MCP_URL3;
5918
+ const apiKey = readApiKey();
5919
+ return { mcpUrl, keyFp: apiKey ? keyFingerprint(apiKey) : "anon" };
5920
+ }
5921
+ async function fetchGatewayRules(timeoutMs = 6e3) {
5922
+ const apiKey = readApiKey();
5923
+ if (apiKey === null) return null;
5924
+ let projectKey = null;
5925
+ try {
5926
+ projectKey = computeProjectKey();
5927
+ } catch {
5928
+ projectKey = null;
5929
+ }
5930
+ const text = await fetchToolText(
5931
+ "get_conventions",
5932
+ {},
5933
+ {
5934
+ apiKey,
5935
+ deviceId: ensureDeviceId(),
5936
+ projectKey,
5937
+ bridgeVersion: BRIDGE_VERSION,
5938
+ clientFamily: "gateway",
5939
+ timeoutMs
5940
+ }
5941
+ );
5942
+ if (text === null) return null;
5943
+ let payload;
5944
+ try {
5945
+ payload = JSON.parse(text);
5946
+ } catch {
5947
+ return null;
5948
+ }
5949
+ return extractGatewayRules(payload);
5950
+ }
5951
+ var init_policy_fetch = __esm({
5952
+ "src/gateway/policy-fetch.ts"() {
5953
+ "use strict";
5954
+ init_conventions_cache();
5955
+ init_device_id();
5956
+ init_mcp_client();
5957
+ init_project_key();
5958
+ init_version();
5959
+ init_policy();
5960
+ }
5961
+ });
5962
+
5615
5963
  // src/gateway/wrap.ts
5616
5964
  function isGatewayWrapped(entry) {
5617
5965
  const args = Array.isArray(entry.args) ? entry.args.map(String) : [];
@@ -5687,9 +6035,9 @@ __export(install_exports, {
5687
6035
  runGatewayInstall: () => runGatewayInstall,
5688
6036
  runGatewayUninstall: () => runGatewayUninstall
5689
6037
  });
5690
- import { existsSync as existsSync15, readFileSync as readFileSync10 } from "node:fs";
5691
- import { homedir as homedir8 } from "node:os";
5692
- import { join as join21 } from "node:path";
6038
+ import { existsSync as existsSync15, readFileSync as readFileSync11 } from "node:fs";
6039
+ import { homedir as homedir10 } from "node:os";
6040
+ import { join as join23 } from "node:path";
5693
6041
  import { createInterface as createInterface8 } from "node:readline";
5694
6042
  function parseFlags(argv) {
5695
6043
  const f = { yes: false, dryRun: false };
@@ -5702,8 +6050,8 @@ function parseFlags(argv) {
5702
6050
  }
5703
6051
  function targets() {
5704
6052
  return [
5705
- { label: "Claude Code (project .mcp.json)", path: join21(process.cwd(), ".mcp.json") },
5706
- { label: "Claude Code (user ~/.claude.json)", path: join21(homedir8(), ".claude.json") }
6053
+ { label: "Claude Code (project .mcp.json)", path: join23(process.cwd(), ".mcp.json") },
6054
+ { label: "Claude Code (user ~/.claude.json)", path: join23(homedir10(), ".claude.json") }
5707
6055
  ];
5708
6056
  }
5709
6057
  async function confirm(question) {
@@ -5734,7 +6082,7 @@ function loadConfig(path8) {
5734
6082
  function readFileSafeSync(path8) {
5735
6083
  try {
5736
6084
  if (!existsSync15(path8)) return null;
5737
- return readFileSync10(path8, "utf8");
6085
+ return readFileSync11(path8, "utf8");
5738
6086
  } catch {
5739
6087
  return null;
5740
6088
  }
@@ -5840,6 +6188,120 @@ var init_install2 = __esm({
5840
6188
  }
5841
6189
  });
5842
6190
 
6191
+ // src/gateway/policy-cli.ts
6192
+ var policy_cli_exports = {};
6193
+ __export(policy_cli_exports, {
6194
+ runGatewayAttest: () => runGatewayAttest,
6195
+ runGatewayMode: () => runGatewayMode,
6196
+ runGatewayPolicy: () => runGatewayPolicy
6197
+ });
6198
+ async function runGatewayMode(argv) {
6199
+ const arg = argv[0];
6200
+ if (arg === void 0) {
6201
+ const mode = resolveGatewayMode();
6202
+ const fromEnv = process.env.MAIND_GATEWAY !== void 0;
6203
+ process.stdout.write(
6204
+ `maind: gateway mode is '${mode}'${fromEnv ? " (from MAIND_GATEWAY env)" : ""}
6205
+ `
6206
+ );
6207
+ return 0;
6208
+ }
6209
+ if (arg !== "off" && arg !== "warn" && arg !== "enforce") {
6210
+ process.stderr.write("usage: maind-mcp-bridge gateway mode [off|warn|enforce]\n");
6211
+ return 2;
6212
+ }
6213
+ await writeGatewayMode(arg);
6214
+ process.stdout.write(
6215
+ `maind: gateway mode set to '${arg}'. ` + (arg === "enforce" ? "Conventions with gateway_gate + severity=required now DENY matching tools.\n" : arg === "warn" ? "Convention matches are logged (policy_warn) and forwarded \u2014 nothing is denied.\n" : "Convention policy is off; only explicit --deny-tool flags apply.\n")
6216
+ );
6217
+ return 0;
6218
+ }
6219
+ async function runGatewayAttest(argv) {
6220
+ const arg = argv[0];
6221
+ if (arg === void 0) {
6222
+ const on = resolveGatewayAttest();
6223
+ const fromEnv = process.env.MAIND_GATEWAY_ATTEST !== void 0;
6224
+ process.stdout.write(
6225
+ `maind: gateway attestation reports are ${on ? "ON" : "OFF"}${fromEnv ? " (from MAIND_GATEWAY_ATTEST env)" : ""}.
6226
+ ` + (on ? "" : "maind: enable with 'gateway attest on' \u2014 reports observation windows (per-tool call/warn/deny COUNTERS, tool NAMES, convention citations, server label) to your maind account. Never tool arguments, results, paths, or prompts.\n")
6227
+ );
6228
+ return 0;
6229
+ }
6230
+ if (arg !== "on" && arg !== "off") {
6231
+ process.stderr.write("usage: maind-mcp-bridge gateway attest [on|off]\n");
6232
+ return 2;
6233
+ }
6234
+ await writeGatewayAttest(arg === "on");
6235
+ process.stdout.write(
6236
+ arg === "on" ? "maind: attestation reports ON. Each gateway now reports observation windows (tool-name counters + convention citations \u2014 never arguments) to your maind account, at gateway end and every 30 min.\n" : "maind: attestation reports OFF. Events stay local (~/.maind/gateway/events.jsonl).\n"
6237
+ );
6238
+ return 0;
6239
+ }
6240
+ function renderRules(rules) {
6241
+ if (rules.length === 0) return " (no rules \u2014 no visible convention carries a gateway_gate)\n";
6242
+ let out2 = "";
6243
+ for (const r of rules) {
6244
+ const scope = r.servers === null ? "*" : r.servers.join(",");
6245
+ const grade = r.severity === "required" ? "deny-capable" : "warn-only";
6246
+ out2 += ` ${r.tool} [servers: ${scope}] ${r.conventionId} v${r.conventionVersion} (${r.severity} \u2192 ${grade})
6247
+ `;
6248
+ }
6249
+ return out2;
6250
+ }
6251
+ function cacheAge(cache, now = Date.now()) {
6252
+ const then = Date.parse(cache.cached_at);
6253
+ if (Number.isNaN(then)) return "unknown age";
6254
+ const mins = Math.floor((now - then) / 6e4);
6255
+ if (mins < 1) return "just now";
6256
+ if (mins < 60) return `${mins} min ago`;
6257
+ const hours = Math.floor(mins / 60);
6258
+ if (hours < 24) return `${hours} h ago`;
6259
+ return `${Math.floor(hours / 24)} d ago`;
6260
+ }
6261
+ async function runGatewayPolicy(argv) {
6262
+ const refresh = argv.includes("--refresh");
6263
+ const mode = resolveGatewayMode();
6264
+ const identity = policyIdentity();
6265
+ if (refresh) {
6266
+ const rules = await fetchGatewayRules();
6267
+ if (rules === null) {
6268
+ process.stderr.write(
6269
+ "maind: policy refresh failed (not paired, offline, or server error) \u2014 showing last cached state.\n"
6270
+ );
6271
+ } else {
6272
+ writePolicyCache(identity, rules);
6273
+ process.stdout.write(`maind: policy refreshed (${rules.length} rule(s)).
6274
+ `);
6275
+ }
6276
+ }
6277
+ const cache = readPolicyCache(identity);
6278
+ process.stdout.write(`maind: gateway mode '${mode}'
6279
+ `);
6280
+ if (cache === null) {
6281
+ process.stdout.write(
6282
+ "maind: no cached policy for this identity. Run 'gateway policy --refresh' while paired.\n"
6283
+ );
6284
+ return 0;
6285
+ }
6286
+ process.stdout.write(`maind: policy from cache (${cacheAge(cache)}, ${identity.mcpUrl}):
6287
+ `);
6288
+ process.stdout.write(renderRules(cache.rules));
6289
+ if (mode !== "enforce") {
6290
+ process.stdout.write(
6291
+ "maind: note \u2014 deny-capable rules only deny in mode 'enforce'; current mode logs them as policy_warn.\n"
6292
+ );
6293
+ }
6294
+ return 0;
6295
+ }
6296
+ var init_policy_cli = __esm({
6297
+ "src/gateway/policy-cli.ts"() {
6298
+ "use strict";
6299
+ init_config2();
6300
+ init_policy_cache();
6301
+ init_policy_fetch();
6302
+ }
6303
+ });
6304
+
5843
6305
  // src/gateway/run.ts
5844
6306
  var run_exports = {};
5845
6307
  __export(run_exports, {
@@ -5848,18 +6310,18 @@ __export(run_exports, {
5848
6310
  runGateway: () => runGateway
5849
6311
  });
5850
6312
  import { spawn as spawn2 } from "node:child_process";
5851
- import { appendFile as appendFile2, mkdir as mkdir6 } from "node:fs/promises";
5852
- import { homedir as homedir9 } from "node:os";
5853
- import { basename as basename2, join as join22 } from "node:path";
6313
+ import { appendFile as appendFile3, mkdir as mkdir7 } from "node:fs/promises";
6314
+ import { homedir as homedir11 } from "node:os";
6315
+ import { basename as basename2, join as join24 } from "node:path";
5854
6316
  import { createInterface as createInterface9 } from "node:readline";
5855
6317
  function gatewayEventsFile() {
5856
- return join22(homedir9(), ".maind", "gateway", "events.jsonl");
6318
+ return join24(homedir11(), ".maind", "gateway", "events.jsonl");
5857
6319
  }
5858
6320
  async function logEvent(e) {
5859
6321
  try {
5860
6322
  const file = gatewayEventsFile();
5861
- await mkdir6(join22(homedir9(), ".maind", "gateway"), { recursive: true });
5862
- await appendFile2(file, JSON.stringify(e) + "\n", { mode: 384 });
6323
+ await mkdir7(join24(homedir11(), ".maind", "gateway"), { recursive: true });
6324
+ await appendFile3(file, JSON.stringify(e) + "\n", { mode: 384 });
5863
6325
  } catch {
5864
6326
  }
5865
6327
  }
@@ -5897,15 +6359,63 @@ async function runGateway(argv) {
5897
6359
  const { runGatewayInstall: runGatewayInstall2, runGatewayUninstall: runGatewayUninstall2 } = await Promise.resolve().then(() => (init_install2(), install_exports));
5898
6360
  return argv[0] === "install" ? runGatewayInstall2(argv.slice(1)) : runGatewayUninstall2(argv.slice(1));
5899
6361
  }
6362
+ if (argv[0] === "mode" || argv[0] === "policy" || argv[0] === "attest") {
6363
+ const { runGatewayAttest: runGatewayAttest2, runGatewayMode: runGatewayMode2, runGatewayPolicy: runGatewayPolicy2 } = await Promise.resolve().then(() => (init_policy_cli(), policy_cli_exports));
6364
+ if (argv[0] === "mode") return runGatewayMode2(argv.slice(1));
6365
+ if (argv[0] === "attest") return runGatewayAttest2(argv.slice(1));
6366
+ return runGatewayPolicy2(argv.slice(1));
6367
+ }
5900
6368
  const parsed = parseGatewayArgs(argv);
5901
6369
  if (parsed === null) {
5902
6370
  process.stderr.write(
5903
- "usage: maind-mcp-bridge gateway [--deny-tool <name>]... [--label <name>] -- <command> [args...]\n maind-mcp-bridge gateway install [--yes] [--dry-run]\n maind-mcp-bridge gateway uninstall [--yes] [--dry-run]\nEXPERIMENTAL (gateway spike): wraps a stdio MCP server; logs tool-call\nNAMES to ~/.maind/gateway/events.jsonl and answers denied tools locally.\ninstall/uninstall rewrite Claude Code MCP configs (consent per server).\n"
6371
+ "usage: maind-mcp-bridge gateway [--deny-tool <name>]... [--label <name>] -- <command> [args...]\n maind-mcp-bridge gateway install [--yes] [--dry-run]\n maind-mcp-bridge gateway uninstall [--yes] [--dry-run]\n maind-mcp-bridge gateway mode [off|warn|enforce]\n maind-mcp-bridge gateway policy [--refresh]\n maind-mcp-bridge gateway attest [on|off]\nEXPERIMENTAL (gateway spike): wraps a stdio MCP server; logs tool-call\nNAMES to ~/.maind/gateway/events.jsonl and answers denied tools locally.\ninstall/uninstall rewrite Claude Code MCP configs (consent per server).\nmode/policy: convention-bound policy (Stufe 2b) \u2014 deny only in enforce.\n"
5904
6372
  );
5905
6373
  return 2;
5906
6374
  }
5907
6375
  const { denyTools, label, command, args } = parsed;
5908
6376
  const serverLabel = label ?? basename2(command);
6377
+ const mode = resolveGatewayMode();
6378
+ let policyRules = mode === "off" ? [] : readPolicyCache(policyIdentity())?.rules ?? [];
6379
+ if (mode !== "off") {
6380
+ void fetchGatewayRules().then((rules) => {
6381
+ if (rules !== null) {
6382
+ policyRules = rules;
6383
+ writePolicyCache(policyIdentity(), rules);
6384
+ }
6385
+ }).catch(() => {
6386
+ });
6387
+ }
6388
+ const windowEvents = [];
6389
+ const attested = resolveGatewayAttest() && readApiKey() !== null && mode !== "off";
6390
+ let observedProjectKey = null;
6391
+ try {
6392
+ observedProjectKey = computeProjectKey();
6393
+ } catch {
6394
+ observedProjectKey = null;
6395
+ }
6396
+ const record = (e) => {
6397
+ void logEvent(e);
6398
+ if (attested) windowEvents.push(e);
6399
+ };
6400
+ const attestAndReset = async () => {
6401
+ if (!attested) return;
6402
+ const payload = aggregateWindow(
6403
+ windowEvents.splice(0),
6404
+ mode,
6405
+ serverLabel,
6406
+ observedProjectKey
6407
+ );
6408
+ if (payload === null) return;
6409
+ if (!await postAttestation(payload)) await spoolAttestation(payload);
6410
+ };
6411
+ if (attested) {
6412
+ void flushAttestSpool().catch(() => {
6413
+ });
6414
+ }
6415
+ const attestTimer = setInterval(() => {
6416
+ void attestAndReset();
6417
+ }, 30 * 6e4);
6418
+ attestTimer.unref();
5909
6419
  const child = spawn2(command, args, {
5910
6420
  stdio: ["pipe", "pipe", "inherit"]
5911
6421
  });
@@ -5921,26 +6431,65 @@ async function runGateway(argv) {
5921
6431
  if (frame.kind === "request" && frame.method === "tools/call" && frame.toolName) {
5922
6432
  if (denyTools.has(frame.toolName) && frame.id !== void 0) {
5923
6433
  process.stdout.write(denyResult(frame.id, frame.toolName) + "\n");
5924
- void logEvent(toolEvent("deny", serverLabel, frame.toolName, Date.now()));
6434
+ record(toolEvent("deny", serverLabel, frame.toolName, Date.now()));
5925
6435
  return;
5926
6436
  }
5927
- void logEvent(toolEvent("tool_call", serverLabel, frame.toolName, Date.now()));
6437
+ const decision = decideToolCall(frame.toolName, serverLabel, policyRules, mode);
6438
+ if (decision.kind === "deny" && frame.id !== void 0) {
6439
+ process.stdout.write(
6440
+ denyResult(frame.id, frame.toolName, policyDenyText(frame.toolName, decision.rule)) + "\n"
6441
+ );
6442
+ record(
6443
+ policyEvent(
6444
+ "policy_deny",
6445
+ serverLabel,
6446
+ frame.toolName,
6447
+ Date.now(),
6448
+ decision.rule.conventionId,
6449
+ decision.rule.conventionVersion
6450
+ )
6451
+ );
6452
+ return;
6453
+ }
6454
+ if (decision.kind === "warn" || decision.kind === "deny") {
6455
+ record(
6456
+ policyEvent(
6457
+ "policy_warn",
6458
+ serverLabel,
6459
+ frame.toolName,
6460
+ Date.now(),
6461
+ decision.rule.conventionId,
6462
+ decision.rule.conventionVersion
6463
+ )
6464
+ );
6465
+ }
6466
+ record(toolEvent("tool_call", serverLabel, frame.toolName, Date.now()));
5928
6467
  }
5929
6468
  child.stdin.write(line + "\n");
5930
6469
  });
5931
6470
  rl.on("close", () => {
5932
6471
  child.stdin.end();
5933
6472
  });
5934
- return await new Promise((resolve3) => {
6473
+ const exitCode = await new Promise((resolve3) => {
5935
6474
  child.on("exit", (code, signal) => {
5936
6475
  resolve3(code ?? (signal ? 1 : 0));
5937
6476
  });
5938
6477
  });
6478
+ clearInterval(attestTimer);
6479
+ await attestAndReset();
6480
+ return exitCode;
5939
6481
  }
5940
6482
  var init_run = __esm({
5941
6483
  "src/gateway/run.ts"() {
5942
6484
  "use strict";
5943
6485
  init_frames();
6486
+ init_attest();
6487
+ init_config2();
6488
+ init_policy();
6489
+ init_policy_cache();
6490
+ init_policy_fetch();
6491
+ init_device_id();
6492
+ init_project_key();
5944
6493
  }
5945
6494
  });
5946
6495
 
@@ -5957,11 +6506,11 @@ __export(cross_session_exports, {
5957
6506
  runGuardCrossObserve: () => runGuardCrossObserve,
5958
6507
  staleReason: () => staleReason
5959
6508
  });
5960
- import { mkdir as mkdir7, readFile as readFile5, readdir as readdir2, stat as stat3, unlink as unlink3, writeFile as writeFile6 } from "node:fs/promises";
5961
- import { homedir as homedir10 } from "node:os";
5962
- import { join as join23 } from "node:path";
6509
+ import { mkdir as mkdir8, readFile as readFile6, readdir as readdir2, stat as stat3, unlink as unlink3, writeFile as writeFile7 } from "node:fs/promises";
6510
+ import { homedir as homedir12 } from "node:os";
6511
+ import { join as join25 } from "node:path";
5963
6512
  function crossSessionDir() {
5964
- return join23(homedir10(), ".maind", "cross-session");
6513
+ return join25(homedir12(), ".maind", "cross-session");
5965
6514
  }
5966
6515
  function parseSessionDb(raw) {
5967
6516
  const empty = { files: {}, warned: {} };
@@ -6002,12 +6551,12 @@ function staleReason(path8, v) {
6002
6551
  }
6003
6552
  async function dbPath(sessionId) {
6004
6553
  const dir = crossSessionDir();
6005
- await mkdir7(dir, { recursive: true });
6006
- return join23(dir, `${sessionId}.json`);
6554
+ await mkdir8(dir, { recursive: true });
6555
+ return join25(dir, `${sessionId}.json`);
6007
6556
  }
6008
6557
  async function loadDb(sessionId, now) {
6009
6558
  try {
6010
- const raw = await readFile5(await dbPath(sessionId), "utf8");
6559
+ const raw = await readFile6(await dbPath(sessionId), "utf8");
6011
6560
  return pruneDb(parseSessionDb(JSON.parse(raw)), now);
6012
6561
  } catch {
6013
6562
  return { files: {}, warned: {} };
@@ -6015,7 +6564,7 @@ async function loadDb(sessionId, now) {
6015
6564
  }
6016
6565
  async function saveDb(sessionId, db) {
6017
6566
  try {
6018
- await writeFile6(await dbPath(sessionId), JSON.stringify(db), { mode: 384 });
6567
+ await writeFile7(await dbPath(sessionId), JSON.stringify(db), { mode: 384 });
6019
6568
  } catch {
6020
6569
  }
6021
6570
  }
@@ -6024,7 +6573,7 @@ async function sweepStaleSessionFiles(now) {
6024
6573
  const dir = crossSessionDir();
6025
6574
  for (const name of await readdir2(dir)) {
6026
6575
  if (!name.endsWith(".json")) continue;
6027
- const p = join23(dir, name);
6576
+ const p = join25(dir, name);
6028
6577
  const s = await stat3(p).catch(() => null);
6029
6578
  if (s && now - s.mtimeMs > TTL_MS) await unlink3(p).catch(() => {
6030
6579
  });
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":28604,"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":7486,"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":6842,"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":17952,"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":14340,"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/bridge-config.ts":{"bytes":2923,"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/install/working-paths-consent.ts":{"bytes":5484,"imports":[{"path":"node:readline","kind":"import-statement","external":true},{"path":"src/bridge-config.ts","kind":"import-statement","original":"../bridge-config.js"},{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"./atomic-write.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"},"../../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/hooks.js":{"bytes":5187,"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}],"format":"esm"},"../../packages/code-index/build/repo-health/divergence.js":{"bytes":20406,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/repo-health/hooks.js","kind":"import-statement","original":"./hooks.js"},{"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/sqlite-driver.js":{"bytes":5209,"imports":[{"path":"node:module","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/store/node-sqlite.js":{"bytes":12527,"imports":[{"path":"../../packages/code-index/build/store/sqlite-driver.js","kind":"import-statement","original":"./sqlite-driver.js"},{"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":2809,"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"},{"path":"../../packages/code-index/build/store/sqlite-driver.js","kind":"import-statement","original":"./store/sqlite-driver.js"}],"format":"esm"},"src/local-tools/engine.ts":{"bytes":3254,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:module","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/node.js","kind":"import-statement","original":"@maind/code-index/node"}],"format":"esm"},"src/install/index.ts":{"bytes":9896,"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/working-paths-consent.ts","kind":"import-statement","original":"./working-paths-consent.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"},{"path":"src/local-tools/engine.ts","kind":"import-statement","original":"../local-tools/engine.js"}],"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":2036,"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/hooks.js","kind":"import-statement","original":"./repo-health/hooks.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":5960,"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/presence.ts":{"bytes":13886,"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"},"src/presence-snapshot.ts":{"bytes":5976,"imports":[{"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/working-paths.ts":{"bytes":3016,"imports":[{"path":"node:child_process","kind":"import-statement","external":true}],"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":18118,"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/edit-guard.ts":{"bytes":9666,"imports":[],"format":"esm"},"src/hooks/hook-input.ts":{"bytes":2921,"imports":[],"format":"esm"},"src/hooks/payloads.ts":{"bytes":843,"imports":[],"format":"esm"},"src/hooks/state.ts":{"bytes":5855,"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":34012,"imports":[{"path":"node:child_process","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":"../../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/presence-snapshot.ts","kind":"import-statement","original":"../presence-snapshot.js"},{"path":"src/project-key.ts","kind":"import-statement","original":"../project-key.js"},{"path":"src/hooks/api.ts","kind":"import-statement","original":"./api.js"},{"path":"src/hooks/edit-guard.ts","kind":"import-statement","original":"./edit-guard.js"},{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"./hook-input.js"},{"path":"src/hooks/payloads.ts","kind":"import-statement","original":"./payloads.js"},{"path":"src/hooks/state.ts","kind":"import-statement","original":"./state.js"}],"format":"esm"},"src/session-end/connection.ts":{"bytes":3229,"imports":[],"format":"esm"},"src/session-end/index.ts":{"bytes":6114,"imports":[{"path":"../../packages/claude-code-telemetry/dist/index.js","kind":"import-statement","original":"@maind/claude-code-telemetry"},{"path":"src/bridge-config.ts","kind":"import-statement","original":"../bridge-config.js"},{"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/edit-guard.ts","kind":"import-statement","original":"../hooks/edit-guard.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/presence.ts","kind":"import-statement","original":"../presence.js"},{"path":"src/presence-snapshot.ts","kind":"import-statement","original":"../presence-snapshot.js"},{"path":"src/project-key.ts","kind":"import-statement","original":"../project-key.js"},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/session-end/connection.ts","kind":"import-statement","original":"./connection.js"}],"format":"esm"},"src/guard/config.ts":{"bytes":2572,"imports":[{"path":"src/bridge-config.ts","kind":"import-statement","original":"../bridge-config.js"},{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"../install/atomic-write.js"}],"format":"esm"},"src/guard/install.ts":{"bytes":3657,"imports":[{"path":"src/install/hook-wiring.ts","kind":"import-statement","original":"../install/hook-wiring.js"},{"path":"src/install/hook-merge.ts","kind":"import-statement","original":"../install/hook-merge.js"},{"path":"src/guard/config.ts","kind":"import-statement","original":"./config.js"}],"format":"esm"},"src/guard/session-file.ts":{"bytes":3577,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/hooks/state.ts","kind":"import-statement","original":"../hooks/state.js"}],"format":"esm"},"src/guard/log.ts":{"bytes":3246,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/guard/session-file.ts","kind":"import-statement","original":"./session-file.js"}],"format":"esm"},"src/guard/cli.ts":{"bytes":5916,"imports":[{"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":"src/install/hook-wiring.ts","kind":"import-statement","original":"../install/hook-wiring.js"},{"path":"src/guard/config.ts","kind":"import-statement","original":"./config.js"},{"path":"src/guard/install.ts","kind":"import-statement","original":"./install.js"},{"path":"src/guard/log.ts","kind":"import-statement","original":"./log.js"},{"path":"src/guard/session-file.ts","kind":"import-statement","original":"./session-file.js"}],"format":"esm"},"src/guard/mcp-client.ts":{"bytes":5414,"imports":[],"format":"esm"},"src/guard/inject.ts":{"bytes":8057,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","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"},{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"../hooks/hook-input.js"},{"path":"src/project-key.ts","kind":"import-statement","original":"../project-key.js"},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/guard/config.ts","kind":"import-statement","original":"./config.js"},{"path":"src/guard/log.ts","kind":"import-statement","original":"./log.js"},{"path":"src/guard/session-file.ts","kind":"import-statement","original":"./session-file.js"},{"path":"src/guard/mcp-client.ts","kind":"import-statement","original":"./mcp-client.js"}],"format":"esm"},"src/guard/gate.ts":{"bytes":6853,"imports":[{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"../hooks/hook-input.js"},{"path":"src/hooks/payloads.ts","kind":"import-statement","original":"../hooks/payloads.js"},{"path":"src/hooks/state.ts","kind":"import-statement","original":"../hooks/state.js"},{"path":"src/project-key.ts","kind":"import-statement","original":"../project-key.js"},{"path":"src/guard/config.ts","kind":"import-statement","original":"./config.js"},{"path":"src/guard/log.ts","kind":"import-statement","original":"./log.js"},{"path":"src/guard/session-file.ts","kind":"import-statement","original":"./session-file.js"}],"format":"esm"},"src/guard/stop.ts":{"bytes":3134,"imports":[{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"../hooks/hook-input.js"},{"path":"src/hooks/state.ts","kind":"import-statement","original":"../hooks/state.js"},{"path":"src/guard/config.ts","kind":"import-statement","original":"./config.js"},{"path":"src/guard/log.ts","kind":"import-statement","original":"./log.js"},{"path":"src/guard/session-file.ts","kind":"import-statement","original":"./session-file.js"}],"format":"esm"},"src/gateway/frames.ts":{"bytes":3937,"imports":[],"format":"esm"},"src/gateway/wrap.ts":{"bytes":5823,"imports":[],"format":"esm"},"src/gateway/install.ts":{"bytes":6383,"imports":[{"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:readline","kind":"import-statement","external":true},{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"../install/atomic-write.js"},{"path":"src/install/bridge-entry.ts","kind":"import-statement","original":"../install/bridge-entry.js"},{"path":"src/gateway/wrap.ts","kind":"import-statement","original":"./wrap.js"}],"format":"esm"},"src/gateway/run.ts":{"bytes":6056,"imports":[{"path":"node:child_process","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:readline","kind":"import-statement","external":true},{"path":"src/gateway/frames.ts","kind":"import-statement","original":"./frames.js"},{"path":"src/gateway/install.ts","kind":"dynamic-import","original":"./install.js"}],"format":"esm"},"src/guard/cross-session.ts":{"bytes":9693,"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},{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"../hooks/hook-input.js"},{"path":"src/hooks/payloads.ts","kind":"import-statement","original":"../hooks/payloads.js"},{"path":"src/guard/config.ts","kind":"import-statement","original":"./config.js"},{"path":"src/guard/log.ts","kind":"import-statement","original":"./log.js"}],"format":"esm"},"src/index.ts":{"bytes":16835,"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/presence-snapshot.ts","kind":"import-statement","original":"./presence-snapshot.js"},{"path":"src/working-paths.ts","kind":"import-statement","original":"./working-paths.js"},{"path":"src/session-end/index.ts","kind":"dynamic-import","original":"./session-end/index.js"},{"path":"src/guard/cli.ts","kind":"dynamic-import","original":"./guard/cli.js"},{"path":"src/guard/inject.ts","kind":"dynamic-import","original":"./guard/inject.js"},{"path":"src/guard/gate.ts","kind":"dynamic-import","original":"./guard/gate.js"},{"path":"src/guard/stop.ts","kind":"dynamic-import","original":"./guard/stop.js"},{"path":"src/gateway/run.ts","kind":"dynamic-import","original":"./gateway/run.js"},{"path":"src/guard/cross-session.ts","kind":"dynamic-import","original":"./guard/cross-session.js"},{"path":"src/guard/cross-session.ts","kind":"dynamic-import","original":"./guard/cross-session.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:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:url","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"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:readline","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: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: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: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: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:child_process","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:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","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:path","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:path","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:readline","kind":"import-statement","external":true},{"path":"node:child_process","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:readline","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: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":"smol-toml","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:module","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:module","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}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/conventions-cache.ts":{"bytesInOutput":3358},"src/device-id.ts":{"bytesInOutput":2542},"src/version.ts":{"bytesInOutput":127},"src/project-key.ts":{"bytesInOutput":1456},"src/install/bridge-entry.ts":{"bytesInOutput":1893},"src/install/atomic-write.ts":{"bytesInOutput":1854},"src/install/hook-wiring.ts":{"bytesInOutput":10349},"src/install/hook-merge.ts":{"bytesInOutput":6940},"src/bridge-config.ts":{"bytesInOutput":1235},"../../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/hooks.js":{"bytesInOutput":2980},"../../packages/code-index/build/repo-health/divergence.js":{"bytesInOutput":13930},"../../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":366},"src/presence.ts":{"bytesInOutput":7606},"src/presence-snapshot.ts":{"bytesInOutput":3751},"../../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":9943},"../../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/edit-guard.ts":{"bytesInOutput":5392},"src/hooks/hook-input.ts":{"bytesInOutput":1142},"src/hooks/payloads.ts":{"bytesInOutput":459},"src/hooks/state.ts":{"bytesInOutput":1771},"src/hooks/index.ts":{"bytesInOutput":17945},"src/session-end/connection.ts":{"bytesInOutput":436},"src/session-end/index.ts":{"bytesInOutput":3176},"src/guard/config.ts":{"bytesInOutput":923},"src/guard/install.ts":{"bytesInOutput":2540},"src/guard/session-file.ts":{"bytesInOutput":1816},"src/guard/log.ts":{"bytesInOutput":1698},"src/guard/cli.ts":{"bytesInOutput":4995},"src/guard/mcp-client.ts":{"bytesInOutput":3908},"src/guard/inject.ts":{"bytesInOutput":5130},"src/guard/gate.ts":{"bytesInOutput":4234},"src/guard/stop.ts":{"bytesInOutput":1867},"src/gateway/frames.ts":{"bytesInOutput":1542},"src/gateway/wrap.ts":{"bytesInOutput":2470},"src/gateway/install.ts":{"bytesInOutput":5146},"src/gateway/run.ts":{"bytesInOutput":3698},"src/guard/cross-session.ts":{"bytesInOutput":5722},"src/index.ts":{"bytesInOutput":10713},"src/forward.ts":{"bytesInOutput":18440},"src/client-detect.ts":{"bytesInOutput":2068},"src/auth.ts":{"bytesInOutput":5084},"src/install/index.ts":{"bytesInOutput":6304},"src/install/flags.ts":{"bytesInOutput":5309},"src/install/report.ts":{"bytesInOutput":3096},"src/install/project-root.ts":{"bytesInOutput":2188},"src/install/client-targets.ts":{"bytesInOutput":3244},"src/install/json-merge.ts":{"bytesInOutput":3790},"src/install/toml-merge.ts":{"bytesInOutput":3550},"src/install/preamble.ts":{"bytesInOutput":2835},"../../packages/integration-snippets/build/index.js":{"bytesInOutput":27539},"src/install/working-paths-consent.ts":{"bytesInOutput":3412},"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":1704},"../../packages/code-index/build/node.js":{"bytesInOutput":548},"../../packages/code-index/build/parse/tree-sitter/parser.js":{"bytesInOutput":2072},"../../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/sqlite-driver.js":{"bytesInOutput":2915},"../../packages/code-index/build/store/node-sqlite.js":{"bytesInOutput":9844},"../../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":24551},"src/local-tools/router.ts":{"bytesInOutput":3929},"src/functions-origin.ts":{"bytesInOutput":259},"src/metrics-post.ts":{"bytesInOutput":1285},"src/working-paths.ts":{"bytesInOutput":1317}},"bytes":375128}}}
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":28604,"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":7486,"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":6842,"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":17952,"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":14340,"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/bridge-config.ts":{"bytes":3931,"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/install/working-paths-consent.ts":{"bytes":5484,"imports":[{"path":"node:readline","kind":"import-statement","external":true},{"path":"src/bridge-config.ts","kind":"import-statement","original":"../bridge-config.js"},{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"./atomic-write.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"},"../../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/hooks.js":{"bytes":5187,"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}],"format":"esm"},"../../packages/code-index/build/repo-health/divergence.js":{"bytes":20406,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/repo-health/hooks.js","kind":"import-statement","original":"./hooks.js"},{"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/sqlite-driver.js":{"bytes":5209,"imports":[{"path":"node:module","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/store/node-sqlite.js":{"bytes":12527,"imports":[{"path":"../../packages/code-index/build/store/sqlite-driver.js","kind":"import-statement","original":"./sqlite-driver.js"},{"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":2809,"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"},{"path":"../../packages/code-index/build/store/sqlite-driver.js","kind":"import-statement","original":"./store/sqlite-driver.js"}],"format":"esm"},"src/local-tools/engine.ts":{"bytes":3254,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:module","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/node.js","kind":"import-statement","original":"@maind/code-index/node"}],"format":"esm"},"src/install/index.ts":{"bytes":9896,"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/working-paths-consent.ts","kind":"import-statement","original":"./working-paths-consent.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"},{"path":"src/local-tools/engine.ts","kind":"import-statement","original":"../local-tools/engine.js"}],"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":2036,"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/hooks.js","kind":"import-statement","original":"./repo-health/hooks.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":5960,"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/presence.ts":{"bytes":13886,"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"},"src/presence-snapshot.ts":{"bytes":5976,"imports":[{"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/working-paths.ts":{"bytes":3016,"imports":[{"path":"node:child_process","kind":"import-statement","external":true}],"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":18118,"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":3117,"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/edit-guard.ts":{"bytes":9666,"imports":[],"format":"esm"},"src/hooks/hook-input.ts":{"bytes":2921,"imports":[],"format":"esm"},"src/hooks/payloads.ts":{"bytes":843,"imports":[],"format":"esm"},"src/hooks/state.ts":{"bytes":5855,"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":34012,"imports":[{"path":"node:child_process","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":"../../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/presence-snapshot.ts","kind":"import-statement","original":"../presence-snapshot.js"},{"path":"src/project-key.ts","kind":"import-statement","original":"../project-key.js"},{"path":"src/hooks/api.ts","kind":"import-statement","original":"./api.js"},{"path":"src/hooks/edit-guard.ts","kind":"import-statement","original":"./edit-guard.js"},{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"./hook-input.js"},{"path":"src/hooks/payloads.ts","kind":"import-statement","original":"./payloads.js"},{"path":"src/hooks/state.ts","kind":"import-statement","original":"./state.js"}],"format":"esm"},"src/session-end/connection.ts":{"bytes":3229,"imports":[],"format":"esm"},"src/session-end/index.ts":{"bytes":6459,"imports":[{"path":"../../packages/claude-code-telemetry/dist/index.js","kind":"import-statement","original":"@maind/claude-code-telemetry"},{"path":"src/bridge-config.ts","kind":"import-statement","original":"../bridge-config.js"},{"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/edit-guard.ts","kind":"import-statement","original":"../hooks/edit-guard.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/presence.ts","kind":"import-statement","original":"../presence.js"},{"path":"src/presence-snapshot.ts","kind":"import-statement","original":"../presence-snapshot.js"},{"path":"src/project-key.ts","kind":"import-statement","original":"../project-key.js"},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/session-end/connection.ts","kind":"import-statement","original":"./connection.js"}],"format":"esm"},"src/guard/config.ts":{"bytes":2572,"imports":[{"path":"src/bridge-config.ts","kind":"import-statement","original":"../bridge-config.js"},{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"../install/atomic-write.js"}],"format":"esm"},"src/guard/install.ts":{"bytes":3657,"imports":[{"path":"src/install/hook-wiring.ts","kind":"import-statement","original":"../install/hook-wiring.js"},{"path":"src/install/hook-merge.ts","kind":"import-statement","original":"../install/hook-merge.js"},{"path":"src/guard/config.ts","kind":"import-statement","original":"./config.js"}],"format":"esm"},"src/guard/session-file.ts":{"bytes":3577,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/hooks/state.ts","kind":"import-statement","original":"../hooks/state.js"}],"format":"esm"},"src/guard/log.ts":{"bytes":3246,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/guard/session-file.ts","kind":"import-statement","original":"./session-file.js"}],"format":"esm"},"src/guard/cli.ts":{"bytes":5916,"imports":[{"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":"src/install/hook-wiring.ts","kind":"import-statement","original":"../install/hook-wiring.js"},{"path":"src/guard/config.ts","kind":"import-statement","original":"./config.js"},{"path":"src/guard/install.ts","kind":"import-statement","original":"./install.js"},{"path":"src/guard/log.ts","kind":"import-statement","original":"./log.js"},{"path":"src/guard/session-file.ts","kind":"import-statement","original":"./session-file.js"}],"format":"esm"},"src/guard/mcp-client.ts":{"bytes":6343,"imports":[],"format":"esm"},"src/guard/inject.ts":{"bytes":8057,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","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"},{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"../hooks/hook-input.js"},{"path":"src/project-key.ts","kind":"import-statement","original":"../project-key.js"},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/guard/config.ts","kind":"import-statement","original":"./config.js"},{"path":"src/guard/log.ts","kind":"import-statement","original":"./log.js"},{"path":"src/guard/session-file.ts","kind":"import-statement","original":"./session-file.js"},{"path":"src/guard/mcp-client.ts","kind":"import-statement","original":"./mcp-client.js"}],"format":"esm"},"src/guard/gate.ts":{"bytes":6853,"imports":[{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"../hooks/hook-input.js"},{"path":"src/hooks/payloads.ts","kind":"import-statement","original":"../hooks/payloads.js"},{"path":"src/hooks/state.ts","kind":"import-statement","original":"../hooks/state.js"},{"path":"src/project-key.ts","kind":"import-statement","original":"../project-key.js"},{"path":"src/guard/config.ts","kind":"import-statement","original":"./config.js"},{"path":"src/guard/log.ts","kind":"import-statement","original":"./log.js"},{"path":"src/guard/session-file.ts","kind":"import-statement","original":"./session-file.js"}],"format":"esm"},"src/guard/stop.ts":{"bytes":3134,"imports":[{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"../hooks/hook-input.js"},{"path":"src/hooks/state.ts","kind":"import-statement","original":"../hooks/state.js"},{"path":"src/guard/config.ts","kind":"import-statement","original":"./config.js"},{"path":"src/guard/log.ts","kind":"import-statement","original":"./log.js"},{"path":"src/guard/session-file.ts","kind":"import-statement","original":"./session-file.js"}],"format":"esm"},"src/gateway/frames.ts":{"bytes":4747,"imports":[],"format":"esm"},"src/gateway/attest.ts":{"bytes":7320,"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},{"path":"src/device-id.ts","kind":"import-statement","original":"../device-id.js"},{"path":"src/guard/mcp-client.ts","kind":"import-statement","original":"../guard/mcp-client.js"},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"}],"format":"esm"},"src/gateway/config.ts":{"bytes":3334,"imports":[{"path":"src/bridge-config.ts","kind":"import-statement","original":"../bridge-config.js"},{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"../install/atomic-write.js"}],"format":"esm"},"src/gateway/policy.ts":{"bytes":5948,"imports":[],"format":"esm"},"src/gateway/policy-cache.ts":{"bytes":3361,"imports":[{"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/gateway/policy-fetch.ts":{"bytes":2357,"imports":[{"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/guard/mcp-client.ts","kind":"import-statement","original":"../guard/mcp-client.js"},{"path":"src/project-key.ts","kind":"import-statement","original":"../project-key.js"},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/gateway/policy.ts","kind":"import-statement","original":"./policy.js"}],"format":"esm"},"src/gateway/wrap.ts":{"bytes":5823,"imports":[],"format":"esm"},"src/gateway/install.ts":{"bytes":6383,"imports":[{"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:readline","kind":"import-statement","external":true},{"path":"src/install/atomic-write.ts","kind":"import-statement","original":"../install/atomic-write.js"},{"path":"src/install/bridge-entry.ts","kind":"import-statement","original":"../install/bridge-entry.js"},{"path":"src/gateway/wrap.ts","kind":"import-statement","original":"./wrap.js"}],"format":"esm"},"src/gateway/policy-cli.ts":{"bytes":5422,"imports":[{"path":"src/gateway/config.ts","kind":"import-statement","original":"./config.js"},{"path":"src/gateway/policy-cache.ts","kind":"import-statement","original":"./policy-cache.js"},{"path":"src/gateway/policy-fetch.ts","kind":"import-statement","original":"./policy-fetch.js"}],"format":"esm"},"src/gateway/run.ts":{"bytes":11506,"imports":[{"path":"node:child_process","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:readline","kind":"import-statement","external":true},{"path":"src/gateway/frames.ts","kind":"import-statement","original":"./frames.js"},{"path":"src/gateway/attest.ts","kind":"import-statement","original":"./attest.js"},{"path":"src/gateway/config.ts","kind":"import-statement","original":"./config.js"},{"path":"src/gateway/policy.ts","kind":"import-statement","original":"./policy.js"},{"path":"src/gateway/policy-cache.ts","kind":"import-statement","original":"./policy-cache.js"},{"path":"src/gateway/policy-fetch.ts","kind":"import-statement","original":"./policy-fetch.js"},{"path":"src/device-id.ts","kind":"import-statement","original":"../device-id.js"},{"path":"src/project-key.ts","kind":"import-statement","original":"../project-key.js"},{"path":"src/gateway/install.ts","kind":"dynamic-import","original":"./install.js"},{"path":"src/gateway/policy-cli.ts","kind":"dynamic-import","original":"./policy-cli.js"}],"format":"esm"},"src/guard/cross-session.ts":{"bytes":9693,"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},{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"../hooks/hook-input.js"},{"path":"src/hooks/payloads.ts","kind":"import-statement","original":"../hooks/payloads.js"},{"path":"src/guard/config.ts","kind":"import-statement","original":"./config.js"},{"path":"src/guard/log.ts","kind":"import-statement","original":"./log.js"}],"format":"esm"},"src/index.ts":{"bytes":16835,"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/presence-snapshot.ts","kind":"import-statement","original":"./presence-snapshot.js"},{"path":"src/working-paths.ts","kind":"import-statement","original":"./working-paths.js"},{"path":"src/session-end/index.ts","kind":"dynamic-import","original":"./session-end/index.js"},{"path":"src/guard/cli.ts","kind":"dynamic-import","original":"./guard/cli.js"},{"path":"src/guard/inject.ts","kind":"dynamic-import","original":"./guard/inject.js"},{"path":"src/guard/gate.ts","kind":"dynamic-import","original":"./guard/gate.js"},{"path":"src/guard/stop.ts","kind":"dynamic-import","original":"./guard/stop.js"},{"path":"src/gateway/run.ts","kind":"dynamic-import","original":"./gateway/run.js"},{"path":"src/guard/cross-session.ts","kind":"dynamic-import","original":"./guard/cross-session.js"},{"path":"src/guard/cross-session.ts","kind":"dynamic-import","original":"./guard/cross-session.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:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:url","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"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:readline","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: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: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: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: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:child_process","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:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","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:path","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:path","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: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:os","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/promises","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:readline","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: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":"smol-toml","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:module","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:module","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}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/conventions-cache.ts":{"bytesInOutput":3358},"src/device-id.ts":{"bytesInOutput":2542},"src/version.ts":{"bytesInOutput":127},"src/project-key.ts":{"bytesInOutput":1456},"src/install/bridge-entry.ts":{"bytesInOutput":1893},"src/install/atomic-write.ts":{"bytesInOutput":1854},"src/install/hook-wiring.ts":{"bytesInOutput":10349},"src/install/hook-merge.ts":{"bytesInOutput":6940},"src/bridge-config.ts":{"bytesInOutput":1485},"../../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/hooks.js":{"bytesInOutput":2980},"../../packages/code-index/build/repo-health/divergence.js":{"bytesInOutput":13930},"../../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":366},"src/presence.ts":{"bytesInOutput":7606},"src/presence-snapshot.ts":{"bytesInOutput":3751},"../../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":9943},"../../packages/claude-code-telemetry/dist/ingest.js":{"bytesInOutput":373},"../../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/edit-guard.ts":{"bytesInOutput":5392},"src/hooks/hook-input.ts":{"bytesInOutput":1142},"src/hooks/payloads.ts":{"bytesInOutput":459},"src/hooks/state.ts":{"bytesInOutput":1771},"src/hooks/index.ts":{"bytesInOutput":17945},"src/session-end/connection.ts":{"bytesInOutput":436},"src/session-end/index.ts":{"bytesInOutput":3247},"src/guard/config.ts":{"bytesInOutput":923},"src/guard/install.ts":{"bytesInOutput":2540},"src/guard/session-file.ts":{"bytesInOutput":1816},"src/guard/log.ts":{"bytesInOutput":1698},"src/guard/cli.ts":{"bytesInOutput":4995},"src/guard/mcp-client.ts":{"bytesInOutput":4036},"src/guard/inject.ts":{"bytesInOutput":5130},"src/guard/gate.ts":{"bytesInOutput":4234},"src/guard/stop.ts":{"bytesInOutput":1867},"src/gateway/frames.ts":{"bytesInOutput":1775},"src/gateway/attest.ts":{"bytesInOutput":3940},"src/gateway/config.ts":{"bytesInOutput":1418},"src/gateway/policy.ts":{"bytesInOutput":2895},"src/gateway/policy-cache.ts":{"bytesInOutput":1604},"src/gateway/policy-fetch.ts":{"bytesInOutput":1062},"src/gateway/wrap.ts":{"bytesInOutput":2470},"src/gateway/install.ts":{"bytesInOutput":5148},"src/gateway/policy-cli.ts":{"bytesInOutput":4396},"src/gateway/run.ts":{"bytesInOutput":6688},"src/guard/cross-session.ts":{"bytesInOutput":5722},"src/index.ts":{"bytesInOutput":10713},"src/forward.ts":{"bytesInOutput":18440},"src/client-detect.ts":{"bytesInOutput":2068},"src/auth.ts":{"bytesInOutput":5084},"src/install/index.ts":{"bytesInOutput":6304},"src/install/flags.ts":{"bytesInOutput":5309},"src/install/report.ts":{"bytesInOutput":3096},"src/install/project-root.ts":{"bytesInOutput":2188},"src/install/client-targets.ts":{"bytesInOutput":3244},"src/install/json-merge.ts":{"bytesInOutput":3790},"src/install/toml-merge.ts":{"bytesInOutput":3550},"src/install/preamble.ts":{"bytesInOutput":2835},"../../packages/integration-snippets/build/index.js":{"bytesInOutput":27539},"src/install/working-paths-consent.ts":{"bytesInOutput":3412},"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":1704},"../../packages/code-index/build/node.js":{"bytesInOutput":548},"../../packages/code-index/build/parse/tree-sitter/parser.js":{"bytesInOutput":2072},"../../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/sqlite-driver.js":{"bytesInOutput":2915},"../../packages/code-index/build/store/node-sqlite.js":{"bytesInOutput":9844},"../../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":24551},"src/local-tools/router.ts":{"bytesInOutput":3929},"src/functions-origin.ts":{"bytesInOutput":259},"src/metrics-post.ts":{"bytesInOutput":1285},"src/working-paths.ts":{"bytesInOutput":1317}},"bytes":394345}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maind-dev/mcp-bridge",
3
- "version": "0.31.0",
3
+ "version": "0.34.0",
4
4
  "description": "Local MCP bridge for maind.dev \u2014 wraps any MCP-compatible client (Claude Code, Cursor, Windsurf) and pins your API key to a single device via the maind device authorization flow.",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",