1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[20822],{404:(e,r,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/command/continuum",function(){return n(35437)}])},1666:(e,r,n)=>{"use strict";n.d(r,{JJ:()=>u,zU:()=>p});var t=n(37876),o=n(14232),i=n(89099),s=n(99302);let a=["VoiceCosmos","Mantopus","Vibely","Sekago","StudioMunich","Q-Intercept","Photonflow","VoiceIDVault","Vivago"],l=["marketing","sales","crm","billing","hr","admin","analytics","settings","campaigns","investors","clients","agents","flows","industries"],d=[{email:"[email protected]",role:"founder",name:"Riaan Kleynhans",functions:l,products:a},{email:"[email protected]",role:"founder",name:"Riaan Kleynhans",functions:l,products:a},{email:"[email protected]",role:"founder",name:"Riaan Kleynhans",functions:l,products:a},{email:"[email protected]",role:"founder",name:"Riaan Kleynhans",functions:l,products:a},{email:"[email protected]",role:"creative_director",name:"Astrid Obert",functions:["marketing","crm","campaigns","clients","analytics","settings"],products:["VoiceCosmos","StudioMunich"]},{email:"[email protected]",role:"operations",name:"Karien",functions:["crm","billing","hr","clients","analytics","settings","campaigns","marketing","agents"],products:["VoiceCosmos"]}],c={"/command/dashboard":"analytics","/command/campaigns":"campaigns","/command/pipeline":"sales","/command/contacts":"crm","/command/clients":"clients","/command/investors":"investors","/command/billing":"billing","/command/analytics":"analytics","/command/agents":"agents","/command/flows":"flows","/command/automations":"flows","/command/industries":"industries","/command/settings":"settings","/command/operations":"crm","/command/calendar":"crm","/command/sprints":"admin","/command/drafts":"marketing","/command/signals":"sales","/super-admin/user-management":"admin","/super-admin/tenant-management":"admin","/super-admin/billing":"billing","/super-admin/pricing":"billing"},m=null;function u(){let[e,r]=(0,o.useState)(null),[n,t]=(0,o.useState)(null),[i,a]=(0,o.useState)(!1),[l,c]=(0,o.useState)(!0);return(0,o.useEffect)(()=>{var e;let n=function(){if("undefined"==typeof document)return null;let e=document.cookie.match(/sb-auth-token=([^;]+)/);if(!(null==e?void 0:e[1])||3!==e[1].split(".").length)return null;try{let r=JSON.parse(atob(e[1].split(".")[1]));return{email:r.email||"",userId:r.sub||"",iat:r.iat||0,exp:r.exp||0}}catch(e){return null}}();if(!n)return void c(!1);let o=(e=n.email.toLowerCase(),d.find(r=>r.email.toLowerCase()===e.toLowerCase())||null),i=Date.now()-1e3*n.iat,s=0===n.exp||1e3*n.exp>Date.now();r({id:n.userId,email:n.email}),t(o),a(!!o&&i<864e5&&s),c(!1)},[]),{isAuthed:i,user:e,adminUser:n,loading:l,supabase:function(){if(m)return m;let e="https://lcagxfhybqwkbotqedbf.supabase.co",r="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImxjYWd4Zmh5YnF3a2JvdHFlZGJmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDg3ODQzMzIsImV4cCI6MjA2NDM2MDMzMn0.k5j9sYYw0pnfLhZoREpaIeH4xE8fcM9KylHIFR5IkWY";return e&&r?m=(0,s.createClient)(e,r):null}(),hasFunction:e=>!!n&&("founder"===n.role||"co_founder"===n.role||n.functions.includes(e)),hasProduct:e=>!!n&&("founder"===n.role||"co_founder"===n.role||n.products.includes(e)),isFounder:(null==n?void 0:n.role)==="founder"||(null==n?void 0:n.role)==="co_founder"}}function p(e){let{children:r,requiredFunction:n}=e,s=(0,i.useRouter)(),{isAuthed:a,loading:l,hasFunction:d,adminUser:m}=u(),p=n||c[s.pathname],g=!p||d(p);return((0,o.useEffect)(()=>{l||a||s.replace("/login")},[a,l,s]),l)?(0,t.jsx)("div",{style:{background:"#0B121E",minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,t.jsx)("div",{style:{color:"#8b95a8",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"0.875rem"},children:"Verifying identity..."})}):a?g?(0,t.jsx)(t.Fragment,{children:r}):(0,t.jsxs)("div",{style:{background:"#0B121E",minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",gap:"1rem"},children:[(0,t.jsx)("div",{style:{color:"#ef4444",fontSize:"1.25rem",fontWeight:700,fontFamily:"Helvetica, Arial, sans-serif"},children:"Access Denied"}),(0,t.jsxs)("div",{style:{color:"#8b95a8",fontSize:"0.875rem",fontFamily:"Helvetica, Arial, sans-serif",textAlign:"center",maxWidth:"400px"},children:[null==m?void 0:m.name,", your role (",null==m?void 0:m.role,") does not have access to this function. Contact the founder to request access."]}),(0,t.jsx)("button",{onClick:()=>s.push("/command/dashboard"),style:{background:"#F9EFA7",color:"#0B121E",border:"none",borderRadius:"0.5rem",padding:"0.5rem 1.25rem",cursor:"pointer",fontWeight:700,fontSize:"0.85rem",marginTop:"0.5rem"},children:"Back to Dashboard"})]}):null}},18274:(e,r,n)=>{"use strict";n.d(r,{m:()=>s});var t=n(80591);
1function o(e){return(e=(e=(e=(e=e.replace(/\b\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{4}\b/g,"[CARD REDACTED]")).replace(/\b\d{3}-\d{2}-\d{4}\b/g,"[SSN REDACTED]")).replace(/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g,"[EMAIL REDACTED]")).replace(/\+?\d{1,3}[\s.-]?\(?\d{1,4}\)?[\s.-]?\d{1,4}[\s.-]?\d{1,9}/g,"[PHONE REDACTED]")).replace(/\b[A-Z]{2}\d{2}[\s]?\d{4}[\s]?\d{4}[\s]?\d{4}[\s]?\d{4}[\s]?\d{0,2}\b/g,"[IBAN REDACTED]")}async function i(e){try{var r,n;let i=await (0,t.getSupabaseClientAsync)();if(!i)return;let{error:s}=await i.from("command_audit_log").insert({user_id:e.userId,email:e.email,action:o(e.action),details:e.details?function(e){let r={...e};for(let e of Object.keys(r))"string"==typeof r[e]&&(r[e]=o(r[e]));return r}(e.details):{},ip_address:null!=(n=e.ip)?n:null,created_at:new Date().toISOString()});!s||(null==(r=s.message)?void 0:r.includes("relation"))||"42P01"===s.code||console.warn("[CommandAudit] Insert failed:",s.message)}catch(e){}}async function s(e,r){try{var n;let o=await (0,t.getSupabaseClientAsync)();if(!o)return;let{data:{session:s}}=await o.auth.getSession();if(!(null==s?void 0:s.user))return;await i({userId:s.user.id,email:null!=(n=s.user.email)?n:"unknown",action:e,details:r})}catch(e){}}},35437:(e,r,n)=>{"use strict";n.r(r),n.d(r,{__N_SSP:()=>f,default:()=>h});var t=n(37876),o=n(14232),i=n(77328),s=n.n(i),a=n(1666),l=n(18274);let d={bg:"#0B121E",card:"rgba(255,255,255,0.04)",border:"rgba(255,255,255,0.08)",borderActive:"rgba(76,217,100,0.4)",borderBroken:"rgba(255,99,71,0.4)",borderDormant:"rgba(255,200,87,0.3)",text:"#f0f2f8",muted:"#8b95a8",gold:"#F9EFA7",green:"#4ade80",red:"#ef4444",yellow:"#facc15"},c="Helvetica, Arial, sans-serif";function m(){let[e,r]=(0,o.useState)([]),[n,i]=(0,o.useState)(null),[a,m]=(0,o.useState)(null),[p,f]=(0,o.useState)(null),[h,b]=(0,o.useState)(!0),[x,y]=(0,o.useState)(null),[j,v]=(0,o.useState)(0);(0,o.useEffect)(()=>{let e=!1;return b(!0),fetch("/api/continuum/projects").then(e=>e.json()).then(t=>{var o;if(e)return;if(t.error){y(t.error),b(!1);return}let s=null!=(o=t.projects)?o:[];r(s),s.length>0&&!n&&i(s[0].id),b(!1)}).catch(r=>{e||(y(r instanceof Error?r.message:String(r)),b(!1))}),()=>{e=!0}},[j]),(0,o.useEffect)(()=>{if(!n)return;let e=!1;return fetch("/api/continuum/state?project=".concat(encodeURIComponent(n))).then(e=>e.json()).then(r=>{if(!e){if(r.error){y(r.error),m(null);return}m(r.snapshot),y(null)}}).catch(r=>{e||y(r instanceof Error?r.message:String(r))}),()=>{e=!0}},[n,j]),(0,o.useEffect)(()=>{if(!n)return;let e=!1;return fetch("/api/continuum/todos?project=".concat(encodeURIComponent(n))).then(e=>e.json()).then(r=>{if(!e){if(r.error)return void f(null);f(r)}}).catch(()=>{e||f(null)}),()=>{e=!0}},[n,j]);let S=(0,o.useCallback)(()=>{(0,l.m)({surface:"command-continuum",action:"refresh",metadata:{project:n}}),v(e=>e+1)},[n]);return(0,t.jsxs)("div",{style:{background:d.bg,minHeight:"100vh",color:d.text,fontFamily:c,padding:"2rem"},children:[(0,t.jsx)(s(),{children:(0,t.jsx)("title",{children:"Continuum \xb7 Command Center"})}),(0,t.jsxs)("header",{style:{marginBottom:"2rem"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1rem"},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{style:{fontSize:"1.75rem",fontWeight:700,marginBottom:"0.25rem",color:d.text},children:"Continuum"}),(0,t.jsx)("p",{style:{fontSize:"0.875rem",color:d.muted,margin:0},children:"Project status, dormant capabilities, known failures â surfaced from your local Continuum DB."})]}),(0,t.jsx)("button",{onClick:S,style:{padding:"0.5rem 1rem",borderRadius:"8px",background:"transparent",border:"1px solid ".concat(d.gold,"40"),color:d.gold,fontFamily:c,fontSize:"0.8125rem",cursor:"pointer"},children:"â» Refresh"})]}),(0,t.jsxs)("p",{style:{fontSize:"0.75rem",color:d.muted,marginTop:"0.75rem"},children:["Source: ",(0,t.jsxs)("code",{style:{background:"rgba(255,255,255,0.06)",padding:"0.125rem 0.375rem",borderRadius:"4px"},children:["~/.continuum/","{project}","/continuum.db"]})," \xb7 ","Repo: ",(0,t.jsx)("a",{href:"https://github.com/number7even/CONTINUUM",target:"_blank",rel:"noreferrer",style:{color:d.gold,textDecoration:"none"},children:"github.com/number7even/CONTINUUM"})]})]}),x&&(0,t.jsx)("div",{style:{padding:"1rem",borderRadius:"8px",background:"rgba(239,68,68,0.1)",border:"1px solid ".concat(d.red,"40"),marginBottom:"1.5rem"},children:(0,t.jsxs)("p",{style:{fontSize:"0.875rem",color:d.red,margin:0},children:["Error: ",x]})}),h&&0===e.length&&(0,t.jsx)("p",{style:{color:d.muted,fontSize:"0.875rem"},children:"Loading projectsâ¦"}),!h&&0===e.length&&(0,t.jsxs)("div",{style:{padding:"2rem",borderRadius:"12px",background:d.card,border:"1px solid ".concat(d.border),textAlign:"center"},children:[(0,t.jsx)("p",{style:{fontSize:"1rem",color:d.text,marginBottom:"0.5rem"},children:"No Continuum projects yet."}),(0,t.jsxs)("p",{style:{fontSize:"0.875rem",color:d.muted,margin:0},children:["Continuum hasn't recorded any checkpoints on this machine. Build the standalone repo and run ",(0,t.jsx)("code",{style:{color:d.gold},children:"node packages/mcp-server/dist/index.js"})," to start."]})]}),e.length>0&&(0,t.jsxs)("div",{style:{marginBottom:"2rem"},children:[(0,t.jsxs)("h2",{style:{fontSize:"0.75rem",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.1em",color:d.muted,marginBottom:"0.75rem"},children:["Projects (",e.length,")"]}),(0,t.jsx)("div",{style:{display:"flex",gap:"0.75rem",flexWrap:"wrap"},children:e.map(e=>{let r=e.id===n;return(0,t.jsxs)("button",{onClick:()=>i(e.id),style:{padding:"0.875rem 1.25rem",borderRadius:"12px",background:r?"rgba(249,239,167,0.08)":d.card,border:"1px solid ".concat(r?d.gold+"60":d.border),color:r?d.gold:d.text,fontFamily:c,fontSize:"0.875rem",cursor:"pointer",textAlign:"left",minWidth:"200px"},children:[(0,t.jsx)("div",{style:{fontWeight:600,marginBottom:"0.25rem"},children:e.id}),(0,t.jsxs)("div",{style:{fontSize:"0.75rem",color:d.muted},children:[e.snapshotCount," snapshot",1===e.snapshotCount?"":"s"," \xb7"," ",(0,t.jsxs)("span",{style:{color:d.green},children:[e.activeCount," active"]})," \xb7"," ",(0,t.jsxs)("span",{style:{color:d.yellow},children:[e.dormantCount," dormant"]})," \xb7"," ",(0,t.jsxs)("span",{style:{color:d.red}
1,children:[e.brokenCount," broken"]})]})]},e.id)})})]}),a&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{marginBottom:"1.5rem",padding:"1rem 1.25rem",borderRadius:"12px",background:d.card,border:"1px solid ".concat(d.border)},children:(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:"1rem",marginBottom:"0.5rem"},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{style:{fontSize:"0.75rem",color:d.muted,marginBottom:"0.25rem"},children:"Latest checkpoint"}),(0,t.jsx)("p",{style:{fontSize:"0.9375rem",color:d.text,margin:0},children:a.reason})]}),(0,t.jsxs)("div",{style:{textAlign:"right"},children:[(0,t.jsx)("p",{style:{fontSize:"0.75rem",color:d.muted,margin:0},children:new Date(a.timestamp).toLocaleString()}),(0,t.jsxs)("p",{style:{fontSize:"0.6875rem",color:d.muted,marginTop:"0.25rem",fontFamily:"monospace"},children:["hash ",a.hash.slice(0,16),"â¦"]})]})]})}),a.active.length>0&&(0,t.jsx)(u,{title:"Active in production",color:d.green,borderColor:d.borderActive,entries:a.active}),a.dormant.length>0&&(0,t.jsx)(u,{title:"Dormant â built but not the active path",color:d.yellow,borderColor:d.borderDormant,entries:a.dormant}),a.broken.length>0&&(0,t.jsx)(u,{title:"Known broken",color:d.red,borderColor:d.borderBroken,entries:a.broken})]}),p&&!p.legacy&&(0,t.jsx)(g,{todos:p})]})}function u(e){let{title:r,color:n,borderColor:o,entries:i}=e;return(0,t.jsxs)("section",{style:{marginBottom:"2rem"},children:[(0,t.jsxs)("h2",{style:{fontSize:"0.875rem",fontWeight:600,color:n,marginBottom:"0.75rem",display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,t.jsx)("span",{children:r}),(0,t.jsxs)("span",{style:{fontSize:"0.75rem",fontWeight:400,color:d.muted},children:["(",i.length,")"]})]}),(0,t.jsx)("div",{style:{display:"grid",gap:"0.75rem"},children:i.map((e,r)=>(0,t.jsxs)("div",{style:{padding:"1rem 1.25rem",borderRadius:"10px",background:d.card,border:"1px solid ".concat(o)},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:"1rem",marginBottom:"0.5rem"},children:[(0,t.jsx)("div",{style:{fontSize:"0.9375rem",fontWeight:600,color:d.text},children:e.name}),e.landedAt&&(0,t.jsx)("div",{style:{fontSize:"0.6875rem",color:d.muted,fontFamily:"monospace",whiteSpace:"nowrap"},children:e.landedAt})]}),e.description&&(0,t.jsx)("p",{style:{fontSize:"0.8125rem",color:d.text,margin:"0.5rem 0",opacity:.85},children:e.description}),(0,t.jsx)("p",{style:{fontSize:"0.75rem",color:d.muted,margin:"0.25rem 0",fontFamily:"monospace"},children:e.where}),(0,t.jsxs)("p",{style:{fontSize:"0.6875rem",color:d.muted,margin:"0.5rem 0 0 0",fontFamily:"monospace",background:"rgba(255,255,255,0.03)",padding:"0.375rem 0.625rem",borderRadius:"4px"},children:["$ ",e.verifyCommand]}),(0,t.jsxs)("p",{style:{fontSize:"0.6875rem",color:d.muted,marginTop:"0.5rem",margin:0},children:["verified ",new Date(e.verifiedAt).toLocaleString()]})]},"".concat(e.name,"-").concat(r)))})]})}let p={open:{label:"Open",color:"#74aaff",border:"rgba(116,170,255,0.4)"},in_progress:{label:"In progress",color:"#F9EFA7",border:"rgba(249,239,167,0.4)"},blocked:{label:"Blocked",color:"#ef4444",border:"rgba(239,68,68,0.4)"},done:{label:"Done",color:"#4ade80",border:"rgba(76,217,100,0.4)"}};function g(e){let{todos:r}=e,{counts:n,todos:o}=r;return(0,t.jsxs)("section",{style:{marginTop:"2.5rem"},children:[(0,t.jsx)("h2",{style:{fontSize:"0.875rem",fontWeight:600,color:d.text,marginBottom:"0.25rem"},children:"Live Todo Pipeline"}),(0,t.jsxs)("p",{style:{fontSize:"0.75rem",color:d.muted,marginTop:0,marginBottom:"1rem"},children:["Open commitments awaiting verification. AI client writes via"," ",(0,t.jsx)("code",{style:{background:"rgba(255,255,255,0.06)",padding:"0.125rem 0.375rem",borderRadius:"4px"},children:"continuum_create_todo"})," ","/ ",(0,t.jsx)("code",{style:{background:"rgba(255,255,255,0.06)",padding:"0.125rem 0.375rem",borderRadius:"4px"},children:"continuum_update_todo"}),". This view is read-only truth."]}),(0,t.jsx)("div",{style:{display:"flex",gap:"0.5rem",marginBottom:"1rem",flexWrap:"wrap"},children:["open","in_progress","blocked","done"].map(e=>{let r=p[e];return(0,t.jsxs)("div",{style:{padding:"0.375rem 0.75rem",borderRadius:"999px",background:d.card,border:"1px solid ".concat(r.border),fontSize:"0.75rem",color:r.color,display:"flex",gap:"0.375rem",alignItems:"center"},children:[(0,t.jsx)("span",{style:{fontWeight:600},children:r.label}),(0,t.jsx)("span",{style:{color:d.muted,fontFamily:"monospace"},children:n[e]})]},e)})}),0===o.length&&(0,t.jsx)("div",{style:{padding:"1.5rem",borderRadius:"10px",background:d.card,border:"1px solid ".concat(d.border),textAlign:"center"},children:(0,t.jsx)("p",{style:{fontSize:"0.875rem",color:d.muted,margin:0},children:"No todos in the pipeline yet. When ARIA or you (via the AI client) create one, it appears here."})}),(0,t.jsx)("div",{style:{display:"grid",gap:"0.625rem"},children:o.map(e=>{let r=p[e.status];return(0,t.jsxs)("div",{style:{padding:"0.875rem 1rem",borderRadius:"10px",background:d.card,border:"1px solid ".concat(r.border)},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",ga
1p:"1rem",marginBottom:"0.375rem"},children:[(0,t.jsx)("div",{style:{fontSize:"0.9375rem",fontWeight:600,color:d.text,lineHeight:1.3},children:e.title}),(0,t.jsx)("div",{style:{flexShrink:0,fontSize:"0.6875rem",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",color:r.color,padding:"0.125rem 0.5rem",borderRadius:"4px",background:"".concat(r.color,"15")},children:r.label})]}),e.verifyCommand&&(0,t.jsxs)("p",{style:{fontSize:"0.6875rem",color:d.muted,margin:"0.5rem 0 0 0",fontFamily:"monospace",background:"rgba(255,255,255,0.03)",padding:"0.375rem 0.625rem",borderRadius:"4px",wordBreak:"break-all"},children:["$ ",e.verifyCommand]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"1rem",marginTop:"0.5rem",flexWrap:"wrap",fontSize:"0.6875rem",color:d.muted},children:[(0,t.jsxs)("span",{children:["created ",new Date(e.createdAt).toLocaleString()]}),e.completedAt&&(0,t.jsxs)("span",{children:["\xb7 done ",new Date(e.completedAt).toLocaleString()]}),e.refs.length>0&&(0,t.jsxs)("span",{children:["\xb7 ",e.refs.length," ref",1===e.refs.length?"":"s"]}),e.blockedBy.length>0&&(0,t.jsxs)("span",{style:{color:p.blocked.color},children:["\xb7 blocked by ",e.blockedBy.length]})]})]},e.id)})})]})}var f=!0;function h(){return(0,t.jsx)(a.zU,{children:(0,t.jsx)(m,{})})}}},e=>{e.O(0,[90636,46593,38792],()=>e(e.s=404)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.