@henlii/pidance 0.2.11 → 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.
Files changed (67) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +12 -12
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/required-server-files.json +1 -1
  6. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  7. package/.next/server/app/_global-error.html +1 -1
  8. package/.next/server/app/_global-error.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/.next/server/app/_not-found.html +1 -1
  17. package/.next/server/app/_not-found.rsc +2 -2
  18. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  19. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  20. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  21. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  22. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  23. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  24. package/.next/server/app/api/about/route.js +1 -1
  25. package/.next/server/app/api/attachments/route.js +1 -1
  26. package/.next/server/app/api/auth/ui-sessions/[id]/route.js +1 -1
  27. package/.next/server/app/api/cwd/browse/route.js +1 -1
  28. package/.next/server/app/api/cwd/validate/route.js +1 -1
  29. package/.next/server/app/api/default-cwd/route.js +1 -1
  30. package/.next/server/app/api/file-index/route.js +1 -1
  31. package/.next/server/app/api/files/[...path]/route.js +3 -3
  32. package/.next/server/app/api/models/route.js +1 -1
  33. package/.next/server/app/api/preferences/route.js +1 -1
  34. package/.next/server/app/api/project-assets/route.js +1 -1
  35. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  36. package/.next/server/app/api/skills/route.js +2 -2
  37. package/.next/server/app/api/update/apply/route.js +2 -2
  38. package/.next/server/app/api/update/check/route.js +2 -2
  39. package/.next/server/app/api/worktrees/route.js +1 -1
  40. package/.next/server/app/index.html +1 -1
  41. package/.next/server/app/index.rsc +4 -4
  42. package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
  43. package/.next/server/app/index.segments/_full.segment.rsc +4 -4
  44. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  45. package/.next/server/app/index.segments/_index.segment.rsc +2 -2
  46. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  47. package/.next/server/app/page.js +14 -14
  48. package/.next/server/app/page_client-reference-manifest.js +1 -1
  49. package/.next/server/app-paths-manifest.json +12 -12
  50. package/.next/server/chunks/188.js +1 -1
  51. package/.next/server/chunks/329.js +1 -1
  52. package/.next/server/chunks/5304.js +1 -0
  53. package/.next/server/chunks/5582.js +1 -1
  54. package/.next/server/chunks/6192.js +2 -2
  55. package/.next/server/chunks/7594.js +1 -1
  56. package/.next/server/instrumentation.js +1 -1
  57. package/.next/server/middleware-build-manifest.js +1 -1
  58. package/.next/server/pages/404.html +1 -1
  59. package/.next/server/pages/500.html +1 -1
  60. package/.next/server/server-reference-manifest.json +1 -1
  61. package/.next/static/chunks/9780-6c3a23bf3225b4e4.js +1 -0
  62. package/.next/static/chunks/app/page-b7557470a69f54d8.js +25 -0
  63. package/package.json +1 -1
  64. package/.next/static/chunks/9780-0fa59080a2704139.js +0 -1
  65. package/.next/static/chunks/app/page-1524e08b5e4e4a34.js +0 -25
  66. /package/.next/static/{3Ib_mKVkLPgOQQS2ZuNQ- → tSMtvUw39aEnL_q0KYTYU}/_buildManifest.js +0 -0
  67. /package/.next/static/{3Ib_mKVkLPgOQQS2ZuNQ- → tSMtvUw39aEnL_q0KYTYU}/_ssgManifest.js +0 -0
