@mindexec/cli 0.2.364 → 0.2.365

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.
Files changed (25) hide show
  1. package/package.json +1 -1
  2. package/wwwroot/assets/AdminDashboardPage-BzNo67NA.js +1 -0
  3. package/wwwroot/assets/{AppSidebar-Dam9sGMw.js → AppSidebar-DJ5LpVyN.js} +1 -1
  4. package/wwwroot/assets/{AuthPages-DFGWKWuB.css → AuthPages-BrH6kRcv.css} +1 -1
  5. package/wwwroot/assets/AuthPages-DNUq14ip.js +1 -0
  6. package/wwwroot/assets/{CodePage-BM1f1VnB.js → CodePage-CdLvlmFe.js} +1 -1
  7. package/wwwroot/assets/{CompanyCorePage-BSHaECkm.js → CompanyCorePage-OcORhMjC.js} +1 -1
  8. package/wwwroot/assets/{ExecutionModePage-D3oo7YEk.js → ExecutionModePage-CldDMdgz.js} +1 -1
  9. package/wwwroot/assets/{MindCanvas-DH2HgHyT.css → MindCanvas-0T8dFIuQ.css} +1 -1
  10. package/wwwroot/assets/{MindCanvas-CsR85nJo.js → MindCanvas-Bxr4ljkQ.js} +1 -1
  11. package/wwwroot/assets/{PlanMasterPage-Dc9jGdQ6.js → PlanMasterPage-0Vxvgx1w.js} +1 -1
  12. package/wwwroot/assets/PricingPage-C4kIB68J.js +1 -0
  13. package/wwwroot/assets/{ToolPages-CmVbLrAo.js → ToolPages-CPL9J_wS.js} +1 -1
  14. package/wwwroot/assets/{YouTubeSearchPage-DSjCA5Xo.js → YouTubeSearchPage-DNXBcvfY.js} +1 -1
  15. package/wwwroot/assets/canvas-runtime-BDhmTypA.js +44 -0
  16. package/wwwroot/assets/index-D1RMmeVY.js +2 -0
  17. package/wwwroot/assets/{storage-CWUvUZC-.js → storage-vDrcB8Ax.js} +1 -1
  18. package/wwwroot/assets/supabaseAuthAdapter-Dw3pz4Sa.js +44 -0
  19. package/wwwroot/index.html +1 -1
  20. package/wwwroot/assets/AdminDashboardPage-SnjySCKu.js +0 -1
  21. package/wwwroot/assets/AuthPages-Ca7c0s4L.js +0 -1
  22. package/wwwroot/assets/PricingPage-DY2BGaFm.js +0 -1
  23. package/wwwroot/assets/canvas-runtime-hH7qY6Be.js +0 -44
  24. package/wwwroot/assets/index-D-ibZwpF.js +0 -2
  25. package/wwwroot/assets/supabaseAuthAdapter-Bptc9G29.js +0 -44
