fluxflow-cli 4.12.0 → 4.13.1
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/chunks/{addMemScore-EIIMCED3.js → addMemScore-W4I665ZR.js} +1 -1
- package/dist/chunks/ai-6JVYA4PV.js +1 -0
- package/dist/chunks/app-4CDJRXRD.js +259 -0
- package/dist/chunks/app-FSHFZE7H.js +259 -0
- package/dist/chunks/{chat-5CITJOXW.js → chat-HZ7UVZE2.js} +1 -1
- package/dist/chunks/chunk-2PMRX4CK.js +49 -0
- package/dist/chunks/{chunk-WZW77OYB.js → chunk-7JAWJV4U.js} +1 -1
- package/dist/chunks/{chunk-RNEHIJXX.js → chunk-E5LLK7O5.js} +1 -1
- package/dist/chunks/{chunk-MZGMZ4T6.js → chunk-EVDO64BW.js} +1 -1
- package/dist/chunks/chunk-FDNLMLIM.js +1 -0
- package/dist/chunks/chunk-IIU3IJAG.js +882 -0
- package/dist/chunks/chunk-K676BNH2.js +1 -0
- package/dist/chunks/{chunk-TGINXVDR.js → chunk-KFM2OZWJ.js} +1 -1
- package/dist/chunks/{chunk-TJII6UKN.js → chunk-KRRJNFBF.js} +1 -1
- package/dist/chunks/{chunk-R67K3FEP.js → chunk-TYOB727A.js} +1 -1
- package/dist/chunks/{chunk-DHQHSTTS.js → chunk-UAHJEAVX.js} +1 -1
- package/dist/chunks/{chunk-2TASXARO.js → chunk-VCF6JVQV.js} +1 -1
- package/dist/chunks/{chunk-7PJOF5I2.js → chunk-YNU56P2H.js} +1 -1
- package/dist/chunks/chunk-YS35YSMW.js +1 -0
- package/dist/chunks/{chunk-FJGY5C4M.js → chunk-YVFWOJHY.js} +1 -1
- package/dist/chunks/{chunk-5K4X2VUW.js → chunk-ZKQ5PQXN.js} +1 -1
- package/dist/chunks/{chunk-5GEXRVU6.js → chunk-ZYJYKSIA.js} +1 -1
- package/dist/chunks/{click-V2WBK6PX.js → click-C6J7T7RF.js} +2 -2
- package/dist/chunks/{computer_action-QGLK3SY6.js → computer_action-CJJTZQEI.js} +1 -1
- package/dist/chunks/{drag-6P367RA2.js → drag-Y7BI43K7.js} +1 -1
- package/dist/chunks/{emergency_rollback-A67M4DU6.js → emergency_rollback-EPJPKANN.js} +1 -1
- package/dist/chunks/{exec_command-43ZNHLVJ.js → exec_command-7MOYM7IQ.js} +1 -1
- package/dist/chunks/export-OHZ652N5.js +1 -0
- package/dist/chunks/{file_map-YYKJC7LP.js → file_map-5KY2ADZW.js} +1 -1
- package/dist/chunks/{generate_image-6K34FOJJ.js → generate_image-35IDBNYW.js} +1 -1
- package/dist/chunks/{invoke-D2QN5M3S.js → invoke-4CCGIIYJ.js} +2 -2
- package/dist/chunks/{invokeSync-U5GA5PGM.js → invokeSync-GGK2NNZK.js} +2 -2
- package/dist/chunks/{key_press-BRS2DIB5.js → key_press-FQYXXELE.js} +1 -1
- package/dist/chunks/{keyboard_typing-3YF72D7X.js → keyboard_typing-QYBCROI7.js} +1 -1
- package/dist/chunks/{memory-22U3WGHY.js → memory-OYIUYX3A.js} +1 -1
- package/dist/chunks/paths-PM7MFWJK.js +1 -0
- package/dist/chunks/{saveSummary-2LC63SYI.js → saveSummary-ATBIFYDP.js} +1 -1
- package/dist/chunks/{screen_grid-IUKQWDZG.js → screen_grid-7QKZEE5T.js} +1 -1
- package/dist/chunks/{scroll-VJJ2SHXR.js → scroll-NWD7AZH4.js} +1 -1
- package/dist/chunks/{search_keyword-Y2B3YELW.js → search_keyword-W5YEUUPO.js} +1 -1
- package/dist/chunks/{secrets-2JNLNTQE.js → secrets-ZJQ4S4BU.js} +1 -1
- package/dist/chunks/settings-RQ72HWCU.js +1 -0
- package/dist/chunks/{todo-VFONYOUK.js → todo-SJLJJLVZ.js} +1 -1
- package/dist/chunks/{update_file-KPFDUPKK.js → update_file-B64P2EXN.js} +1 -1
- package/dist/chunks/usageServer-V3C5UWIH.js +1 -0
- package/dist/chunks/view_file-JK22NGXC.js +1 -0
- package/dist/chunks/{web_scrape-EWLJFTMV.js → web_scrape-5LBY4FDC.js} +1 -1
- package/dist/chunks/{web_search-KNT73E64.js → web_search-YG5YAC5D.js} +1 -1
- package/dist/chunks/{write_docx-T4UJCJ3L.js → write_docx-EKUIZ7GV.js} +1 -1
- package/dist/chunks/{write_file-LYTIK6LS.js → write_file-THIYPKV2.js} +1 -1
- package/dist/chunks/{write_pdf-NGUPNIEZ.js → write_pdf-VB4IFPWX.js} +1 -1
- package/dist/cli.js +6 -6
- package/dist/model_config.json +10 -686
- package/dist/package.json +2 -2
- package/model_config.json +10 -686
- package/package.json +2 -2
- package/dist/chunks/ai-OCOM32HV.js +0 -1
- package/dist/chunks/app-LKK2QTJ7.js +0 -238
- package/dist/chunks/chunk-4TZKD2XR.js +0 -1
- package/dist/chunks/chunk-6GTIZENY.js +0 -48
- package/dist/chunks/chunk-JSVFQZL2.js +0 -1
- package/dist/chunks/chunk-LRJGBXD6.js +0 -880
- package/dist/chunks/chunk-VNPYQFKQ.js +0 -3
- package/dist/chunks/export-PSA6YZMJ.js +0 -1
- package/dist/chunks/paths-CHZDSDRF.js +0 -1
- package/dist/chunks/settings-ZHS26QZ5.js +0 -1
- package/dist/chunks/usageServer-DMWM5ECL.js +0 -1
- package/dist/chunks/view_file-SRYT37FH.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as F}from"./chunk-
|
|
1
|
+
import{a as F}from"./chunk-KFM2OZWJ.js";import"./chunk-SIINYZWE.js";import{a as $}from"./chunk-A73NNVCZ.js";import"./chunk-FDNLMLIM.js";import{a as y}from"./chunk-Y5JU726N.js";import I from"puppeteer";import i from"path";import o from"fs-extra";import{PDFDocument as L}from"pdf-lib";var _=async C=>{let{path:l,content:m,orientation:R="portrait",margin:c="0px"}=y(C);if(!l)return'ERROR: Missing "path" argument for write_pdf.';if(!m)return'ERROR: Missing "content" (HTML/CSS) for write_pdf.';let f=i.resolve(process.cwd(),l),u=null;try{await o.ensureDir(i.dirname(f)),await F.recordFileChange(f);let p=$();u=await I.launch({headless:!0,executablePath:p.executablePath||void 0,args:["--no-sandbox","--disable-setuid-sandbox","--disable-gpu","--disable-dev-shm-usage"]});let w=await u.newPage(),a=m,g={},x=async t=>{if(!t||t.startsWith("http://")||t.startsWith("https://")||t.startsWith("data:"))return null;try{let e=i.resolve(process.cwd(),t);if(await o.pathExists(e)){let s=i.extname(e).toLowerCase().replace(".","")||"png",d=s==="jpg"?"jpeg":s==="svg"?"svg+xml":s,h=await o.readFile(e,"base64");return`data:image/${d};base64,${h}`}}catch{}return null},v=/<link[^>]+href=["']([^"']+)["']/gi,b={},r;for(;(r=v.exec(m))!==null;){let t=r[1],e=r[0];if(t&&e.toLowerCase().includes("stylesheet")&&!t.startsWith("http://")&&!t.startsWith("https://")&&!t.startsWith("data:"))try{let s=i.resolve(process.cwd(),t);if(await o.pathExists(s)){let d=await o.readFile(s,"utf-8");b[e]=`<style>${d}</style>`}}catch{}}for(let[t,e]of Object.entries(b))a=a.split(t).join(e);let P=/<img[^>]+src=["']([^"']+)["']/gi;for(;(r=P.exec(a))!==null;){let t=r[1];if(t&&!g[t]){let e=await x(t);e&&(g[t]=e)}}let A=/url\(\s*['"]?([^'")]+?)['"]?\s*\)/gi;for(;(r=A.exec(a))!==null;){let t=r[1].trim();if(t&&!g[t]){let e=await x(t);e&&(g[t]=e)}}for(let[t,e]of Object.entries(g)){let s=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),d=new RegExp(`(src=["'])(${s})(["'])`,"gi");a=a.replace(d,`$1${e}$3`);let h=new RegExp(`url\\(\\s*(['"]?)(${s})\\1\\s*\\)`,"gi");a=a.replace(h,`url($1${e}$1)`)}let E=`
|
|
2
2
|
<style>
|
|
3
3
|
@page {
|
|
4
4
|
margin: ${c};
|
package/dist/cli.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as m}from"./chunks/chunk-
|
|
2
|
+
import{a as m}from"./chunks/chunk-FDNLMLIM.js";import{spawn as ce}from"child_process";import{fileURLToPath as D}from"url";import ue from"os";import B from"path";import S from"fs";import h from"dotenv";try{let e=B.join(m,"AGENTS.md"),n=B.join(m,"FLUXFLOW.md");!S.existsSync(e)&&!S.existsSync(n)&&(S.existsSync(m)||S.mkdirSync(m,{recursive:!0}),S.writeFileSync(e,"","utf8"))}catch{}h.config({path:"./.env",override:!0,quiet:!0});h.config({path:`${m}/.env`,override:!0,quiet:!0});h.config({path:`${m}/.env.agents`,override:!0,quiet:!0});h.config({path:`${m}/.env.fluxflow`,override:!0,quiet:!0});h.config({path:"./.env.agents",override:!0,quiet:!0});h.config({path:"./.env.fluxflow",override:!0,quiet:!0});process.env.NO_INS=!1;var me=ue.totalmem(),j=me/(1024*1024),pe=.5,de=Math.floor(j*pe),G=process.argv.slice(2),U=G.indexOf("--allocation"),s=U!==-1?parseInt(G[U+1],10):NaN,ge=process.env.EXPERIMENTAL_MEMORY_MANAGER==="true"||process.env.EXPERIMENTAL_MEMORY_MANAGER==="1"||process.env.EXPERIMENTAL_MEMORY_MANAGER===!0||process.env.EXPERIMENTAL_MEMORY_MANAGER===1||!1,fe=!isNaN(s)||ge||!1;!isNaN(s)&&s<64&&(console.error(`
|
|
3
3
|
[ERROR] Allocation value '${s} MB' is too low. Minimum: 64 MB, Recommended: 4096 MB.
|
|
4
4
|
`),process.exit(1));var M=Math.floor(j*.75),xe=!isNaN(s)&&s>0?Math.min(s,M):Math.max(1536,Math.min(32768,de)),he=D(import.meta.url).endsWith(".js");if(he&&!process.execArgv.some(e=>e.includes("max-old-space-size"))&&fe)Number.isNaN(s)||(console.log(`
|
|
5
|
-
[MEMORY] Starting with: '${s>M?M:s} MB' Allocation${s>M?" (Max allowed: '"+M+" MB')":""}. Please Wait...`),await new Promise(n=>setTimeout(n,5e3))),ce(process.execPath,[`--max-old-space-size=${xe}`,"--expose-gc","--max-semi-space-size=1",D(import.meta.url),...process.argv.slice(2)],{stdio:"inherit"}).on("exit",n=>process.exit(n||0));else{let e=process.argv.slice(2),n=e.includes("--help")&&e[e.indexOf("--help")+1]==="commands",P=e.includes("--help")&&!n,N=e.includes("--version")||e.includes("-v"),R=e[0]==="--update",I=e[0]==="--export";if(e[0]==="--usage"||e.includes("--usage")||e[0]==="--budget"||e.includes("--budget")){let{openUsageDashboard:o}=await import("./chunks/usageServer-
|
|
5
|
+
[MEMORY] Starting with: '${s>M?M:s} MB' Allocation${s>M?" (Max allowed: '"+M+" MB')":""}. Please Wait...`),await new Promise(n=>setTimeout(n,5e3))),ce(process.execPath,[`--max-old-space-size=${xe}`,"--expose-gc","--max-semi-space-size=1",D(import.meta.url),...process.argv.slice(2)],{stdio:"inherit"}).on("exit",n=>process.exit(n||0));else{let e=process.argv.slice(2),n=e.includes("--help")&&e[e.indexOf("--help")+1]==="commands",P=e.includes("--help")&&!n,N=e.includes("--version")||e.includes("-v"),R=e[0]==="--update",I=e[0]==="--export";if(e[0]==="--usage"||e.includes("--usage")||e[0]==="--budget"||e.includes("--budget")){let{openUsageDashboard:o}=await import("./chunks/usageServer-V3C5UWIH.js"),{url:r}=await o();console.log(`
|
|
6
6
|
\u2726 FluxFlow Token Usage & Analytics Dashboard
|
|
7
7
|
\u2800\u2800\u2514\u2500 Serving at: ${r}
|
|
8
8
|
\u2800\u2800\u2514\u2500 Opened in default browser. Press Ctrl+C to stop.
|
|
9
|
-
`),await new Promise(()=>{})}if(N||P||n||R||I){let o=await import("fs"),r=await import("path"),{fileURLToPath:i}=await import("url"),p=r.join(r.dirname(i(import.meta.url)),"../package.json"),d=JSON.parse(o.readFileSync(p,"utf8")).version;if(I){let v=(e[1]||"").toLowerCase();if(v==="error"||v==="logs")try{let{exportErrorLogs:l}=await import("./chunks/export-
|
|
9
|
+
`),await new Promise(()=>{})}if(N||P||n||R||I){let o=await import("fs"),r=await import("path"),{fileURLToPath:i}=await import("url"),p=r.join(r.dirname(i(import.meta.url)),"../package.json"),d=JSON.parse(o.readFileSync(p,"utf8")).version;if(I){let v=(e[1]||"").toLowerCase();if(v==="error"||v==="logs")try{let{exportErrorLogs:l}=await import("./chunks/export-OHZ652N5.js"),c=await l();console.log(`[EXPORT LOGS] Exported ${c.entryCount} error log entries (FluxFlow: ${c.fluxflowCount}, Memory: ${c.memoryCount}) to "${c.exportFile}"`),process.exit(0)}catch(l){console.error(`[EXPORT ERROR] Failed to export error logs: ${l.message}`),process.exit(1)}else console.error(`[EXPORT ERROR] Invalid export target "${e[1]||""}". --export only supports 'error'.
|
|
10
10
|
Usage: fluxflow --export error`),process.exit(1)}if(N&&(console.log(`v${d}`),process.exit(0)),P&&(console.log(`FluxFlow CLI Arguments:
|
|
11
11
|
--mode <flux|flow> Set startup mode (flux: Agent / flow: Chat)
|
|
12
12
|
--model <model_name> Set startup AI model
|
|
@@ -46,8 +46,8 @@ Usage: fluxflow --export error`),process.exit(1)}if(N&&(console.log(`v${d}`),pro
|
|
|
46
46
|
/image setup key <default|custom> Configure image API key strategy
|
|
47
47
|
/budget Set or View budget limits
|
|
48
48
|
/mode <flux|flow> Toggle Flux/Flow modes
|
|
49
|
-
/thinking <
|
|
50
|
-
/model <
|
|
49
|
+
/thinking <level> [--map <target>] Set AI reasoning depth or map thinking levels
|
|
50
|
+
/model <model_id> [-sv|-rm|-rn|-df] Switch or manage models for active provider
|
|
51
51
|
/wildcard-tooling Use if the model lacks Tooling Capability
|
|
52
52
|
/provider Select AI Provider
|
|
53
53
|
/settings Configure system preferences
|
|
@@ -63,4 +63,4 @@ Usage: fluxflow --export error`),process.exit(1)}if(N&&(console.log(`v${d}`),pro
|
|
|
63
63
|
/docs View documentation
|
|
64
64
|
/fluxflow init Create FluxFlow.md template
|
|
65
65
|
/update check Check for new version
|
|
66
|
-
/update latest Install latest release`),process.exit(0)),R){let v=e[1]||"latest";if(v==="check"){let l=e[2]==="latest";try{let x=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;x||(console.error("Error: Could not retrieve latest version."),process.exit(1)),console.log(l?`Latest version: v${x}`:x!==d?`A new version of FluxFlow is available: v${x} (current: v${d}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${d}).`)}catch(c){console.error("Error checking for updates:",c.message),process.exit(1)}process.exit(0)}else if(v==="latest"){console.log("Checking latest version and settings...");try{let a=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;a||(console.error("Error: Could not retrieve latest version."),process.exit(1)),a===d&&(console.log(`FluxFlow is already up to date (v${d}).`),process.exit(0));let x=async()=>{let t=(await import("react")).default,{useState:L}=t,{render:K,Box:f,Text:y}=await import("ink"),Q=(await import("ink-select-input")).default,Z=(await import("ink-text-input")).default;return new Promise(ee=>{let oe=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],te=({label:b,isSelected:C})=>t.createElement(f,{width:"100%"},t.createElement(y,{bold:C},"\u2514\u2500 ",C?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",b)),T,se=()=>{let[b,C]=L("select"),[ae,ne]=L(""),ie=F=>{F.value==="custom"?C("custom"):_({manager:F.value})},le=F=>{_({manager:"custom",customCommand:F})};return b==="custom"?t.createElement(f,{flexDirection:"column",marginY:1},t.createElement(f,{marginBottom:1},t.createElement(y,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),t.createElement(f,{flexDirection:"row"},t.createElement(y,{color:"cyan",bold:!0}," \u276F "),t.createElement(Z,{value:ae,onChange:ne,onSubmit:le})),t.createElement(f,{marginTop:1},t.createElement(y,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):t.createElement(f,{flexDirection:"column",marginY:1},t.createElement(f,{marginBottom:1},t.createElement(y,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),t.createElement(Q,{items:oe,onSelect:ie,itemComponent:te,indicatorComponent:()=>null}))},_=b=>{T&&T(),ee(b)},{unmount:re}=K(t.createElement(se,null));T=re})},u,O="",E;try{let{loadSettings:t}=await import("./chunks/settings-
|
|
66
|
+
/update latest Install latest release`),process.exit(0)),R){let v=e[1]||"latest";if(v==="check"){let l=e[2]==="latest";try{let x=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;x||(console.error("Error: Could not retrieve latest version."),process.exit(1)),console.log(l?`Latest version: v${x}`:x!==d?`A new version of FluxFlow is available: v${x} (current: v${d}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${d}).`)}catch(c){console.error("Error checking for updates:",c.message),process.exit(1)}process.exit(0)}else if(v==="latest"){console.log("Checking latest version and settings...");try{let a=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;a||(console.error("Error: Could not retrieve latest version."),process.exit(1)),a===d&&(console.log(`FluxFlow is already up to date (v${d}).`),process.exit(0));let x=async()=>{let t=(await import("react")).default,{useState:L}=t,{render:K,Box:f,Text:y}=await import("ink"),Q=(await import("ink-select-input")).default,Z=(await import("ink-text-input")).default;return new Promise(ee=>{let oe=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],te=({label:b,isSelected:C})=>t.createElement(f,{width:"100%"},t.createElement(y,{bold:C},"\u2514\u2500 ",C?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",b)),T,se=()=>{let[b,C]=L("select"),[ae,ne]=L(""),ie=F=>{F.value==="custom"?C("custom"):_({manager:F.value})},le=F=>{_({manager:"custom",customCommand:F})};return b==="custom"?t.createElement(f,{flexDirection:"column",marginY:1},t.createElement(f,{marginBottom:1},t.createElement(y,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),t.createElement(f,{flexDirection:"row"},t.createElement(y,{color:"cyan",bold:!0}," \u276F "),t.createElement(Z,{value:ae,onChange:ne,onSubmit:le})),t.createElement(f,{marginTop:1},t.createElement(y,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):t.createElement(f,{flexDirection:"column",marginY:1},t.createElement(f,{marginBottom:1},t.createElement(y,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),t.createElement(Q,{items:oe,onSelect:ie,itemComponent:te,indicatorComponent:()=>null}))},_=b=>{T&&T(),ee(b)},{unmount:re}=K(t.createElement(se,null));T=re})},u,O="",E;try{let{loadSettings:t}=await import("./chunks/settings-RQ72HWCU.js");E=await t(),u=E?.systemSettings?.updateManager||E?.updateManager}catch{}if(!u){let t=await x();u=t.manager,O=t.customCommand}let g="";u==="pnpm"?g=`pnpm add -g fluxflow-cli@${a}`:u==="bun"?g=`bun add -g fluxflow-cli@${a}`:u==="yarn"?g=`yarn global add fluxflow-cli@${a}`:u==="custom"?g=O||E?.customUpdateCommand||`npm install -g fluxflow-cli@${a}`:g=`npm install -g fluxflow-cli@${a}`,console.log(`Updating FluxFlow to v${a} using ${u}...`),console.log(`Running: ${g}`);let{execSync:J}=await import("child_process");J(g,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${a}.\x1B[0m`)}catch(l){console.error("\x1B[31m\u274C Update failed:\x1B[0m",l.message),process.exit(1)}process.exit(0)}else console.error("Unknown update command. Available options: --update, --update check, --update check latest, --update latest"),process.exit(1)}}let{default:Y}=await import("react"),{render:W}=await import("ink"),{default:q}=await import("./chunks/app-4CDJRXRD.js");process.env.NODE_NO_WARNINGS="1";let X=["cuimp","Found existing binary","Binary verified","curl.exe not found","Falling back to .bat file","DeprecationWarning"],H=console.log,V=console.warn,z=console.error,k=o=>{let r=o.map(String).join(" ");return X.some(i=>r.includes(i))};console.log=(...o)=>!k(o)&&H(...o),console.warn=(...o)=>!k(o)&&V(...o),console.error=(...o)=>!k(o)&&z(...o);let A=e.findIndex(o=>o==="--cwd"||o==="--path");if(A!==-1&&A+1<e.length){let o=e[A+1],r=await import("path"),i=await import("fs-extra"),p=r.default.resolve(o);try{i.default.existsSync(p)&&i.default.statSync(p).isDirectory()?process.chdir(p):(console.error(`[ERROR] Directory not found: "${o}"`),process.exit(0))}catch(w){console.error(`[ERROR] Failed to change directory to "${o}": ${w.message}`),process.exit(0)}}process.stdout.write("\x1B[2J\x1B[3J\x1B[H"),process.stdout.isTTY&&(process.stdout.write("\x1B]0;FluxFlow\x07"),process.stdout.write("\x1B]633;P;TerminalTitle=FluxFlow\x07"),process.stdout.write("\x1B[?2004h"));let $=()=>{process.stdout.isTTY&&process.stdout.write("\x1B[?2004l")};if(process.on("exit",$),["SIGINT","SIGTERM","SIGHUP"].forEach(o=>{process.once(o,()=>{$(),process.exit(0)})}),e.includes("--playground")){let o=process.cwd();process.argv.push("--original-cwd",o);let{DATA_DIR:r}=await import("./chunks/paths-PM7MFWJK.js"),i=await import("path"),p=await import("fs-extra"),w=i.default.join(r,"playground");try{p.default.ensureDirSync(w),process.chdir(w)}catch{}}W(Y.createElement(q,{args:process.argv.slice(2)}),{exitOnCtrlC:!1})}
|