module.exports=[750227,(e,r,t)=>{r.exports=e.x("node:path",()=>require("node:path"))},902157,(e,r,t)=>{r.exports=e.x("node:fs",()=>require("node:fs"))},874533,(e,r,t)=>{r.exports=e.x("node:child_process",()=>require("node:child_process"))},660526,(e,r,t)=>{r.exports=e.x("node:os",()=>require("node:os"))},933919,(e,r,t)=>{r.exports=e.x("@prisma/client-9249dd53ac5b6a44",()=>require("@prisma/client-9249dd53ac5b6a44"))},522734,(e,r,t)=>{r.exports=e.x("fs",()=>require("fs"))},193695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},918622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},270406,(e,r,t)=>{r.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},324725,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},843793,e=>{"use strict";var r=e.i(933919);let t=globalThis.prisma??new r.PrismaClient({log:[]});process.on("SIGTERM",()=>{t.$disconnect().catch(()=>{})}),process.on("SIGINT",()=>{t.$disconnect().catch(()=>{})}),e.s(["db",0,t])},192520,e=>{"use strict";let r;var t=e.i(750227),n=e.i(660526),s=e.i(902157);function o(){return r||(r=process.env.TOWER_DATA_DIR||(0,t.join)((0,n.homedir)(),".tower"),(0,s.existsSync)(r)||(0,s.mkdirSync)(r,{recursive:!0})),r}e.s(["getAssistantDir",0,function(){let e=(0,t.join)(o(),"assistant");return(0,s.existsSync)(e)||(0,s.mkdirSync)(e,{recursive:!0}),e},"getBackupsDir",0,function(){let e=(0,t.join)(o(),"backups");return(0,s.existsSync)(e)||(0,s.mkdirSync)(e,{recursive:!0}),e},"getExtensionsDir",0,function(){let e=(0,t.join)(o(),"extensions");return(0,s.existsSync)(e)||(0,s.mkdirSync)(e,{recursive:!0}),e},"getStorageDir",0,function(){let e=process.env.TOWER_STORAGE_DIR||function(){try{let e=(0,s.readFileSync)((0,t.join)(o(),"storage-location"),"utf-8").trim();return e.length>0?e:null}catch{return null}}(),r=e&&e.length>0?e:(0,t.join)(o(),"storage");return(0,s.existsSync)(r)||(0,s.mkdirSync)(r,{recursive:!0}),r},"getTowerDbPath",0,function(){let e;return(0,t.join)((e=(0,t.join)(o(),"database"),(0,s.existsSync)(e)||(0,s.mkdirSync)(e,{recursive:!0}),e),"tower.db")},"getTowerDir",0,o])},482819,(e,r,t)=>{"use strict";r.exports=e.r(583981).vendored["react-rsc"].ReactServerDOMTurbopackServer},921675,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"registerServerReference",{enumerable:!0,get:function(){return n.registerServerReference}});let n=e.r(482819)},86708,(e,r,t)=>{"use strict";function n(e){for(let r=0;r<e.length;r++){let t=e[r];if("function"!=typeof t)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof t}.
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureServerEntryExports",{enumerable:!0,get:function(){return n}})},932583,e=>{"use strict";var r=e.i(921675),t=e.i(843793);async function n(e,r={}){let s=r.report,o=s?JSON.stringify(s):null;await t.db.providerConnection.upsert({where:{provider:e},create:{provider:e,lastTestedAt:new Date,testOk:!0,version:r.version??null,mcpInstalled:s?.mcp?.ok??!1,hooksInstalled:s?.hooks?.ok??!1,skillsInstalled:s?.skill?.ok??!1,installLog:o},update:{lastTestedAt:new Date,testOk:!0,version:r.version??null,mcpInstalled:s?.mcp?.ok??!1,hooksInstalled:s?.hooks?.ok??!1,skillsInstalled:s?.skill?.ok??!1,installLog:o}})}async function s(e,r={}){await t.db.providerConnection.upsert({where:{provider:e},create:{provider:e,lastTestedAt:new Date,testOk:!1,installLog:r.reason??null},update:{lastTestedAt:new Date,testOk:!1,mcpInstalled:!1,hooksInstalled:!1,skillsInstalled:!1,installLog:r.reason??null}})}async function o(e){let r=await t.db.providerConnection.findUnique({where:{provider:e}});return!!r&&r.testOk}async function i(){return(await t.db.providerConnection.findMany({where:{testOk:!0},select:{provider:!0},orderBy:{provider:"asc"}})).map(e=>e.provider)}async function a(){return t.db.providerConnection.findMany({select:{provider:!0,lastTestedAt:!0,testOk:!0,version:!0,mcpInstalled:!0,hooksInstalled:!0,skillsInstalled:!0,installLog:!0},orderBy:{provider:"asc"}})}(0,e.i(86708).ensureServerEntryExports)([n,s,o,i,a]),(0,r.registerServerReference)(n,"609f95401ee2f45c20151f2f8a779b89ae3e753e7a",null),(0,r.registerServerReference)(s,"60d56d9de5509e86e39c2d1bbf3457f5c7a0c3a38e",null),(0,r.registerServerReference)(o,"40a0bd1b83d8f2dd6c9166ea5a1851d3d5e7f15773",null),(0,r.registerServerReference)(i,"000f0209499277ea7dfe3384c58d67ad0c31c48393",null),(0,r.registerServerReference)(a,"003d5c019192a9a3c2888d8fc1dfbc84ec9e9ddfcc",null),e.s(["getConnectedProviders",0,i,"isProviderConnected",0,o,"markProviderConnected",0,n,"markProviderDisconnected",0,s])},482848,e=>{e.v(e=>Promise.resolve().then(()=>e(874533)))},268548,e=>{e.v(r=>Promise.all(["server/chunks/[externals]_node_util_0xr.y7p._.js"].map(r=>e.l(r))).then(()=>r(812057)))},144264,e=>{e.v(r=>Promise.all(["server/chunks/[externals]_child_process_0pwkpv9._.js"].map(r=>e.l(r))).then(()=>r(233405)))},534777,e=>{e.v(r=>Promise.all(["server/chunks/[externals]_util_0wtvqkc._.js"].map(r=>e.l(r))).then(()=>r(224361)))},200628,e=>{e.v(e=>Promise.resolve().then(()=>e(769310)))}];

//# sourceMappingURL=%5Broot-of-the-server%5D__0qif839._.js.map