botmancers 0.5.0 → 0.6.1
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 +55 -0
- package/README.md +9 -5
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +9 -0
- package/app/.next/build-manifest.json +3 -3
- package/app/.next/node_modules/@slack/socket-mode-77e8cba3b9ba4738/index.js +1 -0
- package/app/.next/node_modules/@slack/socket-mode-77e8cba3b9ba4738/package.json +1 -0
- package/app/.next/node_modules/@slack/web-api-d6dbe405b6902642/index.js +1 -0
- package/app/.next/node_modules/@slack/web-api-d6dbe405b6902642/package.json +1 -0
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/required-server-files.json +8 -3
- package/app/.next/routes-manifest.json +67 -0
- package/app/.next/server/app/_global-error/page.js +1 -1
- package/app/.next/server/app/_global-error/page.js.nft.json +1 -1
- 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 +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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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.js +5 -6
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/route.js +3 -3
- 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/[ref]/shares/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route.js +11 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route.js.nft.json +1 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/bots/[id]/sessions/route.js +5 -6
- package/app/.next/server/app/api/bots/[id]/sessions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/share-policy/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/bots/[id]/share-policy/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/bots/[id]/share-policy/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/bots/[id]/share-policy/route.js +11 -0
- package/app/.next/server/app/api/bots/[id]/share-policy/route.js.nft.json +1 -0
- package/app/.next/server/app/api/bots/[id]/share-policy/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/bots/[id]/skill/route.js +3 -3
- 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 +1 -1
- 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 +3 -3
- 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 +3 -3
- package/app/.next/server/app/api/bots/import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/manage/route.js +3 -3
- 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 +3 -3
- package/app/.next/server/app/api/bots/name-migrations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/route.js +6 -6
- 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 +3 -3
- 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 +3 -3
- 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 +7 -7
- package/app/.next/server/app/api/conversations/[id]/stop/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/route.js +3 -3
- 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 +5 -5
- package/app/.next/server/app/api/exchanges/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/exchanges/route.js +5 -5
- package/app/.next/server/app/api/exchanges/route.js.nft.json +1 -1
- package/app/.next/server/app/api/files/[name]/route.js +1 -1
- package/app/.next/server/app/api/files/[name]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/groups/route.js +3 -3
- package/app/.next/server/app/api/groups/route.js.nft.json +1 -1
- package/app/.next/server/app/api/health/route.js +5 -2
- package/app/.next/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next/server/app/api/import-capabilities/route.js +1 -1
- package/app/.next/server/app/api/import-capabilities/route.js.nft.json +1 -1
- package/app/.next/server/app/api/marketplace-handoff/route.js +1 -1
- package/app/.next/server/app/api/marketplace-handoff/route.js.nft.json +1 -1
- package/app/.next/server/app/api/marketplace-handoff/status/route.js +1 -1
- package/app/.next/server/app/api/marketplace-handoff/status/route.js.nft.json +1 -1
- package/app/.next/server/app/api/mcp/route.js +3 -3
- package/app/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/app/.next/server/app/api/messages/[id]/between/route.js +3 -3
- package/app/.next/server/app/api/messages/[id]/between/route.js.nft.json +1 -1
- package/app/.next/server/app/api/runtime-connections/route.js +3 -3
- package/app/.next/server/app/api/runtime-connections/route.js.nft.json +1 -1
- package/app/.next/server/app/api/service-grants/route.js +3 -3
- package/app/.next/server/app/api/service-grants/route.js.nft.json +1 -1
- package/app/.next/server/app/api/shares/[shareRef]/revoke/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/shares/[shareRef]/revoke/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/shares/[shareRef]/revoke/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/shares/[shareRef]/revoke/route.js +11 -0
- package/app/.next/server/app/api/shares/[shareRef]/revoke/route.js.nft.json +1 -0
- package/app/.next/server/app/api/shares/[shareRef]/revoke/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/shares/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/shares/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/shares/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/shares/route.js +11 -0
- package/app/.next/server/app/api/shares/route.js.nft.json +1 -0
- package/app/.next/server/app/api/shares/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/v0/agents/[agentId]/conversations/[conversationId]/route.js +5 -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 +5 -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.js +5 -6
- package/app/.next/server/app/api/v0/agents/[agentId]/pins/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/route.js +5 -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 +5 -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 +5 -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 +5 -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 +5 -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 +5 -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 +5 -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 +5 -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 +6 -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.js +5 -6
- package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route.js +5 -6
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/pins/[pinRef]/route.js +5 -6
- package/app/.next/server/app/api/v0/pins/[pinRef]/route.js.nft.json +1 -1
- 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 +5 -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.js +5 -6
- package/app/.next/server/app/api/v0/sessions/[ref]/pins/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/sessions/[ref]/shares/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/shares/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/shares/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/shares/route.js +11 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/shares/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/shares/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route.js +11 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/route.js +11 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/shares/[shareRef]/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/v0/shares/current/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/shares/current/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/shares/current/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/shares/current/route.js +11 -0
- package/app/.next/server/app/api/v0/shares/current/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/shares/current/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/v0/shares/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/shares/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/shares/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/shares/route.js +11 -0
- package/app/.next/server/app/api/v0/shares/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/shares/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 +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 +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 +1 -1
- 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 +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 +2 -2
- package/app/.next/server/app/settings.segments/_full.segment.rsc +2 -2
- package/app/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/threads/[id]/page.js +1 -1
- 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 +9 -0
- package/app/.next/server/chunks/1oeh_server_app_api_bots_[id]_sessions_[ref]_shares_route_actions_1jr6f0v.js +3 -0
- package/app/.next/server/chunks/[externals]_@slack_0owayck._.js +3 -0
- package/app/.next/server/chunks/[externals]__17bolvp._.js +3 -0
- package/app/.next/server/chunks/{[externals]__06lqs5i._.js → [externals]__1eaoma8._.js} +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0-vcyi-._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0-w_t2y._.js +3 -0
- package/app/.next/server/chunks/{[root-of-the-server]__1_01-13._.js → [root-of-the-server]__029-_9t._.js} +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__02vrtib._.js +4 -0
- package/app/.next/server/chunks/[root-of-the-server]__04b3ml2._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__06w5xhe._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__07q5mnr._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0888o0_._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0aincj4._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0e_agq4._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0ey3_2x._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0fku-bw._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0iqh5ta._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0ivjcgs._.js +4 -0
- package/app/.next/server/chunks/[root-of-the-server]__0j4pjyg._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0kgnysc._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0mo_kn3._.js +48 -0
- package/app/.next/server/chunks/[root-of-the-server]__0mp8bap._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0o9ijih._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0qaiqut._.js +44 -0
- package/app/.next/server/chunks/{[root-of-the-server]__1kvvs4u._.js → [root-of-the-server]__0zrx1iz._.js} +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__10b5-i-._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__17xl_55._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1dxr858._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1eps2a4._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1g_n99l._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1ggmit0._.js +4 -0
- package/app/.next/server/chunks/{[root-of-the-server]__1y_j43n._.js → [root-of-the-server]__1hwy3jx._.js} +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__1i8glt4._.js +4 -0
- package/app/.next/server/chunks/{[root-of-the-server]__0j0i8xz._.js → [root-of-the-server]__1igzl05._.js} +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__1kczttr._.js +3 -0
- package/app/.next/server/chunks/{[root-of-the-server]__1c3e2ds._.js → [root-of-the-server]__1kik2zt._.js} +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__1t4ybp2._.js +48 -0
- package/app/.next/server/chunks/[root-of-the-server]__1v3ikuo._.js +3 -0
- package/app/.next/server/chunks/{[root-of-the-server]__0-45blq._.js → [root-of-the-server]__1z5l5cg._.js} +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__200ep0k._.js +3 -0
- package/app/.next/server/chunks/_0061c2q._.js +48 -1
- package/app/.next/server/chunks/_04e2bgj._.js +3 -0
- package/app/.next/server/chunks/_05po7b4._.js +3 -0
- package/app/.next/server/chunks/_06sxx0e._.js +3 -0
- package/app/.next/server/chunks/_0a2do3x._.js +1 -1
- package/app/.next/server/chunks/_0ar2ooe._.js +3 -0
- package/app/.next/server/chunks/_0fmotaz._.js +3 -0
- package/app/.next/server/chunks/_0kpfto_._.js +3 -0
- package/app/.next/server/chunks/_0lm6uis._.js +3 -0
- package/app/.next/server/chunks/_0mpu5tl._.js +3 -0
- package/app/.next/server/chunks/_0qv-4by._.js +3 -0
- package/app/.next/server/chunks/_0u9cfq9._.js +3 -0
- package/app/.next/server/chunks/_0ul8k7g._.js +3 -0
- package/app/.next/server/chunks/_1-5mthb._.js +1 -1
- package/app/.next/server/chunks/_1-60d3o._.js +3 -0
- package/app/.next/server/chunks/_133y3b0._.js +3 -0
- package/app/.next/server/chunks/_167960a._.js +3 -0
- package/app/.next/server/chunks/_17vgjlt._.js +3 -0
- package/app/.next/server/chunks/_1amx9_4._.js +3 -0
- package/app/.next/server/chunks/_1b01v-_._.js +3 -0
- package/app/.next/server/chunks/_1c-g4gq._.js +3 -0
- package/app/.next/server/chunks/_1ey6l4p._.js +3 -0
- package/app/.next/server/chunks/_1nlg4x_._.js +3 -0
- package/app/.next/server/chunks/_1x4dqzv._.js +3 -0
- package/app/.next/server/chunks/_1z0qbzc._.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_bots_[id]_share-policy_route_actions_0x-p250.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_shares_[shareRef]_revoke_route_actions_1cu5kah.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_shares_route_actions_0wk7x1r.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_sessions_[ref]_shares_route_actions_11fh--7.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_shares_[shareRef]_revoke_route_actions_00rzyj9.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_shares_[shareRef]_route_actions_0i1t5qb.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_shares_current_route_actions_1w_bpas.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_shares_route_actions_1b38was.js +3 -0
- package/app/.next/server/chunks/lib_0v4d9w0._.js +339 -0
- package/app/.next/server/chunks/lib_0zzo6zb._.js +339 -0
- package/app/.next/server/chunks/lib_15adnlz._.js +2189 -0
- package/app/.next/server/chunks/lib_1_u7n-u._.js +339 -0
- package/app/.next/server/chunks/lib_1muhwn7._.js +339 -0
- package/app/.next/server/chunks/lib_1xnxg-q._.js +339 -0
- package/app/.next/server/chunks/lib_1zc7-gl._.js +2189 -0
- package/app/.next/server/chunks/lib_agent-api_ts_0iv52-o._.js +3 -0
- package/app/.next/server/chunks/{[root-of-the-server]__0izjfmr._.js → lib_db_ts_1ttuckb._.js} +3 -3
- package/app/.next/server/chunks/lib_service-api-http_ts_0xzqhny._.js +5 -5
- package/app/.next/server/chunks/lib_slack-runtime_ts_0fgsejy._.js +63 -0
- package/app/.next/server/chunks/ssr/{[root-of-the-server]__03186rx._.js → [root-of-the-server]__1smmfpx._.js} +1 -1
- package/app/.next/server/chunks/ssr/_0_fa0na._.js +3 -0
- package/app/.next/server/chunks/ssr/_1cvuhjt._.js +1 -1
- package/app/.next/server/chunks/ssr/_1i02yyi._.js +3 -0
- package/app/.next/server/chunks/ssr/_1n5mvo5._.js +1 -1
- 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/instrumentation.js +4 -0
- package/app/.next/server/middleware-build-manifest.js +3 -3
- package/app/.next/server/middleware.js +1 -1
- 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/{2a8bomryx66oj.css → 0jon21u-9j2aw.css} +1 -1
- package/app/.next/static/chunks/14k6cvywgknx2.js +3 -0
- package/app/.next/static/chunks/1r5tqd-7h1xjn.js +1 -0
- package/app/.next/static/chunks/22xbkclbkct3s.js +1 -0
- package/app/.next/static/chunks/2c953okoei6ip.js +1 -0
- package/app/.next/static/chunks/2t_2gf3xoxz_m.js +1 -0
- package/app/.next/static/chunks/34vnvo1qssbaj.js +1 -0
- package/app/BUILD_INFO.json +2 -2
- package/app/node_modules/@slack/logger/dist/index.js +94 -0
- package/app/node_modules/@slack/logger/package.json +43 -0
- package/app/node_modules/@slack/socket-mode/dist/package.json +67 -0
- package/app/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.js +242 -0
- package/app/node_modules/@slack/socket-mode/dist/src/SocketModeClient.js +363 -0
- package/app/node_modules/@slack/socket-mode/dist/src/UnrecoverableSocketModeStartError.js +14 -0
- package/app/node_modules/@slack/socket-mode/dist/src/errors.js +68 -0
- package/app/node_modules/@slack/socket-mode/dist/src/index.js +13 -0
- package/app/node_modules/@slack/socket-mode/dist/src/logger.js +26 -0
- package/app/node_modules/@slack/socket-mode/package.json +67 -0
- package/app/node_modules/@slack/types/dist/block-kit/block-elements.js +4 -0
- package/app/node_modules/@slack/types/dist/block-kit/blocks.js +3 -0
- package/app/node_modules/@slack/types/dist/block-kit/composition-objects.js +4 -0
- package/app/node_modules/@slack/types/dist/block-kit/extensions.js +3 -0
- package/app/node_modules/@slack/types/dist/calls.js +6 -0
- package/app/node_modules/@slack/types/dist/chunk.js +3 -0
- package/app/node_modules/@slack/types/dist/dialog.js +3 -0
- package/app/node_modules/@slack/types/dist/events/app.js +3 -0
- package/app/node_modules/@slack/types/dist/events/assistant.js +3 -0
- package/app/node_modules/@slack/types/dist/events/call.js +3 -0
- package/app/node_modules/@slack/types/dist/events/channel.js +3 -0
- package/app/node_modules/@slack/types/dist/events/dnd.js +3 -0
- package/app/node_modules/@slack/types/dist/events/email.js +3 -0
- package/app/node_modules/@slack/types/dist/events/emoji.js +3 -0
- package/app/node_modules/@slack/types/dist/events/file.js +4 -0
- package/app/node_modules/@slack/types/dist/events/function.js +3 -0
- package/app/node_modules/@slack/types/dist/events/grid-migration.js +3 -0
- package/app/node_modules/@slack/types/dist/events/group.js +3 -0
- package/app/node_modules/@slack/types/dist/events/im.js +3 -0
- package/app/node_modules/@slack/types/dist/events/index.js +43 -0
- package/app/node_modules/@slack/types/dist/events/invite.js +3 -0
- package/app/node_modules/@slack/types/dist/events/link-shared.js +3 -0
- package/app/node_modules/@slack/types/dist/events/member.js +3 -0
- package/app/node_modules/@slack/types/dist/events/message-metadata.js +3 -0
- package/app/node_modules/@slack/types/dist/events/message.js +3 -0
- package/app/node_modules/@slack/types/dist/events/pin.js +3 -0
- package/app/node_modules/@slack/types/dist/events/reaction.js +3 -0
- package/app/node_modules/@slack/types/dist/events/shared-channel.js +3 -0
- package/app/node_modules/@slack/types/dist/events/star.js +3 -0
- package/app/node_modules/@slack/types/dist/events/steps-from-apps.js +3 -0
- package/app/node_modules/@slack/types/dist/events/subteam.js +3 -0
- package/app/node_modules/@slack/types/dist/events/team.js +3 -0
- package/app/node_modules/@slack/types/dist/events/token.js +3 -0
- package/app/node_modules/@slack/types/dist/events/user.js +3 -0
- package/app/node_modules/@slack/types/dist/index.js +28 -0
- package/app/node_modules/@slack/types/dist/message-attachments.js +3 -0
- package/app/node_modules/@slack/types/dist/message-metadata.js +27 -0
- package/app/node_modules/@slack/types/dist/views.js +3 -0
- package/app/node_modules/@slack/types/package.json +47 -0
- package/app/node_modules/@slack/web-api/dist/WebClient.js +818 -0
- package/app/node_modules/@slack/web-api/dist/chat-stream.js +178 -0
- package/app/node_modules/@slack/web-api/dist/errors.js +80 -0
- package/app/node_modules/@slack/web-api/dist/file-upload.js +360 -0
- package/app/node_modules/@slack/web-api/dist/helpers.js +14 -0
- package/app/node_modules/@slack/web-api/dist/index.js +39 -0
- package/app/node_modules/@slack/web-api/dist/instrument.js +87 -0
- package/app/node_modules/@slack/web-api/dist/logger.js +29 -0
- package/app/node_modules/@slack/web-api/dist/methods.js +1647 -0
- package/app/node_modules/@slack/web-api/dist/retry-policies.js +34 -0
- package/app/node_modules/@slack/web-api/dist/types/helpers.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/analytics.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/apps.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/auth.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/barriers.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/conversations.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/emoji.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/functions.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/inviteRequests.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/roles.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/teams.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/usergroups.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/users.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/admin/workflows.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/api.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/apps.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/assistant.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/auth.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/bookmarks.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/bots.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/calls.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/canvas.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/chat.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/common.js +4 -0
- package/app/node_modules/@slack/web-api/dist/types/request/conversations.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/dialog.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/dnd.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/emoji.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/entity.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/files.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/functions.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/index.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/manifest.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/migration.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/oauth.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/openid.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/pins.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/reactions.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/reminders.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/rtm.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/search.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/slackLists.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/stars.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/team.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/tooling.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/usergroups.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/users.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/views.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/request/workflows.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAnalyticsGetFileResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsActivitiesListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsApproveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsApprovedListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsClearResolutionResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsConfigLookupResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsConfigSetResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsRequestsCancelResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsRequestsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsRestrictResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsRestrictedListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAppsUninstallResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAuthPolicyAssignEntitiesResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAuthPolicyGetEntitiesResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminAuthPolicyRemoveEntitiesResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminBarriersCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminBarriersDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminBarriersListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminBarriersUpdateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsArchiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsBulkArchiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsBulkDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsBulkMoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsConvertToPrivateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsConvertToPublicResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsDisconnectSharedResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsEkmListOriginalConnectedChannelInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsGetConversationPrefsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsGetCustomRetentionResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsGetTeamsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsInviteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsLookupResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsRemoveCustomRetentionResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsRenameResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsRestrictAccessAddGroupResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsRestrictAccessListGroupsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsRestrictAccessRemoveGroupResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsSearchResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsSetConversationPrefsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsSetCustomRetentionResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsSetTeamsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsUnarchiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsWhitelistAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsWhitelistListGroupsLinkedToChannelResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminConversationsWhitelistRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminEmojiAddAliasResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminEmojiAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminEmojiListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminEmojiRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminEmojiRenameResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminFunctionsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminFunctionsPermissionsLookupResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminFunctionsPermissionsSetResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminInviteRequestsApproveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminInviteRequestsApprovedListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminInviteRequestsDeniedListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminInviteRequestsDenyResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminInviteRequestsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminRolesAddAssignmentsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminRolesListAssignmentsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminRolesRemoveAssignmentsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsAdminsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsOwnersListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsSettingsInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsSettingsSetDefaultChannelsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsSettingsSetDescriptionResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsSettingsSetDiscoverabilityResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsSettingsSetIconResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminTeamsSettingsSetNameResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsergroupsAddChannelsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsergroupsAddTeamsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsergroupsListChannelsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsergroupsRemoveChannelsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersAssignResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersInviteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSessionClearSettingsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSessionGetSettingsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSessionInvalidateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSessionListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSessionResetBulkResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSessionResetResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSessionSetSettingsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSetAdminResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSetExpirationResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSetOwnerResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersSetRegularResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminUsersUnsupportedVersionsExportResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminWorkflowsCollaboratorsAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminWorkflowsCollaboratorsRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminWorkflowsPermissionsLookupResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminWorkflowsSearchResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AdminWorkflowsUnpublishResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ApiTestResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsConnectionsOpenResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsEventAuthorizationsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsManifestCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsManifestDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsManifestExportResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsManifestUpdateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsManifestValidateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsPermissionsInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsPermissionsRequestResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsPermissionsResourcesListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsPermissionsScopesListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsPermissionsUsersListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsPermissionsUsersRequestResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsUninstallResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionUpdateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AssistantThreadsSetStatusResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AssistantThreadsSetSuggestedPromptsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AssistantThreadsSetTitleResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AuthRevokeResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AuthTeamsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/AuthTestResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/BookmarksAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/BookmarksEditResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/BookmarksListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/BookmarksRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/BotsInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CallsAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CallsEndResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CallsInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CallsParticipantsAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CallsParticipantsRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CallsUpdateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CanvasesAccessDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CanvasesAccessSetResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CanvasesCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CanvasesDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CanvasesEditResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/CanvasesSectionsLookupResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsArchiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsHistoryResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsInviteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsJoinResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsKickResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsLeaveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsMarkResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsRenameResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsRepliesResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsSetPurposeResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsSetTopicResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChannelsUnarchiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatAppendStreamResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatDeleteScheduledMessageResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatGetPermalinkResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatMeMessageResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatPostEphemeralResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatPostMessageResponse.js +67 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatScheduleMessageResponse.js +48 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatScheduledMessagesListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatStartStreamResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatStopStreamResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatUnfurlResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ChatUpdateResponse.js +48 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsAcceptSharedInviteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsApproveSharedInviteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsArchiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsCanvasesCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsCloseResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsDeclineSharedInviteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsExternalInvitePermissionsSetResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsHistoryResponse.js +67 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsInviteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsInviteSharedResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsJoinResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsKickResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsLeaveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsListConnectInvitesResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsMarkResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsMembersResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsOpenResponse.js +48 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsRenameResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsRepliesResponse.js +67 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsRequestSharedInviteApproveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsRequestSharedInviteDenyResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsRequestSharedInviteListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsSetPurposeResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsSetTopicResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ConversationsUnarchiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/DialogOpenResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/DndEndDndResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/DndEndSnoozeResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/DndInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/DndSetSnoozeResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/DndTeamInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/EmojiListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/EntityPresentDetailsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesCommentsAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesCommentsDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesCommentsEditResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesCompleteUploadExternalResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesGetUploadURLExternalResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesInfoResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesListResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesRemoteAddResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesRemoteInfoResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesRemoteListResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesRemoteRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesRemoteShareResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesRemoteUpdateResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesRevokePublicURLResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesSharedPublicURLResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FilesUploadResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FunctionsCompleteErrorResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/FunctionsCompleteSuccessResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsArchiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsCloseResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsCreateChildResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsHistoryResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsInviteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsKickResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsLeaveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsMarkResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsOpenResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsRenameResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsRepliesResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsSetPurposeResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsSetTopicResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/GroupsUnarchiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ImCloseResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ImHistoryResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ImListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ImMarkResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ImOpenResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ImRepliesResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/MigrationExchangeResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/MpimCloseResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/MpimHistoryResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/MpimListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/MpimMarkResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/MpimOpenResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/MpimRepliesResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/OauthAccessResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/OauthTokenResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/OauthV2AccessResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/OauthV2ExchangeResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/OpenIDConnectTokenResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/OpenIDConnectUserInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/PinsAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/PinsListResponse.js +37 -0
- package/app/node_modules/@slack/web-api/dist/types/response/PinsRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ReactionsAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ReactionsGetResponse.js +48 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ReactionsListResponse.js +67 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ReactionsRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/RemindersAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/RemindersCompleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/RemindersDeleteResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/RemindersInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/RemindersListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/RtmConnectResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/RtmStartResponse.js +77 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SearchAllResponse.js +82 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SearchFilesResponse.js +63 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SearchMessagesResponse.js +67 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsAccessDeleteResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsAccessSetResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsCreateResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadGetResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadStartResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsItemsCreateResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteMultipleResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsItemsInfoResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsItemsListResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsItemsUpdateResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/SlackListsUpdateResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/StarsAddResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/StarsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/StarsRemoveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/TeamAccessLogsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/TeamBillableInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/TeamBillingInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/TeamExternalTeamsDisconnectResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/TeamExternalTeamsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/TeamInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/TeamIntegrationLogsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/TeamPreferencesListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/TeamProfileGetResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ToolingTokensRotateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsergroupsCreateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsergroupsDisableResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsergroupsEnableResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsergroupsListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsergroupsUpdateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsergroupsUsersListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsergroupsUsersUpdateResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersConversationsResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersDeletePhotoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersDiscoverableContactsLookupResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersGetPresenceResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersIdentityResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersInfoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersListResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersLookupByEmailResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersProfileGetResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersProfileSetResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersSetActiveResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersSetPhotoResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/UsersSetPresenceResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ViewsOpenResponse.js +31 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ViewsPublishResponse.js +31 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ViewsPushResponse.js +31 -0
- package/app/node_modules/@slack/web-api/dist/types/response/ViewsUpdateResponse.js +31 -0
- package/app/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedAddResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedListResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedRemoveResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedSetResponse.js +3 -0
- package/app/node_modules/@slack/web-api/dist/types/response/WorkflowsStepCompletedResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/WorkflowsStepFailedResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/WorkflowsUpdateStepResponse.js +11 -0
- package/app/node_modules/@slack/web-api/dist/types/response/index.js +3 -0
- package/app/node_modules/@slack/web-api/package.json +75 -0
- package/app/node_modules/agent-base/dist/src/index.js +203 -0
- package/app/node_modules/agent-base/dist/src/promisify.js +18 -0
- package/app/node_modules/agent-base/package.json +64 -0
- package/app/node_modules/asynckit/index.js +6 -0
- package/app/node_modules/asynckit/lib/abort.js +29 -0
- package/app/node_modules/asynckit/lib/async.js +34 -0
- package/app/node_modules/asynckit/lib/defer.js +26 -0
- package/app/node_modules/asynckit/lib/iterate.js +75 -0
- package/app/node_modules/asynckit/lib/state.js +37 -0
- package/app/node_modules/asynckit/lib/terminator.js +29 -0
- package/app/node_modules/asynckit/package.json +63 -0
- package/app/node_modules/asynckit/parallel.js +43 -0
- package/app/node_modules/asynckit/serial.js +17 -0
- package/app/node_modules/asynckit/serialOrdered.js +75 -0
- package/app/node_modules/axios/dist/node/axios.cjs +6808 -0
- package/app/node_modules/axios/package.json +203 -0
- package/app/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/app/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/app/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/app/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/app/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/app/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/app/node_modules/combined-stream/lib/combined_stream.js +208 -0
- package/app/node_modules/combined-stream/package.json +25 -0
- package/app/node_modules/debug/package.json +64 -0
- package/app/node_modules/debug/src/browser.js +272 -0
- package/app/node_modules/debug/src/common.js +292 -0
- package/app/node_modules/debug/src/index.js +10 -0
- package/app/node_modules/debug/src/node.js +263 -0
- package/app/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- package/app/node_modules/delayed-stream/package.json +27 -0
- package/app/node_modules/dunder-proto/get.js +30 -0
- package/app/node_modules/dunder-proto/package.json +76 -0
- package/app/node_modules/es-define-property/index.js +14 -0
- package/app/node_modules/es-define-property/package.json +81 -0
- package/app/node_modules/es-errors/eval.js +4 -0
- package/app/node_modules/es-errors/index.js +4 -0
- package/app/node_modules/es-errors/package.json +80 -0
- package/app/node_modules/es-errors/range.js +4 -0
- package/app/node_modules/es-errors/ref.js +4 -0
- package/app/node_modules/es-errors/syntax.js +4 -0
- package/app/node_modules/es-errors/type.js +4 -0
- package/app/node_modules/es-errors/uri.js +4 -0
- package/app/node_modules/es-object-atoms/index.js +4 -0
- package/app/node_modules/es-object-atoms/package.json +79 -0
- package/app/node_modules/es-set-tostringtag/index.js +35 -0
- package/app/node_modules/es-set-tostringtag/package.json +78 -0
- package/app/node_modules/eventemitter3/index.js +336 -0
- package/app/node_modules/eventemitter3/package.json +62 -0
- package/app/node_modules/follow-redirects/debug.js +15 -0
- package/app/node_modules/follow-redirects/index.js +709 -0
- package/app/node_modules/follow-redirects/package.json +58 -0
- package/app/node_modules/form-data/lib/browser.js +4 -0
- package/app/node_modules/form-data/lib/form_data.js +506 -0
- package/app/node_modules/form-data/lib/populate.js +10 -0
- package/app/node_modules/form-data/package.json +82 -0
- package/app/node_modules/function-bind/implementation.js +84 -0
- package/app/node_modules/function-bind/index.js +5 -0
- package/app/node_modules/function-bind/package.json +87 -0
- package/app/node_modules/get-intrinsic/index.js +378 -0
- package/app/node_modules/get-intrinsic/package.json +97 -0
- package/app/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/app/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/app/node_modules/get-proto/index.js +27 -0
- package/app/node_modules/get-proto/package.json +81 -0
- package/app/node_modules/gopd/gOPD.js +4 -0
- package/app/node_modules/gopd/index.js +15 -0
- package/app/node_modules/gopd/package.json +77 -0
- package/app/node_modules/has-flag/index.js +8 -0
- package/app/node_modules/has-flag/package.json +46 -0
- package/app/node_modules/has-symbols/index.js +14 -0
- package/app/node_modules/has-symbols/package.json +111 -0
- package/app/node_modules/has-symbols/shams.js +45 -0
- package/app/node_modules/has-tostringtag/package.json +108 -0
- package/app/node_modules/has-tostringtag/shams.js +8 -0
- package/app/node_modules/hasown/index.js +8 -0
- package/app/node_modules/hasown/package.json +91 -0
- package/app/node_modules/https-proxy-agent/dist/agent.js +177 -0
- package/app/node_modules/https-proxy-agent/dist/index.js +14 -0
- package/app/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
- package/app/node_modules/https-proxy-agent/package.json +56 -0
- package/app/node_modules/is-electron/index.js +21 -0
- package/app/node_modules/is-electron/package.json +34 -0
- package/app/node_modules/is-stream/index.js +28 -0
- package/app/node_modules/is-stream/package.json +42 -0
- package/app/node_modules/math-intrinsics/abs.js +4 -0
- package/app/node_modules/math-intrinsics/floor.js +4 -0
- package/app/node_modules/math-intrinsics/isNaN.js +6 -0
- package/app/node_modules/math-intrinsics/max.js +4 -0
- package/app/node_modules/math-intrinsics/min.js +4 -0
- package/app/node_modules/math-intrinsics/package.json +86 -0
- package/app/node_modules/math-intrinsics/pow.js +4 -0
- package/app/node_modules/math-intrinsics/round.js +4 -0
- package/app/node_modules/math-intrinsics/sign.js +11 -0
- package/app/node_modules/mime-db/db.json +8519 -0
- package/app/node_modules/mime-db/index.js +12 -0
- package/app/node_modules/mime-db/package.json +60 -0
- package/app/node_modules/mime-types/index.js +188 -0
- package/app/node_modules/mime-types/package.json +44 -0
- package/app/node_modules/ms/index.js +162 -0
- package/app/node_modules/ms/package.json +38 -0
- package/app/node_modules/p-finally/index.js +15 -0
- package/app/node_modules/p-finally/package.json +42 -0
- package/app/node_modules/p-queue/dist/index.js +279 -0
- package/app/node_modules/p-queue/dist/lower-bound.js +21 -0
- package/app/node_modules/p-queue/dist/priority-queue.js +32 -0
- package/app/node_modules/p-queue/node_modules/eventemitter3/index.js +336 -0
- package/app/node_modules/p-queue/node_modules/eventemitter3/package.json +56 -0
- package/app/node_modules/p-queue/package.json +92 -0
- package/app/node_modules/p-retry/index.js +85 -0
- package/app/node_modules/p-retry/package.json +51 -0
- package/app/node_modules/p-timeout/index.js +57 -0
- package/app/node_modules/p-timeout/package.json +45 -0
- package/app/node_modules/retry/index.js +1 -0
- package/app/node_modules/retry/lib/retry.js +100 -0
- package/app/node_modules/retry/lib/retry_operation.js +162 -0
- package/app/node_modules/retry/package.json +36 -0
- package/app/node_modules/supports-color/index.js +135 -0
- package/app/node_modules/supports-color/package.json +53 -0
- package/app/node_modules/ws/index.js +22 -0
- package/app/node_modules/ws/lib/buffer-util.js +131 -0
- package/app/node_modules/ws/lib/constants.js +19 -0
- package/app/node_modules/ws/lib/event-target.js +292 -0
- package/app/node_modules/ws/lib/extension.js +203 -0
- package/app/node_modules/ws/lib/limiter.js +55 -0
- package/app/node_modules/ws/lib/permessage-deflate.js +530 -0
- package/app/node_modules/ws/lib/receiver.js +743 -0
- package/app/node_modules/ws/lib/sender.js +607 -0
- package/app/node_modules/ws/lib/stream.js +161 -0
- package/app/node_modules/ws/lib/subprotocol.js +62 -0
- package/app/node_modules/ws/lib/validation.js +152 -0
- package/app/node_modules/ws/lib/websocket-server.js +562 -0
- package/app/node_modules/ws/lib/websocket.js +1421 -0
- package/app/node_modules/ws/package.json +74 -0
- package/app/package.json +1 -1
- package/app/server.js +1 -1
- package/dist/cli.js +5 -2
- package/dist/product.d.ts +8 -0
- package/dist/product.js +69 -3
- package/package.json +2 -2
- package/schemas/botmancers.mcp.v2.tools.json +767 -2
- package/skills/botmancers-collaboration/SKILL.md +5 -1
- package/skills/botmancers-collaboration/references/workflows.md +21 -0
- package/app/.next/server/chunks/[root-of-the-server]__06qkt0f._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__08qhrch._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__097ptn_._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__09m9-pe._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__0b7w1z3._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__0f5yqjs._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__0g4um3-._.js +0 -44
- package/app/.next/server/chunks/[root-of-the-server]__0hro5ey._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__0hwpgxq._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__0uq7sci._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__13cd2fb._.js +0 -44
- package/app/.next/server/chunks/[root-of-the-server]__1879cge._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1a2dh11._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1co3sok._.js +0 -44
- package/app/.next/server/chunks/[root-of-the-server]__1eh30sp._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1fmsid0._.js +0 -44
- package/app/.next/server/chunks/[root-of-the-server]__1qbgs3m._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1s6h1sj._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1slu7d7._.js +0 -7
- package/app/.next/server/chunks/[root-of-the-server]__1tuqc5v._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1v609eq._.js +0 -44
- package/app/.next/server/chunks/[root-of-the-server]__1zdv-vb._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1zjs2tr._.js +0 -3
- package/app/.next/server/chunks/_023se5j._.js +0 -44
- package/app/.next/server/chunks/_02pb_qv._.js +0 -44
- package/app/.next/server/chunks/_05ro-21._.js +0 -44
- package/app/.next/server/chunks/_07on0dc._.js +0 -44
- package/app/.next/server/chunks/_08208nz._.js +0 -44
- package/app/.next/server/chunks/_0fe5qz5._.js +0 -44
- package/app/.next/server/chunks/_0qoji5a._.js +0 -44
- package/app/.next/server/chunks/_0uv2pi5._.js +0 -44
- package/app/.next/server/chunks/_0wdl90-._.js +0 -44
- package/app/.next/server/chunks/_11ijk9k._.js +0 -44
- package/app/.next/server/chunks/_198sn69._.js +0 -44
- package/app/.next/server/chunks/_1ba_5hd._.js +0 -44
- package/app/.next/server/chunks/_1m89jq5._.js +0 -44
- package/app/.next/server/chunks/_1n39wr_._.js +0 -44
- package/app/.next/server/chunks/_1ryxqo1._.js +0 -44
- package/app/.next/server/chunks/_1vemgly._.js +0 -44
- package/app/.next/server/chunks/lib_0lqoyb4._.js +0 -217
- package/app/.next/server/chunks/lib_0riiofz._.js +0 -44
- package/app/.next/server/chunks/lib_16j2293._.js +0 -217
- package/app/.next/server/chunks/lib_1nb_61e._.js +0 -217
- package/app/.next/server/chunks/lib_session-pins_ts_0lmxnwj._.js +0 -20
- package/app/.next/server/chunks/ssr/app_components_ExchangeCard_tsx_1shfcgn._.js +0 -3
- package/app/.next/server/chunks/ssr/node_modules_next_dist_client_components_server-async-storage_0t1dato.js +0 -3
- package/app/.next/static/chunks/0bhd8eso48g27.js +0 -1
- package/app/.next/static/chunks/3230ywnpii0s6.js +0 -3
- package/app/.next/static/chunks/35l2c95bd-jud.js +0 -1
- package/app/.next/static/chunks/3cijpn6vx3yzv.js +0 -1
- package/app/.next/static/chunks/3ue9194j59kem.js +0 -1
- package/app/.next/static/chunks/44ese2s4gzze_.js +0 -1
- /package/app/.next/static/{gh3shm8hnVqXLr75rmvsL → _yrIZIFsIbXA0Gaxkytjd}/_buildManifest.js +0 -0
- /package/app/.next/static/{gh3shm8hnVqXLr75rmvsL → _yrIZIFsIbXA0Gaxkytjd}/_clientMiddlewareManifest.js +0 -0
- /package/app/.next/static/{gh3shm8hnVqXLr75rmvsL → _yrIZIFsIbXA0Gaxkytjd}/_ssgManifest.js +0 -0
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
module.exports=[56989,e=>{"use strict";var t=e.i(69936);async function n(e,{params:a}){let{pinRef:r}=await a;return(0,t.handleDetachPin)(e,r)}e.s(["POST",0,n])},24761,e=>{"use strict";var t=e.i(47909),n=e.i(74017),a=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),p=e.i(66012),_=e.i(70101),g=e.i(26937),h=e.i(10372),v=e.i(93695),f=e.i(9580);e.i(52474);var m=e.i(220);let E=new t.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/v0/pins/[pinRef]/detach/route",pathname:"/api/v0/pins/[pinRef]/detach",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/v0/pins/[pinRef]/detach/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(56989),...{}}),{workAsyncStorage:A,workUnitAsyncStorage:b,serverHooks:R}=E;async function y(e,t,a){a.requestMeta&&(0,r.setRequestMeta)(e,a.requestMeta),E.isDev&&(0,r.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let A="/api/v0/pins/[pinRef]/detach/route";A=A.replace(/\/index$/,"")||"/";let b=await E.prepare(e,t,{srcPage:A,multiZoneDraftMode:!1});if(!b)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:R,deploymentId:y,params:S,nextConfig:w,parsedUrl:C,isDraftMode:N,prerenderManifest:O,routerServerContext:T,isOnDemandRevalidate:k,revalidateOnlyGenerated:q,resolvedPathname:I,clientReferenceManifest:x,serverActionsManifest:P}=b,L=(0,o.normalizeAppPath)(A),M=!!O.routes[I]&&(E.isDev||(0,f.isRouteCacheOwner)(I,E.cacheOwner,O.routes[I])),D=!!(O.dynamicRoutes[L]||M),H=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,C,!1):t.end("This page could not be found"),null);if(D&&!N){let e=O.dynamicRoutes[L];if(e&&!1===e.fallback&&!M){if(w.adapterPath)return await H();throw new v.NoFallbackError}}let F=null;!D||E.isDev||N||(F="/index"===(F=I)?"/":F);let U=!0===E.isDev||!D,$=D&&!U;P&&x&&(0,s.setManifestsSingleton)({page:A,clientReferenceManifest:x,serverActionsManifest:P});let K=e.method||"GET",j=(0,i.getTracer)(),W=j.getActiveScopeSpan(),J=!!(null==T?void 0:T.isWrappedByNextServer),X=!!(0,r.getRequestMeta)(e,"minimalMode"),G=(0,r.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,w,O,X);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let B={params:S,previewProps:O.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts,useCacheTimeout:w.experimental.useCacheTimeout},cacheComponents:!!w.cacheComponents,validationLevel:w.experimental.instantInsights.validationLevel,isDraftMode:N,supportsDynamicResponse:U,incrementalCache:G,hmrRefreshHash:(0,r.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:w.cacheLife,staticPageGenerationTimeout:w.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,a,r)=>E.onRequestError(e,t,a,r,T)},sharedContext:{buildId:R,deploymentId:y}},V=new d.NodeNextRequest(e),Y=new d.NodeNextResponse(t),z=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:n})=>{try{if(!X&&k&&q&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let r=await E.handle(z,B);e.fetchMetrics=B.renderOpts.fetchMetrics;let i=B.renderOpts.pendingWaitUntil;i&&a.waitUntil&&(a.waitUntil(i),i=void 0);let s=B.renderOpts.collectedTags;if(!D)return await (0,p.sendResponse)(V,Y,r,i),null;{let e=await r.blob(),t=(0,_.toNodeOutgoingHttpHeaders)(r.headers);s&&(t[h.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,a=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=h.INFINITE_CACHE?!1!==n&&n>0?w.expireTime:void 0:B.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:r.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:a}}}}catch(t){throw(null==n?void 0:n.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:A,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:k})},!1,T),t}},Q=async(r,s)=>{try{var o,d;let r=await E.handleResponse({req:e,nextConfig:w,cacheKey:F,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:O,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:q,responseGenerator:Z,waitUntil:a.waitUntil,isMinimalMode:X});if(!D)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});X||t.setHeader("x-nextjs-cache",k?"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,_.fromNodeOutgoingHttpHeaders)(r.value.headers);X&&D||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,p.sendResponse)(V,Y,new Response(r.value.body,{headers:i,status:r.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:L,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:k})},!1,T),D)throw t;await (0,p.sendResponse)(V,Y,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 n=j.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=n.get("next.route")||L,o=`${K} ${a}`;r.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),r.updateName(o),s&&s!==r&&(s.setAttribute("http.route",a),s.updateName(o))})()}};if(J&&W)await Q(W,void 0);else{let t=j.getActiveScopeSpan();await j.withPropagatedContext(e.headers,()=>j.trace(u.BaseServerSpan.handleRequest,{spanName:`${K} ${A}`,kind:i.SpanKind.SERVER,attributes:{"http.method":K,"http.target":e.url}},e=>Q(e,t)),void 0,!J)}}e.s(["handler",0,y,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:b})},"routeModule",0,E,"serverHooks",0,R,"workAsyncStorage",0,A,"workUnitAsyncStorage",0,b])},43345,e=>{"use strict";var t=e.i(62294),n=e.i(26571),a=e.i(45383);let r=["authentication_unavailable","unauthenticated","principal_mismatch","agent_not_found","conversation_not_found","request_not_found"];async function i(e,n){let i,s=null,o=!1,d=null;try{i=await e(e=>{s=e},()=>{let e=s;n&&e&&"service"===e.kind&&t.serviceAudit.append({principal:e,operation:n.operation,capability:"participant",targetKind:n.targetKind,targetRef:n.targetRef,outcome:"allowed",code:null}),o=!0})}catch(e){if(e instanceof a.AgentApiError)d=e.code,i=Response.json({error:{code:e.code,message:e.message}},{status:e.status});else console.error("Agent conversation API error:",e),d="internal_error",i=Response.json({error:{code:"internal_error",message:"The request could not be processed."}},{status:500})}let l=s;if(o&&null===d)return i;if(n&&l&&"service"===l.kind)try{t.serviceAudit.append({principal:l,operation:n.operation,capability:"participant",targetKind:n.targetKind,targetRef:n.targetRef,outcome:null===d?"allowed":"internal_error"===d?"error":r.includes(d)?"denied":"rejected",code:d})}catch(e){return console.error("Service audit append failed:",e instanceof Error?e.message:"unknown error"),Response.json({error:{code:"internal_error",message:"The request could not be processed."}},{status:500})}return i}async function s(e){let t,r=function(){try{return(0,n.serviceTokenAuthenticatorFromEnv)()}catch(e){if(e instanceof n.ServiceTokenConfigError)return console.error(`Agent API authentication disabled: ${e.message}`),null;throw e}}();if(!r)throw new a.AgentApiError("authentication_unavailable","No authenticator is configured for the agent conversation API.");try{t=await r(e)}catch{t=null}if(!t||!(0,a.isPrincipalKind)(t.kind)||"string"!=typeof t.id||!t.id.trim())throw new a.AgentApiError("unauthenticated","Authentication failed.");return{kind:t.kind,id:t.id}}async function o(e,t){return i(async(n,r)=>{var i;let o,d=await s(e);n(d);try{let t=await e.json();if(!t||"object"!=typeof t||Array.isArray(t))throw Error("not an object");o=t}catch{throw new a.AgentApiError("invalid_request","The request body must be a JSON object.")}let l=null==(i=o.principal)?null:{kind:i.kind,id:String(i.id??"")};if(l&&!(0,a.samePrincipal)(l,d))throw new a.AgentApiError("principal_mismatch","The declared principal does not match the authenticated principal.");let u=e.headers.get("idempotency-key"),c="string"==typeof o.idempotencyKey?o.idempotencyKey:null;if(u&&c&&u!==c)throw new a.AgentApiError("invalid_request","Idempotency-Key header and body idempotencyKey differ.");let p=u??c??"";if(p.toLowerCase().startsWith(a.MCP_IDEMPOTENCY_PREFIX))throw new a.AgentApiError("invalid_request",`Idempotency keys starting with "${a.MCP_IDEMPOTENCY_PREFIX}" are reserved for the MCP bridge.`);let{accepted:_,dispatched:g}=(0,a.acceptAgentMessage)(d,{agentId:t,content:"string"==typeof o.content?o.content:"",idempotencyKey:p,conversationId:"string"==typeof o.conversationId?o.conversationId:null==o.conversationId?null:""},r);return!0===o.wait?(await g,Response.json({...(0,a.getAgentRequest)(d,_.requestId),replayed:_.replayed})):Response.json(_,{status:_.replayed?200:202})},{operation:"agents.message",targetKind:"agent",targetRef:t})}async function d(e,t){return i(async n=>{let r=await s(e);return n(r),Response.json((0,a.getConversation)(r,t))},{operation:"conversations.read",targetKind:"conversation",targetRef:t})}async function l(e,t){return i(async n=>{let r=await s(e);return n(r),Response.json((0,a.getAgentRequest)(r,t))},{operation:"requests.read",targetKind:"request",targetRef:t})}e.s(["authenticate",0,s,"handleGetAgentRequest",0,l,"handleGetConversation",0,d,"handleSendAgentMessage",0,o])},90027,e=>{"use strict";var t=e.i(62349),n=e.i(28420);let a=["active","ended","all"],r=["implementation","revision"],i=`
|
|
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
|
-
EXISTS (SELECT 1 FROM work_attempts oa WHERE oa.resumed_session_binding_id = b.id AND oa.finished_at IS NULL) AS attempt_running,
|
|
9
|
-
ps.availability AS ps_availability, ps.lifecycle AS ps_lifecycle, ps.resumable AS ps_resumable, ps.busy AS ps_busy,
|
|
10
|
-
ps.workspace AS ps_workspace, ps.last_synced_at AS ps_synced_at,
|
|
11
|
-
EXISTS (SELECT 1 FROM provider_session_turns pt WHERE pt.session_ref = ps.id AND pt.state = 'running') AS ps_running
|
|
12
|
-
FROM session_bindings b
|
|
13
|
-
JOIN bots bot ON bot.id = b.agent_id
|
|
14
|
-
LEFT JOIN provider_sessions ps ON ps.binding_id = b.id
|
|
15
|
-
LEFT JOIN work_attempts sa ON sa.id = b.source_attempt_id
|
|
16
|
-
LEFT JOIN work_requests r ON r.id = COALESCE(b.request_id, sa.request_id)
|
|
17
|
-
LEFT JOIN conversations c ON c.id = COALESCE(b.conversation_id, r.source_conversation_id)
|
|
18
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
19
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
20
|
-
`,s=`
|
|
21
|
-
SELECT ps.id, ps.agent_id, bot.name AS agent_name, ps.provider_kind, ps.title, ps.workspace,
|
|
22
|
-
ps.provider_created_at, ps.provider_updated_at, ps.availability, ps.lifecycle, ps.resumable, ps.busy,
|
|
23
|
-
ps.last_synced_at, ps.created_at, ps.updated_at,
|
|
24
|
-
(SELECT MAX(COALESCE(t.finished_at, t.created_at)) FROM provider_session_turns t WHERE t.session_ref = ps.id) AS turn_last_at,
|
|
25
|
-
EXISTS (SELECT 1 FROM provider_session_turns t WHERE t.session_ref = ps.id AND t.state = 'running') AS running
|
|
26
|
-
FROM provider_sessions ps
|
|
27
|
-
JOIN bots bot ON bot.id = ps.agent_id
|
|
28
|
-
WHERE ps.binding_id IS NULL
|
|
29
|
-
`;function o(e){return`${new Date(e).toISOString().slice(0,16).replace("T"," ")} UTC`}function d(e,t){let n=e?.[t];return"string"==typeof n&&n.trim().length>0?n:null}function l(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 u(e,a=(0,n.emptyUsage)()){let i,s=null;try{s=e.source_snapshot?JSON.parse(e.source_snapshot):null}catch{}let c=l(e),p=null===e.released_at?"active":"ended",_=((i=(e.request_intent??"").split("\n").map(e=>e.trim()).find(e=>e.length>0))?i.length>80?`${i.slice(0,79).trimEnd()}…`:i:null)??(c?.kind==="group"?c.label:null)??`${e.agent_name} \xb7 ${o(e.created_at)}`;return{ref:e.id,source:"botmancers",agent:{id:e.agent_id,name:e.agent_name,adapter:e.adapter,transport:d(s,"transport")},title:_,status:p,resumable:null===e.released_at&&null!==e.request_id&&null!==e.request_kind&&r.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,state:{availability:e.ps_availability??"available",lifecycle:e.ps_lifecycle??"open",resumable:null===e.ps_resumable||void 0===e.ps_resumable?null:1===e.ps_resumable,busy:1===e.ps_busy||!!e.attempt_running||!!e.ps_running,synced_at:e.ps_synced_at??null},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:c,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:d(s,"cwd")??e.ps_workspace??null,deck:d(s,"deck")},usage:a}}function c(e,t=(0,n.emptyUsage)()){let a=e.provider_created_at??e.created_at,r=null===e.resumable?null:1===e.resumable,i="archived"===e.lifecycle?e.provider_updated_at??e.updated_at:null;return{ref:e.id,source:"native",agent:{id:e.agent_id,name:e.agent_name,adapter:e.provider_kind,transport:null},title:e.title??`${e.agent_name} \xb7 ${o(a)}`,status:"open"===e.lifecycle?"active":"ended",resumable:!1,state:{availability:e.availability,lifecycle:e.lifecycle,resumable:r,busy:1===e.busy||!!e.running,synced_at:e.last_synced_at},created_at:a,ended_at:i,last_activity_at:Math.max(a,e.provider_updated_at??0,e.turn_last_at??0),origin:{conversation:null,work_request:null},context:{workspace:e.workspace,deck:null},usage:t}}function p(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 _(e,t,n){return e.prepare(`${s} AND ps.id = ? AND ps.agent_id = ?`).get(n,t)}function g(e,t,n){return e.prepare(`${i} WHERE b.id = ? AND b.agent_id = ?`).get(n,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 n=e.prepare(`
|
|
30
|
-
SELECT c.id AS origin_conversation_id, c.type AS conversation_type, c.bot_id AS conversation_bot_id,
|
|
31
|
-
tb.name AS thread_agent_name, g.name AS group_name
|
|
32
|
-
FROM conversations c
|
|
33
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
34
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
35
|
-
WHERE c.id = ?
|
|
36
|
-
`).get(t);return n?l(n):null},"getAgentSession",0,function(e,t,a){let r=g(e,t,a);if(!r){let r=_(e,t,a);if(!r)return;let{usage:i,samples:s}=(0,n.sessionUsageSamples)(e,t,a);return{...c(r,i),attempts:[],usage_samples:s}}let i=e.prepare(`
|
|
37
|
-
SELECT a.attempt_number, a.kind, a.request_id, a.outcome, a.started_at, a.finished_at,
|
|
38
|
-
CASE WHEN a.id = ? THEN 'source' ELSE 'resume' END AS role
|
|
39
|
-
FROM work_attempts a
|
|
40
|
-
WHERE a.id = ? OR a.resumed_session_binding_id = ?
|
|
41
|
-
ORDER BY a.started_at ASC, a.id ASC
|
|
42
|
-
`).all(r.source_attempt_id,r.source_attempt_id,r.id),{usage:s,samples:o}=(0,n.sessionUsageSamples)(e,t,a);return{...u(r,s),attempts:i,usage_samples:o}},"isSessionFilter",0,function(e){return"string"==typeof e&&a.includes(e)},"listAgentSessions",0,function(e,t,a="all"){let r=e.prepare(`${i} WHERE b.agent_id = ? ${"active"===a?"AND b.released_at IS NULL":"ended"===a?"AND b.released_at IS NOT NULL":""}`).all(t),o=e.prepare(`${s} AND ps.agent_id = ? ${"active"===a?"AND ps.lifecycle = 'open'":"ended"===a?"AND ps.lifecycle = 'archived'":""}`).all(t),d=(0,n.agentSessionUsage)(e,t);return[...r.map(e=>u(e,d.get(e.id))),...o.map(e=>c(e,d.get(e.id)))].sort(p)},"sessionDebugExternalId",0,function(e,t,n){let a=g(e,t,n)?.external_session_id;if(void 0!==a)return a;if(!_(e,t,n))return;let r=e.prepare("SELECT provider_session_id FROM provider_sessions WHERE id = ? AND agent_id = ?").get(n,t);return r?.provider_session_id},"sessionTitle",0,function(e,t,n){let a=g(e,t,n);if(a)return u(a).title;let r=_(e,t,n);return r?c(r).title:null}])}];
|
|
43
|
-
|
|
44
|
-
//# sourceMappingURL=_05ro-21._.js.map
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
module.exports=[67794,e=>{"use strict";var t=e.i(69936);async function n(e,{params:a}){let{agentId:r,ref:i}=await a;return(0,t.handleGetSession)(e,r,i)}e.s(["GET",0,n])},25932,e=>{"use strict";var t=e.i(47909),n=e.i(74017),a=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),p=e.i(66012),_=e.i(70101),g=e.i(26937),h=e.i(10372),v=e.i(93695),f=e.i(9580);e.i(52474);var m=e.i(220);let E=new t.AppRouteRouteModule({definition:{kind:n.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:A,workUnitAsyncStorage:b,serverHooks:y}=E;async function R(e,t,a){a.requestMeta&&(0,r.setRequestMeta)(e,a.requestMeta),E.isDev&&(0,r.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let A="/api/v0/agents/[agentId]/sessions/[ref]/route";A=A.replace(/\/index$/,"")||"/";let b=await E.prepare(e,t,{srcPage:A,multiZoneDraftMode:!1});if(!b)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:y,deploymentId:R,params:S,nextConfig:w,parsedUrl:C,isDraftMode:N,prerenderManifest:O,routerServerContext:T,isOnDemandRevalidate:k,revalidateOnlyGenerated:q,resolvedPathname:I,clientReferenceManifest:x,serverActionsManifest:L}=b,P=(0,o.normalizeAppPath)(A),M=!!O.routes[I]&&(E.isDev||(0,f.isRouteCacheOwner)(I,E.cacheOwner,O.routes[I])),H=!!(O.dynamicRoutes[P]||M),D=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,C,!1):t.end("This page could not be found"),null);if(H&&!N){let e=O.dynamicRoutes[P];if(e&&!1===e.fallback&&!M){if(w.adapterPath)return await D();throw new v.NoFallbackError}}let F=null;!H||E.isDev||N||(F="/index"===(F=I)?"/":F);let U=!0===E.isDev||!H,$=H&&!U;L&&x&&(0,s.setManifestsSingleton)({page:A,clientReferenceManifest:x,serverActionsManifest:L});let K=e.method||"GET",j=(0,i.getTracer)(),W=j.getActiveScopeSpan(),J=!!(null==T?void 0:T.isWrappedByNextServer),G=!!(0,r.getRequestMeta)(e,"minimalMode"),X=(0,r.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,w,O,G);null==X||X.resetRequestCache(),globalThis.__incrementalCache=X;let B={params:S,previewProps:O.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts,useCacheTimeout:w.experimental.useCacheTimeout},cacheComponents:!!w.cacheComponents,validationLevel:w.experimental.instantInsights.validationLevel,isDraftMode:N,supportsDynamicResponse:U,incrementalCache:X,hmrRefreshHash:(0,r.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:w.cacheLife,staticPageGenerationTimeout:w.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,a,r)=>E.onRequestError(e,t,a,r,T)},sharedContext:{buildId:y,deploymentId:R}},V=new d.NodeNextRequest(e),Y=new d.NodeNextResponse(t),z=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:n})=>{try{if(!G&&k&&q&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let r=await E.handle(z,B);e.fetchMetrics=B.renderOpts.fetchMetrics;let i=B.renderOpts.pendingWaitUntil;i&&a.waitUntil&&(a.waitUntil(i),i=void 0);let s=B.renderOpts.collectedTags;if(!H)return await (0,p.sendResponse)(V,Y,r,i),null;{let e=await r.blob(),t=(0,_.toNodeOutgoingHttpHeaders)(r.headers);s&&(t[h.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,a=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=h.INFINITE_CACHE?!1!==n&&n>0?w.expireTime:void 0:B.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:r.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:a}}}}catch(t){throw(null==n?void 0:n.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:A,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:k})},!1,T),t}},Q=async(r,s)=>{try{var o,d;let r=await E.handleResponse({req:e,nextConfig:w,cacheKey:F,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:O,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:q,responseGenerator:Z,waitUntil:a.waitUntil,isMinimalMode:G});if(!H)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});G||t.setHeader("x-nextjs-cache",k?"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,_.fromNodeOutgoingHttpHeaders)(r.value.headers);G&&H||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,p.sendResponse)(V,Y,new Response(r.value.body,{headers:i,status:r.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:k})},!1,T),H)throw t;await (0,p.sendResponse)(V,Y,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 n=j.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=n.get("next.route")||P,o=`${K} ${a}`;r.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),r.updateName(o),s&&s!==r&&(s.setAttribute("http.route",a),s.updateName(o))})()}};if(J&&W)await Q(W,void 0);else{let t=j.getActiveScopeSpan();await j.withPropagatedContext(e.headers,()=>j.trace(u.BaseServerSpan.handleRequest,{spanName:`${K} ${A}`,kind:i.SpanKind.SERVER,attributes:{"http.method":K,"http.target":e.url}},e=>Q(e,t)),void 0,!J)}}e.s(["handler",0,R,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:b})},"routeModule",0,E,"serverHooks",0,y,"workAsyncStorage",0,A,"workUnitAsyncStorage",0,b])},43345,e=>{"use strict";var t=e.i(62294),n=e.i(26571),a=e.i(45383);let r=["authentication_unavailable","unauthenticated","principal_mismatch","agent_not_found","conversation_not_found","request_not_found"];async function i(e,n){let i,s=null,o=!1,d=null;try{i=await e(e=>{s=e},()=>{let e=s;n&&e&&"service"===e.kind&&t.serviceAudit.append({principal:e,operation:n.operation,capability:"participant",targetKind:n.targetKind,targetRef:n.targetRef,outcome:"allowed",code:null}),o=!0})}catch(e){if(e instanceof a.AgentApiError)d=e.code,i=Response.json({error:{code:e.code,message:e.message}},{status:e.status});else console.error("Agent conversation API error:",e),d="internal_error",i=Response.json({error:{code:"internal_error",message:"The request could not be processed."}},{status:500})}let l=s;if(o&&null===d)return i;if(n&&l&&"service"===l.kind)try{t.serviceAudit.append({principal:l,operation:n.operation,capability:"participant",targetKind:n.targetKind,targetRef:n.targetRef,outcome:null===d?"allowed":"internal_error"===d?"error":r.includes(d)?"denied":"rejected",code:d})}catch(e){return console.error("Service audit append failed:",e instanceof Error?e.message:"unknown error"),Response.json({error:{code:"internal_error",message:"The request could not be processed."}},{status:500})}return i}async function s(e){let t,r=function(){try{return(0,n.serviceTokenAuthenticatorFromEnv)()}catch(e){if(e instanceof n.ServiceTokenConfigError)return console.error(`Agent API authentication disabled: ${e.message}`),null;throw e}}();if(!r)throw new a.AgentApiError("authentication_unavailable","No authenticator is configured for the agent conversation API.");try{t=await r(e)}catch{t=null}if(!t||!(0,a.isPrincipalKind)(t.kind)||"string"!=typeof t.id||!t.id.trim())throw new a.AgentApiError("unauthenticated","Authentication failed.");return{kind:t.kind,id:t.id}}async function o(e,t){return i(async(n,r)=>{var i;let o,d=await s(e);n(d);try{let t=await e.json();if(!t||"object"!=typeof t||Array.isArray(t))throw Error("not an object");o=t}catch{throw new a.AgentApiError("invalid_request","The request body must be a JSON object.")}let l=null==(i=o.principal)?null:{kind:i.kind,id:String(i.id??"")};if(l&&!(0,a.samePrincipal)(l,d))throw new a.AgentApiError("principal_mismatch","The declared principal does not match the authenticated principal.");let u=e.headers.get("idempotency-key"),c="string"==typeof o.idempotencyKey?o.idempotencyKey:null;if(u&&c&&u!==c)throw new a.AgentApiError("invalid_request","Idempotency-Key header and body idempotencyKey differ.");let p=u??c??"";if(p.toLowerCase().startsWith(a.MCP_IDEMPOTENCY_PREFIX))throw new a.AgentApiError("invalid_request",`Idempotency keys starting with "${a.MCP_IDEMPOTENCY_PREFIX}" are reserved for the MCP bridge.`);let{accepted:_,dispatched:g}=(0,a.acceptAgentMessage)(d,{agentId:t,content:"string"==typeof o.content?o.content:"",idempotencyKey:p,conversationId:"string"==typeof o.conversationId?o.conversationId:null==o.conversationId?null:""},r);return!0===o.wait?(await g,Response.json({...(0,a.getAgentRequest)(d,_.requestId),replayed:_.replayed})):Response.json(_,{status:_.replayed?200:202})},{operation:"agents.message",targetKind:"agent",targetRef:t})}async function d(e,t){return i(async n=>{let r=await s(e);return n(r),Response.json((0,a.getConversation)(r,t))},{operation:"conversations.read",targetKind:"conversation",targetRef:t})}async function l(e,t){return i(async n=>{let r=await s(e);return n(r),Response.json((0,a.getAgentRequest)(r,t))},{operation:"requests.read",targetKind:"request",targetRef:t})}e.s(["authenticate",0,s,"handleGetAgentRequest",0,l,"handleGetConversation",0,d,"handleSendAgentMessage",0,o])},90027,e=>{"use strict";var t=e.i(62349),n=e.i(28420);let a=["active","ended","all"],r=["implementation","revision"],i=`
|
|
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
|
-
EXISTS (SELECT 1 FROM work_attempts oa WHERE oa.resumed_session_binding_id = b.id AND oa.finished_at IS NULL) AS attempt_running,
|
|
9
|
-
ps.availability AS ps_availability, ps.lifecycle AS ps_lifecycle, ps.resumable AS ps_resumable, ps.busy AS ps_busy,
|
|
10
|
-
ps.workspace AS ps_workspace, ps.last_synced_at AS ps_synced_at,
|
|
11
|
-
EXISTS (SELECT 1 FROM provider_session_turns pt WHERE pt.session_ref = ps.id AND pt.state = 'running') AS ps_running
|
|
12
|
-
FROM session_bindings b
|
|
13
|
-
JOIN bots bot ON bot.id = b.agent_id
|
|
14
|
-
LEFT JOIN provider_sessions ps ON ps.binding_id = b.id
|
|
15
|
-
LEFT JOIN work_attempts sa ON sa.id = b.source_attempt_id
|
|
16
|
-
LEFT JOIN work_requests r ON r.id = COALESCE(b.request_id, sa.request_id)
|
|
17
|
-
LEFT JOIN conversations c ON c.id = COALESCE(b.conversation_id, r.source_conversation_id)
|
|
18
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
19
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
20
|
-
`,s=`
|
|
21
|
-
SELECT ps.id, ps.agent_id, bot.name AS agent_name, ps.provider_kind, ps.title, ps.workspace,
|
|
22
|
-
ps.provider_created_at, ps.provider_updated_at, ps.availability, ps.lifecycle, ps.resumable, ps.busy,
|
|
23
|
-
ps.last_synced_at, ps.created_at, ps.updated_at,
|
|
24
|
-
(SELECT MAX(COALESCE(t.finished_at, t.created_at)) FROM provider_session_turns t WHERE t.session_ref = ps.id) AS turn_last_at,
|
|
25
|
-
EXISTS (SELECT 1 FROM provider_session_turns t WHERE t.session_ref = ps.id AND t.state = 'running') AS running
|
|
26
|
-
FROM provider_sessions ps
|
|
27
|
-
JOIN bots bot ON bot.id = ps.agent_id
|
|
28
|
-
WHERE ps.binding_id IS NULL
|
|
29
|
-
`;function o(e){return`${new Date(e).toISOString().slice(0,16).replace("T"," ")} UTC`}function d(e,t){let n=e?.[t];return"string"==typeof n&&n.trim().length>0?n:null}function l(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 u(e,a=(0,n.emptyUsage)()){let i,s=null;try{s=e.source_snapshot?JSON.parse(e.source_snapshot):null}catch{}let c=l(e),p=null===e.released_at?"active":"ended",_=((i=(e.request_intent??"").split("\n").map(e=>e.trim()).find(e=>e.length>0))?i.length>80?`${i.slice(0,79).trimEnd()}…`:i:null)??(c?.kind==="group"?c.label:null)??`${e.agent_name} \xb7 ${o(e.created_at)}`;return{ref:e.id,source:"botmancers",agent:{id:e.agent_id,name:e.agent_name,adapter:e.adapter,transport:d(s,"transport")},title:_,status:p,resumable:null===e.released_at&&null!==e.request_id&&null!==e.request_kind&&r.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,state:{availability:e.ps_availability??"available",lifecycle:e.ps_lifecycle??"open",resumable:null===e.ps_resumable||void 0===e.ps_resumable?null:1===e.ps_resumable,busy:1===e.ps_busy||!!e.attempt_running||!!e.ps_running,synced_at:e.ps_synced_at??null},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:c,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:d(s,"cwd")??e.ps_workspace??null,deck:d(s,"deck")},usage:a}}function c(e,t=(0,n.emptyUsage)()){let a=e.provider_created_at??e.created_at,r=null===e.resumable?null:1===e.resumable,i="archived"===e.lifecycle?e.provider_updated_at??e.updated_at:null;return{ref:e.id,source:"native",agent:{id:e.agent_id,name:e.agent_name,adapter:e.provider_kind,transport:null},title:e.title??`${e.agent_name} \xb7 ${o(a)}`,status:"open"===e.lifecycle?"active":"ended",resumable:!1,state:{availability:e.availability,lifecycle:e.lifecycle,resumable:r,busy:1===e.busy||!!e.running,synced_at:e.last_synced_at},created_at:a,ended_at:i,last_activity_at:Math.max(a,e.provider_updated_at??0,e.turn_last_at??0),origin:{conversation:null,work_request:null},context:{workspace:e.workspace,deck:null},usage:t}}function p(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 _(e,t,n){return e.prepare(`${s} AND ps.id = ? AND ps.agent_id = ?`).get(n,t)}function g(e,t,n){return e.prepare(`${i} WHERE b.id = ? AND b.agent_id = ?`).get(n,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 n=e.prepare(`
|
|
30
|
-
SELECT c.id AS origin_conversation_id, c.type AS conversation_type, c.bot_id AS conversation_bot_id,
|
|
31
|
-
tb.name AS thread_agent_name, g.name AS group_name
|
|
32
|
-
FROM conversations c
|
|
33
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
34
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
35
|
-
WHERE c.id = ?
|
|
36
|
-
`).get(t);return n?l(n):null},"getAgentSession",0,function(e,t,a){let r=g(e,t,a);if(!r){let r=_(e,t,a);if(!r)return;let{usage:i,samples:s}=(0,n.sessionUsageSamples)(e,t,a);return{...c(r,i),attempts:[],usage_samples:s}}let i=e.prepare(`
|
|
37
|
-
SELECT a.attempt_number, a.kind, a.request_id, a.outcome, a.started_at, a.finished_at,
|
|
38
|
-
CASE WHEN a.id = ? THEN 'source' ELSE 'resume' END AS role
|
|
39
|
-
FROM work_attempts a
|
|
40
|
-
WHERE a.id = ? OR a.resumed_session_binding_id = ?
|
|
41
|
-
ORDER BY a.started_at ASC, a.id ASC
|
|
42
|
-
`).all(r.source_attempt_id,r.source_attempt_id,r.id),{usage:s,samples:o}=(0,n.sessionUsageSamples)(e,t,a);return{...u(r,s),attempts:i,usage_samples:o}},"isSessionFilter",0,function(e){return"string"==typeof e&&a.includes(e)},"listAgentSessions",0,function(e,t,a="all"){let r=e.prepare(`${i} WHERE b.agent_id = ? ${"active"===a?"AND b.released_at IS NULL":"ended"===a?"AND b.released_at IS NOT NULL":""}`).all(t),o=e.prepare(`${s} AND ps.agent_id = ? ${"active"===a?"AND ps.lifecycle = 'open'":"ended"===a?"AND ps.lifecycle = 'archived'":""}`).all(t),d=(0,n.agentSessionUsage)(e,t);return[...r.map(e=>u(e,d.get(e.id))),...o.map(e=>c(e,d.get(e.id)))].sort(p)},"sessionDebugExternalId",0,function(e,t,n){let a=g(e,t,n)?.external_session_id;if(void 0!==a)return a;if(!_(e,t,n))return;let r=e.prepare("SELECT provider_session_id FROM provider_sessions WHERE id = ? AND agent_id = ?").get(n,t);return r?.provider_session_id},"sessionTitle",0,function(e,t,n){let a=g(e,t,n);if(a)return u(a).title;let r=_(e,t,n);return r?c(r).title:null}])}];
|
|
43
|
-
|
|
44
|
-
//# sourceMappingURL=_07on0dc._.js.map
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
module.exports=[61276,e=>{"use strict";var t=e.i(69936);async function n(e,{params:a}){let{pinRef:r}=await a;return(0,t.handleSendToPin)(e,r)}e.s(["POST",0,n])},13874,e=>{"use strict";var t=e.i(47909),n=e.i(74017),a=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),p=e.i(66012),_=e.i(70101),g=e.i(26937),h=e.i(10372),v=e.i(93695),m=e.i(9580);e.i(52474);var f=e.i(220);let E=new t.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/v0/pins/[pinRef]/messages/route",pathname:"/api/v0/pins/[pinRef]/messages",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/v0/pins/[pinRef]/messages/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(61276),...{}}),{workAsyncStorage:A,workUnitAsyncStorage:b,serverHooks:R}=E;async function y(e,t,a){a.requestMeta&&(0,r.setRequestMeta)(e,a.requestMeta),E.isDev&&(0,r.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let A="/api/v0/pins/[pinRef]/messages/route";A=A.replace(/\/index$/,"")||"/";let b=await E.prepare(e,t,{srcPage:A,multiZoneDraftMode:!1});if(!b)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:R,deploymentId:y,params:S,nextConfig:w,parsedUrl:C,isDraftMode:N,prerenderManifest:O,routerServerContext:T,isOnDemandRevalidate:k,revalidateOnlyGenerated:q,resolvedPathname:I,clientReferenceManifest:x,serverActionsManifest:P}=b,L=(0,o.normalizeAppPath)(A),M=!!O.routes[I]&&(E.isDev||(0,m.isRouteCacheOwner)(I,E.cacheOwner,O.routes[I])),H=!!(O.dynamicRoutes[L]||M),D=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,C,!1):t.end("This page could not be found"),null);if(H&&!N){let e=O.dynamicRoutes[L];if(e&&!1===e.fallback&&!M){if(w.adapterPath)return await D();throw new v.NoFallbackError}}let F=null;!H||E.isDev||N||(F="/index"===(F=I)?"/":F);let U=!0===E.isDev||!H,$=H&&!U;P&&x&&(0,s.setManifestsSingleton)({page:A,clientReferenceManifest:x,serverActionsManifest:P});let K=e.method||"GET",j=(0,i.getTracer)(),W=j.getActiveScopeSpan(),J=!!(null==T?void 0:T.isWrappedByNextServer),X=!!(0,r.getRequestMeta)(e,"minimalMode"),G=(0,r.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,w,O,X);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let B={params:S,previewProps:O.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts,useCacheTimeout:w.experimental.useCacheTimeout},cacheComponents:!!w.cacheComponents,validationLevel:w.experimental.instantInsights.validationLevel,isDraftMode:N,supportsDynamicResponse:U,incrementalCache:G,hmrRefreshHash:(0,r.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:w.cacheLife,staticPageGenerationTimeout:w.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,a,r)=>E.onRequestError(e,t,a,r,T)},sharedContext:{buildId:R,deploymentId:y}},V=new d.NodeNextRequest(e),Y=new d.NodeNextResponse(t),z=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:n})=>{try{if(!X&&k&&q&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let r=await E.handle(z,B);e.fetchMetrics=B.renderOpts.fetchMetrics;let i=B.renderOpts.pendingWaitUntil;i&&a.waitUntil&&(a.waitUntil(i),i=void 0);let s=B.renderOpts.collectedTags;if(!H)return await (0,p.sendResponse)(V,Y,r,i),null;{let e=await r.blob(),t=(0,_.toNodeOutgoingHttpHeaders)(r.headers);s&&(t[h.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,a=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=h.INFINITE_CACHE?!1!==n&&n>0?w.expireTime:void 0:B.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:r.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:a}}}}catch(t){throw(null==n?void 0:n.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:A,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:k})},!1,T),t}},Q=async(r,s)=>{try{var o,d;let r=await E.handleResponse({req:e,nextConfig:w,cacheKey:F,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:O,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:q,responseGenerator:Z,waitUntil:a.waitUntil,isMinimalMode:X});if(!H)return;if((null==r||null==(o=r.value)?void 0:o.kind)!==f.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});X||t.setHeader("x-nextjs-cache",k?"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,_.fromNodeOutgoingHttpHeaders)(r.value.headers);X&&H||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,p.sendResponse)(V,Y,new Response(r.value.body,{headers:i,status:r.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:L,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:k})},!1,T),H)throw t;await (0,p.sendResponse)(V,Y,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 n=j.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=n.get("next.route")||L,o=`${K} ${a}`;r.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),r.updateName(o),s&&s!==r&&(s.setAttribute("http.route",a),s.updateName(o))})()}};if(J&&W)await Q(W,void 0);else{let t=j.getActiveScopeSpan();await j.withPropagatedContext(e.headers,()=>j.trace(u.BaseServerSpan.handleRequest,{spanName:`${K} ${A}`,kind:i.SpanKind.SERVER,attributes:{"http.method":K,"http.target":e.url}},e=>Q(e,t)),void 0,!J)}}e.s(["handler",0,y,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:b})},"routeModule",0,E,"serverHooks",0,R,"workAsyncStorage",0,A,"workUnitAsyncStorage",0,b])},43345,e=>{"use strict";var t=e.i(62294),n=e.i(26571),a=e.i(45383);let r=["authentication_unavailable","unauthenticated","principal_mismatch","agent_not_found","conversation_not_found","request_not_found"];async function i(e,n){let i,s=null,o=!1,d=null;try{i=await e(e=>{s=e},()=>{let e=s;n&&e&&"service"===e.kind&&t.serviceAudit.append({principal:e,operation:n.operation,capability:"participant",targetKind:n.targetKind,targetRef:n.targetRef,outcome:"allowed",code:null}),o=!0})}catch(e){if(e instanceof a.AgentApiError)d=e.code,i=Response.json({error:{code:e.code,message:e.message}},{status:e.status});else console.error("Agent conversation API error:",e),d="internal_error",i=Response.json({error:{code:"internal_error",message:"The request could not be processed."}},{status:500})}let l=s;if(o&&null===d)return i;if(n&&l&&"service"===l.kind)try{t.serviceAudit.append({principal:l,operation:n.operation,capability:"participant",targetKind:n.targetKind,targetRef:n.targetRef,outcome:null===d?"allowed":"internal_error"===d?"error":r.includes(d)?"denied":"rejected",code:d})}catch(e){return console.error("Service audit append failed:",e instanceof Error?e.message:"unknown error"),Response.json({error:{code:"internal_error",message:"The request could not be processed."}},{status:500})}return i}async function s(e){let t,r=function(){try{return(0,n.serviceTokenAuthenticatorFromEnv)()}catch(e){if(e instanceof n.ServiceTokenConfigError)return console.error(`Agent API authentication disabled: ${e.message}`),null;throw e}}();if(!r)throw new a.AgentApiError("authentication_unavailable","No authenticator is configured for the agent conversation API.");try{t=await r(e)}catch{t=null}if(!t||!(0,a.isPrincipalKind)(t.kind)||"string"!=typeof t.id||!t.id.trim())throw new a.AgentApiError("unauthenticated","Authentication failed.");return{kind:t.kind,id:t.id}}async function o(e,t){return i(async(n,r)=>{var i;let o,d=await s(e);n(d);try{let t=await e.json();if(!t||"object"!=typeof t||Array.isArray(t))throw Error("not an object");o=t}catch{throw new a.AgentApiError("invalid_request","The request body must be a JSON object.")}let l=null==(i=o.principal)?null:{kind:i.kind,id:String(i.id??"")};if(l&&!(0,a.samePrincipal)(l,d))throw new a.AgentApiError("principal_mismatch","The declared principal does not match the authenticated principal.");let u=e.headers.get("idempotency-key"),c="string"==typeof o.idempotencyKey?o.idempotencyKey:null;if(u&&c&&u!==c)throw new a.AgentApiError("invalid_request","Idempotency-Key header and body idempotencyKey differ.");let p=u??c??"";if(p.toLowerCase().startsWith(a.MCP_IDEMPOTENCY_PREFIX))throw new a.AgentApiError("invalid_request",`Idempotency keys starting with "${a.MCP_IDEMPOTENCY_PREFIX}" are reserved for the MCP bridge.`);let{accepted:_,dispatched:g}=(0,a.acceptAgentMessage)(d,{agentId:t,content:"string"==typeof o.content?o.content:"",idempotencyKey:p,conversationId:"string"==typeof o.conversationId?o.conversationId:null==o.conversationId?null:""},r);return!0===o.wait?(await g,Response.json({...(0,a.getAgentRequest)(d,_.requestId),replayed:_.replayed})):Response.json(_,{status:_.replayed?200:202})},{operation:"agents.message",targetKind:"agent",targetRef:t})}async function d(e,t){return i(async n=>{let r=await s(e);return n(r),Response.json((0,a.getConversation)(r,t))},{operation:"conversations.read",targetKind:"conversation",targetRef:t})}async function l(e,t){return i(async n=>{let r=await s(e);return n(r),Response.json((0,a.getAgentRequest)(r,t))},{operation:"requests.read",targetKind:"request",targetRef:t})}e.s(["authenticate",0,s,"handleGetAgentRequest",0,l,"handleGetConversation",0,d,"handleSendAgentMessage",0,o])},90027,e=>{"use strict";var t=e.i(62349),n=e.i(28420);let a=["active","ended","all"],r=["implementation","revision"],i=`
|
|
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
|
-
EXISTS (SELECT 1 FROM work_attempts oa WHERE oa.resumed_session_binding_id = b.id AND oa.finished_at IS NULL) AS attempt_running,
|
|
9
|
-
ps.availability AS ps_availability, ps.lifecycle AS ps_lifecycle, ps.resumable AS ps_resumable, ps.busy AS ps_busy,
|
|
10
|
-
ps.workspace AS ps_workspace, ps.last_synced_at AS ps_synced_at,
|
|
11
|
-
EXISTS (SELECT 1 FROM provider_session_turns pt WHERE pt.session_ref = ps.id AND pt.state = 'running') AS ps_running
|
|
12
|
-
FROM session_bindings b
|
|
13
|
-
JOIN bots bot ON bot.id = b.agent_id
|
|
14
|
-
LEFT JOIN provider_sessions ps ON ps.binding_id = b.id
|
|
15
|
-
LEFT JOIN work_attempts sa ON sa.id = b.source_attempt_id
|
|
16
|
-
LEFT JOIN work_requests r ON r.id = COALESCE(b.request_id, sa.request_id)
|
|
17
|
-
LEFT JOIN conversations c ON c.id = COALESCE(b.conversation_id, r.source_conversation_id)
|
|
18
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
19
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
20
|
-
`,s=`
|
|
21
|
-
SELECT ps.id, ps.agent_id, bot.name AS agent_name, ps.provider_kind, ps.title, ps.workspace,
|
|
22
|
-
ps.provider_created_at, ps.provider_updated_at, ps.availability, ps.lifecycle, ps.resumable, ps.busy,
|
|
23
|
-
ps.last_synced_at, ps.created_at, ps.updated_at,
|
|
24
|
-
(SELECT MAX(COALESCE(t.finished_at, t.created_at)) FROM provider_session_turns t WHERE t.session_ref = ps.id) AS turn_last_at,
|
|
25
|
-
EXISTS (SELECT 1 FROM provider_session_turns t WHERE t.session_ref = ps.id AND t.state = 'running') AS running
|
|
26
|
-
FROM provider_sessions ps
|
|
27
|
-
JOIN bots bot ON bot.id = ps.agent_id
|
|
28
|
-
WHERE ps.binding_id IS NULL
|
|
29
|
-
`;function o(e){return`${new Date(e).toISOString().slice(0,16).replace("T"," ")} UTC`}function d(e,t){let n=e?.[t];return"string"==typeof n&&n.trim().length>0?n:null}function l(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 u(e,a=(0,n.emptyUsage)()){let i,s=null;try{s=e.source_snapshot?JSON.parse(e.source_snapshot):null}catch{}let c=l(e),p=null===e.released_at?"active":"ended",_=((i=(e.request_intent??"").split("\n").map(e=>e.trim()).find(e=>e.length>0))?i.length>80?`${i.slice(0,79).trimEnd()}…`:i:null)??(c?.kind==="group"?c.label:null)??`${e.agent_name} \xb7 ${o(e.created_at)}`;return{ref:e.id,source:"botmancers",agent:{id:e.agent_id,name:e.agent_name,adapter:e.adapter,transport:d(s,"transport")},title:_,status:p,resumable:null===e.released_at&&null!==e.request_id&&null!==e.request_kind&&r.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,state:{availability:e.ps_availability??"available",lifecycle:e.ps_lifecycle??"open",resumable:null===e.ps_resumable||void 0===e.ps_resumable?null:1===e.ps_resumable,busy:1===e.ps_busy||!!e.attempt_running||!!e.ps_running,synced_at:e.ps_synced_at??null},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:c,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:d(s,"cwd")??e.ps_workspace??null,deck:d(s,"deck")},usage:a}}function c(e,t=(0,n.emptyUsage)()){let a=e.provider_created_at??e.created_at,r=null===e.resumable?null:1===e.resumable,i="archived"===e.lifecycle?e.provider_updated_at??e.updated_at:null;return{ref:e.id,source:"native",agent:{id:e.agent_id,name:e.agent_name,adapter:e.provider_kind,transport:null},title:e.title??`${e.agent_name} \xb7 ${o(a)}`,status:"open"===e.lifecycle?"active":"ended",resumable:!1,state:{availability:e.availability,lifecycle:e.lifecycle,resumable:r,busy:1===e.busy||!!e.running,synced_at:e.last_synced_at},created_at:a,ended_at:i,last_activity_at:Math.max(a,e.provider_updated_at??0,e.turn_last_at??0),origin:{conversation:null,work_request:null},context:{workspace:e.workspace,deck:null},usage:t}}function p(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 _(e,t,n){return e.prepare(`${s} AND ps.id = ? AND ps.agent_id = ?`).get(n,t)}function g(e,t,n){return e.prepare(`${i} WHERE b.id = ? AND b.agent_id = ?`).get(n,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 n=e.prepare(`
|
|
30
|
-
SELECT c.id AS origin_conversation_id, c.type AS conversation_type, c.bot_id AS conversation_bot_id,
|
|
31
|
-
tb.name AS thread_agent_name, g.name AS group_name
|
|
32
|
-
FROM conversations c
|
|
33
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
34
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
35
|
-
WHERE c.id = ?
|
|
36
|
-
`).get(t);return n?l(n):null},"getAgentSession",0,function(e,t,a){let r=g(e,t,a);if(!r){let r=_(e,t,a);if(!r)return;let{usage:i,samples:s}=(0,n.sessionUsageSamples)(e,t,a);return{...c(r,i),attempts:[],usage_samples:s}}let i=e.prepare(`
|
|
37
|
-
SELECT a.attempt_number, a.kind, a.request_id, a.outcome, a.started_at, a.finished_at,
|
|
38
|
-
CASE WHEN a.id = ? THEN 'source' ELSE 'resume' END AS role
|
|
39
|
-
FROM work_attempts a
|
|
40
|
-
WHERE a.id = ? OR a.resumed_session_binding_id = ?
|
|
41
|
-
ORDER BY a.started_at ASC, a.id ASC
|
|
42
|
-
`).all(r.source_attempt_id,r.source_attempt_id,r.id),{usage:s,samples:o}=(0,n.sessionUsageSamples)(e,t,a);return{...u(r,s),attempts:i,usage_samples:o}},"isSessionFilter",0,function(e){return"string"==typeof e&&a.includes(e)},"listAgentSessions",0,function(e,t,a="all"){let r=e.prepare(`${i} WHERE b.agent_id = ? ${"active"===a?"AND b.released_at IS NULL":"ended"===a?"AND b.released_at IS NOT NULL":""}`).all(t),o=e.prepare(`${s} AND ps.agent_id = ? ${"active"===a?"AND ps.lifecycle = 'open'":"ended"===a?"AND ps.lifecycle = 'archived'":""}`).all(t),d=(0,n.agentSessionUsage)(e,t);return[...r.map(e=>u(e,d.get(e.id))),...o.map(e=>c(e,d.get(e.id)))].sort(p)},"sessionDebugExternalId",0,function(e,t,n){let a=g(e,t,n)?.external_session_id;if(void 0!==a)return a;if(!_(e,t,n))return;let r=e.prepare("SELECT provider_session_id FROM provider_sessions WHERE id = ? AND agent_id = ?").get(n,t);return r?.provider_session_id},"sessionTitle",0,function(e,t,n){let a=g(e,t,n);if(a)return u(a).title;let r=_(e,t,n);return r?c(r).title:null}])}];
|
|
43
|
-
|
|
44
|
-
//# sourceMappingURL=_08208nz._.js.map
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
module.exports=[68845,e=>{"use strict";var t=e.i(69936);async function n(e,{params:a}){let{ref:r}=await a;return(0,t.handlePinSession)(e,r)}e.s(["POST",0,n])},49741,e=>{"use strict";var t=e.i(47909),n=e.i(74017),a=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),p=e.i(66012),_=e.i(70101),g=e.i(26937),h=e.i(10372),v=e.i(93695),f=e.i(9580);e.i(52474);var m=e.i(220);let E=new t.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/v0/sessions/[ref]/pins/route",pathname:"/api/v0/sessions/[ref]/pins",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/v0/sessions/[ref]/pins/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(68845),...{}}),{workAsyncStorage:A,workUnitAsyncStorage:b,serverHooks:y}=E;async function R(e,t,a){a.requestMeta&&(0,r.setRequestMeta)(e,a.requestMeta),E.isDev&&(0,r.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let A="/api/v0/sessions/[ref]/pins/route";A=A.replace(/\/index$/,"")||"/";let b=await E.prepare(e,t,{srcPage:A,multiZoneDraftMode:!1});if(!b)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:y,deploymentId:R,params:S,nextConfig:w,parsedUrl:C,isDraftMode:N,prerenderManifest:O,routerServerContext:T,isOnDemandRevalidate:k,revalidateOnlyGenerated:q,resolvedPathname:I,clientReferenceManifest:x,serverActionsManifest:P}=b,L=(0,o.normalizeAppPath)(A),M=!!O.routes[I]&&(E.isDev||(0,f.isRouteCacheOwner)(I,E.cacheOwner,O.routes[I])),H=!!(O.dynamicRoutes[L]||M),D=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,C,!1):t.end("This page could not be found"),null);if(H&&!N){let e=O.dynamicRoutes[L];if(e&&!1===e.fallback&&!M){if(w.adapterPath)return await D();throw new v.NoFallbackError}}let F=null;!H||E.isDev||N||(F="/index"===(F=I)?"/":F);let U=!0===E.isDev||!H,$=H&&!U;P&&x&&(0,s.setManifestsSingleton)({page:A,clientReferenceManifest:x,serverActionsManifest:P});let K=e.method||"GET",j=(0,i.getTracer)(),W=j.getActiveScopeSpan(),J=!!(null==T?void 0:T.isWrappedByNextServer),X=!!(0,r.getRequestMeta)(e,"minimalMode"),G=(0,r.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,w,O,X);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let B={params:S,previewProps:O.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts,useCacheTimeout:w.experimental.useCacheTimeout},cacheComponents:!!w.cacheComponents,validationLevel:w.experimental.instantInsights.validationLevel,isDraftMode:N,supportsDynamicResponse:U,incrementalCache:G,hmrRefreshHash:(0,r.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:w.cacheLife,staticPageGenerationTimeout:w.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,a,r)=>E.onRequestError(e,t,a,r,T)},sharedContext:{buildId:y,deploymentId:R}},V=new d.NodeNextRequest(e),Y=new d.NodeNextResponse(t),z=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:n})=>{try{if(!X&&k&&q&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let r=await E.handle(z,B);e.fetchMetrics=B.renderOpts.fetchMetrics;let i=B.renderOpts.pendingWaitUntil;i&&a.waitUntil&&(a.waitUntil(i),i=void 0);let s=B.renderOpts.collectedTags;if(!H)return await (0,p.sendResponse)(V,Y,r,i),null;{let e=await r.blob(),t=(0,_.toNodeOutgoingHttpHeaders)(r.headers);s&&(t[h.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,a=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=h.INFINITE_CACHE?!1!==n&&n>0?w.expireTime:void 0:B.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:r.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:a}}}}catch(t){throw(null==n?void 0:n.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:A,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:k})},!1,T),t}},Q=async(r,s)=>{try{var o,d;let r=await E.handleResponse({req:e,nextConfig:w,cacheKey:F,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:O,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:q,responseGenerator:Z,waitUntil:a.waitUntil,isMinimalMode:X});if(!H)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});X||t.setHeader("x-nextjs-cache",k?"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,_.fromNodeOutgoingHttpHeaders)(r.value.headers);X&&H||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,p.sendResponse)(V,Y,new Response(r.value.body,{headers:i,status:r.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:L,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:k})},!1,T),H)throw t;await (0,p.sendResponse)(V,Y,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 n=j.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=n.get("next.route")||L,o=`${K} ${a}`;r.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),r.updateName(o),s&&s!==r&&(s.setAttribute("http.route",a),s.updateName(o))})()}};if(J&&W)await Q(W,void 0);else{let t=j.getActiveScopeSpan();await j.withPropagatedContext(e.headers,()=>j.trace(u.BaseServerSpan.handleRequest,{spanName:`${K} ${A}`,kind:i.SpanKind.SERVER,attributes:{"http.method":K,"http.target":e.url}},e=>Q(e,t)),void 0,!J)}}e.s(["handler",0,R,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:b})},"routeModule",0,E,"serverHooks",0,y,"workAsyncStorage",0,A,"workUnitAsyncStorage",0,b])},43345,e=>{"use strict";var t=e.i(62294),n=e.i(26571),a=e.i(45383);let r=["authentication_unavailable","unauthenticated","principal_mismatch","agent_not_found","conversation_not_found","request_not_found"];async function i(e,n){let i,s=null,o=!1,d=null;try{i=await e(e=>{s=e},()=>{let e=s;n&&e&&"service"===e.kind&&t.serviceAudit.append({principal:e,operation:n.operation,capability:"participant",targetKind:n.targetKind,targetRef:n.targetRef,outcome:"allowed",code:null}),o=!0})}catch(e){if(e instanceof a.AgentApiError)d=e.code,i=Response.json({error:{code:e.code,message:e.message}},{status:e.status});else console.error("Agent conversation API error:",e),d="internal_error",i=Response.json({error:{code:"internal_error",message:"The request could not be processed."}},{status:500})}let l=s;if(o&&null===d)return i;if(n&&l&&"service"===l.kind)try{t.serviceAudit.append({principal:l,operation:n.operation,capability:"participant",targetKind:n.targetKind,targetRef:n.targetRef,outcome:null===d?"allowed":"internal_error"===d?"error":r.includes(d)?"denied":"rejected",code:d})}catch(e){return console.error("Service audit append failed:",e instanceof Error?e.message:"unknown error"),Response.json({error:{code:"internal_error",message:"The request could not be processed."}},{status:500})}return i}async function s(e){let t,r=function(){try{return(0,n.serviceTokenAuthenticatorFromEnv)()}catch(e){if(e instanceof n.ServiceTokenConfigError)return console.error(`Agent API authentication disabled: ${e.message}`),null;throw e}}();if(!r)throw new a.AgentApiError("authentication_unavailable","No authenticator is configured for the agent conversation API.");try{t=await r(e)}catch{t=null}if(!t||!(0,a.isPrincipalKind)(t.kind)||"string"!=typeof t.id||!t.id.trim())throw new a.AgentApiError("unauthenticated","Authentication failed.");return{kind:t.kind,id:t.id}}async function o(e,t){return i(async(n,r)=>{var i;let o,d=await s(e);n(d);try{let t=await e.json();if(!t||"object"!=typeof t||Array.isArray(t))throw Error("not an object");o=t}catch{throw new a.AgentApiError("invalid_request","The request body must be a JSON object.")}let l=null==(i=o.principal)?null:{kind:i.kind,id:String(i.id??"")};if(l&&!(0,a.samePrincipal)(l,d))throw new a.AgentApiError("principal_mismatch","The declared principal does not match the authenticated principal.");let u=e.headers.get("idempotency-key"),c="string"==typeof o.idempotencyKey?o.idempotencyKey:null;if(u&&c&&u!==c)throw new a.AgentApiError("invalid_request","Idempotency-Key header and body idempotencyKey differ.");let p=u??c??"";if(p.toLowerCase().startsWith(a.MCP_IDEMPOTENCY_PREFIX))throw new a.AgentApiError("invalid_request",`Idempotency keys starting with "${a.MCP_IDEMPOTENCY_PREFIX}" are reserved for the MCP bridge.`);let{accepted:_,dispatched:g}=(0,a.acceptAgentMessage)(d,{agentId:t,content:"string"==typeof o.content?o.content:"",idempotencyKey:p,conversationId:"string"==typeof o.conversationId?o.conversationId:null==o.conversationId?null:""},r);return!0===o.wait?(await g,Response.json({...(0,a.getAgentRequest)(d,_.requestId),replayed:_.replayed})):Response.json(_,{status:_.replayed?200:202})},{operation:"agents.message",targetKind:"agent",targetRef:t})}async function d(e,t){return i(async n=>{let r=await s(e);return n(r),Response.json((0,a.getConversation)(r,t))},{operation:"conversations.read",targetKind:"conversation",targetRef:t})}async function l(e,t){return i(async n=>{let r=await s(e);return n(r),Response.json((0,a.getAgentRequest)(r,t))},{operation:"requests.read",targetKind:"request",targetRef:t})}e.s(["authenticate",0,s,"handleGetAgentRequest",0,l,"handleGetConversation",0,d,"handleSendAgentMessage",0,o])},90027,e=>{"use strict";var t=e.i(62349),n=e.i(28420);let a=["active","ended","all"],r=["implementation","revision"],i=`
|
|
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
|
-
EXISTS (SELECT 1 FROM work_attempts oa WHERE oa.resumed_session_binding_id = b.id AND oa.finished_at IS NULL) AS attempt_running,
|
|
9
|
-
ps.availability AS ps_availability, ps.lifecycle AS ps_lifecycle, ps.resumable AS ps_resumable, ps.busy AS ps_busy,
|
|
10
|
-
ps.workspace AS ps_workspace, ps.last_synced_at AS ps_synced_at,
|
|
11
|
-
EXISTS (SELECT 1 FROM provider_session_turns pt WHERE pt.session_ref = ps.id AND pt.state = 'running') AS ps_running
|
|
12
|
-
FROM session_bindings b
|
|
13
|
-
JOIN bots bot ON bot.id = b.agent_id
|
|
14
|
-
LEFT JOIN provider_sessions ps ON ps.binding_id = b.id
|
|
15
|
-
LEFT JOIN work_attempts sa ON sa.id = b.source_attempt_id
|
|
16
|
-
LEFT JOIN work_requests r ON r.id = COALESCE(b.request_id, sa.request_id)
|
|
17
|
-
LEFT JOIN conversations c ON c.id = COALESCE(b.conversation_id, r.source_conversation_id)
|
|
18
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
19
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
20
|
-
`,s=`
|
|
21
|
-
SELECT ps.id, ps.agent_id, bot.name AS agent_name, ps.provider_kind, ps.title, ps.workspace,
|
|
22
|
-
ps.provider_created_at, ps.provider_updated_at, ps.availability, ps.lifecycle, ps.resumable, ps.busy,
|
|
23
|
-
ps.last_synced_at, ps.created_at, ps.updated_at,
|
|
24
|
-
(SELECT MAX(COALESCE(t.finished_at, t.created_at)) FROM provider_session_turns t WHERE t.session_ref = ps.id) AS turn_last_at,
|
|
25
|
-
EXISTS (SELECT 1 FROM provider_session_turns t WHERE t.session_ref = ps.id AND t.state = 'running') AS running
|
|
26
|
-
FROM provider_sessions ps
|
|
27
|
-
JOIN bots bot ON bot.id = ps.agent_id
|
|
28
|
-
WHERE ps.binding_id IS NULL
|
|
29
|
-
`;function o(e){return`${new Date(e).toISOString().slice(0,16).replace("T"," ")} UTC`}function d(e,t){let n=e?.[t];return"string"==typeof n&&n.trim().length>0?n:null}function l(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 u(e,a=(0,n.emptyUsage)()){let i,s=null;try{s=e.source_snapshot?JSON.parse(e.source_snapshot):null}catch{}let c=l(e),p=null===e.released_at?"active":"ended",_=((i=(e.request_intent??"").split("\n").map(e=>e.trim()).find(e=>e.length>0))?i.length>80?`${i.slice(0,79).trimEnd()}…`:i:null)??(c?.kind==="group"?c.label:null)??`${e.agent_name} \xb7 ${o(e.created_at)}`;return{ref:e.id,source:"botmancers",agent:{id:e.agent_id,name:e.agent_name,adapter:e.adapter,transport:d(s,"transport")},title:_,status:p,resumable:null===e.released_at&&null!==e.request_id&&null!==e.request_kind&&r.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,state:{availability:e.ps_availability??"available",lifecycle:e.ps_lifecycle??"open",resumable:null===e.ps_resumable||void 0===e.ps_resumable?null:1===e.ps_resumable,busy:1===e.ps_busy||!!e.attempt_running||!!e.ps_running,synced_at:e.ps_synced_at??null},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:c,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:d(s,"cwd")??e.ps_workspace??null,deck:d(s,"deck")},usage:a}}function c(e,t=(0,n.emptyUsage)()){let a=e.provider_created_at??e.created_at,r=null===e.resumable?null:1===e.resumable,i="archived"===e.lifecycle?e.provider_updated_at??e.updated_at:null;return{ref:e.id,source:"native",agent:{id:e.agent_id,name:e.agent_name,adapter:e.provider_kind,transport:null},title:e.title??`${e.agent_name} \xb7 ${o(a)}`,status:"open"===e.lifecycle?"active":"ended",resumable:!1,state:{availability:e.availability,lifecycle:e.lifecycle,resumable:r,busy:1===e.busy||!!e.running,synced_at:e.last_synced_at},created_at:a,ended_at:i,last_activity_at:Math.max(a,e.provider_updated_at??0,e.turn_last_at??0),origin:{conversation:null,work_request:null},context:{workspace:e.workspace,deck:null},usage:t}}function p(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 _(e,t,n){return e.prepare(`${s} AND ps.id = ? AND ps.agent_id = ?`).get(n,t)}function g(e,t,n){return e.prepare(`${i} WHERE b.id = ? AND b.agent_id = ?`).get(n,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 n=e.prepare(`
|
|
30
|
-
SELECT c.id AS origin_conversation_id, c.type AS conversation_type, c.bot_id AS conversation_bot_id,
|
|
31
|
-
tb.name AS thread_agent_name, g.name AS group_name
|
|
32
|
-
FROM conversations c
|
|
33
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
34
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
35
|
-
WHERE c.id = ?
|
|
36
|
-
`).get(t);return n?l(n):null},"getAgentSession",0,function(e,t,a){let r=g(e,t,a);if(!r){let r=_(e,t,a);if(!r)return;let{usage:i,samples:s}=(0,n.sessionUsageSamples)(e,t,a);return{...c(r,i),attempts:[],usage_samples:s}}let i=e.prepare(`
|
|
37
|
-
SELECT a.attempt_number, a.kind, a.request_id, a.outcome, a.started_at, a.finished_at,
|
|
38
|
-
CASE WHEN a.id = ? THEN 'source' ELSE 'resume' END AS role
|
|
39
|
-
FROM work_attempts a
|
|
40
|
-
WHERE a.id = ? OR a.resumed_session_binding_id = ?
|
|
41
|
-
ORDER BY a.started_at ASC, a.id ASC
|
|
42
|
-
`).all(r.source_attempt_id,r.source_attempt_id,r.id),{usage:s,samples:o}=(0,n.sessionUsageSamples)(e,t,a);return{...u(r,s),attempts:i,usage_samples:o}},"isSessionFilter",0,function(e){return"string"==typeof e&&a.includes(e)},"listAgentSessions",0,function(e,t,a="all"){let r=e.prepare(`${i} WHERE b.agent_id = ? ${"active"===a?"AND b.released_at IS NULL":"ended"===a?"AND b.released_at IS NOT NULL":""}`).all(t),o=e.prepare(`${s} AND ps.agent_id = ? ${"active"===a?"AND ps.lifecycle = 'open'":"ended"===a?"AND ps.lifecycle = 'archived'":""}`).all(t),d=(0,n.agentSessionUsage)(e,t);return[...r.map(e=>u(e,d.get(e.id))),...o.map(e=>c(e,d.get(e.id)))].sort(p)},"sessionDebugExternalId",0,function(e,t,n){let a=g(e,t,n)?.external_session_id;if(void 0!==a)return a;if(!_(e,t,n))return;let r=e.prepare("SELECT provider_session_id FROM provider_sessions WHERE id = ? AND agent_id = ?").get(n,t);return r?.provider_session_id},"sessionTitle",0,function(e,t,n){let a=g(e,t,n);if(a)return u(a).title;let r=_(e,t,n);return r?c(r).title:null}])}];
|
|
43
|
-
|
|
44
|
-
//# sourceMappingURL=_0fe5qz5._.js.map
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
module.exports=[74546,e=>{"use strict";var t=e.i(69936);async function n(e,{params:a}){let{pinRef:r}=await a;return(0,t.handleReadPin)(e,r)}e.s(["GET",0,n])},70074,e=>{"use strict";var t=e.i(47909),n=e.i(74017),a=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),p=e.i(66012),_=e.i(70101),g=e.i(26937),h=e.i(10372),v=e.i(93695),f=e.i(9580);e.i(52474);var m=e.i(220);let E=new t.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/v0/pins/[pinRef]/route",pathname:"/api/v0/pins/[pinRef]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/v0/pins/[pinRef]/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(74546),...{}}),{workAsyncStorage:A,workUnitAsyncStorage:b,serverHooks:R}=E;async function y(e,t,a){a.requestMeta&&(0,r.setRequestMeta)(e,a.requestMeta),E.isDev&&(0,r.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let A="/api/v0/pins/[pinRef]/route";A=A.replace(/\/index$/,"")||"/";let b=await E.prepare(e,t,{srcPage:A,multiZoneDraftMode:!1});if(!b)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:R,deploymentId:y,params:S,nextConfig:w,parsedUrl:C,isDraftMode:N,prerenderManifest:O,routerServerContext:T,isOnDemandRevalidate:k,revalidateOnlyGenerated:q,resolvedPathname:I,clientReferenceManifest:x,serverActionsManifest:L}=b,P=(0,o.normalizeAppPath)(A),M=!!O.routes[I]&&(E.isDev||(0,f.isRouteCacheOwner)(I,E.cacheOwner,O.routes[I])),H=!!(O.dynamicRoutes[P]||M),D=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,C,!1):t.end("This page could not be found"),null);if(H&&!N){let e=O.dynamicRoutes[P];if(e&&!1===e.fallback&&!M){if(w.adapterPath)return await D();throw new v.NoFallbackError}}let F=null;!H||E.isDev||N||(F="/index"===(F=I)?"/":F);let U=!0===E.isDev||!H,$=H&&!U;L&&x&&(0,s.setManifestsSingleton)({page:A,clientReferenceManifest:x,serverActionsManifest:L});let K=e.method||"GET",j=(0,i.getTracer)(),W=j.getActiveScopeSpan(),J=!!(null==T?void 0:T.isWrappedByNextServer),G=!!(0,r.getRequestMeta)(e,"minimalMode"),X=(0,r.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,w,O,G);null==X||X.resetRequestCache(),globalThis.__incrementalCache=X;let B={params:S,previewProps:O.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts,useCacheTimeout:w.experimental.useCacheTimeout},cacheComponents:!!w.cacheComponents,validationLevel:w.experimental.instantInsights.validationLevel,isDraftMode:N,supportsDynamicResponse:U,incrementalCache:X,hmrRefreshHash:(0,r.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:w.cacheLife,staticPageGenerationTimeout:w.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,a,r)=>E.onRequestError(e,t,a,r,T)},sharedContext:{buildId:R,deploymentId:y}},V=new d.NodeNextRequest(e),Y=new d.NodeNextResponse(t),z=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:n})=>{try{if(!G&&k&&q&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let r=await E.handle(z,B);e.fetchMetrics=B.renderOpts.fetchMetrics;let i=B.renderOpts.pendingWaitUntil;i&&a.waitUntil&&(a.waitUntil(i),i=void 0);let s=B.renderOpts.collectedTags;if(!H)return await (0,p.sendResponse)(V,Y,r,i),null;{let e=await r.blob(),t=(0,_.toNodeOutgoingHttpHeaders)(r.headers);s&&(t[h.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,a=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=h.INFINITE_CACHE?!1!==n&&n>0?w.expireTime:void 0:B.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:r.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:a}}}}catch(t){throw(null==n?void 0:n.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:A,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:k})},!1,T),t}},Q=async(r,s)=>{try{var o,d;let r=await E.handleResponse({req:e,nextConfig:w,cacheKey:F,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:O,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:q,responseGenerator:Z,waitUntil:a.waitUntil,isMinimalMode:G});if(!H)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});G||t.setHeader("x-nextjs-cache",k?"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,_.fromNodeOutgoingHttpHeaders)(r.value.headers);G&&H||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,p.sendResponse)(V,Y,new Response(r.value.body,{headers:i,status:r.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:k})},!1,T),H)throw t;await (0,p.sendResponse)(V,Y,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 n=j.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=n.get("next.route")||P,o=`${K} ${a}`;r.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),r.updateName(o),s&&s!==r&&(s.setAttribute("http.route",a),s.updateName(o))})()}};if(J&&W)await Q(W,void 0);else{let t=j.getActiveScopeSpan();await j.withPropagatedContext(e.headers,()=>j.trace(u.BaseServerSpan.handleRequest,{spanName:`${K} ${A}`,kind:i.SpanKind.SERVER,attributes:{"http.method":K,"http.target":e.url}},e=>Q(e,t)),void 0,!J)}}e.s(["handler",0,y,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:b})},"routeModule",0,E,"serverHooks",0,R,"workAsyncStorage",0,A,"workUnitAsyncStorage",0,b])},43345,e=>{"use strict";var t=e.i(62294),n=e.i(26571),a=e.i(45383);let r=["authentication_unavailable","unauthenticated","principal_mismatch","agent_not_found","conversation_not_found","request_not_found"];async function i(e,n){let i,s=null,o=!1,d=null;try{i=await e(e=>{s=e},()=>{let e=s;n&&e&&"service"===e.kind&&t.serviceAudit.append({principal:e,operation:n.operation,capability:"participant",targetKind:n.targetKind,targetRef:n.targetRef,outcome:"allowed",code:null}),o=!0})}catch(e){if(e instanceof a.AgentApiError)d=e.code,i=Response.json({error:{code:e.code,message:e.message}},{status:e.status});else console.error("Agent conversation API error:",e),d="internal_error",i=Response.json({error:{code:"internal_error",message:"The request could not be processed."}},{status:500})}let l=s;if(o&&null===d)return i;if(n&&l&&"service"===l.kind)try{t.serviceAudit.append({principal:l,operation:n.operation,capability:"participant",targetKind:n.targetKind,targetRef:n.targetRef,outcome:null===d?"allowed":"internal_error"===d?"error":r.includes(d)?"denied":"rejected",code:d})}catch(e){return console.error("Service audit append failed:",e instanceof Error?e.message:"unknown error"),Response.json({error:{code:"internal_error",message:"The request could not be processed."}},{status:500})}return i}async function s(e){let t,r=function(){try{return(0,n.serviceTokenAuthenticatorFromEnv)()}catch(e){if(e instanceof n.ServiceTokenConfigError)return console.error(`Agent API authentication disabled: ${e.message}`),null;throw e}}();if(!r)throw new a.AgentApiError("authentication_unavailable","No authenticator is configured for the agent conversation API.");try{t=await r(e)}catch{t=null}if(!t||!(0,a.isPrincipalKind)(t.kind)||"string"!=typeof t.id||!t.id.trim())throw new a.AgentApiError("unauthenticated","Authentication failed.");return{kind:t.kind,id:t.id}}async function o(e,t){return i(async(n,r)=>{var i;let o,d=await s(e);n(d);try{let t=await e.json();if(!t||"object"!=typeof t||Array.isArray(t))throw Error("not an object");o=t}catch{throw new a.AgentApiError("invalid_request","The request body must be a JSON object.")}let l=null==(i=o.principal)?null:{kind:i.kind,id:String(i.id??"")};if(l&&!(0,a.samePrincipal)(l,d))throw new a.AgentApiError("principal_mismatch","The declared principal does not match the authenticated principal.");let u=e.headers.get("idempotency-key"),c="string"==typeof o.idempotencyKey?o.idempotencyKey:null;if(u&&c&&u!==c)throw new a.AgentApiError("invalid_request","Idempotency-Key header and body idempotencyKey differ.");let p=u??c??"";if(p.toLowerCase().startsWith(a.MCP_IDEMPOTENCY_PREFIX))throw new a.AgentApiError("invalid_request",`Idempotency keys starting with "${a.MCP_IDEMPOTENCY_PREFIX}" are reserved for the MCP bridge.`);let{accepted:_,dispatched:g}=(0,a.acceptAgentMessage)(d,{agentId:t,content:"string"==typeof o.content?o.content:"",idempotencyKey:p,conversationId:"string"==typeof o.conversationId?o.conversationId:null==o.conversationId?null:""},r);return!0===o.wait?(await g,Response.json({...(0,a.getAgentRequest)(d,_.requestId),replayed:_.replayed})):Response.json(_,{status:_.replayed?200:202})},{operation:"agents.message",targetKind:"agent",targetRef:t})}async function d(e,t){return i(async n=>{let r=await s(e);return n(r),Response.json((0,a.getConversation)(r,t))},{operation:"conversations.read",targetKind:"conversation",targetRef:t})}async function l(e,t){return i(async n=>{let r=await s(e);return n(r),Response.json((0,a.getAgentRequest)(r,t))},{operation:"requests.read",targetKind:"request",targetRef:t})}e.s(["authenticate",0,s,"handleGetAgentRequest",0,l,"handleGetConversation",0,d,"handleSendAgentMessage",0,o])},90027,e=>{"use strict";var t=e.i(62349),n=e.i(28420);let a=["active","ended","all"],r=["implementation","revision"],i=`
|
|
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
|
-
EXISTS (SELECT 1 FROM work_attempts oa WHERE oa.resumed_session_binding_id = b.id AND oa.finished_at IS NULL) AS attempt_running,
|
|
9
|
-
ps.availability AS ps_availability, ps.lifecycle AS ps_lifecycle, ps.resumable AS ps_resumable, ps.busy AS ps_busy,
|
|
10
|
-
ps.workspace AS ps_workspace, ps.last_synced_at AS ps_synced_at,
|
|
11
|
-
EXISTS (SELECT 1 FROM provider_session_turns pt WHERE pt.session_ref = ps.id AND pt.state = 'running') AS ps_running
|
|
12
|
-
FROM session_bindings b
|
|
13
|
-
JOIN bots bot ON bot.id = b.agent_id
|
|
14
|
-
LEFT JOIN provider_sessions ps ON ps.binding_id = b.id
|
|
15
|
-
LEFT JOIN work_attempts sa ON sa.id = b.source_attempt_id
|
|
16
|
-
LEFT JOIN work_requests r ON r.id = COALESCE(b.request_id, sa.request_id)
|
|
17
|
-
LEFT JOIN conversations c ON c.id = COALESCE(b.conversation_id, r.source_conversation_id)
|
|
18
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
19
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
20
|
-
`,s=`
|
|
21
|
-
SELECT ps.id, ps.agent_id, bot.name AS agent_name, ps.provider_kind, ps.title, ps.workspace,
|
|
22
|
-
ps.provider_created_at, ps.provider_updated_at, ps.availability, ps.lifecycle, ps.resumable, ps.busy,
|
|
23
|
-
ps.last_synced_at, ps.created_at, ps.updated_at,
|
|
24
|
-
(SELECT MAX(COALESCE(t.finished_at, t.created_at)) FROM provider_session_turns t WHERE t.session_ref = ps.id) AS turn_last_at,
|
|
25
|
-
EXISTS (SELECT 1 FROM provider_session_turns t WHERE t.session_ref = ps.id AND t.state = 'running') AS running
|
|
26
|
-
FROM provider_sessions ps
|
|
27
|
-
JOIN bots bot ON bot.id = ps.agent_id
|
|
28
|
-
WHERE ps.binding_id IS NULL
|
|
29
|
-
`;function o(e){return`${new Date(e).toISOString().slice(0,16).replace("T"," ")} UTC`}function d(e,t){let n=e?.[t];return"string"==typeof n&&n.trim().length>0?n:null}function l(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 u(e,a=(0,n.emptyUsage)()){let i,s=null;try{s=e.source_snapshot?JSON.parse(e.source_snapshot):null}catch{}let c=l(e),p=null===e.released_at?"active":"ended",_=((i=(e.request_intent??"").split("\n").map(e=>e.trim()).find(e=>e.length>0))?i.length>80?`${i.slice(0,79).trimEnd()}…`:i:null)??(c?.kind==="group"?c.label:null)??`${e.agent_name} \xb7 ${o(e.created_at)}`;return{ref:e.id,source:"botmancers",agent:{id:e.agent_id,name:e.agent_name,adapter:e.adapter,transport:d(s,"transport")},title:_,status:p,resumable:null===e.released_at&&null!==e.request_id&&null!==e.request_kind&&r.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,state:{availability:e.ps_availability??"available",lifecycle:e.ps_lifecycle??"open",resumable:null===e.ps_resumable||void 0===e.ps_resumable?null:1===e.ps_resumable,busy:1===e.ps_busy||!!e.attempt_running||!!e.ps_running,synced_at:e.ps_synced_at??null},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:c,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:d(s,"cwd")??e.ps_workspace??null,deck:d(s,"deck")},usage:a}}function c(e,t=(0,n.emptyUsage)()){let a=e.provider_created_at??e.created_at,r=null===e.resumable?null:1===e.resumable,i="archived"===e.lifecycle?e.provider_updated_at??e.updated_at:null;return{ref:e.id,source:"native",agent:{id:e.agent_id,name:e.agent_name,adapter:e.provider_kind,transport:null},title:e.title??`${e.agent_name} \xb7 ${o(a)}`,status:"open"===e.lifecycle?"active":"ended",resumable:!1,state:{availability:e.availability,lifecycle:e.lifecycle,resumable:r,busy:1===e.busy||!!e.running,synced_at:e.last_synced_at},created_at:a,ended_at:i,last_activity_at:Math.max(a,e.provider_updated_at??0,e.turn_last_at??0),origin:{conversation:null,work_request:null},context:{workspace:e.workspace,deck:null},usage:t}}function p(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 _(e,t,n){return e.prepare(`${s} AND ps.id = ? AND ps.agent_id = ?`).get(n,t)}function g(e,t,n){return e.prepare(`${i} WHERE b.id = ? AND b.agent_id = ?`).get(n,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 n=e.prepare(`
|
|
30
|
-
SELECT c.id AS origin_conversation_id, c.type AS conversation_type, c.bot_id AS conversation_bot_id,
|
|
31
|
-
tb.name AS thread_agent_name, g.name AS group_name
|
|
32
|
-
FROM conversations c
|
|
33
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
34
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
35
|
-
WHERE c.id = ?
|
|
36
|
-
`).get(t);return n?l(n):null},"getAgentSession",0,function(e,t,a){let r=g(e,t,a);if(!r){let r=_(e,t,a);if(!r)return;let{usage:i,samples:s}=(0,n.sessionUsageSamples)(e,t,a);return{...c(r,i),attempts:[],usage_samples:s}}let i=e.prepare(`
|
|
37
|
-
SELECT a.attempt_number, a.kind, a.request_id, a.outcome, a.started_at, a.finished_at,
|
|
38
|
-
CASE WHEN a.id = ? THEN 'source' ELSE 'resume' END AS role
|
|
39
|
-
FROM work_attempts a
|
|
40
|
-
WHERE a.id = ? OR a.resumed_session_binding_id = ?
|
|
41
|
-
ORDER BY a.started_at ASC, a.id ASC
|
|
42
|
-
`).all(r.source_attempt_id,r.source_attempt_id,r.id),{usage:s,samples:o}=(0,n.sessionUsageSamples)(e,t,a);return{...u(r,s),attempts:i,usage_samples:o}},"isSessionFilter",0,function(e){return"string"==typeof e&&a.includes(e)},"listAgentSessions",0,function(e,t,a="all"){let r=e.prepare(`${i} WHERE b.agent_id = ? ${"active"===a?"AND b.released_at IS NULL":"ended"===a?"AND b.released_at IS NOT NULL":""}`).all(t),o=e.prepare(`${s} AND ps.agent_id = ? ${"active"===a?"AND ps.lifecycle = 'open'":"ended"===a?"AND ps.lifecycle = 'archived'":""}`).all(t),d=(0,n.agentSessionUsage)(e,t);return[...r.map(e=>u(e,d.get(e.id))),...o.map(e=>c(e,d.get(e.id)))].sort(p)},"sessionDebugExternalId",0,function(e,t,n){let a=g(e,t,n)?.external_session_id;if(void 0!==a)return a;if(!_(e,t,n))return;let r=e.prepare("SELECT provider_session_id FROM provider_sessions WHERE id = ? AND agent_id = ?").get(n,t);return r?.provider_session_id},"sessionTitle",0,function(e,t,n){let a=g(e,t,n);if(a)return u(a).title;let r=_(e,t,n);return r?c(r).title:null}])}];
|
|
43
|
-
|
|
44
|
-
//# sourceMappingURL=_0qoji5a._.js.map
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
module.exports=[39782,e=>{"use strict";var t=e.i(69936);async function n(e,{params:a}){let{agentId:r}=await a;return(0,t.handleMessageAgent)(e,r)}e.s(["POST",0,n])},18397,e=>{"use strict";var t=e.i(47909),n=e.i(74017),a=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),p=e.i(66012),_=e.i(70101),g=e.i(26937),h=e.i(10372),v=e.i(93695),m=e.i(9580);e.i(52474);var f=e.i(220);let E=new t.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/v0/agents/[agentId]/pins/route",pathname:"/api/v0/agents/[agentId]/pins",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/v0/agents/[agentId]/pins/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(39782),...{}}),{workAsyncStorage:A,workUnitAsyncStorage:b,serverHooks:y}=E;async function R(e,t,a){a.requestMeta&&(0,r.setRequestMeta)(e,a.requestMeta),E.isDev&&(0,r.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let A="/api/v0/agents/[agentId]/pins/route";A=A.replace(/\/index$/,"")||"/";let b=await E.prepare(e,t,{srcPage:A,multiZoneDraftMode:!1});if(!b)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:y,deploymentId:R,params:S,nextConfig:w,parsedUrl:C,isDraftMode:N,prerenderManifest:O,routerServerContext:T,isOnDemandRevalidate:k,revalidateOnlyGenerated:q,resolvedPathname:I,clientReferenceManifest:x,serverActionsManifest:L}=b,P=(0,o.normalizeAppPath)(A),M=!!O.routes[I]&&(E.isDev||(0,m.isRouteCacheOwner)(I,E.cacheOwner,O.routes[I])),H=!!(O.dynamicRoutes[P]||M),D=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,C,!1):t.end("This page could not be found"),null);if(H&&!N){let e=O.dynamicRoutes[P];if(e&&!1===e.fallback&&!M){if(w.adapterPath)return await D();throw new v.NoFallbackError}}let F=null;!H||E.isDev||N||(F="/index"===(F=I)?"/":F);let U=!0===E.isDev||!H,$=H&&!U;L&&x&&(0,s.setManifestsSingleton)({page:A,clientReferenceManifest:x,serverActionsManifest:L});let K=e.method||"GET",j=(0,i.getTracer)(),W=j.getActiveScopeSpan(),J=!!(null==T?void 0:T.isWrappedByNextServer),X=!!(0,r.getRequestMeta)(e,"minimalMode"),G=(0,r.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,w,O,X);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let B={params:S,previewProps:O.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts,useCacheTimeout:w.experimental.useCacheTimeout},cacheComponents:!!w.cacheComponents,validationLevel:w.experimental.instantInsights.validationLevel,isDraftMode:N,supportsDynamicResponse:U,incrementalCache:G,hmrRefreshHash:(0,r.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:w.cacheLife,staticPageGenerationTimeout:w.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,a,r)=>E.onRequestError(e,t,a,r,T)},sharedContext:{buildId:y,deploymentId:R}},V=new d.NodeNextRequest(e),Y=new d.NodeNextResponse(t),z=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:n})=>{try{if(!X&&k&&q&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let r=await E.handle(z,B);e.fetchMetrics=B.renderOpts.fetchMetrics;let i=B.renderOpts.pendingWaitUntil;i&&a.waitUntil&&(a.waitUntil(i),i=void 0);let s=B.renderOpts.collectedTags;if(!H)return await (0,p.sendResponse)(V,Y,r,i),null;{let e=await r.blob(),t=(0,_.toNodeOutgoingHttpHeaders)(r.headers);s&&(t[h.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,a=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=h.INFINITE_CACHE?!1!==n&&n>0?w.expireTime:void 0:B.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:r.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:a}}}}catch(t){throw(null==n?void 0:n.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:A,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:k})},!1,T),t}},Q=async(r,s)=>{try{var o,d;let r=await E.handleResponse({req:e,nextConfig:w,cacheKey:F,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:O,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:q,responseGenerator:Z,waitUntil:a.waitUntil,isMinimalMode:X});if(!H)return;if((null==r||null==(o=r.value)?void 0:o.kind)!==f.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});X||t.setHeader("x-nextjs-cache",k?"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,_.fromNodeOutgoingHttpHeaders)(r.value.headers);X&&H||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,p.sendResponse)(V,Y,new Response(r.value.body,{headers:i,status:r.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:k})},!1,T),H)throw t;await (0,p.sendResponse)(V,Y,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 n=j.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=n.get("next.route")||P,o=`${K} ${a}`;r.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),r.updateName(o),s&&s!==r&&(s.setAttribute("http.route",a),s.updateName(o))})()}};if(J&&W)await Q(W,void 0);else{let t=j.getActiveScopeSpan();await j.withPropagatedContext(e.headers,()=>j.trace(u.BaseServerSpan.handleRequest,{spanName:`${K} ${A}`,kind:i.SpanKind.SERVER,attributes:{"http.method":K,"http.target":e.url}},e=>Q(e,t)),void 0,!J)}}e.s(["handler",0,R,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:b})},"routeModule",0,E,"serverHooks",0,y,"workAsyncStorage",0,A,"workUnitAsyncStorage",0,b])},43345,e=>{"use strict";var t=e.i(62294),n=e.i(26571),a=e.i(45383);let r=["authentication_unavailable","unauthenticated","principal_mismatch","agent_not_found","conversation_not_found","request_not_found"];async function i(e,n){let i,s=null,o=!1,d=null;try{i=await e(e=>{s=e},()=>{let e=s;n&&e&&"service"===e.kind&&t.serviceAudit.append({principal:e,operation:n.operation,capability:"participant",targetKind:n.targetKind,targetRef:n.targetRef,outcome:"allowed",code:null}),o=!0})}catch(e){if(e instanceof a.AgentApiError)d=e.code,i=Response.json({error:{code:e.code,message:e.message}},{status:e.status});else console.error("Agent conversation API error:",e),d="internal_error",i=Response.json({error:{code:"internal_error",message:"The request could not be processed."}},{status:500})}let l=s;if(o&&null===d)return i;if(n&&l&&"service"===l.kind)try{t.serviceAudit.append({principal:l,operation:n.operation,capability:"participant",targetKind:n.targetKind,targetRef:n.targetRef,outcome:null===d?"allowed":"internal_error"===d?"error":r.includes(d)?"denied":"rejected",code:d})}catch(e){return console.error("Service audit append failed:",e instanceof Error?e.message:"unknown error"),Response.json({error:{code:"internal_error",message:"The request could not be processed."}},{status:500})}return i}async function s(e){let t,r=function(){try{return(0,n.serviceTokenAuthenticatorFromEnv)()}catch(e){if(e instanceof n.ServiceTokenConfigError)return console.error(`Agent API authentication disabled: ${e.message}`),null;throw e}}();if(!r)throw new a.AgentApiError("authentication_unavailable","No authenticator is configured for the agent conversation API.");try{t=await r(e)}catch{t=null}if(!t||!(0,a.isPrincipalKind)(t.kind)||"string"!=typeof t.id||!t.id.trim())throw new a.AgentApiError("unauthenticated","Authentication failed.");return{kind:t.kind,id:t.id}}async function o(e,t){return i(async(n,r)=>{var i;let o,d=await s(e);n(d);try{let t=await e.json();if(!t||"object"!=typeof t||Array.isArray(t))throw Error("not an object");o=t}catch{throw new a.AgentApiError("invalid_request","The request body must be a JSON object.")}let l=null==(i=o.principal)?null:{kind:i.kind,id:String(i.id??"")};if(l&&!(0,a.samePrincipal)(l,d))throw new a.AgentApiError("principal_mismatch","The declared principal does not match the authenticated principal.");let u=e.headers.get("idempotency-key"),c="string"==typeof o.idempotencyKey?o.idempotencyKey:null;if(u&&c&&u!==c)throw new a.AgentApiError("invalid_request","Idempotency-Key header and body idempotencyKey differ.");let p=u??c??"";if(p.toLowerCase().startsWith(a.MCP_IDEMPOTENCY_PREFIX))throw new a.AgentApiError("invalid_request",`Idempotency keys starting with "${a.MCP_IDEMPOTENCY_PREFIX}" are reserved for the MCP bridge.`);let{accepted:_,dispatched:g}=(0,a.acceptAgentMessage)(d,{agentId:t,content:"string"==typeof o.content?o.content:"",idempotencyKey:p,conversationId:"string"==typeof o.conversationId?o.conversationId:null==o.conversationId?null:""},r);return!0===o.wait?(await g,Response.json({...(0,a.getAgentRequest)(d,_.requestId),replayed:_.replayed})):Response.json(_,{status:_.replayed?200:202})},{operation:"agents.message",targetKind:"agent",targetRef:t})}async function d(e,t){return i(async n=>{let r=await s(e);return n(r),Response.json((0,a.getConversation)(r,t))},{operation:"conversations.read",targetKind:"conversation",targetRef:t})}async function l(e,t){return i(async n=>{let r=await s(e);return n(r),Response.json((0,a.getAgentRequest)(r,t))},{operation:"requests.read",targetKind:"request",targetRef:t})}e.s(["authenticate",0,s,"handleGetAgentRequest",0,l,"handleGetConversation",0,d,"handleSendAgentMessage",0,o])},90027,e=>{"use strict";var t=e.i(62349),n=e.i(28420);let a=["active","ended","all"],r=["implementation","revision"],i=`
|
|
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
|
-
EXISTS (SELECT 1 FROM work_attempts oa WHERE oa.resumed_session_binding_id = b.id AND oa.finished_at IS NULL) AS attempt_running,
|
|
9
|
-
ps.availability AS ps_availability, ps.lifecycle AS ps_lifecycle, ps.resumable AS ps_resumable, ps.busy AS ps_busy,
|
|
10
|
-
ps.workspace AS ps_workspace, ps.last_synced_at AS ps_synced_at,
|
|
11
|
-
EXISTS (SELECT 1 FROM provider_session_turns pt WHERE pt.session_ref = ps.id AND pt.state = 'running') AS ps_running
|
|
12
|
-
FROM session_bindings b
|
|
13
|
-
JOIN bots bot ON bot.id = b.agent_id
|
|
14
|
-
LEFT JOIN provider_sessions ps ON ps.binding_id = b.id
|
|
15
|
-
LEFT JOIN work_attempts sa ON sa.id = b.source_attempt_id
|
|
16
|
-
LEFT JOIN work_requests r ON r.id = COALESCE(b.request_id, sa.request_id)
|
|
17
|
-
LEFT JOIN conversations c ON c.id = COALESCE(b.conversation_id, r.source_conversation_id)
|
|
18
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
19
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
20
|
-
`,s=`
|
|
21
|
-
SELECT ps.id, ps.agent_id, bot.name AS agent_name, ps.provider_kind, ps.title, ps.workspace,
|
|
22
|
-
ps.provider_created_at, ps.provider_updated_at, ps.availability, ps.lifecycle, ps.resumable, ps.busy,
|
|
23
|
-
ps.last_synced_at, ps.created_at, ps.updated_at,
|
|
24
|
-
(SELECT MAX(COALESCE(t.finished_at, t.created_at)) FROM provider_session_turns t WHERE t.session_ref = ps.id) AS turn_last_at,
|
|
25
|
-
EXISTS (SELECT 1 FROM provider_session_turns t WHERE t.session_ref = ps.id AND t.state = 'running') AS running
|
|
26
|
-
FROM provider_sessions ps
|
|
27
|
-
JOIN bots bot ON bot.id = ps.agent_id
|
|
28
|
-
WHERE ps.binding_id IS NULL
|
|
29
|
-
`;function o(e){return`${new Date(e).toISOString().slice(0,16).replace("T"," ")} UTC`}function d(e,t){let n=e?.[t];return"string"==typeof n&&n.trim().length>0?n:null}function l(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 u(e,a=(0,n.emptyUsage)()){let i,s=null;try{s=e.source_snapshot?JSON.parse(e.source_snapshot):null}catch{}let c=l(e),p=null===e.released_at?"active":"ended",_=((i=(e.request_intent??"").split("\n").map(e=>e.trim()).find(e=>e.length>0))?i.length>80?`${i.slice(0,79).trimEnd()}…`:i:null)??(c?.kind==="group"?c.label:null)??`${e.agent_name} \xb7 ${o(e.created_at)}`;return{ref:e.id,source:"botmancers",agent:{id:e.agent_id,name:e.agent_name,adapter:e.adapter,transport:d(s,"transport")},title:_,status:p,resumable:null===e.released_at&&null!==e.request_id&&null!==e.request_kind&&r.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,state:{availability:e.ps_availability??"available",lifecycle:e.ps_lifecycle??"open",resumable:null===e.ps_resumable||void 0===e.ps_resumable?null:1===e.ps_resumable,busy:1===e.ps_busy||!!e.attempt_running||!!e.ps_running,synced_at:e.ps_synced_at??null},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:c,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:d(s,"cwd")??e.ps_workspace??null,deck:d(s,"deck")},usage:a}}function c(e,t=(0,n.emptyUsage)()){let a=e.provider_created_at??e.created_at,r=null===e.resumable?null:1===e.resumable,i="archived"===e.lifecycle?e.provider_updated_at??e.updated_at:null;return{ref:e.id,source:"native",agent:{id:e.agent_id,name:e.agent_name,adapter:e.provider_kind,transport:null},title:e.title??`${e.agent_name} \xb7 ${o(a)}`,status:"open"===e.lifecycle?"active":"ended",resumable:!1,state:{availability:e.availability,lifecycle:e.lifecycle,resumable:r,busy:1===e.busy||!!e.running,synced_at:e.last_synced_at},created_at:a,ended_at:i,last_activity_at:Math.max(a,e.provider_updated_at??0,e.turn_last_at??0),origin:{conversation:null,work_request:null},context:{workspace:e.workspace,deck:null},usage:t}}function p(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 _(e,t,n){return e.prepare(`${s} AND ps.id = ? AND ps.agent_id = ?`).get(n,t)}function g(e,t,n){return e.prepare(`${i} WHERE b.id = ? AND b.agent_id = ?`).get(n,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 n=e.prepare(`
|
|
30
|
-
SELECT c.id AS origin_conversation_id, c.type AS conversation_type, c.bot_id AS conversation_bot_id,
|
|
31
|
-
tb.name AS thread_agent_name, g.name AS group_name
|
|
32
|
-
FROM conversations c
|
|
33
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
34
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
35
|
-
WHERE c.id = ?
|
|
36
|
-
`).get(t);return n?l(n):null},"getAgentSession",0,function(e,t,a){let r=g(e,t,a);if(!r){let r=_(e,t,a);if(!r)return;let{usage:i,samples:s}=(0,n.sessionUsageSamples)(e,t,a);return{...c(r,i),attempts:[],usage_samples:s}}let i=e.prepare(`
|
|
37
|
-
SELECT a.attempt_number, a.kind, a.request_id, a.outcome, a.started_at, a.finished_at,
|
|
38
|
-
CASE WHEN a.id = ? THEN 'source' ELSE 'resume' END AS role
|
|
39
|
-
FROM work_attempts a
|
|
40
|
-
WHERE a.id = ? OR a.resumed_session_binding_id = ?
|
|
41
|
-
ORDER BY a.started_at ASC, a.id ASC
|
|
42
|
-
`).all(r.source_attempt_id,r.source_attempt_id,r.id),{usage:s,samples:o}=(0,n.sessionUsageSamples)(e,t,a);return{...u(r,s),attempts:i,usage_samples:o}},"isSessionFilter",0,function(e){return"string"==typeof e&&a.includes(e)},"listAgentSessions",0,function(e,t,a="all"){let r=e.prepare(`${i} WHERE b.agent_id = ? ${"active"===a?"AND b.released_at IS NULL":"ended"===a?"AND b.released_at IS NOT NULL":""}`).all(t),o=e.prepare(`${s} AND ps.agent_id = ? ${"active"===a?"AND ps.lifecycle = 'open'":"ended"===a?"AND ps.lifecycle = 'archived'":""}`).all(t),d=(0,n.agentSessionUsage)(e,t);return[...r.map(e=>u(e,d.get(e.id))),...o.map(e=>c(e,d.get(e.id)))].sort(p)},"sessionDebugExternalId",0,function(e,t,n){let a=g(e,t,n)?.external_session_id;if(void 0!==a)return a;if(!_(e,t,n))return;let r=e.prepare("SELECT provider_session_id FROM provider_sessions WHERE id = ? AND agent_id = ?").get(n,t);return r?.provider_session_id},"sessionTitle",0,function(e,t,n){let a=g(e,t,n);if(a)return u(a).title;let r=_(e,t,n);return r?c(r).title:null}])}];
|
|
43
|
-
|
|
44
|
-
//# sourceMappingURL=_0uv2pi5._.js.map
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
module.exports=[48683,e=>{"use strict";var t=e.i(69936);async function n(e,{params:a}){let{ref:r}=await a;return(0,t.handleSendSessionMessage)(e,r)}e.s(["POST",0,n])},78219,e=>{"use strict";var t=e.i(47909),n=e.i(74017),a=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),p=e.i(66012),_=e.i(70101),g=e.i(26937),h=e.i(10372),v=e.i(93695),m=e.i(9580);e.i(52474);var f=e.i(220);let E=new t.AppRouteRouteModule({definition:{kind:n.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:A,workUnitAsyncStorage:b,serverHooks:y}=E;async function R(e,t,a){a.requestMeta&&(0,r.setRequestMeta)(e,a.requestMeta),E.isDev&&(0,r.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let A="/api/v0/sessions/[ref]/messages/route";A=A.replace(/\/index$/,"")||"/";let b=await E.prepare(e,t,{srcPage:A,multiZoneDraftMode:!1});if(!b)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:y,deploymentId:R,params:S,nextConfig:w,parsedUrl:C,isDraftMode:N,prerenderManifest:O,routerServerContext:T,isOnDemandRevalidate:k,revalidateOnlyGenerated:q,resolvedPathname:I,clientReferenceManifest:x,serverActionsManifest:L}=b,P=(0,o.normalizeAppPath)(A),M=!!O.routes[I]&&(E.isDev||(0,m.isRouteCacheOwner)(I,E.cacheOwner,O.routes[I])),H=!!(O.dynamicRoutes[P]||M),D=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,C,!1):t.end("This page could not be found"),null);if(H&&!N){let e=O.dynamicRoutes[P];if(e&&!1===e.fallback&&!M){if(w.adapterPath)return await D();throw new v.NoFallbackError}}let F=null;!H||E.isDev||N||(F="/index"===(F=I)?"/":F);let U=!0===E.isDev||!H,$=H&&!U;L&&x&&(0,s.setManifestsSingleton)({page:A,clientReferenceManifest:x,serverActionsManifest:L});let K=e.method||"GET",j=(0,i.getTracer)(),W=j.getActiveScopeSpan(),J=!!(null==T?void 0:T.isWrappedByNextServer),X=!!(0,r.getRequestMeta)(e,"minimalMode"),G=(0,r.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,w,O,X);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let B={params:S,previewProps:O.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts,useCacheTimeout:w.experimental.useCacheTimeout},cacheComponents:!!w.cacheComponents,validationLevel:w.experimental.instantInsights.validationLevel,isDraftMode:N,supportsDynamicResponse:U,incrementalCache:G,hmrRefreshHash:(0,r.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:w.cacheLife,staticPageGenerationTimeout:w.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,a,r)=>E.onRequestError(e,t,a,r,T)},sharedContext:{buildId:y,deploymentId:R}},V=new d.NodeNextRequest(e),Y=new d.NodeNextResponse(t),z=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:n})=>{try{if(!X&&k&&q&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let r=await E.handle(z,B);e.fetchMetrics=B.renderOpts.fetchMetrics;let i=B.renderOpts.pendingWaitUntil;i&&a.waitUntil&&(a.waitUntil(i),i=void 0);let s=B.renderOpts.collectedTags;if(!H)return await (0,p.sendResponse)(V,Y,r,i),null;{let e=await r.blob(),t=(0,_.toNodeOutgoingHttpHeaders)(r.headers);s&&(t[h.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,a=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=h.INFINITE_CACHE?!1!==n&&n>0?w.expireTime:void 0:B.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:r.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:a}}}}catch(t){throw(null==n?void 0:n.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:A,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:k})},!1,T),t}},Q=async(r,s)=>{try{var o,d;let r=await E.handleResponse({req:e,nextConfig:w,cacheKey:F,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:O,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:q,responseGenerator:Z,waitUntil:a.waitUntil,isMinimalMode:X});if(!H)return;if((null==r||null==(o=r.value)?void 0:o.kind)!==f.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});X||t.setHeader("x-nextjs-cache",k?"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,_.fromNodeOutgoingHttpHeaders)(r.value.headers);X&&H||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,p.sendResponse)(V,Y,new Response(r.value.body,{headers:i,status:r.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:k})},!1,T),H)throw t;await (0,p.sendResponse)(V,Y,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 n=j.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=n.get("next.route")||P,o=`${K} ${a}`;r.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),r.updateName(o),s&&s!==r&&(s.setAttribute("http.route",a),s.updateName(o))})()}};if(J&&W)await Q(W,void 0);else{let t=j.getActiveScopeSpan();await j.withPropagatedContext(e.headers,()=>j.trace(u.BaseServerSpan.handleRequest,{spanName:`${K} ${A}`,kind:i.SpanKind.SERVER,attributes:{"http.method":K,"http.target":e.url}},e=>Q(e,t)),void 0,!J)}}e.s(["handler",0,R,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:b})},"routeModule",0,E,"serverHooks",0,y,"workAsyncStorage",0,A,"workUnitAsyncStorage",0,b])},43345,e=>{"use strict";var t=e.i(62294),n=e.i(26571),a=e.i(45383);let r=["authentication_unavailable","unauthenticated","principal_mismatch","agent_not_found","conversation_not_found","request_not_found"];async function i(e,n){let i,s=null,o=!1,d=null;try{i=await e(e=>{s=e},()=>{let e=s;n&&e&&"service"===e.kind&&t.serviceAudit.append({principal:e,operation:n.operation,capability:"participant",targetKind:n.targetKind,targetRef:n.targetRef,outcome:"allowed",code:null}),o=!0})}catch(e){if(e instanceof a.AgentApiError)d=e.code,i=Response.json({error:{code:e.code,message:e.message}},{status:e.status});else console.error("Agent conversation API error:",e),d="internal_error",i=Response.json({error:{code:"internal_error",message:"The request could not be processed."}},{status:500})}let l=s;if(o&&null===d)return i;if(n&&l&&"service"===l.kind)try{t.serviceAudit.append({principal:l,operation:n.operation,capability:"participant",targetKind:n.targetKind,targetRef:n.targetRef,outcome:null===d?"allowed":"internal_error"===d?"error":r.includes(d)?"denied":"rejected",code:d})}catch(e){return console.error("Service audit append failed:",e instanceof Error?e.message:"unknown error"),Response.json({error:{code:"internal_error",message:"The request could not be processed."}},{status:500})}return i}async function s(e){let t,r=function(){try{return(0,n.serviceTokenAuthenticatorFromEnv)()}catch(e){if(e instanceof n.ServiceTokenConfigError)return console.error(`Agent API authentication disabled: ${e.message}`),null;throw e}}();if(!r)throw new a.AgentApiError("authentication_unavailable","No authenticator is configured for the agent conversation API.");try{t=await r(e)}catch{t=null}if(!t||!(0,a.isPrincipalKind)(t.kind)||"string"!=typeof t.id||!t.id.trim())throw new a.AgentApiError("unauthenticated","Authentication failed.");return{kind:t.kind,id:t.id}}async function o(e,t){return i(async(n,r)=>{var i;let o,d=await s(e);n(d);try{let t=await e.json();if(!t||"object"!=typeof t||Array.isArray(t))throw Error("not an object");o=t}catch{throw new a.AgentApiError("invalid_request","The request body must be a JSON object.")}let l=null==(i=o.principal)?null:{kind:i.kind,id:String(i.id??"")};if(l&&!(0,a.samePrincipal)(l,d))throw new a.AgentApiError("principal_mismatch","The declared principal does not match the authenticated principal.");let u=e.headers.get("idempotency-key"),c="string"==typeof o.idempotencyKey?o.idempotencyKey:null;if(u&&c&&u!==c)throw new a.AgentApiError("invalid_request","Idempotency-Key header and body idempotencyKey differ.");let p=u??c??"";if(p.toLowerCase().startsWith(a.MCP_IDEMPOTENCY_PREFIX))throw new a.AgentApiError("invalid_request",`Idempotency keys starting with "${a.MCP_IDEMPOTENCY_PREFIX}" are reserved for the MCP bridge.`);let{accepted:_,dispatched:g}=(0,a.acceptAgentMessage)(d,{agentId:t,content:"string"==typeof o.content?o.content:"",idempotencyKey:p,conversationId:"string"==typeof o.conversationId?o.conversationId:null==o.conversationId?null:""},r);return!0===o.wait?(await g,Response.json({...(0,a.getAgentRequest)(d,_.requestId),replayed:_.replayed})):Response.json(_,{status:_.replayed?200:202})},{operation:"agents.message",targetKind:"agent",targetRef:t})}async function d(e,t){return i(async n=>{let r=await s(e);return n(r),Response.json((0,a.getConversation)(r,t))},{operation:"conversations.read",targetKind:"conversation",targetRef:t})}async function l(e,t){return i(async n=>{let r=await s(e);return n(r),Response.json((0,a.getAgentRequest)(r,t))},{operation:"requests.read",targetKind:"request",targetRef:t})}e.s(["authenticate",0,s,"handleGetAgentRequest",0,l,"handleGetConversation",0,d,"handleSendAgentMessage",0,o])},90027,e=>{"use strict";var t=e.i(62349),n=e.i(28420);let a=["active","ended","all"],r=["implementation","revision"],i=`
|
|
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
|
-
EXISTS (SELECT 1 FROM work_attempts oa WHERE oa.resumed_session_binding_id = b.id AND oa.finished_at IS NULL) AS attempt_running,
|
|
9
|
-
ps.availability AS ps_availability, ps.lifecycle AS ps_lifecycle, ps.resumable AS ps_resumable, ps.busy AS ps_busy,
|
|
10
|
-
ps.workspace AS ps_workspace, ps.last_synced_at AS ps_synced_at,
|
|
11
|
-
EXISTS (SELECT 1 FROM provider_session_turns pt WHERE pt.session_ref = ps.id AND pt.state = 'running') AS ps_running
|
|
12
|
-
FROM session_bindings b
|
|
13
|
-
JOIN bots bot ON bot.id = b.agent_id
|
|
14
|
-
LEFT JOIN provider_sessions ps ON ps.binding_id = b.id
|
|
15
|
-
LEFT JOIN work_attempts sa ON sa.id = b.source_attempt_id
|
|
16
|
-
LEFT JOIN work_requests r ON r.id = COALESCE(b.request_id, sa.request_id)
|
|
17
|
-
LEFT JOIN conversations c ON c.id = COALESCE(b.conversation_id, r.source_conversation_id)
|
|
18
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
19
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
20
|
-
`,s=`
|
|
21
|
-
SELECT ps.id, ps.agent_id, bot.name AS agent_name, ps.provider_kind, ps.title, ps.workspace,
|
|
22
|
-
ps.provider_created_at, ps.provider_updated_at, ps.availability, ps.lifecycle, ps.resumable, ps.busy,
|
|
23
|
-
ps.last_synced_at, ps.created_at, ps.updated_at,
|
|
24
|
-
(SELECT MAX(COALESCE(t.finished_at, t.created_at)) FROM provider_session_turns t WHERE t.session_ref = ps.id) AS turn_last_at,
|
|
25
|
-
EXISTS (SELECT 1 FROM provider_session_turns t WHERE t.session_ref = ps.id AND t.state = 'running') AS running
|
|
26
|
-
FROM provider_sessions ps
|
|
27
|
-
JOIN bots bot ON bot.id = ps.agent_id
|
|
28
|
-
WHERE ps.binding_id IS NULL
|
|
29
|
-
`;function o(e){return`${new Date(e).toISOString().slice(0,16).replace("T"," ")} UTC`}function d(e,t){let n=e?.[t];return"string"==typeof n&&n.trim().length>0?n:null}function l(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 u(e,a=(0,n.emptyUsage)()){let i,s=null;try{s=e.source_snapshot?JSON.parse(e.source_snapshot):null}catch{}let c=l(e),p=null===e.released_at?"active":"ended",_=((i=(e.request_intent??"").split("\n").map(e=>e.trim()).find(e=>e.length>0))?i.length>80?`${i.slice(0,79).trimEnd()}…`:i:null)??(c?.kind==="group"?c.label:null)??`${e.agent_name} \xb7 ${o(e.created_at)}`;return{ref:e.id,source:"botmancers",agent:{id:e.agent_id,name:e.agent_name,adapter:e.adapter,transport:d(s,"transport")},title:_,status:p,resumable:null===e.released_at&&null!==e.request_id&&null!==e.request_kind&&r.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,state:{availability:e.ps_availability??"available",lifecycle:e.ps_lifecycle??"open",resumable:null===e.ps_resumable||void 0===e.ps_resumable?null:1===e.ps_resumable,busy:1===e.ps_busy||!!e.attempt_running||!!e.ps_running,synced_at:e.ps_synced_at??null},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:c,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:d(s,"cwd")??e.ps_workspace??null,deck:d(s,"deck")},usage:a}}function c(e,t=(0,n.emptyUsage)()){let a=e.provider_created_at??e.created_at,r=null===e.resumable?null:1===e.resumable,i="archived"===e.lifecycle?e.provider_updated_at??e.updated_at:null;return{ref:e.id,source:"native",agent:{id:e.agent_id,name:e.agent_name,adapter:e.provider_kind,transport:null},title:e.title??`${e.agent_name} \xb7 ${o(a)}`,status:"open"===e.lifecycle?"active":"ended",resumable:!1,state:{availability:e.availability,lifecycle:e.lifecycle,resumable:r,busy:1===e.busy||!!e.running,synced_at:e.last_synced_at},created_at:a,ended_at:i,last_activity_at:Math.max(a,e.provider_updated_at??0,e.turn_last_at??0),origin:{conversation:null,work_request:null},context:{workspace:e.workspace,deck:null},usage:t}}function p(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 _(e,t,n){return e.prepare(`${s} AND ps.id = ? AND ps.agent_id = ?`).get(n,t)}function g(e,t,n){return e.prepare(`${i} WHERE b.id = ? AND b.agent_id = ?`).get(n,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 n=e.prepare(`
|
|
30
|
-
SELECT c.id AS origin_conversation_id, c.type AS conversation_type, c.bot_id AS conversation_bot_id,
|
|
31
|
-
tb.name AS thread_agent_name, g.name AS group_name
|
|
32
|
-
FROM conversations c
|
|
33
|
-
LEFT JOIN bots tb ON tb.id = c.bot_id
|
|
34
|
-
LEFT JOIN groups g ON g.id = c.group_id
|
|
35
|
-
WHERE c.id = ?
|
|
36
|
-
`).get(t);return n?l(n):null},"getAgentSession",0,function(e,t,a){let r=g(e,t,a);if(!r){let r=_(e,t,a);if(!r)return;let{usage:i,samples:s}=(0,n.sessionUsageSamples)(e,t,a);return{...c(r,i),attempts:[],usage_samples:s}}let i=e.prepare(`
|
|
37
|
-
SELECT a.attempt_number, a.kind, a.request_id, a.outcome, a.started_at, a.finished_at,
|
|
38
|
-
CASE WHEN a.id = ? THEN 'source' ELSE 'resume' END AS role
|
|
39
|
-
FROM work_attempts a
|
|
40
|
-
WHERE a.id = ? OR a.resumed_session_binding_id = ?
|
|
41
|
-
ORDER BY a.started_at ASC, a.id ASC
|
|
42
|
-
`).all(r.source_attempt_id,r.source_attempt_id,r.id),{usage:s,samples:o}=(0,n.sessionUsageSamples)(e,t,a);return{...u(r,s),attempts:i,usage_samples:o}},"isSessionFilter",0,function(e){return"string"==typeof e&&a.includes(e)},"listAgentSessions",0,function(e,t,a="all"){let r=e.prepare(`${i} WHERE b.agent_id = ? ${"active"===a?"AND b.released_at IS NULL":"ended"===a?"AND b.released_at IS NOT NULL":""}`).all(t),o=e.prepare(`${s} AND ps.agent_id = ? ${"active"===a?"AND ps.lifecycle = 'open'":"ended"===a?"AND ps.lifecycle = 'archived'":""}`).all(t),d=(0,n.agentSessionUsage)(e,t);return[...r.map(e=>u(e,d.get(e.id))),...o.map(e=>c(e,d.get(e.id)))].sort(p)},"sessionDebugExternalId",0,function(e,t,n){let a=g(e,t,n)?.external_session_id;if(void 0!==a)return a;if(!_(e,t,n))return;let r=e.prepare("SELECT provider_session_id FROM provider_sessions WHERE id = ? AND agent_id = ?").get(n,t);return r?.provider_session_id},"sessionTitle",0,function(e,t,n){let a=g(e,t,n);if(a)return u(a).title;let r=_(e,t,n);return r?c(r).title:null}])}];
|
|
43
|
-
|
|
44
|
-
//# sourceMappingURL=_0wdl90-._.js.map
|