@zenovay/cli 0.1.11 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{readConfig as e}from"./config-ZTGpKEWg.js";import{ApiClient as t,readToken as n}from"./api-BhdaCghp.js";import{detectInstalled as r,initCommand as i}from"./init-SRJ78xPF.js";import{parseSseStream as a}from"./client-DZ4Awt8u.js";import"./formatter-45-fT1Hv.js";import{emit as o,isHeadless as s}from"./emit-0WJ_OGeT.js";import"./login-DHLIZV8C.js";import{Panel as c}from"./panel-DglZ755S.js";import"./keybar-D2OI-8rx.js";import{Select as l}from"./prompt-hjzdzlyj.js";import"./sparkline-CR_bzxwB.js";import{Box as u,Text as d,render as f}from"ink";import p from"react";async function m(e){let t=await r(e.cwd),n;if(e.mode)n=e.mode;else if(!t.installed)n=`install`;else if(s(e))return o({type:`error`,code:`no_mode`,message:`Headless mode requires --mode chat|mcp|install`}),2;else n=await h(t);return n===`install`?i({cliVersion:e.cliVersion,cwd:e.cwd,json:e.json}):n===`chat`?g(e):_(e)}async function h(e){return new Promise(t=>{let n=[{label:`Chat with your analytics`,value:`chat`,description:`Ask natural-language questions about your data`},{label:`Manage via MCP`,value:`mcp`,description:`Create goals, funnels, sites, etc. in plain English`},{label:`Re-run install / repair`,value:`install`,description:`Run the install wizard again`}],{unmount:r}=f(p.createElement(u,{flexDirection:`column`},p.createElement(c,{title:`Zenovay detected${e.packageMarker?` (${e.packageMarker})`:``}`,state:`idle`},p.createElement(d,null,`What do you want to do?`)),p.createElement(l,{items:n,onSelect:e=>{r(),t(e)}})))})}async function g(r){let i=await e(),o=await n({strict:!1});if(!o)return process.stderr.write("Not logged in — run `zenovay login` first.\n"),2;let s=new t({config:i,cliVersion:r.cliVersion,token:o});process.stdout.write(`
1
+ import{readConfig as e}from"./config-ZTGpKEWg.js";import{ApiClient as t,readToken as n}from"./api-BhdaCghp.js";import{detectInstalled as r,initCommand as i}from"./init--eTjzzmh.js";import{parseSseStream as a}from"./client-DZ4Awt8u.js";import"./formatter-45-fT1Hv.js";import{emit as o,isHeadless as s}from"./emit-0WJ_OGeT.js";import"./login-DHLIZV8C.js";import{Panel as c}from"./panel-DglZ755S.js";import"./keybar-D2OI-8rx.js";import{Select as l}from"./prompt-hjzdzlyj.js";import"./sparkline-CR_bzxwB.js";import{Box as u,Text as d,render as f}from"ink";import p from"react";async function m(e){let t=await r(e.cwd),n;if(e.mode)n=e.mode;else if(!t.installed)n=`install`;else if(s(e))return o({type:`error`,code:`no_mode`,message:`Headless mode requires --mode chat|mcp|install`}),2;else n=await h(t);return n===`install`?i({cliVersion:e.cliVersion,cwd:e.cwd,json:e.json}):n===`chat`?g(e):_(e)}async function h(e){return new Promise(t=>{let n=[{label:`Chat with your analytics`,value:`chat`,description:`Ask natural-language questions about your data`},{label:`Manage via MCP`,value:`mcp`,description:`Create goals, funnels, sites, etc. in plain English`},{label:`Re-run install / repair`,value:`install`,description:`Run the install wizard again`}],{unmount:r}=f(p.createElement(u,{flexDirection:`column`},p.createElement(c,{title:`Zenovay detected${e.packageMarker?` (${e.packageMarker})`:``}`,state:`idle`},p.createElement(d,null,`What do you want to do?`)),p.createElement(l,{items:n,onSelect:e=>{r(),t(e)}})))})}async function g(r){let i=await e(),o=await n({strict:!1});if(!o)return process.stderr.write("Not logged in — run `zenovay login` first.\n"),2;let s=new t({config:i,cliVersion:r.cliVersion,token:o});process.stdout.write(`
2
2
  Zenovay · chat mode — type your question then press Enter. Ctrl-C to exit.
3
3
 
4
4
  > `);let c=await v();if(!c)return 0;let l=await s.openAiStream(`chat`,{messages:[{role:`user`,content:c}]});for await(let e of a(l)){if(e.type===`delta`&&process.stdout.write(e.content),e.type===`done`){process.stdout.write(`
package/dist/bin.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{cac as e}from"cac";import{fork as t}from"node:child_process";import n from"node:path";import{fileURLToPath as r}from"node:url";import{readFileSync as i}from"node:fs";const a=n.dirname(r(import.meta.url)),o=n.join(a,`..`,`package.json`),s=JSON.parse(i(o,`utf8`)),c=s.version,l=process.argv[0]??`zenovay`;function u(){if(!(process.env.ZENOVAY_NO_UPDATE_CHECK===`1`||process.env.CI===`true`))try{let e=n.join(a,`lib`,`update`,`worker.js`),r=t(e,[],{detached:!0,stdio:`ignore`});r.unref()}catch{}}const d=e(`zenovay`);d.version(c),d.help(),d.command(`init`,`AI install wizard — add Zenovay tracking to your codebase`).option(`--json`,`Emit NDJSON events to stdout`).option(`--yes`,`Auto-approve all diffs (for CI)`).option(`--skip-mcp`,`Skip MCP client install`).option(`--skip-verify`,`Skip first-event verification`).action(async e=>{let{initCommand:t}=await import(`./init-bbu-bGfE.js`),n=await t({cliVersion:c,cwd:process.cwd(),json:e.json,yes:e.yes,skipMcp:e.skipMcp,skipVerify:e.skipVerify});process.exitCode=n}),d.command(`login`,`Authenticate via OAuth device flow`).option(`--json`,`Emit NDJSON events`).option(`--no-browser`,`Skip opening the browser automatically`).action(async e=>{let{loginCommand:t}=await import(`./login-D4kNEDVO.js`);await t({cliVersion:c,json:e.json,openBrowser:e.browser!==!1,onCode:e=>{process.stdout.write(`\n Open this URL to authorize the CLI:\n ${e.verificationUriComplete??e.verificationUri}\n Or enter code: ${e.userCode}\n\n`)}})}),d.command(`logout`,`Revoke current session and delete local auth`).option(`--json`,``).action(async e=>{let{logoutCommand:t}=await import(`./logout-DvGiNVs9.js`);await t({cliVersion:c,json:e.json})}),d.command(`ai`,`3-mode AI assistant (install / chat / mcp)`).option(`--mode <mode>`,`install | chat | mcp`).option(`--json`,``).action(async e=>{let{aiCommand:t}=await import(`./ai-D6hUf8VU.js`),n=await t({cliVersion:c,cwd:process.cwd(),mode:e.mode,json:e.json});process.exitCode=n}),d.command(`watch`,`Live TUI dashboard`).option(`--site-id <id>`,`Site ID`).option(`--interval <ms>`,`Poll interval ms`,{default:15e3}).option(`--json`,``).action(async e=>{let{watchCommand:t}=await import(`./watch-CtIJ1ZAz.js`),n=await t({cliVersion:c,siteId:e.siteId,intervalMs:Number(e.interval),json:e.json});process.exitCode=n}),d.command(`events tail`,`Stream live events`).option(`--site-id <id>`,`Site ID`,{default:``}).option(`--filter <expr>`,`Filter expression (e.g. 'type=pageview AND country=US')`).option(`--forward-to <url>`,`POST each event to a webhook with HMAC-SHA256 signature`).option(`--replay-24h`,`Replay the last 24h before going live`).option(`--set-forward-secret <hex>`,`Persist the HMAC secret used by --forward-to`).option(`--json`,``).action(async e=>{let{eventsTailCommand:t}=await import(`./events-tail-C35jGarq.js`),n=await t({cliVersion:c,siteId:e.siteId,json:e.json,filter:e.filter,forwardTo:e.forwardTo,replay24h:e.replay24h,setForwardSecret:e.setForwardSecret});process.exitCode=n}),d.command(`health`,`Run self-diagnostic checks`).option(`--json`,``).action(async e=>{let{healthCommand:t}=await import(`./health-D-nDYCrN.js`),n=await t({cliVersion:c,binaryPath:l,json:e.json});process.exitCode=n}),d.command(`doctor`,`AI-assisted self-healing`).option(`--json`,``).action(async e=>{let{doctorCommand:t}=await import(`./doctor-y7_iOaxP.js`),n=await t({cliVersion:c,binaryPath:l,json:e.json});process.exitCode=n}),d.command(`stats`,`One-shot dashboard summary (scriptable by default)`).option(`--site-id <id>`,`Site ID`).option(`--range <range>`,`Time range: 24h | 7d | 30d`,{default:`24h`}).option(`--watch`,`Auto-refresh every 60s`).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async e=>{let{statsCommand:t}=await import(`./stats-CstuCrtH.js`),n=await t({cliVersion:c,siteId:e.siteId,range:e.range,watch:e.watch,json:e.json,csv:e.csv,tsv:e.tsv,ndjson:e.ndjson});process.exitCode=n}),d.command(`sources`,`Traffic source breakdown with delta arrows`).option(`--site-id <id>`,`Site ID`).option(`--period <p>`,`Period: 7d | 30d | 90d | 1y`,{default:`30d`}).option(`--compare <c>`,`Comparison window (use "prev" for period-over-period)`).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async e=>{let{sourcesCommand:t}=await import(`./sources-BzZK-YOD.js`),n=await t({cliVersion:c,siteId:e.siteId,period:e.period,compare:e.compare,json:e.json,csv:e.csv,tsv:e.tsv,ndjson:e.ndjson});process.exitCode=n}),d.command(`vitals`,`Core Web Vitals dashboard (LCP / INP / CLS / TTFB / FCP)`).option(`--site-id <id>`,`Site ID`).option(`--url <path>`,`Filter to a single URL`).option(`--device <type>`,`Filter by device: mobile | desktop`).option(`--window <w>`,`Time window: 24h | 7d | 30d | 90d`,{default:`7d`}).option(`--watch`,`Auto-refresh every 5 minutes`).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async e=>{let{vitalsCommand:t}=await import(`./vitals-D_r_rBbw.js`),n=await t({cliVersion:c,siteId:e.siteId,url:e.url,device:e.device,window:e.window,watch:e.watch,json:e.json,csv:e.csv,tsv:e.tsv,ndjson:e.ndjson});process.exitCode=n}),d.command(`revenue`,`MRR / ARR / transaction series`).option(`--site-id <id>`,`Site ID`).option(`--range <r>`,`Time range: 24h | 7d | 30d | 1y`,{default:`30d`}).option(`--watch`,`Auto-refresh every 5 minutes`).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async e=>{let{revenueCommand:t}=await import(`./revenue-39qQFWdR.js`),n=await t({cliVersion:c,siteId:e.siteId,range:e.range,watch:e.watch,json:e.json,csv:e.csv,tsv:e.tsv,ndjson:e.ndjson});process.exitCode=n}),d.command(`funnels`,`List available funnels`).option(`--site-id <id>`,`Site ID`).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async e=>{let{funnelCommand:t}=await import(`./funnel-BCa_5jW3.js`),n=await t({cliVersion:c,siteId:e.siteId,json:e.json,csv:e.csv,tsv:e.tsv,ndjson:e.ndjson});process.exitCode=n}),d.command(`themes`,`List available themes with colored swatches`).option(`--validate <path>`,`Validate a custom theme JSON file`).option(`--json`,`Emit themes JSON to stdout`).action(async e=>{let{themesCommand:t}=await import(`./themes-F-HUBXpr.js`),n=await t({cliVersion:c,validate:e.validate,json:e.json});process.exitCode=n}),d.command(`completions [shell]`,`Emit shell-completion script (bash | zsh | fish | nushell | pwsh)`).option(`--list`,`List supported shells`).action(async(e,t)=>{let{completionsCommand:n}=await import(`./completions-GDtTbG3B.js`),r=await n({shell:e,list:t.list});process.exitCode=r}),d.command(`query [sql]`,`Restricted SQL REPL over the analytics schema (Scale+)`).option(`--site-id <id>`,`Site ID`).option(`--max-rows <n>`,`Cap result row count`,{default:1e3}).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async(e,t)=>{let{queryCommand:n}=await import(`./query-B8PDpxhG.js`),r=await n({cliVersion:c,siteId:t.siteId,sql:e,maxRows:typeof t.maxRows==`string`?Number(t.maxRows):t.maxRows,json:t.json,csv:t.csv,tsv:t.tsv,ndjson:t.ndjson});process.exitCode=r}),d.command(`companies`,`B2B identification feed (Scale+)`).option(`--site-id <id>`,`Site ID`).option(`--window <w>`,`Time window: 24h | 7d | 30d | 90d`,{default:`24h`}).option(`--limit <n>`,`Max rows`,{default:100}).option(`--new-only`,`Show only newly identified companies (first-seen in last hour)`).option(`--watch`,`Auto-refresh every 30s`).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async e=>{let{companiesCommand:t}=await import(`./companies-Z4LkcGcD.js`),n=await t({cliVersion:c,siteId:e.siteId,window:e.window,limit:typeof e.limit==`string`?Number(e.limit):e.limit,newOnly:e.newOnly,watch:e.watch,json:e.json,csv:e.csv,tsv:e.tsv,ndjson:e.ndjson});process.exitCode=n}),d.command(`projects`,`List your tracked projects`).option(`--site-id <id>`,`Site ID`).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async e=>{let{projectsCommand:t}=await import(`./projects-BCK7Jspy.js`),n=await t({cliVersion:c,siteId:e.siteId,json:e.json,csv:e.csv,tsv:e.tsv,ndjson:e.ndjson});process.exitCode=n}),d.command(`deploys`,`Recent GitHub commits overlaid on charts (Wave 4 W5)`).option(`--site-id <id>`,`Site ID`).option(`--branch <name>`,`Filter to a single branch (e.g. main, develop)`).option(`--since <iso>`,`Only commits after this ISO timestamp`).option(`--limit <n>`,`Max rows`,{default:50}).option(`--connect`,`Print the GitHub-integration deep link in app.zenovay.com`).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async e=>{let{deploysCommand:t}=await import(`./deploys-28qQkagZ.js`),n=await t({cliVersion:c,siteId:e.siteId,branch:e.branch,since:e.since,limit:typeof e.limit==`string`?Number(e.limit):e.limit,connect:e.connect,json:e.json,csv:e.csv,tsv:e.tsv,ndjson:e.ndjson});process.exitCode=n}),d.command(`webhooks forward`,`Forward webhook events to a local URL (stripe-listen-style; W3)`).option(`--to <url>`,`Local URL to POST events to (e.g. localhost:3000/webhook)`).option(`--site-id <id>`,`Site ID`).option(`--sign`,`HMAC-sign each forwarded request with X-Zenovay-Signature`).option(`--secret <hex>`,`HMAC secret (auto-derived from tunnel key if --sign without --secret)`).option(`--max-retries <n>`,`Per-request retry count`,{default:3}).action(async e=>{let{webhooksForwardCommand:t}=await import(`./webhooks-forward-QnE7MdSy.js`),n=await t({cliVersion:c,to:e.to,siteId:e.siteId,sign:e.sign,secret:e.secret,maxRetries:typeof e.maxRetries==`string`?Number(e.maxRetries):e.maxRetries});process.exitCode=n}),d.command(`errors`,`Recent error snapshot (Wave 2 lead-in; SSE coming in V2.1)`).option(`--site-id <id>`,`Site ID`).option(`--window <w>`,`Time window: 24h | 7d | 30d | 90d`,{default:`24h`}).option(`--limit <n>`,`Max errors to fetch`,{default:100}).option(`--search <q>`,`Filter by class or message substring`).option(`--watch`,`Auto-refresh every 30s`).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async e=>{let{errorsCommand:t}=await import(`./errors-CUUuLToC.js`),n=await t({cliVersion:c,siteId:e.siteId,window:e.window,limit:typeof e.limit==`string`?Number(e.limit):e.limit,search:e.search,watch:e.watch,json:e.json,csv:e.csv,tsv:e.tsv,ndjson:e.ndjson});process.exitCode=n}),d.command(`funnel <id>`,`Funnel drop-off chart for a specific funnel`).option(`--site-id <id>`,`Site ID`).option(`--window <w>`,`Time window: 7d | 30d`,{default:`30d`}).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async(e,t)=>{let{funnelCommand:n}=await import(`./funnel-BCa_5jW3.js`),r=await n({cliVersion:c,siteId:t.siteId,funnelId:e,window:t.window,json:t.json,csv:t.csv,tsv:t.tsv,ndjson:t.ndjson});process.exitCode=r}),d.command(`update`,`Manually install the latest version`).option(`--check`,`Don't install — just print latest`).option(`--force-downgrade`,`Allow downgrading to an older version`).option(`--no-update-check`,`Disable auto-update for this invocation`).option(`--json`,``).action(async e=>{let{updateCommand:t}=await import(`./update-2SafBiSk.js`);await t({cliVersion:c,binaryPath:l,check:e.check,forceDowngrade:e.forceDowngrade,json:e.json})}),d.parse(process.argv,{run:!1}),(async()=>{u();try{await d.runMatchedCommand()}catch(e){process.stderr.write(`\n✗ ${e.message}\n`),process.exit(1)}})();
2
+ import{cac as e}from"cac";import{fork as t}from"node:child_process";import n from"node:path";import{fileURLToPath as r}from"node:url";import{readFileSync as i}from"node:fs";const a=n.dirname(r(import.meta.url)),o=n.join(a,`..`,`package.json`),s=JSON.parse(i(o,`utf8`)),c=s.version,l=process.argv[0]??`zenovay`;function u(){if(!(process.env.ZENOVAY_NO_UPDATE_CHECK===`1`||process.env.CI===`true`))try{let e=n.join(a,`lib`,`update`,`worker.js`),r=t(e,[],{detached:!0,stdio:`ignore`});r.unref()}catch{}}const d=e(`zenovay`);d.version(c),d.help(),d.command(`init`,`AI install wizard — add Zenovay tracking to your codebase`).option(`--json`,`Emit NDJSON events to stdout`).option(`--yes`,`Auto-approve all diffs (for CI)`).option(`--skip-mcp`,`Skip MCP client install`).option(`--skip-verify`,`Skip first-event verification`).action(async e=>{let{initCommand:t}=await import(`./init-qzmy4rIN.js`),n=await t({cliVersion:c,cwd:process.cwd(),json:e.json,yes:e.yes,skipMcp:e.skipMcp,skipVerify:e.skipVerify});process.exitCode=n}),d.command(`login`,`Authenticate via OAuth device flow`).option(`--json`,`Emit NDJSON events`).option(`--no-browser`,`Skip opening the browser automatically`).action(async e=>{let{loginCommand:t}=await import(`./login-D4kNEDVO.js`);await t({cliVersion:c,json:e.json,openBrowser:e.browser!==!1,onCode:e=>{process.stdout.write(`\n Open this URL to authorize the CLI:\n ${e.verificationUriComplete??e.verificationUri}\n Or enter code: ${e.userCode}\n\n`)}})}),d.command(`logout`,`Revoke current session and delete local auth`).option(`--json`,``).action(async e=>{let{logoutCommand:t}=await import(`./logout-DvGiNVs9.js`);await t({cliVersion:c,json:e.json})}),d.command(`ai`,`3-mode AI assistant (install / chat / mcp)`).option(`--mode <mode>`,`install | chat | mcp`).option(`--json`,``).action(async e=>{let{aiCommand:t}=await import(`./ai-BkI11rV0.js`),n=await t({cliVersion:c,cwd:process.cwd(),mode:e.mode,json:e.json});process.exitCode=n}),d.command(`watch`,`Live TUI dashboard`).option(`--site-id <id>`,`Site ID`).option(`--interval <ms>`,`Poll interval ms`,{default:15e3}).option(`--json`,``).action(async e=>{let{watchCommand:t}=await import(`./watch-CtIJ1ZAz.js`),n=await t({cliVersion:c,siteId:e.siteId,intervalMs:Number(e.interval),json:e.json});process.exitCode=n}),d.command(`events tail`,`Stream live events`).option(`--site-id <id>`,`Site ID`,{default:``}).option(`--filter <expr>`,`Filter expression (e.g. 'type=pageview AND country=US')`).option(`--forward-to <url>`,`POST each event to a webhook with HMAC-SHA256 signature`).option(`--replay-24h`,`Replay the last 24h before going live`).option(`--set-forward-secret <hex>`,`Persist the HMAC secret used by --forward-to`).option(`--json`,``).action(async e=>{let{eventsTailCommand:t}=await import(`./events-tail-C35jGarq.js`),n=await t({cliVersion:c,siteId:e.siteId,json:e.json,filter:e.filter,forwardTo:e.forwardTo,replay24h:e.replay24h,setForwardSecret:e.setForwardSecret});process.exitCode=n}),d.command(`health`,`Run self-diagnostic checks`).option(`--json`,``).action(async e=>{let{healthCommand:t}=await import(`./health-D-nDYCrN.js`),n=await t({cliVersion:c,binaryPath:l,json:e.json});process.exitCode=n}),d.command(`doctor`,`AI-assisted self-healing`).option(`--json`,``).action(async e=>{let{doctorCommand:t}=await import(`./doctor-y7_iOaxP.js`),n=await t({cliVersion:c,binaryPath:l,json:e.json});process.exitCode=n}),d.command(`stats`,`One-shot dashboard summary (scriptable by default)`).option(`--site-id <id>`,`Site ID`).option(`--range <range>`,`Time range: 24h | 7d | 30d`,{default:`24h`}).option(`--watch`,`Auto-refresh every 60s`).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async e=>{let{statsCommand:t}=await import(`./stats-CstuCrtH.js`),n=await t({cliVersion:c,siteId:e.siteId,range:e.range,watch:e.watch,json:e.json,csv:e.csv,tsv:e.tsv,ndjson:e.ndjson});process.exitCode=n}),d.command(`sources`,`Traffic source breakdown with delta arrows`).option(`--site-id <id>`,`Site ID`).option(`--period <p>`,`Period: 7d | 30d | 90d | 1y`,{default:`30d`}).option(`--compare <c>`,`Comparison window (use "prev" for period-over-period)`).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async e=>{let{sourcesCommand:t}=await import(`./sources-BzZK-YOD.js`),n=await t({cliVersion:c,siteId:e.siteId,period:e.period,compare:e.compare,json:e.json,csv:e.csv,tsv:e.tsv,ndjson:e.ndjson});process.exitCode=n}),d.command(`vitals`,`Core Web Vitals dashboard (LCP / INP / CLS / TTFB / FCP)`).option(`--site-id <id>`,`Site ID`).option(`--url <path>`,`Filter to a single URL`).option(`--device <type>`,`Filter by device: mobile | desktop`).option(`--window <w>`,`Time window: 24h | 7d | 30d | 90d`,{default:`7d`}).option(`--watch`,`Auto-refresh every 5 minutes`).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async e=>{let{vitalsCommand:t}=await import(`./vitals-D_r_rBbw.js`),n=await t({cliVersion:c,siteId:e.siteId,url:e.url,device:e.device,window:e.window,watch:e.watch,json:e.json,csv:e.csv,tsv:e.tsv,ndjson:e.ndjson});process.exitCode=n}),d.command(`revenue`,`MRR / ARR / transaction series`).option(`--site-id <id>`,`Site ID`).option(`--range <r>`,`Time range: 24h | 7d | 30d | 1y`,{default:`30d`}).option(`--watch`,`Auto-refresh every 5 minutes`).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async e=>{let{revenueCommand:t}=await import(`./revenue-39qQFWdR.js`),n=await t({cliVersion:c,siteId:e.siteId,range:e.range,watch:e.watch,json:e.json,csv:e.csv,tsv:e.tsv,ndjson:e.ndjson});process.exitCode=n}),d.command(`funnels`,`List available funnels`).option(`--site-id <id>`,`Site ID`).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async e=>{let{funnelCommand:t}=await import(`./funnel-BCa_5jW3.js`),n=await t({cliVersion:c,siteId:e.siteId,json:e.json,csv:e.csv,tsv:e.tsv,ndjson:e.ndjson});process.exitCode=n}),d.command(`themes`,`List available themes with colored swatches`).option(`--validate <path>`,`Validate a custom theme JSON file`).option(`--json`,`Emit themes JSON to stdout`).action(async e=>{let{themesCommand:t}=await import(`./themes-F-HUBXpr.js`),n=await t({cliVersion:c,validate:e.validate,json:e.json});process.exitCode=n}),d.command(`completions [shell]`,`Emit shell-completion script (bash | zsh | fish | nushell | pwsh)`).option(`--list`,`List supported shells`).action(async(e,t)=>{let{completionsCommand:n}=await import(`./completions-GDtTbG3B.js`),r=await n({shell:e,list:t.list});process.exitCode=r}),d.command(`query [sql]`,`Restricted SQL REPL over the analytics schema (Scale+)`).option(`--site-id <id>`,`Site ID`).option(`--max-rows <n>`,`Cap result row count`,{default:1e3}).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async(e,t)=>{let{queryCommand:n}=await import(`./query-B8PDpxhG.js`),r=await n({cliVersion:c,siteId:t.siteId,sql:e,maxRows:typeof t.maxRows==`string`?Number(t.maxRows):t.maxRows,json:t.json,csv:t.csv,tsv:t.tsv,ndjson:t.ndjson});process.exitCode=r}),d.command(`companies`,`B2B identification feed (Scale+)`).option(`--site-id <id>`,`Site ID`).option(`--window <w>`,`Time window: 24h | 7d | 30d | 90d`,{default:`24h`}).option(`--limit <n>`,`Max rows`,{default:100}).option(`--new-only`,`Show only newly identified companies (first-seen in last hour)`).option(`--watch`,`Auto-refresh every 30s`).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async e=>{let{companiesCommand:t}=await import(`./companies-Z4LkcGcD.js`),n=await t({cliVersion:c,siteId:e.siteId,window:e.window,limit:typeof e.limit==`string`?Number(e.limit):e.limit,newOnly:e.newOnly,watch:e.watch,json:e.json,csv:e.csv,tsv:e.tsv,ndjson:e.ndjson});process.exitCode=n}),d.command(`projects`,`List your tracked projects`).option(`--site-id <id>`,`Site ID`).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async e=>{let{projectsCommand:t}=await import(`./projects-BCK7Jspy.js`),n=await t({cliVersion:c,siteId:e.siteId,json:e.json,csv:e.csv,tsv:e.tsv,ndjson:e.ndjson});process.exitCode=n}),d.command(`deploys`,`Recent GitHub commits overlaid on charts (Wave 4 W5)`).option(`--site-id <id>`,`Site ID`).option(`--branch <name>`,`Filter to a single branch (e.g. main, develop)`).option(`--since <iso>`,`Only commits after this ISO timestamp`).option(`--limit <n>`,`Max rows`,{default:50}).option(`--connect`,`Print the GitHub-integration deep link in app.zenovay.com`).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async e=>{let{deploysCommand:t}=await import(`./deploys-28qQkagZ.js`),n=await t({cliVersion:c,siteId:e.siteId,branch:e.branch,since:e.since,limit:typeof e.limit==`string`?Number(e.limit):e.limit,connect:e.connect,json:e.json,csv:e.csv,tsv:e.tsv,ndjson:e.ndjson});process.exitCode=n}),d.command(`webhooks forward`,`Forward webhook events to a local URL (stripe-listen-style; W3)`).option(`--to <url>`,`Local URL to POST events to (e.g. localhost:3000/webhook)`).option(`--site-id <id>`,`Site ID`).option(`--sign`,`HMAC-sign each forwarded request with X-Zenovay-Signature`).option(`--secret <hex>`,`HMAC secret (auto-derived from tunnel key if --sign without --secret)`).option(`--max-retries <n>`,`Per-request retry count`,{default:3}).action(async e=>{let{webhooksForwardCommand:t}=await import(`./webhooks-forward-QnE7MdSy.js`),n=await t({cliVersion:c,to:e.to,siteId:e.siteId,sign:e.sign,secret:e.secret,maxRetries:typeof e.maxRetries==`string`?Number(e.maxRetries):e.maxRetries});process.exitCode=n}),d.command(`errors`,`Recent error snapshot (Wave 2 lead-in; SSE coming in V2.1)`).option(`--site-id <id>`,`Site ID`).option(`--window <w>`,`Time window: 24h | 7d | 30d | 90d`,{default:`24h`}).option(`--limit <n>`,`Max errors to fetch`,{default:100}).option(`--search <q>`,`Filter by class or message substring`).option(`--watch`,`Auto-refresh every 30s`).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async e=>{let{errorsCommand:t}=await import(`./errors-CUUuLToC.js`),n=await t({cliVersion:c,siteId:e.siteId,window:e.window,limit:typeof e.limit==`string`?Number(e.limit):e.limit,search:e.search,watch:e.watch,json:e.json,csv:e.csv,tsv:e.tsv,ndjson:e.ndjson});process.exitCode=n}),d.command(`funnel <id>`,`Funnel drop-off chart for a specific funnel`).option(`--site-id <id>`,`Site ID`).option(`--window <w>`,`Time window: 7d | 30d`,{default:`30d`}).option(`--json`,``).option(`--csv`,``).option(`--tsv`,``).option(`--ndjson`,``).action(async(e,t)=>{let{funnelCommand:n}=await import(`./funnel-BCa_5jW3.js`),r=await n({cliVersion:c,siteId:t.siteId,funnelId:e,window:t.window,json:t.json,csv:t.csv,tsv:t.tsv,ndjson:t.ndjson});process.exitCode=r}),d.command(`update`,`Manually install the latest version`).option(`--check`,`Don't install — just print latest`).option(`--force-downgrade`,`Allow downgrading to an older version`).option(`--no-update-check`,`Disable auto-update for this invocation`).option(`--json`,``).action(async e=>{let{updateCommand:t}=await import(`./update-2SafBiSk.js`);await t({cliVersion:c,binaryPath:l,check:e.check,forceDowngrade:e.forceDowngrade,json:e.json})}),d.parse(process.argv,{run:!1}),(async()=>{u();try{await d.runMatchedCommand()}catch(e){process.stderr.write(`\n✗ ${e.message}\n`),process.exit(1)}})();
@@ -49,7 +49,7 @@ export default function App({ Component, pageProps }: AppProps) {
49
49
  `+u.join(`
50
50
  `)+`
51
51
  `;if(o)await m.writeFile(i,f,`utf8`);else{let e=await m.open(i,`w`,384);try{await e.writeFile(f,`utf8`)}finally{await e.close()}}return{created:!o,existing:o,addedKeys:c,skippedKeys:l}}const Be=`https://api.zenovay.com/mcp`,Ve=T.object({url:T.string().url(),headers:T.record(T.string(),T.string()).optional()}),He=T.object({mcpServers:T.record(T.string(),Ve).optional()}).passthrough();function Ue(e){return e.HOME??e.USERPROFILE??w.homedir()}function We(e){return e.APPDATA??null}function Ge(e,t){let n=Ue(t),r=We(t),i=[];return i.push({id:`cursor`,displayName:`Cursor`,configPath:p.join(n,`.cursor`,`mcp.json`)}),e===`win32`&&r&&i.push({id:`cursor`,displayName:`Cursor (AppData)`,configPath:p.join(r,`Cursor`,`User`,`globalStorage`,`cursor.mcp`,`mcp.json`)}),e===`darwin`?i.push({id:`claude-desktop`,displayName:`Claude Desktop`,configPath:p.join(n,`Library`,`Application Support`,`Claude`,`claude_desktop_config.json`)}):e===`win32`&&r?i.push({id:`claude-desktop`,displayName:`Claude Desktop`,configPath:p.join(r,`Claude`,`claude_desktop_config.json`)}):i.push({id:`claude-desktop`,displayName:`Claude Desktop`,configPath:p.join(n,`.config`,`Claude`,`claude_desktop_config.json`)}),i.push({id:`vscode`,displayName:`VS Code`,configPath:p.join(n,`.vscode`,`mcp.json`)}),i}async function Ke(e){try{return await m.access(e),!0}catch{return!1}}async function qe(e){try{let t=await m.readFile(e,`utf8`);if(t.trim().length===0)return{};let n=JSON.parse(t),r=He.safeParse(n);return r.success?r.data:n&&typeof n==`object`?n:{}}catch{return{}}}function Je(e){return{url:Be,headers:{Authorization:`Bearer ${e}`}}}async function Y(e){let t=e.env??process.env,n=e.platform??process.platform,r=new Set(e.skip??[]),i=[],a=[],o=[],s=new Set,c=Je(e.accessToken);for(let e of Ge(n,t)){if(r.has(e.id)){a.push(e.displayName);continue}if(s.has(e.configPath))continue;s.add(e.configPath);try{let t=await Ke(e.configPath);if(!t){a.push(e.displayName);continue}let n=await qe(e.configPath),r=`${e.configPath}.bak`;await m.copyFile(e.configPath,r);let o={...n,mcpServers:{...n.mcpServers??{},zenovay:c}};await m.mkdir(p.dirname(e.configPath),{recursive:!0}),await m.writeFile(e.configPath,JSON.stringify(o,null,2)+`
52
- `,`utf8`),i.push(e.displayName)}catch(t){o.push({client:e.displayName,message:t instanceof Error?t.message:String(t)})}}return{installed:i,skipped:a,errors:o}}async function Ye(e,t,n){let r=n.timeoutMs??18e4,i=n.pollIntervalMs??2e3,a=n.now??(()=>Date.now()),o=n.sleep??(e=>new Promise(t=>setTimeout(t,e))),s=a(),c=s+r;for(n.onTick?.(0);;){let l=await n.api.getFirstEvent({siteId:e,since:t});if(l.received)return{received:!0,event:l.event};let u=a()-s;if(u>=r)return{received:!1};let d=c-a(),f=Math.min(i,Math.max(0,d));if(f<=0)return{received:!1};await o(f),n.onTick?.(a()-s)}}const Xe=T.object({path:T.string().min(1)}),Ze=T.object({path:T.string().min(1),content:T.string(),reason:T.string().min(1)}),Qe=T.object({path:T.string().min(1),patch:T.string().min(1),reason:T.string().min(1)}),$e=T.object({}),et=T.object({question:T.string().min(1),choices:T.array(T.string()).optional()});async function tt(e,t){let n=Xe.safeParse(t);if(!n.success)return{ok:!1,content:null,error:`invalid_args`};try{let t=await e.safeRead(n.data.path),r=W.scrubSecrets(t);return{ok:!0,content:W.wrapForModel(n.data.path,r)}}catch(e){return{ok:!1,content:null,error:e.message}}}async function nt(e,t,n){let r=Ze.safeParse(t);if(!r.success)return{ok:!1,content:null,error:`invalid_args`};let{path:i,content:a,reason:o}=r.data,s=``;try{s=await e.safeRead(i)}catch{s=``}let c=await n.approve({path:i,oldContent:s,newContent:a,reason:o});if(c===`n`)return{ok:!1,content:null,error:`skipped_by_user`};if(c===`e`)return{ok:!1,content:null,error:`deferred_to_user_edit`};try{let{backupPath:t}=await e.safeWrite(i,a);return{ok:!0,content:{path:i,backupPath:t}}}catch(e){return{ok:!1,content:null,error:e.message}}}async function rt(e,t,n){let r=Qe.safeParse(t);if(!r.success)return{ok:!1,content:null,error:`invalid_args`};let{path:i,patch:a,reason:o}=r.data;if(/^\*\*\*\s+Begin Patch/m.test(a)||/^\*\*\*\s+Update File:/m.test(a))return{ok:!1,content:null,error:'unsupported_patch_format: This tool only accepts STANDARD unified diff with `--- a/...`, `+++ b/...`, and `@@ -N,M +N,M @@` headers. The "*** Begin Patch / *** Update File:" V4A format is NOT supported. Please call write_file with the full new file content instead.'};let s;try{s=await e.safeRead(i)}catch(e){return{ok:!1,content:null,error:e.message}}let c=ee(s,a);return c===!1||typeof c!=`string`?{ok:!1,content:null,error:`patch_did_not_apply_cleanly. The patch context may not match the file. Try write_file with the full new content instead.`}:nt(e,{path:i,content:c,reason:o},n)}async function it(e){try{let t=K(e),{adapter:n,ranked:r}=await G(t);return{ok:!0,content:{matched:n!==null,adapter:n?.id,displayName:n?.displayName,ranked:r.map(e=>({id:e.adapter.id,confidence:e.result.confidence,reason:e.result.reason}))}}}catch(e){return{ok:!1,content:null,error:e.message}}}async function at(e,t){let n=et.safeParse(t);if(!n.success)return{ok:!1,content:null,error:`invalid_args`};try{let t=await e.ask(n.data);return{ok:!0,content:{answer:t}}}catch(e){return{ok:!1,content:null,error:e.message}}}async function ot(e){let{api:t,sandbox:n,approval:i,prompter:a,handlers:o}=e,s=[...e.initialMessages],c=``,l=0;for(;l<V;){n.incrementRound(),l++;let u=await t.openAiStream(`install`,{messages:s,cwd_fingerprint:n.sessionId,diagnosis:e.diagnosis,targetTrackingCode:e.targetTrackingCode}),d=[],f=``;for await(let e of r(u))switch(e.type){case`delta`:f+=e.content,o?.onDelta?.(e.content);break;case`tool_start`:o?.onToolStart?.({id:e.id,name:e.name});break;case`tool_call`:{let t=await st(e.name,e.arguments,{sandbox:n,cwd:n.cwd,approval:i,prompter:a});d.push({id:e.id,name:e.name,arguments:e.arguments,result:t}),o?.onToolResult?.({id:e.id,name:e.name,result:t});break}case`usage`:o?.onUsage?.(e);break;case`error`:throw o?.onError?.(e),Error(`[${e.code}] ${e.message}`);case`done`:break}if(f&&(c+=f),d.length===0){f&&s.push({role:`assistant`,content:f});break}s.push({role:`assistant`,content:f,toolCalls:d.map(e=>({id:e.id,type:`function`,function:{name:e.name,arguments:JSON.stringify(e.arguments)}}))});for(let e of d)s.push({role:`tool`,toolCallId:e.id,toolName:e.name,content:JSON.stringify(e.result)})}return{finalText:c,rounds:l}}async function st(e,t,n){switch(e){case`read_file`:return tt(n.sandbox,t);case`write_file`:return nt(n.sandbox,t,n.approval);case`patch_file`:return rt(n.sandbox,t,n.approval);case`detect_framework`:return it(n.cwd);case`ask_user`:return at(n.prompter,t);default:return{ok:!1,content:null,error:`unknown_tool:${e}`}}}function ct(){let e=[12,15,18,22,28,35,41,50,58,64,72,78],t=f(e,24);return[` ↑`,` ${t}`,` └────────────────────────`,` May Jun Jul Aug Sep`]}function lt(){return[` Landing page ████████████████████ 100%`,` ↓ -28%`,` Pricing ██████████████░░░░░░ 72%`,` ↓ -50%`,` Checkout ███████░░░░░░░░░░░░░ 36%`,` ↓ -64%`,` Purchased ███░░░░░░░░░░░░░░░░░ 13%`]}function ut(){return[` ▇▇▇▇▇▇▇▇▇▎ 89 Sarah K. /pricing 🇺🇸`,` ▇▇▇▇▇▇░░░░ 61 anon /docs 🇩🇪`,` ▇▇▇░░░░░░░ 34 anon /changelog 🇯🇵`]}function dt(){return[` LCP ● 2.1s good ████████████░░░░░░`,` INP ● 89ms good ██████████████████`,` CLS ⚠ 0.14 needs ████████████░░░░░░`,` TTFB ● 380ms good ███████████████░░░`]}const X=[{title:`Welcome`,body:[`The wizard is an agent — it handles the entire`,`Zenovay setup process on your behalf.`,``,`Reading your project, deciding where the tracker`,`belongs, and writing the snippet for you.`]},{title:`Events`,body:[`Events are the foundation of Zenovay analytics.`,``,`Every pageview, click, and custom action is an`,`event. Group them into Goals to track conversions.`]},{title:`Trends`,body:[`Use trends to measure growth.`,``,`See how visitors, signups, and revenue have`,`changed over the last week, month, or quarter.`],visual:ct},{title:`Funnels`,body:[`Funnels reveal where users drop off.`,``,`Define the steps you care about — landing,`,`pricing, checkout, purchase — and Zenovay shows`,`the per-step conversion rate.`],visual:lt},{title:`Live visitors`,body:[`Watch every visitor in real time, ranked by an`,`AI score that highlights high-intent traffic.`,``,"Use `zenovay visitors --live` after install."],visual:ut},{title:`Core Web Vitals`,body:[`LCP, INP, CLS — Google's page-experience metrics,`,`collected automatically once the tracker is in.`,``,"Use `zenovay vitals` to see them per page + device."],visual:dt},{title:`MCP integration`,body:[`Your CLI session can install Zenovay's MCP server`,`into Cursor / Claude Desktop / VS Code.`,``,`Then ask your AI: "what were my top pages today?"`,`and it queries Zenovay directly.`]},{title:`AI insights`,body:[`Zenovay watches your data and surfaces anomalies`,`automatically — traffic spikes, error bursts,`,`revenue drops — without you needing to ask.`,``,"Run `zenovay ai` after install to chat with them."]},{title:`Privacy-first`,body:[`No cookies required. No third-party trackers.`,`Cookieless mode is one toggle in your dashboard.`,``,`GDPR, CCPA, and PECR-compliant out of the box.`]}],ft=8e3,pt=({width:e,height:t})=>{let[n,r]=C(0);x(()=>{let e=setInterval(()=>{r(e=>(e+1)%X.length)},ft);return()=>clearInterval(e)},[]);let i=X[n],a=i.visual?i.visual():[],o=X.map((e,t)=>t===n?`●`:`·`).join(` `);return b.createElement(h,{flexDirection:`column`,width:e,height:t,paddingX:2,paddingY:1},b.createElement(h,{marginBottom:1},b.createElement(g,{color:`magentaBright`,bold:!0},`Learn`)),b.createElement(h,{marginBottom:1},b.createElement(g,{bold:!0,color:`white`},i.title)),i.body.map((e,t)=>b.createElement(g,{key:t,color:`gray`},e||` `)),a.length>0&&b.createElement(h,{flexDirection:`column`,marginTop:1},a.map((e,t)=>b.createElement(g,{key:t,color:`cyan`},e))),b.createElement(h,{flexGrow:1}),b.createElement(h,{marginTop:1},b.createElement(g,{color:`gray`,dimColor:!0},o,` · `,n+1,` / `,X.length)))},mt={pending:`·`,active:`⠋`,done:`✓`,error:`✗`},ht={pending:`gray`,active:`magenta`,done:`green`,error:`red`},gt=({tasks:e,width:t,height:n,liveLine:r})=>{let i=e.filter(e=>e.status===`done`).length;return b.createElement(h,{flexDirection:`column`,width:t,height:n,paddingX:2,paddingY:1},b.createElement(h,{marginBottom:1},b.createElement(g,{color:`magentaBright`,bold:!0},`Tasks`)),e.map(e=>b.createElement(h,{key:e.id,flexDirection:`column`},b.createElement(h,null,e.status===`active`?b.createElement(g,{color:`magenta`},b.createElement(D,{type:`dots`})):b.createElement(g,{color:ht[e.status]},mt[e.status]),b.createElement(g,null,` `),b.createElement(g,{color:e.status===`pending`?`gray`:`white`},e.label)),e.detail&&b.createElement(h,{paddingLeft:2},b.createElement(g,{color:`gray`,dimColor:!0},e.detail)))),b.createElement(h,{flexGrow:1}),r&&b.createElement(h,{marginTop:1},b.createElement(g,{color:`cyan`},`◆ `),b.createElement(g,{color:`white`},r)),b.createElement(h,{marginTop:1},b.createElement(g,{color:`gray`,dimColor:!0},i,` / `,e.length)))};async function _t(e){return a(e)?vt(e):new Promise(t=>{let{unmount:n,waitUntilExit:r}=_(b.createElement(yt,{opts:e,onExit:e=>{n(),t(e)}}));r().catch(()=>t(1))})}async function vt(r){try{let a=await e(),o=await q(r.cwd);if(!o)return i({type:`error`,code:`no_framework`,message:`Could not detect framework (headless mode has no picker).`}),2;i({type:`framework.detected`,framework:o.id,confidence:1});let s=await n({strict:!1});if(!s&&!process.env.ZENOVAY_API_TOKEN)return i({type:`error`,code:`not_logged_in`,message:"Run `zenovay login` first (or set ZENOVAY_API_TOKEN)."}),2;let c=new t({config:a,cliVersion:r.cliVersion,token:s}),l=await c.getSites(),u=r.siteId?l.find(e=>e.id===r.siteId):l[0];if(!u&&r.siteId)return i({type:`error`,code:`site_not_found`,message:`Site ${r.siteId} not found.`}),2;if(!u)return i({type:`error`,code:`no_site`,message:`No sites exist; create one at app.zenovay.com or re-run interactively.`}),2;i({type:`info`,message:`Using site ${u.id} (${u.name}) trackingCode=${u.trackingCode??u.id}`});let d=await J(r.cwd,{[o.envVarName]:u.trackingCode??u.id});return i({type:`info`,message:`env vars added: ${d.addedKeys.join(`,`)}`}),i({type:`done`,command:`init`,exitCode:0}),0}catch(e){return i({type:`error`,code:`init_failed`,message:e.message}),1}}const yt=({opts:r,onExit:i})=>{let{exit:a}=v(),[l,d]=C(`intro`),[f,p]=C(null),[m,_]=C([]),[y,w]=C(null),[T,E]=C(null),[O,k]=C(null),[ee,A]=C([]),[j,M]=C(void 0),[N,P]=C(null),[F,I]=C(0),L=S(!1);return x(()=>(process.stdout.isTTY&&process.stdout.write(`\x1B[?1049h\x1B[H`),()=>{process.stdout.isTTY&&process.stdout.write(`\x1B[?1049l`)}),[]),x(()=>{L.current||(L.current=!0,(async()=>{try{d(`detecting`);let i=await q(r.cwd);if(!i){k(`Could not detect your framework. Supported: Next.js, Nuxt, SvelteKit, Astro, Remix, plain HTML.`),d(`error`);return}p(i);let a=await n({strict:!1});!process.env.ZENOVAY_API_TOKEN&&!a&&(d(`login`),await o({cliVersion:r.cliVersion})),d(`loading-sites`);let s=await e(),c=await n({strict:!1}),l=new t({config:s,cliVersion:r.cliVersion,token:c}),u=await l.getSites(),f=await Mt(r.cwd),m=Nt(u,f);if(_(u),w(f),u.length===0){d(`create-site`);return}if(r.siteId){let e=u.find(e=>e.id===r.siteId);if(!e){k(`Site ${r.siteId} not found in your account.`),d(`error`);return}E(e),Z(e,i,r,{setPhase:d,setErrorMsg:k,setTasks:A,setLiveLine:M,setSandboxStats:P});return}if(r.yes&&m){E(m),Z(m,i,r,{setPhase:d,setErrorMsg:k,setTasks:A,setLiveLine:M,setSandboxStats:P});return}d(`site-picker`)}catch(e){k(e.message),d(`error`)}})())},[]),x(()=>{process.stdout.isTTY&&process.stdout.write(`\x1B[2J\x1B[H`),l===`success`&&setTimeout(()=>{a(),i(0)},1500),l===`error`&&setTimeout(()=>{a(),i(1)},8e3)},[l]),b.createElement(h,{flexDirection:`column`},b.createElement(c,{version:r.cliVersion,subtitle:`AI install wizard`}),l===`intro`&&b.createElement(bt,null),l===`detecting`&&b.createElement(s,{title:`Scanning`,state:`busy`},b.createElement(h,null,b.createElement(g,{color:`magenta`},b.createElement(D,{type:`dots`})),b.createElement(g,null,` Detecting framework…`))),l===`login`&&b.createElement(s,{title:`Authenticating`,state:`busy`},b.createElement(g,null,`Opening browser for login… (paste ZENOVAY_API_TOKEN env var to skip)`)),l===`loading-sites`&&b.createElement(s,{title:`Loading your sites`,state:`busy`},b.createElement(h,null,b.createElement(g,{color:`magenta`},b.createElement(D,{type:`dots`})),b.createElement(g,null,` Fetching your Zenovay sites…`))),l===`site-picker`&&f&&b.createElement(St,{sites:m,preselectHint:y,onPick:e=>{if(e===`create-new`){d(`create-site`);return}E(e),Z(e,f,r,{setPhase:d,setErrorMsg:k,setTasks:A,setLiveLine:M,setSandboxStats:P})}}),l===`create-site`&&b.createElement(s,{title:`Create a new site`,state:`warn`},b.createElement(g,{color:`yellow`},"No site picked (or none exist yet). Visit https://app.zenovay.com/websites to create one, then re-run `zenovay init`."),b.createElement(g,{color:`gray`},`(Inline site creation from the CLI is scheduled for V1.1 — it requires a plan-limit check.)`)),l===`agent`&&f&&T&&b.createElement(xt,{adapter:f,site:T,tasks:ee,liveLine:j}),l===`install-complete`&&f&&T&&b.createElement(wt,{adapter:f,site:T,stats:N,onCommit:()=>d(`commit-prompt`),onSkipCommit:()=>d(`deploy-prompt`)}),l===`commit-prompt`&&T&&b.createElement(Tt,{cwd:r.cwd,onDone:e=>{e.committed&&M(`Pushed ${e.shortSha} to ${e.branch}`),d(`deploy-prompt`)},onError:e=>{k(e),d(`error`)}}),l===`deploy-prompt`&&T&&b.createElement(Et,{site:T,onDeployed:()=>d(`visit-prompt`),onSkip:()=>d(`verify`)}),l===`visit-prompt`&&T&&b.createElement(Dt,{site:T,onContinue:()=>d(`verify`)}),l===`verify`&&T&&b.createElement(kt,{site:T,elapsed:F,onTick:e=>I(e),onArrived:()=>d(`success`),onTimeout:()=>d(`success`)}),l===`success`&&f&&T&&b.createElement(Ct,{adapter:f,site:T,stats:N}),l===`error`&&b.createElement(s,{title:`Install failed`,state:`err`},b.createElement(g,{color:`red`},O??`Unknown error`)),b.createElement(u,{items:[{key:`q`,label:`quit`},{key:`ctrl-c`,label:`abort`}]}))};async function Z(r,i,a,o){try{o.setPhase(`agent`);let s=await e(),c=await n({strict:!1}),l=new t({config:s,cliVersion:a.cliVersion,token:c}),u=new W({cwd:a.cwd}),d=r.trackingCode??r.id,f=await I(a.cwd,d);if(f.recommendation===`no-op`){o.setTasks(e=>e.map(e=>e.id===`detect`||e.id===`read`||e.id===`write`?{...e,status:`done`,detail:`already installed correctly`}:e)),o.setLiveLine(f.summary),o.setSandboxStats?.({reads:0,writes:0,rounds:0}),!a.skipMcp&&c&&await Y({accessToken:c.accessToken}).catch(()=>void 0),o.setPhase(`install-complete`);return}f.competitors.length>0&&o.setLiveLine(`Detected ${f.competitors.map(e=>e.name).join(`, `)} — will install Zenovay alongside (won't touch their tags).`);let p=i.buildSnippets({trackingCode:d,siteId:r.id}),m=`Install Zenovay tracking into this ${i.displayName} project.\nSite: ${r.name} (trackingCode: ${d}).\n1. Call detect_framework to confirm the framework.\n2. Read the entry file(s) for this framework:\n`+i.files.map(e=>` - ${e.path}`).join(`
52
+ `,`utf8`),i.push(e.displayName)}catch(t){o.push({client:e.displayName,message:t instanceof Error?t.message:String(t)})}}return{installed:i,skipped:a,errors:o}}async function Ye(e,t,n){let r=n.timeoutMs??18e4,i=n.pollIntervalMs??2e3,a=n.now??(()=>Date.now()),o=n.sleep??(e=>new Promise(t=>setTimeout(t,e))),s=a(),c=s+r;for(n.onTick?.(0);;){let l=await n.api.getFirstEvent({siteId:e,since:t});if(l.received)return{received:!0,event:l.event};let u=a()-s;if(u>=r)return{received:!1};let d=c-a(),f=Math.min(i,Math.max(0,d));if(f<=0)return{received:!1};await o(f),n.onTick?.(a()-s)}}const Xe=T.object({path:T.string().min(1)}),Ze=T.object({path:T.string().min(1),content:T.string(),reason:T.string().min(1)}),Qe=T.object({path:T.string().min(1),patch:T.string().min(1),reason:T.string().min(1)}),$e=T.object({}),et=T.object({question:T.string().min(1),choices:T.array(T.string()).optional()});async function tt(e,t){let n=Xe.safeParse(t);if(!n.success)return{ok:!1,content:null,error:`invalid_args`};try{let t=await e.safeRead(n.data.path),r=W.scrubSecrets(t);return{ok:!0,content:W.wrapForModel(n.data.path,r)}}catch(e){return{ok:!1,content:null,error:e.message}}}async function nt(e,t,n){let r=Ze.safeParse(t);if(!r.success)return{ok:!1,content:null,error:`invalid_args`};let{path:i,content:a,reason:o}=r.data,s=``;try{s=await e.safeRead(i)}catch{s=``}let c=await n.approve({path:i,oldContent:s,newContent:a,reason:o});if(c===`n`)return{ok:!1,content:null,error:`skipped_by_user`};if(c===`e`)return{ok:!1,content:null,error:`deferred_to_user_edit`};try{let{backupPath:t}=await e.safeWrite(i,a);return{ok:!0,content:{path:i,backupPath:t}}}catch(e){return{ok:!1,content:null,error:e.message}}}async function rt(e,t,n){let r=Qe.safeParse(t);if(!r.success)return{ok:!1,content:null,error:`invalid_args`};let{path:i,patch:a,reason:o}=r.data;if(/^\*\*\*\s+Begin Patch/m.test(a)||/^\*\*\*\s+Update File:/m.test(a))return{ok:!1,content:null,error:'unsupported_patch_format: This tool only accepts STANDARD unified diff with `--- a/...`, `+++ b/...`, and `@@ -N,M +N,M @@` headers. The "*** Begin Patch / *** Update File:" V4A format is NOT supported. Please call write_file with the full new file content instead.'};let s;try{s=await e.safeRead(i)}catch(e){return{ok:!1,content:null,error:e.message}}let c;try{c=ee(s,a)}catch(e){return{ok:!1,content:null,error:`patch_failed: ${e.message}. Please call write_file with the full new file content instead — write_file is more reliable than patch_file for this use case.`}}return c===!1||typeof c!=`string`?{ok:!1,content:null,error:`patch_did_not_apply_cleanly. The patch context may not match the file. Please call write_file with the full new file content instead.`}:nt(e,{path:i,content:c,reason:o},n)}async function it(e){try{let t=K(e),{adapter:n,ranked:r}=await G(t);return{ok:!0,content:{matched:n!==null,adapter:n?.id,displayName:n?.displayName,ranked:r.map(e=>({id:e.adapter.id,confidence:e.result.confidence,reason:e.result.reason}))}}}catch(e){return{ok:!1,content:null,error:e.message}}}async function at(e,t){let n=et.safeParse(t);if(!n.success)return{ok:!1,content:null,error:`invalid_args`};try{let t=await e.ask(n.data);return{ok:!0,content:{answer:t}}}catch(e){return{ok:!1,content:null,error:e.message}}}async function ot(e){let{api:t,sandbox:n,approval:i,prompter:a,handlers:o}=e,s=[...e.initialMessages],c=``,l=0;for(;l<V;){n.incrementRound(),l++;let u=await t.openAiStream(`install`,{messages:s,cwd_fingerprint:n.sessionId,diagnosis:e.diagnosis,targetTrackingCode:e.targetTrackingCode}),d=[],f=``;for await(let e of r(u))switch(e.type){case`delta`:f+=e.content,o?.onDelta?.(e.content);break;case`tool_start`:o?.onToolStart?.({id:e.id,name:e.name});break;case`tool_call`:{let t=await st(e.name,e.arguments,{sandbox:n,cwd:n.cwd,approval:i,prompter:a});d.push({id:e.id,name:e.name,arguments:e.arguments,result:t}),o?.onToolResult?.({id:e.id,name:e.name,result:t});break}case`usage`:o?.onUsage?.(e);break;case`error`:throw o?.onError?.(e),Error(`[${e.code}] ${e.message}`);case`done`:break}if(f&&(c+=f),d.length===0){f&&s.push({role:`assistant`,content:f});break}s.push({role:`assistant`,content:f,toolCalls:d.map(e=>({id:e.id,type:`function`,function:{name:e.name,arguments:JSON.stringify(e.arguments)}}))});for(let e of d)s.push({role:`tool`,toolCallId:e.id,toolName:e.name,content:JSON.stringify(e.result)})}return{finalText:c,rounds:l}}async function st(e,t,n){try{switch(e){case`read_file`:return await tt(n.sandbox,t);case`write_file`:return await nt(n.sandbox,t,n.approval);case`patch_file`:return await rt(n.sandbox,t,n.approval);case`detect_framework`:return await it(n.cwd);case`ask_user`:return await at(n.prompter,t);default:return{ok:!1,content:null,error:`unknown_tool:${e}`}}}catch(e){return{ok:!1,content:null,error:`tool_threw: ${e.message}`}}}function ct(){let e=[12,15,18,22,28,35,41,50,58,64,72,78],t=f(e,24);return[` ↑`,` ${t}`,` └────────────────────────`,` May Jun Jul Aug Sep`]}function lt(){return[` Landing page ████████████████████ 100%`,` ↓ -28%`,` Pricing ██████████████░░░░░░ 72%`,` ↓ -50%`,` Checkout ███████░░░░░░░░░░░░░ 36%`,` ↓ -64%`,` Purchased ███░░░░░░░░░░░░░░░░░ 13%`]}function ut(){return[` ▇▇▇▇▇▇▇▇▇▎ 89 Sarah K. /pricing 🇺🇸`,` ▇▇▇▇▇▇░░░░ 61 anon /docs 🇩🇪`,` ▇▇▇░░░░░░░ 34 anon /changelog 🇯🇵`]}function dt(){return[` LCP ● 2.1s good ████████████░░░░░░`,` INP ● 89ms good ██████████████████`,` CLS ⚠ 0.14 needs ████████████░░░░░░`,` TTFB ● 380ms good ███████████████░░░`]}const X=[{title:`Welcome`,body:[`The wizard is an agent — it handles the entire`,`Zenovay setup process on your behalf.`,``,`Reading your project, deciding where the tracker`,`belongs, and writing the snippet for you.`]},{title:`Events`,body:[`Events are the foundation of Zenovay analytics.`,``,`Every pageview, click, and custom action is an`,`event. Group them into Goals to track conversions.`]},{title:`Trends`,body:[`Use trends to measure growth.`,``,`See how visitors, signups, and revenue have`,`changed over the last week, month, or quarter.`],visual:ct},{title:`Funnels`,body:[`Funnels reveal where users drop off.`,``,`Define the steps you care about — landing,`,`pricing, checkout, purchase — and Zenovay shows`,`the per-step conversion rate.`],visual:lt},{title:`Live visitors`,body:[`Watch every visitor in real time, ranked by an`,`AI score that highlights high-intent traffic.`,``,"Use `zenovay visitors --live` after install."],visual:ut},{title:`Core Web Vitals`,body:[`LCP, INP, CLS — Google's page-experience metrics,`,`collected automatically once the tracker is in.`,``,"Use `zenovay vitals` to see them per page + device."],visual:dt},{title:`MCP integration`,body:[`Your CLI session can install Zenovay's MCP server`,`into Cursor / Claude Desktop / VS Code.`,``,`Then ask your AI: "what were my top pages today?"`,`and it queries Zenovay directly.`]},{title:`AI insights`,body:[`Zenovay watches your data and surfaces anomalies`,`automatically — traffic spikes, error bursts,`,`revenue drops — without you needing to ask.`,``,"Run `zenovay ai` after install to chat with them."]},{title:`Privacy-first`,body:[`No cookies required. No third-party trackers.`,`Cookieless mode is one toggle in your dashboard.`,``,`GDPR, CCPA, and PECR-compliant out of the box.`]}],ft=8e3,pt=({width:e,height:t})=>{let[n,r]=C(0);x(()=>{let e=setInterval(()=>{r(e=>(e+1)%X.length)},ft);return()=>clearInterval(e)},[]);let i=X[n],a=i.visual?i.visual():[],o=X.map((e,t)=>t===n?`●`:`·`).join(` `);return b.createElement(h,{flexDirection:`column`,width:e,height:t,paddingX:2,paddingY:1},b.createElement(h,{marginBottom:1},b.createElement(g,{color:`magentaBright`,bold:!0},`Learn`)),b.createElement(h,{marginBottom:1},b.createElement(g,{bold:!0,color:`white`},i.title)),i.body.map((e,t)=>b.createElement(g,{key:t,color:`gray`},e||` `)),a.length>0&&b.createElement(h,{flexDirection:`column`,marginTop:1},a.map((e,t)=>b.createElement(g,{key:t,color:`cyan`},e))),b.createElement(h,{flexGrow:1}),b.createElement(h,{marginTop:1},b.createElement(g,{color:`gray`,dimColor:!0},o,` · `,n+1,` / `,X.length)))},mt={pending:`·`,active:`⠋`,done:`✓`,error:`✗`},ht={pending:`gray`,active:`magenta`,done:`green`,error:`red`},gt=({tasks:e,width:t,height:n,liveLine:r})=>{let i=e.filter(e=>e.status===`done`).length;return b.createElement(h,{flexDirection:`column`,width:t,height:n,paddingX:2,paddingY:1},b.createElement(h,{marginBottom:1},b.createElement(g,{color:`magentaBright`,bold:!0},`Tasks`)),e.map(e=>b.createElement(h,{key:e.id,flexDirection:`column`},b.createElement(h,null,e.status===`active`?b.createElement(g,{color:`magenta`},b.createElement(D,{type:`dots`})):b.createElement(g,{color:ht[e.status]},mt[e.status]),b.createElement(g,null,` `),b.createElement(g,{color:e.status===`pending`?`gray`:`white`},e.label)),e.detail&&b.createElement(h,{paddingLeft:2},b.createElement(g,{color:`gray`,dimColor:!0},e.detail)))),b.createElement(h,{flexGrow:1}),r&&b.createElement(h,{marginTop:1},b.createElement(g,{color:`cyan`},`◆ `),b.createElement(g,{color:`white`},r)),b.createElement(h,{marginTop:1},b.createElement(g,{color:`gray`,dimColor:!0},i,` / `,e.length)))};async function _t(e){return a(e)?vt(e):new Promise(t=>{let{unmount:n,waitUntilExit:r}=_(b.createElement(yt,{opts:e,onExit:e=>{n(),t(e)}}));r().catch(()=>t(1))})}async function vt(r){try{let a=await e(),o=await q(r.cwd);if(!o)return i({type:`error`,code:`no_framework`,message:`Could not detect framework (headless mode has no picker).`}),2;i({type:`framework.detected`,framework:o.id,confidence:1});let s=await n({strict:!1});if(!s&&!process.env.ZENOVAY_API_TOKEN)return i({type:`error`,code:`not_logged_in`,message:"Run `zenovay login` first (or set ZENOVAY_API_TOKEN)."}),2;let c=new t({config:a,cliVersion:r.cliVersion,token:s}),l=await c.getSites(),u=r.siteId?l.find(e=>e.id===r.siteId):l[0];if(!u&&r.siteId)return i({type:`error`,code:`site_not_found`,message:`Site ${r.siteId} not found.`}),2;if(!u)return i({type:`error`,code:`no_site`,message:`No sites exist; create one at app.zenovay.com or re-run interactively.`}),2;i({type:`info`,message:`Using site ${u.id} (${u.name}) trackingCode=${u.trackingCode??u.id}`});let d=await J(r.cwd,{[o.envVarName]:u.trackingCode??u.id});return i({type:`info`,message:`env vars added: ${d.addedKeys.join(`,`)}`}),i({type:`done`,command:`init`,exitCode:0}),0}catch(e){return i({type:`error`,code:`init_failed`,message:e.message}),1}}const yt=({opts:r,onExit:i})=>{let{exit:a}=v(),[l,d]=C(`intro`),[f,p]=C(null),[m,_]=C([]),[y,w]=C(null),[T,E]=C(null),[O,k]=C(null),[ee,A]=C([]),[j,M]=C(void 0),[N,P]=C(null),[F,I]=C(0),L=S(!1);return x(()=>(process.stdout.isTTY&&process.stdout.write(`\x1B[?1049h\x1B[H`),()=>{process.stdout.isTTY&&process.stdout.write(`\x1B[?1049l`)}),[]),x(()=>{L.current||(L.current=!0,(async()=>{try{d(`detecting`);let i=await q(r.cwd);if(!i){k(`Could not detect your framework. Supported: Next.js, Nuxt, SvelteKit, Astro, Remix, plain HTML.`),d(`error`);return}p(i);let a=await n({strict:!1});!process.env.ZENOVAY_API_TOKEN&&!a&&(d(`login`),await o({cliVersion:r.cliVersion})),d(`loading-sites`);let s=await e(),c=await n({strict:!1}),l=new t({config:s,cliVersion:r.cliVersion,token:c}),u=await l.getSites(),f=await Mt(r.cwd),m=Nt(u,f);if(_(u),w(f),u.length===0){d(`create-site`);return}if(r.siteId){let e=u.find(e=>e.id===r.siteId);if(!e){k(`Site ${r.siteId} not found in your account.`),d(`error`);return}E(e),Z(e,i,r,{setPhase:d,setErrorMsg:k,setTasks:A,setLiveLine:M,setSandboxStats:P});return}if(r.yes&&m){E(m),Z(m,i,r,{setPhase:d,setErrorMsg:k,setTasks:A,setLiveLine:M,setSandboxStats:P});return}d(`site-picker`)}catch(e){k(e.message),d(`error`)}})())},[]),x(()=>{process.stdout.isTTY&&process.stdout.write(`\x1B[2J\x1B[H`),l===`success`&&setTimeout(()=>{a(),i(0)},1500),l===`error`&&setTimeout(()=>{a(),i(1)},8e3)},[l]),b.createElement(h,{flexDirection:`column`},b.createElement(c,{version:r.cliVersion,subtitle:`AI install wizard`}),l===`intro`&&b.createElement(bt,null),l===`detecting`&&b.createElement(s,{title:`Scanning`,state:`busy`},b.createElement(h,null,b.createElement(g,{color:`magenta`},b.createElement(D,{type:`dots`})),b.createElement(g,null,` Detecting framework…`))),l===`login`&&b.createElement(s,{title:`Authenticating`,state:`busy`},b.createElement(g,null,`Opening browser for login… (paste ZENOVAY_API_TOKEN env var to skip)`)),l===`loading-sites`&&b.createElement(s,{title:`Loading your sites`,state:`busy`},b.createElement(h,null,b.createElement(g,{color:`magenta`},b.createElement(D,{type:`dots`})),b.createElement(g,null,` Fetching your Zenovay sites…`))),l===`site-picker`&&f&&b.createElement(St,{sites:m,preselectHint:y,onPick:e=>{if(e===`create-new`){d(`create-site`);return}E(e),Z(e,f,r,{setPhase:d,setErrorMsg:k,setTasks:A,setLiveLine:M,setSandboxStats:P})}}),l===`create-site`&&b.createElement(s,{title:`Create a new site`,state:`warn`},b.createElement(g,{color:`yellow`},"No site picked (or none exist yet). Visit https://app.zenovay.com/websites to create one, then re-run `zenovay init`."),b.createElement(g,{color:`gray`},`(Inline site creation from the CLI is scheduled for V1.1 — it requires a plan-limit check.)`)),l===`agent`&&f&&T&&b.createElement(xt,{adapter:f,site:T,tasks:ee,liveLine:j}),l===`install-complete`&&f&&T&&b.createElement(wt,{adapter:f,site:T,stats:N,onCommit:()=>d(`commit-prompt`),onSkipCommit:()=>d(`deploy-prompt`)}),l===`commit-prompt`&&T&&b.createElement(Tt,{cwd:r.cwd,onDone:e=>{e.committed&&M(`Pushed ${e.shortSha} to ${e.branch}`),d(`deploy-prompt`)},onError:e=>{k(e),d(`error`)}}),l===`deploy-prompt`&&T&&b.createElement(Et,{site:T,onDeployed:()=>d(`visit-prompt`),onSkip:()=>d(`verify`)}),l===`visit-prompt`&&T&&b.createElement(Dt,{site:T,onContinue:()=>d(`verify`)}),l===`verify`&&T&&b.createElement(kt,{site:T,elapsed:F,onTick:e=>I(e),onArrived:()=>d(`success`),onTimeout:()=>d(`success`)}),l===`success`&&f&&T&&b.createElement(Ct,{adapter:f,site:T,stats:N}),l===`error`&&b.createElement(s,{title:`Install failed`,state:`err`},b.createElement(g,{color:`red`},O??`Unknown error`)),b.createElement(u,{items:[{key:`q`,label:`quit`},{key:`ctrl-c`,label:`abort`}]}))};async function Z(r,i,a,o){try{o.setPhase(`agent`);let s=await e(),c=await n({strict:!1}),l=new t({config:s,cliVersion:a.cliVersion,token:c}),u=new W({cwd:a.cwd}),d=r.trackingCode??r.id,f=await I(a.cwd,d);if(f.recommendation===`no-op`){o.setTasks(e=>e.map(e=>e.id===`detect`||e.id===`read`||e.id===`write`?{...e,status:`done`,detail:`already installed correctly`}:e)),o.setLiveLine(f.summary),o.setSandboxStats?.({reads:0,writes:0,rounds:0}),!a.skipMcp&&c&&await Y({accessToken:c.accessToken}).catch(()=>void 0),o.setPhase(`install-complete`);return}f.competitors.length>0&&o.setLiveLine(`Detected ${f.competitors.map(e=>e.name).join(`, `)} — will install Zenovay alongside (won't touch their tags).`);let p=i.buildSnippets({trackingCode:d,siteId:r.id}),m=`Install Zenovay tracking into this ${i.displayName} project.\nSite: ${r.name} (trackingCode: ${d}).\n1. Call detect_framework to confirm the framework.\n2. Read the entry file(s) for this framework:\n`+i.files.map(e=>` - ${e.path}`).join(`
53
53
  `)+`
54
54
  3. Insert the tracker using the snippet below.
55
55
  4. Confirm the change with a diff before writing.
@@ -1 +1 @@
1
- import"./config-ZTGpKEWg.js";import"./api-BhdaCghp.js";import{initCommand as e}from"./init-SRJ78xPF.js";import"./client-DZ4Awt8u.js";import"./formatter-45-fT1Hv.js";import"./emit-0WJ_OGeT.js";import"./login-DHLIZV8C.js";import"./panel-DglZ755S.js";import"./keybar-D2OI-8rx.js";import"./prompt-hjzdzlyj.js";import"./sparkline-CR_bzxwB.js";export{e as initCommand};
1
+ import"./config-ZTGpKEWg.js";import"./api-BhdaCghp.js";import{initCommand as e}from"./init--eTjzzmh.js";import"./client-DZ4Awt8u.js";import"./formatter-45-fT1Hv.js";import"./emit-0WJ_OGeT.js";import"./login-DHLIZV8C.js";import"./panel-DglZ755S.js";import"./keybar-D2OI-8rx.js";import"./prompt-hjzdzlyj.js";import"./sparkline-CR_bzxwB.js";export{e as initCommand};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import(`./init-bbu-bGfE.js`).then(async({initCommand:e})=>{let{readFileSync:t}=await import(`node:fs`),n=await import(`node:path`),{fileURLToPath:r}=await import(`node:url`),i=n.dirname(r(import.meta.url)),a=JSON.parse(t(n.join(i,`..`,`package.json`),`utf8`)),o=process.argv.slice(2),s=o.includes(`--json`),c=o.includes(`--yes`),l=o.includes(`--skip-mcp`),u=o.includes(`--skip-verify`),d=await e({cliVersion:a.version,cwd:process.cwd(),json:s,yes:c,skipMcp:l,skipVerify:u});process.exit(d)});
2
+ import(`./init-qzmy4rIN.js`).then(async({initCommand:e})=>{let{readFileSync:t}=await import(`node:fs`),n=await import(`node:path`),{fileURLToPath:r}=await import(`node:url`),i=n.dirname(r(import.meta.url)),a=JSON.parse(t(n.join(i,`..`,`package.json`),`utf8`)),o=process.argv.slice(2),s=o.includes(`--json`),c=o.includes(`--yes`),l=o.includes(`--skip-mcp`),u=o.includes(`--skip-verify`),d=await e({cliVersion:a.version,cwd:process.cwd(),json:s,yes:c,skipMcp:l,skipVerify:u});process.exit(d)});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenovay/cli",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "Zenovay CLI — AI install wizard + full terminal analytics dashboard",
5
5
  "type": "module",
6
6
  "bin": {