cc-safety-net 2.6.1 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/amp/cc-safety-net/index.ts +2 -2
- package/dist/bin/hook.js +1 -1
- package/dist/chunks/{index-tyab2dd4.js → index-7r6br8vt.js} +1 -1
- package/dist/chunks/{index-k4yfpsk1.js → index-tef36kbd.js} +1 -1
- package/dist/cli.js +103 -103
- package/dist/deepseek-harness/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/openclaw/cc-safety-net/index.js +2 -2
- package/dist/openclaw/cc-safety-net/openclaw.plugin.json +1 -1
- package/dist/openclaw/cc-safety-net/package.json +1 -1
- package/dist/pi/index.js +1 -1
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Y,P,Ve,u}from"../chunks/index-mqmy0cce.js";import{j,de,Se}from"../chunks/index-
|
|
1
|
+
import{Y,P,Ve,u}from"../chunks/index-mqmy0cce.js";import{j,de,Se}from"../chunks/index-7r6br8vt.js";import"../chunks/index-tef36kbd.js";import{resolve as g}from"node:path";var k=new Map([["bash","posix"],["pwsh","powershell"]]),w={agent:"deepseek-harness",debugLabel:"deepseek-harness tool guard",extract:(e,i,r)=>T(e,i,r),getSessionId:(e)=>e?.agent?.session.header.id,allow:void 0,block:(e)=>Y(e),includeEvidenceOnError:(e)=>e.route.kind==="command"};function f(e){let i=C();e.tools.guard((r)=>i(r,process.cwd()))}function C(e={}){return Se(w,e)}function T(e,i,r){if(!e||typeof e!=="object")return j(null);let l=e,n=l.name;if(typeof n!=="string"||n.trim()==="")return j(null);let d=l.agent?.session.header.cwd??i,o=Ve([d],r);if(!o)return de({directory:"session",problem:"unusable",cwd:d},{toolName:n});let t=l.arguments,c=k.get(n);if(!c)return u(n,t,{kind:P(n)},{configCwd:o,executionCwd:o},null);if(!t||typeof t!=="object"||Array.isArray(t))return j(o,{toolName:n});let p=t,a=p.command;if(typeof a!=="string"||a.trim()==="")return j(o,{toolName:n});let s=p.workdir;if(s!==void 0&&(typeof s!=="string"||s.trim()===""))return j(o,{command:a,toolName:n});let m=s===void 0?o:Ve([g(o,s)],r);if(!m)return de({directory:"requested",problem:"unusable",cwd:s},{command:a,toolName:n});return u(n,t,{kind:"command",shell:c},{configCwd:o,executionCwd:m},a)}var v={name:"cc-safety-net",inject:["tools"],apply:f};export{v as default};
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Ce,O,D,Y,c,Ee,f,P,ie,fe,u,p}from"./chunks/index-mqmy0cce.js";import{re}from"./chunks/index-5ht7pdm3.js";import{we,G}from"./chunks/index-k4yfpsk1.js";import{join as qc,resolve as _s}from"node:path";function vr(){return{"cc-safety-net":{description:"Operate CC Safety Net: explain blocks, rules, integrations, diagnostics",template:re.slice(re.indexOf("# CC Safety Net"))}}}var Jc=new Set(["powershell","pwsh"]);function As(e={}){return async({directory:t,homeDir:r})=>{let n=_s(t),o;return{config:async(s)=>{o=s;let a=vr(),l=s.command??{};s.command={...a,...l}},"tool.execute.before":async(s,a)=>{_n({configCwd:n,homeDir:r,tool:s.tool,sessionID:s.sessionID,toolInput:a.args,route:Gc(s.tool,An(o?.shell)),guardDependencies:e})}}}}function _n({configCwd:e,homeDir:t,expandHomeWorkdir:r=!1,tool:n,sessionID:o,toolInput:s,route:a,guardDependencies:l={}}){let m=t===void 0?c():{...c(),home:t},i=(h,I,d=e)=>{we(m,h,()=>o,{agent:"opencode",toolName:I,cwd:d}),Fs(h)};if(typeof n!=="string"||n.trim()==="")i(O());let x;try{x=ie(s)}catch(h){if(!(h instanceof f))throw h;i(O({toolName:n}),n)}if(!fe(e)){i(D({directory:"session",problem:"unusable",cwd:e},{command:x,toolName:n}),n);return}let S=Kc(e,s,r?m.home:void 0);if(S===null){i(O({command:x,toolName:n}),n);return}if(typeof S!=="string"){i(D(S,{command:x,toolName:n}),n,S.cwd);return}let g=u(n,s,a,{configCwd:e,executionCwd:S},x??null);try{let h=G(m,g,{guard:{auditAllowed:Ee(m.env),dependencies:l},audit:{agent:"opencode",getSessionId:()=>o}});Rs(h)}catch(h){if(!(h instanceof p))throw h;if(h.stage==="policy-protection"||h.stage==="config-load"||h.stage==="secret-protection")throw h.cause;Rs(h.evaluation);return}}function An(e,t=process.platform,r=process.env.SHELL){if(typeof e!=="string"&&t==="win32")return"powershell";let n=typeof e==="string"?e:r;if(typeof n!=="string")return"auto";let o=n.trim().split(/[\\/]/).at(-1)?.toLowerCase().replace(/\.exe$/,"");if(!o)return"auto";if(Jc.has(o))return"powershell";return o==="cmd"?"auto":"posix"}function Gc(e,t){if(e==="bash")return{kind:"command",shell:t};return{kind:P(e)}}function Kc(e,t,r){if(!t||typeof t!=="object"||Array.isArray(t))return e;if(!Object.hasOwn(t,"workdir"))return e;let n=t.workdir;if(typeof n!=="string"||n.trim()==="")return null;let o=process.platform==="win32"?zc(n):n,s=o.startsWith("~/")||process.platform==="win32"&&o.startsWith("~\\"),a=r===void 0?o:o==="~"?r:s?qc(r,o.slice(2)):o,l=_s(e,a);return fe(l)?l:{directory:"requested",problem:"unusable",cwd:n}}function zc(e){return e.replace(/^\/([a-zA-Z]):(?:[\\/]|$)/,(r,n)=>`${n.toUpperCase()}:/`).replace(/^\/([a-zA-Z])(?:[\\/]|$)/,(r,n)=>`${n.toUpperCase()}:/`).replace(/^\/cygdrive\/([a-zA-Z])(?:[\\/]|$)/,(r,n)=>`${n.toUpperCase()}:/`).replace(/^\/mnt\/([a-zA-Z])(?:[\\/]|$)/,(r,n)=>`${n.toUpperCase()}:/`)}function Rs(e){let t=Ce(e,{includeEvidence:!0});if(t)Fs(t)}function Fs(e){throw Error(Y(e))}import{execFile as Yf}from"node:child_process";var me=(e,t)=>{switch(t.length){case 0:return e;case 1:return t[0](e);case 2:return t[1](t[0](e));case 3:return t[2](t[1](t[0](e)));case 4:return t[3](t[2](t[1](t[0](e))));case 5:return t[4](t[3](t[2](t[1](t[0](e)))));case 6:return t[5](t[4](t[3](t[2](t[1](t[0](e))))));case 7:return t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))));case 8:return t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e))))))));case 9:return t[8](t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))))));default:{let r=e;for(let n=0,o=t.length;n<o;n++)r=t[n](r);return r}}},Hc={pipe(){return me(this,arguments)}},qt=function(){function e(){}return e.prototype=Hc,e}();var C=function(e,t){if(typeof e==="function")return function(){return e(arguments)?t.apply(this,arguments):(r)=>t(r,...arguments)};switch(e){case 0:case 1:throw RangeError(`Invalid arity ${e}`);case 2:return function(r,n){if(arguments.length>=2)return t(r,n);return function(o){return t(o,r)}};case 3:return function(r,n,o){if(arguments.length>=3)return t(r,n,o);return function(s){return t(s,r,n)}};default:return function(){if(arguments.length>=e)return t.apply(this,arguments);let r=arguments;return function(n){return t(n,...r)}}}};var ue=(e)=>e;var Ps=(e)=>()=>e;var yt=Ps(void 0),Ds=yt;function nt(e){let t=new WeakMap;return(r)=>{let n=t.get(r);if(n!==void 0)return n;let o=e(r);return t.set(r,o),o}}function Tt(e){let t=new WeakMap;return(r)=>{let n=t.get(r);if(n!==void 0)return n;let o=e(r);return t.set(r,o),t.set(o,o),o}}var Jt=(e)=>{let t=new Set(Reflect.ownKeys(e));if(e.constructor===Object)return t;if(e instanceof Error)t.delete("stack");let r=Object.getPrototypeOf(e),n=r;while(n!==null&&n!==Object.prototype){let o=Reflect.ownKeys(n);for(let s=0;s<o.length;s++)t.add(o[s]);n=Object.getPrototypeOf(n)}if(t.has("constructor")&&typeof e.constructor==="function"&&r===e.constructor.prototype)t.delete("constructor");return t},Gt=new WeakSet;function Kt(e){return typeof e==="string"}function Fn(e){return typeof e==="number"}function Us(e){return typeof e==="symbol"}function Or(e){return Kt(e)||Fn(e)||Us(e)}function Et(e){return typeof e==="function"}function Pn(e){return e!==void 0}function Dn(e){return e!=null}function Ns(e){return!0}function Un(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function kr(e){return typeof e==="object"&&e!==null||Et(e)}var A=C(2,(e,t)=>kr(e)&&(t in e));function Ms(e){return e instanceof Error}var Q="~effect/interfaces/Hash",U=(e)=>{switch(typeof e){case"number":return Fr(e);case"bigint":return z(e.toString(10));case"boolean":return z(String(e));case"symbol":return z(String(e));case"string":return z(e);case"undefined":return z("undefined");case"function":case"object":if(e===null)return z("null");else if(e instanceof Date){if(Number.isNaN(e.getTime()))return z("Invalid Date");return z(e.toISOString())}else if(e instanceof RegExp)return z(e.toString());else{if(Gt.has(e))return Rr(e);if(Mn.has(e))return Mn.get(e);let t=Xc(e,()=>{if(Wc(e))return e[Q]();else if(typeof e==="function")return Rr(e);else if(e instanceof DataView)return _r(new Uint8Array(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e)||ArrayBuffer.isView(e))return _r(e);else if(e instanceof Map)return Zc(e);else if(e instanceof Set)return Yc(e);return Vc(e)});return Mn.set(e,t),t}default:throw Error(`BUG: unhandled typeof ${typeof e} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},Rr=(e)=>{if(!Nn.has(e))Nn.set(e,Fr(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER)));return Nn.get(e)},le=C(2,(e,t)=>e*53^t),Ar=(e)=>e&3221225471|e>>>1&1073741824,Wc=(e)=>A(e,Q),Fr=(e)=>{if(e!==e)return z("NaN");if(e===1/0)return z("Infinity");if(e===-1/0)return z("-Infinity");let t=e|0;if(t!==e)t^=e*4294967295;while(e>4294967295)t^=e/=4294967295;return Ar(t)},z=(e)=>{let t=5381,r=e.length;while(r)t=t*33^e.charCodeAt(--r);return Ar(t)},$n=(e,t)=>{let r=12289;for(let n of t)r^=le(U(n),U(e[n]));return Ar(r)},Vc=(e)=>$n(e,Jt(e)),Bn=(e,t)=>(r)=>{let n=e;for(let o of r)n^=t(o);return Ar(n)},_r=Bn(6151,U),Zc=Bn(z("Map"),([e,t])=>le(U(e),U(t))),Yc=Bn(z("Set"),U),Nn=new WeakMap,Mn=new WeakMap,Ln=new WeakSet;function Xc(e,t){if(Ln.has(e))return z("[Circular]");Ln.add(e);let r=t();return Ln.delete(e),r}var ee="~effect/interfaces/Equal";function V(){if(arguments.length===1)return(e)=>st(e,arguments[0]);return st(arguments[0],arguments[1])}function st(e,t){if(e===t)return!0;if(e==null||t==null)return!1;let r=typeof e;if(r!==typeof t)return!1;if(r==="number"&&e!==e&&t!==t)return!0;if(r!=="object"&&r!=="function")return!1;if(Gt.has(e)||Gt.has(t))return!1;return tu(e,t,eu)}function Qc(e,t,r){let n=jn.has(e),o=qn.has(t);if(n&&o)return!0;if(n||o)return!1;jn.add(e),qn.add(t);let s=r();return jn.delete(e),qn.delete(t),s}var jn=new WeakSet,qn=new WeakSet;function eu(e,t){if(U(e)!==U(t))return!1;else if(e instanceof Date){if(!(t instanceof Date))return!1;let s=e.getTime(),a=t.getTime();return s===a||Number.isNaN(s)&&Number.isNaN(a)}else if(e instanceof RegExp){if(!(t instanceof RegExp))return!1;return e.toString()===t.toString()}let r=$s(e),n=$s(t);if(r!==n)return!1;let o=r&&n;if(typeof e==="function"&&!o)return!1;return Qc(e,t,()=>{if(o)return e[ee](t);else if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;return ru(e,t)}else if(ArrayBuffer.isView(e)){let s=e instanceof DataView;if(!ArrayBuffer.isView(t)||e.byteLength!==t.byteLength||s!==t instanceof DataView)return!1;if(s){let a=t;return Ls(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(a.buffer,a.byteOffset,a.byteLength))}return Ls(e,t)}else if(e instanceof Map){if(!(t instanceof Map)||e.size!==t.size)return!1;return su(e,t)}else if(e instanceof Set){if(!(t instanceof Set)||e.size!==t.size)return!1;return iu(e,t)}return nu(e,t)})}function tu(e,t,r){let n=Pr.get(e);if(!n)n=new WeakMap,Pr.set(e,n);else if(n.has(t))return n.get(t);let o=r(e,t);n.set(t,o);let s=Pr.get(t);if(!s)s=new WeakMap,Pr.set(t,s);return s.set(e,o),o}var Pr=new WeakMap;function ru(e,t){for(let r=0;r<e.length;r++)if(!st(e[r],t[r]))return!1;return!0}function Ls(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function nu(e,t){let r=Jt(e),n=Jt(t);if(r.size!==n.size)return!1;for(let o of r)if(!n.has(o)||!st(e[o],t[o]))return!1;return!0}function ou(e,t){return function(n,o){let s=Array.from(o);for(let[a,l]of n){let m=!1;for(let i=0;i<s.length;i++){let[x,S]=s[i];if(e(a,x)&&t(l,S)){s[i]=s[s.length-1],s.pop(),m=!0;break}}if(!m)return!1}return!0}}var su=ou(st,st);function au(e){return function(r,n){let o=Array.from(n);for(let s of r){let a=!1;for(let l=0;l<o.length;l++){let m=o[l];if(e(s,m)){o[l]=o[o.length-1],o.pop(),a=!0;break}}if(!a)return!1}return!0}}var iu=au(st),$s=(e)=>A(e,ee);var zt=Symbol.for("~effect/Redactable"),cu=(e)=>A(e,zt);function It(e){if(cu(e))return Jn(e);return e}function Jn(e){return e[zt](globalThis[vt]?.context??uu)}var vt="~effect/Fiber/currentFiber",Bs=new Map,uu={"~effect/Context":{},base:Bs,depth:0,mapUnsafe:Bs,pipe(){return me(this,arguments)}};function M(e,t){let r=t?.space??0,n=new WeakSet,o=!r?"":typeof r==="number"?" ".repeat(r):r,s=(i)=>o.repeat(i),a=(i,x)=>{let S=i?.constructor;return S&&S!==Object.prototype.constructor&&S.name?`${S.name}(${x})`:x},l=(i)=>{try{return Reflect.ownKeys(i)}catch{return["[ownKeys threw]"]}};function m(i,x=0){if(typeof i==="string")return JSON.stringify(i);if(typeof i==="number"||i==null||typeof i==="boolean"||typeof i==="symbol")return String(i);if(typeof i==="bigint")return String(i)+"n";if(typeof i==="object"||typeof i==="function"){if(n.has(i))return lu;n.add(i);let S;if(zt in i)S=m(Jn(i),x);else if(Array.isArray(i))S=!o||i.length<=1?`[${i.map((y)=>m(y,x)).join(",")}]`:`[
|
|
1
|
+
import{Ce,O,D,Y,c,Ee,f,P,ie,fe,u,p}from"./chunks/index-mqmy0cce.js";import{re}from"./chunks/index-5ht7pdm3.js";import{we,G}from"./chunks/index-tef36kbd.js";import{join as qc,resolve as _s}from"node:path";function vr(){return{"cc-safety-net":{description:"Operate CC Safety Net: explain blocks, rules, integrations, diagnostics",template:re.slice(re.indexOf("# CC Safety Net"))}}}var Jc=new Set(["powershell","pwsh"]);function As(e={}){return async({directory:t,homeDir:r})=>{let n=_s(t),o;return{config:async(s)=>{o=s;let a=vr(),l=s.command??{};s.command={...a,...l}},"tool.execute.before":async(s,a)=>{_n({configCwd:n,homeDir:r,tool:s.tool,sessionID:s.sessionID,toolInput:a.args,route:Gc(s.tool,An(o?.shell)),guardDependencies:e})}}}}function _n({configCwd:e,homeDir:t,expandHomeWorkdir:r=!1,tool:n,sessionID:o,toolInput:s,route:a,guardDependencies:l={}}){let m=t===void 0?c():{...c(),home:t},i=(h,I,d=e)=>{we(m,h,()=>o,{agent:"opencode",toolName:I,cwd:d}),Fs(h)};if(typeof n!=="string"||n.trim()==="")i(O());let x;try{x=ie(s)}catch(h){if(!(h instanceof f))throw h;i(O({toolName:n}),n)}if(!fe(e)){i(D({directory:"session",problem:"unusable",cwd:e},{command:x,toolName:n}),n);return}let S=Kc(e,s,r?m.home:void 0);if(S===null){i(O({command:x,toolName:n}),n);return}if(typeof S!=="string"){i(D(S,{command:x,toolName:n}),n,S.cwd);return}let g=u(n,s,a,{configCwd:e,executionCwd:S},x??null);try{let h=G(m,g,{guard:{auditAllowed:Ee(m.env),dependencies:l},audit:{agent:"opencode",getSessionId:()=>o}});Rs(h)}catch(h){if(!(h instanceof p))throw h;if(h.stage==="policy-protection"||h.stage==="config-load"||h.stage==="secret-protection")throw h.cause;Rs(h.evaluation);return}}function An(e,t=process.platform,r=process.env.SHELL){if(typeof e!=="string"&&t==="win32")return"powershell";let n=typeof e==="string"?e:r;if(typeof n!=="string")return"auto";let o=n.trim().split(/[\\/]/).at(-1)?.toLowerCase().replace(/\.exe$/,"");if(!o)return"auto";if(Jc.has(o))return"powershell";return o==="cmd"?"auto":"posix"}function Gc(e,t){if(e==="bash")return{kind:"command",shell:t};return{kind:P(e)}}function Kc(e,t,r){if(!t||typeof t!=="object"||Array.isArray(t))return e;if(!Object.hasOwn(t,"workdir"))return e;let n=t.workdir;if(typeof n!=="string"||n.trim()==="")return null;let o=process.platform==="win32"?zc(n):n,s=o.startsWith("~/")||process.platform==="win32"&&o.startsWith("~\\"),a=r===void 0?o:o==="~"?r:s?qc(r,o.slice(2)):o,l=_s(e,a);return fe(l)?l:{directory:"requested",problem:"unusable",cwd:n}}function zc(e){return e.replace(/^\/([a-zA-Z]):(?:[\\/]|$)/,(r,n)=>`${n.toUpperCase()}:/`).replace(/^\/([a-zA-Z])(?:[\\/]|$)/,(r,n)=>`${n.toUpperCase()}:/`).replace(/^\/cygdrive\/([a-zA-Z])(?:[\\/]|$)/,(r,n)=>`${n.toUpperCase()}:/`).replace(/^\/mnt\/([a-zA-Z])(?:[\\/]|$)/,(r,n)=>`${n.toUpperCase()}:/`)}function Rs(e){let t=Ce(e,{includeEvidence:!0});if(t)Fs(t)}function Fs(e){throw Error(Y(e))}import{execFile as Yf}from"node:child_process";var me=(e,t)=>{switch(t.length){case 0:return e;case 1:return t[0](e);case 2:return t[1](t[0](e));case 3:return t[2](t[1](t[0](e)));case 4:return t[3](t[2](t[1](t[0](e))));case 5:return t[4](t[3](t[2](t[1](t[0](e)))));case 6:return t[5](t[4](t[3](t[2](t[1](t[0](e))))));case 7:return t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))));case 8:return t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e))))))));case 9:return t[8](t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))))));default:{let r=e;for(let n=0,o=t.length;n<o;n++)r=t[n](r);return r}}},Hc={pipe(){return me(this,arguments)}},qt=function(){function e(){}return e.prototype=Hc,e}();var C=function(e,t){if(typeof e==="function")return function(){return e(arguments)?t.apply(this,arguments):(r)=>t(r,...arguments)};switch(e){case 0:case 1:throw RangeError(`Invalid arity ${e}`);case 2:return function(r,n){if(arguments.length>=2)return t(r,n);return function(o){return t(o,r)}};case 3:return function(r,n,o){if(arguments.length>=3)return t(r,n,o);return function(s){return t(s,r,n)}};default:return function(){if(arguments.length>=e)return t.apply(this,arguments);let r=arguments;return function(n){return t(n,...r)}}}};var ue=(e)=>e;var Ps=(e)=>()=>e;var yt=Ps(void 0),Ds=yt;function nt(e){let t=new WeakMap;return(r)=>{let n=t.get(r);if(n!==void 0)return n;let o=e(r);return t.set(r,o),o}}function Tt(e){let t=new WeakMap;return(r)=>{let n=t.get(r);if(n!==void 0)return n;let o=e(r);return t.set(r,o),t.set(o,o),o}}var Jt=(e)=>{let t=new Set(Reflect.ownKeys(e));if(e.constructor===Object)return t;if(e instanceof Error)t.delete("stack");let r=Object.getPrototypeOf(e),n=r;while(n!==null&&n!==Object.prototype){let o=Reflect.ownKeys(n);for(let s=0;s<o.length;s++)t.add(o[s]);n=Object.getPrototypeOf(n)}if(t.has("constructor")&&typeof e.constructor==="function"&&r===e.constructor.prototype)t.delete("constructor");return t},Gt=new WeakSet;function Kt(e){return typeof e==="string"}function Fn(e){return typeof e==="number"}function Us(e){return typeof e==="symbol"}function Or(e){return Kt(e)||Fn(e)||Us(e)}function Et(e){return typeof e==="function"}function Pn(e){return e!==void 0}function Dn(e){return e!=null}function Ns(e){return!0}function Un(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function kr(e){return typeof e==="object"&&e!==null||Et(e)}var A=C(2,(e,t)=>kr(e)&&(t in e));function Ms(e){return e instanceof Error}var Q="~effect/interfaces/Hash",U=(e)=>{switch(typeof e){case"number":return Fr(e);case"bigint":return z(e.toString(10));case"boolean":return z(String(e));case"symbol":return z(String(e));case"string":return z(e);case"undefined":return z("undefined");case"function":case"object":if(e===null)return z("null");else if(e instanceof Date){if(Number.isNaN(e.getTime()))return z("Invalid Date");return z(e.toISOString())}else if(e instanceof RegExp)return z(e.toString());else{if(Gt.has(e))return Rr(e);if(Mn.has(e))return Mn.get(e);let t=Xc(e,()=>{if(Wc(e))return e[Q]();else if(typeof e==="function")return Rr(e);else if(e instanceof DataView)return _r(new Uint8Array(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e)||ArrayBuffer.isView(e))return _r(e);else if(e instanceof Map)return Zc(e);else if(e instanceof Set)return Yc(e);return Vc(e)});return Mn.set(e,t),t}default:throw Error(`BUG: unhandled typeof ${typeof e} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},Rr=(e)=>{if(!Nn.has(e))Nn.set(e,Fr(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER)));return Nn.get(e)},le=C(2,(e,t)=>e*53^t),Ar=(e)=>e&3221225471|e>>>1&1073741824,Wc=(e)=>A(e,Q),Fr=(e)=>{if(e!==e)return z("NaN");if(e===1/0)return z("Infinity");if(e===-1/0)return z("-Infinity");let t=e|0;if(t!==e)t^=e*4294967295;while(e>4294967295)t^=e/=4294967295;return Ar(t)},z=(e)=>{let t=5381,r=e.length;while(r)t=t*33^e.charCodeAt(--r);return Ar(t)},$n=(e,t)=>{let r=12289;for(let n of t)r^=le(U(n),U(e[n]));return Ar(r)},Vc=(e)=>$n(e,Jt(e)),Bn=(e,t)=>(r)=>{let n=e;for(let o of r)n^=t(o);return Ar(n)},_r=Bn(6151,U),Zc=Bn(z("Map"),([e,t])=>le(U(e),U(t))),Yc=Bn(z("Set"),U),Nn=new WeakMap,Mn=new WeakMap,Ln=new WeakSet;function Xc(e,t){if(Ln.has(e))return z("[Circular]");Ln.add(e);let r=t();return Ln.delete(e),r}var ee="~effect/interfaces/Equal";function V(){if(arguments.length===1)return(e)=>st(e,arguments[0]);return st(arguments[0],arguments[1])}function st(e,t){if(e===t)return!0;if(e==null||t==null)return!1;let r=typeof e;if(r!==typeof t)return!1;if(r==="number"&&e!==e&&t!==t)return!0;if(r!=="object"&&r!=="function")return!1;if(Gt.has(e)||Gt.has(t))return!1;return tu(e,t,eu)}function Qc(e,t,r){let n=jn.has(e),o=qn.has(t);if(n&&o)return!0;if(n||o)return!1;jn.add(e),qn.add(t);let s=r();return jn.delete(e),qn.delete(t),s}var jn=new WeakSet,qn=new WeakSet;function eu(e,t){if(U(e)!==U(t))return!1;else if(e instanceof Date){if(!(t instanceof Date))return!1;let s=e.getTime(),a=t.getTime();return s===a||Number.isNaN(s)&&Number.isNaN(a)}else if(e instanceof RegExp){if(!(t instanceof RegExp))return!1;return e.toString()===t.toString()}let r=$s(e),n=$s(t);if(r!==n)return!1;let o=r&&n;if(typeof e==="function"&&!o)return!1;return Qc(e,t,()=>{if(o)return e[ee](t);else if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;return ru(e,t)}else if(ArrayBuffer.isView(e)){let s=e instanceof DataView;if(!ArrayBuffer.isView(t)||e.byteLength!==t.byteLength||s!==t instanceof DataView)return!1;if(s){let a=t;return Ls(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(a.buffer,a.byteOffset,a.byteLength))}return Ls(e,t)}else if(e instanceof Map){if(!(t instanceof Map)||e.size!==t.size)return!1;return su(e,t)}else if(e instanceof Set){if(!(t instanceof Set)||e.size!==t.size)return!1;return iu(e,t)}return nu(e,t)})}function tu(e,t,r){let n=Pr.get(e);if(!n)n=new WeakMap,Pr.set(e,n);else if(n.has(t))return n.get(t);let o=r(e,t);n.set(t,o);let s=Pr.get(t);if(!s)s=new WeakMap,Pr.set(t,s);return s.set(e,o),o}var Pr=new WeakMap;function ru(e,t){for(let r=0;r<e.length;r++)if(!st(e[r],t[r]))return!1;return!0}function Ls(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function nu(e,t){let r=Jt(e),n=Jt(t);if(r.size!==n.size)return!1;for(let o of r)if(!n.has(o)||!st(e[o],t[o]))return!1;return!0}function ou(e,t){return function(n,o){let s=Array.from(o);for(let[a,l]of n){let m=!1;for(let i=0;i<s.length;i++){let[x,S]=s[i];if(e(a,x)&&t(l,S)){s[i]=s[s.length-1],s.pop(),m=!0;break}}if(!m)return!1}return!0}}var su=ou(st,st);function au(e){return function(r,n){let o=Array.from(n);for(let s of r){let a=!1;for(let l=0;l<o.length;l++){let m=o[l];if(e(s,m)){o[l]=o[o.length-1],o.pop(),a=!0;break}}if(!a)return!1}return!0}}var iu=au(st),$s=(e)=>A(e,ee);var zt=Symbol.for("~effect/Redactable"),cu=(e)=>A(e,zt);function It(e){if(cu(e))return Jn(e);return e}function Jn(e){return e[zt](globalThis[vt]?.context??uu)}var vt="~effect/Fiber/currentFiber",Bs=new Map,uu={"~effect/Context":{},base:Bs,depth:0,mapUnsafe:Bs,pipe(){return me(this,arguments)}};function M(e,t){let r=t?.space??0,n=new WeakSet,o=!r?"":typeof r==="number"?" ".repeat(r):r,s=(i)=>o.repeat(i),a=(i,x)=>{let S=i?.constructor;return S&&S!==Object.prototype.constructor&&S.name?`${S.name}(${x})`:x},l=(i)=>{try{return Reflect.ownKeys(i)}catch{return["[ownKeys threw]"]}};function m(i,x=0){if(typeof i==="string")return JSON.stringify(i);if(typeof i==="number"||i==null||typeof i==="boolean"||typeof i==="symbol")return String(i);if(typeof i==="bigint")return String(i)+"n";if(typeof i==="object"||typeof i==="function"){if(n.has(i))return lu;n.add(i);let S;if(zt in i)S=m(Jn(i),x);else if(Array.isArray(i))S=!o||i.length<=1?`[${i.map((y)=>m(y,x)).join(",")}]`:`[
|
|
2
2
|
${s(x+1)}${i.map((y)=>m(y,x+1)).join(`,
|
|
3
3
|
`+s(x+1))}
|
|
4
4
|
${s(x)}]`;else if(i instanceof Date)S=js(i);else if(!t?.ignoreToString&&A(i,"toString")&&typeof i.toString==="function"&&i.toString!==Object.prototype.toString&&i.toString!==Array.prototype.toString){let y=fu(i);S=i instanceof Error&&i.cause?`${y} (cause: ${m(i.cause,x)})`:y}else if(Symbol.iterator in i)S=`${i.constructor.name}(${m(Array.from(i),x)})`;else{let y=l(i);if(!o||y.length<=1){let g=`{${y.map((h)=>`${Ht(h)}:${m(i[h],x)}`).join(",")}}`;S=a(i,g)}else{let g=`{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// cc-safety-net managed OpenClaw plugin. Do not edit. Reinstall with: npx -y cc-safety-net install --openclaw
|
|
2
|
-
// version: 2.6.
|
|
2
|
+
// version: 2.6.2
|
|
3
3
|
var Ll={id:"cc-safety-net",name:"CC Safety Net",description:"Block destructive commands and secret-file access before OpenClaw runs a tool."};var Oi="CC Safety Net could not analyze the command because it exceeds safe analysis limits. Simplify or split the command and retry.",Ke="Command exceeds maximum recursion depth and cannot be safely analyzed. Flatten the nesting and retry.",jn="CC Safety Net failed closed because command analysis failed unexpectedly. This is not caused by your command. Report it to the user.";var ki={errorCode:"path-canonicalization-limit",reason:"CC Safety Net could not analyze the command because it exceeds safe analysis limits. Simplify or split the command and retry."},Hn={errorCode:"structural-shell-syntax-limit",reason:"Command analysis exceeds CC Safety Net's derived-command work limit. Reduce nested or embedded command complexity and retry."},j=Object.freeze({realpathAttempts:{cap:16384,...ki},processedCandidateBytes:{cap:4194304,...ki},pathEnvironmentExpansion:{cap:64,...ki},recursionDepth:{cap:10,errorCode:"structural-shell-syntax-limit",reason:"Command exceeds maximum recursion depth and cannot be safely analyzed. Flatten the nesting and retry."},derivedTokens:{cap:16384,...Hn},trackedHeredocFiles:{cap:64,...Hn},controlFlowStates:{cap:64,...Hn},wrapperPeelIterations:{cap:20,...Hn},derivedCommandShape:Hn});class W extends Error{kind;name="AnalysisLimit";constructor(e){super(j[e].reason);this.kind=e}}function ke(){let e=new Map;return{counters:e,resolvedPaths:new Map,charge(t,n=1){let r=(e.get(t)??0)+n;if(e.set(t,r),r>j[t].cap)throw new W(t)}}}var Sg=[/\bgh[pousr]_[A-Za-z0-9]{20,}\b/g,/\bgithub_pat_[A-Za-z0-9_]{20,}\b/g,/\bglpat-[A-Za-z0-9_-]{20,}\b/g,/\bxox[abeprs]-[A-Za-z0-9-]{20,}\b/g,/\bnpm_[A-Za-z0-9_]{20,}\b/g,/\bpypi-[A-Za-z0-9_-]{20,}\b/g,/\b[rs]k_(?:live|test)_[A-Za-z0-9_]{20,}\b/g,/\bsk-[A-Za-z0-9_-]{20,}\b/g,/\bsk_[A-Za-z0-9]{20,}\b/g,/\bgsk_[A-Za-z0-9]{52,}\b/g,/\bxai-[A-Za-z0-9_-]{80,}\b/g,/\bpplx-[A-Za-z0-9_-]{20,}\b/g,/\bbastn_[A-Za-z0-9]{16,}\b/g,/\btgp_v1_[A-Za-z0-9_-]{43,}\b/g,/\bflp_[A-Za-z0-9]{10,}\b/g,/\bwfr_[A-Za-z0-9]{20,}\b/g,/\bfwp?_[A-Za-z0-9_-]{20,}\b/g,/\btp-[A-Za-z0-9_-]{20,}\b/g,/\bpsk-[A-Za-z0-9_-]{8,}-[A-Za-z0-9_-]{8,}\b/g,/\b[a-f0-9]{32}\.[A-Za-z0-9]{16}\b/g];function pt(e){return vg(e.replace(/\b((?:DATABASE|POSTGRES|POSTGRESQL|MYSQL|MARIADB|REDIS|MONGO(?:DB)?|DB)_DSN|CONNECTION_STRING)=("[^"]*"|'[^']*'|[^\s]+(?:\s+[A-Z_][A-Z0-9_]*=[^\s]+)*)/gi,"$1=<redacted>").replace(/\b((?:DATABASE|POSTGRES|POSTGRESQL|MYSQL|MARIADB|REDIS|MONGO(?:DB)?|DB)_(?:URL|URI|CONNECTION_STRING))=("[^"]*"|'[^']*'|[^\s]+)/gi,"$1=<redacted>").replace(/\b([A-Z0-9_]*(?:TOKEN|SECRET|PASSWORD|PASS|KEY|CREDENTIALS)[A-Z0-9_]*)=("[^"]*"|'[^']*'|[^\s]+)/gi,"$1=<redacted>"))}function vg(e){return Sg.reduce((t,n)=>t.replace(n,"<redacted>"),e.replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/gi,"<redacted>").replace(/((?:(['"])(?:authorization|cookie|x-api-key|api-key)\2|(?:authorization|cookie|x-api-key|api-key))\s*:\s*)(['"])(?:\\[^\r\n]|(?!\3)[^\\\r\n])*\3/gi,"$1$3<redacted>$3").replace(/(['"]?\s*(?:authorization|cookie|x-api-key|api-key)\s*:(?!\s*(?:"<redacted>"|'<redacted>'))\s*)([^'"\r\n]+)(['"]?)/gi,"$1<redacted>$3").replace(/\b([a-z][a-z0-9+.-]*:\/\/)([^\s/:@]+):([^\s@/]+)@/gi,"$1<redacted>:<redacted>@").replace(/\b([a-z][a-z0-9+.-]*:\/\/)([^\s/@:]+)@/gi,"$1<redacted>@").replace(/(^|[\s?&;|])((?:x-amz-signature|x-goog-signature|sig|signature)=)(?:"[^"\r\n]*"|'[^'\r\n]*'|[^&#\s'"`;|<>()]*)/gi,"$1$2<redacted>").replace(/(^|\s)((?:-u|--user)(?:\s+|=))([^\s:]+):([^\s]+)/g,"$1$2<redacted>:<redacted>")).replace(/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}\b/g,"<redacted>").replace(/\b(?:AKIA|ASIA)[A-Z0-9]{16}\b/g,"<redacted>")}var Eg={hard_stop:"Do not retry this operation or attempt any workaround (other tools, flags, or paths). Report the block to the user and continue with the rest of the task.",use_alternative:"Do not retry the blocked form. Continue the task using the safer alternative described above.",scope_down:"Retry with a narrower, explicit target as described above. Escalate to the user if the broad operation is truly required.",manual_only:"If this operation is truly needed, ask the user for explicit permission and have them run the command manually.",stop_and_explain:"Do not brute-force variants. Simplify or restructure the command so it can be analyzed, or report the block to the user."};function Rg(e){let t=e.maxLen??200,n=e.redact??((o)=>o),r=(o)=>o.length>t?`${o.slice(0,t)}...`:o;return[e.askUser?"CC Safety Net could not verify this command":"BLOCKED by CC Safety Net",`Reason: ${n(e.reason)}`,e.ruleId?`Rule: ${e.ruleId}`:void 0,e.toolName?`Tool: ${e.toolName}`:void 0,e.command?`Command: ${r(n(e.command))}`:void 0,e.segment&&e.segment!==e.command?`Segment: ${r(n(e.segment))}`:void 0,e.cwd?`Working directory: ${r(n(e.cwd))}`:void 0,e.configWarning?`Config warning: ${n(e.configWarning)}`:void 0,e.askUser?"Approve only if you expected this command.":Eg[e.intent??"manual_only"]].filter((o)=>o!==void 0).join(`
|
|
4
4
|
|
|
5
5
|
`)}function Wl(e,t){if(e.decision.kind!=="deny")return;let n=t.includeEvidence?e.decision.evidence:void 0;return{reason:e.decision.reason,ruleId:e.decision.ruleId,intent:e.decision.intent,command:n?.command,segment:n?.segment,toolName:t.toolName,...e.configFallback?{configWarning:e.configFallback.reason}:{},...e.decision.unverifiedByStandardMode?{unverifiedByStandardMode:!0}:{}}}function Vn(e={}){return{reason:jn,ruleId:"analysis.failed-closed",intent:"stop_and_explain",command:e.command,segment:e.segment??e.command,toolName:e.toolName}}var wg={session:{unusable:{reason:"CC Safety Net cannot check tool calls because the session's working directory or workspace root no longer exists, is inaccessible, is not a directory, or uses an unsupported path form. Ask the user to restart the session from an existing directory.",intent:"hard_stop",ruleId:"cwd.session-unusable"},"outside-workspace":{reason:"CC Safety Net cannot check tool calls because the session's working directory is outside its workspace roots. Ask the user to restart the session from a directory inside the workspace.",intent:"hard_stop",ruleId:"cwd.session-outside-workspace"}},requested:{unusable:{reason:"CC Safety Net could not use the requested working directory because it does not exist, is inaccessible, is not a directory, or uses an unsupported path form. Use an existing accessible working directory. If the requested directory is missing, create it from an accessible location before retrying the command.",intent:"use_alternative",ruleId:"cwd.requested-unusable"},"outside-workspace":{reason:"CC Safety Net could not use the requested working directory because it is outside the session's workspace. Use a working directory inside the workspace.",intent:"use_alternative",ruleId:"cwd.requested-outside-workspace"}}};function Mi(e,t={}){return{...wg[e.directory][e.problem],command:t.command,toolName:t.toolName,cwd:e.cwd}}function Gl(e){return Rg({...e,redact:pt})}function Fl(e){return pt(e instanceof Error?e.message:String(e))}import{isAbsolute as Bi,relative as Jg,resolve as sc,sep as Qg}from"node:path";import{basename as Bl,dirname as xg,isAbsolute as _g,join as Ag,normalize as Pg,resolve as zl}from"node:path";var Ig=256,Ur=new Set(["CC_SAFETY_NET_HOME","CLAUDE_CONFIG_DIR","CODEX_HOME","COPILOT_HOME","GEMINI_CLI_HOME","GROK_HOME","HOME","KIMI_CODE_HOME","KIMI_SHARE_DIR","OPENCODE_CONFIG","OPENCODE_CONFIG_DIR","PI_CODING_AGENT_DIR","ProgramData","TMPDIR","XDG_CONFIG_HOME","XDG_DATA_HOME"]);function ce(e,t=process.platform){if(t!=="win32")return e;return e.replace(/^\/([A-Za-z])(?:\/|$)/,"$1:/")}function tt(e,t=process.platform){if(t!=="win32")return!1;return(e[0]==="/"||e[0]==="\\")&&(e[1]==="/"||e[1]==="\\")}function Wi(e,t){return Di(e,0,t)}function Di(e,t,n){let r="",o=0,i=0;while(o<e.length){if(e[o]!=="$"){r+=e[o],o++;continue}if(e[o+1]==="{"){let a=Ni(e,o+2),l=Tg(e,o,t);if(l===null){if(Ur.has(a))throw new W("pathEnvironmentExpansion");if(i++,i>j.pathEnvironmentExpansion.cap)throw new W("pathEnvironmentExpansion");r+="${",o+=2;continue}let c=e.slice(o,l+1);r+=kg(c,t,n),o=l+1;continue}let s=Ni(e,o+1);if(!s){r+="$",o++;continue}r+=Li(s,n)??`$${s}`,o+=s.length+1}return r}function Tg(e,t,n){let r=1;for(let o=t+2;o<e.length;o++){if(e[o]==="\\"){o++;continue}if(e[o]==="$"&&e[o+1]==="{"){if(r++,n+r>j.pathEnvironmentExpansion.cap)throw new W("pathEnvironmentExpansion");o++;continue}if(e[o]!=="}")continue;if(r--,r===0)return o}return null}function kg(e,t,n){let r=e.slice(2,-1),o=Ni(r,0);if(!o)return e;let i=r.slice(o.length);if(!i)return Li(o,n)??e;let s=[":-",":+",":=",":?","-","+","=","?"].find((c)=>i.startsWith(c));if(!s){if(Ur.has(o))throw new W("pathEnvironmentExpansion");return e}if(!Ur.has(o))return e;if(s.endsWith("="))throw new W("pathEnvironmentExpansion");let a=Li(o,n),l=s.startsWith(":")?a!==null&&a!=="":a!==null;if(s.endsWith("?")&&!l)throw new W("pathEnvironmentExpansion");if(s.endsWith("-")||s.endsWith("?"))return l?a??"":Di(i.slice(s.length),t+1,n);return l?Di(i.slice(s.length),t+1,n):""}function Ni(e,t){if(!/[A-Za-z_]/.test(e[t]??""))return"";let n=t+1;while(/[A-Za-z0-9_]/.test(e[n]??""))n++;return e.slice(t,n)}function Li(e,t){if(!Ur.has(e))return null;if(e==="HOME")return t.env.get("HOME")??t.home;return t.env.get(e)??null}function N(e,t,n){if(!e)return e;let r=n.resolvedPaths.get(e);if(r!==void 0)return r;let o=[],i=e;while(!0){Ul(n,i);let s=t.realpath(i);if(s!==null)return $l(n,e,s,o);let a=xg(i);if(a===i||o.length>=Ig)return $l(n,e,i,o);o.push(Bl(i)),i=a}}function $l(e,t,n,r){let o=r.length===0?n:Ag(n,...r.reverse());return e.resolvedPaths.set(t,o),o}function Og(e,t,n){let r=n.resolvedPaths.get(e);if(r!==void 0)return r;Ul(n,e);let o=t.realpath(e);if(o!==null)n.resolvedPaths.set(e,o);return o}function Ul(e,t){e.charge("realpathAttempts"),e.charge("processedCandidateBytes",Buffer.byteLength(t))}function ue(e,t,n,r){let o=jl(e,t,n);if(!o)return"";return N(o,n.paths,r).replace(/\\/g,"/")}function Hl(e,t,n,r,o){let i=jl(e,t,n);if(!i)return null;if(o(Bl(i)))return N(i,n.paths,r).replace(/\\/g,"/");let s=Og(i,n.paths,r);return s===null?null:s.replace(/\\/g,"/")}function jl(e,t,n){let r=n.home,o=Wi(e.trim(),n).replace(/\\/g,"/");if(!o)return"";let i=o==="~"?r:o.startsWith("~/")?zl(r,o.slice(2)):o,s=ce(i);return Pg(_g(s)?s:zl(t,s))}import{types as Mg}from"node:util";var Dg=new Set(["find","findbyname","glob","grep","grepsearch","listdir","listpermissions","ls","read","readfile","readurlcontent","searchweb","view","viewfile"]),Ng=new Set(["command","diff","input","patch","patchtext"]),Vl=new TextEncoder,Lg=new TextDecoder,Wg=/\s/,Gg=64;class nt extends Error{name="ToolInputLimitError";constructor(){super("tool input traversal limit exceeded")}}var Kn=Object.freeze({maxDepth:64,maxNodes:1e4,maxKeys:1e4,maxStringBytes:1048576,maxAggregateStringBytes:4194304});function Fg(e){return e.replace(/[-_\s]/g,"").toLowerCase()}function jr(e){return Dg.has(Fg(e))}function Yn(e){if(!e||typeof e!=="object")return;rc(e);let t=Object.getOwnPropertyDescriptor(e,"command");if(!t){if("command"in e)qe();return}if(t.get||t.set)qe();let n=t.value;return typeof n==="string"&&n!==""?n:void 0}function Xl(e,t){return Jl(e,t,!1,{nodes:0,keys:0,stringBytes:0,ancestors:new Set},1)}function Jl(e,t,n,r,o){let i=nc(e,r,o);if(typeof e==="string")return n?[e]:[];if(!i)return[];let s=i.entries.flatMap(([a,l])=>Jl(l,t,i.array?n:t.has(Ql(a)),r,o+1));return r.ancestors.delete(i.object),s}function Ql(e){return e.replace(/-/g,"_").toLowerCase()}function ec(e){return tc(e,!0,{nodes:0,keys:0,stringBytes:0,ancestors:new Set},1).flatMap($g)}function tc(e,t,n,r){let o=nc(e,n,r);if(typeof e==="string")return t?[e]:[];if(!o)return[];let i=o.entries.flatMap(([s,a])=>tc(a,o.array?t:Ng.has(Ql(s)),n,r+1));return n.ancestors.delete(o.object),i}function zg(e,t,n){if(t.nodes++,e!==null&&typeof e==="object"&&n>Kn.maxDepth||t.nodes>Kn.maxNodes)qe();if(typeof e!=="string")return;let r=Buffer.byteLength(e);if(t.stringBytes+=r,r>Kn.maxStringBytes||t.stringBytes>Kn.maxAggregateStringBytes)qe()}function nc(e,t,n){if(zg(e,t,n),!e||typeof e!=="object")return null;let r=rc(e);if(t.ancestors.has(e))qe();let o=Reflect.ownKeys(e);if(t.keys+=o.length,t.keys>Kn.maxKeys)qe();let i=o.flatMap((s)=>{let a=Object.getOwnPropertyDescriptor(e,s);if(!a||a.get||a.set)qe();return typeof s==="string"&&a.enumerable?[[s,a.value]]:[]});return t.ancestors.add(e),{object:e,array:r,entries:i}}function rc(e){if(Mg.isProxy(e))qe();let t=Array.isArray(e),n=Object.getPrototypeOf(e);if(t&&n!==Array.prototype||!t&&n!==Object.prototype&&n!==null)qe();return t}function qe(){throw new nt}function $g(e){let t=[],n=e.split(/\r?\n/),r=!1,o=!1,i=null,s=null,a=()=>{o=!1,i=null,s=null};for(let l=0;l<n.length;l++){let c=n[l]??"";if(c==="*** Begin Patch"){r=!0,a();continue}if(c==="*** End Patch"){r=!1,a();continue}if(c.startsWith("@@")){let u=Bg(c);if(o=!0,i=u?.oldLines??null,s=u?.newLines??null,i===0&&s===0)a();continue}if(o&&i!==null&&s!==null){let u=c.startsWith(" ")||c.startsWith("-")?1:0,f=c.startsWith(" ")||c.startsWith("+")?1:0;if(i=Math.max(0,i-u),s=Math.max(0,s-f),i===0&&s===0)a();continue}if(c.startsWith("*** ")){a(),t.push(...Gi(c));continue}if(o)continue;if(c.startsWith("diff --git ")){t.push(...Gi(c));continue}if(c.startsWith("--- ")){let u=n[l+1]??"";if(!u.startsWith("+++ "))continue;t.push(...zi(Hr(c.slice(4),!0),Hr(u.slice(4),!0))),l++;continue}if(!r)t.push(...Gi(c))}return t}function Bg(e){let t=/^@@ -\d+(?:,(\d+))? \+\d+(?:,(\d+))? @@/.exec(e);if(!t)return null;return{oldLines:Number(t[1]??1),newLines:Number(t[2]??1)}}function Gi(e){let t=/^\*\*\* (?:Add|Update|Delete) File: (.+)$/.exec(e);if(t?.[1])return Zl(t[1]);let n=/^\*\*\* Move to: (.+)$/.exec(e);if(n?.[1])return Zl(n[1]);if(e.startsWith("diff --git "))return Ug(e.slice(11));let r=/^--- (.+)$/.exec(e);if(r?.[1])return Yl(r[1]);let o=/^\+\+\+ (.+)$/.exec(e);if(o?.[1])return Yl(o[1]);let i=/^(?:rename|copy) (?:from|to) (.+)$/.exec(e);if(i?.[1])return Zg(i[1]);return[]}function Ug(e){let t=Hg(e);if(t.length===2&&t[0]&&t[1])return zi(t[0],t[1]);let n=jg(e);return n?zi(e.slice(n.oldStart,n.oldEnd),e.slice(n.newStart,n.newEnd)):[]}function Hg(e){let t=[],n=0;while(n<e.length&&t.length<2){while(Mt(e[n]))n++;if(n>=e.length)break;let r=e[n]==='"'||e[n]==="'"?e[n]:void 0;if(!r){let i=n;while(n<e.length&&!Mt(e[n]))n++;t.push(e.slice(i,n));continue}let o=oc(e,n,r);if(!o)return[];t.push(o.value),n=o.end}while(Mt(e[n]))n++;return n===e.length?t:[]}function jg(e){let t=0;while(t<e.length&&Mt(e[t]))t++;let n=e.length;while(n>t&&Mt(e[n-1]))n--;let r=0,o=t;while(o<n){if(!Mt(e[o])){o++;continue}let i=o;while(o<n&&Mt(e[o]))o++;if(i===t||o===n)continue;if(r++,r>Gg)qe();if(Vg(e,t,i,o,n))return{oldStart:t,oldEnd:i,newStart:o,newEnd:n}}return null}function Vg(e,t,n,r,o){if(Fi(e,t,n,r,o))return!0;let i=Kl(e,"/",t,n),s=Kl(e,"/",r,o);if(i<=t||s<=r)return!1;if(Fi(e,t,i,r,s))return!1;return Fi(e,i+1,n,s+1,o)}function Fi(e,t,n,r,o){if(n-t!==o-r)return!1;for(let i=0;i<n-t;i++)if(e[t+i]!==e[r+i])return!1;return!0}function Kl(e,t,n,r){for(let o=n;o<r;o++)if(e[o]===t)return o;return-1}function Mt(e){return e!==void 0&&Wg.test(e)}function oc(e,t,n){let r=[],o=t+1;while(o<e.length){let i=String.fromCodePoint(e.codePointAt(o)??0);if(i===n)return{value:Lg.decode(Uint8Array.from(r)),end:o+1};if(i!=="\\"||n==="'"){r.push(...Vl.encode(i)),o+=i.length;continue}let s=e.slice(o+1),a=/^[0-7]{1,3}/.exec(s)?.[0];if(a){r.push(Number.parseInt(a,8)),o+=a.length+1;continue}r.push(...Vl.encode(Kg(s[0]??""))),o+=2}return null}function Kg(e){return{a:"\x07",b:"\b",f:"\f",n:`
|
|
@@ -48,5 +48,5 @@ var Ll={id:"cc-safety-net",name:"CC Safety Net",description:"Block destructive c
|
|
|
48
48
|
`).some((n)=>{let r=n.indexOf(t);return r>=0&&/[()[\]{}]/.test(n.slice(r))})}function hP(e){return Array.from(e.matchAll(/[A-Za-z_$][\w$]*/g),(t)=>Jp(t[0])).some((t)=>t.some((n)=>pP.test(n)))}var yP=new Set(["cmd","powershell","pwsh"]);function CP(e,t){let n=$n(e.masked,t),r=wl[e.masked[n]??""];if(r===void 0||r==="}")return!1;let o=e.masked.indexOf(r,n+1),i=e.masked.slice(n+1,o);return o!==-1&&/^\s*,[\w\s,]*$/.test(i)&&/^[,)]/.test(e.masked.slice($n(e.masked,o+1)))&&!e.literals.some((s)=>s.tokenStart>n&&s.tokenStart<o&&(Cl.has(s.text)||Rn(fe(s.text).toLowerCase())||yP.has(fe(s.text).toLowerCase().replace(/\.exe$/,""))))}function bP(e){let t=[];return e.split("").map((n,r)=>{let o=t.at(-1)??-1;if(n in wl)t.push(r);if(n===")"||n==="]"||n==="}")t.pop();return o})}function SP(e,t,n,r){let o=n[t.tokenStart]??-1,i=e[o]??"",s=zn(e,t.tokenStart),a=$n(e,t.tokenEnd);if(/(?:^|[^\w$])in$|[=!]=$/.test(e.slice(Math.max(0,s-3),s+1)))return!0;if(/^(?:(?:not\s+)?in(?![\w$])|[=!]=)/.test(e.slice(a,a+8)))return!0;if(r&&(i==="["||i==="("))return!1;let l=e[s],c=e[a];if(i==="{"&&l===":")return AP(e,s);let u=(l===i||l===",")&&(c===","||c===wl[i]||i==="{"&&c===":");if(i!=="(")return u&&i!=="";return u&&(l===","||c===",")&&PP(e,o)}var vP=/(?:^|[^\w$.])(?:pathlib\s*\.\s*)?Path\s*$/,EP=/^\s*\.\s*write_(?:text|bytes)\s*\(/,RP=/(?:^|[^\w$.])open\s*$/,wP=/^[bt]*[awx][abtwx]*$/,xP=/(?:^|[^\w$])(?:writeFile|writeFileSync|appendFile|appendFileSync|Bun\s*\.\s*write)\s*$/;function _P(e,t,n){let r=n[t.tokenStart]??-1;if(e.masked[r]!=="(")return!1;let o=zn(e.masked,t.tokenStart),i=$n(e.masked,t.tokenEnd),s=e.masked[i],a=e.masked.slice(Math.max(0,r-40),r);if(vP.test(a))return(o===r||e.masked[o]===",")&&(s===","||s===")")&&!e.literals.some((c)=>c.tokenStart>r&&c.tokenStart<t.tokenStart)&&EP.test(e.masked.slice(Oo(e.masked,r+1)+1));if(o!==r||s!==",")return!1;if(xP.test(a))return!0;if(!RP.test(a))return!1;let l=e.literals.find((c)=>/^,\s*(?:mode\s*=\s*)?$/.test(e.masked.slice(i,c.tokenStart)));return l!==void 0&&wP.test(l.text)&&/^[,)]/.test(e.masked.slice($n(e.masked,l.tokenEnd)))}function AP(e,t){let n=zn(e,t),r=/[\w$]*$/.exec(e.slice(Math.max(0,n-63),n+1))?.[0]??"",o=e[zn(e,n+1-r.length)];return o==="{"||o===","}function PP(e,t){let n=zn(e,t),r=e.slice(Math.max(0,n-7),n+1);return!/[\w$)\]]$/.test(r)||mP.test(r)}function IP(e){let t=Rl(e);if(t==="python")return"python";if(t==="osascript")return"opaque";return t==="node"||t==="bun"||t==="deno"?"javascript":"simple"}var TP={python:"#",javascript:"/"};function kP(e,t){if(t==="opaque")return{kind:"unmaskable"};let n={masked:e.split(""),literals:[]};return Xp(e,0,t,n,!1)===null?{kind:"unmaskable"}:{kind:"masked",masked:n.masked.join(""),literals:n.literals}}function Xp(e,t,n,r,o){let i=0;for(let s=t;s<e.length;s++){let a=e[s]??"";if(o&&a==="}"&&i===0)return s;if(o&&a===TP[n])return null;if(a==="{")i++;if(a==="}")i--;if(n==="simple"&&(a==="`"||a==="%"||a==="<")){if(GA.test(e.slice(s)))return null}let l=a==="'"||a==='"'||n==="javascript"&&a==="`"?a:null;if(l===null)continue;if(l==="`"&&NP(e,s))return null;let c=n==="python"?MP(e,s):"",u=n==="python"&&e.startsWith(l.repeat(3),s)?l.repeat(3):l,f=s+u.length,d=l==="`"||/[fF]/.test(c),m=s-c.length,p=d?OP(e,m,f,u,n,r):DP(e,f,u);if(p===null)return null;if(!d){let g=e.slice(f,p);if(n==="simple"&&l==='"'&&FA.test(g))return null;r.literals.push({start:f,text:g,tokenStart:m,tokenEnd:p+u.length}),r.masked.fill(" ",f,p)}r.masked.fill(" ",s,f),r.masked.fill(" ",p,p+u.length),s=p+u.length-1}return o?null:e.length}function OP(e,t,n,r,o,i){let s=o==="python"?"{":"${",a=r==="`"||r.length===3,l="";for(let c=n;c<e.length;c++){let u=e[c]??"";if(e.startsWith(r,c))return i.literals.push({start:n,text:l,tokenStart:t,tokenEnd:c+r.length}),c;if(!a&&(u===`
|
|
49
49
|
`||u==="\r"))return null;let f=o==="python"&&(u==="{"||u==="}")&&e[c+1]===u;if(!f&&e.startsWith(s,c)){let p=Xp(e,c+s.length,o,i,!0);if(p===null)return null;l+=`${s}}`,i.masked.fill(" ",c,c+s.length),i.masked[p]=" ",c=p;continue}let m=u==="\\"&&!(o==="python"&&e[c+1]==="{")||f?2:1;l+=e.slice(c,c+m),i.masked.fill(" ",c,c+m),c+=m-1}return null}function MP(e,t){return WA.exec(e.slice(Math.max(0,t-3),t))?.[1]??""}function DP(e,t,n){let r=n.length===3;for(let o=t;o<e.length;o++){let i=e[o];if(i==="\\"){o++;continue}if(!r&&(i===`
|
|
50
50
|
`||i==="\r"))return null;if(e.startsWith(n,o))return o}return null}function NP(e,t){for(let n=t-1;n>=0;n--){let r=e[n];if(!r||/\s/.test(r))continue;return/[\w$\])]/.test(r)}return!1}function LP(e){for(let t of e.matchAll(/[A-Za-z_$][A-Za-z0-9_$]*/g)){let n=t[0],r=t.index;if(vA.has(n.toLowerCase()))return!0;let o=Jp(n);if(!o.some((i)=>EA.has(i)))continue;if(o.length>1)return!0;if(e[zn(e,r)]===".")return!0;if(e[$n(e,r+n.length)]==="(")return!0}return!1}function Jp(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[_$\s]+/).map((t)=>t.toLowerCase())}function zn(e,t){for(let n=t-1;n>=0;n--)if(!/\s/.test(e[n]??""))return n;return-1}function $n(e,t){for(let n=t;n<e.length;n++)if(!/\s/.test(e[n]??""))return n;return e.length}function WP(e,t,n,r,o,i){return BP(e).flatMap((s)=>{let a=t.getShellSyntax(s);if(a.status==="invalid")return[];return[...Bn(a,t,{...n,displayOperandsAreCapturedOutput:!0},r,o,i),...GP(a,r)?FP(a,r).map((l)=>({target:l,cwd:o})):[]]})}function GP(e,t){let n=Bo(e);for(let r=0;r<n.length;r++){let o=n[r];if(o?.kind!=="word"||fe(at(o.text,t)).toLowerCase()!=="base64")continue;for(let i=r+1;i<n.length;i++){let s=n[i];if(s?.kind==="operator")break;if(s?.kind!=="word")continue;let a=at(s.text,t);if(a==="--decode"||!a.startsWith("--")&&a.startsWith("-")&&/[dD]/.test(a))return!0}}return!1}function FP(e,t){return Bo(e).flatMap((n)=>n.kind==="word"?[at(n.text,t)]:n.kind==="redirection"&&n.target?[at(n.target,t)]:[]).flatMap(xl)}function xl(e){let t=$P(e);if(t===null)return[];let n=Buffer.from(t,"base64").toString("utf8");if(n===""||zP(n))return[];return Buffer.from(n,"utf8").toString("base64").replace(/=+$/g,"")===t.replace(/=+$/g,"")?[n]:[]}function zP(e){return Array.from(e).some((t)=>{let n=t.charCodeAt(0);return n<32||n===127})}function $P(e){if(e.length<8||!/^[A-Za-z0-9+/_-]+={0,2}$/.test(e))return null;if(/=/.test(e.replace(/=+$/g,"")))return null;let t=e.replace(/=+$/g,"");if(t.length%4===1)return null;return`${t.replace(/-/g,"+").replace(/_/g,"/")}${"=".repeat((4-t.length%4)%4)}`}function BP(e){let t=[],n={inSingle:!1,inDouble:!1,escaped:!1};for(let r=0;r<e.length;r++){let o=e[r];if(!o)break;if(tr(o,n))continue;if(Qp(e,r,n)){let i=UP(e,r+1);if(i!==null)t.push(i.body),r=i.endIndex;continue}if(!n.inSingle&&o==="`"){let i=HP(e,r);if(i!==null)t.push(i.body),r=i.endIndex}}return t}function UP(e,t){let n={inSingle:!1,inDouble:!1,escaped:!1},r=1;for(let o=t+1;o<e.length;o++){let i=e[o];if(!i)break;if(tr(i,n))continue;if(Qp(e,o,n)){r++,o++;continue}if(!n.inSingle&&!n.inDouble&&i===")"){if(r--,r===0)return{body:e.slice(t+1,o),endIndex:o}}}return null}function HP(e,t){let n=!1;for(let r=t+1;r<e.length;r++){let o=e[r];if(!o)break;if(n){n=!1;continue}if(o==="\\"){n=!0;continue}if(o==="`")return{body:e.slice(t+1,r),endIndex:r}}return null}function Qp(e,t,n){return!n.inSingle&&e[t]==="$"&&e[t+1]==="("&&e[t+2]!=="("}function jP(e){let t=[],n=[],r=!1,o=!1,i=!1;for(let l=0;l<e.length;l++){let c=e[l];if(c===void 0)break;if(!i&&c==="--"){i=!0;continue}if(i){n.push(c);continue}let u=/^--([^=]+)(?:=(.*))?$/.exec(c);if(u!==null){let f=u[1]??"",d=u[2];if(f===OA)o=!0;if(DA.has(f))r=!0;if(d!==void 0){if(f===Pp)t.push(d);continue}if(LA.has(f)){let m=e[l+1];if(f===Pp&&m!==void 0)t.push(m);l++}continue}if(c.startsWith("-")&&c.length>1){let f=c.slice(1),d="",m="";for(let g=0;g<f.length;g++){let h=f[g]??"";if(MA.has(h))r=!0;if(NA.has(h)){d=h,m=f.slice(g+1);break}}if(d==="")continue;if(m.length>0){if(d===Ap)t.push(m);continue}let p=e[l+1];if(d===Ap&&p!==void 0)t.push(p);l++;continue}n.push(c)}let a=!r&&!o?n.slice(1):n;return[...t,...a]}function Je(e){let t=e.findIndex((n)=>!eg(n)&&!/^[A-Za-z_][A-Za-z0-9_]*=.*/.test(n));return t===-1?[]:e.slice(t)}function eg(e){return e==="env"||e==="command"||e==="builtin"||e==="sudo"}var VP=new Set(["id_rsa.pub","id_ed25519.pub","id_ecdsa.pub"]),KP=".env.",qP=new Set([".env.example",".env.sample",".env.template",".env.tpl",".env.defaults"]),YP=[".env.example.",".env.sample."];function ZP(e){let t;try{t=new URL(e.trim())}catch{return!1}return t.protocol!=="file:"&&t.host!==""}function XP(e){return e.length>0&&!/\s/.test(e)}function Ai(e,t,n,r){let o=tg(e,t,n,r);return o!==""&&n.paths.entryKind(o)!=="missing"}function tg(e,t,n,r){try{return zr(e,t,n,r)}catch(o){if(o instanceof W)throw o;return""}}var JP=/[?&][^?&=/]+=/,QP=new Set(["node_modules","__pycache__"]),eI=[["vendor","bundle"],["vendor","cache"]];function tI(e,t,n,r,o){if(ZP(e))return null;let i=Se(e,t,r,o);if(!i)return null;let s=B(i.split("/").pop()??""),a=B(i),l=()=>XP(s)||Ai(e,t,r,o),c=B(aI(e,t,r,o));for(let d of vs){let m=`~/${d.suffixParts.join("/")}`;if((Lp(a,m)||Lp(c,m))&&ft(d.id,n))return d.id}if(qP.has(s)||YP.some((d)=>s.startsWith(d)))return null;let u=nI(i,t,n,r,o);if(u)return u;if(VP.has(s))return null;for(let d of Ss)if(s===d.basename&&ft(d.id,n))return d.id;if(s.startsWith(KP)&&ft(so.id,n)&&l())return so.id;for(let d of Es)if(s.length>d.prefix.length&&s.startsWith(d.prefix)){let m=s.slice(d.prefix.length)[0];if((m==="-"||m==="_")&&ft(d.id,n)&&l())return d.id}for(let d of Rs)if(s.length>d.prefix.length&&s.startsWith(d.prefix)){if(s.slice(d.prefix.length)===d.suffix&&ft(d.id,n))return d.id}if(iI(a))return null;if(!s.includes(".")&&nr.pattern.test(s)&&ft(nr.id,n))return nr.id;if(JP.test(e)&&!Ai(e,t,r,o))return null;let f=sI(s,n);if(f)return f;return null}function nI(e,t,n,r,o){return ao.find((i)=>{if(!ft(i.id,n))return!1;switch(i.id){case"secret.cli.claude-code":return L(e,H(r.env.get("CLAUDE_CONFIG_DIR"),"~/.claude",t,r,o),[".credentials.json"]);case"secret.cli.claude-code.config":{let s=B(e).split("/");return L(e,H(r.env.get("CLAUDE_CONFIG_DIR"),"~/.claude",t,r,o),["settings.json","settings.local.json"])||Gr(e,"~/.claude.json",t,r,o)||s.at(-1)==="settings.local.json"&&s.at(-2)===".claude"||s.at(-1)===".mcp.json"}case"secret.cli.antigravity":return L(e,Se("~/.gemini/config",t,r,o),["hooks.json","mcp_config.json"]);case"secret.cli.codex":{let s=H(r.env.get("CODEX_HOME"),"~/.codex",t,r,o);return L(e,s,["auth.json",".credentials.json"])||Fn(e,s,["secrets",".sandbox-secrets"])}case"secret.cli.codex.config":{let s=H(r.env.get("CODEX_HOME"),"~/.codex",t,r,o),a=B(e).split("/").at(-1)??"";return L(e,s,["config.toml"])||a.endsWith(".config.toml")&&L(e,s,[a])}case"secret.cli.gemini":return L(e,ne(H(r.env.get("GEMINI_CLI_HOME"),"~",t,r,o),".gemini"),["oauth_creds.json","mcp-oauth-tokens.json","a2a-oauth-tokens.json","gemini-credentials.json"]);case"secret.cli.gemini.config":{let s=B(e).split("/"),a=r.env.get("GEMINI_CLI_SYSTEM_SETTINGS_PATH"),l=r.env.get("ProgramData")?[ne(H(r.env.get("ProgramData"),"",t,r,o),"gemini-cli")]:[];return L(e,ne(H(r.env.get("GEMINI_CLI_HOME"),"~",t,r,o),".gemini"),["settings.json","google_accounts.json"])||s.at(-1)==="settings.json"&&s.at(-2)===".gemini"||(a?.trim()?Gr(e,a,t,r,o):!1)||["/Library/Application Support/GeminiCli","/etc/gemini-cli",...l].some((c)=>L(e,Se(c,t,r,o),["settings.json"]))}case"secret.cli.copilot-cli":{let s=H(r.env.get("COPILOT_HOME"),"~/.copilot",t,r,o);return L(e,s,["config.json"])||Fn(e,s,["mcp-oauth-config","mcp-secrets"])}case"secret.cli.copilot-cli.config":return L(e,H(r.env.get("COPILOT_HOME"),"~/.copilot",t,r,o),["mcp-config.json"]);case"secret.cli.kimi-code":{let s=H(r.env.get("KIMI_CODE_HOME"),"~/.kimi-code",t,r,o),a=H(r.env.get("KIMI_SHARE_DIR"),"~/.kimi",t,r,o);return L(e,s,["server.token"])||Fn(e,s,["credentials"])||Fn(e,a,["credentials","mcp-oauth"])}case"secret.cli.kimi-code.config":{let s=["config.toml","mcp.json"],a=B(e).split("/");return a.at(-1)==="mcp.json"&&a.at(-2)===".kimi-code"||L(e,H(r.env.get("KIMI_CODE_HOME"),"~/.kimi-code",t,r,o),s)||L(e,H(r.env.get("KIMI_SHARE_DIR"),"~/.kimi",t,r,o),[...s,"config.json","config.json.bak"])}case"secret.cli.opencode":{let s=ne(H(r.env.get("XDG_DATA_HOME"),"~/.local/share",t,r,o),"opencode"),a=B(e).split("/").at(-1)??"",l=r.env.get("OPENCODE_DB")?.trim(),c=l&&l!==":memory:"?[l,`${l}-wal`,`${l}-shm`]:[];return L(e,s,["auth.json","mcp-auth.json"])||/^opencode(-.+)?\.db(-wal|-shm)?$/.test(a)&&L(e,s,[a])||c.some((u)=>Gr(e,u,t,r,o))}case"secret.cli.opencode.config":{let s=ne(H(r.env.get("XDG_CONFIG_HOME"),"~/.config",t,r,o),"opencode"),a=r.env.get("ProgramData")?[ne(H(r.env.get("ProgramData"),"",t,r,o),"opencode")]:[],l=["opencode.json","opencode.jsonc"],c=r.env.get("OPENCODE_CONFIG");return l.includes(B(e).split("/").at(-1)??"")||L(e,s,["config.json"])||(c?.trim()?Gr(e,c,t,r,o):!1)||["/Library/Application Support/opencode","/etc/opencode",...a].some((u)=>L(e,Se(u,t,r,o),l))}case"secret.cli.pi":return L(e,H(r.env.get("PI_CODING_AGENT_DIR"),"~/.pi/agent",t,r,o),["auth.json"]);case"secret.cli.pi.config":return L(e,H(r.env.get("PI_CODING_AGENT_DIR"),"~/.pi/agent",t,r,o),["models.json"]);case"secret.cli.amp":{let s=Se("~",t,r,o);return[ne(H(r.env.get("XDG_DATA_HOME"),"~/.local/share",t,r,o),"amp"),ne(s,".local","share","amp")].some((l)=>L(e,l,["secrets.json"]))||Fn(e,ne(s,".amp"),["oauth"])}case"secret.cli.amp.config":{let s=["settings.json","settings.jsonc"],a=[ne(H(r.env.get("XDG_CONFIG_HOME"),"~/.config",t,r,o),"amp"),ne(Se("~",t,r,o),".config","amp")],l=B(e).split("/"),c=r.env.get("AMP_SETTINGS_FILE");return a.some((u)=>L(e,u,s))||l.at(-2)===".amp"&&s.includes(l.at(-1)??"")||(c?.trim()?Gr(e,c,t,r,o):!1)}case"secret.cli.cursor":{let s=ne(H(r.env.get("XDG_CONFIG_HOME"),"~/.config",t,r,o),"cursor"),a=ne(H(r.env.get("CURSOR_DATA_DIR"),"~/.cursor",t,r,o),"projects");return L(e,Se("~/.cursor",t,r,o),["auth.json"])||L(e,s,["auth.json"])||B(e).split("/").at(-1)==="mcp-auth.json"&&rn(B(e),B(a))}case"secret.cli.cursor.config":{let s=B(e).split("/");return s.at(-1)==="mcp.json"&&s.at(-2)===".cursor"}case"secret.cli.grok-build":return L(e,H(r.env.get("GROK_HOME"),"~/.grok",t,r,o),["auth.json","mcp_credentials.json"]);case"secret.cli.grok-build.config":{let s=B(e).split("/");return s.at(-1)==="config.toml"&&s.at(-2)===".grok"||L(e,H(r.env.get("GROK_HOME"),"~/.grok",t,r,o),["config.toml","managed_config.toml","requirements.toml"])||L(e,Se("/etc/grok",t,r,o),["managed_config.toml","requirements.toml"])}case"secret.cli.droid":return L(e,Se("~/.factory",t,r,o),["auth.encrypted","auth.v2.file","auth.v2.key","auth.v2.loginkeychain"]);case"secret.cli.droid.config":{let s=B(e).split("/");return s.at(-1)==="mcp.json"&&s.at(-2)===".factory"||L(e,Se("~/.factory",t,r,o),["settings.json","hooks.json"])}case"secret.cli.devin":return[H(r.env.get("XDG_DATA_HOME"),"~/.local/share",t,r,o),Se("~/.local/share",t,r,o)].some((s)=>L(e,ne(s,"devin"),["credentials.toml"])||Fn(e,ne(s,"devin","mcp"),["oauth"]));case"secret.cli.devin.config":return[H(r.env.get("XDG_CONFIG_HOME"),"~/.config",t,r,o),Se("~/.config",t,r,o)].some((s)=>L(e,ne(s,"devin"),["config.json"]));default:return!1}})?.id??null}var Np=new WeakMap;function H(e,t,n,r,o){let i=Np.get(o)??new Map;Np.set(o,i);let s=`${n}\x00${e??""}\x00${t}`,a=i.get(s);if(a!==void 0)return a;let l=Se(e?.trim()?e:t,n,r,o);return i.set(s,l),l}function L(e,t,n){return n.some((r)=>ng(e,ne(t,r)))}function Fn(e,t,n){return n.some((r)=>rn(B(e),B(ne(t,r))))}function Gr(e,t,n,r,o){return ng(e,Se(t,n,r,o))}function ng(e,t){return B(e)===B(t)}function ne(e,...t){return Ve([e,...t].filter(Boolean).join("/"))}function rI(e,t,n,r,o,i){if(n.length===0)return!1;let s=B(zr(e,t,o,i));return n.some((a)=>rn(s,B(zr(a,r,o,i))))}function oI(e,t,n,r,o,i){if(n.length===0)return!1;let s=B(zr(e,t,o,i));if(!s)return!1;let a=o.env.get("HOME")??o.home,l=a?Ve(N(ce(a),o.paths,i)):"",c=B(l),u=o.env.get("CC_SAFETY_NET_HOME"),f=B(u?Ve(N(Pi(ce(u)),o.paths,i)):l&&Ve(N(`${l}/.cc-safety-net`,o.paths,i)));if(f&&rn(s,f))return!1;return n.some((d)=>{let m=Ps(d);if(m&&Wp.basename(s)!==B(m.name))return!1;let p=B(zr(m?.root??d,r,o,i));if(!p)return!1;if(c&&(c===p||c.startsWith(p.endsWith("/")?p:`${p}/`)))return!1;return rn(s,p)&&!(m&&s===p)})}function iI(e){let t=e.split("/");return t.some((n)=>QP.has(n))||eI.some(([n,r])=>t.some((o,i)=>o===n&&t[i+1]===r))}function sI(e,t){let n=e.lastIndexOf("."),r=n>0&&n<e.length-1?e.slice(n+1):"";if(r==="")return null;for(let o of ws)if(r===o.extension&&ft(o.id,t))return o.id;for(let o of xs)if(o.pattern.test(r)&&ft(o.id,t))return o.id;return null}function B(e){return e.toLowerCase()}function ft(e,t){return!t?.disabledRules?.includes(e)}function Se(e,t,n,r){let{home:o,normalized:i}=_l(e,n,r);if(!i)return"";if(!o)return i;let s=Al(i,o),a=xi(s)?s:Ve(Pi(t,s)),l=Ve(N(a,n.paths,r));if(!rn(l,o)){if(xi(s))return l;return l===a?i:l}let c=l.slice(o.length);return c?`~${c}`:"~"}function Lp(e,t){return e===t||e.startsWith(`${t}/`)}function aI(e,t,n,r){let{home:o,normalized:i}=_l(e,n,r);if(!i||!o)return"";let s=Al(i,o),a=Wp.normalize(xi(s)?s:Ve(Pi(t,s))),l=Ve(ce(n.env.get("HOME")??n.home)),c=(d)=>process.platform==="win32"?d.toLowerCase():d,u=[o,l].find((d)=>d!==""&&rn(c(a),c(d)));if(u===void 0)return"";let f=a.slice(u.length);return f?`~${f}`:"~"}function zr(e,t,n,r){let{home:o,normalized:i}=_l(e,n,r);if(!i)return"";let s=o?Al(i,o):i;return Ve(N(xi(s)?s:Pi(t,s),n.paths,r))}function _l(e,t,n){let r=t.env.get("HOME")??t.home,o=r?Ve(N(ce(r),t.paths,n)):"",i=Ve(ce(lI(at(e,t))));return{home:o,normalized:i}}function lI(e){if(!e.trim().toLowerCase().startsWith("file:"))return e;try{return pA(e)}catch{return e}}function Al(e,t){if(e==="~")return t;if(e.startsWith("~/"))return ne(t,e.slice(2));return e}function cI(e){if(process.platform==="win32")return!0;return fA.parse(e).root.length>1}function Ve(e){let t=e.trim(),n=(t.includes("\\")&&cI(t)?t.replace(/\\/g,"/"):t).replace(/\/{2,}/g,"/").replace(/^\.\//,"");if(n==="/")return n;return n.replace(/\/+$/g,"")}function rn(e,t){return e===t||e.startsWith(t.endsWith("/")?t:`${t}/`)}function fe(e){return e.split(/[\\/]/).pop()?.replace(/\.exe$/i,"")??e}class on extends Error{stage;evaluation;name="GuardEvaluationError";constructor(e,t,n){super(`CC Safety Net ${e} dependency failed`,{cause:n});this.stage=e;this.evaluation=t}}var uI={findPolicyMutation:wp,findGitMetadataMutation:Vd,resolveGitMetadata:mI,loadPolicySnapshot:Pu,findSensitiveTarget:Bp,analyzeCommand:gp,getModes:Zi},dI=/^(?:\S*\/)?(?:ba|da|z|k)?sh(?:\s+-[A-Za-z-]*)*$/;function rg(e,t){let n={...uI,...t.dependencies},r=gI(e),o=$r(e)?e.command:r,i=It("policy-protection",o,()=>Bd(e)),s=ye(i,"input-candidate"),a=ye(i,"declared-command");if($r(e)&&e.command?.trim()&&a?.program.status==="limited")return{stage:"command-analysis",decision:{kind:"deny",reason:Ke,ruleId:"analysis.recursion-limit",intent:"stop_and_explain",evidence:{command:e.command,segment:e.command}}};if(s?.program.status==="limited")return{stage:"command-validation",decision:{kind:"deny",reason:mm,ruleId:"analysis.structural-limit",intent:"stop_and_explain"}};let l=ke(),c=It("policy-protection",o,()=>n.resolveGitMetadata([e.context.executionCwd,e.context.configCwd],t.environment)),u=It("policy-protection",o,()=>n.findPolicyMutation(i,t.environment,l));if(u){let C=o??u.target;return{stage:"policy-protection",decision:{kind:"deny",reason:Rp,ruleId:"guard.policy-config",intent:"hard_stop",evidence:{command:C,segment:u.target}}}}let f=It("policy-protection",o,()=>bp(i,t.environment,l));if(f){let C=o??f.target;return{stage:"policy-protection",decision:{kind:"deny",reason:Cp,ruleId:"guard.policy-apply",intent:"hard_stop",evidence:{command:C,segment:f.target}}}}let d=It("policy-protection",o,()=>n.findGitMetadataMutation(i,c,t.environment,l));if(d){let C=o??d.target;return{stage:"policy-protection",decision:{kind:"deny",reason:Ae,ruleId:"guard.git-metadata",intent:"hard_stop",evidence:{command:C,segment:d.target}}}}let m=It("config-load",o,()=>n.loadPolicySnapshot(t.environment,{...t.policyOptions,cwd:e.context.configCwd})),p=m.policy,g=n.getModes(p,t.environment.env),h={level:g.effectiveLevel,...fI(m)},y=p.secretProtection.enabled===!1?null:It("secret-protection",o,()=>n.findSensitiveTarget(i,p.secretProtection,t.environment,l,{strict:$r(e)||s?.program.dialect==="powershell"?g.strict:void 0}));if(y){let C=o??y.target;return{stage:"secret-protection",...h,decision:{kind:"deny",reason:Gp,intent:"hard_stop",ruleId:y.ruleId,evidence:{command:C,segment:y.target}}}}if(!$r(e))return{stage:"non-command",...h,decision:{kind:"allow"}};if(!e.command||e.command.trim()==="")return{...Pl("command-validation",o),...h};let b=It("command-analysis",o,()=>hp(()=>n.analyzeCommand(e.command,{cwd:e.context.executionCwd,shell:e.route.shell,policySnapshot:m,environment:t.environment,protectedGitMetadata:c,effectiveCapabilities:g.capabilities,strict:g.strict,paranoidRm:g.paranoidRm,paranoidInterpreters:g.paranoidInterpreters,worktreeMode:g.worktreeMode,budget:l,...t.trace?{trace:t.trace}:{}},pI(i),i.store),e.command,t.trace));if(b.decision){let C=!g.strict&&(b.decision.ruleId==="raw-text.dangerous-command"||b.decision.reason===_r&&!dI.test(b.decision.evidence?.segment??"")&&Me(e.command)===null);return{stage:"command-analysis",...h,..."errorCode"in b?{errorCode:b.errorCode}:{},decision:C?{...b.decision,unverifiedByStandardMode:!0}:b.decision}}return{stage:"command-analysis",...h,decision:{kind:"allow"}}}function mI(e,t){let n=[...new Set(e.filter((r)=>typeof r==="string"&&r!==""))].flatMap((r)=>t.gitMetadata(r)??[]);if(n.length===0)return null;return Object.freeze({entries:Object.freeze([...new Set(n.flatMap((r)=>r.entries))]),markerFiles:Object.freeze([...new Set(n.flatMap((r)=>r.markerFiles))]),directories:Object.freeze([...new Set(n.flatMap((r)=>r.directories))]),hooksDirectories:Object.freeze([...new Set(n.flatMap((r)=>r.hooksDirectories))])})}function fI(e){if(e.state==="ready")return{};return{configFallback:{reason:e.reason}}}function pI(e){return ye(e,"declared-command")?.program}function gI(e){try{return Yn(e.input)}catch(t){let n=$r(e)?e.command:void 0;throw new on("policy-protection",Pl("policy-protection",t instanceof nt?void 0:n,t),t)}}function It(e,t,n){try{return n()}catch(r){throw new on(e,Pl(e,r instanceof nt?void 0:t,r),r)}}function Pl(e,t,n){let r=n instanceof W||n instanceof Ue;return{stage:e,decision:{kind:"deny",reason:r?Oi:jn,ruleId:r?"analysis.limit":"analysis.failed-closed",intent:"stop_and_explain",...t?{evidence:{command:t,segment:t}}:{}}}}function $r(e){return e.route.kind==="command"}import{appendFileSync as PI,mkdirSync as II}from"node:fs";import{isAbsolute as TI,join as kl}from"node:path";import{lstatSync as ig,readdirSync as hI,readFileSync as yI,rmdirSync as CI,statSync as sg,unlinkSync as bI,utimesSync as SI,writeFileSync as vI}from"node:fs";import{join as Br}from"node:path";function og(e,t={}){return ho(Gt(e,t),e.home).policy.audit.retention_days}var Tl=86400000,EI=".last-prune",RI=/^\d{4}-\d{2}$/,wI=/^((\d{4}-\d{2})-\d{2})-.+\.jsonl$/,ag=(e)=>Math.floor(e/Tl);function cg(e,t,n=()=>new Date){try{let r=n().getTime();if(!sg(t,{throwIfNoEntry:!1})?.isDirectory())return;let o=Br(t,EI),i=sg(o,{throwIfNoEntry:!1})?.mtimeMs;if(i!==void 0&&ag(i)===ag(r))return;let s=r-og(e)*Tl,a=new Date(r).toISOString().slice(0,7);for(let l of Il(t)){if(l.isDirectory()){xI(Br(t,l.name),s,a);continue}if(l.isFile()&&l.name.endsWith(".jsonl"))_I(Br(t,l.name),s)}vI(o,"",{mode:384}),SI(o,r/1000,r/1000)}catch{}}function xI(e,t,n){for(let r of Il(e)){if(!r.isDirectory()||!RI.test(r.name))continue;let o=Br(e,r.name);for(let i of Il(o)){if(!i.isFile())continue;let s=wI.exec(i.name);if(!s||s[2]!==r.name)continue;let a=Date.parse(`${s[1]}T00:00:00.000Z`)+Tl;if(!Number.isFinite(a)||a>=t)continue;ug(Br(o,i.name))}if(r.name!==n)lg(o)}lg(e)}function _I(e,t){try{let n=ig(e);if(n.mtimeMs>=t)return;let r=yI(e,"utf-8").split(`
|
|
51
|
-
`).filter((o)=>o.trim()).map(AI);if(r.length===0)return;if(r.some((o)=>o===void 0||o>=t))return;if(ig(e).mtimeMs!==n.mtimeMs)return;ug(e)}catch{}}function AI(e){try{let t=JSON.parse(e).ts,n=typeof t==="string"?Date.parse(t):Number.NaN;return Number.isFinite(n)?n:void 0}catch{return}}function Il(e){try{return hI(e,{withFileTypes:!0,encoding:"utf8"})}catch{return[]}}function ug(e){try{bI(e)}catch{}}function lg(e){try{CI(e)}catch{}}var kI="2.6.
|
|
51
|
+
`).filter((o)=>o.trim()).map(AI);if(r.length===0)return;if(r.some((o)=>o===void 0||o>=t))return;if(ig(e).mtimeMs!==n.mtimeMs)return;ug(e)}catch{}}function AI(e){try{let t=JSON.parse(e).ts,n=typeof t==="string"?Date.parse(t):Number.NaN;return Number.isFinite(n)?n:void 0}catch{return}}function Il(e){try{return hI(e,{withFileTypes:!0,encoding:"utf8"})}catch{return[]}}function ug(e){try{bI(e)}catch{}}function lg(e){try{CI(e)}catch{}}var kI="2.6.2",OI=1e4,MI=2000,DI=256,NI=32768;function LI(e){let t=e.trim();if(!t)return null;let n=t.replace(/[^A-Za-z0-9_.-]+/g,"_");if(n=n.replace(/^[._-]+|[._-]+$/g,"").slice(0,128),!n||n==="."||n==="..")return null;return n}function WI(e){return(e??"").replace(/[^A-Za-z0-9]/g,"-").slice(0,180)||"no-cwd"}function Ol(e,t,n,r,o,i,s={}){let a=LI(t);if(!a)return;let l=FI(e);if(!l)return;try{let c=(s.now??(()=>new Date))().toISOString(),u=Ii(pt(n),s.failureStage?Number.POSITIVE_INFINITY:OI),f=Ii(pt(r),MI),d=s.toolName?Ii(pt(s.toolName),DI):void 0,m=i===null?void 0:Ii(pt(i),NI),p=kl(l,WI(m?.value??null),c.slice(0,7));II(p,{recursive:!0,mode:448});let g=kl(p,`${c.slice(0,10)}-${a}.jsonl`),h={ts:c,id:(s.createId??Xi)(),v:kI,sessionId:a,decision:s.decision??"deny",agent:s.agent,shape:s.shape,level:s.level,configFallback:s.configFallback,toolName:d?.value,command:u.value,segment:f.value,...u.truncated||f.truncated||d?.truncated||m?.truncated?{truncated:!0}:{},reason:o,ruleId:s.ruleId,intent:s.intent,failureStage:s.failureStage,errorCode:s.errorCode,cwd:m?.value??null};PI(g,`${JSON.stringify(h)}
|
|
52
52
|
`,{encoding:"utf-8",mode:384}),cg(e,l,s.now)}catch{}}function Ii(e,t){return{value:e.slice(0,t),truncated:e.length>t}}function GI(e){let t=e.env.get("CC_SAFETY_NET_AUDIT_HOME");if(e.env.get("NODE_ENV")==="test"&&!t)return null;let n=t||e.home;return n&&TI(n)?n:null}function FI(e){let t=GI(e);return t?kl(t,".cc-safety-net","logs"):null}function mg(e,t,n,r=!0,o){if(t.decision.kind==="allow"){if(!n||e.route.kind!=="command")return;let a=dg(e);return{decision:"allow",command:a,segment:a,reason:"allowed",cwd:e.context.executionCwd,toolName:e.toolName,level:t.level,...t.configFallback?{configFallback:!0}:{}}}let i=t.decision.evidence,s=i?.command??(r?dg(e):"");return{decision:"deny",command:s,segment:i?.segment??s,reason:t.decision.reason,cwd:e.context.executionCwd,toolName:e.toolName,level:t.level,...t.configFallback?{configFallback:!0}:{},ruleId:t.decision.ruleId,intent:t.decision.intent,failureStage:o?.stage,errorCode:o?.errorCode}}function dg(e){return"command"in e?e.command??"":""}function fg(e,t,n,r){if(!t)return;let o;try{o=n()}catch{return}if(typeof o!=="string"||!o.trim())return;Ol(e,o,t.command,t.segment,t.reason,t.cwd,{decision:t.decision,agent:r.agent,shape:r.shape,level:t.level,configFallback:t.configFallback,toolName:t.toolName,ruleId:t.ruleId,intent:t.intent,failureStage:t.failureStage,errorCode:t.errorCode})}function pg(e,t,n,r){let o;try{o=n()}catch{return}if(typeof o!=="string"||!o.trim())return;Ol(e,o,t.command??"",t.segment??t.command??"",t.reason,r.cwd??null,{decision:"deny",agent:r.agent,shape:r.shape,toolName:r.toolName??t.toolName,ruleId:t.ruleId,intent:t.intent})}function hg(e,t,n){try{let r=rg(t,{environment:e,...n.guard});return gg(e,t,r,n),r}catch(r){if(!(r instanceof on))throw r;throw gg(e,t,r.evaluation,n,!(r.cause instanceof nt),{stage:r.stage,errorCode:zI(r.cause)}),r}}function gg(e,t,n,r,o=!0,i){fg(e,mg(t,n,r.guard?.auditAllowed??!1,o,i),r.audit.getSessionId,{agent:r.audit.agent,shape:r.audit.shape})}function zI(e){if(e instanceof W)return j[e.kind].errorCode;if(e instanceof nt)return"tool-input-limit";if(e instanceof Ue)return"structural-shell-syntax-limit";return"unexpected-error"}function Tt(e,t={}){return{malformed:!0,denial:Vn(t),cwd:e}}function Ml(e,t){return{malformed:!0,denial:Mi(e,t),cwd:e.cwd}}function yg(e,t={}){return(n,r)=>{try{return $I(n,r,e,t)}catch(o){return console.error("CC Safety Net error:",o),e.block(Vn())}}}function $I(e,t,n,r){let o=gc();if(n.cancelled?.(t))return n.block(Vn());let i=n.extract(e,t,o.paths);if(!i)return n.allow;let s=()=>n.getSessionId(e,t);if("malformed"in i)return pg(o,i.denial,s,{agent:n.agent,toolName:i.denial.toolName,cwd:i.cwd}),n.block(i.denial);let a=(l,c)=>{let u=Wl(l,{includeEvidence:c});return u?n.block(u):n.allow};try{let l=hg(o,i,{guard:{auditAllowed:bc(o.env),policyOptions:r.policyOptions,dependencies:r.guardDependencies},audit:{agent:n.agent,getSessionId:s}});return a(l,!0)}catch(l){if(!(l instanceof on))throw l;if(rt(Z.debug,o.env))console.error(`CC Safety Net debug: ${n.debugLabel} analysis failed: ${Fl(l.cause)}`);return a(l.evaluation,n.includeEvidenceOnError(i))}}var Cg="exec",BI=new Set(["auto","gateway"]);function bg(e){e.on("before_tool_call",UI(e),{matcher:[Cg],priority:50})}function UI(e,t={}){return yg({agent:"openclaw",debugLabel:"openclaw before_tool_call",extract:(r,o,i)=>HI(r,o,e,i),getSessionId:(r,o)=>o.sessionId??o.sessionKey,allow:void 0,block:(r)=>VI(r),includeEvidenceOnError:()=>!0,cancelled:(r)=>r.abortSignal?.aborted===!0},t)}function HI(e,t,n,r){if(!e||typeof e!=="object")return Tt(null);let o=e.toolName;if(typeof o!=="string"||o.trim()==="")return Tt(null);if(o!==Cg)return;if(e.toolKind!==void 0)return;let i=e.params;if(!i||typeof i!=="object"||Array.isArray(i))return Tt(null,{toolName:o});let s=i,a=s.command;if(typeof a!=="string"||a.trim()==="")return Tt(null,{toolName:o});if(s.host!==void 0&&!BI.has(s.host))return Tt(null,{command:a,toolName:o});let l=jI(n,t.agentId);if(!l)return Tt(null,{command:a,toolName:o});let c=Ui(".",[l],r);if(!c)return Ml({directory:"session",problem:"unusable",cwd:l},{command:a,toolName:o});let u=s.workdir;if(u!==void 0&&(typeof u!=="string"||u.trim()===""))return Tt(c,{command:a,toolName:o});let f=typeof u==="string"?u:".",d=Ui(f,[c],r);if(!d)return Ml({directory:"requested",problem:ac(f,c,r),cwd:f},{command:a,toolName:o});return lc(o,s,{kind:"command",shell:"auto"},{configCwd:c,executionCwd:d},a)}function jI(e,t){if(typeof t!=="string"||t.trim()==="")return;try{let n=e.runtime.agent.resolveAgentWorkspaceDir(e.config,t);return typeof n==="string"&&n.trim()!==""?n:void 0}catch{return}}function VI(e){return{block:!0,blockReason:Gl(e)}}var w0={...Ll,register:bg};export{w0 as default};
|
package/dist/pi/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Y,P,it,u}from"../chunks/index-mqmy0cce.js";import{re}from"../chunks/index-5ht7pdm3.js";import{j,de,Se}from"../chunks/index-
|
|
1
|
+
import{Y,P,it,u}from"../chunks/index-mqmy0cce.js";import{re}from"../chunks/index-5ht7pdm3.js";import{j,de,Se}from"../chunks/index-7r6br8vt.js";import"../chunks/index-tef36kbd.js";var m="cc-safety-net",C="Operate CC Safety Net: explain blocks, rules, integrations, diagnostics",p="Help me with CC Safety Net.";function s(o){o.registerCommand(m,{description:C,handler:async(n,t)=>{o.sendUserMessage(c(n),t.isIdle()?void 0:{deliverAs:"followUp"})}})}function c(o){return`${re.slice(re.indexOf("# CC Safety Net")).trimEnd()}
|
|
2
2
|
|
|
3
3
|
## User request
|
|
4
4
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cc-safety-net",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.2",
|
|
4
4
|
"description": "A coding agent CLI hook - block destructive commands and secret file access",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"amp",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"scripts": {
|
|
61
61
|
"audit:dependencies": "bun audit --ignore=GHSA-ch52-4w7c-c8xp",
|
|
62
62
|
"build": "bun run clean && bun scripts/project-bun.ts scripts/build.ts",
|
|
63
|
+
"build:plugin": "bun scripts/project-bun.ts scripts/build-plugin-tree.ts",
|
|
63
64
|
"build:types": "tsc --project tsconfig.build.json --emitDeclarationOnly --declaration",
|
|
64
65
|
"verify:package": "bun run scripts/verify-package.ts",
|
|
65
66
|
"verify:repository-plugin": "bun run scripts/verify-repository-plugin.ts",
|
|
@@ -134,5 +135,5 @@
|
|
|
134
135
|
"./dist/pi/index.js"
|
|
135
136
|
]
|
|
136
137
|
},
|
|
137
|
-
"gitHead": "
|
|
138
|
+
"gitHead": "5ec6058f1fe26bd48a924d470710a73dc8d261e8"
|
|
138
139
|
}
|