@venos-inc/venos 0.1.3 → 0.1.5
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/index.js +82 -55
- package/etc/mcp-server/client.js +25 -2
- package/etc/mcp-server/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml +2 -2
- package/etc/mcp-server/node_modules/@eslint-community/eslint-utils/node_modules/.bin/eslint +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/eslint-plugin/node_modules/.bin/eslint +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/eslint-plugin/node_modules/.bin/tsc +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/eslint-plugin/node_modules/.bin/tsserver +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/parser/node_modules/.bin/eslint +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/parser/node_modules/.bin/tsc +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/parser/node_modules/.bin/tsserver +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/project-service/node_modules/.bin/tsc +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/project-service/node_modules/.bin/tsserver +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/tsconfig-utils/node_modules/.bin/tsc +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/tsconfig-utils/node_modules/.bin/tsserver +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/type-utils/node_modules/.bin/eslint +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/type-utils/node_modules/.bin/tsc +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/type-utils/node_modules/.bin/tsserver +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/typescript-estree/node_modules/.bin/semver +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/typescript-estree/node_modules/.bin/tsc +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/typescript-estree/node_modules/.bin/tsserver +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/utils/node_modules/.bin/eslint +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/utils/node_modules/.bin/tsc +2 -2
- package/etc/mcp-server/node_modules/@typescript-eslint/utils/node_modules/.bin/tsserver +2 -2
- package/etc/mcp-server/node_modules/@vitest/mocker/node_modules/.bin/vite +4 -4
- package/etc/mcp-server/node_modules/acorn-jsx/node_modules/.bin/acorn +2 -2
- package/etc/mcp-server/node_modules/cross-spawn/node_modules/.bin/node-which +2 -2
- package/etc/mcp-server/node_modules/espree/node_modules/.bin/acorn +2 -2
- package/etc/mcp-server/node_modules/node-addon-api/LICENSE.md +6 -2
- package/etc/mcp-server/node_modules/node-addon-api/README.md +10 -12
- package/etc/mcp-server/node_modules/node-addon-api/common.gypi +2 -1
- package/etc/mcp-server/node_modules/node-addon-api/index.js +1 -2
- package/etc/mcp-server/node_modules/node-addon-api/napi-inl.h +72 -91
- package/etc/mcp-server/node_modules/node-addon-api/napi.h +5 -15
- package/etc/mcp-server/node_modules/node-addon-api/package.json +2 -18
- package/etc/mcp-server/node_modules/postcss/node_modules/.bin/nanoid +2 -2
- package/etc/mcp-server/node_modules/sharp/node_modules/.bin/semver +2 -2
- package/etc/mcp-server/node_modules/source-map/LICENSE +28 -0
- package/etc/mcp-server/node_modules/source-map/README.md +837 -0
- package/etc/mcp-server/node_modules/source-map/lib/array-set.js +100 -0
- package/etc/mcp-server/node_modules/source-map/lib/base64-vlq.js +94 -0
- package/etc/mcp-server/node_modules/source-map/lib/base64.js +19 -0
- package/etc/mcp-server/node_modules/source-map/lib/binary-search.js +113 -0
- package/etc/mcp-server/node_modules/source-map/lib/mapping-list.js +83 -0
- package/etc/mcp-server/node_modules/source-map/lib/mappings.wasm +0 -0
- package/etc/mcp-server/node_modules/source-map/lib/read-wasm-browser.js +23 -0
- package/etc/mcp-server/node_modules/source-map/lib/read-wasm.js +27 -0
- package/etc/mcp-server/node_modules/source-map/lib/source-map-consumer.js +1081 -0
- package/etc/mcp-server/node_modules/source-map/lib/source-map-generator.js +439 -0
- package/etc/mcp-server/node_modules/source-map/lib/source-node.js +430 -0
- package/etc/mcp-server/node_modules/source-map/lib/url.js +13 -0
- package/etc/mcp-server/node_modules/source-map/lib/util.js +444 -0
- package/etc/mcp-server/node_modules/source-map/lib/wasm.js +138 -0
- package/etc/mcp-server/node_modules/source-map/package.json +79 -0
- package/etc/mcp-server/node_modules/source-map/source-map.d.ts +423 -0
- package/etc/mcp-server/node_modules/source-map/source-map.js +10 -0
- package/etc/mcp-server/node_modules/ts-api-utils/node_modules/.bin/tsc +2 -2
- package/etc/mcp-server/node_modules/ts-api-utils/node_modules/.bin/tsserver +2 -2
- package/etc/mcp-server/node_modules/typescript-eslint/node_modules/.bin/eslint +2 -2
- package/etc/mcp-server/node_modules/typescript-eslint/node_modules/.bin/tsc +2 -2
- package/etc/mcp-server/node_modules/typescript-eslint/node_modules/.bin/tsserver +2 -2
- package/etc/mcp-server/node_modules/vite/node_modules/.bin/esbuild +2 -2
- package/etc/mcp-server/node_modules/vite/node_modules/.bin/rollup +2 -2
- package/etc/mcp-server/node_modules/vite-node/node_modules/.bin/vite +2 -2
- package/etc/mcp-server/node_modules/vitest/node_modules/.bin/vite +2 -2
- package/etc/mcp-server/node_modules/vitest/node_modules/.bin/vite-node +2 -2
- package/etc/mcp-server/node_modules/vitest/node_modules/.bin/why-is-node-running +2 -2
- package/etc/mcp-server/skill-spector.js +104 -0
- package/etc/mcp-server/tools.js +157 -2
- package/package.json +1 -1
- package/etc/mcp-server/node_modules/node-addon-api/node_addon_api.gyp +0 -32
package/dist/index.js
CHANGED
|
@@ -1,71 +1,90 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{existsSync as
|
|
3
|
-
`}var
|
|
4
|
-
`,
|
|
5
|
-
`))}return o}var
|
|
2
|
+
import{readFileSync as es}from"node:fs";import{homedir as Xn}from"node:os";import{existsSync as xn,mkdirSync as ir,readFileSync as ar,rmSync as cr,writeFileSync as lr}from"node:fs";import{dirname as ur,join as dr}from"node:path";import{randomBytes as pr}from"node:crypto";import{existsSync as at,readFileSync as ct}from"node:fs";import{join as lt}from"node:path";import{copyFileSync as tt,existsSync as Ce,mkdirSync as rt,renameSync as ot,writeFileSync as st}from"node:fs";import{dirname as it}from"node:path";var xe=".venos-backup";function m(e,n){rt(it(e),{recursive:!0}),Ce(e)&&!Ce(e+xe)&&tt(e,e+xe);let t=e+".tmp";st(t,n,{mode:420}),ot(t,e)}function g(e){return JSON.stringify(e,null,2)+`
|
|
3
|
+
`}var T="http://127.0.0.1:4000/v1";var be="venos",ut="venos usage-sync --throttle";function $(e){return(e??[]).some(n=>n.hooks.some(t=>typeof t.command=="string"&&t.command.includes(be)))}function Z(e,n){let t=e??[];return $(t)?t:[...t,{matcher:"*",hooks:[{type:"command",command:n}]}]}function X(e){return(e??[]).map(n=>({...n,hooks:n.hooks.filter(t=>typeof t.command!="string"||!t.command.includes(be))})).filter(n=>n.hooks.length>0)}var q={name:"claude-code",transport:"claude-hook",configPath(e){return lt(e,".claude","settings.json")},isInstalled(e){return!0},load(e){if(!at(e))return{};try{return JSON.parse(ct(e,"utf8"))}catch{return{}}},isWired(e){return $(e.hooks?.PreToolUse)&&$(e.hooks?.PostToolUse)&&$(e.hooks?.Stop)},inject(e,n){let t=e.hooks??{};return{...e,hooks:{...t,PreToolUse:Z(t.PreToolUse,n.hookCommand),PostToolUse:Z(t.PostToolUse,n.hookCommand),Stop:Z(t.Stop,n.usageSyncCommand??ut)}}},remove(e){return e.hooks?{...e,hooks:{...e.hooks,PreToolUse:X(e.hooks.PreToolUse),PostToolUse:X(e.hooks.PostToolUse),Stop:X(e.hooks.Stop)}}:e},write(e,n){m(e,g(n))}};import{existsSync as R,readFileSync as dt}from"node:fs";import{join as W}from"node:path";function Pe(e){let n=e.mcpServers?.venos;if(!n||n.command!=="node")return!1;let t=n.args?.[0];return!t||t.includes("/A2A/")?!1:R(t)}var Q={name:"cursor",transport:"mcp-json",configPath(e){return W(e,".cursor","mcp.json")},isInstalled(e){let n=W(e,".cursor");return R(n)?R(W(n,"mcp.json"))||R(W(n,"extensions")):!1},load(e){if(!R(e))return{};try{return JSON.parse(dt(e,"utf8"))}catch{return{}}},isWired(e){return Pe(e)},inject(e,n){return Pe(e)?e:{...e,mcpServers:{...e.mcpServers??{},venos:{command:"node",args:[n.mcpServerPath],env:{VENOS_URL:n.orchestratorUrl,VENOS_ORG_ID:n.orgId,...n.apiKey?{VENOS_API_KEY:n.apiKey}:{}}}}}},remove(e){if(!e.mcpServers?.venos)return e;let{venos:n,...t}=e.mcpServers;return{...e,mcpServers:t}},write(e,n){m(e,g(n))}};import{existsSync as se,readFileSync as Ot}from"node:fs";import{join as Ue}from"node:path";function pt(e,n){let t=e.slice(0,n).split(/\r\n|\n|\r/g);return[t.length,t.pop().length+1]}function ft(e,n,t){let r=e.split(/\r\n|\n|\r/g),o="",s=(Math.log10(n+1)|0)+1;for(let i=n-1;i<=n+1;i++){let a=r[i-1];a&&(o+=i.toString().padEnd(s," "),o+=": ",o+=a,o+=`
|
|
4
|
+
`,i===n&&(o+=" ".repeat(s+t+2),o+=`^
|
|
5
|
+
`))}return o}var d=class extends Error{line;column;codeblock;constructor(n,t){let[r,o]=pt(t.toml,t.ptr),s=ft(t.toml,r,o);super(`Invalid TOML document: ${n}
|
|
6
6
|
|
|
7
|
-
${
|
|
8
|
-
`,
|
|
9
|
-
`)return t;if(
|
|
10
|
-
`)return t+1;if(
|
|
11
|
-
`||o==="\r"&&e[
|
|
12
|
-
`);)
|
|
13
|
-
`||
|
|
14
|
-
`))return
|
|
15
|
-
`,f:"\f",r:"\r",e:"\x1B",'"':'"',"\\":"\\"};function
|
|
16
|
-
`&&
|
|
17
|
-
`||c==="\r"&&e[
|
|
18
|
-
`){if(!o)throw new
|
|
19
|
-
`||c===" "||c===" "||c==="\r")){if(
|
|
20
|
-
`&&e[
|
|
21
|
-
`&&e[
|
|
22
|
-
`&&
|
|
23
|
-
`&&
|
|
24
|
-
`&&e[a]!=="\r")throw new
|
|
25
|
-
`}[[${
|
|
26
|
-
`,o+=
|
|
27
|
-
`)
|
|
28
|
-
`)+
|
|
29
|
-
`}}return e&&(i
|
|
30
|
-
${
|
|
31
|
-
${
|
|
32
|
-
`?
|
|
33
|
-
`:
|
|
34
|
-
`)}};import{existsSync as
|
|
35
|
-
`).some(
|
|
36
|
-
`);t.length>0&&t[t.length-1]===""&&t.pop();let
|
|
7
|
+
${s}`,t),this.line=r,this.column=o,this.codeblock=s}};function mt(e,n){let t=0;for(;e[n-++t]==="\\";);return--t&&t%2}function V(e,n=0,t=e.length){let r=e.indexOf(`
|
|
8
|
+
`,n);return e[r-1]==="\r"&&r--,r<=t?r:-1}function P(e,n){for(let t=n;t<e.length;t++){let r=e[t];if(r===`
|
|
9
|
+
`)return t;if(r==="\r"&&e[t+1]===`
|
|
10
|
+
`)return t+1;if(r<" "&&r!==" "||r==="\x7F")throw new d("control characters are not allowed in comments",{toml:e,ptr:n})}return e.length}function h(e,n,t,r){let o;for(;;){for(;(o=e[n])===" "||o===" "||!t&&(o===`
|
|
11
|
+
`||o==="\r"&&e[n+1]===`
|
|
12
|
+
`);)n++;if(r||o!=="#")break;n=P(e,n)}return n}function Oe(e,n,t,r,o=!1){if(!r)return n=V(e,n),n<0?e.length:n;for(let s=n;s<e.length;s++){let i=e[s];if(i==="#")s=V(e,s);else{if(i===t)return s+1;if(i===r||o&&(i===`
|
|
13
|
+
`||i==="\r"&&e[s+1]===`
|
|
14
|
+
`))return s}}throw new d("cannot find end of structure",{toml:e,ptr:n})}function L(e,n){let t=e[n],r=t===e[n+1]&&e[n+1]===e[n+2]?e.slice(n,n+3):t;n+=r.length-1;do n=e.indexOf(r,++n);while(n>-1&&t!=="'"&&mt(e,n));return n>-1&&(n+=r.length,r.length>1&&(e[n]===t&&n++,e[n]===t&&n++)),n}var gt=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,_=class e extends Date{#n=!1;#t=!1;#e=null;constructor(n){let t=!0,r=!0,o="Z";if(typeof n=="string"){let s=n.match(gt);s?(s[1]||(t=!1,n=`0000-01-01T${n}`),r=!!s[2],r&&n[10]===" "&&(n=n.replace(" ","T")),s[2]&&+s[2]>23?n="":(o=s[3]||null,n=n.toUpperCase(),!o&&r&&(n+="Z"))):n=""}super(n),isNaN(this.getTime())||(this.#n=t,this.#t=r,this.#e=o)}isDateTime(){return this.#n&&this.#t}isLocal(){return!this.#n||!this.#t||!this.#e}isDate(){return this.#n&&!this.#t}isTime(){return this.#t&&!this.#n}isValid(){return this.#n||this.#t}toISOString(){let n=super.toISOString();if(this.isDate())return n.slice(0,10);if(this.isTime())return n.slice(11,23);if(this.#e===null)return n.slice(0,-1);if(this.#e==="Z")return n;let t=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return t=this.#e[0]==="-"?t:-t,new Date(this.getTime()-t*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(n,t="Z"){let r=new e(n);return r.#e=t,r}static wrapAsLocalDateTime(n){let t=new e(n);return t.#e=null,t}static wrapAsLocalDate(n){let t=new e(n);return t.#t=!1,t.#e=null,t}static wrapAsLocalTime(n){let t=new e(n);return t.#n=!1,t.#e=null,t}};var ht=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,yt=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,vt=/^[+-]?0[0-9_]/,St=/^[0-9a-f]{2,8}$/i,Ae={b:"\b",t:" ",n:`
|
|
15
|
+
`,f:"\f",r:"\r",e:"\x1B",'"':'"',"\\":"\\"};function F(e,n=0,t=e.length){let r=e[n]==="'",o=e[n++]===e[n]&&e[n]===e[n+1];o&&(t-=2,e[n+=2]==="\r"&&n++,e[n]===`
|
|
16
|
+
`&&n++);let s=0,i,a="",l=n;for(;n<t-1;){let c=e[n++];if(c===`
|
|
17
|
+
`||c==="\r"&&e[n]===`
|
|
18
|
+
`){if(!o)throw new d("newlines are not allowed in strings",{toml:e,ptr:n-1})}else if(c<" "&&c!==" "||c==="\x7F")throw new d("control characters are not allowed in strings",{toml:e,ptr:n-1});if(i){if(i=!1,c==="x"||c==="u"||c==="U"){let u=e.slice(n,n+=c==="x"?2:c==="u"?4:8);if(!St.test(u))throw new d("invalid unicode escape",{toml:e,ptr:s});try{a+=String.fromCodePoint(parseInt(u,16))}catch{throw new d("invalid unicode escape",{toml:e,ptr:s})}}else if(o&&(c===`
|
|
19
|
+
`||c===" "||c===" "||c==="\r")){if(n=h(e,n-1,!0),e[n]!==`
|
|
20
|
+
`&&e[n]!=="\r")throw new d("invalid escape: only line-ending whitespace may be escaped",{toml:e,ptr:s});n=h(e,n)}else if(c in Ae)a+=Ae[c];else throw new d("unrecognized escape sequence",{toml:e,ptr:s});l=n}else!r&&c==="\\"&&(s=n-1,i=!0,a+=e.slice(l,s))}return a+e.slice(l,t-1)}function Ee(e,n,t,r){if(e==="true")return!0;if(e==="false")return!1;if(e==="-inf")return-1/0;if(e==="inf"||e==="+inf")return 1/0;if(e==="nan"||e==="+nan"||e==="-nan")return NaN;if(e==="-0")return r?0n:0;let o=ht.test(e);if(o||yt.test(e)){if(vt.test(e))throw new d("leading zeroes are not allowed",{toml:n,ptr:t});e=e.replace(/_/g,"");let i=+e;if(isNaN(i))throw new d("invalid number",{toml:n,ptr:t});if(o){if((o=!Number.isSafeInteger(i))&&!r)throw new d("integer value cannot be represented losslessly",{toml:n,ptr:t});(o||r===!0)&&(i=BigInt(e))}return i}let s=new _(e);if(!s.isValid())throw new d("invalid value",{toml:n,ptr:t});return s}function wt(e,n,t){let r=e.slice(n,t),o=r.indexOf("#");return o>-1&&(P(e,o),r=r.slice(0,o)),[r.trimEnd(),o]}function U(e,n,t,r,o){if(r===0)throw new d("document contains excessively nested structures. aborting.",{toml:e,ptr:n});let s=e[n];if(s==="["||s==="{"){let[l,c]=s==="["?Te(e,n,r,o):Ie(e,n,r,o);if(t){if(c=h(e,c),e[c]===",")c++;else if(e[c]!==t)throw new d("expected comma or end of structure",{toml:e,ptr:c})}return[l,c]}let i;if(s==='"'||s==="'"){i=L(e,n);let l=F(e,n,i);if(t){if(i=h(e,i),e[i]&&e[i]!==","&&e[i]!==t&&e[i]!==`
|
|
21
|
+
`&&e[i]!=="\r")throw new d("unexpected character encountered",{toml:e,ptr:i});i+=+(e[i]===",")}return[l,i]}i=Oe(e,n,",",t);let a=wt(e,n,i-+(e[i-1]===","));if(!a[0])throw new d("incomplete key-value declaration: no value specified",{toml:e,ptr:n});return t&&a[1]>-1&&(i=h(e,n+a[1]),i+=+(e[i]===",")),[Ee(a[0],e,n,o),i]}var kt=/^[a-zA-Z0-9-_]+[ \t]*$/;function J(e,n,t="="){let r=n-1,o=[],s=e.indexOf(t,n);if(s<0)throw new d("incomplete key-value: cannot find end of key",{toml:e,ptr:n});do{let i=e[n=++r];if(i!==" "&&i!==" ")if(i==='"'||i==="'"){if(i===e[n+1]&&i===e[n+2])throw new d("multiline strings are not allowed in keys",{toml:e,ptr:n});let a=L(e,n);if(a<0)throw new d("unfinished string encountered",{toml:e,ptr:n});r=e.indexOf(".",a);let l=e.slice(a,r<0||r>s?s:r),c=V(l);if(c>-1)throw new d("newlines are not allowed in keys",{toml:e,ptr:n+r+c});if(l.trimStart())throw new d("found extra tokens after the string part",{toml:e,ptr:a});if(s<a&&(s=e.indexOf(t,a),s<0))throw new d("incomplete key-value: cannot find end of key",{toml:e,ptr:n});o.push(F(e,n,a))}else{r=e.indexOf(".",n);let a=e.slice(n,r<0||r>s?s:r);if(!kt.test(a))throw new d("only letter, numbers, dashes and underscores are allowed in keys",{toml:e,ptr:n});o.push(a.trimEnd())}}while(r+1&&r<s);return[o,h(e,s+1,!0,!0)]}function Ie(e,n,t,r){let o={},s=new Set,i;for(n++;(i=e[n++])!=="}"&&i;){if(i===",")throw new d("expected value, found comma",{toml:e,ptr:n-1});if(i==="#")n=P(e,n);else if(i!==" "&&i!==" "&&i!==`
|
|
22
|
+
`&&i!=="\r"){let a,l=o,c=!1,[u,p]=J(e,n-1);for(let I=0;I<u.length;I++){if(I&&(l=c?l[a]:l[a]={}),a=u[I],(c=Object.hasOwn(l,a))&&(typeof l[a]!="object"||s.has(l[a])))throw new d("trying to redefine an already defined value",{toml:e,ptr:n});!c&&a==="__proto__"&&Object.defineProperty(l,a,{enumerable:!0,configurable:!0,writable:!0})}if(c)throw new d("trying to redefine an already defined value",{toml:e,ptr:n});let[f,C]=U(e,p,"}",t-1,r);s.add(f),l[a]=f,n=C}}if(!i)throw new d("unfinished table encountered",{toml:e,ptr:n});return[o,n]}function Te(e,n,t,r){let o=[],s;for(n++;(s=e[n++])!=="]"&&s;){if(s===",")throw new d("expected value, found comma",{toml:e,ptr:n-1});if(s==="#")n=P(e,n);else if(s!==" "&&s!==" "&&s!==`
|
|
23
|
+
`&&s!=="\r"){let i=U(e,n-1,"]",t-1,r);o.push(i[0]),n=i[1]}}if(!s)throw new d("unfinished array encountered",{toml:e,ptr:n});return[o,n]}function Re(e,n,t,r){let o=n,s=t,i,a=!1,l;for(let c=0;c<e.length;c++){if(c){if(o=a?o[i]:o[i]={},s=(l=s[i]).c,r===0&&(l.t===1||l.t===2))return null;if(l.t===2){let u=o.length-1;o=o[u],s=s[u].c}}if(i=e[c],(a=Object.hasOwn(o,i))&&s[i]?.t===0&&s[i]?.d)return null;a||(i==="__proto__"&&(Object.defineProperty(o,i,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(s,i,{enumerable:!0,configurable:!0,writable:!0})),s[i]={t:c<e.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(l=s[i],l.t!==r&&!(r===1&&l.t===3)||(r===2&&(l.d||(l.d=!0,o[i]=[]),o[i].push(o={}),l.c[l.i++]=l={t:1,d:!1,i:0,c:{}}),l.d))return null;if(l.d=!0,r===1)o=a?o[i]:o[i]={};else if(r===0&&a)return null;return[i,o,l.c]}function ee(e,{maxDepth:n=1e3,integersAsBigInt:t}={}){let r={},o={},s=r,i=o;for(let a=h(e,0);a<e.length;){if(e[a]==="["){let l=e[++a]==="[",c=J(e,a+=+l,"]");if(l){if(e[c[1]-1]!=="]")throw new d("expected end of table declaration",{toml:e,ptr:c[1]-1});c[1]++}let u=Re(c[0],r,o,l?2:1);if(!u)throw new d("trying to redefine an already defined table or value",{toml:e,ptr:a});i=u[2],s=u[1],a=c[1]}else{let l=J(e,a),c=Re(l[0],s,i,0);if(!c)throw new d("trying to redefine an already defined table or value",{toml:e,ptr:a});let u=U(e,l[1],void 0,n,t);c[1][c[0]]=u[0],a=u[1]}if(a=h(e,a,!0),e[a]&&e[a]!==`
|
|
24
|
+
`&&e[a]!=="\r")throw new d("each key-value declaration must be followed by an end-of-line",{toml:e,ptr:a});a=h(e,a)}return r}var _e=/^[a-z0-9-_]+$/i;function N(e){let n=typeof e;if(n==="object"){if(Array.isArray(e))return"array";if(e instanceof Date)return"date"}return n}function Ct(e){for(let n=0;n<e.length;n++)if(N(e[n])!=="object")return!1;return e.length!=0}function ne(e){return JSON.stringify(e).replace(/\x7f/g,"\\u007f")}function te(e,n,t,r){if(t===0)throw new Error("Could not stringify the object: maximum object depth exceeded");if(n==="number")return isNaN(e)?"nan":e===1/0?"inf":e===-1/0?"-inf":r&&Number.isInteger(e)?e.toFixed(1):e.toString();if(n==="bigint"||n==="boolean")return e.toString();if(n==="string")return ne(e);if(n==="date"){if(isNaN(e.getTime()))throw new TypeError("cannot serialize invalid date");return e.toISOString()}if(n==="object")return xt(e,t,r);if(n==="array")return bt(e,t,r)}function xt(e,n,t){let r=Object.keys(e);if(r.length===0)return"{}";let o="{ ";for(let s=0;s<r.length;s++){let i=r[s];s&&(o+=", "),o+=_e.test(i)?i:ne(i),o+=" = ",o+=te(e[i],N(e[i]),n-1,t)}return o+" }"}function bt(e,n,t){if(e.length===0)return"[]";let r="[ ";for(let o=0;o<e.length;o++){if(o&&(r+=", "),e[o]===null||e[o]===void 0)throw new TypeError("arrays cannot contain null or undefined values");r+=te(e[o],N(e[o]),n-1,t)}return r+" ]"}function Pt(e,n,t,r){if(t===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let o="";for(let s=0;s<e.length;s++)o+=`${o&&`
|
|
25
|
+
`}[[${n}]]
|
|
26
|
+
`,o+=re(0,e[s],n,t,r);return o}function re(e,n,t,r,o){if(r===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let s="",i="",a=Object.keys(n);for(let l=0;l<a.length;l++){let c=a[l];if(n[c]!==null&&n[c]!==void 0){let u=N(n[c]);if(u==="symbol"||u==="function")throw new TypeError(`cannot serialize values of type '${u}'`);let p=_e.test(c)?c:ne(c);if(u==="array"&&Ct(n[c]))i+=(i&&`
|
|
27
|
+
`)+Pt(n[c],t?`${t}.${p}`:p,r-1,o);else if(u==="object"){let f=t?`${t}.${p}`:p;i+=(i&&`
|
|
28
|
+
`)+re(f,n[c],f,r-1,o)}else s+=p,s+=" = ",s+=te(n[c],u,r,o),s+=`
|
|
29
|
+
`}}return e&&(s||!i)&&(s=s?`[${e}]
|
|
30
|
+
${s}`:`[${e}]`),s&&i?`${s}
|
|
31
|
+
${i}`:s||i}function oe(e,{maxDepth:n=1e3,numbersAsFloat:t=!1}={}){if(N(e)!=="object")throw new TypeError("stringify can only be called with an object");let r=re(0,e,"",n,t);return r[r.length-1]!==`
|
|
32
|
+
`?r+`
|
|
33
|
+
`:r}function Ne(e){let n=e.mcp_servers?.venos;if(!n||n.command!=="node")return!1;let t=n.args?.[0];return!t||t.includes("/A2A/")?!1:se(t)}var Me={name:"codex",transport:"mcp-toml",configPath(e){return Ue(e,".codex","config.toml")},isInstalled(e){return se(Ue(e,".codex"))},load(e){if(!se(e))return{};try{return ee(Ot(e,"utf8"))}catch{return{}}},isWired(e){return Ne(e)},inject(e,n){return Ne(e)?e:{...e,mcp_servers:{...e.mcp_servers??{},venos:{command:"node",args:[n.mcpServerPath],env:{VENOS_URL:n.orchestratorUrl,VENOS_ORG_ID:n.orgId,...n.apiKey?{VENOS_API_KEY:n.apiKey}:{},VENOS_SOURCE:"codex"}}}}},remove(e){if(!e.mcp_servers?.venos)return e;let{venos:n,...t}=e.mcp_servers;return{...e,mcp_servers:t}},write(e,n){m(e,oe(n)+`
|
|
34
|
+
`)}};import{existsSync as je,readFileSync as At}from"node:fs";import{join as $e}from"node:path";var Le="venos";function ie(e){return(e??[]).some(n=>n.hooks.some(t=>typeof t.command=="string"&&t.command.includes(Le)))}function We(e,n){let t=e??[];return ie(t)?t:[...t,{matcher:"*",hooks:[{type:"command",command:n}]}]}function Ve(e){return(e??[]).map(n=>({...n,hooks:n.hooks.filter(t=>typeof t.command!="string"||!t.command.includes(Le))})).filter(n=>n.hooks.length>0)}function Et(e){return`${e.hookCommand} --source codex`}var Fe={name:"codex-hook",transport:"claude-hook",configPath(e){return $e(e,".codex","hooks.json")},isInstalled(e){return je($e(e,".codex"))},load(e){if(!je(e))return{};try{return JSON.parse(At(e,"utf8"))}catch{return{}}},isWired(e){return ie(e.hooks?.PreToolUse)&&ie(e.hooks?.PostToolUse)},inject(e,n){let t=e.hooks??{},r=Et(n);return{...e,hooks:{...t,PreToolUse:We(t.PreToolUse,r),PostToolUse:We(t.PostToolUse,r)}}},remove(e){return e.hooks?{...e,hooks:{...e.hooks,PreToolUse:Ve(e.hooks.PreToolUse),PostToolUse:Ve(e.hooks.PostToolUse)}}:e},write(e,n){m(e,g(n))}};import{existsSync as ae,readFileSync as It}from"node:fs";import{join as Je}from"node:path";function He(e){let n=e.mcpServers?.venos;if(!n||n.command!=="node")return!1;let t=n.args?.[0];return!t||t.includes("/A2A/")?!1:ae(t)}var De={name:"windsurf",transport:"mcp-json",configPath(e){return Je(e,".codeium","windsurf","mcp_config.json")},isInstalled(e){return ae(Je(e,".codeium","windsurf"))},load(e){if(!ae(e))return{};try{return JSON.parse(It(e,"utf8"))}catch{return{}}},isWired(e){return He(e)},inject(e,n){return He(e)?e:{...e,mcpServers:{...e.mcpServers??{},venos:{command:"node",args:[n.mcpServerPath],env:{VENOS_URL:n.orchestratorUrl,VENOS_ORG_ID:n.orgId,...n.apiKey?{VENOS_API_KEY:n.apiKey}:{}}}}}},remove(e){if(!e.mcpServers?.venos)return e;let{venos:n,...t}=e.mcpServers;return{...e,mcpServers:t}},write(e,n){m(e,g(n))}};import{existsSync as ce,readFileSync as Tt}from"node:fs";import{join as O}from"node:path";var Ke="saoudrizwan.claude-dev",Rt="cline_mcp_settings.json";function Be(e){if(process.platform==="darwin")return O(e,"Library","Application Support","Code","User");if(process.platform==="win32"){let n=process.env.APPDATA??O(e,"AppData","Roaming");return O(n,"Code","User")}return O(e,".config","Code","User")}function Ge(e){let n=e.mcpServers?.venos;if(!n||n.command!=="node")return!1;let t=n.args?.[0];return!t||t.includes("/A2A/")?!1:ce(t)}var ze={name:"cline",transport:"mcp-json",configPath(e){return O(Be(e),"globalStorage",Ke,"settings",Rt)},isInstalled(e){return ce(O(Be(e),"globalStorage",Ke))},load(e){if(!ce(e))return{};try{return JSON.parse(Tt(e,"utf8"))}catch{return{}}},isWired(e){return Ge(e)},inject(e,n){return Ge(e)?e:{...e,mcpServers:{...e.mcpServers??{},venos:{command:"node",args:[n.mcpServerPath],env:{VENOS_URL:n.orchestratorUrl,VENOS_ORG_ID:n.orgId,...n.apiKey?{VENOS_API_KEY:n.apiKey}:{}}}}}},remove(e){if(!e.mcpServers?.venos)return e;let{venos:n,...t}=e.mcpServers;return{...e,mcpServers:t}},write(e,n){m(e,g(n))}};import{existsSync as le,readFileSync as _t}from"node:fs";import{join as Ye}from"node:path";function Ze(e){let n=e.context_servers?.venos;if(!n||n.command?.path!=="node")return!1;let t=n.command.args?.[0];return!t||t.includes("/A2A/")?!1:le(t)}var Xe={name:"zed",transport:"mcp-json",configPath(e){return Ye(e,".config","zed","settings.json")},isInstalled(e){return le(Ye(e,".config","zed"))},load(e){if(!le(e))return{};try{return JSON.parse(_t(e,"utf8"))}catch{return{}}},isWired(e){return Ze(e)},inject(e,n){return Ze(e)?e:{...e,context_servers:{...e.context_servers??{},venos:{command:{path:"node",args:[n.mcpServerPath],env:{VENOS_URL:n.orchestratorUrl,VENOS_ORG_ID:n.orgId,...n.apiKey?{VENOS_API_KEY:n.apiKey}:{}}},settings:{}}}}},remove(e){if(!e.context_servers?.venos)return e;let{venos:n,...t}=e.context_servers;return{...e,context_servers:t}},write(e,n){m(e,g(n))}};import{existsSync as ue,readFileSync as Ut}from"node:fs";import{join as qe}from"node:path";function Qe(e){let n=e.mcpServers?.venos;if(!n||n.command!=="node")return!1;let t=n.args?.[0];return!t||t.includes("/A2A/")?!1:ue(t)}var en={name:"jetbrains",transport:"mcp-json",configPath(e){return qe(e,".junie","mcp","mcp.json")},isInstalled(e){return ue(qe(e,".junie"))},load(e){if(!ue(e))return{};try{return JSON.parse(Ut(e,"utf8"))}catch{return{}}},isWired(e){return Qe(e)},inject(e,n){return Qe(e)?e:{...e,mcpServers:{...e.mcpServers??{},venos:{command:"node",args:[n.mcpServerPath],env:{VENOS_URL:n.orchestratorUrl,VENOS_ORG_ID:n.orgId,...n.apiKey?{VENOS_API_KEY:n.apiKey}:{}}}}}},remove(e){if(!e.mcpServers?.venos)return e;let{venos:n,...t}=e.mcpServers;return{...e,mcpServers:t}},write(e,n){m(e,g(n))}};import{existsSync as nn,readFileSync as Nt,rmSync as Mt}from"node:fs";import{join as jt}from"node:path";var $t="openai-api-base",Wt=".aider.conf.yml";function tn(){return`${$t}: ${T}`}function Vt(e){return/^\s*openai-api-base\s*:/.test(e)}var rn={name:"aider",transport:"mcp-json",configPath(e){return jt(e,Wt)},isInstalled(){return!0},load(e){let n=nn(e)?Nt(e,"utf8"):"";return{wired:n.split(`
|
|
35
|
+
`).some(r=>r.trim()===tn()),raw:n}},isWired(e){return e.wired},inject(e){return e.wired?e:{...e,wired:!0}},remove(e){return{...e,wired:!1}},write(e,n){let t=n.raw===""?[]:n.raw.split(`
|
|
36
|
+
`);t.length>0&&t[t.length-1]===""&&t.pop();let r=t.filter(s=>!Vt(s)),o=n.wired?[...r,tn()]:r;if(o.length===0){nn(e)&&Mt(e,{force:!0});return}m(e,o.join(`
|
|
37
37
|
`)+`
|
|
38
|
-
`)}};import{accessSync as
|
|
38
|
+
`)}};import{accessSync as Lt,constants as Ft,existsSync as sn,readFileSync as Jt}from"node:fs";import{delimiter as Ht}from"node:path";import{join as an}from"node:path";var Dt="obsidian-cli",Kt="obsidian-cli.json";function Bt(e){try{return Lt(e,Ft.X_OK),!0}catch{return!1}}function Gt(e){return(process.env.PATH??"").split(Ht).some(t=>{if(t.trim()==="")return!1;let r=an(t,e);return sn(r)&&Bt(r)})}function on(e){return e.venos?.source==="obsidian-cli"&&e.venos.wired===!0}var cn={name:"obsidian-cli",transport:"mcp-json",configPath(e){return an(e,".venos",Kt)},isInstalled(){return Gt(Dt)},load(e){if(!sn(e))return{};try{return JSON.parse(Jt(e,"utf8"))}catch{return{}}},isWired(e){return on(e)},inject(e,n){return on(e)?e:{...e,venos:{source:"obsidian-cli",orgId:n.orgId,orchestratorUrl:n.orchestratorUrl,wired:!0}}},remove(e){if(!e.venos)return e;let n={...e};return delete n.venos,n},write(e,n){m(e,g(n))}};var de=[q,Q,Me,Fe,De,ze,Xe,en,rn,cn];import{existsSync as pe}from"node:fs";import{dirname as zt,join as ln,resolve as fe}from"node:path";import{fileURLToPath as Yt}from"node:url";var un=zt(Yt(import.meta.url));function dn(){let e=process.env.VENOS_MCP_SERVER_PATH;if(e&&pe(e))return fe(e);let n=fe(ln(un,"..","etc","mcp-server","bin.js"));if(pe(n))return n;let t=fe(ln(un,"..","..","..","packages","mcp-server","dist","bin.js"));if(pe(t))return t;throw new Error(`venos: bundled mcp-server not found. Tried:
|
|
39
39
|
VENOS_MCP_SERVER_PATH=${e??"(unset)"}
|
|
40
|
-
bundled: ${
|
|
40
|
+
bundled: ${n}
|
|
41
41
|
sibling: ${t}
|
|
42
|
-
If you are developing locally, run: pnpm --filter @venos/mcp-server build`)}import{existsSync as
|
|
43
|
-
venos init ${t?"done":"(no changes)"}`),console.log(` org ID : ${
|
|
44
|
-
Next steps:`);let
|
|
45
|
-
Gateway routing (hard block via apps/mcp-proxy):`),console.log(` \u2022 Cursor \u2014 Settings \u2192 Models \u2192 Custom OpenAI Base URL: ${
|
|
46
|
-
venos init --remove ${t?"done":"(no changes)"}`);for(let
|
|
47
|
-
`,"utf8")}var
|
|
48
|
-
venos init failed: orchestrator unreachable at ${t}/healthz`),console.error("Start the orchestrator first: apps/orchestrator/orchestrator"),process.exit(1));let
|
|
49
|
-
`,"utf8"),t}catch{return""}}function
|
|
50
|
-
`),process.exit(1))}function
|
|
51
|
-
`)
|
|
52
|
-
`)
|
|
53
|
-
`),process.exit(
|
|
42
|
+
If you are developing locally, run: pnpm --filter @venos/mcp-server build`)}import{existsSync as Zt}from"node:fs";function Xt(e,n,t){let r=e.configPath(n);if(!e.isInstalled(n))return{client:e.name,transport:e.transport,status:"skipped-not-installed"};try{let o=e.load(r);if(e.isWired(o,t))return{client:e.name,transport:e.transport,status:"already-wired",path:r};let s=e.inject(o,t);return e.write(r,s),{client:e.name,transport:e.transport,status:"wired",path:r}}catch(o){return{client:e.name,transport:e.transport,status:"error",path:r,error:o instanceof Error?o.message:String(o)}}}function pn(e,n,t){return t.map(r=>Xt(r,e,n))}function qt(e,n){let t=e.configPath(n);if(!e.isInstalled(n))return{client:e.name,transport:e.transport,status:"skipped-not-installed"};if(!Zt(t))return{client:e.name,transport:e.transport,status:"already-removed",path:t};try{let r=e.load(t),o=e.remove(r);return JSON.stringify(o)===JSON.stringify(r)?{client:e.name,transport:e.transport,status:"already-removed",path:t}:(e.write(t,o),{client:e.name,transport:e.transport,status:"removed",path:t})}catch(r){return{client:e.name,transport:e.transport,status:"error",path:t,error:r instanceof Error?r.message:String(r)}}}function fn(e,n){return n.map(t=>qt(t,e))}import{existsSync as mn,mkdirSync as Qt,readFileSync as er}from"node:fs";import{join as gn}from"node:path";var hn="cline.openaiBaseUrl";function yn(e){let n=gn(e,".vscode");if(!mn(n))return{status:"no-workspace"};let t=gn(n,"settings.json"),r={};if(mn(t))try{let o=JSON.parse(er(t,"utf8"));o&&typeof o=="object"&&(r=o)}catch{}return r[hn]===T?{status:"already-wired",path:t}:(Qt(n,{recursive:!0}),m(t,g({...r,[hn]:T})),{status:"wired",path:t})}var nr={wired:"OK","already-wired":"\xB7","skipped-not-installed":"\u2014",error:"FAIL"},tr={wired:"wired","already-wired":"already wired","skipped-not-installed":"skipped (not installed)",error:"ERROR"},me="http://127.0.0.1:4000/v1";function vn(e,n){let t=e.some(r=>r.status==="wired");console.log(`
|
|
43
|
+
venos init ${t?"done":"(no changes)"}`),console.log(` org ID : ${n.orgId}`),console.log(` orchestrator: ${n.orchestratorUrl}`);for(let r of e){let o=nr[r.status],s=tr[r.status],i=r.path?` ${r.path}`:"",a=r.error?` \u2014 ${r.error}`:"";console.log(` ${o} ${r.client.padEnd(12)} ${s}${i}${a}`)}if(n.clineWorkspace){let r=n.clineWorkspace;r.status==="wired"?console.log(` OK cline (ws) wired ${r.path}`):r.status==="already-wired"&&console.log(` \xB7 cline (ws) already wired ${r.path}`)}if(t){console.log(`
|
|
44
|
+
Next steps:`);let r={"claude-code":"Restart Claude Code for the hook to take effect.",cursor:"Restart Cursor to load the venos MCP server.",codex:"Restart Codex to pick up the new MCP config + gateway routing (~/.codex/.env).",windsurf:"Restart Windsurf to load the venos MCP server.",cline:"Reload the Cline extension (or restart VS Code) to load the venos MCP server.",zed:"Restart Zed to load the venos context server.",jetbrains:"Restart your JetBrains IDE (or just Junie) to load the venos MCP server.",aider:"Aider will route LLM calls through the venos gateway on next launch (~/.aider.conf.yml)."};for(let o of e){if(o.status!=="wired")continue;let s=r[o.client];s&&console.log(` \u2022 ${s}`)}console.log(` \u2022 Test: curl ${n.orchestratorUrl}/healthz`)}rr(n.clineWorkspace)}function rr(e){console.log(`
|
|
45
|
+
Gateway routing (hard block via apps/mcp-proxy):`),console.log(` \u2022 Cursor \u2014 Settings \u2192 Models \u2192 Custom OpenAI Base URL: ${me}`),console.log(" Optional: Custom HTTP Headers \u2192 X-Venos-Source: cursor"),console.log(` \u2022 Windsurf \u2014 Settings \u2192 Models \u2192 Custom OpenAI Base URL: ${me}`),(!e||e.status==="no-workspace")&&(console.log(" \u2022 Cline \u2014 Open VS Code in your project, then add to .vscode/settings.json:"),console.log(` "cline.openaiBaseUrl": "${me}"`)),console.log(" \u2022 VS Code Copilot \u2014 closed provider, no custom endpoint. Coverage = MCP advisory only."),console.log(" \u2022 JetBrains AI Assistant \u2014 closed provider, no custom endpoint. Coverage = MCP advisory only.")}function Sn(e,n){console.log(JSON.stringify({...n,outcomes:e},null,2))}var or={removed:"OK","already-removed":"\xB7","skipped-not-installed":"\u2014",error:"FAIL"},sr={removed:"removed","already-removed":"already removed","skipped-not-installed":"skipped (not installed)",error:"ERROR"};function wn(e,n){let t=e.some(s=>s.status==="removed");console.log(`
|
|
46
|
+
venos init --remove ${t?"done":"(no changes)"}`);for(let s of e){let i=or[s.status],a=sr[s.status],l=s.path?` ${s.path}`:"",c=s.error?` \u2014 ${s.error}`:"";console.log(` ${i} ${s.client.padEnd(12)} ${a}${l}${c}`)}let r=n.venosConfigRemoved?"OK":"\xB7",o=n.venosConfigRemoved?"removed":"already removed";console.log(` ${r} venos-config ${o} ${n.venosConfigPath}`),console.log("\nPre-venos `.venos-backup` snapshots are preserved \u2014 delete manually if you don't want them.")}function kn(e,n){console.log(JSON.stringify({...n,outcomes:e},null,2))}var Cn=1;function M(e){return dr(e,".venos","config.json")}function fr(){return`org-${pr(4).toString("hex")}`}function mr(e,n,t,r){let o=M(e);if(xn(o))try{let s=JSON.parse(ar(o,"utf8")),i={schemaVersion:s.schemaVersion??Cn,...s,orchestratorUrl:n};return t&&(i.apiKey=t),r&&(i.orgId=r),i}catch{}return{schemaVersion:Cn,orgId:r??fr(),orchestratorUrl:n,createdAt:new Date().toISOString(),failMode:"closed",...t?{apiKey:t}:{}}}function gr(e,n){let t=M(e);ir(ur(t),{recursive:!0}),lr(t,JSON.stringify(n,null,2)+`
|
|
47
|
+
`,"utf8")}var hr=5e3,yr=5e3;async function vr(e){let n=e.replace(/\/$/,""),t=new AbortController,r=setTimeout(()=>t.abort(),hr);try{return(await fetch(`${n}/healthz`,{signal:t.signal})).ok}catch{return!1}finally{clearTimeout(r)}}async function Sr(e,n){let t=e.replace(/\/$/,""),r=new AbortController,o=setTimeout(()=>r.abort(),yr);try{let s=await fetch(`${t}/api/activation/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orgId:n}),signal:r.signal});s.ok||console.warn(`[venos] activation telemetry: non-200 response (${s.status}) \u2014 init continues`)}catch{console.warn("[venos] activation telemetry: failed to reach orchestrator \u2014 init continues")}finally{clearTimeout(o)}}function wr(e){try{let n=new URL(e);return n.hostname==="localhost"||n.hostname==="127.0.0.1"||n.hostname==="::1"}catch{return!1}}async function bn(e={}){let n=e.home??process.env.HOME??process.env.USERPROFILE??"",t=e.orchestratorUrl??"http://127.0.0.1:8788";await vr(t)||(console.error(`
|
|
48
|
+
venos init failed: orchestrator unreachable at ${t}/healthz`),console.error("Start the orchestrator first: apps/orchestrator/orchestrator"),process.exit(1));let r=mr(n,t,e.apiKey,e.orgId),o={orgId:r.orgId,orchestratorUrl:t,mcpServerPath:dn(),hookCommand:"venos hook",usageSyncCommand:"venos usage-sync --throttle",...r.apiKey?{apiKey:r.apiKey}:{}},s=pn(n,o,de);gr(n,r);let i=yn(e.cwd??process.cwd());e.noTelemetry===!0||wr(t)||await Sr(t,r.orgId);let l={orgId:r.orgId,orchestratorUrl:t,clineWorkspace:i};e.json?Sn(s,l):vn(s,l)}function Pn(e={}){let n=e.home??process.env.HOME??process.env.USERPROFILE??"",t=fn(n,de),r=M(n),o=xn(r);o&&cr(r,{force:!0});let s={venosConfigPath:r,venosConfigRemoved:o};e.json?kn(t,s):wn(t,s)}import{mkdirSync as kr,readFileSync as H,existsSync as Cr,writeFileSync as xr}from"node:fs";import{hostname as br,userInfo as Pr}from"node:os";import{randomBytes as An}from"node:crypto";import{dirname as Or,join as En}from"node:path";function Ar(e){return En(e,".venos","config.json")}function S(e){let n=Ar(e);if(!Cr(n))throw new Error(`venos config not found at ${n} \u2014 run "venos init" first`);return JSON.parse(H(n,"utf8"))}function Er(){return new Promise((e,n)=>{let t="";process.stdin.setEncoding("utf8"),process.stdin.on("data",r=>{t+=r}),process.stdin.on("end",()=>e(t)),process.stdin.on("error",n)})}function Ir(e){let n;try{n=H(e,"utf8")}catch{return null}let t=n.split(/\r?\n/);for(let r=t.length-1;r>=0;r--){let o=t[r]?.trim();if(!o)continue;let s;try{s=JSON.parse(o)}catch{continue}if(s.type!=="assistant"||!s.message||s.message.model==="<synthetic>")continue;let i=s.message.usage;if(!i)continue;let a=typeof i.cache_creation_input_tokens=="number"?i.cache_creation_input_tokens:void 0,l=typeof i.cache_read_input_tokens=="number"?i.cache_read_input_tokens:void 0,c=(i.input_tokens??0)+(a??0)+(l??0),u=i.output_tokens??0,p=s.message.model??"";if(c===0&&u===0&&p==="")return null;let f={tokensIn:c,tokensOut:u,model:p};return l!==void 0&&(f.cacheReadTokens=l),a!==void 0&&(f.cacheWriteTokens=a),f}return null}function Tr(e){let n;try{n=JSON.parse(e)}catch{return e}if(typeof n!="object"||n===null||Array.isArray(n))return e;let t=n,r=t.transcript_path;if(typeof r!="string"||r==="")return e;let o=Ir(r);return o?(t.usage_tokens_in=o.tokensIn,t.usage_tokens_out=o.tokensOut,o.cacheReadTokens!==void 0&&(t.cache_read_input_tokens=o.cacheReadTokens),o.cacheWriteTokens!==void 0&&(t.cache_creation_input_tokens=o.cacheWriteTokens),o.model!==""&&(t.usage_model=o.model),JSON.stringify(t)):e}function Rr(e,n){if(n==="")return e;let t;try{t=JSON.parse(e)}catch{return JSON.stringify({orgId:n,content:e})}if(typeof t!="object"||t===null||Array.isArray(t))return e;let r=t;for(let o of["orgId","org_id","tenantId","tenant_id"]){let s=r[o];if(typeof s=="string"&&s.trim()!=="")return e}return r.orgId=n,JSON.stringify(r)}function _r(e){try{let t=JSON.parse(e).cursor_version;return typeof t=="string"&&t!==""}catch{return!1}}function ge(){try{let e=Pr().username;if(typeof e=="string"&&e.trim()!=="")return e.trim()}catch{}for(let e of["USER","USERNAME","LOGNAME"]){let n=process.env[e];if(typeof n=="string"&&n.trim()!=="")return n.trim()}return""}function Ur(e,n){if(n==="")return e;let t;try{t=JSON.parse(e)}catch{return e}if(typeof t!="object"||t===null||Array.isArray(t))return e;let r=t;for(let o of["userId","user_id"]){let s=r[o];if(typeof s=="string"&&s.trim()!=="")return e}return r.userId=n,JSON.stringify(r)}function w(e){let n=e===""?"":En(e,".venos","machine-id");if(n!=="")try{let t=H(n,"utf8").trim();if(t!=="")return t}catch{}try{let t=H("/etc/machine-id","utf8").trim();if(t!=="")return t}catch{}if(n==="")return"";try{let t=An(16).toString("hex");return kr(Or(n),{recursive:!0}),xr(n,t+`
|
|
49
|
+
`,"utf8"),t}catch{return""}}function Nr(e,n,t){if(n===""&&t==="")return e;let r;try{r=JSON.parse(e)}catch{return e}if(typeof r!="object"||r===null||Array.isArray(r))return e;let o=r,s=i=>{let a=o[i];return typeof a=="string"&&a.trim()!==""};return n!==""&&!s("machine_id")&&!s("machineId")&&(o.machine_id=n),t!==""&&!s("hostname")&&(o.hostname=t),JSON.stringify(o)}function k(){try{let e=br();return typeof e=="string"?e.trim():""}catch{return""}}function v(e,n,t){let r={"Content-Type":"application/json","X-Venos-Org":e};return n&&(r.Authorization=`Bearer ${n}`),t&&(r["X-Venos-Idempotency-Key"]=t),r}function Mr(e){return e.failMode==="closed"?{mode:"closed",implicit:!1}:e.failMode==="open"?{mode:"open",implicit:!1}:{mode:"open",implicit:!0}}function In(e){return e===502||e===503}async function D(e,n,t={}){let r=t.attempts??3,o=t.backoffMs??[250,750],s=t.timeoutMs??3e3,i;for(let a=0;a<r;a++){if(a>0){let l=o[Math.min(a-1,o.length-1)]??0;await new Promise(c=>setTimeout(c,l))}try{let l=await fetch(e,{...n,signal:AbortSignal.timeout(s)});if(!In(l.status)||a===r-1)return l;i=new Error(`orchestrator returned ${l.status}`)}catch(l){i=l}}throw i}function jr(e){let n=e.orchestratorUrl.replace(/\/$/,"").trim(),t=new Set([n]),r=[];for(let o of e.mirrors??[]){let s=(o?.url??"").replace(/\/$/,"").trim();s===""||t.has(s)||(t.add(s),r.push(o.apiKey?{url:s,apiKey:o.apiKey}:{url:s}))}return r}async function $r(e,n,t,r,o){e.length!==0&&await Promise.allSettled(e.map(async s=>{let i=`${s.url}/v1/hooks/${encodeURIComponent(n)}`;try{await(await D(i,{method:"POST",headers:v(t,s.apiKey,o),body:r})).text()}catch{}}))}async function Tn(e,n="claude-code"){let t=e??process.env.HOME??process.env.USERPROFILE??"",r=S(t),o=await Er(),s=_r(o),i=Nr(Ur(Tr(Rr(o,r.orgId)),ge()),w(t),k()),l=`${r.orchestratorUrl.replace(/\/$/,"")}/v1/hooks/${encodeURIComponent(n)}`,c=An(16).toString("hex"),u=$r(jr(r),n,r.orgId,i,c),p;try{p=await D(l,{method:"POST",headers:v(r.orgId,r.apiKey,c),body:i})}catch{await u,On(n,s,r);return}if(In(p.status)){await p.text(),await u,On(n,s,r);return}if(s){await p.text(),await u;return}let f=await p.text(),C=n==="codex"?Wr(f):f;process.stdout.write(C),await u,p.ok||(process.stderr.write(`venos hook: orchestrator returned ${p.status}
|
|
50
|
+
`),process.exit(1))}function On(e,n,t){if(n)return;let{mode:r,implicit:o}=Mr(t);if(r==="open"){o?process.stderr.write(`venos hook: orchestrator unreachable; proceeding because ~/.venos/config.json has no "failMode". This default flips to "closed" in a future release \u2014 set failMode explicitly to keep proceeding.
|
|
51
|
+
`):process.stderr.write(`venos hook: orchestrator unreachable; proceeding (failMode=open)
|
|
52
|
+
`);return}let s='venos orchestrator unreachable (fail-closed); set failMode "open" in ~/.venos/config.json to proceed without recording';if(e==="codex"){process.stdout.write(JSON.stringify({decision:"block",reason:s}));return}process.stderr.write(`venos hook: ${s}
|
|
53
|
+
`),process.exit(2)}function Wr(e){let n;try{n=JSON.parse(e)}catch{return e}let t=typeof n.decision=="string"?n.decision:"";if(t==="deny"||t==="block"){let r=typeof n.severity=="string"?n.severity:"",o=typeof n.eventId=="string"?n.eventId:"",s=`blocked by venos policy${r?` (severity=${r})`:""}${o?` [event ${o}]`:""}`;return JSON.stringify({decision:"block",reason:s})}return t==="allow"?JSON.stringify({decision:"approve"}):e}import{readFile as Vr}from"node:fs/promises";import{homedir as Lr}from"node:os";import{join as Fr}from"node:path";async function Rn(e={}){let n=e.home??Lr(),t=Fr(n,".venos","config.json"),r;try{r=JSON.parse(await Vr(t,"utf8"))}catch{process.stderr.write("venos: no config found \u2014 run `venos init` first\n"),process.exit(1);return}let o=`${r.orchestratorUrl}/api/billing/checkout`,s;try{s=await fetch(o,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({orgId:r.orgId}),signal:AbortSignal.timeout(5e3)})}catch{process.stderr.write(`venos: could not reach orchestrator
|
|
54
|
+
`),process.exit(1);return}if(s.status===503){process.stderr.write(`venos: billing is not yet configured on this server
|
|
55
|
+
`),process.exit(1);return}if(!s.ok){process.stderr.write(`venos: checkout failed (${s.status})
|
|
56
|
+
`),process.exit(1);return}let i=await s.json();if(!i.url){process.stderr.write(`venos: no checkout URL returned
|
|
54
57
|
`),process.exit(1);return}process.stdout.write(`
|
|
55
58
|
Open this URL to upgrade your venos plan:
|
|
56
59
|
|
|
57
|
-
${
|
|
60
|
+
${i.url}
|
|
58
61
|
|
|
59
|
-
`)}import{readFileSync as
|
|
62
|
+
`)}import{readFileSync as Dr,existsSync as Kr}from"node:fs";import{join as Nn}from"node:path";import{execFile as Br}from"node:child_process";import{promisify as Gr}from"node:util";import{existsSync as A}from"node:fs";import{dirname as Jr,join as K,resolve as E}from"node:path";import{fileURLToPath as Hr}from"node:url";var B=Jr(Hr(import.meta.url));function _n(){let e=process.env.VENOS_SESSION_WASTE_PATH;if(e&&A(e))return E(e);let n=E(K(B,"..","etc","session-waste","bin.js"));if(A(n))return n;let t=E(K(B,"..","..","..","packages","session-waste","dist","bin.js"));if(A(t))return t;throw new Error(`venos: bundled session-waste scanner not found. Tried:
|
|
60
63
|
VENOS_SESSION_WASTE_PATH=${e??"(unset)"}
|
|
61
|
-
bundled: ${
|
|
64
|
+
bundled: ${n}
|
|
62
65
|
sibling: ${t}
|
|
63
|
-
If you are developing locally, run: pnpm --filter @venos/session-waste build`)}
|
|
66
|
+
If you are developing locally, run: pnpm --filter @venos/session-waste build`)}function Un(){let e=process.env.VENOS_USAGE_AGGREGATOR_PATH;if(e&&A(e))return E(e);let n=E(K(B,"..","etc","session-waste","usage-bin.js"));if(A(n))return n;let t=E(K(B,"..","..","..","packages","session-waste","dist","usage-bin.js"));if(A(t))return t;throw new Error(`venos: bundled usage aggregator not found. Tried:
|
|
67
|
+
VENOS_USAGE_AGGREGATOR_PATH=${e??"(unset)"}
|
|
68
|
+
bundled: ${n}
|
|
69
|
+
sibling: ${t}
|
|
70
|
+
If you are developing locally, run: pnpm --filter @venos/session-waste build`)}var zr=Gr(Br);async function Mn(e){let n=e??process.env.HOME??process.env.USERPROFILE??"",t=Nn(n,".venos","config.json");if(!Kr(t))throw new Error(`venos config not found at ${t} \u2014 run "venos init" first`);let r=JSON.parse(Dr(t,"utf8")),o=_n(),s=Nn(n,".claude"),{stdout:i}=await zr(process.execPath,[o,s],{maxBuffer:32*1024*1024}),a=JSON.parse(i),l=Array.isArray(a.findings)?a.findings:[];if(l.length===0)return{sessionsScanned:a.sessionsScanned??0,findingsStored:0};let u=`${r.orchestratorUrl.replace(/\/$/,"")}/api/finops/session-waste?orgId=${encodeURIComponent(r.orgId)}`,p=await fetch(u,{method:"POST",headers:{"Content-Type":"application/json","X-Venos-Org":r.orgId},body:JSON.stringify({findings:l})});if(!p.ok)throw new Error(`venos waste-scan: orchestrator returned ${p.status}`);let f=await p.json();return{sessionsScanned:a.sessionsScanned??0,findingsStored:f.stored??l.length}}import{readFileSync as Yr,existsSync as Zr,statSync as Xr,writeFileSync as qr}from"node:fs";import{join as he}from"node:path";import{execFile as Qr,spawn as eo}from"node:child_process";import{promisify as no}from"node:util";var to=no(Qr),ro=500;function oo(e,n,t=ro){let r=[];for(let o=0;o<e.length;o+=t)r.push({sessions:e.slice(o,o+t),attribution:[]});for(let o=0;o<n.length;o+=t)r.push({sessions:[],attribution:n.slice(o,o+t)});return r}function so(e){return he(e,".venos","usage-sync.last")}function io(e,n,t){try{return t-Xr(e).mtimeMs>=n}catch{return!0}}function jn(e,n=60,t=eo){let r=e??process.env.HOME??process.env.USERPROFILE??"",o=so(r);if(!io(o,n*6e4,Date.now()))return{ran:!1,reason:"throttled"};try{qr(o,new Date().toISOString())}catch{return{ran:!1,reason:"stamp-write-failed"}}let s=process.argv[1]??"";return t(process.execPath,[s,"usage-sync"],{detached:!0,stdio:"ignore"}).unref(),{ran:!0,reason:"spawned"}}async function $n(e={},n){let t=n??process.env.HOME??process.env.USERPROFILE??"",r=he(t,".venos","config.json");if(!Zr(r))throw new Error(`venos config not found at ${r} \u2014 run "venos init" first`);let o=JSON.parse(Yr(r,"utf8")),s=e.orgId??o.orgId,i=e.orchestratorUrl??o.orchestratorUrl,a=e.apiKey??o.apiKey,l=Un(),c=he(t,".claude"),{stdout:u}=await to(process.execPath,[l,c],{maxBuffer:64*1024*1024}),p=JSON.parse(u),f=Array.isArray(p.sessions)?p.sessions:[],C=Array.isArray(p.attribution)?p.attribution:[];if(f.length===0)return{sessionsScanned:p.sessionsScanned??0,sessionsStored:0};let et=`${i.replace(/\/$/,"")}/api/finops/claude-usage?orgId=${encodeURIComponent(s)}`,Se={"Content-Type":"application/json","X-Venos-Org":s};a&&(Se.Authorization=`Bearer ${a}`);let we=0;for(let ke of oo(f,C)){let Y=await D(et,{method:"POST",headers:Se,body:JSON.stringify(ke)},{timeoutMs:1e4});if(!Y.ok)throw new Error(`venos usage-sync: orchestrator returned ${Y.status}`);let nt=await Y.json();we+=nt.sessionsStored??ke.sessions.length}return{sessionsScanned:p.sessionsScanned??0,sessionsStored:we}}import{readdirSync as Vn,readFileSync as Ln}from"node:fs";import{join as y}from"node:path";function ye(e){try{return Vn(e,{withFileTypes:!0}).filter(n=>n.isDirectory()).map(n=>n.name)}catch{return[]}}function ao(e,n){let t;try{t=Ln(y(e,"SKILL.md"),"utf8")}catch{return null}let r=t.match(/^---\s*\n([\s\S]*?)\n---/);if(!r)return{name:n,description:""};let o=r[1]??"",s=o.match(/^name:\s*(.+)$/m)?.[1]?.trim()??n,a=o.match(/^description:\s*(.+?)(?=\n\w+:|$)/ms)?.[1]?.trim().replace(/\s+/g," ")??"";return{name:s,description:a}}function Wn(e,n,t){let r=[];for(let o of ye(e)){let s=y(e,o),i=ao(s,o);i&&r.push({name:i.name,description:i.description,source:n,pluginName:t,path:s})}return r}function Fn(e){let n=[...Wn(y(e,"skills"),"user","")],t=[],r=y(e,"plugins","marketplaces");for(let o of ye(r)){let s=y(r,o,"plugins");for(let i of ye(s)){let a=y(s,i),l="",c=o;try{let f=JSON.parse(Ln(y(a,".claude-plugin","plugin.json"),"utf8"));l=f.description??"",c=f.author?.name??o}catch{}let u=Wn(y(a,"skills"),"plugin",i);n.push(...u);let p=0;try{p=Vn(y(a,"commands"),{withFileTypes:!0}).filter(f=>f.name.endsWith(".md")).length}catch{}t.push({name:i,description:l,author:c,source:"marketplace",skillCount:u.length,commandCount:p})}}return n.sort((o,s)=>o.name.localeCompare(s.name)||o.pluginName.localeCompare(s.pluginName)),t.sort((o,s)=>o.name.localeCompare(s.name)),{skills:n,plugins:t}}function co(e,n){let t=[],r={mode:"replace",skills:[],plugins:[]},o=JSON.stringify({skills:[],plugins:[]}).length,s=(i,a)=>{let l=JSON.stringify(i).length+1;o+l>n&&(r.skills.length>0||r.plugins.length>0)&&(t.push(r),r={mode:"append",skills:[],plugins:[]},o=JSON.stringify({skills:[],plugins:[]}).length),a==="skill"?r.skills.push(i):r.plugins.push(i),o+=l};for(let i of e.skills)s(i,"skill");for(let i of e.plugins)s(i,"plugin");return t.push(r),t}var Jn=6e3;async function Hn(e){let n=e??process.env.HOME??process.env.USERPROFILE??"",t=S(n),r=Fn(y(n,".claude")),o=co(r,Jn),s=t.orchestratorUrl.replace(/\/$/,""),i=w(n),a=k();for(let l of o){let c=await fetch(`${s}/v1/inventory/skills`,{method:"POST",headers:v(t.orgId,t.apiKey),body:JSON.stringify({orgId:t.orgId,machineId:i,hostname:a,mode:l.mode,skills:l.skills,plugins:l.plugins})});if(!c.ok){let u=await c.text();throw new Error(`scan-skills upload failed: ${c.status} ${u}`)}}return{uploaded:r.skills.length+r.plugins.length,skills:r.skills.length,plugins:r.plugins.length,chunks:o.length}}function lo(e,n,t){let r=t.risk_assessment?.recommendation??"",o=t.risk_assessment?.score??0;return(t.issues??[]).map(s=>({category:s.category??"uncategorized",severity:(s.severity??"low").toLowerCase(),title:s.finding??s.id??"finding",owaspMcp:"",skillName:e.name,recommendation:r,metadata:{rule_id:s.id??"",skill_name:e.name,plugin_name:e.pluginName,source_path:e.path,file:s.location?.file??"",start_line:s.location?.start_line??null,explanation:s.explanation??"",remediation:s.remediation??"",recommendation:r,risk_score:o,machine_id:n}}))}function uo(e,n){let t=[],r=[],o=0;for(let s of e){let i=JSON.stringify(s).length+1;o+i>n&&r.length>0&&(t.push(r),r=[],o=0),r.push(s),o+=i}return r.length>0&&t.push(r),t}async function po(e){let{execFile:n}=await import("node:child_process"),{promisify:t}=await import("node:util"),r=t(n),o;try{({stdout:o}=await r("skillspector",["scan",e,"--format","json","--no-llm"],{timeout:18e4,maxBuffer:50*1024*1024}))}catch(s){if(o=s.stdout??"",!o)return null}try{return JSON.parse(o)}catch{return null}}async function Dn(e,n=po){let t=e??process.env.HOME??process.env.USERPROFILE??"",r=S(t),o=Fn(y(t,".claude")),s=w(t),i=k(),a=[],l=0;for(let p of o.skills){if(!p.path)continue;let f=await n(p.path);f&&(l++,a.push(...lo(p,s,f)))}let c=r.orchestratorUrl.replace(/\/$/,""),u=uo(a,Jn);for(let p of u){let f=await fetch(`${c}/v1/inventory/skill-findings`,{method:"POST",headers:v(r.orgId,r.apiKey),body:JSON.stringify({orgId:r.orgId,machineId:s,hostname:i,findings:p})});if(!f.ok){let C=await f.text();throw new Error(`scan-skills findings upload failed: ${f.status} ${C}`)}}return{skillsScanned:l,findings:a.length,chunks:u.length}}import{readFileSync as fo}from"node:fs";import{join as G}from"node:path";function mo(e,n){let t;try{t=JSON.parse(fo(e,"utf8"))}catch{return[]}let r=t.mcpServers;if(!r||typeof r!="object")return[];let o=[];for(let[s,i]of Object.entries(r)){if(!s||!i||typeof i!="object")continue;let a=i.url??i.serverUrl??"",l=(i.type??i.transport??"").toLowerCase(),c=a?l==="sse"?"sse":"streamable-http":"stdio";o.push({name:s,client:n,transport:c,command:i.command??"",args:Array.isArray(i.args)?i.args.map(String):[],url:a,sourcePath:e})}return o}function go(e){let n=[{path:G(e,".claude.json"),client:"Claude Code"},{path:G(e,".cursor","mcp.json"),client:"Cursor"},{path:G(e,".codeium","windsurf","mcp_config.json"),client:"Windsurf"},{path:G(e,"Library","Application Support","Claude","claude_desktop_config.json"),client:"Claude Desktop"}],t=[];for(let r of n)t.push(...mo(r.path,r.client));return t.sort((r,o)=>r.name.localeCompare(o.name)||r.client.localeCompare(o.client)),t}function ho(e,n){let t=[],r={mode:"replace",servers:[]},o=JSON.stringify({servers:[]}).length;for(let s of e){let i=JSON.stringify(s).length+1;o+i>n&&r.servers.length>0&&(t.push(r),r={mode:"append",servers:[]},o=JSON.stringify({servers:[]}).length),r.servers.push(s),o+=i}return t.push(r),t}var yo=6e3;async function Kn(e){let n=e??process.env.HOME??process.env.USERPROFILE??"",t=S(n),r=go(n),o=ho(r,yo),s=t.orchestratorUrl.replace(/\/$/,""),i=w(n),a=k();for(let l of o){let c=await fetch(`${s}/v1/inventory/mcp`,{method:"POST",headers:v(t.orgId,t.apiKey),body:JSON.stringify({orgId:t.orgId,machineId:i,hostname:a,mode:l.mode,servers:l.servers})});if(!c.ok){let u=await c.text();throw new Error(`scan-mcp upload failed: ${c.status} ${u}`)}}return{servers:r.length,chunks:o.length}}import{execFileSync as z}from"node:child_process";import{existsSync as vo,readdirSync as So,readFileSync as Bn,realpathSync as wo}from"node:fs";import{homedir as ko,hostname as Co,release as j}from"node:os";import{basename as xo,dirname as bo,join as Po}from"node:path";var Oo=[{key:"claude-code",displayName:"Claude Code",isCli:!0,detect:{darwin:["~/.local/bin/claude","~/.claude/local/claude","/opt/homebrew/bin/claude","/usr/local/bin/claude"],linux:["~/.local/bin/claude","~/.npm-global/bin/claude","/usr/local/bin/claude"],win32:["%APPDATA%\\npm\\claude.cmd","%USERPROFILE%\\.local\\bin\\claude.exe"]},version:{darwin:{strategy:"symlink-version"},linux:{strategy:"symlink-version"},win32:{strategy:"none"}}},{key:"claude-desktop",displayName:"Claude Desktop",isCli:!1,detect:{darwin:["/Applications/Claude.app/Contents/Info.plist","~/Applications/Claude.app/Contents/Info.plist"],win32:["%LOCALAPPDATA%\\AnthropicClaude\\claude.exe"]},version:{darwin:{strategy:"plist"},win32:{strategy:"none"}}},{key:"chatgpt-desktop",displayName:"ChatGPT Desktop",isCli:!1,detect:{darwin:["/Applications/ChatGPT.app/Contents/Info.plist","~/Applications/ChatGPT.app/Contents/Info.plist"]},version:{darwin:{strategy:"plist"}}},{key:"cursor",displayName:"Cursor",isCli:!1,detect:{darwin:["/Applications/Cursor.app/Contents/Info.plist"],win32:["%LOCALAPPDATA%\\Programs\\cursor\\Cursor.exe"],linux:["/usr/share/cursor/resources/app/package.json","/opt/cursor/resources/app/package.json"]},version:{darwin:{strategy:"plist"},linux:{strategy:"pkgjson"},win32:{strategy:"none"}}},{key:"windsurf",displayName:"Windsurf",isCli:!1,detect:{darwin:["/Applications/Windsurf.app/Contents/Info.plist"],win32:["%LOCALAPPDATA%\\Programs\\Windsurf\\Windsurf.exe"],linux:["/usr/share/windsurf/resources/app/package.json","/opt/windsurf/resources/app/package.json"]},version:{darwin:{strategy:"plist"},linux:{strategy:"pkgjson"},win32:{strategy:"none"}}},{key:"ollama",displayName:"Ollama",isCli:!0,detect:{darwin:["/opt/homebrew/bin/ollama","/usr/local/bin/ollama","/Applications/Ollama.app/Contents/Info.plist"],win32:["%LOCALAPPDATA%\\Programs\\Ollama\\ollama.exe"],linux:["/usr/local/bin/ollama","/usr/bin/ollama"]},version:{darwin:{strategy:"exec-version"},linux:{strategy:"exec-version"},win32:{strategy:"none"}}},{key:"openai-codex",displayName:"OpenAI Codex",isCli:!0,detect:{darwin:["/Applications/Codex.app/Contents/Info.plist","~/.npm-global/bin/codex"]},version:{darwin:{strategy:"plist"}}},{key:"perplexity-desktop",displayName:"Perplexity Desktop",isCli:!1,detect:{darwin:["/Applications/Perplexity.app/Contents/Info.plist"]},version:{darwin:{strategy:"plist"}}},{key:"google-antigravity",displayName:"Google Antigravity",isCli:!1,detect:{darwin:["/Applications/Antigravity.app/Contents/Info.plist"]},version:{darwin:{strategy:"plist"}}},{key:"warp",displayName:"Warp",isCli:!1,detect:{darwin:["/Applications/Warp.app/Contents/Info.plist"]},version:{darwin:{strategy:"plist"}}},{key:"wispr-flow",displayName:"Wispr Flow",isCli:!1,detect:{darwin:["/Applications/Wispr Flow.app/Contents/Info.plist"]},version:{darwin:{strategy:"plist"}}},{key:"conductor",displayName:"Conductor",isCli:!1,detect:{darwin:["/Applications/Conductor.app/Contents/Info.plist"]},version:{darwin:{strategy:"plist"}}},{key:"lm-studio",displayName:"LM Studio",isCli:!1,detect:{darwin:["/Applications/LM Studio.app/Contents/Info.plist"],win32:["%LOCALAPPDATA%\\Programs\\lm-studio\\LM Studio.exe"]},version:{darwin:{strategy:"plist"},win32:{strategy:"none"}}}],Ao=/\d+(?:\.\d+){1,4}/;function Eo(e,n){let t=e;return t.startsWith("~")&&(t=n+t.slice(1)),t=t.replace(/%([^%]+)%/g,(r,o)=>process.env[o]??""),t}function Io(e){if(!e.includes("*"))return vo(e)?e:null;let n=bo(e),t=xo(e),r=t.indexOf("*"),o=t.slice(0,r),s=t.slice(r+1),i;try{i=So(n)}catch{return null}for(let a of i)if(a.startsWith(o)&&a.endsWith(s)&&a.length>=o.length+s.length)return Po(n,a);return null}function To(e){let n=e.replace(/\.plist$/,"");try{return z("defaults",["read",n,"CFBundleShortVersionString"],{encoding:"utf8",timeout:4e3,stdio:["ignore","pipe","ignore"]}).trim()}catch{return""}}function Ro(e){try{let n=JSON.parse(Bn(e,"utf8"));return typeof n.version=="string"?n.version.trim():""}catch{return""}}function _o(e){try{let n=wo(e);for(let t of n.split(/[/\\]/)){let r=t.match(/^\d+(?:\.\d+){1,4}$/);if(r)return r[0]}}catch{}return""}function Uo(e){try{let t=z(e,["--version"],{encoding:"utf8",timeout:4e3,stdio:["ignore","pipe","ignore"]}).match(Ao);return t?t[0]:""}catch{return""}}function No(e,n){switch(e){case"plist":return To(n);case"pkgjson":return Ro(n);case"symlink-version":return _o(n);case"exec-version":return Uo(n);case"none":return""}}function Mo(e,n){let t=[];for(let r of Oo){let o=r.detect[e];if(!o)continue;let s="";for(let l of o){let c=Io(Eo(l,n));if(c){s=c;break}}if(s==="")continue;let i=r.version[e],a=i?No(i.strategy,s):"";t.push({key:r.key,name:r.displayName,version:a,sourcePath:s})}return t.sort((r,o)=>r.name.localeCompare(o.name)),t}function jo(){try{let e=z("sw_vers",["-productName"],{encoding:"utf8",timeout:4e3}).trim(),n=z("sw_vers",["-productVersion"],{encoding:"utf8",timeout:4e3}).trim(),t=n.split(".")[0]??"";return{platform:t?`${e} ${t}`:e,version:n}}catch{return{platform:"macOS",version:j()}}}function $o(){try{let n=Bn("/etc/os-release","utf8").match(/^PRETTY_NAME="?([^"\n]+)"?/m);if(n&&n[1])return{platform:n[1],version:j()}}catch{}return{platform:"Linux",version:j()}}function Wo(){let e=j();return{platform:Number(e.split(".")[2]??"0")>=22e3?"Windows 11":"Windows 10",version:e}}function Vo(e){let n;e==="darwin"?n=jo():e==="linux"?n=$o():e==="win32"?n=Wo():n={platform:e,version:j()};let t="";return e==="win32"&&(t=(process.env.USERDNSDOMAIN??process.env.USERDOMAIN??"").trim()),{hostname:k()||Co(),osPlatform:n.platform,osVersion:n.version,deviceType:"Workstation",accountName:ge(),accountDomain:t}}async function ve(e={}){let n=e.home??process.env.HOME??process.env.USERPROFILE??ko(),t=process.platform,r=Mo(t,n),o=Vo(t);if(e.dryRun)return{agents:r.length,detected:r,host:o,uploaded:!1};let s=S(n),i=s.orchestratorUrl.replace(/\/$/,""),a=w(n),l=await fetch(`${i}/v1/inventory/agents`,{method:"POST",headers:v(s.orgId,s.apiKey),body:JSON.stringify({orgId:s.orgId,machineId:a,hostname:o.hostname,osPlatform:o.osPlatform,osVersion:o.osVersion,deviceType:o.deviceType,accountName:o.accountName,accountDomain:o.accountDomain,agents:r.map(c=>({key:c.key,name:c.name,version:c.version,sourcePath:c.sourcePath}))})});if(!l.ok){let c=await l.text();throw new Error(`scan-agents upload failed: ${l.status} ${c}`)}return{agents:r.length,detected:r,host:o,uploaded:!0}}import{execFile as Lo}from"node:child_process";import{readFileSync as Fo,writeFileSync as Jo}from"node:fs";import{join as Ho}from"node:path";var Do=24*60*60*1e3,Ko=2e3,Bo=6e4,Go=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;function zn(e){return Ho(e,".venos","update-check.json")}function zo(e){try{let n=JSON.parse(Fo(zn(e),"utf8"));if(typeof n.checkedAt=="number"&&n.policy&&typeof n.policy.mode=="string")return n}catch{}return null}function Yo(e,n){try{Jo(zn(e),JSON.stringify(n))}catch{}}function Gn(e){let n=/^(\d+)\.(\d+)\.(\d+)/.exec(e.trim());return n?[Number(n[1]),Number(n[2]),Number(n[3])]:null}function Zo(e,n){let t=Gn(e),r=Gn(n);if(!t||!r)return!1;for(let o=0;o<3;o++){if(t[o]>r[o])return!0;if(t[o]<r[o])return!1}return!1}async function Xo(e,n,t){let o=`${e.replace(/\/$/,"")}/api/cli/policy?orgId=${encodeURIComponent(n)}`;try{let s=await t(o,{signal:AbortSignal.timeout(Ko)});if(!s.ok)return null;let i=await s.json();return{mode:typeof i.mode=="string"&&i.mode!==""?i.mode:"notify",latest:typeof i.latest=="string"?i.latest.trim():"",pinnedVersion:typeof i.pinnedVersion=="string"?i.pinnedVersion.trim():""}}catch{return null}}function qo(e,n){if(e.mode==="off")return null;if(e.mode==="pinned"){let t=e.pinnedVersion;return t===""||t===n?null:{kind:"notify",targetVersion:t,message:`venos: your organization pins venos to ${t} (you have ${n}).
|
|
71
|
+
Install it with: npm i -g @venos-inc/venos@${t}`}}return Zo(e.latest,n)?e.mode==="auto"?{kind:"auto",targetVersion:e.latest,message:`venos: auto-updating ${n} -> ${e.latest} per your organization's policy...`}:{kind:"notify",targetVersion:e.latest,message:`venos: a newer version is available (${n} -> ${e.latest}).
|
|
72
|
+
Update with: npm i -g @venos-inc/venos@latest`}:null}async function Yn(e){let n=e.now??Date.now(),t=e.fetchImpl??fetch,r,o=zo(e.home);if(o&&n-o.checkedAt<Do)r=o.policy;else{if(r=await Xo(e.orchestratorUrl,e.orgId,t),r===null)return null;Yo(e.home,{checkedAt:n,policy:r})}return qo(r,e.currentVersion)}var Qo=(e,n)=>new Promise((t,r)=>{Lo(e,n,{timeout:Bo},o=>{o?r(o):t()})});async function Zn(e,n=Qo){if(!Go.test(e))return!1;try{return await n("npm",["install","-g",`@venos-inc/venos@${e}`]),!0}catch{return!1}}var ns="0.1.5";async function qn(){try{let e=JSON.parse(es(M(Xn()),"utf8"));if(!e.orchestratorUrl||!e.orgId)return;let n=await Yn({currentVersion:ns,orchestratorUrl:e.orchestratorUrl,orgId:e.orgId,home:Xn()});if(!n)return;if(n.kind==="auto"){process.stderr.write(`
|
|
73
|
+
${n.message}
|
|
74
|
+
`);let t=await Zn(n.targetVersion);process.stderr.write(t?`venos: updated to ${n.targetVersion}. Re-run venos to use it.
|
|
75
|
+
`:`venos: auto-update failed. Install manually: npm i -g @venos-inc/venos@${n.targetVersion}
|
|
76
|
+
`);return}process.stderr.write(`
|
|
77
|
+
${n.message}
|
|
78
|
+
`)}catch{}}var Qn=`Usage: venos <command> [options]
|
|
64
79
|
|
|
65
80
|
Commands:
|
|
66
81
|
init Wire your AI client(s) to the venos security gateway
|
|
67
82
|
hook Forward a PreToolUse hook payload to the venos orchestrator
|
|
68
83
|
waste-scan Scan recent sessions for cost waste and report to the orchestrator
|
|
84
|
+
usage-sync Aggregate Claude Code usage (tokens, cost, skills/subagents/MCP) and report it
|
|
85
|
+
scan-skills Report this device's installed agent skills/plugins to the org inventory
|
|
86
|
+
scan-mcp Report this device's configured MCP servers to the org inventory
|
|
87
|
+
scan-agents Report this device's installed local AI agent apps to the org inventory
|
|
69
88
|
help Show this help
|
|
70
89
|
|
|
71
90
|
Options (init):
|
|
@@ -78,6 +97,14 @@ Options (init):
|
|
|
78
97
|
--remove Inverse of init \u2014 drop the venos entry from every
|
|
79
98
|
wired client's config and delete ~/.venos/config.json.
|
|
80
99
|
Pre-venos .venos-backup snapshots are preserved.
|
|
81
|
-
`;function
|
|
82
|
-
`);break}case"
|
|
83
|
-
${
|
|
100
|
+
`;function x(e,n){let t=e.indexOf(n);if(!(t===-1||t+1>=e.length))return e[t+1]}function b(e,n){return e.includes(n)}async function ts(){let e=process.argv.slice(2),n=e[0];switch(n){case"init":{if(b(e,"--remove")){Pn({json:b(e,"--json")});break}let t=x(e,"--orchestrator"),r=x(e,"--api-key"),o=x(e,"--org"),s=b(e,"--json");await bn({...t!==void 0?{orchestratorUrl:t}:{},...r!==void 0?{apiKey:r}:{},...o!==void 0?{orgId:o}:{},json:s,noTelemetry:b(e,"--no-telemetry")}),s||await qn();break}case"hook":{let t=x(e,"--source");await Tn(void 0,t??"claude-code");break}case"waste-scan":{let t=await Mn();process.stdout.write(`venos waste-scan: ${t.sessionsScanned} session(s) scanned, ${t.findingsStored} finding(s) reported
|
|
101
|
+
`);break}case"usage-sync":{if(b(e,"--throttle")){let i=jn();process.stdout.write(`venos usage-sync --throttle: ${i.reason}
|
|
102
|
+
`);break}let t=x(e,"--org"),r=x(e,"--orchestrator"),o=x(e,"--api-key"),s=await $n({...t!==void 0?{orgId:t}:{},...r!==void 0?{orchestratorUrl:r}:{},...o!==void 0?{apiKey:o}:{}});process.stdout.write(`venos usage-sync: ${s.sessionsScanned} session(s) scanned, ${s.sessionsStored} stored
|
|
103
|
+
`);break}case"scan-skills":{if(b(e,"--scan")){let r=await Dn();process.stdout.write(`venos scan-skills --scan: ${r.findings} finding(s) from ${r.skillsScanned} skill(s) reported in ${r.chunks} chunk(s)
|
|
104
|
+
`);break}let t=await Hn();process.stdout.write(`venos scan-skills: ${t.skills} skill(s) + ${t.plugins} plugin(s) reported
|
|
105
|
+
`);break}case"scan-mcp":{let t=await Kn();process.stdout.write(`venos scan-mcp: ${t.servers} MCP server(s) reported in ${t.chunks} chunk(s)
|
|
106
|
+
`);break}case"scan-agents":{if(b(e,"--dry-run")){let r=await ve({dryRun:!0});process.stdout.write(JSON.stringify(r,null,2)+`
|
|
107
|
+
`);break}let t=await ve();process.stdout.write(`venos scan-agents: ${t.agents} local AI agent(s) reported
|
|
108
|
+
`);break}case"upgrade":await Rn();return;case"help":case void 0:process.stdout.write(Qn),await qn(),process.exit(0);break;default:process.stderr.write(`Unknown subcommand: ${n}
|
|
109
|
+
${Qn}`),process.exit(2)}}try{await ts()}catch(e){let n=e instanceof Error?e.message:String(e);process.stderr.write(`venos: ${n}
|
|
110
|
+
`),process.exit(1)}
|
package/etc/mcp-server/client.js
CHANGED
|
@@ -86,7 +86,13 @@ export class VenosClient {
|
|
|
86
86
|
async finops() {
|
|
87
87
|
return this.get("/api/finops/summary");
|
|
88
88
|
}
|
|
89
|
-
|
|
89
|
+
// Claude Code device-usage rollup: per-model tokens with read-time-derived
|
|
90
|
+
// cost plus skill / subagent / MCP-server attribution. `sinceHours` is an
|
|
91
|
+
// optional lookback window (server default is 30 days).
|
|
92
|
+
async usage(sinceHours) {
|
|
93
|
+
return this.get("/api/finops/claude-usage", sinceHours !== undefined ? { sinceHours: String(sinceHours) } : undefined);
|
|
94
|
+
}
|
|
95
|
+
async classify(text, origin) {
|
|
90
96
|
// VENOS_SOURCE is injected by each client's CLI adapter (cursor, codex, …)
|
|
91
97
|
// when it wires the MCP server entry, so events land tagged with the
|
|
92
98
|
// correct source. Defaults to "cursor" for back-compat with existing
|
|
@@ -96,10 +102,18 @@ export class VenosClient {
|
|
|
96
102
|
const headers = { "Content-Type": "application/json" };
|
|
97
103
|
if (this.cfg.apiKey)
|
|
98
104
|
headers["Authorization"] = `Bearer ${this.cfg.apiKey}`;
|
|
105
|
+
// origin is an optional caller-supplied provenance label; only include it
|
|
106
|
+
// when present so legacy payloads stay byte-identical.
|
|
107
|
+
const body = {
|
|
108
|
+
orgId: this.cfg.orgId,
|
|
109
|
+
prompt: text,
|
|
110
|
+
};
|
|
111
|
+
if (origin?.trim())
|
|
112
|
+
body.origin = origin.trim();
|
|
99
113
|
const res = await fetch(url.toString(), {
|
|
100
114
|
method: "POST",
|
|
101
115
|
headers,
|
|
102
|
-
body: JSON.stringify(
|
|
116
|
+
body: JSON.stringify(body),
|
|
103
117
|
});
|
|
104
118
|
if (!res.ok)
|
|
105
119
|
throw new Error(`venos hook → ${res.status} ${res.statusText}`);
|
|
@@ -117,6 +131,15 @@ export class VenosClient {
|
|
|
117
131
|
const data = await this.get("/api/policy-decisions/almost-blocked/breakdown", from ? { from } : undefined);
|
|
118
132
|
return data.breakdown ?? [];
|
|
119
133
|
}
|
|
134
|
+
// Internal knowledge RAG (P2b): embed the query server-side and return the
|
|
135
|
+
// top chunks ranked by cosine similarity. limit clamps to [1,20] server-side.
|
|
136
|
+
async knowledgeSearch(query, limit) {
|
|
137
|
+
const params = { q: query };
|
|
138
|
+
if (limit !== undefined)
|
|
139
|
+
params["limit"] = String(limit);
|
|
140
|
+
const data = await this.get("/api/knowledge/search", params);
|
|
141
|
+
return data.hits ?? [];
|
|
142
|
+
}
|
|
120
143
|
// Host-layer enforce-readiness: per operator-blocked agent, how many real
|
|
121
144
|
// stored events host-layer enforcement would have stopped in the window.
|
|
122
145
|
async hostWouldBlock(from) {
|
|
@@ -6,9 +6,9 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/
|
|
9
|
+
export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/bin/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/js-yaml@4.1.1/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/
|
|
11
|
+
export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/bin/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/js-yaml@4.1.1/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
14
|
exec "$basedir/node" "$basedir/../../../../../../js-yaml@4.1.1/node_modules/js-yaml/bin/js-yaml.js" "$@"
|
|
@@ -6,9 +6,9 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/
|
|
9
|
+
export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/eslint@9.17.0/node_modules/eslint/bin/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/eslint@9.17.0/node_modules/eslint/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/eslint@9.17.0/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/
|
|
11
|
+
export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/eslint@9.17.0/node_modules/eslint/bin/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/eslint@9.17.0/node_modules/eslint/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/eslint@9.17.0/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
14
|
exec "$basedir/node" "$basedir/../../../../../../eslint@9.17.0/node_modules/eslint/bin/eslint.js" "$@"
|
package/etc/mcp-server/node_modules/@typescript-eslint/eslint-plugin/node_modules/.bin/eslint
CHANGED
|
@@ -6,9 +6,9 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/
|
|
9
|
+
export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/eslint@9.17.0/node_modules/eslint/bin/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/eslint@9.17.0/node_modules/eslint/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/eslint@9.17.0/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/
|
|
11
|
+
export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/eslint@9.17.0/node_modules/eslint/bin/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/eslint@9.17.0/node_modules/eslint/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/eslint@9.17.0/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
14
|
exec "$basedir/node" "$basedir/../../../../../../eslint@9.17.0/node_modules/eslint/bin/eslint.js" "$@"
|
|
@@ -6,9 +6,9 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/
|
|
9
|
+
export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/bin/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/typescript@5.6.3/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/
|
|
11
|
+
export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/bin/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/typescript@5.6.3/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
14
|
exec "$basedir/node" "$basedir/../../../../../../typescript@5.6.3/node_modules/typescript/bin/tsc" "$@"
|