UNPKG

eve

Version:

Filesystem-first framework for durable backend AI agents that run anywhere.

1 lines 704 B
const e=`/.well-known/workflow/v1`,t=Symbol.for(`@workflow/core/basePath`),n=globalThis;function r(e){n[t]=e??``}function i(){return n[t]??``}function a(e){return new URL(e),`${e.replace(/[?#].*$/,``).replace(/\/+$/,``)}${i()}`}function o(t,n){let r=new URL(t);return r.pathname=`${r.pathname.replace(/\/+$/,``)}${e}/${s(n)}`,r.search=n.type===`health`?`__health`:``,r.hash=``,r.toString()}function s(e){switch(e.type){case`flow`:case`health`:return`flow`;case`manifest`:return`manifest.json`;case`webhook`:return`webhook/${encodeURIComponent(e.token)}`}throw Error(`Unsupported workflow route: ${String(e.type)}`)}function c(){return`${i()}${e}/flow?__health`}export{r as a,o as i,a as n,c as r,e as t};