botmancers 0.10.1 → 0.10.2
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 +24 -1
- package/README.md +17 -15
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/build-manifest.json +3 -3
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/required-server-files.json +2 -2
- 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.html +1 -1
- package/app/.next/server/app/_not-found.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/api/bots/[id]/activity/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/config/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/conversations/[conversationId]/route.js +3 -3
- package/app/.next/server/app/api/bots/[id]/conversations/[conversationId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/conversations/route.js +3 -3
- package/app/.next/server/app/api/bots/[id]/conversations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/overview/route.js +2 -2
- package/app/.next/server/app/api/bots/[id]/overview/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route.js +2 -2
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route.js +2 -2
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/route.js +2 -2
- package/app/.next/server/app/api/bots/[id]/sessions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/sync/route.js +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/sync/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/share-policy/route.js +2 -2
- package/app/.next/server/app/api/bots/[id]/share-policy/route.js.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- package/app/.next/server/app/api/bots/route.js +4 -4
- package/app/.next/server/app/api/bots/route.js.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/messages/route.js +3 -3
- 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.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/stop/route.js +4 -4
- package/app/.next/server/app/api/conversations/[id]/stop/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/exchanges/[id]/cancel/route.js +2 -2
- 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 +1 -1
- package/app/.next/server/app/api/exchanges/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/exchanges/route.js +4 -4
- package/app/.next/server/app/api/exchanges/route.js.nft.json +1 -1
- package/app/.next/server/app/api/files/[name]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/groups/route.js.nft.json +1 -1
- package/app/.next/server/app/api/health/route.js +3 -3
- package/app/.next/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/app/.next/server/app/api/messages/[id]/between/route.js.nft.json +1 -1
- package/app/.next/server/app/api/runtime-capacity/route.js.nft.json +1 -1
- package/app/.next/server/app/api/runtime-connections/route.js.nft.json +1 -1
- package/app/.next/server/app/api/service-grants/route.js +1 -1
- package/app/.next/server/app/api/service-grants/route.js.nft.json +1 -1
- package/app/.next/server/app/api/shares/[shareRef]/revoke/route.js +2 -2
- package/app/.next/server/app/api/shares/[shareRef]/revoke/route.js.nft.json +1 -1
- package/app/.next/server/app/api/shares/route.js +2 -2
- package/app/.next/server/app/api/shares/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/conversations/[conversationId]/route.js +5 -5
- package/app/.next/server/app/api/v0/agents/[agentId]/conversations/[conversationId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/conversations/route.js +5 -5
- 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 +2 -2
- package/app/.next/server/app/api/v0/agents/[agentId]/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/pins/route.js +5 -5
- package/app/.next/server/app/api/v0/agents/[agentId]/pins/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/route.js +5 -5
- package/app/.next/server/app/api/v0/agents/[agentId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/sessions/[ref]/route.js +5 -5
- package/app/.next/server/app/api/v0/agents/[agentId]/sessions/[ref]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/sessions/route.js +5 -5
- package/app/.next/server/app/api/v0/agents/[agentId]/sessions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/route.js +5 -5
- package/app/.next/server/app/api/v0/agents/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/capabilities/route.js +5 -5
- 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 +2 -2
- package/app/.next/server/app/api/v0/conversations/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/exchanges/[id]/cancel/route.js +5 -5
- package/app/.next/server/app/api/v0/exchanges/[id]/cancel/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/exchanges/[id]/route.js +5 -5
- package/app/.next/server/app/api/v0/exchanges/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/exchanges/route.js +5 -5
- package/app/.next/server/app/api/v0/exchanges/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/mcp/route.js +4 -4
- package/app/.next/server/app/api/v0/mcp/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route.js +5 -5
- package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route.js +5 -5
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/pins/[pinRef]/route.js +5 -5
- package/app/.next/server/app/api/v0/pins/[pinRef]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/requests/[id]/route.js +2 -2
- package/app/.next/server/app/api/v0/requests/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/sessions/[ref]/messages/route.js +5 -5
- package/app/.next/server/app/api/v0/sessions/[ref]/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/sessions/[ref]/pins/route.js +5 -5
- package/app/.next/server/app/api/v0/sessions/[ref]/pins/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/sessions/[ref]/shares/route.js +5 -5
- package/app/.next/server/app/api/v0/sessions/[ref]/shares/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route.js +5 -5
- package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/shares/[shareRef]/route.js +5 -5
- package/app/.next/server/app/api/v0/shares/[shareRef]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/shares/current/route.js +5 -5
- package/app/.next/server/app/api/v0/shares/current/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/shares/route.js +5 -5
- package/app/.next/server/app/api/v0/shares/route.js.nft.json +1 -1
- package/app/.next/server/app/api/wake-grants/[id]/revoke/route.js +2 -2
- 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 +2 -2
- 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 +2 -2
- package/app/.next/server/app/api/wakes/[id]/retry/route.js.nft.json +1 -1
- package/app/.next/server/app/exchanges.html +1 -1
- package/app/.next/server/app/exchanges.rsc +1 -1
- package/app/.next/server/app/exchanges.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/exchanges.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/exchanges.segments/exchanges/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +1 -1
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/settings.html +1 -1
- package/app/.next/server/app/settings.rsc +1 -1
- package/app/.next/server/app/settings.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/threads/[id]/route.js.nft.json +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__1273j55._.js +52 -0
- package/app/.next/server/chunks/[root-of-the-server]__1fdy1d8._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1n7hlu8._.js +46 -0
- package/app/.next/server/chunks/_0061c2q._.js +1 -1
- package/app/.next/server/chunks/_031id45._.js +3 -0
- package/app/.next/server/chunks/_04o493a._.js +3 -0
- package/app/.next/server/chunks/_06yp-l-._.js +3 -0
- package/app/.next/server/chunks/_0bl1uw-._.js +3 -0
- package/app/.next/server/chunks/_0gh03eo._.js +3 -0
- package/app/.next/server/chunks/_0h0j5ta._.js +3 -0
- package/app/.next/server/chunks/_0hzb8hh._.js +3 -0
- package/app/.next/server/chunks/_0oodw7g._.js +3 -0
- package/app/.next/server/chunks/_0owd_4q._.js +3 -0
- package/app/.next/server/chunks/_0venewj._.js +3 -0
- package/app/.next/server/chunks/_0wzia1p._.js +3 -0
- package/app/.next/server/chunks/_1-5mthb._.js +1 -1
- package/app/.next/server/chunks/_1-8493l._.js +3 -0
- package/app/.next/server/chunks/_1bvoyii._.js +3 -0
- package/app/.next/server/chunks/_1gyq3w2._.js +3 -0
- package/app/.next/server/chunks/_1j3c311._.js +3 -0
- package/app/.next/server/chunks/{_1ey6l4p._.js → _1k74ggt._.js} +2 -2
- package/app/.next/server/chunks/_1l_t4_r._.js +3 -0
- package/app/.next/server/chunks/_1lac7c3._.js +3 -0
- package/app/.next/server/chunks/_1mlmzwb._.js +3 -0
- package/app/.next/server/chunks/_1rg79tr._.js +3 -0
- package/app/.next/server/chunks/_1s5qnlr._.js +3 -0
- package/app/.next/server/chunks/{_1x4dqzv._.js → _1u-wiq_._.js} +2 -2
- package/app/.next/server/chunks/_1xaqb38._.js +3 -0
- package/app/.next/server/chunks/_1zw-w5h._.js +3 -0
- package/app/.next/server/chunks/lib_0-opbv7._.js +30 -30
- package/app/.next/server/chunks/lib_0aejojj._.js +30 -30
- package/app/.next/server/chunks/lib_0al5wbc._.js +30 -30
- package/app/.next/server/chunks/lib_0il0ml1._.js +30 -30
- package/app/.next/server/chunks/lib_0iujsdg._.js +30 -30
- package/app/.next/server/chunks/lib_15a9ejf._.js +35 -28
- package/app/.next/server/chunks/lib_19pzc33._.js +35 -28
- package/app/.next/server/chunks/lib_1a4ucxv._.js +30 -30
- package/app/.next/server/chunks/lib_1dehbst._.js +30 -30
- package/app/.next/server/chunks/lib_1h919zb._.js +3 -0
- package/app/.next/server/chunks/lib_1z4vnh4._.js +30 -30
- package/app/.next/server/chunks/lib_1z7d95m._.js +35 -28
- package/app/.next/server/chunks/lib_db_ts_1ttuckb._.js +9 -2
- package/app/.next/server/chunks/lib_service-api-http_ts_0xzqhny._.js +1 -1
- package/app/.next/server/chunks/lib_service-api_ts_18eok4w._.js +5 -5
- package/app/.next/server/chunks/lib_slack-runtime_ts_0fgsejy._.js +6 -6
- 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/BUILD_INFO.json +2 -2
- package/app/package.json +1 -1
- package/app/server.js +1 -1
- package/dist/contract.js +2 -2
- package/package.json +1 -1
- package/schemas/botmancers.mcp.v2.tools.json +15 -50
- package/skills/botmancers-collaboration/SKILL.md +10 -10
- package/skills/botmancers-collaboration/references/workflows.md +20 -14
- package/app/.next/server/chunks/[root-of-the-server]__07q5mnr._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1280ke1._.js +0 -46
- package/app/.next/server/chunks/[root-of-the-server]__1jxwu9_._.js +0 -52
- package/app/.next/server/chunks/_04e2bgj._.js +0 -3
- package/app/.next/server/chunks/_05po7b4._.js +0 -3
- package/app/.next/server/chunks/_06sxx0e._.js +0 -3
- package/app/.next/server/chunks/_0ar2ooe._.js +0 -3
- package/app/.next/server/chunks/_0fmotaz._.js +0 -3
- package/app/.next/server/chunks/_0kpfto_._.js +0 -3
- package/app/.next/server/chunks/_0lm6uis._.js +0 -3
- package/app/.next/server/chunks/_0mpu5tl._.js +0 -3
- package/app/.next/server/chunks/_0u9cfq9._.js +0 -3
- package/app/.next/server/chunks/_0ul8k7g._.js +0 -3
- package/app/.next/server/chunks/_1-60d3o._.js +0 -3
- package/app/.next/server/chunks/_11-q8k1._.js +0 -3
- package/app/.next/server/chunks/_133y3b0._.js +0 -3
- package/app/.next/server/chunks/_167960a._.js +0 -3
- package/app/.next/server/chunks/_17vgjlt._.js +0 -3
- package/app/.next/server/chunks/_1amx9_4._.js +0 -3
- package/app/.next/server/chunks/_1b01v-_._.js +0 -3
- package/app/.next/server/chunks/_1c-g4gq._.js +0 -3
- package/app/.next/server/chunks/_1ess5if._.js +0 -3
- package/app/.next/server/chunks/_1i0zod4._.js +0 -3
- package/app/.next/server/chunks/_1nlg4x_._.js +0 -3
- package/app/.next/server/chunks/_1z0qbzc._.js +0 -3
- package/app/.next/server/chunks/lib_0i8cm07._.js +0 -3
- /package/app/.next/static/{eBmHBBldHWytVvYPu0zHc → 45V8A9u4-Y-aZNxovpZCu}/_buildManifest.js +0 -0
- /package/app/.next/static/{eBmHBBldHWytVvYPu0zHc → 45V8A9u4-Y-aZNxovpZCu}/_clientMiddlewareManifest.js +0 -0
- /package/app/.next/static/{eBmHBBldHWytVvYPu0zHc → 45V8A9u4-Y-aZNxovpZCu}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[43345,e=>{"use strict";var t=e.i(62294),r=e.i(26571),n=e.i(45383);let i=["authentication_unavailable","unauthenticated","principal_mismatch","agent_not_found","conversation_not_found","request_not_found"];async function o(e,r){let o,a=null,s=!1,l=null;try{o=await e(e=>{a=e},()=>{let e=a;r&&e&&"service"===e.kind&&t.serviceAudit.append({principal:e,operation:r.operation,capability:"participant",targetKind:r.targetKind,targetRef:r.targetRef,outcome:"allowed",code:null}),s=!0})}catch(e){if(e instanceof n.AgentApiError)l=e.code,o=Response.json({error:{code:e.code,message:e.message}},{status:e.status});else console.error("Agent conversation API error:",e),l="internal_error",o=Response.json({error:{code:"internal_error",message:"The request could not be processed."}},{status:500})}let c=a;if(s&&null===l)return o;if(r&&c&&"service"===c.kind)try{t.serviceAudit.append({principal:c,operation:r.operation,capability:"participant",targetKind:r.targetKind,targetRef:r.targetRef,outcome:null===l?"allowed":"internal_error"===l?"error":i.includes(l)?"denied":"rejected",code:l})}catch(e){return console.error("Service audit append failed:",e instanceof Error?e.message:"unknown error"),Response.json({error:{code:"internal_error",message:"The request could not be processed."}},{status:500})}return o}async function a(e){let t,i=function(){try{return(0,r.serviceTokenAuthenticatorFromEnv)()}catch(e){if(e instanceof r.ServiceTokenConfigError)return console.error(`Agent API authentication disabled: ${e.message}`),null;throw e}}();if(!i)throw new n.AgentApiError("authentication_unavailable","No authenticator is configured for the agent conversation API.");try{t=await i(e)}catch{t=null}if(!t||!(0,n.isPrincipalKind)(t.kind)||"string"!=typeof t.id||!t.id.trim())throw new n.AgentApiError("unauthenticated","Authentication failed.");return{kind:t.kind,id:t.id}}async function s(e,t){return o(async(r,i)=>{var o;let s,l=await a(e);r(l);try{let t=await e.json();if(!t||"object"!=typeof t||Array.isArray(t))throw Error("not an object");s=t}catch{throw new n.AgentApiError("invalid_request","The request body must be a JSON object.")}let c=null==(o=s.principal)?null:{kind:o.kind,id:String(o.id??"")};if(c&&!(0,n.samePrincipal)(c,l))throw new n.AgentApiError("principal_mismatch","The declared principal does not match the authenticated principal.");let u=e.headers.get("idempotency-key"),d="string"==typeof s.idempotencyKey?s.idempotencyKey:null;if(u&&d&&u!==d)throw new n.AgentApiError("invalid_request","Idempotency-Key header and body idempotencyKey differ.");let h=u??d??"";if(h.toLowerCase().startsWith(n.MCP_IDEMPOTENCY_PREFIX))throw new n.AgentApiError("invalid_request",`Idempotency keys starting with "${n.MCP_IDEMPOTENCY_PREFIX}" are reserved for the MCP bridge.`);let{accepted:p,dispatched:g}=(0,n.acceptAgentMessage)(l,{agentId:t,content:"string"==typeof s.content?s.content:"",idempotencyKey:h,conversationId:"string"==typeof s.conversationId?s.conversationId:null==s.conversationId?null:""},i);return!0===s.wait?(await g,Response.json({...(0,n.getAgentRequest)(l,p.requestId),replayed:p.replayed})):Response.json(p,{status:p.replayed?200:202})},{operation:"agents.message",targetKind:"agent",targetRef:t})}async function l(e,t){return o(async r=>{let i=await a(e);return r(i),Response.json((0,n.getConversation)(i,t))},{operation:"conversations.read",targetKind:"conversation",targetRef:t})}async function c(e,t){return o(async r=>{let i=await a(e);return r(i),Response.json((0,n.getAgentRequest)(i,t))},{operation:"requests.read",targetKind:"request",targetRef:t})}e.s(["authenticate",0,a,"handleGetAgentRequest",0,c,"handleGetConversation",0,l,"handleSendAgentMessage",0,s])},86353,e=>{"use strict";let t=new Set(["127.0.0.1","localhost","[::1]"]),r=new Set(["GET","HEAD","OPTIONS"]);function n(e){let r=e?function(e){let t=e.trim().toLowerCase();if(!t)return null;if(t.startsWith("[")){let e=t.indexOf("]");if(e<0)return null;let r=t.slice(e+1);return""===r||/^:\d+$/.test(r)?t.slice(0,e+1):null}let[r,n,i]=t.split(":");return void 0===i&&(void 0===n||/^\d+$/.test(n))?r:null}(e):null;return!!r&&t.has(r)}e.s(["OWNER_ORIGIN_REQUIRED",0,"owner_origin_required","isLoopbackHost",0,n,"ownerBoundaryRefusalFor",0,function(e){let t=new URL(e.url);var i={method:e.method,host:e.headers.get("host")??t.host,origin:e.headers.get("origin"),secFetchSite:e.headers.get("sec-fetch-site"),protocol:t.protocol};if(!n(i.host))return"The request did not arrive on a loopback host.";if(r.has(i.method.toUpperCase()))return null;let o=i.secFetchSite?.trim().toLowerCase()??null;if(null!==o&&"same-origin"!==o)return"The request is not same-origin.";if(null!==i.origin){let e=`${i.protocol}//${i.host.trim().toLowerCase()}`;return i.origin.trim().toLowerCase()!==e?"The request came from another origin.":null}return"same-origin"===o?null:"The request carries no same-origin proof."}])},26571,e=>{"use strict";var t=e.i(54799);let r="BOTMANCERS_SERVICE_TOKENS",n=["botmancers-exchanges","botmancers-engine","botmancers-session-share","botmancers-session-context"],i=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/,o=/^sha256:([0-9a-f]{64})$/;class a extends Error{constructor(e){super(e),this.name="ServiceTokenConfigError"}}e.s(["RESERVED_SERVICE_IDS",0,n,"ServiceTokenConfigError",0,a,"serviceTokenAuthenticatorFromEnv",0,function(e=process.env){let s=function(e){if(!e||!e.trim())return[];let t=[],s=new Set;for(let l of e.split(/[,\s]+/).filter(Boolean)){let e=l.indexOf("="),c=e>0?l.slice(0,e):"",u=o.exec(e>0?l.slice(e+1).toLowerCase():"");if(!i.test(c)||!u)throw new a(`${r} entries must be <service-id>=sha256:<64 hex digits>.`);if(s.has(c))throw new a(`${r} lists service ${c} twice.`);if(n.includes(c))throw new a(`${r} names the reserved engine principal ${c}.`);s.add(c),t.push({serviceId:c,digest:Buffer.from(u[1],"hex")})}return t}(e[r]);return s.length?e=>{let r,n,i=(n=(r=e.headers.get("authorization"))?/^Bearer[ \t]+(\S+)[ \t]*$/i.exec(r):null)?n[1]:null;if(!i||i.length>4096)return null;let o=(0,t.createHash)("sha256").update(i,"utf8").digest(),a=null;for(let e of s)(0,t.timingSafeEqual)(o,e.digest)&&null===a&&(a=e.serviceId);return a?{kind:"service",id:a}:null}:null}])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=lib_1h919zb._.js.map
|