botmancers 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/README.md +22 -17
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +7 -0
- package/app/.next/build-manifest.json +3 -3
- package/app/.next/prerender-manifest.json +5 -5
- package/app/.next/required-server-files.json +2 -2
- package/app/.next/routes-manifest.json +55 -0
- package/app/.next/server/app/_global-error.html +1 -1
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_not-found.html +1 -1
- package/app/.next/server/app/_not-found.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/api/agent-deck/decks/route.js +2 -2
- package/app/.next/server/app/api/agent-deck/decks/route.js.nft.json +1 -1
- package/app/.next/server/app/api/agent-deck/settings/route.js +2 -2
- package/app/.next/server/app/api/agent-deck/settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/config/route.js +2 -2
- package/app/.next/server/app/api/bots/[id]/config/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route.js +12 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route.js.nft.json +1 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/route.js +2 -2
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/route.js +6 -3
- package/app/.next/server/app/api/bots/[id]/sessions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/skill/route.js +2 -2
- package/app/.next/server/app/api/bots/[id]/skill/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/availability/route.js +2 -2
- package/app/.next/server/app/api/bots/availability/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/delete-preview/route.js +2 -2
- package/app/.next/server/app/api/bots/delete-preview/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/import/route.js +2 -2
- package/app/.next/server/app/api/bots/import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/manage/route.js +2 -2
- package/app/.next/server/app/api/bots/manage/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/name-migrations/route.js +2 -2
- package/app/.next/server/app/api/bots/name-migrations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/route.js +3 -3
- package/app/.next/server/app/api/bots/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/approve/route.js +4 -4
- package/app/.next/server/app/api/conversations/[id]/approve/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/deny/route.js +4 -4
- package/app/.next/server/app/api/conversations/[id]/deny/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/draft/route.js +4 -4
- package/app/.next/server/app/api/conversations/[id]/draft/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/messages/[messageId]/stop/route.js +2 -2
- package/app/.next/server/app/api/conversations/[id]/messages/[messageId]/stop/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/messages/route.js +5 -5
- package/app/.next/server/app/api/conversations/[id]/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/route.js +2 -2
- package/app/.next/server/app/api/conversations/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/stop/route.js +3 -3
- package/app/.next/server/app/api/conversations/[id]/stop/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/route.js +2 -2
- package/app/.next/server/app/api/conversations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/exchanges/[id]/cancel/route.js +4 -4
- package/app/.next/server/app/api/exchanges/[id]/cancel/route.js.nft.json +1 -1
- package/app/.next/server/app/api/exchanges/[id]/route.js +3 -3
- package/app/.next/server/app/api/exchanges/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/exchanges/route.js +3 -3
- package/app/.next/server/app/api/exchanges/route.js.nft.json +1 -1
- package/app/.next/server/app/api/files/[name]/route.js +3 -2
- package/app/.next/server/app/api/files/[name]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/groups/route.js +2 -2
- package/app/.next/server/app/api/groups/route.js.nft.json +1 -1
- package/app/.next/server/app/api/health/route.js +3 -2
- package/app/.next/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next/server/app/api/mcp/route.js +2 -2
- package/app/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/app/.next/server/app/api/messages/[id]/between/route.js +2 -2
- package/app/.next/server/app/api/messages/[id]/between/route.js.nft.json +1 -1
- package/app/.next/server/app/api/runtime-connections/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/runtime-connections/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/runtime-connections/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/runtime-connections/route.js +9 -0
- package/app/.next/server/app/api/runtime-connections/route.js.nft.json +1 -0
- package/app/.next/server/app/api/runtime-connections/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/service-grants/route.js +2 -2
- package/app/.next/server/app/api/service-grants/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/conversations/[conversationId]/route.js +7 -6
- package/app/.next/server/app/api/v0/agents/[agentId]/conversations/[conversationId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/conversations/route.js +7 -6
- package/app/.next/server/app/api/v0/agents/[agentId]/conversations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/messages/route.js +4 -4
- package/app/.next/server/app/api/v0/agents/[agentId]/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/pins/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/agents/[agentId]/pins/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/agents/[agentId]/pins/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/agents/[agentId]/pins/route.js +12 -0
- package/app/.next/server/app/api/v0/agents/[agentId]/pins/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/agents/[agentId]/pins/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/v0/agents/[agentId]/route.js +7 -6
- package/app/.next/server/app/api/v0/agents/[agentId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/sessions/[ref]/route.js +7 -6
- package/app/.next/server/app/api/v0/agents/[agentId]/sessions/[ref]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/sessions/route.js +7 -6
- package/app/.next/server/app/api/v0/agents/[agentId]/sessions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/route.js +7 -6
- package/app/.next/server/app/api/v0/agents/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/capabilities/route.js +7 -6
- package/app/.next/server/app/api/v0/capabilities/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/conversations/[id]/route.js +4 -4
- package/app/.next/server/app/api/v0/conversations/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/exchanges/[id]/cancel/route.js +7 -6
- package/app/.next/server/app/api/v0/exchanges/[id]/cancel/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/exchanges/[id]/route.js +7 -6
- package/app/.next/server/app/api/v0/exchanges/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/exchanges/route.js +7 -6
- package/app/.next/server/app/api/v0/exchanges/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/mcp/route.js +8 -7
- package/app/.next/server/app/api/v0/mcp/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route.js +12 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route.js +12 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/route.js +12 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/v0/requests/[id]/route.js +4 -4
- package/app/.next/server/app/api/v0/requests/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/sessions/[ref]/messages/route.js +7 -6
- package/app/.next/server/app/api/v0/sessions/[ref]/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/sessions/[ref]/pins/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/pins/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/pins/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/pins/route.js +12 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/pins/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/pins/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/wake-grants/[id]/revoke/route.js +4 -4
- package/app/.next/server/app/api/wake-grants/[id]/revoke/route.js.nft.json +1 -1
- package/app/.next/server/app/api/wakes/[id]/decision/route.js +4 -4
- package/app/.next/server/app/api/wakes/[id]/decision/route.js.nft.json +1 -1
- package/app/.next/server/app/api/wakes/[id]/retry/route.js +4 -4
- package/app/.next/server/app/api/wakes/[id]/retry/route.js.nft.json +1 -1
- package/app/.next/server/app/bots/[id]/config/page.js.nft.json +1 -1
- package/app/.next/server/app/bots/[id]/config/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/exchanges/page.js.nft.json +1 -1
- package/app/.next/server/app/exchanges/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/exchanges.html +1 -1
- package/app/.next/server/app/exchanges.rsc +3 -3
- package/app/.next/server/app/exchanges.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/exchanges.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/exchanges.segments/exchanges/__PAGE__.segment.rsc +3 -3
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +3 -3
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/app/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/page.js.nft.json +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/settings/page.js.nft.json +1 -1
- package/app/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/settings.html +1 -1
- package/app/.next/server/app/settings.rsc +3 -3
- package/app/.next/server/app/settings.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +3 -3
- package/app/.next/server/app/threads/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/threads/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +7 -0
- package/app/.next/server/chunks/1oeh_server_app_api_bots_[id]_sessions_[ref]_pins_route_actions_0e1st6o.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__02kssr-._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__06qkt0f._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__08qhrch._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__097ptn_._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__09m9-pe._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0b7w1z3._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0f5yqjs._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0g4um3-._.js +44 -0
- package/app/.next/server/chunks/[root-of-the-server]__0hro5ey._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0hwpgxq._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0izjfmr._.js +355 -60
- package/app/.next/server/chunks/[root-of-the-server]__0lwsto-._.js +5 -0
- package/app/.next/server/chunks/[root-of-the-server]__0s1enbp._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0uq7sci._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0wg992i._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__13cd2fb._.js +44 -0
- package/app/.next/server/chunks/[root-of-the-server]__17mum5-._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1879cge._.js +3 -0
- package/app/.next/server/chunks/{[root-of-the-server]__17oz13o._.js → [root-of-the-server]__1_01-13._.js} +3 -3
- package/app/.next/server/chunks/[root-of-the-server]__1a2dh11._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1bhzfu_._.js +7 -0
- package/app/.next/server/chunks/[root-of-the-server]__1co3sok._.js +44 -0
- package/app/.next/server/chunks/[root-of-the-server]__1eh30sp._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1fmsid0._.js +44 -0
- package/app/.next/server/chunks/[root-of-the-server]__1i388e2._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1kvvs4u._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1qbgs3m._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1s6h1sj._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1slu7d7._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__1tuqc5v._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1v609eq._.js +44 -0
- package/app/.next/server/chunks/[root-of-the-server]__1y_j43n._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1zdv-vb._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1zjs2tr._.js +3 -0
- package/app/.next/server/chunks/_0061c2q._.js +3 -0
- package/app/.next/server/chunks/_023se5j._.js +44 -0
- package/app/.next/server/chunks/_02pb_qv._.js +44 -0
- package/app/.next/server/chunks/_05ro-21._.js +44 -0
- package/app/.next/server/chunks/_07on0dc._.js +44 -0
- package/app/.next/server/chunks/_08208nz._.js +44 -0
- package/app/.next/server/chunks/_0a2do3x._.js +1 -1
- package/app/.next/server/chunks/_0fe5qz5._.js +44 -0
- package/app/.next/server/chunks/_0i8_xso._.js +3 -0
- package/app/.next/server/chunks/_0qoji5a._.js +44 -0
- package/app/.next/server/chunks/_0uv2pi5._.js +44 -0
- package/app/.next/server/chunks/_0wdl90-._.js +44 -0
- package/app/.next/server/chunks/_1-5mthb._.js +1 -1
- package/app/.next/server/chunks/_11-q8k1._.js +3 -0
- package/app/.next/server/chunks/_11ijk9k._.js +44 -0
- package/app/.next/server/chunks/_198sn69._.js +44 -0
- package/app/.next/server/chunks/_1ba_5hd._.js +44 -0
- package/app/.next/server/chunks/_1ess5if._.js +3 -0
- package/app/.next/server/chunks/_1i0zod4._.js +3 -0
- package/app/.next/server/chunks/_1m89jq5._.js +44 -0
- package/app/.next/server/chunks/_1n39wr_._.js +44 -0
- package/app/.next/server/chunks/_1ryxqo1._.js +44 -0
- package/app/.next/server/chunks/_1vemgly._.js +44 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_runtime-connections_route_actions_06rulng.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_agents_[agentId]_pins_route_actions_08uftk9.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_pins_[pinRef]_detach_route_actions_0nk3268.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_pins_[pinRef]_messages_route_actions_1wenu96.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_pins_[pinRef]_route_actions_0z7fu_c.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_sessions_[ref]_pins_route_actions_0y3ere3.js +3 -0
- package/app/.next/server/chunks/lib_0kik6bx._.js +1 -1
- package/app/.next/server/chunks/lib_0lqoyb4._.js +217 -0
- package/app/.next/server/chunks/lib_0pe3tiv._.js +1 -1
- package/app/.next/server/chunks/lib_0riiofz._.js +44 -0
- package/app/.next/server/chunks/lib_16j2293._.js +217 -0
- package/app/.next/server/chunks/lib_1nb_61e._.js +217 -0
- package/app/.next/server/chunks/lib_service-api-http_ts_0xzqhny._.js +5 -5
- package/app/.next/server/chunks/lib_session-pins_ts_0lmxnwj._.js +20 -0
- package/app/.next/server/chunks/ssr/_0epgorw._.js +3 -0
- package/app/.next/server/chunks/ssr/_1cvuhjt._.js +3 -0
- package/app/.next/server/chunks/ssr/_1n5mvo5._.js +3 -0
- package/app/.next/server/chunks/ssr/_1o94bnv._.js +1 -1
- package/app/.next/server/chunks/ssr/app_bots_[id]_config_page_tsx_1e0uue9._.js +1 -1
- package/app/.next/server/chunks/ssr/app_components_AgentDeckRuntime_tsx_024janf._.js +1 -1
- package/app/.next/server/chunks/ssr/app_components_ExchangeCard_tsx_1shfcgn._.js +3 -0
- package/app/.next/server/chunks/ssr/app_exchanges_page_tsx_0j-n2a1._.js +3 -0
- package/app/.next/server/chunks/ssr/node_modules_@swc_helpers_cjs__interop_require_default_cjs_1ztp13a._.js +3 -0
- package/app/.next/server/middleware-build-manifest.js +3 -3
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +1 -1
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/0bhd8eso48g27.js +1 -0
- package/app/.next/static/chunks/1ku9himlsx-hn.js +1 -0
- package/app/.next/static/chunks/21aqekm5z0j47.js +1 -0
- package/app/.next/static/chunks/2a8bomryx66oj.css +3 -0
- package/app/.next/static/chunks/3230ywnpii0s6.js +3 -0
- package/app/.next/static/chunks/35l2c95bd-jud.js +1 -0
- package/app/.next/static/chunks/3cijpn6vx3yzv.js +1 -0
- package/app/.next/static/chunks/3ue9194j59kem.js +1 -0
- package/app/.next/static/chunks/44ese2s4gzze_.js +1 -0
- package/app/BUILD_INFO.json +2 -2
- package/app/package.json +1 -1
- package/app/server.js +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +2 -2
- package/dist/clients.js +7 -3
- package/dist/config.d.ts +2 -1
- package/dist/config.js +5 -4
- package/dist/contract.d.ts +1 -0
- package/dist/contract.js +5 -0
- package/dist/home.d.ts +1 -1
- package/dist/home.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/product.js +1 -1
- package/dist/upstream.js +2 -2
- package/package.json +1 -1
- package/schemas/botmancers.mcp.v2.tools.json +1588 -4
- package/skills/botmancers-collaboration/SKILL.md +21 -6
- package/skills/botmancers-collaboration/references/workflows.md +72 -0
- package/app/.next/server/chunks/[root-of-the-server]__0ab4e_k._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__0qozubc._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__0wtzcge._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__10m3szc._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__15hknun._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__16ikszu._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1afl75n._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1kvvdpx._.js +0 -7
- package/app/.next/server/chunks/[root-of-the-server]__1qoa704._.js +0 -7
- package/app/.next/server/chunks/_06rti77._.js +0 -30
- package/app/.next/server/chunks/_09k38l1._.js +0 -3
- package/app/.next/server/chunks/_0dlg5kj._.js +0 -30
- package/app/.next/server/chunks/_0dyculb._.js +0 -30
- package/app/.next/server/chunks/_0eig2jc._.js +0 -30
- package/app/.next/server/chunks/_0ggf7vy._.js +0 -3
- package/app/.next/server/chunks/_0gtqbub._.js +0 -3
- package/app/.next/server/chunks/_0i7ga8c._.js +0 -3
- package/app/.next/server/chunks/_0kghtb6._.js +0 -3
- package/app/.next/server/chunks/_0orubev._.js +0 -3
- package/app/.next/server/chunks/_0sfpe9z._.js +0 -3
- package/app/.next/server/chunks/_0th2j4w._.js +0 -3
- package/app/.next/server/chunks/_0uz7r06._.js +0 -30
- package/app/.next/server/chunks/_0x05ts4._.js +0 -3
- package/app/.next/server/chunks/_0y3geoj._.js +0 -30
- package/app/.next/server/chunks/_12tq5uv._.js +0 -30
- package/app/.next/server/chunks/_147-4gl._.js +0 -3
- package/app/.next/server/chunks/_14ky6a2._.js +0 -30
- package/app/.next/server/chunks/_16kbxdt._.js +0 -30
- package/app/.next/server/chunks/_1963m2f._.js +0 -30
- package/app/.next/server/chunks/_1_34_h3._.js +0 -30
- package/app/.next/server/chunks/_1cc-2mx._.js +0 -3
- package/app/.next/server/chunks/_1ee4ej2._.js +0 -3
- package/app/.next/server/chunks/_1esxu1s._.js +0 -3
- package/app/.next/server/chunks/_1gn7eh7._.js +0 -3
- package/app/.next/server/chunks/_1gw7qwf._.js +0 -3
- package/app/.next/server/chunks/_1inyx08._.js +0 -3
- package/app/.next/server/chunks/_1kjsnlr._.js +0 -3
- package/app/.next/server/chunks/_1nurj3f._.js +0 -30
- package/app/.next/server/chunks/_1p2rf_n._.js +0 -30
- package/app/.next/server/chunks/_1p8rola._.js +0 -3
- package/app/.next/server/chunks/_1u6tw78._.js +0 -30
- package/app/.next/server/chunks/app_api_import-capabilities_route_ts_013w1kt._.js +0 -3
- package/app/.next/server/chunks/lib_0t3s3rj._.js +0 -30
- package/app/.next/server/chunks/lib_0zxi6rx._.js +0 -148
- package/app/.next/server/chunks/lib_12udr7g._.js +0 -148
- package/app/.next/server/chunks/lib_draft_ts_1atoius._.js +0 -3
- package/app/.next/server/chunks/lib_session-catalog_ts_1i7f38f._.js +0 -30
- package/app/.next/server/chunks/ssr/_00ysoah._.js +0 -3
- package/app/.next/server/chunks/ssr/_157wnb_._.js +0 -3
- package/app/.next/server/chunks/ssr/app_1-nwnha._.js +0 -3
- package/app/.next/server/chunks/ssr/app_components_0bhuhd-._.js +0 -3
- package/app/.next/server/chunks/ssr/app_components_0w2_b3t._.js +0 -3
- package/app/.next/static/chunks/0774d7ob6aze_.js +0 -1
- package/app/.next/static/chunks/0d3ein53nlgja.js +0 -1
- package/app/.next/static/chunks/1i5xroz391zkb.js +0 -1
- package/app/.next/static/chunks/1vz50l951sr9e.css +0 -3
- package/app/.next/static/chunks/24ggj819yt3y6.js +0 -1
- package/app/.next/static/chunks/2_8lcalraul5s.js +0 -3
- package/app/.next/static/chunks/30i0-l04mmdvk.js +0 -1
- package/app/.next/static/chunks/3wdlh25l1vww9.js +0 -1
- /package/app/.next/static/{ewp56HqU5-d9bpFog3bli → gh3shm8hnVqXLr75rmvsL}/_buildManifest.js +0 -0
- /package/app/.next/static/{ewp56HqU5-d9bpFog3bli → gh3shm8hnVqXLr75rmvsL}/_clientMiddlewareManifest.js +0 -0
- /package/app/.next/static/{ewp56HqU5-d9bpFog3bli → gh3shm8hnVqXLr75rmvsL}/_ssgManifest.js +0 -0
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
module.exports=[42104,e=>{"use strict";var t=e.i(69936);async function a(e){return(0,t.handleListAgents)(e)}e.s(["GET",0,a])},68473,e=>{"use strict";var t=e.i(47909),a=e.i(74017),n=e.i(96250),r=e.i(59756),i=e.i(61916),s=e.i(74677),o=e.i(69741),d=e.i(16795),l=e.i(87718),u=e.i(95169),c=e.i(47587),_=e.i(66012),p=e.i(70101),g=e.i(26937),h=e.i(10372),v=e.i(93695),E=e.i(9580);e.i(52474);var m=e.i(220);let R=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/v0/agents/route",pathname:"/api/v0/agents",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/v0/agents/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(42104),...{}}),{workAsyncStorage:A,workUnitAsyncStorage:b,serverHooks:f}=R;async function S(e,t,n){n.requestMeta&&(0,r.setRequestMeta)(e,n.requestMeta),R.isDev&&(0,r.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let A="/api/v0/agents/route";A=A.replace(/\/index$/,"")||"/";let b=await R.prepare(e,t,{srcPage:A,multiZoneDraftMode:!1});if(!b)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:f,deploymentId:S,params:C,nextConfig:O,parsedUrl:N,isDraftMode:w,prerenderManifest:T,routerServerContext:q,isOnDemandRevalidate:x,revalidateOnlyGenerated:y,resolvedPathname:k,clientReferenceManifest:I,serverActionsManifest:L}=b,H=(0,o.normalizeAppPath)(A),P=!!T.routes[k]&&(R.isDev||(0,E.isRouteCacheOwner)(k,R.cacheOwner,T.routes[k])),M=!!(T.dynamicRoutes[H]||P),D=async()=>((null==q?void 0:q.render404)?await q.render404(e,t,N,!1):t.end("This page could not be found"),null);if(M&&!w){let e=T.dynamicRoutes[H];if(e&&!1===e.fallback&&!P){if(O.adapterPath)return await D();throw new v.NoFallbackError}}let F=null;!M||R.isDev||w||(F="/index"===(F=k)?"/":F);let U=!0===R.isDev||!M,$=M&&!U;L&&I&&(0,s.setManifestsSingleton)({page:A,clientReferenceManifest:I,serverActionsManifest:L});let J=e.method||"GET",W=(0,i.getTracer)(),G=W.getActiveScopeSpan(),K=!!(null==q?void 0:q.isWrappedByNextServer),j=!!(0,r.getRequestMeta)(e,"minimalMode"),B=(0,r.getRequestMeta)(e,"incrementalCache")||await R.getIncrementalCache(e,O,T,j);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let X={params:C,previewProps:T.preview,renderOpts:{experimental:{authInterrupts:!!O.experimental.authInterrupts,useCacheTimeout:O.experimental.useCacheTimeout},cacheComponents:!!O.cacheComponents,validationLevel:O.experimental.instantInsights.validationLevel,isDraftMode:w,supportsDynamicResponse:U,incrementalCache:B,hmrRefreshHash:(0,r.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:O.cacheLife,staticPageGenerationTimeout:O.staticPageGenerationTimeout,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,n,r)=>R.onRequestError(e,t,n,r,q)},sharedContext:{buildId:f,deploymentId:S}},V=new d.NodeNextRequest(e),z=new d.NodeNextResponse(t),Y=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:a})=>{try{if(!j&&x&&y&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let r=await R.handle(Y,X);e.fetchMetrics=X.renderOpts.fetchMetrics;let i=X.renderOpts.pendingWaitUntil;i&&n.waitUntil&&(n.waitUntil(i),i=void 0);let s=X.renderOpts.collectedTags;if(!M)return await (0,_.sendResponse)(V,z,r,i),null;{let e=await r.blob(),t=(0,p.toNodeOutgoingHttpHeaders)(r.headers);s&&(t[h.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,n=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=h.INFINITE_CACHE?!1!==a&&a>0?O.expireTime:void 0:X.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:r.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:n}}}}catch(t){throw(null==a?void 0:a.isStale)&&await R.onRequestError(e,t,{routerKind:"App Router",routePath:A,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:x})},!1,q),t}},Q=async(r,s)=>{try{var o,d;let r=await R.handleResponse({req:e,nextConfig:O,cacheKey:F,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:x,revalidateOnlyGenerated:y,responseGenerator:Z,waitUntil:n.waitUntil,isMinimalMode:j});if(!M)return;if((null==r||null==(o=r.value)?void 0:o.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==r||null==(d=r.value)?void 0:d.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});j||t.setHeader("x-nextjs-cache",x?"REVALIDATED":r.isMiss?"MISS":r.isStale?"STALE":"HIT"),w&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,p.fromNodeOutgoingHttpHeaders)(r.value.headers);j&&M||i.delete(h.NEXT_CACHE_TAGS_HEADER),!r.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,g.getCacheControlHeader)(r.cacheControl)),await (0,_.sendResponse)(V,z,new Response(r.value.body,{headers:i,status:r.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await R.onRequestError(e,t,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:x})},!1,q),M)throw t;await (0,_.sendResponse)(V,z,new Response(null,{status:500}));return}finally{(()=>{if(!r)return;let e=t.statusCode;r.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(r.setStatus({code:i.SpanStatusCode.ERROR}),r.setAttribute("error.type",e.toString()));let a=W.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=a.get("next.route")||H,o=`${J} ${n}`;r.setAttributes({"next.route":n,"http.route":n,"next.span_name":o}),r.updateName(o),s&&s!==r&&(s.setAttribute("http.route",n),s.updateName(o))})()}};if(K&&G)await Q(G,void 0);else{let t=W.getActiveScopeSpan();await W.withPropagatedContext(e.headers,()=>W.trace(u.BaseServerSpan.handleRequest,{spanName:`${J} ${A}`,kind:i.SpanKind.SERVER,attributes:{"http.method":J,"http.target":e.url}},e=>Q(e,t)),void 0,!K)}}e.s(["handler",0,S,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:b})},"routeModule",0,R,"serverHooks",0,f,"workAsyncStorage",0,A,"workUnitAsyncStorage",0,b])},90027,e=>{"use strict";var t=e.i(62349);let a=["active","ended","all"],n=["implementation","revision"],r=`
|
|
2
|
-
SELECT b.*, bot.name AS agent_name, bot.agent AS agent_runtime, r.id AS origin_request_id, c.id AS origin_conversation_id,
|
|
3
|
-
c.type AS conversation_type, c.bot_id AS conversation_bot_id, tb.name AS thread_agent_name, g.name AS group_name,
|
|
4
|
-
r.intent AS request_intent, r.execution_kind AS request_kind, r.state AS request_state,
|
|
5
|
-
r.source_conversation_id AS request_conversation_id, r.target_agent_id AS request_target_agent_id,
|
|
6
|
-
sa.launch_snapshot AS source_snapshot, sa.finished_at AS source_finished_at,
|
|
7
|
-
(SELECT MAX(COALESCE(ra.finished_at, ra.started_at)) FROM work_attempts ra WHERE ra.resumed_session_binding_id = b.id) AS resumed_last_at
|
|
8
|
-
FROM session_bindings b
|
|
9
|
-
JOIN bots bot ON bot.id = b.agent_id
|
|
10
|
-
LEFT JOIN work_attempts sa ON sa.id = b.source_attempt_id
|
|
11
|
-
LEFT JOIN work_requests r ON r.id = COALESCE(b.request_id, sa.request_id)
|
|
12
|
-
LEFT JOIN conversations c ON c.id = COALESCE(b.conversation_id, r.source_conversation_id)
|
|
13
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
14
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
15
|
-
`;function i(e,t){let a=e?.[t];return"string"==typeof a&&a.trim().length>0?a:null}function s(e){let t=e.origin_conversation_id;return t?"group"===e.conversation_type?{id:t,kind:"group",label:e.group_name?`Group ${e.group_name}`:"Group thread",thread_agent_id:null}:"bot"===e.conversation_type&&e.conversation_bot_id?{id:t,kind:"direct",label:e.thread_agent_name?`${e.thread_agent_name} thread`:"Agent thread",thread_agent_id:e.thread_agent_name?e.conversation_bot_id:null}:{id:t,kind:"agent_api",label:"Agent API conversation",thread_agent_id:null}:null}function o(e){var a;let r,o=null;try{o=e.source_snapshot?JSON.parse(e.source_snapshot):null}catch{}let d=s(e),l=null===e.released_at?"active":"ended",u=((r=(e.request_intent??"").split("\n").map(e=>e.trim()).find(e=>e.length>0))?r.length>80?`${r.slice(0,79).trimEnd()}…`:r:null)??(d?.kind==="group"?d.label:null)??`${e.agent_name} \xb7 ${a=e.created_at,`${new Date(a).toISOString().slice(0,16).replace("T"," ")} UTC`}`;return{ref:e.id,agent:{id:e.agent_id,name:e.agent_name,adapter:e.adapter,transport:i(o,"transport")},title:u,status:l,resumable:null===e.released_at&&null!==e.request_id&&null!==e.request_kind&&n.includes(e.request_kind)&&e.request_target_agent_id===e.agent_id&&(e.conversation_id??"")===(e.request_conversation_id??"")&&e.adapter===(0,t.resolveAgent)({agent:e.agent_runtime}).agent,created_at:e.created_at,ended_at:e.released_at,last_activity_at:Math.max(e.created_at,e.released_at??0,e.source_finished_at??0,e.resumed_last_at??0),origin:{conversation:d,work_request:e.origin_request_id&&e.request_kind&&e.request_state?{id:e.origin_request_id,execution_kind:e.request_kind,state:e.request_state}:null},context:{workspace:i(o,"cwd"),deck:i(o,"deck")}}}function d(e,t){return t.last_activity_at-e.last_activity_at||t.created_at-e.created_at||(e.ref<t.ref?-1:+(e.ref>t.ref))}function l(e,t,a){return e.prepare(`${r} WHERE b.id = ? AND b.agent_id = ?`).get(a,t)}e.s(["agentExists",0,function(e,t){return!!e.prepare("SELECT 1 FROM bots WHERE id = ?").get(t)},"conversationRef",0,function(e,t){let a=e.prepare(`
|
|
16
|
-
SELECT c.id AS origin_conversation_id, c.type AS conversation_type, c.bot_id AS conversation_bot_id,
|
|
17
|
-
tb.name AS thread_agent_name, g.name AS group_name
|
|
18
|
-
FROM conversations c
|
|
19
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
20
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
21
|
-
WHERE c.id = ?
|
|
22
|
-
`).get(t);return a?s(a):null},"getAgentSession",0,function(e,t,a){let n=l(e,t,a);if(!n)return;let r=e.prepare(`
|
|
23
|
-
SELECT a.attempt_number, a.kind, a.request_id, a.outcome, a.started_at, a.finished_at,
|
|
24
|
-
CASE WHEN a.id = ? THEN 'source' ELSE 'resume' END AS role
|
|
25
|
-
FROM work_attempts a
|
|
26
|
-
WHERE a.id = ? OR a.resumed_session_binding_id = ?
|
|
27
|
-
ORDER BY a.started_at ASC, a.id ASC
|
|
28
|
-
`).all(n.source_attempt_id,n.source_attempt_id,n.id);return{...o(n),attempts:r}},"isSessionFilter",0,function(e){return"string"==typeof e&&a.includes(e)},"listAgentSessions",0,function(e,t,a="all"){return e.prepare(`${r} WHERE b.agent_id = ? ${"active"===a?"AND b.released_at IS NULL":"ended"===a?"AND b.released_at IS NOT NULL":""}`).all(t).map(o).sort(d)},"sessionDebugExternalId",0,function(e,t,a){return l(e,t,a)?.external_session_id},"sessionTitle",0,function(e,t,a){let n=l(e,t,a);return n?o(n).title:null}])}];
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=_12tq5uv._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[21232,e=>{"use strict";var t=e.i(43345);async function a(e,{params:r}){let{id:n}=await r;return(0,t.handleGetAgentRequest)(e,n)}e.s(["GET",0,a])},26808,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250),n=e.i(59756),i=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),R=e.i(26937),v=e.i(10372),g=e.i(93695),f=e.i(9580);e.i(52474);var m=e.i(220);let E=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/v0/requests/[id]/route",pathname:"/api/v0/requests/[id]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/v0/requests/[id]/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(21232),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:C,serverHooks:x}=E;async function A(e,t,r){r.requestMeta&&(0,n.setRequestMeta)(e,r.requestMeta),E.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/v0/requests/[id]/route";w=w.replace(/\/index$/,"")||"/";let C=await E.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!C)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:x,deploymentId:A,params:T,nextConfig:y,parsedUrl:P,isDraftMode:S,prerenderManifest:b,routerServerContext:q,isOnDemandRevalidate:N,revalidateOnlyGenerated:O,resolvedPathname:_,clientReferenceManifest:H,serverActionsManifest:I}=C,M=(0,s.normalizeAppPath)(w),U=!!b.routes[_]&&(E.isDev||(0,f.isRouteCacheOwner)(_,E.cacheOwner,b.routes[_])),D=!!(b.dynamicRoutes[M]||U),k=async()=>((null==q?void 0:q.render404)?await q.render404(e,t,P,!1):t.end("This page could not be found"),null);if(D&&!S){let e=b.dynamicRoutes[M];if(e&&!1===e.fallback&&!U){if(y.adapterPath)return await k();throw new g.NoFallbackError}}let F=null;!D||E.isDev||S||(F="/index"===(F=_)?"/":F);let K=!0===E.isDev||!D,j=D&&!K;I&&H&&(0,o.setManifestsSingleton)({page:w,clientReferenceManifest:H,serverActionsManifest:I});let G=e.method||"GET",L=(0,i.getTracer)(),$=L.getActiveScopeSpan(),B=!!(null==q?void 0:q.isWrappedByNextServer),V=!!(0,n.getRequestMeta)(e,"minimalMode"),X=(0,n.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,y,b,V);null==X||X.resetRequestCache(),globalThis.__incrementalCache=X;let W={params:T,previewProps:b.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,isDraftMode:S,supportsDynamicResponse:K,incrementalCache:X,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>E.onRequestError(e,t,r,n,q)},sharedContext:{buildId:x,deploymentId:A}},z=new l.NodeNextRequest(e),Z=new l.NodeNextResponse(t),J=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t)),Q=async({previousCacheEntry:a})=>{try{if(!V&&N&&O&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await E.handle(J,W);e.fetchMetrics=W.renderOpts.fetchMetrics;let i=W.renderOpts.pendingWaitUntil;i&&r.waitUntil&&(r.waitUntil(i),i=void 0);let o=W.renderOpts.collectedTags;if(!D)return await (0,p.sendResponse)(z,Z,n,i),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);o&&(t[v.NEXT_CACHE_TAGS_HEADER]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,r=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=v.INFINITE_CACHE?!1!==a&&a>0?y.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:N})},!1,q),t}},Y=async(n,o)=>{try{var s,l;let n=await E.handleResponse({req:e,nextConfig:y,cacheKey:F,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:O,responseGenerator:Q,waitUntil:r.waitUntil,isMinimalMode:V});if(!D)return;if((null==n||null==(s=n.value)?void 0:s.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",N?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),S&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);V&&D||i.delete(v.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,R.getCacheControlHeader)(n.cacheControl)),await (0,p.sendResponse)(z,Z,new Response(n.value.body,{headers:i,status:n.value.status||200}));return}catch(t){if(t instanceof g.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:M,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:N})},!1,q),D)throw t;await (0,p.sendResponse)(z,Z,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:i.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let a=L.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||M,s=`${G} ${r}`;n.setAttributes({"next.route":r,"http.route":r,"next.span_name":s}),n.updateName(s),o&&o!==n&&(o.setAttribute("http.route",r),o.updateName(s))})()}};if(B&&$)await Y($,void 0);else{let t=L.getActiveScopeSpan();await L.withPropagatedContext(e.headers,()=>L.trace(d.BaseServerSpan.handleRequest,{spanName:`${G} ${w}`,kind:i.SpanKind.SERVER,attributes:{"http.method":G,"http.target":e.url}},e=>Y(e,t)),void 0,!B)}}e.s(["handler",0,A,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:C})},"routeModule",0,E,"serverHooks",0,x,"workAsyncStorage",0,w,"workUnitAsyncStorage",0,C])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_147-4gl._.js.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
module.exports=[67794,e=>{"use strict";var t=e.i(69936);async function a(e,{params:n}){let{agentId:r,ref:i}=await n;return(0,t.handleGetSession)(e,r,i)}e.s(["GET",0,a])},25932,e=>{"use strict";var t=e.i(47909),a=e.i(74017),n=e.i(96250),r=e.i(59756),i=e.i(61916),s=e.i(74677),o=e.i(69741),d=e.i(16795),l=e.i(87718),u=e.i(95169),c=e.i(47587),_=e.i(66012),p=e.i(70101),g=e.i(26937),h=e.i(10372),v=e.i(93695),E=e.i(9580);e.i(52474);var m=e.i(220);let R=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/v0/agents/[agentId]/sessions/[ref]/route",pathname:"/api/v0/agents/[agentId]/sessions/[ref]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/v0/agents/[agentId]/sessions/[ref]/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(67794),...{}}),{workAsyncStorage:f,workUnitAsyncStorage:b,serverHooks:A}=R;async function S(e,t,n){n.requestMeta&&(0,r.setRequestMeta)(e,n.requestMeta),R.isDev&&(0,r.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/v0/agents/[agentId]/sessions/[ref]/route";f=f.replace(/\/index$/,"")||"/";let b=await R.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!b)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:A,deploymentId:S,params:C,nextConfig:O,parsedUrl:w,isDraftMode:N,prerenderManifest:T,routerServerContext:q,isOnDemandRevalidate:x,revalidateOnlyGenerated:y,resolvedPathname:I,clientReferenceManifest:k,serverActionsManifest:H}=b,L=(0,o.normalizeAppPath)(f),P=!!T.routes[I]&&(R.isDev||(0,E.isRouteCacheOwner)(I,R.cacheOwner,T.routes[I])),M=!!(T.dynamicRoutes[L]||P),D=async()=>((null==q?void 0:q.render404)?await q.render404(e,t,w,!1):t.end("This page could not be found"),null);if(M&&!N){let e=T.dynamicRoutes[L];if(e&&!1===e.fallback&&!P){if(O.adapterPath)return await D();throw new v.NoFallbackError}}let F=null;!M||R.isDev||N||(F="/index"===(F=I)?"/":F);let U=!0===R.isDev||!M,$=M&&!U;H&&k&&(0,s.setManifestsSingleton)({page:f,clientReferenceManifest:k,serverActionsManifest:H});let G=e.method||"GET",J=(0,i.getTracer)(),W=J.getActiveScopeSpan(),K=!!(null==q?void 0:q.isWrappedByNextServer),j=!!(0,r.getRequestMeta)(e,"minimalMode"),B=(0,r.getRequestMeta)(e,"incrementalCache")||await R.getIncrementalCache(e,O,T,j);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let X={params:C,previewProps:T.preview,renderOpts:{experimental:{authInterrupts:!!O.experimental.authInterrupts,useCacheTimeout:O.experimental.useCacheTimeout},cacheComponents:!!O.cacheComponents,validationLevel:O.experimental.instantInsights.validationLevel,isDraftMode:N,supportsDynamicResponse:U,incrementalCache:B,hmrRefreshHash:(0,r.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:O.cacheLife,staticPageGenerationTimeout:O.staticPageGenerationTimeout,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,n,r)=>R.onRequestError(e,t,n,r,q)},sharedContext:{buildId:A,deploymentId:S}},V=new d.NodeNextRequest(e),z=new d.NodeNextResponse(t),Y=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:a})=>{try{if(!j&&x&&y&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let r=await R.handle(Y,X);e.fetchMetrics=X.renderOpts.fetchMetrics;let i=X.renderOpts.pendingWaitUntil;i&&n.waitUntil&&(n.waitUntil(i),i=void 0);let s=X.renderOpts.collectedTags;if(!M)return await (0,_.sendResponse)(V,z,r,i),null;{let e=await r.blob(),t=(0,p.toNodeOutgoingHttpHeaders)(r.headers);s&&(t[h.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,n=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=h.INFINITE_CACHE?!1!==a&&a>0?O.expireTime:void 0:X.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:r.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:n}}}}catch(t){throw(null==a?void 0:a.isStale)&&await R.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:x})},!1,q),t}},Q=async(r,s)=>{try{var o,d;let r=await R.handleResponse({req:e,nextConfig:O,cacheKey:F,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:x,revalidateOnlyGenerated:y,responseGenerator:Z,waitUntil:n.waitUntil,isMinimalMode:j});if(!M)return;if((null==r||null==(o=r.value)?void 0:o.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==r||null==(d=r.value)?void 0:d.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});j||t.setHeader("x-nextjs-cache",x?"REVALIDATED":r.isMiss?"MISS":r.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,p.fromNodeOutgoingHttpHeaders)(r.value.headers);j&&M||i.delete(h.NEXT_CACHE_TAGS_HEADER),!r.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,g.getCacheControlHeader)(r.cacheControl)),await (0,_.sendResponse)(V,z,new Response(r.value.body,{headers:i,status:r.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await R.onRequestError(e,t,{routerKind:"App Router",routePath:L,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:x})},!1,q),M)throw t;await (0,_.sendResponse)(V,z,new Response(null,{status:500}));return}finally{(()=>{if(!r)return;let e=t.statusCode;r.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(r.setStatus({code:i.SpanStatusCode.ERROR}),r.setAttribute("error.type",e.toString()));let a=J.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=a.get("next.route")||L,o=`${G} ${n}`;r.setAttributes({"next.route":n,"http.route":n,"next.span_name":o}),r.updateName(o),s&&s!==r&&(s.setAttribute("http.route",n),s.updateName(o))})()}};if(K&&W)await Q(W,void 0);else{let t=J.getActiveScopeSpan();await J.withPropagatedContext(e.headers,()=>J.trace(u.BaseServerSpan.handleRequest,{spanName:`${G} ${f}`,kind:i.SpanKind.SERVER,attributes:{"http.method":G,"http.target":e.url}},e=>Q(e,t)),void 0,!K)}}e.s(["handler",0,S,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:b})},"routeModule",0,R,"serverHooks",0,A,"workAsyncStorage",0,f,"workUnitAsyncStorage",0,b])},90027,e=>{"use strict";var t=e.i(62349);let a=["active","ended","all"],n=["implementation","revision"],r=`
|
|
2
|
-
SELECT b.*, bot.name AS agent_name, bot.agent AS agent_runtime, r.id AS origin_request_id, c.id AS origin_conversation_id,
|
|
3
|
-
c.type AS conversation_type, c.bot_id AS conversation_bot_id, tb.name AS thread_agent_name, g.name AS group_name,
|
|
4
|
-
r.intent AS request_intent, r.execution_kind AS request_kind, r.state AS request_state,
|
|
5
|
-
r.source_conversation_id AS request_conversation_id, r.target_agent_id AS request_target_agent_id,
|
|
6
|
-
sa.launch_snapshot AS source_snapshot, sa.finished_at AS source_finished_at,
|
|
7
|
-
(SELECT MAX(COALESCE(ra.finished_at, ra.started_at)) FROM work_attempts ra WHERE ra.resumed_session_binding_id = b.id) AS resumed_last_at
|
|
8
|
-
FROM session_bindings b
|
|
9
|
-
JOIN bots bot ON bot.id = b.agent_id
|
|
10
|
-
LEFT JOIN work_attempts sa ON sa.id = b.source_attempt_id
|
|
11
|
-
LEFT JOIN work_requests r ON r.id = COALESCE(b.request_id, sa.request_id)
|
|
12
|
-
LEFT JOIN conversations c ON c.id = COALESCE(b.conversation_id, r.source_conversation_id)
|
|
13
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
14
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
15
|
-
`;function i(e,t){let a=e?.[t];return"string"==typeof a&&a.trim().length>0?a:null}function s(e){let t=e.origin_conversation_id;return t?"group"===e.conversation_type?{id:t,kind:"group",label:e.group_name?`Group ${e.group_name}`:"Group thread",thread_agent_id:null}:"bot"===e.conversation_type&&e.conversation_bot_id?{id:t,kind:"direct",label:e.thread_agent_name?`${e.thread_agent_name} thread`:"Agent thread",thread_agent_id:e.thread_agent_name?e.conversation_bot_id:null}:{id:t,kind:"agent_api",label:"Agent API conversation",thread_agent_id:null}:null}function o(e){var a;let r,o=null;try{o=e.source_snapshot?JSON.parse(e.source_snapshot):null}catch{}let d=s(e),l=null===e.released_at?"active":"ended",u=((r=(e.request_intent??"").split("\n").map(e=>e.trim()).find(e=>e.length>0))?r.length>80?`${r.slice(0,79).trimEnd()}…`:r:null)??(d?.kind==="group"?d.label:null)??`${e.agent_name} \xb7 ${a=e.created_at,`${new Date(a).toISOString().slice(0,16).replace("T"," ")} UTC`}`;return{ref:e.id,agent:{id:e.agent_id,name:e.agent_name,adapter:e.adapter,transport:i(o,"transport")},title:u,status:l,resumable:null===e.released_at&&null!==e.request_id&&null!==e.request_kind&&n.includes(e.request_kind)&&e.request_target_agent_id===e.agent_id&&(e.conversation_id??"")===(e.request_conversation_id??"")&&e.adapter===(0,t.resolveAgent)({agent:e.agent_runtime}).agent,created_at:e.created_at,ended_at:e.released_at,last_activity_at:Math.max(e.created_at,e.released_at??0,e.source_finished_at??0,e.resumed_last_at??0),origin:{conversation:d,work_request:e.origin_request_id&&e.request_kind&&e.request_state?{id:e.origin_request_id,execution_kind:e.request_kind,state:e.request_state}:null},context:{workspace:i(o,"cwd"),deck:i(o,"deck")}}}function d(e,t){return t.last_activity_at-e.last_activity_at||t.created_at-e.created_at||(e.ref<t.ref?-1:+(e.ref>t.ref))}function l(e,t,a){return e.prepare(`${r} WHERE b.id = ? AND b.agent_id = ?`).get(a,t)}e.s(["agentExists",0,function(e,t){return!!e.prepare("SELECT 1 FROM bots WHERE id = ?").get(t)},"conversationRef",0,function(e,t){let a=e.prepare(`
|
|
16
|
-
SELECT c.id AS origin_conversation_id, c.type AS conversation_type, c.bot_id AS conversation_bot_id,
|
|
17
|
-
tb.name AS thread_agent_name, g.name AS group_name
|
|
18
|
-
FROM conversations c
|
|
19
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
20
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
21
|
-
WHERE c.id = ?
|
|
22
|
-
`).get(t);return a?s(a):null},"getAgentSession",0,function(e,t,a){let n=l(e,t,a);if(!n)return;let r=e.prepare(`
|
|
23
|
-
SELECT a.attempt_number, a.kind, a.request_id, a.outcome, a.started_at, a.finished_at,
|
|
24
|
-
CASE WHEN a.id = ? THEN 'source' ELSE 'resume' END AS role
|
|
25
|
-
FROM work_attempts a
|
|
26
|
-
WHERE a.id = ? OR a.resumed_session_binding_id = ?
|
|
27
|
-
ORDER BY a.started_at ASC, a.id ASC
|
|
28
|
-
`).all(n.source_attempt_id,n.source_attempt_id,n.id);return{...o(n),attempts:r}},"isSessionFilter",0,function(e){return"string"==typeof e&&a.includes(e)},"listAgentSessions",0,function(e,t,a="all"){return e.prepare(`${r} WHERE b.agent_id = ? ${"active"===a?"AND b.released_at IS NULL":"ended"===a?"AND b.released_at IS NOT NULL":""}`).all(t).map(o).sort(d)},"sessionDebugExternalId",0,function(e,t,a){return l(e,t,a)?.external_session_id},"sessionTitle",0,function(e,t,a){let n=l(e,t,a);return n?o(n).title:null}])}];
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=_14ky6a2._.js.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
module.exports=[34535,e=>{"use strict";var t=e.i(69936);async function a(e){return(0,t.handleListExchanges)(e)}async function n(e){return(0,t.handleCreateExchange)(e)}e.s(["GET",0,a,"POST",0,n])},52197,e=>{"use strict";var t=e.i(47909),a=e.i(74017),n=e.i(96250),r=e.i(59756),i=e.i(61916),s=e.i(74677),o=e.i(69741),d=e.i(16795),l=e.i(87718),u=e.i(95169),c=e.i(47587),_=e.i(66012),p=e.i(70101),g=e.i(26937),h=e.i(10372),v=e.i(93695),E=e.i(9580);e.i(52474);var m=e.i(220);let R=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/v0/exchanges/route",pathname:"/api/v0/exchanges",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/v0/exchanges/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(34535),...{}}),{workAsyncStorage:f,workUnitAsyncStorage:b,serverHooks:A}=R;async function S(e,t,n){n.requestMeta&&(0,r.setRequestMeta)(e,n.requestMeta),R.isDev&&(0,r.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/v0/exchanges/route";f=f.replace(/\/index$/,"")||"/";let b=await R.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!b)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:A,deploymentId:S,params:C,nextConfig:O,parsedUrl:N,isDraftMode:w,prerenderManifest:T,routerServerContext:x,isOnDemandRevalidate:q,revalidateOnlyGenerated:y,resolvedPathname:k,clientReferenceManifest:I,serverActionsManifest:L}=b,P=(0,o.normalizeAppPath)(f),H=!!T.routes[k]&&(R.isDev||(0,E.isRouteCacheOwner)(k,R.cacheOwner,T.routes[k])),M=!!(T.dynamicRoutes[P]||H),D=async()=>((null==x?void 0:x.render404)?await x.render404(e,t,N,!1):t.end("This page could not be found"),null);if(M&&!w){let e=T.dynamicRoutes[P];if(e&&!1===e.fallback&&!H){if(O.adapterPath)return await D();throw new v.NoFallbackError}}let F=null;!M||R.isDev||w||(F="/index"===(F=k)?"/":F);let U=!0===R.isDev||!M,$=M&&!U;L&&I&&(0,s.setManifestsSingleton)({page:f,clientReferenceManifest:I,serverActionsManifest:L});let J=e.method||"GET",W=(0,i.getTracer)(),G=W.getActiveScopeSpan(),K=!!(null==x?void 0:x.isWrappedByNextServer),j=!!(0,r.getRequestMeta)(e,"minimalMode"),B=(0,r.getRequestMeta)(e,"incrementalCache")||await R.getIncrementalCache(e,O,T,j);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let X={params:C,previewProps:T.preview,renderOpts:{experimental:{authInterrupts:!!O.experimental.authInterrupts,useCacheTimeout:O.experimental.useCacheTimeout},cacheComponents:!!O.cacheComponents,validationLevel:O.experimental.instantInsights.validationLevel,isDraftMode:w,supportsDynamicResponse:U,incrementalCache:B,hmrRefreshHash:(0,r.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:O.cacheLife,staticPageGenerationTimeout:O.staticPageGenerationTimeout,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,n,r)=>R.onRequestError(e,t,n,r,x)},sharedContext:{buildId:A,deploymentId:S}},V=new d.NodeNextRequest(e),z=new d.NodeNextResponse(t),Y=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:a})=>{try{if(!j&&q&&y&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let r=await R.handle(Y,X);e.fetchMetrics=X.renderOpts.fetchMetrics;let i=X.renderOpts.pendingWaitUntil;i&&n.waitUntil&&(n.waitUntil(i),i=void 0);let s=X.renderOpts.collectedTags;if(!M)return await (0,_.sendResponse)(V,z,r,i),null;{let e=await r.blob(),t=(0,p.toNodeOutgoingHttpHeaders)(r.headers);s&&(t[h.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,n=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=h.INFINITE_CACHE?!1!==a&&a>0?O.expireTime:void 0:X.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:r.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:n}}}}catch(t){throw(null==a?void 0:a.isStale)&&await R.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:q})},!1,x),t}},Q=async(r,s)=>{try{var o,d;let r=await R.handleResponse({req:e,nextConfig:O,cacheKey:F,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:q,revalidateOnlyGenerated:y,responseGenerator:Z,waitUntil:n.waitUntil,isMinimalMode:j});if(!M)return;if((null==r||null==(o=r.value)?void 0:o.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==r||null==(d=r.value)?void 0:d.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});j||t.setHeader("x-nextjs-cache",q?"REVALIDATED":r.isMiss?"MISS":r.isStale?"STALE":"HIT"),w&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,p.fromNodeOutgoingHttpHeaders)(r.value.headers);j&&M||i.delete(h.NEXT_CACHE_TAGS_HEADER),!r.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,g.getCacheControlHeader)(r.cacheControl)),await (0,_.sendResponse)(V,z,new Response(r.value.body,{headers:i,status:r.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await R.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:q})},!1,x),M)throw t;await (0,_.sendResponse)(V,z,new Response(null,{status:500}));return}finally{(()=>{if(!r)return;let e=t.statusCode;r.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(r.setStatus({code:i.SpanStatusCode.ERROR}),r.setAttribute("error.type",e.toString()));let a=W.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=a.get("next.route")||P,o=`${J} ${n}`;r.setAttributes({"next.route":n,"http.route":n,"next.span_name":o}),r.updateName(o),s&&s!==r&&(s.setAttribute("http.route",n),s.updateName(o))})()}};if(K&&G)await Q(G,void 0);else{let t=W.getActiveScopeSpan();await W.withPropagatedContext(e.headers,()=>W.trace(u.BaseServerSpan.handleRequest,{spanName:`${J} ${f}`,kind:i.SpanKind.SERVER,attributes:{"http.method":J,"http.target":e.url}},e=>Q(e,t)),void 0,!K)}}e.s(["handler",0,S,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:b})},"routeModule",0,R,"serverHooks",0,A,"workAsyncStorage",0,f,"workUnitAsyncStorage",0,b])},90027,e=>{"use strict";var t=e.i(62349);let a=["active","ended","all"],n=["implementation","revision"],r=`
|
|
2
|
-
SELECT b.*, bot.name AS agent_name, bot.agent AS agent_runtime, r.id AS origin_request_id, c.id AS origin_conversation_id,
|
|
3
|
-
c.type AS conversation_type, c.bot_id AS conversation_bot_id, tb.name AS thread_agent_name, g.name AS group_name,
|
|
4
|
-
r.intent AS request_intent, r.execution_kind AS request_kind, r.state AS request_state,
|
|
5
|
-
r.source_conversation_id AS request_conversation_id, r.target_agent_id AS request_target_agent_id,
|
|
6
|
-
sa.launch_snapshot AS source_snapshot, sa.finished_at AS source_finished_at,
|
|
7
|
-
(SELECT MAX(COALESCE(ra.finished_at, ra.started_at)) FROM work_attempts ra WHERE ra.resumed_session_binding_id = b.id) AS resumed_last_at
|
|
8
|
-
FROM session_bindings b
|
|
9
|
-
JOIN bots bot ON bot.id = b.agent_id
|
|
10
|
-
LEFT JOIN work_attempts sa ON sa.id = b.source_attempt_id
|
|
11
|
-
LEFT JOIN work_requests r ON r.id = COALESCE(b.request_id, sa.request_id)
|
|
12
|
-
LEFT JOIN conversations c ON c.id = COALESCE(b.conversation_id, r.source_conversation_id)
|
|
13
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
14
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
15
|
-
`;function i(e,t){let a=e?.[t];return"string"==typeof a&&a.trim().length>0?a:null}function s(e){let t=e.origin_conversation_id;return t?"group"===e.conversation_type?{id:t,kind:"group",label:e.group_name?`Group ${e.group_name}`:"Group thread",thread_agent_id:null}:"bot"===e.conversation_type&&e.conversation_bot_id?{id:t,kind:"direct",label:e.thread_agent_name?`${e.thread_agent_name} thread`:"Agent thread",thread_agent_id:e.thread_agent_name?e.conversation_bot_id:null}:{id:t,kind:"agent_api",label:"Agent API conversation",thread_agent_id:null}:null}function o(e){var a;let r,o=null;try{o=e.source_snapshot?JSON.parse(e.source_snapshot):null}catch{}let d=s(e),l=null===e.released_at?"active":"ended",u=((r=(e.request_intent??"").split("\n").map(e=>e.trim()).find(e=>e.length>0))?r.length>80?`${r.slice(0,79).trimEnd()}…`:r:null)??(d?.kind==="group"?d.label:null)??`${e.agent_name} \xb7 ${a=e.created_at,`${new Date(a).toISOString().slice(0,16).replace("T"," ")} UTC`}`;return{ref:e.id,agent:{id:e.agent_id,name:e.agent_name,adapter:e.adapter,transport:i(o,"transport")},title:u,status:l,resumable:null===e.released_at&&null!==e.request_id&&null!==e.request_kind&&n.includes(e.request_kind)&&e.request_target_agent_id===e.agent_id&&(e.conversation_id??"")===(e.request_conversation_id??"")&&e.adapter===(0,t.resolveAgent)({agent:e.agent_runtime}).agent,created_at:e.created_at,ended_at:e.released_at,last_activity_at:Math.max(e.created_at,e.released_at??0,e.source_finished_at??0,e.resumed_last_at??0),origin:{conversation:d,work_request:e.origin_request_id&&e.request_kind&&e.request_state?{id:e.origin_request_id,execution_kind:e.request_kind,state:e.request_state}:null},context:{workspace:i(o,"cwd"),deck:i(o,"deck")}}}function d(e,t){return t.last_activity_at-e.last_activity_at||t.created_at-e.created_at||(e.ref<t.ref?-1:+(e.ref>t.ref))}function l(e,t,a){return e.prepare(`${r} WHERE b.id = ? AND b.agent_id = ?`).get(a,t)}e.s(["agentExists",0,function(e,t){return!!e.prepare("SELECT 1 FROM bots WHERE id = ?").get(t)},"conversationRef",0,function(e,t){let a=e.prepare(`
|
|
16
|
-
SELECT c.id AS origin_conversation_id, c.type AS conversation_type, c.bot_id AS conversation_bot_id,
|
|
17
|
-
tb.name AS thread_agent_name, g.name AS group_name
|
|
18
|
-
FROM conversations c
|
|
19
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
20
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
21
|
-
WHERE c.id = ?
|
|
22
|
-
`).get(t);return a?s(a):null},"getAgentSession",0,function(e,t,a){let n=l(e,t,a);if(!n)return;let r=e.prepare(`
|
|
23
|
-
SELECT a.attempt_number, a.kind, a.request_id, a.outcome, a.started_at, a.finished_at,
|
|
24
|
-
CASE WHEN a.id = ? THEN 'source' ELSE 'resume' END AS role
|
|
25
|
-
FROM work_attempts a
|
|
26
|
-
WHERE a.id = ? OR a.resumed_session_binding_id = ?
|
|
27
|
-
ORDER BY a.started_at ASC, a.id ASC
|
|
28
|
-
`).all(n.source_attempt_id,n.source_attempt_id,n.id);return{...o(n),attempts:r}},"isSessionFilter",0,function(e){return"string"==typeof e&&a.includes(e)},"listAgentSessions",0,function(e,t,a="all"){return e.prepare(`${r} WHERE b.agent_id = ? ${"active"===a?"AND b.released_at IS NULL":"ended"===a?"AND b.released_at IS NOT NULL":""}`).all(t).map(o).sort(d)},"sessionDebugExternalId",0,function(e,t,a){return l(e,t,a)?.external_session_id},"sessionTitle",0,function(e,t,a){let n=l(e,t,a);return n?o(n).title:null}])}];
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=_16kbxdt._.js.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
module.exports=[51148,e=>{"use strict";var t=e.i(69936);async function a(e){return(0,t.handleGetCapabilities)(e)}e.s(["GET",0,a])},17918,e=>{"use strict";var t=e.i(47909),a=e.i(74017),n=e.i(96250),r=e.i(59756),i=e.i(61916),s=e.i(74677),o=e.i(69741),d=e.i(16795),l=e.i(87718),u=e.i(95169),c=e.i(47587),_=e.i(66012),p=e.i(70101),g=e.i(26937),h=e.i(10372),v=e.i(93695),E=e.i(9580);e.i(52474);var m=e.i(220);let R=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/v0/capabilities/route",pathname:"/api/v0/capabilities",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/v0/capabilities/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(51148),...{}}),{workAsyncStorage:b,workUnitAsyncStorage:f,serverHooks:A}=R;async function S(e,t,n){n.requestMeta&&(0,r.setRequestMeta)(e,n.requestMeta),R.isDev&&(0,r.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let b="/api/v0/capabilities/route";b=b.replace(/\/index$/,"")||"/";let f=await R.prepare(e,t,{srcPage:b,multiZoneDraftMode:!1});if(!f)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:A,deploymentId:S,params:C,nextConfig:O,parsedUrl:N,isDraftMode:w,prerenderManifest:T,routerServerContext:q,isOnDemandRevalidate:x,revalidateOnlyGenerated:y,resolvedPathname:k,clientReferenceManifest:I,serverActionsManifest:H}=f,L=(0,o.normalizeAppPath)(b),P=!!T.routes[k]&&(R.isDev||(0,E.isRouteCacheOwner)(k,R.cacheOwner,T.routes[k])),M=!!(T.dynamicRoutes[L]||P),D=async()=>((null==q?void 0:q.render404)?await q.render404(e,t,N,!1):t.end("This page could not be found"),null);if(M&&!w){let e=T.dynamicRoutes[L];if(e&&!1===e.fallback&&!P){if(O.adapterPath)return await D();throw new v.NoFallbackError}}let F=null;!M||R.isDev||w||(F="/index"===(F=k)?"/":F);let U=!0===R.isDev||!M,$=M&&!U;H&&I&&(0,s.setManifestsSingleton)({page:b,clientReferenceManifest:I,serverActionsManifest:H});let G=e.method||"GET",J=(0,i.getTracer)(),W=J.getActiveScopeSpan(),K=!!(null==q?void 0:q.isWrappedByNextServer),j=!!(0,r.getRequestMeta)(e,"minimalMode"),B=(0,r.getRequestMeta)(e,"incrementalCache")||await R.getIncrementalCache(e,O,T,j);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let X={params:C,previewProps:T.preview,renderOpts:{experimental:{authInterrupts:!!O.experimental.authInterrupts,useCacheTimeout:O.experimental.useCacheTimeout},cacheComponents:!!O.cacheComponents,validationLevel:O.experimental.instantInsights.validationLevel,isDraftMode:w,supportsDynamicResponse:U,incrementalCache:B,hmrRefreshHash:(0,r.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:O.cacheLife,staticPageGenerationTimeout:O.staticPageGenerationTimeout,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,n,r)=>R.onRequestError(e,t,n,r,q)},sharedContext:{buildId:A,deploymentId:S}},V=new d.NodeNextRequest(e),z=new d.NodeNextResponse(t),Y=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:a})=>{try{if(!j&&x&&y&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let r=await R.handle(Y,X);e.fetchMetrics=X.renderOpts.fetchMetrics;let i=X.renderOpts.pendingWaitUntil;i&&n.waitUntil&&(n.waitUntil(i),i=void 0);let s=X.renderOpts.collectedTags;if(!M)return await (0,_.sendResponse)(V,z,r,i),null;{let e=await r.blob(),t=(0,p.toNodeOutgoingHttpHeaders)(r.headers);s&&(t[h.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,n=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=h.INFINITE_CACHE?!1!==a&&a>0?O.expireTime:void 0:X.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:r.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:n}}}}catch(t){throw(null==a?void 0:a.isStale)&&await R.onRequestError(e,t,{routerKind:"App Router",routePath:b,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:x})},!1,q),t}},Q=async(r,s)=>{try{var o,d;let r=await R.handleResponse({req:e,nextConfig:O,cacheKey:F,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:x,revalidateOnlyGenerated:y,responseGenerator:Z,waitUntil:n.waitUntil,isMinimalMode:j});if(!M)return;if((null==r||null==(o=r.value)?void 0:o.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==r||null==(d=r.value)?void 0:d.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});j||t.setHeader("x-nextjs-cache",x?"REVALIDATED":r.isMiss?"MISS":r.isStale?"STALE":"HIT"),w&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,p.fromNodeOutgoingHttpHeaders)(r.value.headers);j&&M||i.delete(h.NEXT_CACHE_TAGS_HEADER),!r.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,g.getCacheControlHeader)(r.cacheControl)),await (0,_.sendResponse)(V,z,new Response(r.value.body,{headers:i,status:r.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await R.onRequestError(e,t,{routerKind:"App Router",routePath:L,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:x})},!1,q),M)throw t;await (0,_.sendResponse)(V,z,new Response(null,{status:500}));return}finally{(()=>{if(!r)return;let e=t.statusCode;r.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(r.setStatus({code:i.SpanStatusCode.ERROR}),r.setAttribute("error.type",e.toString()));let a=J.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=a.get("next.route")||L,o=`${G} ${n}`;r.setAttributes({"next.route":n,"http.route":n,"next.span_name":o}),r.updateName(o),s&&s!==r&&(s.setAttribute("http.route",n),s.updateName(o))})()}};if(K&&W)await Q(W,void 0);else{let t=J.getActiveScopeSpan();await J.withPropagatedContext(e.headers,()=>J.trace(u.BaseServerSpan.handleRequest,{spanName:`${G} ${b}`,kind:i.SpanKind.SERVER,attributes:{"http.method":G,"http.target":e.url}},e=>Q(e,t)),void 0,!K)}}e.s(["handler",0,S,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:f})},"routeModule",0,R,"serverHooks",0,A,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,f])},90027,e=>{"use strict";var t=e.i(62349);let a=["active","ended","all"],n=["implementation","revision"],r=`
|
|
2
|
-
SELECT b.*, bot.name AS agent_name, bot.agent AS agent_runtime, r.id AS origin_request_id, c.id AS origin_conversation_id,
|
|
3
|
-
c.type AS conversation_type, c.bot_id AS conversation_bot_id, tb.name AS thread_agent_name, g.name AS group_name,
|
|
4
|
-
r.intent AS request_intent, r.execution_kind AS request_kind, r.state AS request_state,
|
|
5
|
-
r.source_conversation_id AS request_conversation_id, r.target_agent_id AS request_target_agent_id,
|
|
6
|
-
sa.launch_snapshot AS source_snapshot, sa.finished_at AS source_finished_at,
|
|
7
|
-
(SELECT MAX(COALESCE(ra.finished_at, ra.started_at)) FROM work_attempts ra WHERE ra.resumed_session_binding_id = b.id) AS resumed_last_at
|
|
8
|
-
FROM session_bindings b
|
|
9
|
-
JOIN bots bot ON bot.id = b.agent_id
|
|
10
|
-
LEFT JOIN work_attempts sa ON sa.id = b.source_attempt_id
|
|
11
|
-
LEFT JOIN work_requests r ON r.id = COALESCE(b.request_id, sa.request_id)
|
|
12
|
-
LEFT JOIN conversations c ON c.id = COALESCE(b.conversation_id, r.source_conversation_id)
|
|
13
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
14
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
15
|
-
`;function i(e,t){let a=e?.[t];return"string"==typeof a&&a.trim().length>0?a:null}function s(e){let t=e.origin_conversation_id;return t?"group"===e.conversation_type?{id:t,kind:"group",label:e.group_name?`Group ${e.group_name}`:"Group thread",thread_agent_id:null}:"bot"===e.conversation_type&&e.conversation_bot_id?{id:t,kind:"direct",label:e.thread_agent_name?`${e.thread_agent_name} thread`:"Agent thread",thread_agent_id:e.thread_agent_name?e.conversation_bot_id:null}:{id:t,kind:"agent_api",label:"Agent API conversation",thread_agent_id:null}:null}function o(e){var a;let r,o=null;try{o=e.source_snapshot?JSON.parse(e.source_snapshot):null}catch{}let d=s(e),l=null===e.released_at?"active":"ended",u=((r=(e.request_intent??"").split("\n").map(e=>e.trim()).find(e=>e.length>0))?r.length>80?`${r.slice(0,79).trimEnd()}…`:r:null)??(d?.kind==="group"?d.label:null)??`${e.agent_name} \xb7 ${a=e.created_at,`${new Date(a).toISOString().slice(0,16).replace("T"," ")} UTC`}`;return{ref:e.id,agent:{id:e.agent_id,name:e.agent_name,adapter:e.adapter,transport:i(o,"transport")},title:u,status:l,resumable:null===e.released_at&&null!==e.request_id&&null!==e.request_kind&&n.includes(e.request_kind)&&e.request_target_agent_id===e.agent_id&&(e.conversation_id??"")===(e.request_conversation_id??"")&&e.adapter===(0,t.resolveAgent)({agent:e.agent_runtime}).agent,created_at:e.created_at,ended_at:e.released_at,last_activity_at:Math.max(e.created_at,e.released_at??0,e.source_finished_at??0,e.resumed_last_at??0),origin:{conversation:d,work_request:e.origin_request_id&&e.request_kind&&e.request_state?{id:e.origin_request_id,execution_kind:e.request_kind,state:e.request_state}:null},context:{workspace:i(o,"cwd"),deck:i(o,"deck")}}}function d(e,t){return t.last_activity_at-e.last_activity_at||t.created_at-e.created_at||(e.ref<t.ref?-1:+(e.ref>t.ref))}function l(e,t,a){return e.prepare(`${r} WHERE b.id = ? AND b.agent_id = ?`).get(a,t)}e.s(["agentExists",0,function(e,t){return!!e.prepare("SELECT 1 FROM bots WHERE id = ?").get(t)},"conversationRef",0,function(e,t){let a=e.prepare(`
|
|
16
|
-
SELECT c.id AS origin_conversation_id, c.type AS conversation_type, c.bot_id AS conversation_bot_id,
|
|
17
|
-
tb.name AS thread_agent_name, g.name AS group_name
|
|
18
|
-
FROM conversations c
|
|
19
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
20
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
21
|
-
WHERE c.id = ?
|
|
22
|
-
`).get(t);return a?s(a):null},"getAgentSession",0,function(e,t,a){let n=l(e,t,a);if(!n)return;let r=e.prepare(`
|
|
23
|
-
SELECT a.attempt_number, a.kind, a.request_id, a.outcome, a.started_at, a.finished_at,
|
|
24
|
-
CASE WHEN a.id = ? THEN 'source' ELSE 'resume' END AS role
|
|
25
|
-
FROM work_attempts a
|
|
26
|
-
WHERE a.id = ? OR a.resumed_session_binding_id = ?
|
|
27
|
-
ORDER BY a.started_at ASC, a.id ASC
|
|
28
|
-
`).all(n.source_attempt_id,n.source_attempt_id,n.id);return{...o(n),attempts:r}},"isSessionFilter",0,function(e){return"string"==typeof e&&a.includes(e)},"listAgentSessions",0,function(e,t,a="all"){return e.prepare(`${r} WHERE b.agent_id = ? ${"active"===a?"AND b.released_at IS NULL":"ended"===a?"AND b.released_at IS NOT NULL":""}`).all(t).map(o).sort(d)},"sessionDebugExternalId",0,function(e,t,a){return l(e,t,a)?.external_session_id},"sessionTitle",0,function(e,t,a){let n=l(e,t,a);return n?o(n).title:null}])}];
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=_1963m2f._.js.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
module.exports=[7098,e=>{"use strict";var t=e.i(69936);async function a(e,{params:n}){let{agentId:r}=await n;return(0,t.handleListConversations)(e,r)}e.s(["GET",0,a])},6573,e=>{"use strict";var t=e.i(47909),a=e.i(74017),n=e.i(96250),r=e.i(59756),i=e.i(61916),s=e.i(74677),o=e.i(69741),d=e.i(16795),l=e.i(87718),u=e.i(95169),c=e.i(47587),_=e.i(66012),p=e.i(70101),g=e.i(26937),h=e.i(10372),v=e.i(93695),E=e.i(9580);e.i(52474);var m=e.i(220);let R=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/v0/agents/[agentId]/conversations/route",pathname:"/api/v0/agents/[agentId]/conversations",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/v0/agents/[agentId]/conversations/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(7098),...{}}),{workAsyncStorage:b,workUnitAsyncStorage:f,serverHooks:A}=R;async function S(e,t,n){n.requestMeta&&(0,r.setRequestMeta)(e,n.requestMeta),R.isDev&&(0,r.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let b="/api/v0/agents/[agentId]/conversations/route";b=b.replace(/\/index$/,"")||"/";let f=await R.prepare(e,t,{srcPage:b,multiZoneDraftMode:!1});if(!f)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:A,deploymentId:S,params:C,nextConfig:O,parsedUrl:w,isDraftMode:N,prerenderManifest:T,routerServerContext:q,isOnDemandRevalidate:x,revalidateOnlyGenerated:y,resolvedPathname:I,clientReferenceManifest:k,serverActionsManifest:L}=f,H=(0,o.normalizeAppPath)(b),P=!!T.routes[I]&&(R.isDev||(0,E.isRouteCacheOwner)(I,R.cacheOwner,T.routes[I])),M=!!(T.dynamicRoutes[H]||P),D=async()=>((null==q?void 0:q.render404)?await q.render404(e,t,w,!1):t.end("This page could not be found"),null);if(M&&!N){let e=T.dynamicRoutes[H];if(e&&!1===e.fallback&&!P){if(O.adapterPath)return await D();throw new v.NoFallbackError}}let F=null;!M||R.isDev||N||(F="/index"===(F=I)?"/":F);let U=!0===R.isDev||!M,$=M&&!U;L&&k&&(0,s.setManifestsSingleton)({page:b,clientReferenceManifest:k,serverActionsManifest:L});let J=e.method||"GET",W=(0,i.getTracer)(),G=W.getActiveScopeSpan(),K=!!(null==q?void 0:q.isWrappedByNextServer),j=!!(0,r.getRequestMeta)(e,"minimalMode"),B=(0,r.getRequestMeta)(e,"incrementalCache")||await R.getIncrementalCache(e,O,T,j);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let X={params:C,previewProps:T.preview,renderOpts:{experimental:{authInterrupts:!!O.experimental.authInterrupts,useCacheTimeout:O.experimental.useCacheTimeout},cacheComponents:!!O.cacheComponents,validationLevel:O.experimental.instantInsights.validationLevel,isDraftMode:N,supportsDynamicResponse:U,incrementalCache:B,hmrRefreshHash:(0,r.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:O.cacheLife,staticPageGenerationTimeout:O.staticPageGenerationTimeout,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,n,r)=>R.onRequestError(e,t,n,r,q)},sharedContext:{buildId:A,deploymentId:S}},V=new d.NodeNextRequest(e),z=new d.NodeNextResponse(t),Y=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:a})=>{try{if(!j&&x&&y&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let r=await R.handle(Y,X);e.fetchMetrics=X.renderOpts.fetchMetrics;let i=X.renderOpts.pendingWaitUntil;i&&n.waitUntil&&(n.waitUntil(i),i=void 0);let s=X.renderOpts.collectedTags;if(!M)return await (0,_.sendResponse)(V,z,r,i),null;{let e=await r.blob(),t=(0,p.toNodeOutgoingHttpHeaders)(r.headers);s&&(t[h.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,n=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=h.INFINITE_CACHE?!1!==a&&a>0?O.expireTime:void 0:X.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:r.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:n}}}}catch(t){throw(null==a?void 0:a.isStale)&&await R.onRequestError(e,t,{routerKind:"App Router",routePath:b,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:x})},!1,q),t}},Q=async(r,s)=>{try{var o,d;let r=await R.handleResponse({req:e,nextConfig:O,cacheKey:F,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:x,revalidateOnlyGenerated:y,responseGenerator:Z,waitUntil:n.waitUntil,isMinimalMode:j});if(!M)return;if((null==r||null==(o=r.value)?void 0:o.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==r||null==(d=r.value)?void 0:d.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});j||t.setHeader("x-nextjs-cache",x?"REVALIDATED":r.isMiss?"MISS":r.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,p.fromNodeOutgoingHttpHeaders)(r.value.headers);j&&M||i.delete(h.NEXT_CACHE_TAGS_HEADER),!r.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,g.getCacheControlHeader)(r.cacheControl)),await (0,_.sendResponse)(V,z,new Response(r.value.body,{headers:i,status:r.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await R.onRequestError(e,t,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:x})},!1,q),M)throw t;await (0,_.sendResponse)(V,z,new Response(null,{status:500}));return}finally{(()=>{if(!r)return;let e=t.statusCode;r.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(r.setStatus({code:i.SpanStatusCode.ERROR}),r.setAttribute("error.type",e.toString()));let a=W.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=a.get("next.route")||H,o=`${J} ${n}`;r.setAttributes({"next.route":n,"http.route":n,"next.span_name":o}),r.updateName(o),s&&s!==r&&(s.setAttribute("http.route",n),s.updateName(o))})()}};if(K&&G)await Q(G,void 0);else{let t=W.getActiveScopeSpan();await W.withPropagatedContext(e.headers,()=>W.trace(u.BaseServerSpan.handleRequest,{spanName:`${J} ${b}`,kind:i.SpanKind.SERVER,attributes:{"http.method":J,"http.target":e.url}},e=>Q(e,t)),void 0,!K)}}e.s(["handler",0,S,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:f})},"routeModule",0,R,"serverHooks",0,A,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,f])},90027,e=>{"use strict";var t=e.i(62349);let a=["active","ended","all"],n=["implementation","revision"],r=`
|
|
2
|
-
SELECT b.*, bot.name AS agent_name, bot.agent AS agent_runtime, r.id AS origin_request_id, c.id AS origin_conversation_id,
|
|
3
|
-
c.type AS conversation_type, c.bot_id AS conversation_bot_id, tb.name AS thread_agent_name, g.name AS group_name,
|
|
4
|
-
r.intent AS request_intent, r.execution_kind AS request_kind, r.state AS request_state,
|
|
5
|
-
r.source_conversation_id AS request_conversation_id, r.target_agent_id AS request_target_agent_id,
|
|
6
|
-
sa.launch_snapshot AS source_snapshot, sa.finished_at AS source_finished_at,
|
|
7
|
-
(SELECT MAX(COALESCE(ra.finished_at, ra.started_at)) FROM work_attempts ra WHERE ra.resumed_session_binding_id = b.id) AS resumed_last_at
|
|
8
|
-
FROM session_bindings b
|
|
9
|
-
JOIN bots bot ON bot.id = b.agent_id
|
|
10
|
-
LEFT JOIN work_attempts sa ON sa.id = b.source_attempt_id
|
|
11
|
-
LEFT JOIN work_requests r ON r.id = COALESCE(b.request_id, sa.request_id)
|
|
12
|
-
LEFT JOIN conversations c ON c.id = COALESCE(b.conversation_id, r.source_conversation_id)
|
|
13
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
14
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
15
|
-
`;function i(e,t){let a=e?.[t];return"string"==typeof a&&a.trim().length>0?a:null}function s(e){let t=e.origin_conversation_id;return t?"group"===e.conversation_type?{id:t,kind:"group",label:e.group_name?`Group ${e.group_name}`:"Group thread",thread_agent_id:null}:"bot"===e.conversation_type&&e.conversation_bot_id?{id:t,kind:"direct",label:e.thread_agent_name?`${e.thread_agent_name} thread`:"Agent thread",thread_agent_id:e.thread_agent_name?e.conversation_bot_id:null}:{id:t,kind:"agent_api",label:"Agent API conversation",thread_agent_id:null}:null}function o(e){var a;let r,o=null;try{o=e.source_snapshot?JSON.parse(e.source_snapshot):null}catch{}let d=s(e),l=null===e.released_at?"active":"ended",u=((r=(e.request_intent??"").split("\n").map(e=>e.trim()).find(e=>e.length>0))?r.length>80?`${r.slice(0,79).trimEnd()}…`:r:null)??(d?.kind==="group"?d.label:null)??`${e.agent_name} \xb7 ${a=e.created_at,`${new Date(a).toISOString().slice(0,16).replace("T"," ")} UTC`}`;return{ref:e.id,agent:{id:e.agent_id,name:e.agent_name,adapter:e.adapter,transport:i(o,"transport")},title:u,status:l,resumable:null===e.released_at&&null!==e.request_id&&null!==e.request_kind&&n.includes(e.request_kind)&&e.request_target_agent_id===e.agent_id&&(e.conversation_id??"")===(e.request_conversation_id??"")&&e.adapter===(0,t.resolveAgent)({agent:e.agent_runtime}).agent,created_at:e.created_at,ended_at:e.released_at,last_activity_at:Math.max(e.created_at,e.released_at??0,e.source_finished_at??0,e.resumed_last_at??0),origin:{conversation:d,work_request:e.origin_request_id&&e.request_kind&&e.request_state?{id:e.origin_request_id,execution_kind:e.request_kind,state:e.request_state}:null},context:{workspace:i(o,"cwd"),deck:i(o,"deck")}}}function d(e,t){return t.last_activity_at-e.last_activity_at||t.created_at-e.created_at||(e.ref<t.ref?-1:+(e.ref>t.ref))}function l(e,t,a){return e.prepare(`${r} WHERE b.id = ? AND b.agent_id = ?`).get(a,t)}e.s(["agentExists",0,function(e,t){return!!e.prepare("SELECT 1 FROM bots WHERE id = ?").get(t)},"conversationRef",0,function(e,t){let a=e.prepare(`
|
|
16
|
-
SELECT c.id AS origin_conversation_id, c.type AS conversation_type, c.bot_id AS conversation_bot_id,
|
|
17
|
-
tb.name AS thread_agent_name, g.name AS group_name
|
|
18
|
-
FROM conversations c
|
|
19
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
20
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
21
|
-
WHERE c.id = ?
|
|
22
|
-
`).get(t);return a?s(a):null},"getAgentSession",0,function(e,t,a){let n=l(e,t,a);if(!n)return;let r=e.prepare(`
|
|
23
|
-
SELECT a.attempt_number, a.kind, a.request_id, a.outcome, a.started_at, a.finished_at,
|
|
24
|
-
CASE WHEN a.id = ? THEN 'source' ELSE 'resume' END AS role
|
|
25
|
-
FROM work_attempts a
|
|
26
|
-
WHERE a.id = ? OR a.resumed_session_binding_id = ?
|
|
27
|
-
ORDER BY a.started_at ASC, a.id ASC
|
|
28
|
-
`).all(n.source_attempt_id,n.source_attempt_id,n.id);return{...o(n),attempts:r}},"isSessionFilter",0,function(e){return"string"==typeof e&&a.includes(e)},"listAgentSessions",0,function(e,t,a="all"){return e.prepare(`${r} WHERE b.agent_id = ? ${"active"===a?"AND b.released_at IS NULL":"ended"===a?"AND b.released_at IS NOT NULL":""}`).all(t).map(o).sort(d)},"sessionDebugExternalId",0,function(e,t,a){return l(e,t,a)?.external_session_id},"sessionTitle",0,function(e,t,a){let n=l(e,t,a);return n?o(n).title:null}])}];
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=_1_34_h3._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[85313,e=>{"use strict";var t=e.i(43345);async function a(e,{params:r}){let{id:n}=await r;return(0,t.handleGetConversation)(e,n)}e.s(["GET",0,a])},79819,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250),n=e.i(59756),i=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),R=e.i(26937),v=e.i(10372),g=e.i(93695),f=e.i(9580);e.i(52474);var m=e.i(220);let E=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/v0/conversations/[id]/route",pathname:"/api/v0/conversations/[id]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/v0/conversations/[id]/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(85313),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:C,serverHooks:x}=E;async function A(e,t,r){r.requestMeta&&(0,n.setRequestMeta)(e,r.requestMeta),E.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/v0/conversations/[id]/route";w=w.replace(/\/index$/,"")||"/";let C=await E.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!C)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:x,deploymentId:A,params:T,nextConfig:y,parsedUrl:P,isDraftMode:S,prerenderManifest:b,routerServerContext:N,isOnDemandRevalidate:O,revalidateOnlyGenerated:_,resolvedPathname:q,clientReferenceManifest:H,serverActionsManifest:I}=C,M=(0,s.normalizeAppPath)(w),U=!!b.routes[q]&&(E.isDev||(0,f.isRouteCacheOwner)(q,E.cacheOwner,b.routes[q])),D=!!(b.dynamicRoutes[M]||U),k=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,P,!1):t.end("This page could not be found"),null);if(D&&!S){let e=b.dynamicRoutes[M];if(e&&!1===e.fallback&&!U){if(y.adapterPath)return await k();throw new g.NoFallbackError}}let F=null;!D||E.isDev||S||(F="/index"===(F=q)?"/":F);let K=!0===E.isDev||!D,j=D&&!K;I&&H&&(0,o.setManifestsSingleton)({page:w,clientReferenceManifest:H,serverActionsManifest:I});let G=e.method||"GET",L=(0,i.getTracer)(),$=L.getActiveScopeSpan(),B=!!(null==N?void 0:N.isWrappedByNextServer),V=!!(0,n.getRequestMeta)(e,"minimalMode"),X=(0,n.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,y,b,V);null==X||X.resetRequestCache(),globalThis.__incrementalCache=X;let W={params:T,previewProps:b.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,isDraftMode:S,supportsDynamicResponse:K,incrementalCache:X,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>E.onRequestError(e,t,r,n,N)},sharedContext:{buildId:x,deploymentId:A}},z=new l.NodeNextRequest(e),Z=new l.NodeNextResponse(t),J=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t)),Q=async({previousCacheEntry:a})=>{try{if(!V&&O&&_&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await E.handle(J,W);e.fetchMetrics=W.renderOpts.fetchMetrics;let i=W.renderOpts.pendingWaitUntil;i&&r.waitUntil&&(r.waitUntil(i),i=void 0);let o=W.renderOpts.collectedTags;if(!D)return await (0,p.sendResponse)(z,Z,n,i),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);o&&(t[v.NEXT_CACHE_TAGS_HEADER]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,r=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=v.INFINITE_CACHE?!1!==a&&a>0?y.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:O})},!1,N),t}},Y=async(n,o)=>{try{var s,l;let n=await E.handleResponse({req:e,nextConfig:y,cacheKey:F,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:O,revalidateOnlyGenerated:_,responseGenerator:Q,waitUntil:r.waitUntil,isMinimalMode:V});if(!D)return;if((null==n||null==(s=n.value)?void 0:s.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",O?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),S&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);V&&D||i.delete(v.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,R.getCacheControlHeader)(n.cacheControl)),await (0,p.sendResponse)(z,Z,new Response(n.value.body,{headers:i,status:n.value.status||200}));return}catch(t){if(t instanceof g.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:M,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:O})},!1,N),D)throw t;await (0,p.sendResponse)(z,Z,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:i.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let a=L.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||M,s=`${G} ${r}`;n.setAttributes({"next.route":r,"http.route":r,"next.span_name":s}),n.updateName(s),o&&o!==n&&(o.setAttribute("http.route",r),o.updateName(s))})()}};if(B&&$)await Y($,void 0);else{let t=L.getActiveScopeSpan();await L.withPropagatedContext(e.headers,()=>L.trace(d.BaseServerSpan.handleRequest,{spanName:`${G} ${w}`,kind:i.SpanKind.SERVER,attributes:{"http.method":G,"http.target":e.url}},e=>Y(e,t)),void 0,!B)}}e.s(["handler",0,A,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:C})},"routeModule",0,E,"serverHooks",0,x,"workAsyncStorage",0,w,"workUnitAsyncStorage",0,C])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_1cc-2mx._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[46296,e=>{"use strict";var t=e.i(89171),r=e.i(62294),a=e.i(27754);async function i(e){let i;try{i=await e.json()}catch{return t.NextResponse.json({error:"Expected a JSON object with id or ids."},{status:400})}let n=(0,a.parseDeleteIds)(i);if(!n.ok)return t.NextResponse.json({error:n.error},{status:400});try{return t.NextResponse.json(r.bots.deletionPreview(n.ids))}catch(e){return console.error("Error previewing bot deletion:",e),t.NextResponse.json({error:"Failed to preview deletion"},{status:500})}}e.s(["POST",0,i])},50634,e=>{"use strict";var t=e.i(47909),r=e.i(74017),a=e.i(96250),i=e.i(59756),n=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),R=e.i(26937),f=e.i(10372),v=e.i(93695),g=e.i(9580);e.i(52474);var w=e.i(220);let m=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/bots/delete-preview/route",pathname:"/api/bots/delete-preview",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/bots/delete-preview/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(46296),...{}}),{workAsyncStorage:E,workUnitAsyncStorage:C,serverHooks:y}=m;async function b(e,t,a){a.requestMeta&&(0,i.setRequestMeta)(e,a.requestMeta),m.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let E="/api/bots/delete-preview/route";E=E.replace(/\/index$/,"")||"/";let C=await m.prepare(e,t,{srcPage:E,multiZoneDraftMode:!1});if(!C)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:y,deploymentId:b,params:x,nextConfig:A,parsedUrl:S,isDraftMode:T,prerenderManifest:N,routerServerContext:P,isOnDemandRevalidate:k,revalidateOnlyGenerated:O,resolvedPathname:q,clientReferenceManifest:_,serverActionsManifest:H}=C,I=(0,s.normalizeAppPath)(E),D=!!N.routes[q]&&(m.isDev||(0,g.isRouteCacheOwner)(q,m.cacheOwner,N.routes[q])),M=!!(N.dynamicRoutes[I]||D),j=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,S,!1):t.end("This page could not be found"),null);if(M&&!T){let e=N.dynamicRoutes[I];if(e&&!1===e.fallback&&!D){if(A.adapterPath)return await j();throw new v.NoFallbackError}}let U=null;!M||m.isDev||T||(U="/index"===(U=q)?"/":U);let F=!0===m.isDev||!M,B=M&&!F;H&&_&&(0,o.setManifestsSingleton)({page:E,clientReferenceManifest:_,serverActionsManifest:H});let K=e.method||"GET",L=(0,n.getTracer)(),$=L.getActiveScopeSpan(),G=!!(null==P?void 0:P.isWrappedByNextServer),V=!!(0,i.getRequestMeta)(e,"minimalMode"),W=(0,i.getRequestMeta)(e,"incrementalCache")||await m.getIncrementalCache(e,A,N,V);null==W||W.resetRequestCache(),globalThis.__incrementalCache=W;let X={params:x,previewProps:N.preview,renderOpts:{experimental:{authInterrupts:!!A.experimental.authInterrupts,useCacheTimeout:A.experimental.useCacheTimeout},cacheComponents:!!A.cacheComponents,validationLevel:A.experimental.instantInsights.validationLevel,isDraftMode:T,supportsDynamicResponse:F,incrementalCache:W,hmrRefreshHash:(0,i.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:A.cacheLife,staticPageGenerationTimeout:A.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,i)=>m.onRequestError(e,t,a,i,P)},sharedContext:{buildId:y,deploymentId:b}},z=new l.NodeNextRequest(e),J=new l.NodeNextResponse(t),Z=d.NextRequestAdapter.fromNodeNextRequest(z,(0,d.signalFromNodeResponse)(t)),Q=async({previousCacheEntry:r})=>{try{if(!V&&k&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await m.handle(Z,X);e.fetchMetrics=X.renderOpts.fetchMetrics;let n=X.renderOpts.pendingWaitUntil;n&&a.waitUntil&&(a.waitUntil(n),n=void 0);let o=X.renderOpts.collectedTags;if(!M)return await (0,p.sendResponse)(z,J,i,n),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);o&&(t[f.NEXT_CACHE_TAGS_HEADER]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,a=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=f.INFINITE_CACHE?!1!==r&&r>0?A.expireTime:void 0:X.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await m.onRequestError(e,t,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:B,isOnDemandRevalidate:k})},!1,P),t}},Y=async(i,o)=>{try{var s,l;let i=await m.handleResponse({req:e,nextConfig:A,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:O,responseGenerator:Q,waitUntil:a.waitUntil,isMinimalMode:V});if(!M)return;if((null==i||null==(s=i.value)?void 0:s.kind)!==w.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==i||null==(l=i.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",k?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let n=(0,h.fromNodeOutgoingHttpHeaders)(i.value.headers);V&&M||n.delete(f.NEXT_CACHE_TAGS_HEADER),!i.cacheControl||t.getHeader("Cache-Control")||n.get("Cache-Control")||n.set("Cache-Control",(0,R.getCacheControlHeader)(i.cacheControl)),await (0,p.sendResponse)(z,J,new Response(i.value.body,{headers:n,status:i.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await m.onRequestError(e,t,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:B,isOnDemandRevalidate:k})},!1,P),M)throw t;await (0,p.sendResponse)(z,J,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:n.SpanStatusCode.ERROR}),i.setAttribute("error.type",e.toString()));let r=L.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route")||I,s=`${K} ${a}`;i.setAttributes({"next.route":a,"http.route":a,"next.span_name":s}),i.updateName(s),o&&o!==i&&(o.setAttribute("http.route",a),o.updateName(s))})()}};if(G&&$)await Y($,void 0);else{let t=L.getActiveScopeSpan();await L.withPropagatedContext(e.headers,()=>L.trace(u.BaseServerSpan.handleRequest,{spanName:`${K} ${E}`,kind:n.SpanKind.SERVER,attributes:{"http.method":K,"http.target":e.url}},e=>Y(e,t)),void 0,!G)}}e.s(["handler",0,b,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:C})},"routeModule",0,m,"serverHooks",0,y,"workAsyncStorage",0,E,"workUnitAsyncStorage",0,C])},27754,e=>{"use strict";e.s(["blockedReasonCopy",0,function(e){return"chief"===e?"Chief of Staff cannot be deleted.":"Working now — stop it or let it finish before deleting."},"parseDeleteIds",0,function(e){if(!e||"object"!=typeof e||Array.isArray(e))return{ok:!1,error:"Expected a JSON object with id or ids."};let t=void 0!==e.id,r=void 0!==e.ids;if(t&&r)return{ok:!1,error:"Send either id or ids, not both."};if(t)return"string"==typeof e.id&&e.id.trim()?{ok:!0,ids:[e.id.trim()]}:{ok:!1,error:"Bot id is required"};if(!r)return{ok:!1,error:"Bot id is required"};if(!Array.isArray(e.ids))return{ok:!1,error:"ids must be an array of agent ids."};if(0===e.ids.length)return{ok:!1,error:"Select at least one agent."};if(e.ids.length>500)return{ok:!1,error:"Delete at most 500 agents at once."};let a=[];for(let t of e.ids){if("string"!=typeof t||!t.trim())return{ok:!1,error:"Every id must be a non-empty string."};a.push(t.trim())}return new Set(a).size!==a.length?{ok:!1,error:"ids must be unique."}:{ok:!0,ids:a}}])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_1ee4ej2._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[89570,e=>{"use strict";var t=e.i(89171),a=e.i(62294);async function r(){try{return t.NextResponse.json({renames:a.agentNameMigrations.list()})}catch(e){return console.error("Error fetching Agent name migrations:",e),t.NextResponse.json({error:"Failed to fetch Agent name migrations"},{status:500})}}e.s(["GET",0,r])},73010,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250),n=e.i(59756),i=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),R=e.i(26937),m=e.i(10372),v=e.i(93695),g=e.i(9580);e.i(52474);var f=e.i(220);let E=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/bots/name-migrations/route",pathname:"/api/bots/name-migrations",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/bots/name-migrations/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(89570),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:C,serverHooks:x}=E;async function A(e,t,r){r.requestMeta&&(0,n.setRequestMeta)(e,r.requestMeta),E.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/bots/name-migrations/route";w=w.replace(/\/index$/,"")||"/";let C=await E.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!C)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:x,deploymentId:A,params:T,nextConfig:y,parsedUrl:b,isDraftMode:N,prerenderManifest:P,routerServerContext:S,isOnDemandRevalidate:O,revalidateOnlyGenerated:_,resolvedPathname:q,clientReferenceManifest:H,serverActionsManifest:I}=C,M=(0,s.normalizeAppPath)(w),U=!!P.routes[q]&&(E.isDev||(0,g.isRouteCacheOwner)(q,E.cacheOwner,P.routes[q])),D=!!(P.dynamicRoutes[M]||U),k=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,b,!1):t.end("This page could not be found"),null);if(D&&!N){let e=P.dynamicRoutes[M];if(e&&!1===e.fallback&&!U){if(y.adapterPath)return await k();throw new v.NoFallbackError}}let j=null;!D||E.isDev||N||(j="/index"===(j=q)?"/":j);let F=!0===E.isDev||!D,K=D&&!F;I&&H&&(0,o.setManifestsSingleton)({page:w,clientReferenceManifest:H,serverActionsManifest:I});let L=e.method||"GET",$=(0,i.getTracer)(),B=$.getActiveScopeSpan(),G=!!(null==S?void 0:S.isWrappedByNextServer),V=!!(0,n.getRequestMeta)(e,"minimalMode"),X=(0,n.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,y,P,V);null==X||X.resetRequestCache(),globalThis.__incrementalCache=X;let W={params:T,previewProps:P.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,isDraftMode:N,supportsDynamicResponse:F,incrementalCache:X,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>E.onRequestError(e,t,r,n,S)},sharedContext:{buildId:x,deploymentId:A}},z=new l.NodeNextRequest(e),Z=new l.NodeNextResponse(t),J=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t)),Q=async({previousCacheEntry:a})=>{try{if(!V&&O&&_&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await E.handle(J,W);e.fetchMetrics=W.renderOpts.fetchMetrics;let i=W.renderOpts.pendingWaitUntil;i&&r.waitUntil&&(r.waitUntil(i),i=void 0);let o=W.renderOpts.collectedTags;if(!D)return await (0,p.sendResponse)(z,Z,n,i),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);o&&(t[m.NEXT_CACHE_TAGS_HEADER]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,r=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=m.INFINITE_CACHE?!1!==a&&a>0?y.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:O})},!1,S),t}},Y=async(n,o)=>{try{var s,l;let n=await E.handleResponse({req:e,nextConfig:y,cacheKey:j,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:O,revalidateOnlyGenerated:_,responseGenerator:Q,waitUntil:r.waitUntil,isMinimalMode:V});if(!D)return;if((null==n||null==(s=n.value)?void 0:s.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",O?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);V&&D||i.delete(m.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,R.getCacheControlHeader)(n.cacheControl)),await (0,p.sendResponse)(z,Z,new Response(n.value.body,{headers:i,status:n.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:M,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:O})},!1,S),D)throw t;await (0,p.sendResponse)(z,Z,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:i.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let a=$.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||M,s=`${L} ${r}`;n.setAttributes({"next.route":r,"http.route":r,"next.span_name":s}),n.updateName(s),o&&o!==n&&(o.setAttribute("http.route",r),o.updateName(s))})()}};if(G&&B)await Y(B,void 0);else{let t=$.getActiveScopeSpan();await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${L} ${w}`,kind:i.SpanKind.SERVER,attributes:{"http.method":L,"http.target":e.url}},e=>Y(e,t)),void 0,!G)}}e.s(["handler",0,A,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:C})},"routeModule",0,E,"serverHooks",0,x,"workAsyncStorage",0,w,"workUnitAsyncStorage",0,C])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_1esxu1s._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[61335,e=>{"use strict";var t=e.i(89171),r=e.i(62294);async function a(){try{let e=r.mcpServers.list().map(e=>({...e,args:JSON.parse(e.args)}));return t.NextResponse.json(e)}catch(e){return console.error("Error listing MCP servers:",e),t.NextResponse.json({error:"Failed to list MCP servers"},{status:500})}}async function n(e){try{let a=await e.json(),n=a.name?String(a.name).trim():"",s=a.command?String(a.command).trim():"",o=Array.isArray(a.args)?a.args.map(e=>String(e)):[];if(!n||!s)return t.NextResponse.json({error:"Name and command are required"},{status:400});let i=r.mcpServers.create(n,s,o);return t.NextResponse.json({...i,args:o})}catch(e){return console.error("Error storing MCP server:",e),t.NextResponse.json({error:"Failed to store MCP server"},{status:500})}}e.s(["GET",0,a,"POST",0,n])},12508,e=>{"use strict";var t=e.i(47909),r=e.i(74017),a=e.i(96250),n=e.i(59756),s=e.i(61916),o=e.i(74677),i=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),R=e.i(26937),m=e.i(10372),v=e.i(93695),g=e.i(9580);e.i(52474);var f=e.i(220);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/mcp/route",pathname:"/api/mcp",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/mcp/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(61335),...{}}),{workAsyncStorage:E,workUnitAsyncStorage:w,serverHooks:x}=C;async function A(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),C.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let E="/api/mcp/route";E=E.replace(/\/index$/,"")||"/";let w=await C.prepare(e,t,{srcPage:E,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:x,deploymentId:A,params:y,nextConfig:S,parsedUrl:T,isDraftMode:N,prerenderManifest:P,routerServerContext:O,isOnDemandRevalidate:b,revalidateOnlyGenerated:_,resolvedPathname:q,clientReferenceManifest:M,serverActionsManifest:H}=w,I=(0,i.normalizeAppPath)(E),U=!!P.routes[q]&&(C.isDev||(0,g.isRouteCacheOwner)(q,C.cacheOwner,P.routes[q])),D=!!(P.dynamicRoutes[I]||U),j=async()=>((null==O?void 0:O.render404)?await O.render404(e,t,T,!1):t.end("This page could not be found"),null);if(D&&!N){let e=P.dynamicRoutes[I];if(e&&!1===e.fallback&&!U){if(S.adapterPath)return await j();throw new v.NoFallbackError}}let k=null;!D||C.isDev||N||(k="/index"===(k=q)?"/":k);let F=!0===C.isDev||!D,K=D&&!F;H&&M&&(0,o.setManifestsSingleton)({page:E,clientReferenceManifest:M,serverActionsManifest:H});let L=e.method||"GET",$=(0,s.getTracer)(),B=$.getActiveScopeSpan(),G=!!(null==O?void 0:O.isWrappedByNextServer),V=!!(0,n.getRequestMeta)(e,"minimalMode"),X=(0,n.getRequestMeta)(e,"incrementalCache")||await C.getIncrementalCache(e,S,P,V);null==X||X.resetRequestCache(),globalThis.__incrementalCache=X;let W={params:y,previewProps:P.preview,renderOpts:{experimental:{authInterrupts:!!S.experimental.authInterrupts,useCacheTimeout:S.experimental.useCacheTimeout},cacheComponents:!!S.cacheComponents,validationLevel:S.experimental.instantInsights.validationLevel,isDraftMode:N,supportsDynamicResponse:F,incrementalCache:X,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:S.cacheLife,staticPageGenerationTimeout:S.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>C.onRequestError(e,t,a,n,O)},sharedContext:{buildId:x,deploymentId:A}},z=new l.NodeNextRequest(e),J=new l.NodeNextResponse(t),Z=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t)),Q=async({previousCacheEntry:r})=>{try{if(!V&&b&&_&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await C.handle(Z,W);e.fetchMetrics=W.renderOpts.fetchMetrics;let s=W.renderOpts.pendingWaitUntil;s&&a.waitUntil&&(a.waitUntil(s),s=void 0);let o=W.renderOpts.collectedTags;if(!D)return await (0,p.sendResponse)(z,J,n,s),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);o&&(t[m.NEXT_CACHE_TAGS_HEADER]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,a=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=m.INFINITE_CACHE?!1!==r&&r>0?S.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:b})},!1,O),t}},Y=async(n,o)=>{try{var i,l;let n=await C.handleResponse({req:e,nextConfig:S,cacheKey:k,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:b,revalidateOnlyGenerated:_,responseGenerator:Q,waitUntil:a.waitUntil,isMinimalMode:V});if(!D)return;if((null==n||null==(i=n.value)?void 0:i.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",b?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let s=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);V&&D||s.delete(m.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||s.get("Cache-Control")||s.set("Cache-Control",(0,R.getCacheControlHeader)(n.cacheControl)),await (0,p.sendResponse)(z,J,new Response(n.value.body,{headers:s,status:n.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:b})},!1,O),D)throw t;await (0,p.sendResponse)(z,J,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:s.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route")||I,i=`${L} ${a}`;n.setAttributes({"next.route":a,"http.route":a,"next.span_name":i}),n.updateName(i),o&&o!==n&&(o.setAttribute("http.route",a),o.updateName(i))})()}};if(G&&B)await Y(B,void 0);else{let t=$.getActiveScopeSpan();await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${L} ${E}`,kind:s.SpanKind.SERVER,attributes:{"http.method":L,"http.target":e.url}},e=>Y(e,t)),void 0,!G)}}e.s(["handler",0,A,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:w})},"routeModule",0,C,"serverHooks",0,x,"workAsyncStorage",0,E,"workUnitAsyncStorage",0,w])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_1gn7eh7._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[88831,e=>{"use strict";var t=e.i(89171),r=e.i(62294),n=e.i(10860),a=e.i(38636);function i(e){let t=r.bots.getById(e);if(!t)return null;let i=(0,n.readSkillState)(t.name);return{bot:t,skill:i,currentHash:(0,a.hashSnapshot)((0,a.buildSnapshotInput)(t,i,r.memories.latestFacts(t.id)))}}async function o(e,{params:a}){try{let{id:o}=await a,s=r.bots.getById(o);if(!s)return t.NextResponse.json({error:"Bot not found"},{status:404});let l=await e.json(),u=void 0===l.content||null===l.content?"":String(l.content);try{(0,n.writeSkillForBot)(s.name,u)}catch(e){return t.NextResponse.json({error:e instanceof Error?e.message:"Failed to save skill"},{status:400})}return t.NextResponse.json(i(o))}catch(e){return console.error("Error saving skill:",e),t.NextResponse.json({error:"Failed to save skill"},{status:500})}}async function s(e,{params:a}){try{let{id:e}=await a,o=r.bots.getById(e);if(!o)return t.NextResponse.json({error:"Bot not found"},{status:404});try{(0,n.writeSkillForBot)(o.name,"")}catch(e){return t.NextResponse.json({error:e instanceof Error?e.message:"Failed to delete skill"},{status:400})}return t.NextResponse.json(i(e))}catch(e){return console.error("Error deleting skill:",e),t.NextResponse.json({error:"Failed to delete skill"},{status:500})}}e.s(["DELETE",0,s,"PUT",0,o])},15418,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),i=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),f=e.i(26937),m=e.i(10372),v=e.i(93695),R=e.i(9580);e.i(52474);var g=e.i(220);let _=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/bots/[id]/skill/route",pathname:"/api/bots/[id]/skill",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/bots/[id]/skill/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(88831),...{}}),{workAsyncStorage:S,workUnitAsyncStorage:y,serverHooks:w}=_;async function E(e,t,n){n.requestMeta&&(0,a.setRequestMeta)(e,n.requestMeta),_.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let S="/api/bots/[id]/skill/route";S=S.replace(/\/index$/,"")||"/";let y=await _.prepare(e,t,{srcPage:S,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:w,deploymentId:E,params:k,nextConfig:x,parsedUrl:C,isDraftMode:b,prerenderManifest:A,routerServerContext:N,isOnDemandRevalidate:T,revalidateOnlyGenerated:P,resolvedPathname:I,clientReferenceManifest:O,serverActionsManifest:H}=y,q=(0,s.normalizeAppPath)(S),F=!!A.routes[I]&&(_.isDev||(0,R.isRouteCacheOwner)(I,_.cacheOwner,A.routes[I])),j=!!(A.dynamicRoutes[q]||F),M=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,C,!1):t.end("This page could not be found"),null);if(j&&!b){let e=A.dynamicRoutes[q];if(e&&!1===e.fallback&&!F){if(x.adapterPath)return await M();throw new v.NoFallbackError}}let U=null;!j||_.isDev||b||(U="/index"===(U=I)?"/":U);let B=!0===_.isDev||!j,D=j&&!B;H&&O&&(0,o.setManifestsSingleton)({page:S,clientReferenceManifest:O,serverActionsManifest:H});let L=e.method||"GET",$=(0,i.getTracer)(),K=$.getActiveScopeSpan(),z=!!(null==N?void 0:N.isWrappedByNextServer),G=!!(0,a.getRequestMeta)(e,"minimalMode"),W=(0,a.getRequestMeta)(e,"incrementalCache")||await _.getIncrementalCache(e,x,A,G);null==W||W.resetRequestCache(),globalThis.__incrementalCache=W;let Z={params:k,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts,useCacheTimeout:x.experimental.useCacheTimeout},cacheComponents:!!x.cacheComponents,validationLevel:x.experimental.instantInsights.validationLevel,isDraftMode:b,supportsDynamicResponse:B,incrementalCache:W,hmrRefreshHash:(0,a.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:x.cacheLife,staticPageGenerationTimeout:x.staticPageGenerationTimeout,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>_.onRequestError(e,t,n,a,N)},sharedContext:{buildId:w,deploymentId:E}},V=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),J=u.NextRequestAdapter.fromNodeNextRequest(V,(0,u.signalFromNodeResponse)(t)),Q=async({previousCacheEntry:r})=>{try{if(!G&&T&&P&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await _.handle(J,Z);e.fetchMetrics=Z.renderOpts.fetchMetrics;let i=Z.renderOpts.pendingWaitUntil;i&&n.waitUntil&&(n.waitUntil(i),i=void 0);let o=Z.renderOpts.collectedTags;if(!j)return await (0,p.sendResponse)(V,X,a,i),null;{let e=await a.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(a.headers);o&&(t[m.NEXT_CACHE_TAGS_HEADER]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==Z.renderOpts.collectedRevalidate&&!(Z.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&Z.renderOpts.collectedRevalidate,n=void 0===Z.renderOpts.collectedExpire||Z.renderOpts.collectedExpire>=m.INFINITE_CACHE?!1!==r&&r>0?x.expireTime:void 0:Z.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await _.onRequestError(e,t,{routerKind:"App Router",routePath:S,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:T})},!1,N),t}},Y=async(a,o)=>{try{var s,l;let a=await _.handleResponse({req:e,nextConfig:x,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:P,responseGenerator:Q,waitUntil:n.waitUntil,isMinimalMode:G});if(!j)return;if((null==a||null==(s=a.value)?void 0:s.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==a||null==(l=a.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});G||t.setHeader("x-nextjs-cache",T?"REVALIDATED":a.isMiss?"MISS":a.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,h.fromNodeOutgoingHttpHeaders)(a.value.headers);G&&j||i.delete(m.NEXT_CACHE_TAGS_HEADER),!a.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,f.getCacheControlHeader)(a.cacheControl)),await (0,p.sendResponse)(V,X,new Response(a.value.body,{headers:i,status:a.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await _.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:T})},!1,N),j)throw t;await (0,p.sendResponse)(V,X,new Response(null,{status:500}));return}finally{(()=>{if(!a)return;let e=t.statusCode;a.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(a.setStatus({code:i.SpanStatusCode.ERROR}),a.setAttribute("error.type",e.toString()));let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return 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")||q,s=`${L} ${n}`;a.setAttributes({"next.route":n,"http.route":n,"next.span_name":s}),a.updateName(s),o&&o!==a&&(o.setAttribute("http.route",n),o.updateName(s))})()}};if(z&&K)await Y(K,void 0);else{let t=$.getActiveScopeSpan();await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${L} ${S}`,kind:i.SpanKind.SERVER,attributes:{"http.method":L,"http.target":e.url}},e=>Y(e,t)),void 0,!z)}}e.s(["handler",0,E,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:S,workUnitAsyncStorage:y})},"routeModule",0,_,"serverHooks",0,w,"workAsyncStorage",0,S,"workUnitAsyncStorage",0,y])},10860,e=>{"use strict";var t=e.i(22734),r=e.i(14747),n=e.i(52036);function a(e){if(!/^[A-Za-z0-9_-]+$/.test(e))return null;let a=(0,n.skillsRootPath)(),i=r.default.resolve(a,e,"SKILL.md");if(!i.startsWith(a+r.default.sep))return null;try{let e=t.default.readFileSync(i,"utf8");return e.trim()?e:null}catch{return null}}function i(e){return/^[A-Za-z0-9_-]+$/.test(e)}function o(e){if(!e)return null;let t=a(e);if(!t)return null;let r=t.match(/ends with the exact token\s+(\S+)/i);return r?r[1]:null}function s(e){return i(e)?`skills/${e}/SKILL.md`:null}e.s(["applySkillEndToken",0,function(e,t){let r=o(e);return r?t?t.trimEnd().endsWith(r)?t:t+"\n"+r:r:t},"isSupportedSkillName",0,i,"localSkillForBot",0,a,"readSkillState",0,function(e){let t=s(e);if(!t)return{path:null,present:!1,content:null,status:"unsupported"};let r=a(e);return null===r?{path:t,present:!1,content:null,status:"absent"}:{path:t,present:!0,content:r,status:"present"}},"skillEndToken",0,o,"writeSkillForBot",0,function(e,a){let i=s(e);if(!i)throw Error("Skill files need a bot name matching /^[A-Za-z0-9_-]+$/");let o=(0,n.skillsRootPath)(),l=r.default.resolve(o,e,"SKILL.md");if(!l.startsWith(o+r.default.sep))throw Error("Skill files need a bot name matching /^[A-Za-z0-9_-]+$/");if(!a.trim()){try{t.default.rmSync(l)}catch{}return{path:i,present:!1,content:null,status:"absent"}}return t.default.mkdirSync(r.default.dirname(l),{recursive:!0}),t.default.writeFileSync(l,a),{path:i,present:!0,content:a,status:"present"}}])},38636,(e,t,r)=>{let{createHash:n}=e.r(54799);function a(e){if(Array.isArray(e))return e.map(a);if(null!==e&&"object"==typeof e){let t={};for(let r of Object.keys(e).sort())t[r]=a(e[r]);return t}return e}function i(e){return JSON.stringify(a(e))}function o(e){return null==e?null:String(e)}function s(e){return null==e?null:String(e).trim()||null}t.exports={sortKeysDeep:a,canonicalJson:i,hashSnapshot:function(e){return n("sha256").update(i(e),"utf8").digest("hex")},buildSnapshotInput:function(e,t,r=null){let n=s(e.agent)||"hermes",a=s(e.deck_id);return{agent:n,avatar_accessory:o(e.avatar_accessory),avatar_color:o(e.avatar_color),avatar_eyes:o(e.avatar_eyes),avatar_hands:o(e.avatar_hands),deck_id:a,deck_name:s(e.deck_name),description:null===e.description||void 0===e.description?"":String(e.description),import_operation_id:o(e.import_operation_id),import_schema_version:o(e.import_schema_version),memories:null==r?null:r.map(e=>String(e)),name:String(e.name),needs_deck_selection:null===a||function(e){if(!0===e||1===e)return!0;if("string"==typeof e){let t=e.trim().toLowerCase();return"1"===t||"true"===t}return!1}(e.needs_deck_selection),skill_content:o(t.content),skill_path:o(t.path),skill_present:null===t.present||void 0===t.present?null:!!t.present,source_provider:o(e.source_provider),template_id:o(e.template_id),template_url:o(e.template_url),title:null===e.title||void 0===e.title?"":String(e.title),working_directory:s(e.working_directory)}}}}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_1gw7qwf._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[2101,e=>{"use strict";var t=e.i(89171),a=e.i(62294),r=e.i(45383),n=e.i(142);async function o(e,{params:i}){let{id:s}=await i;try{let{grant:e,revoked:n}=(0,r.revokeWakeGrantCommand)(s,{category:"human_owner",principal:a.UI_OWNER_PRINCIPAL});return t.NextResponse.json({grantId:e.id,revoked:n,revokedAt:e.revoked_at})}catch(e){if(e instanceof n.WakeSafetyError)return t.NextResponse.json({error:{code:e.code,message:e.message}},{status:e.status});return console.error("Wake grant revoke failed:",e),t.NextResponse.json({error:{code:"internal_error",message:"The grant could not be revoked."}},{status:500})}}e.s(["POST",0,o])},90152,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250),n=e.i(59756),o=e.i(61916),i=e.i(74677),s=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),R=e.i(26937),v=e.i(10372),g=e.i(93695),m=e.i(9580);e.i(52474);var f=e.i(220);let w=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/wake-grants/[id]/revoke/route",pathname:"/api/wake-grants/[id]/revoke",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/wake-grants/[id]/revoke/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(2101),...{}}),{workAsyncStorage:E,workUnitAsyncStorage:C,serverHooks:x}=w;async function A(e,t,r){r.requestMeta&&(0,n.setRequestMeta)(e,r.requestMeta),w.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let E="/api/wake-grants/[id]/revoke/route";E=E.replace(/\/index$/,"")||"/";let C=await w.prepare(e,t,{srcPage:E,multiZoneDraftMode:!1});if(!C)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:x,deploymentId:A,params:T,nextConfig:y,parsedUrl:k,isDraftMode:N,prerenderManifest:P,routerServerContext:S,isOnDemandRevalidate:_,revalidateOnlyGenerated:b,resolvedPathname:O,clientReferenceManifest:I,serverActionsManifest:q}=C,H=(0,s.normalizeAppPath)(E),M=!!P.routes[O]&&(w.isDev||(0,m.isRouteCacheOwner)(O,w.cacheOwner,P.routes[O])),U=!!(P.dynamicRoutes[H]||M),D=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,k,!1):t.end("This page could not be found"),null);if(U&&!N){let e=P.dynamicRoutes[H];if(e&&!1===e.fallback&&!M){if(y.adapterPath)return await D();throw new g.NoFallbackError}}let j=null;!U||w.isDev||N||(j="/index"===(j=O)?"/":j);let F=!0===w.isDev||!U,K=U&&!F;q&&I&&(0,i.setManifestsSingleton)({page:E,clientReferenceManifest:I,serverActionsManifest:q});let L=e.method||"GET",$=(0,o.getTracer)(),B=$.getActiveScopeSpan(),G=!!(null==S?void 0:S.isWrappedByNextServer),W=!!(0,n.getRequestMeta)(e,"minimalMode"),V=(0,n.getRequestMeta)(e,"incrementalCache")||await w.getIncrementalCache(e,y,P,W);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let X={params:T,previewProps:P.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,isDraftMode:N,supportsDynamicResponse:F,incrementalCache:V,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>w.onRequestError(e,t,r,n,S)},sharedContext:{buildId:x,deploymentId:A}},z=new l.NodeNextRequest(e),Z=new l.NodeNextResponse(t),J=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t)),Q=async({previousCacheEntry:a})=>{try{if(!W&&_&&b&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await w.handle(J,X);e.fetchMetrics=X.renderOpts.fetchMetrics;let o=X.renderOpts.pendingWaitUntil;o&&r.waitUntil&&(r.waitUntil(o),o=void 0);let i=X.renderOpts.collectedTags;if(!U)return await (0,p.sendResponse)(z,Z,n,o),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);i&&(t[v.NEXT_CACHE_TAGS_HEADER]=i),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,r=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=v.INFINITE_CACHE?!1!==a&&a>0?y.expireTime:void 0:X.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await w.onRequestError(e,t,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:_})},!1,S),t}},Y=async(n,i)=>{try{var s,l;let n=await w.handleResponse({req:e,nextConfig:y,cacheKey:j,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:_,revalidateOnlyGenerated:b,responseGenerator:Q,waitUntil:r.waitUntil,isMinimalMode:W});if(!U)return;if((null==n||null==(s=n.value)?void 0:s.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});W||t.setHeader("x-nextjs-cache",_?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let o=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);W&&U||o.delete(v.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||o.get("Cache-Control")||o.set("Cache-Control",(0,R.getCacheControlHeader)(n.cacheControl)),await (0,p.sendResponse)(z,Z,new Response(n.value.body,{headers:o,status:n.value.status||200}));return}catch(t){if(t instanceof g.NoFallbackError||await w.onRequestError(e,t,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:_})},!1,S),U)throw t;await (0,p.sendResponse)(z,Z,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:o.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let a=$.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||H,s=`${L} ${r}`;n.setAttributes({"next.route":r,"http.route":r,"next.span_name":s}),n.updateName(s),i&&i!==n&&(i.setAttribute("http.route",r),i.updateName(s))})()}};if(G&&B)await Y(B,void 0);else{let t=$.getActiveScopeSpan();await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${L} ${E}`,kind:o.SpanKind.SERVER,attributes:{"http.method":L,"http.target":e.url}},e=>Y(e,t)),void 0,!G)}}e.s(["handler",0,A,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:C})},"routeModule",0,w,"serverHooks",0,x,"workAsyncStorage",0,E,"workUnitAsyncStorage",0,C])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_1inyx08._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[93313,e=>{"use strict";var t=e.i(89171),r=e.i(62294);async function a(e,{params:n}){try{let{id:e}=await n,a=r.conversations.getUiById(e);if(!a)return t.NextResponse.json({error:"Conversation not found"},{status:404});let o=null;if(a.bot_id)o=r.bots.getById(a.bot_id);else if(a.group_id){let e=r.groups.getAll().find(e=>e.id===a.group_id);e&&(o={...e,members:r.groups.getMembers(e.id)})}return t.NextResponse.json({...a,details:o,events:r.projector.listConversationEvents(a.id)})}catch(e){return console.error("Error fetching conversation:",e),t.NextResponse.json({error:"Failed to fetch conversation"},{status:500})}}e.s(["GET",0,a])},12181,e=>{"use strict";var t=e.i(47909),r=e.i(74017),a=e.i(96250),n=e.i(59756),o=e.i(61916),i=e.i(74677),s=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),R=e.i(26937),v=e.i(10372),g=e.i(93695),f=e.i(9580);e.i(52474);var m=e.i(220);let E=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/conversations/[id]/route",pathname:"/api/conversations/[id]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/conversations/[id]/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(93313),...{}}),{workAsyncStorage:C,workUnitAsyncStorage:w,serverHooks:x}=E;async function A(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),E.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let C="/api/conversations/[id]/route";C=C.replace(/\/index$/,"")||"/";let w=await E.prepare(e,t,{srcPage:C,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:x,deploymentId:A,params:y,nextConfig:T,parsedUrl:b,isDraftMode:N,prerenderManifest:P,routerServerContext:S,isOnDemandRevalidate:_,revalidateOnlyGenerated:O,resolvedPathname:q,clientReferenceManifest:H,serverActionsManifest:I}=w,M=(0,s.normalizeAppPath)(C),U=!!P.routes[q]&&(E.isDev||(0,f.isRouteCacheOwner)(q,E.cacheOwner,P.routes[q])),D=!!(P.dynamicRoutes[M]||U),k=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,b,!1):t.end("This page could not be found"),null);if(D&&!N){let e=P.dynamicRoutes[M];if(e&&!1===e.fallback&&!U){if(T.adapterPath)return await k();throw new g.NoFallbackError}}let j=null;!D||E.isDev||N||(j="/index"===(j=q)?"/":j);let F=!0===E.isDev||!D,B=D&&!F;I&&H&&(0,i.setManifestsSingleton)({page:C,clientReferenceManifest:H,serverActionsManifest:I});let K=e.method||"GET",L=(0,o.getTracer)(),$=L.getActiveScopeSpan(),G=!!(null==S?void 0:S.isWrappedByNextServer),V=!!(0,n.getRequestMeta)(e,"minimalMode"),X=(0,n.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,T,P,V);null==X||X.resetRequestCache(),globalThis.__incrementalCache=X;let W={params:y,previewProps:P.preview,renderOpts:{experimental:{authInterrupts:!!T.experimental.authInterrupts,useCacheTimeout:T.experimental.useCacheTimeout},cacheComponents:!!T.cacheComponents,validationLevel:T.experimental.instantInsights.validationLevel,isDraftMode:N,supportsDynamicResponse:F,incrementalCache:X,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:T.cacheLife,staticPageGenerationTimeout:T.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>E.onRequestError(e,t,a,n,S)},sharedContext:{buildId:x,deploymentId:A}},z=new l.NodeNextRequest(e),Z=new l.NodeNextResponse(t),J=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t)),Q=async({previousCacheEntry:r})=>{try{if(!V&&_&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await E.handle(J,W);e.fetchMetrics=W.renderOpts.fetchMetrics;let o=W.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let i=W.renderOpts.collectedTags;if(!D)return await (0,p.sendResponse)(z,Z,n,o),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);i&&(t[v.NEXT_CACHE_TAGS_HEADER]=i),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,a=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=v.INFINITE_CACHE?!1!==r&&r>0?T.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:C,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:B,isOnDemandRevalidate:_})},!1,S),t}},Y=async(n,i)=>{try{var s,l;let n=await E.handleResponse({req:e,nextConfig:T,cacheKey:j,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:_,revalidateOnlyGenerated:O,responseGenerator:Q,waitUntil:a.waitUntil,isMinimalMode:V});if(!D)return;if((null==n||null==(s=n.value)?void 0:s.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",_?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let o=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);V&&D||o.delete(v.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||o.get("Cache-Control")||o.set("Cache-Control",(0,R.getCacheControlHeader)(n.cacheControl)),await (0,p.sendResponse)(z,Z,new Response(n.value.body,{headers:o,status:n.value.status||200}));return}catch(t){if(t instanceof g.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:M,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:B,isOnDemandRevalidate:_})},!1,S),D)throw t;await (0,p.sendResponse)(z,Z,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:o.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let r=L.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route")||M,s=`${K} ${a}`;n.setAttributes({"next.route":a,"http.route":a,"next.span_name":s}),n.updateName(s),i&&i!==n&&(i.setAttribute("http.route",a),i.updateName(s))})()}};if(G&&$)await Y($,void 0);else{let t=L.getActiveScopeSpan();await L.withPropagatedContext(e.headers,()=>L.trace(d.BaseServerSpan.handleRequest,{spanName:`${K} ${C}`,kind:o.SpanKind.SERVER,attributes:{"http.method":K,"http.target":e.url}},e=>Y(e,t)),void 0,!G)}}e.s(["handler",0,A,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:w})},"routeModule",0,E,"serverHooks",0,x,"workAsyncStorage",0,C,"workUnitAsyncStorage",0,w])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_1kjsnlr._.js.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
module.exports=[48004,e=>{"use strict";var t=e.i(69936);async function a(e,{params:n}){let{agentId:r}=await n;return(0,t.handleListSessions)(e,r)}e.s(["GET",0,a])},73191,e=>{"use strict";var t=e.i(47909),a=e.i(74017),n=e.i(96250),r=e.i(59756),i=e.i(61916),s=e.i(74677),o=e.i(69741),d=e.i(16795),l=e.i(87718),u=e.i(95169),c=e.i(47587),_=e.i(66012),p=e.i(70101),g=e.i(26937),h=e.i(10372),v=e.i(93695),E=e.i(9580);e.i(52474);var m=e.i(220);let R=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/v0/agents/[agentId]/sessions/route",pathname:"/api/v0/agents/[agentId]/sessions",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/v0/agents/[agentId]/sessions/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(48004),...{}}),{workAsyncStorage:b,workUnitAsyncStorage:f,serverHooks:A}=R;async function S(e,t,n){n.requestMeta&&(0,r.setRequestMeta)(e,n.requestMeta),R.isDev&&(0,r.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let b="/api/v0/agents/[agentId]/sessions/route";b=b.replace(/\/index$/,"")||"/";let f=await R.prepare(e,t,{srcPage:b,multiZoneDraftMode:!1});if(!f)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:A,deploymentId:S,params:C,nextConfig:O,parsedUrl:w,isDraftMode:N,prerenderManifest:T,routerServerContext:q,isOnDemandRevalidate:x,revalidateOnlyGenerated:y,resolvedPathname:I,clientReferenceManifest:k,serverActionsManifest:L}=f,H=(0,o.normalizeAppPath)(b),P=!!T.routes[I]&&(R.isDev||(0,E.isRouteCacheOwner)(I,R.cacheOwner,T.routes[I])),M=!!(T.dynamicRoutes[H]||P),D=async()=>((null==q?void 0:q.render404)?await q.render404(e,t,w,!1):t.end("This page could not be found"),null);if(M&&!N){let e=T.dynamicRoutes[H];if(e&&!1===e.fallback&&!P){if(O.adapterPath)return await D();throw new v.NoFallbackError}}let F=null;!M||R.isDev||N||(F="/index"===(F=I)?"/":F);let U=!0===R.isDev||!M,$=M&&!U;L&&k&&(0,s.setManifestsSingleton)({page:b,clientReferenceManifest:k,serverActionsManifest:L});let J=e.method||"GET",W=(0,i.getTracer)(),G=W.getActiveScopeSpan(),K=!!(null==q?void 0:q.isWrappedByNextServer),j=!!(0,r.getRequestMeta)(e,"minimalMode"),B=(0,r.getRequestMeta)(e,"incrementalCache")||await R.getIncrementalCache(e,O,T,j);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let X={params:C,previewProps:T.preview,renderOpts:{experimental:{authInterrupts:!!O.experimental.authInterrupts,useCacheTimeout:O.experimental.useCacheTimeout},cacheComponents:!!O.cacheComponents,validationLevel:O.experimental.instantInsights.validationLevel,isDraftMode:N,supportsDynamicResponse:U,incrementalCache:B,hmrRefreshHash:(0,r.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:O.cacheLife,staticPageGenerationTimeout:O.staticPageGenerationTimeout,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,n,r)=>R.onRequestError(e,t,n,r,q)},sharedContext:{buildId:A,deploymentId:S}},V=new d.NodeNextRequest(e),z=new d.NodeNextResponse(t),Y=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:a})=>{try{if(!j&&x&&y&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let r=await R.handle(Y,X);e.fetchMetrics=X.renderOpts.fetchMetrics;let i=X.renderOpts.pendingWaitUntil;i&&n.waitUntil&&(n.waitUntil(i),i=void 0);let s=X.renderOpts.collectedTags;if(!M)return await (0,_.sendResponse)(V,z,r,i),null;{let e=await r.blob(),t=(0,p.toNodeOutgoingHttpHeaders)(r.headers);s&&(t[h.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,n=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=h.INFINITE_CACHE?!1!==a&&a>0?O.expireTime:void 0:X.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:r.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:n}}}}catch(t){throw(null==a?void 0:a.isStale)&&await R.onRequestError(e,t,{routerKind:"App Router",routePath:b,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:x})},!1,q),t}},Q=async(r,s)=>{try{var o,d;let r=await R.handleResponse({req:e,nextConfig:O,cacheKey:F,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:x,revalidateOnlyGenerated:y,responseGenerator:Z,waitUntil:n.waitUntil,isMinimalMode:j});if(!M)return;if((null==r||null==(o=r.value)?void 0:o.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==r||null==(d=r.value)?void 0:d.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});j||t.setHeader("x-nextjs-cache",x?"REVALIDATED":r.isMiss?"MISS":r.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,p.fromNodeOutgoingHttpHeaders)(r.value.headers);j&&M||i.delete(h.NEXT_CACHE_TAGS_HEADER),!r.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,g.getCacheControlHeader)(r.cacheControl)),await (0,_.sendResponse)(V,z,new Response(r.value.body,{headers:i,status:r.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await R.onRequestError(e,t,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:x})},!1,q),M)throw t;await (0,_.sendResponse)(V,z,new Response(null,{status:500}));return}finally{(()=>{if(!r)return;let e=t.statusCode;r.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(r.setStatus({code:i.SpanStatusCode.ERROR}),r.setAttribute("error.type",e.toString()));let a=W.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=a.get("next.route")||H,o=`${J} ${n}`;r.setAttributes({"next.route":n,"http.route":n,"next.span_name":o}),r.updateName(o),s&&s!==r&&(s.setAttribute("http.route",n),s.updateName(o))})()}};if(K&&G)await Q(G,void 0);else{let t=W.getActiveScopeSpan();await W.withPropagatedContext(e.headers,()=>W.trace(u.BaseServerSpan.handleRequest,{spanName:`${J} ${b}`,kind:i.SpanKind.SERVER,attributes:{"http.method":J,"http.target":e.url}},e=>Q(e,t)),void 0,!K)}}e.s(["handler",0,S,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:f})},"routeModule",0,R,"serverHooks",0,A,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,f])},90027,e=>{"use strict";var t=e.i(62349);let a=["active","ended","all"],n=["implementation","revision"],r=`
|
|
2
|
-
SELECT b.*, bot.name AS agent_name, bot.agent AS agent_runtime, r.id AS origin_request_id, c.id AS origin_conversation_id,
|
|
3
|
-
c.type AS conversation_type, c.bot_id AS conversation_bot_id, tb.name AS thread_agent_name, g.name AS group_name,
|
|
4
|
-
r.intent AS request_intent, r.execution_kind AS request_kind, r.state AS request_state,
|
|
5
|
-
r.source_conversation_id AS request_conversation_id, r.target_agent_id AS request_target_agent_id,
|
|
6
|
-
sa.launch_snapshot AS source_snapshot, sa.finished_at AS source_finished_at,
|
|
7
|
-
(SELECT MAX(COALESCE(ra.finished_at, ra.started_at)) FROM work_attempts ra WHERE ra.resumed_session_binding_id = b.id) AS resumed_last_at
|
|
8
|
-
FROM session_bindings b
|
|
9
|
-
JOIN bots bot ON bot.id = b.agent_id
|
|
10
|
-
LEFT JOIN work_attempts sa ON sa.id = b.source_attempt_id
|
|
11
|
-
LEFT JOIN work_requests r ON r.id = COALESCE(b.request_id, sa.request_id)
|
|
12
|
-
LEFT JOIN conversations c ON c.id = COALESCE(b.conversation_id, r.source_conversation_id)
|
|
13
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
14
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
15
|
-
`;function i(e,t){let a=e?.[t];return"string"==typeof a&&a.trim().length>0?a:null}function s(e){let t=e.origin_conversation_id;return t?"group"===e.conversation_type?{id:t,kind:"group",label:e.group_name?`Group ${e.group_name}`:"Group thread",thread_agent_id:null}:"bot"===e.conversation_type&&e.conversation_bot_id?{id:t,kind:"direct",label:e.thread_agent_name?`${e.thread_agent_name} thread`:"Agent thread",thread_agent_id:e.thread_agent_name?e.conversation_bot_id:null}:{id:t,kind:"agent_api",label:"Agent API conversation",thread_agent_id:null}:null}function o(e){var a;let r,o=null;try{o=e.source_snapshot?JSON.parse(e.source_snapshot):null}catch{}let d=s(e),l=null===e.released_at?"active":"ended",u=((r=(e.request_intent??"").split("\n").map(e=>e.trim()).find(e=>e.length>0))?r.length>80?`${r.slice(0,79).trimEnd()}…`:r:null)??(d?.kind==="group"?d.label:null)??`${e.agent_name} \xb7 ${a=e.created_at,`${new Date(a).toISOString().slice(0,16).replace("T"," ")} UTC`}`;return{ref:e.id,agent:{id:e.agent_id,name:e.agent_name,adapter:e.adapter,transport:i(o,"transport")},title:u,status:l,resumable:null===e.released_at&&null!==e.request_id&&null!==e.request_kind&&n.includes(e.request_kind)&&e.request_target_agent_id===e.agent_id&&(e.conversation_id??"")===(e.request_conversation_id??"")&&e.adapter===(0,t.resolveAgent)({agent:e.agent_runtime}).agent,created_at:e.created_at,ended_at:e.released_at,last_activity_at:Math.max(e.created_at,e.released_at??0,e.source_finished_at??0,e.resumed_last_at??0),origin:{conversation:d,work_request:e.origin_request_id&&e.request_kind&&e.request_state?{id:e.origin_request_id,execution_kind:e.request_kind,state:e.request_state}:null},context:{workspace:i(o,"cwd"),deck:i(o,"deck")}}}function d(e,t){return t.last_activity_at-e.last_activity_at||t.created_at-e.created_at||(e.ref<t.ref?-1:+(e.ref>t.ref))}function l(e,t,a){return e.prepare(`${r} WHERE b.id = ? AND b.agent_id = ?`).get(a,t)}e.s(["agentExists",0,function(e,t){return!!e.prepare("SELECT 1 FROM bots WHERE id = ?").get(t)},"conversationRef",0,function(e,t){let a=e.prepare(`
|
|
16
|
-
SELECT c.id AS origin_conversation_id, c.type AS conversation_type, c.bot_id AS conversation_bot_id,
|
|
17
|
-
tb.name AS thread_agent_name, g.name AS group_name
|
|
18
|
-
FROM conversations c
|
|
19
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
20
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
21
|
-
WHERE c.id = ?
|
|
22
|
-
`).get(t);return a?s(a):null},"getAgentSession",0,function(e,t,a){let n=l(e,t,a);if(!n)return;let r=e.prepare(`
|
|
23
|
-
SELECT a.attempt_number, a.kind, a.request_id, a.outcome, a.started_at, a.finished_at,
|
|
24
|
-
CASE WHEN a.id = ? THEN 'source' ELSE 'resume' END AS role
|
|
25
|
-
FROM work_attempts a
|
|
26
|
-
WHERE a.id = ? OR a.resumed_session_binding_id = ?
|
|
27
|
-
ORDER BY a.started_at ASC, a.id ASC
|
|
28
|
-
`).all(n.source_attempt_id,n.source_attempt_id,n.id);return{...o(n),attempts:r}},"isSessionFilter",0,function(e){return"string"==typeof e&&a.includes(e)},"listAgentSessions",0,function(e,t,a="all"){return e.prepare(`${r} WHERE b.agent_id = ? ${"active"===a?"AND b.released_at IS NULL":"ended"===a?"AND b.released_at IS NOT NULL":""}`).all(t).map(o).sort(d)},"sessionDebugExternalId",0,function(e,t,a){return l(e,t,a)?.external_session_id},"sessionTitle",0,function(e,t,a){let n=l(e,t,a);return n?o(n).title:null}])}];
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=_1nurj3f._.js.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
module.exports=[48683,e=>{"use strict";var t=e.i(69936);async function a(e,{params:n}){let{ref:r}=await n;return(0,t.handleSendSessionMessage)(e,r)}e.s(["POST",0,a])},78219,e=>{"use strict";var t=e.i(47909),a=e.i(74017),n=e.i(96250),r=e.i(59756),i=e.i(61916),s=e.i(74677),o=e.i(69741),d=e.i(16795),l=e.i(87718),u=e.i(95169),c=e.i(47587),_=e.i(66012),p=e.i(70101),g=e.i(26937),h=e.i(10372),v=e.i(93695),m=e.i(9580);e.i(52474);var E=e.i(220);let R=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/v0/sessions/[ref]/messages/route",pathname:"/api/v0/sessions/[ref]/messages",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/v0/sessions/[ref]/messages/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(48683),...{}}),{workAsyncStorage:f,workUnitAsyncStorage:S,serverHooks:b}=R;async function A(e,t,n){n.requestMeta&&(0,r.setRequestMeta)(e,n.requestMeta),R.isDev&&(0,r.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/v0/sessions/[ref]/messages/route";f=f.replace(/\/index$/,"")||"/";let S=await R.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!S)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:b,deploymentId:A,params:C,nextConfig:O,parsedUrl:w,isDraftMode:N,prerenderManifest:T,routerServerContext:q,isOnDemandRevalidate:x,revalidateOnlyGenerated:y,resolvedPathname:k,clientReferenceManifest:I,serverActionsManifest:P}=S,H=(0,o.normalizeAppPath)(f),L=!!T.routes[k]&&(R.isDev||(0,m.isRouteCacheOwner)(k,R.cacheOwner,T.routes[k])),M=!!(T.dynamicRoutes[H]||L),D=async()=>((null==q?void 0:q.render404)?await q.render404(e,t,w,!1):t.end("This page could not be found"),null);if(M&&!N){let e=T.dynamicRoutes[H];if(e&&!1===e.fallback&&!L){if(O.adapterPath)return await D();throw new v.NoFallbackError}}let F=null;!M||R.isDev||N||(F="/index"===(F=k)?"/":F);let U=!0===R.isDev||!M,$=M&&!U;P&&I&&(0,s.setManifestsSingleton)({page:f,clientReferenceManifest:I,serverActionsManifest:P});let J=e.method||"GET",W=(0,i.getTracer)(),K=W.getActiveScopeSpan(),j=!!(null==q?void 0:q.isWrappedByNextServer),B=!!(0,r.getRequestMeta)(e,"minimalMode"),G=(0,r.getRequestMeta)(e,"incrementalCache")||await R.getIncrementalCache(e,O,T,B);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let X={params:C,previewProps:T.preview,renderOpts:{experimental:{authInterrupts:!!O.experimental.authInterrupts,useCacheTimeout:O.experimental.useCacheTimeout},cacheComponents:!!O.cacheComponents,validationLevel:O.experimental.instantInsights.validationLevel,isDraftMode:N,supportsDynamicResponse:U,incrementalCache:G,hmrRefreshHash:(0,r.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:O.cacheLife,staticPageGenerationTimeout:O.staticPageGenerationTimeout,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,n,r)=>R.onRequestError(e,t,n,r,q)},sharedContext:{buildId:b,deploymentId:A}},V=new d.NodeNextRequest(e),z=new d.NodeNextResponse(t),Y=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:a})=>{try{if(!B&&x&&y&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let r=await R.handle(Y,X);e.fetchMetrics=X.renderOpts.fetchMetrics;let i=X.renderOpts.pendingWaitUntil;i&&n.waitUntil&&(n.waitUntil(i),i=void 0);let s=X.renderOpts.collectedTags;if(!M)return await (0,_.sendResponse)(V,z,r,i),null;{let e=await r.blob(),t=(0,p.toNodeOutgoingHttpHeaders)(r.headers);s&&(t[h.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,n=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=h.INFINITE_CACHE?!1!==a&&a>0?O.expireTime:void 0:X.renderOpts.collectedExpire;return{value:{kind:E.CachedRouteKind.APP_ROUTE,status:r.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:n}}}}catch(t){throw(null==a?void 0:a.isStale)&&await R.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:x})},!1,q),t}},Q=async(r,s)=>{try{var o,d;let r=await R.handleResponse({req:e,nextConfig:O,cacheKey:F,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:x,revalidateOnlyGenerated:y,responseGenerator:Z,waitUntil:n.waitUntil,isMinimalMode:B});if(!M)return;if((null==r||null==(o=r.value)?void 0:o.kind)!==E.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==r||null==(d=r.value)?void 0:d.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",x?"REVALIDATED":r.isMiss?"MISS":r.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,p.fromNodeOutgoingHttpHeaders)(r.value.headers);B&&M||i.delete(h.NEXT_CACHE_TAGS_HEADER),!r.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,g.getCacheControlHeader)(r.cacheControl)),await (0,_.sendResponse)(V,z,new Response(r.value.body,{headers:i,status:r.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await R.onRequestError(e,t,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:x})},!1,q),M)throw t;await (0,_.sendResponse)(V,z,new Response(null,{status:500}));return}finally{(()=>{if(!r)return;let e=t.statusCode;r.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(r.setStatus({code:i.SpanStatusCode.ERROR}),r.setAttribute("error.type",e.toString()));let a=W.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=a.get("next.route")||H,o=`${J} ${n}`;r.setAttributes({"next.route":n,"http.route":n,"next.span_name":o}),r.updateName(o),s&&s!==r&&(s.setAttribute("http.route",n),s.updateName(o))})()}};if(j&&K)await Q(K,void 0);else{let t=W.getActiveScopeSpan();await W.withPropagatedContext(e.headers,()=>W.trace(u.BaseServerSpan.handleRequest,{spanName:`${J} ${f}`,kind:i.SpanKind.SERVER,attributes:{"http.method":J,"http.target":e.url}},e=>Q(e,t)),void 0,!j)}}e.s(["handler",0,A,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:S})},"routeModule",0,R,"serverHooks",0,b,"workAsyncStorage",0,f,"workUnitAsyncStorage",0,S])},90027,e=>{"use strict";var t=e.i(62349);let a=["active","ended","all"],n=["implementation","revision"],r=`
|
|
2
|
-
SELECT b.*, bot.name AS agent_name, bot.agent AS agent_runtime, r.id AS origin_request_id, c.id AS origin_conversation_id,
|
|
3
|
-
c.type AS conversation_type, c.bot_id AS conversation_bot_id, tb.name AS thread_agent_name, g.name AS group_name,
|
|
4
|
-
r.intent AS request_intent, r.execution_kind AS request_kind, r.state AS request_state,
|
|
5
|
-
r.source_conversation_id AS request_conversation_id, r.target_agent_id AS request_target_agent_id,
|
|
6
|
-
sa.launch_snapshot AS source_snapshot, sa.finished_at AS source_finished_at,
|
|
7
|
-
(SELECT MAX(COALESCE(ra.finished_at, ra.started_at)) FROM work_attempts ra WHERE ra.resumed_session_binding_id = b.id) AS resumed_last_at
|
|
8
|
-
FROM session_bindings b
|
|
9
|
-
JOIN bots bot ON bot.id = b.agent_id
|
|
10
|
-
LEFT JOIN work_attempts sa ON sa.id = b.source_attempt_id
|
|
11
|
-
LEFT JOIN work_requests r ON r.id = COALESCE(b.request_id, sa.request_id)
|
|
12
|
-
LEFT JOIN conversations c ON c.id = COALESCE(b.conversation_id, r.source_conversation_id)
|
|
13
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
14
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
15
|
-
`;function i(e,t){let a=e?.[t];return"string"==typeof a&&a.trim().length>0?a:null}function s(e){let t=e.origin_conversation_id;return t?"group"===e.conversation_type?{id:t,kind:"group",label:e.group_name?`Group ${e.group_name}`:"Group thread",thread_agent_id:null}:"bot"===e.conversation_type&&e.conversation_bot_id?{id:t,kind:"direct",label:e.thread_agent_name?`${e.thread_agent_name} thread`:"Agent thread",thread_agent_id:e.thread_agent_name?e.conversation_bot_id:null}:{id:t,kind:"agent_api",label:"Agent API conversation",thread_agent_id:null}:null}function o(e){var a;let r,o=null;try{o=e.source_snapshot?JSON.parse(e.source_snapshot):null}catch{}let d=s(e),l=null===e.released_at?"active":"ended",u=((r=(e.request_intent??"").split("\n").map(e=>e.trim()).find(e=>e.length>0))?r.length>80?`${r.slice(0,79).trimEnd()}…`:r:null)??(d?.kind==="group"?d.label:null)??`${e.agent_name} \xb7 ${a=e.created_at,`${new Date(a).toISOString().slice(0,16).replace("T"," ")} UTC`}`;return{ref:e.id,agent:{id:e.agent_id,name:e.agent_name,adapter:e.adapter,transport:i(o,"transport")},title:u,status:l,resumable:null===e.released_at&&null!==e.request_id&&null!==e.request_kind&&n.includes(e.request_kind)&&e.request_target_agent_id===e.agent_id&&(e.conversation_id??"")===(e.request_conversation_id??"")&&e.adapter===(0,t.resolveAgent)({agent:e.agent_runtime}).agent,created_at:e.created_at,ended_at:e.released_at,last_activity_at:Math.max(e.created_at,e.released_at??0,e.source_finished_at??0,e.resumed_last_at??0),origin:{conversation:d,work_request:e.origin_request_id&&e.request_kind&&e.request_state?{id:e.origin_request_id,execution_kind:e.request_kind,state:e.request_state}:null},context:{workspace:i(o,"cwd"),deck:i(o,"deck")}}}function d(e,t){return t.last_activity_at-e.last_activity_at||t.created_at-e.created_at||(e.ref<t.ref?-1:+(e.ref>t.ref))}function l(e,t,a){return e.prepare(`${r} WHERE b.id = ? AND b.agent_id = ?`).get(a,t)}e.s(["agentExists",0,function(e,t){return!!e.prepare("SELECT 1 FROM bots WHERE id = ?").get(t)},"conversationRef",0,function(e,t){let a=e.prepare(`
|
|
16
|
-
SELECT c.id AS origin_conversation_id, c.type AS conversation_type, c.bot_id AS conversation_bot_id,
|
|
17
|
-
tb.name AS thread_agent_name, g.name AS group_name
|
|
18
|
-
FROM conversations c
|
|
19
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
20
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
21
|
-
WHERE c.id = ?
|
|
22
|
-
`).get(t);return a?s(a):null},"getAgentSession",0,function(e,t,a){let n=l(e,t,a);if(!n)return;let r=e.prepare(`
|
|
23
|
-
SELECT a.attempt_number, a.kind, a.request_id, a.outcome, a.started_at, a.finished_at,
|
|
24
|
-
CASE WHEN a.id = ? THEN 'source' ELSE 'resume' END AS role
|
|
25
|
-
FROM work_attempts a
|
|
26
|
-
WHERE a.id = ? OR a.resumed_session_binding_id = ?
|
|
27
|
-
ORDER BY a.started_at ASC, a.id ASC
|
|
28
|
-
`).all(n.source_attempt_id,n.source_attempt_id,n.id);return{...o(n),attempts:r}},"isSessionFilter",0,function(e){return"string"==typeof e&&a.includes(e)},"listAgentSessions",0,function(e,t,a="all"){return e.prepare(`${r} WHERE b.agent_id = ? ${"active"===a?"AND b.released_at IS NULL":"ended"===a?"AND b.released_at IS NOT NULL":""}`).all(t).map(o).sort(d)},"sessionDebugExternalId",0,function(e,t,a){return l(e,t,a)?.external_session_id},"sessionTitle",0,function(e,t,a){let n=l(e,t,a);return n?o(n).title:null}])}];
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=_1p2rf_n._.js.map
|