@@ -1,4 +1,4 @@
1
- import{r as i,j as e}from"./vendor-react-BXzpOyCS.js";import{g as H,i as fe,s as M,o as xe,ah as Se,x as we}from"./canvas-runtime-hH7qY6Be.js";import{R as d}from"./app-runtime-xD2Z3NdN.js";import{b as je}from"./toolHandoff-D5e5f7t5.js";import{A as ke,aC as Ce,b0 as te,f as Le,b1 as Te,aw as $e,$ as Ne}from"./vendor-icons-D0xKCnZS.js";const ae=[{id:"yt-ai-workflow-1",videoId:"mexecAI0001",title:"AI workflow systems for solo founders",channel:"Indie Build Lab",publishedAt:"2026-06-18",duration:"12:34",views:"42,180",url:"https://www.youtube.com/watch?v=mexecAI0001",thumbnailUrl:"/assets/mindexecution-mindcanvas.png",summary:"A practical breakdown of capture, planning, execution, and proof loops for one-person products."},{id:"yt-canvas-ops-2",videoId:"mexecRC0002",title:"Building a visual operating system with React canvas",channel:"Product Runtime",publishedAt:"2026-06-14",duration:"18:09",views:"31,904",url:"https://www.youtube.com/watch?v=mexecRC0002",thumbnailUrl:"/assets/mindexecution-mindcanvas.png",summary:"Covers node layout, local persistence, keyboard workflows, and avoiding heavy runtimes in the browser."},{id:"yt-launch-3",videoId:"mexecLN0003",title:"From prototype to paid users in seven days",channel:"Global SaaS Notes",publishedAt:"2026-06-11",duration:"09:52",views:"88,430",url:"https://www.youtube.com/watch?v=mexecLN0003",thumbnailUrl:"/assets/mindexecution-mindcanvas.png",summary:"Launch checklist focused on proof assets, lead capture, pricing pressure, and distribution sequencing."},{id:"yt-local-first-4",videoId:"mexecLF0004",title:"Local-first web apps that feel instant",channel:"Frontend Engine Room",publishedAt:"2026-06-07",duration:"22:18",views:"17,609",url:"https://www.youtube.com/watch?v=mexecLF0004",thumbnailUrl:"/assets/mindexecution-mindcanvas.png",summary:"Explains local state, cache boundaries, browser storage, and sync contracts for fast product surfaces."},{id:"yt-agent-5",videoId:"mexecAD0005",title:"Agent dashboards for real business execution",channel:"Ops With AI",publishedAt:"2026-06-01",duration:"15:21",views:"56,112",url:"https://www.youtube.com/watch?v=mexecAD0005",thumbnailUrl:"/assets/mindexecution-mindcanvas.png",summary:"Maps agent tasks to approvals, artifacts, execution evidence, and human-gated external actions."}],Be=["relevance","date","viewCount","rating","title"],Ae=["any","day","week","month","year"],Ie=["any","short","medium","long"],Re=["any","live","upcoming","completed"],Ue=["moderate","none","strict"];function qe(a,t){const c=t.toLowerCase(),g=`${a.title} ${a.channel} ${a.summary}`.toLowerCase();return c?c.split(/\s+/).filter(n=>g.includes(n)).length+1:1}function se(a,t,c){return ae.map(n=>({...n,title:a.trim()?`${n.title}: ${a.trim()}`:n.title,score:qe(n,a)})).sort((n,u)=>t==="date"?u.publishedAt.localeCompare(n.publishedAt):t==="viewCount"?Number(u.views.replace(/,/g,""))-Number(n.views.replace(/,/g,"")):t==="title"?n.title.localeCompare(u.title):u.score-n.score).slice(0,c).map(({score:n,...u})=>({...u,source:"sample"}))}function Pe(a){return a.map((t,c)=>[`${c+1}. ${t.title}`,` - Channel: ${t.channel}`,` - Published: ${t.publishedAt}`,` - Duration: ${t.duration}`,` - Views: ${t.views}`,` - URL: ${t.url}`,t.thumbnailUrl?` - Thumbnail: ${t.thumbnailUrl}`:"",` - Note: ${t.summary}`].filter(Boolean).join(`
1
+ import{r as i,j as e}from"./vendor-react-BXzpOyCS.js";import{g as H,i as fe,s as M,o as xe,ah as Se,x as we}from"./canvas-runtime-BDhmTypA.js";import{R as d}from"./app-runtime-xD2Z3NdN.js";import{b as je}from"./toolHandoff-D5e5f7t5.js";import{A as ke,aC as Ce,b0 as te,f as Le,b1 as Te,aw as $e,$ as Ne}from"./vendor-icons-D0xKCnZS.js";const ae=[{id:"yt-ai-workflow-1",videoId:"mexecAI0001",title:"AI workflow systems for solo founders",channel:"Indie Build Lab",publishedAt:"2026-06-18",duration:"12:34",views:"42,180",url:"https://www.youtube.com/watch?v=mexecAI0001",thumbnailUrl:"/assets/mindexecution-mindcanvas.png",summary:"A practical breakdown of capture, planning, execution, and proof loops for one-person products."},{id:"yt-canvas-ops-2",videoId:"mexecRC0002",title:"Building a visual operating system with React canvas",channel:"Product Runtime",publishedAt:"2026-06-14",duration:"18:09",views:"31,904",url:"https://www.youtube.com/watch?v=mexecRC0002",thumbnailUrl:"/assets/mindexecution-mindcanvas.png",summary:"Covers node layout, local persistence, keyboard workflows, and avoiding heavy runtimes in the browser."},{id:"yt-launch-3",videoId:"mexecLN0003",title:"From prototype to paid users in seven days",channel:"Global SaaS Notes",publishedAt:"2026-06-11",duration:"09:52",views:"88,430",url:"https://www.youtube.com/watch?v=mexecLN0003",thumbnailUrl:"/assets/mindexecution-mindcanvas.png",summary:"Launch checklist focused on proof assets, lead capture, pricing pressure, and distribution sequencing."},{id:"yt-local-first-4",videoId:"mexecLF0004",title:"Local-first web apps that feel instant",channel:"Frontend Engine Room",publishedAt:"2026-06-07",duration:"22:18",views:"17,609",url:"https://www.youtube.com/watch?v=mexecLF0004",thumbnailUrl:"/assets/mindexecution-mindcanvas.png",summary:"Explains local state, cache boundaries, browser storage, and sync contracts for fast product surfaces."},{id:"yt-agent-5",videoId:"mexecAD0005",title:"Agent dashboards for real business execution",channel:"Ops With AI",publishedAt:"2026-06-01",duration:"15:21",views:"56,112",url:"https://www.youtube.com/watch?v=mexecAD0005",thumbnailUrl:"/assets/mindexecution-mindcanvas.png",summary:"Maps agent tasks to approvals, artifacts, execution evidence, and human-gated external actions."}],Be=["relevance","date","viewCount","rating","title"],Ae=["any","day","week","month","year"],Ie=["any","short","medium","long"],Re=["any","live","upcoming","completed"],Ue=["moderate","none","strict"];function qe(a,t){const c=t.toLowerCase(),g=`${a.title} ${a.channel} ${a.summary}`.toLowerCase();return c?c.split(/\s+/).filter(n=>g.includes(n)).length+1:1}function se(a,t,c){return ae.map(n=>({...n,title:a.trim()?`${n.title}: ${a.trim()}`:n.title,score:qe(n,a)})).sort((n,u)=>t==="date"?u.publishedAt.localeCompare(n.publishedAt):t==="viewCount"?Number(u.views.replace(/,/g,""))-Number(n.views.replace(/,/g,"")):t==="title"?n.title.localeCompare(u.title):u.score-n.score).slice(0,c).map(({score:n,...u})=>({...u,source:"sample"}))}function Pe(a){return a.map((t,c)=>[`${c+1}. ${t.title}`,` - Channel: ${t.channel}`,` - Published: ${t.publishedAt}`,` - Duration: ${t.duration}`,` - Views: ${t.views}`,` - URL: ${t.url}`,t.thumbnailUrl?` - Thumbnail: ${t.thumbnailUrl}`:"",` - Note: ${t.summary}`].filter(Boolean).join(`
2
2
  `)).join(`
3
3
 
4
4
  `)}function De(a){return a.map(t=>({id:t.id,kind:"youtube-video",title:t.title,url:t.url,videoId:t.videoId,thumbnailUrl:t.thumbnailUrl,summary:t.summary,channel:t.channel,publishedAt:t.publishedAt,duration:t.duration,views:t.views,source:t.source||"sample"}))}function Ye(a){if(!a)return"-";const t=Date.parse(a);return Number.isFinite(t)?new Date(t).toISOString().slice(0,10):a}function Ee(a){return typeof a!="number"||!Number.isFinite(a)?"-":a.toLocaleString("en-US")}function ze(a){const t=String(a.videoId||"").trim(),c=String(a.title||"").trim();if(!t||!c)return null;const g=String(a.url||"").trim()||`https://www.youtube.com/watch?v=${t}`,n=String(a.channelTitle||"").trim()||"Unknown channel",u=String(a.durationText||a.duration||"").trim()||"-",y=Ye(a.publishedAt),C=Ee(a.viewCount);return{id:t,videoId:t,title:c,channel:n,publishedAt:y,duration:u,views:C,url:g,thumbnailUrl:String(a.thumbnailUrl||"").trim()||void 0,summary:`Live YouTube result from ${n}. Published ${y}; duration ${u}; views ${C}.`,source:"bridge"}}function Fe(){return{state:M()?"idle":"blocked",baseUrl:H(),message:M()?"LocalBridge not checked yet.":"Hosted LocalBridge access is gated."}}function Qe({navigate:a}){const t=i.useRef(0),[c,g]=i.useState(()=>H()),[n,u]=i.useState(()=>Fe()),[y,C]=i.useState("AI workflow for solo founders"),[L,ne]=i.useState("relevance"),[$,re]=i.useState("any"),[N,oe]=i.useState("any"),[B,ie]=i.useState("any"),[A,le]=i.useState("moderate"),[I,ce]=i.useState("en"),[R,ue]=i.useState("US"),[U,de]=i.useState(10),[m,O]=i.useState(()=>se("AI workflow for solo founders","relevance",5)),[q,v]=i.useState(()=>new Set(["yt-ai-workflow-1"])),[be,f]=i.useState("Local sample results loaded. Search will use LocalBridge /api/youtube/search on loopback or after enabling local bridge access."),[T,P]=i.useState(!1),[w,W]=i.useState("sample"),[V,Q]=i.useState(""),[_,G]=i.useState(""),[K,J]=i.useState(!1),[X,Z]=i.useState(""),D=i.useMemo(()=>m.filter(s=>q.has(s.id)),[m,q]),Y=(s,l="fallback",r)=>{const b=(r==null?void 0:r.query)??y,x=(r==null?void 0:r.order)??L,o=(r==null?void 0:r.maxResults)??U,S=se(b,x,Math.min(o,ae.length));O(S),v(new Set),W(l),Q(""),G(""),J(!1),Z(""),f(s)},E=async(s,l="")=>{s==null||s.preventDefault();const r=y.trim();if(!r){f("Enter a query before searching.");return}const b=t.current+1;t.current=b;const x=()=>t.current===b,o={query:r,order:L,publishedWithin:$,videoDuration:N,eventType:B,safeSearch:A,language:I.trim(),region:R.trim(),maxResults:U};P(!0);const S=H();if(g(S),d.emit("youtube.search.local",{requestSeq:b,q:o.query,order:o.order,pageToken:!!l}),!M()){u({state:"blocked",baseUrl:S,message:"Hosted LocalBridge access is gated."}),Y("Hosted LocalBridge access is gated. Showing local sample results only.","blocked",o),d.emit("youtube.search.fallback",{requestSeq:b,reason:"hosted-localbridge-gated",order:o.order,publishedWithin:o.publishedWithin,videoDuration:o.videoDuration,eventType:o.eventType,safeSearch:o.safeSearch,language:o.language,region:o.region}),P(!1);return}try{const p=await xe(S);if(!x()){d.emit("youtube.search.staleIgnored",{requestSeq:b,stage:"bridge-status"});return}if(u(p),p.state!=="connected"){Y(`${p.message||"LocalBridge is unavailable."} Showing local sample results.`,"fallback",o),d.emit("youtube.search.fallback",{requestSeq:b,reason:"localbridge-unavailable",state:p.state});return}const h=await Se({q:o.query,order:o.order,publishedWithin:o.publishedWithin,videoDuration:o.videoDuration,eventType:o.eventType,safeSearch:o.safeSearch,relevanceLanguage:o.language,regionCode:o.region,maxResults:o.maxResults,pageToken:l},S);if(!x()){d.emit("youtube.search.staleIgnored",{requestSeq:b,stage:"bridge-results"});return}const j=(h.items||[]).map(ze).filter(z=>!!z);O(j),v(l?z=>new Set(j.filter(F=>z.has(F.id)).map(F=>F.id)):new Set),Q(String(h.nextPageToken||"")),G(String(h.prevPageToken||"")),J(h.fromCache===!0),Z(h.fetchedAt||new Date().toISOString()),W("bridge"),f(j.length>0?`Live YouTube search complete: ${j.length} results${h.fromCache?" from cache":""}.`:"Live YouTube search returned no videos."),d.emit("youtube.search.bridge",{requestSeq:b,count:j.length,fromCache:h.fromCache===!0,hasNext:!!h.nextPageToken,hasPrevious:!!h.prevPageToken})}catch(p){if(!x()){d.emit("youtube.search.staleIgnored",{requestSeq:b,stage:"bridge-error"});return}const h=p instanceof Error?p.message:String(p);Y(`${h} Showing local sample results.`,"fallback",o),d.emit("youtube.search.fallback",{requestSeq:b,reason:"bridge-search-error",message:h})}finally{x()&&P(!1)}},he=()=>{we(!0),u({state:"idle",baseUrl:c,message:"Hosted LocalBridge access enabled. Search again to use the live adapter."}),f("Hosted LocalBridge access enabled. Search again to use LocalBridge /api/youtube/search."),d.emit("youtube.bridge.hostedAccess.enabled")},ge=s=>{v(l=>{const r=new Set(l);return r.has(s)?r.delete(s):r.add(s),d.emit("youtube.selection.changed",{count:r.size}),r})},me=()=>{v(new Set(m.map(s=>s.id))),d.emit("youtube.selection.all",{count:m.length})},pe=()=>{v(new Set),d.emit("youtube.selection.clear")},ee=s=>{const l=s==="selected"?D:m;if(l.length===0){f("Select at least one video before creating MindCanvas nodes.");return}const r=Pe(l);je({toolKey:"youtube-search",toolTitle:"YouTube Search",sourceTitle:`YouTube search: ${y.trim()}`,sourceBody:`Filters: order=${L}, period=${$}, duration=${N}, event=${B}, safe=${A}, lang=${I}, region=${R}`,resultTitle:`${l.length} YouTube candidates`,resultBody:r,taskBody:"Turn these YouTube candidates into a MindExec content or research plan. Extract buyer pain, proof angles, and next launch asset ideas.",resultItems:De(l)}),d.emit("youtube.nodes.created",{mode:s,count:l.length}),f(`${l.length} video records prepared for MindCanvas handoff.`),a("/mindcanvas")},ye=n.state==="connected"?"live adapter":n.state==="blocked"?"bridge gated":n.state==="unavailable"?"bridge unavailable":"local bridge ready",ve=w==="bridge"?K?"live cache":"live":w==="blocked"?"gated sample":w==="fallback"?"fallback sample":"sample";return e.jsxs("div",{className:"page youtube-page","data-youtube-bridge-state":n.state,"data-youtube-result-source":w,children:[e.jsxs("section",{className:"youtube-hero",children:[e.jsxs("div",{children:[e.jsx("div",{className:"eyebrow",children:"Content Capture"}),e.jsx("h1",{children:"YouTube Search"}),e.jsx("p",{children:"Search, filter, select, and send video candidates into MindCanvas as research nodes. Live search runs through the LocalBridge YouTube proxy when local bridge access is available."})]}),e.jsx("span",{className:`youtube-badge youtube-badge--${w}`,"data-testid":"youtube-result-source",children:ve})]}),e.jsxs("form",{className:"youtube-search-panel","data-testid":"youtube-search-form",onSubmit:s=>void E(s),children:[e.jsxs("div",{className:"youtube-query-row",children:[e.jsx("input",{"data-testid":"youtube-query-input","aria-label":"YouTube query",value:y,onChange:s=>C(s.target.value),placeholder:"Search terms"}),e.jsxs("button",{className:"btn btn-primary","data-testid":"youtube-search-submit",type:"submit",disabled:T,children:[T?e.jsx(ke,{size:16,className:"spin-icon"}):e.jsx(Ce,{size:16}),"Search"]})]}),e.jsxs("div",{className:"youtube-filter-grid",children:[e.jsx(k,{label:"Order",value:L,options:Be,onChange:ne}),e.jsx(k,{label:"Period",value:$,options:Ae,onChange:re}),e.jsx(k,{label:"Duration",value:N,options:Ie,onChange:oe}),e.jsx(k,{label:"Live",value:B,options:Re,onChange:ie}),e.jsx(k,{label:"Safe search",value:A,options:Ue,onChange:le}),e.jsxs("label",{children:["Language",e.jsx("input",{maxLength:8,value:I,onChange:s=>ce(s.target.value)})]}),e.jsxs("label",{children:["Region",e.jsx("input",{maxLength:4,value:R,onChange:s=>ue(s.target.value)})]}),e.jsxs("label",{children:["Count",e.jsxs("select",{value:U,onChange:s=>de(Number(s.target.value)),children:[e.jsx("option",{value:"5",children:"5"}),e.jsx("option",{value:"10",children:"10"}),e.jsx("option",{value:"25",children:"25"})]})]})]})]}),e.jsxs("section",{className:"youtube-banner","data-testid":"youtube-status-banner",children:[e.jsx(te,{size:18}),e.jsxs("span",{children:[be,e.jsxs("small",{children:[ye,X?`, fetched ${new Date(X).toLocaleTimeString()}`:""]})]}),n.state==="blocked"&&!fe()&&e.jsx("button",{className:"btn btn-secondary","data-testid":"youtube-enable-local-bridge",type:"button",onClick:he,children:"Enable local bridge"})]}),e.jsxs("section",{className:"youtube-actions-row",children:[e.jsxs("div",{children:[e.jsxs("strong",{children:[m.length," results"]}),e.jsxs("span",{children:[D.length," selected",K?" (cache)":""]})]}),e.jsxs("div",{className:"youtube-actions",children:[e.jsx("button",{className:"btn btn-secondary","data-testid":"youtube-select-visible",type:"button",onClick:me,children:"Select visible"}),e.jsx("button",{className:"btn btn-secondary","data-testid":"youtube-clear-selection",type:"button",onClick:pe,children:"Clear"}),e.jsxs("button",{className:"btn btn-primary","data-testid":"youtube-send-selected",type:"button",onClick:()=>ee("selected"),disabled:D.length===0,children:[e.jsx(Le,{size:15}),"Send selected"]}),e.jsx("button",{className:"btn btn-primary","data-testid":"youtube-send-all",type:"button",onClick:()=>ee("all"),disabled:m.length===0,children:"Send all"})]})]}),e.jsxs("section",{className:"youtube-pagination","aria-label":"YouTube result pages",children:[e.jsx("button",{className:"btn btn-secondary",type:"button",onClick:()=>void E(void 0,_),disabled:T||!_,children:"Previous"}),e.jsx("button",{className:"btn btn-secondary",type:"button",onClick:()=>void E(void 0,V),disabled:T||!V,children:"Next"})]}),e.jsx("section",{className:"youtube-results-grid",children:m.map((s,l)=>{const r=q.has(s.id);return e.jsxs("article",{className:`youtube-card ${r?"is-selected":""}`,"data-testid":"youtube-result-card","data-video-id":s.videoId||"",children:[e.jsxs("div",{className:"youtube-card-top",children:[e.jsxs("button",{className:"youtube-select-button","data-testid":"youtube-result-select",type:"button",onClick:()=>ge(s.id),"aria-label":`${r?"Unselect":"Select"} ${s.title}`,children:[r?e.jsx(Te,{size:17}):e.jsx($e,{size:17}),r?"Selected":"Select"]}),e.jsxs("a",{href:s.url,target:"_blank",rel:"noreferrer",children:[e.jsx(Ne,{size:15}),"YouTube"]})]}),e.jsxs("div",{className:"youtube-thumb",children:[s.thumbnailUrl?e.jsx("img",{src:s.thumbnailUrl,alt:"",loading:"lazy"}):e.jsx(te,{size:34}),e.jsx("span",{children:String(l+1).padStart(2,"0")})]}),e.jsx("h2",{children:s.title}),e.jsx("p",{children:s.summary}),e.jsxs("div",{className:"youtube-meta",children:[e.jsx("span",{children:s.channel}),e.jsx("span",{children:s.publishedAt}),e.jsx("span",{children:s.duration}),e.jsxs("span",{children:[s.views," views"]})]})]},s.id)})})]})}function k({label:a,value:t,options:c,onChange:g}){return e.jsxs("label",{children:[a,e.jsx("select",{value:t,onChange:n=>g(n.target.value),children:c.map(n=>e.jsx("option",{value:n,children:n},n))})]})}export{Qe as YouTubeSearchPage};