@@ -1,2 +1,2 @@
1
- (()=>{var a={};a.id=9968,a.ids=[9968],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},400:(a,b,c)=>{"use strict";c.d(b,{OJ:()=>o,Sk:()=>j,j0:()=>m});var d=c(89477),e=c.n(d),f=c(86697),g=c.n(f),h=c(716);let i="true"===process.env.SAVE_FSYNC;class j extends Error{constructor(a,b){super(b),this.code=a}}function k(a){return(a.split(/[\\/]+/).filter(Boolean).pop()??"").startsWith(".pi-save-")?"目标路径包含受保护名称":null}function l(a){return/^[a-zA-Z]:[\\/]/.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function m(a,b,c=l(a)||l(b)){let d=c?g().win32:g(),e=d.resolve(a),f=d.resolve(b),h=c?e.toLowerCase():e,i=c?f.toLowerCase():f;return h!==i&&h.startsWith(i.endsWith(d.sep)?i:i+d.sep)}function n(a,b){let c=a?.code;if("ENOENT"===c)throw new j("not-found",b);if("EACCES"===c||"EPERM"===c)throw new j("forbidden","文件访问被拒绝");throw a}function o(a){let b,c,d,{target:f,cwd:l,allowedRoots:o,content:p,baseline:q}=a,r=k(f);if(r)throw new j("forbidden",r);let s=function(a,b){if(!Number.isFinite(b?.mtimeMs)||b.mtimeMs<0||!Number.isFinite(b?.size)||b.size<0)throw new j("bad-request","保存请求格式无效");for(let b=0;b<a.length;b+=1){let c=a.charCodeAt(b);if(c>=55296&&c<=57343){if(c<=56319&&b+1<a.length&&a.charCodeAt(b+1)>=56320&&57343>=a.charCodeAt(b+1)){b+=1;continue}throw new j("bad-request","内容包含不可逆 UTF-8 字符")}}return Buffer.from(a,"utf8")}(p,q),t=a.isAllowed??((a,b)=>[...b].some(b=>a===b||a.startsWith(`${b}/`)||a.startsWith(`${b}\\`)));if(!t(f,o))throw new j("forbidden","目标不在授权目录内");try{b=e().lstatSync(f)}catch(a){return n(a,"目标文件不存在")}if(b.isSymbolicLink())throw new j("forbidden","目标不能是符号链接");if(!b.isFile())throw new j("bad-request","目标不是常规文件");try{if(e().realpathSync(l),c=e().realpathSync(f),d=new Set([...o].map(a=>e().realpathSync(a))),k(c)||!t(c,d))throw new j("forbidden","目标不在授权目录内");for(let a=g().dirname(f);m(a,l);a=g().dirname(a))if(e().lstatSync(a).isSymbolicLink())throw new j("forbidden","目标父目录不能是符号链接")}catch(a){if(a instanceof j)throw a;return n(a,"目标路径不存在")}try{e().statSync(c)}catch(a){return n(a,"目标文件不存在")}let u=g().dirname(c),v=g().join(u,`.pi-save-${process.pid}-${(0,h.randomUUID)()}`);try{if(e().writeFileSync(v,s,{flag:"wx",mode:4095&b.mode}),e().chmodSync(v,4095&b.mode),i){let a=e().openSync(v,"r+");try{e().fsyncSync(a)}finally{e().closeSync(a)}}e().renameSync(v,c)}catch(a){try{e().unlinkSync(v)}catch{}return n(a,"保存目标不存在")}let w=e().statSync(c);return{path:f,size:w.size,mtimeMs:w.mtimeMs}}},716:a=>{"use strict";a.exports=require("node:crypto")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9209:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>U,patchFetch:()=>T,routeModule:()=>P,serverHooks:()=>S,workAsyncStorage:()=>Q,workUnitAsyncStorage:()=>R});var d={};c.r(d),c.d(d,{DELETE:()=>O,GET:()=>M,PATCH:()=>N,dynamic:()=>L});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(34556),x=c(89477),y=c(62228),z=c(86697),A=c(716),B=c(60396),C=c(60601);function D(a){if(!a||"string"!=typeof a)return!1;try{return(0,x.statSync)(a).isDirectory()}catch{return!1}}class E extends Error{constructor(a,b){super(b),this.code=a}}let F="disable-model-invocation",G={loadSkills:a=>(0,w.y)(a),agentDir:(0,B.$M)(),homeDir:(0,y.homedir)()};function H(a,b,c,d){let e=a=>a.some(a=>{var c;let d,e;try{d=(0,x.realpathSync)(a)}catch{return!1}return c=d,""!==(e=(0,z.relative)((0,z.resolve)(c),(0,z.resolve)(b)))&&".."!==e&&!e.startsWith(`..${z.sep}`)&&!(0,z.isAbsolute)(e)});return e([(0,z.join)(d.agentDir,"skills"),(0,z.join)(d.homeDir,".agents","skills")])?"global":e([(0,z.join)(c,".pi","skills"),(0,z.join)(c,".agents","skills")])?"project":"denied"}function I(a,b){return[(0,z.join)(b.agentDir,"skills"),(0,z.join)(b.homeDir,".agents","skills"),(0,z.join)(a,".pi","skills"),(0,z.join)(a,".agents","skills")]}async function J(a,b=G){let c,d,e,f,{cwd:g,filePath:h,disableModelInvocation:i}=a;if(!g||"string"!=typeof g)throw new E("bad-request","cwd required");if(!h||"string"!=typeof h)throw new E("bad-request","filePath required");if("boolean"!=typeof i)throw new E("bad-request","disableModelInvocation must be boolean");if(!(0,z.isAbsolute)(h))throw new E("bad-request","filePath must be absolute");if(!D(g))throw new E("bad-request","cwd must be an existing directory");let{skills:j}=await b.loadSkills(g);if(!j.find(a=>(0,z.resolve)(a.filePath)===(0,z.resolve)(h)))throw new E("not-found","skill not in loader list for cwd");try{c=(0,x.lstatSync)(h)}catch{throw new E("not-found","file not found")}if(c.isSymbolicLink())throw new E("forbidden","target must not be a symbolic link");if(!c.isFile())throw new E("bad-request","target is not a regular file");try{d=(0,x.realpathSync)(h)}catch{throw new E("forbidden","target path cannot be resolved")}if("denied"===H(h,d,g,b))throw new E("forbidden","skill source is not writable (package/temporary or symlink escape)");!function(a,b){let c=(0,z.dirname)(a);for(;;){let a,d=b.some(a=>(0,z.resolve)(a)===(0,z.resolve)(c));try{a=(0,x.lstatSync)(c)}catch{if(d)throw new E("not-found","file not found");if(c===(0,z.dirname)(c))break;c=(0,z.dirname)(c);continue}if(a.isSymbolicLink())throw new E("forbidden","path component must not be a symbolic link");if(d||c===(0,z.dirname)(c))break;c=(0,z.dirname)(c)}}(h,I(g,b));try{e=(0,C.fu)(d)}catch(a){if("ENOENT"===a?.code)throw new E("not-found","file not found");throw new E("forbidden","target cannot be read safely")}try{f=(0,x.readFileSync)(e,"utf8")}finally{(0,x.closeSync)(e)}let k=function(a,b){let c,d=(c=a.indexOf("\n"))>0&&13===a.charCodeAt(c-1)?"\r\n":"\n",e=function(a){let b=a.indexOf("\n");if(-1===b||"---"!==a.slice(0,b).replace(/\r$/,""))return null;let c=b+1,d=c;for(;d<=a.length;){let b=a.indexOf("\n",d),e=-1===b?a.length:b;if("---"===a.slice(d,e).replace(/\r$/,""))return{start:c,end:d};if(-1===b)break;d=b+1}return null}(a);if(!e)return b?`---${d}${F}: true${d}---${d}${a}`:a;let f=a.slice(e.start,e.end),g=RegExp(`^${F}\\s*:`,"m").test(f);if(b&&!g)return a.slice(0,e.start)+`${F}: true${d}`+a.slice(e.start);if(!b&&g){let b=f.replace(RegExp(`^${F}\\s*:.*(?:\r?
2
- )`,"m"),"");if(b!==f)return a.slice(0,e.start)+b+a.slice(e.end)}return a}(f,i),l=(0,z.dirname)(d),m=(0,z.join)(l,`.pi-skill-${process.pid}-${(0,A.randomUUID)()}`);try{if((0,x.writeFileSync)(m,k,{flag:"wx",mode:4095&c.mode}),(0,x.lstatSync)(l).isSymbolicLink())throw new E("forbidden","target directory must not be a symbolic link");let a=(0,x.lstatSync)(d);if(a.isSymbolicLink())throw new E("forbidden","target must not be a symbolic link");if(!a.isFile())throw new E("bad-request","target is not a regular file");(0,x.renameSync)(m,d)}catch(a){try{(0,x.unlinkSync)(m)}catch{}if(a instanceof E)throw a;if(a?.code==="EACCES"||a?.code==="EPERM")throw new E("forbidden","file write denied");throw a}return{success:!0}}async function K(a,b=G){let c,{cwd:d,filePath:e}=a;if(!d||"string"!=typeof d)throw new E("bad-request","cwd required");if(!e||"string"!=typeof e)throw new E("bad-request","filePath required");if(!(0,z.isAbsolute)(e))throw new E("bad-request","filePath must be absolute");if(!D(d))throw new E("bad-request","cwd must be an existing directory");let{skills:f}=await b.loadSkills(d),g=f.find(a=>(0,z.resolve)(a.filePath)===(0,z.resolve)(e));if(!g)throw new E("not-found","skill not in loader list for cwd");let h=g.baseDir;if(!h||!(0,z.isAbsolute)(h))throw new E("bad-request","skill baseDir invalid");try{c=(0,x.realpathSync)(h)}catch{throw new E("not-found","skill directory not found")}if("denied"===H((0,z.join)(h,"SKILL.md"),(0,z.join)(c,"SKILL.md"),d,b))throw new E("forbidden","skill source is not removable");let i=I(d,b).map(a=>{try{return(0,x.realpathSync)(a)}catch{return(0,z.resolve)(a)}});if(!i.some(a=>c===a||c.startsWith(a+z.sep)))throw new E("forbidden","skill directory outside allowed roots");if(i.some(a=>c===a))throw new E("forbidden","cannot remove skill root");try{(0,x.rmSync)(c,{recursive:!0,force:!1})}catch(a){if(a?.code==="ENOENT")throw new E("not-found","skill directory not found");if(a?.code==="EACCES"||a?.code==="EPERM")throw new E("forbidden","directory remove denied");throw a}return{success:!0}}let L="force-dynamic";async function M(a){let{searchParams:b}=new URL(a.url),c=b.get("cwd");if(!c)return v.NextResponse.json({error:"cwd required"},{status:400});try{return v.NextResponse.json(await (0,w.y)(c))}catch(a){return v.NextResponse.json({error:String(a)},{status:500})}}async function N(a){try{let b=await a.json();return v.NextResponse.json(await J({cwd:b.cwd??"",filePath:b.filePath??"",disableModelInvocation:b.disableModelInvocation??!1}))}catch(a){if(a instanceof E){let b="forbidden"===a.code?403:"not-found"===a.code?404:400;return v.NextResponse.json({error:a.message},{status:b})}return v.NextResponse.json({error:String(a)},{status:500})}}async function O(a){try{let b=await a.json();return v.NextResponse.json(await K({cwd:b.cwd??"",filePath:b.filePath??""}))}catch(a){if(a instanceof E){let b="forbidden"===a.code?403:"not-found"===a.code?404:400;return v.NextResponse.json({error:a.message},{status:b})}return v.NextResponse.json({error:String(a)},{status:500})}}let P=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/skills/route",pathname:"/api/skills",filename:"route",bundlePath:"app/api/skills/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/tmp/pidance-release-build/app/api/skills/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:Q,workUnitAsyncStorage:R,serverHooks:S}=P;function T(){return(0,g.patchFetch)({workAsyncStorage:Q,workUnitAsyncStorage:R})}async function U(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),P.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/route";"/index"===d&&(d="/");let e=await P.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,y,!1):b.end("This page could not be found"),null);if(I&&!z){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||P.isDev||z||(K="/index"===(K=E)?"/":K);let L=!0===P.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),Q=O.getActiveScopeSpan(),R=!!(null==B?void 0:B.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await P.getIncrementalCache(a,x,A,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:L,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>P.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>P.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!I)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await P.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await P.handleResponse({req:a,nextConfig:x,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await P.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{"use strict";a.exports=require("os")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},34556:(a,b,c)=>{"use strict";c.d(b,{y:()=>p});var d=c(60396),e=c(89477),f=c(62228),g=c(86697);function h(a,b){let c=[];try{var d;let f=(0,e.readFileSync)(a,"utf8"),h=function(a){let b={},c=a.split(/\r?\n/);if(!c[0]||"---"!==c[0].replace(/\r$/,""))return b;for(let a=1;a<c.length;a++){let d=c[a].replace(/\r$/,"");if("---"===d)break;let e=/^([A-Za-z0-9_-]+):\s*(.*)$/.exec(d);e&&(b[e[1]]=e[2].trim())}return b}(f),i=(0,g.dirname)(a);return{skill:{name:h.name||function(a){if("skill.md"===(0,g.basename)(a).toLowerCase())return(0,g.basename)((0,g.dirname)(a));let b=(0,g.basename)(a);return b.endsWith(".md")?b.slice(0,-3):b}(a),description:h.description??"",filePath:a,baseDir:i,disableModelInvocation:(d=h["disable-model-invocation"],void 0!==d&&"true"===d.trim().toLowerCase()),sourceInfo:{source:"local",scope:b}},diagnostics:c}}catch(d){let b=d instanceof Error?d.message:"failed to parse skill file";return c.push({type:"warning",message:b,path:a}),{skill:null,diagnostics:c}}}function i(a,b,c,d=0){let f,j=c??new Set;if(d>16)return{skills:[],diagnostics:[]};try{let b=(0,e.realpathSync)(a);if(j.has(b))return{skills:[],diagnostics:[]};j.add(b)}catch{}let k=[],l=[];try{f=(0,e.readdirSync)(a,{withFileTypes:!0})}catch{return{skills:k,diagnostics:l}}let m=f.find(a=>"SKILL.md"===a.name);if(m){let c=(0,g.join)(a,"SKILL.md");if(function(a,b){if(a.isFile())return!0;if(a.isSymbolicLink())try{return(0,e.statSync)(b).isFile()}catch{}return!1}(m,c)){let a=h(c,b);a.skill&&k.push(a.skill),l.push(...a.diagnostics)}return{skills:k,diagnostics:l}}for(let c of f){if(c.name.startsWith(".")||"node_modules"===c.name)continue;let f=(0,g.join)(a,c.name),m=c.isDirectory(),n=c.isFile();if(c.isSymbolicLink())try{let a=(0,e.statSync)(f);m=a.isDirectory(),n=a.isFile()}catch{continue}if(m){let a=i(f,b,j,d+1);k.push(...a.skills),l.push(...a.diagnostics)}else if(n&&c.name.endsWith(".md")){let a=h(f,b);a.skill&&k.push(a.skill),l.push(...a.diagnostics)}}return{skills:k,diagnostics:l}}var j=c(29021),k=c(21820),l=c(33873);function m(a){try{let b=JSON.parse((0,j.readFileSync)(a,"utf8"));return b.skills&&"object"==typeof b.skills?b.skills:{}}catch{return{}}}function n(a,b){let c=(0,l.relative)((0,l.resolve)(b),(0,l.resolve)(a));return""!==c&&".."!==c&&!c.startsWith(`..${l.sep}`)&&!(0,l.isAbsolute)(c)}function o(a,b,c){var d;let e=function(a,b){if(a[b])return a[b];let c=b.toLowerCase(),d=Object.keys(a).find(a=>a.toLowerCase()===c);return d?a[d]:void 0}(a,b);if(!e||"string"!=typeof e.source||!e.source.trim())return;let f="string"==typeof e.sourceType?e.sourceType:void 0,g=(d=e.source.trim(),"github"!==f?d.replace(/\/$/,""):d.replace(/^git\+/,"").replace(/^https?:\/\/github\.com\//,"").replace(/^git@github\.com:/,"").replace(/\.git$/,"").replace(/\/$/,""));if(!g)return;let h="string"==typeof e.skillPath?e.skillPath:void 0,i="string"==typeof e.ref?e.ref:void 0,j="global"===c?e.skillFolderHash:e.computedHash,k="string"==typeof j&&j?j:void 0,l="github"===f&&/^[\w.-]+\/[\w.-]+$/.test(g);return{package:`${g}@${b}`,scope:c,source:g,sourceType:f,skillsShUrl:"local"===f?void 0:function(a,b){if(!a||a.includes("://")||a.startsWith("git@"))return;let c=a.split("/").filter(Boolean).map(encodeURIComponent).join("/");if(c)return`https://skills.sh/${c}/${encodeURIComponent(b)}`}(g,b),...h&&{skillPath:h},...i&&{ref:i},...k&&{versionHash:k},canCheckForUpdates:!!(l&&h&&k&&("global"===c||!i))}}async function p(a){let b=(0,d.$M)(),{skills:c,diagnostics:p}=function(a){let{cwd:b,agentDir:c}=a,d=a.homeDir??(0,f.homedir)(),j=[(0,g.join)(c,"skills"),(0,g.join)(d,".agents","skills")],k=[(0,g.join)(b,".pi","skills"),(0,g.join)(b,".agents","skills"),...function(a,b){let c=[],d=(0,g.resolve)((0,g.join)(b,".agents","skills")),f=(0,g.resolve)(a),h=function(a){let b=(0,g.resolve)(a);for(;;){if((0,e.existsSync)((0,g.join)(b,".git")))return b;let a=(0,g.dirname)(b);if(a===b)return null;b=a}}(f);for(;;){let a=(0,g.join)(f,".agents","skills");if((0,g.resolve)(a)!==d&&c.push(a),h&&f===h)break;let b=(0,g.dirname)(f);if(b===f)break;f=b}return c}(b,d)],l=new Map,m=new Set,n=[],o=a=>{for(let b of(n.push(...a.diagnostics),a.skills)){let a;try{a=(0,e.realpathSync)(b.filePath)}catch{a=(0,g.resolve)(b.filePath)}if(!m.has(a)){if(l.get(b.name)){n.push({type:"collision",message:`name "${b.name}" collision`,path:b.filePath});continue}l.set(b.name,b),m.add(a)}}};for(let a of[...j,...k]){let b=j.some(b=>(0,g.resolve)(b)===(0,g.resolve)(a))?"user":"project";o(i(a,b))}for(let a of function(a){try{let b=JSON.parse((0,e.readFileSync)(a,"utf8")).skills;if(Array.isArray(b))return b.filter(a=>"string"==typeof a);if(b&&"object"==typeof b&&!Array.isArray(b)){let a=b.customDirectories;if(Array.isArray(a))return a.filter(a=>"string"==typeof a)}}catch{}return[]}((0,g.join)(c,"settings.json"))){let c=(0,g.resolve)(b,a);if(!(0,e.existsSync)(c)){n.push({type:"warning",message:"skill path does not exist",path:c});continue}try{let a=(0,e.statSync)(c),b=j.some(a=>(function(a,b){let c=(0,g.resolve)(b);if(a===c)return!0;let d=c.endsWith(g.sep)?c:`${c}${g.sep}`;return a.startsWith(d)})(c,a))?"user":"project";if(a.isDirectory())o(i(c,b));else if(a.isFile()&&c.endsWith(".md")){let a=h(c,b);o({skills:a.skill?[a.skill]:[],diagnostics:a.diagnostics})}else n.push({type:"warning",message:"skill path is not a markdown file",path:c})}catch(b){let a=b instanceof Error?b.message:"failed to read skill path";n.push({type:"warning",message:a,path:c})}}return{skills:Array.from(l.values()),diagnostics:n}}({cwd:a,agentDir:b});return{skills:function(a,{cwd:b,agentDir:c,globalLockPath:d=function({homeDir:a=(0,k.homedir)(),xdgStateHome:b=process.env.XDG_STATE_HOME}={}){return b?(0,l.join)(b,"skills",".skill-lock.json"):(0,l.join)(a,".agents",".skill-lock.json")}(),projectLockPath:e=(0,l.join)(b,"skills-lock.json")}){let f=m(d),g=m(e),h=(0,l.join)(c,"skills"),i=(0,l.join)(b,".pi","skills");return a.map(a=>{if(!(0,j.existsSync)(a.filePath))return a;let b=n(a.filePath,h)?o(f,a.name,"global"):n(a.filePath,i)?o(g,a.name,"project"):void 0;return b?{...a,install:b}:a})}(c,{cwd:a,agentDir:b}),diagnostics:p}}},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},60396:(a,b,c)=>{"use strict";c.d(b,{$M:()=>f,CZ:()=>h,Mc:()=>g,pA:()=>i});var d=c(62228),e=c(86697);function f(a=process.env){let b=a.PI_CODING_AGENT_DIR?.trim();if(b)return"~"===b?(0,d.homedir)():b.startsWith("~/")||b.startsWith("~\\")?(0,e.join)((0,d.homedir)(),b.slice(2)):b;return(0,e.join)((0,d.homedir)(),".pi","agent")}function g(a=process.env){return(0,e.join)(f(a),"models.json")}function h(a=process.env){return(0,e.join)(f(a),"auth.json")}function i(a=process.env){return(0,e.join)(f(a),"settings.json")}},60601:(a,b,c)=>{"use strict";c.d(b,{fu:()=>m,hI:()=>l,iM:()=>j});var d=c(89477),e=c.n(d),f=c(86697),g=c.n(f),h=c(400);function i(a){let b=a?.code;return"ENOENT"===b||"ENOTDIR"===b}function j(a,b){let c,d;try{c=e().realpathSync(a)}catch(a){if(i(a))return{kind:"not-found"};return{kind:"denied"}}try{d=e().statSync(c)}catch(a){if(i(a))return{kind:"not-found"};return{kind:"denied"}}let f=!1;for(let a of b){let b;try{b=e().realpathSync(a)}catch{continue}if(f=!0,c===b||(0,h.j0)(c,b))return{kind:"ok",realPath:c,stat:d}}return f?{kind:"outside-roots",realPath:c,stat:d}:{kind:"denied"}}function k(a){return"win32"===process.platform?a.toLowerCase():a}function l(a,b){try{return k(g().resolve(a))===k(b)}catch{return!1}}function m(a){let b="number"==typeof e().constants.O_NOFOLLOW?e().constants.O_NOFOLLOW:0,c=e().openSync(a,e().constants.O_RDONLY|b);try{if(!e().fstatSync(c).isFile())throw Error("Read path is not a regular file");return c}catch(a){try{e().closeSync(c)}catch{}throw a}}},62228:a=>{"use strict";a.exports=require("node:os")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},86697:a=>{"use strict";a.exports=require("node:path")},89477:a=>{"use strict";a.exports=require("node:fs")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=9209));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=9968,a.ids=[9968],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},400:(a,b,c)=>{c.d(b,{OJ:()=>n,Sk:()=>j,j0:()=>l});var d=c(89477),e=c.n(d),f=c(86697),g=c.n(f),h=c(716);let i="true"===process.env.SAVE_FSYNC;class j extends Error{constructor(a,b){super(b),this.code=a}}function k(a){return/^[a-zA-Z]:[\\/]/.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function l(a,b,c=k(a)||k(b)){let d=c?g().win32:g(),e=d.resolve(a),f=d.resolve(b),h=c?e.toLowerCase():e,i=c?f.toLowerCase():f;return h!==i&&h.startsWith(i.endsWith(d.sep)?i:i+d.sep)}function m(a,b){let c=a?.code;if("ENOENT"===c)throw new j("not-found",b);if("EACCES"===c||"EPERM"===c)throw new j("forbidden","文件访问被拒绝");throw a}function n(a){let b,c,d,{target:f,cwd:k,allowedRoots:n,content:o,baseline:p}=a,q=function(a,b){if(!Number.isFinite(b?.mtimeMs)||b.mtimeMs<0||!Number.isFinite(b?.size)||b.size<0)throw new j("bad-request","保存请求格式无效");for(let b=0;b<a.length;b+=1){let c=a.charCodeAt(b);if(c>=55296&&c<=57343){if(c<=56319&&b+1<a.length&&a.charCodeAt(b+1)>=56320&&57343>=a.charCodeAt(b+1)){b+=1;continue}throw new j("bad-request","内容包含不可逆 UTF-8 字符")}}return Buffer.from(a,"utf8")}(o,p),r=a.isAllowed??((a,b)=>[...b].some(b=>a===b||a.startsWith(`${b}/`)||a.startsWith(`${b}\\`)));if(!r(f,n))throw new j("forbidden","目标不在授权目录内");try{b=e().lstatSync(f)}catch(a){return m(a,"目标文件不存在")}if(b.isSymbolicLink())throw new j("forbidden","目标不能是符号链接");if(!b.isFile())throw new j("bad-request","目标不是常规文件");try{if(e().realpathSync(k),c=e().realpathSync(f),d=new Set([...n].map(a=>e().realpathSync(a))),!r(c,d))throw new j("forbidden","目标不在授权目录内");for(let a=g().dirname(f);l(a,k);a=g().dirname(a))if(e().lstatSync(a).isSymbolicLink())throw new j("forbidden","目标父目录不能是符号链接")}catch(a){if(a instanceof j)throw a;return m(a,"目标路径不存在")}try{e().statSync(c)}catch(a){return m(a,"目标文件不存在")}let s=g().dirname(c),t=g().join(s,`.pi-save-${process.pid}-${(0,h.randomUUID)()}`);try{if(e().writeFileSync(t,q,{flag:"wx",mode:4095&b.mode}),e().chmodSync(t,4095&b.mode),i){let a=e().openSync(t,"r+");try{e().fsyncSync(a)}finally{e().closeSync(a)}}e().renameSync(t,c)}catch(a){try{e().unlinkSync(t)}catch{}return m(a,"保存目标不存在")}let u=e().statSync(c);return{path:f,size:u.size,mtimeMs:u.mtimeMs}}},716:a=>{a.exports=require("node:crypto")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4984:a=>{a.exports=require("readline")},10210:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{$v:()=>p,fN:()=>r,uX:()=>q});var e=c(89477),f=c(62228),g=c(86697),h=c(716),i=c(60396),j=c(34556),k=c(60601),l=a([k]);function m(a){if(!a||"string"!=typeof a)return!1;try{return(0,e.statSync)(a).isDirectory()}catch{return!1}}k=(l.then?(await l)():l)[0];class r extends Error{constructor(a,b){super(b),this.code=a}}let s="disable-model-invocation",t={loadSkills:a=>(0,j.y)(a),agentDir:(0,i.$M)(),homeDir:(0,f.homedir)()};function n(a,b,c,d){let f=a=>a.some(a=>{var c;let d,f;try{d=(0,e.realpathSync)(a)}catch{return!1}return c=d,f=(0,g.relative)((0,g.resolve)(c),(0,g.resolve)(b)),""!==f&&".."!==f&&!f.startsWith(`..${g.sep}`)&&!(0,g.isAbsolute)(f)}),h=[(0,g.join)(d.agentDir,"skills"),(0,g.join)(d.homeDir,".agents","skills")];if(f(h))return"global";let i=[(0,g.join)(c,".pi","skills"),(0,g.join)(c,".agents","skills")];return f(i)?"project":"denied"}function o(a,b){return[(0,g.join)(b.agentDir,"skills"),(0,g.join)(b.homeDir,".agents","skills"),(0,g.join)(a,".pi","skills"),(0,g.join)(a,".agents","skills")]}async function p(a,b=t){let c,d,f,i,{cwd:j,filePath:l,disableModelInvocation:q}=a;if(!j||"string"!=typeof j)throw new r("bad-request","cwd required");if(!l||"string"!=typeof l)throw new r("bad-request","filePath required");if("boolean"!=typeof q)throw new r("bad-request","disableModelInvocation must be boolean");if(!(0,g.isAbsolute)(l))throw new r("bad-request","filePath must be absolute");if(!m(j))throw new r("bad-request","cwd must be an existing directory");let{skills:u}=await b.loadSkills(j);if(!u.find(a=>(0,g.resolve)(a.filePath)===(0,g.resolve)(l)))throw new r("not-found","skill not in loader list for cwd");try{c=(0,e.lstatSync)(l)}catch{throw new r("not-found","file not found")}if(c.isSymbolicLink())throw new r("forbidden","target must not be a symbolic link");if(!c.isFile())throw new r("bad-request","target is not a regular file");try{d=(0,e.realpathSync)(l)}catch{throw new r("forbidden","target path cannot be resolved")}let v=n(l,d,j,b);if("denied"===v)throw new r("forbidden","skill source is not writable (package/temporary or symlink escape)");!function(a,b){let c=(0,g.dirname)(a);for(;;){let a,d=b.some(a=>(0,g.resolve)(a)===(0,g.resolve)(c));try{a=(0,e.lstatSync)(c)}catch{if(d)throw new r("not-found","file not found");if(c===(0,g.dirname)(c))break;c=(0,g.dirname)(c);continue}if(a.isSymbolicLink())throw new r("forbidden","path component must not be a symbolic link");if(d||c===(0,g.dirname)(c))break;c=(0,g.dirname)(c)}}(l,o(j,b));try{f=(0,k.fu)(d)}catch(b){let a=b?.code;if("ENOENT"===a)throw new r("not-found","file not found");throw new r("forbidden","target cannot be read safely")}try{i=(0,e.readFileSync)(f,"utf8")}finally{(0,e.closeSync)(f)}let w=function(a,b){let c,d=(c=a.indexOf("\n"))>0&&13===a.charCodeAt(c-1)?"\r\n":"\n",e=function(a){let b=a.indexOf("\n");if(-1===b||"---"!==a.slice(0,b).replace(/\r$/,""))return null;let c=b+1,d=c;for(;d<=a.length;){let b=a.indexOf("\n",d),e=-1===b?a.length:b;if("---"===a.slice(d,e).replace(/\r$/,""))return{start:c,end:d};if(-1===b)break;d=b+1}return null}(a);if(!e)return b?`---${d}${s}: true${d}---${d}${a}`:a;let f=a.slice(e.start,e.end),g=RegExp(`^${s}\\s*:`,"m").test(f);if(b&&!g)return a.slice(0,e.start)+`${s}: true${d}`+a.slice(e.start);if(!b&&g){let b=f.replace(RegExp(`^${s}\\s*:.*(?:\r?
2
+ )`,"m"),"");if(b!==f)return a.slice(0,e.start)+b+a.slice(e.end)}return a}(i,q),x=(0,g.dirname)(d),y=(0,g.join)(x,`.pi-skill-${process.pid}-${(0,h.randomUUID)()}`);try{if((0,e.writeFileSync)(y,w,{flag:"wx",mode:4095&c.mode}),(0,e.lstatSync)(x).isSymbolicLink())throw new r("forbidden","target directory must not be a symbolic link");let a=(0,e.lstatSync)(d);if(a.isSymbolicLink())throw new r("forbidden","target must not be a symbolic link");if(!a.isFile())throw new r("bad-request","target is not a regular file");(0,e.renameSync)(y,d)}catch(a){try{(0,e.unlinkSync)(y)}catch{}if(a instanceof r)throw a;if(a?.code==="EACCES"||a?.code==="EPERM")throw new r("forbidden","file write denied");throw a}return{success:!0}}async function q(a,b=t){let c,{cwd:d,filePath:f}=a;if(!d||"string"!=typeof d)throw new r("bad-request","cwd required");if(!f||"string"!=typeof f)throw new r("bad-request","filePath required");if(!(0,g.isAbsolute)(f))throw new r("bad-request","filePath must be absolute");if(!m(d))throw new r("bad-request","cwd must be an existing directory");let{skills:h}=await b.loadSkills(d),i=h.find(a=>(0,g.resolve)(a.filePath)===(0,g.resolve)(f));if(!i)throw new r("not-found","skill not in loader list for cwd");let j=i.baseDir;if(!j||!(0,g.isAbsolute)(j))throw new r("bad-request","skill baseDir invalid");try{c=(0,e.realpathSync)(j)}catch{throw new r("not-found","skill directory not found")}let k=n((0,g.join)(j,"SKILL.md"),(0,g.join)(c,"SKILL.md"),d,b);if("denied"===k)throw new r("forbidden","skill source is not removable");let l=o(d,b).map(a=>{try{return(0,e.realpathSync)(a)}catch{return(0,g.resolve)(a)}});if(!l.some(a=>c===a||c.startsWith(a+g.sep)))throw new r("forbidden","skill directory outside allowed roots");if(l.some(a=>c===a))throw new r("forbidden","cannot remove skill root");try{(0,e.rmSync)(c,{recursive:!0,force:!1})}catch(a){if(a?.code==="ENOENT")throw new r("not-found","skill directory not found");if(a?.code==="EACCES"||a?.code==="EPERM")throw new r("forbidden","directory remove denied");throw a}return{success:!0}}d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},16788:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(45403),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/skills/route",pathname:"/api/skills",filename:"route",bundlePath:"app/api/skills/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/tmp/pidance-release-build/app/api/skills/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},34556:(a,b,c)=>{c.d(b,{y:()=>p});var d=c(60396),e=c(89477),f=c(62228),g=c(86697);function h(a,b){let c=[];try{var d;let f=(0,e.readFileSync)(a,"utf8"),h=function(a){let b={},c=a.split(/\r?\n/);if(!c[0]||"---"!==c[0].replace(/\r$/,""))return b;for(let a=1;a<c.length;a++){let d=c[a].replace(/\r$/,"");if("---"===d)break;let e=/^([A-Za-z0-9_-]+):\s*(.*)$/.exec(d);e&&(b[e[1]]=e[2].trim())}return b}(f),i=(0,g.dirname)(a);return{skill:{name:h.name||function(a){if("skill.md"===(0,g.basename)(a).toLowerCase())return(0,g.basename)((0,g.dirname)(a));let b=(0,g.basename)(a);return b.endsWith(".md")?b.slice(0,-3):b}(a),description:h.description??"",filePath:a,baseDir:i,disableModelInvocation:(d=h["disable-model-invocation"],void 0!==d&&"true"===d.trim().toLowerCase()),sourceInfo:{source:"local",scope:b}},diagnostics:c}}catch(d){let b=d instanceof Error?d.message:"failed to parse skill file";return c.push({type:"warning",message:b,path:a}),{skill:null,diagnostics:c}}}function i(a,b,c,d=0){let f,j=c??new Set;if(d>16)return{skills:[],diagnostics:[]};try{let b=(0,e.realpathSync)(a);if(j.has(b))return{skills:[],diagnostics:[]};j.add(b)}catch{}let k=[],l=[];try{f=(0,e.readdirSync)(a,{withFileTypes:!0})}catch{return{skills:k,diagnostics:l}}let m=f.find(a=>"SKILL.md"===a.name);if(m){let c=(0,g.join)(a,"SKILL.md");if(function(a,b){if(a.isFile())return!0;if(a.isSymbolicLink())try{return(0,e.statSync)(b).isFile()}catch{}return!1}(m,c)){let a=h(c,b);a.skill&&k.push(a.skill),l.push(...a.diagnostics)}return{skills:k,diagnostics:l}}for(let c of f){if(c.name.startsWith(".")||"node_modules"===c.name)continue;let f=(0,g.join)(a,c.name),m=c.isDirectory(),n=c.isFile();if(c.isSymbolicLink())try{let a=(0,e.statSync)(f);m=a.isDirectory(),n=a.isFile()}catch{continue}if(m){let a=i(f,b,j,d+1);k.push(...a.skills),l.push(...a.diagnostics)}else if(n&&c.name.endsWith(".md")){let a=h(f,b);a.skill&&k.push(a.skill),l.push(...a.diagnostics)}}return{skills:k,diagnostics:l}}var j=c(29021),k=c(21820),l=c(33873);function m(a){try{let b=JSON.parse((0,j.readFileSync)(a,"utf8"));return b.skills&&"object"==typeof b.skills?b.skills:{}}catch{return{}}}function n(a,b){let c=(0,l.relative)((0,l.resolve)(b),(0,l.resolve)(a));return""!==c&&".."!==c&&!c.startsWith(`..${l.sep}`)&&!(0,l.isAbsolute)(c)}function o(a,b,c){var d;let e=function(a,b){if(a[b])return a[b];let c=b.toLowerCase(),d=Object.keys(a).find(a=>a.toLowerCase()===c);return d?a[d]:void 0}(a,b);if(!e||"string"!=typeof e.source||!e.source.trim())return;let f="string"==typeof e.sourceType?e.sourceType:void 0,g=(d=e.source.trim(),"github"!==f?d.replace(/\/$/,""):d.replace(/^git\+/,"").replace(/^https?:\/\/github\.com\//,"").replace(/^git@github\.com:/,"").replace(/\.git$/,"").replace(/\/$/,""));if(!g)return;let h="string"==typeof e.skillPath?e.skillPath:void 0,i="string"==typeof e.ref?e.ref:void 0,j="global"===c?e.skillFolderHash:e.computedHash,k="string"==typeof j&&j?j:void 0,l="github"===f&&/^[\w.-]+\/[\w.-]+$/.test(g);return{package:`${g}@${b}`,scope:c,source:g,sourceType:f,skillsShUrl:"local"===f?void 0:function(a,b){if(!a||a.includes("://")||a.startsWith("git@"))return;let c=a.split("/").filter(Boolean).map(encodeURIComponent).join("/");if(c)return`https://skills.sh/${c}/${encodeURIComponent(b)}`}(g,b),...h&&{skillPath:h},...i&&{ref:i},...k&&{versionHash:k},canCheckForUpdates:!!(l&&h&&k&&("global"===c||!i))}}async function p(a){let b=(0,d.$M)(),{skills:c,diagnostics:p}=function(a){let{cwd:b,agentDir:c}=a,d=a.homeDir??(0,f.homedir)(),j=[(0,g.join)(c,"skills"),(0,g.join)(d,".agents","skills")],k=[(0,g.join)(b,".pi","skills"),(0,g.join)(b,".agents","skills"),...function(a,b){let c=[],d=(0,g.resolve)((0,g.join)(b,".agents","skills")),f=(0,g.resolve)(a),h=function(a){let b=(0,g.resolve)(a);for(;;){if((0,e.existsSync)((0,g.join)(b,".git")))return b;let a=(0,g.dirname)(b);if(a===b)return null;b=a}}(f);for(;;){let a=(0,g.join)(f,".agents","skills");if((0,g.resolve)(a)!==d&&c.push(a),h&&f===h)break;let b=(0,g.dirname)(f);if(b===f)break;f=b}return c}(b,d)],l=new Map,m=new Set,n=[],o=a=>{for(let b of(n.push(...a.diagnostics),a.skills)){let a;try{a=(0,e.realpathSync)(b.filePath)}catch{a=(0,g.resolve)(b.filePath)}if(!m.has(a)){if(l.get(b.name)){n.push({type:"collision",message:`name "${b.name}" collision`,path:b.filePath});continue}l.set(b.name,b),m.add(a)}}};for(let a of[...j,...k]){let b=j.some(b=>(0,g.resolve)(b)===(0,g.resolve)(a))?"user":"project";o(i(a,b))}for(let a of function(a){try{let b=JSON.parse((0,e.readFileSync)(a,"utf8")).skills;if(Array.isArray(b))return b.filter(a=>"string"==typeof a);if(b&&"object"==typeof b&&!Array.isArray(b)){let a=b.customDirectories;if(Array.isArray(a))return a.filter(a=>"string"==typeof a)}}catch{}return[]}((0,g.join)(c,"settings.json"))){let c=(0,g.resolve)(b,a);if(!(0,e.existsSync)(c)){n.push({type:"warning",message:"skill path does not exist",path:c});continue}try{let a=(0,e.statSync)(c),b=j.some(a=>(function(a,b){let c=(0,g.resolve)(b);if(a===c)return!0;let d=c.endsWith(g.sep)?c:`${c}${g.sep}`;return a.startsWith(d)})(c,a))?"user":"project";if(a.isDirectory())o(i(c,b));else if(a.isFile()&&c.endsWith(".md")){let a=h(c,b);o({skills:a.skill?[a.skill]:[],diagnostics:a.diagnostics})}else n.push({type:"warning",message:"skill path is not a markdown file",path:c})}catch(b){let a=b instanceof Error?b.message:"failed to read skill path";n.push({type:"warning",message:a,path:c})}}return{skills:Array.from(l.values()),diagnostics:n}}({cwd:a,agentDir:b});return{skills:function(a,{cwd:b,agentDir:c,globalLockPath:d=function({homeDir:a=(0,k.homedir)(),xdgStateHome:b=process.env.XDG_STATE_HOME}={}){return b?(0,l.join)(b,"skills",".skill-lock.json"):(0,l.join)(a,".agents",".skill-lock.json")}(),projectLockPath:e=(0,l.join)(b,"skills-lock.json")}){let f=m(d),g=m(e),h=(0,l.join)(c,"skills"),i=(0,l.join)(b,".pi","skills");return a.map(a=>{if(!(0,j.existsSync)(a.filePath))return a;let b=n(a.filePath,h)?o(f,a.name,"global"):n(a.filePath,i)?o(g,a.name,"project"):void 0;return b?{...a,install:b}:a})}(c,{cwd:a,agentDir:b}),diagnostics:p}}},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},45403:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>k,GET:()=>i,PATCH:()=>j,dynamic:()=>l});var e=c(23211),f=c(34556),g=c(10210),h=a([g]);g=(h.then?(await h)():h)[0];let l="force-dynamic";async function i(a){let{searchParams:b}=new URL(a.url),c=b.get("cwd");if(!c)return e.NextResponse.json({error:"cwd required"},{status:400});try{return e.NextResponse.json(await (0,f.y)(c))}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function j(a){try{let b=await a.json();return e.NextResponse.json(await (0,g.$v)({cwd:b.cwd??"",filePath:b.filePath??"",disableModelInvocation:b.disableModelInvocation??!1}))}catch(a){if(a instanceof g.fN){let b="forbidden"===a.code?403:"not-found"===a.code?404:400;return e.NextResponse.json({error:a.message},{status:b})}return e.NextResponse.json({error:String(a)},{status:500})}}async function k(a){try{let b=await a.json();return e.NextResponse.json(await (0,g.uX)({cwd:b.cwd??"",filePath:b.filePath??""}))}catch(a){if(a instanceof g.fN){let b="forbidden"===a.code?403:"not-found"===a.code?404:400;return e.NextResponse.json({error:a.message},{status:b})}return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},55511:a=>{a.exports=require("crypto")},60601:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{fu:()=>p,hI:()=>o,iM:()=>m});var e=c(89477),f=c.n(e),g=c(86697),h=c.n(g),i=c(400),j=c(80547),k=a([j]);function l(a){let b=a?.code;return"ENOENT"===b||"ENOTDIR"===b}function m(a,b){let c,d;try{c=f().realpathSync(a)}catch(a){if(l(a))return{kind:"not-found"};return{kind:"denied"}}try{d=f().statSync(c)}catch(a){if(l(a))return{kind:"not-found"};return{kind:"denied"}}if((0,j.bk)())return{kind:"ok",realPath:c,stat:d};let e=!1;for(let a of b){let b;try{b=f().realpathSync(a)}catch{continue}if(e=!0,c===b||(0,i.j0)(c,b))return{kind:"ok",realPath:c,stat:d}}return e?{kind:"outside-roots",realPath:c,stat:d}:{kind:"denied"}}function n(a){return"win32"===process.platform?a.toLowerCase():a}function o(a,b){try{return n(h().resolve(a))===n(b)}catch{return!1}}function p(a){let b="number"==typeof f().constants.O_NOFOLLOW?f().constants.O_NOFOLLOW:0,c=f().openSync(a,f().constants.O_RDONLY|b);try{if(!f().fstatSync(c).isFile())throw Error("Read path is not a regular file");return c}catch(a){try{f().closeSync(c)}catch{}throw a}}j=(k.then?(await k)():k)[0],d()}catch(a){d(a)}})},62228:a=>{a.exports=require("node:os")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69835:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Lj:()=>p,Md:()=>o,eq:()=>l,ki:()=>n,qo:()=>k,uF:()=>m});var e=c(29021),f=c(33873),g=c(55511),h=c(60396),i=c(80547),j=a([i]);i=(j.then?(await j)():j)[0];let o=0x1900000,p=0x6400000;function k(a=(0,h.$M)()){return(0,i.Nw)((0,f.join)(a,"pidance-attachments"))}function l(a=(0,h.$M)()){let b=k(a);return(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0,mode:448}),(0,i.wz)(b),b}function m(a){let b=(a.replace(/\\/g,"/").split("/").pop()??"file").replace(/\0/g,"").replace(/^\.+/,"").trim()||"file";if(b.length<=180)return b;let c=b.lastIndexOf(".");if(c>0&&b.length-c<=20){let a=b.slice(c);return b.slice(0,180-a.length)+a}return b.slice(0,180)}function n(a,b,c=(0,h.$M)()){let d=l(c),j=function(a,b=Date.now()){let c=m(a),d=new Date(b).toISOString().replace(/[:.]/g,"-"),e=(0,g.randomUUID)().slice(0,8);return`${d}_${e}_${c}`}(a),k=(0,f.join)(d,j);return(0,e.writeFileSync)(k,b,{flag:"wx",mode:384}),{path:(0,i.Nw)(k),name:m(a),storedName:j,size:b.length}}d()}catch(a){d(a)}})},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>r,Nw:()=>j.Nw,bk:()=>q,mc:()=>p,uK:()=>o,wz:()=>k.wz});var e=c(29021),f=c(21820),g=c(33873),h=c.n(g),i=c(60396),j=c(50593),k=c(25252),l=c(69835),m=c(40402),n=a([l,m]);[l,m]=n.then?(await n)():n;let s=/^[a-zA-Z]:[\\/]/;function o(a){return s.test(a)||a.startsWith("\\\\")||a.startsWith("//")}async function p(){let a=Date.now(),b=globalThis.__piAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,m.dQ)(),d=function(a){let b=new Set;for(let c of a)!0!==c.readOnly&&c.cwd&&b.add((0,j.Nw)(c.cwd)),!0!==c.readOnly&&c.projectRoot&&b.add((0,j.Nw)(c.projectRoot));return b}(c);try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^pi-cwd-\d{8}$/.test(a)&&d.add((0,j.Nw)(h().join((0,f.homedir)(),a)))}catch{}for(let a of(0,k.HM)())d.add(a);try{d.add((0,l.qo)((0,i.$M)()))}catch{}return globalThis.__piAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function q(){return!0}function r(a,b){return!0}d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},86697:a=>{a.exports=require("node:path")},89477:a=>{a.exports=require("node:fs")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582],()=>b(b.s=16788));module.exports=c})();
@@ -1,4 +1,4 @@
1
1
  (()=>{var a={};a.id=7032,a.ids=[7032],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},6950:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>E,patchFetch:()=>D,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var d={};c.r(d),c.d(d,{POST:()=>y,dynamic:()=>w,maxDuration:()=>x});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(31974);let w="force-dynamic",x=600;async function y(a){let b,c=!1;try{let d=await a.json();"string"==typeof d.version&&d.version.trim()&&(b=d.version.trim()),c=!0===d.stream||1===d.stream||"1"===d.stream}catch{}if((a.headers.get("accept")??"").includes("text/event-stream")&&(c=!0),"1"===new URL(a.url).searchParams.get("stream")&&(c=!0),!c)try{let a=await (0,v.i7)({targetVersion:b}),c="not_supported"===a.status?403:"error"===a.status?500:200;return Response.json(a,{status:c,headers:{"Cache-Control":"no-store"}})}catch(b){let a=b instanceof Error?b.message:String(b);return Response.json({ok:!1,status:"error",currentVersion:"?",targetVersion:null,message:a},{status:500})}let d=new TextEncoder;return new Response(new ReadableStream({start(a){let c=b=>{try{a.enqueue(d.encode(`data: ${JSON.stringify(b)}
2
2
 
3
- `))}catch{}};(async()=>{try{let a=await (0,v.i7)({targetVersion:b,onProgress:a=>{c({type:"progress",...a})}});c({type:"result",result:a})}catch(d){let a=d instanceof Error?d.message:String(d);c({type:"result",result:{ok:!1,status:"error",currentVersion:"?",targetVersion:b??null,message:a}})}finally{try{a.close()}catch{}}})()}}),{headers:{"Content-Type":"text/event-stream; charset=utf-8","Cache-Control":"no-store, no-cache",Connection:"keep-alive"}})}let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/update/apply/route",pathname:"/api/update/apply",filename:"route",bundlePath:"app/api/update/apply/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/tmp/pidance-release-build/app/api/update/apply/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function D(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function E(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/update/apply/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31974:(a,b,c)=>{"use strict";c.d(b,{ex:()=>u,i7:()=>v});var d=c(95398),e=c(89477),f=c(86697);let g=(0,c(37418).promisify)(d.execFile),h="@henlii/pidance",i="https://registry.npmjs.org/",j="pidance.service";function k(a,b){return 0===b||"active"===a.trim()}function l(a){if(a.restartOk||a.laterActive)return{restarted:!0};let b=a.restartError?.trim();return{restarted:!1,message:b?`重启 ${j} 失败:${b}`:`重启 ${j} 失败`}}async function m(a,b){try{let c=await a("systemctl",["is-active",j],{timeout:1e4,env:b});return k(String(c.stdout??""),0)}catch(a){return k(function(a){if(a&&"object"==typeof a&&"stdout"in a){let b=a.stdout;if("string"==typeof b)return b;if(Buffer.isBuffer(b))return b.toString("utf8")}return""}(a),function(a){if(a&&"object"==typeof a&&"code"in a){let b=a.code;if("number"==typeof b&&Number.isFinite(b))return b}return null}(a))}}async function n(a){let b=a.execFileImpl??g,c=a.env??process.env,d=a.sleepImpl??(a=>new Promise(b=>{setTimeout(b,a)})),e=a.now??Date.now;try{return await b("systemctl",["restart",j],{timeout:21e4,env:c}),l({restartOk:!0,laterActive:!1})}catch(g){let a=g instanceof Error?g.message:String(g),f=e();if(await m(b,c))return l({restartOk:!1,restartError:a,laterActive:!0});for(;e()-f<6e4;)if(await d(1500),await m(b,c))return l({restartOk:!1,restartError:a,laterActive:!0});return l({restartOk:!1,restartError:a,laterActive:!1})}}function o(a=process.env){let b=(a.PIDANCE_NPM_REGISTRY||a.npm_config_registry||i).trim();return b?b.endsWith("/")?b:`${b}/`:i}function p(a,b){let c=q(a),d=q(b);if(!c||!d)return 0;for(let a=0;a<3;a++){if(c.core[a]>d.core[a])return 1;if(c.core[a]<d.core[a])return -1}return null===c.pre&&null===d.pre?0:null===c.pre?1:null===d.pre||c.pre<d.pre?-1:+(c.pre>d.pre)}function q(a){let b=a.trim().replace(/^v/i,""),c=/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/.exec(b);return c?{core:[Number(c[1]),Number(c[2]),Number(c[3])],pre:c[4]??null}:null}function r(a,b){let c=(0,f.join)(a,"releases");if(!(0,e.existsSync)(c))return[];let d=new Set(b.map(a=>a.trim()).filter(Boolean));try{let b=(0,e.realpathSync)((0,f.join)(a,"current")),c=/\/releases\/([^/]+)$/.exec(b.replace(/\\/g,"/"));c&&d.add(c[1])}catch{}let g=c;try{g=(0,e.realpathSync)(c)}catch{return[]}let h=[];for(let a of(0,e.readdirSync)(c,{withFileTypes:!0})){let b;if(!a.isDirectory()||a.isSymbolicLink()||"."===a.name||".."===a.name||a.name.includes("/")||a.name.includes("\\")||d.has(a.name))continue;let i=(0,f.join)(c,a.name);try{b=(0,e.realpathSync)(i)}catch{continue}let j=g.endsWith("/")?g:`${g}/`;(b===g||b.startsWith(j))&&((0,e.rmSync)(i,{recursive:!0,force:!0}),h.push(a.name))}return h}async function s(a=o(),b=globalThis.fetch.bind(globalThis)){let c=new URL("@henlii%2Fpidance/latest",a.endsWith("/")?a:`${a}/`).toString();try{let a=await b(c,{headers:{Accept:"application/json"},signal:AbortSignal.timeout(12e3)});if(!a.ok)return null;let d=await a.json();return"string"==typeof d.version&&d.version.trim()?d.version.trim():null}catch{return null}}async function t(a=o(),b=Date.now(),c=globalThis.fetch.bind(globalThis),d=!1){let e=globalThis.__piPidanceLatestCache;if(!d&&e&&b-e.ts<18e5&&e.latest)return e.latest;let f=await s(a,c);return f&&(globalThis.__piPidanceLatestCache={latest:f,ts:b}),f}async function u(a){let b,c=a?.cwd??process.cwd(),d=a?.env??process.env,g=o(d),i=function(a=process.cwd()){for(let b of[(0,f.join)(a,"package.json"),(0,f.join)(a,"node_modules","@henlii","pidance","package.json")])try{if(!(0,e.existsSync)(b))continue;let a=JSON.parse((0,e.readFileSync)(b,"utf8"));if(a.name===h&&"string"==typeof a.version&&a.version.trim())return a.version.trim();let c=a.dependencies?.[h];if("string"==typeof c&&c.trim()&&!c.startsWith("file:"))return c.trim().replace(/^[\^~>=<\s]+/,"")}catch{}let b="0.2.11".trim();return b&&"unknown"!==b?b:"0.0.0"}(c),{mode:j,installRoot:k}=function(a=process.cwd(),b=process.env){let c=function(a,b=process.env){let c=b.PIDANCE_INSTALL_ROOT?.trim();if(c)try{return(0,f.resolve)(c)}catch{return null}let d=a;try{d=(0,e.realpathSync)(a)}catch{d=(0,f.resolve)(a)}let g=d.replace(/\\/g,"/"),h=/^(.*)\/releases\/[^/]+\/node_modules\/@henlii\/pidance$/.exec(g);if(h)return(0,f.resolve)(h[1]);let i=/^(.*)\/releases\/[^/]+$/.exec(g);return i?(0,f.resolve)(i[1]):null}(a,b);if(c)return{mode:"formal-install",installRoot:c};try{let b=(0,f.join)(a,"package.json");if((0,e.existsSync)(b)&&JSON.parse((0,e.readFileSync)(b,"utf8")).name===h)return{mode:"workspace",installRoot:null}}catch{}return{mode:"unknown",installRoot:null}}(c,d),l=await t(g,a?.now,a?.fetchImpl,a?.forceRefresh===!0),m=null!=l&&p(l,i)>0,n=function(a=process.env){return"0"!==a.PIDANCE_ALLOW_SELF_UPGRADE}(d),q=n&&"formal-install"===j&&null!=k;return b=l?m?q?`可升级到 ${l}`:"workspace"===j?"当前为工作区/测试部署,仅提示有新版本;请在正式安装位(31415)一键升级":n?"未检测到正式安装目录,无法一键升级":"已禁用自升级(PIDANCE_ALLOW_SELF_UPGRADE=0)":"已是最新版本":"无法从 npm registry 获取最新版本",{currentVersion:i,latestVersion:l,updateAvailable:m,upgradeSupported:q,upgradeMode:j,installRoot:k,packageName:h,registry:g,reason:b,checkedAt:new Date(a?.now??Date.now()).toISOString()}}async function v(a){let b=a?.cwd??process.cwd(),c=a?.env??process.env,d=a?.execFileImpl??g,i=(b,c,d)=>{try{a?.onProgress?.({phase:b,percent:c,message:d})}catch{}};i("preparing",5,"准备升级…");let k=await u({cwd:b,env:c,fetchImpl:a?.fetchImpl});if(!k.upgradeSupported||!k.installRoot)return i("error",100,k.reason),{ok:!1,status:"not_supported",currentVersion:k.currentVersion,targetVersion:k.latestVersion,message:k.reason};let l=(a?.targetVersion?.trim()||k.latestVersion||"").trim();if(!l)return{ok:!1,status:"error",currentVersion:k.currentVersion,targetVersion:null,message:"无目标版本"};if(0>=p(l,k.currentVersion)&&!a?.targetVersion)return i("done",100,"已是最新版本"),{ok:!0,status:"already_latest",currentVersion:k.currentVersion,targetVersion:l,message:"已是最新版本"};if(!/^\d+\.\d+\.\d+(?:-[\w.-]+)?$/.test(l))return{ok:!1,status:"error",currentVersion:k.currentVersion,targetVersion:l,message:"非法版本号"};let m=k.installRoot,o=(0,f.join)(m,"releases",l),q=k.registry;try{i("preparing",12,`创建发布目录 ${l}…`),(0,e.mkdirSync)(o,{recursive:!0});let b={name:`pidance-${l}`,version:"1.0.0",private:!0,dependencies:{[h]:l}};(0,e.writeFileSync)((0,f.join)(o,"package.json"),`${JSON.stringify(b,null,2)}
4
- `,"utf8"),i("downloading",20,"正在从 npm 下载包…"),await d("npm",["install","--omit=dev",`--registry=${q}`,"--no-fund","--no-audit"],{cwd:o,env:{...c,npm_config_registry:q},timeout:6e5,maxBuffer:8388608}),i("installing",82,"校验安装结果…");let g=(0,f.join)(o,"node_modules","@henlii","pidance","package.json");if(!(0,e.existsSync)(g))throw Error("安装后未找到 @henlii/pidance 包");let p=JSON.parse((0,e.readFileSync)(g,"utf8"));if(p.version!==l)throw Error(`安装版本不符:期望 ${l},实际 ${p.version??"?"}`);i("linking",88,"切换 current 符号链接…");let s=(0,f.join)(m,"current"),t=(0,f.join)(m,`.current-tmp-${process.pid}`);try{(0,e.existsSync)(t)&&(0,e.rmSync)(t,{force:!0,recursive:!0})}catch{}(0,e.symlinkSync)(o,t),(0,e.renameSync)(t,s);let u=!1;if(a?.restartService!==!1&&"1"!==c.PIDANCE_SKIP_SERVICE_RESTART){i("restarting",94,"正在重启服务…");let a=await n({execFileImpl:d,env:c});if(u=a.restarted,!a.restarted){let b={ok:!0,status:"upgraded",currentVersion:k.currentVersion,targetVersion:l,message:`已切换到 ${l},但${a.message??`重启 ${j} 失败`}`,restarted:!1};try{r(m,[l,k.currentVersion])}catch{}return i("done",100,b.message),b}}try{r(m,[l,k.currentVersion])}catch{}let v={ok:!0,status:"upgraded",currentVersion:k.currentVersion,targetVersion:l,message:u?`已升级到 ${l} 并重启服务`:`已升级到 ${l}(未重启服务)`,restarted:u};return i("done",100,v.message),v}catch(b){let a=b instanceof Error?b.message:String(b);return i("error",100,`升级失败:${a}`),{ok:!1,status:"error",currentVersion:k.currentVersion,targetVersion:l,message:`升级失败:${a}`}}}},37418:a=>{"use strict";a.exports=require("node:util")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},86697:a=>{"use strict";a.exports=require("node:path")},89477:a=>{"use strict";a.exports=require("node:fs")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},95398:a=>{"use strict";a.exports=require("node:child_process")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741],()=>b(b.s=6950));module.exports=c})();
3
+ `))}catch{}};(async()=>{try{let a=await (0,v.i7)({targetVersion:b,onProgress:a=>{c({type:"progress",...a})}});c({type:"result",result:a})}catch(d){let a=d instanceof Error?d.message:String(d);c({type:"result",result:{ok:!1,status:"error",currentVersion:"?",targetVersion:b??null,message:a}})}finally{try{a.close()}catch{}}})()}}),{headers:{"Content-Type":"text/event-stream; charset=utf-8","Cache-Control":"no-store, no-cache",Connection:"keep-alive"}})}let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/update/apply/route",pathname:"/api/update/apply",filename:"route",bundlePath:"app/api/update/apply/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/tmp/pidance-release-build/app/api/update/apply/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function D(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function E(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/update/apply/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31974:(a,b,c)=>{"use strict";c.d(b,{ex:()=>t,i7:()=>u});var d=c(95398),e=c(89477),f=c(86697);let g=(0,c(37418).promisify)(d.execFile),h="@henlii/pidance",i="https://registry.npmjs.org/",j="pidance.service";function k(a,b){return 0===b||"active"===a.trim()}function l(a){if(a.restartOk||a.laterActive)return{restarted:!0};let b=a.restartError?.trim();return{restarted:!1,message:b?`重启 ${j} 失败:${b}`:`重启 ${j} 失败`}}async function m(a,b){try{let c=await a("systemctl",["is-active",j],{timeout:1e4,env:b});return k(String(c.stdout??""),0)}catch(a){return k(function(a){if(a&&"object"==typeof a&&"stdout"in a){let b=a.stdout;if("string"==typeof b)return b;if(Buffer.isBuffer(b))return b.toString("utf8")}return""}(a),function(a){if(a&&"object"==typeof a&&"code"in a){let b=a.code;if("number"==typeof b&&Number.isFinite(b))return b}return null}(a))}}async function n(a){let b=a.execFileImpl??g,c=a.env??process.env,d=a.sleepImpl??(a=>new Promise(b=>{setTimeout(b,a)})),e=a.now??Date.now;try{return await b("systemctl",["restart",j],{timeout:21e4,env:c}),l({restartOk:!0,laterActive:!1})}catch(g){let a=g instanceof Error?g.message:String(g),f=e();if(await m(b,c))return l({restartOk:!1,restartError:a,laterActive:!0});for(;e()-f<6e4;)if(await d(1500),await m(b,c))return l({restartOk:!1,restartError:a,laterActive:!0});return l({restartOk:!1,restartError:a,laterActive:!1})}}function o(a=process.env){let b=(a.PIDANCE_NPM_REGISTRY||a.npm_config_registry||i).trim();return b?b.endsWith("/")?b:`${b}/`:i}function p(a,b){let c=q(a),d=q(b);if(!c||!d)return 0;for(let a=0;a<3;a++){if(c.core[a]>d.core[a])return 1;if(c.core[a]<d.core[a])return -1}return null===c.pre&&null===d.pre?0:null===c.pre?1:null===d.pre||c.pre<d.pre?-1:+(c.pre>d.pre)}function q(a){let b=a.trim().replace(/^v/i,""),c=/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/.exec(b);return c?{core:[Number(c[1]),Number(c[2]),Number(c[3])],pre:c[4]??null}:null}async function r(a=o(),b=globalThis.fetch.bind(globalThis)){let c=new URL("@henlii%2Fpidance/latest",a.endsWith("/")?a:`${a}/`).toString();try{let a=await b(c,{headers:{Accept:"application/json"},signal:AbortSignal.timeout(12e3)});if(!a.ok)return null;let d=await a.json();return"string"==typeof d.version&&d.version.trim()?d.version.trim():null}catch{return null}}async function s(a=o(),b=Date.now(),c=globalThis.fetch.bind(globalThis),d=!1){let e=globalThis.__piPidanceLatestCache;if(!d&&e&&b-e.ts<18e5&&e.latest)return e.latest;let f=await r(a,c);return f&&(globalThis.__piPidanceLatestCache={latest:f,ts:b}),f}async function t(a){let b,c=a?.cwd??process.cwd(),d=a?.env??process.env,g=o(d),i=function(a=process.cwd()){for(let b of[(0,f.join)(a,"package.json"),(0,f.join)(a,"node_modules","@henlii","pidance","package.json")])try{if(!(0,e.existsSync)(b))continue;let a=JSON.parse((0,e.readFileSync)(b,"utf8"));if(a.name===h&&"string"==typeof a.version&&a.version.trim())return a.version.trim();let c=a.dependencies?.[h];if("string"==typeof c&&c.trim()&&!c.startsWith("file:"))return c.trim().replace(/^[\^~>=<\s]+/,"")}catch{}let b="0.2.13".trim();return b&&"unknown"!==b?b:"0.0.0"}(c),{mode:j,installRoot:k}=function(a=process.cwd(),b=process.env){let c=function(a,b=process.env){let c=b.PIDANCE_INSTALL_ROOT?.trim();if(c)try{return(0,f.resolve)(c)}catch{return null}let d=a;try{d=(0,e.realpathSync)(a)}catch{d=(0,f.resolve)(a)}let g=d.replace(/\\/g,"/"),h=/^(.*)\/releases\/[^/]+\/node_modules\/@henlii\/pidance$/.exec(g);if(h)return(0,f.resolve)(h[1]);let i=/^(.*)\/releases\/[^/]+$/.exec(g);return i?(0,f.resolve)(i[1]):null}(a,b);if(c)return{mode:"formal-install",installRoot:c};try{let b=(0,f.join)(a,"package.json");if((0,e.existsSync)(b)&&JSON.parse((0,e.readFileSync)(b,"utf8")).name===h)return{mode:"workspace",installRoot:null}}catch{}return{mode:"unknown",installRoot:null}}(c,d),l=await s(g,a?.now,a?.fetchImpl,a?.forceRefresh===!0),m=null!=l&&p(l,i)>0,n=function(a=process.env){return"0"!==a.PIDANCE_ALLOW_SELF_UPGRADE}(d),q=n&&"formal-install"===j&&null!=k;return b=l?m?q?`可升级到 ${l}`:"workspace"===j?"当前为工作区/测试部署,仅提示有新版本;请在正式安装位(31415)一键升级":n?"未检测到正式安装目录,无法一键升级":"已禁用自升级(PIDANCE_ALLOW_SELF_UPGRADE=0)":"已是最新版本":"无法从 npm registry 获取最新版本",{currentVersion:i,latestVersion:l,updateAvailable:m,upgradeSupported:q,upgradeMode:j,installRoot:k,packageName:h,registry:g,reason:b,checkedAt:new Date(a?.now??Date.now()).toISOString()}}async function u(a){let b=a?.cwd??process.cwd(),c=a?.env??process.env,d=a?.execFileImpl??g,i=(b,c,d)=>{try{a?.onProgress?.({phase:b,percent:c,message:d})}catch{}};i("preparing",5,"准备升级…");let k=await t({cwd:b,env:c,fetchImpl:a?.fetchImpl});if(!k.upgradeSupported||!k.installRoot)return i("error",100,k.reason),{ok:!1,status:"not_supported",currentVersion:k.currentVersion,targetVersion:k.latestVersion,message:k.reason};let l=(a?.targetVersion?.trim()||k.latestVersion||"").trim();if(!l)return{ok:!1,status:"error",currentVersion:k.currentVersion,targetVersion:null,message:"无目标版本"};if(0>=p(l,k.currentVersion)&&!a?.targetVersion)return i("done",100,"已是最新版本"),{ok:!0,status:"already_latest",currentVersion:k.currentVersion,targetVersion:l,message:"已是最新版本"};if(!/^\d+\.\d+\.\d+(?:-[\w.-]+)?$/.test(l))return{ok:!1,status:"error",currentVersion:k.currentVersion,targetVersion:l,message:"非法版本号"};let m=k.installRoot,o=(0,f.join)(m,"releases",l),q=k.registry;try{i("preparing",12,`创建发布目录 ${l}…`),(0,e.mkdirSync)(o,{recursive:!0});let b={name:`pidance-${l}`,version:"1.0.0",private:!0,dependencies:{[h]:l}};(0,e.writeFileSync)((0,f.join)(o,"package.json"),`${JSON.stringify(b,null,2)}
4
+ `,"utf8"),i("downloading",20,"正在从 npm 下载包…"),await d("npm",["install","--omit=dev",`--registry=${q}`,"--no-fund","--no-audit"],{cwd:o,env:{...c,npm_config_registry:q},timeout:6e5,maxBuffer:8388608}),i("installing",82,"校验安装结果…");let g=(0,f.join)(o,"node_modules","@henlii","pidance","package.json");if(!(0,e.existsSync)(g))throw Error("安装后未找到 @henlii/pidance 包");let p=JSON.parse((0,e.readFileSync)(g,"utf8"));if(p.version!==l)throw Error(`安装版本不符:期望 ${l},实际 ${p.version??"?"}`);i("linking",88,"切换 current 符号链接…");let r=(0,f.join)(m,"current"),s=(0,f.join)(m,`.current-tmp-${process.pid}`);try{(0,e.existsSync)(s)&&(0,e.rmSync)(s,{force:!0,recursive:!0})}catch{}(0,e.symlinkSync)(o,s),(0,e.renameSync)(s,r);try{!function(a,b){let c=(0,f.join)(a,"releases");if(!(0,e.existsSync)(c))return;let d=new Set(b.map(a=>a.trim()).filter(Boolean));try{let b=(0,e.realpathSync)((0,f.join)(a,"current")),c=/\/releases\/([^/]+)$/.exec(b.replace(/\\/g,"/"));c&&d.add(c[1])}catch{}let g=c;try{g=(0,e.realpathSync)(c)}catch{return[]}let h=[];for(let a of(0,e.readdirSync)(c,{withFileTypes:!0})){let b;if(!a.isDirectory()||a.isSymbolicLink()||"."===a.name||".."===a.name||a.name.includes("/")||a.name.includes("\\")||d.has(a.name))continue;let i=(0,f.join)(c,a.name);try{b=(0,e.realpathSync)(i)}catch{continue}let j=g.endsWith("/")?g:`${g}/`;(b===g||b.startsWith(j))&&((0,e.rmSync)(i,{recursive:!0,force:!0}),h.push(a.name))}}(m,[l,k.currentVersion])}catch{}let t=!1;if(a?.restartService!==!1&&"1"!==c.PIDANCE_SKIP_SERVICE_RESTART){i("restarting",94,"正在重启服务…");let a=await n({execFileImpl:d,env:c});if(t=a.restarted,!a.restarted){let b={ok:!0,status:"upgraded",currentVersion:k.currentVersion,targetVersion:l,message:`已切换到 ${l},但${a.message??`重启 ${j} 失败`}`,restarted:!1};return i("done",100,b.message),b}}let u={ok:!0,status:"upgraded",currentVersion:k.currentVersion,targetVersion:l,message:t?`已升级到 ${l} 并重启服务`:`已升级到 ${l}(未重启服务)`,restarted:t};return i("done",100,u.message),u}catch(b){let a=b instanceof Error?b.message:String(b);return i("error",100,`升级失败:${a}`),{ok:!1,status:"error",currentVersion:k.currentVersion,targetVersion:l,message:`升级失败:${a}`}}}},37418:a=>{"use strict";a.exports=require("node:util")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},86697:a=>{"use strict";a.exports=require("node:path")},89477:a=>{"use strict";a.exports=require("node:fs")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},95398:a=>{"use strict";a.exports=require("node:child_process")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741],()=>b(b.s=6950));module.exports=c})();
@@ -1,2 +1,2 @@
1
- (()=>{var a={};a.id=5408,a.ids=[5408],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31974:(a,b,c)=>{"use strict";c.d(b,{ex:()=>u,i7:()=>v});var d=c(95398),e=c(89477),f=c(86697);let g=(0,c(37418).promisify)(d.execFile),h="@henlii/pidance",i="https://registry.npmjs.org/",j="pidance.service";function k(a,b){return 0===b||"active"===a.trim()}function l(a){if(a.restartOk||a.laterActive)return{restarted:!0};let b=a.restartError?.trim();return{restarted:!1,message:b?`重启 ${j} 失败:${b}`:`重启 ${j} 失败`}}async function m(a,b){try{let c=await a("systemctl",["is-active",j],{timeout:1e4,env:b});return k(String(c.stdout??""),0)}catch(a){return k(function(a){if(a&&"object"==typeof a&&"stdout"in a){let b=a.stdout;if("string"==typeof b)return b;if(Buffer.isBuffer(b))return b.toString("utf8")}return""}(a),function(a){if(a&&"object"==typeof a&&"code"in a){let b=a.code;if("number"==typeof b&&Number.isFinite(b))return b}return null}(a))}}async function n(a){let b=a.execFileImpl??g,c=a.env??process.env,d=a.sleepImpl??(a=>new Promise(b=>{setTimeout(b,a)})),e=a.now??Date.now;try{return await b("systemctl",["restart",j],{timeout:21e4,env:c}),l({restartOk:!0,laterActive:!1})}catch(g){let a=g instanceof Error?g.message:String(g),f=e();if(await m(b,c))return l({restartOk:!1,restartError:a,laterActive:!0});for(;e()-f<6e4;)if(await d(1500),await m(b,c))return l({restartOk:!1,restartError:a,laterActive:!0});return l({restartOk:!1,restartError:a,laterActive:!1})}}function o(a=process.env){let b=(a.PIDANCE_NPM_REGISTRY||a.npm_config_registry||i).trim();return b?b.endsWith("/")?b:`${b}/`:i}function p(a,b){let c=q(a),d=q(b);if(!c||!d)return 0;for(let a=0;a<3;a++){if(c.core[a]>d.core[a])return 1;if(c.core[a]<d.core[a])return -1}return null===c.pre&&null===d.pre?0:null===c.pre?1:null===d.pre||c.pre<d.pre?-1:+(c.pre>d.pre)}function q(a){let b=a.trim().replace(/^v/i,""),c=/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/.exec(b);return c?{core:[Number(c[1]),Number(c[2]),Number(c[3])],pre:c[4]??null}:null}function r(a,b){let c=(0,f.join)(a,"releases");if(!(0,e.existsSync)(c))return[];let d=new Set(b.map(a=>a.trim()).filter(Boolean));try{let b=(0,e.realpathSync)((0,f.join)(a,"current")),c=/\/releases\/([^/]+)$/.exec(b.replace(/\\/g,"/"));c&&d.add(c[1])}catch{}let g=c;try{g=(0,e.realpathSync)(c)}catch{return[]}let h=[];for(let a of(0,e.readdirSync)(c,{withFileTypes:!0})){let b;if(!a.isDirectory()||a.isSymbolicLink()||"."===a.name||".."===a.name||a.name.includes("/")||a.name.includes("\\")||d.has(a.name))continue;let i=(0,f.join)(c,a.name);try{b=(0,e.realpathSync)(i)}catch{continue}let j=g.endsWith("/")?g:`${g}/`;(b===g||b.startsWith(j))&&((0,e.rmSync)(i,{recursive:!0,force:!0}),h.push(a.name))}return h}async function s(a=o(),b=globalThis.fetch.bind(globalThis)){let c=new URL("@henlii%2Fpidance/latest",a.endsWith("/")?a:`${a}/`).toString();try{let a=await b(c,{headers:{Accept:"application/json"},signal:AbortSignal.timeout(12e3)});if(!a.ok)return null;let d=await a.json();return"string"==typeof d.version&&d.version.trim()?d.version.trim():null}catch{return null}}async function t(a=o(),b=Date.now(),c=globalThis.fetch.bind(globalThis),d=!1){let e=globalThis.__piPidanceLatestCache;if(!d&&e&&b-e.ts<18e5&&e.latest)return e.latest;let f=await s(a,c);return f&&(globalThis.__piPidanceLatestCache={latest:f,ts:b}),f}async function u(a){let b,c=a?.cwd??process.cwd(),d=a?.env??process.env,g=o(d),i=function(a=process.cwd()){for(let b of[(0,f.join)(a,"package.json"),(0,f.join)(a,"node_modules","@henlii","pidance","package.json")])try{if(!(0,e.existsSync)(b))continue;let a=JSON.parse((0,e.readFileSync)(b,"utf8"));if(a.name===h&&"string"==typeof a.version&&a.version.trim())return a.version.trim();let c=a.dependencies?.[h];if("string"==typeof c&&c.trim()&&!c.startsWith("file:"))return c.trim().replace(/^[\^~>=<\s]+/,"")}catch{}let b="0.2.11".trim();return b&&"unknown"!==b?b:"0.0.0"}(c),{mode:j,installRoot:k}=function(a=process.cwd(),b=process.env){let c=function(a,b=process.env){let c=b.PIDANCE_INSTALL_ROOT?.trim();if(c)try{return(0,f.resolve)(c)}catch{return null}let d=a;try{d=(0,e.realpathSync)(a)}catch{d=(0,f.resolve)(a)}let g=d.replace(/\\/g,"/"),h=/^(.*)\/releases\/[^/]+\/node_modules\/@henlii\/pidance$/.exec(g);if(h)return(0,f.resolve)(h[1]);let i=/^(.*)\/releases\/[^/]+$/.exec(g);return i?(0,f.resolve)(i[1]):null}(a,b);if(c)return{mode:"formal-install",installRoot:c};try{let b=(0,f.join)(a,"package.json");if((0,e.existsSync)(b)&&JSON.parse((0,e.readFileSync)(b,"utf8")).name===h)return{mode:"workspace",installRoot:null}}catch{}return{mode:"unknown",installRoot:null}}(c,d),l=await t(g,a?.now,a?.fetchImpl,a?.forceRefresh===!0),m=null!=l&&p(l,i)>0,n=function(a=process.env){return"0"!==a.PIDANCE_ALLOW_SELF_UPGRADE}(d),q=n&&"formal-install"===j&&null!=k;return b=l?m?q?`可升级到 ${l}`:"workspace"===j?"当前为工作区/测试部署,仅提示有新版本;请在正式安装位(31415)一键升级":n?"未检测到正式安装目录,无法一键升级":"已禁用自升级(PIDANCE_ALLOW_SELF_UPGRADE=0)":"已是最新版本":"无法从 npm registry 获取最新版本",{currentVersion:i,latestVersion:l,updateAvailable:m,upgradeSupported:q,upgradeMode:j,installRoot:k,packageName:h,registry:g,reason:b,checkedAt:new Date(a?.now??Date.now()).toISOString()}}async function v(a){let b=a?.cwd??process.cwd(),c=a?.env??process.env,d=a?.execFileImpl??g,i=(b,c,d)=>{try{a?.onProgress?.({phase:b,percent:c,message:d})}catch{}};i("preparing",5,"准备升级…");let k=await u({cwd:b,env:c,fetchImpl:a?.fetchImpl});if(!k.upgradeSupported||!k.installRoot)return i("error",100,k.reason),{ok:!1,status:"not_supported",currentVersion:k.currentVersion,targetVersion:k.latestVersion,message:k.reason};let l=(a?.targetVersion?.trim()||k.latestVersion||"").trim();if(!l)return{ok:!1,status:"error",currentVersion:k.currentVersion,targetVersion:null,message:"无目标版本"};if(0>=p(l,k.currentVersion)&&!a?.targetVersion)return i("done",100,"已是最新版本"),{ok:!0,status:"already_latest",currentVersion:k.currentVersion,targetVersion:l,message:"已是最新版本"};if(!/^\d+\.\d+\.\d+(?:-[\w.-]+)?$/.test(l))return{ok:!1,status:"error",currentVersion:k.currentVersion,targetVersion:l,message:"非法版本号"};let m=k.installRoot,o=(0,f.join)(m,"releases",l),q=k.registry;try{i("preparing",12,`创建发布目录 ${l}…`),(0,e.mkdirSync)(o,{recursive:!0});let b={name:`pidance-${l}`,version:"1.0.0",private:!0,dependencies:{[h]:l}};(0,e.writeFileSync)((0,f.join)(o,"package.json"),`${JSON.stringify(b,null,2)}
2
- `,"utf8"),i("downloading",20,"正在从 npm 下载包…"),await d("npm",["install","--omit=dev",`--registry=${q}`,"--no-fund","--no-audit"],{cwd:o,env:{...c,npm_config_registry:q},timeout:6e5,maxBuffer:8388608}),i("installing",82,"校验安装结果…");let g=(0,f.join)(o,"node_modules","@henlii","pidance","package.json");if(!(0,e.existsSync)(g))throw Error("安装后未找到 @henlii/pidance 包");let p=JSON.parse((0,e.readFileSync)(g,"utf8"));if(p.version!==l)throw Error(`安装版本不符:期望 ${l},实际 ${p.version??"?"}`);i("linking",88,"切换 current 符号链接…");let s=(0,f.join)(m,"current"),t=(0,f.join)(m,`.current-tmp-${process.pid}`);try{(0,e.existsSync)(t)&&(0,e.rmSync)(t,{force:!0,recursive:!0})}catch{}(0,e.symlinkSync)(o,t),(0,e.renameSync)(t,s);let u=!1;if(a?.restartService!==!1&&"1"!==c.PIDANCE_SKIP_SERVICE_RESTART){i("restarting",94,"正在重启服务…");let a=await n({execFileImpl:d,env:c});if(u=a.restarted,!a.restarted){let b={ok:!0,status:"upgraded",currentVersion:k.currentVersion,targetVersion:l,message:`已切换到 ${l},但${a.message??`重启 ${j} 失败`}`,restarted:!1};try{r(m,[l,k.currentVersion])}catch{}return i("done",100,b.message),b}}try{r(m,[l,k.currentVersion])}catch{}let v={ok:!0,status:"upgraded",currentVersion:k.currentVersion,targetVersion:l,message:u?`已升级到 ${l} 并重启服务`:`已升级到 ${l}(未重启服务)`,restarted:u};return i("done",100,v.message),v}catch(b){let a=b instanceof Error?b.message:String(b);return i("error",100,`升级失败:${a}`),{ok:!1,status:"error",currentVersion:k.currentVersion,targetVersion:l,message:`升级失败:${a}`}}}},33696:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>E,patchFetch:()=>D,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var d={};c.r(d),c.d(d,{GET:()=>y,dynamic:()=>x});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(31974);let x="force-dynamic";async function y(){try{let a=await (0,w.ex)({forceRefresh:!0});return v.NextResponse.json(a,{headers:{"Cache-Control":"no-store"}})}catch(b){let a=b instanceof Error?b.message:String(b);return v.NextResponse.json({error:a},{status:500})}}let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/update/check/route",pathname:"/api/update/check",filename:"route",bundlePath:"app/api/update/check/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/tmp/pidance-release-build/app/api/update/check/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function D(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function E(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/update/check/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},37418:a=>{"use strict";a.exports=require("node:util")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},86697:a=>{"use strict";a.exports=require("node:path")},89477:a=>{"use strict";a.exports=require("node:fs")},95398:a=>{"use strict";a.exports=require("node:child_process")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=33696));module.exports=c})();
1
+ (()=>{var a={};a.id=5408,a.ids=[5408],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31974:(a,b,c)=>{"use strict";c.d(b,{ex:()=>t,i7:()=>u});var d=c(95398),e=c(89477),f=c(86697);let g=(0,c(37418).promisify)(d.execFile),h="@henlii/pidance",i="https://registry.npmjs.org/",j="pidance.service";function k(a,b){return 0===b||"active"===a.trim()}function l(a){if(a.restartOk||a.laterActive)return{restarted:!0};let b=a.restartError?.trim();return{restarted:!1,message:b?`重启 ${j} 失败:${b}`:`重启 ${j} 失败`}}async function m(a,b){try{let c=await a("systemctl",["is-active",j],{timeout:1e4,env:b});return k(String(c.stdout??""),0)}catch(a){return k(function(a){if(a&&"object"==typeof a&&"stdout"in a){let b=a.stdout;if("string"==typeof b)return b;if(Buffer.isBuffer(b))return b.toString("utf8")}return""}(a),function(a){if(a&&"object"==typeof a&&"code"in a){let b=a.code;if("number"==typeof b&&Number.isFinite(b))return b}return null}(a))}}async function n(a){let b=a.execFileImpl??g,c=a.env??process.env,d=a.sleepImpl??(a=>new Promise(b=>{setTimeout(b,a)})),e=a.now??Date.now;try{return await b("systemctl",["restart",j],{timeout:21e4,env:c}),l({restartOk:!0,laterActive:!1})}catch(g){let a=g instanceof Error?g.message:String(g),f=e();if(await m(b,c))return l({restartOk:!1,restartError:a,laterActive:!0});for(;e()-f<6e4;)if(await d(1500),await m(b,c))return l({restartOk:!1,restartError:a,laterActive:!0});return l({restartOk:!1,restartError:a,laterActive:!1})}}function o(a=process.env){let b=(a.PIDANCE_NPM_REGISTRY||a.npm_config_registry||i).trim();return b?b.endsWith("/")?b:`${b}/`:i}function p(a,b){let c=q(a),d=q(b);if(!c||!d)return 0;for(let a=0;a<3;a++){if(c.core[a]>d.core[a])return 1;if(c.core[a]<d.core[a])return -1}return null===c.pre&&null===d.pre?0:null===c.pre?1:null===d.pre||c.pre<d.pre?-1:+(c.pre>d.pre)}function q(a){let b=a.trim().replace(/^v/i,""),c=/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/.exec(b);return c?{core:[Number(c[1]),Number(c[2]),Number(c[3])],pre:c[4]??null}:null}async function r(a=o(),b=globalThis.fetch.bind(globalThis)){let c=new URL("@henlii%2Fpidance/latest",a.endsWith("/")?a:`${a}/`).toString();try{let a=await b(c,{headers:{Accept:"application/json"},signal:AbortSignal.timeout(12e3)});if(!a.ok)return null;let d=await a.json();return"string"==typeof d.version&&d.version.trim()?d.version.trim():null}catch{return null}}async function s(a=o(),b=Date.now(),c=globalThis.fetch.bind(globalThis),d=!1){let e=globalThis.__piPidanceLatestCache;if(!d&&e&&b-e.ts<18e5&&e.latest)return e.latest;let f=await r(a,c);return f&&(globalThis.__piPidanceLatestCache={latest:f,ts:b}),f}async function t(a){let b,c=a?.cwd??process.cwd(),d=a?.env??process.env,g=o(d),i=function(a=process.cwd()){for(let b of[(0,f.join)(a,"package.json"),(0,f.join)(a,"node_modules","@henlii","pidance","package.json")])try{if(!(0,e.existsSync)(b))continue;let a=JSON.parse((0,e.readFileSync)(b,"utf8"));if(a.name===h&&"string"==typeof a.version&&a.version.trim())return a.version.trim();let c=a.dependencies?.[h];if("string"==typeof c&&c.trim()&&!c.startsWith("file:"))return c.trim().replace(/^[\^~>=<\s]+/,"")}catch{}let b="0.2.13".trim();return b&&"unknown"!==b?b:"0.0.0"}(c),{mode:j,installRoot:k}=function(a=process.cwd(),b=process.env){let c=function(a,b=process.env){let c=b.PIDANCE_INSTALL_ROOT?.trim();if(c)try{return(0,f.resolve)(c)}catch{return null}let d=a;try{d=(0,e.realpathSync)(a)}catch{d=(0,f.resolve)(a)}let g=d.replace(/\\/g,"/"),h=/^(.*)\/releases\/[^/]+\/node_modules\/@henlii\/pidance$/.exec(g);if(h)return(0,f.resolve)(h[1]);let i=/^(.*)\/releases\/[^/]+$/.exec(g);return i?(0,f.resolve)(i[1]):null}(a,b);if(c)return{mode:"formal-install",installRoot:c};try{let b=(0,f.join)(a,"package.json");if((0,e.existsSync)(b)&&JSON.parse((0,e.readFileSync)(b,"utf8")).name===h)return{mode:"workspace",installRoot:null}}catch{}return{mode:"unknown",installRoot:null}}(c,d),l=await s(g,a?.now,a?.fetchImpl,a?.forceRefresh===!0),m=null!=l&&p(l,i)>0,n=function(a=process.env){return"0"!==a.PIDANCE_ALLOW_SELF_UPGRADE}(d),q=n&&"formal-install"===j&&null!=k;return b=l?m?q?`可升级到 ${l}`:"workspace"===j?"当前为工作区/测试部署,仅提示有新版本;请在正式安装位(31415)一键升级":n?"未检测到正式安装目录,无法一键升级":"已禁用自升级(PIDANCE_ALLOW_SELF_UPGRADE=0)":"已是最新版本":"无法从 npm registry 获取最新版本",{currentVersion:i,latestVersion:l,updateAvailable:m,upgradeSupported:q,upgradeMode:j,installRoot:k,packageName:h,registry:g,reason:b,checkedAt:new Date(a?.now??Date.now()).toISOString()}}async function u(a){let b=a?.cwd??process.cwd(),c=a?.env??process.env,d=a?.execFileImpl??g,i=(b,c,d)=>{try{a?.onProgress?.({phase:b,percent:c,message:d})}catch{}};i("preparing",5,"准备升级…");let k=await t({cwd:b,env:c,fetchImpl:a?.fetchImpl});if(!k.upgradeSupported||!k.installRoot)return i("error",100,k.reason),{ok:!1,status:"not_supported",currentVersion:k.currentVersion,targetVersion:k.latestVersion,message:k.reason};let l=(a?.targetVersion?.trim()||k.latestVersion||"").trim();if(!l)return{ok:!1,status:"error",currentVersion:k.currentVersion,targetVersion:null,message:"无目标版本"};if(0>=p(l,k.currentVersion)&&!a?.targetVersion)return i("done",100,"已是最新版本"),{ok:!0,status:"already_latest",currentVersion:k.currentVersion,targetVersion:l,message:"已是最新版本"};if(!/^\d+\.\d+\.\d+(?:-[\w.-]+)?$/.test(l))return{ok:!1,status:"error",currentVersion:k.currentVersion,targetVersion:l,message:"非法版本号"};let m=k.installRoot,o=(0,f.join)(m,"releases",l),q=k.registry;try{i("preparing",12,`创建发布目录 ${l}…`),(0,e.mkdirSync)(o,{recursive:!0});let b={name:`pidance-${l}`,version:"1.0.0",private:!0,dependencies:{[h]:l}};(0,e.writeFileSync)((0,f.join)(o,"package.json"),`${JSON.stringify(b,null,2)}
2
+ `,"utf8"),i("downloading",20,"正在从 npm 下载包…"),await d("npm",["install","--omit=dev",`--registry=${q}`,"--no-fund","--no-audit"],{cwd:o,env:{...c,npm_config_registry:q},timeout:6e5,maxBuffer:8388608}),i("installing",82,"校验安装结果…");let g=(0,f.join)(o,"node_modules","@henlii","pidance","package.json");if(!(0,e.existsSync)(g))throw Error("安装后未找到 @henlii/pidance 包");let p=JSON.parse((0,e.readFileSync)(g,"utf8"));if(p.version!==l)throw Error(`安装版本不符:期望 ${l},实际 ${p.version??"?"}`);i("linking",88,"切换 current 符号链接…");let r=(0,f.join)(m,"current"),s=(0,f.join)(m,`.current-tmp-${process.pid}`);try{(0,e.existsSync)(s)&&(0,e.rmSync)(s,{force:!0,recursive:!0})}catch{}(0,e.symlinkSync)(o,s),(0,e.renameSync)(s,r);try{!function(a,b){let c=(0,f.join)(a,"releases");if(!(0,e.existsSync)(c))return;let d=new Set(b.map(a=>a.trim()).filter(Boolean));try{let b=(0,e.realpathSync)((0,f.join)(a,"current")),c=/\/releases\/([^/]+)$/.exec(b.replace(/\\/g,"/"));c&&d.add(c[1])}catch{}let g=c;try{g=(0,e.realpathSync)(c)}catch{return[]}let h=[];for(let a of(0,e.readdirSync)(c,{withFileTypes:!0})){let b;if(!a.isDirectory()||a.isSymbolicLink()||"."===a.name||".."===a.name||a.name.includes("/")||a.name.includes("\\")||d.has(a.name))continue;let i=(0,f.join)(c,a.name);try{b=(0,e.realpathSync)(i)}catch{continue}let j=g.endsWith("/")?g:`${g}/`;(b===g||b.startsWith(j))&&((0,e.rmSync)(i,{recursive:!0,force:!0}),h.push(a.name))}}(m,[l,k.currentVersion])}catch{}let t=!1;if(a?.restartService!==!1&&"1"!==c.PIDANCE_SKIP_SERVICE_RESTART){i("restarting",94,"正在重启服务…");let a=await n({execFileImpl:d,env:c});if(t=a.restarted,!a.restarted){let b={ok:!0,status:"upgraded",currentVersion:k.currentVersion,targetVersion:l,message:`已切换到 ${l},但${a.message??`重启 ${j} 失败`}`,restarted:!1};return i("done",100,b.message),b}}let u={ok:!0,status:"upgraded",currentVersion:k.currentVersion,targetVersion:l,message:t?`已升级到 ${l} 并重启服务`:`已升级到 ${l}(未重启服务)`,restarted:t};return i("done",100,u.message),u}catch(b){let a=b instanceof Error?b.message:String(b);return i("error",100,`升级失败:${a}`),{ok:!1,status:"error",currentVersion:k.currentVersion,targetVersion:l,message:`升级失败:${a}`}}}},33696:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>E,patchFetch:()=>D,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var d={};c.r(d),c.d(d,{GET:()=>y,dynamic:()=>x});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(31974);let x="force-dynamic";async function y(){try{let a=await (0,w.ex)({forceRefresh:!0});return v.NextResponse.json(a,{headers:{"Cache-Control":"no-store"}})}catch(b){let a=b instanceof Error?b.message:String(b);return v.NextResponse.json({error:a},{status:500})}}let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/update/check/route",pathname:"/api/update/check",filename:"route",bundlePath:"app/api/update/check/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/tmp/pidance-release-build/app/api/update/check/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function D(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function E(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/update/check/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},37418:a=>{"use strict";a.exports=require("node:util")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},86697:a=>{"use strict";a.exports=require("node:path")},89477:a=>{"use strict";a.exports=require("node:fs")},95398:a=>{"use strict";a.exports=require("node:child_process")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=33696));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=4016,a.ids=[4016],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},716:a=>{a.exports=require("node:crypto")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4984:a=>{a.exports=require("readline")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},42819:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>m,GET:()=>k,POST:()=>l});var e=c(23211),f=c(29021),g=c(24923),h=c(80547),i=a([h]);async function j(a){let b=await (0,h.mc)();return(0,h.A$)(a,b)?null:e.NextResponse.json({error:"Access denied"},{status:403})}async function k(a){try{let b=new URL(a.url).searchParams.get("cwd");if(!b)return e.NextResponse.json({error:"cwd is required"},{status:400});let c=await j(b);if(c)return c;let d=await (0,g.KI)(b),i=[],k=!0;try{i=await (0,g.P9)((0,f.existsSync)(b)?b:d.projectRoot)}catch{k=!1}for(let a of i)(0,h.wz)(a.path);return e.NextResponse.json({projectRoot:d.projectRoot,isGit:k,isTopLevel:d.isTopLevel,worktrees:i})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function l(a){try{let b=await a.json();if(!b.cwd||"string"!=typeof b.cwd)return e.NextResponse.json({error:"cwd is required"},{status:400});if(!b.branch||"string"!=typeof b.branch)return e.NextResponse.json({error:"branch is required"},{status:400});let c=await j(b.cwd);if(c)return c;if(!(0,f.existsSync)(b.cwd))return e.NextResponse.json({error:`Directory does not exist: ${b.cwd}`},{status:400});let d=await (0,g.l)(b.cwd,b.branch);return e.NextResponse.json(d)}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:400})}}async function m(a){try{let b=await a.json();if(!b.cwd||"string"!=typeof b.cwd)return e.NextResponse.json({error:"cwd is required"},{status:400});if(!b.path||"string"!=typeof b.path)return e.NextResponse.json({error:"path is required"},{status:400});let c=await j(b.cwd);if(c)return c;return await (0,g.IL)(b.cwd,b.path,!0===b.force),e.NextResponse.json({success:!0})}catch(c){let a=c instanceof Error?c.message:String(c),b=/contains modified or untracked files|is dirty/i.test(a);return e.NextResponse.json({error:a,dirty:b},{status:b?409:400})}}h=(i.then?(await i)():i)[0],d()}catch(a){d(a)}})},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},62126:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(42819),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/worktrees/route",pathname:"/api/worktrees",filename:"route",bundlePath:"app/api/worktrees/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/tmp/pidance-release-build/app/api/worktrees/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/worktrees/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},62228:a=>{a.exports=require("node:os")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69835:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Lj:()=>p,Md:()=>o,eq:()=>l,ki:()=>n,qo:()=>k,uF:()=>m});var e=c(29021),f=c(33873),g=c(55511),h=c(60396),i=c(80547),j=a([i]);i=(j.then?(await j)():j)[0];let o=0x1900000,p=0x6400000;function k(a=(0,h.$M)()){return(0,i.Nw)((0,f.join)(a,"pidance-attachments"))}function l(a=(0,h.$M)()){let b=k(a);return(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0,mode:448}),(0,i.wz)(b),b}function m(a){let b=(a.replace(/\\/g,"/").split("/").pop()??"file").replace(/\0/g,"").replace(/^\.+/,"").trim()||"file";if(b.length<=180)return b;let c=b.lastIndexOf(".");if(c>0&&b.length-c<=20){let a=b.slice(c);return b.slice(0,180-a.length)+a}return b.slice(0,180)}function n(a,b,c=(0,h.$M)()){let d=l(c),j=function(a,b=Date.now()){let c=m(a),d=new Date(b).toISOString().replace(/[:.]/g,"-"),e=(0,g.randomUUID)().slice(0,8);return`${d}_${e}_${c}`}(a),k=(0,f.join)(d,j);return(0,e.writeFileSync)(k,b,{flag:"wx",mode:384}),{path:(0,i.Nw)(k),name:m(a),storedName:j,size:b.length}}d()}catch(a){d(a)}})},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>q,Nw:()=>j.Nw,mc:()=>p,uK:()=>o,wz:()=>k.wz});var e=c(29021),f=c(21820),g=c(33873),h=c.n(g),i=c(60396),j=c(50593),k=c(25252),l=c(69835),m=c(40402),n=a([l,m]);[l,m]=n.then?(await n)():n;let r=/^[a-zA-Z]:[\\/]/;function o(a){return r.test(a)||a.startsWith("\\\\")||a.startsWith("//")}async function p(){let a=Date.now(),b=globalThis.__piAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,m.dQ)(),d=function(a){let b=new Set;for(let c of a)!0!==c.readOnly&&c.cwd&&b.add((0,j.Nw)(c.cwd)),!0!==c.readOnly&&c.projectRoot&&b.add((0,j.Nw)(c.projectRoot));return b}(c);try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^pi-cwd-\d{8}$/.test(a)&&d.add((0,j.Nw)(h().join((0,f.homedir)(),a)))}catch{}for(let a of(0,k.HM)())d.add(a);try{d.add((0,l.qo)((0,i.$M)()))}catch{}return globalThis.__piAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function q(a,b){for(let c of b){let b=o(a)||o(c),d=b?h().win32:h(),e=b?"\\":h().sep,f=d.resolve(a),g=d.resolve(c),i=b?f.toLowerCase():f,j=b?g.toLowerCase():g,k=j.endsWith(e)?j:j+e;if(i===j||i.startsWith(k))return!0}return!1}d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},86697:a=>{a.exports=require("node:path")},89477:a=>{a.exports=require("node:fs")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582],()=>b(b.s=62126));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=4016,a.ids=[4016],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},716:a=>{a.exports=require("node:crypto")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4984:a=>{a.exports=require("readline")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},42819:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>m,GET:()=>k,POST:()=>l});var e=c(23211),f=c(29021),g=c(24923),h=c(80547),i=a([h]);async function j(a){let b=await (0,h.mc)();return(0,h.A$)(a,b)?null:e.NextResponse.json({error:"Access denied"},{status:403})}async function k(a){try{let b=new URL(a.url).searchParams.get("cwd");if(!b)return e.NextResponse.json({error:"cwd is required"},{status:400});let c=await j(b);if(c)return c;let d=await (0,g.KI)(b),i=[],k=!0;try{i=await (0,g.P9)((0,f.existsSync)(b)?b:d.projectRoot)}catch{k=!1}for(let a of i)(0,h.wz)(a.path);return e.NextResponse.json({projectRoot:d.projectRoot,isGit:k,isTopLevel:d.isTopLevel,worktrees:i})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function l(a){try{let b=await a.json();if(!b.cwd||"string"!=typeof b.cwd)return e.NextResponse.json({error:"cwd is required"},{status:400});if(!b.branch||"string"!=typeof b.branch)return e.NextResponse.json({error:"branch is required"},{status:400});let c=await j(b.cwd);if(c)return c;if(!(0,f.existsSync)(b.cwd))return e.NextResponse.json({error:`Directory does not exist: ${b.cwd}`},{status:400});let d=await (0,g.l)(b.cwd,b.branch);return e.NextResponse.json(d)}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:400})}}async function m(a){try{let b=await a.json();if(!b.cwd||"string"!=typeof b.cwd)return e.NextResponse.json({error:"cwd is required"},{status:400});if(!b.path||"string"!=typeof b.path)return e.NextResponse.json({error:"path is required"},{status:400});let c=await j(b.cwd);if(c)return c;return await (0,g.IL)(b.cwd,b.path,!0===b.force),e.NextResponse.json({success:!0})}catch(c){let a=c instanceof Error?c.message:String(c),b=/contains modified or untracked files|is dirty/i.test(a);return e.NextResponse.json({error:a,dirty:b},{status:b?409:400})}}h=(i.then?(await i)():i)[0],d()}catch(a){d(a)}})},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},62126:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(42819),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/worktrees/route",pathname:"/api/worktrees",filename:"route",bundlePath:"app/api/worktrees/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/tmp/pidance-release-build/app/api/worktrees/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/worktrees/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},62228:a=>{a.exports=require("node:os")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69835:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Lj:()=>p,Md:()=>o,eq:()=>l,ki:()=>n,qo:()=>k,uF:()=>m});var e=c(29021),f=c(33873),g=c(55511),h=c(60396),i=c(80547),j=a([i]);i=(j.then?(await j)():j)[0];let o=0x1900000,p=0x6400000;function k(a=(0,h.$M)()){return(0,i.Nw)((0,f.join)(a,"pidance-attachments"))}function l(a=(0,h.$M)()){let b=k(a);return(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0,mode:448}),(0,i.wz)(b),b}function m(a){let b=(a.replace(/\\/g,"/").split("/").pop()??"file").replace(/\0/g,"").replace(/^\.+/,"").trim()||"file";if(b.length<=180)return b;let c=b.lastIndexOf(".");if(c>0&&b.length-c<=20){let a=b.slice(c);return b.slice(0,180-a.length)+a}return b.slice(0,180)}function n(a,b,c=(0,h.$M)()){let d=l(c),j=function(a,b=Date.now()){let c=m(a),d=new Date(b).toISOString().replace(/[:.]/g,"-"),e=(0,g.randomUUID)().slice(0,8);return`${d}_${e}_${c}`}(a),k=(0,f.join)(d,j);return(0,e.writeFileSync)(k,b,{flag:"wx",mode:384}),{path:(0,i.Nw)(k),name:m(a),storedName:j,size:b.length}}d()}catch(a){d(a)}})},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>r,Nw:()=>j.Nw,bk:()=>q,mc:()=>p,uK:()=>o,wz:()=>k.wz});var e=c(29021),f=c(21820),g=c(33873),h=c.n(g),i=c(60396),j=c(50593),k=c(25252),l=c(69835),m=c(40402),n=a([l,m]);[l,m]=n.then?(await n)():n;let s=/^[a-zA-Z]:[\\/]/;function o(a){return s.test(a)||a.startsWith("\\\\")||a.startsWith("//")}async function p(){let a=Date.now(),b=globalThis.__piAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,m.dQ)(),d=function(a){let b=new Set;for(let c of a)!0!==c.readOnly&&c.cwd&&b.add((0,j.Nw)(c.cwd)),!0!==c.readOnly&&c.projectRoot&&b.add((0,j.Nw)(c.projectRoot));return b}(c);try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^pi-cwd-\d{8}$/.test(a)&&d.add((0,j.Nw)(h().join((0,f.homedir)(),a)))}catch{}for(let a of(0,k.HM)())d.add(a);try{d.add((0,l.qo)((0,i.$M)()))}catch{}return globalThis.__piAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function q(){return!0}function r(a,b){return!0}d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},86697:a=>{a.exports=require("node:path")},89477:a=>{a.exports=require("node:fs")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582],()=>b(b.s=62126));module.exports=c})();
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en" translate="no" class="__variable_66b8ca notranslate"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/7deddc85b7ffd1dc-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/ec14413c594b3356-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/88714c00e109ce28.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/b890757d9e0dd456.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/659eccb5db697b76.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-d2379fd13c5c78c6.js"/><script src="/_next/static/chunks/4bd1b696-e356ca5ba0218e27.js" async=""></script><script src="/_next/static/chunks/3794-907785a527d8128b.js" async=""></script><script src="/_next/static/chunks/main-app-06b2b50b226e40d1.js" async=""></script><script src="/_next/static/chunks/9780-0fa59080a2704139.js" async=""></script><script src="/_next/static/chunks/app/layout-88764b4be2728d3f.js" async=""></script><script src="/_next/static/chunks/d3ac728e-7964f816a1ca64e5.js" async=""></script><script src="/_next/static/chunks/e868780c-16e43c5968ccf2bf.js" async=""></script><script src="/_next/static/chunks/7874-4f48b670898adf75.js" async=""></script><script src="/_next/static/chunks/app/page-1524e08b5e4e4a34.js" async=""></script><meta name="next-size-adjust" content=""/><meta name="google" content="notranslate"/><title>Pidance</title><meta name="description" content="Open-source web client for the Pi coding agent"/><link rel="icon" href="/brand/pidance-logo.png"/><link rel="apple-touch-icon" href="/brand/pidance-logo.png"/><script>(function(){try{var r=document.documentElement,m=localStorage.getItem("pi-theme"),s=localStorage.getItem("pi-theme-style");if(m!=="light"&&m!=="dark"&&m!=="system")m="light";if(s!=="fusion"&&s!=="chamber")s="chamber";var d=m==="dark"||(m==="system"&&matchMedia("(prefers-color-scheme: dark)").matches);r.classList.toggle("dark",d);r.dataset.themeMode=m;r.dataset.themeStyle=s}catch(e){}})();</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body translate="no" class="notranslate" style="height:100dvh;display:flex;flex-direction:column"><div hidden=""><!--$--><!--/$--></div><!--$--><div style="flex:1;display:flex;align-items:center;justify-content:center;background:var(--bg);color:var(--text-muted);font-size:13px">Checking sign-in…</div><!--/$--><!--$--><!--/$--><script src="/_next/static/chunks/webpack-d2379fd13c5c78c6.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[99780,[\"9780\",\"static/chunks/9780-0fa59080a2704139.js\",\"7177\",\"static/chunks/app/layout-88764b4be2728d3f.js\"],\"I18nProvider\"]\n3:I[57121,[],\"\"]\n4:I[74581,[],\"\"]\n5:\"$Sreact.suspense\"\n6:I[84747,[\"7330\",\"static/chunks/d3ac728e-7964f816a1ca64e5.js\",\"3888\",\"static/chunks/e868780c-16e43c5968ccf2bf.js\",\"7874\",\"static/chunks/7874-4f48b670898adf75.js\",\"9780\",\"static/chunks/9780-0fa59080a2704139.js\",\"8974\",\"static/chunks/app/page-1524e08b5e4e4a34.js\"],\"UiLoginGate\"]\n7:I[92039,[\"7330\",\"static/chunks/d3ac728e-7964f816a1ca64e5.js\",\"3888\",\"static/chunks/e868780c-16e43c5968ccf2bf.js\",\"7874\",\"static/chunks/7874-4f48b670898adf75.js\",\"9780\",\"static/chunks/9780-0fa59080a2704139.js\",\"8974\",\"static/chunks/app/page-1524e08b5e4e4a34.js\"],\"AppShell\"]\n8:I[90484,[],\"OutletBoundary\"]\na:I[90484,[],\"ViewportBoundary\"]\nc:I[90484,[],\"MetadataBoundary\"]\ne:I[27123,[],\"default\",1]\n:HL[\"/_next/static/media/7deddc85b7ffd1dc-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/ec14413c594b3356-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/88714c00e109ce28.css\",\"style\"]\n:HL[\"/_next/static/css/b890757d9e0dd456.css\",\"style\"]\n:HL[\"/_next/static/css/659eccb5db697b76.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/88714c00e109ce28.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/b890757d9e0dd456.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"translate\":\"no\",\"className\":\"__variable_66b8ca notranslate\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"meta\",null,{\"name\":\"google\",\"content\":\"notranslate\"}],[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{var r=document.documentElement,m=localStorage.getItem(\\\"pi-theme\\\"),s=localStorage.getItem(\\\"pi-theme-style\\\");if(m!==\\\"light\\\"\u0026\u0026m!==\\\"dark\\\"\u0026\u0026m!==\\\"system\\\")m=\\\"light\\\";if(s!==\\\"fusion\\\"\u0026\u0026s!==\\\"chamber\\\")s=\\\"chamber\\\";var d=m===\\\"dark\\\"||(m===\\\"system\\\"\u0026\u0026matchMedia(\\\"(prefers-color-scheme: dark)\\\").matches);r.classList.toggle(\\\"dark\\\",d);r.dataset.themeMode=m;r.dataset.themeStyle=s}catch(e){}})();\"}}]]}],[\"$\",\"body\",null,{\"translate\":\"no\",\"className\":\"notranslate\",\"style\":{\"height\":\"100dvh\",\"display\":\"flex\",\"flexDirection\":\"column\"},\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$5\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L7\",null,{}]}]}],[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/659eccb5db697b76.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@9\"}]}]]}],{},null,false,null]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"3Ib_mKVkLPgOQQS2ZuNQ-\"}\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"f:I[86869,[],\"IconMark\"]\n9:null\nd:[[\"$\",\"title\",\"0\",{\"children\":\"Pidance\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Open-source web client for the Pi coding agent\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/brand/pidance-logo.png\"}],[\"$\",\"link\",\"3\",{\"rel\":\"apple-touch-icon\",\"href\":\"/brand/pidance-logo.png\"}],[\"$\",\"$Lf\",\"4\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en" translate="no" class="__variable_66b8ca notranslate"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/7deddc85b7ffd1dc-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/ec14413c594b3356-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/88714c00e109ce28.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/b890757d9e0dd456.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/659eccb5db697b76.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-d2379fd13c5c78c6.js"/><script src="/_next/static/chunks/4bd1b696-e356ca5ba0218e27.js" async=""></script><script src="/_next/static/chunks/3794-907785a527d8128b.js" async=""></script><script src="/_next/static/chunks/main-app-06b2b50b226e40d1.js" async=""></script><script src="/_next/static/chunks/9780-6c3a23bf3225b4e4.js" async=""></script><script src="/_next/static/chunks/app/layout-88764b4be2728d3f.js" async=""></script><script src="/_next/static/chunks/d3ac728e-7964f816a1ca64e5.js" async=""></script><script src="/_next/static/chunks/e868780c-16e43c5968ccf2bf.js" async=""></script><script src="/_next/static/chunks/7874-4f48b670898adf75.js" async=""></script><script src="/_next/static/chunks/app/page-b7557470a69f54d8.js" async=""></script><meta name="next-size-adjust" content=""/><meta name="google" content="notranslate"/><title>Pidance</title><meta name="description" content="Open-source web client for the Pi coding agent"/><link rel="icon" href="/brand/pidance-logo.png"/><link rel="apple-touch-icon" href="/brand/pidance-logo.png"/><script>(function(){try{var r=document.documentElement,m=localStorage.getItem("pi-theme"),s=localStorage.getItem("pi-theme-style");if(m!=="light"&&m!=="dark"&&m!=="system")m="light";if(s!=="fusion"&&s!=="chamber")s="chamber";var d=m==="dark"||(m==="system"&&matchMedia("(prefers-color-scheme: dark)").matches);r.classList.toggle("dark",d);r.dataset.themeMode=m;r.dataset.themeStyle=s}catch(e){}})();</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body translate="no" class="notranslate" style="height:100dvh;display:flex;flex-direction:column"><div hidden=""><!--$--><!--/$--></div><!--$--><div style="flex:1;display:flex;align-items:center;justify-content:center;background:var(--bg);color:var(--text-muted);font-size:13px">Checking sign-in…</div><!--/$--><!--$--><!--/$--><script src="/_next/static/chunks/webpack-d2379fd13c5c78c6.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[99780,[\"9780\",\"static/chunks/9780-6c3a23bf3225b4e4.js\",\"7177\",\"static/chunks/app/layout-88764b4be2728d3f.js\"],\"I18nProvider\"]\n3:I[57121,[],\"\"]\n4:I[74581,[],\"\"]\n5:\"$Sreact.suspense\"\n6:I[84747,[\"7330\",\"static/chunks/d3ac728e-7964f816a1ca64e5.js\",\"3888\",\"static/chunks/e868780c-16e43c5968ccf2bf.js\",\"7874\",\"static/chunks/7874-4f48b670898adf75.js\",\"9780\",\"static/chunks/9780-6c3a23bf3225b4e4.js\",\"8974\",\"static/chunks/app/page-b7557470a69f54d8.js\"],\"UiLoginGate\"]\n7:I[94369,[\"7330\",\"static/chunks/d3ac728e-7964f816a1ca64e5.js\",\"3888\",\"static/chunks/e868780c-16e43c5968ccf2bf.js\",\"7874\",\"static/chunks/7874-4f48b670898adf75.js\",\"9780\",\"static/chunks/9780-6c3a23bf3225b4e4.js\",\"8974\",\"static/chunks/app/page-b7557470a69f54d8.js\"],\"AppShell\"]\n8:I[90484,[],\"OutletBoundary\"]\na:I[90484,[],\"ViewportBoundary\"]\nc:I[90484,[],\"MetadataBoundary\"]\ne:I[27123,[],\"default\",1]\n:HL[\"/_next/static/media/7deddc85b7ffd1dc-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/ec14413c594b3356-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/88714c00e109ce28.css\",\"style\"]\n:HL[\"/_next/static/css/b890757d9e0dd456.css\",\"style\"]\n:HL[\"/_next/static/css/659eccb5db697b76.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/88714c00e109ce28.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/b890757d9e0dd456.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"translate\":\"no\",\"className\":\"__variable_66b8ca notranslate\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"meta\",null,{\"name\":\"google\",\"content\":\"notranslate\"}],[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{var r=document.documentElement,m=localStorage.getItem(\\\"pi-theme\\\"),s=localStorage.getItem(\\\"pi-theme-style\\\");if(m!==\\\"light\\\"\u0026\u0026m!==\\\"dark\\\"\u0026\u0026m!==\\\"system\\\")m=\\\"light\\\";if(s!==\\\"fusion\\\"\u0026\u0026s!==\\\"chamber\\\")s=\\\"chamber\\\";var d=m===\\\"dark\\\"||(m===\\\"system\\\"\u0026\u0026matchMedia(\\\"(prefers-color-scheme: dark)\\\").matches);r.classList.toggle(\\\"dark\\\",d);r.dataset.themeMode=m;r.dataset.themeStyle=s}catch(e){}})();\"}}]]}],[\"$\",\"body\",null,{\"translate\":\"no\",\"className\":\"notranslate\",\"style\":{\"height\":\"100dvh\",\"display\":\"flex\",\"flexDirection\":\"column\"},\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$5\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L7\",null,{}]}]}],[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/659eccb5db697b76.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@9\"}]}]]}],{},null,false,null]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"tSMtvUw39aEnL_q0KYTYU\"}\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"f:I[86869,[],\"IconMark\"]\n9:null\nd:[[\"$\",\"title\",\"0\",{\"children\":\"Pidance\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Open-source web client for the Pi coding agent\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/brand/pidance-logo.png\"}],[\"$\",\"link\",\"3\",{\"rel\":\"apple-touch-icon\",\"href\":\"/brand/pidance-logo.png\"}],[\"$\",\"$Lf\",\"4\",{}]]\n"])</script></body></html>
@@ -1,10 +1,10 @@
1
1
  1:"$Sreact.fragment"
2
- 2:I[99780,["9780","static/chunks/9780-0fa59080a2704139.js","7177","static/chunks/app/layout-88764b4be2728d3f.js"],"I18nProvider"]
2
+ 2:I[99780,["9780","static/chunks/9780-6c3a23bf3225b4e4.js","7177","static/chunks/app/layout-88764b4be2728d3f.js"],"I18nProvider"]
3
3
  3:I[57121,[],""]
4
4
  4:I[74581,[],""]
5
5
  5:"$Sreact.suspense"
6
- 6:I[84747,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-16e43c5968ccf2bf.js","7874","static/chunks/7874-4f48b670898adf75.js","9780","static/chunks/9780-0fa59080a2704139.js","8974","static/chunks/app/page-1524e08b5e4e4a34.js"],"UiLoginGate"]
7
- 7:I[92039,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-16e43c5968ccf2bf.js","7874","static/chunks/7874-4f48b670898adf75.js","9780","static/chunks/9780-0fa59080a2704139.js","8974","static/chunks/app/page-1524e08b5e4e4a34.js"],"AppShell"]
6
+ 6:I[84747,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-16e43c5968ccf2bf.js","7874","static/chunks/7874-4f48b670898adf75.js","9780","static/chunks/9780-6c3a23bf3225b4e4.js","8974","static/chunks/app/page-b7557470a69f54d8.js"],"UiLoginGate"]
7
+ 7:I[94369,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-16e43c5968ccf2bf.js","7874","static/chunks/7874-4f48b670898adf75.js","9780","static/chunks/9780-6c3a23bf3225b4e4.js","8974","static/chunks/app/page-b7557470a69f54d8.js"],"AppShell"]
8
8
  8:I[90484,[],"OutletBoundary"]
9
9
  a:I[90484,[],"ViewportBoundary"]
10
10
  c:I[90484,[],"MetadataBoundary"]
@@ -14,7 +14,7 @@ e:I[27123,[],"default",1]
14
14
  :HL["/_next/static/css/88714c00e109ce28.css","style"]
15
15
  :HL["/_next/static/css/b890757d9e0dd456.css","style"]
16
16
  :HL["/_next/static/css/659eccb5db697b76.css","style"]
17
- 0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/88714c00e109ce28.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/b890757d9e0dd456.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","translate":"no","className":"__variable_66b8ca notranslate","suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"name":"google","content":"notranslate"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var r=document.documentElement,m=localStorage.getItem(\"pi-theme\"),s=localStorage.getItem(\"pi-theme-style\");if(m!==\"light\"&&m!==\"dark\"&&m!==\"system\")m=\"light\";if(s!==\"fusion\"&&s!==\"chamber\")s=\"chamber\";var d=m===\"dark\"||(m===\"system\"&&matchMedia(\"(prefers-color-scheme: dark)\").matches);r.classList.toggle(\"dark\",d);r.dataset.themeMode=m;r.dataset.themeStyle=s}catch(e){}})();"}}]]}],["$","body",null,{"translate":"no","className":"notranslate","style":{"height":"100dvh","display":"flex","flexDirection":"column"},"children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}]]}],{"children":[["$","$1","c",{"children":[["$","$5",null,{"children":["$","$L6",null,{"children":["$","$L7",null,{}]}]}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/659eccb5db697b76.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@9"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$La",null,{"children":"$Lb"}],["$","div",null,{"hidden":true,"children":["$","$Lc",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$Ld"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$e",[]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"3Ib_mKVkLPgOQQS2ZuNQ-"}
17
+ 0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/88714c00e109ce28.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/b890757d9e0dd456.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","translate":"no","className":"__variable_66b8ca notranslate","suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"name":"google","content":"notranslate"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var r=document.documentElement,m=localStorage.getItem(\"pi-theme\"),s=localStorage.getItem(\"pi-theme-style\");if(m!==\"light\"&&m!==\"dark\"&&m!==\"system\")m=\"light\";if(s!==\"fusion\"&&s!==\"chamber\")s=\"chamber\";var d=m===\"dark\"||(m===\"system\"&&matchMedia(\"(prefers-color-scheme: dark)\").matches);r.classList.toggle(\"dark\",d);r.dataset.themeMode=m;r.dataset.themeStyle=s}catch(e){}})();"}}]]}],["$","body",null,{"translate":"no","className":"notranslate","style":{"height":"100dvh","display":"flex","flexDirection":"column"},"children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}]]}],{"children":[["$","$1","c",{"children":[["$","$5",null,{"children":["$","$L6",null,{"children":["$","$L7",null,{}]}]}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/659eccb5db697b76.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@9"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$La",null,{"children":"$Lb"}],["$","div",null,{"hidden":true,"children":["$","$Lc",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$Ld"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$e",[]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"tSMtvUw39aEnL_q0KYTYU"}
18
18
  b:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
19
19
  f:I[86869,[],"IconMark"]
20
20
  9:null
@@ -1,8 +1,8 @@
1
1
  1:"$Sreact.fragment"
2
2
  2:"$Sreact.suspense"
3
- 3:I[84747,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-16e43c5968ccf2bf.js","7874","static/chunks/7874-4f48b670898adf75.js","9780","static/chunks/9780-0fa59080a2704139.js","8974","static/chunks/app/page-1524e08b5e4e4a34.js"],"UiLoginGate"]
4
- 4:I[92039,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-16e43c5968ccf2bf.js","7874","static/chunks/7874-4f48b670898adf75.js","9780","static/chunks/9780-0fa59080a2704139.js","8974","static/chunks/app/page-1524e08b5e4e4a34.js"],"AppShell"]
3
+ 3:I[84747,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-16e43c5968ccf2bf.js","7874","static/chunks/7874-4f48b670898adf75.js","9780","static/chunks/9780-6c3a23bf3225b4e4.js","8974","static/chunks/app/page-b7557470a69f54d8.js"],"UiLoginGate"]
4
+ 4:I[94369,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-16e43c5968ccf2bf.js","7874","static/chunks/7874-4f48b670898adf75.js","9780","static/chunks/9780-6c3a23bf3225b4e4.js","8974","static/chunks/app/page-b7557470a69f54d8.js"],"AppShell"]
5
5
  5:I[90484,[],"OutletBoundary"]
6
6
  :HL["/_next/static/css/659eccb5db697b76.css","style"]
7
- 0:{"rsc":["$","$1","c",{"children":[["$","$2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{}]}]}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/659eccb5db697b76.css","precedence":"next"}]],["$","$L5",null,{"children":["$","$2",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"3Ib_mKVkLPgOQQS2ZuNQ-"}
7
+ 0:{"rsc":["$","$1","c",{"children":[["$","$2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{}]}]}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/659eccb5db697b76.css","precedence":"next"}]],["$","$L5",null,{"children":["$","$2",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"tSMtvUw39aEnL_q0KYTYU"}
8
8
  6:null