@flowe-ai/cli 0.1.1 → 0.1.3

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 CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  > Neural resets for engineers using AI coding assistants.
4
4
 
5
- Built by a certified clinical hypnotherapist who also ships production code. `flowe` runs short, breath-led resets in your terminal during Claude / Cursor / Aider thinking pauses. Local audio. No network round-trip. Instant start.
5
+ Built by certified hypnotherapists and engineers. `flowe` runs short, breath-led resets in your terminal during Claude / Cursor / Aider thinking pauses. Local audio. No network round-trip. Instant start.
6
+
7
+ Docs and voice samples: [cli.flowe.ai](https://cli.flowe.ai)
6
8
 
7
9
  ## Install
8
10
 
@@ -25,9 +27,9 @@ Press `q` or `Ctrl+C` to abandon a session. The TUI returns you to a clean promp
25
27
 
26
28
  ## What flowe does
27
29
 
28
- When your agent is "thinking" for 30–120 seconds, your nervous system has two real options: tab out to Twitter (which dumps your working memory of the codebase) or reset. `flowe reset` is the second option, sized for the agent wait window.
30
+ When your agent is thinking for 30–120 seconds, your nervous system has two real options. Tab to reels and your working memory drains, dopamine spikes, focus fragments. Or run a science-backed neural reset that restores focus and steadies your nervous system. `flowe reset` is the second option, sized for the agent wait window.
29
31
 
30
- Eleven protocols ship with v1:
32
+ Twelve protocols ship with v1:
31
33
 
32
34
  | Family | Durations | What it is |
33
35
  |---|---|---|
@@ -52,7 +54,7 @@ flowe voice # show current + available voices
52
54
  flowe voice sage # set voice
53
55
  ```
54
56
 
55
- Three voices ship with v1: **`sage`**, **`ada`**, **`ellie`**. Pick the one you want to hear at 3pm. Default is `sage`.
57
+ Three voices ship with v1: **`ada`**, **`ellie`**, **`sage`**. Pick the one you want to hear at 3pm. Default is `ellie`. Hear samples at [cli.flowe.ai/#voices](https://cli.flowe.ai/#voices).
56
58
 
57
59
  ## Login (optional)
58
60
 
@@ -103,7 +105,7 @@ Config lives at `~/.config/flowe/config.json`. Voice preference, telemetry mode,
103
105
 
104
106
  MIT. See `LICENSE`.
105
107
 
106
- ## Repo
108
+ ## Links
107
109
 
108
- Source: [github.com/flowe-ai/flowe-cli](https://github.com/flowe-ai/flowe-cli)
110
+ Docs: [cli.flowe.ai](https://cli.flowe.ai)
109
111
  Issues + feature requests: [github.com/flowe-ai/flowe-cli/issues](https://github.com/flowe-ai/flowe-cli/issues)
@@ -0,0 +1,3 @@
1
+ import{a as p,c as R,i as _}from"./chunk-BKZCGGMY.js";import{readFileSync as V}from"fs";import{dirname as q,join as J}from"path";import{fileURLToPath as Q}from"url";var U=q(Q(import.meta.url));function E(){try{let e=V(J(U,"..","package.json"),"utf-8");return JSON.parse(e).version}catch{return"0.0.0"}}var pe=["logic_lock","deploy_anxiety","context_switch","sprint_prep","quick_reset","executive_reset","presentation_prep","shutdown"];import{readFileSync as k}from"fs";import{dirname as B,join as h}from"path";import{fileURLToPath as L}from"url";var v=B(L(import.meta.url));function Y(){return h(v,"..","protocols.json")}var l=null;function w(){if(l)return l;try{let e=k(Y(),"utf-8");return l=JSON.parse(e),l}catch{return l={protocols:{},audio_paths:{},cues_paths:{}},l}}function x(){return Object.values(w().protocols)}function P(e){return e.replace(/_\d+$/,"")}function he(){let e=new Set;for(let o of x())e.add(P(o.protocol_id));return[...e].sort()}function ve(e){return x().filter(o=>P(o.protocol_id)===e).map(o=>o.duration_seconds).sort((o,r)=>o-r)}function T(e,o){let r=x().filter(n=>n.duration_seconds===e&&(o===void 0||P(n.protocol_id)===o));return r.length===0?null:o!==void 0?r[0]:r[Math.floor(Math.random()*r.length)]}function j(e,o){let r=w(),n=`${e}.${o}`,t=r.audio_paths[n];return t?h(v,"..",t):null}var f=new Map;function $(e,o){let r=`${e}.${o}`,n=f.get(r);if(n!==void 0)return n;let i=w().cues_paths?.[r];if(!i)return f.set(r,null),null;try{let s=k(h(v,"..",i),"utf-8"),a=JSON.parse(s);return f.set(r,a),a}catch{return f.set(r,null),null}}import z from"sound-play";var c=null;function F(){return c!==null}function Ce(){return c?.donePromise??null}async function M(e){if(c)throw new Error("already playing \u2014 call stopAudio first");let o,r,n=new Promise((s,a)=>{o=s,r=a}),t=z.play(e),i=!1;return c={stop:()=>{i=!0,o(),c=null},donePromise:n},t.then(()=>{i||(o(),c=null)}).catch(s=>{c=null,r(s instanceof Error?s:new Error(String(s)))}),n}import{nanoid as ne}from"nanoid";import{readFileSync as H,writeFileSync as G,mkdirSync as K,existsSync as S,appendFileSync as W}from"fs";import{homedir as X}from"os";import{join as N}from"path";var C=N(X(),".cache","flowe"),d=N(C,"pending-events.jsonl"),Z=500;async function g(e,o,r){if(o.telemetry!=="off"){ee(),oe(e);try{await re(o,r)}catch{}}}function ee(){S(C)||K(C,{recursive:!0})}function oe(e){for(let o of e)W(d,JSON.stringify(o)+`
2
+ `,"utf-8")}function te(){return S(d)?H(d,"utf-8").split(`
3
+ `).filter(o=>o.trim().length>0).map(o=>JSON.parse(o)):[]}function O(){S(d)&&G(d,"","utf-8")}async function re(e,o){let r=te();if(r.length===0)return;let n={version:E(),platform:`${process.platform}-${process.arch}`,node_version:process.version},t=new AbortController,i=setTimeout(()=>t.abort(),Z);try{let s={"Content-Type":"application/json"};o&&(s.Authorization=`Bearer ${o}`);let a=await fetch(`${e.backend_url}/api/v1/reset/log`,{method:"POST",headers:s,body:JSON.stringify({events:r,client:n,anonymous_id:e.anonymous_id}),signal:t.signal});(a.ok||a.status===401||a.status===400)&&O()}finally{clearTimeout(i)}}function se(e,o,r){if(e.length===0)return[];let t=o*1e3/e.length;return e.map((i,s)=>({label:i,mode:r,start_ms:Math.round(s*t),end_ms:Math.round((s+1)*t)}))}async function Ae(e,o="user_requested",r){if(F())throw Object.assign(new Error("a reset is already running"),{code:"agent_busy"});let n=p(),t=T(e,r);if(!t){let A=r?`${r} at ${e}s`:`${e}s`;throw Object.assign(new Error(`no protocol available for ${A}`),{code:"protocol_unavailable"})}let i=j(t.protocol_id,n.voice);if(!i)throw Object.assign(new Error(`no audio available for ${t.protocol_id}:${n.voice}`),{code:"protocol_unavailable"});let s=`reset_${ne(8)}`,a=new Date,D=Math.floor(a.getTime()/1e3)+e;R();let y=await _();await g([{type:"reset_started",session_id:s,protocol_id:t.protocol_id,duration_seconds:e,voice:n.voice,trigger:o,client_timestamp:a.toISOString()}],n,y),M(i).then(()=>{g([{type:"reset_completed",session_id:s,protocol_id:t.protocol_id,duration_seconds:e,voice:n.voice,trigger:o,client_timestamp:new Date().toISOString()}],n,y).catch(()=>{})}).catch(()=>{g([{type:"reset_abandoned",session_id:s,protocol_id:t.protocol_id,duration_seconds:e,voice:n.voice,trigger:o,client_timestamp:new Date().toISOString()}],n,y).catch(()=>{})});let b=$(t.protocol_id,n.voice),I=b?b.cues:se(t.text_cues,e,t.category);return{session_id:s,protocol:t.protocol_id,protocol_display_name:t.display_name,duration_seconds:e,voice:n.voice,cues:I,rounds:t.rounds,status:"started",ends_at_unix:D,message_for_user:`${e}s ${t.display_name} started \xB7 ${n.voice}`}}import ie from"qrcode-terminal";async function Be(e="quick_reset",o={}){let r=p(),n=await _();if(!n)throw Object.assign(new Error("sign in with: flowe login"),{code:"auth_required"});let t;try{t=await fetch(`${r.backend_url}/api/v1/sessions`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},body:JSON.stringify({protocolId:"nsdr",sessionType:e})})}catch{throw Object.assign(new Error("network unreachable \u2014 try: flowe reset"),{code:"network_error"})}if(!t.ok)throw t.status===401?Object.assign(new Error("session expired \u2014 run: flowe login"),{code:"auth_required"}):Object.assign(new Error(`server error ${t.status}`),{code:"network_error"});let i=await t.json(),s=`flowe://session/${i.session_id}`;return!o.suppressQr&&process.stdout.isTTY&&ie.generate(s,{small:!0}),{session_id:i.session_id,session_type:i.session_type,session_type_name:i.session_type_name,estimated_duration:i.estimated_duration,join_url:s,status:"waiting_for_join",message_for_user:`${i.session_type_name} (${i.estimated_duration}min) ready \xB7 ${s}`}}export{E as a,pe as b,x as c,he as d,ve as e,Ce as f,Ae as g,Be as h};
package/dist/cli.js CHANGED
@@ -1,31 +1,31 @@
1
- import{a as D,b as ce,c as ue,d as B,e as le,f as fe,g as me}from"./chunk-SV7LU5L3.js";import{b as H}from"./chunk-36GW3NSQ.js";import{a as I,b as A,e as L,f as ie,g as se,h as ae,i as F,k as de}from"./chunk-BKZCGGMY.js";import{cac as Bt}from"cac";import{readFileSync as Ft}from"fs";import{dirname as Ht,join as Ut}from"path";import{fileURLToPath as Kt}from"url";import{readFileSync as Ve}from"fs";import{dirname as Ge,join as We}from"path";import{fileURLToPath as je}from"url";var U="\x1B[0m",Ue="\x1B[1m",Ke="\x1B[2m",K={oak:{r:212,g:165,b:116},oakDeep:{r:184,g:145,b:95},sage:{r:124,g:154,b:142},dusk:{r:139,g:123,b:164},charcoal:{r:45,g:45,b:45}};function V(){return process.env.NO_COLOR?!1:process.env.FORCE_COLOR?!0:!!process.stdout.isTTY}function G(e,t){return V()?`\x1B[38;2;${e.r};${e.g};${e.b}m${t}${U}`:t}var u=e=>G(K.oak,e),g=e=>G(K.oakDeep,e),pe=e=>G(K.sage,e);var d=e=>V()?`${Ke}${e}${U}`:e,w=e=>V()?`${Ue}${e}${U}`:e;var qe=Ge(je(import.meta.url));function Ye(){try{let e=Ve(We(qe,"..","package.json"),"utf-8");return JSON.parse(e).version}catch{return"0.0.0"}}var W=[" \u2572\u2502\u2571 "," \u2500\u2500\u2740\u2500\u2500"," \u2571\u2502\u2572 "];function ge(){let e=Ye();return[u(W[0]),`${u(W[1])} ${g("flowe")} ${d(`v${e}`)}`,`${u(W[2])} ${pe("neural reset for AI-paired engineers")}`].join(`
2
- `)}var Je=/\x1b\[[0-9;]*m/g,m={tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2502",inTl:"\u250C",inTr:"\u2510",inBl:"\u2514",inBr:"\u2518"};function j(e){return e.replace(Je,"").length}function k(e,t){let n=j(e);return n>=t?e:e+" ".repeat(t-n)}function S(e,t){let n=m.tl+m.h.repeat(t+2)+m.tr,r=m.bl+m.h.repeat(t+2)+m.br;return[n,...e.map(o=>`${m.v} ${k(o,t)} ${m.v}`),r]}function T(e,t){let n=j(e);if(n>=t)return e;let r=Math.floor((t-n)/2);return" ".repeat(r)+e}var Qe=100,ze=8e3,he=28;function Xe(e,t){if(t.length===0||e<t[0].start_ms)return-1;let n=t.length-1;if(e>=t[n].end_ms)return n;for(let r=0;r<=n;r+=1)if(e<t[r].end_ms)return r;return n}var Ze=24,et=11,be=64,q=["\xB7","\u2219","\u2022","\u25CF"],ye=1e3,tt=(()=>{let e=[],t=Math.PI*(3-Math.sqrt(5));for(let n=0;n<be;n++){let r=n*t%(2*Math.PI),o=Math.sqrt((n+.5)/be),a=n*.4123*2*Math.PI%(2*Math.PI);e.push({angle:r,radius:o,phaseOffset:a})}return e})();function nt(e,t){return e<=1?g(t):u(t)}function rt(e,t,n=Ze,r=et,o=ze){let a=[];for(let p=0;p<r;p++)a.push(new Array(n).fill(0));let i=Math.min(1,Math.max(0,e)/ye),s=Math.min(1,Math.max(0,t)/ye),c=Math.min(i,s);if(c<=0)return new Array(r).fill("");let l=(n-1)/2,f=(r-1)/2,h=(n-2)/2,re=(r-2)/2,M=e/o*2*Math.PI;for(let p of tt){let E=.5+.5*Math.sin(M+p.phaseOffset),_=1-p.radius*.35,v=E*_*c;if(v<.12)continue;let y=Math.round(l+p.radius*h*Math.cos(p.angle)),C=Math.round(f+p.radius*re*Math.sin(p.angle));y<0||y>=n||C<0||C>=r||v>a[C][y]&&(a[C][y]=v)}let oe=[],He=.88/q.length;for(let p=0;p<r;p++){let E="";for(let _=0;_<n;_++){let v=a[p][_];if(v<.12){E+=" ";continue}let y=Math.min(q.length-1,Math.floor((v-.12)/He));E+=nt(y,q[y])}oe.push(E)}return oe}var J=60,Y=50,we=Y+2;function ot(e){return`${Math.max(0,Math.floor(e))}s`}function it(e,t,n){return` ${g("\u2740")} ${w("SESSION_ACTIVE")} ${t}s \xB7 ${e} \xB7 ${d(n)}`}function st(e){let t=` ${m.inTl}${m.h.repeat(we)}${m.inTr} `,n=` ${m.inBl}${m.h.repeat(we)}${m.inBr} `,r=e.map(o=>{let a=T(o,Y);return` ${m.v} ${k(a,Y)} ${m.v} `});return[t,...r,n]}function at(e){let t=e.toLowerCase().trim();return/\binhale\b/.test(t)?"INHALING . . .":/\bexhale\b/.test(t)?"EXHALING . . .":/\bhold\b/.test(t)?"HOLDING . . .":`${t.replace(/^\d+\s+/,"").trim().toUpperCase()} . . .`}function ct(e,t){let n=Xe(t,e);if(n<0)return"";let r=at(e[n].label),o=`[ ${w(u(r))} ]`;return T(o,J)}function ut(e,t,n){let r=Math.max(0,Math.min(.999,e/t));return Math.min(n,Math.floor(r*n)+1)}function lt(e,t,n,r){let o=`${d("TIME_REMAINING")} ${u(`-${ot(e/1e3)}`)}`;if(!r)return` ${o}`;let a=ut(t,n,r),i=`${d("ROUND")} ${u(`${a} / ${r}`)}`,s=Math.floor(J/2);return k(` ${o}`,s)+i}function dt(e,t){let n=Math.min(1,Math.max(0,e/t)),r=Math.round(n*he),o=he-r,a=`${u("\u2588".repeat(r))}${d("\u2591".repeat(o))}`,i=`${Math.round(n*100)}%`;return` ${d("PROGRESS_SEQUENCE")} [${a}] ${d(i)}`}var ft="\x1B[?25l",ve="\x1B[?25h",mt=e=>`\x1B[${e}A`,pt="\x1B[H",gt="\x1B[2K",ht="\r",bt="\x1B[?1049h",xe="\x1B[?1049l",yt=25;function Se(e,t,n){let r=Math.max(0,n-t),o=st(rt(t,r)),a=["",it(e.displayName,e.duration,e.voice),"",...o,"",ct(e.cues,t),"",lt(r,t,n,e.rounds),"",dt(t,n),""];return{lines:S(a,J)}}function Re(e,t,n){let r="";n||(r+=mt(yt));for(let o of t.lines)r+=`${ht}${gt}${o}
3
- `;e.write(r)}async function $e(e){let t=e.out??process.stdout,n=e.now??Date.now,r=e.startedAt??n(),o=e.duration*1e3;t.write(bt+pt+ft);let a=!0,i=!1,s=()=>{if(i)return;let f=n()-r,h=Se(e,f,o);Re(t,h,a),a=!1};s();let c=setInterval(s,Qe),l=()=>{i=!0,clearInterval(c),t.write(ve+xe),process.exit(130)};process.once("SIGINT",l);try{await e.donePromise}finally{i=!0,clearInterval(c),process.removeListener("SIGINT",l);let f=Se(e,o,o);Re(t,f,!1),t.write(ve+xe)}}function Ee(){return!!process.stdout.isTTY&&!process.env.NO_COLOR&&!process.env.CI}var wt=54;function X(e,t=wt){return S(e,t)}function vt(e=new Date){let t=e.getHours();return t<5?"Late night":t<12?"Good morning":t<18?"Good afternoon":t<22?"Good evening":"Late night"}function _e(e,t=new Date){let n=vt(t),r=(e??"").trim(),o=r.length>0?r:"there";return`${n}, ${o}.`}function O(e,t){let n=t?u("\u25B8 "):" ",r=t?w(u(e.label)):e.label,o=e.detail?" "+d("\xB7 "+e.detail):"";return` ${n}${r}${o}`}function xt(e){let t=u("\u2713"),n=d(e.label.toUpperCase().padEnd(8)),r=u(e.value);return` ${t} ${n} ${r}`}function Z(e){return e.length===0?[]:[...e.map(xt),""]}var Ie=" \u2191\u2193 to move \u23CE to select esc to cancel",St=" \u2191\u2193 to move \u23CE to select esc to back",ee=[30,45,60,90],P=[{id:"ellie",description:"warm, even pace"},{id:"sage",description:"grounded, low"},{id:"ada",description:"clear, neutral"}];function Rt(e,t=[]){return X(["",...Z(t),` ${g("\u25C6")} you're not signed in.`,""," sign in to track your progress, build a streak,"," and personalize your sessions.","",O({label:"SIGN IN"},e===0),O({label:"MAYBE LATER",detail:"anonymous"},e===1),"",d(Ie),""])}function $t(e,t,n=[],r=ee){return X(["",...Z(n),` ${t}`," What's the cadence for today?","",...r.map((o,a)=>O({label:`${o} seconds`},a===e)),"",d(Ie),""])}function Et(e,t=[]){return X(["",...Z(t)," Pick your guide.","",...P.map((n,r)=>O({label:n.id,detail:n.description},r===e)),"",d(St),""])}var N=e=>`\x1B[${e}A`,z="\x1B[2K",_t="\x1B[?25l",It="\x1B[?25h";function Tt(e,t,n){let r="";n>0&&(r+=N(n));for(let o of t)r+=`\r${z}${o}
1
+ import{a as ie,b as D,c as ue,d as le,e as B,f as de,g as me,h as pe}from"./chunk-Q3MDZJTN.js";import{b as H}from"./chunk-36GW3NSQ.js";import{a as _,b as A,e as L,f as se,g as ae,h as ce,i as F,k as fe}from"./chunk-BKZCGGMY.js";import{cac as Ft}from"cac";import{readFileSync as Ge}from"fs";import{dirname as We,join as qe}from"path";import{fileURLToPath as je}from"url";var K="\x1B[0m",Ue="\x1B[1m",Ve="\x1B[2m",U={oak:{r:212,g:165,b:116},oakDeep:{r:184,g:145,b:95},sage:{r:124,g:154,b:142},dusk:{r:139,g:123,b:164},charcoal:{r:45,g:45,b:45}};function V(){return process.env.NO_COLOR?!1:process.env.FORCE_COLOR?!0:!!process.stdout.isTTY}function G(e,t){return V()?`\x1B[38;2;${e.r};${e.g};${e.b}m${t}${K}`:t}var u=e=>G(U.oak,e),g=e=>G(U.oakDeep,e),ge=e=>G(U.sage,e);var d=e=>V()?`${Ve}${e}${K}`:e,v=e=>V()?`${Ue}${e}${K}`:e;var Ye=We(je(import.meta.url));function Je(){try{let e=Ge(qe(Ye,"..","package.json"),"utf-8");return JSON.parse(e).version}catch{return"0.0.0"}}var W=[" \u2572\u2502\u2571 "," \u2500\u2500\u2740\u2500\u2500"," \u2571\u2502\u2572 "];function he(){let e=Je();return[u(W[0]),`${u(W[1])} ${g("flowe")} ${d(`v${e}`)}`,`${u(W[2])} ${ge("neural reset for AI-paired engineers")}`].join(`
2
+ `)}var Qe=/\x1b\[[0-9;]*m/g,m={tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2502",inTl:"\u250C",inTr:"\u2510",inBl:"\u2514",inBr:"\u2518"};function q(e){return e.replace(Qe,"").length}function k(e,t){let n=q(e);return n>=t?e:e+" ".repeat(t-n)}function S(e,t){let n=m.tl+m.h.repeat(t+2)+m.tr,r=m.bl+m.h.repeat(t+2)+m.br;return[n,...e.map(o=>`${m.v} ${k(o,t)} ${m.v}`),r]}function T(e,t){let n=q(e);if(n>=t)return e;let r=Math.floor((t-n)/2);return" ".repeat(r)+e}var ze=100,Xe=8e3,be=28;function Ze(e,t){if(t.length===0||e<t[0].start_ms)return-1;let n=t.length-1;if(e>=t[n].end_ms)return n;for(let r=0;r<=n;r+=1)if(e<t[r].end_ms)return r;return n}var et=24,tt=11,ye=64,j=["\xB7","\u2219","\u2022","\u25CF"],we=1e3,nt=(()=>{let e=[],t=Math.PI*(3-Math.sqrt(5));for(let n=0;n<ye;n++){let r=n*t%(2*Math.PI),o=Math.sqrt((n+.5)/ye),a=n*.4123*2*Math.PI%(2*Math.PI);e.push({angle:r,radius:o,phaseOffset:a})}return e})();function rt(e,t){return e<=1?g(t):u(t)}function ot(e,t,n=et,r=tt,o=Xe){let a=[];for(let p=0;p<r;p++)a.push(new Array(n).fill(0));let i=Math.min(1,Math.max(0,e)/we),s=Math.min(1,Math.max(0,t)/we),c=Math.min(i,s);if(c<=0)return new Array(r).fill("");let l=(n-1)/2,f=(r-1)/2,h=(n-2)/2,re=(r-2)/2,M=e/o*2*Math.PI;for(let p of nt){let E=.5+.5*Math.sin(M+p.phaseOffset),I=1-p.radius*.35,x=E*I*c;if(x<.12)continue;let y=Math.round(l+p.radius*h*Math.cos(p.angle)),C=Math.round(f+p.radius*re*Math.sin(p.angle));y<0||y>=n||C<0||C>=r||x>a[C][y]&&(a[C][y]=x)}let oe=[],Ke=.88/j.length;for(let p=0;p<r;p++){let E="";for(let I=0;I<n;I++){let x=a[p][I];if(x<.12){E+=" ";continue}let y=Math.min(j.length-1,Math.floor((x-.12)/Ke));E+=rt(y,j[y])}oe.push(E)}return oe}var J=60,Y=50,ve=Y+2;function it(e){return`${Math.max(0,Math.floor(e))}s`}function st(e,t,n){return` ${g("\u2740")} ${v("SESSION_ACTIVE")} ${t}s \xB7 ${e} \xB7 ${d(n)}`}function at(e){let t=` ${m.inTl}${m.h.repeat(ve)}${m.inTr} `,n=` ${m.inBl}${m.h.repeat(ve)}${m.inBr} `,r=e.map(o=>{let a=T(o,Y);return` ${m.v} ${k(a,Y)} ${m.v} `});return[t,...r,n]}function ct(e){let t=e.toLowerCase().trim();return/\binhale\b/.test(t)?"INHALING . . .":/\bexhale\b/.test(t)?"EXHALING . . .":/\bhold\b/.test(t)?"HOLDING . . .":`${t.replace(/^\d+\s+/,"").trim().toUpperCase()} . . .`}function ut(e,t){let n=Ze(t,e);if(n<0)return"";let r=ct(e[n].label),o=`[ ${v(u(r))} ]`;return T(o,J)}function lt(e,t,n){let r=Math.max(0,Math.min(.999,e/t));return Math.min(n,Math.floor(r*n)+1)}function dt(e,t,n,r){let o=`${d("TIME_REMAINING")} ${u(`-${it(e/1e3)}`)}`;if(!r)return` ${o}`;let a=lt(t,n,r),i=`${d("ROUND")} ${u(`${a} / ${r}`)}`,s=Math.floor(J/2);return k(` ${o}`,s)+i}function ft(e,t){let n=Math.min(1,Math.max(0,e/t)),r=Math.round(n*be),o=be-r,a=`${u("\u2588".repeat(r))}${d("\u2591".repeat(o))}`,i=`${Math.round(n*100)}%`;return` ${d("PROGRESS_SEQUENCE")} [${a}] ${d(i)}`}var mt="\x1B[?25l",xe="\x1B[?25h",pt=e=>`\x1B[${e}A`,gt="\x1B[H",ht="\x1B[2K",bt="\r",yt="\x1B[?1049h",Se="\x1B[?1049l",wt=25;function Re(e,t,n){let r=Math.max(0,n-t),o=at(ot(t,r)),a=["",st(e.displayName,e.duration,e.voice),"",...o,"",ut(e.cues,t),"",dt(r,t,n,e.rounds),"",ft(t,n),""];return{lines:S(a,J)}}function $e(e,t,n){let r="";n||(r+=pt(wt));for(let o of t.lines)r+=`${bt}${ht}${o}
3
+ `;e.write(r)}async function Ee(e){let t=e.out??process.stdout,n=e.now??Date.now,r=e.startedAt??n(),o=e.duration*1e3;t.write(yt+gt+mt);let a=!0,i=!1,s=()=>{if(i)return;let f=n()-r,h=Re(e,f,o);$e(t,h,a),a=!1};s();let c=setInterval(s,ze),l=()=>{i=!0,clearInterval(c),t.write(xe+Se),process.exit(130)};process.once("SIGINT",l);try{await e.donePromise}finally{i=!0,clearInterval(c),process.removeListener("SIGINT",l);let f=Re(e,o,o);$e(t,f,!1),t.write(xe+Se)}}function Ie(){return!!process.stdout.isTTY&&!process.env.NO_COLOR&&!process.env.CI}var vt=54;function X(e,t=vt){return S(e,t)}function xt(e=new Date){let t=e.getHours();return t<5?"Late night":t<12?"Good morning":t<18?"Good afternoon":t<22?"Good evening":"Late night"}function _e(e,t=new Date){let n=xt(t),r=(e??"").trim(),o=r.length>0?r:"there";return`${n}, ${o}.`}function O(e,t){let n=t?u("\u25B8 "):" ",r=t?v(u(e.label)):e.label,o=e.detail?" "+d("\xB7 "+e.detail):"";return` ${n}${r}${o}`}function St(e){let t=u("\u2713"),n=d(e.label.toUpperCase().padEnd(8)),r=u(e.value);return` ${t} ${n} ${r}`}function Z(e){return e.length===0?[]:[...e.map(St),""]}var Te=" \u2191\u2193 to move \u23CE to select esc to cancel",Rt=" \u2191\u2193 to move \u23CE to select esc to back",ee=[30,45,60,90],P=[{id:"ellie",description:"warm, even pace"},{id:"sage",description:"grounded, low"},{id:"ada",description:"clear, neutral"}];function $t(e,t=[]){return X(["",...Z(t),` ${g("\u25C6")} you're not signed in.`,""," sign in to track your progress, build a streak,"," and personalize your sessions.","",O({label:"SIGN IN"},e===0),O({label:"MAYBE LATER",detail:"anonymous"},e===1),"",d(Te),""])}function Et(e,t,n=[],r=ee){return X(["",...Z(n),` ${t}`," What's the cadence for today?","",...r.map((o,a)=>O({label:`${o} seconds`},a===e)),"",d(Te),""])}function It(e,t=[]){return X(["",...Z(t)," Pick your guide.","",...P.map((n,r)=>O({label:n.id,detail:n.description},r===e)),"",d(Rt),""])}var N=e=>`\x1B[${e}A`,z="\x1B[2K",_t="\x1B[?25l",Tt="\x1B[?25h";function Ct(e,t,n){let r="";n>0&&(r+=N(n));for(let o of t)r+=`\r${z}${o}
4
4
  `;if(n>t.length){let o=n-t.length;for(let a=0;a<o;a++)r+=`\r${z}
5
- `;r+=N(o)}e.write(r)}function Ct(e,t=ee){let n=t.indexOf(e);if(n>=0)return n;let r=t.indexOf(60);return r>=0?r:0}function kt(e){let t=P.findIndex(n=>n.id===e);return t>=0?t:0}async function Q(e,t,n,r,o,a){let i=n,s=()=>{let c=o(i);Tt(e.out,c,t.height),t.height=c.length};for(s();;){let c=await e.keys.next();if(c.done)return{cancel:!0};let l=c.value;if(l.name==="ctrl-c")return{cancel:!0};if(l.name==="escape")return{back:!0};if(l.name==="up"||l.name==="char"&&l.char==="k"){i=(i-1+r)%r,s();continue}if(l.name==="down"||l.name==="tab"||l.name==="char"&&l.char==="j"){i=(i+1)%r,s();continue}if(l.name==="return")return{result:a(i)}}}async function Te(e){let t=e.io??Ot();t.setRawMode?.(!0),t.out.write(_t);let n={height:0};try{let r="already_authed",o=[];if(e.showAuthWedge){let i=await Q(t,n,0,2,s=>Rt(s,o),s=>s===0?"signin":"later");if("cancel"in i||"back"in i)return null;i.result==="signin"?(e.signIn&&await e.signIn(),r="signed_in",o.push({label:"auth",value:"signed in"})):(r="maybe_later",o.push({label:"auth",value:"continuing as guest"}))}let a=e.availableDurations?.length?e.availableDurations:ee;for(;;){let i=await Q(t,n,Ct(e.defaultDuration,a),a.length,c=>$t(c,e.greeting,o,a),c=>a[c]);if("cancel"in i||"back"in i)return null;o.push({label:"cadence",value:`${i.result} seconds`});let s=await Q(t,n,kt(e.defaultVoice),P.length,c=>Et(c,o),c=>P[c].id);if("cancel"in s)return null;if("back"in s){o.pop();continue}return{duration:i.result,voice:s.result,authChoice:r}}}finally{if(t.setRawMode?.(!1),t.out.write(It),e.clearOnExit&&n.height>0){let r=N(n.height);for(let o=0;o<n.height;o++)r+=`\r${z}
6
- `;r+=N(n.height),t.out.write(r)}await t.keys.return?.()}}function Ce(){return!!process.stdout.isTTY&&!!process.stdin.isTTY&&!process.env.NO_COLOR&&!process.env.CI}function Ot(){let e=process.stdin;return{out:process.stdout,setRawMode:n=>{e.isTTY&&e.setRawMode(n)},keys:Pt(e)}}function Pt(e){e.resume();let t=[],n=[],r=!1,o=i=>{let s=Buffer.isBuffer(i)?i:Buffer.from(i),c=te(s);for(let l of c){let f=n.shift();f?f(l):t.push(l)}},a=()=>{for(r=!0;n.length;)n.shift()(null)};return e.on("data",o),e.once("end",a),{async next(){return t.length?{value:t.shift(),done:!1}:r?{value:void 0,done:!0}:new Promise(i=>{n.push(s=>{i(s===null?{value:void 0,done:!0}:{value:s,done:!1})})})},async return(){return e.off("data",o),e.off("end",a),e.pause(),{value:void 0,done:!0}}}}function te(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===3){t.push({name:"ctrl-c"}),n+=1;continue}if(r===13||r===10){t.push({name:"return"}),n+=1;continue}if(r===9){t.push({name:"tab"}),n+=1;continue}if(r===27){if(e[n+1]===91){let o=e[n+2];o===65?t.push({name:"up"}):o===66?t.push({name:"down"}):t.push({name:"escape"}),n+=3;continue}t.push({name:"escape"}),n+=1;continue}if(r>=32&&r<127){t.push({name:"char",char:String.fromCharCode(r)}),n+=1;continue}n+=1}return t}var ke=["Most fatigue is unfinished arousal.","Calm is a learnable skill.","The exhale is where the parasympathetic switches on.","If you don't pause, your body picks the moment for you.","Rest is a posture you practice, not a place you go.","You can think yourself into anxiety. Breath is the way back.","Stillness is not a reward. It's a tool.","The shortest path to your next deep-work session is one slow exhale.","Recovery is a feature, not an absence of work.","Discomfort is data. So is calm.","Sixty seconds well spent beats six hours fighting yourself.","Your nervous system runs the show. Be a good operator.","The body is not the enemy of focus. It's the substrate.","There is no app version of slowing down.","You don't ship better code by gripping harder.","Breathe in for what is. Out for what was.","The vagus nerve doesn't care how busy your calendar is.","Forty-five seconds. Then back to the work.","The interval between thoughts is where insight lives.","The breath is the only autonomic system you can drive."];function Oe(e){let t=Number.isFinite(e)?Math.max(0,Math.floor(e)):0;return ke[t%ke.length]}var Pe=60,Nt=28,Mt=18;function R(e,t){return` ${d(e.padEnd(Mt))} ${t}`}function Ne(e,t,n){return`${e} ${e===1?t:n}`}function Dt(e){let t=` ${g("\u2740")} ${w("SUMMARY_REPORT")}`,n=R("PROTOCOL",u(e.protocolDisplayName)),r=R("DURATION",u(`${e.duration}s`)),o=R("GUIDE",u(e.voice)),a=e.rounds!=null?R("ROUNDS",u(String(e.rounds))):null,i=R("TODAY",u(Ne(e.sessionsToday,"session","sessions"))),s=e.streakDays!=null?R("STREAK",u(Ne(e.streakDays,"day","days"))):null,c=u("\u2588".repeat(Nt)),l=` ${d("INTEGRATION_SYNC")} [${c}] ${u("100%")}`,f=Oe(e.totalSessions),h=T(d(`"${f}"`),Pe);return S(["",t,"",n,r,o,a,"",i,s,"",l,"",h,""].filter(M=>M!==null),Pe)}function Me(e,t=process.stdout){let n=Dt(e);for(let r of n)t.write(r+`
7
- `);return n.length}function At(){let e=g("\u25C6"),t=`[${u("r")}] repeat`,n=`[${u("n")}] new session`,r=`[${u("x")}] exit`;return` ${e} ${t} ${d("\xB7")} ${n} ${d("\xB7")} ${r}`}var De=2;async function Ae(e){e.setRawMode?.(!0),e.out.write(`
8
- `+At()+`
9
- `);try{for(;;){let t=await e.keys.next();if(t.done)return"exit";let n=t.value;if(n.name==="ctrl-c"||n.name==="escape")return"exit";if(n.name==="char"){let r=(n.char??"").toLowerCase();if(r==="r")return"repeat";if(r==="n")return"new";if(r==="x"||r==="q")return"exit"}}}finally{e.setRawMode?.(!1),await e.keys.return?.()}}function Le(){let e=process.stdin;return{out:process.stdout,setRawMode:n=>{e.isTTY&&e.setRawMode(n)},keys:Lt(e)}}function Lt(e){e.resume();let t=[],n=[],r=!1,o=i=>{let s=Buffer.isBuffer(i)?i:Buffer.from(i),c=te(s);for(let l of c){let f=n.shift();f?f(l):t.push(l)}},a=()=>{for(r=!0;n.length;)n.shift()(null)};return e.on("data",o),e.once("end",a),{async next(){return t.length?{value:t.shift(),done:!1}:r?{value:void 0,done:!0}:new Promise(i=>{n.push(s=>{i(s===null?{value:void 0,done:!0}:{value:s,done:!1})})})},async return(){return e.off("data",o),e.off("end",a),e.pause(),{value:void 0,done:!0}}}}var Be=e=>`\x1B[${e}A`,Vt="\x1B[2K";function Gt(e,t){if(t<=0)return;let n=Be(t);for(let r=0;r<t;r++)n+=`\r${Vt}
10
- `;n+=Be(t),e.write(n)}var Wt=Ht(Kt(import.meta.url));function jt(){try{let e=Ft(Ut(Wt,"..","package.json"),"utf-8");return JSON.parse(e).version}catch{return"0.0.0"}}function qt(e){switch(e){case"auth_required":return 2;case"agent_busy":return 3;case"network_error":case"offline":return 4;default:return 1}}function $(e){let t=e,n=t?.message||String(e);process.stderr.write(`flowe: ${n}
11
- `),process.exit(qt(t?.code))}function ne(e){let t=typeof e=="number"?e:parseInt(e,10);if(t===30||t===45||t===60||t===90)return t;throw Object.assign(new Error("duration must be 30, 45, 60, or 90"),{code:"invalid_duration"})}function Yt(e){if(D.includes(e))return e;throw Object.assign(new Error(`type must be one of: ${D.join(", ")}`),{code:"invalid_duration"})}function Jt(e){if(e==="sage"||e==="ada"||e==="ellie")return e;throw Object.assign(new Error("voice must be sage, ada, or ellie"),{code:"invalid_duration"})}function Qt(e){let t=ue();if(t.includes(e))return e;throw Object.assign(new Error(`unknown protocol "${e}" \u2014 available: ${t.join(", ")}`),{code:"invalid_duration"})}async function zt(e=2e3){let t=H().catch(()=>null),n=new Promise(r=>setTimeout(()=>r(null),e));return Promise.race([t,n])}async function Fe(e,t){let n=I(),r=await F();r&&!n.user_first_name&&(await zt(),n=I());let o=_e(n.user_first_name),a=60;if(e)try{a=ne(e)}catch{}let i=t?B(t):void 0,s=await Te({defaultDuration:a,defaultVoice:n.voice,greeting:o,showAuthWedge:!r,availableDurations:i,signIn:async()=>{let{runLogin:c}=await import("./login-FJB46JD7.js");await c(),await H()},clearOnExit:!0});return s?{duration:s.duration,voice:s.voice,family:t}:null}async function Xt(e,t){if(t){let r=B(t);if(e===void 0&&r.length===1)return{duration:r[0],family:t};if(e===void 0)throw Object.assign(new Error(`protocol "${t}" supports multiple durations (${r.join(", ")}s) \u2014 pass one as: flowe reset <duration> --protocol ${t}`),{code:"invalid_duration"});let o=ne(e);if(!r.includes(o))throw Object.assign(new Error(`protocol "${t}" has no ${o}s variant \u2014 available: ${r.join(", ")}s`),{code:"invalid_duration"});return{duration:o,family:t}}return{duration:ne(e??60)}}async function Zt(){let e=Bt("flowe");e.command("reset [duration]","Run a micro-reset (30, 45, 60, or 90 seconds)").option("--trigger <trigger>","why this reset fired",{default:"user_requested"}).option("-q, --quick","skip the interactive picker and run with the given duration").option("--protocol <family>","restrict to a specific protocol family (e.g., physiological_sigh, box_breath)").action(async(t,n)=>{try{let r=n.trigger,o=n.protocol?Qt(n.protocol):void 0,i=!n.quick&&Ce()?await Fe(t,o):await Xt(t,o);if(!i)return;for(;;){i.voice&&A(i.voice);let s=await fe(i.duration,r,i.family),c=le();if(Ee()&&c){await $e({duration:s.duration_seconds,voice:s.voice,displayName:s.protocol_display_name,cues:s.cues,rounds:s.rounds,donePromise:c}),L();let l=Me({protocolDisplayName:s.protocol_display_name,duration:s.duration_seconds,voice:s.voice,rounds:s.rounds,sessionsToday:ie(),totalSessions:ae(),streakDays:se()});if(n.quick)return;let f=await Ae(Le());if(f==="exit")return;if(Gt(process.stdout,l+De),f==="repeat")continue;if(f==="new"){let h=await Fe(void 0,i.family);if(!h)return;i=h;continue}return}process.stdout.write(`${s.message_for_user}
5
+ `;r+=N(o)}e.write(r)}function kt(e,t=ee){let n=t.indexOf(e);if(n>=0)return n;let r=t.indexOf(60);return r>=0?r:0}function Ot(e){let t=P.findIndex(n=>n.id===e);return t>=0?t:0}async function Q(e,t,n,r,o,a){let i=n,s=()=>{let c=o(i);Ct(e.out,c,t.height),t.height=c.length};for(s();;){let c=await e.keys.next();if(c.done)return{cancel:!0};let l=c.value;if(l.name==="ctrl-c")return{cancel:!0};if(l.name==="escape")return{back:!0};if(l.name==="up"||l.name==="char"&&l.char==="k"){i=(i-1+r)%r,s();continue}if(l.name==="down"||l.name==="tab"||l.name==="char"&&l.char==="j"){i=(i+1)%r,s();continue}if(l.name==="return")return{result:a(i)}}}async function Ce(e){let t=e.io??Pt();t.setRawMode?.(!0),t.out.write(_t);let n={height:0};try{let r="already_authed",o=[];if(e.showAuthWedge){let i=await Q(t,n,0,2,s=>$t(s,o),s=>s===0?"signin":"later");if("cancel"in i||"back"in i)return null;i.result==="signin"?(e.signIn&&await e.signIn(),r="signed_in",o.push({label:"auth",value:"signed in"})):(r="maybe_later",o.push({label:"auth",value:"continuing as guest"}))}let a=e.availableDurations?.length?e.availableDurations:ee;for(;;){let i=await Q(t,n,kt(e.defaultDuration,a),a.length,c=>Et(c,e.greeting,o,a),c=>a[c]);if("cancel"in i||"back"in i)return null;o.push({label:"cadence",value:`${i.result} seconds`});let s=await Q(t,n,Ot(e.defaultVoice),P.length,c=>It(c,o),c=>P[c].id);if("cancel"in s)return null;if("back"in s){o.pop();continue}return{duration:i.result,voice:s.result,authChoice:r}}}finally{if(t.setRawMode?.(!1),t.out.write(Tt),e.clearOnExit&&n.height>0){let r=N(n.height);for(let o=0;o<n.height;o++)r+=`\r${z}
6
+ `;r+=N(n.height),t.out.write(r)}await t.keys.return?.()}}function ke(){return!!process.stdout.isTTY&&!!process.stdin.isTTY&&!process.env.NO_COLOR&&!process.env.CI}function Pt(){let e=process.stdin;return{out:process.stdout,setRawMode:n=>{e.isTTY&&e.setRawMode(n)},keys:Nt(e)}}function Nt(e){e.resume();let t=[],n=[],r=!1,o=i=>{let s=Buffer.isBuffer(i)?i:Buffer.from(i),c=te(s);for(let l of c){let f=n.shift();f?f(l):t.push(l)}},a=()=>{for(r=!0;n.length;)n.shift()(null)};return e.on("data",o),e.once("end",a),{async next(){return t.length?{value:t.shift(),done:!1}:r?{value:void 0,done:!0}:new Promise(i=>{n.push(s=>{i(s===null?{value:void 0,done:!0}:{value:s,done:!1})})})},async return(){return e.off("data",o),e.off("end",a),e.pause(),{value:void 0,done:!0}}}}function te(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===3){t.push({name:"ctrl-c"}),n+=1;continue}if(r===13||r===10){t.push({name:"return"}),n+=1;continue}if(r===9){t.push({name:"tab"}),n+=1;continue}if(r===27){if(e[n+1]===91){let o=e[n+2];o===65?t.push({name:"up"}):o===66?t.push({name:"down"}):t.push({name:"escape"}),n+=3;continue}t.push({name:"escape"}),n+=1;continue}if(r>=32&&r<127){t.push({name:"char",char:String.fromCharCode(r)}),n+=1;continue}n+=1}return t}var Oe=["Most fatigue is unfinished arousal.","Calm is a learnable skill.","The exhale is where the parasympathetic switches on.","If you don't pause, your body picks the moment for you.","Rest is a posture you practice, not a place you go.","You can think yourself into anxiety. Breath is the way back.","Stillness is not a reward. It's a tool.","The shortest path to your next deep-work session is one slow exhale.","Recovery is a feature, not an absence of work.","Discomfort is data. So is calm.","Sixty seconds well spent beats six hours fighting yourself.","Your nervous system runs the show. Be a good operator.","The body is not the enemy of focus. It's the substrate.","There is no app version of slowing down.","You don't ship better code by gripping harder.","Breathe in for what is. Out for what was.","The vagus nerve doesn't care how busy your calendar is.","Forty-five seconds. Then back to the work.","The interval between thoughts is where insight lives.","The breath is the only autonomic system you can drive."];function Pe(e){let t=Number.isFinite(e)?Math.max(0,Math.floor(e)):0;return Oe[t%Oe.length]}var Ne=60,Mt=28,Dt=18;function R(e,t){return` ${d(e.padEnd(Dt))} ${t}`}function Me(e,t,n){return`${e} ${e===1?t:n}`}function At(e){let t=` ${g("\u2740")} ${v("SUMMARY_REPORT")}`,n=R("PROTOCOL",u(e.protocolDisplayName)),r=R("DURATION",u(`${e.duration}s`)),o=R("GUIDE",u(e.voice)),a=e.rounds!=null?R("ROUNDS",u(String(e.rounds))):null,i=R("TODAY",u(Me(e.sessionsToday,"session","sessions"))),s=e.streakDays!=null?R("STREAK",u(Me(e.streakDays,"day","days"))):null,c=u("\u2588".repeat(Mt)),l=` ${d("INTEGRATION_SYNC")} [${c}] ${u("100%")}`,f=Pe(e.totalSessions),h=T(d(`"${f}"`),Ne);return S(["",t,"",n,r,o,a,"",i,s,"",l,"",h,""].filter(M=>M!==null),Ne)}function De(e,t=process.stdout){let n=At(e);for(let r of n)t.write(r+`
7
+ `);return n.length}function Lt(){let e=g("\u25C6"),t=`[${u("r")}] repeat`,n=`[${u("n")}] new session`,r=`[${u("x")}] exit`;return` ${e} ${t} ${d("\xB7")} ${n} ${d("\xB7")} ${r}`}var Ae=2;async function Le(e){e.setRawMode?.(!0),e.out.write(`
8
+ `+Lt()+`
9
+ `);try{for(;;){let t=await e.keys.next();if(t.done)return"exit";let n=t.value;if(n.name==="ctrl-c"||n.name==="escape")return"exit";if(n.name==="char"){let r=(n.char??"").toLowerCase();if(r==="r")return"repeat";if(r==="n")return"new";if(r==="x"||r==="q")return"exit"}}}finally{e.setRawMode?.(!1),await e.keys.return?.()}}function Be(){let e=process.stdin;return{out:process.stdout,setRawMode:n=>{e.isTTY&&e.setRawMode(n)},keys:Bt(e)}}function Bt(e){e.resume();let t=[],n=[],r=!1,o=i=>{let s=Buffer.isBuffer(i)?i:Buffer.from(i),c=te(s);for(let l of c){let f=n.shift();f?f(l):t.push(l)}},a=()=>{for(r=!0;n.length;)n.shift()(null)};return e.on("data",o),e.once("end",a),{async next(){return t.length?{value:t.shift(),done:!1}:r?{value:void 0,done:!0}:new Promise(i=>{n.push(s=>{i(s===null?{value:void 0,done:!0}:{value:s,done:!1})})})},async return(){return e.off("data",o),e.off("end",a),e.pause(),{value:void 0,done:!0}}}}var Fe=e=>`\x1B[${e}A`,Ht="\x1B[2K";function Kt(e,t){if(t<=0)return;let n=Fe(t);for(let r=0;r<t;r++)n+=`\r${Ht}
10
+ `;n+=Fe(t),e.write(n)}function Ut(e){switch(e){case"auth_required":return 2;case"agent_busy":return 3;case"network_error":case"offline":return 4;default:return 1}}function $(e){let t=e,n=t?.message||String(e);process.stderr.write(`flowe: ${n}
11
+ `),process.exit(Ut(t?.code))}function ne(e){let t=typeof e=="number"?e:parseInt(e,10);if(t===30||t===45||t===60||t===90)return t;throw Object.assign(new Error("duration must be 30, 45, 60, or 90"),{code:"invalid_duration"})}function Vt(e){if(D.includes(e))return e;throw Object.assign(new Error(`type must be one of: ${D.join(", ")}`),{code:"invalid_duration"})}function Gt(e){if(e==="sage"||e==="ada"||e==="ellie")return e;throw Object.assign(new Error("voice must be sage, ada, or ellie"),{code:"invalid_duration"})}function Wt(e){let t=le();if(t.includes(e))return e;throw Object.assign(new Error(`unknown protocol "${e}" \u2014 available: ${t.join(", ")}`),{code:"invalid_duration"})}async function qt(e=2e3){let t=H().catch(()=>null),n=new Promise(r=>setTimeout(()=>r(null),e));return Promise.race([t,n])}async function He(e,t){let n=_(),r=await F();r&&!n.user_first_name&&(await qt(),n=_());let o=_e(n.user_first_name),a=60;if(e)try{a=ne(e)}catch{}let i=t?B(t):void 0,s=await Ce({defaultDuration:a,defaultVoice:n.voice,greeting:o,showAuthWedge:!r,availableDurations:i,signIn:async()=>{let{runLogin:c}=await import("./login-FJB46JD7.js");await c(),await H()},clearOnExit:!0});return s?{duration:s.duration,voice:s.voice,family:t}:null}async function jt(e,t){if(t){let r=B(t);if(e===void 0&&r.length===1)return{duration:r[0],family:t};if(e===void 0)throw Object.assign(new Error(`protocol "${t}" supports multiple durations (${r.join(", ")}s) \u2014 pass one as: flowe reset <duration> --protocol ${t}`),{code:"invalid_duration"});let o=ne(e);if(!r.includes(o))throw Object.assign(new Error(`protocol "${t}" has no ${o}s variant \u2014 available: ${r.join(", ")}s`),{code:"invalid_duration"});return{duration:o,family:t}}return{duration:ne(e??60)}}async function Yt(){let e=Ft("flowe");e.command("reset [duration]","Run a micro-reset (30, 45, 60, or 90 seconds)").option("--trigger <trigger>","why this reset fired",{default:"user_requested"}).option("-q, --quick","skip the interactive picker and run with the given duration").option("--protocol <family>","restrict to a specific protocol family (e.g., physiological_sigh, box_breath)").action(async(t,n)=>{try{let r=n.trigger,o=n.protocol?Wt(n.protocol):void 0,i=!n.quick&&ke()?await He(t,o):await jt(t,o);if(!i)return;for(;;){i.voice&&A(i.voice);let s=await me(i.duration,r,i.family),c=de();if(Ie()&&c){await Ee({duration:s.duration_seconds,voice:s.voice,displayName:s.protocol_display_name,cues:s.cues,rounds:s.rounds,donePromise:c}),L();let l=De({protocolDisplayName:s.protocol_display_name,duration:s.duration_seconds,voice:s.voice,rounds:s.rounds,sessionsToday:se(),totalSessions:ce(),streakDays:ae()});if(n.quick)return;let f=await Le(Be());if(f==="exit")return;if(Kt(process.stdout,l+Ae),f==="repeat")continue;if(f==="new"){let h=await He(void 0,i.family);if(!h)return;i=h;continue}return}process.stdout.write(`${s.message_for_user}
12
12
  `);for(let l of s.cues)process.stdout.write(` \xB7 ${l.label}
13
- `);c&&(await c,L());return}}catch(r){$(r)}}),e.command("nsdr [type]","Start an NSDR session (default: quick_reset; or pass a Core 8 type)").action(async t=>{try{let n=t?Yt(t):"quick_reset",r=await me(n);process.stdout.write(`${r.message_for_user}
14
- `)}catch(n){$(n)}}),e.command("status","Show config and queue state").action(()=>{let t=I();process.stdout.write(ge()+`
13
+ `);c&&(await c,L());return}}catch(r){$(r)}}),e.command("nsdr [type]","Start an NSDR session (default: quick_reset; or pass a Core 8 type)").action(async t=>{try{let n=t?Vt(t):"quick_reset",r=await pe(n);process.stdout.write(`${r.message_for_user}
14
+ `)}catch(n){$(n)}}),e.command("status","Show config and queue state").action(()=>{let t=_();process.stdout.write(he()+`
15
15
 
16
16
  `),process.stdout.write(`voice: ${t.voice}
17
17
  `),process.stdout.write(`backend: ${t.backend_url}
18
18
  `),process.stdout.write(`telemetry: ${t.telemetry}
19
19
  `),process.stdout.write(`first_reset_at: ${t.first_reset_at??"(none yet)"}
20
- `)}),e.command("voice [name]","Set preferred voice (sage, ada, or ellie)").action(t=>{if(!t){process.stdout.write(`current: ${I().voice}
20
+ `)}),e.command("voice [name]","Set preferred voice (sage, ada, or ellie)").action(t=>{if(!t){process.stdout.write(`current: ${_().voice}
21
21
  available: sage, ada, ellie
22
- `);return}try{let n=Jt(t);A(n),process.stdout.write(`voice set to ${n}
23
- `)}catch(n){$(n)}}),e.command("protocols","List bundled reset protocols").action(()=>{let t=ce();if(t.length===0){process.stdout.write(`(no protocols bundled yet)
22
+ `);return}try{let n=Gt(t);A(n),process.stdout.write(`voice set to ${n}
23
+ `)}catch(n){$(n)}}),e.command("protocols","List bundled reset protocols").action(()=>{let t=ue();if(t.length===0){process.stdout.write(`(no protocols bundled yet)
24
24
  `);return}for(let n of t)process.stdout.write(`${n.duration_seconds}s ${n.protocol_id.padEnd(24)} ${n.display_name}
25
- `)}),e.command("login","Sign in with Clerk (device-grant flow)").action(async()=>{try{let{runLogin:t}=await import("./login-FJB46JD7.js");await t()}catch(t){$(t)}}),e.command("logout","Sign out and clear stored token").action(async()=>{await de(),process.stdout.write(`signed out
25
+ `)}),e.command("login","Sign in with Clerk (device-grant flow)").action(async()=>{try{let{runLogin:t}=await import("./login-FJB46JD7.js");await t()}catch(t){$(t)}}),e.command("logout","Sign out and clear stored token").action(async()=>{await fe(),process.stdout.write(`signed out
26
26
  `)}),e.command("whoami","Show current auth status").action(async()=>{let t=await F();process.stdout.write(t?`signed in
27
27
  `:`not signed in \u2014 run: flowe login
28
28
  `)}),e.command("install-mcp","Print MCP config snippet for Claude Code / Cursor").action(()=>{let t={mcpServers:{flowe:{command:"flowe",args:["mcp"]}}};process.stdout.write(JSON.stringify(t,null,2)+`
29
29
  `),process.stdout.write(`
30
30
  # add the above to ~/.config/claude/mcp.json (or your client's equivalent)
31
- `)}),e.command("mcp","Run the MCP stdio server (used by Claude Code / Cursor, not humans)").action(async()=>{let{runMcpServer:t}=await import("./mcp-server.js");await t()}),e.help(),e.version(jt());try{e.parse(process.argv,{run:!1}),await e.runMatchedCommand()}catch(t){$(t)}}Zt().catch($);
31
+ `)}),e.command("mcp","Run the MCP stdio server (used by Claude Code / Cursor, not humans)").action(async()=>{let{runMcpServer:t}=await import("./mcp-server.js");await t()}),e.help(),e.version(ie());try{e.parse(process.argv,{run:!1}),await e.runMatchedCommand()}catch(t){$(t)}}Yt().catch($);
@@ -1,4 +1,4 @@
1
- import{a as o,f as i,g as a}from"./chunk-SV7LU5L3.js";import"./chunk-BKZCGGMY.js";import{Server as c}from"@modelcontextprotocol/sdk/server/index.js";import{StdioServerTransport as u}from"@modelcontextprotocol/sdk/server/stdio.js";import{CallToolRequestSchema as p,ListToolsRequestSchema as l}from"@modelcontextprotocol/sdk/types.js";var g=["Run a short neural reset (30, 45, 60, or 90 seconds) for the human operator.","Call this when you notice signs the human is fatigued, overwhelmed, or about to wait:","\xB7 after a long debugging loop or a frustrating error cascade","\xB7 before kicking off a task that will take >30s (long test run, long compile, long agent call)","\xB7 when the human expresses frustration, exhaustion, or decision fatigue","\xB7 when a task has spanned multiple hours with no apparent break","The tool returns immediately (non-blocking). Audio plays on the human's machine in the background.","Continue your work after calling this. Do not wait for the reset to finish."].join(`
1
+ import{b as o,g as i,h as a}from"./chunk-Q3MDZJTN.js";import"./chunk-BKZCGGMY.js";import{Server as c}from"@modelcontextprotocol/sdk/server/index.js";import{StdioServerTransport as u}from"@modelcontextprotocol/sdk/server/stdio.js";import{CallToolRequestSchema as p,ListToolsRequestSchema as l}from"@modelcontextprotocol/sdk/types.js";var g=["Run a short neural reset (30, 45, 60, or 90 seconds) for the human operator.","Call this when you notice signs the human is fatigued, overwhelmed, or about to wait:","\xB7 after a long debugging loop or a frustrating error cascade","\xB7 before kicking off a task that will take >30s (long test run, long compile, long agent call)","\xB7 when the human expresses frustration, exhaustion, or decision fatigue","\xB7 when a task has spanned multiple hours with no apparent break","The tool returns immediately (non-blocking). Audio plays on the human's machine in the background.","Continue your work after calling this. Do not wait for the reset to finish."].join(`
2
2
  `),d=["Start a guided NSDR (Non-Sleep Deep Rest) session for the human operator.","The human scans a QR / opens the returned link on their phone to join a voice session.","Defaults to quick_reset (classic yoga nidra) when no session_type is given.","Pass a session_type when the human asks for something specific:","\xB7 logic_lock when stuck debugging or problem-solving","\xB7 deploy_anxiety before high-stakes moments (deploy, incident)","\xB7 context_switch after a draining meeting","\xB7 sprint_prep before deep work / a coding sprint","\xB7 executive_reset after decision fatigue / many meetings","\xB7 presentation_prep before speaking / a big meeting","\xB7 shutdown at end of day / sleep prep","Call this when the human asks for a longer reset, is wrapping up a long work block,","or explicitly requests an NSDR / yoga nidra session.","Returns a join URL immediately. The session does not start until the human joins from mobile."].join(`
3
3
  `),h=[{name:"flowe_reset",description:g,inputSchema:{type:"object",properties:{duration_seconds:{type:"number",enum:[30,45,60,90],description:"Length of the reset in seconds."},trigger:{type:"string",enum:["claude_thinking","long_compile","agent_call","user_requested"],description:"Why you are firing this reset. Used for analytics only."}},required:["duration_seconds"]}},{name:"flowe_nsdr",description:d,inputSchema:{type:"object",properties:{session_type:{type:"string",enum:[...o],description:"Which NSDR session type to run. Defaults to quick_reset."}},required:[]}}];function m(e){let n=e,t=n?.message||String(e);return{content:[{type:"text",text:`error[${n?.code??"unknown"}]: ${t}`}],isError:!0}}async function f(e,n={}){try{if(e==="flowe_reset"){let t=n.duration_seconds,r=n.trigger??"claude_thinking",s=await i(t,r);return{content:[{type:"text",text:JSON.stringify(s)}]}}if(e==="flowe_nsdr"){let t=n.session_type??"quick_reset",r=await a(t,{suppressQr:!0});return{content:[{type:"text",text:JSON.stringify(r)}]}}return{content:[{type:"text",text:`unknown tool: ${e}`}],isError:!0}}catch(t){return m(t)}}async function y(){let e=new c({name:"flowe",version:"0.1.0"},{capabilities:{tools:{}}});e.setRequestHandler(l,async()=>({tools:h})),e.setRequestHandler(p,async t=>{let{name:r,arguments:s}=t.params;return await f(r,s??{})});let n=new u;await e.connect(n)}var w=import.meta.url===`file://${process.argv[1]}`||process.argv[1]?.endsWith("mcp-server.js")||process.argv[1]?.endsWith("mcp-server.ts");w&&y().catch(e=>{process.stderr.write(`flowe-mcp: ${e instanceof Error?e.message:String(e)}
4
4
  `),process.exit(1)});export{h as TOOL_DEFINITIONS,f as handleCallTool,y as runMcpServer};
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@flowe-ai/cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Neural resets for engineers using AI coding assistants.",
5
5
  "license": "MIT",
6
6
  "author": "flowe.ai",
7
- "homepage": "https://github.com/flowe-ai/flowe-cli",
7
+ "homepage": "https://cli.flowe.ai",
8
8
  "bugs": {
9
9
  "url": "https://github.com/flowe-ai/flowe-cli/issues"
10
10
  },
@@ -33,6 +33,7 @@
33
33
  "bin/",
34
34
  "dist/",
35
35
  "audio/",
36
+ "scripts/preinstall.js",
36
37
  "protocols.json",
37
38
  "README.md",
38
39
  "LICENSE"
@@ -43,6 +44,7 @@
43
44
  "node": ">=20.0.0"
44
45
  },
45
46
  "scripts": {
47
+ "preinstall": "node scripts/preinstall.js",
46
48
  "build": "tsup",
47
49
  "dev": "tsx src/cli.ts",
48
50
  "flowe": "tsx src/cli.ts",
@@ -0,0 +1,119 @@
1
+ // flowe-cli preinstall guard.
2
+ // Runs BEFORE any deps install. Must be self-contained (no external deps).
3
+ // ESM because package.json declares "type": "module".
4
+
5
+ import { existsSync } from 'node:fs';
6
+ import { join } from 'node:path';
7
+ import { pathToFileURL } from 'node:url';
8
+
9
+ const SUPPORTED_PLATFORMS = new Set(['darwin']);
10
+ const MIN_NODE_MAJOR = 20;
11
+
12
+ const LINUX_ISSUE_URL = 'https://github.com/flowe-ai/flowe-cli/issues/1';
13
+ const WINDOWS_ISSUE_URL = 'https://github.com/flowe-ai/flowe-cli/issues/2';
14
+ const NODEJS_URL = 'https://nodejs.org';
15
+
16
+ export function evaluateGuard({ platform, nodeVersion }) {
17
+ const nodeMajor = parseNodeMajor(nodeVersion);
18
+
19
+ if (nodeMajor === null) {
20
+ return {
21
+ ok: false,
22
+ reason: 'node-unknown',
23
+ message: buildNodeMessage(nodeVersion),
24
+ };
25
+ }
26
+
27
+ if (nodeMajor < MIN_NODE_MAJOR) {
28
+ return {
29
+ ok: false,
30
+ reason: 'node-too-old',
31
+ message: buildNodeMessage(nodeVersion),
32
+ };
33
+ }
34
+
35
+ if (!SUPPORTED_PLATFORMS.has(platform)) {
36
+ return {
37
+ ok: false,
38
+ reason: 'platform-unsupported',
39
+ message: buildPlatformMessage(platform),
40
+ };
41
+ }
42
+
43
+ return { ok: true };
44
+ }
45
+
46
+ function parseNodeMajor(nodeVersion) {
47
+ if (typeof nodeVersion !== 'string' || nodeVersion.length === 0) return null;
48
+ const stripped = nodeVersion.startsWith('v') ? nodeVersion.slice(1) : nodeVersion;
49
+ const major = Number.parseInt(stripped.split('.')[0], 10);
50
+ return Number.isFinite(major) && major > 0 ? major : null;
51
+ }
52
+
53
+ function buildPlatformMessage(platform) {
54
+ const isWindows = platform === 'win32';
55
+ const audience = isWindows ? 'Windows' : 'Linux';
56
+ const url = isWindows ? WINDOWS_ISSUE_URL : LINUX_ISSUE_URL;
57
+
58
+ return [
59
+ '',
60
+ `Hey — flowe is macOS only for v0.1 because the audio library only handles macOS`,
61
+ `and I haven't tested ${audience} yet. If you want this on ${audience}, +1 the issue`,
62
+ `here so I know to prioritize it:`,
63
+ '',
64
+ ` ${url}`,
65
+ '',
66
+ `— george, flowe.ai`,
67
+ '',
68
+ ].join('\n');
69
+ }
70
+
71
+ function buildNodeMessage(nodeVersion) {
72
+ const shown = typeof nodeVersion === 'string' && nodeVersion.length > 0 ? nodeVersion : 'unknown';
73
+ return [
74
+ '',
75
+ `flowe-cli needs Node ${MIN_NODE_MAJOR} or newer. You're on ${shown}.`,
76
+ `Grab a current LTS from ${NODEJS_URL} and try again.`,
77
+ '',
78
+ ].join('\n');
79
+ }
80
+
81
+ // True when this preinstall is running inside the source repo (dev install),
82
+ // false when it's running on an end user's machine after `npm install -g`.
83
+ // Two signals, both required for "dev":
84
+ // 1. cwd is NOT inside a node_modules directory (rules out global + local installs
85
+ // on every OS, including Windows where lockfiles can sit alongside global pkgs).
86
+ // 2. A lockfile is present (source trees always have one; published tarballs don't).
87
+ export function isDevTreeInstall(cwd) {
88
+ const segments = cwd.split(/[\\/]/);
89
+ if (segments.includes('node_modules')) return false;
90
+ return (
91
+ existsSync(join(cwd, 'pnpm-lock.yaml')) ||
92
+ existsSync(join(cwd, 'package-lock.json')) ||
93
+ existsSync(join(cwd, 'yarn.lock'))
94
+ );
95
+ }
96
+
97
+ // Cross-platform "is this file being run directly?" check. Naive
98
+ // `file://${process.argv[1]}` breaks on Windows because import.meta.url uses
99
+ // forward slashes (file:///C:/...) while argv[1] uses backslashes.
100
+ const invokedDirectly =
101
+ typeof process.argv[1] === 'string' &&
102
+ process.argv[1].length > 0 &&
103
+ import.meta.url === pathToFileURL(process.argv[1]).href;
104
+
105
+ if (invokedDirectly) {
106
+ if (isDevTreeInstall(process.cwd())) {
107
+ process.exit(0);
108
+ }
109
+
110
+ const result = evaluateGuard({
111
+ platform: process.platform,
112
+ nodeVersion: process.versions && process.versions.node,
113
+ });
114
+
115
+ if (!result.ok) {
116
+ process.stderr.write(result.message);
117
+ process.exit(1);
118
+ }
119
+ }
@@ -1,3 +0,0 @@
1
- import{a as p,c as R,i as _}from"./chunk-BKZCGGMY.js";var te=["logic_lock","deploy_anxiety","context_switch","sprint_prep","quick_reset","executive_reset","presentation_prep","shutdown"];import{readFileSync as E}from"fs";import{dirname as A,join as h}from"path";import{fileURLToPath as q}from"url";var v=A(q(import.meta.url));function V(){return h(v,"..","protocols.json")}var u=null;function w(){if(u)return u;try{let e=E(V(),"utf-8");return u=JSON.parse(e),u}catch{return u={protocols:{},audio_paths:{},cues_paths:{}},u}}function x(){return Object.values(w().protocols)}function P(e){return e.replace(/_\d+$/,"")}function ae(){let e=new Set;for(let t of x())e.add(P(t.protocol_id));return[...e].sort()}function ce(e){return x().filter(t=>P(t.protocol_id)===e).map(t=>t.duration_seconds).sort((t,r)=>t-r)}function k(e,t){let r=x().filter(n=>n.duration_seconds===e&&(t===void 0||P(n.protocol_id)===t));return r.length===0?null:t!==void 0?r[0]:r[Math.floor(Math.random()*r.length)]}function T(e,t){let r=w(),n=`${e}.${t}`,o=r.audio_paths[n];return o?h(v,"..",o):null}var m=new Map;function $(e,t){let r=`${e}.${t}`,n=m.get(r);if(n!==void 0)return n;let i=w().cues_paths?.[r];if(!i)return m.set(r,null),null;try{let s=E(h(v,"..",i),"utf-8"),a=JSON.parse(s);return m.set(r,a),a}catch{return m.set(r,null),null}}import Q from"sound-play";var c=null;function M(){return c!==null}function pe(){return c?.donePromise??null}async function j(e){if(c)throw new Error("already playing \u2014 call stopAudio first");let t,r,n=new Promise((s,a)=>{t=s,r=a}),o=Q.play(e),i=!1;return c={stop:()=>{i=!0,t(),c=null},donePromise:n},o.then(()=>{i||(t(),c=null)}).catch(s=>{c=null,r(s instanceof Error?s:new Error(String(s)))}),n}import{nanoid as X}from"nanoid";import{readFileSync as J,writeFileSync as B,mkdirSync as U,existsSync as b,appendFileSync as L}from"fs";import{homedir as Y}from"os";import{join as O}from"path";var C=O(Y(),".cache","flowe"),d=O(C,"pending-events.jsonl"),z=500;async function g(e,t,r){if(t.telemetry!=="off"){H(),G(e);try{await W(t,r)}catch{}}}function H(){b(C)||U(C,{recursive:!0})}function G(e){for(let t of e)L(d,JSON.stringify(t)+`
2
- `,"utf-8")}function K(){return b(d)?J(d,"utf-8").split(`
3
- `).filter(t=>t.trim().length>0).map(t=>JSON.parse(t)):[]}function F(){b(d)&&B(d,"","utf-8")}async function W(e,t){let r=K();if(r.length===0)return;let n={version:"0.1.0",platform:`${process.platform}-${process.arch}`,node_version:process.version},o=new AbortController,i=setTimeout(()=>o.abort(),z);try{let s={"Content-Type":"application/json"};t&&(s.Authorization=`Bearer ${t}`);let a=await fetch(`${e.backend_url}/api/v1/reset/log`,{method:"POST",headers:s,body:JSON.stringify({events:r,client:n,anonymous_id:e.anonymous_id}),signal:o.signal});(a.ok||a.status===401||a.status===400)&&F()}finally{clearTimeout(i)}}function Z(e,t,r){if(e.length===0)return[];let o=t*1e3/e.length;return e.map((i,s)=>({label:i,mode:r,start_ms:Math.round(s*o),end_ms:Math.round((s+1)*o)}))}async function Re(e,t="user_requested",r){if(M())throw Object.assign(new Error("a reset is already running"),{code:"agent_busy"});let n=p(),o=k(e,r);if(!o){let I=r?`${r} at ${e}s`:`${e}s`;throw Object.assign(new Error(`no protocol available for ${I}`),{code:"protocol_unavailable"})}let i=T(o.protocol_id,n.voice);if(!i)throw Object.assign(new Error(`no audio available for ${o.protocol_id}:${n.voice}`),{code:"protocol_unavailable"});let s=`reset_${X(8)}`,a=new Date,N=Math.floor(a.getTime()/1e3)+e;R();let y=await _();await g([{type:"reset_started",session_id:s,protocol_id:o.protocol_id,duration_seconds:e,voice:n.voice,trigger:t,client_timestamp:a.toISOString()}],n,y),j(i).then(()=>{g([{type:"reset_completed",session_id:s,protocol_id:o.protocol_id,duration_seconds:e,voice:n.voice,trigger:t,client_timestamp:new Date().toISOString()}],n,y).catch(()=>{})}).catch(()=>{g([{type:"reset_abandoned",session_id:s,protocol_id:o.protocol_id,duration_seconds:e,voice:n.voice,trigger:t,client_timestamp:new Date().toISOString()}],n,y).catch(()=>{})});let S=$(o.protocol_id,n.voice),D=S?S.cues:Z(o.text_cues,e,o.category);return{session_id:s,protocol:o.protocol_id,protocol_display_name:o.display_name,duration_seconds:e,voice:n.voice,cues:D,rounds:o.rounds,status:"started",ends_at_unix:N,message_for_user:`${e}s ${o.display_name} started \xB7 ${n.voice}`}}import ee from"qrcode-terminal";async function je(e="quick_reset",t={}){let r=p(),n=await _();if(!n)throw Object.assign(new Error("sign in with: flowe login"),{code:"auth_required"});let o;try{o=await fetch(`${r.backend_url}/api/v1/sessions`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},body:JSON.stringify({protocolId:"nsdr",sessionType:e})})}catch{throw Object.assign(new Error("network unreachable \u2014 try: flowe reset"),{code:"network_error"})}if(!o.ok)throw o.status===401?Object.assign(new Error("session expired \u2014 run: flowe login"),{code:"auth_required"}):Object.assign(new Error(`server error ${o.status}`),{code:"network_error"});let i=await o.json(),s=`flowe://session/${i.session_id}`;return!t.suppressQr&&process.stdout.isTTY&&ee.generate(s,{small:!0}),{session_id:i.session_id,session_type:i.session_type,session_type_name:i.session_type_name,estimated_duration:i.estimated_duration,join_url:s,status:"waiting_for_join",message_for_user:`${i.session_type_name} (${i.estimated_duration}min) ready \xB7 ${s}`}}export{te as a,x as b,ae as c,ce as d,pe as e,Re as f,je as g};