module.exports=[918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},340060,e=>{"use strict";e.s(["resolve",0,function(e){let t=globalThis.__shepContainer;if(!t)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return t.resolve(e)}])},704142,e=>{"use strict";var t=e.i(616881),r=e.i(423705),n=e.i(259355),a=e.i(445367),s=e.i(536661),i=e.i(669355),o=e.i(716632),l=e.i(403966),d=e.i(991885),u=e.i(740322),c=e.i(209383),p=e.i(35916),v=e.i(300984),h=e.i(431820),g=e.i(91357),f=e.i(193695);e.i(605063);var R=e.i(539271),x=e.i(340060);e.s(["GET",0,function(e){let t=(0,x.resolve)("ILogger");try{let r=new URL(e.url).searchParams.get("runId")??void 0,n=new ReadableStream({start(n){let a=new TextEncoder,s=!1,i=e=>{if(!s)try{n.enqueue(a.encode(e))}catch{}},o=e=>{if("notification"===e.kind)t.debug(`[SSE] emit: ${e.event.eventType} for "${e.event.featureName}"${e.event.phaseName?` (${e.event.phaseName})`:""}`),i(`event: notification
data: ${JSON.stringify(e.event)}

`);else if("interactive-session"===e.kind){let t={type:e.type,sessionId:e.sessionId,featureId:e.featureId};i(`event: interactive_session
data: ${JSON.stringify(t)}

`)}else"agent_message"===e.kind?i(`event: agent_message
data: ${JSON.stringify(e)}

`):"agent_question"===e.kind?i(`event: agent_question
data: ${JSON.stringify(e)}

`):"supervisor_decision"===e.kind&&i(`event: supervisor_decision
data: ${JSON.stringify(e)}

`)},l=new AbortController,d=()=>{if(!s){s=!0,l.abort(),clearInterval(u);try{n.close()}catch{}}},u=setInterval(()=>{i(": heartbeat\n\n")},3e4);e.signal.addEventListener("abort",d,{once:!0}),(async()=>{try{for await(let e of(0,x.resolve)("StreamAgentEventsUseCase").execute({runIdFilter:r,signal:l.signal})){if(s)break;o(e)}}catch(e){t.error(`[SSE /api/agent-events] generator error: ${e instanceof Error?e.message:String(e)}`)}finally{d()}})()}});return new Response(n,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}catch(e){return t.error(`[SSE route] GET handler error: ${e instanceof Error?e.message:String(e)}`),new Response(JSON.stringify({error:String(e)}),{status:500,headers:{"Content-Type":"application/json"}})}},"dynamic",0,"force-dynamic"],650328);var m=e.i(650328);let E=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/agent-events/route",pathname:"/api/agent-events",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/agent-events/route.ts",nextConfigOutput:"standalone",userland:m,...{}}),{workAsyncStorage:w,workUnitAsyncStorage:y,serverHooks:C}=E;async function b(e,t,n){n.requestMeta&&(0,a.setRequestMeta)(e,n.requestMeta),E.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let x="/api/agent-events/route";x=x.replace(/\/index$/,"")||"/";let m=await E.prepare(e,t,{srcPage:x,multiZoneDraftMode:!1});if(!m)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:w,deploymentId:y,params:C,nextConfig:b,parsedUrl:S,isDraftMode:N,prerenderManifest:A,routerServerContext:T,isOnDemandRevalidate:_,revalidateOnlyGenerated:O,resolvedPathname:k,clientReferenceManifest:I,serverActionsManifest:q}=m,P=(0,o.normalizeAppPath)(x),$=!!(A.dynamicRoutes[P]||A.routes[k]),U=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,S,!1):t.end("This page could not be found"),null);if($&&!N){let e=!!A.routes[k],t=A.dynamicRoutes[P];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await U();throw new f.NoFallbackError}}let H=null;!$||E.isDev||N||(H="/index"===(H=k)?"/":H);let j=!0===E.isDev||!$,M=$&&!j;q&&I&&(0,i.setManifestsSingleton)({page:x,clientReferenceManifest:I,serverActionsManifest:q});let D=e.method||"GET",L=(0,s.getTracer)(),F=L.getActiveScopeSpan(),K=!!(null==T?void 0:T.isWrappedByNextServer),B=!!(0,a.getRequestMeta)(e,"minimalMode"),J=(0,a.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,b,A,B);null==J||J.resetRequestCache(),globalThis.__incrementalCache=J;let G={params:C,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:j,incrementalCache:J,cacheLifeProfiles:b.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>E.onRequestError(e,t,n,a,T)},sharedContext:{buildId:w,deploymentId:y}},V=new l.NodeNextRequest(e),W=new l.NodeNextResponse(t),X=d.NextRequestAdapter.fromNodeNextRequest(V,(0,d.signalFromNodeResponse)(t));try{let a,i=async e=>E.handle(X,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=L.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${D} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",n),a.updateName(t))}else e.updateName(`${D} ${x}`)}),o=async a=>{var s,o;let l=async({previousCacheEntry:r})=>{try{if(!B&&_&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(a);e.fetchMetrics=G.renderOpts.fetchMetrics;let o=G.renderOpts.pendingWaitUntil;o&&n.waitUntil&&(n.waitUntil(o),o=void 0);let l=G.renderOpts.collectedTags;if(!$)return await (0,p.sendResponse)(V,W,s,G.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,v.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[g.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,n=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:x,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:_})},!1,T),t}},d=await E.handleResponse({req:e,nextConfig:b,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:_,revalidateOnlyGenerated:O,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:B});if(!$)return null;if((null==d||null==(s=d.value)?void 0:s.kind)!==R.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(o=d.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",_?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,v.fromNodeOutgoingHttpHeaders)(d.value.headers);return B&&$||u.delete(g.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,h.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(V,W,new Response(d.value.body,{headers:u,status:d.value.status||200})),null};K&&F?await o(F):(a=L.getActiveScopeSpan(),await L.withPropagatedContext(e.headers,()=>L.trace(u.BaseServerSpan.handleRequest,{spanName:`${D} ${x}`,kind:s.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},o),void 0,!K))}catch(t){if(t instanceof f.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:_})},!1,T),$)throw t;return await (0,p.sendResponse)(V,W,new Response(null,{status:500})),null}}e.s(["handler",0,b,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:y})},"routeModule",0,E,"serverHooks",0,C,"workAsyncStorage",0,w,"workUnitAsyncStorage",0,y],704142)}];

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