neural-loom 0.2.12 → 0.2.13
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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/cache/.previewinfo +1 -1
- package/.next/cache/.rscinfo +1 -1
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/diagnostics/route-bundle-stats.json +1 -1
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +2 -2
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/page/react-loadable-manifest.json +2 -2
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0d0pykb._.js +3 -3
- package/.next/server/chunks/[root-of-the-server]__0d0pykb._.js.map +1 -1
- package/.next/server/chunks/ssr/_0t7oqy6._.js +1 -1
- package/.next/server/chunks/ssr/_0t7oqy6._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{14pu0yottw6p0.js → 06z14vx5drwj0.js} +2 -2
- package/.next/static/chunks/{09.xgpyzqwrhv.js → 0wdcf.26dj03~.js} +1 -1
- package/.next/trace +1 -1
- package/.next/trace-build +1 -1
- package/package.json +1 -1
- package/src/app/components/TerminalConsole.tsx +3 -3
- package/src/app/page.tsx +1 -1
- package/src/lib/agents/SessionManager.ts +2 -2
- package/src/lib/agents/SessionPersister.ts +55 -14
- /package/.next/static/{tvKY2oiwfjXnsPv5B4a3i → w0G47Es9qpUItx3l4uJ_v}/_buildManifest.js +0 -0
- /package/.next/static/{tvKY2oiwfjXnsPv5B4a3i → w0G47Es9qpUItx3l4uJ_v}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{tvKY2oiwfjXnsPv5B4a3i → w0G47Es9qpUItx3l4uJ_v}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67585,(e,a,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"BailoutToCSR",{enumerable:!0,get:function(){return n}});let t=e.r(32061);function n({reason:e,children:a}){if("u"<typeof window)throw Object.defineProperty(new t.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return a}},9885,(e,a,s)=>{"use strict";function t(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"encodeURIPath",{enumerable:!0,get:function(){return t}})},52157,(e,a,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"PreloadChunks",{enumerable:!0,get:function(){return i}});let t=e.r(43476),n=e.r(74080),l=e.r(63599),r=e.r(9885),o=e.r(43369);function i({moduleIds:e}){if("u">typeof window)return null;let a=l.workAsyncStorage.getStore();if(void 0===a)return null;let s=[];if(a.reactLoadableManifest&&e){let t=a.reactLoadableManifest;for(let a of e){if(!t[a])continue;let e=t[a].files;s.push(...e)}}if(0===s.length)return null;let d=(0,o.getAssetTokenQuery)();return(0,t.jsx)(t.Fragment,{children:s.map(e=>{let s=`${a.assetPrefix}/_next/${(0,r.encodeURIPath)(e)}${d}`;return e.endsWith(".css")?(0,t.jsx)("link",{precedence:"dynamic",href:s,rel:"stylesheet",as:"style",nonce:a.nonce},e):((0,n.preload)(s,{as:"script",fetchPriority:"low",nonce:a.nonce}),null)})})}},69093,(e,a,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return d}});let t=e.r(43476),n=e.r(71645),l=e.r(67585),r=e.r(52157);function o(e){return{default:e&&"default"in e?e.default:e}}let i={loader:()=>Promise.resolve(o(()=>null)),loading:null,ssr:!0},d=function(e){let a={...i,...e},s=(0,n.lazy)(()=>a.loader().then(o)),d=a.loading;function c(e){let o=d?(0,t.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,i=!a.ssr||!!a.loading,c=i?n.Suspense:n.Fragment,u=a.ssr?(0,t.jsxs)(t.Fragment,{children:["u"<typeof window?(0,t.jsx)(r.PreloadChunks,{moduleIds:a.modules}):null,(0,t.jsx)(s,{...e})]}):(0,t.jsx)(l.BailoutToCSR,{reason:"next/dynamic",children:(0,t.jsx)(s,{...e})});return(0,t.jsx)(c,{...i?{fallback:o}:{},children:u})}return c.displayName="LoadableComponent",c}},70703,(e,a,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return n}});let t=e.r(55682)._(e.r(69093));function n(e,a){let s={};"function"==typeof e&&(s.loader=e);let n={...s,...a};return(0,t.default)({...n,modules:n.loadableGenerated?.modules})}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),a.exports=s.default)},20897,e=>{e.v({activeBorder:"page-module___8aEwW__activeBorder",agentBadge:"page-module___8aEwW__agentBadge",agentCard:"page-module___8aEwW__agentCard",agentGrid:"page-module___8aEwW__agentGrid",agentHeader:"page-module___8aEwW__agentHeader",agentName:"page-module___8aEwW__agentName",ansiCyan:"page-module___8aEwW__ansiCyan",ansiGreen:"page-module___8aEwW__ansiGreen",ansiMagenta:"page-module___8aEwW__ansiMagenta",ansiRed:"page-module___8aEwW__ansiRed",ansiYellow:"page-module___8aEwW__ansiYellow",cardBody:"page-module___8aEwW__cardBody",container:"page-module___8aEwW__container",containerActive:"page-module___8aEwW__containerActive",contextDetails:"page-module___8aEwW__contextDetails",contextItem:"page-module___8aEwW__contextItem",contextList:"page-module___8aEwW__contextList",contextMeta:"page-module___8aEwW__contextMeta",contextTitle:"page-module___8aEwW__contextTitle",dashboardGrid:"page-module___8aEwW__dashboardGrid",envGrid:"page-module___8aEwW__envGrid",envName:"page-module___8aEwW__envName",envRow:"page-module___8aEwW__envRow",envStatus:"page-module___8aEwW__envStatus",footer:"page-module___8aEwW__footer",header:"page-module___8aEwW__header",logoArea:"page-module___8aEwW__logoArea",mainPanel:"page-module___8aEwW__mainPanel",pulse:"page-module___8aEwW__pulse",pulseDot:"page-module___8aEwW__pulseDot",quickLaunchBtn:"page-module___8aEwW__quickLaunchBtn",sectionTitle:"page-module___8aEwW__sectionTitle",sidePanel:"page-module___8aEwW__sidePanel",statusIndicator:"page-module___8aEwW__statusIndicator",stoppedBadge:"page-module___8aEwW__stoppedBadge",subtitle:"page-module___8aEwW__subtitle",terminalContainer:"page-module___8aEwW__terminalContainer",terminalInput:"page-module___8aEwW__terminalInput",terminalInputArea:"page-module___8aEwW__terminalInputArea",terminalLine:"page-module___8aEwW__terminalLine",terminalSendBtn:"page-module___8aEwW__terminalSendBtn",title:"page-module___8aEwW__title"})},52683,e=>{"use strict";var a=e.i(43476),s=e.i(71645),t=e.i(70703),n=e.i(20897);let l=(0,t.default)(()=>e.A(33779),{loadableGenerated:{modules:[37314]},ssr:!1,loading:()=>(0,a.jsx)("div",{style:{height:"400px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#05070a",color:"var(--muted)",border:"1px solid var(--border)",borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px"},children:(0,a.jsx)("span",{children:"Initializing terminal emulator..."})})}),r=(0,t.default)(()=>e.A(39429),{loadableGenerated:{modules:[1985]},ssr:!1,loading:()=>(0,a.jsx)("div",{style:{height:"280px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--card)",border:"1px solid var(--border)",borderRadius:"12px",marginTop:"1.5rem"},children:(0,a.jsx)("span",{style:{color:"var(--muted)"},children:"Initializing prompt editor..."})})}),o=(0,t.default)(()=>e.A(56915),{loadableGenerated:{modules:[99026]},ssr:!1}),i=(0,t.default)(()=>e.A(78716),{loadableGenerated:{modules:[9949]},ssr:!1}),d=(0,t.default)(()=>e.A(33789),{loadableGenerated:{modules:[20032]},ssr:!1}),c=(0,t.default)(()=>e.A(78003),{loadableGenerated:{modules:[97722]},ssr:!1});e.s(["default",0,function(){let[e,t]=(0,s.useState)([]),[u,p]=(0,s.useState)(null),[m,_]=(0,s.useState)(!1),[h,f]=(0,s.useState)(!1),[g,x]=(0,s.useState)(!1),[j,y]=(0,s.useState)(!1),[b,v]=(0,s.useState)(!1),[w,k]=(0,s.useState)(!1),[C,N]=(0,s.useState)(""),S=e.find(e=>e.id===u),E=e.some(e=>("claude-docker"===e.type||"aider-docker"===e.type)&&"running"===e.status),P=e.some(e=>"claude-ssh"===e.type&&"running"===e.status),W=async()=>{try{let e=await fetch("/api/sessions"),a=await e.json();a.sessions&&t(a.sessions),a.originalCwd&&N(a.originalCwd)}catch(e){console.error("Failed to fetch sessions:",e)}};(0,s.useEffect)(()=>{(async()=>{await W()})();let e=setInterval(W,4e3);return()=>clearInterval(e)},[]);let T=async(e,a,s,t)=>{_(!0);try{let n=a;n||("claude"===e?n="Claude Local":"claude-docker"===e?n="Claude Docker":"claude-ssh"===e?n="Claude SSH":"aider"===e?n="Aider Local":"aider-docker"===e?n="Aider Docker":"mock"===e&&(n="Mock Session"));let l={type:e,name:n,workspaceRoot:s,scopedDirs:t};if(("aider"===e||"aider-docker"===e)&&!s)try{let e=await fetch("/api/context/aider");if(e.ok){let a=await e.json();a.success&&a.config&&(l.workspaceRoot=a.config.workspaceRoot,l.scopedDirs=a.config.scopedDirs)}}catch(e){console.error("Failed to load aider configuration before launch:",e)}let r=await fetch("/api/sessions/launch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}),o=await r.json();o.success&&(await W(),p(o.session.id))}catch(e){console.error("Failed to launch session:",e)}finally{_(!1)}},L=async(e,a=!1)=>{try{let s=await fetch("/api/sessions/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,delete:a})});(await s.json()).success&&(a&&u===e&&p(null),await W())}catch(e){console.error("Failed to stop session:",e)}};return(0,a.jsxs)("div",{className:`${n.default.container} ${S?n.default.containerActive:""}`,children:[(0,a.jsxs)("header",{className:n.default.header,children:[(0,a.jsxs)("div",{className:n.default.logoArea,children:[(0,a.jsx)("h1",{className:n.default.title,children:"NeuralLoom"}),(0,a.jsx)("span",{className:n.default.subtitle,children:"Unified AI Orchestrator & Context Bridge"})]}),(0,a.jsxs)("div",{className:n.default.statusIndicator,children:[(0,a.jsx)("span",{className:n.default.pulseDot}),(0,a.jsx)("span",{children:"Orchestrator Online"})]})]}),S?(0,a.jsx)("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:(0,a.jsx)(c,{sessionId:S.id,workspaceRoot:S.workspaceRoot||"",scopedDirs:S.scopedDirs||[],onClose:()=>p(null),sessions:e,onSwitchSession:e=>p(e)})}):(0,a.jsxs)("div",{className:n.default.dashboardGrid,children:[(0,a.jsxs)("main",{className:n.default.mainPanel,children:[(0,a.jsxs)("section",{children:[(0,a.jsx)("h2",{className:n.default.sectionTitle,children:"Active AI Agents"}),0===e.length?(0,a.jsxs)("div",{className:"card",style:{padding:"3rem 1.5rem",textAlign:"center"},children:[(0,a.jsx)("p",{style:{color:"var(--muted)",marginBottom:"1.5rem"},children:"No active agent sessions in this workspace. Launch a simulated session to verify the control bridge."}),(0,a.jsx)("button",{className:n.default.quickLaunchBtn,onClick:()=>T("mock"),disabled:m,style:{maxWidth:"240px",margin:"0 auto"},children:m?"Launching...":"⚡ Launch Simulated Session"})]}):(0,a.jsx)("div",{className:n.default.agentGrid,children:e.map(e=>(0,a.jsxs)("div",{className:`${n.default.agentCard} card ${u===e.id?n.default.activeBorder:""}`,children:[(0,a.jsxs)("div",{className:n.default.agentHeader,children:[(0,a.jsx)("span",{className:n.default.agentName,children:e.name}),(0,a.jsx)("span",{className:`${n.default.agentBadge} ${"stopped"===e.status?n.default.stoppedBadge:""}`,children:e.status})]}),(0,a.jsxs)("div",{className:n.default.cardBody,children:[(0,a.jsxs)("p",{style:{fontSize:"0.825rem",color:"var(--muted)"},children:["ID: ",(0,a.jsx)("code",{style:{fontSize:"0.75rem"},children:e.id.substring(0,8)}),(0,a.jsx)("br",{}),"Type: ","claude"===e.type?"Claude Local PTY":"claude-docker"===e.type?"Claude Docker PTY":"claude-ssh"===e.type?"Claude SSH PTY":"aider"===e.type?"Aider Local PTY":"aider-docker"===e.type?"Aider Docker PTY":"mock"===e.type?"Simulated Mock PTY":"Unknown PTY",(0,a.jsx)("br",{}),"Logs: ",e.logsCount," captured lines"]}),(0,a.jsxs)("div",{style:{display:"flex",gap:"0.5rem",marginTop:"1rem"},children:["running"===e.status?(0,a.jsx)("button",{onClick:()=>L(e.id,!1),style:{flex:1,padding:"0.4rem 0.6rem",borderRadius:"6px",border:"1px solid var(--danger)",backgroundColor:"transparent",fontSize:"0.75rem",fontWeight:600,color:"var(--danger)"},children:"Stop"}):(0,a.jsx)("button",{onClick:()=>L(e.id,!0),style:{flex:1,padding:"0.4rem 0.6rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",fontSize:"0.75rem",fontWeight:600,color:"var(--muted)"},children:"Delete"}),(0,a.jsx)("button",{onClick:()=>p(e.id),style:{flex:2,padding:"0.4rem 0.6rem",borderRadius:"6px",border:"none",backgroundColor:u===e.id?"var(--border-focus)":"var(--primary)",fontSize:"0.75rem",fontWeight:600,color:"#fff"},children:u===e.id?"Connected":"Open Session"})]})]})]},e.id))})]}),u&&(0,a.jsxs)("section",{className:"card",style:{display:"flex",flexDirection:"column",border:"1px solid var(--border-focus)"},children:[(0,a.jsxs)("div",{className:n.default.agentHeader,style:{justifyContent:"space-between",background:"rgba(109, 40, 217, 0.08)"},children:[(0,a.jsxs)("span",{style:{fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem"},children:["🖥️ Console Bridge — ",e.find(e=>e.id===u)?.name]}),(0,a.jsx)("button",{onClick:()=>p(null),style:{border:"none",background:"none",color:"var(--muted)",cursor:"pointer",fontSize:"0.75rem"},children:"Close Panel ✖"})]}),(0,a.jsx)(l,{sessionId:u})]}),(0,a.jsxs)("section",{children:[(0,a.jsx)("h2",{className:n.default.sectionTitle,children:"Shared Context Hub & Slash Commands"}),(0,a.jsxs)("div",{className:n.default.contextList,children:[(0,a.jsxs)("div",{className:`${n.default.contextItem} card`,children:[(0,a.jsxs)("div",{className:n.default.contextMeta,children:[(0,a.jsx)("span",{className:n.default.contextTitle,children:"Staged Context & System Rules (/ccc)"}),(0,a.jsx)("span",{className:n.default.contextDetails,children:"Compiles AGENTS.md guidelines and project files folder hierarchy map."})]}),(0,a.jsx)("button",{onClick:async()=>{u&&await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:u,command:"/ccc"})})},disabled:!u,style:{padding:"0.4rem 0.8rem",borderRadius:"6px",border:"1px solid var(--primary)",backgroundColor:"transparent",color:"var(--primary)",fontSize:"0.75rem",fontWeight:600,opacity:u?1:.5,cursor:u?"pointer":"not-allowed"},children:"🚀 Mount Context (/ccc)"})]}),(0,a.jsxs)("div",{className:`${n.default.contextItem} card`,children:[(0,a.jsxs)("div",{className:n.default.contextMeta,children:[(0,a.jsx)("span",{className:n.default.contextTitle,children:"Staged Developer Prompt (/ccp)"}),(0,a.jsx)("span",{className:n.default.contextDetails,children:"Executes instructions written in .ai/neural-loom/cprompt.md."})]}),(0,a.jsx)("button",{onClick:async()=>{u&&await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:u,command:"/ccp"})})},disabled:!u,style:{padding:"0.4rem 0.8rem",borderRadius:"6px",border:"1px solid var(--success)",backgroundColor:"transparent",color:"var(--success)",fontSize:"0.75rem",fontWeight:600,opacity:u?1:.5,cursor:u?"pointer":"not-allowed"},children:"⚡ Trigger Prompt (/ccp)"})]})]}),(0,a.jsx)(r,{})]})]}),(0,a.jsxs)("aside",{className:n.default.sidePanel,children:[(0,a.jsxs)("section",{children:[(0,a.jsx)("h2",{className:n.default.sectionTitle,children:"Execution Environments"}),(0,a.jsxs)("div",{className:n.default.envGrid,children:[(0,a.jsxs)("div",{className:n.default.envRow,children:[(0,a.jsx)("span",{className:n.default.envName,children:"💻 Local host OS"}),(0,a.jsx)("span",{className:n.default.envStatus,style:{color:"var(--success)"},children:"Active"})]}),(0,a.jsxs)("div",{className:n.default.envRow,style:{opacity:E?1:.6},children:[(0,a.jsx)("span",{className:n.default.envName,children:"🐳 Docker Sandbox"}),(0,a.jsx)("span",{className:n.default.envStatus,style:{color:E?"var(--success)":"var(--muted)"},children:E?"Active":"Not Mounted"})]}),(0,a.jsxs)("div",{className:n.default.envRow,style:{opacity:P?1:.6},children:[(0,a.jsx)("span",{className:n.default.envName,children:"🌐 Remote VM (SSH)"}),(0,a.jsx)("span",{className:n.default.envStatus,style:{color:P?"var(--success)":"var(--muted)"},children:P?"Active":"Disconnected"})]})]})]}),(0,a.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>T("mock"),disabled:m,children:[(0,a.jsx)("span",{children:"⚡"}),(0,a.jsx)("span",{children:"Launch Mock Agent"})]}),(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>{k(!1),v(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🤖"}),(0,a.jsx)("span",{children:"Launch Claude PTY"})]}),(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>{k(!0),v(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(170, 72%, 40%) 0%, hsl(195, 100%, 40%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🐳"}),(0,a.jsx)("span",{children:"Launch Docker PTY"})]}),(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>f(!0),disabled:m,style:{background:"linear-gradient(135deg, hsl(38, 92%, 50%) 0%, hsl(0, 84%, 60%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🌐"}),(0,a.jsx)("span",{children:"Launch SSH PTY"})]}),(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>{y(!1),x(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(210, 80%, 45%) 0%, hsl(262, 80%, 55%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🐍"}),(0,a.jsx)("span",{children:"Launch Aider PTY"})]}),(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>{y(!0),x(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(195, 100%, 40%) 0%, hsl(262, 80%, 55%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🐳"}),(0,a.jsx)("span",{children:"Launch Aider Docker"})]})]}),(0,a.jsxs)("section",{className:"card",style:{padding:"1.5rem",display:"flex",flexDirection:"column",gap:"0.75rem"},children:[(0,a.jsx)("h3",{style:{fontSize:"1rem",fontWeight:700},children:"Quick Actions"}),(0,a.jsxs)("ul",{style:{listStyle:"none",fontSize:"0.875rem",display:"flex",flexDirection:"column",gap:"0.5rem",color:"var(--muted)"},children:[(0,a.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,a.jsx)("span",{children:"Configure global API Keys"}),(0,a.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]}),(0,a.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,a.jsx)("span",{children:"Edit rules templates"}),(0,a.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]}),(0,a.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,a.jsx)("span",{children:"Inspect process locks"}),(0,a.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]})]})]})]})]}),(0,a.jsxs)("footer",{className:n.default.footer,children:[(0,a.jsx)("span",{children:"NeuralLoom v0.2.12 — Experimental AI Orchestrator Bridge"}),(0,a.jsxs)("span",{children:["Directory: ",C||"Loading..."]})]}),h&&(0,a.jsx)(o,{onClose:()=>f(!1),onConfirmLaunch:()=>{f(!1),T("claude-ssh")}}),g&&(0,a.jsx)(i,{onClose:()=>x(!1),isDocker:j,onConfirmLaunch:()=>{x(!1),T(j?"aider-docker":"aider")}}),b&&(0,a.jsx)(d,{onClose:()=>v(!1),isDocker:w,onConfirmLaunch:(e,a,s)=>{v(!1),T(w?"claude-docker":"claude",e,a,s)}})]})}])},33779,e=>{e.v(a=>Promise.all(["static/chunks/03g6xpslyid3~.js","static/chunks/14pu0yottw6p0.js","static/chunks/0ga14ztvrhau2.css"].map(a=>e.l(a))).then(()=>a(37314)))},39429,e=>{e.v(a=>Promise.all(["static/chunks/16w4~t4h7gk13.js"].map(a=>e.l(a))).then(()=>a(1985)))},56915,e=>{e.v(a=>Promise.all(["static/chunks/0lnobx4eh3~-_.js"].map(a=>e.l(a))).then(()=>a(99026)))},78716,e=>{e.v(a=>Promise.all(["static/chunks/095uz52in_39t.js"].map(a=>e.l(a))).then(()=>a(9949)))},33789,e=>{e.v(a=>Promise.all(["static/chunks/178yphwi3n~oc.js"].map(a=>e.l(a))).then(()=>a(20032)))},78003,e=>{e.v(a=>Promise.all(["static/chunks/0ayrw9yot-bjb.js","static/chunks/14pu0yottw6p0.js","static/chunks/0ga14ztvrhau2.css"].map(a=>e.l(a))).then(()=>a(97722)))}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67585,(e,a,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"BailoutToCSR",{enumerable:!0,get:function(){return n}});let t=e.r(32061);function n({reason:e,children:a}){if("u"<typeof window)throw Object.defineProperty(new t.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return a}},9885,(e,a,s)=>{"use strict";function t(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"encodeURIPath",{enumerable:!0,get:function(){return t}})},52157,(e,a,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"PreloadChunks",{enumerable:!0,get:function(){return i}});let t=e.r(43476),n=e.r(74080),l=e.r(63599),r=e.r(9885),o=e.r(43369);function i({moduleIds:e}){if("u">typeof window)return null;let a=l.workAsyncStorage.getStore();if(void 0===a)return null;let s=[];if(a.reactLoadableManifest&&e){let t=a.reactLoadableManifest;for(let a of e){if(!t[a])continue;let e=t[a].files;s.push(...e)}}if(0===s.length)return null;let d=(0,o.getAssetTokenQuery)();return(0,t.jsx)(t.Fragment,{children:s.map(e=>{let s=`${a.assetPrefix}/_next/${(0,r.encodeURIPath)(e)}${d}`;return e.endsWith(".css")?(0,t.jsx)("link",{precedence:"dynamic",href:s,rel:"stylesheet",as:"style",nonce:a.nonce},e):((0,n.preload)(s,{as:"script",fetchPriority:"low",nonce:a.nonce}),null)})})}},69093,(e,a,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return d}});let t=e.r(43476),n=e.r(71645),l=e.r(67585),r=e.r(52157);function o(e){return{default:e&&"default"in e?e.default:e}}let i={loader:()=>Promise.resolve(o(()=>null)),loading:null,ssr:!0},d=function(e){let a={...i,...e},s=(0,n.lazy)(()=>a.loader().then(o)),d=a.loading;function c(e){let o=d?(0,t.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,i=!a.ssr||!!a.loading,c=i?n.Suspense:n.Fragment,u=a.ssr?(0,t.jsxs)(t.Fragment,{children:["u"<typeof window?(0,t.jsx)(r.PreloadChunks,{moduleIds:a.modules}):null,(0,t.jsx)(s,{...e})]}):(0,t.jsx)(l.BailoutToCSR,{reason:"next/dynamic",children:(0,t.jsx)(s,{...e})});return(0,t.jsx)(c,{...i?{fallback:o}:{},children:u})}return c.displayName="LoadableComponent",c}},70703,(e,a,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return n}});let t=e.r(55682)._(e.r(69093));function n(e,a){let s={};"function"==typeof e&&(s.loader=e);let n={...s,...a};return(0,t.default)({...n,modules:n.loadableGenerated?.modules})}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),a.exports=s.default)},20897,e=>{e.v({activeBorder:"page-module___8aEwW__activeBorder",agentBadge:"page-module___8aEwW__agentBadge",agentCard:"page-module___8aEwW__agentCard",agentGrid:"page-module___8aEwW__agentGrid",agentHeader:"page-module___8aEwW__agentHeader",agentName:"page-module___8aEwW__agentName",ansiCyan:"page-module___8aEwW__ansiCyan",ansiGreen:"page-module___8aEwW__ansiGreen",ansiMagenta:"page-module___8aEwW__ansiMagenta",ansiRed:"page-module___8aEwW__ansiRed",ansiYellow:"page-module___8aEwW__ansiYellow",cardBody:"page-module___8aEwW__cardBody",container:"page-module___8aEwW__container",containerActive:"page-module___8aEwW__containerActive",contextDetails:"page-module___8aEwW__contextDetails",contextItem:"page-module___8aEwW__contextItem",contextList:"page-module___8aEwW__contextList",contextMeta:"page-module___8aEwW__contextMeta",contextTitle:"page-module___8aEwW__contextTitle",dashboardGrid:"page-module___8aEwW__dashboardGrid",envGrid:"page-module___8aEwW__envGrid",envName:"page-module___8aEwW__envName",envRow:"page-module___8aEwW__envRow",envStatus:"page-module___8aEwW__envStatus",footer:"page-module___8aEwW__footer",header:"page-module___8aEwW__header",logoArea:"page-module___8aEwW__logoArea",mainPanel:"page-module___8aEwW__mainPanel",pulse:"page-module___8aEwW__pulse",pulseDot:"page-module___8aEwW__pulseDot",quickLaunchBtn:"page-module___8aEwW__quickLaunchBtn",sectionTitle:"page-module___8aEwW__sectionTitle",sidePanel:"page-module___8aEwW__sidePanel",statusIndicator:"page-module___8aEwW__statusIndicator",stoppedBadge:"page-module___8aEwW__stoppedBadge",subtitle:"page-module___8aEwW__subtitle",terminalContainer:"page-module___8aEwW__terminalContainer",terminalInput:"page-module___8aEwW__terminalInput",terminalInputArea:"page-module___8aEwW__terminalInputArea",terminalLine:"page-module___8aEwW__terminalLine",terminalSendBtn:"page-module___8aEwW__terminalSendBtn",title:"page-module___8aEwW__title"})},52683,e=>{"use strict";var a=e.i(43476),s=e.i(71645),t=e.i(70703),n=e.i(20897);let l=(0,t.default)(()=>e.A(33779),{loadableGenerated:{modules:[37314]},ssr:!1,loading:()=>(0,a.jsx)("div",{style:{height:"400px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#05070a",color:"var(--muted)",border:"1px solid var(--border)",borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px"},children:(0,a.jsx)("span",{children:"Initializing terminal emulator..."})})}),r=(0,t.default)(()=>e.A(39429),{loadableGenerated:{modules:[1985]},ssr:!1,loading:()=>(0,a.jsx)("div",{style:{height:"280px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--card)",border:"1px solid var(--border)",borderRadius:"12px",marginTop:"1.5rem"},children:(0,a.jsx)("span",{style:{color:"var(--muted)"},children:"Initializing prompt editor..."})})}),o=(0,t.default)(()=>e.A(56915),{loadableGenerated:{modules:[99026]},ssr:!1}),i=(0,t.default)(()=>e.A(78716),{loadableGenerated:{modules:[9949]},ssr:!1}),d=(0,t.default)(()=>e.A(33789),{loadableGenerated:{modules:[20032]},ssr:!1}),c=(0,t.default)(()=>e.A(78003),{loadableGenerated:{modules:[97722]},ssr:!1});e.s(["default",0,function(){let[e,t]=(0,s.useState)([]),[u,p]=(0,s.useState)(null),[m,_]=(0,s.useState)(!1),[h,f]=(0,s.useState)(!1),[x,g]=(0,s.useState)(!1),[j,y]=(0,s.useState)(!1),[b,v]=(0,s.useState)(!1),[w,k]=(0,s.useState)(!1),[C,N]=(0,s.useState)(""),S=e.find(e=>e.id===u),E=e.some(e=>("claude-docker"===e.type||"aider-docker"===e.type)&&"running"===e.status),P=e.some(e=>"claude-ssh"===e.type&&"running"===e.status),W=async()=>{try{let e=await fetch("/api/sessions"),a=await e.json();a.sessions&&t(a.sessions),a.originalCwd&&N(a.originalCwd)}catch(e){console.error("Failed to fetch sessions:",e)}};(0,s.useEffect)(()=>{(async()=>{await W()})();let e=setInterval(W,4e3);return()=>clearInterval(e)},[]);let T=async(e,a,s,t)=>{_(!0);try{let n=a;n||("claude"===e?n="Claude Local":"claude-docker"===e?n="Claude Docker":"claude-ssh"===e?n="Claude SSH":"aider"===e?n="Aider Local":"aider-docker"===e?n="Aider Docker":"mock"===e&&(n="Mock Session"));let l={type:e,name:n,workspaceRoot:s,scopedDirs:t};if(("aider"===e||"aider-docker"===e)&&!s)try{let e=await fetch("/api/context/aider");if(e.ok){let a=await e.json();a.success&&a.config&&(l.workspaceRoot=a.config.workspaceRoot,l.scopedDirs=a.config.scopedDirs)}}catch(e){console.error("Failed to load aider configuration before launch:",e)}let r=await fetch("/api/sessions/launch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}),o=await r.json();o.success&&(await W(),p(o.session.id))}catch(e){console.error("Failed to launch session:",e)}finally{_(!1)}},L=async(e,a=!1)=>{try{let s=await fetch("/api/sessions/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,delete:a})});(await s.json()).success&&(a&&u===e&&p(null),await W())}catch(e){console.error("Failed to stop session:",e)}};return(0,a.jsxs)("div",{className:`${n.default.container} ${S?n.default.containerActive:""}`,children:[(0,a.jsxs)("header",{className:n.default.header,children:[(0,a.jsxs)("div",{className:n.default.logoArea,children:[(0,a.jsx)("h1",{className:n.default.title,children:"NeuralLoom"}),(0,a.jsx)("span",{className:n.default.subtitle,children:"Unified AI Orchestrator & Context Bridge"})]}),(0,a.jsxs)("div",{className:n.default.statusIndicator,children:[(0,a.jsx)("span",{className:n.default.pulseDot}),(0,a.jsx)("span",{children:"Orchestrator Online"})]})]}),S?(0,a.jsx)("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:(0,a.jsx)(c,{sessionId:S.id,workspaceRoot:S.workspaceRoot||"",scopedDirs:S.scopedDirs||[],onClose:()=>p(null),sessions:e,onSwitchSession:e=>p(e)})}):(0,a.jsxs)("div",{className:n.default.dashboardGrid,children:[(0,a.jsxs)("main",{className:n.default.mainPanel,children:[(0,a.jsxs)("section",{children:[(0,a.jsx)("h2",{className:n.default.sectionTitle,children:"Active AI Agents"}),0===e.length?(0,a.jsxs)("div",{className:"card",style:{padding:"3rem 1.5rem",textAlign:"center"},children:[(0,a.jsx)("p",{style:{color:"var(--muted)",marginBottom:"1.5rem"},children:"No active agent sessions in this workspace. Launch a simulated session to verify the control bridge."}),(0,a.jsx)("button",{className:n.default.quickLaunchBtn,onClick:()=>T("mock"),disabled:m,style:{maxWidth:"240px",margin:"0 auto"},children:m?"Launching...":"⚡ Launch Simulated Session"})]}):(0,a.jsx)("div",{className:n.default.agentGrid,children:e.map(e=>(0,a.jsxs)("div",{className:`${n.default.agentCard} card ${u===e.id?n.default.activeBorder:""}`,children:[(0,a.jsxs)("div",{className:n.default.agentHeader,children:[(0,a.jsx)("span",{className:n.default.agentName,children:e.name}),(0,a.jsx)("span",{className:`${n.default.agentBadge} ${"stopped"===e.status?n.default.stoppedBadge:""}`,children:e.status})]}),(0,a.jsxs)("div",{className:n.default.cardBody,children:[(0,a.jsxs)("p",{style:{fontSize:"0.825rem",color:"var(--muted)"},children:["ID: ",(0,a.jsx)("code",{style:{fontSize:"0.75rem"},children:e.id.substring(0,8)}),(0,a.jsx)("br",{}),"Type: ","claude"===e.type?"Claude Local PTY":"claude-docker"===e.type?"Claude Docker PTY":"claude-ssh"===e.type?"Claude SSH PTY":"aider"===e.type?"Aider Local PTY":"aider-docker"===e.type?"Aider Docker PTY":"mock"===e.type?"Simulated Mock PTY":"Unknown PTY",(0,a.jsx)("br",{}),"Logs: ",e.logsCount," captured lines"]}),(0,a.jsxs)("div",{style:{display:"flex",gap:"0.5rem",marginTop:"1rem"},children:["running"===e.status?(0,a.jsx)("button",{onClick:()=>L(e.id,!1),style:{flex:1,padding:"0.4rem 0.6rem",borderRadius:"6px",border:"1px solid var(--danger)",backgroundColor:"transparent",fontSize:"0.75rem",fontWeight:600,color:"var(--danger)"},children:"Stop"}):(0,a.jsx)("button",{onClick:()=>L(e.id,!0),style:{flex:1,padding:"0.4rem 0.6rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",fontSize:"0.75rem",fontWeight:600,color:"var(--muted)"},children:"Delete"}),(0,a.jsx)("button",{onClick:()=>p(e.id),style:{flex:2,padding:"0.4rem 0.6rem",borderRadius:"6px",border:"none",backgroundColor:u===e.id?"var(--border-focus)":"var(--primary)",fontSize:"0.75rem",fontWeight:600,color:"#fff"},children:u===e.id?"Connected":"Open Session"})]})]})]},e.id))})]}),u&&(0,a.jsxs)("section",{className:"card",style:{display:"flex",flexDirection:"column",border:"1px solid var(--border-focus)"},children:[(0,a.jsxs)("div",{className:n.default.agentHeader,style:{justifyContent:"space-between",background:"rgba(109, 40, 217, 0.08)"},children:[(0,a.jsxs)("span",{style:{fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem"},children:["🖥️ Console Bridge — ",e.find(e=>e.id===u)?.name]}),(0,a.jsx)("button",{onClick:()=>p(null),style:{border:"none",background:"none",color:"var(--muted)",cursor:"pointer",fontSize:"0.75rem"},children:"Close Panel ✖"})]}),(0,a.jsx)(l,{sessionId:u})]}),(0,a.jsxs)("section",{children:[(0,a.jsx)("h2",{className:n.default.sectionTitle,children:"Shared Context Hub & Slash Commands"}),(0,a.jsxs)("div",{className:n.default.contextList,children:[(0,a.jsxs)("div",{className:`${n.default.contextItem} card`,children:[(0,a.jsxs)("div",{className:n.default.contextMeta,children:[(0,a.jsx)("span",{className:n.default.contextTitle,children:"Staged Context & System Rules (/ccc)"}),(0,a.jsx)("span",{className:n.default.contextDetails,children:"Compiles AGENTS.md guidelines and project files folder hierarchy map."})]}),(0,a.jsx)("button",{onClick:async()=>{u&&await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:u,command:"/ccc"})})},disabled:!u,style:{padding:"0.4rem 0.8rem",borderRadius:"6px",border:"1px solid var(--primary)",backgroundColor:"transparent",color:"var(--primary)",fontSize:"0.75rem",fontWeight:600,opacity:u?1:.5,cursor:u?"pointer":"not-allowed"},children:"🚀 Mount Context (/ccc)"})]}),(0,a.jsxs)("div",{className:`${n.default.contextItem} card`,children:[(0,a.jsxs)("div",{className:n.default.contextMeta,children:[(0,a.jsx)("span",{className:n.default.contextTitle,children:"Staged Developer Prompt (/ccp)"}),(0,a.jsx)("span",{className:n.default.contextDetails,children:"Executes instructions written in .ai/neural-loom/cprompt.md."})]}),(0,a.jsx)("button",{onClick:async()=>{u&&await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:u,command:"/ccp"})})},disabled:!u,style:{padding:"0.4rem 0.8rem",borderRadius:"6px",border:"1px solid var(--success)",backgroundColor:"transparent",color:"var(--success)",fontSize:"0.75rem",fontWeight:600,opacity:u?1:.5,cursor:u?"pointer":"not-allowed"},children:"⚡ Trigger Prompt (/ccp)"})]})]}),(0,a.jsx)(r,{})]})]}),(0,a.jsxs)("aside",{className:n.default.sidePanel,children:[(0,a.jsxs)("section",{children:[(0,a.jsx)("h2",{className:n.default.sectionTitle,children:"Execution Environments"}),(0,a.jsxs)("div",{className:n.default.envGrid,children:[(0,a.jsxs)("div",{className:n.default.envRow,children:[(0,a.jsx)("span",{className:n.default.envName,children:"💻 Local host OS"}),(0,a.jsx)("span",{className:n.default.envStatus,style:{color:"var(--success)"},children:"Active"})]}),(0,a.jsxs)("div",{className:n.default.envRow,style:{opacity:E?1:.6},children:[(0,a.jsx)("span",{className:n.default.envName,children:"🐳 Docker Sandbox"}),(0,a.jsx)("span",{className:n.default.envStatus,style:{color:E?"var(--success)":"var(--muted)"},children:E?"Active":"Not Mounted"})]}),(0,a.jsxs)("div",{className:n.default.envRow,style:{opacity:P?1:.6},children:[(0,a.jsx)("span",{className:n.default.envName,children:"🌐 Remote VM (SSH)"}),(0,a.jsx)("span",{className:n.default.envStatus,style:{color:P?"var(--success)":"var(--muted)"},children:P?"Active":"Disconnected"})]})]})]}),(0,a.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>T("mock"),disabled:m,children:[(0,a.jsx)("span",{children:"⚡"}),(0,a.jsx)("span",{children:"Launch Mock Agent"})]}),(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>{k(!1),v(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🤖"}),(0,a.jsx)("span",{children:"Launch Claude PTY"})]}),(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>{k(!0),v(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(170, 72%, 40%) 0%, hsl(195, 100%, 40%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🐳"}),(0,a.jsx)("span",{children:"Launch Docker PTY"})]}),(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>f(!0),disabled:m,style:{background:"linear-gradient(135deg, hsl(38, 92%, 50%) 0%, hsl(0, 84%, 60%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🌐"}),(0,a.jsx)("span",{children:"Launch SSH PTY"})]}),(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>{y(!1),g(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(210, 80%, 45%) 0%, hsl(262, 80%, 55%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🐍"}),(0,a.jsx)("span",{children:"Launch Aider PTY"})]}),(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>{y(!0),g(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(195, 100%, 40%) 0%, hsl(262, 80%, 55%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🐳"}),(0,a.jsx)("span",{children:"Launch Aider Docker"})]})]}),(0,a.jsxs)("section",{className:"card",style:{padding:"1.5rem",display:"flex",flexDirection:"column",gap:"0.75rem"},children:[(0,a.jsx)("h3",{style:{fontSize:"1rem",fontWeight:700},children:"Quick Actions"}),(0,a.jsxs)("ul",{style:{listStyle:"none",fontSize:"0.875rem",display:"flex",flexDirection:"column",gap:"0.5rem",color:"var(--muted)"},children:[(0,a.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,a.jsx)("span",{children:"Configure global API Keys"}),(0,a.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]}),(0,a.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,a.jsx)("span",{children:"Edit rules templates"}),(0,a.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]}),(0,a.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,a.jsx)("span",{children:"Inspect process locks"}),(0,a.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]})]})]})]})]}),(0,a.jsxs)("footer",{className:n.default.footer,children:[(0,a.jsx)("span",{children:"NeuralLoom v0.2.13 — Experimental AI Orchestrator Bridge"}),(0,a.jsxs)("span",{children:["Directory: ",C||"Loading..."]})]}),h&&(0,a.jsx)(o,{onClose:()=>f(!1),onConfirmLaunch:()=>{f(!1),T("claude-ssh")}}),x&&(0,a.jsx)(i,{onClose:()=>g(!1),isDocker:j,onConfirmLaunch:()=>{g(!1),T(j?"aider-docker":"aider")}}),b&&(0,a.jsx)(d,{onClose:()=>v(!1),isDocker:w,onConfirmLaunch:(e,a,s)=>{v(!1),T(w?"claude-docker":"claude",e,a,s)}})]})}])},33779,e=>{e.v(a=>Promise.all(["static/chunks/03g6xpslyid3~.js","static/chunks/06z14vx5drwj0.js","static/chunks/0ga14ztvrhau2.css"].map(a=>e.l(a))).then(()=>a(37314)))},39429,e=>{e.v(a=>Promise.all(["static/chunks/16w4~t4h7gk13.js"].map(a=>e.l(a))).then(()=>a(1985)))},56915,e=>{e.v(a=>Promise.all(["static/chunks/0lnobx4eh3~-_.js"].map(a=>e.l(a))).then(()=>a(99026)))},78716,e=>{e.v(a=>Promise.all(["static/chunks/095uz52in_39t.js"].map(a=>e.l(a))).then(()=>a(9949)))},33789,e=>{e.v(a=>Promise.all(["static/chunks/178yphwi3n~oc.js"].map(a=>e.l(a))).then(()=>a(20032)))},78003,e=>{e.v(a=>Promise.all(["static/chunks/0ayrw9yot-bjb.js","static/chunks/06z14vx5drwj0.js","static/chunks/0ga14ztvrhau2.css"].map(a=>e.l(a))).then(()=>a(97722)))}]);
|
package/.next/trace
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"generate-buildid","duration":
|
|
1
|
+
[{"name":"generate-buildid","duration":246,"timestamp":113134723182,"id":4,"parentId":1,"tags":{},"startTime":1781333870495,"traceId":"b3a10865c13ae36f"},{"name":"load-custom-routes","duration":343,"timestamp":113134723543,"id":5,"parentId":1,"tags":{},"startTime":1781333870495,"traceId":"b3a10865c13ae36f"},{"name":"create-dist-dir","duration":612,"timestamp":113134723916,"id":6,"parentId":1,"tags":{},"startTime":1781333870495,"traceId":"b3a10865c13ae36f"},{"name":"clean","duration":553,"timestamp":113134725459,"id":7,"parentId":1,"tags":{},"startTime":1781333870497,"traceId":"b3a10865c13ae36f"},{"name":"discover-routes","duration":6787,"timestamp":113134748200,"id":8,"parentId":1,"tags":{},"startTime":1781333870520,"traceId":"b3a10865c13ae36f"},{"name":"create-root-mapping","duration":59,"timestamp":113134755034,"id":9,"parentId":1,"tags":{},"startTime":1781333870526,"traceId":"b3a10865c13ae36f"},{"name":"generate-route-types","duration":15894,"timestamp":113134756319,"id":10,"parentId":1,"tags":{},"startTime":1781333870528,"traceId":"b3a10865c13ae36f"},{"name":"public-dir-conflict-check","duration":84,"timestamp":113134772346,"id":11,"parentId":1,"tags":{},"startTime":1781333870544,"traceId":"b3a10865c13ae36f"},{"name":"generate-routes-manifest","duration":2144,"timestamp":113134772526,"id":12,"parentId":1,"tags":{},"startTime":1781333870544,"traceId":"b3a10865c13ae36f"},{"name":"run-turbopack","duration":2329746,"timestamp":113134781786,"id":14,"parentId":1,"tags":{},"startTime":1781333870553,"traceId":"b3a10865c13ae36f"},{"name":"turbopack-build-events","duration":66,"timestamp":113135068003,"id":15,"parentId":1,"tags":{},"startTime":1781333870839,"traceId":"b3a10865c13ae36f"},{"name":"run-typescript","duration":3375671,"timestamp":113137122822,"id":16,"parentId":1,"tags":{},"startTime":1781333872894,"traceId":"b3a10865c13ae36f"},{"name":"generate-required-server-files","duration":1276,"timestamp":113140499288,"id":18,"parentId":1,"tags":{},"startTime":1781333876271,"traceId":"b3a10865c13ae36f"},{"name":"check-static-error-page","duration":7480,"timestamp":113140611222,"id":20,"parentId":19,"tags":{},"startTime":1781333876383,"traceId":"b3a10865c13ae36f"},{"name":"is-page-static","duration":489231,"timestamp":113140623767,"id":38,"parentId":22,"tags":{},"startTime":1781333876395,"traceId":"b3a10865c13ae36f"},{"name":"check-page","duration":498707,"timestamp":113140614381,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1781333876386,"traceId":"b3a10865c13ae36f"},{"name":"is-page-static","duration":607418,"timestamp":113140624026,"id":41,"parentId":25,"tags":{},"startTime":1781333876395,"traceId":"b3a10865c13ae36f"},{"name":"check-page","duration":616303,"timestamp":113140615208,"id":25,"parentId":19,"tags":{"page":"/api/context"},"startTime":1781333876387,"traceId":"b3a10865c13ae36f"},{"name":"is-page-static","duration":615598,"timestamp":113140623486,"id":37,"parentId":21,"tags":{},"startTime":1781333876395,"traceId":"b3a10865c13ae36f"},{"name":"check-page","duration":626000,"timestamp":113140613131,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1781333876384,"traceId":"b3a10865c13ae36f"},{"name":"is-page-static","duration":619286,"timestamp":113140623867,"id":39,"parentId":23,"tags":{},"startTime":1781333876395,"traceId":"b3a10865c13ae36f"},{"name":"check-page","duration":628479,"timestamp":113140614721,"id":23,"parentId":19,"tags":{"page":"/api/context/aider"},"startTime":1781333876386,"traceId":"b3a10865c13ae36f"},{"name":"is-page-static","duration":621307,"timestamp":113140624458,"id":44,"parentId":28,"tags":{},"startTime":1781333876396,"traceId":"b3a10865c13ae36f"},{"name":"check-page","duration":629896,"timestamp":113140615918,"id":28,"parentId":19,"tags":{"page":"/api/git"},"startTime":1781333876387,"traceId":"b3a10865c13ae36f"},{"name":"is-page-static","duration":623975,"timestamp":113140624328,"id":43,"parentId":27,"tags":{},"startTime":1781333876396,"traceId":"b3a10865c13ae36f"},{"name":"check-page","duration":632676,"timestamp":113140615667,"id":27,"parentId":19,"tags":{"page":"/api/files"},"startTime":1781333876387,"traceId":"b3a10865c13ae36f"},{"name":"is-page-static","duration":623645,"timestamp":113140624886,"id":47,"parentId":31,"tags":{},"startTime":1781333876396,"traceId":"b3a10865c13ae36f"},{"name":"check-page","duration":631891,"timestamp":113140616663,"id":31,"parentId":19,"tags":{"page":"/api/sessions/launch"},"startTime":1781333876388,"traceId":"b3a10865c13ae36f"},{"name":"is-page-static","duration":627923,"timestamp":113140623944,"id":40,"parentId":24,"tags":{},"startTime":1781333876395,"traceId":"b3a10865c13ae36f"},{"name":"check-page","duration":636929,"timestamp":113140614978,"id":24,"parentId":19,"tags":{"page":"/api/context/claude"},"startTime":1781333876386,"traceId":"b3a10865c13ae36f"},{"name":"is-page-static","duration":628785,"timestamp":113140625048,"id":50,"parentId":34,"tags":{},"startTime":1781333876396,"traceId":"b3a10865c13ae36f"},{"name":"check-page","duration":636550,"timestamp":113140617323,"id":34,"parentId":19,"tags":{"page":"/api/sessions/stop"},"startTime":1781333876389,"traceId":"b3a10865c13ae36f"},{"name":"is-page-static","duration":629957,"timestamp":113140624562,"id":45,"parentId":29,"tags":{},"startTime":1781333876396,"traceId":"b3a10865c13ae36f"},{"name":"check-page","duration":638387,"timestamp":113140616163,"id":29,"parentId":19,"tags":{"page":"/api/sessions/inject"},"startTime":1781333876387,"traceId":"b3a10865c13ae36f"},{"name":"is-page-static","duration":634428,"timestamp":113140625089,"id":51,"parentId":35,"tags":{},"startTime":1781333876396,"traceId":"b3a10865c13ae36f"},{"name":"check-page","duration":641961,"timestamp":113140617594,"id":35,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1781333876389,"traceId":"b3a10865c13ae36f"},{"name":"is-page-static","duration":637390,"timestamp":113140624761,"id":46,"parentId":30,"tags":{},"startTime":1781333876396,"traceId":"b3a10865c13ae36f"},{"name":"check-page","duration":645753,"timestamp":113140616427,"id":30,"parentId":19,"tags":{"page":"/api/sessions/input"},"startTime":1781333876388,"traceId":"b3a10865c13ae36f"},{"name":"is-page-static","duration":637520,"timestamp":113140624994,"id":49,"parentId":33,"tags":{},"startTime":1781333876396,"traceId":"b3a10865c13ae36f"},{"name":"check-page","duration":645420,"timestamp":113140617124,"id":33,"parentId":19,"tags":{"page":"/api/sessions/stats"},"startTime":1781333876388,"traceId":"b3a10865c13ae36f"},{"name":"is-page-static","duration":637931,"timestamp":113140624946,"id":48,"parentId":32,"tags":{},"startTime":1781333876396,"traceId":"b3a10865c13ae36f"},{"name":"check-page","duration":646005,"timestamp":113140616892,"id":32,"parentId":19,"tags":{"page":"/api/sessions"},"startTime":1781333876388,"traceId":"b3a10865c13ae36f"},{"name":"is-page-static","duration":640122,"timestamp":113140624109,"id":42,"parentId":26,"tags":{},"startTime":1781333876395,"traceId":"b3a10865c13ae36f"},{"name":"check-page","duration":648820,"timestamp":113140615432,"id":26,"parentId":19,"tags":{"page":"/api/context/ssh"},"startTime":1781333876387,"traceId":"b3a10865c13ae36f"},{"name":"is-page-static","duration":642528,"timestamp":113140628451,"id":52,"parentId":36,"tags":{},"startTime":1781333876400,"traceId":"b3a10865c13ae36f"},{"name":"check-page","duration":652691,"timestamp":113140618318,"id":36,"parentId":19,"tags":{"page":"/"},"startTime":1781333876390,"traceId":"b3a10865c13ae36f"},{"name":"static-check","duration":660285,"timestamp":113140610745,"id":19,"parentId":1,"tags":{},"startTime":1781333876382,"traceId":"b3a10865c13ae36f"},{"name":"write-routes-manifest","duration":855,"timestamp":113141271912,"id":54,"parentId":1,"tags":{},"startTime":1781333877043,"traceId":"b3a10865c13ae36f"},{"name":"load-dotenv","duration":51,"timestamp":113141288785,"id":57,"parentId":56,"tags":{},"startTime":1781333877060,"traceId":"b3a10865c13ae36f"},{"name":"run-export-path-map","duration":363,"timestamp":113141293364,"id":58,"parentId":56,"tags":{},"startTime":1781333877065,"traceId":"b3a10865c13ae36f"},{"name":"next-export","duration":657053,"timestamp":113141287457,"id":56,"parentId":1,"tags":{},"startTime":1781333877059,"traceId":"b3a10865c13ae36f"},{"name":"move-exported-app-not-found-","duration":1871,"timestamp":113141945890,"id":59,"parentId":55,"tags":{},"startTime":1781333877717,"traceId":"b3a10865c13ae36f"},{"name":"move-exported-app-global-error-","duration":1538,"timestamp":113141947859,"id":60,"parentId":55,"tags":{},"startTime":1781333877719,"traceId":"b3a10865c13ae36f"},{"name":"static-generation","duration":675669,"timestamp":113141277146,"id":55,"parentId":1,"tags":{},"startTime":1781333877048,"traceId":"b3a10865c13ae36f"},{"name":"write-routes-manifest","duration":772,"timestamp":113141952924,"id":61,"parentId":1,"tags":{},"startTime":1781333877724,"traceId":"b3a10865c13ae36f"},{"name":"print-tree-view","duration":4009,"timestamp":113141968424,"id":62,"parentId":1,"tags":{},"startTime":1781333877740,"traceId":"b3a10865c13ae36f"},{"name":"write-route-bundle-stats","duration":9342,"timestamp":113141972469,"id":63,"parentId":1,"tags":{},"startTime":1781333877744,"traceId":"b3a10865c13ae36f"},{"name":"telemetry-flush","duration":171670,"timestamp":113141981841,"id":64,"parentId":1,"tags":{},"startTime":1781333877753,"traceId":"b3a10865c13ae36f"},{"name":"next-build","duration":7479885,"timestamp":113134673653,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1781333870445,"traceId":"b3a10865c13ae36f"}]
|
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-turbopack","duration":
|
|
1
|
+
[{"name":"run-turbopack","duration":2329746,"timestamp":113134781786,"id":14,"parentId":1,"tags":{},"startTime":1781333870553,"traceId":"b3a10865c13ae36f"},{"name":"turbopack-build-events","duration":66,"timestamp":113135068003,"id":15,"parentId":1,"tags":{},"startTime":1781333870839,"traceId":"b3a10865c13ae36f"},{"name":"run-typescript","duration":3375671,"timestamp":113137122822,"id":16,"parentId":1,"tags":{},"startTime":1781333872894,"traceId":"b3a10865c13ae36f"},{"name":"static-check","duration":660285,"timestamp":113140610745,"id":19,"parentId":1,"tags":{},"startTime":1781333876382,"traceId":"b3a10865c13ae36f"},{"name":"static-generation","duration":675669,"timestamp":113141277146,"id":55,"parentId":1,"tags":{},"startTime":1781333877048,"traceId":"b3a10865c13ae36f"},{"name":"telemetry-flush","duration":171670,"timestamp":113141981841,"id":64,"parentId":1,"tags":{},"startTime":1781333877753,"traceId":"b3a10865c13ae36f"},{"name":"next-build","duration":7479885,"timestamp":113134673653,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1781333870445,"traceId":"b3a10865c13ae36f"}]
|
package/package.json
CHANGED
|
@@ -227,15 +227,15 @@ export default function TerminalConsole({ sessionId, height = "400px" }: Termina
|
|
|
227
227
|
border: "1px solid var(--border)",
|
|
228
228
|
borderBottomLeftRadius: "12px",
|
|
229
229
|
borderBottomRightRadius: "12px",
|
|
230
|
-
overflow: "hidden"
|
|
230
|
+
overflow: "hidden",
|
|
231
|
+
padding: "8px" // Move padding here to avoid fitAddon bounds calculation clipping
|
|
231
232
|
}}
|
|
232
233
|
>
|
|
233
234
|
<div
|
|
234
235
|
ref={terminalRef}
|
|
235
236
|
style={{
|
|
236
237
|
width: "100%",
|
|
237
|
-
height: "100%"
|
|
238
|
-
padding: "1rem"
|
|
238
|
+
height: "100%"
|
|
239
239
|
}}
|
|
240
240
|
/>
|
|
241
241
|
</div>
|
package/src/app/page.tsx
CHANGED
|
@@ -545,7 +545,7 @@ export default function Home() {
|
|
|
545
545
|
|
|
546
546
|
{/* Footer */}
|
|
547
547
|
<footer className={styles.footer}>
|
|
548
|
-
<span>NeuralLoom v0.2.
|
|
548
|
+
<span>NeuralLoom v0.2.13 — Experimental AI Orchestrator Bridge</span>
|
|
549
549
|
<span>Directory: {serverCwd || "Loading..."}</span>
|
|
550
550
|
</footer>
|
|
551
551
|
|
|
@@ -92,7 +92,7 @@ export class SessionManager {
|
|
|
92
92
|
|
|
93
93
|
await runner.start();
|
|
94
94
|
this.sessions.set(id, runner);
|
|
95
|
-
SessionPersister.saveSession(runner);
|
|
95
|
+
SessionPersister.saveSession(runner, true);
|
|
96
96
|
return runner;
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -108,7 +108,7 @@ export class SessionManager {
|
|
|
108
108
|
const runner = this.sessions.get(id);
|
|
109
109
|
if (!runner) return false;
|
|
110
110
|
await runner.stop();
|
|
111
|
-
SessionPersister.saveSession(runner);
|
|
111
|
+
SessionPersister.saveSession(runner, true);
|
|
112
112
|
return true;
|
|
113
113
|
}
|
|
114
114
|
|
|
@@ -13,6 +13,9 @@ export interface PersistedSession {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export class SessionPersister {
|
|
16
|
+
private static pendingSaves = new Map<string, NodeJS.Timeout>();
|
|
17
|
+
private static pendingData = new Map<string, PersistedSession>();
|
|
18
|
+
|
|
16
19
|
private static get workspaceRoot(): string {
|
|
17
20
|
return process.env.ORIGINAL_CWD || process.cwd();
|
|
18
21
|
}
|
|
@@ -25,23 +28,61 @@ export class SessionPersister {
|
|
|
25
28
|
return dir;
|
|
26
29
|
}
|
|
27
30
|
|
|
28
|
-
public static saveSession(
|
|
31
|
+
public static saveSession(
|
|
32
|
+
session: { id: string; name: string; type: string; status: string; createdAt: string; logs: string[]; workspaceRoot?: string; scopedDirs?: string[] },
|
|
33
|
+
immediate = false
|
|
34
|
+
) {
|
|
35
|
+
const data: PersistedSession = {
|
|
36
|
+
id: session.id,
|
|
37
|
+
name: session.name,
|
|
38
|
+
type: session.type,
|
|
39
|
+
status: (session.status === 'running' && session.type === 'mock') ? 'running' : session.status as 'idle' | 'running' | 'stopped', // Mock sessions can persist as running or restart
|
|
40
|
+
createdAt: session.createdAt,
|
|
41
|
+
logs: session.logs,
|
|
42
|
+
workspaceRoot: session.workspaceRoot,
|
|
43
|
+
scopedDirs: session.scopedDirs
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
if (immediate) {
|
|
47
|
+
// Clear any pending debounced save
|
|
48
|
+
const timer = this.pendingSaves.get(session.id);
|
|
49
|
+
if (timer) {
|
|
50
|
+
clearTimeout(timer);
|
|
51
|
+
this.pendingSaves.delete(session.id);
|
|
52
|
+
}
|
|
53
|
+
this.pendingData.delete(session.id);
|
|
54
|
+
this.writeToDisk(session.id, data);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Update pending data
|
|
59
|
+
this.pendingData.set(session.id, data);
|
|
60
|
+
|
|
61
|
+
// Schedule save if not already scheduled
|
|
62
|
+
if (!this.pendingSaves.has(session.id)) {
|
|
63
|
+
const timer = setTimeout(() => {
|
|
64
|
+
this.pendingSaves.delete(session.id);
|
|
65
|
+
const dataToWrite = this.pendingData.get(session.id);
|
|
66
|
+
if (dataToWrite) {
|
|
67
|
+
this.pendingData.delete(session.id);
|
|
68
|
+
this.writeToDisk(session.id, dataToWrite);
|
|
69
|
+
}
|
|
70
|
+
}, 1000); // 1-second debounce
|
|
71
|
+
this.pendingSaves.set(session.id, timer);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
private static writeToDisk(id: string, data: PersistedSession) {
|
|
29
76
|
try {
|
|
30
77
|
const dir = this.getSessionsDir();
|
|
31
|
-
const filePath = path.join(dir, `${
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
createdAt: session.createdAt,
|
|
38
|
-
logs: session.logs,
|
|
39
|
-
workspaceRoot: session.workspaceRoot,
|
|
40
|
-
scopedDirs: session.scopedDirs
|
|
41
|
-
};
|
|
42
|
-
fs.writeFileSync(filePath, JSON.stringify(data, null, 2), "utf8");
|
|
78
|
+
const filePath = path.join(dir, `${id}.json`);
|
|
79
|
+
fs.writeFile(filePath, JSON.stringify(data, null, 2), "utf8", (err) => {
|
|
80
|
+
if (err) {
|
|
81
|
+
console.error(`[SessionPersister] Failed to save session ${id} asynchronously:`, err);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
43
84
|
} catch (err) {
|
|
44
|
-
console.error(`[SessionPersister] Failed to save session ${
|
|
85
|
+
console.error(`[SessionPersister] Failed to save session ${id}:`, err);
|
|
45
86
|
}
|
|
46
87
|
}
|
|
47
88
|
|
|
File without changes
|
/package/.next/static/{tvKY2oiwfjXnsPv5B4a3i → w0G47Es9qpUItx3l4uJ_v}/_clientMiddlewareManifest.js
RENAMED
|
File without changes
|
|
File without changes
|