@ironbee-ai/cli 0.23.0 → 0.25.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.
@@ -1,6 +1,7 @@
1
- "use strict";var v=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var c=(t,e)=>v(t,"name",{value:e,configurable:!0});var j=(t,e)=>{for(var n in e)v(t,n,{get:e[n],enumerable:!0})},N=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of T(e))!R.call(t,r)&&r!==n&&v(t,r,{get:()=>e[r],enumerable:!(i=V(e,r))||i.enumerable});return t};var P=t=>N(v({},"__esModule",{value:!0}),t);var Z={};j(Z,{ActivityAwareEvent:()=>d.ActivityAwareEvent,Event:()=>d.Event,EventType:()=>d.EventType,EventTypeValue:()=>d.EventTypeValue,FixAwareEvent:()=>d.FixAwareEvent,VerificationAwareEvent:()=>d.VerificationAwareEvent,appendAction:()=>I,baseFields:()=>F,deterministicSessionEndId:()=>D,findDurationSinceLastAction:()=>G,findLastActionTimestamp:()=>J,getFileChangesSinceLastFailVerdict:()=>Y,getFileChangesSinceLastVerification:()=>Q,getToolCallsSinceLastFileChange:()=>W,getToolCallsSinceLastVerification:()=>z,hasFileChangesSinceLastVerification:()=>B,hasToolCallsSinceLastVerdict:()=>K,readActionsSinceLastMarker:()=>x,resolveProjectName:()=>C,summarizeFixFileChanges:()=>X});module.exports=P(Z);var u=require("fs"),y=require("crypto"),a=require("path"),f=require("../../lib/logger"),b=require("../../lib/collector"),$=require("../../lib/config"),w=require("../../queue/submit"),k=require("../../queue/types"),S=require("../../queue/register-handlers"),d=require("../../lib/event");function C(t){let e=t,n;for(;;){const i=(0,a.join)(e,".git");if((0,u.existsSync)(i)){const s=L(i);if(s==="directory"){const o=_(i);return o||(0,a.basename)(e)}if(s==="linked-pointer"){const o=E(i),l=o!==void 0?_(o):void 0;return l||(0,a.basename)(e)}s==="worktree-pointer"&&n===void 0&&(n=M(i))}const r=(0,a.dirname)(e);if(r===e)break;e=r}return n??(0,a.basename)(t)}c(C,"resolveProjectName");function L(t){try{const e=(0,u.statSync)(t);if(e.isDirectory())return"directory";if(!e.isFile())return"other";const n=E(t);return n===void 0?"other":(0,u.existsSync)((0,a.join)(n,"commondir"))?"worktree-pointer":"linked-pointer"}catch(e){return f.logger.debug(`resolveProjectName: stat failed for ${t}: ${e instanceof Error?e.message:e}`),"other"}}c(L,"classifyGitEntry");function E(t){try{const n=(0,u.readFileSync)(t,"utf-8").trim().match(/^gitdir:\s*(.+)$/m);if(!n)return;const i=n[1].trim();return(0,a.isAbsolute)(i)?i:(0,a.resolve)((0,a.dirname)(t),i)}catch(e){f.logger.debug(`resolveProjectName: pointer at ${t} unreadable: ${e instanceof Error?e.message:e}`);return}}c(E,"readGitdirPointer");function _(t){try{const e=(0,a.join)(t,"config");if(!(0,u.existsSync)(e))return;const n=U((0,u.readFileSync)(e,"utf-8"));return n?q(n):void 0}catch(e){f.logger.debug(`resolveProjectName: failed to read git config at ${t}: ${e instanceof Error?e.message:e}`);return}}c(_,"repoNameFromGitConfig");function M(t){const e=E(t);if(e===void 0)return;const n=(0,a.join)(e,"commondir");let i;try{if((0,u.existsSync)(n)){const o=(0,u.readFileSync)(n,"utf-8").trim();i=(0,a.isAbsolute)(o)?o:(0,a.resolve)(e,o)}else i=e}catch(o){f.logger.debug(`resolveProjectName: commondir at ${n} unreadable: ${o instanceof Error?o.message:o}`);return}const r=_(i);if(r)return r;const s=(0,a.basename)(i)===".git"?(0,a.basename)((0,a.dirname)(i)):(0,a.basename)(i);return s.length>0?s:void 0}c(M,"repoNameFromWorktreePointer");function U(t){const e=t.split(/\r?\n/);let n=null,i=null,r,s;for(const o of e){const l=o.trim();if(l.length===0||l.startsWith("#")||l.startsWith(";"))continue;const p=l.match(/^\[([^\s\]]+)(?:\s+"([^"]*)")?\]$/);if(p){n=p[1].toLowerCase(),i=p[2]??null;continue}if(n!=="remote"||i===null)continue;const m=l.match(/^url\s*=\s*(.+?)\s*$/i);if(!m)continue;const g=m[1];i==="origin"&&(r=g),s===void 0&&(s=g)}return r??s}c(U,"readFirstRemoteUrl");function q(t){let e=t.trim();if(e.length===0)return;const n=e.match(/^[^/@]+@[^/:]+:(.+)$/);if(n?e=n[1]:e=e.replace(/^[a-z][a-z0-9+.-]*:\/\/[^/]*\//i,""),e=e.replace(/[?#].*$/,"").replace(/\/+$/,""),e.length===0)return;const r=(e.split("/").pop()??"").replace(/\.git$/i,"");return r.length>0?r:void 0}c(q,"repoNameFromRemoteUrl");function F(t){const e=(0,a.basename)((0,a.dirname)(t)),n=(0,a.dirname)((0,a.dirname)((0,a.dirname)((0,a.dirname)(t)))),i=(0,a.dirname)(t),{getUserEmail:r,getUsageType:s,getUsagePlan:o}=require("./session-state"),l=r(i),p=s(i),m=o(i),g={id:(0,y.randomUUID)(),session_id:e,project_name:C(n)};return l&&(g.user_email=l),p&&(g.usage_type=p),m&&(g.usage_plan=m),g}c(F,"baseFields");function D(t){const e=(0,y.createHash)("sha256").update("session_end:"+t).digest("hex");return`${e.slice(0,8)}-${e.slice(8,12)}-${e.slice(12,16)}-${e.slice(16,20)}-${e.slice(20,32)}`}c(D,"deterministicSessionEndId");async function I(t,e){const n=F(t);e.id||(e.id=n.id),e.session_id||(e.session_id=n.session_id),e.project_name||(e.project_name=n.project_name);try{(0,u.mkdirSync)((0,a.dirname)(t),{recursive:!0}),(0,u.appendFileSync)(t,JSON.stringify(e)+`
2
- `)}catch(i){f.logger.debug(`failed to append action to ${t}: ${i}`)}if(e.type!=="tool_call"){const i=(0,a.basename)((0,a.dirname)(t)),r=(0,a.dirname)((0,a.dirname)((0,a.dirname)((0,a.dirname)(t))));try{await(0,b.sendToCollector)(e,i,r)}catch(s){s instanceof b.RetriableCollectorError?O(r,i,e,s):f.logger.debug(`failed to send action to collector: ${s}`)}}}c(I,"appendAction");function O(t,e,n,i){if(!(0,$.isJobQueueEnabled)(t)){f.logger.debug(`collector fallback: jobQueue disabled, dropping type=${n.type} id=${n.id} (cause: ${i.message})`);return}try{(0,w.submit)(t,e,S.SEND_EVENT_TYPE,n),f.logger.debug(`collector fallback: enqueued type=${n.type} id=${n.id} as send_event (cause: ${i.message})`)}catch(r){if(r instanceof k.JobTooLargeError){f.logger.debug(`collector fallback: event too large for queue (${r.sizeBytes} bytes), dropping type=${n.type} id=${n.id}`);return}f.logger.debug(`collector fallback: queue submit failed for type=${n.type} id=${n.id}: ${r}`)}}c(O,"enqueueCollectorFallback");function G(t,e,n){if((0,u.existsSync)(t))try{const r=(0,u.readFileSync)(t,"utf-8").trim().split(`
3
- `).filter(s=>s.length>0);for(let s=r.length-1;s>=0;s--)try{const o=JSON.parse(r[s]);if(o.type===e&&typeof o.timestamp=="number")return n-o.timestamp}catch{}}catch(i){f.logger.debug(`failed to find duration for ${e}: ${i}`)}}c(G,"findDurationSinceLastAction");function x(t,e){return h(t,n=>n.type===e)}c(x,"readActionsSinceLastMarker");function J(t){if((0,u.existsSync)(t))try{const n=(0,u.readFileSync)(t,"utf-8").trim().split(`
4
- `).filter(i=>i.length>0);for(let i=n.length-1;i>=0;i--)try{const r=JSON.parse(n[i]);if(typeof r.timestamp=="number")return r.timestamp}catch{}}catch(e){f.logger.debug(`failed to read last action timestamp from ${t}: ${e}`)}}c(J,"findLastActionTimestamp");function h(t,e){if(!(0,u.existsSync)(t))return[];try{const i=(0,u.readFileSync)(t,"utf-8").trim().split(`
5
- `).filter(o=>o.length>0);let r=-1;const s=[];for(let o=0;o<i.length;o++)try{const l=JSON.parse(i[o]);s.push(l),e(l)&&(r=o)}catch{}return s.slice(r+1)}catch(n){return f.logger.debug(`failed to read actions from ${t}: ${n}`),[]}}c(h,"readActionsSinceMatch");function A(t){return t.type!=="verification_requested"?!1:t.action==="allow"}c(A,"isAllowVerificationRequested");function z(t){return h(t,A).filter(n=>n.type==="tool_call")}c(z,"getToolCallsSinceLastVerification");function W(t){return x(t,"file_change").filter(n=>n.type==="tool_call")}c(W,"getToolCallsSinceLastFileChange");function K(t){return x(t,"verdict_write").some(n=>n.type==="tool_call")}c(K,"hasToolCallsSinceLastVerdict");function B(t){return h(t,A).some(n=>n.type==="file_change")}c(B,"hasFileChangesSinceLastVerification");function Q(t){return h(t,A).filter(n=>n.type==="file_change")}c(Q,"getFileChangesSinceLastVerification");function H(t){return t.type!=="verdict_write"?!1:t.verdict?.status==="fail"}c(H,"isFailVerdictWrite");function Y(t){if(!(0,u.existsSync)(t))return[];try{const i=(0,u.readFileSync)(t,"utf-8").trim().split(`
6
- `).filter(o=>o.length>0).map(o=>{try{return JSON.parse(o)}catch{return null}});let r=-1;for(let o=0;o<i.length;o++){const l=i[o];l!==null&&H(l)&&(r=o)}if(r<0)return[];const s=[];for(let o=r+1;o<i.length;o++){const l=i[o];l!==null&&l.type==="file_change"&&s.push(l)}return s}catch(e){return f.logger.debug(`failed to read file changes since last fail verdict: ${e}`),[]}}c(Y,"getFileChangesSinceLastFailVerdict");function X(t){if(t.length===0)return[];const e=new Map,n=[];for(const i of t){const r=i.file_path;let s=e.get(r);s||(s={op:i.operation,added:0,removed:0},e.set(r,s),n.push(r)),s.op=s.op==="create"||i.operation==="create"?"create":i.operation,s.added+=typeof i.lines_added=="number"?i.lines_added:0,s.removed+=typeof i.lines_removed=="number"?i.lines_removed:0}return n.map(i=>{const r=e.get(i);return`${r.op} ${i} (+${r.added}/-${r.removed})`})}c(X,"summarizeFixFileChanges");0&&(module.exports={ActivityAwareEvent,Event,EventType,EventTypeValue,FixAwareEvent,VerificationAwareEvent,appendAction,baseFields,deterministicSessionEndId,findDurationSinceLastAction,findLastActionTimestamp,getFileChangesSinceLastFailVerdict,getFileChangesSinceLastVerification,getToolCallsSinceLastFileChange,getToolCallsSinceLastVerification,hasFileChangesSinceLastVerification,hasToolCallsSinceLastVerdict,readActionsSinceLastMarker,resolveProjectName,summarizeFixFileChanges});
1
+ "use strict";var v=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var c=(t,e)=>v(t,"name",{value:e,configurable:!0});var N=(t,e)=>{for(var n in e)v(t,n,{get:e[n],enumerable:!0})},j=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of T(e))!R.call(t,r)&&r!==n&&v(t,r,{get:()=>e[r],enumerable:!(i=F(e,r))||i.enumerable});return t};var P=t=>j(v({},"__esModule",{value:!0}),t);var ee={};N(ee,{ActivityAwareEvent:()=>d.ActivityAwareEvent,Event:()=>d.Event,EventType:()=>d.EventType,EventTypeValue:()=>d.EventTypeValue,FixAwareEvent:()=>d.FixAwareEvent,VerificationAwareEvent:()=>d.VerificationAwareEvent,appendAction:()=>D,baseFields:()=>V,deterministicSessionEndId:()=>O,findDurationSinceLastAction:()=>J,findLastActionTimestamp:()=>G,getFileChangesSinceLastFailVerdict:()=>Y,getFileChangesSinceLastVerification:()=>Q,getToolCallsSinceLastFileChange:()=>z,getToolCallsSinceLastVerification:()=>W,hasFileChangesSinceLastVerification:()=>B,hasToolCallsSinceLastVerdict:()=>K,hasVerifierEverEngaged:()=>X,readActionsSinceLastMarker:()=>x,resolveProjectName:()=>S,summarizeFixFileChanges:()=>Z});module.exports=P(ee);var l=require("fs"),h=require("crypto"),a=require("path"),f=require("../../lib/logger"),b=require("../../lib/collector"),$=require("../../lib/config"),w=require("../../queue/submit"),k=require("../../queue/types"),C=require("../../queue/register-handlers"),d=require("../../lib/event");function S(t){let e=t,n;for(;;){const i=(0,a.join)(e,".git");if((0,l.existsSync)(i)){const s=L(i);if(s==="directory"){const o=E(i);return o||(0,a.basename)(e)}if(s==="linked-pointer"){const o=_(i),u=o!==void 0?E(o):void 0;return u||(0,a.basename)(e)}s==="worktree-pointer"&&n===void 0&&(n=M(i))}const r=(0,a.dirname)(e);if(r===e)break;e=r}return n??(0,a.basename)(t)}c(S,"resolveProjectName");function L(t){try{const e=(0,l.statSync)(t);if(e.isDirectory())return"directory";if(!e.isFile())return"other";const n=_(t);return n===void 0?"other":(0,l.existsSync)((0,a.join)(n,"commondir"))?"worktree-pointer":"linked-pointer"}catch(e){return f.logger.debug(`resolveProjectName: stat failed for ${t}: ${e instanceof Error?e.message:e}`),"other"}}c(L,"classifyGitEntry");function _(t){try{const n=(0,l.readFileSync)(t,"utf-8").trim().match(/^gitdir:\s*(.+)$/m);if(!n)return;const i=n[1].trim();return(0,a.isAbsolute)(i)?i:(0,a.resolve)((0,a.dirname)(t),i)}catch(e){f.logger.debug(`resolveProjectName: pointer at ${t} unreadable: ${e instanceof Error?e.message:e}`);return}}c(_,"readGitdirPointer");function E(t){try{const e=(0,a.join)(t,"config");if(!(0,l.existsSync)(e))return;const n=U((0,l.readFileSync)(e,"utf-8"));return n?q(n):void 0}catch(e){f.logger.debug(`resolveProjectName: failed to read git config at ${t}: ${e instanceof Error?e.message:e}`);return}}c(E,"repoNameFromGitConfig");function M(t){const e=_(t);if(e===void 0)return;const n=(0,a.join)(e,"commondir");let i;try{if((0,l.existsSync)(n)){const o=(0,l.readFileSync)(n,"utf-8").trim();i=(0,a.isAbsolute)(o)?o:(0,a.resolve)(e,o)}else i=e}catch(o){f.logger.debug(`resolveProjectName: commondir at ${n} unreadable: ${o instanceof Error?o.message:o}`);return}const r=E(i);if(r)return r;const s=(0,a.basename)(i)===".git"?(0,a.basename)((0,a.dirname)(i)):(0,a.basename)(i);return s.length>0?s:void 0}c(M,"repoNameFromWorktreePointer");function U(t){const e=t.split(/\r?\n/);let n=null,i=null,r,s;for(const o of e){const u=o.trim();if(u.length===0||u.startsWith("#")||u.startsWith(";"))continue;const p=u.match(/^\[([^\s\]]+)(?:\s+"([^"]*)")?\]$/);if(p){n=p[1].toLowerCase(),i=p[2]??null;continue}if(n!=="remote"||i===null)continue;const m=u.match(/^url\s*=\s*(.+?)\s*$/i);if(!m)continue;const g=m[1];i==="origin"&&(r=g),s===void 0&&(s=g)}return r??s}c(U,"readFirstRemoteUrl");function q(t){let e=t.trim();if(e.length===0)return;const n=e.match(/^[^/@]+@[^/:]+:(.+)$/);if(n?e=n[1]:e=e.replace(/^[a-z][a-z0-9+.-]*:\/\/[^/]*\//i,""),e=e.replace(/[?#].*$/,"").replace(/\/+$/,""),e.length===0)return;const r=(e.split("/").pop()??"").replace(/\.git$/i,"");return r.length>0?r:void 0}c(q,"repoNameFromRemoteUrl");function V(t){const e=(0,a.basename)((0,a.dirname)(t)),n=(0,a.dirname)((0,a.dirname)((0,a.dirname)((0,a.dirname)(t)))),i=(0,a.dirname)(t),{getUserEmail:r,getUsageType:s,getUsagePlan:o}=require("./session-state"),u=r(i),p=s(i),m=o(i),g={id:(0,h.randomUUID)(),session_id:e,project_name:S(n)};return u&&(g.user_email=u),p&&(g.usage_type=p),m&&(g.usage_plan=m),g}c(V,"baseFields");function O(t){const e=(0,h.createHash)("sha256").update("session_end:"+t).digest("hex");return`${e.slice(0,8)}-${e.slice(8,12)}-${e.slice(12,16)}-${e.slice(16,20)}-${e.slice(20,32)}`}c(O,"deterministicSessionEndId");async function D(t,e){const n=V(t);e.id||(e.id=n.id),e.session_id||(e.session_id=n.session_id),e.project_name||(e.project_name=n.project_name);try{(0,l.mkdirSync)((0,a.dirname)(t),{recursive:!0}),(0,l.appendFileSync)(t,JSON.stringify(e)+`
2
+ `)}catch(i){f.logger.debug(`failed to append action to ${t}: ${i}`)}if(e.type!=="tool_call"){const i=(0,a.basename)((0,a.dirname)(t)),r=(0,a.dirname)((0,a.dirname)((0,a.dirname)((0,a.dirname)(t))));try{await(0,b.sendToCollector)(e,i,r)}catch(s){s instanceof b.RetriableCollectorError?I(r,i,e,s):f.logger.debug(`failed to send action to collector: ${s}`)}}}c(D,"appendAction");function I(t,e,n,i){if(!(0,$.isJobQueueEnabled)(t)){f.logger.debug(`collector fallback: jobQueue disabled, dropping type=${n.type} id=${n.id} (cause: ${i.message})`);return}try{(0,w.submit)(t,e,C.SEND_EVENT_TYPE,n),f.logger.debug(`collector fallback: enqueued type=${n.type} id=${n.id} as send_event (cause: ${i.message})`)}catch(r){if(r instanceof k.JobTooLargeError){f.logger.debug(`collector fallback: event too large for queue (${r.sizeBytes} bytes), dropping type=${n.type} id=${n.id}`);return}f.logger.debug(`collector fallback: queue submit failed for type=${n.type} id=${n.id}: ${r}`)}}c(I,"enqueueCollectorFallback");function J(t,e,n){if((0,l.existsSync)(t))try{const r=(0,l.readFileSync)(t,"utf-8").trim().split(`
3
+ `).filter(s=>s.length>0);for(let s=r.length-1;s>=0;s--)try{const o=JSON.parse(r[s]);if(o.type===e&&typeof o.timestamp=="number")return n-o.timestamp}catch{}}catch(i){f.logger.debug(`failed to find duration for ${e}: ${i}`)}}c(J,"findDurationSinceLastAction");function x(t,e){return y(t,n=>n.type===e)}c(x,"readActionsSinceLastMarker");function G(t){if((0,l.existsSync)(t))try{const n=(0,l.readFileSync)(t,"utf-8").trim().split(`
4
+ `).filter(i=>i.length>0);for(let i=n.length-1;i>=0;i--)try{const r=JSON.parse(n[i]);if(typeof r.timestamp=="number")return r.timestamp}catch{}}catch(e){f.logger.debug(`failed to read last action timestamp from ${t}: ${e}`)}}c(G,"findLastActionTimestamp");function y(t,e){if(!(0,l.existsSync)(t))return[];try{const i=(0,l.readFileSync)(t,"utf-8").trim().split(`
5
+ `).filter(o=>o.length>0);let r=-1;const s=[];for(let o=0;o<i.length;o++)try{const u=JSON.parse(i[o]);s.push(u),e(u)&&(r=o)}catch{}return s.slice(r+1)}catch(n){return f.logger.debug(`failed to read actions from ${t}: ${n}`),[]}}c(y,"readActionsSinceMatch");function A(t){return t.type!=="verification_requested"?!1:t.action==="allow"}c(A,"isAllowVerificationRequested");function W(t){return y(t,A).filter(n=>n.type==="tool_call")}c(W,"getToolCallsSinceLastVerification");function z(t){return x(t,"file_change").filter(n=>n.type==="tool_call")}c(z,"getToolCallsSinceLastFileChange");function K(t){return x(t,"verdict_write").some(n=>n.type==="tool_call")}c(K,"hasToolCallsSinceLastVerdict");function B(t){return y(t,A).some(n=>n.type==="file_change")}c(B,"hasFileChangesSinceLastVerification");function Q(t){return y(t,A).filter(n=>n.type==="file_change")}c(Q,"getFileChangesSinceLastVerification");function H(t){return t.type!=="verdict_write"?!1:t.verdict?.status==="fail"}c(H,"isFailVerdictWrite");function Y(t){if(!(0,l.existsSync)(t))return[];try{const i=(0,l.readFileSync)(t,"utf-8").trim().split(`
6
+ `).filter(o=>o.length>0).map(o=>{try{return JSON.parse(o)}catch{return null}});let r=-1;for(let o=0;o<i.length;o++){const u=i[o];u!==null&&H(u)&&(r=o)}if(r<0)return[];const s=[];for(let o=r+1;o<i.length;o++){const u=i[o];u!==null&&u.type==="file_change"&&s.push(u)}return s}catch(e){return f.logger.debug(`failed to read file changes since last fail verdict: ${e}`),[]}}c(Y,"getFileChangesSinceLastFailVerdict");function X(t){if(!(0,l.existsSync)(t))return!1;try{const n=(0,l.readFileSync)(t,"utf-8").trim().split(`
7
+ `).filter(i=>i.length>0);for(const i of n){let r;try{r=JSON.parse(i)}catch{continue}if(r.type==="verification_start")return!0;if(r.type==="tool_call"){const s=r;if(s.tool_type==="mcp"&&typeof s.mcp_server=="string"&&s.mcp_server.endsWith("-devtools"))return!0}}return!1}catch(e){return f.logger.debug(`failed to scan verifier engagement in ${t}: ${e}`),!1}}c(X,"hasVerifierEverEngaged");function Z(t){if(t.length===0)return[];const e=new Map,n=[];for(const i of t){const r=i.file_path;let s=e.get(r);s||(s={op:i.operation,added:0,removed:0},e.set(r,s),n.push(r)),s.op=s.op==="create"||i.operation==="create"?"create":i.operation,s.added+=typeof i.lines_added=="number"?i.lines_added:0,s.removed+=typeof i.lines_removed=="number"?i.lines_removed:0}return n.map(i=>{const r=e.get(i);return`${r.op} ${i} (+${r.added}/-${r.removed})`})}c(Z,"summarizeFixFileChanges");0&&(module.exports={ActivityAwareEvent,Event,EventType,EventTypeValue,FixAwareEvent,VerificationAwareEvent,appendAction,baseFields,deterministicSessionEndId,findDurationSinceLastAction,findLastActionTimestamp,getFileChangesSinceLastFailVerdict,getFileChangesSinceLastVerification,getToolCallsSinceLastFileChange,getToolCallsSinceLastVerification,hasFileChangesSinceLastVerification,hasToolCallsSinceLastVerdict,hasVerifierEverEngaged,readActionsSinceLastMarker,resolveProjectName,summarizeFixFileChanges});
@@ -0,0 +1 @@
1
+ "use strict";var a=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var c=(t,e)=>a(t,"name",{value:e,configurable:!0});var C=(t,e)=>{for(var i in e)a(t,i,{get:e[i],enumerable:!0})},T=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of p(e))!N.call(t,r)&&r!==i&&a(t,r,{get:()=>e[r],enumerable:!(n=E(e,r))||n.enumerable});return t};var S=t=>T(a({},"__esModule",{value:!0}),t);var L={};C(L,{executeToolBareName:()=>O,extractNestedToolCalls:()=>P});module.exports=S(L);var o=require("../../lib/config");const h=Object.fromEntries(Object.entries(o.CYCLE_TO_SERVER).map(([t,e])=>[e,o.CYCLE_TOOL_PREFIXES[t]])),d=/callTool\s*\(\s*\\?[`'"]([^`'"\\]+)\\?[`'"]/g;function O(t){if(!t)return null;const e=h[t];return e!==void 0?`${e}execute`:null}c(O,"executeToolBareName");function R(t,e,i){let n=t;const r=`mcp__${e}__`,s=`mcp__${e.replace(/-/g,"_")}__`;return n.startsWith(r)?n=n.slice(r.length):n.startsWith(s)&&(n=n.slice(s.length)),n.startsWith("MCP:")&&(n=n.slice(4)),n.startsWith(i)||(n=`${i}${n}`),n}c(R,"normalizeNestedName");function b(t,e){if(t[e]!=="{")return;let i=0;for(let n=e;n<t.length;n++)if(t[n]==="{")i++;else if(t[n]==="}"&&(i--,i===0))return t.slice(e,n+1)}c(b,"extractBalancedBraces");function P(t,e){const i=h[e];if(i===void 0)return[];const n=typeof t=="string"?t:JSON.stringify(t??""),r=[],s=new Set;d.lastIndex=0;let l=d.exec(n);for(;l!==null;){const f=R(l[1],e,i);if(!s.has(f)){s.add(f);let g;const x=l.index+l[0].length,m=n.slice(x).trimStart();if(m.startsWith(",")){const _=m.slice(1).trimStart();if(_.startsWith("{")){const u=b(_,0);if(u)try{g=JSON.parse(u)}catch{g=u}}}r.push({name:f,args:g})}l=d.exec(n)}return r}c(P,"extractNestedToolCalls");0&&(module.exports={executeToolBareName,extractNestedToolCalls});
@@ -1,8 +1,8 @@
1
- "use strict";var g=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var y=(c,s)=>g(c,"name",{value:s,configurable:!0});var D=(c,s)=>{for(var e in s)g(c,e,{get:s[e],enumerable:!0})},C=(c,s,e,o)=>{if(s&&typeof s=="object"||typeof s=="function")for(let r of R(s))!S.call(c,r)&&r!==e&&g(c,r,{get:()=>s[r],enumerable:!(o=F(s,r))||o.enumerable});return c};var I=c=>C(g({},"__esModule",{value:!0}),c);var k={};D(k,{runSubmitVerdict:()=>$});module.exports=I(k);var l=require("fs"),E=require("path"),u=require("../../lib/logger"),x=require("../../lib/recording-tools"),b=require("../../lib/telemetry"),n=require("./actions"),i=require("./session-state");function T(c,s){const e=(0,i.getPendingFixes)(c);if(e.length>0)return e;const o=(0,n.summarizeFixFileChanges)((0,n.getFileChangesSinceLastFailVerdict)(s));return o.length>0?o:["re-verified after a prior failure (no tracked code changes in this fix cycle)"]}y(T,"deriveFixes");async function $(c){const{sessionId:s,sessionDir:e,verdictFile:o,actionsFile:r,verdictJson:V,projectDir:h}=c;let t;try{t=JSON.parse(V)}catch(a){return u.logger.debug(`submit-verdict: invalid JSON: ${a}`),{success:!1,message:"REJECTED: verdict is not valid JSON."}}if(t.status!=="pass"&&t.status!=="fail")return{success:!1,message:`REJECTED: status must be "pass" or "fail", got "${t.status}".`};if(!Array.isArray(t.checks)||t.checks.length===0)return{success:!1,message:"REJECTED: checks must be a non-empty array describing what you functionally tested."};if(t.status==="fail"&&(!Array.isArray(t.issues)||t.issues.length===0))return{success:!1,message:'REJECTED: when status is "fail", issues must be a non-empty array describing what failed.'};if(t.status==="pass"&&(0,i.isFailLikeVerdictStatus)((0,i.getLastVerdictStatus)(e))&&(!Array.isArray(t.fixes)||t.fixes.length===0)&&(t.fixes=T(e,r)),(0,i.isRecordingRequired)(e)&&(0,i.isRecordingActive)(e))return{success:!1,message:`REJECTED: recording is still active.
1
+ "use strict";var m=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var $=Object.prototype.hasOwnProperty;var _=(c,r)=>m(c,"name",{value:r,configurable:!0});var I=(c,r)=>{for(var i in r)m(c,i,{get:r[i],enumerable:!0})},S=(c,r,i,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of T(r))!$.call(c,n)&&n!==i&&m(c,n,{get:()=>r[n],enumerable:!(o=F(r,n))||o.enumerable});return c};var k=c=>S(m({},"__esModule",{value:!0}),c);var P={};I(P,{runSubmitVerdict:()=>N});module.exports=k(P);var y=require("fs"),w=require("path"),u=require("../../lib/logger"),d=require("../../lib/config"),x=require("../../lib/recording-tools"),V=require("../../lib/telemetry"),a=require("./actions"),e=require("./session-state");function J(c,r){const i=(0,e.getPendingFixes)(c);if(i.length>0)return i;const o=(0,a.summarizeFixFileChanges)((0,a.getFileChangesSinceLastFailVerdict)(r));return o.length>0?o:["re-verified after a prior failure (no tracked code changes in this fix cycle)"]}_(J,"deriveFixes");async function N(c){const{sessionId:r,sessionDir:i,verdictFile:o,actionsFile:n,verdictJson:C,projectDir:E}=c;let t;try{t=JSON.parse(C)}catch(s){return u.logger.debug(`submit-verdict: invalid JSON: ${s}`),{success:!1,message:"REJECTED: verdict is not valid JSON."}}if(t.status!=="pass"&&t.status!=="fail"&&t.status!=="not_applicable")return{success:!1,message:`REJECTED: status must be "pass", "fail", or "not_applicable", got "${t.status}".`};const f=t.status==="not_applicable",g=Array.isArray(t.not_applicable_cycles)?t.not_applicable_cycles:[],b=g.length>0;if(f&&b)return{success:!1,message:'REJECTED: do not combine not_applicable_cycles with status "not_applicable" (global N/A already exempts every cycle). Use status "not_applicable" for the whole change, OR a pass/fail status with not_applicable_cycles for a subset.'};if(b){const s=g.filter(l=>!d.ALL_CYCLES.includes(l));if(s.length>0)return{success:!1,message:`REJECTED: unknown cycle name(s) in not_applicable_cycles: ${s.join(", ")}. Valid: ${d.ALL_CYCLES.join(" / ")}.`}}if(f||b){if((0,e.isFailLikeVerdictStatus)((0,e.getLastVerdictStatus)(i)))return{success:!1,message:"REJECTED: you reported a fail \u2014 N/A cannot reclassify it. Fix the issues and re-verify, or report the fail again."};if(!Array.isArray(t.reason)||t.reason.length===0)return{success:!1,message:`REJECTED: ${f?'status "not_applicable"':"not_applicable_cycles"} requires a non-empty "reason" array explaining why there is no runtime surface to verify.`};if(E!==void 0&&(0,d.getVerificationStrict)((0,d.loadConfig)(E)))return{success:!1,message:"REJECTED: strict mode \u2014 N/A is not accepted. Verify the change with the required tools, or report a fail."}}if(!f&&(!Array.isArray(t.checks)||t.checks.length===0))return{success:!1,message:"REJECTED: checks must be a non-empty array describing what you functionally tested."};if(t.status==="fail"&&(!Array.isArray(t.issues)||t.issues.length===0))return{success:!1,message:'REJECTED: when status is "fail", issues must be a non-empty array describing what failed.'};if(t.status==="pass"&&(0,e.isFailLikeVerdictStatus)((0,e.getLastVerdictStatus)(i))&&(!Array.isArray(t.fixes)||t.fixes.length===0)&&(t.fixes=J(i,n)),(0,e.isRecordingRequired)(i)&&(0,e.isRecordingActive)(i))return{success:!1,message:`REJECTED: recording is still active.
2
2
 
3
3
  1. Stop recording first:
4
- ${(0,x.listRecordingCycleTools)().map(d=>` ${d.stopTool} (${d.cycle} cycle)`).join(`
4
+ ${(0,x.listRecordingCycleTools)().map(l=>` ${l.stopTool} (${l.cycle} cycle)`).join(`
5
5
  `)}
6
6
  2. Then re-run the same submit-verdict command.
7
7
 
8
- Recording start/stop must bracket the verification flow \u2014 start before devtools tools, stop before submit-verdict.`};try{(0,l.mkdirSync)((0,E.dirname)(o),{recursive:!0}),(0,l.writeFileSync)(o,JSON.stringify(t,null,2))}catch(a){return u.logger.debug(`submit-verdict: failed to write ${o}: ${a}`),{success:!1,message:`REJECTED: failed to write verdict file: ${a}`}}(0,i.setLastVerdictStatus)(e,t.status),(0,i.clearPendingFixes)(e),(0,i.isRecordingRequired)(e)&&(0,i.setRecordingRequired)(e,!1);const m=(0,i.getActiveActivityId)(e),v=(0,i.getActiveFixId)(e);if(v){const a=Date.now(),d={...(0,n.baseFields)(r),type:"fix_end",timestamp:a,fix_id:v,activity_id:m,duration:(0,n.findDurationSinceLastAction)(r,"fix_start",a)};await(0,n.appendAction)(r,d),(0,i.clearActiveFix)(e),(0,i.setPhase)(e,"coding"),u.logger.debug(`fix-end (verdict): ${v}`)}const f=(0,i.getActiveVerificationId)(e),p=(0,i.getActiveTraceId)(e);if(f){const a=Date.now(),d={...(0,n.baseFields)(r),type:"verification_end",timestamp:a,verification_id:f,activity_id:m,trace_id:p,duration:(0,n.findDurationSinceLastAction)(r,"verification_start",a),status:t.status};await(0,n.appendAction)(r,d),(0,i.clearActiveVerification)(e),u.logger.debug(`verification-end (auto): ${f} trace=${p}`)}const A=t,w={...(0,n.baseFields)(r),type:"verdict_write",timestamp:Date.now(),verification_id:f,activity_id:m,trace_id:p,verdict:A};return await(0,n.appendAction)(r,w),await(0,b.trackVerdictWrite)(s,t.status,h),u.logger.debug(`submit-verdict: session=${s} status=${t.status}`),t.status==="pass"?{success:!0,message:`VERDICT ACCEPTED: pass.${t.fixes?.length?` Fixes: ${t.fixes.join(", ")}`:""}`}:{success:!0,message:`VERDICT ACCEPTED: fail. Issues: ${(t.issues??[]).join(", ")}. Fix and re-verify.`}}y($,"runSubmitVerdict");0&&(module.exports={runSubmitVerdict});
8
+ Recording start/stop must bracket the verification flow \u2014 start before devtools tools, stop before submit-verdict.`};try{(0,y.mkdirSync)((0,w.dirname)(o),{recursive:!0}),(0,y.writeFileSync)(o,JSON.stringify(t,null,2))}catch(s){return u.logger.debug(`submit-verdict: failed to write ${o}: ${s}`),{success:!1,message:`REJECTED: failed to write verdict file: ${s}`}}(0,e.setLastVerdictStatus)(i,t.status),(0,e.clearPendingFixes)(i),(0,e.isRecordingRequired)(i)&&(0,e.setRecordingRequired)(i,!1);const v=(0,e.getActiveActivityId)(i),h=(0,e.getActiveFixId)(i);if(h){const s=Date.now(),l={...(0,a.baseFields)(n),type:"fix_end",timestamp:s,fix_id:h,activity_id:v,duration:(0,a.findDurationSinceLastAction)(n,"fix_start",s)};await(0,a.appendAction)(n,l),(0,e.clearActiveFix)(i),(0,e.setPhase)(i,"coding"),u.logger.debug(`fix-end (verdict): ${h}`)}const p=(0,e.getActiveVerificationId)(i),A=(0,e.getActiveTraceId)(i);if(p){const s=Date.now(),l={...(0,a.baseFields)(n),type:"verification_end",timestamp:s,verification_id:p,activity_id:v,trace_id:A,duration:(0,a.findDurationSinceLastAction)(n,"verification_start",s),status:t.status};await(0,a.appendAction)(n,l),(0,e.clearActiveVerification)(i),u.logger.debug(`verification-end (auto): ${p} trace=${A}`)}const R=t,D={...(0,a.baseFields)(n),type:"verdict_write",timestamp:Date.now(),verification_id:p,activity_id:v,trace_id:A,verdict:R};if(await(0,a.appendAction)(n,D),await(0,V.trackVerdictWrite)(r,t.status,E),u.logger.debug(`submit-verdict: session=${r} status=${t.status}`),t.status==="pass"){const s=t.fixes?.length?` Fixes: ${t.fixes.join(", ")}`:"";return{success:!0,message:`VERDICT ACCEPTED: pass.${g.length>0?` (N/A cycles: ${g.join(", ")})`:""}${s}`}}return t.status==="not_applicable"?{success:!0,message:`VERDICT ACCEPTED: not_applicable. ${(t.reason??[]).join(", ")}`}:{success:!0,message:`VERDICT ACCEPTED: fail. Issues: ${(t.issues??[]).join(", ")}. Fix and re-verify.`}}_(N,"runSubmitVerdict");0&&(module.exports={runSubmitVerdict});
@@ -1,11 +1,16 @@
1
- "use strict";var $=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var _=Object.prototype.hasOwnProperty;var g=(t,n)=>$(t,"name",{value:n,configurable:!0});var M=(t,n)=>{for(var r in n)$(t,r,{get:n[r],enumerable:!0})},U=(t,n,r,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let e of L(n))!_.call(t,e)&&e!==r&&$(t,e,{get:()=>n[e],enumerable:!(i=j(n,e))||i.enumerable});return t};var W=t=>U($({},"__esModule",{value:!0}),t);var Y={};M(Y,{VERIFICATION_DOC_DIR:()=>p,VERIFICATION_DOC_FILE:()=>v,buildVerificationContext:()=>N,buildVerificationContextForSession:()=>k,buildVerificationContextOnceForCycle:()=>X,collectChangedPaths:()=>w,resolveContextFiles:()=>B});module.exports=W(Y);var D=require("fs"),o=require("path"),u=require("../../lib/config"),S=require("../../lib/git"),d=require("../../lib/logger"),R=require("./session-state"),T=require("./actions");const p=".ironbee",v="VERIFICATION.md",z=`===== IRONBEE \u2014 PROJECT VERIFICATION INSTRUCTIONS (path-scoped) =====
2
- `,G=`The following areas changed this cycle. Follow this guidance IN ADDITION to the standard verification flow.
3
- `,F=`====================================================================
4
- `;function I(t){return Buffer.byteLength(t,"utf-8")}g(I,"byteLen");function H(t){try{return(0,D.realpathSync)(t)}catch{return(0,o.resolve)(t)}}g(H,"canonicalDir");function J(t){const n=(0,o.resolve)(t),r=[];let i=n;for(;;)try{const e=(0,D.realpathSync)(i);return r.length>0?(0,o.join)(e,...r):e}catch{const e=(0,o.dirname)(i);if(e===i)return n;r.unshift((0,o.basename)(i)),i=e}}g(J,"canonicalizePath");function q(t,n){const r=(0,o.relative)(t,n);return r.length>0&&!r.startsWith("..")&&!(0,o.isAbsolute)(r)}g(q,"isUnderDir");function A(t){try{return(0,T.getFileChangesSinceLastVerification)(t).map(n=>n.file_path).filter(n=>typeof n=="string"&&n.length>0)}catch(n){return d.logger.debug(`verification-context: actions fallback failed: ${n instanceof Error?n.message:n}`),[]}}g(A,"changedFromActions");function w(t,n,r){let i;if(r.source==="actions")i=A(n);else{const s=(0,S.getChangedPaths)(t,r.commitDepth);i=s===null?A(n):s}const e=new Set;for(const s of i){const l=J((0,o.isAbsolute)(s)?s:(0,o.resolve)(t,s)),c=(0,o.relative)(t,l);c.length===0||c.startsWith("..")||(0,o.isAbsolute)(c)||c.split(o.sep).includes(p)||e.add(l)}return[...e]}g(w,"collectChangedPaths");function B(t,n){const r=new Map;for(const i of n){let e=(0,o.dirname)(i);if(!(e!==t&&!q(t,e)))for(;;){const s=(0,o.join)(e,p,v);if(!r.has(s)&&(0,D.existsSync)(s))try{const c=(0,D.readFileSync)(s,"utf-8"),h=(0,o.relative)(t,e),f=h.length===0?"":h.split(o.sep).join("/"),a=f.length===0?0:f.split("/").length;r.set(s,{absPath:s,relDir:f,depth:a,content:c})}catch(c){d.logger.debug(`verification-context: failed to read ${s}: ${c instanceof Error?c.message:c}`)}if(e===t)break;const l=(0,o.dirname)(e);if(l===e)break;e=l}}return[...r.values()].sort((i,e)=>i.depth-e.depth||i.relDir.localeCompare(e.relDir))}g(B,"resolveContextFiles");function K(t){return t.relDir.length===0?{label:"(repo root)",path:`${p}/${v}`}:{label:`${t.relDir}/`,path:`${t.relDir}/${p}/${v}`}}g(K,"provenance");function E(t){const n=K(t);return`
1
+ "use strict";var y=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var H=Object.prototype.hasOwnProperty;var g=(t,n)=>y(t,"name",{value:n,configurable:!0});var U=(t,n)=>{for(var i in n)y(t,i,{get:n[i],enumerable:!0})},W=(t,n,i,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let e of M(n))!H.call(t,e)&&e!==i&&y(t,e,{get:()=>n[e],enumerable:!(r=L(n,e))||r.enumerable});return t};var z=t=>W(y({},"__esModule",{value:!0}),t);var tt={};U(tt,{VERIFICATION_DOC_DIR:()=>b,VERIFICATION_DOC_FILE:()=>v,buildVerificationContext:()=>N,buildVerificationContextForSession:()=>j,buildVerificationContextOnceForCycle:()=>Z,collectChangedPaths:()=>A,renderChangedPathsBlock:()=>T,resolveContextFiles:()=>P});module.exports=z(tt);var D=require("fs"),o=require("path"),f=require("../../lib/config"),S=require("../../lib/git"),h=require("../../lib/logger"),O=require("./session-state"),w=require("./actions");const b=".ironbee",v="VERIFICATION.md",G=`===== IRONBEE \u2014 PROJECT VERIFICATION INSTRUCTIONS (path-scoped) =====
2
+ `,J=`The following areas changed this cycle. Follow this guidance IN ADDITION to the standard verification flow.
3
+ `,k=`====================================================================
4
+ `;function C(t){return Buffer.byteLength(t,"utf-8")}g(C,"byteLen");function q(t){try{return(0,D.realpathSync)(t)}catch{return(0,o.resolve)(t)}}g(q,"canonicalDir");function K(t){const n=(0,o.resolve)(t),i=[];let r=n;for(;;)try{const e=(0,D.realpathSync)(r);return i.length>0?(0,o.join)(e,...i):e}catch{const e=(0,o.dirname)(r);if(e===r)return n;i.unshift((0,o.basename)(r)),r=e}}g(K,"canonicalizePath");function Q(t,n){const i=(0,o.relative)(t,n);return i.length>0&&!i.startsWith("..")&&!(0,o.isAbsolute)(i)}g(Q,"isUnderDir");function F(t){try{return(0,w.getFileChangesSinceLastVerification)(t).map(n=>n.file_path).filter(n=>typeof n=="string"&&n.length>0)}catch(n){return h.logger.debug(`verification-context: actions fallback failed: ${n instanceof Error?n.message:n}`),[]}}g(F,"changedFromActions");function A(t,n,i){let r;if(i.source==="actions")r=F(n);else{const s=(0,S.getChangedPaths)(t,i.commitDepth);r=s===null?F(n):s}const e=new Set;for(const s of r){const l=K((0,o.isAbsolute)(s)?s:(0,o.resolve)(t,s)),c=(0,o.relative)(t,l);c.length===0||c.startsWith("..")||(0,o.isAbsolute)(c)||c.split(o.sep).includes(b)||e.add(l)}return[...e]}g(A,"collectChangedPaths");function P(t,n){const i=new Map;for(const r of n){let e=(0,o.dirname)(r);if(!(e!==t&&!Q(t,e)))for(;;){const s=(0,o.join)(e,b,v);if(!i.has(s)&&(0,D.existsSync)(s))try{const c=(0,D.readFileSync)(s,"utf-8"),m=(0,o.relative)(t,e),d=m.length===0?"":m.split(o.sep).join("/"),u=d.length===0?0:d.split("/").length;i.set(s,{absPath:s,relDir:d,depth:u,content:c})}catch(c){h.logger.debug(`verification-context: failed to read ${s}: ${c instanceof Error?c.message:c}`)}if(e===t)break;const l=(0,o.dirname)(e);if(l===e)break;e=l}}return[...i.values()].sort((r,e)=>r.depth-e.depth||r.relDir.localeCompare(e.relDir))}g(P,"resolveContextFiles");function X(t){return t.relDir.length===0?{label:"(repo root)",path:`${b}/${v}`}:{label:`${t.relDir}/`,path:`${t.relDir}/${b}/${v}`}}g(X,"provenance");function E(t){const n=X(t);return`
5
5
  ## ${n.label} \u2014 ${n.path}
6
6
  ${t.content.trimEnd()}
7
- `}g(E,"renderBlock");function N(t,n){if(t.length===0)return"";const r=[...t].sort((a,m)=>a.depth-m.depth||a.relDir.localeCompare(m.relDir)),i=z+G,e=Math.max(0,n.maxBytes-I(i)-I(F)),s=[];let l=0;for(let a=r.length-1;a>=0;a--){const m=E(r[a]),x=I(m);if(l+x<=e)s.push(r[a]),l+=x;else if(s.length===0){const y=Q(r[a],e);s.push(y);break}else break}const c=s.reverse(),h=r.length-c.length,f=[i];for(const a of c)f.push(E(a));return h>0&&f.push(`
8
- [${h} less-specific VERIFICATION.md file(s) omitted to fit the ${n.maxBytes}-byte cap]
9
- `),f.push(F),f.join("")}g(N,"buildVerificationContext");function Q(t,n){const r=`
10
- ... (truncated)`,i=E({...t,content:""}),e=Math.max(0,n-I(i)-I(r)),s=Buffer.from(t.content,"utf-8").subarray(0,e).toString("utf-8");return{...t,content:s+r}}g(Q,"hardTruncate");function k(t,n,r){if(!(0,u.getVerificationContextEnabled)(r))return"";try{const i=H(t),e=(0,o.join)(i,".ironbee","sessions",n,"actions.jsonl"),s=(0,u.getVerificationContextSource)(r),l=w(i,e,{source:s,commitDepth:(0,u.getVerificationContextCommitDepth)(r)}),c=l.filter(b=>!(0,u.isIgnoredVerifyPath)(r,b)),h=l.length-c.length,f=new Set;for(const b of c){const C=(0,o.relative)(i,(0,o.dirname)(b)).split(o.sep).join("/");f.add(C.length===0?"(root)":C)}const a=[...f].sort(),m=50,x=a.slice(0,m),y=a.length>m?` [+${a.length-m} more]`:"";d.logger.debug(`verification-context: source=${s} changed in ${a.length} dir(s)`+(h>0?` (${h} ignored)`:"")+`: ${x.join(", ")}${y}`);const V=B(i,c);for(const b of V){const C=b.relDir.length>0?`${b.relDir}/${p}/${v}`:`${p}/${v}`,O=b.content.replace(/\s+/g," ").trim(),P=O.length>100?`${O.slice(0,100)}...`:O;d.logger.debug(`verification-context: \u2022 ${C} \u2014 ${I(b.content)} bytes :: ${P}`)}return N(V,{maxBytes:(0,u.getVerificationContextMaxBytes)(r)})}catch(i){return d.logger.debug(`verification-context: build failed: ${i instanceof Error?i.message:i}`),""}}g(k,"buildVerificationContextForSession");function X(t){const{projectDir:n,sessionId:r,sessionDir:i,activeVerificationId:e,config:s}=t;if(!e||!(0,u.getVerificationContextEnabled)(s)||(0,R.getContextInjectedVerificationId)(i)===e)return"";let l="";try{l=k(n,r,s)}catch(c){d.logger.debug(`verification-context: once-for-cycle build failed: ${c instanceof Error?c.message:c}`),l=""}if(l.length>0){const c=l.split(`
11
- ## `).length-1;d.logger.debug(`verification-context: injected ${Buffer.byteLength(l,"utf-8")} bytes, ${c} area(s) for cycle ${e}`)}else d.logger.debug(`verification-context: no matching .ironbee/VERIFICATION.md for cycle ${e}`);return(0,R.setContextInjectedVerificationId)(i,e),l}g(X,"buildVerificationContextOnceForCycle");0&&(module.exports={VERIFICATION_DOC_DIR,VERIFICATION_DOC_FILE,buildVerificationContext,buildVerificationContextForSession,buildVerificationContextOnceForCycle,collectChangedPaths,resolveContextFiles});
7
+ `}g(E,"renderBlock");const V=100;function T(t,n){if(n.length===0)return"";const i=n.map(s=>(0,o.relative)(t,s).split(o.sep).join("/")).sort(),r=i.slice(0,V),e=i.length>V?`
8
+ - \u2026 +${i.length-V} more`:"";return`
9
+ ## Changed files this cycle (${i.length})
10
+ ${r.map(s=>`- ${s}`).join(`
11
+ `)}${e}
12
+ `}g(T,"renderChangedPathsBlock");function N(t,n){const i=n.changedPathsBlock??"";if(t.length===0&&i.length===0)return"";const r=[...t].sort((a,$)=>a.depth-$.depth||a.relDir.localeCompare($.relDir)),e=G+J+i,s=Math.max(0,n.maxBytes-C(e)-C(k)),l=[];let c=0;for(let a=r.length-1;a>=0;a--){const $=E(r[a]),x=C($);if(c+x<=s)l.push(r[a]),c+=x;else if(l.length===0){const I=Y(r[a],s);l.push(I);break}else break}const m=l.reverse(),d=r.length-m.length,u=[e];for(const a of m)u.push(E(a));return d>0&&u.push(`
13
+ [${d} less-specific VERIFICATION.md file(s) omitted to fit the ${n.maxBytes}-byte cap]
14
+ `),u.push(k),u.join("")}g(N,"buildVerificationContext");function Y(t,n){const i=`
15
+ ... (truncated)`,r=E({...t,content:""}),e=Math.max(0,n-C(r)-C(i)),s=Buffer.from(t.content,"utf-8").subarray(0,e).toString("utf-8");return{...t,content:s+i}}g(Y,"hardTruncate");function j(t,n,i){if(!(0,f.getVerificationContextEnabled)(i))return"";try{const r=q(t),e=(0,o.join)(r,".ironbee","sessions",n,"actions.jsonl"),s=(0,f.getVerificationContextSource)(i),l=A(r,e,{source:s,commitDepth:(0,f.getVerificationContextCommitDepth)(i)}),c=l.filter(p=>!(0,f.isIgnoredVerifyPath)(i,p)),m=l.length-c.length,d=new Set;for(const p of c){const R=(0,o.relative)(r,(0,o.dirname)(p)).split(o.sep).join("/");d.add(R.length===0?"(root)":R)}const u=[...d].sort(),a=50,$=u.slice(0,a),x=u.length>a?` [+${u.length-a} more]`:"";h.logger.debug(`verification-context: source=${s} changed in ${u.length} dir(s)`+(m>0?` (${m} ignored)`:"")+`: ${$.join(", ")}${x}`);const I=P(r,c);for(const p of I){const R=p.relDir.length>0?`${p.relDir}/${b}/${v}`:`${b}/${v}`,B=p.content.replace(/\s+/g," ").trim(),_=B.length>100?`${B.slice(0,100)}...`:B;h.logger.debug(`verification-context: \u2022 ${R} \u2014 ${C(p.content)} bytes :: ${_}`)}return N(I,{maxBytes:(0,f.getVerificationContextMaxBytes)(i),changedPathsBlock:T(r,c)})}catch(r){return h.logger.debug(`verification-context: build failed: ${r instanceof Error?r.message:r}`),""}}g(j,"buildVerificationContextForSession");function Z(t){const{projectDir:n,sessionId:i,sessionDir:r,activeVerificationId:e,config:s}=t;if(!e||!(0,f.getVerificationContextEnabled)(s)||(0,O.getContextInjectedVerificationId)(r)===e)return"";let l="";try{l=j(n,i,s)}catch(c){h.logger.debug(`verification-context: once-for-cycle build failed: ${c instanceof Error?c.message:c}`),l=""}if(l.length>0){const c=l.split(`
16
+ ## `).length-1;h.logger.debug(`verification-context: injected ${Buffer.byteLength(l,"utf-8")} bytes, ${c} area(s) for cycle ${e}`)}else h.logger.debug(`verification-context: nothing to inject (no changed paths) for cycle ${e}`);return(0,O.setContextInjectedVerificationId)(r,e),l}g(Z,"buildVerificationContextOnceForCycle");0&&(module.exports={VERIFICATION_DOC_DIR,VERIFICATION_DOC_FILE,buildVerificationContext,buildVerificationContextForSession,buildVerificationContextOnceForCycle,collectChangedPaths,renderChangedPathsBlock,resolveContextFiles});
@@ -1,9 +1,9 @@
1
- "use strict";var w=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var l=(e,t)=>w(e,"name",{value:t,configurable:!0});var B=(e,t)=>{for(var i in t)w(e,i,{get:t[i],enumerable:!0})},M=(e,t,i,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of P(t))!q.call(e,n)&&n!==i&&w(e,n,{get:()=>t[n],enumerable:!(o=L(t,n))||o.enumerable});return e};var U=e=>M(w({},"__esModule",{value:!0}),e);var te={};B(te,{runVerifyGate:()=>ee});module.exports=U(te);var p=require("fs"),f=require("../../lib/logger"),F=require("../../lib/telemetry"),g=require("./actions"),s=require("./session-state"),h=require("../../lib/config"),N=require("./required-tools");const G=3;function J(e){const t=h.CYCLE_TO_SERVER[e];if(t===void 0)throw new Error(`No MCP server registered for cycle '${e}'.`);return t}l(J,"mcpServerForCycle");function b(e){return JSON.stringify({session_id:e,status:"pass",checks:["form submits successfully","new item appears in list","no console errors"]})}l(b,"verdictExamplePass");function D(e){return JSON.stringify({session_id:e,status:"fail",checks:["form renders","submit button unresponsive"],issues:["button click handler not firing","TypeError in console"]})}l(D,"verdictExampleFail");function _(...e){for(const t of e)try{(0,p.existsSync)(t)&&(0,p.unlinkSync)(t)}catch(i){f.logger.debug(`failed to cleanup ${t}: ${i}`)}}l(_,"cleanup");function Y(e,t){const i=(0,g.getFileChangesSinceLastVerification)(e),o=new Set;for(const u of i)for(const c of(0,h.getActiveCycles)(u.file_path,t))o.add(c);const n=[];o.has("browser")&&n.push("browser");for(const u of h.OPTIONAL_CYCLES)o.has(u)&&n.push(u);return n}l(Y,"computeActiveCycles");function H(e,t,i){const o=J(e),n=new Set(t.filter(c=>c.tool_type==="mcp"&&c.mcp_server===o).map(c=>c.tool_name)),u=(0,h.getRequiredToolsConfig)(i,e);return{cycle:e,result:(0,N.satisfyRequiredTools)(n,u),config:u,usedCount:n.size}}l(H,"checkCycleTools");function Q(e){return{cycle:"browser",valid:!0,passCriteriaMet:!0}}l(Q,"checkBrowserEvidence");function z(e){return{cycle:"node",valid:!0,passCriteriaMet:!0}}l(z,"checkNodeEvidence");function W(e){return{cycle:"backend",valid:!0,passCriteriaMet:!0}}l(W,"checkBackendEvidence");function X(e){return{cycle:"android",valid:!0,passCriteriaMet:!0}}l(X,"checkAndroidEvidence");function K(e,t){if(!Array.isArray(t.checks)||t.checks.length===0)return{cycle:e,valid:!1,reason:"missing checks"};if(e==="browser")return Q(t);if(e==="node")return z(t);if(e==="backend")return W(t);if(e==="android")return X(t);throw new Error(`No evidence checker registered for cycle '${e}'.`)}l(K,"checkCycleEvidence");function Z(e){const t=e.cycle.charAt(0).toUpperCase()+e.cycle.slice(1);if(e.result.missing.length===0)return`${t} cycle: ok.`;const i=e.result.missing.map(o=>` - ${o}`).join(`
1
+ "use strict";var T=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var Q=Object.getOwnPropertyNames;var z=Object.prototype.hasOwnProperty;var d=(e,t)=>T(e,"name",{value:t,configurable:!0});var K=(e,t)=>{for(var i in t)T(e,i,{get:t[i],enumerable:!0})},W=(e,t,i,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Q(t))!z.call(e,s)&&s!==i&&T(e,s,{get:()=>t[s],enumerable:!(o=H(t,s))||o.enumerable});return e};var X=e=>W(T({},"__esModule",{value:!0}),e);var fe={};K(fe,{runVerifyGate:()=>ue});module.exports=X(fe);var v=require("fs"),u=require("../../lib/logger"),q=require("../../lib/telemetry"),h=require("./actions"),r=require("./session-state"),p=require("../../lib/config"),B=require("./required-tools");const Z=3,ee=1;function te(e){const t=p.CYCLE_TO_SERVER[e];if(t===void 0)throw new Error(`No MCP server registered for cycle '${e}'.`);return t}d(te,"mcpServerForCycle");function _(e){return JSON.stringify({session_id:e,status:"pass",checks:["form submits successfully","new item appears in list","no console errors"]})}d(_,"verdictExamplePass");function P(e){return JSON.stringify({session_id:e,status:"fail",checks:["form renders","submit button unresponsive"],issues:["button click handler not firing","TypeError in console"]})}d(P,"verdictExampleFail");function w(...e){for(const t of e)try{(0,v.existsSync)(t)&&(0,v.unlinkSync)(t)}catch(i){u.logger.debug(`failed to cleanup ${t}: ${i}`)}}d(w,"cleanup");function ie(e){if(!(0,v.existsSync)(e))return null;try{return JSON.parse((0,v.readFileSync)(e,"utf-8"))}catch{return null}}d(ie,"readVerdictQuietly");function oe(e,t){const i=(0,h.getFileChangesSinceLastVerification)(e),o=new Set;for(const f of i)for(const a of(0,p.getActiveCycles)(f.file_path,t))o.add(a);const s=[];o.has("browser")&&s.push("browser");for(const f of p.OPTIONAL_CYCLES)o.has(f)&&s.push(f);return s}d(oe,"computeActiveCycles");function re(e,t,i){const o=te(e),s=new Set(t.filter(a=>a.tool_type==="mcp"&&a.mcp_server===o).map(a=>a.tool_name)),f=(0,p.getRequiredToolsConfig)(i,e);return{cycle:e,result:(0,B.satisfyRequiredTools)(s,f),config:f,usedCount:s.size}}d(re,"checkCycleTools");function ne(e){return{cycle:"browser",valid:!0,passCriteriaMet:!0}}d(ne,"checkBrowserEvidence");function se(e){return{cycle:"node",valid:!0,passCriteriaMet:!0}}d(se,"checkNodeEvidence");function ae(e){return{cycle:"backend",valid:!0,passCriteriaMet:!0}}d(ae,"checkBackendEvidence");function ce(e){return{cycle:"android",valid:!0,passCriteriaMet:!0}}d(ce,"checkAndroidEvidence");function le(e,t){if(!Array.isArray(t.checks)||t.checks.length===0)return{cycle:e,valid:!1,reason:"missing checks"};if(e==="browser")return ne(t);if(e==="node")return se(t);if(e==="backend")return ae(t);if(e==="android")return ce(t);throw new Error(`No evidence checker registered for cycle '${e}'.`)}d(le,"checkCycleEvidence");function de(e){const t=e.cycle.charAt(0).toUpperCase()+e.cycle.slice(1);if(e.result.missing.length===0)return`${t} cycle: ok.`;const i=e.result.missing.map(o=>` - ${o}`).join(`
2
2
  `);return e.config.evidencePaths.length>0&&e.result.pathName!==void 0?`${t} cycle: incomplete (closest path "${e.result.pathName}", tried [${e.result.triedPaths.join(", ")}]):
3
3
  ${i}`:`${t} cycle: missing required tools:
4
- ${i}`}l(Z,"describeMissingTools");async function ee(e){const{sessionId:t,sessionDir:i,actionsFile:o,verdictFile:n,maxRetries:u}=e,c=u??G,k=e.config??(0,h.loadConfig)(e.projectDir);if(f.logger.debug(`verify-gate: session=${t} verdictExists=${(0,p.existsSync)(n)}`),!(0,g.hasFileChangesSinceLastVerification)(o)){if((0,s.getLastVerdictStatus)(i)==="fail"){if((0,s.getVerifyIntent)(i)!=="fix")return f.logger.debug("fail verdict with no code changes in window \u2014 status report, allowing"),(0,s.setLastVerdictStatus)(i,"fail_reported"),await d(o,i,t,"allow","fail_verdict_reported",[],e.projectDir),{action:"allow"};const r=(0,s.incrementRetries)(i);return r>=c?(f.logger.debug(`fix intent declared but retries exhausted (${r}/${c}) \u2014 releasing`),(0,s.resetRetries)(i),await(0,s.closeOpenCycles)(i,o,"max_retries_exceeded"),await d(o,i,t,"allow","max_retries_exceeded",[],e.projectDir),{action:"allow",message:`VERIFICATION FAILED ${c} TIMES. Allowing completion.
4
+ ${i}`}d(de,"describeMissingTools");async function ue(e){const{sessionId:t,sessionDir:i,actionsFile:o,verdictFile:s,maxRetries:f}=e,a=f??Z,k=e.config??(0,p.loadConfig)(e.projectDir);if(u.logger.debug(`verify-gate: session=${t} verdictExists=${(0,v.existsSync)(s)}`),!(0,h.hasFileChangesSinceLastVerification)(o)){if((0,r.getLastVerdictStatus)(i)==="fail"){if((0,r.getVerifyIntent)(i)!=="fix")return u.logger.debug("fail verdict with no code changes in window \u2014 status report, allowing"),(0,r.setLastVerdictStatus)(i,"fail_reported"),await c(o,i,t,"allow","fail_verdict_reported",[],e.projectDir),{action:"allow"};const n=(0,r.incrementRetries)(i);return n>=a?(u.logger.debug(`fix intent declared but retries exhausted (${n}/${a}) \u2014 releasing`),(0,r.resetRetries)(i),await(0,r.closeOpenCycles)(i,o,"max_retries_exceeded"),await c(o,i,t,"allow","max_retries_exceeded",[],e.projectDir),{action:"allow",message:`VERIFICATION FAILED ${a} TIMES. Allowing completion.
5
5
 
6
- The fail verdict was never resolved. Report the unresolved issues in your final response.`}):(f.logger.debug(`fix intent declared, fail verdict not addressed \u2014 blocking (unaddressed, attempt ${r}/${c})`),await d(o,i,t,"block","fail_verdict_unaddressed",[],e.projectDir),{action:"block",message:`VERIFICATION FAILED \u2014 unaddressed (attempt ${r}/${c}).
6
+ The fail verdict was never resolved. Report the unresolved issues in your final response.`}):(u.logger.debug(`fix intent declared, fail verdict not addressed \u2014 blocking (unaddressed, attempt ${n}/${a})`),await c(o,i,t,"block","fail_verdict_unaddressed",[],e.projectDir),{action:"block",message:`VERIFICATION FAILED \u2014 unaddressed (attempt ${n}/${a}).
7
7
 
8
8
  You submitted a fail verdict but did not address the reported issues. Either:
9
9
 
@@ -13,11 +13,20 @@ You submitted a fail verdict but did not address the reported issues. Either:
13
13
 
14
14
  2. Or \u2014 if the issues genuinely cannot be fixed \u2014 re-verify (keep the --intent fix flag)
15
15
  to confirm the failure: each blocked stop counts toward maxRetries; once exhausted,
16
- the gate will allow completion with the issues reported.`})}return f.logger.debug("no code changes detected, allowing completion"),await d(o,i,t,"allow","no_edits",[],e.projectDir),{action:"allow"}}const a=Y(o,k);if(a.length===0)return f.logger.debug("file changes match no cycle pattern, allowing completion"),await d(o,i,t,"allow","no_cycle_active",[],e.projectDir),{action:"allow"};const j=(0,g.getToolCallsSinceLastFileChange)(o),T=a.map(r=>H(r,j,k)),$=T.filter(r=>!r.result.satisfied);if($.length>0){if(T.every(C=>C.usedCount===0)){await d(o,i,t,"block","no_tools",a,e.projectDir);const C=` echo '${b(t)}' | ironbee hook submit-verdict`,O=` On fail: echo '${D(t)}' | ironbee hook submit-verdict`;return{action:"block",message:`VERIFICATION REQUIRED.
16
+ the gate will allow completion with the issues reported.`})}return u.logger.debug("no code changes detected, allowing completion"),await c(o,i,t,"allow","no_edits",[],e.projectDir),{action:"allow"}}const l=oe(o,k);if(l.length===0)return u.logger.debug("file changes match no cycle pattern, allowing completion"),await c(o,i,t,"allow","no_cycle_active",[],e.projectDir),{action:"allow"};const V=(0,p.getVerificationStrict)(k),M=(0,r.isFailLikeVerdictStatus)((0,r.getLastVerdictStatus)(i)),m=ie(s),x=!V&&!M&&m!==null&&Array.isArray(m.reason)&&m.reason.length>0;if(x&&m.status==="not_applicable")return u.logger.debug("global N/A verdict, allowing completion"),(0,r.resetRetries)(i),(0,r.setLastVerdictStatus)(i,"not_applicable"),await c(o,i,t,"allow","verdict_not_applicable",l,e.projectDir),{action:"allow"};let b=l;if(x&&Array.isArray(m.not_applicable_cycles)&&m.not_applicable_cycles.length>0){const n=new Set(m.not_applicable_cycles.filter(g=>l.includes(g)));if(b=l.filter(g=>!n.has(g)),b.length===0)return u.logger.debug("per-platform N/A exempted every active cycle \u2014 treating as global N/A"),(0,r.resetRetries)(i),(0,r.setLastVerdictStatus)(i,"not_applicable"),await c(o,i,t,"allow","verdict_not_applicable",l,e.projectDir),{action:"allow"};u.logger.debug(`per-platform N/A: exempt=[${[...n].join(",")}] enforced=[${b.join(",")}]`)}const U=(0,h.getToolCallsSinceLastFileChange)(o),S=b.map(n=>re(n,U,k)),D=S.filter(n=>!n.result.satisfied);if(D.length>0){const n=S.every(y=>y.usedCount===0),g=(0,r.incrementRetries)(i),$=!(0,h.hasVerifierEverEngaged)(o),J=$&&g>ee,G=g>=a;if(J||G){const y=$?"verifier_unavailable":"max_retries_exceeded";u.logger.debug(`tool-presence loop releasing (attempt ${g}/${a}, neverEngaged=${$}) \u2014 ${y}`),(0,r.resetRetries)(i),await(0,r.closeOpenCycles)(i,o,y),await c(o,i,t,"allow",y,l,e.projectDir);const A=l.join(", ");return $?{action:"allow",message:`VERIFICATION UNAVAILABLE \u2014 allowing completion.
17
+
18
+ The ${A} verification cycle could not run this session: no verification was ever started and no verification tool was recorded across the whole session. This points to an environment/setup problem rather than a skipped step. Check:
19
+ - the devtools MCP server is installed and loads (try \`npx -y @ironbee-ai/devtools\`);
20
+ - on Codex: the verifier sub-agent's model resolves (set \`verification.model\` or a config.toml model) and hooks are approved (\`/hooks\`);
21
+ - the verification delegation actually spawns the ironbee-verifier sub-agent.
22
+
23
+ Report this change as UNVERIFIED in your final response.`}:{action:"allow",message:`VERIFICATION NOT COMPLETED after ${a} attempts. Allowing completion.
24
+
25
+ The ${A} verification cycle was attempted but its required tools were not all completed within ${a} attempts. If the change has no runtime surface to verify (e.g. a test-only or config change) or the verification tools are unavailable in this environment, say so in your final response; otherwise report the unresolved verification gap.`}}if(n){await c(o,i,t,"block","no_tools",l,e.projectDir);const y=` echo '${_(t)}' | ironbee hook submit-verdict`,A=` On fail: echo '${P(t)}' | ironbee hook submit-verdict`;return{action:"block",message:`VERIFICATION REQUIRED (attempt ${g}/${a}).
17
26
 
18
27
  You made code changes but did not verify them.
19
28
 
20
- ${a.includes("browser")?`Browser cycle (UI verification):
29
+ ${b.includes("browser")?`Browser cycle (UI verification):
21
30
  1. Build and start the application if not already running
22
31
  2. Navigate to the affected page(s)
23
32
  3. Functionally test your changes \u2014 click, type, submit, interact with the UI to confirm the code works
@@ -25,57 +34,58 @@ ${a.includes("browser")?`Browser cycle (UI verification):
25
34
  5. Take an accessibility snapshot to verify page structure
26
35
  6. Check console for errors
27
36
  7. Stop the dev server when done
28
- `:""}${a.includes("node")?`Node cycle (Node.js runtime debug):
37
+ `:""}${b.includes("node")?`Node cycle (Node.js runtime debug):
29
38
  1. Connect to the running Node process via ndt_debug_connect
30
39
  2. Set probes (tracepoint / logpoint / exceptionpoint) at the changed code paths
31
40
  3. Exercise the code path so probes fire
32
41
  4. Read snapshots via ndt_debug_get-probe-snapshots, OR inspect runtime errors via ndt_debug_get-logs
33
- `:""}${a.includes("backend")?`Backend cycle (runtime-agnostic service verification \u2014 pick ONE or more evidence paths):
42
+ `:""}${b.includes("backend")?`Backend cycle (runtime-agnostic service verification \u2014 pick ONE or more evidence paths):
34
43
  1. Identify the backend layer affected by your change (HTTP / gRPC / GraphQL / WebSocket endpoint, log output, or database state)
35
44
  2a. Protocol-call path: make a real call against the running service (bedt_request_http / bedt_request_grpc / bedt_request_graphql / bedt_request_websocket-open / bedt_request_replay), inspect status / body / traceId, chain follow-ups to verify side effects
36
45
  2b. Log-evidence path (for when something else drives the request): bedt_log_register-source (file / docker / kubernetes), then bedt_log_read / bedt_log_read-multi / bedt_log_follow
37
46
  2c. DB-evidence path (for schema / migration / seed / query-regression changes): bedt_db_connect (named, readonly by default), then bedt_db_query / bedt_db_describe-table / bedt_db_list-tables / bedt_db_snapshot / bedt_db_diff / bedt_db_get-changes
38
47
  3. (Optional) Pin a correlation trace id for the run via bedt_o11y_new-trace-id / bedt_o11y_set-trace-context \u2014 IronBee already injects an active verification traceId, so the o11y pin only matters when you want a fresh root for log searches.
39
- `:""}${a.includes("android")?`Android cycle (mobile device / emulator verification \u2014 pick ONE evidence path):
48
+ `:""}${b.includes("android")?`Android cycle (mobile device / emulator verification \u2014 pick ONE evidence path):
40
49
  1. Connect to a running device or emulator: adt_device_connect
41
50
  2a. Device-evidence path: drive the app UI (adt_device_launch-app / adt_interaction_tap / adt_interaction_input-text / adt_interaction_swipe), then capture BOTH a screenshot (adt_content_take-screenshot) AND a UI snapshot (adt_a11y_take-ui-snapshot) to confirm the visual + structural result
42
51
  2b. Log-evidence path: read Logcat output for the changed code path (adt_o11y_log-read / adt_o11y_log-follow) and confirm expected log lines / absence of errors
43
52
  `:""}
44
53
  Then submit your verdict (single verdict covers every active cycle):
45
- ${C}
46
- ${O}
47
- If failed, fix the code and re-verify until it passes.`}}return await d(o,i,t,"block","incomplete_tools",a,e.projectDir),{action:"block",message:`INCOMPLETE VERIFICATION.
54
+ ${y}
55
+ ${A}
56
+ If failed, fix the code and re-verify until it passes.`}}await c(o,i,t,"block","incomplete_tools",l,e.projectDir);const Y=D.map(y=>de(y)).join(`
57
+ `);return{action:"block",message:`INCOMPLETE VERIFICATION (attempt ${g}/${a}).
48
58
 
49
59
  You used the IronBee verification tools but skipped required checks:
50
60
 
51
- ${$.map(C=>Z(C)).join(`
52
- `)}
61
+ ${Y}
53
62
 
54
63
  Run the missing tools, functionally test your changes, then submit your verdict:
55
- Pass: echo '${b(t)}' | ironbee hook submit-verdict
56
- Fail: echo '${D(t)}' | ironbee hook submit-verdict`}}if(!(0,p.existsSync)(n))return await d(o,i,t,"block","no_verdict",a,e.projectDir),{action:"block",message:`VERDICT MISSING.
64
+ Pass: echo '${_(t)}' | ironbee hook submit-verdict
65
+ Fail: echo '${P(t)}' | ironbee hook submit-verdict`}}if(!(0,v.existsSync)(s))return await c(o,i,t,"block","no_verdict",l,e.projectDir),{action:"block",message:`VERDICT MISSING.
57
66
 
58
- You ran the verification tools but did not submit a verdict.${(0,s.isRecordingActive)(i)?`
67
+ You ran the verification tools but did not submit a verdict.${(0,r.isRecordingActive)(i)?`
59
68
  \u26A0 Recording is still active \u2014 call mcp__browser-devtools__bdt_content_stop-recording BEFORE submit-verdict (otherwise it will reject with "recording is still active").`:""}
60
69
 
61
70
  Submit your verdict via:
62
- echo '${b(t)}' | ironbee hook submit-verdict`};let v;try{v=JSON.parse((0,p.readFileSync)(n,"utf-8"))}catch(r){return f.logger.debug(`failed to parse verdict ${n}: ${r}`),_(n),await d(o,i,t,"block","invalid_verdict",a,e.projectDir),{action:"block",message:`INVALID VERDICT JSON. Re-submit valid JSON:
63
- echo '${b(t)}' | ironbee hook submit-verdict`}}const R=a.map(r=>K(r,v)),A=R.filter(r=>!r.valid);if(A.length>0)return _(n),await d(o,i,t,"block","invalid_verdict",a,e.projectDir),{action:"block",message:`VERDICT REJECTED:
64
- ${A.map(I=>` - ${I.cycle} cycle: ${I.reason}`).join(`
71
+ echo '${_(t)}' | ironbee hook submit-verdict`};let C;try{C=JSON.parse((0,v.readFileSync)(s,"utf-8"))}catch(n){return u.logger.debug(`failed to parse verdict ${s}: ${n}`),w(s),await c(o,i,t,"block","invalid_verdict",l,e.projectDir),{action:"block",message:`INVALID VERDICT JSON. Re-submit valid JSON:
72
+ echo '${_(t)}' | ironbee hook submit-verdict`}}if(C.status==="not_applicable")return w(s),await c(o,i,t,"block","not_applicable_rejected",b,e.projectDir),{action:"block",message:`VERDICT REJECTED: ${V?"N/A is not accepted in strict mode \u2014 verify the change with the required tools.":"N/A is not honored here \u2014 verify the change with the required tools, or report a fail."}
73
+ echo '${_(t)}' | ironbee hook submit-verdict`};const N=b.map(n=>le(n,C)),F=N.filter(n=>!n.valid);if(F.length>0)return w(s),await c(o,i,t,"block","invalid_verdict",l,e.projectDir),{action:"block",message:`VERDICT REJECTED:
74
+ ${F.map(g=>` - ${g.cycle} cycle: ${g.reason}`).join(`
65
75
  `)}
66
76
 
67
77
  Re-submit:
68
- echo '${b(t)}' | ironbee hook submit-verdict`};const m=v.status;if(m!=="pass"&&m!=="fail")return _(n),await d(o,i,t,"block","invalid_verdict",a,e.projectDir),{action:"block",message:`INVALID VERDICT STATUS: "${m}". Status must be "pass" or "fail".
69
- echo '${b(t)}' | ironbee hook submit-verdict`};const E=R.filter(r=>r.passCriteriaMet===!1),S=m==="pass"&&E.length===0?"pass":"fail";if(m==="pass"&&S==="fail"&&f.logger.debug(`verify-gate: status=pass overridden to fail by cycle pass-criteria: ${E.map(r=>r.cycle).join(",")}`),S==="pass")return f.logger.debug("verdict passed, allowing completion"),(0,s.resetRetries)(i),await d(o,i,t,"allow","verdict_pass",a,e.projectDir),{action:"allow"};const x=(0,s.incrementRetries)(i),y=[];if(Array.isArray(v.issues))for(const r of v.issues)y.push(String(r));for(const r of E)y.push(`[${r.cycle}] ${r.passReason??"pass criteria not met"}`);y.length===0&&y.push("unknown");const V=y.join(`
70
- - `);return x>=c?(_(n),(0,s.resetRetries)(i),await(0,s.closeOpenCycles)(i,o,"max_retries_exceeded"),await d(o,i,t,"allow","max_retries_exceeded",a,e.projectDir),{action:"allow",message:`VERIFICATION FAILED ${c} TIMES. Allowing completion.
78
+ echo '${_(t)}' | ironbee hook submit-verdict`};const E=C.status;if(E!=="pass"&&E!=="fail")return w(s),await c(o,i,t,"block","invalid_verdict",l,e.projectDir),{action:"block",message:`INVALID VERDICT STATUS: "${E}". Status must be "pass" or "fail".
79
+ echo '${_(t)}' | ironbee hook submit-verdict`};const R=N.filter(n=>n.passCriteriaMet===!1),j=E==="pass"&&R.length===0?"pass":"fail";if(E==="pass"&&j==="fail"&&u.logger.debug(`verify-gate: status=pass overridden to fail by cycle pass-criteria: ${R.map(n=>n.cycle).join(",")}`),j==="pass")return u.logger.debug("verdict passed, allowing completion"),(0,r.resetRetries)(i),await c(o,i,t,"allow","verdict_pass",l,e.projectDir),{action:"allow"};const L=(0,r.incrementRetries)(i),I=[];if(Array.isArray(C.issues))for(const n of C.issues)I.push(String(n));for(const n of R)I.push(`[${n.cycle}] ${n.passReason??"pass criteria not met"}`);I.length===0&&I.push("unknown");const O=I.join(`
80
+ - `);return L>=a?(w(s),(0,r.resetRetries)(i),await(0,r.closeOpenCycles)(i,o,"max_retries_exceeded"),await c(o,i,t,"allow","max_retries_exceeded",l,e.projectDir),{action:"allow",message:`VERIFICATION FAILED ${a} TIMES. Allowing completion.
71
81
 
72
82
  Unresolved issues:
73
- - ${V}
83
+ - ${O}
74
84
 
75
- Report these issues in your final response.`}):(_(n),await d(o,i,t,"block","verdict_fail",a,e.projectDir),{action:"block",message:`VERIFICATION FAILED (attempt ${x}/${c}).
85
+ Report these issues in your final response.`}):(w(s),await c(o,i,t,"block","verdict_fail",l,e.projectDir),{action:"block",message:`VERIFICATION FAILED (attempt ${L}/${a}).
76
86
 
77
87
  Issues found:
78
- - ${V}
88
+ - ${O}
79
89
 
80
90
  Fix the issues, rebuild if needed, re-test functionally, and re-verify.
81
- Submit verdict: echo '<verdict-json>' | ironbee hook submit-verdict`})}l(ee,"runVerifyGate");async function d(e,t,i,o,n,u,c){o==="allow"&&(0,s.clearVerifyIntent)(t);const k={...(0,g.baseFields)(e),type:"verification_requested",timestamp:Date.now(),activity_id:(0,s.getActiveActivityId)(t),action:o,reason:n,modes:u.length>0?u:void 0};await(0,g.appendAction)(e,k),await(0,F.trackVerificationRequested)(i,o,n,c)}l(d,"recordMarker");0&&(module.exports={runVerifyGate});
91
+ Submit verdict: echo '<verdict-json>' | ironbee hook submit-verdict`})}d(ue,"runVerifyGate");async function c(e,t,i,o,s,f,a){o==="allow"&&(0,r.clearVerifyIntent)(t);const k={...(0,h.baseFields)(e),type:"verification_requested",timestamp:Date.now(),activity_id:(0,r.getActiveActivityId)(t),action:o,reason:s,modes:f.length>0?f:void 0};await(0,h.appendAction)(e,k),await(0,q.trackVerificationRequested)(i,o,s,a)}d(c,"recordMarker");0&&(module.exports={runVerifyGate});
@@ -1 +1 @@
1
- "use strict";var y=Object.defineProperty;var ce=Object.getOwnPropertyDescriptor;var le=Object.getOwnPropertyNames;var ue=Object.prototype.hasOwnProperty;var o=(n,e)=>y(n,"name",{value:e,configurable:!0});var fe=(n,e)=>{for(var t in e)y(n,t,{get:e[t],enumerable:!0})},ge=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of le(e))!ue.call(n,i)&&i!==t&&y(n,i,{get:()=>e[i],enumerable:!(r=ce(e,i))||r.enumerable});return n};var de=n=>ge(y({},"__esModule",{value:!0}),n);var wn={};fe(wn,{ALL_CYCLES:()=>pe,CONFIG_TARGETS_BY_PRECEDENCE:()=>xe,CYCLES_ENABLED_BY_DEFAULT:()=>N,CYCLE_DEFAULT_VERIFY_PATTERNS:()=>U,CYCLE_TOOL_PREFIXES:()=>Ee,CYCLE_TO_SERVER:()=>be,DEFAULT_ANDROID_ALWAYS_REQUIRED:()=>H,DEFAULT_ANDROID_EVIDENCE_PATHS:()=>G,DEFAULT_ANDROID_VERIFY_PATTERNS:()=>V,DEFAULT_BACKEND_ALWAYS_REQUIRED:()=>Y,DEFAULT_BACKEND_EVIDENCE_PATHS:()=>X,DEFAULT_BACKEND_VERIFY_PATTERNS:()=>F,DEFAULT_BROWSER_ALWAYS_REQUIRED:()=>q,DEFAULT_BROWSER_VERIFY_PATTERNS:()=>P,DEFAULT_NODE_ALWAYS_REQUIRED:()=>$,DEFAULT_NODE_EVIDENCE_PATHS:()=>K,DEFAULT_NODE_VERIFY_PATTERNS:()=>M,DEFAULT_OAUTH_USAGE_TTL_SECONDS:()=>J,DEFAULT_OTEL_EMIT_MIN_INTERVAL_SECONDS:()=>te,DEFAULT_OTEL_ENSURE_MIN_INTERVAL_SECONDS:()=>ne,DEFAULT_OTEL_IDLE_TIMEOUT_SECONDS:()=>ee,DEFAULT_OTEL_PORT:()=>Z,DEFAULT_VERIFICATION_CONTEXT_COMMIT_DEPTH:()=>ie,DEFAULT_VERIFICATION_CONTEXT_MAX_BYTES:()=>re,ENV_OVERRIDES:()=>w,OPTIONAL_CYCLES:()=>I,applyEnvOverrides:()=>W,findActiveEnvOverride:()=>he,getActiveCycles:()=>Q,getAnalyticsEmitOnStopMinIntervalSeconds:()=>An,getAndroidDevToolsMcpEntry:()=>Qe,getAutoVerifyEnabled:()=>oe,getBackendDevToolsMcpEntry:()=>We,getCaptureFileChangeset:()=>_n,getClaudeOauthAccessEnabled:()=>on,getClaudeOauthAccessUsageTtlSeconds:()=>rn,getConfigLayerPaths:()=>x,getMaxChangesetBytes:()=>Cn,getMaxRetries:()=>ze,getMcpServerEntry:()=>He,getNodeDevToolsMcpEntry:()=>Ge,getOTELEmitMinIntervalSeconds:()=>un,getOTELEnsureMinIntervalSeconds:()=>ln,getOTELIdleTimeoutSeconds:()=>cn,getOTELPort:()=>an,getPrivacyEnabled:()=>ae,getRequiredToolsConfig:()=>Se,getStatusLineEmitMinIntervalSeconds:()=>tn,getStatusLineRefreshInterval:()=>fn,getStatusLineRenderDefault:()=>nn,getTargetConfigPath:()=>we,getTelemetryEnabled:()=>se,getVerificationContextCommitDepth:()=>pn,getVerificationContextEnabled:()=>gn,getVerificationContextMaxBytes:()=>bn,getVerificationContextSource:()=>dn,getVerificationEnabled:()=>R,getVerificationMode:()=>yn,getVerificationModel:()=>Ce,isAnalyticsApiRequestEventsEnabled:()=>xn,isAnalyticsEmitOnStopEnabled:()=>vn,isAnalyticsEnabled:()=>mn,isAnalyticsStepEventsEnabled:()=>In,isAnalyticsTurnEventsEnabled:()=>Tn,isCollectorConfigured:()=>j,isCycleEnabled:()=>Le,isCyclePatternsActive:()=>z,isIgnoredVerifyPath:()=>En,isJobQueueEnabled:()=>Je,isOTELEnabled:()=>sn,isRecordingEnabled:()=>Ze,isSessionStatusEnabled:()=>en,loadConfig:()=>c,requiresVerification:()=>Be,resolveConfigTargetFromFlags:()=>je});module.exports=de(wn);var E=require("fs"),b=require("path"),T=require("os"),D=require("./logger");const I=["node","backend","android"],pe=["browser",...I],N=new Set(["browser"]),be={browser:"browser-devtools",node:"node-devtools",backend:"backend-devtools",android:"android-devtools"},Ee={browser:"bdt_",node:"ndt_",backend:"bedt_",android:"adt_"},P=["*.ts","*.tsx","*.js","*.jsx","*.mjs","*.cjs","*.vue","*.svelte","*.html","*.htm","*.css","*.scss","*.sass","*.less","*.styl","*.py","*.rb","*.erb","*.go","*.rs","*.java","*.kt","*.kts","*.swift","*.c","*.cpp","*.h","*.hpp","*.cs","*.php","*.dart","*.ex","*.exs","*.erl","*.lua","*.r","*.R","*.scala","*.clj","*.cljs","*.zig","*.nim","*.hbs","*.ejs","*.pug","*.jade","*.astro"],M=["server/**/*.{ts,js,mjs,cjs}","src/server/**/*.{ts,js,mjs,cjs}","backend/**/*.{ts,js,mjs,cjs}","api/**/*.{ts,js,mjs,cjs}","src/api/**/*.{ts,js,mjs,cjs}","pages/api/**/*.{ts,js,mjs,cjs}","app/api/**/*.{ts,js,mjs,cjs}","routes/**/*.{ts,js,mjs,cjs}","**/server.{ts,js,mjs,cjs}"],F=["server/**/*.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","src/server/**/*.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","backend/**/*.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","api/**/*.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","src/api/**/*.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","pages/api/**/*.{ts,js,mjs,cjs}","app/api/**/*.{ts,js,mjs,cjs}","routes/**/*.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","controllers/**/*.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","handlers/**/*.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","services/**/*.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","**/server.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","**/main.{go,py,java,rb,kt,scala}"],V=["android/**/*.{kt,java}","app/src/**/*.{kt,java}","mobile/**/*.{kt,java}","src/main/kotlin/**/*.kt","src/main/java/**/*.java","**/*.{kt,java}","**/res/**/*.xml","**/AndroidManifest.xml"],U={browser:P,node:M,backend:F,android:V},q=["bdt_navigation_go-to","bdt_content_take-screenshot","bdt_a11y_take-aria-snapshot","bdt_o11y_get-console-messages"],$=["ndt_debug_connect"],K=[{name:"probe",allOf:[{anyOf:["ndt_debug_put-tracepoint","ndt_debug_put-logpoint","ndt_debug_put-exceptionpoint"]},"ndt_debug_get-probe-snapshots"]},{name:"log",allOf:["ndt_debug_get-logs"]}],Y=[],X=[{name:"protocol-call",allOf:[{anyOf:["bedt_request_http","bedt_request_grpc","bedt_request_graphql","bedt_request_websocket-open","bedt_request_replay"]}]},{name:"log-evidence",allOf:["bedt_log_register-source",{anyOf:["bedt_log_read","bedt_log_read-multi","bedt_log_follow"]}]},{name:"db-evidence",allOf:["bedt_db_connect",{anyOf:["bedt_db_query","bedt_db_describe-table","bedt_db_list-tables","bedt_db_snapshot","bedt_db_diff","bedt_db_get-changes"]}]}],H=["adt_device_connect"],G=[{name:"device-evidence",allOf:[{anyOf:["adt_device_launch-app","adt_interaction_tap","adt_interaction_double-tap","adt_interaction_long-press","adt_interaction_input-text","adt_interaction_swipe","adt_interaction_scroll","adt_interaction_press-key","adt_interaction_deep-link"]},"adt_content_take-screenshot","adt_a11y_take-ui-snapshot"]},{name:"log-evidence",allOf:[{anyOf:["adt_o11y_log-read","adt_o11y_log-follow"]}]}],ye=3;function O(n){if(!(0,E.existsSync)(n))return{};try{return JSON.parse((0,E.readFileSync)(n,"utf-8"))}catch(e){return D.logger.debug(`failed to parse config ${n}: ${e}`),{}}}o(O,"loadJsonFile");function _e(n,e){if(!Object.prototype.hasOwnProperty.call(n,"verification"))return;const t=n.verification;if(t===null||typeof t!="object"||Array.isArray(t))throw new Error(`Invalid IronBee config in ${e}: 'verification' must be an object. Expected shape: { "enable": boolean }.`);const r=t;if(Object.prototype.hasOwnProperty.call(r,"enable")&&typeof r.enable!="boolean")throw new Error(`Invalid IronBee config in ${e}: 'verification.enable' must be boolean. Got ${typeof r.enable}.`);if(Object.prototype.hasOwnProperty.call(r,"auto")&&typeof r.auto!="boolean")throw new Error(`Invalid IronBee config in ${e}: 'verification.auto' must be boolean. Got ${typeof r.auto}.`);if(Object.prototype.hasOwnProperty.call(r,"model")){const i=r.model,s=typeof i=="string",l=i!==null&&typeof i=="object"&&!Array.isArray(i)&&Object.values(i).every(a=>typeof a=="string");if(!s&&!l)throw new Error(`Invalid IronBee config in ${e}: 'verification.model' must be a string (applies to all clients) or an object of string values (per-client, e.g. { "claude": "sonnet", "codex": "gpt-5.5" }). Got ${Array.isArray(i)?"array":typeof i}.`)}}o(_e,"assertVerificationShape");function Ce(n,e){const t=n.verification?.model;if(typeof t=="string")return t.length>0?t:void 0;if(t&&typeof t=="object"){const r=t[e];return typeof r=="string"&&r.length>0?r:void 0}}o(Ce,"getVerificationModel");function me(n,e){if(!Object.prototype.hasOwnProperty.call(n,"telemetry"))return;const t=n.telemetry;if(t===null||typeof t!="object"||Array.isArray(t))throw new Error(`Invalid IronBee config in ${e}: 'telemetry' must be an object. Expected shape: { "enable": boolean }.`);const r=t;if(Object.prototype.hasOwnProperty.call(r,"enable")&&typeof r.enable!="boolean")throw new Error(`Invalid IronBee config in ${e}: 'telemetry.enable' must be boolean. Got ${typeof r.enable}.`)}o(me,"assertTelemetryShape");function ve(n,e){if(!Object.prototype.hasOwnProperty.call(n,"privacy"))return;const t=n.privacy;if(t===null||typeof t!="object"||Array.isArray(t))throw new Error(`Invalid IronBee config in ${e}: 'privacy' must be an object. Expected shape: { "enable": boolean }.`);const r=t;if(Object.prototype.hasOwnProperty.call(r,"enable")&&typeof r.enable!="boolean")throw new Error(`Invalid IronBee config in ${e}: 'privacy.enable' must be boolean. Got ${typeof r.enable}.`)}o(ve,"assertPrivacyShape");function _(n,e){if(!(n===void 0&&e===void 0))return{...n??{},...e??{}}}o(_,"mergeCycleConfig");function k(n,e){const t={...n,...e};return t.browser=_(n.browser,e.browser),t.node=_(n.node,e.node),t.backend=_(n.backend,e.backend),t.android=_(n.android,e.android),t.claude=Ie(n.claude,e.claude),t.verification=Te(n.verification,e.verification),t.verificationContext=Ae(n.verificationContext,e.verificationContext),t}o(k,"mergeConfigLayers");function Ae(n,e){if(!(n===void 0&&e===void 0))return{...n??{},...e??{}}}o(Ae,"mergeVerificationContextConfig");function Te(n,e){if(!(n===void 0&&e===void 0))return{...n??{},...e??{}}}o(Te,"mergeVerificationConfig");function Ie(n,e){if(n===void 0&&e===void 0)return;const t={...n??{},...e??{}};return(n?.oauthAccess!==void 0||e?.oauthAccess!==void 0)&&(t.oauthAccess={...n?.oauthAccess??{},...e?.oauthAccess??{}}),t}o(Ie,"mergeClaudeConfig");function x(n){return{global:(0,b.join)((0,T.homedir)(),".ironbee","config.json"),project:n?(0,b.join)(n,".ironbee","config.json"):void 0,local:n?(0,b.join)(n,".ironbee","config.local.json"):void 0}}o(x,"getConfigLayerPaths");const xe=["global","project","local"];function we(n,e){const t=x(e);if(n==="global")return t.global;if(n==="project"){if(t.project===void 0)throw new Error("Project layer requested but no projectDir was provided.");return t.project}if(t.local===void 0)throw new Error("Local layer requested but no projectDir was provided.");return t.local}o(we,"getTargetConfigPath");function je(n){if(n.global===!0&&n.local===!0)throw new Error("Pass at most one of --global / --local.");return n.global===!0?"global":n.local===!0?"local":"project"}o(je,"resolveConfigTargetFromFlags");function v(n){const e=O(n);return(0,E.existsSync)(n)&&(_e(e,n),me(e,n),ve(e,n)),e}o(v,"loadAndValidateLayer");const w=[{envVar:"IRONBEE_API_KEY",configPath:"collector.apiKey"},{envVar:"IRONBEE_OAUTH_TOKEN",configPath:"collector.oauthToken"}];function Re(n,e,t){const r=e.split(".");let i=n;for(let s=0;s<r.length-1;s++){const l=r[s],a=i[l];a!=null&&typeof a=="object"&&!Array.isArray(a)?i[l]={...a}:i[l]={},i=i[l]}i[r[r.length-1]]=t}o(Re,"setAtConfigPath");function W(n){let e;for(const t of w){const r=process.env[t.envVar];if(r===void 0||r.length===0)continue;e===void 0&&(e={...n});const i=t.coerce?t.coerce(r):r;Re(e,t.configPath,i)}return e??n}o(W,"applyEnvOverrides");function he(n){for(const e of w){if(e.configPath!==n)continue;const t=process.env[e.envVar];if(t!==void 0&&t.length>0)return e}}o(he,"findActiveEnvOverride");function c(n){const e=x(n),t=v(e.global),r=e.project?v(e.project):{},i=e.local?v(e.local):{},s=k(k(t,r),i);return W(s)}o(c,"loadConfig");function Oe(n){let e=n.replace(/\{([^}]+)\}/g,(t,r)=>`(${r.split(",").map(i=>i.trim()).join("|")})`);return e=e.replace(/\*\*\//g,"\0DSS\0").replace(/\*\*/g,"\0DS\0").replace(/\*/g,"\0SS\0").replace(/\?/g,"\0QM\0"),e=e.replace(/[.+^$\\[\]]/g,"\\$&"),e=e.replace(/\x00DSS\x00/g,"(?:.*/)?").replace(/\x00DS\x00/g,".*").replace(/\x00SS\x00/g,"[^/]*").replace(/\x00QM\x00/g,"[^/]"),new RegExp(`(^|/)${e}$`)}o(Oe,"globToRegExp");function C(n,e){const t=n.replace(/\\/g,"/");for(const r of e)if(Oe(r).test(t))return!0;return!1}o(C,"matchesAny");function ke(n,e){if(e==="browser")return n.browser;if(e==="node")return n.node;if(e==="backend")return n.backend;if(e==="android")return n.android}o(ke,"getCycleBlock");function A(n,e){const t=ke(n,e);if(t!==void 0&&t.enable===!1)return[];const r=U[e]??[];if(t===void 0)return N.has(e)?[...r]:[];if(Array.isArray(t.verifyPatterns)&&t.verifyPatterns.length===0)return[];const i=t.verifyPatterns??r,s=t.additionalVerifyPatterns??[];return[...i,...s]}o(A,"getCyclePatterns");function Q(n,e){const t=e.ignoredVerifyPatterns??[];if(t.length>0&&C(n,t))return[];const r=[];C(n,A(e,"browser"))&&r.push("browser");for(const i of I){const s=A(e,i);s.length>0&&C(n,s)&&r.push(i)}return r}o(Q,"getActiveCycles");function Be(n,e){return Q(n,e).length>0}o(Be,"requiresVerification");function Le(n,e){return R(n)?z(n,e):!1}o(Le,"isCycleEnabled");function z(n,e){return A(n,e).length>0}o(z,"isCyclePatternsActive");function Se(n,e){let t,r;if(e==="browser"?(t=n.browser?.alwaysRequired??q,r=n.browser?.evidencePaths??[]):e==="node"?(t=n.node?.alwaysRequired??$,r=n.node?.evidencePaths??K):e==="backend"?(t=n.backend?.alwaysRequired??Y,r=n.backend?.evidencePaths??X):e==="android"?(t=n.android?.alwaysRequired??H,r=n.android?.evidencePaths??G):(t=[],r=[]),t.length===0&&r.length===0)throw new Error(`Invalid required-tools config for cycle '${e}': both 'alwaysRequired' and 'evidencePaths' are empty. At least one must specify required tools.`);return{alwaysRequired:t,evidencePaths:r}}o(Se,"getRequiredToolsConfig");const B="npx",De="^0.11.0",L=["-y",`@ironbee-ai/devtools@${De}`],Ne={TOOL_NAME_PREFIX:"bdt_",TOOL_INPUT_METADATA_ENABLE:"true"},Pe={PLATFORM:"node",TOOL_NAME_PREFIX:"ndt_",TOOL_INPUT_METADATA_ENABLE:"true"},Me={PLATFORM:"backend",TOOL_NAME_PREFIX:"bedt_",TOOL_INPUT_METADATA_ENABLE:"true"},Fe={PLATFORM:"android",TOOL_NAME_PREFIX:"adt_",TOOL_INPUT_METADATA_ENABLE:"true"},Ve={BROWSER_DEVTOOLS_INSTALL_CHROMIUM:"true"},Ue={},qe={},$e={};function Ke(n){return se(n)?{}:{TELEMETRY_ENABLE:"false"}}o(Ke,"buildTelemetryEnv");function Ye(n){return ae(n)?{COLLECTOR_EVENTS_TOOL_DETAILS_ENABLE:"false",COLLECTOR_ARTIFACTS_ENABLE:"false"}:{}}o(Ye,"buildPrivacyEnv");function Xe(n,e){if(!j(n))return{};const t=n.collector,i=O((0,b.join)((0,T.homedir)(),".ironbee","config.json")).collector??{},s=typeof i.oauthToken=="string"&&i.oauthToken.length>0,l=typeof i.apiKey=="string"&&i.apiKey.length>0;let a;t.oauthToken?a=s?"X-OAuth-Token=${file:~/.ironbee/config.json#collector.oauthToken}":`X-OAuth-Token=${t.oauthToken}`:a=l?"X-API-Key=${file:~/.ironbee/config.json#collector.apiKey}":`X-API-Key=${t.apiKey}`;const u={OTEL_ENABLE:"true",OTEL_EXPORTER_HTTP_URL:t.url,OTEL_EXPORTER_HTTP_HEADERS:a,OTEL_EXPORTER_TYPE:"otlp/http-protobuf"};return e==="browser"&&(u.OTEL_INSTRUMENTATION_USER_INTERACTION_EVENTS="change,input,click",u.BROWSER_HEADLESS_ENABLE="true"),u}o(Xe,"buildOTELEnv");function m(n,e,t,r,i){const s=Xe(n,i),l=Ke(n),a=Ye(n),u=n[e];if(u&&typeof u=="object"&&!Array.isArray(u)){const f=u;if(f.mcp&&typeof f.mcp=="object"&&!Array.isArray(f.mcp)){const g={...f.mcp},d={...s,...l,...a,...g.env??{},...t};return g.env=d,g}const h={};if(f.env&&typeof f.env=="object"&&!Array.isArray(f.env)){const g=f.env;for(const d of Object.keys(g))typeof g[d]=="string"&&(h[d]=g[d])}return{command:B,args:[...L],env:{...r,...s,...l,...a,...h,...t}}}return{command:B,args:[...L],env:{...r,...s,...l,...a,...t}}}o(m,"buildMcpEntry");function He(n){const e=c(n);return m(e,"browserDevTools",Ne,Ve,"browser")}o(He,"getMcpServerEntry");function Ge(n){const e=c(n);return m(e,"nodeDevTools",Pe,Ue,"node")}o(Ge,"getNodeDevToolsMcpEntry");function We(n){const e=c(n);return m(e,"backendDevTools",Me,qe,"backend")}o(We,"getBackendDevToolsMcpEntry");function Qe(n){const e=c(n);return m(e,"androidDevTools",Fe,$e,"android")}o(Qe,"getAndroidDevToolsMcpEntry");function ze(n){return typeof n.maxRetries=="number"&&n.maxRetries>0?n.maxRetries:ye}o(ze,"getMaxRetries");function j(n){if(process.env.IRONBEE_COLLECTOR==="false")return!1;const e=n.collector;if(!e||e.enable===!1||typeof e.url!="string"||e.url.length===0)return!1;const t=typeof e.oauthToken=="string"&&e.oauthToken.length>0,r=typeof e.apiKey=="string"&&e.apiKey.length>0;return!(!t&&!r)}o(j,"isCollectorConfigured");function Je(n){const e=c(n);return p(e,e.jobQueue)}o(Je,"isJobQueueEnabled");function Ze(n){const e=c(n);return p(e,e.recording)}o(Ze,"isRecordingEnabled");function en(n){return p(n,n.statusLine)}o(en,"isSessionStatusEnabled");function nn(n){const e=n.statusLine;return e!==void 0&&e.renderDefault===!0}o(nn,"getStatusLineRenderDefault");function tn(n){const e=n.statusLine?.emitMinIntervalSeconds;return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:10}o(tn,"getStatusLineEmitMinIntervalSeconds");const J=60;function on(n){return n.claude?.oauthAccess?.enable!==!1}o(on,"getClaudeOauthAccessEnabled");function rn(n){const e=n.claude?.oauthAccess?.usageTtlSeconds;return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:J}o(rn,"getClaudeOauthAccessUsageTtlSeconds");const Z=15986,ee=600,ne=30,te=0;function sn(n){return p(n,n.otel)}o(sn,"isOTELEnabled");function an(n){const e=n.otel?.port;return typeof e=="number"&&Number.isInteger(e)&&e>0&&e<65536?e:Z}o(an,"getOTELPort");function cn(n){const e=n.otel?.idleTimeoutSeconds;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:ee}o(cn,"getOTELIdleTimeoutSeconds");function ln(n){const e=n.otel?.ensureMinIntervalSeconds;return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:ne}o(ln,"getOTELEnsureMinIntervalSeconds");function un(n){const e=n.otel?.emitMinIntervalSeconds;return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:te}o(un,"getOTELEmitMinIntervalSeconds");function fn(n){const e=n.statusLine?.refreshInterval;if(typeof e=="number"&&Number.isFinite(e)&&e>=1)return e}o(fn,"getStatusLineRefreshInterval");function p(n,e){return e!=null&&typeof e=="object"&&!Array.isArray(e)?e.enable!==!1:j(n)}o(p,"isFeatureEnabledWithCollectorAutoEnable");function Rn(n){return n==null||typeof n!="object"||Array.isArray(n)?!1:n.enable!==!1}o(Rn,"isPresenceEnabled");function R(n){const e=n.verification;return e==null||typeof e!="object"||Array.isArray(e)?!0:e.enable!==!1}o(R,"getVerificationEnabled");function oe(n){const e=n.verification;return e==null||typeof e!="object"||Array.isArray(e)?!0:e.auto!==!1}o(oe,"getAutoVerifyEnabled");const re=65536,ie=1;function gn(n){const e=n.verificationContext;return e==null||typeof e!="object"||Array.isArray(e)?!0:e.enable!==!1}o(gn,"getVerificationContextEnabled");function dn(n){return n.verificationContext?.source==="actions"?"actions":"git"}o(dn,"getVerificationContextSource");function pn(n){const e=n.verificationContext?.commitDepth;return typeof e=="number"&&Number.isFinite(e)&&e>=0?Math.floor(e):ie}o(pn,"getVerificationContextCommitDepth");function bn(n){const e=n.verificationContext?.maxBytes;return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.floor(e):re}o(bn,"getVerificationContextMaxBytes");function En(n,e){const t=n.ignoredVerifyPatterns??[];return t.length>0&&C(e,t)}o(En,"isIgnoredVerifyPath");function yn(n){return R(n)?oe(n)?"enforce":"assist":"monitor"}o(yn,"getVerificationMode");function se(n){const e=n.telemetry;return e==null||typeof e!="object"||Array.isArray(e)?!0:e.enable!==!1}o(se,"getTelemetryEnabled");function ae(n){const e=n.privacy;return e==null||typeof e!="object"||Array.isArray(e)?!1:e.enable===!0}o(ae,"getPrivacyEnabled");const S=65536;function _n(n){const e=n.fileChange;return!e||typeof e!="object"||Array.isArray(e)?!1:e.captureChangeset===!0}o(_n,"getCaptureFileChangeset");function Cn(n){const e=n.fileChange;if(!e||typeof e!="object"||Array.isArray(e))return S;const t=e.maxChangesetBytes;return typeof t!="number"||!Number.isFinite(t)||t<=0?S:Math.floor(t)}o(Cn,"getMaxChangesetBytes");function mn(n){const e=c(n);return p(e,e.analytics)}o(mn,"isAnalyticsEnabled");function vn(n){const t=c(n).analytics;return t===null||typeof t!="object"||Array.isArray(t)?!0:t.emitOnStop!==!1}o(vn,"isAnalyticsEmitOnStopEnabled");function An(n){const t=c(n).analytics;if(t===null||typeof t!="object"||Array.isArray(t))return 0;const r=t.emitOnStopMinIntervalSeconds;return typeof r=="number"&&r>=0?r:0}o(An,"getAnalyticsEmitOnStopMinIntervalSeconds");function Tn(n){const t=c(n).analytics;return t===null||typeof t!="object"||Array.isArray(t)?!1:t.emitTurnEvents===!0}o(Tn,"isAnalyticsTurnEventsEnabled");function In(n){const t=c(n).analytics;return t===null||typeof t!="object"||Array.isArray(t)?!1:t.emitStepEvents===!0}o(In,"isAnalyticsStepEventsEnabled");function xn(n){const t=c(n).analytics;return t===null||typeof t!="object"||Array.isArray(t)?!0:t.emitApiRequestEvents!==!1}o(xn,"isAnalyticsApiRequestEventsEnabled");0&&(module.exports={ALL_CYCLES,CONFIG_TARGETS_BY_PRECEDENCE,CYCLES_ENABLED_BY_DEFAULT,CYCLE_DEFAULT_VERIFY_PATTERNS,CYCLE_TOOL_PREFIXES,CYCLE_TO_SERVER,DEFAULT_ANDROID_ALWAYS_REQUIRED,DEFAULT_ANDROID_EVIDENCE_PATHS,DEFAULT_ANDROID_VERIFY_PATTERNS,DEFAULT_BACKEND_ALWAYS_REQUIRED,DEFAULT_BACKEND_EVIDENCE_PATHS,DEFAULT_BACKEND_VERIFY_PATTERNS,DEFAULT_BROWSER_ALWAYS_REQUIRED,DEFAULT_BROWSER_VERIFY_PATTERNS,DEFAULT_NODE_ALWAYS_REQUIRED,DEFAULT_NODE_EVIDENCE_PATHS,DEFAULT_NODE_VERIFY_PATTERNS,DEFAULT_OAUTH_USAGE_TTL_SECONDS,DEFAULT_OTEL_EMIT_MIN_INTERVAL_SECONDS,DEFAULT_OTEL_ENSURE_MIN_INTERVAL_SECONDS,DEFAULT_OTEL_IDLE_TIMEOUT_SECONDS,DEFAULT_OTEL_PORT,DEFAULT_VERIFICATION_CONTEXT_COMMIT_DEPTH,DEFAULT_VERIFICATION_CONTEXT_MAX_BYTES,ENV_OVERRIDES,OPTIONAL_CYCLES,applyEnvOverrides,findActiveEnvOverride,getActiveCycles,getAnalyticsEmitOnStopMinIntervalSeconds,getAndroidDevToolsMcpEntry,getAutoVerifyEnabled,getBackendDevToolsMcpEntry,getCaptureFileChangeset,getClaudeOauthAccessEnabled,getClaudeOauthAccessUsageTtlSeconds,getConfigLayerPaths,getMaxChangesetBytes,getMaxRetries,getMcpServerEntry,getNodeDevToolsMcpEntry,getOTELEmitMinIntervalSeconds,getOTELEnsureMinIntervalSeconds,getOTELIdleTimeoutSeconds,getOTELPort,getPrivacyEnabled,getRequiredToolsConfig,getStatusLineEmitMinIntervalSeconds,getStatusLineRefreshInterval,getStatusLineRenderDefault,getTargetConfigPath,getTelemetryEnabled,getVerificationContextCommitDepth,getVerificationContextEnabled,getVerificationContextMaxBytes,getVerificationContextSource,getVerificationEnabled,getVerificationMode,getVerificationModel,isAnalyticsApiRequestEventsEnabled,isAnalyticsEmitOnStopEnabled,isAnalyticsEnabled,isAnalyticsStepEventsEnabled,isAnalyticsTurnEventsEnabled,isCollectorConfigured,isCycleEnabled,isCyclePatternsActive,isIgnoredVerifyPath,isJobQueueEnabled,isOTELEnabled,isRecordingEnabled,isSessionStatusEnabled,loadConfig,requiresVerification,resolveConfigTargetFromFlags});
1
+ "use strict";var y=Object.defineProperty;var ue=Object.getOwnPropertyDescriptor;var fe=Object.getOwnPropertyNames;var ge=Object.prototype.hasOwnProperty;var o=(n,e)=>y(n,"name",{value:e,configurable:!0});var de=(n,e)=>{for(var t in e)y(n,t,{get:e[t],enumerable:!0})},pe=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of fe(e))!ge.call(n,i)&&i!==t&&y(n,i,{get:()=>e[i],enumerable:!(r=ue(e,i))||r.enumerable});return n};var be=n=>pe(y({},"__esModule",{value:!0}),n);var hn={};de(hn,{ALL_CYCLES:()=>Ee,CONFIG_TARGETS_BY_PRECEDENCE:()=>je,CYCLES_ENABLED_BY_DEFAULT:()=>P,CYCLE_DEFAULT_VERIFY_PATTERNS:()=>$,CYCLE_TOOL_PREFIXES:()=>_e,CYCLE_TO_SERVER:()=>ye,DEFAULT_ANDROID_ALWAYS_REQUIRED:()=>W,DEFAULT_ANDROID_EVIDENCE_PATHS:()=>Q,DEFAULT_ANDROID_VERIFY_PATTERNS:()=>U,DEFAULT_BACKEND_ALWAYS_REQUIRED:()=>H,DEFAULT_BACKEND_EVIDENCE_PATHS:()=>G,DEFAULT_BACKEND_VERIFY_PATTERNS:()=>V,DEFAULT_BROWSER_ALWAYS_REQUIRED:()=>K,DEFAULT_BROWSER_VERIFY_PATTERNS:()=>M,DEFAULT_IGNORED_VERIFY_PATTERNS:()=>q,DEFAULT_NODE_ALWAYS_REQUIRED:()=>Y,DEFAULT_NODE_EVIDENCE_PATHS:()=>X,DEFAULT_NODE_VERIFY_PATTERNS:()=>F,DEFAULT_OAUTH_USAGE_TTL_SECONDS:()=>ee,DEFAULT_OTEL_EMIT_MIN_INTERVAL_SECONDS:()=>re,DEFAULT_OTEL_ENSURE_MIN_INTERVAL_SECONDS:()=>oe,DEFAULT_OTEL_IDLE_TIMEOUT_SECONDS:()=>te,DEFAULT_OTEL_PORT:()=>ne,DEFAULT_VERIFICATION_CONTEXT_COMMIT_DEPTH:()=>ae,DEFAULT_VERIFICATION_CONTEXT_MAX_BYTES:()=>se,ENV_OVERRIDES:()=>j,OPTIONAL_CYCLES:()=>T,applyEnvOverrides:()=>z,findActiveEnvOverride:()=>ke,getActiveCycles:()=>J,getAnalyticsEmitOnStopMinIntervalSeconds:()=>xn,getAndroidDevToolsMcpEntry:()=>Je,getAutoVerifyEnabled:()=>ie,getBackendDevToolsMcpEntry:()=>ze,getCaptureFileChangeset:()=>vn,getClaudeOauthAccessEnabled:()=>sn,getClaudeOauthAccessUsageTtlSeconds:()=>cn,getConfigLayerPaths:()=>x,getMaxChangesetBytes:()=>In,getMaxRetries:()=>Ze,getMcpServerEntry:()=>We,getNodeDevToolsMcpEntry:()=>Qe,getOTELEmitMinIntervalSeconds:()=>dn,getOTELEnsureMinIntervalSeconds:()=>gn,getOTELIdleTimeoutSeconds:()=>fn,getOTELPort:()=>un,getPrivacyEnabled:()=>le,getRequiredToolsConfig:()=>Ne,getStatusLineEmitMinIntervalSeconds:()=>rn,getStatusLineRefreshInterval:()=>pn,getStatusLineRenderDefault:()=>on,getTargetConfigPath:()=>Re,getTelemetryEnabled:()=>ce,getVerificationContextCommitDepth:()=>_n,getVerificationContextEnabled:()=>En,getVerificationContextMaxBytes:()=>Cn,getVerificationContextSource:()=>yn,getVerificationEnabled:()=>O,getVerificationMode:()=>An,getVerificationModel:()=>Ae,getVerificationStrict:()=>bn,isAnalyticsApiRequestEventsEnabled:()=>On,isAnalyticsEmitOnStopEnabled:()=>wn,isAnalyticsEnabled:()=>Tn,isAnalyticsStepEventsEnabled:()=>Rn,isAnalyticsTurnEventsEnabled:()=>jn,isAutoModeAllowlistEnabled:()=>an,isCollectorConfigured:()=>R,isCycleEnabled:()=>De,isCyclePatternsActive:()=>Z,isIgnoredVerifyPath:()=>mn,isJobQueueEnabled:()=>en,isOTELEnabled:()=>ln,isRecordingEnabled:()=>nn,isSessionStatusEnabled:()=>tn,loadConfig:()=>c,requiresVerification:()=>Le,resolveConfigTargetFromFlags:()=>Oe,resolveIgnoredVerifyPatterns:()=>w});module.exports=be(hn);var E=require("fs"),b=require("path"),I=require("os"),N=require("./logger");const T=["node","backend","android"],Ee=["browser",...T],P=new Set(["browser"]),ye={browser:"browser-devtools",node:"node-devtools",backend:"backend-devtools",android:"android-devtools"},_e={browser:"bdt_",node:"ndt_",backend:"bedt_",android:"adt_"},M=["*.ts","*.tsx","*.js","*.jsx","*.mjs","*.cjs","*.vue","*.svelte","*.html","*.htm","*.css","*.scss","*.sass","*.less","*.styl","*.py","*.rb","*.erb","*.go","*.rs","*.java","*.kt","*.kts","*.swift","*.c","*.cpp","*.h","*.hpp","*.cs","*.php","*.dart","*.ex","*.exs","*.erl","*.lua","*.r","*.R","*.scala","*.clj","*.cljs","*.zig","*.nim","*.hbs","*.ejs","*.pug","*.jade","*.astro"],F=["server/**/*.{ts,js,mjs,cjs}","src/server/**/*.{ts,js,mjs,cjs}","backend/**/*.{ts,js,mjs,cjs}","api/**/*.{ts,js,mjs,cjs}","src/api/**/*.{ts,js,mjs,cjs}","pages/api/**/*.{ts,js,mjs,cjs}","app/api/**/*.{ts,js,mjs,cjs}","routes/**/*.{ts,js,mjs,cjs}","**/server.{ts,js,mjs,cjs}"],V=["server/**/*.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","src/server/**/*.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","backend/**/*.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","api/**/*.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","src/api/**/*.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","pages/api/**/*.{ts,js,mjs,cjs}","app/api/**/*.{ts,js,mjs,cjs}","routes/**/*.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","controllers/**/*.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","handlers/**/*.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","services/**/*.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","**/server.{ts,js,mjs,cjs,py,go,java,rb,cs,rs,kt,scala,ex,exs,php,clj}","**/main.{go,py,java,rb,kt,scala}"],U=["android/**/*.{kt,java}","app/src/**/*.{kt,java}","mobile/**/*.{kt,java}","src/main/kotlin/**/*.kt","src/main/java/**/*.java","**/*.{kt,java}","**/res/**/*.xml","**/AndroidManifest.xml"],$={browser:M,node:F,backend:V,android:U},q=["**/*.spec.*","**/*.test.*","**/__tests__/**","**/__mocks__/**"];function w(n){const e=n.ignoredVerifyPatterns??[];return[...q,...e]}o(w,"resolveIgnoredVerifyPatterns");const K=["bdt_navigation_go-to","bdt_content_take-screenshot","bdt_a11y_take-aria-snapshot","bdt_o11y_get-console-messages"],Y=["ndt_debug_connect"],X=[{name:"probe",allOf:[{anyOf:["ndt_debug_put-tracepoint","ndt_debug_put-logpoint","ndt_debug_put-exceptionpoint"]},"ndt_debug_get-probe-snapshots"]},{name:"log",allOf:["ndt_debug_get-logs"]}],H=[],G=[{name:"protocol-call",allOf:[{anyOf:["bedt_request_http","bedt_request_grpc","bedt_request_graphql","bedt_request_websocket-open","bedt_request_replay"]}]},{name:"log-evidence",allOf:["bedt_log_register-source",{anyOf:["bedt_log_read","bedt_log_read-multi","bedt_log_follow"]}]},{name:"db-evidence",allOf:["bedt_db_connect",{anyOf:["bedt_db_query","bedt_db_describe-table","bedt_db_list-tables","bedt_db_snapshot","bedt_db_diff","bedt_db_get-changes"]}]}],W=["adt_device_connect"],Q=[{name:"device-evidence",allOf:[{anyOf:["adt_device_launch-app","adt_interaction_tap","adt_interaction_double-tap","adt_interaction_long-press","adt_interaction_input-text","adt_interaction_swipe","adt_interaction_scroll","adt_interaction_press-key","adt_interaction_deep-link"]},"adt_content_take-screenshot","adt_a11y_take-ui-snapshot"]},{name:"log-evidence",allOf:[{anyOf:["adt_o11y_log-read","adt_o11y_log-follow"]}]}],Ce=3;function k(n){if(!(0,E.existsSync)(n))return{};try{return JSON.parse((0,E.readFileSync)(n,"utf-8"))}catch(e){return N.logger.debug(`failed to parse config ${n}: ${e}`),{}}}o(k,"loadJsonFile");function me(n,e){if(!Object.prototype.hasOwnProperty.call(n,"verification"))return;const t=n.verification;if(t===null||typeof t!="object"||Array.isArray(t))throw new Error(`Invalid IronBee config in ${e}: 'verification' must be an object. Expected shape: { "enable": boolean }.`);const r=t;if(Object.prototype.hasOwnProperty.call(r,"enable")&&typeof r.enable!="boolean")throw new Error(`Invalid IronBee config in ${e}: 'verification.enable' must be boolean. Got ${typeof r.enable}.`);if(Object.prototype.hasOwnProperty.call(r,"auto")&&typeof r.auto!="boolean")throw new Error(`Invalid IronBee config in ${e}: 'verification.auto' must be boolean. Got ${typeof r.auto}.`);if(Object.prototype.hasOwnProperty.call(r,"strict")&&typeof r.strict!="boolean")throw new Error(`Invalid IronBee config in ${e}: 'verification.strict' must be boolean. Got ${typeof r.strict}.`);if(Object.prototype.hasOwnProperty.call(r,"model")){const i=r.model,s=typeof i=="string",l=i!==null&&typeof i=="object"&&!Array.isArray(i)&&Object.values(i).every(a=>typeof a=="string");if(!s&&!l)throw new Error(`Invalid IronBee config in ${e}: 'verification.model' must be a string (applies to all clients) or an object of string values (per-client, e.g. { "claude": "sonnet", "codex": "gpt-5.5" }). Got ${Array.isArray(i)?"array":typeof i}.`)}}o(me,"assertVerificationShape");function Ae(n,e){const t=n.verification?.model;if(typeof t=="string")return t.length>0?t:void 0;if(t&&typeof t=="object"){const r=t[e];return typeof r=="string"&&r.length>0?r:void 0}}o(Ae,"getVerificationModel");function ve(n,e){if(!Object.prototype.hasOwnProperty.call(n,"telemetry"))return;const t=n.telemetry;if(t===null||typeof t!="object"||Array.isArray(t))throw new Error(`Invalid IronBee config in ${e}: 'telemetry' must be an object. Expected shape: { "enable": boolean }.`);const r=t;if(Object.prototype.hasOwnProperty.call(r,"enable")&&typeof r.enable!="boolean")throw new Error(`Invalid IronBee config in ${e}: 'telemetry.enable' must be boolean. Got ${typeof r.enable}.`)}o(ve,"assertTelemetryShape");function Ie(n,e){if(!Object.prototype.hasOwnProperty.call(n,"privacy"))return;const t=n.privacy;if(t===null||typeof t!="object"||Array.isArray(t))throw new Error(`Invalid IronBee config in ${e}: 'privacy' must be an object. Expected shape: { "enable": boolean }.`);const r=t;if(Object.prototype.hasOwnProperty.call(r,"enable")&&typeof r.enable!="boolean")throw new Error(`Invalid IronBee config in ${e}: 'privacy.enable' must be boolean. Got ${typeof r.enable}.`)}o(Ie,"assertPrivacyShape");function _(n,e){if(!(n===void 0&&e===void 0))return{...n??{},...e??{}}}o(_,"mergeCycleConfig");function B(n,e){const t={...n,...e};return t.browser=_(n.browser,e.browser),t.node=_(n.node,e.node),t.backend=_(n.backend,e.backend),t.android=_(n.android,e.android),t.claude=xe(n.claude,e.claude),t.verification=we(n.verification,e.verification),t.verificationContext=Te(n.verificationContext,e.verificationContext),t}o(B,"mergeConfigLayers");function Te(n,e){if(!(n===void 0&&e===void 0))return{...n??{},...e??{}}}o(Te,"mergeVerificationContextConfig");function we(n,e){if(!(n===void 0&&e===void 0))return{...n??{},...e??{}}}o(we,"mergeVerificationConfig");function xe(n,e){if(n===void 0&&e===void 0)return;const t={...n??{},...e??{}};return(n?.oauthAccess!==void 0||e?.oauthAccess!==void 0)&&(t.oauthAccess={...n?.oauthAccess??{},...e?.oauthAccess??{}}),(n?.autoModeAllowlist!==void 0||e?.autoModeAllowlist!==void 0)&&(t.autoModeAllowlist={...n?.autoModeAllowlist??{},...e?.autoModeAllowlist??{}}),t}o(xe,"mergeClaudeConfig");function x(n){return{global:(0,b.join)((0,I.homedir)(),".ironbee","config.json"),project:n?(0,b.join)(n,".ironbee","config.json"):void 0,local:n?(0,b.join)(n,".ironbee","config.local.json"):void 0}}o(x,"getConfigLayerPaths");const je=["global","project","local"];function Re(n,e){const t=x(e);if(n==="global")return t.global;if(n==="project"){if(t.project===void 0)throw new Error("Project layer requested but no projectDir was provided.");return t.project}if(t.local===void 0)throw new Error("Local layer requested but no projectDir was provided.");return t.local}o(Re,"getTargetConfigPath");function Oe(n){if(n.global===!0&&n.local===!0)throw new Error("Pass at most one of --global / --local.");return n.global===!0?"global":n.local===!0?"local":"project"}o(Oe,"resolveConfigTargetFromFlags");function A(n){const e=k(n);return(0,E.existsSync)(n)&&(me(e,n),ve(e,n),Ie(e,n)),e}o(A,"loadAndValidateLayer");const j=[{envVar:"IRONBEE_API_KEY",configPath:"collector.apiKey"},{envVar:"IRONBEE_OAUTH_TOKEN",configPath:"collector.oauthToken"}];function he(n,e,t){const r=e.split(".");let i=n;for(let s=0;s<r.length-1;s++){const l=r[s],a=i[l];a!=null&&typeof a=="object"&&!Array.isArray(a)?i[l]={...a}:i[l]={},i=i[l]}i[r[r.length-1]]=t}o(he,"setAtConfigPath");function z(n){let e;for(const t of j){const r=process.env[t.envVar];if(r===void 0||r.length===0)continue;e===void 0&&(e={...n});const i=t.coerce?t.coerce(r):r;he(e,t.configPath,i)}return e??n}o(z,"applyEnvOverrides");function ke(n){for(const e of j){if(e.configPath!==n)continue;const t=process.env[e.envVar];if(t!==void 0&&t.length>0)return e}}o(ke,"findActiveEnvOverride");function c(n){const e=x(n),t=A(e.global),r=e.project?A(e.project):{},i=e.local?A(e.local):{},s=B(B(t,r),i);return z(s)}o(c,"loadConfig");function Be(n){let e=n.replace(/\{([^}]+)\}/g,(t,r)=>`(${r.split(",").map(i=>i.trim()).join("|")})`);return e=e.replace(/\*\*\//g,"\0DSS\0").replace(/\*\*/g,"\0DS\0").replace(/\*/g,"\0SS\0").replace(/\?/g,"\0QM\0"),e=e.replace(/[.+^$\\[\]]/g,"\\$&"),e=e.replace(/\x00DSS\x00/g,"(?:.*/)?").replace(/\x00DS\x00/g,".*").replace(/\x00SS\x00/g,"[^/]*").replace(/\x00QM\x00/g,"[^/]"),new RegExp(`(^|/)${e}$`)}o(Be,"globToRegExp");function C(n,e){const t=n.replace(/\\/g,"/");for(const r of e)if(Be(r).test(t))return!0;return!1}o(C,"matchesAny");function Se(n,e){if(e==="browser")return n.browser;if(e==="node")return n.node;if(e==="backend")return n.backend;if(e==="android")return n.android}o(Se,"getCycleBlock");function v(n,e){const t=Se(n,e);if(t!==void 0&&t.enable===!1)return[];const r=$[e]??[];if(t===void 0)return P.has(e)?[...r]:[];if(Array.isArray(t.verifyPatterns)&&t.verifyPatterns.length===0)return[];const i=t.verifyPatterns??r,s=t.additionalVerifyPatterns??[];return[...i,...s]}o(v,"getCyclePatterns");function J(n,e){const t=w(e);if(t.length>0&&C(n,t))return[];const r=[];C(n,v(e,"browser"))&&r.push("browser");for(const i of T){const s=v(e,i);s.length>0&&C(n,s)&&r.push(i)}return r}o(J,"getActiveCycles");function Le(n,e){return J(n,e).length>0}o(Le,"requiresVerification");function De(n,e){return O(n)?Z(n,e):!1}o(De,"isCycleEnabled");function Z(n,e){return v(n,e).length>0}o(Z,"isCyclePatternsActive");function Ne(n,e){let t,r;if(e==="browser"?(t=n.browser?.alwaysRequired??K,r=n.browser?.evidencePaths??[]):e==="node"?(t=n.node?.alwaysRequired??Y,r=n.node?.evidencePaths??X):e==="backend"?(t=n.backend?.alwaysRequired??H,r=n.backend?.evidencePaths??G):e==="android"?(t=n.android?.alwaysRequired??W,r=n.android?.evidencePaths??Q):(t=[],r=[]),t.length===0&&r.length===0)throw new Error(`Invalid required-tools config for cycle '${e}': both 'alwaysRequired' and 'evidencePaths' are empty. At least one must specify required tools.`);return{alwaysRequired:t,evidencePaths:r}}o(Ne,"getRequiredToolsConfig");const S="npx",Pe="^0.11.0",L=["-y",`@ironbee-ai/devtools@${Pe}`],Me={TOOL_NAME_PREFIX:"bdt_",TOOL_INPUT_METADATA_ENABLE:"true"},Fe={PLATFORM:"node",TOOL_NAME_PREFIX:"ndt_",TOOL_INPUT_METADATA_ENABLE:"true"},Ve={PLATFORM:"backend",TOOL_NAME_PREFIX:"bedt_",TOOL_INPUT_METADATA_ENABLE:"true"},Ue={PLATFORM:"android",TOOL_NAME_PREFIX:"adt_",TOOL_INPUT_METADATA_ENABLE:"true"},$e={BROWSER_DEVTOOLS_INSTALL_CHROMIUM:"true"},qe={},Ke={},Ye={};function Xe(n){return ce(n)?{}:{TELEMETRY_ENABLE:"false"}}o(Xe,"buildTelemetryEnv");function He(n){return le(n)?{COLLECTOR_EVENTS_TOOL_DETAILS_ENABLE:"false",COLLECTOR_ARTIFACTS_ENABLE:"false"}:{}}o(He,"buildPrivacyEnv");function Ge(n,e){if(!R(n))return{};const t=n.collector,i=k((0,b.join)((0,I.homedir)(),".ironbee","config.json")).collector??{},s=typeof i.oauthToken=="string"&&i.oauthToken.length>0,l=typeof i.apiKey=="string"&&i.apiKey.length>0;let a;t.oauthToken?a=s?"X-OAuth-Token=${file:~/.ironbee/config.json#collector.oauthToken}":`X-OAuth-Token=${t.oauthToken}`:a=l?"X-API-Key=${file:~/.ironbee/config.json#collector.apiKey}":`X-API-Key=${t.apiKey}`;const u={OTEL_ENABLE:"true",OTEL_EXPORTER_HTTP_URL:t.url,OTEL_EXPORTER_HTTP_HEADERS:a,OTEL_EXPORTER_TYPE:"otlp/http-protobuf"};return e==="browser"&&(u.OTEL_INSTRUMENTATION_USER_INTERACTION_EVENTS="change,input,click",u.BROWSER_HEADLESS_ENABLE="true"),u}o(Ge,"buildOTELEnv");function m(n,e,t,r,i){const s=Ge(n,i),l=Xe(n),a=He(n),u=n[e];if(u&&typeof u=="object"&&!Array.isArray(u)){const f=u;if(f.mcp&&typeof f.mcp=="object"&&!Array.isArray(f.mcp)){const g={...f.mcp},d={...s,...l,...a,...g.env??{},...t};return g.env=d,g}const h={};if(f.env&&typeof f.env=="object"&&!Array.isArray(f.env)){const g=f.env;for(const d of Object.keys(g))typeof g[d]=="string"&&(h[d]=g[d])}return{command:S,args:[...L],env:{...r,...s,...l,...a,...h,...t}}}return{command:S,args:[...L],env:{...r,...s,...l,...a,...t}}}o(m,"buildMcpEntry");function We(n){const e=c(n);return m(e,"browserDevTools",Me,$e,"browser")}o(We,"getMcpServerEntry");function Qe(n){const e=c(n);return m(e,"nodeDevTools",Fe,qe,"node")}o(Qe,"getNodeDevToolsMcpEntry");function ze(n){const e=c(n);return m(e,"backendDevTools",Ve,Ke,"backend")}o(ze,"getBackendDevToolsMcpEntry");function Je(n){const e=c(n);return m(e,"androidDevTools",Ue,Ye,"android")}o(Je,"getAndroidDevToolsMcpEntry");function Ze(n){return typeof n.maxRetries=="number"&&n.maxRetries>0?n.maxRetries:Ce}o(Ze,"getMaxRetries");function R(n){if(process.env.IRONBEE_COLLECTOR==="false")return!1;const e=n.collector;if(!e||e.enable===!1||typeof e.url!="string"||e.url.length===0)return!1;const t=typeof e.oauthToken=="string"&&e.oauthToken.length>0,r=typeof e.apiKey=="string"&&e.apiKey.length>0;return!(!t&&!r)}o(R,"isCollectorConfigured");function en(n){const e=c(n);return p(e,e.jobQueue)}o(en,"isJobQueueEnabled");function nn(n){const e=c(n);return p(e,e.recording)}o(nn,"isRecordingEnabled");function tn(n){return p(n,n.statusLine)}o(tn,"isSessionStatusEnabled");function on(n){const e=n.statusLine;return e!==void 0&&e.renderDefault===!0}o(on,"getStatusLineRenderDefault");function rn(n){const e=n.statusLine?.emitMinIntervalSeconds;return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:10}o(rn,"getStatusLineEmitMinIntervalSeconds");const ee=60;function sn(n){return n.claude?.oauthAccess?.enable!==!1}o(sn,"getClaudeOauthAccessEnabled");function an(n){return n.claude?.autoModeAllowlist?.enable!==!1}o(an,"isAutoModeAllowlistEnabled");function cn(n){const e=n.claude?.oauthAccess?.usageTtlSeconds;return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:ee}o(cn,"getClaudeOauthAccessUsageTtlSeconds");const ne=15986,te=600,oe=30,re=0;function ln(n){return p(n,n.otel)}o(ln,"isOTELEnabled");function un(n){const e=n.otel?.port;return typeof e=="number"&&Number.isInteger(e)&&e>0&&e<65536?e:ne}o(un,"getOTELPort");function fn(n){const e=n.otel?.idleTimeoutSeconds;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:te}o(fn,"getOTELIdleTimeoutSeconds");function gn(n){const e=n.otel?.ensureMinIntervalSeconds;return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:oe}o(gn,"getOTELEnsureMinIntervalSeconds");function dn(n){const e=n.otel?.emitMinIntervalSeconds;return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:re}o(dn,"getOTELEmitMinIntervalSeconds");function pn(n){const e=n.statusLine?.refreshInterval;if(typeof e=="number"&&Number.isFinite(e)&&e>=1)return e}o(pn,"getStatusLineRefreshInterval");function p(n,e){return e!=null&&typeof e=="object"&&!Array.isArray(e)?e.enable!==!1:R(n)}o(p,"isFeatureEnabledWithCollectorAutoEnable");function Bn(n){return n==null||typeof n!="object"||Array.isArray(n)?!1:n.enable!==!1}o(Bn,"isPresenceEnabled");function O(n){const e=n.verification;return e==null||typeof e!="object"||Array.isArray(e)?!0:e.enable!==!1}o(O,"getVerificationEnabled");function ie(n){const e=n.verification;return e==null||typeof e!="object"||Array.isArray(e)?!0:e.auto!==!1}o(ie,"getAutoVerifyEnabled");function bn(n){const e=n.verification;return e==null||typeof e!="object"||Array.isArray(e)?!1:e.strict===!0}o(bn,"getVerificationStrict");const se=65536,ae=1;function En(n){const e=n.verificationContext;return e==null||typeof e!="object"||Array.isArray(e)?!0:e.enable!==!1}o(En,"getVerificationContextEnabled");function yn(n){return n.verificationContext?.source==="actions"?"actions":"git"}o(yn,"getVerificationContextSource");function _n(n){const e=n.verificationContext?.commitDepth;return typeof e=="number"&&Number.isFinite(e)&&e>=0?Math.floor(e):ae}o(_n,"getVerificationContextCommitDepth");function Cn(n){const e=n.verificationContext?.maxBytes;return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.floor(e):se}o(Cn,"getVerificationContextMaxBytes");function mn(n,e){const t=w(n);return t.length>0&&C(e,t)}o(mn,"isIgnoredVerifyPath");function An(n){return O(n)?ie(n)?"enforce":"assist":"monitor"}o(An,"getVerificationMode");function ce(n){const e=n.telemetry;return e==null||typeof e!="object"||Array.isArray(e)?!0:e.enable!==!1}o(ce,"getTelemetryEnabled");function le(n){const e=n.privacy;return e==null||typeof e!="object"||Array.isArray(e)?!1:e.enable===!0}o(le,"getPrivacyEnabled");const D=65536;function vn(n){const e=n.fileChange;return!e||typeof e!="object"||Array.isArray(e)?!1:e.captureChangeset===!0}o(vn,"getCaptureFileChangeset");function In(n){const e=n.fileChange;if(!e||typeof e!="object"||Array.isArray(e))return D;const t=e.maxChangesetBytes;return typeof t!="number"||!Number.isFinite(t)||t<=0?D:Math.floor(t)}o(In,"getMaxChangesetBytes");function Tn(n){const e=c(n);return p(e,e.analytics)}o(Tn,"isAnalyticsEnabled");function wn(n){const t=c(n).analytics;return t===null||typeof t!="object"||Array.isArray(t)?!0:t.emitOnStop!==!1}o(wn,"isAnalyticsEmitOnStopEnabled");function xn(n){const t=c(n).analytics;if(t===null||typeof t!="object"||Array.isArray(t))return 0;const r=t.emitOnStopMinIntervalSeconds;return typeof r=="number"&&r>=0?r:0}o(xn,"getAnalyticsEmitOnStopMinIntervalSeconds");function jn(n){const t=c(n).analytics;return t===null||typeof t!="object"||Array.isArray(t)?!1:t.emitTurnEvents===!0}o(jn,"isAnalyticsTurnEventsEnabled");function Rn(n){const t=c(n).analytics;return t===null||typeof t!="object"||Array.isArray(t)?!1:t.emitStepEvents===!0}o(Rn,"isAnalyticsStepEventsEnabled");function On(n){const t=c(n).analytics;return t===null||typeof t!="object"||Array.isArray(t)?!0:t.emitApiRequestEvents!==!1}o(On,"isAnalyticsApiRequestEventsEnabled");0&&(module.exports={ALL_CYCLES,CONFIG_TARGETS_BY_PRECEDENCE,CYCLES_ENABLED_BY_DEFAULT,CYCLE_DEFAULT_VERIFY_PATTERNS,CYCLE_TOOL_PREFIXES,CYCLE_TO_SERVER,DEFAULT_ANDROID_ALWAYS_REQUIRED,DEFAULT_ANDROID_EVIDENCE_PATHS,DEFAULT_ANDROID_VERIFY_PATTERNS,DEFAULT_BACKEND_ALWAYS_REQUIRED,DEFAULT_BACKEND_EVIDENCE_PATHS,DEFAULT_BACKEND_VERIFY_PATTERNS,DEFAULT_BROWSER_ALWAYS_REQUIRED,DEFAULT_BROWSER_VERIFY_PATTERNS,DEFAULT_IGNORED_VERIFY_PATTERNS,DEFAULT_NODE_ALWAYS_REQUIRED,DEFAULT_NODE_EVIDENCE_PATHS,DEFAULT_NODE_VERIFY_PATTERNS,DEFAULT_OAUTH_USAGE_TTL_SECONDS,DEFAULT_OTEL_EMIT_MIN_INTERVAL_SECONDS,DEFAULT_OTEL_ENSURE_MIN_INTERVAL_SECONDS,DEFAULT_OTEL_IDLE_TIMEOUT_SECONDS,DEFAULT_OTEL_PORT,DEFAULT_VERIFICATION_CONTEXT_COMMIT_DEPTH,DEFAULT_VERIFICATION_CONTEXT_MAX_BYTES,ENV_OVERRIDES,OPTIONAL_CYCLES,applyEnvOverrides,findActiveEnvOverride,getActiveCycles,getAnalyticsEmitOnStopMinIntervalSeconds,getAndroidDevToolsMcpEntry,getAutoVerifyEnabled,getBackendDevToolsMcpEntry,getCaptureFileChangeset,getClaudeOauthAccessEnabled,getClaudeOauthAccessUsageTtlSeconds,getConfigLayerPaths,getMaxChangesetBytes,getMaxRetries,getMcpServerEntry,getNodeDevToolsMcpEntry,getOTELEmitMinIntervalSeconds,getOTELEnsureMinIntervalSeconds,getOTELIdleTimeoutSeconds,getOTELPort,getPrivacyEnabled,getRequiredToolsConfig,getStatusLineEmitMinIntervalSeconds,getStatusLineRefreshInterval,getStatusLineRenderDefault,getTargetConfigPath,getTelemetryEnabled,getVerificationContextCommitDepth,getVerificationContextEnabled,getVerificationContextMaxBytes,getVerificationContextSource,getVerificationEnabled,getVerificationMode,getVerificationModel,getVerificationStrict,isAnalyticsApiRequestEventsEnabled,isAnalyticsEmitOnStopEnabled,isAnalyticsEnabled,isAnalyticsStepEventsEnabled,isAnalyticsTurnEventsEnabled,isAutoModeAllowlistEnabled,isCollectorConfigured,isCycleEnabled,isCyclePatternsActive,isIgnoredVerifyPath,isJobQueueEnabled,isOTELEnabled,isRecordingEnabled,isSessionStatusEnabled,loadConfig,requiresVerification,resolveConfigTargetFromFlags,resolveIgnoredVerifyPatterns});
@@ -1 +1 @@
1
- "use strict";var r=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var L=(e,S)=>{for(var o in S)r(e,o,{get:S[o],enumerable:!0})},N=(e,S,o,t)=>{if(S&&typeof S=="object"||typeof S=="function")for(let n of E(S))!I.call(e,n)&&n!==o&&r(e,n,{get:()=>S[n],enumerable:!(t=A(S,n))||t.enumerable});return e};var _=e=>N(r({},"__esModule",{value:!0}),e);var c={};L(c,{INSTALL_SCHEMA_VERSION:()=>b});module.exports=_(c);const b=2;0&&(module.exports={INSTALL_SCHEMA_VERSION});
1
+ "use strict";var r=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var L=(e,S)=>{for(var o in S)r(e,o,{get:S[o],enumerable:!0})},N=(e,S,o,t)=>{if(S&&typeof S=="object"||typeof S=="function")for(let n of E(S))!I.call(e,n)&&n!==o&&r(e,n,{get:()=>S[n],enumerable:!(t=A(S,n))||t.enumerable});return e};var _=e=>N(r({},"__esModule",{value:!0}),e);var c={};L(c,{INSTALL_SCHEMA_VERSION:()=>b});module.exports=_(c);const b=4;0&&(module.exports={INSTALL_SCHEMA_VERSION});