@maind-dev/mcp-bridge 0.55.0 → 0.56.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 +3 -3
- package/build/meta.json +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var vo=Object.defineProperty;var s=(e,t)=>vo(e,"name",{value:t,configurable:!0})
|
|
|
3
3
|
|
|
4
4
|
${i}`};return JSON.stringify({jsonrpc:"2.0",id:e,result:o})}function np(e,t){return`NOTE (MAIND cache fallback): the MAIND MCP server was unreachable, so these project conventions were served from a local snapshot taken ${rp(e,t)}. They may be stale, and MAIND tools are unavailable until the server is reachable again.`}function rp(e,t){let n=Date.parse(e);if(Number.isNaN(n))return"at an unknown time";let r=t.getTime()-n,i=Math.floor(r/6e4);if(i<1)return"just now";if(i<60)return`${i} minute${i===1?"":"s"} ago`;let o=Math.floor(i/60);if(o<24)return`${o} hour${o===1?"":"s"} ago`;let a=Math.floor(o/24);return`${a} day${a===1?"":"s"} ago`}var _r,tp,je=b(()=>{"use strict";_r=1,tp=Io(".maind","conventions-cache.json");s(oe,"resolveRepoRoot");s(Qt,"keyFingerprint");s(Zt,"cachePath");s(No,"hasInstructions");s(Co,"writeConventionsCache");s(Po,"readConventionsCache");s(Do,"buildCachedInitializeResponse");s(np,"fallbackMarker");s(rp,"relativeAge")});import{existsSync as on,mkdirSync as hp,readFileSync as Oo,writeFileSync as Sr,chmodSync as Mo}from"node:fs";import{homedir as gp,hostname as yp,platform as vr,release as wp}from"node:os";import{randomUUID as bp}from"node:crypto";import{join as ke}from"node:path";function gt(){let e=gp(),t=process.env;if(vr()==="darwin")return ke(e,"Library","Application Support","maind");if(vr()==="win32"){let r=t.APPDATA&&t.APPDATA.length>0?t.APPDATA:ke(e,"AppData","Roaming");return ke(r,"maind")}let n=t.XDG_CONFIG_HOME&&t.XDG_CONFIG_HOME.length>0?t.XDG_CONFIG_HOME:ke(e,".config");return ke(n,"maind")}function Fo(e){on(e)||hp(e,{recursive:!0,mode:448})}function j(){let e=gt();Fo(e);let t=ke(e,_p);if(on(t)){let r=Oo(t,"utf8").trim();if(Sp(r))return r}let n=bp();Sr(t,n+`
|
|
5
5
|
`,{encoding:"utf8",mode:384});try{Mo(t,384)}catch{}return n}function Sp(e){return vp.test(e)}function Er(){return ke(gt(),kp)}function ve(e){let t=gt();Fo(t);let n=Er();Sr(n,e+`
|
|
6
|
-
`,{encoding:"utf8",mode:384});try{Mo(n,384)}catch{}}function C(){let e=Er();if(!on(e))return null;let t=Oo(e,"utf8").trim();return t.length>0?t:null}function yt(){let e=Er();on(e)&&Sr(e,"",{encoding:"utf8",mode:384})}function $o(){try{return`mcp-bridge-${yp()}`}catch{return"mcp-bridge"}}function sn(e){return{os:`${vr()} ${wp()}`,ide:"mcp-bridge",ext_version:e,device_id:j()}}var _p,kp,vp,K=b(()=>{"use strict";s(gt,"configDir");s(Fo,"ensureDir");_p="device-id",kp="api-key";s(j,"ensureDeviceId");vp=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;s(Sp,"isUuid");s(Er,"apiKeyPath");s(ve,"writeApiKey");s(C,"readApiKey");s(yt,"clearApiKey");s($o,"bridgeLabel");s(sn,"clientMeta")});var P,Se=b(()=>{"use strict";P="0.55.0"});import{execFileSync as Pp}from"node:child_process";import{createHash as Dp}from"node:crypto";function Op(e){return Dp("sha256").update(e).digest("hex")}function Mp(e){let t=e.trim();if(!t)return null;let n=/^[a-z][a-z0-9+.-]*:\/\//i.exec(t);if(n)t=t.slice(n[0].length),t=t.replace(/^[^@/]+@/,""),t=t.replace(/^([^/:]+):\d+(?=\/)/,"$1");else{t=t.replace(/^[^@/]+@/,"");let r=t.indexOf(":");r>=0&&(t=`${t.slice(0,r)}/${t.slice(r+1)}`)}return t=t.replace(/\.git$/i,"").replace(/\/+$/,"").toLowerCase(),t.length>0?t:null}function Fp(e){let t=Mp(e);return t?Op(t):null}function F(){let e=process.env.MAIND_PROJECT_KEY?.trim().toLowerCase();if(e&&$p.test(e))return e;let t;try{t=Pp("git",["config","--get","remote.origin.url"],{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:5e3}).trim()}catch{return null}return t?Fp(t):null}var $p,fe=b(()=>{"use strict";s(Op,"sha256Hex");s(Mp,"normalizeRemoteUrl");s(Fp,"projectKeyFromRemote");$p=/^[a-f0-9]{64}$/;s(F,"computeProjectKey")});import jp from"node:path";import{fileURLToPath as Hp}from"node:url";function Up(e,t=jp.sep){return e.split(t).includes("_npx")}function Q(e){let t=e.extraArgs??[],n=s(r=>({command:"npx",args:["-y",Jo,...t],env:{},fallbackReason:r}),"npx");return e.entryPath===null?n("bridge entry path could not be resolved"):Up(e.entryPath,e.sep)?n("bridge is running from the npx cache (install it globally to pin a path)"):e.nodePath?{command:e.nodePath,args:[e.entryPath,...t],env:e.isElectron?{ELECTRON_RUN_AS_NODE:"1"}:{},fallbackReason:null}:n("node executable path unavailable")}function Z(){try{let e=Hp(import.meta.url);return e.endsWith(".js")?e:null}catch{return null}}function Ue(e){let t=Object.entries(e.env).map(([n,r])=>`${n}=${qo(r)}`);return[...t,e.command,...e.args].map((n,r)=>r<t.length?n:qo(n)).join(" ")}function cn(e){return/(^|\s)npx(\s|$)/.test(e)&&e.includes(Jo)}function ln(e){return/(^|[\s/])maind-hook(\s|$)/.test(e)?!0:/claude-code-hook[/\\]build[/\\]/.test(e)}function qo(e){return/^[A-Za-z0-9_@%+=:,./-]+$/.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`}var Jo,Ke=b(()=>{"use strict";Jo="@maind-dev/mcp-bridge";s(Up,"isEphemeralEntry");s(Q,"resolveBridgeLaunch");s(Z,"currentBridgeEntry");s(Ue,"launchToShellCommand");s(cn,"isNpxForm");s(ln,"isLegacyHookForm");s(qo,"shellQuote")});import*as D from"node:fs/promises";import*as dn from"node:path";async function H(e){try{return await D.readFile(e,"utf8")}catch(t){if(Gp(t))return null;throw t}}async function xr(e){await D.mkdir(e,{recursive:!0})}async function O(e,t,n){let r=dn.dirname(e);await xr(r);let i=dn.join(r,`.maind-install-${process.pid}-${Date.now()}.tmp`);await D.writeFile(i,t,{encoding:"utf8",mode:n});try{await D.rename(i,e)}catch(o){if(Bp(o))try{await D.copyFile(i,e),await D.unlink(i).catch(()=>{}),n!==void 0&&await D.chmod(e,n).catch(()=>{});return}catch(a){throw await D.unlink(i).catch(()=>{}),a}throw await D.unlink(i).catch(()=>{}),o}}async function es(e,t){let n=await H(e);return n===null?!1:n.split(/\r?\n/).some(i=>i.startsWith(t))}function Gp(e){return ts(e)&&e.code==="ENOENT"}function Bp(e){return!ts(e)||process.platform!=="win32"?!1:e.code==="EEXIST"||e.code==="EPERM"||e.code==="EACCES"}function ts(e){return typeof e=="object"&&e!==null&&"code"in e}var se=b(()=>{"use strict";s(H,"readFileSafe");s(xr,"ensureDir");s(O,"atomicWriteFile");s(es,"hasLinePrefix");s(Gp,"isNoEnt");s(Bp,"isWindowsRenameFailure");s(ts,"isNodeError")});import{existsSync as cf}from"node:fs";import*as as from"node:path";function kt(e,t={},n=Ir){let r=t.fileExists??cf,i=t.expectedCommand??lf,o={};if(e!==null&&e.trim().length>0)try{let a=JSON.parse(e);Ar(a)&&(o=a)}catch{}return n.map(a=>{let c={event:a.event,subcommand:a.subcommand},d=df(o,a.event,a.subcommand);if(d===null)return{...c,status:"missing",command:null,remedy:"run-install",detail:`${a.label} is not wired \u2014 this bridge can run '${a.subcommand}', but nothing calls it.`};let u=` Replace its command with: ${i(a.subcommand)}`;if(ln(d))return{...c,status:"legacy",command:d,remedy:"edit-command",detail:`${a.label} still runs the retired @maind/claude-code-hook, which was folded into the bridge and is not published.`+u};if(cn(d))return{...c,status:"npx",command:d,remedy:"edit-command",detail:`${a.label} runs through 'npx' \u2014 PATH and npm's per-Node-version globals decide which bridge that is.`+u};let l=uf(d);return l!==null&&!r(l)?{...c,status:"broken",command:d,remedy:"edit-command",detail:`${a.label} points at ${l}, which does not exist \u2014 the hook fails silently on every run.`+u}:{...c,status:"ok",command:d,remedy:"none",detail:`${a.label} is wired.`}})}function Nr(e){return e.some(t=>t.status!=="ok")}function fn(e){return e.some(t=>t.remedy==="run-install")}function lf(e){return Ue(Q({entryPath:Z(),nodePath:process.execPath,extraArgs:[e],isElectron:process.versions.electron!==void 0}))}function df(e,t,n){let r=e.hooks?.[t];if(!Array.isArray(r))return null;for(let i of r){if(!Ar(i))continue;let o=i.hooks;if(Array.isArray(o))for(let a of o){if(!Ar(a))continue;let c=a.command;if(typeof c=="string"&&c.includes(n))return c}}return null}function uf(e){for(let t of pf(e))if(t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs"))return as.isAbsolute(t)?t:null;return null}function pf(e){let t=[],n="",r=!1;for(let i of e){if(i==="'"){r=!r;continue}if(!r&&/\s/.test(i)){n.length>0&&t.push(n),n="";continue}n+=i}return n.length>0&&t.push(n),t}function Ar(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Ir,pn,vt=b(()=>{"use strict";Ke();Ir=[{event:"SessionStart",subcommand:"on-session-start",label:"SessionStart hook",timeout:5,consentDescription:"It runs 'maind-mcp-bridge on-session-start' \u2014 opens a tracked session so duration and tool-call counts can be measured. Writes only to ~/.maind/state.json; nothing leaves the machine here."},{event:"PreToolUse",subcommand:"on-tool-use",label:"PreToolUse hook",timeout:5,consentDescription:"It runs 'maind-mcp-bridge on-tool-use' before every tool call \u2014 counts calls, and warns you on stderr when the session's token usage crosses your handoff thresholds (ADR-039). Only the tool NAME is read, never its arguments."},{event:"PreToolUse",subcommand:"on-file-write",label:"PreToolUse write-guard hook",timeout:5,matcher:"Write",consentDescription:"It runs 'maind-mcp-bridge on-file-write' before the Write tool creates a file, and before that tool only. It reads the target file PATH \u2014 never the file's contents, never any other tool's arguments \u2014 to check whether a numbered filename (ADR-262-\u2026, 0001-\u2026, RFC-12-\u2026) would claim a number a sibling branch or worktree already holds, and blocks that one Write while naming the next free number (ADR-263). Runs entirely on this machine (git + fs); nothing is uploaded. This is a SEPARATE hook from on-tool-use precisely because it reads an argument, which that one promises not to."},{event:"PreToolUse",subcommand:"on-file-edit",label:"PreToolUse edit-guard hook",timeout:5,matcher:"Edit|Write",consentDescription:"It runs 'maind-mcp-bridge on-file-edit' before the Edit and Write tools, and before those only. It reads the target file PATH \u2014 never the file's contents \u2014 and compares it LOCALLY against the cached peer view from this machine's own presence announces (~/.maind/presence/): when another of your sessions holds a claim or works on the same directory, it INFORMS the agent with who/where/how-fresh. The path never leaves the machine; the hook never blocks a tool call (advisory only, ADR-277). This is a SEPARATE hook from on-file-write because that one's consent covers Write alone and may deny; this one covers Edit+Write and never does."},{event:"PreToolUse",subcommand:"on-repo-health",label:"PreToolUse repo-health hook",timeout:10,matcher:"Edit|Write",consentDescription:"It runs 'maind-mcp-bridge on-repo-health' before the Edit and Write tools, and before those only \u2014 at most ONCE per session and repository, not on every call. It reads the target file PATH (never the file's contents) to find which repository you are editing, then inspects THAT repository with git and the filesystem: is a machine-local tooling file present in the main checkout but missing in this worktree, were dependencies never installed here, is a build older than its source, are you mid-rebase, on a detached HEAD, editing the shared base tree, or are checked-in git hooks not actually wired? Everything stays on this machine; no network call, and no file contents are read or stored. It only ever adds a note for the model and NEVER blocks a tool call. Separately consented from the other Edit/Write hooks because it inspects the repository, not just the path."},{event:"PostToolUse",subcommand:"on-write-health",label:"PostToolUse write-health hook",timeout:10,matcher:"Edit|Write",consentDescription:"It runs 'maind-mcp-bridge on-write-health' AFTER the Edit and Write tools, and after those only. It reads the target file PATH to decide which checks that path makes relevant, and then \u2014 this is the wider promise, which is why it is consented separately \u2014 READS THE REPOSITORY'S TRACKED SOURCE FILES FROM DISK to run them: is a registry still consistent with the design artefact it implements (only if this repo declares such a contract in .maind/spec-contracts.json), does a Tailwind class point at a theme token that does not exist (only if this repo declares theme tokens), does a new Supabase migration leave default grants in place (only if this repo has migrations). A repository without those things stays silent. File contents are read, parsed and discarded; nothing is stored and nothing is uploaded. Each finding is reported to the model at most ONCE per session, only for findings THIS branch introduces, and the hook can never block or undo an edit \u2014 PostToolUse fires after the tool has already run."},{event:"Stop",subcommand:"on-session-end",label:"Stop hook",timeout:10,consentDescription:"It runs 'maind-mcp-bridge on-session-end' \u2014 derives session communication analytics (momentum + reactions) from the transcript at session end, and flushes the session's Tier-3 counters. Gated by Tier-3 consent server-side."},{event:"Stop",subcommand:"on-index-refresh",label:"Stop index-refresh hook",timeout:5,consentDescription:"It runs 'maind-mcp-bridge on-index-refresh' at the end of a turn, and refreshes this repository's local code index so codebase search, trace, map, history and review answer from the current tree instead of a stale snapshot. This one READS YOUR SOURCE FILES \u2014 the ones git reports as changed \u2014 parses them, and writes symbol names and line spans to .maind/code-index.sqlite inside the repository. That is a wider promise than the other hooks make, which is why it is consented separately. Everything stays on this machine; nothing is uploaded, and no file contents are stored. It returns immediately (the work runs detached), holds one run per repository at a time, and only refreshes an index that already exists \u2014 the first build stays an explicit 'codebase_index' call."}],pn=[{event:"SessionStart",subcommand:"guard-inject",label:"Guard inject hook",timeout:10,consentDescription:"It runs 'maind-mcp-bridge guard-inject' when a session starts (ADR-284 guard). UNLIKE every other hook, this one talks to the maind server: it fetches your session briefing from mcp.maind.dev \u2014 sending your API key, device id, project key, and the client family 'claude-code'; never file contents, never paths \u2014 and injects the result into the session context, so the briefing no longer depends on the model remembering to ask. Cache-first (~12h), so most session starts add no network call. Inactive (exit 0, no output) while guard mode is off."},{event:"PreToolUse",subcommand:"guard-gate",label:"Guard gate hook",timeout:5,matcher:"Edit|Write",consentDescription:"It runs 'maind-mcp-bridge guard-gate' before the Edit and Write tools, and before those only. It reads the tool NAME and the session id \u2014 never the tool's arguments, never file contents \u2014 and checks LOCALLY whether this session has been briefed (injection or a maind consultation call). Warn mode (default) adds one reminder line for the model and never blocks; block mode (explicit opt-in via 'guard mode block') may DENY an un-briefed edit, naming the reason and a logged override command. Inactive while guard mode is off."},{event:"Stop",subcommand:"guard-stop",label:"Guard stop hook",timeout:5,consentDescription:"It runs 'maind-mcp-bridge guard-stop' when the session tries to finish. Only with the strict stop-gate enabled ('guard_stop_gate': true \u2014 off by default) and edits made without a review_changes run, it blocks the FIRST stop attempt with a reason so the review can happen; it never blocks twice. Reads only local state; nothing leaves the machine. Inactive while guard mode is off."},{event:"PostToolUse",subcommand:"guard-cross-observe",label:"Guard cross-session observe hook",timeout:5,matcher:"Read|Edit|Write",consentDescription:"It runs 'maind-mcp-bridge guard-cross-observe' after the Read, Edit and Write tools, and after those only. It reads the target file PATH \u2014 never the file's contents \u2014 stats its modification time, and records it as this session's baseline in ~/.maind/cross-session/ (local file, TTL-pruned). That baseline is what lets the check hook detect when a parallel session, an editor, or git changes a file under you. Nothing leaves the machine. Inactive while guard mode is off."},{event:"PreToolUse",subcommand:"guard-cross-check",label:"Guard cross-session check hook",timeout:5,matcher:"Edit|Write",consentDescription:"It runs 'maind-mcp-bridge guard-cross-check' before the Edit and Write tools, and before those only. It reads the target file PATH \u2014 never the file's contents \u2014 and compares the file's current modification time against the baseline this session last observed. If the file changed outside the session (parallel session, editor, git checkout/pull), warn mode adds one advisory telling the model to re-read and reconcile; block mode ('guard mode block') DENIES that one edit with the same instruction. Runs entirely on this machine. Inactive while guard mode is off."}];s(kt,"inspectHookWiring");s(Nr,"hasWiringDrift");s(fn,"needsInstallRun");s(lf,"defaultExpectedCommand");s(df,"findCommand");s(uf,"extractScriptPath");s(pf,"tokenize");s(Ar,"isObject")});import*as Dr from"node:path";import*as ls from"node:readline";async function ds(e,t){let n=Dr.join(e.homeDir,".claude","settings.json"),r=t.targetKey;if(e.skip)return{target:r,action:"skip",status:"skipped",detail:"--no-hook"};let i;try{i=await H(n)}catch(f){return{target:r,action:"merge",status:"failed",detail:`read: ${Cr(f)}`}}let o,a="create";if(i===null||i.trim().length===0)o={};else{a="merge";try{let f=JSON.parse(i);if(!Pr(f))return{target:r,action:"merge",status:"failed",detail:"existing settings.json is not a JSON object"};o=f}catch(f){return{target:r,action:"merge",status:"failed",detail:`parse: ${Cr(f)}`}}}let c=mf(o,t.event,t.matchPattern);if(c!==null)return{target:r,action:"skip",status:"skipped",detail:t.skipDetail(c)};if(!e.full){if(!e.isInteractive)return{target:r,action:"skip",status:"skipped",detail:"consent-required: pass --full to write the hook non-interactively"};if(e.dryRun)return{target:r,action:"merge",status:a==="create"?"would-create":"would-merge",detail:`${n} (would prompt for consent in real run)`};if(!await hf(e.out,`
|
|
6
|
+
`,{encoding:"utf8",mode:384});try{Mo(n,384)}catch{}}function C(){let e=Er();if(!on(e))return null;let t=Oo(e,"utf8").trim();return t.length>0?t:null}function yt(){let e=Er();on(e)&&Sr(e,"",{encoding:"utf8",mode:384})}function $o(){try{return`mcp-bridge-${yp()}`}catch{return"mcp-bridge"}}function sn(e){return{os:`${vr()} ${wp()}`,ide:"mcp-bridge",ext_version:e,device_id:j()}}var _p,kp,vp,K=b(()=>{"use strict";s(gt,"configDir");s(Fo,"ensureDir");_p="device-id",kp="api-key";s(j,"ensureDeviceId");vp=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;s(Sp,"isUuid");s(Er,"apiKeyPath");s(ve,"writeApiKey");s(C,"readApiKey");s(yt,"clearApiKey");s($o,"bridgeLabel");s(sn,"clientMeta")});var P,Se=b(()=>{"use strict";P="0.56.0"});import{execFileSync as Pp}from"node:child_process";import{createHash as Dp}from"node:crypto";function Op(e){return Dp("sha256").update(e).digest("hex")}function Mp(e){let t=e.trim();if(!t)return null;let n=/^[a-z][a-z0-9+.-]*:\/\//i.exec(t);if(n)t=t.slice(n[0].length),t=t.replace(/^[^@/]+@/,""),t=t.replace(/^([^/:]+):\d+(?=\/)/,"$1");else{t=t.replace(/^[^@/]+@/,"");let r=t.indexOf(":");r>=0&&(t=`${t.slice(0,r)}/${t.slice(r+1)}`)}return t=t.replace(/\.git$/i,"").replace(/\/+$/,"").toLowerCase(),t.length>0?t:null}function Fp(e){let t=Mp(e);return t?Op(t):null}function F(){let e=process.env.MAIND_PROJECT_KEY?.trim().toLowerCase();if(e&&$p.test(e))return e;let t;try{t=Pp("git",["config","--get","remote.origin.url"],{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:5e3}).trim()}catch{return null}return t?Fp(t):null}var $p,fe=b(()=>{"use strict";s(Op,"sha256Hex");s(Mp,"normalizeRemoteUrl");s(Fp,"projectKeyFromRemote");$p=/^[a-f0-9]{64}$/;s(F,"computeProjectKey")});import jp from"node:path";import{fileURLToPath as Hp}from"node:url";function Up(e,t=jp.sep){return e.split(t).includes("_npx")}function Q(e){let t=e.extraArgs??[],n=s(r=>({command:"npx",args:["-y",Jo,...t],env:{},fallbackReason:r}),"npx");return e.entryPath===null?n("bridge entry path could not be resolved"):Up(e.entryPath,e.sep)?n("bridge is running from the npx cache (install it globally to pin a path)"):e.nodePath?{command:e.nodePath,args:[e.entryPath,...t],env:e.isElectron?{ELECTRON_RUN_AS_NODE:"1"}:{},fallbackReason:null}:n("node executable path unavailable")}function Z(){try{let e=Hp(import.meta.url);return e.endsWith(".js")?e:null}catch{return null}}function Ue(e){let t=Object.entries(e.env).map(([n,r])=>`${n}=${qo(r)}`);return[...t,e.command,...e.args].map((n,r)=>r<t.length?n:qo(n)).join(" ")}function cn(e){return/(^|\s)npx(\s|$)/.test(e)&&e.includes(Jo)}function ln(e){return/(^|[\s/])maind-hook(\s|$)/.test(e)?!0:/claude-code-hook[/\\]build[/\\]/.test(e)}function qo(e){return/^[A-Za-z0-9_@%+=:,./-]+$/.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`}var Jo,Ke=b(()=>{"use strict";Jo="@maind-dev/mcp-bridge";s(Up,"isEphemeralEntry");s(Q,"resolveBridgeLaunch");s(Z,"currentBridgeEntry");s(Ue,"launchToShellCommand");s(cn,"isNpxForm");s(ln,"isLegacyHookForm");s(qo,"shellQuote")});import*as D from"node:fs/promises";import*as dn from"node:path";async function H(e){try{return await D.readFile(e,"utf8")}catch(t){if(Gp(t))return null;throw t}}async function xr(e){await D.mkdir(e,{recursive:!0})}async function O(e,t,n){let r=dn.dirname(e);await xr(r);let i=dn.join(r,`.maind-install-${process.pid}-${Date.now()}.tmp`);await D.writeFile(i,t,{encoding:"utf8",mode:n});try{await D.rename(i,e)}catch(o){if(Bp(o))try{await D.copyFile(i,e),await D.unlink(i).catch(()=>{}),n!==void 0&&await D.chmod(e,n).catch(()=>{});return}catch(a){throw await D.unlink(i).catch(()=>{}),a}throw await D.unlink(i).catch(()=>{}),o}}async function es(e,t){let n=await H(e);return n===null?!1:n.split(/\r?\n/).some(i=>i.startsWith(t))}function Gp(e){return ts(e)&&e.code==="ENOENT"}function Bp(e){return!ts(e)||process.platform!=="win32"?!1:e.code==="EEXIST"||e.code==="EPERM"||e.code==="EACCES"}function ts(e){return typeof e=="object"&&e!==null&&"code"in e}var se=b(()=>{"use strict";s(H,"readFileSafe");s(xr,"ensureDir");s(O,"atomicWriteFile");s(es,"hasLinePrefix");s(Gp,"isNoEnt");s(Bp,"isWindowsRenameFailure");s(ts,"isNodeError")});import{existsSync as cf}from"node:fs";import*as as from"node:path";function kt(e,t={},n=Ir){let r=t.fileExists??cf,i=t.expectedCommand??lf,o={};if(e!==null&&e.trim().length>0)try{let a=JSON.parse(e);Ar(a)&&(o=a)}catch{}return n.map(a=>{let c={event:a.event,subcommand:a.subcommand},d=df(o,a.event,a.subcommand);if(d===null)return{...c,status:"missing",command:null,remedy:"run-install",detail:`${a.label} is not wired \u2014 this bridge can run '${a.subcommand}', but nothing calls it.`};let u=` Replace its command with: ${i(a.subcommand)}`;if(ln(d))return{...c,status:"legacy",command:d,remedy:"edit-command",detail:`${a.label} still runs the retired @maind/claude-code-hook, which was folded into the bridge and is not published.`+u};if(cn(d))return{...c,status:"npx",command:d,remedy:"edit-command",detail:`${a.label} runs through 'npx' \u2014 PATH and npm's per-Node-version globals decide which bridge that is.`+u};let l=uf(d);return l!==null&&!r(l)?{...c,status:"broken",command:d,remedy:"edit-command",detail:`${a.label} points at ${l}, which does not exist \u2014 the hook fails silently on every run.`+u}:{...c,status:"ok",command:d,remedy:"none",detail:`${a.label} is wired.`}})}function Nr(e){return e.some(t=>t.status!=="ok")}function fn(e){return e.some(t=>t.remedy==="run-install")}function lf(e){return Ue(Q({entryPath:Z(),nodePath:process.execPath,extraArgs:[e],isElectron:process.versions.electron!==void 0}))}function df(e,t,n){let r=e.hooks?.[t];if(!Array.isArray(r))return null;for(let i of r){if(!Ar(i))continue;let o=i.hooks;if(Array.isArray(o))for(let a of o){if(!Ar(a))continue;let c=a.command;if(typeof c=="string"&&c.includes(n))return c}}return null}function uf(e){for(let t of pf(e))if(t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs"))return as.isAbsolute(t)?t:null;return null}function pf(e){let t=[],n="",r=!1;for(let i of e){if(i==="'"){r=!r;continue}if(!r&&/\s/.test(i)){n.length>0&&t.push(n),n="";continue}n+=i}return n.length>0&&t.push(n),t}function Ar(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Ir,pn,vt=b(()=>{"use strict";Ke();Ir=[{event:"SessionStart",subcommand:"on-session-start",label:"SessionStart hook",timeout:5,consentDescription:"It runs 'maind-mcp-bridge on-session-start' \u2014 opens a tracked session so duration and tool-call counts can be measured. Writes only to ~/.maind/state.json; nothing leaves the machine here."},{event:"PreToolUse",subcommand:"on-tool-use",label:"PreToolUse hook",timeout:5,consentDescription:"It runs 'maind-mcp-bridge on-tool-use' before every tool call \u2014 counts calls, and warns you on stderr when the session's token usage crosses your handoff thresholds (ADR-039). Only the tool NAME is read, never its arguments."},{event:"PreToolUse",subcommand:"on-file-write",label:"PreToolUse write-guard hook",timeout:5,matcher:"Write",consentDescription:"It runs 'maind-mcp-bridge on-file-write' before the Write tool creates a file, and before that tool only. It reads the target file PATH \u2014 never the file's contents, never any other tool's arguments \u2014 to check whether a numbered filename (ADR-262-\u2026, 0001-\u2026, RFC-12-\u2026) would claim a number a sibling branch or worktree already holds, and blocks that one Write while naming the next free number (ADR-263). Runs entirely on this machine (git + fs); nothing is uploaded. This is a SEPARATE hook from on-tool-use precisely because it reads an argument, which that one promises not to."},{event:"PreToolUse",subcommand:"on-file-edit",label:"PreToolUse edit-guard hook",timeout:5,matcher:"Edit|Write",consentDescription:"It runs 'maind-mcp-bridge on-file-edit' before the Edit and Write tools, and before those only. It reads the target file PATH \u2014 never the file's contents \u2014 and compares it LOCALLY against the cached peer view from this machine's own presence announces (~/.maind/presence/): when another of your sessions holds a claim or works on the same directory, it INFORMS the agent with who/where/how-fresh. The path never leaves the machine; the hook never blocks a tool call (advisory only, ADR-277). This is a SEPARATE hook from on-file-write because that one's consent covers Write alone and may deny; this one covers Edit+Write and never does."},{event:"PreToolUse",subcommand:"on-repo-health",label:"PreToolUse repo-health hook",timeout:10,matcher:"Edit|Write",consentDescription:"It runs 'maind-mcp-bridge on-repo-health' before the Edit and Write tools, and before those only \u2014 at most ONCE per session and repository, not on every call. It reads the target file PATH (never the file's contents) to find which repository you are editing, then inspects THAT repository with git and the filesystem: is a machine-local tooling file present in the main checkout but missing in this worktree, were dependencies never installed here, is a build older than its source, are you mid-rebase, on a detached HEAD, editing the shared base tree, or are checked-in git hooks not actually wired? Everything stays on this machine; no network call, and no file contents are read or stored. It only ever adds a note for the model and NEVER blocks a tool call. Separately consented from the other Edit/Write hooks because it inspects the repository, not just the path."},{event:"PostToolUse",subcommand:"on-write-health",label:"PostToolUse write-health hook",timeout:10,matcher:"Edit|Write",consentDescription:"It runs 'maind-mcp-bridge on-write-health' AFTER the Edit and Write tools, and after those only. It reads the target file PATH to decide which checks that path makes relevant, and then \u2014 this is the wider promise, which is why it is consented separately \u2014 READS THE REPOSITORY'S TRACKED SOURCE FILES FROM DISK to run them: is a registry still consistent with the design artefact it implements (only if this repo declares such a contract in .maind/spec-contracts.json), does a Tailwind class point at a theme token that does not exist (only if this repo declares theme tokens), does a new Supabase migration leave default grants in place (only if this repo has migrations). A repository without those things stays silent. File contents are read, parsed and discarded; nothing is stored and nothing is uploaded. Each finding is reported to the model at most ONCE per session, only for findings THIS branch introduces, and the hook can never block or undo an edit \u2014 PostToolUse fires after the tool has already run."},{event:"Stop",subcommand:"on-session-end",label:"Stop hook",timeout:10,consentDescription:"It runs 'maind-mcp-bridge on-session-end' \u2014 derives session communication analytics (momentum + reactions) from the transcript at session end, and flushes the session's Tier-3 counters. Gated by Tier-3 consent server-side."},{event:"Stop",subcommand:"on-index-refresh",label:"Stop index-refresh hook",timeout:5,consentDescription:"It runs 'maind-mcp-bridge on-index-refresh' at the end of a turn, and refreshes this repository's local code index so codebase search, trace, map, history and review answer from the current tree instead of a stale snapshot. This one READS YOUR SOURCE FILES \u2014 the ones git reports as changed \u2014 parses them, and writes symbol names and line spans to .maind/code-index.sqlite inside the repository. That is a wider promise than the other hooks make, which is why it is consented separately. Everything stays on this machine; nothing is uploaded, and no file contents are stored. It returns immediately (the work runs detached), holds one run per repository at a time, and only refreshes an index that already exists \u2014 the first build stays an explicit 'codebase_index' call."}],pn=[{event:"SessionStart",subcommand:"guard-inject",label:"Guard inject hook",timeout:10,consentDescription:"It runs 'maind-mcp-bridge guard-inject' when a session starts (ADR-284 guard). UNLIKE every other hook, this one talks to the maind server: it fetches your session briefing from mcp.maind.dev \u2014 sending your API key, device id, project key, and the client family 'claude-code'; never file contents, never paths \u2014 and injects the result into the session context, so the briefing no longer depends on the model remembering to ask. Cache-first (~12h), so most session starts add no network call. Inactive (exit 0, no output) while guard mode is off."},{event:"PreToolUse",subcommand:"guard-gate",label:"Guard gate hook",timeout:5,matcher:"Edit|Write",consentDescription:"It runs 'maind-mcp-bridge guard-gate' before the Edit and Write tools, and before those only. It reads the tool NAME and the session id \u2014 never the tool's arguments, never file contents \u2014 and checks LOCALLY whether this session has been briefed (injection or a maind consultation call). Warn mode (default) adds one reminder line for the model and never blocks; block mode (explicit opt-in via 'guard mode block') may DENY an un-briefed edit, naming the reason and a logged override command. Inactive while guard mode is off."},{event:"Stop",subcommand:"guard-stop",label:"Guard stop hook",timeout:5,consentDescription:"It runs 'maind-mcp-bridge guard-stop' when the session tries to finish. Only with the strict stop-gate enabled ('guard_stop_gate': true \u2014 off by default) and edits made without a review_changes run, it blocks the FIRST stop attempt with a reason so the review can happen; it never blocks twice. Reads only local state; nothing leaves the machine. Inactive while guard mode is off."},{event:"PostToolUse",subcommand:"guard-cross-observe",label:"Guard cross-session observe hook",timeout:5,matcher:"Read|Edit|Write",consentDescription:"It runs 'maind-mcp-bridge guard-cross-observe' after the Read, Edit and Write tools, and after those only. It reads the target file PATH \u2014 never the file's contents \u2014 stats its modification time, and records it as this session's baseline in ~/.maind/cross-session/ (local file, TTL-pruned). That baseline is what lets the check hook detect when a parallel session, an editor, or git changes a file under you. Nothing leaves the machine. Inactive while guard mode is off."},{event:"PreToolUse",subcommand:"guard-cross-check",label:"Guard cross-session check hook",timeout:5,matcher:"Edit|Write",consentDescription:"It runs 'maind-mcp-bridge guard-cross-check' before the Edit and Write tools, and before those only. It reads the target file PATH \u2014 never the file's contents \u2014 and compares the file's current modification time against the baseline this session last observed. If the file changed outside the session (parallel session, editor, git checkout/pull), warn mode adds one advisory telling the model to re-read and reconcile; block mode ('guard mode block') DENIES that one edit with the same instruction. Runs entirely on this machine. Inactive while guard mode is off."}];s(kt,"inspectHookWiring");s(Nr,"hasWiringDrift");s(fn,"needsInstallRun");s(lf,"defaultExpectedCommand");s(df,"findCommand");s(uf,"extractScriptPath");s(pf,"tokenize");s(Ar,"isObject")});import*as Dr from"node:path";import*as ls from"node:readline";async function ds(e,t){let n=Dr.join(e.homeDir,".claude","settings.json"),r=t.targetKey;if(e.skip)return{target:r,action:"skip",status:"skipped",detail:"--no-hook"};let i;try{i=await H(n)}catch(f){return{target:r,action:"merge",status:"failed",detail:`read: ${Cr(f)}`}}let o,a="create";if(i===null||i.trim().length===0)o={};else{a="merge";try{let f=JSON.parse(i);if(!Pr(f))return{target:r,action:"merge",status:"failed",detail:"existing settings.json is not a JSON object"};o=f}catch(f){return{target:r,action:"merge",status:"failed",detail:`parse: ${Cr(f)}`}}}let c=mf(o,t.event,t.matchPattern);if(c!==null)return{target:r,action:"skip",status:"skipped",detail:t.skipDetail(c)};if(!e.full){if(!e.isInteractive)return{target:r,action:"skip",status:"skipped",detail:"consent-required: pass --full to write the hook non-interactively"};if(e.dryRun)return{target:r,action:"merge",status:a==="create"?"would-create":"would-merge",detail:`${n} (would prompt for consent in real run)`};if(!await hf(e.out,`
|
|
7
7
|
Merge a ${t.event} hook into ${n}?
|
|
8
8
|
${t.consentDescription}
|
|
9
9
|
[Y/n]: `))return{target:r,action:"skip",status:"skipped",detail:"user declined"}}let d={...t.matcher===void 0?{}:{matcher:t.matcher},hooks:[{type:"command",command:t.command,timeout:t.timeout}]},u=o.hooks?.[t.event]??[],l={...o,hooks:{...o.hooks??{},[t.event]:[...u,d]}},p=JSON.stringify(l,null,2)+`
|
|
@@ -20,7 +20,7 @@ ${t.consentDescription}
|
|
|
20
20
|
`).map(n=>n.trim()).filter(n=>n.length>0&&!n.startsWith("#"))}catch{return[]}}function Dm(e){try{return Te(e).map(t=>x.join(x.dirname(t.dir),"config.toml"))}catch{return[]}}function Om(e){let t=_(e,["ls-files","-z","--",...vm]);if(t===null)return[];let n=new Map;for(let r of t.split("\0").filter(Boolean)){let i=wa[x.basename(r)];if(i===void 0)continue;let o=x.dirname(r);if(!Mm(e,o))continue;let a=o==="."?"node_modules":x.join(o,"node_modules");n.has(a)||n.set(a,{dir:a,install:i})}return[...n.values()]}function Mm(e,t){return t==="."?!0:Yr(e,t)}function Yr(e,t){if($(x.join(e,t,"pnpm-workspace.yaml")))return!0;try{let n=JSON.parse(ye(x.join(e,t,"package.json"),"utf8"));return typeof n=="object"&&n!==null&&n.workspaces!==void 0}catch{return!1}}async function ka(e,t={}){if(de(_(e,["rev-parse","--is-inside-work-tree"]))!=="true")return{isRepo:!1,branch:null,defaultBranch:null,upstream:null,headMatchesUpstream:null,remoteTrackingExists:null,ahead:null,behind:null,uncommitted:0,detachedHead:!1,inProgressOp:null,isSharedMainTree:!1,otherWorktrees:0,worktreeParity:null,toolCopyDrift:null,stalePackageBuilds:[],release:null,unmergedMigrations:[],hooks:null};let r=de(_(e,["rev-parse","--abbrev-ref","HEAD"])),i=r==="HEAD",o=i?null:r,a=Im(e),c=de(_(e,["rev-parse","--abbrev-ref","--symbolic-full-name","@{u}"])),d=null,u=null;if(c){let A=de(_(e,["rev-parse","HEAD"])),N=de(_(e,["rev-parse","@{u}"]));d=A!=null&&N!=null?A===N:null,u=_(e,["rev-parse","--verify","--quiet",`refs/remotes/${c}`])!==null}let l=null,p=null;if(a){let A=de(_(e,["rev-list","--left-right","--count",`origin/${a}...HEAD`]));if(A){let[N,T]=A.split(/\s+/).map(Y=>Number.parseInt(Y,10));Number.isFinite(N)&&(p=N),Number.isFinite(T)&&(l=T)}}let h=(_(e,["status","--porcelain"])??"").split(`
|
|
21
21
|
`).filter(A=>A.trim().length>0).length,m=Nm(e),g=de(_(e,["rev-parse","--show-toplevel"]))??e,w=Cm(_(e,["worktree","list","--porcelain"])??""),y=w[0]?.path??null,k=y!=null&&Xr(y,g),S=Math.max(0,w.length-1),v=null;if(y&&!Xr(y,g)){let A=s(T=>$(x.join(y,T))&&!$(x.join(g,T)),"here"),N=[...ya,...Dm(g),...Pm(g),...t.probePaths??[]];v={mainWorktreePath:y,currentWorktreePath:g,missing:[...new Set(N.filter(A))],missingDeps:Om(g).filter(T=>A(T.dir))}}let E=xm(g,e),R=t.includeRelease===!1?null:Km(e,o),U=[];return a&&(U=(_(e,["diff","--name-only","--diff-filter=A",`origin/${a}...HEAD`,"--","*supabase/migrations/*.sql"])??"").split(`
|
|
22
22
|
`).map(N=>N.trim()).filter(N=>N.length>0)),{isRepo:!0,branch:o,defaultBranch:a,upstream:c,headMatchesUpstream:d,remoteTrackingExists:u,ahead:l,behind:p,uncommitted:h,detachedHead:i,inProgressOp:m,isSharedMainTree:k,otherWorktrees:S,worktreeParity:v,toolCopyDrift:E,stalePackageBuilds:va(g),release:R,unmergedMigrations:U,hooks:Wr(e)}}function Xr(e,t){let n=s(r=>r.replace(/\/+$/,""),"norm");return n(e)===n(t)}function Lm(e){let t=new Set;Yr(e,".")&&t.add(".");let n=[{rel:".",depth:0}],r=0;for(;n.length>0&&r<ha;){let i=n.pop();if(i===void 0)break;if(i.depth>=$m)continue;let o;try{o=Nn(x.join(e,i.rel),{withFileTypes:!0})}catch{continue}for(let a of o){if(!a.isDirectory()||a.name.startsWith(".")||a.name==="node_modules")continue;let c=i.rel==="."?a.name:x.join(i.rel,a.name);if(r+=1,r>=ha)break;Yr(e,c)&&t.add(c),n.push({rel:c,depth:i.depth+1})}}return[...t].sort()}function jm(e){let t=[];try{let n=x.join(e,"pnpm-workspace.yaml");if($(n)){let r=!1;for(let i of ye(n,"utf8").split(`
|
|
23
|
-
`)){let o=i.replace(/#.*$/,"").trimEnd();if(/^packages\s*:/.test(o)){r=!0;continue}if(r){let a=/^\s+-\s*['"]?([^'"]+?)['"]?\s*$/.exec(o);a?t.push(a[1]):o.trim().length>0&&!/^\s/.test(o)&&(r=!1)}}}else{let r=x.join(e,"package.json");if($(r)){let i=JSON.parse(ye(r,"utf8")),o=Array.isArray(i.workspaces)?i.workspaces:i.workspaces?.packages;Array.isArray(o)&&t.push(...o.filter(a=>typeof a=="string"))}}}catch{return[]}return t}function Hm(e){let t=[];for(let n of Lm(e)){let r=n==="."?e:x.join(e,n),i=s(o=>n==="."?o:x.join(n,o),"prefix");for(let o of jm(r)){if(t.length>=Jr)break;if(!(o.startsWith("!")||o.includes("**")))try{if(o.endsWith("/*")){let a=o.slice(0,-2),c=x.join(r,a);if(!$(c))continue;for(let d of Nn(c,{withFileTypes:!0}))if(d.isDirectory()&&!d.name.startsWith(".")&&t.push(i(x.join(a,d.name))),t.length>=Jr)break}else o.includes("*")||t.push(i(o))}catch{}}}return t.slice(0,Jr)}function ga(e){let t=null,n=0,r=[e];for(;r.length>0&&n<ma;){let i=r.pop();if(i===void 0)break;let o;try{o=Nn(i,{withFileTypes:!0})}catch{continue}for(let a of o){if(a.name.startsWith(".")||a.name==="node_modules")continue;let c=x.join(i,a.name);if(a.isDirectory())r.push(c);else if(a.isFile()){n+=1;try{let d=zr(c).mtimeMs;(t===null||d>t)&&(t=d)}catch{}if(n>=ma)break}}}return t}function Um(e,t){let n=new Set;for(let r of t)try{let i=x.join(e,r,"package.json");if(!$(i))continue;let o=JSON.parse(ye(i,"utf8"));for(let a of["dependencies","devDependencies","peerDependencies"]){let c=o[a];if(!(c===null||typeof c!="object"))for(let[d,u]of Object.entries(c))typeof u=="string"&&u.startsWith("workspace:")&&n.add(d)}}catch{}return n}function va(e){let t=[],n=Hm(e),r=Um(e,n);for(let i of n)try{let o=x.join(e,i,"package.json");if(!$(o))continue;let a=JSON.parse(ye(o,"utf8"));if(typeof a.name!="string"||!r.has(a.name))continue;let c=s(y=>{if(typeof y!="string")return null;let k=y.replace(/^\.\//,"").split("/")[0];return k==="build"||k==="dist"?k:null},"builtSeg"),d=c(a.types??a.typings),u=c(a.main),l=d??u;if(l===null)continue;let p=d!==null&&u!==null?"both":d!==null?"types":"runtime",f=x.join(e,i,"src"),h=x.join(e,i,l);if(!$(f)||!$(h))continue;let m=ga(f),g=ga(h);if(m===null||g===null)continue;let w=m-g;w>Fm&&t.push({packageDir:i,buildDir:l,srcNewerByMs:Math.round(w),impact:p})}catch{}return t.sort((i,o)=>i.packageDir.localeCompare(o.packageDir))}function Km(e,t){if(!t)return null;let n=Gm(e,["pr","checks",t,"--json","bucket"]);if(n==null)return null;let r;try{r=JSON.parse(n)}catch{return null}if(r.length===0)return{prNumber:null,totalChecks:0,failedChecks:0,allRed:!1};let i=r.filter(o=>o.bucket==="fail").length;return{prNumber:null,totalChecks:r.length,failedChecks:i,allRed:i===r.length&&r.length>0}}function Gm(e,t){try{return km("gh",t,{cwd:e,encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:1e4,maxBuffer:8*1024*1024})}catch{return null}}async function Tt(e,t={}){let n=await ka(e,t),r=ba(n);return{ok:
|
|
23
|
+
`)){let o=i.replace(/#.*$/,"").trimEnd();if(/^packages\s*:/.test(o)){r=!0;continue}if(r){let a=/^\s+-\s*['"]?([^'"]+?)['"]?\s*$/.exec(o);a?t.push(a[1]):o.trim().length>0&&!/^\s/.test(o)&&(r=!1)}}}else{let r=x.join(e,"package.json");if($(r)){let i=JSON.parse(ye(r,"utf8")),o=Array.isArray(i.workspaces)?i.workspaces:i.workspaces?.packages;Array.isArray(o)&&t.push(...o.filter(a=>typeof a=="string"))}}}catch{return[]}return t}function Hm(e){let t=[];for(let n of Lm(e)){let r=n==="."?e:x.join(e,n),i=s(o=>n==="."?o:x.join(n,o),"prefix");for(let o of jm(r)){if(t.length>=Jr)break;if(!(o.startsWith("!")||o.includes("**")))try{if(o.endsWith("/*")){let a=o.slice(0,-2),c=x.join(r,a);if(!$(c))continue;for(let d of Nn(c,{withFileTypes:!0}))if(d.isDirectory()&&!d.name.startsWith(".")&&t.push(i(x.join(a,d.name))),t.length>=Jr)break}else o.includes("*")||t.push(i(o))}catch{}}}return t.slice(0,Jr)}function ga(e){let t=null,n=0,r=[e];for(;r.length>0&&n<ma;){let i=r.pop();if(i===void 0)break;let o;try{o=Nn(i,{withFileTypes:!0})}catch{continue}for(let a of o){if(a.name.startsWith(".")||a.name==="node_modules")continue;let c=x.join(i,a.name);if(a.isDirectory())r.push(c);else if(a.isFile()){n+=1;try{let d=zr(c).mtimeMs;(t===null||d>t)&&(t=d)}catch{}if(n>=ma)break}}}return t}function Um(e,t){let n=new Set;for(let r of t)try{let i=x.join(e,r,"package.json");if(!$(i))continue;let o=JSON.parse(ye(i,"utf8"));for(let a of["dependencies","devDependencies","peerDependencies"]){let c=o[a];if(!(c===null||typeof c!="object"))for(let[d,u]of Object.entries(c))typeof u=="string"&&u.startsWith("workspace:")&&n.add(d)}}catch{}return n}function va(e){let t=[],n=Hm(e),r=Um(e,n);for(let i of n)try{let o=x.join(e,i,"package.json");if(!$(o))continue;let a=JSON.parse(ye(o,"utf8"));if(typeof a.name!="string"||!r.has(a.name))continue;let c=s(y=>{if(typeof y!="string")return null;let k=y.replace(/^\.\//,"").split("/")[0];return k==="build"||k==="dist"?k:null},"builtSeg"),d=c(a.types??a.typings),u=c(a.main),l=d??u;if(l===null)continue;let p=d!==null&&u!==null?"both":d!==null?"types":"runtime",f=x.join(e,i,"src"),h=x.join(e,i,l);if(!$(f)||!$(h))continue;let m=ga(f),g=ga(h);if(m===null||g===null)continue;let w=m-g;w>Fm&&t.push({packageDir:i,buildDir:l,srcNewerByMs:Math.round(w),impact:p})}catch{}return t.sort((i,o)=>i.packageDir.localeCompare(o.packageDir))}function Km(e,t){if(!t)return null;let n=Gm(e,["pr","checks",t,"--json","bucket"]);if(n==null)return null;let r;try{r=JSON.parse(n)}catch{return null}if(r.length===0)return{prNumber:null,totalChecks:0,failedChecks:0,allRed:!1};let i=r.filter(o=>o.bucket==="fail").length;return{prNumber:null,totalChecks:r.length,failedChecks:i,allRed:i===r.length&&r.length>0}}function Gm(e,t){try{return km("gh",t,{cwd:e,encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:1e4,maxBuffer:8*1024*1024})}catch{return null}}async function Tt(e,t={}){let n=await ka(e,t);if(!n.isRepo)return{ok:!1,verdict:"no_opinion",reason:"not_a_repository",findings:[],facts:n};let r=ba(n),i=_a(r);return{ok:i,verdict:i?"clean":"diverged",reason:null,findings:r,facts:n}}var ya,Qr,wa,vm,Sm,Em,fa,Fm,Jr,ma,$m,ha,Zr=b(()=>{"use strict";qr();J();Rt();ya=["supabase/config.toml","supabase/.temp",".env"],Qr=".maind/worktree-requirements",wa={"pnpm-lock.yaml":"pnpm install","package-lock.json":"npm install","yarn.lock":"yarn install","bun.lockb":"bun install"},vm=Object.keys(wa).flatMap(e=>[e,"*/"+e]),Sm=["scripts"],Em=512*1024;s(xm,"gatherToolCopyDrift");s(Rm,"compareToolDirs");s(ba,"computeDivergence");s(Tm,"computeHookFinding");fa={open:0,warn:1,info:2,passed:3};s(Am,"sortFindings");s(_a,"isHealthy");s(de,"trimOrNull");s(Im,"resolveDefaultBranch");s(Nm,"detectInProgressOp");s(Cm,"parseWorktrees");s(Pm,"readWorktreeRequirements");s(Dm,"discoverSupabaseConfigProbes");s(Om,"discoverDependencyDirs");s(Mm,"isWorkspaceRoot");s(Yr,"hasWorkspaceMarkers");s(ka,"gatherRepoHealthFacts");s(Xr,"samePath");Fm=2e3,Jr=64,ma=4e3,$m=3,ha=400;s(Lm,"findWorkspaceRoots");s(jm,"workspacePatternsAt");s(Hm,"listWorkspacePackageDirs");s(ga,"newestMtimeUnder");s(Um,"consumedWorkspaceNames");s(va,"gatherStalePackageBuilds");s(Km,"gatherReleaseFact");s(Gm,"runGh");s(Tt,"checkDivergence")});import{existsSync as ei,readdirSync as Sa}from"node:fs";import{posix as te}from"node:path";function xa(e,t={}){let n=t.minFiles??ti;return e.length<n?!1:new Set(e).size/e.length>=(t.minDistinctRatio??Ea)}function Je(e){return`${e.dir}#${e.prefix}`}function At(e){let t=Bm.exec(e);return t?.groups?{prefix:t.groups.prefix??"",number:t.groups.num}:null}function Ra(e){let t=[];if(!e.isRepo)return t;let n=new Set(e.addedPaths);for(let i of e.namespaces){let o=Je(i),a=e.sightingsByNamespace.get(o);if(!a)continue;let c=new Set(a.keys());for(let[d,u]of a){let l=[...new Set(u.map(m=>m.path))];if(l.length<2)continue;let p=l.find(m=>n.has(m)),f=l.filter(m=>m!==p),h=`${i.prefix}${d}`;t.push(p?{id:`number.collision:${o}#${d}`,status:"open",namespace:i,number:d,title:`${h} is already taken`,detail:`This branch adds ${p}, but ${h} already exists as ${f.join(", ")}. A number is the reference key \u2014 links, commit messages and comments pointing at ${h} stop being unambiguous.`,ownPath:p,sightings:u.filter(m=>m.path!==p),suggestion:`${i.prefix}${ni(c,d)}`,hint:"Rename yours (git mv) to the suggested number and update every reference: title/frontmatter, any index file, wiki-style links, and comments naming the old filename. Already-merged references (commit messages, applied migrations) stay as they are \u2014 they are history."}:{id:`number.collision:${o}#${d}`,status:"info",namespace:i,number:d,title:`${h} is used more than once (pre-existing)`,detail:`${h} is carried by ${l.length} files: ${l.join(", ")}.`,sightings:u,hint:"Not introduced by this branch \u2014 inventory, not a blocker."})}}let r={open:0,warn:1,info:2,passed:3};return t.sort((i,o)=>r[i.status]-r[o.status]||i.id.localeCompare(o.id))}function Ta(e){return!e.some(t=>t.status==="open")}function ni(e,t){let n=0;for(let r of e){let i=Number(r);Number.isFinite(i)&&(n=Math.max(n,i))}return String(n+1).padStart(t.length,"0")}function ri(e){return e.replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/+/,"")}function Aa(e,t){let n=ri(t),r={path:n,namespace:null,number:null,taken:!1,sightings:[],suggestion:null},i=At(te.basename(n));if(!i)return r;let o=`${te.dirname(n)}#${i.prefix}`,a=e.namespaces.find(l=>Je(l)===o)??null;if(!a)return{...r,number:i.number};let c=e.sightingsByNamespace.get(o)??new Map,d=new Set,u=[];for(let l of c.get(i.number)??[])l.path===n||d.has(l.path)||(d.add(l.path),u.push(l));return{path:n,namespace:a,number:i.number,taken:u.length>0,sightings:u,suggestion:ni(c.keys(),i.number)}}function Cn(e){let t=e?.trim();return t||null}function qe(e){return e?e.split(`
|
|
24
24
|
`).filter(Boolean):[]}function Wm(e){let t=Cn(_(e,["symbolic-ref","--quiet","refs/remotes/origin/HEAD"]));if(t){let n=/refs\/remotes\/origin\/(.+)$/.exec(t);if(n)return n[1]}for(let n of["main","master"])if(_(e,["rev-parse","--verify","--quiet",`origin/${n}`])!==null)return n;return null}function Ia(e,t={}){let n=t.minFiles??ti,r=["ls-files","-z","--"];r.push(...t.dirs?.length?t.dirs:["."]);let i=_(e,r);if(i===null)return[];let o=new Map;for(let a of i.split("\0").filter(Boolean)){let c=te.dirname(a),d=At(te.basename(a));if(!d)continue;let u=`${c}#${d.prefix}`,l=o.get(u);l?l.numbers.push(d.number):o.set(u,{dir:c,prefix:d.prefix,numbers:[d.number]})}return[...o.values()].filter(a=>xa(a.numbers,{...t,minFiles:n})).map(a=>({dir:a.dir,prefix:a.prefix,fileCount:a.numbers.length,distinctRatio:new Set(a.numbers).size/a.numbers.length})).sort((a,c)=>Je(a).localeCompare(Je(c)))}async function ii(e,t={}){let n=[];if(Cn(_(e,["rev-parse","--is-inside-work-tree"]))!=="true")return{isRepo:!1,defaultBranch:null,namespaces:[],sightingsByNamespace:new Map,addedPaths:[],skipped:["not a git work tree"]};let i=Ia(e,t),o=new Map(i.map(h=>[Je(h),h])),a=[...new Set(i.map(h=>h.dir))],c=new Map,d=s((h,m,g)=>{let w=te.dirname(h),y=At(te.basename(h));if(!y)return;let k=`${w}#${y.prefix}`;if(!o.has(k))return;let S=c.get(k)??new Map,v=S.get(y.number)??[];v.push({kind:m,where:g,path:h}),S.set(y.number,v),c.set(k,S)},"record"),u=s((h,m,g)=>{if(a.length===0)return;let w=_(e,["ls-tree","-r","--name-only",h,"--",...a]);if(w===null){n.push(`could not read ${g}`);return}for(let y of qe(w))d(y,m,g)},"scanTree");for(let h of a){let m=te.join(e,h);if(ei(m))try{for(let g of Sa(m))d(`${h}/${g}`,"self","this worktree")}catch{n.push(`could not read ${h}`)}}let l=Wm(e);l?u(`origin/${l}`,"default_branch",`origin/${l}`):n.push("no default branch resolvable (offline clone?) \u2014 base comparison skipped");let p=Cn(_(e,["rev-parse","--abbrev-ref","HEAD"]));for(let h of qe(_(e,["for-each-ref","--format=%(refname:short)","refs/heads"])))h!==p&&u(h,"branch",`Branch ${h}`);if(t.includeWorktrees!==!1){let h=Cn(_(e,["rev-parse","--show-toplevel"]));for(let m of qe(_(e,["worktree","list","--porcelain"]))){if(!m.startsWith("worktree "))continue;let g=m.slice(9).trim();if(!(!g||g===h||!ei(g)))for(let w of a){let y=te.join(g,w);if(ei(y))try{for(let k of Sa(y))d(`${w}/${k}`,"worktree",`Worktree ${g}`)}catch{n.push(`could not read ${w} in ${g}`)}}}}let f=[];if(l&&a.length>0){let h=_(e,["diff","--name-only","--diff-filter=A",`origin/${l}...HEAD`,"--",...a]);h===null?n.push("could not diff against the default branch \u2014 everything reported as info"):f=qe(h);let m=_(e,["ls-files","--others","--exclude-standard","--",...a]);m!==null&&(f=[...f,...qe(m)]);let g=_(e,["diff","--cached","--name-only","--diff-filter=A","--",...a]);g!==null&&(f=[...f,...qe(g)])}return{isRepo:!0,defaultBranch:l,namespaces:i,sightingsByNamespace:c,addedPaths:f,skipped:n}}async function It(e,t={}){let n=await ii(e,t),r=Ra(n);return{ok:Ta(r),findings:r,facts:n}}async function Ae(e,t,n={}){let r=ri(t);if(!At(te.basename(r)))return{path:r,namespace:null,number:null,taken:!1,sightings:[],suggestion:null};let i=await ii(e,{...n,dirs:n.dirs??[te.dirname(r)]});return Aa(i,r)}var Bm,ti,Ea,oi=b(()=>{"use strict";J();Bm=/^(?<prefix>[A-Za-z][A-Za-z_.-]*?[-_])?(?<num>\d{2,})(?=[-_.])/,ti=3,Ea=.8;s(xa,"isCounterNamespace");s(Je,"namespaceKey");s(At,"parseNumbered");s(Ra,"computeNumberCollisions");s(Ta,"isCollisionFree");s(ni,"suggestNextNumber");s(ri,"normaliseRepoPath");s(Aa,"checkProposedNumber");s(Cn,"trimOrNull");s(qe,"lines");s(Wm,"resolveDefaultBranch");s(Ia,"detectNamespaces");s(ii,"gatherNumberCollisionFacts");s(It,"checkNumberCollisions");s(Ae,"checkNumberForPath")});import{existsSync as Vm,readFileSync as Na}from"node:fs";import{posix as qm}from"node:path";function On(e,t){let n=e[t],r=t+1;for(;r<e.length;){let i=e[r];if(i==="\\"){r+=2;continue}if(i===n)return r+1;r++}return e.length}function Mn(e,t){if(e.startsWith("//",t)){let n=e.indexOf(`
|
|
25
25
|
`,t);return n===-1?e.length:n+1}if(e.startsWith("/*",t)){let n=e.indexOf("*/",t+2);return n===-1?e.length:n+2}return t+1}function Nt(e){return e==='"'||e==="'"||e==="`"}function Fn(e,t){return e[t]==="/"&&(e[t+1]==="/"||e[t+1]==="*")}function Pn(e,t){let n=e[t];if(n!=="["&&n!=="{")return null;let r=0,i=t;for(;i<e.length;){let o=e[i];if(Nt(o)){i=On(e,i);continue}if(Fn(e,i)){i=Mn(e,i);continue}if(o==="["||o==="{")r++;else if((o==="]"||o==="}")&&(r--,r===0))return e.slice(t,i+1);i++}return null}function Jm(e){let t=0;for(;;){for(;t<e.length&&/\s/.test(e[t]);)t++;if(Fn(e,t)){t=Mn(e,t);continue}break}return e.slice(t)}function ze(e){let t=[],n=0,r=0,i=0;for(;i<e.length;){let o=e[i];if(Nt(o)){i=On(e,i);continue}if(Fn(e,i)){i=Mn(e,i);continue}o==="["||o==="{"||o==="("?n++:o==="]"||o==="}"||o===")"?n--:o===","&&n===0&&(t.push(e.slice(r,i)),r=i+1),i++}return t.push(e.slice(r)),t.map(o=>Jm(o).trim()).filter(o=>o.length>0)}function Oa(e){let t=On(e,0);return e.slice(1,t-1).replace(/\\(.)/g,(r,i)=>i==="n"?`
|
|
26
26
|
`:i==="r"?"\r":i==="t"?" ":i)}function zm(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ai(e,t){let r=new RegExp(String.raw`(?:^|[\s;({])(?:export\s+)?(?:const|let|var)\s+${zm(t)}\b`,"m").exec(e);if(!r)return null;let i=r.index+r[0].length,o=!1;for(;i<e.length;){let a=e[i];if(Nt(a)){i=On(e,i);continue}if(Fn(e,i)){i=Mn(e,i);continue}if(!o){if(a==="="&&e[i+1]!=="="&&!"=!<>".includes(e[i-1]??" "))o=!0;else if(a===";")return null;i++;continue}if(a==="[")return Pn(e,i);if(a===";")return null;i++}return null}function ci(e){let t={};if(!e.startsWith("{"))return t;for(let n of ze(e.slice(1,-1))){let r=/^(?:(['"])([^'"]+)\1|([A-Za-z_$][\w$]*))\s*:\s*([\s\S]*)$/.exec(n);if(!r)continue;let i=r[2]??r[3],o=r[4].trim();Nt(o[0]??"")&&(t[i]=Oa(o))}return t}function Ym(e,t){if(!e.startsWith("{"))return null;for(let n of ze(e.slice(1,-1))){let r=/^(?:(['"])([^'"]+)\1|([A-Za-z_$][\w$]*))\s*:\s*([\s\S]*)$/.exec(n);if(r&&(r[2]??r[3])===t)return r[4].trim()}return null}function Ma(e,t){if(!t)return{...e};let n={};for(let r of t)n[r]=e[r]??"";return n}function Fa(){let e=new Map;return t=>{let n=t.join("\0"),r=e.get(n)??0;return e.set(n,r+1),r}}function $a(e,t){let n=ai(e,t.symbol);if(n===null)return{records:[],error:`no array literal assigned to \`${t.symbol}\` in ${t.path}`,dropped:0};let r=Fa(),i=[],o=0;for(let a of ze(n.slice(1,-1))){if(!a.startsWith("{")){o++;continue}let c=ci(a),d=c[t.key_field];if(!d){o++;continue}let u=(t.partition_by??[]).map(l=>c[l]??"");i.push({key:d,fields:Ma(c,t.fields),orderPath:u,ordinal:r(u)})}return i.length===0?{records:[],error:`\`${t.symbol}\` in ${t.path} yielded no parsable records`,dropped:o}:{records:i,error:null,dropped:o}}function La(e,t){let n=ai(e,t.symbol);if(n===null)return{records:[],error:`no array literal assigned to \`${t.symbol}\` in ${t.path}`,dropped:0};if(t.levels.length===0)return{records:[],error:`contract declares no levels for \`${t.symbol}\``,dropped:0};let r=Fa(),i=[],o=0,a=s((c,d,u)=>{let l=t.levels[d],p=d===t.levels.length-1;for(let f of ze(c.slice(1,-1))){let h={...u},m=null;if(l.shape==="object"){if(!f.startsWith("{")){o++;continue}let g=ci(f);for(let[w,y]of Object.entries(l.fields??{}))h[w]=g[String(y)]??"";if(!p&&typeof l.children=="string"){let w=Ym(f,l.children);m=w&&w.startsWith("[")?Pn(w,0):null}}else{if(!f.startsWith("[")){o++;continue}let g=ze(f.slice(1,-1));for(let[w,y]of Object.entries(l.fields??{})){let k=g[Number(y)];h[w]=k!==void 0&&Nt(k[0]??"")?Oa(k):""}if(!p&&typeof l.children=="number"){let w=g[l.children];m=w!==void 0&&w.startsWith("[")?Pn(w,0):null}}if(p){let g=h[t.key_field];if(!g){o++;continue}let w=(t.partition_by??[]).map(y=>h[y]??"");i.push({key:g,fields:Ma(h,t.fields),orderPath:w,ordinal:r(w)});continue}m!==null&&a(m,d+1,h)}},"walk");return a(n,0,{}),i.length===0?{records:[],error:`\`${t.symbol}\` in ${t.path} yielded no parsable records`,dropped:o}:{records:i,error:null,dropped:o}}function Ca(e,t){return t.extractor==="object-array"?$a(e,t):La(e,t)}function ja(e,t,n){let r=e;return t.strip_prefix&&r.startsWith(t.strip_prefix)&&(r=r.slice(t.strip_prefix.length)),t.templates.some(i=>n.has(i.replace("{key}",r).replace(/\/{2,}/g,"/")))}function Ha(e,t,n){return`spec.drift:${e}#${t}:${n}`}function Xm(e){return e.orderPath.join(" / ")||"(flat)"}function Ua(e,t,n,r){let i=[],o=s((u,l,p,f,h,m)=>{i.push({id:Ha(e.id,u,p),contract:e.id,dimension:u,status:l,key:p,title:f,detail:h,hint:m})},"push"),a=new Map(n.map(u=>[u.key,u])),c=new Map(t.map(u=>[u.key,u]));for(let u of t){let l=a.get(u.key);if(!l){o("coverage","open",u.key,`${u.key} is declared by the specification but missing from the implementation`,`Partition ${Xm(u)}, position ${u.ordinal+1}. The specification is the reference; add it or record an exception with a reason.`,"On a contradiction the specification wins \u2014 read it rather than a summary of it.");continue}for(let p of e.compare_fields??[]){let f=u.fields[p]??"",h=l.fields[p]??"";f!==h&&o("fields","open",`${u.key}.${p}`,`${u.key}: ${p} is "${h||"\u2014"}", the specification says "${f||"\u2014"}"`,`Field \`${p}\` disagrees between the two sides.`)}}let d=new Map;for(let u of t){let l=u.orderPath.join("\0"),p=d.get(l);p?p.push(u):d.set(l,[u])}for(let[u,l]of d){let p=l.filter(g=>a.has(g.key)).map(g=>g.key),f=n.filter(g=>g.orderPath.join("\0")===u).filter(g=>c.has(g.key)).map(g=>g.key),h=new Set(f),m=p.filter(g=>h.has(g));if(f.join("|")!==m.join("|")){let g=u.split("\0").join(" / ")||"(flat)";o("order","open",g,`Partition ${g}: sequence differs from the specification`,`implementation: ${f.join(" \u2192 ")}
|
|
@@ -834,7 +834,7 @@ DRY RUN finished in ${g}s. No files were modified. Re-run without --dry-run to a
|
|
|
834
834
|
Finished in ${g}s. Restart your MCP client so it picks up the new server entry.
|
|
835
835
|
`);let w=Q({entryPath:Z(),nodePath:process.execPath,isElectron:process.versions.electron!==void 0}),y=w.fallbackReason===null?`${Ue(w)} --reauth`:"npx -y @maind-dev/mcp-bridge --reauth";return process.stdout.write(`Re-pair this device later with: ${y}
|
|
836
836
|
`),m===1&&process.stdout.write(`Note: some steps were skipped or failed \u2014 review the table above. The MCP setup is usable as long as 'browser-pair' and at least one JSON/TOML target succeeded.
|
|
837
|
-
`),m}s(Ec,"runInstall");Ft();import{readFileSync as yh}from"node:fs";import{join as xc}from"node:path";function Wn(e){return e?Math.ceil(e.length/4):0}s(Wn,"estimateTokens");var Rc=1e6,Vn=class{static{s(this,"SavingsAggregator")}pendingTokens=0;pendingCalls=0;add(t){!Number.isFinite(t)||t<=0||(this.pendingTokens+=Math.floor(t),this.pendingCalls+=1)}hasPending(){return this.pendingTokens>0}takePending(){let t={tokens:this.pendingTokens,calls:this.pendingCalls};return this.pendingTokens=0,this.pendingCalls=0,t}};function Tc(e){try{let t=yh(e,"utf8");return t.length>Rc?t.slice(0,Rc):t}catch{return""}}s(Tc,"readFileCapped");function wh(e){if(!Array.isArray(e))return[];let t=new Set;for(let n of e){let r=n?.filePath;typeof r=="string"&&r.length>0&&t.add(r)}return[...t]}s(wh,"distinctFilePaths");function Ac(e,t,n,r){try{let i=Wn(n);if(e==="codebase_search"){let o=wh(t);if(o.length===0)return 0;let a=0;for(let c of o)a+=Wn(Tc(xc(r,c)));return Math.max(0,a-i)}if(e==="codebase_snippet"){let o=t?.filePath;if(typeof o!="string"||o.length===0)return 0;let a=Wn(Tc(xc(r,o)));return Math.max(0,a-i)}return 0}catch{return 0}}s(Ac,"measureLocalToolSaved");Ht();Ft();import{createHash as Gh}from"node:crypto";function qn(e){return Gh("sha256").update(e,"utf8").digest("hex")}s(qn,"nodeKeyHash");var Bh=["module","class","interface","function","method","type_alias","enum","variable"],Fi=[{name:"codebase_index",description:"Build or update the LOCAL codebase index for the current repo (tree-sitter \u2192 symbol graph in .maind/code-index.sqlite). Runs on this machine; nothing is uploaded. Incremental by default \u2014 only changed files are re-parsed. Call once before codebase_search/trace/map if the index is empty (see codebase_status).",inputSchema:{type:"object",properties:{full:{type:"boolean",description:"Force a full rebuild instead of incremental."}}}},{name:"codebase_status",description:"Report the local codebase index status: file/symbol/edge counts, languages, and when it was last built. Use this to decide whether to run codebase_index first.",inputSchema:{type:"object",properties:{}}},{name:"codebase_search",description:"Search indexed symbols by name/identifier (lexical FTS over function/class/method/\u2026 names, split on camelCase & snake_case). Returns matching symbols with their node_key, file, and line. Feed a node_key into codebase_snippet or codebase_trace.",inputSchema:{type:"object",properties:{query:{type:"string",description:"Search text (identifier fragments)."},kind:{type:"string",enum:Bh,description:"Restrict to a symbol kind."},limit:{type:"number",description:"Max results (default 20)."}},required:["query"]}},{name:"codebase_trace",description:"Traverse the call/dependency graph from a symbol. direction 'out' = what this symbol calls/contains/imports; 'in' = what calls/depends on it. Returns edges as node_key \u2192 node_key with the edge kind. CALLS/EXTENDS are best-effort name heuristics.",inputSchema:{type:"object",properties:{node_key:{type:"string",description:"Start symbol's node_key (from codebase_search)."},direction:{type:"string",enum:["out","in"],description:"Traversal direction (default out)."},max_depth:{type:"number",description:"BFS depth 1\u20135 (default 3)."},limit:{type:"number",description:"Max edges returned (default 100)."}},required:["node_key"]}},{name:"codebase_snippet",description:"Return the exact source text of a symbol by node_key (read locally from disk \u2014 never uploaded). Use after codebase_search/trace to read a function/class without opening the file.",inputSchema:{type:"object",properties:{node_key:{type:"string",description:"The symbol's node_key."}},required:["node_key"]}},{name:"codebase_map",description:"Architecture overview of the indexed repo: symbol-kind distribution, languages, and the most-imported (highest fan-in) modules \u2014 a cheap way to orient in an unfamiliar codebase.",inputSchema:{type:"object",properties:{top_n:{type:"number",description:"How many top modules to list (default 10)."}}}},{name:"codebase_changes",description:"Enumerate the symbols in files you changed (git diff/status against the LOCAL index \u2014 runs on this machine, nothing is uploaded). Call after finishing an edit batch, before committing. The output includes a ready-to-paste `briefing_args` block with paths deliberately stripped \u2014 feed it to the cloud tool codebase_change_briefing to get the maind conventions and lessons that apply to exactly these symbols. Requires a built index (codebase_index) for symbol enumeration; files without index rows are counted but contribute no symbols.",inputSchema:{type:"object",properties:{since:{type:"string",description:"Git ref to diff against (e.g. 'main', a SHA). Default: HEAD (= your uncommitted work)."},include_uncommitted:{type:"boolean",description:"Include uncommitted/untracked changes (default true). false requires `since`."},limit:{type:"number",description:"Max symbols (default 64, cap 200)."}}}},{name:"codebase_review_changes",description:"Review-grade change enumeration (ADR-228): like codebase_changes, but hunk-aware \u2014 each symbol is graded added|modified|co_located by intersecting git diff hunks with symbol spans (runs on this machine, nothing is uploaded), plus closed-enum risk_flags from the raw path list (SQL migrations, RLS/SECURITY DEFINER, CI workflows, env files \u2014 files the index itself cannot see). The output's `review_args` block is path-free by construction \u2014 feed it to the cloud tool review_changes for provenance-backed convention findings. diff_stats carries the attest anchors (head_sha, dirty, resolved base_sha \u2014 commit object hashes, no source): pass them through to review_verdict to persist a replayable review_runs record (ADR-230). Requires a FRESH index (codebase_index) \u2014 stale files degrade honestly to co_located.",inputSchema:{type:"object",properties:{since:{type:"string",description:"Git ref to diff against (e.g. 'main', a SHA). Default: HEAD (= your uncommitted work)."},include_uncommitted:{type:"boolean",description:"Include uncommitted/untracked changes (default true). false requires `since`."},limit:{type:"number",description:"Max symbols (default 64, cap 200)."},include_history:{type:"boolean",description:"Attach a counts-only regression context (`history`: churn/authors/age as NUMBERS \u2014 no names, subjects, or paths) to review_args for the cloud review (default true)."}}}},{name:"codebase_history",description:"Git history for files/directories \u2014 recent commits, ownership ('who worked here last / most'), and an optional regression window ('what changed in X since Y'). Runs on this machine via local git, nothing is uploaded; output may include commit authors and subjects, which stay local BY DESIGN (Phase B privacy: history is never synced to the cloud \u2014 do not paste author/subject data into cloud tools). Works without a built index. When paths is omitted, defaults to the files you currently changed. Ownership is aggregated over a bounded recent-commit window (reported as ownership_window_commits).",inputSchema:{type:"object",properties:{paths:{type:"array",items:{type:"string"},description:"Files or directories to inspect (repo-relative). Default: your currently changed files. Cap 50."},since:{type:"string",description:"Regression window start: a git ref (resolved first) or a date string (e.g. '2026-06-01'). Omit for recent+ownership only."},limit:{type:"number",description:"Max recent commits per path (default 20, cap 100)."},include_ownership:{type:"boolean",description:"Aggregate per-path ownership (default true)."}}}},{name:"check_divergence",description:"Local silent-divergence detector (ADR-238): check whether the repo/worktree state has quietly diverged from what git/CLI success messages imply \u2014 the recurring AI-coding failure where a command reports 'ok / up to date / done' while upstream, worktree, or release state is actually wrong. Runs entirely on this machine (git + fs), nothing is uploaded. Returns findings in the open|warn|info vocabulary with fix hints, covering: branch/remote (no upstream, upstream tracking the WRONG branch, never-pushed, ahead/behind/diverged), worktree (detached HEAD, in-progress rebase/merge, uncommitted work on the shared base tree, tooling files missing vs the main checkout so tools silently target the wrong project, and a workspace package whose build/dist artifacts are OLDER than its src \u2014 after a rebase/pull nothing rebuilds, so typecheck reads stale types and fails on code you never touched while CI stays green), and release (all CI checks red \u2192 suspect account/billing/quota, not your code). Call this WHEN: (a) you are about to recommend or run git push / a deploy / a release; (b) a git/supabase/CLI command reported success but the result looks wrong; (c) at the start of work in a fresh worktree or right after a rebase/pull that touched workspace packages. An 'open' finding means proceed only after it is resolved or the user explicitly acknowledges it.",inputSchema:{type:"object",properties:{include_release:{type:"boolean",description:"Query gh for the all-checks-red signal (default true). Set false for a fully offline check."},probe_paths:{type:"array",items:{type:"string"},description:"Extra repo-relative worktree-parity probe paths, beyond the defaults + a committed .maind/worktree-requirements manifest."}}}},{name:"check_number_collisions",description:"Local guard against a numbered namespace being claimed twice (ADR-250): filenames carrying a sequential counter \u2014 ADR-248-*.md, 0001-use-postgres.md (adr-tools), RFC-12-*, Supabase migration slots \u2014 are a distributed counter with NO allocator. Two parallel agent sessions each list the directory, each see N as the highest, each write N+1: both are individually correct and the duplicate exists only in the union on the default branch, where it surfaces at merge time (or, for migrations, as a silently skipped push). Runs entirely on this machine (git + fs), nothing is uploaded. Namespaces are DISCOVERED, not configured \u2014 no prefix is hardcoded, and date-stamped families (BRIEF-2026-\u2026) are rejected because a counter's numbers are near-unique while a date family's repeat. Consults four sources, and the fourth is the point: the default branch, all other local branches, all SIBLING WORKTREES INCLUDING THEIR UNCOMMITTED FILES, and your own tree \u2014 the competing file is typically in no pushed commit yet. Findings use open|warn|info: `open` = THIS branch introduces the clash (act on it), `info` = the collision predates your work (inventory, not your problem). Call this WHEN: (a) you are about to create a file in a numbered series \u2014 an ADR, RFC, migration, numbered spec \u2014 and picked the number by listing the directory; (b) before pushing a branch that adds such a file; (c) a merge conflicted in an index/README that lists numbered documents. An `open` finding means renumber BEFORE pushing \u2014 resolving it after the merge means rewriting every reference. (d) BEST of all, pass `for_path` with the path you are about to create and get the verdict plus the next free number BEFORE the file exists \u2014 the only moment where fixing it costs one filename instead of a filename plus every index entry, link and comment that names it (ADR-263).",inputSchema:{type:"object",properties:{dirs:{type:"array",items:{type:"string"},description:'Restrict detection to these directories (default: the workspace repo). Each dir is resolved FROM ITS OWN PATH (absolute, or relative to the workspace / cwd) and scanned in the repository it belongs to \u2014 nested checkouts work when you give their prefix, e.g. "Asgard/docs/adr". Dirs that cannot be located are listed in `unresolved_dirs` and NOT scanned; if none resolve, the answer is `verdict: "no_opinion"` \u2014 an abstention, not collision-free. `scanned` shows which repo root was actually swept.'},min_files:{type:"number",description:"How many files must share a prefix before it counts as a namespace (default 3). Lower it to cover a young series that is still below the threshold."},for_path:{type:"string",description:'A path you are ABOUT to create, e.g. "docs/adr/ADR-263-retry-policy.md". Switches the tool from auditing what exists to answering the allocator question for a file that does not exist yet: is that number already held, and which is the next free one. Scoped to that file\'s own directory, so it is the cheap call. The repository is resolved FROM THIS PATH (absolute, or relative to the workspace / cwd), so nested checkouts work \u2014 give the prefix that locates the file, e.g. "Asgard/docs/adr/\u2026". Read `verdict` ("free" | "taken" | "no_opinion"), never `taken` alone: when the path cannot be located or its directory is no counter namespace, the answer is `no_opinion` \u2014 that is an abstention, NOT a free number.'}}}},{name:"check_spec_drift",description:"Local specification-fidelity detector (ADR-292): check whether an implementation still matches the NORMATIVE LIST it is supposed to implement \u2014 a design artefact, an OpenAPI document, a feature-flag catalogue, a permission matrix. The failure it catches is building against a PROSE SUMMARY of the specification instead of the specification: on 2026-08-19 a nav registry reached the default branch with 22 of the 40 targets its design artefact declares, and it surfaced only on the finished product. The specification was not missing \u2014 nothing in the system knew it existed. Runs entirely on this machine (git + fs), nothing is uploaded. The pairs to compare are DECLARED BY THIS REPO in `.maind/spec-contracts.json`; the manifest declares EXTRACTION, not content, so it never holds a copy of the expected values. Findings use open|warn|info across five closed dimensions: `coverage` (declared, not implemented), `fields` (implemented in the wrong group/section), `order` (right set, wrong sequence \u2014 the class a set comparison structurally cannot see), `extra` (implemented, not declared \u2014 a warning, the spec may lag) and `unrealized` (a key with no artefact behind it). Pre-existing findings grade `info` against the merge-base, so only what THIS branch introduces blocks. Call this WHEN: (a) you changed either side of a declared pair; (b) before opening or merging a PR that touches a registry, a router, a catalogue or the artefact that governs it; (c) you are about to build from a plan, handoff or ADR that SUMMARISES a specification \u2014 read the artefact, then verify with this. TWO THINGS IT DOES NOT DO. First: an absent manifest returns `verdict: no_opinion` \u2014 that is an abstention, NOT alignment; a repo that declares nothing never gets a green tick, and `ok` is false. Second: it cannot see APPEARANCE. No CSS, no measurements, no rendering. A green result means the declared entries agree in membership, grouping and order \u2014 it says nothing else about the thing you built. A `contract.unreadable:<id>` finding is a BROKEN POINTER (an anchor symbol moved), never a drift report: nothing was compared for that contract.",inputSchema:{type:"object",properties:{manifest:{type:"string",description:'Repo-relative manifest path (default ".maind/spec-contracts.json"). Point it at a throwaway path to see the abstention: `verdict: "no_opinion"`, `ok: false`.'},contracts:{type:"array",items:{type:"string"},description:"Restrict the run to these contract ids. Omit to evaluate every contract the manifest declares."},include_baseline:{type:"boolean",description:"Compare against the merge-base so pre-existing findings grade `info` instead of `open` (default true). false reports EVERY finding as newly introduced \u2014 useful for a full inventory, wrong for a gate."}}}},{name:"check_theme_class_drift",description:"Local dead-theme-class detector (ADR-303): find Tailwind utility classes that point at a theme token which does NOT exist. In Tailwind v4 an unknown theme colour generates NO rule \u2014 no error, no warning, the class is a silent no-op and the element simply has no background or colour. Neither tsc nor eslint nor the build can see it; it surfaces on the finished product, and typically in only ONE of the two colour modes (the sibling `dark:` class usually exists, which is exactly why it hides). Real incident 2026-08-26: `bg-surface-white` sat in nine files with no `--color-surface-white` anywhere; light-mode menus rendered without a background and read as a z-index bug. Runs entirely on this machine (git + fs), nothing is uploaded. The rule is sharp enough to gate on: only HOUSE namespaces are checked, and the namespaces are DERIVED from the repo's own `--color-*` and `--background-image-*` tokens (from `--color-surface-alt` follows `surface`) \u2014 `bg-red-500` or `text-xs` can never enter the check, so there is no judgement call and no config. Prose and template interpolation are excluded (a real class name never ends at a hyphen). Verdicts: `clean` (every house class is covered), `drift` (dead classes found \u2014 the findings name file, class and the missing token), `no_opinion` (the repo declares NO theme tokens; that is an ABSTENTION, not a pass \u2014 `ok` is false, and a repo without tokens never gets a green tick). Call this WHEN: (a) you added or renamed a Tailwind theme token, or wrote a `bg-`/`text-`/`border-`-style class using a house palette name from memory; (b) a surface renders without background/colour in one mode while looking fine in the other \u2014 check for a dead class BEFORE reaching for z-index; (c) before merging a branch that touches styling or tokens.css; (d) auditing a repo you did not write. What it structurally cannot see: whether a token is used in the RIGHT place (a syntactically valid dark background on a light surface), and dynamically composed class names \u2014 the Tailwind JIT shares that blindness. GRADING (ADR-323): every finding carries `status` \u2014 `open` = introduced by THIS branch (working tree compared against the merge-base with the default branch), `info` = already present at the merge-base (inventory, not your problem). `ok` is true only when no `open` finding exists and never under `no_opinion`; `verdict` stays descriptive and reads `drift` whenever any dead class exists at all. Without a resolvable baseline every finding is `open` \u2014 ungraded is honest, guessed is not.",inputSchema:{type:"object",properties:{dir:{type:"string",description:'Restrict the SOURCE scan to this directory (absolute, or relative to the workspace / cwd). The repository is resolved FROM THIS PATH, so nested checkouts work \u2014 give the prefix that locates the code, e.g. "Asgard/Maind". Token discovery always sweeps that whole repository: a scoped scan against a partial token set would fabricate findings. Omit to scan the workspace repo.'},base_ref:{type:"string",description:"Grade open-vs-info against this git ref instead of the resolved default branch (e.g. a release tag). Findings that already exist at the merge-base with it are `info`."},include_baseline:{type:"boolean",description:"Compare against the merge-base so pre-existing findings grade `info` instead of `open` (default true). false reports EVERY finding as newly introduced \u2014 useful for a full inventory of an unfamiliar repo, wrong for a gate."}}}},{name:"check_table_acl_lint",description:"Local Supabase table-ACL lint (ADR-309): find tables whose DEFAULT GRANTS were never revoked. Supabase's `ALTER DEFAULT PRIVILEGES` grants SELECT/INSERT/UPDATE/DELETE on EVERY new table in `public` to `anon` AND `authenticated` \u2014 and `REVOKE \u2026 FROM PUBLIC` does NOT remove that, because default privileges are direct role grants. Nothing enforces the counter-REVOKE; it is pure author discipline, so the leak is invisible until someone audits the live database. Real incident 2026-08-26: four tables carried full CRUD for anon and authenticated into production for up to eleven weeks (RLS held, the second line of defence simply did not exist). Runs entirely on this machine (git + fs), NO database is consulted, nothing is uploaded. The statement is about the FOLDED MIGRATION HISTORY, not about one file: CREATE/DROP/RENAME are folded in version order, and a REVOKE delivered in a LATER migration counts \u2014 which is exactly what a per-file lint cannot see. Two conditions per surviving public table: (A) some table-level REVOKE naming `anon` EXPLICITLY (PUBLIC alone never counts), and (B) table-level REVOKEs naming `authenticated` that cumulatively cover INSERT+UPDATE+DELETE (ALL covers). SELECT for `authenticated` may stay \u2014 the RLS-scoped read pattern is deliberate, not a leak. Findings grade `open` when THIS branch introduces them (new table without revokes, or a deleted revoke) and `info` when they predate the merge-base \u2014 inventory, not your problem. Verdicts: `clean`, `exposed`, `no_opinion`. Call this WHEN: (a) you added a `CREATE TABLE` migration \u2014 before opening the PR; (b) you are auditing a Supabase repo you did not write; (c) an RLS policy is being relaxed or removed, so the grant layer becomes load-bearing. TWO THINGS IT DOES NOT DO. First: `no_opinion` (a repo with no tracked `supabase/migrations/*.sql`) is an ABSTENTION, not a pass \u2014 `ok` is false, and a repo outside the tool's scope never gets a green tick. Second: it only sees MIGRATIONS. DDL applied through the dashboard or raw psql is invisible to it (the migration ledger shares that blindness), it covers schema `public` only, and REVOKEs inside `DO $$` blocks deliberately do NOT count \u2014 the error direction is always red, never a false green.",inputSchema:{type:"object",properties:{dir:{type:"string",description:'Restrict discovery to this directory (absolute, or relative to the workspace / cwd). The repository is resolved FROM THIS PATH, so nested checkouts work \u2014 give the prefix that locates the project, e.g. "Asgard/Maind". Omit to sweep every Supabase project in the workspace repo.'},base_ref:{type:"string",description:"Grade open-vs-info against this git ref instead of the resolved default branch (e.g. a release tag). Findings that already exist there are `info`."},include_baseline:{type:"boolean",description:"Compare against the merge-base so pre-existing findings grade `info` instead of `open` (default true). false reports EVERY finding as newly introduced \u2014 useful for a full inventory of an unfamiliar repo, wrong for a gate."}}}},{name:"check_migration_ledger_drift",description:"Local Supabase migration-ledger drift detector (ADR-309) \u2014 and it ALWAYS reports WHICH DATABASE it talked to (host, port, and where the port came from). Compares three things per Supabase project: the tracked migrations directory, the ledger (`supabase_migrations.schema_migrations`) of the ACTUALLY connected local database, and \u2014 only with an explicitly supplied source \u2014 a remote ledger. Runs on this machine; read-only by construction (a single SELECT, never a repair, never an insert, never `db reset`), nothing is uploaded. Two real incidents on 2026-08-26 shaped it: (1) `supabase/config.toml` is gitignored and therefore missing in every fresh git worktree; without it the CLI falls back to its DEFAULT port 54322, where a DIFFERENT project's database was listening \u2014 `migration repair --status applied --local` reported `INSERT 0 1` and success while writing into a foreign ledger. This tool therefore NEVER guesses a port: no config means no connection, and the refusal is itself the finding. (2) With the local schema behind the repo, a promote gate skipped its SQL assertions SILENTLY \u2014 so a file without a ledger row is an `open` finding (`ledger.behind`), not a footnote. A ledger row WITHOUT a file is first EXPLAINED, then judged: if that version exists as a file in a SIBLING WORKTREE it is that branch's work-in-progress on the shared local stack (`info`, the expected steady state \u2014 local \u2287 trunk; do NOT 'repair' it, that would un-book a running session's work); only an unexplained row is a phantom (`warn`). Verdicts: `in_sync`, `drift`, `blind`, `no_opinion`. Call this WHEN: (a) you are starting work in a fresh worktree, BEFORE any `supabase` command; (b) a migration/CLI command reported success but the result looks wrong; (c) before running a gate or test suite that asserts DB guarantees \u2014 a run against a stale schema checks yesterday's guarantees and reports green for today's migration; (d) before a `db push`. READ THE VERDICT, NEVER `findings.length` ALONE: `blind` means the question is valid but the DB view is missing (`config_missing` = open, the silent-redirect class; `db_unreachable` / `psql_missing` / `no_ledger_schema` = warn \u2014 a port that answers WITHOUT a Supabase ledger suggests you are pointed at a foreign database). `no_opinion` (no tracked migrations) is an ABSTENTION, not a pass. `ok` is true only for `in_sync` \u2014 'I do not know which database you are talking to' is never ok. It compares VERSION PREFIXES, not contents: a migration edited after it was applied looks in sync here.",inputSchema:{type:"object",properties:{dir:{type:"string",description:'Restrict discovery to this directory (absolute, or relative to the workspace / cwd). The repository is resolved FROM THIS PATH, so nested checkouts work \u2014 give the prefix that locates the project, e.g. "Asgard/Maind". Omit to check every Supabase project in the workspace repo.'},remote_db_url:{type:"string",description:"Optional connection string for a REMOTE ledger (e.g. the cloud project). Only read (SELECT). Omitted \u21D2 no remote comparison happens at all and `facts.remote_consulted` is false \u2014 the tool never hunts for credentials on its own."}}}}],Zc=new Set(Fi.map(e=>e.name));function L(e){return typeof e=="string"&&e.length>0?e:void 0}s(L,"str");var Wh=10;function Vh(e,t=Date.now()){if(e.history.length===0)return;let n=new Set,r=0,i=0,o=0;for(let a of e.history){let c=a.ownership?.commitsInWindow??a.lastCommits.length;c>=Wh&&r++,c>i&&(i=c);for(let u of a.ownership?.topAuthors??[])n.add(u.email.toLowerCase()||u.name);let d=a.lastCommits[0]?.dateIso;if(d){let u=Date.parse(d);Number.isFinite(u)&&u>o&&(o=u)}}return{window_commits:e.ownershipWindowCommits,files_scanned:e.history.length,hot_files:r,max_recent_commits:i,distinct_authors:n.size,newest_change_age_days:o>0?Math.max(0,Math.floor((t-o)/864e5)):0}}s(Vh,"aggregateHistoryContext");function Ne(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}s(Ne,"num");function Xc(e){if(e===void 0)return{repoRoot:W(),scanDirs:void 0};let t=Bn(e);return t===null?null:{repoRoot:t.repoRoot,scanDirs:t.repoRelDir===""?void 0:[t.repoRelDir]}}s(Xc,"anchorRepo");function Qc(e,t){return{ok:!1,verdict:"no_opinion",reason:"dir_not_found",repo_root:null,projects:[],findings:[],hint:`No opinion \u2014 this directory could not be located, so no repository was scanned. ${t} Pass a path that exists relative to the repo you mean (nested checkouts need their own prefix, e.g. \`Asgard/Maind\`) or an absolute path. Nothing was verified as ${e}.`}}s(Qc,"dirNotFound");async function el(e,t,n){switch(t){case"codebase_index":return e.indexRepository({full:n.full===!0});case"codebase_status":return e.status();case"check_divergence":{let r=await e.checkDivergence({includeRelease:n.include_release!==!1,probePaths:Array.isArray(n.probe_paths)?n.probe_paths.filter(a=>typeof a=="string"):void 0}),i=r.findings.filter(a=>a.status==="open").length,o=r.findings.filter(a=>a.status==="warn").length;return{ok:r.ok,open_count:i,warn_count:o,findings:r.findings,facts:r.facts,hint:r.ok?"No silent divergence detected \u2014 safe to proceed.":`${i} blocking (open) + ${o} warning finding(s). Resolve the 'open' findings \u2014 or get the user's explicit acknowledgement \u2014 BEFORE recommending push/deploy/release.`}}case"check_number_collisions":{let r=typeof n.min_files=="number"?n.min_files:void 0,i=L(n.for_path);if(i!==void 0){let l=_c(i);if(l===null)return{ok:!1,mode:"proposed_path",verdict:"no_opinion",reason:"path_not_found",path:i,namespace:null,number:null,taken:null,suggestion:null,held_by:[],hint:"No opinion \u2014 this path could not be located on disk, so no repository was scanned. Do NOT read this as free. Pass a path that exists relative to the repo you mean (nested checkouts need their own prefix, e.g. `Asgard/docs/adr/\u2026`) or an absolute path."};let p=await Ae(l.repoRoot,l.repoRelPath,{minFiles:r}),f=p.namespace,h=s(g=>g===null?null:`${f?.prefix??""}${g}`,"full"),m=f===null?"no_opinion":p.taken?"taken":"free";return{ok:m==="free",mode:"proposed_path",verdict:m,reason:m==="no_opinion"?"no_namespace":void 0,path:p.path,repo_root:l.repoRoot,namespace:f===null?null:{dir:f.dir,prefix:f.prefix,file_count:f.fileCount},number:h(p.number),taken:m==="no_opinion"?null:p.taken,suggestion:h(p.suggestion),held_by:p.sightings.map(g=>({kind:g.kind,where:g.where,path:g.path})),hint:m==="no_opinion"?"No opinion: that filename carries no number, or its directory is not a detected counter namespace. Do NOT read this as free \u2014 nothing was compared. Pass min_files to cover a series below the detection threshold.":p.taken?`${h(p.number)} is already held (see held_by). Create the file as ${h(p.suggestion)} instead \u2014 right now it costs one filename; after the index entry, the links and the commit message name it, it costs all of them.`:`${h(p.number)} is free across the default branch, sibling branches and sibling worktrees. Advisory, not a reservation: nothing stops a parallel session from taking it a second from now, so write the file rather than noting the number for later.`}}let o=Array.isArray(n.dirs)?n.dirs.filter(l=>typeof l=="string"):void 0;if(o!==void 0&&o.length>0){let l=new Map,p=[];for(let S of o){let v=Bn(S);if(v===null){p.push(S);continue}let E=l.get(v.repoRoot)??new Set;E.add(v.repoRelDir),l.set(v.repoRoot,E)}if(l.size===0)return{ok:!1,verdict:"no_opinion",reason:"dirs_not_found",unresolved_dirs:p,open_count:0,preexisting_count:0,findings:[],preexisting:[],namespaces:[],scanned:[],hint:"No opinion \u2014 none of the given dirs could be located on disk, so no repository was scanned. Do NOT read this as collision-free. Pass dirs that exist relative to the repo you mean (nested checkouts need their own prefix, e.g. `Asgard/docs/adr`) or absolute paths."};let f=[],h=[],m=[],g=[];for(let[S,v]of l){let E=[...v],R=E.includes(""),U=await It(S,{dirs:R?void 0:E,minFiles:r});f.push({repo_root:S,dirs:R?null:E}),h.push(...U.findings),m.push(...U.facts.namespaces.map(A=>({repo_root:S,dir:A.dir,prefix:A.prefix,file_count:A.fileCount}))),g.push(...U.facts.skipped)}let w=h.filter(S=>S.status==="open"),y=h.filter(S=>S.status==="info"),k=p.length>0?` ${p.length} dir(s) could not be located and were NOT scanned (see unresolved_dirs).`:"";return{ok:w.length===0,open_count:w.length,preexisting_count:y.length,findings:w,preexisting:y.map(S=>`${S.namespace.prefix}${S.number}`),namespaces:m,skipped:g,scanned:f,...p.length>0?{unresolved_dirs:p}:{},hint:(w.length===0?m.length===0?"No numbered namespace detected in the scanned dirs \u2014 nothing to collide. Pass min_files to cover a series below the detection threshold.":"No number introduced by this branch is taken elsewhere.":`${w.length} number(s) this branch adds are already taken. Renumber BEFORE pushing \u2014 afterwards every reference (links, index entries, comments) has to be rewritten.`)+k}}let a=W(),c=await e.checkNumberCollisions({minFiles:r}),d=c.findings.filter(l=>l.status==="open"),u=c.findings.filter(l=>l.status==="info");return{ok:c.ok,repo_root:a,open_count:d.length,preexisting_count:u.length,findings:d,preexisting:u.map(l=>`${l.namespace.prefix}${l.number}`),namespaces:c.facts.namespaces.map(l=>({dir:l.dir,prefix:l.prefix,file_count:l.fileCount})),skipped:c.facts.skipped,hint:(c.ok?c.facts.namespaces.length===0?"No numbered namespace detected \u2014 nothing to collide. Pass min_files to cover a series below the detection threshold.":"No number introduced by this branch is taken elsewhere.":`${d.length} number(s) this branch adds are already taken. Renumber BEFORE pushing \u2014 afterwards every reference (links, index entries, comments) has to be rewritten.`)+" Scanned repo_root only \u2014 nested checkouts inside it are separate repositories; pass dirs with their prefix to cover them."}}case"check_spec_drift":{let r=await e.checkSpecDrift({manifestPath:L(n.manifest),contracts:Array.isArray(n.contracts)?n.contracts.filter(p=>typeof p=="string"):void 0,includeBaseline:n.include_baseline!==!1}),i=s(p=>r.findings.filter(f=>f.status===p),"of"),o=i("open"),a=i("warn"),c=i("info"),d={manifest:r.facts.manifestPath,base_ref:r.facts.baseRef,skipped:r.facts.skipped};if(r.verdict==="no_opinion")return{...d,ok:!1,verdict:"no_opinion",reason:r.reason,contracts:[],findings:[],hint:`No opinion \u2014 nothing was compared. This is an ABSTENTION, NOT alignment: ${r.reason??"no contract could be read"}. Declare the pairs in ${r.facts.manifestPath} (a contract needs id, reason, spec and impl) before treating this repo as aligned.`};let u="Compares declared entries only: membership, declared fields, and order within a partition. It cannot see appearance \u2014 no CSS, no measurements, no rendering \u2014 and it only knows the pairs this repo declared.",l=o.filter(p=>p.id.startsWith("contract.unreadable:"));return{...d,ok:r.ok,verdict:r.verdict,contracts:r.contracts,open_count:o.length,warn_count:a.length,preexisting_count:c.length,findings:[...o,...a],preexisting:c.map(p=>p.id),coverage_note:u,hint:(r.ok?"The declared entries agree.":l.length>0?`${l.length} contract(s) could NOT BE MEASURED (broken pointer, not drift) and ${o.length-l.length} finding(s) are real drift. Repair the contract first \u2014 an unmeasured contract is not a passing one.`:`${o.length} blocking finding(s) introduced by this branch. On a contradiction the specification wins: read the artefact rather than a summary of it.`)+" "+u}}case"check_theme_class_drift":{let r=L(n.dir),i,o;if(r!==void 0){let l=Bn(r);if(l===null)return{ok:!1,verdict:"no_opinion",reason:"dir_not_found",repo_root:null,token_count:null,findings:[],hint:"No opinion \u2014 this directory could not be located, so no repository was scanned. Do NOT read this as clean. Pass a path that exists relative to the repo you mean (nested checkouts need their own prefix, e.g. `Asgard/Maind`) or an absolute path."};i=l.repoRoot,o=l.repoRelDir===""?void 0:[l.repoRelDir]}else i=W(),o=void 0;let a=$t(i,{dirs:o,baseRef:L(n.base_ref),includeBaseline:n.include_baseline!==!1});if(a.verdict==="no_opinion")return{ok:!1,verdict:"no_opinion",reason:"no_theme_tokens",repo_root:i,token_count:0,findings:[],hint:"No opinion \u2014 this repository declares no `--color-*`/`--background-image-*` theme tokens, so there is nothing to check classes against. That is an ABSTENTION, not a pass: a repo without tokens never gets a green tick. If this repo uses Tailwind v4 theme tokens, they were not found in any tracked .css file."};let c=a.findings.filter(l=>l.status==="open").length,d=a.findings.length-c;return{ok:a.ok,verdict:a.verdict,repo_root:i,token_count:a.tokenCount,namespace_count:a.namespaceCount,scanned_files:a.scannedFiles,findings:a.findings.map(l=>({file:l.file,class:l.klass,status:l.status,missing_token:l.token,namespace:l.namespace})),hint:(a.findings.length===0?`All house-namespace classes are covered (${a.tokenCount} tokens, ${a.namespaceCount} namespaces).`:c===0?`No dead class introduced by this branch; ${d} pre-existing (info, already at the merge-base) \u2014 inventory, not a blocker.`:`${c} dead class(es) introduced by this branch${d>0?` (plus ${d} pre-existing, info)`:""}: each generates NO CSS rule and fails silently on the finished product, typically in one colour mode only. Fix by defining the missing token or switching the class to an existing one.`)+" "+"Checks house-namespace classes against declared theme tokens only. It cannot see whether a token is used in the RIGHT place, nor dynamically composed class names (the Tailwind JIT shares that blindness)."}}case"check_table_acl_lint":{let r=Xc(L(n.dir));if(r===null)return Qc("clean","Do NOT read this as clean \u2014 nothing was scanned for table grants.");let i=jt(r.repoRoot,{dirs:r.scanDirs,baseRef:L(n.base_ref),includeBaseline:n.include_baseline!==!1}),o="Reads MIGRATIONS only: DDL applied via dashboard or raw psql is invisible (the ledger shares that blindness), schema `public` only, and REVOKEs inside DO blocks deliberately do not count (error direction: red, never a false green).";if(i.verdict==="no_opinion")return{ok:!1,verdict:"no_opinion",reason:"no_supabase_migrations",repo_root:r.repoRoot,projects:[],findings:[],hint:"No opinion \u2014 this repository has no tracked `supabase/migrations/*.sql`, so there is nothing to lint. That is an ABSTENTION, not a pass: `ok` is false and a repo outside the tool's scope never gets a green tick. If this repo does carry Supabase migrations, they are untracked or live under a prefix this scan did not reach (pass `dir`)."};let a=i.findings.filter(d=>d.status==="open"),c=i.findings.filter(d=>d.status==="info");return{ok:i.ok,verdict:i.verdict,repo_root:r.repoRoot,base_ref:i.facts.baseRef,projects:i.facts.projects.map(d=>({dir:d.dir,migration_count:d.migrationCount,table_count:d.tableCount})),open_count:a.length,preexisting_count:c.length,findings:a,preexisting:c.map(d=>d.table),skipped:i.facts.skipped,hint:(a.length===0?c.length===0?"Every table born in these migrations addresses its default grants.":`Nothing this branch introduces is exposed. ${c.length} pre-existing table(s) still carry unrevoked default grants \u2014 inventory, not a blocker.`:`${a.length} table(s) this branch adds or exposes have unrevoked default grants: anon/authenticated get full CRUD from ALTER DEFAULT PRIVILEGES, leaving RLS as the only line of defence. Add the REVOKEs in the same migration.`)+" "+o}}case"check_migration_ledger_drift":{let r=Xc(L(n.dir));if(r===null)return Qc("in sync","Do NOT read this as in sync \u2014 no repository and no database were consulted.");let i=Mi(r.repoRoot,{dirs:r.scanDirs,remoteDbUrl:L(n.remote_db_url)}),o=i.facts.projects.map(p=>({dir:p.dir,migration_count:p.migrationCount,verdict:p.verdict,database:{host:p.db.host,port:p.db.port,config_source:p.db.configSource,reachable:p.db.reachable,ledger_count:p.db.ledgerCount}}));if(i.verdict==="no_opinion")return{ok:!1,verdict:"no_opinion",reason:"no_supabase_migrations",repo_root:r.repoRoot,projects:[],findings:[],remote_consulted:i.facts.remoteConsulted,hint:"No opinion \u2014 this repository has no tracked `supabase/migrations/*.sql`, so there is no ledger question to answer. That is an ABSTENTION, not a pass: `ok` is false, and no database was contacted."};let a=s(p=>i.findings.filter(f=>f.status===p),"of"),c=a("open"),d=a("warn"),u=a("info"),l=o.map(p=>p.database.port===null?`${p.dir}: NO DATABASE (config.toml missing \u2014 a CLI here would silently use the default port 54322)`:`${p.dir}: ${p.database.host}:${p.database.port} (config from ${p.database.config_source}, reachable=${p.database.reachable}, ledger rows=${p.database.ledger_count})`).join(" \xB7 ");return{ok:i.ok,verdict:i.verdict,repo_root:r.repoRoot,projects:o,open_count:c.length,warn_count:d.length,findings:[...c,...d],expected:u.map(p=>p.id),remote_consulted:i.facts.remoteConsulted,skipped:i.facts.skipped,database_targets:l,hint:(i.verdict==="in_sync"?`Directory and ledger agree. Talked to \u2014 ${l}.`:i.verdict==="blind"?`NO JUDGEMENT POSSIBLE: the migrations exist but the database view is missing. Talked to \u2014 ${l}. This is not a pass; resolve the blindness (copy config.toml from the main checkout / start the stack / install psql) before trusting any gate or test that asserts DB guarantees.`:`${c.length} blocking + ${d.length} warning finding(s). Talked to \u2014 ${l}.`)+" Compares version prefixes, not contents: a migration edited after it was applied looks in sync here."}}case"codebase_search":{let r=L(n.query);if(!r)throw new Error("codebase_search requires a 'query' string");return(await e.searchGraph(r,{kind:L(n.kind),limit:Ne(n.limit)})).map(o=>({...o,nodeKeyHash:qn(o.nodeKey)}))}case"codebase_trace":{let r=L(n.node_key);if(!r)throw new Error("codebase_trace requires a 'node_key' string");let i=n.direction==="in"?"in":"out";return e.tracePath(r,{direction:i,maxDepth:Ne(n.max_depth),limit:Ne(n.limit)})}case"codebase_snippet":{let r=L(n.node_key);if(!r)throw new Error("codebase_snippet requires a 'node_key' string");let i=await e.getCodeSnippet(r);if(!i)throw new Error(`no symbol found for node_key: ${r}`);return{...i,nodeKeyHash:qn(r)}}case"codebase_map":return e.getArchitecture({topN:Ne(n.top_n)});case"codebase_changes":{let r=await e.changedSymbols({since:L(n.since),includeUncommitted:n.include_uncommitted!==!1,limit:Ne(n.limit)});return{changed_files:r.changedFiles,indexed_files:r.indexedFiles,truncated:r.truncated,symbols:r.symbols.map(i=>({name:i.name,qualified_name:i.qualifiedName,kind:i.kind,language:i.language,file:i.filePath,start_line:i.startLine,node_key:i.nodeKey,node_key_hash:qn(i.nodeKey)})),briefing_args:{changed_symbols:r.symbols.map(i=>({name:i.name,qualified_name:i.qualifiedName,kind:i.kind,language:i.language}))},hint:r.symbols.length>0?"Next: call codebase_change_briefing with the briefing_args block (symbol names only \u2014 no paths) to get the maind conventions and lessons that apply to these changes.":r.changedFiles>0?"Changed files found but no index rows \u2014 run codebase_index first, then retry.":"No changed files detected."}}case"codebase_review_changes":{let r=await e.reviewChanges({since:L(n.since),includeUncommitted:n.include_uncommitted!==!1,limit:Ne(n.limit)}),i;if(n.include_history!==!1)try{i=Vh(await e.fileHistory({since:L(n.since),limit:1}))}catch{i=void 0}return{changed_files:r.changedFiles,indexed_files:r.indexedFiles,stale_files:r.staleFiles,truncated:r.truncated,hunk_coverage:r.hunkCoverage,risk_flags:r.riskFlags,symbols:r.symbols.map(o=>({name:o.name,qualified_name:o.qualifiedName,kind:o.kind,language:o.language,change:o.change,changed_line_count:o.changedLineCount,stale_index:o.staleIndex,file:o.filePath,start_line:o.startLine,node_key:o.nodeKey,node_key_hash:qn(o.nodeKey)})),review_args:{changed_symbols:r.symbols.map(o=>({name:o.name,qualified_name:o.qualifiedName,kind:o.kind,language:o.language,change:o.change,changed_line_count:o.changedLineCount})),risk_flags:r.riskFlags,diff_stats:{changed_file_count:r.changedFiles,unindexed_file_count:r.changedFiles-r.indexedFiles,stale_file_count:r.staleFiles,truncated:r.truncated,hunk_coverage:r.hunkCoverage,base_kind:r.baseKind,head_sha:r.headSha,dirty:r.dirty,base_sha:r.baseSha,code_index_version:Yc},...i?{history:i}:{}},hint:r.symbols.length>0?"Next: call the cloud tool review_changes with the review_args block (symbol names + closed-enum flags only \u2014 no paths) for provenance-backed convention findings.":r.changedFiles>0?"Changed files found but no index rows \u2014 run codebase_index first, then retry.":"No changed files detected."}}case"codebase_history":{let r=Array.isArray(n.paths)?n.paths.filter(o=>typeof o=="string"):void 0,i=await e.fileHistory({paths:r,since:L(n.since),limit:Ne(n.limit),includeOwnership:n.include_ownership!==!1});return{history:i.history.map(o=>({path:o.path,last_commits:o.lastCommits.map(a=>({sha:a.sha,author_name:a.authorName,author_email:a.authorEmail,date_iso:a.dateIso,subject:a.subject})),ownership:o.ownership?{top_authors:o.ownership.topAuthors.map(a=>({name:a.name,email:a.email,commits:a.commits,last_date_iso:a.lastDateIso})),commits_in_window:o.ownership.commitsInWindow}:null})),regression:i.regression?{since_input:i.regression.sinceInput,since_resolved:i.regression.sinceResolved,truncated:i.regression.truncated,commits:i.regression.commits.map(o=>({sha:o.sha,date_iso:o.dateIso,author_name:o.authorName,subject:o.subject,files_touched:o.filesTouched}))}:null,ownership_window_commits:i.ownershipWindowCommits,paths_truncated:i.pathsTruncated,hint:i.history.length===0?"No paths in scope \u2014 pass paths explicitly, or make changes first (default scope is your changed files).":"History is local-only (Phase B): author/subject data stays on this machine \u2014 do not forward it to cloud tools."}}default:throw new Error(`unknown local tool: ${t}`)}}s(el,"dispatchLocalTool");var Jn=class{constructor(t=vc,n=null,r=W){this.makeEngine=t;this.aggregator=n;this.resolveRoot=r}static{s(this,"LocalToolRouter")}engine=null;repoRootCache=null;descriptors(){return Fi}handlesToolCall(t,n){if(t!=="tools/call")return!1;let r=n?.name;return typeof r=="string"&&Zc.has(r)}async handleToolCall(t,n){let r=n??{},i=typeof r.name=="string"?r.name:"",o=r.arguments&&typeof r.arguments=="object"?r.arguments:{};try{let a=await el(this.getEngine(),i,o),c=JSON.stringify(a,null,2);return this.recordSavings(i,a,c),JSON.stringify({jsonrpc:"2.0",id:t,result:{content:[{type:"text",text:c}]}})}catch(a){let c=a instanceof Error?a.message:String(a),d=wc(a)?`${bc} (${c})`:`codebase tool error: ${c}`;return JSON.stringify({jsonrpc:"2.0",id:t,result:{content:[{type:"text",text:d}],isError:!0}})}}augmentToolsList(t){try{let n=JSON.parse(t);if(n&&n.result&&Array.isArray(n.result.tools)){let r=new Set(n.result.tools.map(o=>o&&typeof o=="object"?o.name:void 0).filter(o=>typeof o=="string")),i=this.descriptors().filter(o=>!r.has(o.name));return n.result.tools=[...n.result.tools,...i],JSON.stringify(n)}}catch{}return t}getEngine(){return this.engine||(this.engine=this.makeEngine()),this.engine}recordSavings(t,n,r){if(this.aggregator&&!(t!=="codebase_search"&&t!=="codebase_snippet"))try{this.repoRootCache===null&&(this.repoRootCache=this.resolveRoot());let i=Ac(t,n,r,this.repoRootCache);this.aggregator.add(i)}catch{}}};var qh="https://vsddmiosisvfrairepxv.supabase.co/functions/v1";function tl(){let e=(process.env.MAIND_FUNCTIONS_ORIGIN??"").trim().replace(/\/+$/,"");return e.length>0?e:qh}s(tl,"functionsOrigin");var Jh="/mcp-client-metrics-ingest",zh=4e3,Yh="codebase_search_tokens_saved";async function nl(e){if(!Number.isFinite(e.tokensSaved)||e.tokensSaved<=0)return!1;let t=`${tl()}${Jh}`,n=new AbortController,r=setTimeout(()=>n.abort(),zh);try{let i=await fetch(t,{method:"POST",headers:{"content-type":"application/json",authorization:`Bearer ${e.apiKey}`,"x-maind-device-id":e.deviceId,"user-agent":`@maind-dev/mcp-bridge/${e.bridgeVersion}`},body:JSON.stringify({metrics:[{session_id:e.sessionId,metric_key:Yh,metric_value:Math.floor(e.tokensSaved)}]}),signal:n.signal});return await i.text().catch(()=>""),i.ok}catch(i){return process.stderr.write(`[maind-mcp-bridge] savings metric post failed (ignored): ${i instanceof Error?i.message:String(i)}
|
|
837
|
+
`),m}s(Ec,"runInstall");Ft();import{readFileSync as yh}from"node:fs";import{join as xc}from"node:path";function Wn(e){return e?Math.ceil(e.length/4):0}s(Wn,"estimateTokens");var Rc=1e6,Vn=class{static{s(this,"SavingsAggregator")}pendingTokens=0;pendingCalls=0;add(t){!Number.isFinite(t)||t<=0||(this.pendingTokens+=Math.floor(t),this.pendingCalls+=1)}hasPending(){return this.pendingTokens>0}takePending(){let t={tokens:this.pendingTokens,calls:this.pendingCalls};return this.pendingTokens=0,this.pendingCalls=0,t}};function Tc(e){try{let t=yh(e,"utf8");return t.length>Rc?t.slice(0,Rc):t}catch{return""}}s(Tc,"readFileCapped");function wh(e){if(!Array.isArray(e))return[];let t=new Set;for(let n of e){let r=n?.filePath;typeof r=="string"&&r.length>0&&t.add(r)}return[...t]}s(wh,"distinctFilePaths");function Ac(e,t,n,r){try{let i=Wn(n);if(e==="codebase_search"){let o=wh(t);if(o.length===0)return 0;let a=0;for(let c of o)a+=Wn(Tc(xc(r,c)));return Math.max(0,a-i)}if(e==="codebase_snippet"){let o=t?.filePath;if(typeof o!="string"||o.length===0)return 0;let a=Wn(Tc(xc(r,o)));return Math.max(0,a-i)}return 0}catch{return 0}}s(Ac,"measureLocalToolSaved");Ht();Ft();import{createHash as Gh}from"node:crypto";function qn(e){return Gh("sha256").update(e,"utf8").digest("hex")}s(qn,"nodeKeyHash");var Bh=["module","class","interface","function","method","type_alias","enum","variable"],Fi=[{name:"codebase_index",description:"Build or update the LOCAL codebase index for the current repo (tree-sitter \u2192 symbol graph in .maind/code-index.sqlite). Runs on this machine; nothing is uploaded. Incremental by default \u2014 only changed files are re-parsed. Call once before codebase_search/trace/map if the index is empty (see codebase_status).",inputSchema:{type:"object",properties:{full:{type:"boolean",description:"Force a full rebuild instead of incremental."}}}},{name:"codebase_status",description:"Report the local codebase index status: file/symbol/edge counts, languages, and when it was last built. Use this to decide whether to run codebase_index first.",inputSchema:{type:"object",properties:{}}},{name:"codebase_search",description:"Search indexed symbols by name/identifier (lexical FTS over function/class/method/\u2026 names, split on camelCase & snake_case). Returns matching symbols with their node_key, file, and line. Feed a node_key into codebase_snippet or codebase_trace.",inputSchema:{type:"object",properties:{query:{type:"string",description:"Search text (identifier fragments)."},kind:{type:"string",enum:Bh,description:"Restrict to a symbol kind."},limit:{type:"number",description:"Max results (default 20)."}},required:["query"]}},{name:"codebase_trace",description:"Traverse the call/dependency graph from a symbol. direction 'out' = what this symbol calls/contains/imports; 'in' = what calls/depends on it. Returns edges as node_key \u2192 node_key with the edge kind. CALLS/EXTENDS are best-effort name heuristics.",inputSchema:{type:"object",properties:{node_key:{type:"string",description:"Start symbol's node_key (from codebase_search)."},direction:{type:"string",enum:["out","in"],description:"Traversal direction (default out)."},max_depth:{type:"number",description:"BFS depth 1\u20135 (default 3)."},limit:{type:"number",description:"Max edges returned (default 100)."}},required:["node_key"]}},{name:"codebase_snippet",description:"Return the exact source text of a symbol by node_key (read locally from disk \u2014 never uploaded). Use after codebase_search/trace to read a function/class without opening the file.",inputSchema:{type:"object",properties:{node_key:{type:"string",description:"The symbol's node_key."}},required:["node_key"]}},{name:"codebase_map",description:"Architecture overview of the indexed repo: symbol-kind distribution, languages, and the most-imported (highest fan-in) modules \u2014 a cheap way to orient in an unfamiliar codebase.",inputSchema:{type:"object",properties:{top_n:{type:"number",description:"How many top modules to list (default 10)."}}}},{name:"codebase_changes",description:"Enumerate the symbols in files you changed (git diff/status against the LOCAL index \u2014 runs on this machine, nothing is uploaded). Call after finishing an edit batch, before committing. The output includes a ready-to-paste `briefing_args` block with paths deliberately stripped \u2014 feed it to the cloud tool codebase_change_briefing to get the maind conventions and lessons that apply to exactly these symbols. Requires a built index (codebase_index) for symbol enumeration; files without index rows are counted but contribute no symbols.",inputSchema:{type:"object",properties:{since:{type:"string",description:"Git ref to diff against (e.g. 'main', a SHA). Default: HEAD (= your uncommitted work)."},include_uncommitted:{type:"boolean",description:"Include uncommitted/untracked changes (default true). false requires `since`."},limit:{type:"number",description:"Max symbols (default 64, cap 200)."}}}},{name:"codebase_review_changes",description:"Review-grade change enumeration (ADR-228): like codebase_changes, but hunk-aware \u2014 each symbol is graded added|modified|co_located by intersecting git diff hunks with symbol spans (runs on this machine, nothing is uploaded), plus closed-enum risk_flags from the raw path list (SQL migrations, RLS/SECURITY DEFINER, CI workflows, env files \u2014 files the index itself cannot see). The output's `review_args` block is path-free by construction \u2014 feed it to the cloud tool review_changes for provenance-backed convention findings. diff_stats carries the attest anchors (head_sha, dirty, resolved base_sha \u2014 commit object hashes, no source): pass them through to review_verdict to persist a replayable review_runs record (ADR-230). Requires a FRESH index (codebase_index) \u2014 stale files degrade honestly to co_located.",inputSchema:{type:"object",properties:{since:{type:"string",description:"Git ref to diff against (e.g. 'main', a SHA). Default: HEAD (= your uncommitted work)."},include_uncommitted:{type:"boolean",description:"Include uncommitted/untracked changes (default true). false requires `since`."},limit:{type:"number",description:"Max symbols (default 64, cap 200)."},include_history:{type:"boolean",description:"Attach a counts-only regression context (`history`: churn/authors/age as NUMBERS \u2014 no names, subjects, or paths) to review_args for the cloud review (default true)."}}}},{name:"codebase_history",description:"Git history for files/directories \u2014 recent commits, ownership ('who worked here last / most'), and an optional regression window ('what changed in X since Y'). Runs on this machine via local git, nothing is uploaded; output may include commit authors and subjects, which stay local BY DESIGN (Phase B privacy: history is never synced to the cloud \u2014 do not paste author/subject data into cloud tools). Works without a built index. When paths is omitted, defaults to the files you currently changed. Ownership is aggregated over a bounded recent-commit window (reported as ownership_window_commits).",inputSchema:{type:"object",properties:{paths:{type:"array",items:{type:"string"},description:"Files or directories to inspect (repo-relative). Default: your currently changed files. Cap 50."},since:{type:"string",description:"Regression window start: a git ref (resolved first) or a date string (e.g. '2026-06-01'). Omit for recent+ownership only."},limit:{type:"number",description:"Max recent commits per path (default 20, cap 100)."},include_ownership:{type:"boolean",description:"Aggregate per-path ownership (default true)."}}}},{name:"check_divergence",description:"Local silent-divergence detector (ADR-238): check whether the repo/worktree state has quietly diverged from what git/CLI success messages imply \u2014 the recurring AI-coding failure where a command reports 'ok / up to date / done' while upstream, worktree, or release state is actually wrong. Runs entirely on this machine (git + fs), nothing is uploaded. Returns findings in the open|warn|info vocabulary with fix hints, covering: branch/remote (no upstream, upstream tracking the WRONG branch, never-pushed, ahead/behind/diverged), worktree (detached HEAD, in-progress rebase/merge, uncommitted work on the shared base tree, tooling files missing vs the main checkout so tools silently target the wrong project, and a workspace package whose build/dist artifacts are OLDER than its src \u2014 after a rebase/pull nothing rebuilds, so typecheck reads stale types and fails on code you never touched while CI stays green), and release (all CI checks red \u2192 suspect account/billing/quota, not your code). Call this WHEN: (a) you are about to recommend or run git push / a deploy / a release; (b) a git/supabase/CLI command reported success but the result looks wrong; (c) at the start of work in a fresh worktree or right after a rebase/pull that touched workspace packages. An 'open' finding means proceed only after it is resolved or the user explicitly acknowledges it. VERDICTS: `clean` (measured, nothing open or warn), `diverged` (measured, at least one), `no_opinion` (the directory is not a git work tree \u2014 nothing was examined). Read the verdict, never `findings.length` alone: an empty finding list under `no_opinion` is an ABSTENTION, not a pass, and `ok` is false. A directory outside a repository never gets a green tick.",inputSchema:{type:"object",properties:{include_release:{type:"boolean",description:"Query gh for the all-checks-red signal (default true). Set false for a fully offline check."},probe_paths:{type:"array",items:{type:"string"},description:"Extra repo-relative worktree-parity probe paths, beyond the defaults + a committed .maind/worktree-requirements manifest."}}}},{name:"check_number_collisions",description:"Local guard against a numbered namespace being claimed twice (ADR-250): filenames carrying a sequential counter \u2014 ADR-248-*.md, 0001-use-postgres.md (adr-tools), RFC-12-*, Supabase migration slots \u2014 are a distributed counter with NO allocator. Two parallel agent sessions each list the directory, each see N as the highest, each write N+1: both are individually correct and the duplicate exists only in the union on the default branch, where it surfaces at merge time (or, for migrations, as a silently skipped push). Runs entirely on this machine (git + fs), nothing is uploaded. Namespaces are DISCOVERED, not configured \u2014 no prefix is hardcoded, and date-stamped families (BRIEF-2026-\u2026) are rejected because a counter's numbers are near-unique while a date family's repeat. Consults four sources, and the fourth is the point: the default branch, all other local branches, all SIBLING WORKTREES INCLUDING THEIR UNCOMMITTED FILES, and your own tree \u2014 the competing file is typically in no pushed commit yet. Findings use open|warn|info: `open` = THIS branch introduces the clash (act on it), `info` = the collision predates your work (inventory, not your problem). Call this WHEN: (a) you are about to create a file in a numbered series \u2014 an ADR, RFC, migration, numbered spec \u2014 and picked the number by listing the directory; (b) before pushing a branch that adds such a file; (c) a merge conflicted in an index/README that lists numbered documents. An `open` finding means renumber BEFORE pushing \u2014 resolving it after the merge means rewriting every reference. (d) BEST of all, pass `for_path` with the path you are about to create and get the verdict plus the next free number BEFORE the file exists \u2014 the only moment where fixing it costs one filename instead of a filename plus every index entry, link and comment that names it (ADR-263).",inputSchema:{type:"object",properties:{dirs:{type:"array",items:{type:"string"},description:'Restrict detection to these directories (default: the workspace repo). Each dir is resolved FROM ITS OWN PATH (absolute, or relative to the workspace / cwd) and scanned in the repository it belongs to \u2014 nested checkouts work when you give their prefix, e.g. "Asgard/docs/adr". Dirs that cannot be located are listed in `unresolved_dirs` and NOT scanned; if none resolve, the answer is `verdict: "no_opinion"` \u2014 an abstention, not collision-free. `scanned` shows which repo root was actually swept.'},min_files:{type:"number",description:"How many files must share a prefix before it counts as a namespace (default 3). Lower it to cover a young series that is still below the threshold."},for_path:{type:"string",description:'A path you are ABOUT to create, e.g. "docs/adr/ADR-263-retry-policy.md". Switches the tool from auditing what exists to answering the allocator question for a file that does not exist yet: is that number already held, and which is the next free one. Scoped to that file\'s own directory, so it is the cheap call. The repository is resolved FROM THIS PATH (absolute, or relative to the workspace / cwd), so nested checkouts work \u2014 give the prefix that locates the file, e.g. "Asgard/docs/adr/\u2026". Read `verdict` ("free" | "taken" | "no_opinion"), never `taken` alone: when the path cannot be located or its directory is no counter namespace, the answer is `no_opinion` \u2014 that is an abstention, NOT a free number.'}}}},{name:"check_spec_drift",description:"Local specification-fidelity detector (ADR-292): check whether an implementation still matches the NORMATIVE LIST it is supposed to implement \u2014 a design artefact, an OpenAPI document, a feature-flag catalogue, a permission matrix. The failure it catches is building against a PROSE SUMMARY of the specification instead of the specification: on 2026-08-19 a nav registry reached the default branch with 22 of the 40 targets its design artefact declares, and it surfaced only on the finished product. The specification was not missing \u2014 nothing in the system knew it existed. Runs entirely on this machine (git + fs), nothing is uploaded. The pairs to compare are DECLARED BY THIS REPO in `.maind/spec-contracts.json`; the manifest declares EXTRACTION, not content, so it never holds a copy of the expected values. Findings use open|warn|info across five closed dimensions: `coverage` (declared, not implemented), `fields` (implemented in the wrong group/section), `order` (right set, wrong sequence \u2014 the class a set comparison structurally cannot see), `extra` (implemented, not declared \u2014 a warning, the spec may lag) and `unrealized` (a key with no artefact behind it). Pre-existing findings grade `info` against the merge-base, so only what THIS branch introduces blocks. Call this WHEN: (a) you changed either side of a declared pair; (b) before opening or merging a PR that touches a registry, a router, a catalogue or the artefact that governs it; (c) you are about to build from a plan, handoff or ADR that SUMMARISES a specification \u2014 read the artefact, then verify with this. TWO THINGS IT DOES NOT DO. First: an absent manifest returns `verdict: no_opinion` \u2014 that is an abstention, NOT alignment; a repo that declares nothing never gets a green tick, and `ok` is false. Second: it cannot see APPEARANCE. No CSS, no measurements, no rendering. A green result means the declared entries agree in membership, grouping and order \u2014 it says nothing else about the thing you built. A `contract.unreadable:<id>` finding is a BROKEN POINTER (an anchor symbol moved), never a drift report: nothing was compared for that contract.",inputSchema:{type:"object",properties:{manifest:{type:"string",description:'Repo-relative manifest path (default ".maind/spec-contracts.json"). Point it at a throwaway path to see the abstention: `verdict: "no_opinion"`, `ok: false`.'},contracts:{type:"array",items:{type:"string"},description:"Restrict the run to these contract ids. Omit to evaluate every contract the manifest declares."},include_baseline:{type:"boolean",description:"Compare against the merge-base so pre-existing findings grade `info` instead of `open` (default true). false reports EVERY finding as newly introduced \u2014 useful for a full inventory, wrong for a gate."}}}},{name:"check_theme_class_drift",description:"Local dead-theme-class detector (ADR-303): find Tailwind utility classes that point at a theme token which does NOT exist. In Tailwind v4 an unknown theme colour generates NO rule \u2014 no error, no warning, the class is a silent no-op and the element simply has no background or colour. Neither tsc nor eslint nor the build can see it; it surfaces on the finished product, and typically in only ONE of the two colour modes (the sibling `dark:` class usually exists, which is exactly why it hides). Real incident 2026-08-26: `bg-surface-white` sat in nine files with no `--color-surface-white` anywhere; light-mode menus rendered without a background and read as a z-index bug. Runs entirely on this machine (git + fs), nothing is uploaded. The rule is sharp enough to gate on: only HOUSE namespaces are checked, and the namespaces are DERIVED from the repo's own `--color-*` and `--background-image-*` tokens (from `--color-surface-alt` follows `surface`) \u2014 `bg-red-500` or `text-xs` can never enter the check, so there is no judgement call and no config. Prose and template interpolation are excluded (a real class name never ends at a hyphen). Verdicts: `clean` (every house class is covered), `drift` (dead classes found \u2014 the findings name file, class and the missing token), `no_opinion` (the repo declares NO theme tokens; that is an ABSTENTION, not a pass \u2014 `ok` is false, and a repo without tokens never gets a green tick). Call this WHEN: (a) you added or renamed a Tailwind theme token, or wrote a `bg-`/`text-`/`border-`-style class using a house palette name from memory; (b) a surface renders without background/colour in one mode while looking fine in the other \u2014 check for a dead class BEFORE reaching for z-index; (c) before merging a branch that touches styling or tokens.css; (d) auditing a repo you did not write. What it structurally cannot see: whether a token is used in the RIGHT place (a syntactically valid dark background on a light surface), and dynamically composed class names \u2014 the Tailwind JIT shares that blindness. GRADING (ADR-323): every finding carries `status` \u2014 `open` = introduced by THIS branch (working tree compared against the merge-base with the default branch), `info` = already present at the merge-base (inventory, not your problem). `ok` is true only when no `open` finding exists and never under `no_opinion`; `verdict` stays descriptive and reads `drift` whenever any dead class exists at all. Without a resolvable baseline every finding is `open` \u2014 ungraded is honest, guessed is not.",inputSchema:{type:"object",properties:{dir:{type:"string",description:'Restrict the SOURCE scan to this directory (absolute, or relative to the workspace / cwd). The repository is resolved FROM THIS PATH, so nested checkouts work \u2014 give the prefix that locates the code, e.g. "Asgard/Maind". Token discovery always sweeps that whole repository: a scoped scan against a partial token set would fabricate findings. Omit to scan the workspace repo.'},base_ref:{type:"string",description:"Grade open-vs-info against this git ref instead of the resolved default branch (e.g. a release tag). Findings that already exist at the merge-base with it are `info`."},include_baseline:{type:"boolean",description:"Compare against the merge-base so pre-existing findings grade `info` instead of `open` (default true). false reports EVERY finding as newly introduced \u2014 useful for a full inventory of an unfamiliar repo, wrong for a gate."}}}},{name:"check_table_acl_lint",description:"Local Supabase table-ACL lint (ADR-309): find tables whose DEFAULT GRANTS were never revoked. Supabase's `ALTER DEFAULT PRIVILEGES` grants SELECT/INSERT/UPDATE/DELETE on EVERY new table in `public` to `anon` AND `authenticated` \u2014 and `REVOKE \u2026 FROM PUBLIC` does NOT remove that, because default privileges are direct role grants. Nothing enforces the counter-REVOKE; it is pure author discipline, so the leak is invisible until someone audits the live database. Real incident 2026-08-26: four tables carried full CRUD for anon and authenticated into production for up to eleven weeks (RLS held, the second line of defence simply did not exist). Runs entirely on this machine (git + fs), NO database is consulted, nothing is uploaded. The statement is about the FOLDED MIGRATION HISTORY, not about one file: CREATE/DROP/RENAME are folded in version order, and a REVOKE delivered in a LATER migration counts \u2014 which is exactly what a per-file lint cannot see. Two conditions per surviving public table: (A) some table-level REVOKE naming `anon` EXPLICITLY (PUBLIC alone never counts), and (B) table-level REVOKEs naming `authenticated` that cumulatively cover INSERT+UPDATE+DELETE (ALL covers). SELECT for `authenticated` may stay \u2014 the RLS-scoped read pattern is deliberate, not a leak. Findings grade `open` when THIS branch introduces them (new table without revokes, or a deleted revoke) and `info` when they predate the merge-base \u2014 inventory, not your problem. Verdicts: `clean`, `exposed`, `no_opinion`. Call this WHEN: (a) you added a `CREATE TABLE` migration \u2014 before opening the PR; (b) you are auditing a Supabase repo you did not write; (c) an RLS policy is being relaxed or removed, so the grant layer becomes load-bearing. TWO THINGS IT DOES NOT DO. First: `no_opinion` (a repo with no tracked `supabase/migrations/*.sql`) is an ABSTENTION, not a pass \u2014 `ok` is false, and a repo outside the tool's scope never gets a green tick. Second: it only sees MIGRATIONS. DDL applied through the dashboard or raw psql is invisible to it (the migration ledger shares that blindness), it covers schema `public` only, and REVOKEs inside `DO $$` blocks deliberately do NOT count \u2014 the error direction is always red, never a false green.",inputSchema:{type:"object",properties:{dir:{type:"string",description:'Restrict discovery to this directory (absolute, or relative to the workspace / cwd). The repository is resolved FROM THIS PATH, so nested checkouts work \u2014 give the prefix that locates the project, e.g. "Asgard/Maind". Omit to sweep every Supabase project in the workspace repo.'},base_ref:{type:"string",description:"Grade open-vs-info against this git ref instead of the resolved default branch (e.g. a release tag). Findings that already exist there are `info`."},include_baseline:{type:"boolean",description:"Compare against the merge-base so pre-existing findings grade `info` instead of `open` (default true). false reports EVERY finding as newly introduced \u2014 useful for a full inventory of an unfamiliar repo, wrong for a gate."}}}},{name:"check_migration_ledger_drift",description:"Local Supabase migration-ledger drift detector (ADR-309) \u2014 and it ALWAYS reports WHICH DATABASE it talked to (host, port, and where the port came from). Compares three things per Supabase project: the tracked migrations directory, the ledger (`supabase_migrations.schema_migrations`) of the ACTUALLY connected local database, and \u2014 only with an explicitly supplied source \u2014 a remote ledger. Runs on this machine; read-only by construction (a single SELECT, never a repair, never an insert, never `db reset`), nothing is uploaded. Two real incidents on 2026-08-26 shaped it: (1) `supabase/config.toml` is gitignored and therefore missing in every fresh git worktree; without it the CLI falls back to its DEFAULT port 54322, where a DIFFERENT project's database was listening \u2014 `migration repair --status applied --local` reported `INSERT 0 1` and success while writing into a foreign ledger. This tool therefore NEVER guesses a port: no config means no connection, and the refusal is itself the finding. (2) With the local schema behind the repo, a promote gate skipped its SQL assertions SILENTLY \u2014 so a file without a ledger row is an `open` finding (`ledger.behind`), not a footnote. A ledger row WITHOUT a file is first EXPLAINED, then judged: if that version exists as a file in a SIBLING WORKTREE it is that branch's work-in-progress on the shared local stack (`info`, the expected steady state \u2014 local \u2287 trunk; do NOT 'repair' it, that would un-book a running session's work); only an unexplained row is a phantom (`warn`). Verdicts: `in_sync`, `drift`, `blind`, `no_opinion`. Call this WHEN: (a) you are starting work in a fresh worktree, BEFORE any `supabase` command; (b) a migration/CLI command reported success but the result looks wrong; (c) before running a gate or test suite that asserts DB guarantees \u2014 a run against a stale schema checks yesterday's guarantees and reports green for today's migration; (d) before a `db push`. READ THE VERDICT, NEVER `findings.length` ALONE: `blind` means the question is valid but the DB view is missing (`config_missing` = open, the silent-redirect class; `db_unreachable` / `psql_missing` / `no_ledger_schema` = warn \u2014 a port that answers WITHOUT a Supabase ledger suggests you are pointed at a foreign database). `no_opinion` (no tracked migrations) is an ABSTENTION, not a pass. `ok` is true only for `in_sync` \u2014 'I do not know which database you are talking to' is never ok. It compares VERSION PREFIXES, not contents: a migration edited after it was applied looks in sync here.",inputSchema:{type:"object",properties:{dir:{type:"string",description:'Restrict discovery to this directory (absolute, or relative to the workspace / cwd). The repository is resolved FROM THIS PATH, so nested checkouts work \u2014 give the prefix that locates the project, e.g. "Asgard/Maind". Omit to check every Supabase project in the workspace repo.'},remote_db_url:{type:"string",description:"Optional connection string for a REMOTE ledger (e.g. the cloud project). Only read (SELECT). Omitted \u21D2 no remote comparison happens at all and `facts.remote_consulted` is false \u2014 the tool never hunts for credentials on its own."}}}}],Zc=new Set(Fi.map(e=>e.name));function L(e){return typeof e=="string"&&e.length>0?e:void 0}s(L,"str");var Wh=10;function Vh(e,t=Date.now()){if(e.history.length===0)return;let n=new Set,r=0,i=0,o=0;for(let a of e.history){let c=a.ownership?.commitsInWindow??a.lastCommits.length;c>=Wh&&r++,c>i&&(i=c);for(let u of a.ownership?.topAuthors??[])n.add(u.email.toLowerCase()||u.name);let d=a.lastCommits[0]?.dateIso;if(d){let u=Date.parse(d);Number.isFinite(u)&&u>o&&(o=u)}}return{window_commits:e.ownershipWindowCommits,files_scanned:e.history.length,hot_files:r,max_recent_commits:i,distinct_authors:n.size,newest_change_age_days:o>0?Math.max(0,Math.floor((t-o)/864e5)):0}}s(Vh,"aggregateHistoryContext");function Ne(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}s(Ne,"num");function Xc(e){if(e===void 0)return{repoRoot:W(),scanDirs:void 0};let t=Bn(e);return t===null?null:{repoRoot:t.repoRoot,scanDirs:t.repoRelDir===""?void 0:[t.repoRelDir]}}s(Xc,"anchorRepo");function Qc(e,t){return{ok:!1,verdict:"no_opinion",reason:"dir_not_found",repo_root:null,projects:[],findings:[],hint:`No opinion \u2014 this directory could not be located, so no repository was scanned. ${t} Pass a path that exists relative to the repo you mean (nested checkouts need their own prefix, e.g. \`Asgard/Maind\`) or an absolute path. Nothing was verified as ${e}.`}}s(Qc,"dirNotFound");async function el(e,t,n){switch(t){case"codebase_index":return e.indexRepository({full:n.full===!0});case"codebase_status":return e.status();case"check_divergence":{let r=await e.checkDivergence({includeRelease:n.include_release!==!1,probePaths:Array.isArray(n.probe_paths)?n.probe_paths.filter(a=>typeof a=="string"):void 0});if(r.verdict==="no_opinion")return{ok:!1,verdict:r.verdict,reason:r.reason,open_count:0,warn_count:0,findings:[],facts:r.facts,hint:"No opinion \u2014 this directory is not a git work tree, so nothing was examined. That is an ABSTENTION, not a pass: it says nothing about whether the state is sound. Run the check from inside the repository you mean (nested checkouts need their own path)."};let i=r.findings.filter(a=>a.status==="open").length,o=r.findings.filter(a=>a.status==="warn").length;return{ok:r.ok,verdict:r.verdict,reason:r.reason,open_count:i,warn_count:o,findings:r.findings,facts:r.facts,hint:r.ok?"No silent divergence detected \u2014 safe to proceed.":`${i} blocking (open) + ${o} warning finding(s). Resolve the 'open' findings \u2014 or get the user's explicit acknowledgement \u2014 BEFORE recommending push/deploy/release.`}}case"check_number_collisions":{let r=typeof n.min_files=="number"?n.min_files:void 0,i=L(n.for_path);if(i!==void 0){let l=_c(i);if(l===null)return{ok:!1,mode:"proposed_path",verdict:"no_opinion",reason:"path_not_found",path:i,namespace:null,number:null,taken:null,suggestion:null,held_by:[],hint:"No opinion \u2014 this path could not be located on disk, so no repository was scanned. Do NOT read this as free. Pass a path that exists relative to the repo you mean (nested checkouts need their own prefix, e.g. `Asgard/docs/adr/\u2026`) or an absolute path."};let p=await Ae(l.repoRoot,l.repoRelPath,{minFiles:r}),f=p.namespace,h=s(g=>g===null?null:`${f?.prefix??""}${g}`,"full"),m=f===null?"no_opinion":p.taken?"taken":"free";return{ok:m==="free",mode:"proposed_path",verdict:m,reason:m==="no_opinion"?"no_namespace":void 0,path:p.path,repo_root:l.repoRoot,namespace:f===null?null:{dir:f.dir,prefix:f.prefix,file_count:f.fileCount},number:h(p.number),taken:m==="no_opinion"?null:p.taken,suggestion:h(p.suggestion),held_by:p.sightings.map(g=>({kind:g.kind,where:g.where,path:g.path})),hint:m==="no_opinion"?"No opinion: that filename carries no number, or its directory is not a detected counter namespace. Do NOT read this as free \u2014 nothing was compared. Pass min_files to cover a series below the detection threshold.":p.taken?`${h(p.number)} is already held (see held_by). Create the file as ${h(p.suggestion)} instead \u2014 right now it costs one filename; after the index entry, the links and the commit message name it, it costs all of them.`:`${h(p.number)} is free across the default branch, sibling branches and sibling worktrees. Advisory, not a reservation: nothing stops a parallel session from taking it a second from now, so write the file rather than noting the number for later.`}}let o=Array.isArray(n.dirs)?n.dirs.filter(l=>typeof l=="string"):void 0;if(o!==void 0&&o.length>0){let l=new Map,p=[];for(let S of o){let v=Bn(S);if(v===null){p.push(S);continue}let E=l.get(v.repoRoot)??new Set;E.add(v.repoRelDir),l.set(v.repoRoot,E)}if(l.size===0)return{ok:!1,verdict:"no_opinion",reason:"dirs_not_found",unresolved_dirs:p,open_count:0,preexisting_count:0,findings:[],preexisting:[],namespaces:[],scanned:[],hint:"No opinion \u2014 none of the given dirs could be located on disk, so no repository was scanned. Do NOT read this as collision-free. Pass dirs that exist relative to the repo you mean (nested checkouts need their own prefix, e.g. `Asgard/docs/adr`) or absolute paths."};let f=[],h=[],m=[],g=[];for(let[S,v]of l){let E=[...v],R=E.includes(""),U=await It(S,{dirs:R?void 0:E,minFiles:r});f.push({repo_root:S,dirs:R?null:E}),h.push(...U.findings),m.push(...U.facts.namespaces.map(A=>({repo_root:S,dir:A.dir,prefix:A.prefix,file_count:A.fileCount}))),g.push(...U.facts.skipped)}let w=h.filter(S=>S.status==="open"),y=h.filter(S=>S.status==="info"),k=p.length>0?` ${p.length} dir(s) could not be located and were NOT scanned (see unresolved_dirs).`:"";return{ok:w.length===0,open_count:w.length,preexisting_count:y.length,findings:w,preexisting:y.map(S=>`${S.namespace.prefix}${S.number}`),namespaces:m,skipped:g,scanned:f,...p.length>0?{unresolved_dirs:p}:{},hint:(w.length===0?m.length===0?"No numbered namespace detected in the scanned dirs \u2014 nothing to collide. Pass min_files to cover a series below the detection threshold.":"No number introduced by this branch is taken elsewhere.":`${w.length} number(s) this branch adds are already taken. Renumber BEFORE pushing \u2014 afterwards every reference (links, index entries, comments) has to be rewritten.`)+k}}let a=W(),c=await e.checkNumberCollisions({minFiles:r}),d=c.findings.filter(l=>l.status==="open"),u=c.findings.filter(l=>l.status==="info");return{ok:c.ok,repo_root:a,open_count:d.length,preexisting_count:u.length,findings:d,preexisting:u.map(l=>`${l.namespace.prefix}${l.number}`),namespaces:c.facts.namespaces.map(l=>({dir:l.dir,prefix:l.prefix,file_count:l.fileCount})),skipped:c.facts.skipped,hint:(c.ok?c.facts.namespaces.length===0?"No numbered namespace detected \u2014 nothing to collide. Pass min_files to cover a series below the detection threshold.":"No number introduced by this branch is taken elsewhere.":`${d.length} number(s) this branch adds are already taken. Renumber BEFORE pushing \u2014 afterwards every reference (links, index entries, comments) has to be rewritten.`)+" Scanned repo_root only \u2014 nested checkouts inside it are separate repositories; pass dirs with their prefix to cover them."}}case"check_spec_drift":{let r=await e.checkSpecDrift({manifestPath:L(n.manifest),contracts:Array.isArray(n.contracts)?n.contracts.filter(p=>typeof p=="string"):void 0,includeBaseline:n.include_baseline!==!1}),i=s(p=>r.findings.filter(f=>f.status===p),"of"),o=i("open"),a=i("warn"),c=i("info"),d={manifest:r.facts.manifestPath,base_ref:r.facts.baseRef,skipped:r.facts.skipped};if(r.verdict==="no_opinion")return{...d,ok:!1,verdict:"no_opinion",reason:r.reason,contracts:[],findings:[],hint:`No opinion \u2014 nothing was compared. This is an ABSTENTION, NOT alignment: ${r.reason??"no contract could be read"}. Declare the pairs in ${r.facts.manifestPath} (a contract needs id, reason, spec and impl) before treating this repo as aligned.`};let u="Compares declared entries only: membership, declared fields, and order within a partition. It cannot see appearance \u2014 no CSS, no measurements, no rendering \u2014 and it only knows the pairs this repo declared.",l=o.filter(p=>p.id.startsWith("contract.unreadable:"));return{...d,ok:r.ok,verdict:r.verdict,contracts:r.contracts,open_count:o.length,warn_count:a.length,preexisting_count:c.length,findings:[...o,...a],preexisting:c.map(p=>p.id),coverage_note:u,hint:(r.ok?"The declared entries agree.":l.length>0?`${l.length} contract(s) could NOT BE MEASURED (broken pointer, not drift) and ${o.length-l.length} finding(s) are real drift. Repair the contract first \u2014 an unmeasured contract is not a passing one.`:`${o.length} blocking finding(s) introduced by this branch. On a contradiction the specification wins: read the artefact rather than a summary of it.`)+" "+u}}case"check_theme_class_drift":{let r=L(n.dir),i,o;if(r!==void 0){let l=Bn(r);if(l===null)return{ok:!1,verdict:"no_opinion",reason:"dir_not_found",repo_root:null,token_count:null,findings:[],hint:"No opinion \u2014 this directory could not be located, so no repository was scanned. Do NOT read this as clean. Pass a path that exists relative to the repo you mean (nested checkouts need their own prefix, e.g. `Asgard/Maind`) or an absolute path."};i=l.repoRoot,o=l.repoRelDir===""?void 0:[l.repoRelDir]}else i=W(),o=void 0;let a=$t(i,{dirs:o,baseRef:L(n.base_ref),includeBaseline:n.include_baseline!==!1});if(a.verdict==="no_opinion")return{ok:!1,verdict:"no_opinion",reason:"no_theme_tokens",repo_root:i,token_count:0,findings:[],hint:"No opinion \u2014 this repository declares no `--color-*`/`--background-image-*` theme tokens, so there is nothing to check classes against. That is an ABSTENTION, not a pass: a repo without tokens never gets a green tick. If this repo uses Tailwind v4 theme tokens, they were not found in any tracked .css file."};let c=a.findings.filter(l=>l.status==="open").length,d=a.findings.length-c;return{ok:a.ok,verdict:a.verdict,repo_root:i,token_count:a.tokenCount,namespace_count:a.namespaceCount,scanned_files:a.scannedFiles,findings:a.findings.map(l=>({file:l.file,class:l.klass,status:l.status,missing_token:l.token,namespace:l.namespace})),hint:(a.findings.length===0?`All house-namespace classes are covered (${a.tokenCount} tokens, ${a.namespaceCount} namespaces).`:c===0?`No dead class introduced by this branch; ${d} pre-existing (info, already at the merge-base) \u2014 inventory, not a blocker.`:`${c} dead class(es) introduced by this branch${d>0?` (plus ${d} pre-existing, info)`:""}: each generates NO CSS rule and fails silently on the finished product, typically in one colour mode only. Fix by defining the missing token or switching the class to an existing one.`)+" "+"Checks house-namespace classes against declared theme tokens only. It cannot see whether a token is used in the RIGHT place, nor dynamically composed class names (the Tailwind JIT shares that blindness)."}}case"check_table_acl_lint":{let r=Xc(L(n.dir));if(r===null)return Qc("clean","Do NOT read this as clean \u2014 nothing was scanned for table grants.");let i=jt(r.repoRoot,{dirs:r.scanDirs,baseRef:L(n.base_ref),includeBaseline:n.include_baseline!==!1}),o="Reads MIGRATIONS only: DDL applied via dashboard or raw psql is invisible (the ledger shares that blindness), schema `public` only, and REVOKEs inside DO blocks deliberately do not count (error direction: red, never a false green).";if(i.verdict==="no_opinion")return{ok:!1,verdict:"no_opinion",reason:"no_supabase_migrations",repo_root:r.repoRoot,projects:[],findings:[],hint:"No opinion \u2014 this repository has no tracked `supabase/migrations/*.sql`, so there is nothing to lint. That is an ABSTENTION, not a pass: `ok` is false and a repo outside the tool's scope never gets a green tick. If this repo does carry Supabase migrations, they are untracked or live under a prefix this scan did not reach (pass `dir`)."};let a=i.findings.filter(d=>d.status==="open"),c=i.findings.filter(d=>d.status==="info");return{ok:i.ok,verdict:i.verdict,repo_root:r.repoRoot,base_ref:i.facts.baseRef,projects:i.facts.projects.map(d=>({dir:d.dir,migration_count:d.migrationCount,table_count:d.tableCount})),open_count:a.length,preexisting_count:c.length,findings:a,preexisting:c.map(d=>d.table),skipped:i.facts.skipped,hint:(a.length===0?c.length===0?"Every table born in these migrations addresses its default grants.":`Nothing this branch introduces is exposed. ${c.length} pre-existing table(s) still carry unrevoked default grants \u2014 inventory, not a blocker.`:`${a.length} table(s) this branch adds or exposes have unrevoked default grants: anon/authenticated get full CRUD from ALTER DEFAULT PRIVILEGES, leaving RLS as the only line of defence. Add the REVOKEs in the same migration.`)+" "+o}}case"check_migration_ledger_drift":{let r=Xc(L(n.dir));if(r===null)return Qc("in sync","Do NOT read this as in sync \u2014 no repository and no database were consulted.");let i=Mi(r.repoRoot,{dirs:r.scanDirs,remoteDbUrl:L(n.remote_db_url)}),o=i.facts.projects.map(p=>({dir:p.dir,migration_count:p.migrationCount,verdict:p.verdict,database:{host:p.db.host,port:p.db.port,config_source:p.db.configSource,reachable:p.db.reachable,ledger_count:p.db.ledgerCount}}));if(i.verdict==="no_opinion")return{ok:!1,verdict:"no_opinion",reason:"no_supabase_migrations",repo_root:r.repoRoot,projects:[],findings:[],remote_consulted:i.facts.remoteConsulted,hint:"No opinion \u2014 this repository has no tracked `supabase/migrations/*.sql`, so there is no ledger question to answer. That is an ABSTENTION, not a pass: `ok` is false, and no database was contacted."};let a=s(p=>i.findings.filter(f=>f.status===p),"of"),c=a("open"),d=a("warn"),u=a("info"),l=o.map(p=>p.database.port===null?`${p.dir}: NO DATABASE (config.toml missing \u2014 a CLI here would silently use the default port 54322)`:`${p.dir}: ${p.database.host}:${p.database.port} (config from ${p.database.config_source}, reachable=${p.database.reachable}, ledger rows=${p.database.ledger_count})`).join(" \xB7 ");return{ok:i.ok,verdict:i.verdict,repo_root:r.repoRoot,projects:o,open_count:c.length,warn_count:d.length,findings:[...c,...d],expected:u.map(p=>p.id),remote_consulted:i.facts.remoteConsulted,skipped:i.facts.skipped,database_targets:l,hint:(i.verdict==="in_sync"?`Directory and ledger agree. Talked to \u2014 ${l}.`:i.verdict==="blind"?`NO JUDGEMENT POSSIBLE: the migrations exist but the database view is missing. Talked to \u2014 ${l}. This is not a pass; resolve the blindness (copy config.toml from the main checkout / start the stack / install psql) before trusting any gate or test that asserts DB guarantees.`:`${c.length} blocking + ${d.length} warning finding(s). Talked to \u2014 ${l}.`)+" Compares version prefixes, not contents: a migration edited after it was applied looks in sync here."}}case"codebase_search":{let r=L(n.query);if(!r)throw new Error("codebase_search requires a 'query' string");return(await e.searchGraph(r,{kind:L(n.kind),limit:Ne(n.limit)})).map(o=>({...o,nodeKeyHash:qn(o.nodeKey)}))}case"codebase_trace":{let r=L(n.node_key);if(!r)throw new Error("codebase_trace requires a 'node_key' string");let i=n.direction==="in"?"in":"out";return e.tracePath(r,{direction:i,maxDepth:Ne(n.max_depth),limit:Ne(n.limit)})}case"codebase_snippet":{let r=L(n.node_key);if(!r)throw new Error("codebase_snippet requires a 'node_key' string");let i=await e.getCodeSnippet(r);if(!i)throw new Error(`no symbol found for node_key: ${r}`);return{...i,nodeKeyHash:qn(r)}}case"codebase_map":return e.getArchitecture({topN:Ne(n.top_n)});case"codebase_changes":{let r=await e.changedSymbols({since:L(n.since),includeUncommitted:n.include_uncommitted!==!1,limit:Ne(n.limit)});return{changed_files:r.changedFiles,indexed_files:r.indexedFiles,truncated:r.truncated,symbols:r.symbols.map(i=>({name:i.name,qualified_name:i.qualifiedName,kind:i.kind,language:i.language,file:i.filePath,start_line:i.startLine,node_key:i.nodeKey,node_key_hash:qn(i.nodeKey)})),briefing_args:{changed_symbols:r.symbols.map(i=>({name:i.name,qualified_name:i.qualifiedName,kind:i.kind,language:i.language}))},hint:r.symbols.length>0?"Next: call codebase_change_briefing with the briefing_args block (symbol names only \u2014 no paths) to get the maind conventions and lessons that apply to these changes.":r.changedFiles>0?"Changed files found but no index rows \u2014 run codebase_index first, then retry.":"No changed files detected."}}case"codebase_review_changes":{let r=await e.reviewChanges({since:L(n.since),includeUncommitted:n.include_uncommitted!==!1,limit:Ne(n.limit)}),i;if(n.include_history!==!1)try{i=Vh(await e.fileHistory({since:L(n.since),limit:1}))}catch{i=void 0}return{changed_files:r.changedFiles,indexed_files:r.indexedFiles,stale_files:r.staleFiles,truncated:r.truncated,hunk_coverage:r.hunkCoverage,risk_flags:r.riskFlags,symbols:r.symbols.map(o=>({name:o.name,qualified_name:o.qualifiedName,kind:o.kind,language:o.language,change:o.change,changed_line_count:o.changedLineCount,stale_index:o.staleIndex,file:o.filePath,start_line:o.startLine,node_key:o.nodeKey,node_key_hash:qn(o.nodeKey)})),review_args:{changed_symbols:r.symbols.map(o=>({name:o.name,qualified_name:o.qualifiedName,kind:o.kind,language:o.language,change:o.change,changed_line_count:o.changedLineCount})),risk_flags:r.riskFlags,diff_stats:{changed_file_count:r.changedFiles,unindexed_file_count:r.changedFiles-r.indexedFiles,stale_file_count:r.staleFiles,truncated:r.truncated,hunk_coverage:r.hunkCoverage,base_kind:r.baseKind,head_sha:r.headSha,dirty:r.dirty,base_sha:r.baseSha,code_index_version:Yc},...i?{history:i}:{}},hint:r.symbols.length>0?"Next: call the cloud tool review_changes with the review_args block (symbol names + closed-enum flags only \u2014 no paths) for provenance-backed convention findings.":r.changedFiles>0?"Changed files found but no index rows \u2014 run codebase_index first, then retry.":"No changed files detected."}}case"codebase_history":{let r=Array.isArray(n.paths)?n.paths.filter(o=>typeof o=="string"):void 0,i=await e.fileHistory({paths:r,since:L(n.since),limit:Ne(n.limit),includeOwnership:n.include_ownership!==!1});return{history:i.history.map(o=>({path:o.path,last_commits:o.lastCommits.map(a=>({sha:a.sha,author_name:a.authorName,author_email:a.authorEmail,date_iso:a.dateIso,subject:a.subject})),ownership:o.ownership?{top_authors:o.ownership.topAuthors.map(a=>({name:a.name,email:a.email,commits:a.commits,last_date_iso:a.lastDateIso})),commits_in_window:o.ownership.commitsInWindow}:null})),regression:i.regression?{since_input:i.regression.sinceInput,since_resolved:i.regression.sinceResolved,truncated:i.regression.truncated,commits:i.regression.commits.map(o=>({sha:o.sha,date_iso:o.dateIso,author_name:o.authorName,subject:o.subject,files_touched:o.filesTouched}))}:null,ownership_window_commits:i.ownershipWindowCommits,paths_truncated:i.pathsTruncated,hint:i.history.length===0?"No paths in scope \u2014 pass paths explicitly, or make changes first (default scope is your changed files).":"History is local-only (Phase B): author/subject data stays on this machine \u2014 do not forward it to cloud tools."}}default:throw new Error(`unknown local tool: ${t}`)}}s(el,"dispatchLocalTool");var Jn=class{constructor(t=vc,n=null,r=W){this.makeEngine=t;this.aggregator=n;this.resolveRoot=r}static{s(this,"LocalToolRouter")}engine=null;repoRootCache=null;descriptors(){return Fi}handlesToolCall(t,n){if(t!=="tools/call")return!1;let r=n?.name;return typeof r=="string"&&Zc.has(r)}async handleToolCall(t,n){let r=n??{},i=typeof r.name=="string"?r.name:"",o=r.arguments&&typeof r.arguments=="object"?r.arguments:{};try{let a=await el(this.getEngine(),i,o),c=JSON.stringify(a,null,2);return this.recordSavings(i,a,c),JSON.stringify({jsonrpc:"2.0",id:t,result:{content:[{type:"text",text:c}]}})}catch(a){let c=a instanceof Error?a.message:String(a),d=wc(a)?`${bc} (${c})`:`codebase tool error: ${c}`;return JSON.stringify({jsonrpc:"2.0",id:t,result:{content:[{type:"text",text:d}],isError:!0}})}}augmentToolsList(t){try{let n=JSON.parse(t);if(n&&n.result&&Array.isArray(n.result.tools)){let r=new Set(n.result.tools.map(o=>o&&typeof o=="object"?o.name:void 0).filter(o=>typeof o=="string")),i=this.descriptors().filter(o=>!r.has(o.name));return n.result.tools=[...n.result.tools,...i],JSON.stringify(n)}}catch{}return t}getEngine(){return this.engine||(this.engine=this.makeEngine()),this.engine}recordSavings(t,n,r){if(this.aggregator&&!(t!=="codebase_search"&&t!=="codebase_snippet"))try{this.repoRootCache===null&&(this.repoRootCache=this.resolveRoot());let i=Ac(t,n,r,this.repoRootCache);this.aggregator.add(i)}catch{}}};var qh="https://vsddmiosisvfrairepxv.supabase.co/functions/v1";function tl(){let e=(process.env.MAIND_FUNCTIONS_ORIGIN??"").trim().replace(/\/+$/,"");return e.length>0?e:qh}s(tl,"functionsOrigin");var Jh="/mcp-client-metrics-ingest",zh=4e3,Yh="codebase_search_tokens_saved";async function nl(e){if(!Number.isFinite(e.tokensSaved)||e.tokensSaved<=0)return!1;let t=`${tl()}${Jh}`,n=new AbortController,r=setTimeout(()=>n.abort(),zh);try{let i=await fetch(t,{method:"POST",headers:{"content-type":"application/json",authorization:`Bearer ${e.apiKey}`,"x-maind-device-id":e.deviceId,"user-agent":`@maind-dev/mcp-bridge/${e.bridgeVersion}`},body:JSON.stringify({metrics:[{session_id:e.sessionId,metric_key:Yh,metric_value:Math.floor(e.tokensSaved)}]}),signal:n.signal});return await i.text().catch(()=>""),i.ok}catch(i){return process.stderr.write(`[maind-mcp-bridge] savings metric post failed (ignored): ${i instanceof Error?i.message:String(i)}
|
|
838
838
|
`),!1}finally{clearTimeout(r)}}s(nl,"postSavingsMetric");ji();Yn();Qn();import{execFile as Fg}from"node:child_process";var $g=8,Lg=32;function jg(e){return e.split(`
|
|
839
839
|
`).filter(t=>t.trim().length>0).map(t=>(t.slice(3).split(" -> ").pop()??"").trim().replace(/^"|"$/g,"")).filter(t=>t.length>0).slice(0,Lg)}s(jg,"parsePorcelain");function Hg(e,t=$g){let n=[];for(let r of e){let i=r.replace(/\\/g,"/").replace(/^\.\//,"").replace(/\/+$/,"");if(i.length===0)continue;let o=i.includes("/")?i.slice(0,i.lastIndexOf("/")):i;if(!(o.length===0||n.includes(o))&&(n.push(o),n.length>=t))break}return n}s(Hg,"condenseToDirs");async function vl(e=Ug){let t=await e();if(t===null)return null;let n=Hg(jg(t));return n.length>0?n:null}s(vl,"deriveWorkingPaths");async function Ug(){return await new Promise(e=>{Fg("git",["status","--porcelain"],{timeout:2e3,encoding:"utf8",maxBuffer:1024*1024},(t,n)=>e(t?null:n))})}s(Ug,"defaultGitStatus");var c_=1,l_=["on-session-start","on-tool-use","on-file-write","on-file-edit","on-repo-health","on-write-health","sync-config","flush","status"];function d_(e){return l_.includes(e)}s(d_,"isHookSubcommand");var u_=6e4;async function p_(){let e=(process.env.MAIND_API_KEY??"").trim();if(e.length>0)return e!==C()&&ve(e),e;let t=C();if(t!==null)return t;let n=await He(P);return n===null&&(process.stderr.write(`[maind-mcp-bridge] sign-in did not complete; exiting.
|
|
840
840
|
`),process.exit(1)),n.apiKey}s(p_,"ensureApiKey");async function f_(){let e=await He(P);return e===null&&(process.stderr.write(`[maind-mcp-bridge] re-authorization failed; exiting.
|
package/build/meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/client-detect.ts":{"bytes":3979,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/gateway/frames.ts":{"bytes":5479,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/sha-proof.ts":{"bytes":11694,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/forward.ts":{"bytes":35261,"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/gateway/frames.ts","kind":"import-statement","original":"./gateway/frames.js"},{"path":"src/sha-proof.ts","kind":"import-statement","original":"./sha-proof.js"},{"path":"src/conventions-cache.ts","kind":"import-statement","original":"./conventions-cache.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/device-id.ts":{"bytes":6040,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"<runtime>","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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/install/flags.ts":{"bytes":7486,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/install/report.ts":{"bytes":4292,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","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},{"path":"<runtime>","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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/install/atomic-write.ts":{"bytes":4154,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"<runtime>","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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/integration-snippets/build/index.js":{"bytes":35430,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/install/hook-wiring.ts":{"bytes":21150,"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/bridge-config.ts":{"bytes":4817,"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/install/one-click-exchange.ts":{"bytes":2872,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/install/telemetry.ts":{"bytes":3027,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/parse/keys.js":{"bytes":448,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/parse/types.js":{"bytes":768,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/parse/lang/shared.js":{"bytes":2278,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/embed/recipe.js":{"bytes":594,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/embed/types.js":{"bytes":505,"imports":[],"format":"esm"},"../../packages/code-index/build/util/vector.js":{"bytes":707,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/repo-health/supabase-migrations.js":{"bytes":4431,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/incremental/discover.js","kind":"import-statement","original":"../incremental/discover.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/repo-health/divergence.js":{"bytes":48763,"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"},{"path":"../../packages/code-index/build/repo-health/supabase-migrations.js","kind":"import-statement","original":"./supabase-migrations.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/repo-health/spec-drift.js":{"bytes":35637,"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/store/schema.js":{"bytes":3047,"imports":[],"format":"esm"},"../../packages/code-index/build/util/identifiers.js":{"bytes":2180,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/query/engine.js":{"bytes":21440,"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/repo-health/spec-drift.js","kind":"import-statement","original":"../repo-health/spec-drift.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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/store/sqlite-driver.js":{"bytes":5209,"imports":[{"path":"node:module","kind":"import-statement","external":true},{"path":"<runtime>","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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/sync/types.js":{"bytes":1779,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"<runtime>","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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/local-tools/engine.ts":{"bytes":7476,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:module","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/node.js","kind":"import-statement","original":"@maind/code-index/node"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/local-tools/token-estimate.ts":{"bytes":898,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/model/types.js":{"bytes":471,"imports":[],"format":"esm"},"../../packages/code-index/build/repo-health/theme-class-drift.js":{"bytes":17347,"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/repo-health/table-acl-lint.js":{"bytes":22993,"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"},{"path":"../../packages/code-index/build/repo-health/supabase-migrations.js","kind":"import-statement","original":"./supabase-migrations.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/repo-health/migration-ledger-drift.js":{"bytes":21937,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:child_process","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"},{"path":"../../packages/code-index/build/repo-health/supabase-migrations.js","kind":"import-statement","original":"./supabase-migrations.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/index.js":{"bytes":4220,"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/repo-health/theme-class-drift.js","kind":"import-statement","original":"./repo-health/theme-class-drift.js"},{"path":"../../packages/code-index/build/repo-health/spec-drift.js","kind":"import-statement","original":"./repo-health/spec-drift.js"},{"path":"../../packages/code-index/build/repo-health/supabase-migrations.js","kind":"import-statement","original":"./repo-health/supabase-migrations.js"},{"path":"../../packages/code-index/build/repo-health/table-acl-lint.js","kind":"import-statement","original":"./repo-health/table-acl-lint.js"},{"path":"../../packages/code-index/build/repo-health/migration-ledger-drift.js","kind":"import-statement","original":"./repo-health/migration-ledger-drift.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":65200,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/index.js","kind":"import-statement","original":"@maind/code-index"},{"path":"src/local-tools/engine.ts","kind":"import-statement","original":"./engine.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/functions-origin.ts":{"bytes":714,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/metrics-post.ts":{"bytes":2619,"imports":[{"path":"src/functions-origin.ts","kind":"import-statement","original":"./functions-origin.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/presence.ts":{"bytes":25929,"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/presence-snapshot.ts":{"bytes":7984,"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":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/session-identity.ts":{"bytes":15665,"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: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":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/working-paths.ts":{"bytes":3016,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/types.js":{"bytes":338,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","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},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/effort.js":{"bytes":1858,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/ingest.js":{"bytes":3117,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/windows.js":{"bytes":3963,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/edit-guard.ts":{"bytes":10563,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/hook-input.ts":{"bytes":2921,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/payloads.ts":{"bytes":1430,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/realpath.ts":{"bytes":1436,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/state.ts":{"bytes":7165,"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},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/repo-health.ts":{"bytes":11947,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"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/hooks/payloads.ts","kind":"import-statement","original":"./payloads.js"},{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"./hook-input.js"},{"path":"src/hooks/realpath.ts","kind":"import-statement","original":"./realpath.js"},{"path":"src/hooks/state.ts","kind":"import-statement","original":"./state.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/write-health.ts":{"bytes":11906,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"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/hooks/payloads.ts","kind":"import-statement","original":"./payloads.js"},{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"./hook-input.js"},{"path":"src/hooks/repo-health.ts","kind":"import-statement","original":"./repo-health.js"},{"path":"src/hooks/realpath.ts","kind":"import-statement","original":"./realpath.js"},{"path":"src/hooks/state.ts","kind":"import-statement","original":"./state.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/index.ts":{"bytes":39034,"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/session-identity.ts","kind":"import-statement","original":"../session-identity.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/realpath.ts","kind":"import-statement","original":"./realpath.js"},{"path":"src/hooks/state.ts","kind":"import-statement","original":"./state.js"},{"path":"src/hooks/repo-health.ts","kind":"import-statement","original":"./repo-health.js"},{"path":"src/hooks/write-health.ts","kind":"import-statement","original":"./write-health.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/session-end/connection.ts":{"bytes":3229,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/session-end/index.ts":{"bytes":7635,"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/session-identity.ts","kind":"import-statement","original":"../session-identity.js"},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/session-end/connection.ts","kind":"import-statement","original":"./connection.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/guard/mcp-client.ts":{"bytes":6343,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/gateway/attest.ts":{"bytes":7656,"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/gateway/config.ts":{"bytes":4141,"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/gateway/policy.ts":{"bytes":5948,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/gateway/wrap.ts":{"bytes":5823,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/gateway/run.ts":{"bytes":13505,"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/sha-proof.ts","kind":"import-statement","original":"../sha-proof.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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/index-refresh.ts":{"bytes":5763,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"./hook-input.js"},{"path":"src/local-tools/engine.ts","kind":"import-statement","original":"../local-tools/engine.js"},{"path":"../../packages/code-index/build/node.js","kind":"dynamic-import","original":"@maind/code-index/node"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":19703,"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/session-identity.ts","kind":"import-statement","original":"./session-identity.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-refresh.ts","kind":"dynamic-import","original":"./hooks/index-refresh.js"},{"path":"src/hooks/index-refresh.ts","kind":"dynamic-import","original":"./hooks/index-refresh.js"},{"path":"src/hooks/index.ts","kind":"dynamic-import","original":"./hooks/index.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"build/index.js":{"imports":[{"path":"node:child_process","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: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:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:module","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: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:path","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:module","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:module","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:child_process","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: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","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node: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: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: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: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: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/gateway/frames.ts":{"bytesInOutput":1220},"src/sha-proof.ts":{"bytesInOutput":2831},"src/conventions-cache.ts":{"bytesInOutput":2224},"src/device-id.ts":{"bytesInOutput":1650},"src/version.ts":{"bytesInOutput":42},"src/project-key.ts":{"bytesInOutput":981},"src/install/bridge-entry.ts":{"bytesInOutput":1294},"src/install/atomic-write.ts":{"bytesInOutput":1131},"src/install/hook-wiring.ts":{"bytesInOutput":10991},"src/install/hook-merge.ts":{"bytesInOutput":4331},"src/bridge-config.ts":{"bytesInOutput":1117},"../../packages/project-key/build/index.js":{"bytesInOutput":1070},"../../packages/code-index/build/parse/keys.js":{"bytesInOutput":144},"../../packages/code-index/build/parse/types.js":{"bytesInOutput":416},"../../packages/code-index/build/parse/lang/shared.js":{"bytesInOutput":821},"../../packages/code-index/build/parse/lang/python.js":{"bytesInOutput":2360},"../../packages/code-index/build/parse/lang/typescript.js":{"bytesInOutput":2932},"../../packages/code-index/build/parse/tree-sitter/grammars.js":{"bytesInOutput":403},"../../packages/code-index/build/parse/tree-sitter/parser.js":{"bytesInOutput":1232},"../../packages/code-index/build/embed/recipe.js":{"bytesInOutput":187},"../../packages/code-index/build/embed/types.js":{"bytesInOutput":97},"../../packages/code-index/build/util/vector.js":{"bytesInOutput":229},"../../packages/code-index/build/graph/resolve.js":{"bytesInOutput":1377},"../../packages/code-index/build/incremental/discover.js":{"bytesInOutput":3124},"../../packages/code-index/build/incremental/hunks.js":{"bytesInOutput":2092},"../../packages/code-index/build/incremental/history.js":{"bytesInOutput":1789},"../../packages/code-index/build/repo-health/hooks.js":{"bytesInOutput":1919},"../../packages/code-index/build/repo-health/supabase-migrations.js":{"bytesInOutput":1196},"../../packages/code-index/build/repo-health/divergence.js":{"bytesInOutput":16493},"../../packages/code-index/build/repo-health/number-collisions.js":{"bytesInOutput":6314},"../../packages/code-index/build/repo-health/spec-drift.js":{"bytesInOutput":14259},"../../packages/code-index/build/review/risk-rules.js":{"bytesInOutput":746},"../../packages/code-index/build/review/risk-scan.js":{"bytesInOutput":452},"../../packages/code-index/build/store/schema.js":{"bytesInOutput":2075},"../../packages/code-index/build/util/identifiers.js":{"bytesInOutput":763},"../../packages/code-index/build/query/engine.js":{"bytesInOutput":8624},"../../packages/code-index/build/store/sqlite-driver.js":{"bytesInOutput":1908},"../../packages/code-index/build/store/node-sqlite.js":{"bytesInOutput":7298},"../../packages/code-index/build/sync/types.js":{"bytesInOutput":698},"../../packages/code-index/build/sync/client.js":{"bytesInOutput":4263},"../../packages/code-index/build/node.js":{"bytesInOutput":995},"src/local-tools/engine.ts":{"bytesInOutput":2357},"../../packages/code-index/build/model/types.js":{"bytesInOutput":29},"../../packages/code-index/build/repo-health/theme-class-drift.js":{"bytesInOutput":3934},"../../packages/code-index/build/repo-health/table-acl-lint.js":{"bytesInOutput":7756},"../../packages/code-index/build/repo-health/migration-ledger-drift.js":{"bytesInOutput":10257},"../../packages/code-index/build/index.js":{"bytesInOutput":118},"src/presence.ts":{"bytesInOutput":5693},"src/presence-snapshot.ts":{"bytesInOutput":2487},"src/session-identity.ts":{"bytesInOutput":4591},"../../packages/claude-code-telemetry/dist/types.js":{"bytesInOutput":29},"../../packages/claude-code-telemetry/dist/transcript.js":{"bytesInOutput":768},"../../packages/claude-code-telemetry/dist/decisions.js":{"bytesInOutput":29},"../../packages/claude-code-telemetry/dist/effort.js":{"bytesInOutput":297},"../../packages/claude-code-telemetry/dist/session-analysis.js":{"bytesInOutput":5870},"../../packages/claude-code-telemetry/dist/ingest.js":{"bytesInOutput":187},"../../packages/claude-code-telemetry/dist/session-span.js":{"bytesInOutput":2423},"../../packages/claude-code-telemetry/dist/parse.js":{"bytesInOutput":39},"../../packages/claude-code-telemetry/dist/windows.js":{"bytesInOutput":29},"../../packages/claude-code-telemetry/dist/projects.js":{"bytesInOutput":143},"../../packages/claude-code-telemetry/dist/index.js":{"bytesInOutput":79},"src/hooks/api.ts":{"bytesInOutput":741},"src/hooks/edit-guard.ts":{"bytesInOutput":3682},"src/hooks/hook-input.ts":{"bytesInOutput":669},"src/hooks/payloads.ts":{"bytesInOutput":459},"src/hooks/realpath.ts":{"bytesInOutput":303},"src/hooks/state.ts":{"bytesInOutput":1212},"src/hooks/repo-health.ts":{"bytesInOutput":2181},"src/hooks/write-health.ts":{"bytesInOutput":3013},"src/hooks/index.ts":{"bytesInOutput":11633},"src/session-end/connection.ts":{"bytesInOutput":200},"src/session-end/index.ts":{"bytesInOutput":1767},"src/guard/config.ts":{"bytesInOutput":482},"src/guard/install.ts":{"bytesInOutput":1562},"src/guard/session-file.ts":{"bytesInOutput":1013},"src/guard/log.ts":{"bytesInOutput":926},"src/guard/cli.ts":{"bytesInOutput":3261},"src/guard/mcp-client.ts":{"bytesInOutput":2341},"src/guard/inject.ts":{"bytesInOutput":2848},"src/guard/gate.ts":{"bytesInOutput":2658},"src/guard/stop.ts":{"bytesInOutput":1158},"src/gateway/attest.ts":{"bytesInOutput":2366},"src/gateway/config.ts":{"bytesInOutput":934},"src/gateway/policy.ts":{"bytesInOutput":1897},"src/gateway/policy-cache.ts":{"bytesInOutput":895},"src/gateway/policy-fetch.ts":{"bytesInOutput":503},"src/gateway/wrap.ts":{"bytesInOutput":1547},"src/gateway/install.ts":{"bytesInOutput":3393},"src/gateway/policy-cli.ts":{"bytesInOutput":3183},"src/gateway/run.ts":{"bytesInOutput":4041},"src/guard/cross-session.ts":{"bytesInOutput":3408},"src/hooks/index-refresh.ts":{"bytesInOutput":1306},"src/index.ts":{"bytesInOutput":8020},"src/forward.ts":{"bytesInOutput":9157},"src/client-detect.ts":{"bytesInOutput":1184},"src/auth.ts":{"bytesInOutput":3799},"src/install/index.ts":{"bytesInOutput":3742},"src/install/flags.ts":{"bytesInOutput":3905},"src/install/report.ts":{"bytesInOutput":1652},"src/install/project-root.ts":{"bytesInOutput":1335},"src/install/client-targets.ts":{"bytesInOutput":2076},"src/install/json-merge.ts":{"bytesInOutput":1995},"src/install/toml-merge.ts":{"bytesInOutput":1973},"src/install/preamble.ts":{"bytesInOutput":1655},"../../packages/integration-snippets/build/index.js":{"bytesInOutput":24490},"src/install/working-paths-consent.ts":{"bytesInOutput":2297},"src/install/browser-pair.ts":{"bytesInOutput":2323},"src/install/one-click-exchange.ts":{"bytesInOutput":758},"src/install/telemetry.ts":{"bytesInOutput":1155},"src/local-tools/router.ts":{"bytesInOutput":1432},"src/local-tools/savings.ts":{"bytesInOutput":1056},"src/local-tools/token-estimate.ts":{"bytesInOutput":71},"src/local-tools/tools.ts":{"bytesInOutput":43272},"src/functions-origin.ts":{"bytesInOutput":197},"src/metrics-post.ts":{"bytesInOutput":803},"src/working-paths.ts":{"bytesInOutput":855}},"bytes":346187}}}
|
|
1
|
+
{"inputs":{"src/client-detect.ts":{"bytes":3979,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/gateway/frames.ts":{"bytes":5479,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/sha-proof.ts":{"bytes":11694,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/forward.ts":{"bytes":35261,"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/gateway/frames.ts","kind":"import-statement","original":"./gateway/frames.js"},{"path":"src/sha-proof.ts","kind":"import-statement","original":"./sha-proof.js"},{"path":"src/conventions-cache.ts","kind":"import-statement","original":"./conventions-cache.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/device-id.ts":{"bytes":6040,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"<runtime>","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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/install/flags.ts":{"bytes":7486,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/install/report.ts":{"bytes":4292,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","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},{"path":"<runtime>","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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/install/atomic-write.ts":{"bytes":4154,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"<runtime>","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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/integration-snippets/build/index.js":{"bytes":35430,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/install/hook-wiring.ts":{"bytes":21150,"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/bridge-config.ts":{"bytes":4817,"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/install/one-click-exchange.ts":{"bytes":2872,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/install/telemetry.ts":{"bytes":3027,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/parse/keys.js":{"bytes":448,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/parse/types.js":{"bytes":768,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/parse/lang/shared.js":{"bytes":2278,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/embed/recipe.js":{"bytes":594,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/embed/types.js":{"bytes":505,"imports":[],"format":"esm"},"../../packages/code-index/build/util/vector.js":{"bytes":707,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/repo-health/supabase-migrations.js":{"bytes":4431,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/incremental/discover.js","kind":"import-statement","original":"../incremental/discover.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/repo-health/divergence.js":{"bytes":49344,"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"},{"path":"../../packages/code-index/build/repo-health/supabase-migrations.js","kind":"import-statement","original":"./supabase-migrations.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/repo-health/spec-drift.js":{"bytes":35637,"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/store/schema.js":{"bytes":3047,"imports":[],"format":"esm"},"../../packages/code-index/build/util/identifiers.js":{"bytes":2180,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/query/engine.js":{"bytes":21440,"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/repo-health/spec-drift.js","kind":"import-statement","original":"../repo-health/spec-drift.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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/store/sqlite-driver.js":{"bytes":5209,"imports":[{"path":"node:module","kind":"import-statement","external":true},{"path":"<runtime>","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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/sync/types.js":{"bytes":1779,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"<runtime>","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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/local-tools/engine.ts":{"bytes":7476,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:module","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/node.js","kind":"import-statement","original":"@maind/code-index/node"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/local-tools/token-estimate.ts":{"bytes":898,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/model/types.js":{"bytes":471,"imports":[],"format":"esm"},"../../packages/code-index/build/repo-health/theme-class-drift.js":{"bytes":17347,"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/repo-health/table-acl-lint.js":{"bytes":22993,"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"},{"path":"../../packages/code-index/build/repo-health/supabase-migrations.js","kind":"import-statement","original":"./supabase-migrations.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/repo-health/migration-ledger-drift.js":{"bytes":21937,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:child_process","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"},{"path":"../../packages/code-index/build/repo-health/supabase-migrations.js","kind":"import-statement","original":"./supabase-migrations.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/code-index/build/index.js":{"bytes":4220,"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/repo-health/theme-class-drift.js","kind":"import-statement","original":"./repo-health/theme-class-drift.js"},{"path":"../../packages/code-index/build/repo-health/spec-drift.js","kind":"import-statement","original":"./repo-health/spec-drift.js"},{"path":"../../packages/code-index/build/repo-health/supabase-migrations.js","kind":"import-statement","original":"./repo-health/supabase-migrations.js"},{"path":"../../packages/code-index/build/repo-health/table-acl-lint.js","kind":"import-statement","original":"./repo-health/table-acl-lint.js"},{"path":"../../packages/code-index/build/repo-health/migration-ledger-drift.js","kind":"import-statement","original":"./repo-health/migration-ledger-drift.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":66568,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"../../packages/code-index/build/index.js","kind":"import-statement","original":"@maind/code-index"},{"path":"src/local-tools/engine.ts","kind":"import-statement","original":"./engine.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/functions-origin.ts":{"bytes":714,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/metrics-post.ts":{"bytes":2619,"imports":[{"path":"src/functions-origin.ts","kind":"import-statement","original":"./functions-origin.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/presence.ts":{"bytes":25929,"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/presence-snapshot.ts":{"bytes":7984,"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":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/session-identity.ts":{"bytes":15665,"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: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":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/working-paths.ts":{"bytes":3016,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/types.js":{"bytes":338,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","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},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/effort.js":{"bytes":1858,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/ingest.js":{"bytes":3117,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../packages/claude-code-telemetry/dist/windows.js":{"bytes":3963,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/edit-guard.ts":{"bytes":10563,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/hook-input.ts":{"bytes":2921,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/payloads.ts":{"bytes":1430,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/realpath.ts":{"bytes":1436,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/state.ts":{"bytes":7165,"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},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/repo-health.ts":{"bytes":11947,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"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/hooks/payloads.ts","kind":"import-statement","original":"./payloads.js"},{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"./hook-input.js"},{"path":"src/hooks/realpath.ts","kind":"import-statement","original":"./realpath.js"},{"path":"src/hooks/state.ts","kind":"import-statement","original":"./state.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/write-health.ts":{"bytes":11906,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"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/hooks/payloads.ts","kind":"import-statement","original":"./payloads.js"},{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"./hook-input.js"},{"path":"src/hooks/repo-health.ts","kind":"import-statement","original":"./repo-health.js"},{"path":"src/hooks/realpath.ts","kind":"import-statement","original":"./realpath.js"},{"path":"src/hooks/state.ts","kind":"import-statement","original":"./state.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/index.ts":{"bytes":39034,"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/session-identity.ts","kind":"import-statement","original":"../session-identity.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/realpath.ts","kind":"import-statement","original":"./realpath.js"},{"path":"src/hooks/state.ts","kind":"import-statement","original":"./state.js"},{"path":"src/hooks/repo-health.ts","kind":"import-statement","original":"./repo-health.js"},{"path":"src/hooks/write-health.ts","kind":"import-statement","original":"./write-health.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/session-end/connection.ts":{"bytes":3229,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/session-end/index.ts":{"bytes":7635,"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/session-identity.ts","kind":"import-statement","original":"../session-identity.js"},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/session-end/connection.ts","kind":"import-statement","original":"./connection.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/guard/mcp-client.ts":{"bytes":6343,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/gateway/attest.ts":{"bytes":7656,"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/gateway/config.ts":{"bytes":4141,"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/gateway/policy.ts":{"bytes":5948,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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},{"path":"<runtime>","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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/gateway/wrap.ts":{"bytes":5823,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/gateway/run.ts":{"bytes":13505,"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/sha-proof.ts","kind":"import-statement","original":"../sha-proof.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"},{"path":"<runtime>","kind":"import-statement","external":true}],"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"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/index-refresh.ts":{"bytes":5763,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/hooks/hook-input.ts","kind":"import-statement","original":"./hook-input.js"},{"path":"src/local-tools/engine.ts","kind":"import-statement","original":"../local-tools/engine.js"},{"path":"../../packages/code-index/build/node.js","kind":"dynamic-import","original":"@maind/code-index/node"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":19703,"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/session-identity.ts","kind":"import-statement","original":"./session-identity.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-refresh.ts","kind":"dynamic-import","original":"./hooks/index-refresh.js"},{"path":"src/hooks/index-refresh.ts","kind":"dynamic-import","original":"./hooks/index-refresh.js"},{"path":"src/hooks/index.ts","kind":"dynamic-import","original":"./hooks/index.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"build/index.js":{"imports":[{"path":"node:child_process","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: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:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:module","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: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:path","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:module","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:module","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:child_process","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: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","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node: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: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: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: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: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/gateway/frames.ts":{"bytesInOutput":1220},"src/sha-proof.ts":{"bytesInOutput":2831},"src/conventions-cache.ts":{"bytesInOutput":2224},"src/device-id.ts":{"bytesInOutput":1650},"src/version.ts":{"bytesInOutput":42},"src/project-key.ts":{"bytesInOutput":981},"src/install/bridge-entry.ts":{"bytesInOutput":1294},"src/install/atomic-write.ts":{"bytesInOutput":1131},"src/install/hook-wiring.ts":{"bytesInOutput":10991},"src/install/hook-merge.ts":{"bytesInOutput":4331},"src/bridge-config.ts":{"bytesInOutput":1117},"../../packages/project-key/build/index.js":{"bytesInOutput":1070},"../../packages/code-index/build/parse/keys.js":{"bytesInOutput":144},"../../packages/code-index/build/parse/types.js":{"bytesInOutput":416},"../../packages/code-index/build/parse/lang/shared.js":{"bytesInOutput":821},"../../packages/code-index/build/parse/lang/python.js":{"bytesInOutput":2360},"../../packages/code-index/build/parse/lang/typescript.js":{"bytesInOutput":2932},"../../packages/code-index/build/parse/tree-sitter/grammars.js":{"bytesInOutput":403},"../../packages/code-index/build/parse/tree-sitter/parser.js":{"bytesInOutput":1232},"../../packages/code-index/build/embed/recipe.js":{"bytesInOutput":187},"../../packages/code-index/build/embed/types.js":{"bytesInOutput":97},"../../packages/code-index/build/util/vector.js":{"bytesInOutput":229},"../../packages/code-index/build/graph/resolve.js":{"bytesInOutput":1377},"../../packages/code-index/build/incremental/discover.js":{"bytesInOutput":3124},"../../packages/code-index/build/incremental/hunks.js":{"bytesInOutput":2092},"../../packages/code-index/build/incremental/history.js":{"bytesInOutput":1789},"../../packages/code-index/build/repo-health/hooks.js":{"bytesInOutput":1919},"../../packages/code-index/build/repo-health/supabase-migrations.js":{"bytesInOutput":1196},"../../packages/code-index/build/repo-health/divergence.js":{"bytesInOutput":16636},"../../packages/code-index/build/repo-health/number-collisions.js":{"bytesInOutput":6314},"../../packages/code-index/build/repo-health/spec-drift.js":{"bytesInOutput":14259},"../../packages/code-index/build/review/risk-rules.js":{"bytesInOutput":746},"../../packages/code-index/build/review/risk-scan.js":{"bytesInOutput":452},"../../packages/code-index/build/store/schema.js":{"bytesInOutput":2075},"../../packages/code-index/build/util/identifiers.js":{"bytesInOutput":763},"../../packages/code-index/build/query/engine.js":{"bytesInOutput":8624},"../../packages/code-index/build/store/sqlite-driver.js":{"bytesInOutput":1908},"../../packages/code-index/build/store/node-sqlite.js":{"bytesInOutput":7298},"../../packages/code-index/build/sync/types.js":{"bytesInOutput":698},"../../packages/code-index/build/sync/client.js":{"bytesInOutput":4263},"../../packages/code-index/build/node.js":{"bytesInOutput":995},"src/local-tools/engine.ts":{"bytesInOutput":2357},"../../packages/code-index/build/model/types.js":{"bytesInOutput":29},"../../packages/code-index/build/repo-health/theme-class-drift.js":{"bytesInOutput":3934},"../../packages/code-index/build/repo-health/table-acl-lint.js":{"bytesInOutput":7756},"../../packages/code-index/build/repo-health/migration-ledger-drift.js":{"bytesInOutput":10257},"../../packages/code-index/build/index.js":{"bytesInOutput":118},"src/presence.ts":{"bytesInOutput":5693},"src/presence-snapshot.ts":{"bytesInOutput":2487},"src/session-identity.ts":{"bytesInOutput":4591},"../../packages/claude-code-telemetry/dist/types.js":{"bytesInOutput":29},"../../packages/claude-code-telemetry/dist/transcript.js":{"bytesInOutput":768},"../../packages/claude-code-telemetry/dist/decisions.js":{"bytesInOutput":29},"../../packages/claude-code-telemetry/dist/effort.js":{"bytesInOutput":297},"../../packages/claude-code-telemetry/dist/session-analysis.js":{"bytesInOutput":5870},"../../packages/claude-code-telemetry/dist/ingest.js":{"bytesInOutput":187},"../../packages/claude-code-telemetry/dist/session-span.js":{"bytesInOutput":2423},"../../packages/claude-code-telemetry/dist/parse.js":{"bytesInOutput":39},"../../packages/claude-code-telemetry/dist/windows.js":{"bytesInOutput":29},"../../packages/claude-code-telemetry/dist/projects.js":{"bytesInOutput":143},"../../packages/claude-code-telemetry/dist/index.js":{"bytesInOutput":79},"src/hooks/api.ts":{"bytesInOutput":741},"src/hooks/edit-guard.ts":{"bytesInOutput":3682},"src/hooks/hook-input.ts":{"bytesInOutput":669},"src/hooks/payloads.ts":{"bytesInOutput":459},"src/hooks/realpath.ts":{"bytesInOutput":303},"src/hooks/state.ts":{"bytesInOutput":1212},"src/hooks/repo-health.ts":{"bytesInOutput":2181},"src/hooks/write-health.ts":{"bytesInOutput":3013},"src/hooks/index.ts":{"bytesInOutput":11633},"src/session-end/connection.ts":{"bytesInOutput":200},"src/session-end/index.ts":{"bytesInOutput":1767},"src/guard/config.ts":{"bytesInOutput":482},"src/guard/install.ts":{"bytesInOutput":1562},"src/guard/session-file.ts":{"bytesInOutput":1013},"src/guard/log.ts":{"bytesInOutput":926},"src/guard/cli.ts":{"bytesInOutput":3261},"src/guard/mcp-client.ts":{"bytesInOutput":2341},"src/guard/inject.ts":{"bytesInOutput":2848},"src/guard/gate.ts":{"bytesInOutput":2658},"src/guard/stop.ts":{"bytesInOutput":1158},"src/gateway/attest.ts":{"bytesInOutput":2366},"src/gateway/config.ts":{"bytesInOutput":934},"src/gateway/policy.ts":{"bytesInOutput":1897},"src/gateway/policy-cache.ts":{"bytesInOutput":895},"src/gateway/policy-fetch.ts":{"bytesInOutput":503},"src/gateway/wrap.ts":{"bytesInOutput":1547},"src/gateway/install.ts":{"bytesInOutput":3393},"src/gateway/policy-cli.ts":{"bytesInOutput":3183},"src/gateway/run.ts":{"bytesInOutput":4041},"src/guard/cross-session.ts":{"bytesInOutput":3408},"src/hooks/index-refresh.ts":{"bytesInOutput":1306},"src/index.ts":{"bytesInOutput":8020},"src/forward.ts":{"bytesInOutput":9157},"src/client-detect.ts":{"bytesInOutput":1184},"src/auth.ts":{"bytesInOutput":3799},"src/install/index.ts":{"bytesInOutput":3742},"src/install/flags.ts":{"bytesInOutput":3905},"src/install/report.ts":{"bytesInOutput":1652},"src/install/project-root.ts":{"bytesInOutput":1335},"src/install/client-targets.ts":{"bytesInOutput":2076},"src/install/json-merge.ts":{"bytesInOutput":1995},"src/install/toml-merge.ts":{"bytesInOutput":1973},"src/install/preamble.ts":{"bytesInOutput":1655},"../../packages/integration-snippets/build/index.js":{"bytesInOutput":24490},"src/install/working-paths-consent.ts":{"bytesInOutput":2297},"src/install/browser-pair.ts":{"bytesInOutput":2323},"src/install/one-click-exchange.ts":{"bytesInOutput":758},"src/install/telemetry.ts":{"bytesInOutput":1155},"src/local-tools/router.ts":{"bytesInOutput":1432},"src/local-tools/savings.ts":{"bytesInOutput":1056},"src/local-tools/token-estimate.ts":{"bytesInOutput":71},"src/local-tools/tools.ts":{"bytesInOutput":44069},"src/functions-origin.ts":{"bytesInOutput":197},"src/metrics-post.ts":{"bytesInOutput":803},"src/working-paths.ts":{"bytesInOutput":855}},"bytes":347127}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maind-dev/mcp-bridge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.56.0",
|
|
4
4
|
"description": "Local MCP bridge for maind.dev — wraps any MCP-compatible client (Claude Code, Cursor, Windsurf) and pins your API key to a single device via the maind device authorization flow.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./build/index.js",
|