botmancers 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/README.md +22 -17
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +7 -0
- package/app/.next/build-manifest.json +3 -3
- package/app/.next/prerender-manifest.json +5 -5
- package/app/.next/required-server-files.json +2 -2
- package/app/.next/routes-manifest.json +55 -0
- package/app/.next/server/app/_global-error.html +1 -1
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_not-found.html +1 -1
- package/app/.next/server/app/_not-found.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/api/agent-deck/decks/route.js +2 -2
- package/app/.next/server/app/api/agent-deck/decks/route.js.nft.json +1 -1
- package/app/.next/server/app/api/agent-deck/settings/route.js +2 -2
- package/app/.next/server/app/api/agent-deck/settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/config/route.js +2 -2
- package/app/.next/server/app/api/bots/[id]/config/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route.js +12 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route.js.nft.json +1 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/route.js +2 -2
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/route.js +6 -3
- package/app/.next/server/app/api/bots/[id]/sessions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/skill/route.js +2 -2
- package/app/.next/server/app/api/bots/[id]/skill/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/availability/route.js +2 -2
- package/app/.next/server/app/api/bots/availability/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/delete-preview/route.js +2 -2
- package/app/.next/server/app/api/bots/delete-preview/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/import/route.js +2 -2
- package/app/.next/server/app/api/bots/import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/manage/route.js +2 -2
- package/app/.next/server/app/api/bots/manage/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/name-migrations/route.js +2 -2
- package/app/.next/server/app/api/bots/name-migrations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/route.js +3 -3
- package/app/.next/server/app/api/bots/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/approve/route.js +4 -4
- package/app/.next/server/app/api/conversations/[id]/approve/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/deny/route.js +4 -4
- package/app/.next/server/app/api/conversations/[id]/deny/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/draft/route.js +4 -4
- package/app/.next/server/app/api/conversations/[id]/draft/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/messages/[messageId]/stop/route.js +2 -2
- package/app/.next/server/app/api/conversations/[id]/messages/[messageId]/stop/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/messages/route.js +5 -5
- package/app/.next/server/app/api/conversations/[id]/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/route.js +2 -2
- package/app/.next/server/app/api/conversations/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/stop/route.js +3 -3
- package/app/.next/server/app/api/conversations/[id]/stop/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/route.js +2 -2
- package/app/.next/server/app/api/conversations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/exchanges/[id]/cancel/route.js +4 -4
- package/app/.next/server/app/api/exchanges/[id]/cancel/route.js.nft.json +1 -1
- package/app/.next/server/app/api/exchanges/[id]/route.js +3 -3
- package/app/.next/server/app/api/exchanges/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/exchanges/route.js +3 -3
- package/app/.next/server/app/api/exchanges/route.js.nft.json +1 -1
- package/app/.next/server/app/api/files/[name]/route.js +3 -2
- package/app/.next/server/app/api/files/[name]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/groups/route.js +2 -2
- package/app/.next/server/app/api/groups/route.js.nft.json +1 -1
- package/app/.next/server/app/api/health/route.js +3 -2
- package/app/.next/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next/server/app/api/mcp/route.js +2 -2
- package/app/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/app/.next/server/app/api/messages/[id]/between/route.js +2 -2
- package/app/.next/server/app/api/messages/[id]/between/route.js.nft.json +1 -1
- package/app/.next/server/app/api/runtime-connections/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/runtime-connections/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/runtime-connections/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/runtime-connections/route.js +9 -0
- package/app/.next/server/app/api/runtime-connections/route.js.nft.json +1 -0
- package/app/.next/server/app/api/runtime-connections/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/service-grants/route.js +2 -2
- package/app/.next/server/app/api/service-grants/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/conversations/[conversationId]/route.js +7 -6
- package/app/.next/server/app/api/v0/agents/[agentId]/conversations/[conversationId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/conversations/route.js +7 -6
- package/app/.next/server/app/api/v0/agents/[agentId]/conversations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/messages/route.js +4 -4
- package/app/.next/server/app/api/v0/agents/[agentId]/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/pins/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/agents/[agentId]/pins/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/agents/[agentId]/pins/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/agents/[agentId]/pins/route.js +12 -0
- package/app/.next/server/app/api/v0/agents/[agentId]/pins/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/agents/[agentId]/pins/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/v0/agents/[agentId]/route.js +7 -6
- package/app/.next/server/app/api/v0/agents/[agentId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/sessions/[ref]/route.js +7 -6
- package/app/.next/server/app/api/v0/agents/[agentId]/sessions/[ref]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/sessions/route.js +7 -6
- package/app/.next/server/app/api/v0/agents/[agentId]/sessions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/route.js +7 -6
- package/app/.next/server/app/api/v0/agents/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/capabilities/route.js +7 -6
- package/app/.next/server/app/api/v0/capabilities/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/conversations/[id]/route.js +4 -4
- package/app/.next/server/app/api/v0/conversations/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/exchanges/[id]/cancel/route.js +7 -6
- package/app/.next/server/app/api/v0/exchanges/[id]/cancel/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/exchanges/[id]/route.js +7 -6
- package/app/.next/server/app/api/v0/exchanges/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/exchanges/route.js +7 -6
- package/app/.next/server/app/api/v0/exchanges/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/mcp/route.js +8 -7
- package/app/.next/server/app/api/v0/mcp/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route.js +12 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route.js +12 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/route.js +12 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/pins/[pinRef]/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/v0/requests/[id]/route.js +4 -4
- package/app/.next/server/app/api/v0/requests/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/sessions/[ref]/messages/route.js +7 -6
- package/app/.next/server/app/api/v0/sessions/[ref]/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/sessions/[ref]/pins/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/pins/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/pins/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/pins/route.js +12 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/pins/route.js.nft.json +1 -0
- package/app/.next/server/app/api/v0/sessions/[ref]/pins/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/wake-grants/[id]/revoke/route.js +4 -4
- package/app/.next/server/app/api/wake-grants/[id]/revoke/route.js.nft.json +1 -1
- package/app/.next/server/app/api/wakes/[id]/decision/route.js +4 -4
- package/app/.next/server/app/api/wakes/[id]/decision/route.js.nft.json +1 -1
- package/app/.next/server/app/api/wakes/[id]/retry/route.js +4 -4
- package/app/.next/server/app/api/wakes/[id]/retry/route.js.nft.json +1 -1
- package/app/.next/server/app/bots/[id]/config/page.js.nft.json +1 -1
- package/app/.next/server/app/bots/[id]/config/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/exchanges/page.js.nft.json +1 -1
- package/app/.next/server/app/exchanges/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/exchanges.html +1 -1
- package/app/.next/server/app/exchanges.rsc +3 -3
- package/app/.next/server/app/exchanges.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/exchanges.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/exchanges.segments/exchanges/__PAGE__.segment.rsc +3 -3
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +3 -3
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/app/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/page.js.nft.json +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/settings/page.js.nft.json +1 -1
- package/app/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/settings.html +1 -1
- package/app/.next/server/app/settings.rsc +3 -3
- package/app/.next/server/app/settings.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +3 -3
- package/app/.next/server/app/threads/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/threads/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +7 -0
- package/app/.next/server/chunks/1oeh_server_app_api_bots_[id]_sessions_[ref]_pins_route_actions_0e1st6o.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__02kssr-._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__06qkt0f._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__08qhrch._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__097ptn_._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__09m9-pe._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0b7w1z3._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0f5yqjs._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0g4um3-._.js +44 -0
- package/app/.next/server/chunks/[root-of-the-server]__0hro5ey._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0hwpgxq._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0izjfmr._.js +355 -60
- package/app/.next/server/chunks/[root-of-the-server]__0lwsto-._.js +5 -0
- package/app/.next/server/chunks/[root-of-the-server]__0s1enbp._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0uq7sci._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0wg992i._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__13cd2fb._.js +44 -0
- package/app/.next/server/chunks/[root-of-the-server]__17mum5-._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1879cge._.js +3 -0
- package/app/.next/server/chunks/{[root-of-the-server]__17oz13o._.js → [root-of-the-server]__1_01-13._.js} +3 -3
- package/app/.next/server/chunks/[root-of-the-server]__1a2dh11._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1bhzfu_._.js +7 -0
- package/app/.next/server/chunks/[root-of-the-server]__1co3sok._.js +44 -0
- package/app/.next/server/chunks/[root-of-the-server]__1eh30sp._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1fmsid0._.js +44 -0
- package/app/.next/server/chunks/[root-of-the-server]__1i388e2._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1kvvs4u._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1qbgs3m._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1s6h1sj._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1slu7d7._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__1tuqc5v._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1v609eq._.js +44 -0
- package/app/.next/server/chunks/[root-of-the-server]__1y_j43n._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1zdv-vb._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1zjs2tr._.js +3 -0
- package/app/.next/server/chunks/_0061c2q._.js +3 -0
- package/app/.next/server/chunks/_023se5j._.js +44 -0
- package/app/.next/server/chunks/_02pb_qv._.js +44 -0
- package/app/.next/server/chunks/_05ro-21._.js +44 -0
- package/app/.next/server/chunks/_07on0dc._.js +44 -0
- package/app/.next/server/chunks/_08208nz._.js +44 -0
- package/app/.next/server/chunks/_0a2do3x._.js +1 -1
- package/app/.next/server/chunks/_0fe5qz5._.js +44 -0
- package/app/.next/server/chunks/_0i8_xso._.js +3 -0
- package/app/.next/server/chunks/_0qoji5a._.js +44 -0
- package/app/.next/server/chunks/_0uv2pi5._.js +44 -0
- package/app/.next/server/chunks/_0wdl90-._.js +44 -0
- package/app/.next/server/chunks/_1-5mthb._.js +1 -1
- package/app/.next/server/chunks/_11-q8k1._.js +3 -0
- package/app/.next/server/chunks/_11ijk9k._.js +44 -0
- package/app/.next/server/chunks/_198sn69._.js +44 -0
- package/app/.next/server/chunks/_1ba_5hd._.js +44 -0
- package/app/.next/server/chunks/_1ess5if._.js +3 -0
- package/app/.next/server/chunks/_1i0zod4._.js +3 -0
- package/app/.next/server/chunks/_1m89jq5._.js +44 -0
- package/app/.next/server/chunks/_1n39wr_._.js +44 -0
- package/app/.next/server/chunks/_1ryxqo1._.js +44 -0
- package/app/.next/server/chunks/_1vemgly._.js +44 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_runtime-connections_route_actions_06rulng.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_agents_[agentId]_pins_route_actions_08uftk9.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_pins_[pinRef]_detach_route_actions_0nk3268.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_pins_[pinRef]_messages_route_actions_1wenu96.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_pins_[pinRef]_route_actions_0z7fu_c.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_v0_sessions_[ref]_pins_route_actions_0y3ere3.js +3 -0
- package/app/.next/server/chunks/lib_0kik6bx._.js +1 -1
- package/app/.next/server/chunks/lib_0lqoyb4._.js +217 -0
- package/app/.next/server/chunks/lib_0pe3tiv._.js +1 -1
- package/app/.next/server/chunks/lib_0riiofz._.js +44 -0
- package/app/.next/server/chunks/lib_16j2293._.js +217 -0
- package/app/.next/server/chunks/lib_1nb_61e._.js +217 -0
- package/app/.next/server/chunks/lib_service-api-http_ts_0xzqhny._.js +5 -5
- package/app/.next/server/chunks/lib_session-pins_ts_0lmxnwj._.js +20 -0
- package/app/.next/server/chunks/ssr/_0epgorw._.js +3 -0
- package/app/.next/server/chunks/ssr/_1cvuhjt._.js +3 -0
- package/app/.next/server/chunks/ssr/_1n5mvo5._.js +3 -0
- package/app/.next/server/chunks/ssr/_1o94bnv._.js +1 -1
- package/app/.next/server/chunks/ssr/app_bots_[id]_config_page_tsx_1e0uue9._.js +1 -1
- package/app/.next/server/chunks/ssr/app_components_AgentDeckRuntime_tsx_024janf._.js +1 -1
- package/app/.next/server/chunks/ssr/app_components_ExchangeCard_tsx_1shfcgn._.js +3 -0
- package/app/.next/server/chunks/ssr/app_exchanges_page_tsx_0j-n2a1._.js +3 -0
- package/app/.next/server/chunks/ssr/node_modules_@swc_helpers_cjs__interop_require_default_cjs_1ztp13a._.js +3 -0
- package/app/.next/server/middleware-build-manifest.js +3 -3
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +1 -1
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/0bhd8eso48g27.js +1 -0
- package/app/.next/static/chunks/1ku9himlsx-hn.js +1 -0
- package/app/.next/static/chunks/21aqekm5z0j47.js +1 -0
- package/app/.next/static/chunks/2a8bomryx66oj.css +3 -0
- package/app/.next/static/chunks/3230ywnpii0s6.js +3 -0
- package/app/.next/static/chunks/35l2c95bd-jud.js +1 -0
- package/app/.next/static/chunks/3cijpn6vx3yzv.js +1 -0
- package/app/.next/static/chunks/3ue9194j59kem.js +1 -0
- package/app/.next/static/chunks/44ese2s4gzze_.js +1 -0
- package/app/BUILD_INFO.json +2 -2
- package/app/package.json +1 -1
- package/app/server.js +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +2 -2
- package/dist/clients.js +7 -3
- package/dist/config.d.ts +2 -1
- package/dist/config.js +5 -4
- package/dist/contract.d.ts +1 -0
- package/dist/contract.js +5 -0
- package/dist/home.d.ts +1 -1
- package/dist/home.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/product.js +1 -1
- package/dist/upstream.js +2 -2
- package/package.json +1 -1
- package/schemas/botmancers.mcp.v2.tools.json +1588 -4
- package/skills/botmancers-collaboration/SKILL.md +21 -6
- package/skills/botmancers-collaboration/references/workflows.md +72 -0
- package/app/.next/server/chunks/[root-of-the-server]__0ab4e_k._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__0qozubc._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__0wtzcge._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__10m3szc._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__15hknun._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__16ikszu._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1afl75n._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1kvvdpx._.js +0 -7
- package/app/.next/server/chunks/[root-of-the-server]__1qoa704._.js +0 -7
- package/app/.next/server/chunks/_06rti77._.js +0 -30
- package/app/.next/server/chunks/_09k38l1._.js +0 -3
- package/app/.next/server/chunks/_0dlg5kj._.js +0 -30
- package/app/.next/server/chunks/_0dyculb._.js +0 -30
- package/app/.next/server/chunks/_0eig2jc._.js +0 -30
- package/app/.next/server/chunks/_0ggf7vy._.js +0 -3
- package/app/.next/server/chunks/_0gtqbub._.js +0 -3
- package/app/.next/server/chunks/_0i7ga8c._.js +0 -3
- package/app/.next/server/chunks/_0kghtb6._.js +0 -3
- package/app/.next/server/chunks/_0orubev._.js +0 -3
- package/app/.next/server/chunks/_0sfpe9z._.js +0 -3
- package/app/.next/server/chunks/_0th2j4w._.js +0 -3
- package/app/.next/server/chunks/_0uz7r06._.js +0 -30
- package/app/.next/server/chunks/_0x05ts4._.js +0 -3
- package/app/.next/server/chunks/_0y3geoj._.js +0 -30
- package/app/.next/server/chunks/_12tq5uv._.js +0 -30
- package/app/.next/server/chunks/_147-4gl._.js +0 -3
- package/app/.next/server/chunks/_14ky6a2._.js +0 -30
- package/app/.next/server/chunks/_16kbxdt._.js +0 -30
- package/app/.next/server/chunks/_1963m2f._.js +0 -30
- package/app/.next/server/chunks/_1_34_h3._.js +0 -30
- package/app/.next/server/chunks/_1cc-2mx._.js +0 -3
- package/app/.next/server/chunks/_1ee4ej2._.js +0 -3
- package/app/.next/server/chunks/_1esxu1s._.js +0 -3
- package/app/.next/server/chunks/_1gn7eh7._.js +0 -3
- package/app/.next/server/chunks/_1gw7qwf._.js +0 -3
- package/app/.next/server/chunks/_1inyx08._.js +0 -3
- package/app/.next/server/chunks/_1kjsnlr._.js +0 -3
- package/app/.next/server/chunks/_1nurj3f._.js +0 -30
- package/app/.next/server/chunks/_1p2rf_n._.js +0 -30
- package/app/.next/server/chunks/_1p8rola._.js +0 -3
- package/app/.next/server/chunks/_1u6tw78._.js +0 -30
- package/app/.next/server/chunks/app_api_import-capabilities_route_ts_013w1kt._.js +0 -3
- package/app/.next/server/chunks/lib_0t3s3rj._.js +0 -30
- package/app/.next/server/chunks/lib_0zxi6rx._.js +0 -148
- package/app/.next/server/chunks/lib_12udr7g._.js +0 -148
- package/app/.next/server/chunks/lib_draft_ts_1atoius._.js +0 -3
- package/app/.next/server/chunks/lib_session-catalog_ts_1i7f38f._.js +0 -30
- package/app/.next/server/chunks/ssr/_00ysoah._.js +0 -3
- package/app/.next/server/chunks/ssr/_157wnb_._.js +0 -3
- package/app/.next/server/chunks/ssr/app_1-nwnha._.js +0 -3
- package/app/.next/server/chunks/ssr/app_components_0bhuhd-._.js +0 -3
- package/app/.next/server/chunks/ssr/app_components_0w2_b3t._.js +0 -3
- package/app/.next/static/chunks/0774d7ob6aze_.js +0 -1
- package/app/.next/static/chunks/0d3ein53nlgja.js +0 -1
- package/app/.next/static/chunks/1i5xroz391zkb.js +0 -1
- package/app/.next/static/chunks/1vz50l951sr9e.css +0 -3
- package/app/.next/static/chunks/24ggj819yt3y6.js +0 -1
- package/app/.next/static/chunks/2_8lcalraul5s.js +0 -3
- package/app/.next/static/chunks/30i0-l04mmdvk.js +0 -1
- package/app/.next/static/chunks/3wdlh25l1vww9.js +0 -1
- /package/app/.next/static/{ewp56HqU5-d9bpFog3bli → gh3shm8hnVqXLr75rmvsL}/_buildManifest.js +0 -0
- /package/app/.next/static/{ewp56HqU5-d9bpFog3bli → gh3shm8hnVqXLr75rmvsL}/_clientMiddlewareManifest.js +0 -0
- /package/app/.next/static/{ewp56HqU5-d9bpFog3bli → gh3shm8hnVqXLr75rmvsL}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13978,e=>{"use strict";var s=e.i(43476),t=e.i(71645),a=e.i(22016),n=e.i(18566),l=e.i(15983),i=e.i(10718),r=e.i(74904),c=e.i(33851),o=e.i(44079),d=e.i(4335),m=e.i(52900),f=e.i(87303);function h({attribute:e,label:a,options:n,current:l,onPick:i,className:r}){let c=(0,t.useId)(),o=`avatar-${e}`;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{id:c,className:"avatar-group-label",children:a}),(0,s.jsx)("div",{className:r?`avatar-opt-grid ${r}`:"avatar-opt-grid",role:"radiogroup","aria-labelledby":c,children:n.map(t=>(0,s.jsxs)("label",{title:t.label,className:"avatar-opt",children:[(0,s.jsx)("input",{type:"radio",name:o,value:t.id,checked:l[e]===t.id,onChange:()=>i({[e]:t.id}),className:"avatar-opt-input"}),(0,s.jsx)("span",{className:"avatar-opt-art","aria-hidden":"true",children:(0,s.jsx)(f.default,{config:{...l,[e]:t.id},size:44})}),(0,s.jsx)("span",{children:t.label})]},t.id))})]})}var u=e.i(68541);function x({phase:e,onImport:t}){let a=(0,u.marketImportView)(e);return(0,s.jsxs)("div",{className:"mt-3","data-field":"marketplace-import",children:[(0,s.jsx)("button",{type:"button",onClick:t,disabled:a.busy,"aria-busy":a.busy,"aria-describedby":"cfg-market-import-status",className:"cfg-btn-ghost text-sm w-full sm:w-auto",children:"Import from Grok Marketplace"}),(0,s.jsx)("p",{id:"cfg-market-import-status",role:"status","aria-live":"polite",className:"error"===a.tone?"mt-2 text-sm cfg-error":"mt-2 text-xs cfg-faint",children:a.message})]})}var g=e.i(37947);let p="Fix the highlighted fields.",j=[{key:"avatar_accessory",label:"Avatar accessory"},{key:"avatar_color",label:"Avatar color"},{key:"avatar_eyes",label:"Avatar eyes"},{key:"avatar_hands",label:"Avatar hands"},{key:"description",label:"Description (rules)"},{key:"import_operation_id",label:"Import operation ID"},{key:"import_schema_version",label:"Import schema version"},{key:"memories",label:"Remembered facts"},{key:"name",label:"Name"},{key:"skill_content",label:"Skill content"},{key:"skill_path",label:"Skill path"},{key:"skill_present",label:"Skill present"},{key:"source_provider",label:"Source provider"},{key:"template_id",label:"Template ID"},{key:"template_url",label:"Template URL"},{key:"title",label:"Title"}];function N(e){return String(e).padStart(2,"0")}function b(e){let s=new Date(e);return`${s.getFullYear()}-${N(s.getMonth()+1)}-${N(s.getDate())} ${N(s.getHours())}:${N(s.getMinutes())}`}function v(e){let s=new Date(e);return`${N(s.getHours())}:${N(s.getMinutes())}:${N(s.getSeconds())}`}async function y(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}e.s(["default",0,function(){var e;let N=String((0,n.useParams)().id??""),k=(0,n.useRouter)(),[w,S]=(0,t.useState)(!1),[C,_]=(0,t.useState)(null),[A,E]=(0,t.useState)(!0),[R,T]=(0,t.useState)(!1),[D,I]=(0,t.useState)(!1),[P,$]=(0,t.useState)(0),[U,O]=(0,t.useState)(null),[F,H]=(0,t.useState)("clean"),[L,q]=(0,t.useState)(""),[B,M]=(0,t.useState)(0),[V,J]=(0,t.useState)(!1),[Y,z]=(0,t.useState)(""),[K,W]=(0,t.useState)("clean"),[G,Q]=(0,t.useState)(""),[Z,X]=(0,t.useState)(0),[ee,es]=(0,t.useState)({}),[et,ea]=(0,t.useState)(""),[en,el]=(0,t.useState)(!1),[ei,er]=(0,t.useState)(null),[ec,eo]=(0,t.useState)(!1),ed=C?.bot.launch_profile==="agent_deck"||ei?.launchProfile==="agent_deck",{state:em,retry:ef}=(0,d.useDeckList)(!!ed),eh=(0,m.useRuntimeConnections)(),[eu,ex]=(0,t.useState)(void 0),[eg,ep]=(0,t.useState)("clean"),[ej,eN]=(0,t.useState)(""),[eb,ev]=(0,t.useState)(0),[ey,ek]=(0,t.useState)(null),[ew,eS]=(0,t.useState)("clean"),[eC,e_]=(0,t.useState)(""),[eA,eE]=(0,t.useState)(0),{phase:eR,startImport:eT}=function(e){let[s,a]=(0,t.useState)("idle");return(0,t.useEffect)(()=>{let s=window.location.search;if(null===(0,u.importedBotId)(s))return;let t=new URL(window.location.href);t.searchParams.delete(u.IMPORT_RETURN_QUERY),window.history.replaceState(null,"",t.pathname+t.search);let n=!1;return(0,u.resolveImportReturn)(s,e,async e=>(await fetch(`/api/bots/${encodeURIComponent(e)}/config`,{cache:"no-store"})).ok).then(e=>{n||("open"===e.kind?window.location.replace(e.path):"missing"===e.kind&&a("missing"))}),()=>{n=!0}},[e]),{phase:s,startImport:async function(){a("checking");try{let e=await fetch(u.HANDOFF_STATUS_PATH,{cache:"no-store"}),s=await e.json().catch(()=>null);if(!e.ok)return void a("failed");if(s?.configured!==!0)return void a("unavailable");a("redirecting"),window.location.href=(0,u.handoffStartPath)(window.location.origin,window.location.pathname),setTimeout(()=>a(e=>"redirecting"===e?"idle":e),4e3)}catch{a("failed")}}}}(N);function eD(){E(!0),T(!1),$(e=>e+1)}(0,t.useEffect)(()=>{if(!N)return;let e=!1;return fetch(`/api/bots/${encodeURIComponent(N)}/sessions?status=all`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(s=>{e||ex((s?.sessions??[]).map(e=>({ref:e.ref,title:e.title,status:e.status})))}).catch(()=>{e||ex([])}),()=>{e=!0}},[N,P]),(0,t.useEffect)(()=>{if(!N)return;let e=!1;return fetch(`/api/bots/${encodeURIComponent(N)}/config`).then(async s=>{if(e)return;if(404===s.status){I(!0),_(null);return}if(!s.ok)throw Error("request failed");let t=await s.json();e||(_(t),O(t.bot.description??""),I(!1),T(!1))}).catch(()=>{e||T(!0)}).finally(()=>{e||E(!1)}),()=>{e=!0}},[N,P]);let eI=C?.bot.description??"",eP=null!==U&&U!==eI,e$=C?.skill.content??"",eU=V&&Y!==e$,eO=C?(0,c.registrationFormFromBot)(C.bot):null,eF=en&&null!==ei&&JSON.stringify(ei)!==JSON.stringify(eO),eH=C?.bot.avatar_config??(0,g.resolveAvatar)(C?.bot??{}),eL=ey??eH,eq=null!==ey&&JSON.stringify(ey)!==JSON.stringify(eH),eB=eP||eU||eF||eq;function eM(e,s){y(s).then(s=>{s&&(ea(e),setTimeout(()=>ea(s=>s===e?"":s),2e3))})}async function eV(){if(C&&null!==U){H("saving"),q("");try{let e=await fetch("/api/bots",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:C.bot.id,description:U})});if(!e.ok){let s="request failed";try{let t=await e.json();t.error&&(s=t.error)}catch{}throw Error(s)}let s=await fetch(`/api/bots/${encodeURIComponent(N)}/config`);if(!s.ok)throw Error("request failed");_(await s.json()),H("confirmed"),M(Date.now()),setTimeout(()=>{H(e=>"confirmed"===e?"clean":e)},5e3)}catch(e){H("error"),q(e instanceof Error?e.message:"request failed")}}}function eJ(){C&&(er((0,c.registrationFormFromBot)(C.bot)),el(!0),eo(!1),ep("clean"),eN(""),"agent_deck"===C.bot.launch_profile&&ef(),eh.retry())}function eY(){el(!1),er(null),ep("clean"),eN("")}function ez(e){ek({...ey??eH,...e}),eS("clean"),e_("")}async function eK(){if(C&&ey){eS("saving"),e_("");try{let e=await fetch("/api/bots",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:C.bot.id,avatar:ey})});if(!e.ok){let s="request failed";try{let t=await e.json();t.error&&(s=t.error)}catch{}throw Error(s)}let s=await fetch(`/api/bots/${encodeURIComponent(N)}/config`);if(!s.ok)throw Error("request failed");_(await s.json()),ek(null),eS("confirmed"),eE(Date.now()),setTimeout(()=>{eS(e=>"confirmed"===e?"clean":e)},5e3)}catch(e){eS("error"),e_(e instanceof Error?e.message:"request failed")}}}async function eW(){if(C&&ei){if((0,c.hasRegistrationErrors)((0,c.registrationFormView)(ei,em,eh.state))){eo(!0),ep("error"),eN(p);return}ep("saving"),eN("");try{let e=await fetch("/api/bots",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify((0,c.registrationPatchBody)(C.bot.id,ei))});if(!e.ok){let s="request failed";try{let t=await e.json();t.error&&(s=t.error)}catch{}throw Error(s)}let s=await fetch(`/api/bots/${encodeURIComponent(N)}/config`);if(!s.ok)throw Error("request failed");_(await s.json()),el(!1),er(null),ep("confirmed"),ev(Date.now()),setTimeout(()=>{ep(e=>"confirmed"===e?"clean":e)},5e3)}catch(e){ep("error"),eN(e instanceof Error?e.message:"request failed")}}}function eG(){z(C?.skill.content??""),J(!0),W("clean"),Q("")}async function eQ(){if(C&&(Y.trim()||window.confirm("Delete this skill file?"))){W("saving"),Q("");try{let e=await fetch(`/api/bots/${encodeURIComponent(N)}/skill`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:Y})});if(!e.ok){let s="request failed";try{let t=await e.json();t.error&&(s=t.error)}catch{}throw Error(s)}let s=await e.json();_(e=>e?{...e,skill:s.skill,currentHash:s.currentHash}:e),J(!1),W("confirmed"),X(Date.now()),setTimeout(()=>{W(e=>"confirmed"===e?"clean":e)},5e3)}catch(e){W("error"),Q(e instanceof Error?e.message:"request failed")}}}if((0,t.useEffect)(()=>{if(!eB)return;let e=e=>{e.preventDefault()};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[eB]),D)return(0,s.jsx)("div",{className:"cfg-page flex items-center justify-center",children:(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("p",{className:"mb-4",children:"Agent not found."}),(0,s.jsx)(a.default,{href:"/",className:"cfg-link",children:"← Back to chat"})]})});if(A&&!C)return(0,s.jsx)("div",{className:"cfg-page",children:(0,s.jsxs)("div",{className:"max-w-6xl mx-auto space-y-6",children:[(0,s.jsx)("div",{className:"h-6 w-32 rounded animate-pulse cfg-skel"}),(0,s.jsx)("div",{className:"h-20 rounded-lg animate-pulse cfg-skel"}),(0,s.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,s.jsx)("div",{className:"space-y-6",children:[0,1,2].map(e=>(0,s.jsx)("div",{className:"h-48 rounded-lg animate-pulse cfg-skel"},e))}),(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)("div",{className:"h-64 rounded-lg animate-pulse cfg-skel"}),(0,s.jsx)("div",{className:"h-80 rounded-lg animate-pulse cfg-skel"})]})]})]})});if(R&&!C)return(0,s.jsx)("div",{className:"cfg-page",children:(0,s.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,s.jsx)(a.default,{href:"/",className:"cfg-link cfg-back text-sm",children:"← Back to chat"}),(0,s.jsxs)("header",{className:"mt-3 mb-6 flex flex-wrap items-center gap-4",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h1",{className:"text-xl font-bold truncate",children:"Agent configuration"}),(0,s.jsx)("p",{className:"text-sm cfg-faint truncate",children:"Couldn't load agent details."})]}),(0,s.jsxs)("div",{className:"ml-auto text-right",children:[(0,s.jsxs)("p",{className:"text-sm cfg-muted",children:["Current config hash: ",(0,s.jsx)("code",{className:"cfg-code",children:"—"})]}),(0,s.jsx)("p",{className:"text-sm mt-1",children:(0,s.jsx)("span",{className:"cfg-faint",children:"○ Not loaded"})})]})]}),(0,s.jsx)("div",{className:"grid gap-6 lg:grid-cols-2 items-start",children:[["Skills","Rules","Agent","Template source"],["Launch snapshots","Avatar"]].map(e=>(0,s.jsx)("div",{className:"min-w-0 space-y-6",children:e.map(e=>(0,s.jsxs)("div",{className:"cfg-card",children:[(0,s.jsx)("h2",{className:"cfg-title mb-2",children:e}),(0,s.jsxs)("p",{className:"text-sm cfg-muted",children:["Couldn't load this section."," ",(0,s.jsx)("button",{onClick:eD,className:"cfg-link",children:"Retry"})]})]},e))},e[0]))})]})});if(!C)return null;let{bot:eZ,skill:eX,currentHash:e0,snapshots:e1}=C,e2=!!(eZ.source_provider||eZ.template_id||eZ.template_url||eZ.import_schema_version||eZ.import_operation_id),e3="saving"===F?(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saving…"}):eP||"error"===F?(0,s.jsxs)("span",{className:"text-sm cfg-dirty",children:[(0,s.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):"confirmed"===F?(0,s.jsxs)("span",{className:"text-sm cfg-faint",children:["Saved ",v(B)]}):(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saved"}),e4="saving"===K?(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saving…"}):eU||"error"===K?(0,s.jsxs)("span",{className:"text-sm cfg-dirty",children:[(0,s.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):"confirmed"===K?(0,s.jsxs)("span",{className:"text-sm cfg-faint",children:["Saved ",v(Z)]}):(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saved"}),e6="saving"===eg?(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saving…"}):eF||"error"===eg?(0,s.jsxs)("span",{className:"text-sm cfg-dirty",children:[(0,s.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):"confirmed"===eg?(0,s.jsxs)("span",{className:"text-sm cfg-faint",children:["Saved ",v(eb)]}):(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saved"}),e8="saving"===ew?(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saving…"}):eq||"error"===ew?(0,s.jsxs)("span",{className:"text-sm cfg-dirty",children:[(0,s.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):"confirmed"===ew?(0,s.jsxs)("span",{className:"text-sm cfg-faint",children:["Saved ",v(eA)]}):(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saved"});return(0,s.jsxs)("div",{className:"cfg-page",children:[(0,s.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,s.jsx)(a.default,{href:"/",onClick:function(e){eB&&!window.confirm("You have unsaved changes. Leave without saving?")&&e.preventDefault()},className:"cfg-link cfg-back text-sm",children:"← Back to chat"}),(0,s.jsxs)("header",{className:"mt-3 mb-6 flex flex-wrap items-center gap-4",children:[(0,s.jsx)(f.default,{bot:eZ,size:48,title:`${eZ.name} avatar`}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h1",{className:"text-xl font-bold truncate",children:eZ.name}),(0,s.jsx)("p",{className:"text-sm cfg-faint truncate",children:eZ.title||" "})]}),(0,s.jsxs)("div",{className:"ml-auto text-right",children:[(0,s.jsxs)("p",{className:"text-sm cfg-muted",children:["Current config hash:"," ",(0,s.jsx)("code",{className:"cfg-code",title:e0,children:e0.slice(0,8)})," ",(0,s.jsx)("button",{onClick:()=>eM("header",e0),className:"cfg-link text-sm",children:"header"===et?"Copied":"Copy"})]}),(0,s.jsx)("p",{className:"text-sm mt-1",children:eB?(0,s.jsxs)("span",{className:"cfg-dirty",children:[(0,s.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):(0,s.jsx)("span",{className:"cfg-faint",children:"● Saved"})})]})]}),(0,s.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2 items-start","data-cfg-layout":"columns",children:[(0,s.jsxs)("div",{className:"min-w-0 space-y-6","data-cfg-column":"primary",children:[(0,s.jsxs)("section",{className:"cfg-card",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("h2",{className:"cfg-title",children:"Skills"}),e4]}),"unsupported"===eX.status?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"text-sm cfg-muted mb-3",children:"Unsupported name"}),(0,s.jsx)("p",{className:"text-sm cfg-muted",children:"Skill files need an agent name matching /^[A-Za-z0-9_-]+$/ — this name cannot map to a skill path."})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{className:"text-sm cfg-muted mb-3",children:[eX.path," · ","present"===eX.status?"Present":"Not present"]}),V?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("textarea",{value:Y,onChange:e=>z(e.target.value),rows:8,className:"cfg-input text-sm"}),"error"===K&&(0,s.jsxs)("p",{className:"mt-2 text-sm cfg-error",children:["Couldn't save: ",G,"."," ",(0,s.jsx)("button",{onClick:eQ,className:"underline hover:no-underline",children:"Retry"})]}),(0,s.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,s.jsx)("button",{onClick:eQ,disabled:!eU||"saving"===K,className:"flex-1 sm:flex-none cfg-btn-primary text-sm",children:"saving"===K?"Saving…":"Save"}),(0,s.jsx)("button",{onClick:function(){J(!1),W("clean"),Q("")},disabled:!eU||"saving"===K,className:"flex-1 sm:flex-none cfg-btn-ghost text-sm",children:"Discard"})]})]}):"present"===eX.status?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("pre",{className:"text-sm cfg-pre max-h-64 overflow-y-auto",children:eX.content}),(0,s.jsx)("button",{onClick:eG,className:"mt-3 cfg-btn-ghost text-sm w-full sm:w-auto",children:"Edit"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"text-sm cfg-muted",children:"No skill file yet. Create SKILL.md to give this agent standing instructions."}),(0,s.jsx)("button",{onClick:eG,className:"mt-3 cfg-btn-ghost text-sm w-full sm:w-auto",children:"Create"})]}),(0,s.jsx)("p",{className:"mt-3 text-xs cfg-faint",children:"Appended verbatim as a system message at launch."})]})]}),(0,s.jsxs)("section",{className:"cfg-card",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("h2",{className:"cfg-title",children:"Rules"}),e3]}),(0,s.jsx)("textarea",{value:U??"",onChange:e=>O(e.target.value),rows:8,className:"cfg-input cfg-input-sans text-sm"}),(0,s.jsx)("p",{className:"mt-2 text-xs cfg-faint",children:"Sent verbatim as the standing-rules system message on every turn. This beats the user's request for detail or length."}),"error"===F&&(0,s.jsxs)("p",{className:"mt-2 text-sm cfg-error",children:["Couldn't save: ",L,"."," ",(0,s.jsx)("button",{onClick:eV,className:"underline hover:no-underline",children:"Retry"})]}),(0,s.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,s.jsx)("button",{onClick:eV,disabled:!eP||"saving"===F,className:"flex-1 sm:flex-none cfg-btn-primary text-sm",children:"saving"===F?"Saving…":"Save"}),(0,s.jsx)("button",{onClick:function(){O(eI),H("clean"),q("")},disabled:!eP||"saving"===F,className:"flex-1 sm:flex-none cfg-btn-ghost text-sm",children:"Discard"})]})]}),(0,s.jsxs)("section",{className:"cfg-card",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("h2",{className:"cfg-title",children:"Agent"}),e6]}),(()=>{if(!en||!ei){let e=(0,c.registrationReadView)(eZ,"agent_deck"===eZ.launch_profile?em:null,eu);return(0,s.jsxs)("div",{"data-field":"runtime-read",children:[(0,s.jsx)("dl",{className:"text-sm",children:e.rows.map(e=>(0,s.jsxs)("div",{"data-row":e.key,className:"flex flex-col sm:flex-row sm:justify-between gap-x-4 py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:e.label}),(0,s.jsx)("dd",{className:"sm:text-right break-words cfg-muted",children:e.value})]},e.key))}),e.notices.map(e=>(0,s.jsxs)("p",{className:"text-sm cfg-dirty mt-2",children:[e," ",/Settings/.test(e)?(0,s.jsx)(a.default,{href:"/settings",className:"cfg-link",children:"Open Settings"}):null]},e)),(0,s.jsx)("button",{onClick:eJ,className:"mt-3 cfg-btn-ghost text-sm w-full sm:w-auto",children:"Edit"})]})}let e=(0,c.registrationFormView)(ei,em,eh.state),t="agent_deck"!==eZ.launch_profile||(0,r.isMigratedPending)(eZ)?null:eZ.deck_id;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.RegistrationFields,{idPrefix:"cfg",variant:"config",form:ei,onChange:e=>{"agent_deck"===e.launchProfile&&"agent_deck"!==ei.launchProfile&&ef(),er(s=>s?{...s,...e}:s),eN(""),ep(e=>"error"===e?"clean":e)},view:e,showErrors:ec,connections:eh.state,onRetryConnections:eh.retry,onAddConnection:eh.add,deckState:em,onRetryDecks:ef,savedDeckId:t,workdirPlaceholder:(0,r.defaultWorkdirFor)(eZ.id),workdirHint:(0,r.configWorkdirHint)(eZ.id),sessions:eu,includeHomeSession:!0}),"error"===eg&&(0,s.jsxs)("p",{className:"mt-2 text-sm cfg-error",role:"alert",children:[ej===p?ej:`Couldn't save: ${ej}.`," ",ej===p?null:(0,s.jsx)("button",{onClick:eW,className:"underline hover:no-underline",children:"Retry"})]}),(0,s.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,s.jsx)("button",{onClick:eW,disabled:!eF||"saving"===eg||e.submitDisabled,className:"flex-1 sm:flex-none cfg-btn-primary text-sm",children:"saving"===eg?"Saving…":"Save"}),(0,s.jsx)("button",{onClick:eY,disabled:"saving"===eg,className:"flex-1 sm:flex-none cfg-btn-ghost text-sm",children:eF?"Discard":"Cancel"})]})]})})()]}),(0,s.jsxs)("section",{className:"cfg-card",children:[(0,s.jsx)("h2",{className:"cfg-title mb-3",children:"Template source"}),!e2&&(0,s.jsx)("p",{className:"text-sm cfg-muted mb-3",children:"Created manually in Botmancers — no template source."}),(0,s.jsxs)("dl",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:"Source provider"}),(0,s.jsx)("dd",{className:"text-right",children:eZ.source_provider??"—"})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:"Template ID"}),(0,s.jsx)("dd",{className:"text-right",children:eZ.template_id??"—"})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:"Template URL"}),(0,s.jsx)("dd",{className:"text-right break-all",children:eZ.template_url?(e=eZ.template_url).startsWith("http://")||e.startsWith("https://")?(0,s.jsx)("a",{href:eZ.template_url,className:"cfg-link",children:eZ.template_url}):eZ.template_url:"—"})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:"Import schema version"}),(0,s.jsx)("dd",{className:"text-right",children:eZ.import_schema_version??"—"})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:"Import operation ID"}),(0,s.jsx)("dd",{className:"text-right break-all",children:eZ.import_operation_id??"—"})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-y cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:"Imported at"}),(0,s.jsx)("dd",{className:"text-right",children:eZ.import_timestamp?b(eZ.import_timestamp):"—"})]})]}),(0,s.jsx)(x,{phase:eR,onImport:()=>{eT()}})]})]}),(0,s.jsxs)("div",{className:"min-w-0 space-y-6","data-cfg-column":"secondary",children:[(0,s.jsxs)("section",{className:"cfg-card",children:[(0,s.jsx)("h2",{className:"cfg-title mb-3",children:"Launch snapshots"}),0===e1.length?(0,s.jsx)("p",{className:"text-sm cfg-muted",children:"No launches recorded yet."}):(0,s.jsx)("ul",{className:"space-y-3",children:e1.map(e=>{let t=e.hash===e0,a=!!ee[e.id];return(0,s.jsxs)("li",{className:"cfg-row",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsxs)("p",{className:"text-sm",children:[b(e.created_at)," · ",e.id.slice(0,4),e.transport?` \xb7 ${e.transport}`:null]}),(0,s.jsx)("button",{onClick:()=>es(s=>({...s,[e.id]:!s[e.id]})),"aria-label":a?"Collapse snapshot detail":"Expand snapshot detail",className:"cfg-chevron px-1",children:a?"▾":"▸"})]}),(0,s.jsxs)("p",{className:"mt-1 text-sm",children:[(0,s.jsx)("code",{className:"cfg-code",children:e.hash.slice(0,12)})," ",(0,s.jsx)("button",{onClick:()=>eM(e.id,e.hash),className:"cfg-link text-sm",children:et===e.id?"Copied":"Copy"})]}),(0,s.jsx)("p",{className:"mt-1 text-sm",children:t?(0,s.jsx)("span",{className:"cfg-ok",children:"● Matches current config"}):(0,s.jsx)("span",{className:"cfg-faint",children:"○ Config changed since"})}),a&&(0,s.jsxs)("div",{className:"mt-3 pt-3 border-t cfg-line text-sm",children:[(0,s.jsxs)("p",{className:"cfg-muted break-all",children:[(0,s.jsx)("span",{className:"font-medium",children:"Launch ID:"})," ",e.id]}),(0,s.jsxs)("p",{className:"mt-1 cfg-muted break-all",children:[(0,s.jsx)("span",{className:"font-medium",children:"Hash:"})," ",(0,s.jsx)("code",{className:"cfg-code",children:e.hash})]}),(0,s.jsx)("dl",{className:"mt-2",children:j.map(t=>{let a=e.snapshot[t.key];return(0,s.jsxs)("div",{className:"py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:t.label}),(0,s.jsx)("dd",{className:"whitespace-pre-wrap break-words",children:null==a?(0,s.jsx)("span",{className:"cfg-faint",children:"null"}):Array.isArray(a)?0===a.length?(0,s.jsx)("span",{className:"cfg-faint",children:"(none)"}):(0,s.jsx)("span",{className:"block max-h-32 overflow-y-auto",children:a.map(e=>`- ${e}`).join("\n")}):"boolean"==typeof a?String(a):""===a?(0,s.jsx)("span",{className:"cfg-faint",children:"(empty)"}):(0,s.jsx)("span",{className:"block max-h-32 overflow-y-auto",children:a})})]},t.key)})})]})]},e.id)})})]}),(0,s.jsxs)("section",{className:"cfg-card",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("h2",{className:"cfg-title",children:"Avatar"}),e8]}),(0,s.jsxs)("div",{className:"flex items-center gap-4 mb-4",children:[(0,s.jsx)(f.default,{config:eL,size:96,title:"Avatar live preview"}),(0,s.jsx)("p",{className:"text-sm cfg-muted",children:"Outline style: the color is the line color, nothing is filled. Pick an option to preview, then Save."})]}),(0,s.jsx)(h,{attribute:"color",label:"Color",options:g.AVATAR_COLORS,current:eL,onPick:ez,className:"mb-3"}),(0,s.jsx)(h,{attribute:"eyes",label:"Eyes",options:g.AVATAR_EYES,current:eL,onPick:ez,className:"mb-3"}),(0,s.jsx)(h,{attribute:"hands",label:"Hands",options:g.AVATAR_HANDS,current:eL,onPick:ez,className:"mb-3"}),(0,s.jsx)(h,{attribute:"accessory",label:"Accessory",options:g.AVATAR_ACCESSORIES,current:eL,onPick:ez}),"error"===ew&&(0,s.jsxs)("p",{className:"mt-2 text-sm cfg-error",children:["Couldn't save: ",eC,"."," ",(0,s.jsx)("button",{onClick:eK,className:"underline hover:no-underline",children:"Retry"})]}),(0,s.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,s.jsx)("button",{onClick:eK,disabled:!eq||"saving"===ew,className:"flex-1 sm:flex-none cfg-btn-primary text-sm",children:"saving"===ew?"Saving…":"Save"}),(0,s.jsx)("button",{onClick:function(){ek(null),eS("clean"),e_("")},disabled:!eq||"saving"===ew,className:"flex-1 sm:flex-none cfg-btn-ghost text-sm",children:"Discard"})]})]}),(0,s.jsxs)("section",{className:"cfg-card cfg-danger","aria-labelledby":"cfg-danger-title",children:[(0,s.jsx)("h2",{id:"cfg-danger-title",className:"cfg-title mb-3",children:"Danger zone"}),(0,s.jsx)("p",{className:"text-sm cfg-muted",children:i.DELETE_REMOVES_COPY}),(0,s.jsx)("p",{className:"text-sm cfg-faint mt-2",children:i.DELETE_KEEPS_COPY}),(0,s.jsx)("button",{type:"button",onClick:()=>S(!0),className:"mt-3 delete-btn text-sm w-full sm:w-auto",children:"Delete agent"})]})]})]})]}),w?(0,s.jsx)(l.default,{ids:[eZ.id],onCancel:()=>S(!1),onDeleted:e=>k.push(`/?deleted=${Math.max(e.length,1)}`)}):null]})}],13978)},18566,(e,s,t)=>{s.exports=e.r(76562)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13255,63352,50814,e=>{"use strict";var t=e.i(43476),n=e.i(71645),a=e.i(22016);function r(e){return`${new Date(e).toISOString().slice(0,16).replace("T"," ")} UTC`}let s="Not reported";function i(e){return e.toFixed(1).replace(/\.0$/,"")}function l(e){return e.toLocaleString("en-US")}function o(e){return 0===e?"$0.00":e>=.01?`$${e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`:e<1e-4?"<$0.0001":`$${e.toFixed(4)}`}let c={input_tokens:"Input tokens",output_tokens:"Output tokens",cost_usd:"Cost"};function u(e,t,n){return"cost_usd"===e?o(t):n?l(t):t<1e3?String(t):t<999950?`${i(t/1e3)}k`:t<99995e4?`${i(t/1e6)}M`:`${i(t/1e9)}B`}function d(e){return`${e} ${1===e?"run":"runs"}`}function h(e,t,n=!1){let a=c[e];if(!t||"unavailable"===t.quality||null===t.sum)return{name:a,text:s,quality:"unavailable",coverage:t&&t.total>0?`0 of ${d(t.total)} reported`:"No runs recorded",label:`${a}: not reported`};let r=u(e,t.sum,n),i=u(e,t.sum,!0);return"partial"===t.quality?{name:a,text:r,quality:"partial",coverage:`Partial: ${t.known} of ${d(t.total)} reported`,label:`${a}: at least ${i}, partial, reported by ${t.known} of ${d(t.total)}`}:{name:a,text:r,quality:"complete",coverage:`All ${d(t.total)} reported`,label:`${a}: ${i}, reported by all ${d(t.total)}`}}e.s(["SESSION_FILTER_OPTIONS",0,[{value:"all",label:"All"},{value:"active",label:"Active"},{value:"ended",label:"Ended"}],"attemptLabel",0,function(e){let t="source"===e.role?"Started the session":"Resumed the session";return`${t} \xb7 ${e.outcome??"running"}`},"emptySessionsCopy",0,function(e,t){return"active"===e?`${t} has no active sessions.`:"ended"===e?`${t} has no ended sessions.`:`${t} has no sessions yet. One appears after a coding run keeps its runtime context.`},"formatSessionDate",0,r,"runtimeLabel",0,function(e){return e.agent.transport?`${e.agent.adapter} \xb7 ${e.agent.transport}`:e.agent.adapter},"sessionStateTags",0,function(e){let t=[];return(e.home&&t.push("Home"),e.state?.availability==="missing")?[...t,"Missing"]:(e.state?.lifecycle==="archived"&&t.push("Archived"),e.state?.busy&&t.push("Busy"),(e.resumable||e.state?.resumable===!0)&&t.push("Resumable"),t)},"sessionUsageLine",0,function(e){let t=h("input_tokens",e?.input_tokens),n=h("output_tokens",e?.output_tokens),a=h("cost_usd",e?.cost_usd),r=[t,n,a];if(r.every(e=>"unavailable"===e.quality))return{text:s,label:"Usage: not reported",quality:"unavailable",partial:!1};let i=["unavailable"===t.quality?"input not reported":`${t.text} in`,"unavailable"===n.quality?"output not reported":`${n.text} out`,"unavailable"===a.quality?"cost not reported":a.text].join(" · "),l=r.some(e=>"partial"===e.quality),o=l||r.some(e=>"unavailable"===e.quality)?"partial":"complete";return{text:i,label:`Reported usage: ${r.map(e=>e.label).join("; ")}`,quality:o,partial:l}},"statusLabel",0,function(e){return"active"===e.status?"Active":"Ended"},"usageMetricView",0,h,"usageSampleLabel",0,function(e,t){let n="turn"===e.kind?"start"===e.turn_kind?"provider turn, started":"provider turn":"resume"===e.turn_kind?"resumed":"started";return`Run ${t+1} \xb7 ${n}`},"usageSampleValues",0,function(e){return{input:null===e.input_tokens?s:l(e.input_tokens),output:null===e.output_tokens?s:l(e.output_tokens),cost:null===e.cost_usd?s:o(e.cost_usd)}},"workRequestLabel",0,function(e){var t;let n=e.origin.work_request;return n?`${(t=n.execution_kind)?t[0].toUpperCase()+t.slice(1):t} \xb7 ${n.state}`:null}],63352);let f={ask:"Ask from this context",resume:"Resume work here",handoff:"Hand off to…"},g=["queued","extracting","delivering","completed","failed","cancelled"],p=["completed","failed","cancelled"];function m(e){return"ask"===e?"Ask":"Continue"}function x(e,t){switch(t){case"queued":return"Queued";case"extracting":return"ask"===e?"Asking the session":"Extracting handoff";case"delivering":return"Delivering handoff";case"completed":return"ask"===e?"Answered":"Handed off";case"failed":return"Failed";case"cancelled":return"Cancelled"}}function b(e){var t;return e.cancel_requested&&(t=e.state,!p.includes(t))?"Cancelling…":x(e.mode,e.state)}function v(e){return"completed"===e?"done":"failed"===e||"cancelled"===e?"stopped":"active"}function y(e,t=140){let n=String(e??"").split("\n").map(e=>e.trim()).filter(e=>e.length>0).join(" ");return n.length>t?`${n.slice(0,t-1).trimEnd()}…`:n}function _(e){return r(e)}function j(e){return`${e.source.agent_name}'s session “${e.source.session_title}”`}function w(e){return"ask"===e.mode?`You → ${e.source.agent_name}`:`${e.source.agent_name} → ${e.destination?.agent_name??"another Agent"}`}function N(e){return"ask"===e?"Question":"Objective"}function k(e){if("completed"===e.state){if("ask"===e.mode){let t=e.origin?.label??"the origin thread";return e.outcome.answer?`Answer in ${t}: ${y(e.outcome.answer,200)}`:`Answered in ${t}.`}let t=e.destination?.agent_name??"The destination Agent";return e.outcome.reply?`${t} picked it up in a new session: ${y(e.outcome.reply,200)}`:`${t} picked it up in a new session.`}return"failed"===e.state?e.failure?.message||"The exchange failed.":"cancelled"===e.state?"Cancelled before it finished. Nothing more will run.":null}function $(e){if("failed"!==e.state)return null;switch(e.failure?.code){case"packet_invalid":case"packet_missing":return"The source session did not return a usable handoff. Start a new Continue with a clearer objective.";case"destination_session_invalid":return"The destination did not start a fresh session. Check its runtime, then start a new Continue.";case"destination_turn_failed":return"Check the destination Agent’s runtime, then start a new Continue from the source session.";case"source_turn_failed":return"Check the source Agent’s runtime, then start a new exchange from its Sessions.";default:return"Start a new exchange from the session to try again."}}function S(e){return`/exchanges?id=${encodeURIComponent(e)}`}function C(e,t){return t.updated_at-e.updated_at||t.created_at-e.created_at||(e.id<t.id?-1:+(e.id>t.id))}e.s(["DEFAULT_LEDGER_FILTER",0,{mode:"all",state:"all",agentId:""},"INSTRUCTION_LIMIT",0,4e3,"MODE_FILTER_OPTIONS",0,[{value:"all",label:"All"},{value:"ask",label:"Ask"},{value:"continue",label:"Continue"}],"STATE_FILTER_OPTIONS",0,[{value:"all",label:"Any status"},{value:"active",label:"In progress"},{value:"queued",label:"Queued"},{value:"extracting",label:"Asking / extracting"},{value:"delivering",label:"Delivering"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"},{value:"cancelled",label:"Cancelled"}],"detailsHref",0,S,"eventLabel",0,function(e,t){let n=e.data??{},a=t.source.agent_name,r=t.destination?.agent_name??"the destination Agent",s="string"==typeof n.hop?n.hop:null;switch(e.type){case"created":return"ask"===t.mode?`You asked ${a}'s session a question`:`You handed ${a}'s session to ${r}`;case"hop_queued":if("deliver"===s)return`Handoff queued for ${r}'s new session`;return"extract"===s?`Handoff extraction queued in ${a}'s session`:`Question queued for ${a}'s session`;case"hop_started":if("deliver"===s)return`${r} started a new session`;return"extract"===s?`${a}'s session started extracting the handoff`:`${a}'s session started answering`;case"state_changed":{let e="string"==typeof n.to&&g.includes(n.to)?n.to:null;return e?`Now ${x(t.mode,e).toLowerCase()}`:"State changed"}case"answer_returned":return`Answer returned to ${t.origin?.label??"the origin thread"}${n.truncated?" (shortened)":""}`;case"packet_extracted":return"Handoff packet extracted";case"packet_rejected":return`Handoff packet refused${"string"==typeof n.reason?`: ${n.reason}`:""}`;case"destination_replied":return`${r} replied in ${t.destination?.conversation?.label??"its thread"}`;case"destination_session_rejected":return`${r}'s session was not new; the handoff stopped`;case"cancel_requested":return"You asked to cancel";case"hop_result_discarded":return"A late result was discarded";default:return e.type.replace(/_/g," ")}},"excerpt",0,y,"exchangeRequestBody",0,function(e,t,n){let a={mode:e.mode,idempotency_key:n,origin_conversation_id:e.originConversationId,source:{agent_id:t.agentId,session_ref:t.sessionRef},instruction:e.instruction.trim()};return"continue"===e.mode&&(a.destination={agent_id:e.destinationAgentId}),a},"failureAdvice",0,$,"formatExchangeTime",0,_,"instructionHeading",0,N,"ledgerAgents",0,function(e){let t=new Map;for(let n of e)t.set(n.source.agent_id,n.source.agent_name),n.destination&&t.set(n.destination.agent_id,n.destination.agent_name);return[...t.entries()].map(([e,t])=>({id:e,name:t})).sort((e,t)=>e.name.localeCompare(t.name)||e.id.localeCompare(t.id))},"ledgerRows",0,function(e,t){return e.filter(e=>("all"===t.mode||e.mode===t.mode)&&("active"!==t.state||!e.terminal)&&("all"===t.state||"active"===t.state||e.state===t.state)&&(!t.agentId||e.source.agent_id===t.agentId||e.destination?.agent_id===t.agentId)).sort(C)},"ledgerView",0,function(e,t,n){return null===e?t?"error":"loading":0===e.length?"empty":0===n.length?"filtered-out":"rows"},"linkRoleLabel",0,function(e){let t={origin:"Started here",source:"Source session",destination:"Destination"};return e.map(e=>t[e]).join(" · ")},"liveStateLabel",0,b,"modeLabel",0,m,"outcomeLine",0,k,"participantsLabel",0,w,"pinRequestBody",0,function(e,t,n,a,r){return{action:e,content:t.trim(),conversation_id:n,idempotency_key:r,..."resume"===e?{approve_write:a}:{}}},"sessionDialogMode",0,function(e){return"handoff"===e?"continue":e},"sessionDialogTitle",0,function(e){return f["continue"===e?"handoff":e]},"sessionDialogUsesPin",0,function(e,t){return"resume"===e||"ask"===e&&"provider"===t},"sessionLabel",0,j,"sessionRowActions",0,function(e){let t;if(e.actions)t=e.actions;else{let n="ended"===e.status?{available:!1,reason:"Ask from this context and Hand off to… are unavailable: this session has ended. Its history stays here."}:e.resumable?{available:!0}:{available:!1,reason:`Ask from this context and Hand off to… are unavailable: Botmancers can’t resume this session under ${e.agent.name}’s current runtime.`},a=n.available?{available:!0}:{available:!1,code:"ended"===e.status?"session_ended":"session_not_resumable",reason:n.reason,recovery:"choose_session"};t={ask:a,resume:{available:!1,code:"action_unavailable",reason:`${f.resume} is unavailable: this runtime can’t resume a session with edits.`,recovery:"choose_action"},handoff:a}}return["ask","resume","handoff"].map(e=>({action:e,label:f[e],availability:t[e]}))},"stateTone",0,v,"submitErrorMessage",0,function(e,t){switch(e){case"session_ended":return"This session has ended and can’t be resumed.";case"session_not_resumable":return"Botmancers can’t resume this session under the Agent’s current runtime.";case"source_session_busy":return"This session already has an exchange in progress. Wait for it or cancel it from its card.";case"agent_unavailable":return t||"That Agent has no Agent Deck selected.";case"idempotency_conflict":return"This request changed while it was being sent. Send again.";case"session_missing":return"The runtime no longer has this session. Its history stays here; choose another session.";case"approval_required":return"Resume work here needs your approval of edits. Tick the approval, then send again.";case"authority_not_allowed":return t||"This Agent’s policy doesn’t allow edits in a resumed session. Change it in Config.";case"action_unavailable":return t||"This runtime can’t do that in this session. Choose another action.";case"provider_failed":return"The runtime failed this turn. Nothing moved to another session; try again later.";default:return t||"The exchange could not be started. Your draft is kept; try again."}},"threadHref",0,function(e,t){let n=new URLSearchParams;if(e.thread_agent_id)return n.set("agent",e.thread_agent_id),t&&n.set("exchange",t),`/?${n.toString()}`;if("group"!==e.kind)return null;t&&n.set("exchange",t);let a=n.toString();return`/threads/${encodeURIComponent(e.id)}${a?`?${a}`:""}`},"validateDraft",0,function(e){let t={},n=e.instruction.trim(),a="ask"===e.mode?"a question":"an objective";return n?e.instruction.length>4e3&&(t.instruction="Keep it under 4000 characters."):t.instruction=`Enter ${a}.`,e.originConversationId||(t.origin="Choose the thread that follows this exchange."),"continue"!==e.mode||e.destinationAgentId||(t.destination="Choose the Agent who continues the work."),t},"validateResumeDraft",0,function(e,t){let n={};return e.trim()?e.length>4e3&&(n.instruction="Keep it under 4000 characters."):n.instruction="Enter what to work on.",t||(n.approval="Approve edits in this session to resume work here."),n}],50814),e.s(["default",0,function({summary:e,onChanged:r}){let[s,i]=(0,n.useState)(!1),[l,o]=(0,n.useState)(""),c=v(e.state),u=k(e),d=$(e),h=`exchange-${e.id}-title`,f=async()=>{if(!s){i(!0),o("");try{let t=await fetch(`/api/exchanges/${encodeURIComponent(e.id)}/cancel`,{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"});if(!t.ok){let e=await t.json().catch(()=>null);o("string"==typeof e?.error?.message?e.error.message:"Could not cancel. Try again.")}}catch{o("Could not cancel. Try again.")}finally{i(!1),r?.()}}};return(0,t.jsxs)("article",{id:`exchange-${e.id}`,className:`exchange-card is-${c} is-${e.state}`,"data-exchange-id":e.id,"data-exchange-state":e.state,"aria-labelledby":h,tabIndex:-1,children:[(0,t.jsxs)("p",{className:"exchange-card-line",children:[(0,t.jsx)("span",{className:"exchange-card-mode",children:m(e.mode)}),(0,t.jsx)("span",{id:h,className:"exchange-card-title",children:w(e)}),(0,t.jsx)("span",{className:"exchange-card-state",role:"status",children:b(e)})]}),(0,t.jsx)("p",{className:"exchange-card-session",children:j(e)}),(0,t.jsxs)("p",{className:"exchange-card-instruction",children:[(0,t.jsx)("span",{className:"exchange-card-key",children:N(e.mode)})," ",y(e.instruction,220)]}),u?(0,t.jsx)("p",{className:"failed"===e.state?"exchange-card-outcome is-failure":"exchange-card-outcome",children:u}):null,d?(0,t.jsx)("p",{className:"exchange-card-advice",children:d}):null,l?(0,t.jsx)("p",{className:"exchange-card-error",role:"alert",children:l}):null,(0,t.jsxs)("p",{className:"exchange-card-foot",children:[(0,t.jsxs)("span",{className:"exchange-card-time",children:["Updated ",_(e.updated_at)]}),(0,t.jsx)(a.default,{className:"exchange-card-link",href:S(e.id),"aria-label":`Details: ${m(e.mode)} ${w(e)}`,children:"Details"}),e.can_cancel?(0,t.jsx)("button",{type:"button",className:"exchange-card-cancel",disabled:s,onClick:()=>{f()},children:s?"Cancelling…":"Cancel"}):null]})]})}],13255)},87164,e=>{"use strict";var t=e.i(43476),n=e.i(71645),a=e.i(22016),r=e.i(13255),s=e.i(50814);let i="botmancers:exchanges-navigate";function l(e){return window.addEventListener("popstate",e),window.addEventListener(i,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(i,e)}}function o(){return new URLSearchParams(window.location.search).get("id")}function c({id:e,onBack:i,onChanged:l}){let[o,u]=(0,n.useState)(null),[d,h]=(0,n.useState)(""),[f,g]=(0,n.useState)(0),p=(0,n.useRef)(null),m=(0,n.useRef)(!1),x=(0,n.useId)();(0,n.useEffect)(()=>{let t=!1,n=()=>{fetch(`/api/exchanges/${encodeURIComponent(e)}`,{cache:"no-store"}).then(async e=>{let n=await e.json().catch(()=>null);if(!t){if(!e.ok||!n?.detail)return void h(404===e.status?"This exchange no longer exists.":"Could not load this exchange.");h(""),u(n.detail)}}).catch(()=>{t||h("Could not load this exchange.")})};n();let a=setInterval(n,2e3);return()=>{t=!0,clearInterval(a)}},[e,f]),(0,n.useEffect)(()=>{o&&!m.current&&(m.current=!0,p.current?.focus())},[o]);let b=(0,t.jsx)("button",{type:"button",className:"pin-word ledger-detail-back",onClick:i,children:"← All exchanges"});if(!o)return(0,t.jsxs)("div",{className:"ledger-detail",children:[b,d?(0,t.jsxs)("div",{role:"alert",className:"ledger-state",children:[(0,t.jsx)("p",{className:"delete-error",children:d}),(0,t.jsx)("button",{type:"button",className:"pin-word",onClick:()=>g(e=>e+1),children:"Retry"})]}):(0,t.jsx)("p",{className:"ledger-state",role:"status",children:"Loading exchange…"})]});let{summary:v,events:y,packet:_}=o;return(0,t.jsxs)("article",{className:"ledger-detail","aria-labelledby":x,"data-exchange-detail":v.id,children:[b,(0,t.jsxs)("h2",{id:x,ref:p,tabIndex:-1,className:"ledger-detail-title",children:[(0,s.modeLabel)(v.mode),": ",(0,s.participantsLabel)(v)]}),(0,t.jsx)(r.default,{summary:v,onChanged:()=>{g(e=>e+1),l()}}),(0,t.jsxs)("section",{className:"ledger-section","aria-label":(0,s.instructionHeading)(v.mode),children:[(0,t.jsx)("h3",{className:"ledger-section-title",children:(0,s.instructionHeading)(v.mode)}),(0,t.jsx)("p",{className:"ledger-text",children:v.instruction})]}),o.answer?(0,t.jsxs)("section",{className:"ledger-section","aria-label":"Answer",children:[(0,t.jsx)("h3",{className:"ledger-section-title",children:"Answer"}),(0,t.jsx)("p",{className:"ledger-text",children:o.answer})]}):null,_?(0,t.jsxs)("section",{className:"ledger-section","aria-label":"Handoff packet",children:[(0,t.jsx)("h3",{className:"ledger-section-title",children:"Handoff packet"}),(0,t.jsx)("p",{className:"ledger-text",children:_.objective}),[["Decisions",_.decisions],["Constraints",_.constraints],["Artifacts and references",_.artifacts],["Open questions",_.open_questions]].filter(([,e])=>e.length>0).map(([e,n])=>(0,t.jsxs)("div",{className:"ledger-packet-list",children:[(0,t.jsx)("h4",{className:"ledger-packet-title",children:e}),(0,t.jsx)("ul",{children:n.map((e,n)=>(0,t.jsx)("li",{children:e},n))})]},e))]}):null,(0,t.jsxs)("section",{className:"ledger-section","aria-label":"Linked threads",children:[(0,t.jsx)("h3",{className:"ledger-section-title",children:"Linked threads"}),(0,t.jsx)("ul",{className:"ledger-links",children:v.links.map(e=>{let n=(0,s.threadHref)(e,v.id);return(0,t.jsxs)("li",{children:[n?(0,t.jsx)(a.default,{className:"session-link ledger-thread-link",href:n,children:e.label}):(0,t.jsxs)("span",{children:[e.label,"agent_api"===e.kind?(0,t.jsx)("span",{className:"ledger-link-role",children:" (between Agents, not an owner thread)"}):null]}),(0,t.jsxs)("span",{className:"ledger-link-role",children:[" · ",(0,s.linkRoleLabel)(e.roles)]})]},e.id)})})]}),(0,t.jsxs)("section",{className:"ledger-section","aria-label":"Timeline",children:[(0,t.jsx)("h3",{className:"ledger-section-title",children:"Timeline"}),(0,t.jsx)("ol",{className:"ledger-timeline",children:y.map(e=>(0,t.jsxs)("li",{"data-event-type":e.type,children:[(0,t.jsx)("span",{className:"ledger-timeline-time",children:(0,s.formatExchangeTime)(e.at)}),(0,t.jsx)("span",{className:"ledger-timeline-text",children:(0,s.eventLabel)(e,v)})]},e.sequence))})]}),(0,t.jsxs)("p",{className:"ledger-foot",children:[(0,s.excerpt)(`${v.source.agent_name}’s session: ${v.source.session_title}`,200),v.destination?.session_title?` \xb7 ${v.destination.agent_name}’s new session: ${v.destination.session_title}`:""]})]})}e.s(["default",0,function(){let[e,r]=(0,n.useState)(null),[u,d]=(0,n.useState)(""),[h,f]=(0,n.useState)(0),[g,p]=(0,n.useState)(s.DEFAULT_LEDGER_FILTER),m=(0,n.useSyncExternalStore)(l,o,()=>null),x=(0,n.useId)(),b=(0,n.useId)(),v=(0,n.useId)(),y=(0,n.useRef)(null),_=(0,n.useRef)(null);(0,n.useEffect)(()=>{let e=_.current;if(_.current=m,m||!e)return;let t=document.querySelector(`.ledger-row[data-exchange-id="${CSS.escape(e)}"]`);(t??y.current)?.focus()},[m]),(0,n.useEffect)(()=>{let e=!1,t=()=>{fetch("/api/exchanges",{cache:"no-store"}).then(async t=>{let n=await t.json().catch(()=>null);if(!e){if(!t.ok||!Array.isArray(n?.exchanges))return void d("string"==typeof n?.error?.message?n.error.message:"Could not load exchanges.");d(""),r(n.exchanges)}}).catch(()=>{e||d("Could not load exchanges.")})};t();let n=setInterval(t,2e3);return()=>{e=!0,clearInterval(n)}},[h]);let j=e=>{window.history.pushState(null,"",e?`/exchanges?id=${encodeURIComponent(e)}`:"/exchanges"),window.dispatchEvent(new Event(i))},w=e?(0,s.ledgerRows)(e,g):[],N=(0,s.ledgerView)(e,e?"":u,w),k=e?(0,s.ledgerAgents)(e):[];return(0,t.jsxs)("div",{className:m?"ledger-page has-detail":"ledger-page",children:[(0,t.jsxs)("header",{className:"ledger-head",children:[(0,t.jsx)(a.default,{href:"/",className:"cfg-link ledger-back",children:"← Back to chat"}),(0,t.jsx)("h1",{className:"ledger-title",children:"Agent Exchanges"}),(0,t.jsx)("p",{className:"ledger-sub",children:"Every Ask and Continue between Agent sessions, newest activity first."})]}),(0,t.jsxs)("main",{className:"ledger-main",children:[(0,t.jsxs)("section",{className:"ledger-list-pane","aria-labelledby":v,children:[(0,t.jsx)("h2",{id:v,ref:y,tabIndex:-1,className:"ledger-pane-title",children:"Exchanges"}),(0,t.jsxs)("div",{className:"ledger-filters",children:[(0,t.jsx)("div",{className:"sessions-filter ledger-mode",role:"group","aria-label":"Mode",children:s.MODE_FILTER_OPTIONS.map(e=>(0,t.jsx)("button",{type:"button",className:"sessions-filter-btn","aria-pressed":g.mode===e.value,onClick:()=>p(t=>({...t,mode:e.value})),children:e.label},e.value))}),(0,t.jsxs)("div",{className:"ledger-selects",children:[(0,t.jsxs)("label",{className:"ledger-select-label",htmlFor:x,children:["Status",(0,t.jsx)("select",{id:x,className:"exchange-select",value:g.state,onChange:e=>p(t=>({...t,state:e.target.value})),children:s.STATE_FILTER_OPTIONS.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,t.jsxs)("label",{className:"ledger-select-label",htmlFor:b,children:["Agent",(0,t.jsxs)("select",{id:b,className:"exchange-select",value:g.agentId,onChange:e=>p(t=>({...t,agentId:e.target.value})),children:[(0,t.jsx)("option",{value:"",children:"Any Agent"}),k.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})]})]}),(0,t.jsx)("p",{className:"manage-count ledger-count",role:"status",children:e?`${w.length} of ${e.length} shown`:""})]}),"loading"===N?(0,t.jsx)("p",{className:"ledger-state",role:"status","data-ledger-state":"loading",children:"Loading exchanges…"}):null,"error"===N?(0,t.jsxs)("div",{className:"ledger-state",role:"alert","data-ledger-state":"error",children:[(0,t.jsx)("p",{className:"delete-error",children:u}),(0,t.jsx)("button",{type:"button",className:"pin-word",onClick:()=>{d(""),f(e=>e+1)},children:"Retry"})]}):null,"empty"===N?(0,t.jsx)("p",{className:"ledger-state","data-ledger-state":"empty",children:"No exchanges yet. Open an Agent’s Sessions and choose Ask from this context or Hand off to… to start one."}):null,"filtered-out"===N?(0,t.jsxs)("div",{className:"ledger-state","data-ledger-state":"filtered-out",children:[(0,t.jsx)("p",{children:"No exchanges match these filters."}),(0,t.jsx)("button",{type:"button",className:"pin-word",onClick:()=>p(s.DEFAULT_LEDGER_FILTER),children:"Clear filters"})]}):null,"rows"===N?(0,t.jsx)("ol",{className:"ledger-list","aria-label":"Exchanges, newest activity first",children:w.map(e=>(0,t.jsx)("li",{className:"ledger-row-item",children:(0,t.jsxs)("button",{type:"button",className:`ledger-row is-${(0,s.stateTone)(e.state)}`,"data-exchange-id":e.id,"aria-current":m===e.id?"true":void 0,onClick:()=>j(e.id),children:[(0,t.jsxs)("span",{className:"ledger-row-line",children:[(0,t.jsx)("span",{className:"exchange-card-mode",children:(0,s.modeLabel)(e.mode)}),(0,t.jsx)("span",{className:"ledger-row-who",children:(0,s.participantsLabel)(e)}),(0,t.jsx)("span",{className:"ledger-row-state",children:(0,s.liveStateLabel)(e)})]}),(0,t.jsx)("span",{className:"ledger-row-session",children:e.source.session_title}),(0,t.jsxs)("span",{className:"ledger-row-meta",children:["From ",e.origin?.label??"an unknown thread"," · Started ",(0,s.formatExchangeTime)(e.created_at)," · Updated ",(0,s.formatExchangeTime)(e.updated_at)]})]})},e.id))}):null]}),(0,t.jsx)("section",{className:"ledger-detail-pane","aria-label":"Exchange detail",children:m?(0,t.jsx)(c,{id:m,onBack:()=>j(null),onChanged:()=>f(e=>e+1)},m):(0,t.jsx)("p",{className:"ledger-state ledger-placeholder",children:"Choose an exchange to see its timeline and linked threads."})})]})]})}])},22016,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0});var a={default:function(){return x},useLinkStatus:function(){return v}};for(var r in a)Object.defineProperty(n,r,{enumerable:!0,get:a[r]});let s=e.r(90809),i=e.r(43476),l=s._(e.r(71645)),o=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),h=e.r(5550),f=e.r(88540),g=e.r(91949),p=e.r(73668),m=e.r(9396);function x(t){var n;let a,r,s,[x,v]=(0,l.useOptimistic)(g.IDLE_LINK_STATUS),y=(0,l.useRef)(null),{href:_,as:j,children:w,prefetch:N=null,passHref:k,replace:$,shallow:S,scroll:C,onClick:E,onMouseEnter:T,onTouchStart:A,legacyBehavior:L=!1,onNavigate:I,transitionTypes:R,ref:O,unstable_dynamicOnHover:P,...U}=t;a=w,L&&("string"==typeof a||"number"==typeof a)&&(a=(0,i.jsx)("a",{children:a}));let q=l.default.useContext(c.AppRouterContext),D=!1!==N,F=!1===N?"none":!0===N?"full":"auto",M="none"!==F?"auto"===F?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,B="string"==typeof(n=j||_)?n:(0,o.formatUrl)(n);if(L){if(a?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});r=l.default.Children.only(a)}let H=L?r&&"object"==typeof r&&r.ref:O,K,Q=l.default.useCallback(e=>(null!==q&&(y.current=(0,g.mountLinkInstance)(e,B,q,M,D,v,K)),()=>{y.current&&((0,g.unmountLinkForCurrentNavigation)(y.current),y.current=null),(0,g.unmountPrefetchableInstance)(e)}),[D,B,q,M,v,K]),z={ref:(0,u.useMergedRef)(Q,H),onClick(t){L||"function"!=typeof E||E(t),L&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(t),!q||t.defaultPrevented||function(t,n,a,r,s,i,o,c="none"){if("u">typeof window){let u,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,p.isLocalURL)(n)){r&&(t.preventDefault(),location.replace(n));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:h}=e.r(99781);l.default.startTransition(()=>{h(n,r?"replace":"push",!1===s?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,a.current,o,c)})}}(t,B,y,$,C,I,R,F)},onMouseEnter(e){L||"function"!=typeof T||T(e),L&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),q&&D&&(0,g.onNavigationIntent)(e.currentTarget,!0===P)},onTouchStart:function(e){L||"function"!=typeof A||A(e),L&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),q&&D&&(0,g.onNavigationIntent)(e.currentTarget,!0===P)}};return(0,d.isAbsoluteUrl)(B)?z.href=B:L&&!k&&("a"!==r.type||"href"in r.props)||(z.href=(0,h.addBasePath)(B)),s=L?l.default.cloneElement(r,z):(0,i.jsx)("a",{...U,...z,children:a}),(0,i.jsx)(b.Provider,{value:x,children:s})}let b=(0,l.createContext)(g.IDLE_LINK_STATUS),v=()=>(0,l.useContext)(b);("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},18581,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useMergedRef",{enumerable:!0,get:function(){return r}});let a=e.r(71645);function r(e,t){let n=(0,a.useRef)(null),r=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=n.current;e&&(n.current=null,e());let t=r.current;t&&(r.current=null,t())}else e&&(n.current=s(e,a)),t&&(r.current=s(t,a))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let n=e(t);return"function"==typeof n?n:()=>e(null)}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},73668,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isLocalURL",{enumerable:!0,get:function(){return s}});let a=e.r(18967),r=e.r(52817);function s(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,r.hasBasePath)(n.pathname)}catch(e){return!1}}},98183,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a={assign:function(){return o},searchParamsToUrlQuery:function(){return s},urlQueryToSearchParams:function(){return l}};for(var r in a)Object.defineProperty(n,r,{enumerable:!0,get:a[r]});function s(e){let t={};for(let[n,a]of e.entries()){let e=t[n];void 0===e?t[n]=a:Array.isArray(e)?e.push(a):t[n]=[e,a]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function l(e){let t=new URLSearchParams;for(let[n,a]of Object.entries(e))if(Array.isArray(a))for(let e of a)t.append(n,i(e));else t.set(n,i(a));return t}function o(e,...t){for(let n of t){for(let t of n.keys())e.delete(t);for(let[t,a]of n.entries())e.append(t,a)}return e}},95057,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0});var a={formatUrl:function(){return l},formatWithValidation:function(){return c},urlObjectKeys:function(){return o}};for(var r in a)Object.defineProperty(n,r,{enumerable:!0,get:a[r]});let s=e.r(90809)._(e.r(98183)),i=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:n}=e,a=e.protocol||"",r=e.pathname||"",l=e.hash||"",o=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:n&&(c=t+(~n.indexOf(":")?`[${n}]`:n),e.port&&(c+=":"+e.port)),o&&"object"==typeof o&&(o=String(s.urlQueryToSearchParams(o)));let u=e.search||o&&`?${o}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||i.test(a))&&!1!==c?(c="//"+(c||""),r&&"/"!==r[0]&&(r="/"+r)):c||(c=""),l&&"#"!==l[0]&&(l="#"+l),u&&"?"!==u[0]&&(u="?"+u),r=r.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${a}${c}${r}${u}${l}`}let o=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return l(e)}},18967,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0});var a={DecodeError:function(){return x},MiddlewareNotFoundError:function(){return _},MissingStaticPage:function(){return y},NormalizeError:function(){return b},PageNotFoundError:function(){return v},SP:function(){return p},ST:function(){return m},WEB_VITALS:function(){return s},execOnce:function(){return i},getDisplayName:function(){return d},getLocationOrigin:function(){return c},getURL:function(){return u},isAbsoluteUrl:function(){return o},isResSent:function(){return h},loadGetInitialProps:function(){return g},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return j}};for(var r in a)Object.defineProperty(n,r,{enumerable:!0,get:a[r]});let s=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,n=!1;return(...a)=>(n||(n=!0,t=e(...a)),t)}let l=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,o=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&l.test(e)};function c(){let{protocol:e,hostname:t,port:n}=window.location;return`${e}//${t}${n?":"+n:""}`}function u(){let{href:e}=window.location,t=c();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function h(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function g(e,t){let n=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await g(t.Component,t.ctx)}:{};let a=await e.getInitialProps(t);if(n&&h(n))return a;if(!a)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return a}let p="u">typeof performance,m=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class x extends Error{}class b extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class y extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class _ extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(e){return JSON.stringify({message:e.message,stack:e.stack})}}]);
|
package/app/BUILD_INFO.json
CHANGED
package/app/package.json
CHANGED
package/app/server.js
CHANGED
|
@@ -9,7 +9,7 @@ const currentPort = parseInt(process.env.PORT, 10) || 3000
|
|
|
9
9
|
const hostname = process.env.HOSTNAME || '0.0.0.0'
|
|
10
10
|
|
|
11
11
|
let keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10)
|
|
12
|
-
const nextConfig = {"env":{"BOTMANCERS_BUILD_VERSION":"0.
|
|
12
|
+
const nextConfig = {"env":{"BOTMANCERS_BUILD_VERSION":"0.5.0","BOTMANCERS_BUILD_COMMIT":"47984e52c3b4b718ad944d03532e9b80efc95529"},"webpack":null,"typescript":{"ignoreBuildErrors":false},"typedRoutes":false,"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.ts","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"instrumentationClientInject":[],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"maximumResponseBody":50000000,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":true,"customCacheHandler":false},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":null,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{"serverFunctions":true,"browserToTerminal":"warn"},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":__dirname,"enablePrerenderSourceMaps":true,"cacheComponents":false,"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":30,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":31536000}},"cacheHandlers":{},"experimental":{"appNewScrollHandler":true,"coldCacheBadge":false,"devValidationWorker":true,"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"cachedNavigations":false,"dynamicOnHover":false,"useOffline":false,"varyParams":true,"optimisticRouting":true,"instrumentationClientRouterTransitionEvents":false,"prefetchInlining":{"maxSize":2048,"maxBundleSize":10240},"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":9,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptOperationCache":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"devMemoryThresholdRestart":true,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"requestInsights":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"strictRouteTypes":false,"useTypeScriptCli":true,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":true,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":true,"serverComponentsHmrCache":true,"serverComponentsHmrCancellation":false,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"gestureTransition":false,"inlineCss":false,"useCache":false,"globalNotFound":false,"browserDebugInfoInTerminal":"warn","lockDistDir":true,"proxyClientMaxBodySize":10485760,"hideLogsAfterAbort":false,"mcpServer":true,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":true,"turbopackInferModuleSideEffects":true,"turbopackPluginRuntimeStrategy":"childProcesses","turbopackMemoryEvictionMode":"auto","optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-sqlite-node","@effect/sql-sqlite-bun","@effect/sql-sqlite-wasm","@effect/sql-sqlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"useCacheTimeout":54,"instantInsights":{"validationLevel":"warning"},"trustHostHeader":false,"isExperimentalCompile":false},"htmlLimitedBots":"[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight","bundlePagesRouterDependencies":false,"configFileName":"next.config.ts","repoRoot":__dirname,"turbopack":{"root":__dirname},"distDirRoot":".next","_originalRewrites":{"beforeFiles":[],"afterFiles":[{"source":"/favicon.ico","destination":"/brand/botmancers-logo-filled-64.png"}],"fallback":[]}}
|
|
13
13
|
|
|
14
14
|
process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)
|
|
15
15
|
|
package/dist/cli.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface CliIo {
|
|
|
13
13
|
export declare const PRODUCT_COMMANDS: readonly ["setup", "start", "stop", "status", "doctor", "open"];
|
|
14
14
|
export declare const INSTALL_COMMANDS: readonly ["install", "upgrade"];
|
|
15
15
|
export declare const UPDATE_WORKER_COMMAND = "__update-check";
|
|
16
|
-
export declare const PRODUCT_HELP = "Usage: botmancers <command>\n\nRun Botmancers (UI, API, core engine, and MCP bridge) from this package:\n\n setup Create BOTMANCERS_HOME (owner-only) and generate the\n bridge credentials; prints Hermes and Agent Deck steps;\n refreshes the clients set up with --client\n setup --client codex|cursor|claude [--remove]\n Connect that client to the MCP bridge and install the\n optional botmancers-collaboration skill (or remove both);\n files you edited are never overwritten\n start [--daemon] [--open] Start the UI/core on 127.0.0.1:
|
|
16
|
+
export declare const PRODUCT_HELP = "Usage: botmancers <command>\n\nRun Botmancers (UI, API, core engine, and MCP bridge) from this package:\n\n setup Create BOTMANCERS_HOME (owner-only) and generate the\n bridge credentials; prints Hermes and Agent Deck steps;\n refreshes the clients set up with --client\n setup --client codex|cursor|claude [--remove]\n Connect that client to the MCP bridge and install the\n optional botmancers-collaboration skill (or remove both);\n files you edited are never overwritten\n start [--daemon] [--open] Start the UI/core on 127.0.0.1:3333 and the MCP bridge\n on 127.0.0.1:3332 under one supervisor\n stop Stop the supervisor, core, and bridge\n status Report healthy / degraded / stopped, versions, endpoints\n doctor Check the installation, home, ports, Hermes, Agent Deck\n open Open the UI in a browser\n mcp [options] Run only the MCP bridge (same as bare `botmancers`)\n install [--to VERSION] Managed install into ~/.botmancers/versions with the\n ~/.local/bin/botmancers launcher (--help for options)\n upgrade [--check] [--to VERSION] [--yes]\n Update this installation (managed or npm-global)\n\nManaged installs update themselves: at most one npm check a day, a background\ndownload, activation at the next `botmancers start` once nothing is running.\nBOTMANCERS_DISABLE_AUTOUPDATER=1 turns that off; `botmancers upgrade` still works.\n\nEnvironment: BOTMANCERS_HOME (default ~/.botmancers), BOTMANCERS_UI_PORT,\nBOTMANCERS_MCP_PORT. Variables exported in your shell (HERMES_*, BOTMANCERS_DB_PATH,\n...) take precedence over <home>/config/core.env.\n\nExit codes: 0 ok, 1 degraded or check failed, 2 usage, 3 not running,\n6 port in use, 7 core or bridge failed to start, 8 packaged app incomplete,\n9 home not writable, 10 not set up (run botmancers setup), 11 the client is not\ninstalled, 12 client files conflict (setup --client changed nothing).\n";
|
|
17
17
|
export declare function productMain(command: typeof PRODUCT_COMMANDS[number], argv: string[], env: NodeJS.ProcessEnv, io?: CliIo): Promise<number>;
|
|
18
18
|
export declare function main(argv: string[], env: NodeJS.ProcessEnv, io?: CliIo): Promise<number | 'serving'>;
|
|
19
19
|
export declare function bridgeMain(argv: string[], env: NodeJS.ProcessEnv, io?: CliIo): Promise<number | 'serving'>;
|
package/dist/cli.js
CHANGED
|
@@ -45,8 +45,8 @@ Run Botmancers (UI, API, core engine, and MCP bridge) from this package:
|
|
|
45
45
|
Connect that client to the MCP bridge and install the
|
|
46
46
|
optional botmancers-collaboration skill (or remove both);
|
|
47
47
|
files you edited are never overwritten
|
|
48
|
-
start [--daemon] [--open] Start the UI/core on 127.0.0.1:
|
|
49
|
-
on 127.0.0.1:
|
|
48
|
+
start [--daemon] [--open] Start the UI/core on 127.0.0.1:3333 and the MCP bridge
|
|
49
|
+
on 127.0.0.1:3332 under one supervisor
|
|
50
50
|
stop Stop the supervisor, core, and bridge
|
|
51
51
|
status Report healthy / degraded / stopped, versions, endpoints
|
|
52
52
|
doctor Check the installation, home, ports, Hermes, Agent Deck
|
package/dist/clients.js
CHANGED
|
@@ -23,7 +23,7 @@ import { chmodSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync,
|
|
|
23
23
|
import { homedir } from 'node:os';
|
|
24
24
|
import { dirname, join, relative, sep } from 'node:path';
|
|
25
25
|
import { fileURLToPath } from 'node:url';
|
|
26
|
-
import { ENV } from './config.js';
|
|
26
|
+
import { ENV, LEGACY_DEFAULT_PORT } from './config.js';
|
|
27
27
|
import { PRODUCT_HOST, ensurePrivateDir, readEnvFile, writePrivateFile } from './home.js';
|
|
28
28
|
export const SKILL_NAME = 'botmancers-collaboration';
|
|
29
29
|
export const MCP_SERVER_NAME = 'botmancers';
|
|
@@ -263,8 +263,12 @@ export function inspectClient(id, env, paths, target, skill = packagedSkill()) {
|
|
|
263
263
|
mcp = { state: manifest ? 'missing' : 'absent' };
|
|
264
264
|
else if (target && state.hash === wantedEntry(layout, target).hash)
|
|
265
265
|
mcp = { state: 'current' };
|
|
266
|
-
else if (manifest && state.hash === manifest.mcp.hash)
|
|
267
|
-
|
|
266
|
+
else if (manifest && state.hash === manifest.mcp.hash) {
|
|
267
|
+
const legacy = target && wantedEntry(layout, { ...target, url: `http://${PRODUCT_HOST}:${LEGACY_DEFAULT_PORT}/mcp` });
|
|
268
|
+
mcp = state.hash === legacy?.hash
|
|
269
|
+
? { state: 'stale', reason: `it still points to the old default http://${PRODUCT_HOST}:${LEGACY_DEFAULT_PORT}/mcp` }
|
|
270
|
+
: { state: 'stale', reason: 'its URL or token no longer matches this Botmancers' };
|
|
271
|
+
}
|
|
268
272
|
else
|
|
269
273
|
mcp = { state: 'conflict', reason: `${layout.config} already has an MCP server named "${MCP_SERVER_NAME}" that Botmancers did not write or that was edited` };
|
|
270
274
|
const conflicts = [];
|
package/dist/config.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ export declare const ENV: {
|
|
|
6
6
|
readonly port: "BOTMANCERS_MCP_PORT";
|
|
7
7
|
};
|
|
8
8
|
export declare const DEFAULT_HOST = "127.0.0.1";
|
|
9
|
-
export declare const DEFAULT_PORT =
|
|
9
|
+
export declare const DEFAULT_PORT = 3332;
|
|
10
|
+
export declare const LEGACY_DEFAULT_PORT = 43124;
|
|
10
11
|
export declare const MIN_MCP_TOKEN_LENGTH = 16;
|
|
11
12
|
export interface BridgeConfig {
|
|
12
13
|
botmancersUrl: string;
|
package/dist/config.js
CHANGED
|
@@ -10,7 +10,8 @@ export const ENV = {
|
|
|
10
10
|
port: 'BOTMANCERS_MCP_PORT',
|
|
11
11
|
};
|
|
12
12
|
export const DEFAULT_HOST = '127.0.0.1';
|
|
13
|
-
export const DEFAULT_PORT =
|
|
13
|
+
export const DEFAULT_PORT = 3332;
|
|
14
|
+
export const LEGACY_DEFAULT_PORT = 43124;
|
|
14
15
|
export const MIN_MCP_TOKEN_LENGTH = 16;
|
|
15
16
|
export class ConfigError extends Error {
|
|
16
17
|
problems;
|
|
@@ -40,7 +41,7 @@ export function parseBotmancersUrl(raw) {
|
|
|
40
41
|
}
|
|
41
42
|
catch {
|
|
42
43
|
// Never echo the value: an operator may have pasted a token into it.
|
|
43
|
-
return { problem: `${ENV.url} is not a valid absolute URL. Expected something like http://127.0.0.1:
|
|
44
|
+
return { problem: `${ENV.url} is not a valid absolute URL. Expected something like http://127.0.0.1:3333.` };
|
|
44
45
|
}
|
|
45
46
|
if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {
|
|
46
47
|
return { problem: `${ENV.url} must use http:// or https:// (got ${parsed.protocol}//).` };
|
|
@@ -110,7 +111,7 @@ export function parseCli(argv, env) {
|
|
|
110
111
|
const rawUrl = pick('url');
|
|
111
112
|
let botmancersUrl = '';
|
|
112
113
|
if (!rawUrl) {
|
|
113
|
-
problems.push(`${ENV.url} is required: the Botmancers base URL, for example http://127.0.0.1:
|
|
114
|
+
problems.push(`${ENV.url} is required: the Botmancers base URL, for example http://127.0.0.1:3333 (or pass --botmancers-url).`);
|
|
114
115
|
}
|
|
115
116
|
else {
|
|
116
117
|
const { url, problem } = parseBotmancersUrl(rawUrl);
|
|
@@ -179,7 +180,7 @@ Endpoints:
|
|
|
179
180
|
GET /healthz Liveness (no authentication, no upstream call)
|
|
180
181
|
|
|
181
182
|
Example:
|
|
182
|
-
${ENV.url}=http://127.0.0.1:
|
|
183
|
+
${ENV.url}=http://127.0.0.1:3333 \\
|
|
183
184
|
${ENV.serviceToken}=... ${ENV.mcpToken}=$(openssl rand -hex 32) \\
|
|
184
185
|
npx botmancers
|
|
185
186
|
|
package/dist/contract.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare const TOOL_SCHEMA_URL: import("url").URL;
|
|
|
21
21
|
export declare const TOOL_SCHEMA_V1_URL: import("url").URL;
|
|
22
22
|
export declare function loadToolContract(): ToolContract;
|
|
23
23
|
export declare function toolContractOf(tool: McpTool): string;
|
|
24
|
+
export declare function isOptionalTool(tool: McpTool): boolean;
|
|
24
25
|
export declare function negotiateProtocolVersion(requested: unknown): string;
|
|
25
26
|
export declare const PACKAGE_JSON_URL: import("url").URL;
|
|
26
27
|
export declare function packageVersion(): string;
|
package/dist/contract.js
CHANGED
|
@@ -37,6 +37,11 @@ export function toolContractOf(tool) {
|
|
|
37
37
|
const meta = tool._meta?.['botmancers/contract'];
|
|
38
38
|
return typeof meta === 'string' ? meta : MCP_CONTRACT;
|
|
39
39
|
}
|
|
40
|
+
// NOT-507: an additive v2 tool (registered-Agent messaging and session
|
|
41
|
+
// pins) that an older Botmancers serving v2 may lack; never required.
|
|
42
|
+
export function isOptionalTool(tool) {
|
|
43
|
+
return tool._meta?.['botmancers/optional'] === true;
|
|
44
|
+
}
|
|
40
45
|
export function negotiateProtocolVersion(requested) {
|
|
41
46
|
return typeof requested === 'string' && MCP_PROTOCOL_VERSIONS.includes(requested)
|
|
42
47
|
? requested
|
package/dist/home.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const HOME_ENV = "BOTMANCERS_HOME";
|
|
2
2
|
export declare const APP_DIR_ENV = "BOTMANCERS_APP_DIR";
|
|
3
3
|
export declare const UI_PORT_ENV = "BOTMANCERS_UI_PORT";
|
|
4
|
-
export declare const DEFAULT_UI_PORT =
|
|
4
|
+
export declare const DEFAULT_UI_PORT = 3333;
|
|
5
5
|
export declare const PRODUCT_HOST = "127.0.0.1";
|
|
6
6
|
export declare const HOME_DIRS: readonly ["config", "data", "files", "skills", "logs", "run"];
|
|
7
7
|
export interface HomePaths {
|
package/dist/home.js
CHANGED
|
@@ -18,7 +18,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
18
18
|
export const HOME_ENV = 'BOTMANCERS_HOME';
|
|
19
19
|
export const APP_DIR_ENV = 'BOTMANCERS_APP_DIR';
|
|
20
20
|
export const UI_PORT_ENV = 'BOTMANCERS_UI_PORT';
|
|
21
|
-
export const DEFAULT_UI_PORT =
|
|
21
|
+
export const DEFAULT_UI_PORT = 3333;
|
|
22
22
|
export const PRODUCT_HOST = '127.0.0.1';
|
|
23
23
|
export const HOME_DIRS = ['config', 'data', 'files', 'skills', 'logs', 'run'];
|
|
24
24
|
export function resolveHome(env) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { MCP_CONTRACT, MCP_CONTRACT_V1, MCP_CONTRACTS, MCP_PROTOCOL_VERSIONS, TOOL_SCHEMA_URL, TOOL_SCHEMA_V1_URL, toolContractOf, loadToolContract, negotiateProtocolVersion, packageVersion, type McpTool, type ToolContract, } from './contract.js';
|
|
1
|
+
export { MCP_CONTRACT, MCP_CONTRACT_V1, MCP_CONTRACTS, MCP_PROTOCOL_VERSIONS, TOOL_SCHEMA_URL, TOOL_SCHEMA_V1_URL, toolContractOf, isOptionalTool, loadToolContract, negotiateProtocolVersion, packageVersion, type McpTool, type ToolContract, } from './contract.js';
|
|
2
2
|
export { DEFAULT_HOST, DEFAULT_PORT, ENV, ConfigError, isLoopbackHost, parseBotmancersUrl, parseCli, type BridgeConfig, type CliCommand, } from './config.js';
|
|
3
3
|
export { createRedactor, REDACTED, type Redactor } from './redact.js';
|
|
4
4
|
export { UPSTREAM_PATH, UpstreamError, createUpstream, type Upstream, type UpstreamFailureKind } from './upstream.js';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Library surface of the `botmancers` package: the botmancers.mcp.v2 MCP
|
|
2
2
|
// bridge (which serves every botmancers.mcp.v1 tool unchanged). The `botmancers` binary (./cli) is the supported entry point; these
|
|
3
3
|
// exports let a Node program embed the same bridge.
|
|
4
|
-
export { MCP_CONTRACT, MCP_CONTRACT_V1, MCP_CONTRACTS, MCP_PROTOCOL_VERSIONS, TOOL_SCHEMA_URL, TOOL_SCHEMA_V1_URL, toolContractOf, loadToolContract, negotiateProtocolVersion, packageVersion, } from './contract.js';
|
|
4
|
+
export { MCP_CONTRACT, MCP_CONTRACT_V1, MCP_CONTRACTS, MCP_PROTOCOL_VERSIONS, TOOL_SCHEMA_URL, TOOL_SCHEMA_V1_URL, toolContractOf, isOptionalTool, loadToolContract, negotiateProtocolVersion, packageVersion, } from './contract.js';
|
|
5
5
|
export { DEFAULT_HOST, DEFAULT_PORT, ENV, ConfigError, isLoopbackHost, parseBotmancersUrl, parseCli, } from './config.js';
|
|
6
6
|
export { createRedactor, REDACTED } from './redact.js';
|
|
7
7
|
export { UPSTREAM_PATH, UpstreamError, createUpstream } from './upstream.js';
|
package/dist/product.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// The supervised Botmancers product: the packaged UI/API/core engine on
|
|
2
|
-
// 127.0.0.1:
|
|
2
|
+
// 127.0.0.1:3333 and the MCP bridge on 127.0.0.1:3332, run as two child
|
|
3
3
|
// processes of one supervisor and reported as one health model.
|
|
4
4
|
//
|
|
5
5
|
// start [--daemon] [--open] launch (idempotent: an already healthy product is left alone)
|
package/dist/upstream.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// The Botmancers side of the bridge: JSON-RPC messages POSTed to the app's
|
|
2
2
|
// /api/v0/mcp endpoint with the service token. Failures are classified so
|
|
3
3
|
// the CLI and the MCP surface can say what to fix, without echoing secrets.
|
|
4
|
-
import { MCP_CONTRACT, MCP_CONTRACT_V1, MCP_PROTOCOL_VERSIONS, loadToolContract, toolContractOf } from './contract.js';
|
|
4
|
+
import { MCP_CONTRACT, MCP_CONTRACT_V1, MCP_PROTOCOL_VERSIONS, isOptionalTool, loadToolContract, toolContractOf } from './contract.js';
|
|
5
5
|
// The serverInfo.name the Botmancers app reports from initialize.
|
|
6
6
|
export const MCP_SERVER_NAME = 'botmancers';
|
|
7
7
|
export const UPSTREAM_PATH = '/api/v0/mcp';
|
|
@@ -98,7 +98,7 @@ export function createUpstream(options) {
|
|
|
98
98
|
if (!Array.isArray(offered))
|
|
99
99
|
throw incompatible('tools/list returned no tools');
|
|
100
100
|
const byName = new Map(offered.map(tool => [tool?.name, tool]));
|
|
101
|
-
const bundled = loadToolContract().tools;
|
|
101
|
+
const bundled = loadToolContract().tools.filter(tool => !isOptionalTool(tool));
|
|
102
102
|
const missing = (contract) => bundled.filter(tool => toolContractOf(tool) === contract && !byName.has(tool.name)).map(tool => tool.name);
|
|
103
103
|
const missingV1 = missing(MCP_CONTRACT_V1);
|
|
104
104
|
if (missingV1.length)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "botmancers",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Botmancers: the UI, core engine, and authenticated MCP bridge (contracts botmancers.mcp.v1 and botmancers.mcp.v2) as one CLI-managed product. `botmancers start` runs it all; bare `botmancers` runs the bridge only.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"botmancers",
|