module.exports=[902157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},912714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},750227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},660526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},632278,a=>{"use strict";a.i(912714);var b=a.i(660526),c=a.i(750227);a.i(902157),a.s(["getShepHomeDir",0,function(){return process.env.SHEP_HOME??(0,c.join)((0,b.homedir)(),".shep")}])},686561,579195,a=>{"use strict";var b=a.i(659127),c=a.i(902157),d=a.i(750227),e=a.i(996380),f=a.i(632278),g=a.i(501905);async function h(){try{let b=(0,e.resolve)("LoadSettingsUseCase"),g=await b.execute(),h=(0,f.getShepHomeDir)(),i="Unknown";try{var a;let b=(0,d.join)(h,"data");i=(a=(0,c.statSync)(b).size)<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1048576).toFixed(1)} MB`}catch{}return{settings:g,shepHome:h,dbFileSize:i}}catch(a){return{error:a instanceof Error?a.message:"Failed to load settings"}}}async function i(){try{let a=(0,e.resolve)("IToolInstallerService");return await a.listAvailableTerminals()}catch{return[{id:"system",name:"System Terminal",available:!0}]}}(0,g.ensureServerEntryExports)([h]),(0,b.registerServerReference)(h,"00ab4951bf22a5f299e10b5587ed2983521dad9dda",null),a.s(["loadSettings",0,h],686561),(0,g.ensureServerEntryExports)([i]),(0,b.registerServerReference)(i,"000206349131dc4c733834e8b77ca5883052162e1e",null),a.s(["getAvailableTerminals",0,i],579195)},586303,a=>{"use strict";var b=a.i(912513),c=a.i(889253),d=a.i(723504),e=a.i(408115),f=a.i(827900),g=a.i(673350),h=a.i(673101),i=a.i(654775),j=a.i(265324),k=a.i(686561),l=a.i(579195),m=a.i(659127),n=a.i(618400),o=a.i(996380),p=a.i(633244),q=a.i(501905);async function r(a){try{let b=(0,o.resolve)("LoadSettingsUseCase"),c=await b.execute(),d=function a(b,c){let d={...b};for(let e of Object.keys(c)){let f=c[e];if(void 0===f)continue;let g=b[e];null==g||"object"!=typeof g||Array.isArray(g)||g instanceof Date||null===f||"object"!=typeof f||Array.isArray(f)||f instanceof Date?d[e]=f:d[e]=a(g,f)}return d}(c,a);d.updatedAt=new Date;let e=(0,o.resolve)("UpdateSettingsUseCase");return await e.execute(d),(0,p.updateSettings)(d),(0,n.revalidatePath)("/","layout"),{success:!0}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to update settings"}}}async function s(a){try{let b=(0,o.resolve)("ConnectGithubUseCase"),{login:c}=await b.execute({token:a});return{success:!0,login:c}}catch(a){return{success:!1,error:a instanceof Error?a.message:String(a)}}}async function t(){try{let a=(0,o.resolve)("DisconnectGithubUseCase");return await a.execute(),{success:!0}}catch(a){return{success:!1,error:a instanceof Error?a.message:String(a)}}}async function u(){return(0,o.resolve)("GetGithubIntegrationStatusUseCase").execute()}(0,q.ensureServerEntryExports)([r]),(0,m.registerServerReference)(r,"400d7d74a9c7b28672ff0decabd0c353dc4ac48dad",null),(0,q.ensureServerEntryExports)([s,t,u]),(0,m.registerServerReference)(s,"405795e08e229035711e8f486c38394be41428958c",null),(0,m.registerServerReference)(t,"007f2919c7b65da931be6859c3430db7e5fbec5458",null),(0,m.registerServerReference)(u,"00e1f62433abda5317575ea686359277406e61c72c",null),a.s([],557693),a.i(557693),a.s(["000206349131dc4c733834e8b77ca5883052162e1e",()=>l.getAvailableTerminals,"00173dba11983ca8bc5eee5202809f1608ecb7b9ee",()=>i.listGitHubOrganizations,"00218fdba1289cf3a0703970456df81e7c2ce879da",()=>b.pickFolder,"003fe82fb16e38877fe4c96020b914dbf66345c10c",()=>d.getAllAgentModels,"0064c6a904ca8939b26e1d7cb971dfe1ce0a736d92",()=>c.getDefaultAgentAndModel,"007f2919c7b65da931be6859c3430db7e5fbec5458",0,t,"00a388dfcc45f45365055fb2f8fbd6f5b260c29752",()=>e.checkAllAgentsStatus,"00ab4951bf22a5f299e10b5587ed2983521dad9dda",()=>k.loadSettings,"00e1f62433abda5317575ea686359277406e61c72c",0,u,"40085450b3d987b1b69c38f877433761c8cee07382",()=>g.globalSearch,"400b2f183f80480ccf6ce3de92037e85218f7dd8b3",()=>h.listGitHubRepositories,"400d7d74a9c7b28672ff0decabd0c353dc4ac48dad",0,r,"405795e08e229035711e8f486c38394be41428958c",0,s,"40834634ae55a0b7479981f9f0629fde71c59e080b",()=>j.importGitHubRepository,"60819c777e2e4ccac54bf78640d89e08f9c04abfd4",()=>f.updateAgentAndModel],586303)}];

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