fluxflow-cli 4.34.1 → 4.35.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/README.md +1 -0
- package/dist/chunks/{ai-GZVMDHYU.js → ai-2KKP7NFF.js} +1 -1
- package/dist/chunks/app-JERPNQ7V.js +315 -0
- package/dist/chunks/chunk-VMFH7MSG.js +916 -0
- package/dist/chunks/halloween-EZTJXDUW.js +1 -0
- package/dist/chunks/halloween_witty_phrases-IJGE3RWX.js +1 -0
- package/dist/chunks/{invoke-UOWSEOCZ.js → invoke-QP4USBCP.js} +2 -2
- package/dist/chunks/{invokeSync-SAIVFF23.js → invokeSync-UHGKK3NF.js} +2 -2
- package/dist/cli.js +2 -2
- package/dist/package.json +2 -2
- package/package.json +2 -2
- package/dist/chunks/app-34TEVO4W.js +0 -313
- package/dist/chunks/chunk-3RI5V7ZM.js +0 -916
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=["\u{1F36C} Treat: No merge conflicts in your future, guaranteed!","\u{1F383} Trick: A ghost committed directly to main with no commit message!","\u{1F36C} Treat: *hands you a fresh, warm Reese's cup and a zero-warning build*","\u{1F383} Trick: \u{1F47B} BOO! Your node_modules grew by 200MB while you blinked!","\u{1F36C} Treat: All your unit tests passed on the first run! Pure magic! \u2728","\u{1F383} Trick: \u{1F987} A bat flew away with your semi-colons!","\u{1F36C} Treat: \u{1F36B} Have some candy corn! Your cache hits are at 100%!","\u{1F383} Trick: \u{1F577}\uFE0F Spider web found tangled in your dependencies!","\u{1F36C} Treat: May your latency be low and your coffee be hot! \u2615\u{1F383}","\u{1F383} Trick: \u{1F9D9}\u200D\u2640\uFE0F Double, double toil and trouble; undefined is not a function in your bubble!","\u{1F36C} Treat: \u{1F36D} Full-size candy bar! The bug was just an off-by-one error!","\u{1F383} Trick: \u26B0\uFE0F Resurrecting deprecated API calls from the graveyard...","\u{1F36C} Treat: \u{1F383} Jack-o'-lantern lights the path to bug-free production deploys!"];export{e as SPOOKY_LINES};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=["Would you kindly hold on a second?","It's dangerous to go alone! Take this flashlight...","Pyramid Head is reorganizing your file headers...","Checking under the bed for FNAF animatronics...","Consulting the radio static from Silent Hill...","Seven minutes is all Albert Wesker can spare to wait...","Beware of the Nemesis S.T.A.R.S. routine...","Lighting a Bonfire to save terminal state...","YOU DIED (of impatience)... Respawning bytes...","Listening for the clickers from The Last of Us...","Sending a drone into the Raccoon City Police Station...","Geralt is muttering 'Wind's howling' in the background...","Isaac Clarke is stomping on stubborn memory leaks...","Checking camera 2B for Freddy Fazbear...","Opening the Spencer Mansion front door...","Looking for ink ribbons to save progress...","Phasmophobia spirit box whispers: 'BEHIND YOU'...","Avoiding the red mist from Dead by Daylight...","Running out of sanity pills in Amnesia...","Surviving Five Nights at FluxFlow...","Slender Man spotted in line 404...","Luigi is vacuuming ghosts out of RAM...","Castlevania whip cracking against slow network packets...","Something lurks inside the vents of the USG Ishimura...","Doom Slayer loading Super Shotgun into CPU cache...","Summoning Beetlejuice (first time)...","Summoning Beetlejuice (second time)...","Don't say it a third time!","Consulting the Necronomicon Ex-Mortis...","Klaatu barada n... necktie? Whatever...","Here's Johnny! ...just checking compiler status.","They're heeeere... in the call stack.","Whatever you do, don't fall asleep on the keyboard.","The call is coming from inside the container!","It's alive! IT'S ALIVEEEE!","Brewing eye of newt and toe of frog...","Double, double toil and trouble; code fire burn...","Feeding the carnivorous plant behind the server rack...","Checking for vampires in mirror reflections...","Carving a pumpkin onto the system prompt...","The headless horseman took the return statement...","Lighting the Black Flame Candle...","Checking the Ouija board for undefined variables...","Playing with the Lament Configuration puzzle box...","Poltergeist detected moving terminal tabs...","Resurrecting deprecated functions from 2008...","Exorcising memory leaks with holy water...","Hunting segmentation ghosts in the cellar...","A rogue zombie process is knocking on port 8080...","Dusting cobwebs off the legacy codebase...","Burying undefined pointers in the pet sematary...","Spilling pumpkin spice latte on the motherboard...","Consulting the local witch doctor for npm audit issues...","Ghosts in the shell doing spooky calculations...","Whispering incantations to the garbage collector...","Lighting candles around the git repository...","Blood, sweat, and missing semicolons...","Unearthing forgotten code from the digital crypt...","Sacrificing a floppy disk to the terminal gods...","Creepy creaks heard in the directory tree...","The grim reaper came for your unused imports...","Haunted switch statement looping in the dark...","Tuning ghost frequencies across async boundaries...","Bat wings flapping inside the cooling fan...","Skeleton in the closet: hardcoded API keys...","Walking through the graveyard of abandoned side projects...","Mummies wrapping up your request payload...","Frankenstein's monster pieced this algorithm together...","A full moon is rising over localhost...","Candy corn caught in the keyboard switches...","Trick or treat! Smell my cache, give me bytes to dispatch!","Phantom promises waiting to be fulfilled...","Vampire bats draining server battery life...","Something wicked this way compiles...","Boooo-le-an evaluates to true..."];export{e as HALLOWEEN_WITTY_PHRASES};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{a as k,c as d}from"./chunk-56EJGQU3.js";import{a as b}from"./chunk-Y5JU726N.js";var I=async(w,s={})=>{let{runSubagent:U}=await import("./ai-
|
|
1
|
+
import{a as k,c as d}from"./chunk-56EJGQU3.js";import{a as b}from"./chunk-Y5JU726N.js";var I=async(w,s={})=>{let{runSubagent:U}=await import("./ai-2KKP7NFF.js"),l=b(w),c=l.task||l.instruction||l.prompt,E=l.model||null,C=l.title||null,m=l.tools||null;if(!c)return'ERROR: Missing "task" argument for invoke.';let f=null;if(m)try{let t=m.trim();t.startsWith("[")&&t.endsWith("]")&&(t=t.substring(1,t.length-1)),f=t.split(",").map(n=>n.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let i=`subagent-${Date.now()}-${Math.floor(Math.random()*1e3)}`,h=null,S=null,$=new Promise((t,n)=>{h=t,S=n}),e={id:i,title:C||c.substring(0,30),task:c,status:"running",startedAt:Date.now(),lastChunkTime:Date.now(),wps:0,questions:[],pendingSteerMessages:[],steer:t=>{t&&e.pendingSteerMessages.push(t)},completionPromise:$,_resolveCompletion:h,_rejectCompletion:S,progress:[]},r={chunks:[],totalWords:0};k.push(e),s.onSubagentUpdate&&s.onSubagentUpdate();let a=[],A={...s,taskId:i,onAskMain:async t=>{let n=`q-${Date.now()}-${Math.floor(Math.random()*1e3)}`,o=null,p=new Promise(g=>{o=g}),u={id:n,question:t,answered:!1,answer:null,askedAt:Date.now(),_resolve:o};return e.questions.push(u),e.status="waiting",s.onSubagentUpdate&&s.onSubagentUpdate(),d(`[SYSTEM] Background subagent "${e.title}" is WAITING FOR YOUR INPUT: "${t}"
|
|
2
2
|
Respond using tool: [action:Answer(id="${i}", answer="...")]
|
|
3
3
|
[/SYSTEM]`),await p},onVisualFeedback:t=>{e.lastChunkTime=Date.now();let n=t.replace(/\x1b\[[0-9;]*m/g,""),o=n.match(/[✔✘✗✖🔍📖→➕↻•]\s*([A-Za-z0-9\s-]+)/);o?e.currentTool=o[1].trim():e.currentTool=n,s.onSubagentUpdate&&s.onSubagentUpdate()},onTokenChunk:(t,n)=>{let o=Date.now();if(e.lastChunkTime=o,e.currentTool="Thinking",typeof n=="number"&&n>0){r.totalWords+=n,r.chunks.push({time:o,words:n});let p=o-400;if(r.chunks=r.chunks.filter(u=>u.time>=p),r.chunks.length>0){let u=r.chunks.reduce((M,_)=>M+_.words,0),T=r.chunks[0].time,g=Math.max(.4,(o-T)/1e3);e.wps=Math.round(u/g)}}s.onSubagentUpdate&&s.onSubagentUpdate()}};return U(c,A,E,f,50,t=>{if(e.status==="cancelled")return;if(t.startsWith("[Subagent Turn")&&a.length>0&&(e.progress.push([...a]),a=[]),t.includes("[Executing Tool]")){let o=t.match(/\[Executing Tool\]\s*([a-zA-Z0-9_]+)/);o&&(!e.currentTool||e.currentTool==="Thinking")&&(e.currentTool=o[1])}let n=t;if(n.startsWith("[Tool Result]")||n.startsWith("[Action Result]")){let o=n.split(`
|
|
4
4
|
`);o.length>5&&(n=o.slice(0,4).join(`
|
|
5
5
|
`)+`
|
|
6
|
-
... [Content/Diff Truncated from Logs] ...`)}a.push(n),s.onSubagentUpdate&&s.onSubagentUpdate()},!0).then(t=>{if(e.status==="cancelled"){e._resolveCompletion&&e._resolveCompletion(t);return}a.length>0&&(e.progress.push([...a]),a=[]),e.status="completed",e.finalAnswer=t,s.onSubagentUpdate&&s.onSubagentUpdate(),d(`[SYSTEM] Background subagent "${e.title}" (id: ${i}) has FINISHED. Call GetProgress(id="${i}") to see the final result. [/SYSTEM]`),e._resolveCompletion&&e._resolveCompletion(t)}).catch(async t=>{let{isTerminationSignaled:n}=await import("./ai-
|
|
6
|
+
... [Content/Diff Truncated from Logs] ...`)}a.push(n),s.onSubagentUpdate&&s.onSubagentUpdate()},!0).then(t=>{if(e.status==="cancelled"){e._resolveCompletion&&e._resolveCompletion(t);return}a.length>0&&(e.progress.push([...a]),a=[]),e.status="completed",e.finalAnswer=t,s.onSubagentUpdate&&s.onSubagentUpdate(),d(`[SYSTEM] Background subagent "${e.title}" (id: ${i}) has FINISHED. Call GetProgress(id="${i}") to see the final result. [/SYSTEM]`),e._resolveCompletion&&e._resolveCompletion(t)}).catch(async t=>{let{isTerminationSignaled:n}=await import("./ai-2KKP7NFF.js");if(t.message==="Subagent task was cancelled."||e.status==="cancelled"||n()){e.status="cancelled",a.push("[SUBAGENT CANCELLED] Task was cancelled."),e.progress.push([...a]),s.onSubagentUpdate&&s.onSubagentUpdate(),e._resolveCompletion&&e._resolveCompletion(null);return}a.push(`[SUBAGENT FAILURE] Error: ${t.message}`),e.progress.push([...a]),e.status="failed",e.error=t.message,s.onSubagentUpdate&&s.onSubagentUpdate(),d(`[SYSTEM] Background subagent "${e.title}" (id: ${i}) FAILED with error: ${t.message}. [/SYSTEM]`),e._rejectCompletion&&e._rejectCompletion(t)}),`Background subagent started. Task ID: ${i}`};export{I as invoke};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as o}from"./chunk-Y5JU726N.js";var k=async(b,t={})=>{let{runSubagent:u}=await import("./ai-
|
|
2
|
-
`),e}catch(e){let{isTerminationSignaled:i}=await import("./ai-
|
|
1
|
+
import{a as o}from"./chunk-Y5JU726N.js";var k=async(b,t={})=>{let{runSubagent:u}=await import("./ai-2KKP7NFF.js"),s=o(b),a=s.task||s.instruction||s.prompt,m=s.model||null,l=s.tools||null;if(!a)return'ERROR: Missing "task" argument for invokeSync.';let r=null;if(l)try{let e=l.trim();e.startsWith("[")&&e.endsWith("]")&&(e=e.substring(1,e.length-1)),r=e.split(",").map(i=>i.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let n=s.title||a.substring(0,30);try{t.onVisualFeedback&&t.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${n}`);let e=await u(a,t,m,r,50);return t.onVisualFeedback&&t.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${n} [COMPLETED]
|
|
2
|
+
`),e}catch(e){let{isTerminationSignaled:i}=await import("./ai-2KKP7NFF.js"),c=e.message==="Subagent task was cancelled by user."||i();if(t.onVisualFeedback){let d=c?"[CANCELLED]":"[FAILED]";t.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${n} ${d}
|
|
3
3
|
`)}return`ERROR: Subagent execution failed: ${e.message}`}};export{k as invokeSync};
|
package/dist/cli.js
CHANGED
|
@@ -67,7 +67,7 @@ Usage: fluxflow --export error`),process.exit(1)}if(ee&&(console.log(`v${n}`),pr
|
|
|
67
67
|
/docs View documentation
|
|
68
68
|
/fluxflow init Create FluxFlow.md template
|
|
69
69
|
/update check Check for new version
|
|
70
|
-
/update latest Install latest release`),process.exit(0)),te){let C=t[1]||"latest";if(C==="check"){let f=t[2]==="latest";try{let y=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;y||(console.error("Error: Could not retrieve latest version."),process.exit(1)),console.log(f?`Latest version: v${y}`:y!==n?`A new version of FluxFlow is available: v${y} (current: v${n}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${n}).`)}catch(l){console.error("Error checking for updates:",l.message),process.exit(1)}process.exit(0)}else if(C==="latest"){console.log("Checking latest version and settings...");try{let c=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;c||(console.error("Error: Could not retrieve latest version."),process.exit(1)),c===n&&(console.log(`FluxFlow is already up to date (v${n}).`),process.exit(0));let y=async()=>{let s=(await import("react")).default,{useState:N}=s,{render:U,Box:S,Text:b}=await import("ink"),_=(await import("ink-select-input")).default,P=(await import("ink-text-input")).default;return new Promise(Y=>{let F=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],q=({label:E,isSelected:M})=>s.createElement(S,{width:"100%"},s.createElement(b,{bold:M},"\u2514\u2500 ",M?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",E)),O,W=()=>{let[E,M]=N("select"),[X,V]=N(""),z=h=>{h.value==="custom"?M("custom"):D({manager:h.value})},J=h=>{D({manager:"custom",customCommand:h})};return E==="custom"?s.createElement(S,{flexDirection:"column",marginY:1},s.createElement(S,{marginBottom:1},s.createElement(b,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),s.createElement(S,{flexDirection:"row"},s.createElement(b,{color:"cyan",bold:!0}," \u276F "),s.createElement(P,{value:X,onChange:V,onSubmit:J})),s.createElement(S,{marginTop:1},s.createElement(b,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):s.createElement(S,{flexDirection:"column",marginY:1},s.createElement(S,{marginBottom:1},s.createElement(b,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),s.createElement(_,{items:F,onSelect:z,itemComponent:q,indicatorComponent:()=>null}))},D=E=>{O&&O(),Y(E)},{unmount:H}=U(s.createElement(W,null));O=H})},i,A="",k;try{let{loadSettings:s}=await import("./chunks/settings-Q5OBKUO6.js");k=await s(),i=k?.systemSettings?.updateManager||k?.updateManager}catch{}if(!i){let s=await y();i=s.manager,A=s.customCommand}let p="";i==="pnpm"?p=`pnpm add -g fluxflow-cli@${c}`:i==="bun"?p=`bun add -g fluxflow-cli@${c}`:i==="yarn"?p=`yarn global add fluxflow-cli@${c}`:i==="custom"?p=A||k?.customUpdateCommand||`npm install -g fluxflow-cli@${c}`:p=`npm install -g fluxflow-cli@${c}`,console.log(`Updating FluxFlow to v${c} using ${i}...`),console.log(`Running: ${p}`);let{execSync:w}=await import("child_process");w(p,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${c}.\x1B[0m`)}catch(f){console.error("\x1B[31m\u274C Update failed:\x1B[0m",f.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:ce}=await import("react"),{render:pe}=await import("ink"),{default:me}=await import("./chunks/app-
|
|
70
|
+
/update latest Install latest release`),process.exit(0)),te){let C=t[1]||"latest";if(C==="check"){let f=t[2]==="latest";try{let y=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;y||(console.error("Error: Could not retrieve latest version."),process.exit(1)),console.log(f?`Latest version: v${y}`:y!==n?`A new version of FluxFlow is available: v${y} (current: v${n}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${n}).`)}catch(l){console.error("Error checking for updates:",l.message),process.exit(1)}process.exit(0)}else if(C==="latest"){console.log("Checking latest version and settings...");try{let c=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;c||(console.error("Error: Could not retrieve latest version."),process.exit(1)),c===n&&(console.log(`FluxFlow is already up to date (v${n}).`),process.exit(0));let y=async()=>{let s=(await import("react")).default,{useState:N}=s,{render:U,Box:S,Text:b}=await import("ink"),_=(await import("ink-select-input")).default,P=(await import("ink-text-input")).default;return new Promise(Y=>{let F=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],q=({label:E,isSelected:M})=>s.createElement(S,{width:"100%"},s.createElement(b,{bold:M},"\u2514\u2500 ",M?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",E)),O,W=()=>{let[E,M]=N("select"),[X,V]=N(""),z=h=>{h.value==="custom"?M("custom"):D({manager:h.value})},J=h=>{D({manager:"custom",customCommand:h})};return E==="custom"?s.createElement(S,{flexDirection:"column",marginY:1},s.createElement(S,{marginBottom:1},s.createElement(b,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),s.createElement(S,{flexDirection:"row"},s.createElement(b,{color:"cyan",bold:!0}," \u276F "),s.createElement(P,{value:X,onChange:V,onSubmit:J})),s.createElement(S,{marginTop:1},s.createElement(b,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):s.createElement(S,{flexDirection:"column",marginY:1},s.createElement(S,{marginBottom:1},s.createElement(b,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),s.createElement(_,{items:F,onSelect:z,itemComponent:q,indicatorComponent:()=>null}))},D=E=>{O&&O(),Y(E)},{unmount:H}=U(s.createElement(W,null));O=H})},i,A="",k;try{let{loadSettings:s}=await import("./chunks/settings-Q5OBKUO6.js");k=await s(),i=k?.systemSettings?.updateManager||k?.updateManager}catch{}if(!i){let s=await y();i=s.manager,A=s.customCommand}let p="";i==="pnpm"?p=`pnpm add -g fluxflow-cli@${c}`:i==="bun"?p=`bun add -g fluxflow-cli@${c}`:i==="yarn"?p=`yarn global add fluxflow-cli@${c}`:i==="custom"?p=A||k?.customUpdateCommand||`npm install -g fluxflow-cli@${c}`:p=`npm install -g fluxflow-cli@${c}`,console.log(`Updating FluxFlow to v${c} using ${i}...`),console.log(`Running: ${p}`);let{execSync:w}=await import("child_process");w(p,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${c}.\x1B[0m`)}catch(f){console.error("\x1B[31m\u274C Update failed:\x1B[0m",f.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:ce}=await import("react"),{render:pe}=await import("ink"),{default:me}=await import("./chunks/app-JERPNQ7V.js");process.env.NODE_NO_WARNINGS="1";let de=["cuimp","Found existing binary","Binary verified","curl.exe not found","Falling back to .bat file","DeprecationWarning"],ue=console.log,ge=console.warn,fe=console.error,B=o=>{let m=o.map(String).join(" ");return de.some(r=>m.includes(r))};console.log=(...o)=>!B(o)&&ue(...o),console.warn=(...o)=>!B(o)&&ge(...o),console.error=(...o)=>!B(o)&&fe(...o);let j=t.findIndex(o=>o==="--cwd"||o==="--path");if(j!==-1&&j+1<t.length){let o=t[j+1],m=await import("path"),r=await import("fs-extra"),d=m.default.resolve(o);try{r.default.existsSync(d)&&r.default.statSync(d).isDirectory()?process.chdir(d):(console.error(`[ERROR] Directory not found: "${o}"`),process.exit(0))}catch(x){console.error(`[ERROR] Failed to change directory to "${o}": ${x.message}`),process.exit(0)}}let I=t.includes("--commit_8f4a2b9c"),G=t.findIndex(o=>o==="-p"||o==="--prompt");if(G!==-1||I){let o=t.includes("--new")||t.includes("-n"),r=(G!==-1?t.slice(G+1).filter(e=>e!=="-n"&&e!=="--new"):[])[0];if(I)try{let{execSync:e}=await import("child_process"),a=e("git diff --cached",{encoding:"utf8",stdio:["ignore","pipe","pipe"]}).trim();a||process.exit(0),r=`Git Staged Diff:
|
|
71
71
|
${a}
|
|
72
72
|
---
|
|
73
73
|
|
|
@@ -79,7 +79,7 @@ ${r}`:r=n}if(!I&&!process.stdin.isTTY){let e=[];for await(let v of process.stdin
|
|
|
79
79
|
${a}
|
|
80
80
|
---
|
|
81
81
|
|
|
82
|
-
${r}`:r=a}}r||(console.error("[ERROR] -p/--prompt requires a prompt string (or piped stdin input)."),process.exit(1));let{loadSettings:C}=await import("./chunks/settings-Q5OBKUO6.js"),{getProviderAPIKey:f}=await import("./chunks/secrets-UNXNDOLK.js"),{getDefaultModel:l}=await import("./chunks/model_config-EN3OYDPU.js"),{generateSimpleContent:c}=await import("./chunks/ai-
|
|
82
|
+
${r}`:r=a}}r||(console.error("[ERROR] -p/--prompt requires a prompt string (or piped stdin input)."),process.exit(1));let{loadSettings:C}=await import("./chunks/settings-Q5OBKUO6.js"),{getProviderAPIKey:f}=await import("./chunks/secrets-UNXNDOLK.js"),{getDefaultModel:l}=await import("./chunks/model_config-EN3OYDPU.js"),{generateSimpleContent:c}=await import("./chunks/ai-2KKP7NFF.js"),{checkQuotaDetailed:y}=await import("./chunks/usage-OUCURLG4.js"),i=await C(),A=t.filter(e=>e!=="-p"&&e!=="--prompt"&&e!==r&&e!=="-n"&&e!=="--new"),k=I||A.includes("--raw")||t.includes("--raw"),p=e=>{for(let a of e){let v=A.indexOf(a);if(v!==-1&&v+1<A.length)return A[v+1]}return null},w=p(["--provider"])||i.aiProvider||"Google",s=p(["--model"])||i.activeModel||l(w,i.apiTier)||l(w,"paid"),N=p(["--key"])||await f(w);!N&&!(w==="c_openai"&&i.systemSettings?.customOpenAIBaseUrl)&&(console.error(`[ERROR] No API key resolved for provider "${w}".`),process.exit(1));let U=await y("agent",{aiProvider:w});U.allowed||(console.error(`[ERROR] ${U.reason||"Budget Exhausted"} - adjust with /budget set.`),process.exit(1));let{name:S="",nickname:b="",instructions:_=""}=i?.profileData??{},P={aiProvider:w,apiKey:N,model:s,mode:"flow",thinkingLevel:p(["--thinking"])||"Fast",systemSettings:i.systemSettings||{}},Y=process.platform==="win32"?"Windows":process.platform==="darwin"?"macOS":"Linux",F=new Date,q=F.getFullYear(),O=F.toLocaleString("en-US",{month:"short"}).toUpperCase(),W=String(F.getDate()).padStart(2,"0"),D=F.toLocaleTimeString([],{hour:"2-digit",hour12:!0}),H=`${q}-${O}-${W}, ${D}`,E=(P.model||"").replace(/^.*::/,"").split(":")[0].replace(/\/free$/,"").trim(),M=Q.basename(E).replace(/-free$/,"").replace(/_free$/,"").replace(/^free_/,"").replaceAll("-"," ").replaceAll("_"," ").replace(/\b\w/g,e=>e.toUpperCase().trim()),X=`Identity: FluxFlow. Sassy, CLI Assistant
|
|
83
83
|
Use NO markdown, only plain text
|
|
84
84
|
Additional Context:
|
|
85
85
|
- OS: ${Y}
|
package/dist/package.json
CHANGED
package/package.json
CHANGED