agenttwin 0.3.21 → 0.3.23
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/dist/api.js +2113 -609
- package/dist/dashboard/assets/dashboard/agent-home.css +7 -7
- package/dist/dashboard/assets/dashboard/bay-morning.webp +0 -0
- package/dist/dashboard/assets/dashboard/golden-gate-afternoon.webp +0 -0
- package/dist/dashboard/assets/dashboard/golden-gate-portrait.webp +0 -0
- package/dist/dashboard/assets/dashboard/moonlit-coast.webp +0 -0
- package/dist/dashboard/assets/next/static/chunks/{1250-7571b1a697f6bb4a.js → 1250-a3c859fd20517500.js} +1 -1
- package/dist/dashboard/assets/next/static/chunks/{2743-a0efd6f4aeb11cc5.js → 2743-72610a5d5a3f8462.js} +1 -1
- package/dist/dashboard/assets/next/static/chunks/5663-403316746afad10e.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/dashboard/{page-9c11295678539a5f.js → page-0e0392368e0a891e.js} +1 -1
- package/dist/dashboard/assets/next/static/chunks/app/docs/[[...slug]]/page-4981ea4966b19e3e.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/onboarding/page-dd4ac0f5f36e6bfa.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/v2/dashboard/{page-34574448d210c775.js → page-de0fe6d84be21e6a.js} +1 -1
- package/dist/dashboard/assets/next/static/chunks/app/v2/onboarding/page-360cbffc57981f6b.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/v2/page-fc4df4912ce3af44.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/{webpack-40324749d289e4a5.js → webpack-9e40ef55e5f2fb53.js} +1 -1
- package/dist/dashboard/assets/next/static/css/{42045de5f39b50ca.css → 37d81e1d2804cc5f.css} +1 -1
- package/dist/dashboard/assets/next/static/css/69ec1bae997c3bb0.css +1 -0
- package/dist/dashboard/assets/next/static/css/ad85402a1595e56e.css +1 -0
- package/dist/dashboard/assets/next/static/css/{4bbe78c2fe206b92.css → da981fb878a02b8c.css} +1 -1
- package/dist/dashboard/assets/next/static/media/bay-morning.82669113.webp +0 -0
- package/dist/dashboard/assets/next/static/media/golden-gate-afternoon.0aa49492.webp +0 -0
- package/dist/dashboard/assets/next/static/media/golden-gate-portrait.89fc667a.webp +0 -0
- package/dist/dashboard/assets/next/static/media/moonlit-coast.09739ef4.webp +0 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/engine.js +6386 -4974
- package/dist/gateway.js +2194 -604
- package/dist/twins/catalog.json +6020 -0
- package/dist/twins/engine/v2/THIRD-PARTY.txt +25 -0
- package/dist/twins/engine/v2/chunks/2CHBP57N.mjs +8 -0
- package/dist/twins/engine/v2/chunks/4CPL6MPF.mjs +30 -0
- package/dist/twins/engine/v2/chunks/OYLYKZGD.mjs +2 -0
- package/dist/twins/engine/v2/chunks/SQSP35HM.mjs +38 -0
- package/dist/twins/engine/v2/chunks/YSJQQVUM.mjs +2 -0
- package/dist/twins/engine/v2/react-dom_client.mjs +272 -0
- package/dist/twins/engine/v2/react-dom_server.mjs +263 -0
- package/dist/twins/engine/v2/react.mjs +2 -0
- package/dist/twins/engine/v2/react_jsx-runtime.mjs +31 -0
- package/dist/twins/engine/v2/volter_world-core.mjs +195 -0
- package/dist/twins/engine/v2/volter_world-core_app-route.mjs +2 -0
- package/dist/twins/engine/v2/volter_world-core_network-policy.mjs +2 -0
- package/dist/twins/engine/v3/THIRD-PARTY.txt +65 -0
- package/dist/twins/engine/v3/chunks/2CHBP57N.mjs +8 -0
- package/dist/twins/engine/v3/chunks/2YSSPA5O.mjs +65 -0
- package/dist/twins/engine/v3/chunks/5PWRY4UK.mjs +154 -0
- package/dist/twins/engine/v3/chunks/7XRKSFFJ.mjs +2 -0
- package/dist/twins/engine/v3/chunks/AWOWH2H5.mjs +2 -0
- package/dist/twins/engine/v3/chunks/C46M5U3Q.mjs +2 -0
- package/dist/twins/engine/v3/chunks/MFH2VZPP.mjs +2 -0
- package/dist/twins/engine/v3/chunks/MWCO5UV3.mjs +2 -0
- package/dist/twins/engine/v3/chunks/N5BL5RDF.mjs +313 -0
- package/dist/twins/engine/v3/chunks/O7HGPMXG.mjs +2 -0
- package/dist/twins/engine/v3/chunks/OYLYKZGD.mjs +2 -0
- package/dist/twins/engine/v3/chunks/PLB7HTON.mjs +8 -0
- package/dist/twins/engine/v3/chunks/TY4LDBVH.mjs +7 -0
- package/dist/twins/engine/v3/chunks/VDIRUSCM.mjs +2 -0
- package/dist/twins/engine/v3/chunks/WGUCFQK6.mjs +2 -0
- package/dist/twins/engine/v3/chunks/WPATONSC.mjs +2 -0
- package/dist/twins/engine/v3/react_jsx-runtime.mjs +2 -0
- package/dist/twins/engine/v3/volter_world-core.mjs +2 -0
- package/dist/twins/engine/v3/volter_world-ui.mjs +559 -0
- package/dist/twins/packs/ahrefs/LICENSE +202 -0
- package/dist/twins/packs/ahrefs/NOTICE +7 -0
- package/dist/twins/packs/ahrefs/index.mjs +2 -0
- package/dist/twins/packs/ai-gateway/LICENSE +202 -0
- package/dist/twins/packs/ai-gateway/NOTICE +7 -0
- package/dist/twins/packs/ai-gateway/index.mjs +14 -0
- package/dist/twins/packs/airtable/LICENSE +202 -0
- package/dist/twins/packs/airtable/NOTICE +7 -0
- package/dist/twins/packs/airtable/index.mjs +2 -0
- package/dist/twins/packs/algolia/LICENSE +202 -0
- package/dist/twins/packs/algolia/NOTICE +7 -0
- package/dist/twins/packs/algolia/index.mjs +2 -0
- package/dist/twins/packs/ambientcg/LICENSE +202 -0
- package/dist/twins/packs/ambientcg/NOTICE +7 -0
- package/dist/twins/packs/ambientcg/index.mjs +2 -0
- package/dist/twins/packs/anthropic/LICENSE +202 -0
- package/dist/twins/packs/anthropic/NOTICE +7 -0
- package/dist/twins/packs/anthropic/index.mjs +18 -0
- package/dist/twins/packs/assemblyai/LICENSE +202 -0
- package/dist/twins/packs/assemblyai/NOTICE +7 -0
- package/dist/twins/packs/assemblyai/index.mjs +11 -0
- package/dist/twins/packs/aws/LICENSE +202 -0
- package/dist/twins/packs/aws/NOTICE +7 -0
- package/dist/twins/packs/aws/index.mjs +2 -0
- package/dist/twins/packs/azure/LICENSE +202 -0
- package/dist/twins/packs/azure/NOTICE +7 -0
- package/dist/twins/packs/azure/index.mjs +38 -0
- package/dist/twins/packs/azureformrecognizer/LICENSE +202 -0
- package/dist/twins/packs/azureformrecognizer/NOTICE +7 -0
- package/dist/twins/packs/azureformrecognizer/index.mjs +3 -0
- package/dist/twins/packs/bitly/LICENSE +202 -0
- package/dist/twins/packs/bitly/NOTICE +7 -0
- package/dist/twins/packs/bitly/index.mjs +2 -0
- package/dist/twins/packs/bluesky/LICENSE +202 -0
- package/dist/twins/packs/bluesky/NOTICE +7 -0
- package/dist/twins/packs/bluesky/index.mjs +30 -0
- package/dist/twins/packs/calcom/LICENSE +202 -0
- package/dist/twins/packs/calcom/NOTICE +7 -0
- package/dist/twins/packs/calcom/index.mjs +2 -0
- package/dist/twins/packs/clerk/LICENSE +202 -0
- package/dist/twins/packs/clerk/NOTICE +7 -0
- package/dist/twins/packs/clerk/index.mjs +5 -0
- package/dist/twins/packs/cloudflare/LICENSE +202 -0
- package/dist/twins/packs/cloudflare/NOTICE +7 -0
- package/dist/twins/packs/cloudflare/index.mjs +79 -0
- package/dist/twins/packs/cohere/LICENSE +202 -0
- package/dist/twins/packs/cohere/NOTICE +7 -0
- package/dist/twins/packs/cohere/index.mjs +2 -0
- package/dist/twins/packs/datadog/LICENSE +202 -0
- package/dist/twins/packs/datadog/NOTICE +7 -0
- package/dist/twins/packs/datadog/index.mjs +3 -0
- package/dist/twins/packs/deepinfra/LICENSE +202 -0
- package/dist/twins/packs/deepinfra/NOTICE +7 -0
- package/dist/twins/packs/deepinfra/index.mjs +13 -0
- package/dist/twins/packs/deepseek/LICENSE +202 -0
- package/dist/twins/packs/deepseek/NOTICE +7 -0
- package/dist/twins/packs/deepseek/index.mjs +12 -0
- package/dist/twins/packs/discord/LICENSE +202 -0
- package/dist/twins/packs/discord/NOTICE +7 -0
- package/dist/twins/packs/discord/index.mjs +2 -0
- package/dist/twins/packs/duckduckgo/LICENSE +202 -0
- package/dist/twins/packs/duckduckgo/NOTICE +7 -0
- package/dist/twins/packs/duckduckgo/index.mjs +532 -0
- package/dist/twins/packs/dynadot/LICENSE +202 -0
- package/dist/twins/packs/dynadot/NOTICE +7 -0
- package/dist/twins/packs/dynadot/index.mjs +2 -0
- package/dist/twins/packs/e2b/LICENSE +202 -0
- package/dist/twins/packs/e2b/NOTICE +7 -0
- package/dist/twins/packs/e2b/index.mjs +2 -0
- package/dist/twins/packs/elevenlabs/LICENSE +202 -0
- package/dist/twins/packs/elevenlabs/NOTICE +7 -0
- package/dist/twins/packs/elevenlabs/index.mjs +4 -0
- package/dist/twins/packs/expo/LICENSE +202 -0
- package/dist/twins/packs/expo/NOTICE +7 -0
- package/dist/twins/packs/expo/index.mjs +2 -0
- package/dist/twins/packs/fal/LICENSE +202 -0
- package/dist/twins/packs/fal/NOTICE +7 -0
- package/dist/twins/packs/fal/index.mjs +2 -0
- package/dist/twins/packs/figma/LICENSE +202 -0
- package/dist/twins/packs/figma/NOTICE +7 -0
- package/dist/twins/packs/figma/index.mjs +2 -0
- package/dist/twins/packs/firecrawl/LICENSE +202 -0
- package/dist/twins/packs/firecrawl/NOTICE +7 -0
- package/dist/twins/packs/firecrawl/index.mjs +9 -0
- package/dist/twins/packs/fireworks/LICENSE +202 -0
- package/dist/twins/packs/fireworks/NOTICE +7 -0
- package/dist/twins/packs/fireworks/index.mjs +13 -0
- package/dist/twins/packs/fly/LICENSE +202 -0
- package/dist/twins/packs/fly/NOTICE +7 -0
- package/dist/twins/packs/fly/index.mjs +2 -0
- package/dist/twins/packs/gcs/LICENSE +202 -0
- package/dist/twins/packs/gcs/NOTICE +7 -0
- package/dist/twins/packs/gcs/index.mjs +8 -0
- package/dist/twins/packs/gemini/LICENSE +202 -0
- package/dist/twins/packs/gemini/NOTICE +7 -0
- package/dist/twins/packs/gemini/index.mjs +7 -0
- package/dist/twins/packs/github/LICENSE +202 -0
- package/dist/twins/packs/github/NOTICE +7 -0
- package/dist/twins/packs/github/index.mjs +75153 -0
- package/dist/twins/packs/googleads/LICENSE +202 -0
- package/dist/twins/packs/googleads/NOTICE +7 -0
- package/dist/twins/packs/googleads/index.mjs +3 -0
- package/dist/twins/packs/googlemaps/LICENSE +202 -0
- package/dist/twins/packs/googlemaps/NOTICE +7 -0
- package/dist/twins/packs/googlemaps/index.mjs +2 -0
- package/dist/twins/packs/googleoauth/LICENSE +202 -0
- package/dist/twins/packs/googleoauth/NOTICE +7 -0
- package/dist/twins/packs/googleoauth/index.mjs +2 -0
- package/dist/twins/packs/hackernews/LICENSE +202 -0
- package/dist/twins/packs/hackernews/NOTICE +7 -0
- package/dist/twins/packs/hackernews/index.mjs +35 -0
- package/dist/twins/packs/huggingface/LICENSE +202 -0
- package/dist/twins/packs/huggingface/NOTICE +7 -0
- package/dist/twins/packs/huggingface/index.mjs +9 -0
- package/dist/twins/packs/inngest/LICENSE +202 -0
- package/dist/twins/packs/inngest/NOTICE +7 -0
- package/dist/twins/packs/inngest/index.mjs +2 -0
- package/dist/twins/packs/instagram/LICENSE +202 -0
- package/dist/twins/packs/instagram/NOTICE +7 -0
- package/dist/twins/packs/instagram/index.mjs +2 -0
- package/dist/twins/packs/jira/LICENSE +202 -0
- package/dist/twins/packs/jira/NOTICE +7 -0
- package/dist/twins/packs/jira/index.mjs +2 -0
- package/dist/twins/packs/langfuse/LICENSE +202 -0
- package/dist/twins/packs/langfuse/NOTICE +7 -0
- package/dist/twins/packs/langfuse/index.mjs +2 -0
- package/dist/twins/packs/linear/LICENSE +202 -0
- package/dist/twins/packs/linear/NOTICE +7 -0
- package/dist/twins/packs/linear/index.mjs +52866 -0
- package/dist/twins/packs/linkedin/LICENSE +202 -0
- package/dist/twins/packs/linkedin/NOTICE +7 -0
- package/dist/twins/packs/linkedin/index.mjs +78 -0
- package/dist/twins/packs/livekit/LICENSE +202 -0
- package/dist/twins/packs/livekit/NOTICE +7 -0
- package/dist/twins/packs/livekit/index.mjs +2 -0
- package/dist/twins/packs/mailgun/LICENSE +202 -0
- package/dist/twins/packs/mailgun/NOTICE +7 -0
- package/dist/twins/packs/mailgun/index.mjs +13 -0
- package/dist/twins/packs/mapbox/LICENSE +202 -0
- package/dist/twins/packs/mapbox/NOTICE +7 -0
- package/dist/twins/packs/mapbox/index.mjs +2 -0
- package/dist/twins/packs/merge/LICENSE +202 -0
- package/dist/twins/packs/merge/NOTICE +7 -0
- package/dist/twins/packs/merge/index.mjs +4 -0
- package/dist/twins/packs/mistral/LICENSE +202 -0
- package/dist/twins/packs/mistral/NOTICE +7 -0
- package/dist/twins/packs/mistral/index.mjs +6 -0
- package/dist/twins/packs/mixpanel/LICENSE +202 -0
- package/dist/twins/packs/mixpanel/NOTICE +8 -0
- package/dist/twins/packs/mixpanel/index.mjs +2 -0
- package/dist/twins/packs/mongodb/LICENSE +202 -0
- package/dist/twins/packs/mongodb/NOTICE +7 -0
- package/dist/twins/packs/mongodb/index.mjs +8 -0
- package/dist/twins/packs/moonshot/LICENSE +202 -0
- package/dist/twins/packs/moonshot/NOTICE +7 -0
- package/dist/twins/packs/moonshot/index.mjs +18 -0
- package/dist/twins/packs/notion/LICENSE +202 -0
- package/dist/twins/packs/notion/NOTICE +7 -0
- package/dist/twins/packs/notion/index.mjs +2 -0
- package/dist/twins/packs/npm-registry/LICENSE +202 -0
- package/dist/twins/packs/npm-registry/NOTICE +7 -0
- package/dist/twins/packs/npm-registry/index.mjs +2 -0
- package/dist/twins/packs/oa-treasury/LICENSE +202 -0
- package/dist/twins/packs/oa-treasury/NOTICE +8 -0
- package/dist/twins/packs/oa-treasury/index.mjs +16 -0
- package/dist/twins/packs/openai/LICENSE +202 -0
- package/dist/twins/packs/openai/NOTICE +7 -0
- package/dist/twins/packs/openai/index.mjs +3473 -0
- package/dist/twins/packs/openrouter/LICENSE +202 -0
- package/dist/twins/packs/openrouter/NOTICE +7 -0
- package/dist/twins/packs/openrouter/index.mjs +2 -0
- package/dist/twins/packs/openweather/LICENSE +202 -0
- package/dist/twins/packs/openweather/NOTICE +7 -0
- package/dist/twins/packs/openweather/index.mjs +2 -0
- package/dist/twins/packs/paypal/LICENSE +202 -0
- package/dist/twins/packs/paypal/NOTICE +7 -0
- package/dist/twins/packs/paypal/index.mjs +51 -0
- package/dist/twins/packs/pinecone/LICENSE +202 -0
- package/dist/twins/packs/pinecone/NOTICE +7 -0
- package/dist/twins/packs/pinecone/index.mjs +2 -0
- package/dist/twins/packs/plain/LICENSE +202 -0
- package/dist/twins/packs/plain/NOTICE +8 -0
- package/dist/twins/packs/plain/index.mjs +18426 -0
- package/dist/twins/packs/planetscale/LICENSE +202 -0
- package/dist/twins/packs/planetscale/NOTICE +7 -0
- package/dist/twins/packs/planetscale/index.mjs +18 -0
- package/dist/twins/packs/polar/LICENSE +202 -0
- package/dist/twins/packs/polar/NOTICE +7 -0
- package/dist/twins/packs/polar/index.mjs +2 -0
- package/dist/twins/packs/polyhaven/LICENSE +202 -0
- package/dist/twins/packs/polyhaven/NOTICE +7 -0
- package/dist/twins/packs/polyhaven/index.mjs +3 -0
- package/dist/twins/packs/postmark/LICENSE +202 -0
- package/dist/twins/packs/postmark/NOTICE +7 -0
- package/dist/twins/packs/postmark/index.mjs +12 -0
- package/dist/twins/packs/reddit/LICENSE +202 -0
- package/dist/twins/packs/reddit/NOTICE +7 -0
- package/dist/twins/packs/reddit/index.mjs +324 -0
- package/dist/twins/packs/redis/LICENSE +202 -0
- package/dist/twins/packs/redis/NOTICE +7 -0
- package/dist/twins/packs/redis/index.mjs +2 -0
- package/dist/twins/packs/replicate/LICENSE +202 -0
- package/dist/twins/packs/replicate/NOTICE +7 -0
- package/dist/twins/packs/replicate/index.mjs +2 -0
- package/dist/twins/packs/resend/LICENSE +202 -0
- package/dist/twins/packs/resend/NOTICE +7 -0
- package/dist/twins/packs/resend/index.mjs +139 -0
- package/dist/twins/packs/runhuman/LICENSE +202 -0
- package/dist/twins/packs/runhuman/NOTICE +7 -0
- package/dist/twins/packs/runhuman/index.mjs +3 -0
- package/dist/twins/packs/scrapecreators/LICENSE +202 -0
- package/dist/twins/packs/scrapecreators/NOTICE +7 -0
- package/dist/twins/packs/scrapecreators/index.mjs +2 -0
- package/dist/twins/packs/segment/LICENSE +202 -0
- package/dist/twins/packs/segment/NOTICE +8 -0
- package/dist/twins/packs/segment/index.mjs +2 -0
- package/dist/twins/packs/sendblue/LICENSE +202 -0
- package/dist/twins/packs/sendblue/NOTICE +7 -0
- package/dist/twins/packs/sendblue/index.mjs +2 -0
- package/dist/twins/packs/sendgrid/LICENSE +202 -0
- package/dist/twins/packs/sendgrid/NOTICE +8 -0
- package/dist/twins/packs/sendgrid/index.mjs +4 -0
- package/dist/twins/packs/sentry/LICENSE +202 -0
- package/dist/twins/packs/sentry/NOTICE +7 -0
- package/dist/twins/packs/sentry/index.mjs +5 -0
- package/dist/twins/packs/sigstore/LICENSE +202 -0
- package/dist/twins/packs/sigstore/NOTICE +7 -0
- package/dist/twins/packs/sigstore/index.mjs +12 -0
- package/dist/twins/packs/slack/LICENSE +202 -0
- package/dist/twins/packs/slack/NOTICE +7 -0
- package/dist/twins/packs/slack/index.mjs +66 -0
- package/dist/twins/packs/smtp/LICENSE +202 -0
- package/dist/twins/packs/smtp/NOTICE +7 -0
- package/dist/twins/packs/smtp/index.mjs +3 -0
- package/dist/twins/packs/snowflake/LICENSE +202 -0
- package/dist/twins/packs/snowflake/NOTICE +8 -0
- package/dist/twins/packs/snowflake/index.mjs +30 -0
- package/dist/twins/packs/stigg/LICENSE +202 -0
- package/dist/twins/packs/stigg/NOTICE +8 -0
- package/dist/twins/packs/stigg/index.mjs +22194 -0
- package/dist/twins/packs/stream/LICENSE +202 -0
- package/dist/twins/packs/stream/NOTICE +7 -0
- package/dist/twins/packs/stream/index.mjs +2 -0
- package/dist/twins/packs/stripe/LICENSE +202 -0
- package/dist/twins/packs/stripe/NOTICE +7 -0
- package/dist/twins/packs/stripe/index.mjs +211 -0
- package/dist/twins/packs/supabase/LICENSE +202 -0
- package/dist/twins/packs/supabase/NOTICE +7 -0
- package/dist/twins/packs/supabase/index.mjs +2 -0
- package/dist/twins/packs/supermemory/LICENSE +202 -0
- package/dist/twins/packs/supermemory/NOTICE +7 -0
- package/dist/twins/packs/supermemory/index.mjs +2 -0
- package/dist/twins/packs/svix/LICENSE +202 -0
- package/dist/twins/packs/svix/NOTICE +7 -0
- package/dist/twins/packs/svix/index.mjs +2 -0
- package/dist/twins/packs/tavily/LICENSE +202 -0
- package/dist/twins/packs/tavily/NOTICE +7 -0
- package/dist/twins/packs/tavily/index.mjs +2 -0
- package/dist/twins/packs/telegram/LICENSE +202 -0
- package/dist/twins/packs/telegram/NOTICE +7 -0
- package/dist/twins/packs/telegram/index.mjs +11 -0
- package/dist/twins/packs/temporal/LICENSE +202 -0
- package/dist/twins/packs/temporal/NOTICE +7 -0
- package/dist/twins/packs/temporal/index.mjs +44 -0
- package/dist/twins/packs/tiktok/LICENSE +202 -0
- package/dist/twins/packs/tiktok/NOTICE +7 -0
- package/dist/twins/packs/tiktok/index.mjs +2 -0
- package/dist/twins/packs/tinybird/LICENSE +202 -0
- package/dist/twins/packs/tinybird/NOTICE +7 -0
- package/dist/twins/packs/tinybird/index.mjs +50 -0
- package/dist/twins/packs/togetherai/LICENSE +202 -0
- package/dist/twins/packs/togetherai/NOTICE +7 -0
- package/dist/twins/packs/togetherai/index.mjs +11 -0
- package/dist/twins/packs/tremendous/LICENSE +202 -0
- package/dist/twins/packs/tremendous/NOTICE +7 -0
- package/dist/twins/packs/tremendous/index.mjs +2 -0
- package/dist/twins/packs/tripo/LICENSE +202 -0
- package/dist/twins/packs/tripo/NOTICE +7 -0
- package/dist/twins/packs/tripo/index.mjs +9 -0
- package/dist/twins/packs/tunnel/LICENSE +202 -0
- package/dist/twins/packs/tunnel/NOTICE +7 -0
- package/dist/twins/packs/tunnel/index.mjs +2 -0
- package/dist/twins/packs/twelvelabs/LICENSE +202 -0
- package/dist/twins/packs/twelvelabs/NOTICE +7 -0
- package/dist/twins/packs/twelvelabs/index.mjs +5 -0
- package/dist/twins/packs/twilio/LICENSE +202 -0
- package/dist/twins/packs/twilio/NOTICE +7 -0
- package/dist/twins/packs/twilio/index.mjs +2 -0
- package/dist/twins/packs/twitch/LICENSE +202 -0
- package/dist/twins/packs/twitch/NOTICE +7 -0
- package/dist/twins/packs/twitch/index.mjs +68 -0
- package/dist/twins/packs/upstash/LICENSE +202 -0
- package/dist/twins/packs/upstash/NOTICE +7 -0
- package/dist/twins/packs/upstash/index.mjs +14 -0
- package/dist/twins/packs/upstashvector/LICENSE +202 -0
- package/dist/twins/packs/upstashvector/NOTICE +7 -0
- package/dist/twins/packs/upstashvector/index.mjs +3 -0
- package/dist/twins/packs/vercel/LICENSE +202 -0
- package/dist/twins/packs/vercel/NOTICE +7 -0
- package/dist/twins/packs/vercel/index.mjs +10 -0
- package/dist/twins/packs/veriff/LICENSE +202 -0
- package/dist/twins/packs/veriff/NOTICE +7 -0
- package/dist/twins/packs/veriff/index.mjs +2 -0
- package/dist/twins/packs/vgauth/LICENSE +202 -0
- package/dist/twins/packs/vgauth/NOTICE +7 -0
- package/dist/twins/packs/vgauth/index.mjs +2 -0
- package/dist/twins/packs/vital/LICENSE +202 -0
- package/dist/twins/packs/vital/NOTICE +7 -0
- package/dist/twins/packs/vital/index.mjs +2 -0
- package/dist/twins/packs/volteridentity/LICENSE +202 -0
- package/dist/twins/packs/volteridentity/NOTICE +7 -0
- package/dist/twins/packs/volteridentity/index.mjs +2 -0
- package/dist/twins/packs/webrisk/LICENSE +202 -0
- package/dist/twins/packs/webrisk/NOTICE +7 -0
- package/dist/twins/packs/webrisk/index.mjs +2 -0
- package/dist/twins/packs/worldlabs/LICENSE +202 -0
- package/dist/twins/packs/worldlabs/NOTICE +7 -0
- package/dist/twins/packs/worldlabs/index.mjs +2 -0
- package/dist/twins/packs/x/LICENSE +202 -0
- package/dist/twins/packs/x/NOTICE +7 -0
- package/dist/twins/packs/x/index.mjs +63 -0
- package/dist/twins/packs/xai/LICENSE +202 -0
- package/dist/twins/packs/xai/NOTICE +7 -0
- package/dist/twins/packs/xai/index.mjs +4 -0
- package/dist/twins/packs/xidentity/LICENSE +202 -0
- package/dist/twins/packs/xidentity/NOTICE +8 -0
- package/dist/twins/packs/xidentity/index.mjs +209 -0
- package/dist/twins/packs/youtube/LICENSE +202 -0
- package/dist/twins/packs/youtube/NOTICE +7 -0
- package/dist/twins/packs/youtube/index.mjs +5 -0
- package/dist/worker.js +442 -18
- package/dist/world-host.js +928 -91
- package/package.json +6 -5
- package/dist/dashboard/assets/dashboard/bay-morning.png +0 -0
- package/dist/dashboard/assets/dashboard/golden-gate-afternoon.png +0 -0
- package/dist/dashboard/assets/dashboard/golden-gate-portrait.png +0 -0
- package/dist/dashboard/assets/dashboard/moonlit-coast.png +0 -0
- package/dist/dashboard/assets/next/static/chunks/2868-424d32cfc8ae81c9.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/docs/[[...slug]]/page-f9fca2c08f779fa0.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/onboarding/page-bc480c9258e5cc4d.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/v2/onboarding/page-f04c0b236abaead3.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/v2/page-07c8054d57c9089b.js +0 -1
- package/dist/dashboard/assets/next/static/css/4af3c8ca0da0f48b.css +0 -1
- package/dist/dashboard/assets/next/static/css/6b8edde77e493a51.css +0 -1
- package/dist/dashboard/assets/next/static/media/bay-morning.1a9f358c.png +0 -0
- package/dist/dashboard/assets/next/static/media/golden-gate-afternoon.3e7cea58.png +0 -0
- package/dist/dashboard/assets/next/static/media/golden-gate-portrait.7941528f.png +0 -0
- package/dist/dashboard/assets/next/static/media/moonlit-coast.bbe901a1.png +0 -0
- /package/dist/dashboard/assets/next/static/{5ub3D2yzS8DE7w2qZd1nv → GTd0IQ6HYyhE_2HqcgFno}/_buildManifest.js +0 -0
- /package/dist/dashboard/assets/next/static/{5ub3D2yzS8DE7w2qZd1nv → GTd0IQ6HYyhE_2HqcgFno}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
@agenttwin/twin-twelvelabs
|
|
2
|
+
|
|
3
|
+
Contains @volter/twin-twelvelabs 0.1.37 by Volter (https://github.com/volter-ai),
|
|
4
|
+
licensed under the Apache License, Version 2.0 (see LICENSE).
|
|
5
|
+
|
|
6
|
+
Modified by AgentTwin: bundled and minified into one file; only code reachable from the pack's
|
|
7
|
+
fetch factory is included; shared modules are imported from the AgentTwin twin engine.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{createRequire as __atReq}from'node:module';const require=__atReq(import.meta.url);
|
|
2
|
+
import{createHash as ae}from"node:crypto";import{applyTwinWrite as he,projectResources as se,worldNow as ge}from"../../engine/v2/volter_world-core.mjs";var F="twelvelabs";var W=["Validating","Pending","Queued","Indexing","Ready"],de=["marengo2.7","marengo3.0","pegasus1.2","pegasus1.5"],_e=["visual","audio"],ye=["thumbnail"];function E(e,t){return{code:e,message:t}}function y(e){return{status:400,body:E("parameter_not_provided",`The \`${e}\` parameter is required but was not provided.`)}}function S(e,t){return{status:400,body:E("parameter_invalid",t??`The \`${e}\` parameter is invalid.`)}}function v(e,t){return{status:404,body:E("resource_not_exist",`Resource with id \`${e}\` does not exist in \`${t}\`.`)}}function ee(){return{status:401,body:E("api_key_invalid","API Key is either invalid or expired.")}}function xe(e){if(!e)return{};try{let t=JSON.parse(e);return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}catch{return{}}}function we(e,t){let i=/boundary=(?:"([^"]+)"|([^;]+))/i.exec(t),s=(i?.[1]??i?.[2]??"").trim();if(!s)return{};let c={};for(let f of e.split(`--${s}`)){let l=f.replace(/^\r\n/,"");if(l===""||l==="--"||l===`--\r
|
|
3
|
+
`)continue;let A=l.indexOf(`\r
|
|
4
|
+
\r
|
|
5
|
+
`);if(A<0)continue;let p=l.slice(0,A),m=l.slice(A+4).replace(/\r\n$/,""),_=/name="([^"]*)"/i.exec(p);if(!_)continue;let n=_[1],r=/filename="([^"]*)"/i.exec(p);if(r){c[`${n}__filename`]=r[1];continue}let o=c[n];o===void 0?c[n]=m:Array.isArray(o)?o.push(m):c[n]=[o,m]}return c}function ve(e){let t=e.headers?.["content-type"]??"";return/multipart\/form-data/i.test(t)&&e.body?we(e.body,t):xe(e.body)}function be(e){return e??ge()}function $(e){return ae("sha256").update(e).digest("hex").slice(0,24)}function te(e,t,i){let s=`${e}:`,c=new Set(se(F,i).filter(f=>f.type===e&&f.id.startsWith(s)).map(f=>f.id.slice(s.length)));for(let f=c.size;;f+=1){let l=$(`${e}:${t}:${f}`);if(!c.has(l))return l}}function Ee(e,t){return`${e}:${t}`}function w(e){return typeof e=="string"&&e.length>0?e:void 0}function D(e){if(Array.isArray(e))return e;if(typeof e=="string"&&e.length>0)return[e]}function U(e){if(typeof e=="number"&&Number.isInteger(e)&&e>0)return e;if(typeof e=="string"&&/^[0-9]+$/.test(e)){let t=Number(e);return t>0?t:void 0}}function b(e,t){let i=`${e}:`;return se(F,t).filter(s=>s.type===e&&s.id.startsWith(i)&&s._deleted!==!0).map(s=>({...s,id:s.id.slice(i.length)}))}function k(e,t,i){if(t)return b(e,i).find(s=>s.id===t)}function K(e){let{type:t,updatedAt:i,...s}=e,c={};for(let[f,l]of Object.entries(s))f.startsWith("_")||(c[f]=l);return c}async function I(e,t,i,s,c){await he(F,{operation:s,subjectType:e,subjectId:Ee(e,t),fields:i,...c.occurredAt?{occurredAt:c.occurredAt}:{},actor:{kind:"agent"}},c.root)}function z(e){return e===null||typeof e!="object"?JSON.stringify(e)??"null":Array.isArray(e)?`[${e.map(z).join(",")}]`:`{${Object.keys(e).sort().map(i=>`${JSON.stringify(i)}:${z(e[i])}`).join(",")}}`}function M(...e){return ae("sha256").update(e.map(z).join("::")).digest("hex").slice(0,8)}function O(e,...t){return`[twin-stub:twelvelabs:${M(e,...t)}] deterministic ${e} \u2014 this twin runs no Marengo/Pegasus model weights and holds no video pixels`}function V(e,t){if(!e.scenarioEngine)return null;let i=e.scenarioEngine.next({kind:t.kind,videoId:t.videoId,indexId:t.indexId,prompt:t.prompt??"",modelName:t.modelName??""});return i.kind==="handler"?i.respond.text:null}function P(e){return e.split(/\s+/).filter(Boolean).length}function ne(e,t){let i=K(e),s=String(i.id),c=b("video",t).filter(f=>f.index_id===s);return{_id:s,index_name:i.index_name,models:i.models??[],addons:i.addons??[],created_at:i.created_at??null,updated_at:i.updated_at??null,expires_at:i.expires_at??null,video_count:c.length,total_duration:c.reduce((f,l)=>f+(typeof l.duration=="number"?l.duration:0),0)}}function ie(e){let t=K(e);return{_id:t.id,index_id:t.index_id,video_id:t.video_id,status:t.status,created_at:t.created_at??null,updated_at:t.updated_at??null,system_metadata:{filename:t.filename??null,duration:t.duration??null,width:t.width??null,height:t.height??null},...t.hls?{hls:t.hls}:{}}}function re(e){let t=K(e),i={_id:t.id,created_at:t.created_at??null,updated_at:t.updated_at??null,indexed_at:t.indexed_at??null,system_metadata:{filename:t.filename??null,duration:t.duration??null,fps:t.fps??null,width:t.width??null,height:t.height??null,size:t.size??null}};return t.user_metadata&&typeof t.user_metadata=="object"&&(i.user_metadata=t.user_metadata),t.hls&&(i.hls=t.hls),i}function j(e,t,i){let s=e.length,c=Math.max(1,Math.ceil(s/i)),f=(t-1)*i;return{status:200,body:{data:e.slice(f,f+i),page_info:{limit_per_page:i,page:t,total_page:c,total_results:s}}}}function C(e){let t=e.get("page")===null?1:U(e.get("page")),i=e.get("page_limit")===null?10:U(e.get("page_limit"));return t===void 0?S("page"):i===void 0||i>50?S("page_limit","The `page_limit` parameter is invalid."):{page:t,pageLimit:i}}function B(e){return typeof e=="object"&&e!==null&&typeof e.status=="number"}var Te=new Set(["invalid","tlk_invalid","expired","tlk_expired"]);function Se(e){let t=e.apiKey??e.headers?.["x-api-key"];if(typeof t!="string"||t.trim()===""||Te.has(t.trim().toLowerCase()))return ee()}function ke(e){return(Array.isArray(e.models)?e.models:[]).map(i=>String(i.model_name??""))}function ue(e,t){return ke(e).some(i=>i.startsWith(t))}function Ae(e){let t=[String(e.filename??""),String(e.video_url??"")],i=e.user_metadata;if(i&&typeof i=="object")for(let s of Object.values(i))t.push(String(s));return t.join(" ").toLowerCase()}function Ie(e){return[...new Set(e.toLowerCase().split(/[^a-z0-9]+/).filter(t=>t.length>=2))]}function Re(e,t){let i=Ie(t);return e.map(s=>{let c=Ae(s),f=i.filter(l=>c.includes(l)).length;return{videoRow:s,matches:f}}).filter(s=>s.matches>0).sort((s,c)=>c.matches-s.matches||String(s.videoRow.id).localeCompare(String(c.videoRow.id)))}function Le(e,t,i){let s=Math.min(10,Math.max(1,Math.round(i))),c=Math.max(0,Math.floor(i-s)),f=c===0?0:parseInt(M("clip",e,t),16)%(c+1);return{start:f,end:f+s}}function Oe(e){return Buffer.from(JSON.stringify(e),"utf8").toString("base64url")}function Pe(e){try{let t=JSON.parse(Buffer.from(e,"base64url").toString("utf8"));return typeof t.index_id!="string"||typeof t.query_text!="string"||typeof t.page_limit!="number"||typeof t.page!="number"||!Number.isInteger(t.page_limit)||t.page_limit<1||t.page_limit>50||!Number.isInteger(t.page)||t.page<1?void 0:t}catch{return}}function oe(e,t,i,s,c,f){let l=String(e.id),A=b("video",f).filter(o=>o.index_id===l),p=Re(A,t),m=(s-1)*i,_=p.slice(m,m+i),n=p.length>m+i;return{status:200,body:{data:_.map((o,a)=>{let u=String(o.videoRow.id),d=typeof o.videoRow.duration=="number"?o.videoRow.duration:0,{start:g,end:h}=Le(u,t,d);return{start:g,end:h,video_id:u,rank:m+a+1,thumbnail_url:`https://twin.local/twelvelabs/thumbnails/${u}/${g}.jpg`}}),page_info:{limit_per_page:i,page_expires_at:new Date(Date.parse(c)+3600*1e3).toISOString(),total_results:p.length,total_inner_matches:p.reduce((o,a)=>o+a.matches,0),...n?{next_page_token:Oe({index_id:l,query_text:t,page_limit:i,page:s+1})}:{}},search_pool:{total_count:A.length,total_duration:A.reduce((o,a)=>o+(typeof a.duration=="number"?a.duration:0),0),index_id:l}}}}async function H(e){let t=e.method.toUpperCase(),[i,s]=e.path.split("?"),c=(i??"/").replace(/\/+$/,"")||"/",f=new URLSearchParams(s??""),l=ve(e),A=c.replace(/^\/+/,"").split("/").filter(Boolean),p=A[0]==="v1.3"?A.slice(1):A,m=n=>decodeURIComponent(p[n]??""),_=be(e.occurredAt);if(e.headers!==void 0||e.apiKey!==void 0){let n=Se(e);if(n)return n}if(e.readOnly&&t!=="GET")return{status:405,body:E("twin_read_only","twin is read-only; omit readOnly to accept writes")};if(c==="/"||p.length===0)return{status:200,body:{service:"twelvelabs",object:"twin"}};if(p[0]==="indexes"){if(p.length===1&&t==="POST"){let n=w(l.index_name);if(!n)return y("index_name");let r=l.models;if(!Array.isArray(r)||r.length===0)return y("models");let o=[];for(let d of r){let g=d??{},h=w(g.model_name);if(!h)return y("model_name");if(!de.includes(h))return S("model_name");let R=D(g.model_options);if(!R||R.length===0)return y("model_options");if(R.some(T=>!_e.includes(String(T))))return S("model_options");o.push({model_name:h,model_options:R.map(String)})}let a=D(l.addons)??[];if(a.some(d=>!ye.includes(String(d))))return S("addons");if(b("index",e.root).some(d=>d.index_name===n))return{status:400,body:E("index_name_already_exists",`Index name \`${n}\` already exists.`)};let u=te("index",_,e.root);return await I("index",u,{index_name:n,models:o,addons:a.map(String),created_at:_,updated_at:_,expires_at:null},"index.create",e),{status:201,body:{_id:u}}}if(p.length===1&&t==="GET"){let n=C(f);if(B(n))return n;let r=b("index",e.root),o=f.get("index_name");o!==null&&(r=r.filter(d=>d.index_name===o));let a=f.get("sort_option")??"desc",u=f.get("sort_by")??"created_at";return r=r.sort((d,g)=>{let h=String(d[u]??"").localeCompare(String(g[u]??""));return a==="asc"?h:-h}),j(r.map(d=>ne({...d,type:"index"},e.root)),n.page,n.pageLimit)}if(p.length===2&&t==="GET"){let n=k("index",m(1),e.root);return n?{status:200,body:ne({...n,type:"index"},e.root)}:v(m(1),"index")}if(p.length===2&&t==="PUT"){if(!k("index",m(1),e.root))return v(m(1),"index");let r=w(l.index_name);return r?l.models!==void 0?{status:400,body:E("index_option_cannot_be_changed","Index option cannot be changed.")}:b("index",e.root).some(o=>o.index_name===r&&o.id!==m(1))?{status:400,body:E("index_name_already_exists",`Index name \`${r}\` already exists.`)}:(await I("index",m(1),{index_name:r,updated_at:_},"index.update",e),{status:204,body:null}):y("index_name")}if(p.length===2&&t==="DELETE"){if(!k("index",m(1),e.root))return v(m(1),"index");let r=m(1);for(let o of b("video",e.root).filter(a=>a.index_id===r))await I("video",String(o.id),{_deleted:!0},"video.delete",e);for(let o of b("task",e.root).filter(a=>a.index_id===r))await I("task",String(o.id),{_deleted:!0},"task.delete",e);return await I("index",r,{_deleted:!0},"index.delete",e),{status:204,body:null}}if(p.length>=3&&p[2]==="videos"){if(!k("index",m(1),e.root))return v(m(1),"index");let r=m(1);if(p.length===3&&t==="GET"){let o=C(f);if(B(o))return o;let a=b("video",e.root).filter(d=>d.index_id===r),u=f.get("filename");return u!==null&&(a=a.filter(d=>d.filename===u)),a=a.sort((d,g)=>String(g.created_at??"").localeCompare(String(d.created_at??""))),j(a.map(d=>re({...d,type:"video"})),o.page,o.pageLimit)}if(p.length===4&&t==="GET"){let o=b("video",e.root).find(a=>a.id===m(3)&&a.index_id===r);return o?{status:200,body:re({...o,type:"video"})}:v(m(3),"video")}if(p.length===4&&t==="PUT"){let o=b("video",e.root).find(u=>u.id===m(3)&&u.index_id===r);if(!o)return v(m(3),"video");let a=l.user_metadata;return a===void 0?{status:204,body:null}:a===null||typeof a!="object"||Array.isArray(a)?S("user_metadata"):(await I("video",m(3),{user_metadata:{...o.user_metadata??{},...a},updated_at:_},"video.update",e),{status:204,body:null})}if(p.length===4&&t==="DELETE")return b("video",e.root).find(a=>a.id===m(3)&&a.index_id===r)?(await I("video",m(3),{_deleted:!0},"video.delete",e),{status:204,body:null}):v(m(3),"video")}}if(p[0]==="tasks"){if(p.length===1&&t==="POST"){let n=w(l.index_id);if(!n)return y("index_id");if(!k("index",n,e.root))return v(n,"index");let o=w(l.video_url),a=w(l.video_file__filename);if(!o&&!a)return y("video_url");let u,d=l.user_metadata;if(d!==void 0)if(typeof d=="string")try{let x=JSON.parse(d);if(!x||typeof x!="object"||Array.isArray(x))return S("user_metadata");u=x}catch{return S("user_metadata")}else if(typeof d=="object"&&!Array.isArray(d))u=d;else return S("user_metadata");let g=a??decodeURIComponent(String(o).split("/").pop()??"video.mp4").split("?")[0],h=te("task",_,e.root),R=$(`video:${_}:${h}`),T=60+parseInt(M("duration",o??g),16)%540;return await I("task",h,{index_id:n,video_id:R,status:"Validating",origin:"twin",video_url:o??null,filename:g,duration:T,width:1920,height:1080,enable_video_stream:String(l.enable_video_stream??"true")==="true",...u?{user_metadata:u}:{},created_at:_,updated_at:_},"task.create",e),{status:201,body:{_id:h,video_id:R}}}if(p.length===1&&t==="GET"){let n=C(f);if(B(n))return n;let r=b("task",e.root),o=f.get("index_id");o!==null&&(r=r.filter(u=>u.index_id===o));let a=f.getAll("status");return a.length>0&&(r=r.filter(u=>a.includes(String(u.status)))),r=r.sort((u,d)=>String(d.created_at??"").localeCompare(String(u.created_at??""))),j(r.map(u=>ie({...u,type:"task"})),n.page,n.pageLimit)}if(p.length===2&&t==="GET"){let n=m(1),r=k("task",n,e.root);if(!r)return v(n,"task");let o=String(r.status),a=W.indexOf(o);if(!e.readOnly&&r.origin!=="observed"&&a>=0&&a<W.length-1){let d=W[a+1];await I("task",n,{status:d,updated_at:_},`task.${d.toLowerCase()}`,e),d==="Ready"&&await I("video",String(r.video_id),{index_id:r.index_id,task_id:n,filename:r.filename,video_url:r.video_url??null,duration:r.duration,fps:30,width:r.width,height:r.height,size:1024*1024,...r.user_metadata?{user_metadata:r.user_metadata}:{},created_at:r.created_at??_,updated_at:_,indexed_at:_},"video.index",e)}let u=k("task",n,e.root);return{status:200,body:ie({...u,type:"task"})}}if(p.length===2&&t==="DELETE"){let n=m(1),r=k("task",n,e.root);return r?r.status!=="Ready"&&r.status!=="Failed"?{status:400,body:E("task_cannot_be_deleted",`Task with id \`${n}\` cannot be deleted while its status is \`${String(r.status)}\`.`)}:(await I("task",n,{_deleted:!0},"task.delete",e),{status:204,body:null}):v(n,"task")}}if(p[0]==="search"){if(p.length===1&&t==="POST"){let n=w(l.index_id);if(!n)return y("index_id");let r=k("index",n,e.root);if(!r)return v(n,"index");let o=D(l.search_options);if(!o||o.length===0)return y("search_options");let a=["visual","audio","transcription"];if(o.some(h=>!a.includes(String(h))))return{status:400,body:E("search_option_not_supported",`Search option \`${String(o.find(h=>!a.includes(String(h))))}\` is not supported for index.`)};if(!ue(r,"marengo"))return{status:400,body:E("index_not_supported_for_search","You can only perform search requests on indexes with Marengo engine.")};let u=w(l.query_text);if(!u)return y("query_text");let d=l.page_limit,g=d===void 0?10:U(d);return g===void 0||g>50?S("page_limit"):oe(r,u,g,1,_,e.root)}if(p.length===2&&t==="GET"){let n=Pe(m(1));if(!n)return{status:400,body:E("search_page_token_expired","The token that identifies the page to be retrieved is expired.")};let r=k("index",n.index_id,e.root);return r?oe(r,n.query_text,n.page_limit,n.page,_,e.root):v(n.index_id,"index")}}if(p[0]==="analyze"&&p.length===1&&t==="POST"){let n=w(l.video_id);if(!n)return y("video_id");let r=w(l.prompt);if(!r)return y("prompt");let o=await G(n,e.root);if(B(o))return o;let a=w(l.model_name)??"pegasus1.5",u=V(e,{kind:"analysis",videoId:n,indexId:String(o.video.index_id??""),prompt:r,modelName:a})??O("analysis",n,r,a);return{status:200,body:{id:$(`analyze:${_}:${n}:${r}:${a}`),data:u,finish_reason:"stop",usage:{output_tokens:P(u),input_tokens:P(r)}}}}if(p[0]==="summarize"&&p.length===1&&t==="POST"){let n=w(l.video_id);if(!n)return y("video_id");let r=w(l.type);if(!r)return y("type");if(!["summary","chapter","highlight"].includes(r))return S("type");let o=await G(n,e.root);if(B(o))return o;let a=w(l.prompt)??"",u=typeof o.video.duration=="number"?o.video.duration:60,d=$(`summarize:${_}:${n}:${r}:${a}`);if(r==="summary"){let T=V(e,{kind:"summary",videoId:n,indexId:String(o.video.index_id??""),prompt:a})??O("summary",n,a);return{status:200,body:{id:d,summarize_type:"summary",summary:T,usage:{output_tokens:P(T)}}}}let g=3,h=Math.max(1,Math.floor(u/g));if(r==="chapter"){let T=Array.from({length:g},(x,L)=>({chapter_number:L,start:L*h,end:L===g-1?Math.round(u):(L+1)*h,chapter_title:O("chapter-title",n,a,L),chapter_summary:O("chapter-summary",n,a,L)}));return{status:200,body:{id:d,summarize_type:"chapter",chapters:T,usage:{output_tokens:T.reduce((x,L)=>x+P(L.chapter_summary),0)}}}}let R=Array.from({length:g},(T,x)=>({start:x*h,end:x===g-1?Math.round(u):(x+1)*h,highlight:O("highlight",n,a,x),highlight_summary:O("highlight-summary",n,a,x)}));return{status:200,body:{id:d,summarize_type:"highlight",highlights:R,usage:{output_tokens:R.reduce((T,x)=>T+P(x.highlight_summary),0)}}}}if(p[0]==="gist"&&p.length===1&&t==="POST"){let n=w(l.video_id);if(!n)return y("video_id");let r=D(l.types);if(!r||r.length===0)return y("types");let o=["title","topic","hashtag"];if(r.some(h=>!o.includes(String(h))))return S("types");let a=await G(n,e.root);if(B(a))return a;let u=new Set(r.map(String)),d={id:$(`gist:${_}:${n}:${[...u].sort().join(",")}`)},g=0;if(u.has("title")){let h=V(e,{kind:"title",videoId:n,indexId:String(a.video.index_id??"")})??O("title",n);d.title=h,g+=P(h)}return u.has("topic")&&(d.topics=[0,1].map(h=>O("topic",n,h)),g+=2),u.has("hashtag")&&(d.hashtags=[0,1].map(h=>`twinstub${M("hashtag",n,h)}`),g+=2),d.usage={output_tokens:g},{status:200,body:d}}return v(c,"endpoint")}async function G(e,t){let i=k("video",e,t);if(!i)return v(e,"video");let s=k("index",String(i.index_id),t);return s?ue(s,"pegasus")?{video:i,index:s}:{status:400,body:E("index_not_supported_for_generate","You can only summarize videos uploaded to an index with Pegasus.")}:v(String(i.index_id),"index")}import{serveHttp as Xe}from"../../engine/v2/volter_world-core.mjs";import{createTwinFetchFromHandler as We,twinManifest as Ve,withRequestScopes as je}from"../../engine/v2/volter_world-core.mjs";import{getActiveWorldStore as Be,parseScenarioDocument as $e,ScenarioError as Ne,ScenarioEngine as De}from"../../engine/v2/volter_world-core.mjs";var Y=["analysis","summary","title"],le=new Set(["text"]),Me=new Set(Y),N=e=>typeof e=="string"&&e.length>0,J={vendor:"twelvelabs",features:e=>({kind:e.kind,videoId:e.videoId,indexId:e.indexId,prompt:e.prompt.slice(0,300),modelName:e.modelName}),matchers:{kindEquals:(e,t)=>N(t)&&e.kind===t,videoIdEquals:(e,t)=>N(t)&&e.videoId===t,indexIdEquals:(e,t)=>N(t)&&e.indexId===t,promptIncludes:(e,t)=>N(t)&&e.prompt.toLowerCase().includes(t.toLowerCase()),modelNameEquals:(e,t)=>N(t)&&e.modelName===t},text:e=>e.prompt,validateOn:e=>{for(let t of["videoIdEquals","indexIdEquals","promptIncludes","modelNameEquals"])if(e[t]!==void 0&&(typeof e[t]!="string"||!e[t]))return`on.${t} is a non-empty string`;return e.kindEquals!==void 0&&(typeof e.kindEquals!="string"||!Me.has(e.kindEquals))?`on.kindEquals is one of ${Y.join(", ")} (the generations with one primary text; chapters, highlights, topics and hashtags are not scriptable)`:null},validateRespond:e=>{if(typeof e!="object"||e===null||Array.isArray(e))return"respond is an object { text }";let t=e;for(let i of Object.keys(t))if(!le.has(i))return`respond: unknown key "${i}" (valid: ${[...le].join(", ")})`;return typeof t.text!="string"||!t.text?"respond.text is a non-empty string (the generated text this request answers with)":null}};function Q(e){let t;try{let i=Be().read(e);if(i===null)throw new Error(`ENOENT: no such file or directory, open '${e}'`);t=JSON.parse(i)}catch(i){throw new Ne(`twelvelabs scenario: cannot read/parse ${e}: ${i instanceof Error?i.message:String(i)}`)}return $e(t,J)}function X(e){return new De(J,e)}function ce(e={}){let t=e.scenarioPath??process.env.TWIN_TWELVELABS_SCENARIO,i=t?X(Q(t)):void 0,{scenarioPath:s,...c}=e;return je(We(H,{...c,manifest:()=>Ve({vendor:"twelvelabs",twinOf:"the Twelve Labs video-understanding API",stateSentence:"Stateful: it stores indexes and async video-indexing tasks through their real status lifecycle (a video is materialised when its task reaches Ready). Create them through the vendor's OWN API with any x-api-key.",behaviorSentence:"Generated TEXT is scripted by MSW-shaped handlers in the world dir (handlers/twelvelabs.json): {on:{kindEquals|videoIdEquals|indexIdEquals|promptIncludes|modelNameEquals|nthCall}, respond:{text}, once?, phase?}. `kindEquals` is one of analysis (POST /analyze), summary (POST /summarize type=summary), title (POST /gist types=[title]) \u2014 the generations with ONE primary text; chapters, highlights, topics and hashtags keep their stubs and cannot be named. The twin's own refusals (unknown video, an index with no Pegasus model) fire FIRST, so a handler never conjures state. Unmatched generations answer the labeled [twin-stub:twelvelabs:\u2026] text, and the misses are inspectable at GET /twin/scenario.",exampleHandler:{on:{kindEquals:"summary",promptIncludes:"launch"},respond:{text:"The clip walks through the launch checklist."}},engine:i}),scenarioStatus:()=>i?i.status():{vendor:"twelvelabs",handlers:[],misses:0,recentMisses:[]},...i?{handlerOptions:{scenarioEngine:i}}:{}}),{refuse:()=>Response.json({code:"twin_read_only",message:"twin is read-only; omit readOnly to accept writes"},{status:405})})}import{observeResources as ct}from"../../engine/v2/volter_world-core.mjs";import{declareRateBudget as Ce,rateBudgetPath as it,rateBudgetWeight as rt,RateBudget as ot,RateBudgetError as at}from"../../engine/v2/volter_world-core.mjs";import{RateBudgetError as Ue}from"../../engine/v2/volter_world-core.mjs";var Ge="twelvelabs",fe=6e4,pe=24,me=300,Z={embed:3,other:1};var q={windowMs:fe,ceiling:pe,defaultWeight:Z.other,maxRetryAfterSeconds:me,rules:[{match:"^embed(\\.|$)",weight:Z.embed}],reason:"Twelve Labs publishes an exact per-minute table by endpoint category and plan (docs.twelvelabs.io/docs/get-started/rate-limits): on the Free plan (and Developer Tier 1, documented as identical) Index is 60 RPM, Upload 60 RPM, Search 600 RPM, Analyze 60 RPM, Embed text/image 600 RPM and Embed video/audio 25 RPM. Every call this connector makes (indexes.list, indexes.videos.list, tasks.list) is in the 60 RPM Index tier, so weight 1 is that currency and the ceiling of 24 units/60s is 24 calls/min = 40% of the documented 60/min. THIS IS TIGHTER THAN the kernel's DEFAULT_RATE_BUDGET (30 calls/min), so no burst anchor is claimed or needed. embed.* costs 3 \u2014 the documented 25 RPM video/audio embedding tier is 2.4x tighter than the 60 RPM baseline, rounded up \u2014 so the window admits 8 embedding calls/min, 32% of 25. The vendor answers 429 `too_many_requests` and exposes X-RateLimit-Request-* headers; the bare-429 cooldown is the backstop."};Ce(Ge,q);export{ce as createTwinFetch};
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
@agenttwin/twin-twilio
|
|
2
|
+
|
|
3
|
+
Contains @volter/twin-twilio 0.1.37 by Volter (https://github.com/volter-ai),
|
|
4
|
+
licensed under the Apache License, Version 2.0 (see LICENSE).
|
|
5
|
+
|
|
6
|
+
Modified by AgentTwin: bundled and minified into one file; only code reachable from the pack's
|
|
7
|
+
fetch factory is included; shared modules are imported from the AgentTwin twin engine.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __atReq}from'node:module';const require=__atReq(import.meta.url);
|
|
2
|
+
import{createHash as v}from"node:crypto";import{applyTwinWrite as J,projectResources as Q,worldNow as Z}from"../../engine/v2/volter_world-core.mjs";import{applyTwinWriteAtomic as Y,projectResources as K,nodeBuiltin as z}from"../../engine/v2/volter_world-core.mjs";function X(){return z("node:crypto")}var R="twilio",E="signing_key",P="signing_key:account";function k(e){return typeof e=="string"&&/^AC[0-9a-fA-F]{32}$/.test(e)}function A(e){return typeof e=="string"&&/^[0-9a-fA-F]{32,}$/.test(e)}function I(e){let t;for(let[u,c]of Object.entries(e??{}))u.toLowerCase()==="authorization"&&(t=c);let n=/^Basic\s+([A-Za-z0-9+/=]+)$/i.exec(t??"");if(!n)return;let o;try{o=Buffer.from(n[1],"base64").toString("utf8")}catch{return}let i=o.indexOf(":");if(i<0)return;let r=o.slice(0,i),s=o.slice(i+1);if(!(!k(r)||!A(s)))return{accountSid:r,authToken:s}}function M(e){let t=e.find(i=>i.type===E&&i.id===P),n=t?._account_sid,o=t?._auth_token;if(!(typeof n!="string"||typeof o!="string")&&!(!n||!o))return{accountSid:n,authToken:o}}function b(e){return M(K(R,e))}function j(e){let t=n=>X().randomBytes(n).toString("hex");return{accountSid:k(e?.accountSid)?e.accountSid:`AC${t(16)}`,authToken:A(e?.authToken)?e.authToken:t(16)}}async function y(e,t){let n=b(e);if(n)return n;let{value:o}=await Y(R,i=>{let r=M(i);if(r)return{kind:"skip",value:r};let s=j(t);return{kind:"write",value:s,write:{operation:"signing_key.create",subjectType:E,subjectId:P,fields:{_account_sid:s.accountSid,_auth_token:s.authToken},actor:{kind:"system"}}}},e);return o}var B="twilio",p="2010-04-01";function q(e){let t={};for(let[n,o]of Object.entries(e??{}))t[n.toLowerCase()]=o;return t}function W(e){let t=q(e.headers),n=(e.path.split("?")[0]??"/").replace(/\/+$/,"")||"/",o=e.host??t.host;return o==="api.twilio.com"?"api":o==="verify.twilio.com"?"verify":o==="lookups.twilio.com"?"lookup":n.includes("/Services/")?"verify":n.includes("/PhoneNumbers/")?"lookup":(n.includes("/Accounts/"),"api")}function S(e,t,n){return{status:n,body:{code:e,message:t,more_info:`https://www.twilio.com/docs/errors/${e}`,status:n}}}function f(){return S(20404,"The requested resource was not found",404)}function ee(e){if(e===void 0||e==="")return{ok:!0,value:{}};let t=e.trim();if(t.startsWith("{")||t.startsWith("["))return{ok:!1};let n=new URLSearchParams(e),o={};for(let[i,r]of n)o[i]=r;return{ok:!0,value:o}}function m(e){return e??Z()}function _(e){return new Date(m(e)).toUTCString().replace("GMT","+0000")}function te(e,t){return`${e}:${t}`}function T(e,t){let n=`${e}:`;return Q(B,t).filter(o=>o.type===e&&o.id.startsWith(n)&&o._deleted!==!0).map(o=>({...o,id:o.id.slice(n.length)}))}function w(e,t,n){return T(e,n).find(o=>o.id===t)}function ne(e){let{type:t,updatedAt:n,...o}=e,i={};for(let[r,s]of Object.entries(o))r.startsWith("_")||(i[r]=s);return i}function g(e){let t=ne(e),{id:n,...o}=t;return{sid:n,...o}}function oe(e){let t=g(e),{number_type:n,...o}=t;return{...o,type:n??null}}async function h(e,t,n,o,i){let{resource:r}=await J(B,{operation:o,subjectType:e,subjectId:te(e,t),fields:n,...i.occurredAt?{occurredAt:i.occurredAt}:{},actor:{kind:"agent"}},i.root);return g({...r,id:t})}function x(e,t){return`${e}${v("sha256").update(t).digest("hex").slice(0,32)}`}function ie(e){return x("SM",`message:${e.occurredAt??""}:${T("message",e.root).length}`)}function re(e){return x("VE",`verification:${e.occurredAt??""}:${T("verification",e.root).length}`)}function se(e){return`PN${v("sha256").update(e).digest("hex").slice(0,32)}`}var N=/^\+[1-9]\d{6,14}$/;function ce(e){return e.length===0||e.length<=160?"1":String(Math.ceil(e.length/153))}function O(e,t){let n=`/${p}/Accounts/${e}/Messages/${t}`;return{uri:`${n}.json`,subresource_uris:{media:`${n}/Media.json`,feedback:`${n}/Feedback.json`}}}async function ue(e,t,n){let o=t.To,i=t.From??"",r=t.Body??"";if(!o)return S(21604,"The destination 'To' phone number is required to send an SMS",400);if(!N.test(o))return S(21211,"Invalid 'To' Phone Number",400);let s=ie(n),u=m(n.occurredAt);await h("message",s,{account_sid:e,api_version:p,body:r,to:o,from:i,direction:"outbound-api",status:"queued",num_segments:ce(r),num_media:"0",messaging_service_sid:t.MessagingServiceSid??null,date_created:_(u),date_updated:_(u),date_sent:null,error_code:null,error_message:null,price:null,price_unit:null,poll_count:0,_status_callback:t.StatusCallback??null},"message.create",n);let c=w("message",s,n.root);return{status:201,body:{...g(c),...O(e,s)}}}async function ae(e,t){let n=w("message",e,t.root);if(!n)return;let o=n.poll_count??0,i=n.status;if(i==="queued"){if(o===0){await h("message",e,{poll_count:o+1},"message.poll",t);return}await h("message",e,{status:"sending",poll_count:o+1},"message.progress",t);return}if(i==="sending"){await h("message",e,{status:"sent",date_sent:_(m(t.occurredAt)),date_updated:_(m(t.occurredAt)),poll_count:o+1},"message.progress",t);return}if(i==="sent"){await h("message",e,{status:"delivered",date_updated:_(m(t.occurredAt)),poll_count:o+1},"message.complete",t);return}}async function le(e,t,n){if(!w("message",t,n.root))return f();n.readOnly||await ae(t,n);let i=w("message",t,n.root);return{status:200,body:{...g(i),...O(e,t)}}}function de(e,t){let n=T("message",t.root).filter(i=>i.account_sid===e).map(i=>({...g(i),...O(e,i.id)})),o=`/${p}/Accounts/${e}/Messages.json`;return{status:200,body:{end:Math.max(n.length-1,0),first_page_uri:`${o}?PageSize=50&Page=0`,next_page_uri:null,page:0,page_size:50,previous_page_uri:null,messages:n,uri:o}}}async function fe(e,t){let n=_(m(t.occurredAt)),o=`/${p}/Accounts/${e}.json`,i=t.readOnly?b(t.root):await y(t.root);return{status:200,body:{sid:e,auth_token:i?.authToken??"",friendly_name:"Twin Account",status:"active",type:"Full",owner_account_sid:e,date_created:n,date_updated:n,uri:o,subresource_uris:{messages:`/${p}/Accounts/${e}/Messages.json`,incoming_phone_numbers:`/${p}/Accounts/${e}/IncomingPhoneNumbers.json`}}}}var pe=[{phone_number:"+15550001111",friendly_name:"Twin Local Number",numberType:"local"},{phone_number:"+18005550100",friendly_name:"Twin Toll-Free Number",numberType:"toll-free"}];async function me(e,t){if(T("phone_number",t.root).length>0)return;let o=_(m(t.occurredAt));for(let i of pe){let r=se(i.phone_number);await h("phone_number",r,{account_sid:e,phone_number:i.phone_number,friendly_name:i.friendly_name,number_type:i.numberType,capabilities:{voice:!0,sms:!0,mms:!0,fax:!1},sms_url:null,voice_url:null,status_callback:null,date_created:o,date_updated:o,uri:`/${p}/Accounts/${e}/IncomingPhoneNumbers/${r}.json`},"phone_number.seed",t)}}async function ge(e,t){await me(e,t);let n=`/${p}/Accounts/${e}/IncomingPhoneNumbers.json`,o=T("phone_number",t.root).filter(i=>i.account_sid===e).map(oe);return{status:200,body:{end:Math.max(o.length-1,0),first_page_uri:`${n}?PageSize=50&Page=0`,next_page_uri:null,page:0,page_size:50,previous_page_uri:null,incoming_phone_numbers:o,uri:n}}}function he(e,t){let n=v("sha256").update(`${e}:${t}`).digest("hex").slice(0,6);return String(parseInt(n,16)%1e6).padStart(6,"0")}function L(e,t){return`${e}::${t}`}function we(e,t,n){return T("verification",n).find(o=>o._lookup_key===L(e,t))}async function _e(e,t,n){let o=t.To,i=t.Channel;if(!o||!i)return S(60200,"Invalid parameter",400);let r=re(n),s=m(n.occurredAt);await h("verification",r,{service_sid:e,account_sid:(await y(n.root)).accountSid,to:o,channel:i,status:"pending",valid:!1,lookup:{},amount:null,payee:null,send_code_attempts:[{time:s,channel:i,attempt_sid:x("VL",`${r}:attempt:0`)}],sna:null,date_created:s,date_updated:s,_lookup_key:L(e,o),_expected_code:he(e,o)},"verification.create",n);let u=w("verification",r,n.root);return{status:201,body:{...g(u),url:`https://verify.twilio.com/v2/Services/${e}/Verifications/${r}`}}}async function Te(e,t,n){let o=t.Code??"",i=t.To,r=t.VerificationSid,s=r?w("verification",r,n.root):void 0;if(!s&&i&&(s=we(e,i,n.root)),!s)return f();let u=s.id;if(s.status==="approved")return{status:200,body:{...g(s),url:`https://verify.twilio.com/v2/Services/${e}/Verifications/${u}`}};let a=s._expected_code;o.length>0&&o===a&&await h("verification",u,{status:"approved",valid:!0,date_updated:m(n.occurredAt)},"verification.check",n);let l=w("verification",u,n.root);return{status:200,body:{...g(l),url:`https://verify.twilio.com/v2/Services/${e}/Verifications/${u}`}}}function ye(e){let t=parseInt(v("sha256").update(e).digest("hex").slice(0,4),16),n=["mobile","landline","voip"];return n[t%n.length]}function Se(e,t,n){if(!N.test(e))return f();let o=e.slice(1),i=o.startsWith("1")&&o.length===11?"US":"XX",r=i==="US"?`(${o.slice(1,4)}) ${o.slice(4,7)}-${o.slice(7)}`:o,s={calling_country_code:o.startsWith("1")?"1":o.slice(0,2),country_code:i,phone_number:e,national_format:r,valid:!0,validation_errors:null,caller_name:null,sim_swap:null,call_forwarding:null,live_activity:null,line_type_intelligence:null,identity_match:null,reassigned_number:null,sms_pumping_risk:null,phone_number_quality_score:null,pre_fill:null,url:`https://lookups.twilio.com/v2/PhoneNumbers/${encodeURIComponent(e)}`};return t.split(",").map(c=>c.trim()).filter(Boolean).includes("line_type_intelligence")&&(s.line_type_intelligence={type:ye(o),mobile_country_code:i==="US"?"310":null,mobile_network_code:i==="US"?"150":null,carrier_name:`Twin Carrier ${o.slice(-3)}`,error_code:null}),{status:200,body:s}}async function C(e){let t=e.method.toUpperCase(),[n,o]=e.path.split("?"),i=(n??"/").replace(/\/+$/,"")||"/",r=W({host:e.host,headers:e.headers,path:i}),s=new URLSearchParams(o??"");if(e.readOnly&&t!=="GET"&&t!=="HEAD")return{status:405,body:{code:20005,message:"twin is read-only; omit readOnly to accept writes",more_info:"https://www.twilio.com/docs/errors/20005",status:405}};if(!e.readOnly){let a=I(e.headers);a&&await y(e.root,a)}let u={};if(t==="POST"||t==="PUT"){let a=ee(e.body);if(!a.ok)return S(60200,"Invalid parameter: request body must be application/x-www-form-urlencoded, not JSON",400);u=a.value}if(i==="/"||i==="")return{status:200,body:{service:"twilio",object:"twin"}};let c=i.replace(/^\/+/,"").split("/").filter(Boolean);if(r==="api"){if(c[0]!==p||c[1]!=="Accounts"||!c[2])return f();let a=decodeURIComponent(c[2]);if(c.length===3&&a.endsWith(".json")&&t==="GET")return await fe(a.slice(0,-5),e);let d=a,l=c.slice(3);if(l.length===1&&l[0]==="Messages.json"&&t==="POST")return ue(d,u,e);if(l.length===1&&l[0]==="Messages.json"&&t==="GET")return de(d,e);if(l.length===2&&l[0]==="Messages"&&l[1].endsWith(".json")&&t==="GET"){let H=l[1].slice(0,-5);return le(d,H,e)}return l.length===1&&l[0]==="IncomingPhoneNumbers.json"&&t==="GET"?ge(d,e):f()}if(r==="verify"){if(c[0]!=="v2"||c[1]!=="Services"||!c[2])return f();let a=decodeURIComponent(c[2]),d=c.slice(3);if(d.length===1&&d[0]==="Verifications"&&t==="POST")return _e(a,u,e);if(d.length===1&&d[0]==="VerificationCheck"&&t==="POST")return Te(a,u,e);if(d.length===2&&d[0]==="Verifications"&&t==="GET"){let l=w("verification",decodeURIComponent(d[1]),e.root);return l?{status:200,body:{...g(l),url:`https://verify.twilio.com/v2/Services/${a}/Verifications/${l.id}`}}:f()}return f()}if(r==="lookup"){if(c[0]!=="v2"||c[1]!=="PhoneNumbers"||!c[2]||t!=="GET")return f();let a=decodeURIComponent(c.slice(2).join("/"));return Se(a,s.get("Fields")??"",e)}return f()}import{serveHttp as Be}from"../../engine/v2/volter_world-core.mjs";import{createTwinFetchFromHandler as be,statefulTwinManifest as ve,withRequestScopes as Ee}from"../../engine/v2/volter_world-core.mjs";function G(e={}){return Ee(be(C,{...e,manifest:ve({vendor:"twilio",twinOf:"the Twilio messaging API",stores:"sent messages progressing queued\u2192sending\u2192sent\u2192delivered, with signed status callbacks"})}))}import{syncPull as Xe}from"../../engine/v2/volter_world-core.mjs";import{declareRateBudget as ke,rateBudgetPath as Ue,rateBudgetWeight as Ve,RateBudget as Fe,RateBudgetError as De}from"../../engine/v2/volter_world-core.mjs";import{RateBudgetError as Ie}from"../../engine/v2/volter_world-core.mjs";var Ae="twilio",U=6e4,V=60,F=300,D={other:2};var $={windowMs:U,ceiling:V,defaultWeight:D.other,maxRetryAfterSeconds:F,rules:[],reason:`Twilio documents the CONCEPT of REST API concurrency without a number: a Twilio-Concurrent-Requests header and error 20429 ("your account exceeds allowed concurrency to Twilio's REST API"), no numeric threshold, and no Retry-After (its guidance is exponential backoff). GET /Messages, this connector's only call, has NO published per-second or per-minute figure. With no documented figure to aim at, this ceiling is pinned to the kernel's conservative fallback (60 units / 60s at weight 2 = 30 calls/min) rather than invented \u2014 no more permissive than an undeclared vendor already gets \u2014 and it happens to sit under the tightest number Twilio publishes anywhere (Verify verification-status polling at 60 requests/minute, alongside 180/hour and 250/day). Weights are flat because no per-endpoint REST rate is published and the one documented tight surface is already above this total. Verify's hour/day tiers are beyond what a 60s rolling window can model and remain the caller's responsibility.`};ke(Ae,$);import{nodeBuiltin as qe}from"../../engine/v2/volter_world-core.mjs";export{G as createTwinFetch};
|